:root {
  --ink: #082f3c;
  --muted: #5f7379;
  --paper: #f7fbfa;
  --surface: #ffffff;
  --line: #d8e4e2;
  --navy: #073b4c;
  --blue: #0b6e75;
  --yellow: #ffd166;
  --orange: #ef7b45;
  --shadow: 0 18px 50px rgba(7, 59, 76, .12);
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; color: var(--ink); background: radial-gradient(circle at 10% 0%, #e6f5f2 0, transparent 26rem), var(--paper); font: 16px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
.topbar { min-height: 80px; padding: 14px clamp(16px, 4vw, 40px); display: flex; align-items: center; gap: 13px; color: white; background: var(--navy); }
.brand-mark { width: 45px; height: 45px; display: grid; place-items: center; flex: none; border-radius: 12px; background: var(--yellow); color: var(--navy); font-weight: 900; letter-spacing: -.04em; }
.topbar h1 { margin: 0; font-size: clamp(1.08rem, 3vw, 1.35rem); letter-spacing: -.02em; }
.topbar p { margin: 1px 0 0; color: #bad9dc; font-size: .84rem; }
.icon-button { margin-left: auto; width: 40px; height: 40px; border: 1px solid #3b6873; border-radius: 50%; color: white; background: transparent; font-weight: 800; }
.app-shell { max-width: 1440px; min-height: calc(100vh - 80px); margin: auto; padding: clamp(16px, 3vw, 34px); display: grid; grid-template-columns: minmax(330px, .8fr) minmax(500px, 1.2fr); gap: clamp(18px, 3vw, 34px); }
.finder, .map-panel { border: 1px solid rgba(7,59,76,.08); border-radius: 24px; background: rgba(255,255,255,.93); box-shadow: var(--shadow); }
.finder { padding: clamp(18px, 3vw, 30px); display: flex; flex-direction: column; min-height: 650px; }
.finder-heading, .map-toolbar { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.eyebrow { margin: 0 0 5px; color: var(--blue); font-size: .72rem; font-weight: 900; letter-spacing: .15em; }
h2 { margin: 0; font-size: clamp(1.35rem, 3vw, 2rem); line-height: 1.12; letter-spacing: -.035em; }
.directory-count { flex: none; padding: 6px 10px; border-radius: 999px; background: #eaf5f3; color: var(--blue); font-size: .76rem; font-weight: 800; }
.search-box { margin-top: 24px; position: relative; display: flex; align-items: center; }
.search-box svg { position: absolute; left: 16px; width: 22px; fill: none; stroke: var(--blue); stroke-width: 2; stroke-linecap: round; }
.search-box input { width: 100%; min-height: 58px; padding: 0 48px; border: 2px solid #b8d3d1; border-radius: 16px; outline: 0; background: #fff; color: var(--ink); font-size: 1rem; transition: border-color .2s, box-shadow .2s; }
.search-box input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(11,110,117,.12); }
.clear-search { position: absolute; right: 9px; width: 38px; height: 38px; border: 0; border-radius: 50%; color: var(--muted); background: #edf3f2; font-size: 1.45rem; }
.search-hint { margin: 9px 3px 15px; color: var(--muted); font-size: .83rem; }
.location-row { padding: 10px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: stretch; gap: 9px; border-radius: 14px; background: #eff6f5; }
.location-select { padding: 2px 5px; display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 10px; }
.location-row label { color: var(--muted); font-size: .82rem; font-weight: 750; }
.location-row select { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: .88rem; font-weight: 750; }
.locate-button { min-height: 42px; padding: 8px 12px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 10px; color: white; background: var(--blue); font-size: .82rem; font-weight: 850; white-space: nowrap; }
.locate-button:hover, .locate-button:focus-visible { background: var(--navy); outline: 3px solid rgba(11,110,117,.18); }
.locate-button:disabled { cursor: wait; opacity: .68; }
.locate-button svg { width: 17px; fill: currentColor; }
.location-status { min-height: 0; margin: 7px 4px 0; color: var(--muted); font-size: .78rem; }
.location-status:empty { display: none; }
.results-summary { min-height: 35px; padding: 18px 2px 8px; color: var(--muted); font-size: .84rem; font-weight: 700; }
.results { display: grid; grid-auto-rows: max-content; gap: 10px; overflow: auto; padding: 0 3px 2px 0; scrollbar-width: thin; }
.result-card { border: 1px solid var(--line); border-radius: 16px; background: white; overflow: hidden; transition: border-color .2s, transform .2s; }
.result-card:hover { border-color: #91bbb8; }
.result-name { margin: 0; padding: 15px 16px 9px; font-size: .98rem; line-height: 1.25; }
.locations { padding: 0 10px 10px; display: flex; flex-wrap: wrap; gap: 7px; }
.location-button { min-height: 39px; padding: 8px 11px; display: inline-flex; gap: 8px; align-items: center; border: 1px solid #c9dbd9; border-radius: 10px; color: var(--ink); background: #f7fbfa; font-size: .82rem; font-weight: 750; text-align: left; }
.location-button:hover, .location-button:focus-visible, .location-button.active { border-color: var(--blue); background: var(--blue); color: white; outline: none; }
.hall-badge { min-width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; color: var(--navy); background: var(--yellow); font-size: .76rem; font-weight: 900; }
.empty-state { margin: 8px 0; padding: 28px 20px; border: 1px dashed #a9c5c2; border-radius: 16px; text-align: center; color: var(--muted); }
.empty-state strong { display: block; margin-bottom: 4px; color: var(--ink); }
.map-panel { padding: clamp(15px, 2vw, 24px); display: flex; flex-direction: column; min-width: 0; }
.map-toolbar { padding: 4px 5px 16px; align-items: center; }
.text-button { padding: 9px 12px; border: 1px solid #bfd2d0; border-radius: 10px; color: var(--blue); background: transparent; font-size: .82rem; font-weight: 800; }
.map-viewport { flex: 1; min-height: 580px; overflow: auto; border: 1px solid #d2e0de; border-radius: 18px; background: #eaf2ef; }
#fairMap { width: 100%; min-width: 570px; height: auto; display: block; }
.site-ground { fill: #f8f5e8; stroke: #b8c9c4; stroke-width: 3; }
.road { fill: none; stroke: #c0cfcc; stroke-width: 34; }
.road-label { fill: #4b666d; font-size: 13px; font-weight: 850; letter-spacing: .18em; text-anchor: middle; }
.road-label-vertical { writing-mode: vertical-rl; }
.walking-areas path { fill: none; stroke: #fff; stroke-width: 27; stroke-linecap: round; stroke-linejoin: round; }
.walking-areas .walk-ring { stroke-width: 23; }
.hall { cursor: pointer; outline: none; }
.hall rect, .hall path { fill: #fdfefe; stroke: #4d7d84; stroke-width: 3; filter: url(#hallShadow); transition: fill .2s, stroke .2s, transform .2s; transform-origin: center; }
.hall text { fill: var(--navy); font-size: 20px; font-weight: 950; text-anchor: middle; pointer-events: none; }
.hall.major text { font-size: 28px; }
.hall:hover rect, .hall:hover path, .hall:focus-visible rect, .hall:focus-visible path { fill: #e4f3f1; stroke: var(--blue); }
.hall.selected rect, .hall.selected path { fill: var(--yellow); stroke: #9b6910; stroke-width: 5; }
.hall.related rect, .hall.related path { fill: #fff0c5; stroke: #c5932c; }
.main-building { fill: #dce6e3; stroke: #78949a; stroke-width: 4; }
.building-label { fill: var(--navy); text-anchor: middle; font-size: 25px; font-weight: 950; }
.building-sub { fill: #567078; text-anchor: middle; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.parking { stroke: #aabeba; stroke-width: 2; }
.amenity rect { fill: #dcece9; stroke: #86a9a7; stroke-width: 2; }
.amenity text, .amenity-text { fill: #4e686f; text-anchor: middle; font-size: 10px; font-weight: 850; }
.gate circle { fill: var(--orange); stroke: white; stroke-width: 4; }
.gate text { fill: var(--ink); text-anchor: middle; font-size: 11px; font-weight: 900; }
.you-are-here .accuracy-ring { fill: rgba(20,115,230,.10); stroke: rgba(20,115,230,.28); stroke-width: 1.5; }
.you-are-here .position-pulse { fill: rgba(20,115,230,.25); stroke: #fff; stroke-width: 3; animation: pulse 2s infinite; }
.you-are-here .position-dot { fill: #1473e6; stroke: #fff; stroke-width: 2; }
.you-are-here text { fill: #07509f; font-size: 10px; font-weight: 950; text-anchor: middle; }
.route-line { fill: none; stroke: #1473e6; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 7 11; opacity: .86; }
@keyframes pulse { 50% { r: 20px; opacity: .55; } }
.map-status { min-height: 48px; margin-top: 12px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; border-radius: 13px; color: var(--ink); background: #eef6f4; font-size: .88rem; font-weight: 750; }
.map-dot { width: 11px; height: 11px; flex: none; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 4px rgba(255,209,102,.25); }
.map-note { margin: 9px 4px 0; color: var(--muted); font-size: .75rem; }
dialog { max-width: 470px; width: calc(100% - 32px); padding: 0; border: 0; border-radius: 20px; color: var(--ink); box-shadow: 0 24px 90px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(3,32,40,.66); backdrop-filter: blur(4px); }
.dialog-head { padding: 20px 22px 10px; display: flex; justify-content: space-between; align-items: center; }
.dialog-head h2 { font-size: 1.35rem; }
.dialog-head button { width: 38px; height: 38px; border: 0; border-radius: 50%; color: var(--ink); background: #edf3f2; font-size: 1.5rem; }
dialog ol, dialog p { margin: 10px 26px 22px; }
dialog li { margin-bottom: 9px; }
.noscript { padding: 20px; background: #fee; color: #800; }
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; padding: 14px; }
  .finder { min-height: 0; }
  .results { max-height: 440px; }
  .map-viewport { min-height: 480px; }
}
@media (max-width: 520px) {
  .topbar { min-height: 70px; }
  .app-shell { padding: 10px; gap: 12px; }
  .finder, .map-panel { border-radius: 18px; }
  .finder { padding: 17px 14px; }
  .finder-heading { display: block; }
  .directory-count { display: inline-block; margin-top: 10px; }
  .search-box { margin-top: 17px; }
  .location-row { grid-template-columns: 1fr; }
  .location-select { min-height: 42px; }
  .map-panel { padding: 14px 10px; }
  .map-viewport { min-height: 420px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
