/* FHS World 2026 - Find your way. Brand tokens from Design System/tokens/fhs-world.css */
@font-face { font-family: "NHD"; src: url("fonts/neue-haas-display-55-roman.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "NHD"; src: url("fonts/neue-haas-display-65-medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "NHD"; src: url("fonts/neue-haas-display-75-bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --purple: #3C1053;
  --field: #420B56;
  --blue: #74D1EA;
  --red: #EF3340;
  --red-dark: #d11f2c;
  --ink: #22112d;
  --muted: #6b6475;
  --line: #e7e1ec;
  --soft: #f5f2f8;
  --outside: #ece8f0;
  --font: "NHD", "Neue Haas Grotesk Display Pro", "Helvetica Neue", Arial, sans-serif;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --head: 60px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #fff; }
body {
  font-family: var(--font); font-weight: 400; color: var(--ink); font-size: 16px; line-height: 1.4;
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; overscroll-behavior: none;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#app { position: fixed; inset: 0; display: flex; flex-direction: column; overflow: hidden; background: #fff; }

/* ---------------------------------------------------------------- header */
.bar {
  flex: none; background: var(--purple); color: #fff; display: flex; align-items: center; gap: 4px;
  padding: var(--sat) calc(12px + var(--sar)) 0 calc(8px + var(--sal)); min-height: calc(var(--head) + var(--sat));
  position: relative; z-index: 5;
}
.bar .logo { height: 57px; width: auto; display: block; margin: 2px 0 2px 8px; }
.bar .tag { margin-left: auto; font-weight: 700; font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--blue); white-space: nowrap; }
.bar .back {
  flex: none; width: 48px; height: 48px; border: 0; background: transparent; color: #fff; border-radius: 0;
  display: grid; place-items: center; margin-right: 2px;
}
.bar .back svg { width: 26px; height: 26px; }
.bar .titles { min-width: 0; flex: 1; padding: 6px 0; }
.bar .t1 { font-weight: 700; font-size: 18px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .t2 { font-size: 14px; color: var(--blue); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#app[data-view="home"] .bar { min-height: calc(72px + var(--sat)); }

/* ---------------------------------------------------------------- layout */
#stage { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; }
#top { flex: none; background: #fff; padding: 14px calc(16px + var(--sar)) 10px calc(16px + var(--sal)); border-bottom: 1px solid var(--line); }
#mapbox { position: relative; flex: none; height: 0; overflow: hidden; background: var(--outside); transition: height .25s ease; }
#panel { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; background: #fff; overscroll-behavior: contain; }

#app[data-view="home"] #mapbox { height: 33vh; min-height: 190px; max-height: 330px; }
#app[data-view="home"].typing #mapbox { height: 0; min-height: 0; }
#app[data-view="home"].typing .chips { display: none; }
#app[data-view="place"] #mapbox,
#app[data-view="route"] #mapbox,
#app[data-view="pick"] #mapbox { flex: 1; height: auto; }
#app[data-view="place"] #panel,
#app[data-view="route"] #panel,
#app[data-view="pick"] #panel { flex: none; max-height: 58%; box-shadow: 0 -6px 24px rgba(34, 17, 45, .12); position: relative; z-index: 3; }
#app[data-view="where"] #mapbox { height: 26vh; min-height: 150px; }
#app[data-view="front"] #mapbox { height: 38vh; min-height: 200px; }
@media (prefers-reduced-motion: reduce) { #mapbox { transition: none; } }

/* ---------------------------------------------------------------- search */
.search { position: relative; display: flex; align-items: center; }
.search svg.ico { position: absolute; left: 14px; width: 22px; height: 22px; color: var(--purple); pointer-events: none; }
.search input {
  width: 100%; height: 54px; border: 2px solid var(--purple); border-radius: 0; background: #fff;
  padding: 0 52px 0 46px; font-size: 18px; outline: none; -webkit-appearance: none; appearance: none;
}
.search input::placeholder { color: #857a8f; }
.search input::-webkit-search-cancel-button, .search input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.search input:focus { box-shadow: 0 0 0 3px rgba(116, 209, 234, .6); }
.search .clear { position: absolute; right: 2px; width: 50px; height: 50px; border: 0; background: transparent; display: grid; place-items: center; color: var(--muted); }
.search .clear svg { width: 20px; height: 20px; }
.search.small input { height: 50px; font-size: 16px; border-width: 1.5px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 48px; padding: 0 11px 0 9px; border: 1.5px solid var(--line);
  background: var(--soft); border-radius: 0; font-weight: 500; font-size: 14.5px; letter-spacing: -.005em; white-space: nowrap; color: var(--purple);
  flex: 1 1 auto; justify-content: center;
}
.chip svg { width: 18px; height: 18px; flex: none; }
@media (max-width: 374px) { .chip { font-size: 14px; padding: 0 7px; gap: 5px; } .chip svg { width: 16px; height: 16px; } }
.chip:active { background: #eadff2; }

/* ---------------------------------------------------------------- lists */
.sec { padding: 14px calc(16px + var(--sar)) 4px calc(16px + var(--sal)); font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.list { list-style: none; margin: 0; padding: 0 0 calc(16px + var(--sab)); }
.row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 8px calc(12px + var(--sar)) 8px calc(16px + var(--sal));
  border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: left;
}
.row:active { background: var(--soft); }
.row .lg { flex: none; width: 56px; height: 40px; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); overflow: hidden; }
.row .lg img { max-width: 50px; max-height: 34px; display: block; }
.row .lg.ic { background: var(--soft); border-color: transparent; color: var(--purple); }
.row .lg.ic svg { width: 24px; height: 24px; }
.row .lg.room { background: var(--purple); color: #fff; }
.row .lg.fac { background: #e2f5fb; color: #13576a; }
.row .lg.off { background: #fff2f3; color: var(--red-dark); }
.row .lg.mono { font-weight: 700; font-size: 15px; color: var(--purple); background: var(--soft); letter-spacing: .02em; }
.row .tx { flex: 1; min-width: 0; }
.row .nm { font-weight: 500; font-size: 16px; line-height: 1.25; }
.row .sb { font-size: 13.5px; color: var(--muted); line-height: 1.3; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.row .chev { flex: none; width: 18px; height: 18px; color: #b3a8bd; }
.row mark { background: rgba(116, 209, 234, .45); color: inherit; padding: 0; }
.empty { padding: 28px 20px; color: var(--muted); text-align: center; }

/* ---------------------------------------------------------------- map */
#map { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; display: block; user-select: none; -webkit-user-select: none; }
#map .floor { fill: #fff; stroke: #fff; stroke-width: 4; stroke-linejoin: round; }
#map .wall { fill: #3a2a45; }
#map .gap { stroke: #fff; stroke-width: 5; stroke-linecap: butt; }
#map .ign { fill: none; stroke: rgba(239, 51, 64, .55); stroke-width: 1.5; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
#map .sh { stroke-width: 1; vector-effect: non-scaling-stroke; }
#map .sh.exhibitor { fill: #f5f0f9; stroke: #b9a5c9; }
#map .sh.room { fill: #e9def1; stroke: #9a7fb0; }
#map .sh.facility { fill: #e3f5fa; stroke: #86c9dd; }
#map .sh.none { fill: #f3f1f4; stroke: #d5cfda; }
#map .sh.hl { fill: rgba(239, 51, 64, .2); stroke: var(--red); stroke-width: 2.5; }
#map .sh.cand { stroke: #1a93b8; stroke-width: 2.5; fill: rgba(116, 209, 234, .35); }
#map .rcase { fill: none; stroke: #fff; stroke-width: 11; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
#map .rline { fill: none; stroke: var(--red); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
#map .rdash { fill: none; stroke: #fff; stroke-width: 2; stroke-dasharray: 2 10; stroke-linecap: round; vector-effect: non-scaling-stroke; opacity: .9; }
#map text { font-family: var(--font); pointer-events: none; }
#map .lb { fill: #4a3658; font-size: 10.5px; font-weight: 500; text-anchor: middle; }
#map .lb .no { font-weight: 700; fill: var(--purple); }
#map .lb.room { fill: var(--purple); font-weight: 700; font-size: 11px; letter-spacing: .03em; }
#map .lb.hl { fill: var(--red-dark); font-weight: 700; }
#map .halo { stroke: #fff; stroke-width: 3px; stroke-linejoin: round; paint-order: stroke; }
#map .ico circle.bg { fill: #fff; stroke: #1a7f9c; stroke-width: 1.5; }
#map .ico .gl { color: #13576a; }
#map .you .pulse { fill: rgba(116, 209, 234, .45); animation: pulse 2s ease-out infinite; transform-box: fill-box; transform-origin: center; }
#map .you .cone { fill: rgba(116, 209, 234, .45); }
@keyframes pulse { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #map .you .pulse { animation: none; } }

.pill {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 2; display: flex; align-items: center; gap: 10px;
  background: var(--purple); color: #fff; padding: 0 4px 0 14px; height: 48px; font-size: 14px; font-weight: 500; white-space: nowrap;
  box-shadow: 0 4px 14px rgba(34, 17, 45, .25);
}
.pill button { border: 0; background: transparent; color: var(--blue); font-weight: 700; height: 48px; min-width: 64px; padding: 0 12px; text-decoration: underline; text-underline-offset: 3px; }
.mapbtns { position: absolute; right: calc(8px + var(--sar)); bottom: 12px; z-index: 2; display: flex; flex-direction: column; gap: 6px; }
.mapbtns button { width: 48px; height: 48px; border: 1px solid var(--line); background: rgba(255, 255, 255, .94); color: var(--purple); display: grid; place-items: center; box-shadow: 0 2px 8px rgba(34, 17, 45, .15); }
.mapbtns svg { width: 20px; height: 20px; }
#app[data-view="home"] .mapbtns, #app[data-view="where"] .mapbtns, #app[data-view="front"] .mapbtns { display: none; }
.hint {
  position: absolute; left: 12px; right: 12px; top: 12px; z-index: 2; background: rgba(60, 16, 83, .94); color: #fff;
  padding: 12px 14px; font-weight: 500; font-size: 15px; text-align: center; pointer-events: none;
}

/* ---------------------------------------------------------------- cards / sheet */
.card { padding: 16px calc(16px + var(--sar)) calc(16px + var(--sab)) calc(16px + var(--sal)); }
.card .head { display: flex; gap: 14px; align-items: flex-start; }
.card .lgbig { flex: none; width: 76px; height: 54px; border: 1px solid var(--line); display: grid; place-items: center; background: #fff; }
.card .lgbig img { max-width: 68px; max-height: 46px; }
.card .lgbig.ic { background: var(--soft); border-color: transparent; color: var(--purple); }
.card .lgbig.ic svg { width: 30px; height: 30px; }
.card .lgbig.room { background: var(--purple); color: #fff; }
.card .lgbig.fac { background: #e2f5fb; color: #13576a; }
.card .lgbig.off { background: #fff2f3; color: var(--red-dark); }
.card .kick { font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--red-dark); margin-bottom: 2px; }
.card h1 { font-size: 22px; line-height: 1.15; margin: 0; font-weight: 700; color: var(--purple); }
.card .meta { margin-top: 6px; font-size: 15px; color: var(--ink); }
.card .meta b { font-weight: 700; color: var(--purple); }
.card .sub { margin-top: 4px; font-size: 13.5px; color: var(--muted); }
.card .note { margin-top: 10px; padding: 10px 12px; background: #eef9fc; border-left: 4px solid var(--blue); font-size: 14px; }
.btn {
  display: flex; width: 100%; align-items: center; justify-content: center; gap: 10px; height: 54px; border: 0; border-radius: 0;
  font-weight: 700; font-size: 17px; letter-spacing: .01em; text-decoration: none; margin-top: 14px;
}
.btn svg { width: 22px; height: 22px; }
.btn.primary { background: var(--red); color: #fff; }
.btn.primary:active { background: var(--red-dark); }
.btn.dark { background: var(--purple); color: #fff; }
.btn.ghost { background: #fff; color: var(--purple); border: 2px solid var(--purple); }
.btn.link { background: transparent; color: var(--purple); text-decoration: underline; text-underline-offset: 4px; height: 48px; margin-top: 6px; font-weight: 500; }
.btns2 { display: flex; gap: 10px; }
.btns2 .btn { margin-top: 12px; }
.btns2 .btn.ghost { flex: 0 0 40%; }

h2.q { margin: 0 0 4px; font-weight: 700; font-size: 20px; line-height: 1.2; letter-spacing: .01em; text-transform: uppercase; color: var(--purple); }
.lead { margin: 0 0 12px; color: var(--muted); font-size: 15px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile {
  display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 8px 10px; border: 1.5px solid var(--line); background: var(--soft);
  text-align: left; font-weight: 500; font-size: 15px; line-height: 1.2; color: var(--purple); border-radius: 0;
}
.tile svg { width: 24px; height: 24px; flex: none; }
.tile:active { background: #eadff2; border-color: #cdb9dc; }
.tile .tt { min-width: 0; overflow-wrap: anywhere; }
.or { display: flex; align-items: center; gap: 10px; margin: 16px 0 10px; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.still { padding: 14px; background: #eef9fc; border-left: 4px solid var(--blue); margin-bottom: 4px; }
.still .big { font-size: 22px; font-weight: 700; color: var(--purple); line-height: 1.2; }
.still .when { font-size: 14px; color: var(--muted); margin-top: 2px; }
.mini-results .row { min-height: 56px; }

.steps { list-style: none; margin: 12px 0 0; padding: 0; counter-reset: s; }
.steps li { display: flex; gap: 12px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 16.5px; line-height: 1.28; }
.steps li:last-child { border-bottom: 0; }
.steps .si { flex: none; width: 34px; height: 34px; display: grid; place-items: center; background: var(--purple); color: #fff; }
.steps .si svg { width: 22px; height: 22px; }
.steps li.last .si { background: var(--red); }
.steps li.extra .si { background: #1a93b8; }
.sumline { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sumline .dist { font-size: 26px; font-weight: 700; color: var(--purple); line-height: 1; }
.sumline .time { font-size: 15px; color: var(--muted); }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + var(--sab)); transform: translateX(-50%); background: var(--ink); color: #fff; z-index: 20;
  padding: 12px 16px; font-size: 15px; max-width: calc(100% - 32px); box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
}
.loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 15px; }
.foot { padding: 16px 16px calc(24px + var(--sab)); color: var(--muted); font-size: 12px; text-align: center; }

/* ---------------------------------------------------------------- phone location + calibration */
.btn.locate { background: var(--purple); color: #fff; margin: 0 0 14px; }
.btn.locate:active { background: var(--field); }
.btn[disabled] { opacity: .45; }
.geobox { display: flex; gap: 12px; align-items: center; padding: 12px 14px; margin: 0 0 14px; background: #eef9fc; border-left: 4px solid var(--blue); font-size: 15px; }
.geobox.warn { display: block; background: #fff4f4; border-left-color: var(--red); color: var(--ink); }
.geobox .sb { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.geohead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 0 8px; font-weight: 700; font-size: 17px; color: var(--purple); }
.geohead span { font-weight: 500; font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.tile.near { border-color: var(--blue); background: #eef9fc; }
.spin { flex: none; width: 26px; height: 26px; border: 3px solid rgba(60, 16, 83, .18); border-top-color: var(--purple); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 3s; } }
#map .geoc { fill: rgba(116, 209, 234, .22); stroke: #1a93b8; stroke-width: 2; vector-effect: non-scaling-stroke; }
#map .geod { fill: #1a93b8; stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }
#map .calp { fill: var(--red); stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.cal .calsteps { margin: 0 0 12px; padding-left: 20px; font-size: 14.5px; color: var(--ink); }
.cal .calsteps li { margin-bottom: 4px; }
.cal .calspot { margin: 0 0 10px; padding: 10px 12px; background: var(--soft); font-size: 15px; }
.cal .callist li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cal .callist .tx { flex: 1; min-width: 0; }
.cal .callist .nm { display: block; font-weight: 500; color: var(--purple); }
.cal .callist .sb { display: block; font-size: 13px; color: var(--muted); }
.cal .calx { flex: none; width: 44px; height: 44px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; }
.cal .calx svg { width: 20px; height: 20px; }
.cal .btn + .btn { margin-top: 10px; }
.caltxt { width: 100%; min-height: 140px; margin-top: 10px; font: 12px/1.35 ui-monospace, Menlo, Consolas, monospace; }
#app[data-view="calib"] #mapbox { height: 50vh; min-height: 260px; }
