/* 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: 48px; 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(62px + 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); }
#panel { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; background: #fff; overscroll-behavior: contain; }

#app[data-view="home"] #mapbox { flex: 1; height: auto; min-height: 0; }
#app[data-view="home"] #panel { display: none; }
#app[data-view="home"].typing #mapbox { flex: none; height: 0; }
#app[data-view="home"].typing #panel { display: block; }
#app[data-view="home"].typing .chips { display: none; }
#app[data-view="home"] #top { border-bottom: 0; box-shadow: 0 4px 14px rgba(34, 17, 45, .10); position: relative; z-index: 3; }
/* map screens: the map takes 2/3 of the screen; the sheet below scrolls with its main buttons pinned */
#app[data-view="place"] #mapbox,
#app[data-view="route"] #mapbox,
#app[data-view="where"] #mapbox { flex: none; height: 66vh; height: 66dvh; }
@media (max-height: 700px) {
  #app[data-view="place"] #mapbox,
  #app[data-view="route"] #mapbox,
  #app[data-view="where"] #mapbox { height: 60vh; height: 60dvh; }
}
#app[data-view="place"] #panel,
#app[data-view="route"] #panel,
#app[data-view="where"] #panel { flex: 1; min-height: 0; box-shadow: 0 -6px 24px rgba(34, 17, 45, .12); position: relative; z-index: 3; }

/* ---------------------------------------------------------------- search */
.srow { display: flex; align-items: center; gap: 6px; }
.srow .search { flex: 1; min-width: 0; }
.cancel { flex: none; height: 54px; padding: 0 6px 0 8px; border: 0; background: transparent; color: var(--purple); font-weight: 500; font-size: 16px; }
.cancel:active { background: var(--soft); }
.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; }

/* one row of shortcuts; it scrolls sideways on narrow phones */
.chips { display: flex; gap: 6px; margin: 10px calc(-16px - var(--sar)) 0 calc(-16px - var(--sal)); padding: 0 calc(16px + var(--sar)) 2px calc(16px + var(--sal));
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 12px 0 10px; 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: none; justify-content: center;
}
.chip svg { width: 18px; height: 18px; flex: none; }
.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 .sh.lm { stroke: #1a93b8; stroke-width: 2.5; fill: rgba(116, 209, 234, .45); }
#map .rcase { fill: none; stroke: #fff; stroke-width: 15; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
#map .rline { fill: none; stroke: var(--red-dark); stroke-width: 10; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
#map .rpast { fill: none; stroke: #b9adc4; stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
#map .chev { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
#map text { font-family: var(--font); pointer-events: none; }
#map .lb { fill: #4a3658; font-size: calc(12px * var(--fk, 1)); 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: calc(12.5px * var(--fk, 1)); letter-spacing: .03em; }
#map .lb.hl { fill: var(--red-dark); font-weight: 700; }
#map .lb.lm { fill: #0e5a70; 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; }
/* "you": a dot; the white arrow inside points the way to walk */
#map .you .halo { fill: rgba(116, 209, 234, .5); }
#map .you .dot { fill: var(--purple); stroke: #fff; stroke-width: 3; }
#map .you .arr { fill: #fff; }

.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; }
.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-dark); color: #fff; }
.btn.primary:active { background: #b3141f; }
.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; }
.btn.ghost:active, .btn.link:active { background: var(--soft); }
.btn.dark:active, .btn.locate:active { background: var(--field); }
.bar .back:active { background: rgba(255, 255, 255, .14); }
.mapbtns button:active { background: var(--soft); }
.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; }

/* route: one step at a time */
.card.route { padding-top: 6px; }
.shead { display: flex; align-items: center; justify-content: space-between; min-height: 40px; }
.scount { font-weight: 700; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.slost { border: 0; background: transparent; color: var(--purple); text-decoration: underline; text-underline-offset: 3px; font-weight: 500; font-size: 15px; height: 44px; padding: 0 2px 0 12px; }
.slost:active { background: var(--soft); }
.snow { display: flex; gap: 14px; align-items: center; }
.bigarrow { flex: none; width: 58px; height: 58px; display: grid; place-items: center; background: var(--purple); color: #fff; }
.bigarrow svg { width: 38px; height: 38px; }
.bigarrow.end { background: var(--red-dark); }
.stext { font-size: 19px; font-weight: 700; line-height: 1.22; color: var(--purple); }
.snext { margin: 8px 0 0 72px; font-size: 14.5px; line-height: 1.3; color: var(--muted); }
.stepnav { display: flex; gap: 10px; }
.stepnav .btn { margin-top: 12px; }
.stepnav .btn.sq { flex: 0 0 58px; padding: 0; }
.stepnav .btn.primary { flex: 1; }
.stepnav .btn.primary svg:last-child { width: 20px; height: 20px; margin-left: -2px; }
@media (max-height: 700px) {  /* small phones: the step itself + the buttons; "Then" would hide under them */
  .snext { display: none; }
  .bigarrow { width: 52px; height: 52px; }
  .stext { font-size: 18px; }
}

.toast {
  position: fixed; left: 50%; top: calc(var(--head) + var(--sat) + 10px); 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; }

/* ---------------------------------------------------------------- simplified flow (28 Sep critique) */
.picked { padding: 12px 14px; margin: 0 0 14px; background: #eef9fc; border-left: 4px solid var(--blue); }
.picked .big { font-size: 20px; font-weight: 700; color: var(--purple); line-height: 1.2; margin-top: 2px; }
.picked .btns2 .btn { margin-top: 10px; }
.tile .tsub { display: block; font-size: 12.5px; font-weight: 400; color: var(--muted); margin-top: 1px; }

/* pinned sheet actions + compass (28 Sep: map 2/3 of the screen, Google-Maps-style rotation) */
.sheetfoot { position: sticky; bottom: 0; z-index: 2; background: #fff; margin: 4px calc(-16px - var(--sar)) calc(-16px - var(--sab)) calc(-16px - var(--sal));
  padding: 2px calc(16px + var(--sar)) calc(12px + var(--sab)) calc(16px + var(--sal)); box-shadow: 0 -10px 14px -10px rgba(34, 17, 45, .18); }
.sheetfoot .btn:first-child { margin-top: 10px; }
/* cards with pinned actions fill the sheet, so the buttons sit at the bottom on every step */
.card.sheet { min-height: 100%; display: flex; flex-direction: column; }
.card.sheet > .sheetfoot { margin-top: auto; }
.sheetfoot .btns2 .btn { margin-top: 10px; }
.mapbtns button.north svg { width: 26px; height: 26px; }
.mapbtns button[hidden] { display: none; }
