:root {
  --ink: #0d1b2a;
  --glass: rgba(10, 24, 40, 0.62);
  --glass-2: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.16);
  --text: #f6f1e7;
  --dim: rgba(246, 241, 231, 0.68);
  --sun: #ffc93c;
  --bus: #46b83d;
  --c: #ff7a3d;
  --display: 'Gloock', 'Iowan Old Style', Georgia, serif;
  --body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'DM Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --blur: saturate(1.5) blur(18px);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; }
body { font-family: var(--body); color: var(--text); background: #0b3a6b; -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--sun); outline-offset: 3px; }

#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; opacity: 0; transition: opacity 1.2s ease; }
#scene:active { cursor: grabbing; }
.ready #scene { opacity: 1; }
@keyframes breathe { 50% { opacity: .45; } }

/* stop signs pinned to the map */
#labels { position: fixed; inset: 0; pointer-events: none; overflow: hidden; visibility: hidden; }
.ready #labels { visibility: visible; }
.label {
  position: absolute; left: 0; top: 0; pointer-events: auto; white-space: nowrap; transform-origin: 50% 100%; will-change: transform;
  display: inline-flex; align-items: center; gap: .5em; font: 600 .82rem/1 var(--body); letter-spacing: .01em; color: var(--text);
  padding: .5em .8em .5em .55em; border-radius: 999px; background: var(--glass); border: 1px solid var(--line);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
}
.label i { width: .8em; height: .8em; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); flex: none; }
.label.air i { border-radius: 3px; transform: rotate(45deg); }
.label::after { content: ''; position: absolute; left: 50%; top: 100%; width: 1.5px; height: 14px; margin-left: -.75px; background: linear-gradient(rgba(255, 255, 255, .8), rgba(255, 255, 255, 0)); }
.label.active { background: var(--c); border-color: rgba(255, 255, 255, .5); color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.label.active i { background: #fff; box-shadow: none; }
.label:hover { border-color: rgba(255, 255, 255, .6); }

/* brand */
#brand { position: fixed; left: max(24px, env(safe-area-inset-left)); top: max(20px, env(safe-area-inset-top)); pointer-events: none; text-shadow: 0 2px 18px rgba(4, 22, 44, .55); }
.eyebrow { margin: 0; font-size: .72rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--sun); }
#brand::before { content: ''; position: absolute; inset: -60px -140px -70px -80px; z-index: -1; background: radial-gradient(closest-side, rgba(5, 26, 54, .6), rgba(5, 26, 54, 0)); }
#brand h1 { margin: .1em 0 0; font: 400 clamp(2.4rem, 5.4vw, 4rem)/.98 var(--display); letter-spacing: -.005em; }
#i-tag { margin: .35em 0 0; font-size: .95rem; color: var(--dim); }
#corner { position: fixed; right: max(16px, env(safe-area-inset-right)); top: max(16px, env(safe-area-inset-top)); display: flex; align-items: center; gap: 8px; z-index: 5; transition: opacity .3s; }
#studio { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font-size: .58rem; font-weight: 700; letter-spacing: .06em; color: var(--dim); text-decoration: none; background: var(--glass); border: 1px solid var(--line); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); opacity: .75; transition: opacity .2s, color .2s; }
#studio:hover { opacity: 1; color: var(--text); }
#menu-btn { display: inline-flex; align-items: center; gap: .5em; height: 40px; padding: 0 1em 0 .8em; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--glass); border: 1px solid var(--line); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: 0 8px 22px rgba(2, 14, 30, .35); transition: background .2s; }
#menu-btn:hover, .menu-open #menu-btn { background: rgba(255, 255, 255, .22); }
#menu-btn svg { width: 18px; height: 18px; }
#menu { position: absolute; right: 0; top: 48px; width: min(300px, calc(100vw - 32px)); max-height: min(70dvh, 560px); overflow-y: auto; padding: 14px 8px 8px; border-radius: 20px; background: rgba(9, 21, 36, .86); border: 1px solid var(--line); -webkit-backdrop-filter: saturate(1.4) blur(24px); backdrop-filter: saturate(1.4) blur(24px); box-shadow: 0 24px 60px rgba(0, 10, 25, .55); }
#menu[hidden] { display: none; }
#menu .kicker { padding: 0 10px 8px; }
#m-list { list-style: none; margin: 0; padding: 0; }
.m-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 8px 10px; border-radius: 12px; text-align: left; transition: background .15s; }
.m-item:hover { background: var(--glass-2); }
.m-item i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px rgba(255, 255, 255, .8); }
.m-item.air i { border-radius: 2px; transform: rotate(45deg); }
.m-name { font-weight: 600; font-size: .95rem; }
.m-region { font-size: .68rem; color: var(--dim); white-space: nowrap; }
.m-item[aria-current='true'] { background: rgba(255, 255, 255, .14); }
.m-item[aria-current='true'] .m-name::after { content: ' · here'; font-weight: 400; color: var(--dim); font-size: .8em; }
#credit { position: fixed; left: max(24px, env(safe-area-inset-left)); bottom: max(8px, env(safe-area-inset-bottom)); margin: 0; font-size: .54rem; color: rgba(255, 255, 255, .55); text-shadow: 0 1px 3px rgba(0, 0, 0, .5); max-width: 30vw; pointer-events: none; }

