:root {
  color-scheme: light;
  --background: #f7f4fb;
  --ink: #271a3b;
  --muted: #62566e;
  --purple: #542889;
  --deep-purple: #42206e;
  --lavender: #f0e8f9;
  --border: #e5ddec;
  --gold: #ffdc7a;
  --white: #fff;
  --error: #963746;
  font-family: "Avenir Next", Avenir, system-ui, sans-serif;
  line-height: 1.5;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--background); }
h1, h2, h3, p { margin: 0; }
button, input { font: inherit; color: inherit; }
button { touch-action: manipulation; cursor: pointer; }
button, input { transition: color .16s, border-color .16s, background-color .16s; }
:focus-visible { outline: 3px solid #8854bd; outline-offset: 3px; }
img, svg { display: block; flex: none; }
svg { width: 21px; height: 21px; }
.masthead, .portal { width: min(1110px, calc(100% - 48px)); margin-inline: auto; }
.masthead {
  min-height: 92px; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding-block: 12px; border-bottom: 1px solid var(--border);
}
.brand { display: flex; gap: 10px; align-items: center; font-size: 1.3rem; line-height: 1.2; font-weight: 800; letter-spacing: -.045em; }
.portal-label { color: var(--deep-purple); font-size: .83rem; font-weight: 700; }
.portal {
  display: grid; grid-template-columns: 1.18fr 1fr; gap: 20px; padding-block: 27px 42px;
  align-items: stretch;
}
.event {
  min-height: 470px; isolation: isolate; overflow: hidden; border-radius: 24px;
  color: var(--white); background: #392457 url('/ciletuh.webp') center 57% / cover no-repeat;
  display: flex; align-items: flex-end; position: relative;
}
.event::before {
  position: absolute; content: ""; z-index: -1; inset: 0;
  background: linear-gradient(0deg, #261435 0%, #2a173ee8 26%, #38225465 57%, #33205010 100%);
}
.event-text { padding: clamp(20px, 3vw, 37px); }
.event-text p { color: var(--gold); text-transform: uppercase; font-size: .79rem; letter-spacing: .16em; font-weight: 750; margin-bottom: 6px; }
.event h1 { font-size: clamp(2.25rem, 4.3vw, 3.8rem); font-weight: 800; line-height: 1.03; letter-spacing: -.057em; }
.event h1 span { display: block; color: var(--gold); }
.lookup {
  min-width: 0; display: grid; align-items: center; border-radius: 24px; background: var(--white);
  border: 1px solid var(--border); padding: clamp(22px, 3.1vw, 38px); box-shadow: 0 8px 30px #2d194609;
}
.panel-icon, .tile-icon {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px;
  color: var(--purple); background: var(--lavender);
}
.lookup h2 { font-size: clamp(1.66rem, 2.7vw, 2.3rem); font-weight: 750; letter-spacing: -.043em; line-height: 1.12; }
#lookup-title { margin-top: 13px; }
.intro { color: var(--muted); font-size: .94rem; margin: 9px 0 23px; max-width: 36ch; }
form { display: grid; gap: 7px; }
label { font-size: .87rem; font-weight: 700; }
input {
  width: 100%; height: 51px; padding: 0 13px; border: 1px solid #d9cce7; border-radius: 10px;
  background: #fdfbff; font-weight: 600;
}
input::placeholder { color: #756784; opacity: 1; }
.search-message { color: var(--muted); font-size: .85rem; margin-top: 13px; }
.search-message:empty { display: none; }
.error { color: var(--error); font-size: .87rem; }
.matches { list-style: none; margin: 7px 0 0; padding: 0; display: grid; gap: 5px; }
.match-button {
  width: 100%; min-height: 46px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 9px;
  background: #fdfbff; color: var(--deep-purple); font-weight: 680; font-size: .91rem;
  text-align: left; overflow-wrap: anywhere;
}
.match-button:hover, .match-button:active { background: var(--lavender); border-color: #d9cce7; }
.primary, .secondary {
  min-height: 49px; padding: 8px 13px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 700; font-size: .91rem;
}
.primary { margin-top: 7px; color: var(--white); background: var(--purple); display: flex; align-items: center; justify-content: center; gap: 9px; }
.primary svg { width: 18px; height: 18px; }
.primary:hover, .primary:active { background: var(--deep-purple); }
.primary:disabled { opacity: .72; cursor: default; }
.secondary { color: var(--deep-purple); background: var(--white); border-color: var(--border); width: 100%; margin-top: 10px; }
.secondary:hover, .secondary:active { background: var(--lavender); }
#result-title:focus { outline: none; }
.result-name {
  margin: 5px 0 17px; color: var(--deep-purple); font-size: 1.18rem;
  font-weight: 700; overflow-wrap: anywhere;
}
.assignment {
  display: flex; gap: 12px; align-items: flex-start; min-width: 0;
  border: 1px solid var(--border); border-radius: 14px; padding: 13px; margin-bottom: 10px;
}
.assignment.bus { background: #f5effb; }
.assignment.room { background: #fdfbf6; border-color: #eee5d6; }
.room .tile-icon { color: #77511a; background: #f6ebcf; }
.assignment h3 { font-size: .83rem; font-weight: 700; color: var(--muted); }
.bus-number { font-size: 1.67rem; font-weight: 800; letter-spacing: -.038em; line-height: 1.19; }
.assignment ul { list-style: none; padding: 0; margin: 5px 0 0; }
.assignment li, #single-room { font-size: .95rem; font-weight: 650; overflow-wrap: anywhere; }
.assignment li + li { margin-top: 3px; }
#single-room { margin-top: 5px; }

@media (max-width: 720px) {
  .masthead, .portal { width: min(520px, calc(100% - 26px)); }
  .masthead { min-height: 65px; padding-block: 8px; }
  .brand { font-size: 1.13rem; gap: 8px; }
  .brand img { width: 34px; height: 34px; }
  .portal { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-block: 12px 23px; }
  .event { min-height: 215px; border-radius: 17px; background-position: center 58%; }
  .event h1 { font-size: clamp(1.9rem, 8.2vw, 2.85rem); }
  .event-text { padding: 17px; }
  .lookup { padding: 19px; border-radius: 17px; }
  .intro { margin-bottom: 17px; }
  .panel-icon { width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  button, input { transition: none; }
}