/* bottom HUD */
#hud { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px 12px; width: min(480px, calc(100vw - 24px)); transition: transform .5s cubic-bezier(.2, .8, .2, 1), opacity .3s; }
.card { min-width: 0; padding: 12px 18px 12px; border-radius: 20px; background: var(--glass); border: 1px solid var(--line); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: 0 18px 50px rgba(2, 14, 30, .45), inset 0 1px 0 rgba(255, 255, 255, .12); position: relative; }
.card::before { content: ''; position: absolute; left: 22px; top: 0; width: 44px; height: 4px; border-radius: 0 0 4px 4px; background: var(--c); transition: background .4s; }
.kicker { margin: 0; font-size: .62rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
#h-name { margin: .12em 0 .32em; font: 400 clamp(1.25rem, 4.4vw, 1.7rem)/1.08 var(--display); letter-spacing: -.01em; text-wrap: balance; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#h-count { font: 500 .74rem var(--mono); color: var(--dim); white-space: nowrap; }
.cta { background: var(--sun); color: #1a1407; font-weight: 700; font-size: .8rem; padding: .62em 1.1em; border-radius: 999px; box-shadow: 0 6px 18px rgba(255, 201, 60, .28); transition: transform .15s, filter .2s; white-space: nowrap; }
.cta:hover { transform: translateY(-1px); filter: brightness(1.07); }
.cta:active { transform: translateY(1px); }
#hud.moving .cta { opacity: .55; }
.arrow { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--glass); border: 1px solid var(--line); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: 0 10px 26px rgba(2, 14, 30, .4); transition: background .2s, transform .15s; }
.arrow:hover { background: rgba(255, 255, 255, .22); }
.arrow:active { transform: scale(.94); }
#dots { grid-column: 1 / -1; display: flex; justify-content: center; gap: 2px; }
.dot { width: 24px; height: 24px; padding: 0; display: grid; place-items: center; }
.dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .5); transition: transform .25s, background .25s; }
.dot.air::before { border-radius: 2px; transform: rotate(45deg); }
.dot.on::before { background: #fff; transform: scale(1.7); }
.hint { grid-column: 1 / -1; margin: 0; text-align: center; font-size: .72rem; color: rgba(255, 255, 255, .7); text-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.hint .touch { display: none; }
@media (pointer: coarse) { .hint .touch { display: inline; } .hint .keys { display: none; } }
.swiped .hint { visibility: hidden; }

/* zoom */
#zoom { position: fixed; right: max(16px, env(safe-area-inset-right)); top: 50%; transform: translateY(-50%); display: grid; border-radius: 999px; overflow: hidden; background: var(--glass); border: 1px solid var(--line); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: 0 8px 22px rgba(2, 14, 30, .35); transition: opacity .3s; }
#zoom button { width: 38px; height: 38px; font-size: 1.15rem; line-height: 1; }
#zoom button + button { border-top: 1px solid var(--line); }
#zoom button:hover { background: rgba(255, 255, 255, .2); }
.guide-open #zoom { opacity: 0; pointer-events: none; }
.acts { display: inline-flex; align-items: center; gap: 6px; }
.ghost { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--glass-2); }
.ghost[hidden] { display: none; }
.ghost svg { width: 17px; height: 17px; stroke-width: 2; }
.ghost:hover { background: rgba(255, 255, 255, .22); }

/* guide panel */
#guide { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 40vw); min-width: 380px; display: flex; flex-direction: column; background: rgba(9, 21, 36, .78); border-left: 1px solid var(--line); -webkit-backdrop-filter: saturate(1.4) blur(26px); backdrop-filter: saturate(1.4) blur(26px); transform: translateX(105%); visibility: hidden; transition: transform .55s cubic-bezier(.2, .8, .2, 1), visibility 0s .55s; box-shadow: -30px 0 80px rgba(0, 10, 25, .45); }
.guide-open #guide { transform: none; visibility: visible; transition-delay: 0s; }
.grab { display: none; }
.g-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 4px; }
.g-nav { display: flex; gap: 8px; }
.g-head button { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--glass-2); border: 1px solid var(--line); transition: background .2s; }
.g-head button:hover { background: rgba(255, 255, 255, .22); }
.g-head svg { width: 18px; height: 18px; }
#g-scroll { overflow-y: auto; padding: 10px 28px 44px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .25) transparent; }
#guide .kicker { color: var(--c); filter: brightness(1.25) saturate(.9); }
#g-name { margin: .12em 0 .3em; font: 400 2.3rem/1.04 var(--display); letter-spacing: -.012em; text-wrap: balance; }
#g-blurb { margin: 0 0 1.2rem; font-size: 1.04rem; line-height: 1.6; color: rgba(246, 241, 231, .86); max-width: 46ch; }
#g-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 1rem; }
.fact { background: rgba(14, 30, 48, .92); padding: 11px 12px; display: grid; gap: 3px; align-content: start; }
.fact .k { font-size: .63rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.fact .v { font-weight: 600; font-size: .92rem; line-height: 1.25; }
#g-bus { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 1.2rem; padding: 12px 14px; border-radius: 14px; background: rgba(70, 184, 61, .14); border: 1px solid rgba(70, 184, 61, .38); font-size: .92rem; line-height: 1.5; }
#g-bus[hidden] { display: none; }
#g-bus svg { color: #7fe074; flex: none; margin-top: 1px; stroke-width: 2; }
#g-bus strong { color: #9cf091; margin-right: .3em; }
#g-tabs { display: flex; gap: 4px; position: sticky; top: -10px; padding: 10px 0; z-index: 2; background: linear-gradient(rgba(9, 21, 36, .96) 75%, rgba(9, 21, 36, 0)); }
.tab { flex: 1; font-weight: 600; font-size: .86rem; padding: .7em .3em; border-radius: 999px; color: var(--dim); white-space: nowrap; border: 1px solid transparent; transition: background .2s, color .2s; }
.tab:hover { color: var(--text); }
.tab .n { margin-left: .45em; font: 500 .74em var(--mono); opacity: .6; }
.tab[aria-selected='true'] { background: var(--text); color: var(--ink); }
#g-list { list-style: none; margin: 4px 0 0; padding: 0; }
.item + .item { border-top: 1px solid var(--line); }
.item-link { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: start; padding: 16px 8px; margin: 0 -8px; color: inherit; text-decoration: none; border-radius: 12px; transition: background .2s; }
.item-link:hover { background: var(--glass-2); }
.num { font: 500 .8rem/1.9 var(--mono); color: var(--c); filter: brightness(1.25) saturate(.9); }
.item-body { display: grid; gap: 3px; min-width: 0; }
.item-body strong { font: 400 1.2rem/1.2 var(--display); }
.where { font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.note { font-size: .94rem; line-height: 1.55; color: rgba(246, 241, 231, .84); margin-top: 3px; }
.go { font-size: .7rem; font-weight: 600; white-space: nowrap; padding: .42em .8em; border-radius: 999px; border: 1px solid var(--line); margin-top: 3px; color: var(--dim); transition: all .2s; }
.item-link:hover .go { background: var(--sun); color: #1a1407; border-color: var(--sun); }
.tip { margin-top: 1.5rem; padding: 16px 18px; border-radius: 16px; background: linear-gradient(135deg, rgba(255, 201, 60, .2), rgba(255, 201, 60, .07)); border: 1px solid rgba(255, 201, 60, .4); }
.tip strong { font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--sun); }
.tip p { margin: .35em 0 0; line-height: 1.55; }
.small { font-size: .76rem; color: var(--dim); margin: 1.2rem 0 0; line-height: 1.5; }

/* ferries */
#g-ferry { margin: 0 0 1.2rem; border-radius: 14px; border: 1px solid rgba(90, 170, 230, .4); background: rgba(40, 120, 190, .14); overflow: hidden; }
#g-ferry[hidden] { display: none; }
.f-title { margin: 0; padding: 10px 14px 6px; font-size: .64rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #9fd2ff; }
.f-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 10px 14px; text-align: left; border-top: 1px solid rgba(255, 255, 255, .08); transition: background .2s; }
button.f-row:hover { background: rgba(255, 255, 255, .08); }
button.f-row:hover .go { background: var(--sun); color: #1a1407; border-color: var(--sun); }
.f-txt { display: grid; gap: 1px; font-size: .88rem; min-width: 0; }
.f-txt strong { font-size: .98rem; }
.f-note { font-size: .78rem; color: var(--dim); }

/* airport: departures board */
.air-only { display: none; }
#guide.airport .air-only { display: block; }
#guide.airport #g-tabs, #guide.airport #g-list { display: none; }
#g-board { border-radius: 14px; overflow: hidden; background: #070d14; border: 1px solid var(--line); font: 500 .82rem var(--mono); }
.b-row { display: grid; grid-template-columns: 3.4em 1fr 4.2em 7.2em; gap: 10px; align-items: center; width: 100%; padding: 11px 14px; text-align: left; color: #ffd66b; border-top: 1px solid rgba(255, 255, 255, .07); }
.b-head { color: var(--dim); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; border-top: 0; background: rgba(255, 255, 255, .05); }
.b-row .d { text-transform: uppercase; letter-spacing: .04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-row .s { color: rgba(255, 255, 255, .38); }
.b-row.open .s { color: #7fe074; animation: breathe 1.6s ease-in-out infinite; }
.b-row:not(.open):not(.b-head) { color: rgba(255, 214, 107, .42); }
button.b-row:hover { background: rgba(255, 214, 107, .1); }
#g-fly { margin-top: 1rem; }
#g-fly .small { margin-top: .8rem; }

/* flying between islands */
#flight { position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; justify-items: center; gap: 18px; background: radial-gradient(120% 90% at 50% 110%, #ffffff 0%, #d9ecf7 35%, #5aa9e6 75%, #1763c7 100%); color: #0d2a4a; opacity: 0; transition: opacity .7s ease; }
#flight.on { opacity: 1; }
#flight[hidden] { display: none; }
#flight svg { width: 72px; height: 72px; fill: currentColor; stroke: none; animation: fly 2.4s ease-in-out infinite; }
#flight .boat, #flight.sail .plane { display: none; }
#flight.sail .boat { display: block; animation-name: bob; }
#flight.sail { background: radial-gradient(120% 90% at 50% 120%, #0b3a6b 0%, #1778b8 45%, #8fd0ee 80%, #e9f6fc 100%); color: #fff; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-7px) rotate(3deg); } }
#flight p { margin: 0; font: 400 1.7rem var(--display); }
@keyframes fly { 0% { transform: translate(-60px, 10px) rotate(-6deg); } 50% { transform: translate(0, -8px) rotate(-10deg); } 100% { transform: translate(60px, 10px) rotate(-6deg); } }

/* wide screens: HUD slides aside while the guide is open */
@media (min-width: 901px) {
  .guide-open #hud { transform: translateX(calc(-50% - min(230px, 20vw))); }
  .guide-open #open { visibility: hidden; }
  .guide-open #corner { opacity: 0; pointer-events: none; }
}
/* phones & small tablets: the guide is a bottom sheet */
@media (max-width: 900px) {
  #guide { top: auto; left: 0; width: auto; min-width: 0; height: min(72dvh, 680px); border-left: 0; border-top: 1px solid var(--line); border-radius: 26px 26px 0 0; transform: translateY(105%); box-shadow: 0 -30px 80px rgba(0, 10, 25, .5); }
  .grab { display: block; width: 42px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .3); margin: 9px auto 0; }
  .g-head { padding: 6px 14px 0; }
  #g-scroll { padding: 6px 18px calc(30px + env(safe-area-inset-bottom)); }
  #g-name { font-size: 1.85rem; }
  .guide-open #hud, .guide-open #credit { opacity: 0; pointer-events: none; }
  #zoom { top: auto; bottom: 96px; transform: none; right: 10px; } #zoom button { width: 34px; height: 34px; }
  .ghost { width: 30px; height: 30px; }
  .guide-open #i-tag { display: none; }
  .label { font-size: .74rem; }
  .arrow { width: 38px; height: 38px; }
  .arrow svg { width: 17px; height: 17px; }
  .card { padding: 9px 14px 10px; border-radius: 16px; }
  .card::before { left: 14px; width: 30px; height: 3px; }
  #h-count, #dots { display: none; }
  #h-name { margin: .05em 0 0; }
  .card { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 10px; }
  .card .kicker { grid-column: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .54rem; } #h-name { grid-column: 1; } .card .row { grid-column: 2; grid-row: 1 / span 2; }
  .cta { font-size: .74rem; padding: .6em .95em; }
  #menu-btn { height: 36px; } #menu-btn span { display: none; } #menu-btn { padding: 0 .65em; }
  .guide-open #corner { opacity: 0; pointer-events: none; }
  #hud { gap: 6px 6px; bottom: max(22px, env(safe-area-inset-bottom)); width: min(420px, calc(100vw - 20px)); }
  #brand { left: 16px; top: max(14px, env(safe-area-inset-top)); }
  #credit { left: 12px; right: 12px; max-width: none; bottom: 4px; font-size: .46rem; text-align: center; }
  .b-row { grid-template-columns: 3.2em 1fr 6.4em; } .b-row .f { display: none; }
}
@media (max-height: 520px) { .hint, #dots, #i-tag { display: none; } #h-name { font-size: 1.5rem; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01s !important; animation: none !important; } }

/* ================= corner controls ================= */
#corner { gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: .45em; height: 38px; padding: 0 .95em 0 .75em; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; background: var(--glass); border: 1px solid var(--line); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: 0 8px 22px rgba(2, 14, 30, .35); transition: background .2s; }
.pill svg { width: 17px; height: 17px; stroke-width: 2; flex: none; }
.pill:hover, .pill[aria-expanded='true'] { background: rgba(255, 255, 255, .22); }
.cats { display: inline-flex; gap: 6px; }
.explore { display: none; }
#plane-btn, .explore { padding: 0 .7em; }
.drop { position: absolute; right: 0; top: 48px; width: min(310px, calc(100vw - 24px)); max-height: min(72dvh, 600px); overflow-y: auto; padding: 14px 8px 8px; border-radius: 20px; background: rgba(9, 21, 36, .9); border: 1px solid var(--line); -webkit-backdrop-filter: saturate(1.4) blur(24px); backdrop-filter: saturate(1.4) blur(24px); box-shadow: 0 24px 60px rgba(0, 10, 25, .55); }
.drop[hidden] { display: none; }
.drop .kicker { padding: 0 10px 8px; }
.drop .small { padding: 0 10px 6px; margin-top: .6rem; }
.m-zone summary { display: flex; justify-content: space-between; align-items: center; padding: 11px 10px; border-radius: 10px; font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); cursor: pointer; list-style: none; }
.m-zone summary::-webkit-details-marker { display: none; }
.m-zone summary::before { content: '›'; margin-right: .6em; transition: transform .2s; font-size: 1.1em; }
.m-zone[open] summary { color: var(--text); }
.m-zone[open] summary::before { transform: rotate(90deg); }
.m-zone summary span:first-of-type { flex: 1; }
.m-zone summary .n { font: 500 .9em var(--mono); opacity: .6; }
.m-zone summary:hover { background: var(--glass-2); }
.m-foot { width: 100%; margin-top: 6px; padding: 12px 10px; border-top: 1px solid var(--line); font-weight: 600; font-size: .86rem; text-align: left; color: var(--sun); }
.m-foot::before { content: '← '; }
#planes .m-item { grid-template-columns: 1fr auto; }

/* ================= panels (stop guide + island directory) ================= */
#dir { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 40vw); min-width: 380px; display: flex; flex-direction: column; background: rgba(9, 21, 36, .8); border-left: 1px solid var(--line); -webkit-backdrop-filter: saturate(1.4) blur(26px); backdrop-filter: saturate(1.4) blur(26px); transform: translateX(105%); visibility: hidden; transition: transform .55s cubic-bezier(.2, .8, .2, 1), visibility 0s .55s; box-shadow: -30px 0 80px rgba(0, 10, 25, .45); }
.dir-open #dir { transform: none; visibility: visible; transition-delay: 0s; }
.dir-open #guide { transform: translateX(105%); visibility: hidden; }
#dir .g-head { align-items: center; }
#dir .p-scroll { overflow-y: auto; padding: 4px 28px 44px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .25) transparent; }
#d-title { margin: .1em 0 .5em; font: 400 1.9rem/1.08 var(--display); text-wrap: balance; }
#d-tabs { display: flex; gap: 4px; padding: 4px 0 12px; }
.search { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 46px; border-radius: 14px; background: rgba(255, 255, 255, .08); border: 1px solid var(--line); }
.search:focus-within { border-color: var(--sun); }
.search svg { width: 18px; height: 18px; color: var(--dim); flex: none; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 1rem; }
.search input::placeholder { color: rgba(246, 241, 231, .5); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
.chip { padding: .5em .9em; border-radius: 999px; font-size: .78rem; font-weight: 600; color: var(--dim); background: var(--glass-2); border: 1px solid var(--line); transition: background .2s, color .2s; }
.chip:hover { color: var(--text); background: rgba(255, 255, 255, .18); }
.chip[aria-pressed='true'] { background: var(--text); color: var(--ink); border-color: var(--text); }
#d-list { list-style: none; margin: 6px 0 0; padding: 0; }
.d-town { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: sticky; top: -4px; z-index: 1; margin: 14px -8px 0; padding: 10px 8px; border-radius: 12px; background: rgba(14, 30, 48, .96); border: 1px solid var(--line); }
.d-name { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.d-name i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; align-self: center; }
.d-name strong { font: 400 1.12rem var(--display); white-space: nowrap; }
.d-name span { font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-go { flex: none; font-size: .72rem; font-weight: 700; padding: .5em .9em; border-radius: 999px; background: var(--sun); color: #1a1407; }
#d-list .item + .item { border-top: 1px solid var(--line); }
#d-list .d-town + .item { border-top: 0; }
#g-near { margin-top: 1.4rem; }
#g-near[hidden], #g-tipbox[hidden] { display: none; }
#g-near .f-title { padding: 0; color: var(--dim); }
#dots[hidden] { display: none; }

/* ================= start screen + loading ================= */
#start, #loader { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 20px; overflow: auto; background: linear-gradient(90deg, #ffffff 0 33.34%, #0768a9 33.34% 66.67%, #ffcc00 66.67%); }
#start[hidden], #loader[hidden] { display: none; }
.s-box { width: min(920px, 100%); padding: clamp(20px, 4vw, 40px); border-radius: 28px; background: rgba(8, 22, 40, .9); border: 1px solid var(--line); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: 0 40px 100px rgba(0, 10, 30, .5); }
.s-box h2 { margin: .15em 0 .2em; font: 400 clamp(2rem, 6vw, 3.4rem)/1 var(--display); }
.s-sub { margin: 0 0 1.4rem; color: var(--dim); max-width: 52ch; line-height: 1.5; }
#s-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.s-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; text-align: left; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); transition: background .2s, transform .2s, border-color .2s; }
.s-card:hover { background: rgba(255, 255, 255, .14); border-color: var(--sun); transform: translateY(-2px); }
.s-card img { width: 64px; height: 64px; object-fit: contain; flex: none; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); }
.s-txt { display: grid; gap: 2px; min-width: 0; }
.s-txt strong { font: 400 1.25rem/1.1 var(--display); }
.s-txt span { font-size: .78rem; color: var(--dim); line-height: 1.3; }
.ghost-btn { margin-top: 1.2rem; padding: .7em 1.2em; border-radius: 999px; border: 1px solid var(--line); font-weight: 600; font-size: .86rem; }
.ghost-btn[hidden] { display: none; }
.ghost-btn:hover { background: var(--glass-2); }
#loader { z-index: 45; align-content: center; justify-items: center; gap: 18px; }
#loader p { margin: 0; padding: .8em 1.4em; border-radius: 999px; background: rgba(8, 22, 40, .9); font: 400 1.15rem var(--display); }
#loader.fail p::after { content: ' Something went wrong — please reload.'; }
.flag { display: flex; gap: 8px; height: 46px; align-items: flex-end; padding: 10px 14px; border-radius: 16px; background: rgba(8, 22, 40, .9); }
.flag i { width: 10px; border-radius: 4px; animation: bars 1.1s ease-in-out infinite; }
.flag i:nth-child(1) { background: #fff; } .flag i:nth-child(2) { background: #3aa0e0; animation-delay: .15s; } .flag i:nth-child(3) { background: #ffcc00; animation-delay: .3s; }
@keyframes bars { 0%, 100% { height: 30%; } 50% { height: 100%; } }
.choosing #hud, .choosing #corner, .choosing #zoom, .choosing #brand, .choosing #labels { visibility: hidden; }

/* ================= in flight / at sea ================= */
#voyage { position: fixed; left: 50%; bottom: max(28px, env(safe-area-inset-bottom)); transform: translateX(-50%); margin: 0; display: none; align-items: center; gap: .7em; padding: .8em 1.4em; border-radius: 999px; font: 400 1.2rem var(--display); background: var(--glass); border: 1px solid var(--line); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: 0 18px 50px rgba(2, 14, 30, .45); white-space: nowrap; }
.voyage #voyage { display: inline-flex; }
#voyage svg { width: 20px; height: 20px; stroke-width: 2; color: var(--sun); }
#voyage[data-mode='sail'] .plane, #voyage[data-mode='fly'] .boat { display: none; }
.voyage #hud, .voyage #corner, .voyage #zoom { opacity: 0; pointer-events: none; }
#flight { background: #0b3a6b; color: #fff; }

@media (max-width: 900px) {
  #dir { top: auto; left: 0; width: auto; min-width: 0; height: min(78dvh, 720px); border-left: 0; border-top: 1px solid var(--line); border-radius: 26px 26px 0 0; transform: translateY(105%); box-shadow: 0 -30px 80px rgba(0, 10, 25, .5); }
  .dir-open #guide { transform: translateY(105%); }
  #dir .p-scroll { padding: 2px 18px calc(30px + env(safe-area-inset-bottom)); }
  #d-title { font-size: 1.5rem; }
  .pill { height: 34px; }
  .pill span { display: none; } .pill { padding: 0 .6em; }
  #brand h1 { font-size: clamp(1.5rem, 7.4vw, 2.4rem); }
  #s-grid { grid-template-columns: 1fr 1fr; } .s-card { flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 12px; } .s-card img { width: 52px; height: 52px; }
  #voyage { font-size: 1rem; }
}
@media (max-width: 620px) { .cats, #studio { display: none; } .explore { display: inline-flex; } }
