:root {
  --ink: #1f2a3a;
  --ink-2: #56637a;
  --line: rgba(31, 42, 58, .12);
  --bar-h: 52px;
  --ui: Inter, system-ui, -apple-system, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body { background: #f2e6d3; color: var(--ink); font-family: var(--ui); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, a { font: inherit; color: inherit; }
button { cursor: pointer; }
kbd { font: 500 11px var(--ui); padding: 1px 5px; border-radius: 5px; background: rgba(255,255,255,.6); border: 1px solid rgba(31,42,58,.15); border-bottom-width: 2px; }

/* ---- layers: the island (world), the site (stage) over it, the sky over both on the landing */
#world { position: fixed; inset: 0; outline: none; }
#world canvas { position: absolute; inset: 0; display: block; touch-action: none; cursor: grab; }
body.over-house #world canvas { cursor: pointer; }
body.dragging #world canvas { cursor: grabbing; }
#stage { position: fixed; inset: 0 0 var(--bar-h) 0; z-index: 5; opacity: 0; pointer-events: none; }
body.inside #stage { opacity: 1; pointer-events: auto; }
#stage.fade { transition: opacity .22s ease; }
#cover { position: absolute; inset: 0; z-index: 2; background: var(--site-bg, #fff); }
#stage .frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; z-index: 1; }
#stage .frame.on { z-index: 3; animation: up .25s ease; }
@keyframes up { from { opacity: 0; } }
#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 10; transition: opacity .6s ease; }
body:not(.at-landing):not(.clouds) #sky { opacity: 0; pointer-events: none; transition-duration: .75s; }

#brand { position: fixed; top: 18px; left: 20px; z-index: 20; font: 600 15px var(--ui); letter-spacing: -.01em; color: rgba(31,42,58,.8); display: flex; align-items: center; gap: 8px; transition: opacity .4s; }
#brand .mark { width: 16px; height: 16px; border-radius: 5px 5px 5px 1px; background: linear-gradient(140deg, #fff 0 45%, #ffd9b8 46%); box-shadow: 0 1px 4px rgba(31,42,58,.2); }
body:not(.at-landing) #brand { opacity: 0; pointer-events: none; }

/* ---- landing: the headline, a card per island to pick (or none: anywhere), one button */
#landing { position: fixed; inset: 0; z-index: 20; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; align-items: center; text-align: center; padding: clamp(64px, 11vh, 120px) 16px 40px; transition: opacity .4s ease, transform .6s cubic-bezier(.5,0,.75,0); scrollbar-width: none; }
#landing::-webkit-scrollbar { display: none; }
#landing > * { flex: none; }
body:not(.at-landing) #landing { opacity: 0; transform: scale(1.08); pointer-events: none; }
.hero > * { animation: rise .9s cubic-bezier(.2,.8,.2,1) both; }
.hero .eyebrow { animation-delay: .05s; } .hero h1 { animation-delay: .12s; } .hero .lead { animation-delay: .22s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.eyebrow { margin: 0 0 14px; font: 500 12px var(--ui); letter-spacing: .14em; text-transform: uppercase; color: rgba(31,42,58,.55); }
h1 { margin: 0; font: 400 clamp(40px, 6.4vw, 78px)/1.0 var(--serif); letter-spacing: -.015em; color: #1c2a40; text-wrap: balance; }
h1 em { color: #2c4a7e; }
.lead { margin: 18px auto 0; max-width: 31em; font-size: clamp(15px, 1.6vw, 17px); line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
#add-top { position: fixed; top: 12px; right: 14px; z-index: 21; margin: 0; transition: opacity .4s; }
body:not(.at-landing) #add-top { opacity: 0; pointer-events: none; }

#picks { width: 100%; max-width: 1200px; margin-top: clamp(30px, 5.5vh, 54px); }
.picks-head { display: flex; align-items: baseline; justify-content: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; animation: rise .9s cubic-bezier(.2,.8,.2,1) .3s both; }
.picks-head h2 { margin: 0; font: italic 400 28px/1 var(--serif); color: #1c2a40; }
#picks-sub { margin: 0; font-size: 13.5px; color: var(--ink-2); }
#pick-list { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }

.isle-card { --c: #5b7fb8; position: relative; display: flex; flex-direction: column; text-align: left; padding: 10px 10px 14px; border-radius: 20px; border: 1px solid rgba(255,255,255,.7); background: rgba(255,255,255,.5); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); box-shadow: 0 1px 0 rgba(255,255,255,.8) inset, 0 10px 30px -12px rgba(28,42,64,.25); color: #1c2a40; transition: transform .35s cubic-bezier(.2,.8,.2,1), background .25s, box-shadow .3s, border-color .25s; animation: rise .9s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(.34s + var(--i, 0) * .06s); }
.isle-card:hover { transform: translateY(-4px); background: rgba(255,255,255,.72); box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 18px 40px -14px rgba(28,42,64,.32); }
.isle-card:active { transform: translateY(-1px) scale(.985); }
.isle-card:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.isle-card[aria-pressed="true"] { background: #fff; border-color: var(--c); box-shadow: 0 0 0 2px var(--c), 0 18px 44px -14px color-mix(in srgb, var(--c) 55%, transparent); transform: translateY(-4px); }

/* three of its homes, fanned like postcards on a table */
.fan { position: relative; height: 124px; margin-bottom: 12px; border-radius: 13px; background: linear-gradient(160deg, color-mix(in srgb, var(--c) 30%, #fff), color-mix(in srgb, var(--c) 12%, #f7f3ec)); overflow: hidden; }
.fan::after { content: ''; position: absolute; inset: auto 0 0; height: 40%; background: linear-gradient(transparent, color-mix(in srgb, var(--c) 18%, transparent)); pointer-events: none; }
.fan img, .fan .swatch { position: absolute; left: 50%; top: 50%; width: 66%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 5px; border: 2.5px solid #fff; background: #fff; box-shadow: 0 6px 16px -4px rgba(28,42,64,.35); transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.fan > :nth-child(1) { transform: translate(-80%, -62%) rotate(-8deg); }
.fan > :nth-child(2) { transform: translate(-20%, -58%) rotate(7deg); }
.fan > :nth-child(3) { transform: translate(-50%, -38%) rotate(-1.5deg); z-index: 1; }
.isle-card:hover .fan > :nth-child(1), .isle-card[aria-pressed="true"] .fan > :nth-child(1) { transform: translate(-90%, -66%) rotate(-12deg); }
.isle-card:hover .fan > :nth-child(2), .isle-card[aria-pressed="true"] .fan > :nth-child(2) { transform: translate(-10%, -64%) rotate(11deg); }
.isle-card:hover .fan > :nth-child(3), .isle-card[aria-pressed="true"] .fan > :nth-child(3) { transform: translate(-50%, -40%) rotate(0deg) scale(1.05); }
.fan .swatch { display: grid; grid-template-rows: 1fr 4px; }

.isle-card .nm { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; padding: 0 4px; }
.isle-card b { font: 400 23px/1.05 var(--serif); letter-spacing: -.005em; }
.isle-card small { flex: none; font-size: 11.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.isle-card .bl { margin: 6px 4px 0; font-size: 12.5px; line-height: 1.4; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.isle-card .tick { position: absolute; top: 18px; right: 18px; z-index: 2; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.85); border: 1.5px solid rgba(31,42,58,.18); color: transparent; box-shadow: 0 2px 6px rgba(28,42,64,.15); transition: background .2s, border-color .2s, color .2s, transform .25s cubic-bezier(.3,1.6,.5,1); }
.isle-card[aria-pressed="true"] .tick { background: var(--c); border-color: var(--c); color: #fff; transform: scale(1.08); }
.isle-card .key { position: absolute; top: 18px; left: 18px; z-index: 2; font: 600 10.5px var(--ui); color: rgba(31,42,58,.55); background: rgba(255,255,255,.8); border-radius: 5px; padding: 1px 5px; opacity: 0; transition: opacity .2s; }
@media (hover: hover) and (pointer: fine) { #landing:hover .isle-card .key, .isle-card:focus-visible .key { opacity: 1; } }

.launch { margin-top: clamp(24px, 4.5vh, 40px); display: flex; flex-direction: column; align-items: center; gap: 6px; animation: rise .9s cubic-bezier(.2,.8,.2,1) .55s both; }
.go { border: 0; padding: 17px 30px 17px 32px; border-radius: 999px; background: #1c2a40; color: #fff; font: 600 17px var(--ui); letter-spacing: -.01em; box-shadow: 0 10px 30px rgba(28,42,64,.28), inset 0 1px 0 rgba(255,255,255,.15); transition: transform .18s ease, box-shadow .18s ease, background .3s; display: inline-flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px); }
.go #go-lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.go::after { content: '→'; transition: transform .2s; }
.go:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(28,42,64,.32); }
.go:hover::after { transform: translateX(3px); }
.go:active { transform: translateY(0) scale(.98); }
.go:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.go .dots { display: inline-flex; margin-right: 2px; }
.go .dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); border: 2px solid #1c2a40; margin-left: -4px; }
.go .dots i:first-child { margin-left: 0; }
.go-any { border: 0; background: none; padding: 6px 10px; border-radius: 8px; font-size: 13.5px; color: var(--ink-2); text-decoration: underline; text-decoration-color: rgba(31,42,58,.3); text-underline-offset: 3px; }
.go-any:hover { color: var(--ink); background: rgba(255,255,255,.4); }
.go-any[hidden] { display: none; }
.hint { margin: 10px 0 0; font-size: 12.5px; color: rgba(31,42,58,.55); animation: rise .9s cubic-bezier(.2,.8,.2,1) .6s both; }
@media (hover: none), (pointer: coarse) { .hint { display: none; } }

@media (max-width: 1100px) { #pick-list { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 760px; margin: 0 auto; } }
@media (max-height: 820px) and (min-width: 1101px) { .isle-card .bl { display: none; } #landing { padding-top: 64px; } h1 { font-size: clamp(40px, 5.4vw, 66px); } }
@media (max-width: 720px) {
  #landing { padding: 70px 16px 150px; }
  h1 { font-size: clamp(36px, 10.5vw, 48px); }
  .lead { font-size: 15px; }
  #add-top { top: 10px; right: 8px; font-size: 12px; }
  #add-top span, #add-top { white-space: nowrap; }
  #picks { margin-top: 28px; }
  .picks-head { flex-direction: column; align-items: center; gap: 6px; }
  .picks-head h2 { font-size: 26px; }
  #picks-sub { font-size: 13px; }
  #pick-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .isle-card { padding: 8px 8px 11px; border-radius: 17px; }
  .isle-card:hover, .isle-card[aria-pressed="true"] { transform: none; }
  .fan { height: 84px; margin-bottom: 9px; border-radius: 11px; }
  .isle-card b { font-size: 20px; }
  .isle-card .nm { flex-direction: column; align-items: flex-start; gap: 2px; }
  .isle-card .bl { display: none; }
  .isle-card .tick { top: 14px; right: 14px; width: 22px; height: 22px; }
  .launch { position: fixed; left: 0; right: 0; bottom: 0; z-index: 2; margin: 0; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(rgba(246,240,232,0), rgba(246,240,232,.94) 26px); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); flex-direction: column-reverse; gap: 2px; padding-top: 30px; }
  .launch .go { width: 100%; justify-content: center; padding: 16px 20px; font-size: 16px; }
  .go-any { font-size: 13px; padding: 2px 8px; }
}
@media (prefers-reduced-motion: reduce) { .hero > *, .isle-card, .launch, .hint, .picks-head { animation: none; } .fan > * { transition: none; } }

/* ---- the bar */
#bar { position: fixed; left: 0; right: 0; bottom: 0; height: var(--bar-h); z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 8px 0 14px; padding-bottom: env(safe-area-inset-bottom); background: rgba(250, 251, 253, .94); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); border-top: 1px solid var(--line); transform: translateY(100%); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
body:not(.at-landing) #bar { transform: none; }
.where { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; transition: opacity .2s; }
body.flying .where { opacity: .55; }
#fav { width: 18px; height: 18px; border-radius: 4px; flex: none; object-fit: contain; }
#fav.none { visibility: hidden; width: 0; margin-right: -10px; }
.names { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
#name { font: 600 14px var(--ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 34vw; flex: none; }
#desc { font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
#desc kbd { font-size: 10.5px; margin: 0 1px; }
.acts { display: flex; align-items: center; gap: 6px; flex: none; }
.acts > button, .acts > a { height: 36px; min-width: 36px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line); background: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 13.5px; font-weight: 500; text-decoration: none; white-space: nowrap; transition: background .15s, transform .1s; }
.acts > button:hover, .acts > a:hover { background: #f1f4f9; }
.acts > button:active, .acts > a:active { transform: scale(.96); }
.acts > button:disabled { opacity: .4; cursor: default; }
.acts .primary { background: #1c2a40; color: #fff; border-color: #1c2a40; padding: 0 16px; }
.acts .primary:hover { background: #2b3d59; }
.acts .primary kbd { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.2); color: #fff; }
#prev-door, #next-door { font-size: 22px; line-height: 1; padding: 0 12px 3px; }
.lbl.short { display: none; }
/* which buttons show where */
.acts .in, .acts .st, .acts .mp { display: none; }
body.inside .acts .in, body.street .acts .st, body.map .acts .mp { display: inline-flex; }
body.flying.was-inside .acts .in, body.flying.was-street .acts .st, body.flying.was-map .acts .mp { display: inline-flex; opacity: .5; pointer-events: none; }
#map-btn { padding: 0 8px 0 4px; gap: 6px; }
#minimap { width: 52px; height: 28px; border-radius: 6px; display: block; }
#lit-count { font-weight: 600; font-variant-numeric: tabular-nums; }
#lit-count::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #ffb547; box-shadow: 0 0 6px #ffb547; margin-right: 5px; vertical-align: 1px; }
body.map #map-btn { background: #1c2a40; color: #fff; border-color: #1c2a40; }
/* Next: anywhere, or only this island */
#stay { color: var(--ink-2); max-width: 210px; }
#stay .lbl { overflow: hidden; text-overflow: ellipsis; }
#stay .ico-stay, #stay[aria-pressed="true"] .ico-any { display: none; }
#stay[aria-pressed="true"] .ico-stay { display: block; }
#stay[aria-pressed="true"] { background: #fff4e2; border-color: #f0c98d; color: #7a4a10; }
#stay[aria-pressed="true"]:hover { background: #ffecd0; }
body.flying #stay { opacity: .5; }
/* ---- the card: a site that won't run inside the frame (or is still on its way) */
.card { position: absolute; inset: 0; z-index: 4; display: flex; align-items: center; justify-content: center; padding: 24px 16px; overflow: auto; background: radial-gradient(ellipse 90% 70% at 50% 35%, color-mix(in srgb, var(--accent-c, #9db8de) 16%, #fff), color-mix(in srgb, var(--accent-c, #9db8de) 7%, #f3f1ec)); transition: opacity .3s; }
.card .in { width: min(560px, 100%); background: #fff; border-radius: 18px; box-shadow: 0 20px 60px rgba(20,30,50,.18), 0 0 0 1px rgba(20,30,50,.06); overflow: hidden; }
.card .shot { aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--bg, #eef2f7), var(--accent-c, #cfd8e6)); position: relative; overflow: hidden; display: grid; place-items: center; }
.card .shot img.pic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transition: opacity .5s; }
.card .shot img.pic.on { opacity: 1; }
.card .shot .initial { font: 400 72px var(--serif); color: rgba(255,255,255,.9); text-shadow: 0 2px 12px rgba(0,0,0,.15); }
.card .body { padding: 20px 22px 22px; }
.card .host { font-size: 12.5px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.card .host img { width: 14px; height: 14px; border-radius: 3px; }
.card .host img.none { display: none; }
.card h2 { margin: 6px 0 6px; font: 400 30px/1.1 var(--serif); }
.card p.d { margin: 0 0 16px; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }
.card .open { display: flex; justify-content: center; align-items: center; gap: 8px; width: 100%; padding: 14px; border-radius: 12px; background: #1c2a40; color: #fff; text-decoration: none; font-weight: 600; font-size: 15.5px; }
.card .open:hover { background: #2b3d59; }
.card .why { margin: 12px 0 0; font-size: 12.5px; color: var(--ink-2); text-align: center; }
.card .why .spin { display: inline-block; width: 9px; height: 9px; border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -1px; margin-right: 4px; }
@keyframes spin { to { transform: rotate(1turn); } }

/* a page on its way: its name, for a moment, in its own colours */
.card[data-kind="splash"] { background: var(--site-bg, #f6f2ea); }
.card .splash { text-align: center; color: color-mix(in srgb, var(--accent-c) 55%, #1c2a40); animation: up .3s ease .15s both; }
.card .splash h2 { margin: 0 0 6px; font: 400 clamp(34px, 6vw, 64px)/1.05 var(--serif); }
.card .splash p { margin: 0; font-size: 14px; opacity: .7; }
.card .splash .why { margin-top: 14px; font-size: 12.5px; }

/* ---- which island; the neighbours' names at a phone's edges */
#isle-name { font-size: 11px; font-weight: 600; letter-spacing: .02em; color: #6b5a2e; background: #f6ead0; border-radius: 999px; padding: 2px 8px; white-space: nowrap; flex: none; max-width: 22vw; overflow: hidden; text-overflow: ellipsis; }
#isle-name:empty { display: none; }
.nb { display: none; }
@media (max-width: 720px) {
  body.street .nb { display: flex; position: fixed; top: 42%; z-index: 6; align-items: center; gap: 4px; max-width: 34vw; min-height: 44px; padding: 0 12px; border: 0; background: rgba(28,42,64,.78); color: #fff; font: 600 12px var(--ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; backdrop-filter: blur(6px); }
  body.street #nb-left { left: 0; border-radius: 0 999px 999px 0; }
  body.street #nb-right { right: 0; border-radius: 999px 0 0 999px; }
  .nb span { font-size: 18px; line-height: 1; }
  #isle-name { max-width: 100%; align-self: flex-start; font-size: 10px; padding: 1px 6px; }
}

/* ---- island names from above */
#isles { position: fixed; inset: 0; z-index: 4; pointer-events: none; transition: opacity .3s; opacity: 0; }
.isle-tag { position: absolute; left: 0; top: 0; border: 0; padding: 7px 14px 8px; border-radius: 14px; background: rgba(255,253,248,.9); box-shadow: 0 6px 24px rgba(20,30,50,.18); display: flex; flex-direction: column; align-items: center; gap: 1px; white-space: nowrap; pointer-events: none; }
#isles.live .isle-tag { pointer-events: auto; cursor: pointer; }
#isles.live .isle-tag:hover { background: #fff; }
.isle-tag b { font: 400 22px/1.05 var(--serif); color: #1c2a40; }
.isle-tag small { font-size: 11.5px; color: var(--ink-2); }

/* ---- add your house */
.add-link { margin-top: 26px; border: 0; background: none; color: rgba(31,42,58,.6); font-size: 13px; padding: 6px 8px; border-radius: 8px; }
.add-link:hover { color: var(--ink); background: rgba(255,255,255,.4); }
.add-link.in-list { margin: 0 8px 10px; text-align: left; font-size: 12.5px; }
#add { border: 0; padding: 0; border-radius: 18px; width: min(440px, calc(100vw - 24px)); box-shadow: 0 30px 80px rgba(20,30,50,.3); color: var(--ink); background: #fffdf8; }
#add::backdrop { background: rgba(28,42,64,.35); backdrop-filter: blur(3px); }
#add form { padding: 22px 22px 18px; display: flex; flex-direction: column; gap: 12px; }
#add h2 { margin: 0; font: 400 30px/1.05 var(--serif); }
#add .sub { margin: -4px 0 2px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
#add label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; }
#add label span { font-weight: 400; color: var(--ink-2); }
#add input { font: 15px var(--ui); padding: 11px 12px; border-radius: 10px; border: 1px solid rgba(31,42,58,.2); background: #fff; color: var(--ink); }
#add input:focus { outline: 2px solid #2f6fd6; outline-offset: 0; border-color: transparent; }
#add-msg { margin: 0; min-height: 1.2em; font-size: 13.5px; color: var(--ink-2); }
#add-msg.ok { color: #1f7a4c; font-weight: 600; }
#add-msg.err { color: #b33a2c; }
#add .row { display: flex; justify-content: flex-end; gap: 8px; }
#add .row button { height: 42px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-weight: 500; }
#add .row .primary { background: #1c2a40; color: #fff; border-color: #1c2a40; }
#add .row button:disabled { opacity: .5; }

/* ---- above the island: names of the lit houses, a hover tip, a list */
#labels { position: fixed; inset: 0; z-index: 4; pointer-events: none; opacity: 0; transition: opacity .3s; }
body.map:not(.flying) #labels { opacity: 1; }
#labels span { position: absolute; left: 0; top: 0; padding: 3px 8px 3px 7px; border-radius: 999px; background: rgba(28,42,64,.86); color: #fff; font: 600 11.5px var(--ui); white-space: nowrap; transform: translate(-50%, -100%); display: flex; align-items: center; gap: 5px; }
#labels span::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #ffb547; box-shadow: 0 0 6px #ffb547; }
#tip { position: fixed; left: 0; top: 0; z-index: 25; padding: 6px 10px; border-radius: 8px; background: #1c2a40; color: #fff; font: 600 12.5px var(--ui); pointer-events: none; opacity: 0; transition: opacity .12s; white-space: nowrap; }
#tip.on { opacity: 1; }
#tip small { font-weight: 500; opacity: .65; margin-left: 6px; }
#lit { position: fixed; right: 12px; top: 12px; z-index: 22; width: 238px; max-height: calc(100vh - var(--bar-h) - 36px); display: flex; flex-direction: column; background: rgba(255,253,248,.94); backdrop-filter: blur(10px); border-radius: 14px; box-shadow: 0 16px 50px rgba(20,30,50,.2), 0 0 0 1px rgba(20,30,50,.06); animation: pop .22s cubic-bezier(.2,.8,.2,1); }
#lit[hidden] { display: none; }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(-6px); } }
.lit-head { display: flex; align-items: baseline; gap: 8px; padding: 12px 14px 6px; white-space: nowrap; }
.lit-head #lit-sub { overflow: hidden; text-overflow: ellipsis; }
.lit-head h2 { margin: 0; font: 400 22px var(--serif); }
#lit-sub { font-size: 12px; color: var(--ink-2); }
#lit-list { list-style: none; margin: 0; padding: 0 6px 8px; overflow: auto; }
#lit-list button { width: 100%; border: 0; background: none; text-align: left; padding: 6px 8px; border-radius: 8px; font-size: 13px; display: flex; align-items: center; gap: 8px; }
#lit-list button:hover { background: #f1ede4; }
#lit-list i { width: 10px; height: 10px; border-radius: 3px; flex: none; background: var(--c); box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
#lit-list b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#lit-list small { margin-left: auto; font-size: 11px; color: var(--ink-2); white-space: nowrap; }
#lit-empty { margin: 0; padding: 4px 14px 14px; font-size: 13px; color: var(--ink-2); }

#toast { position: fixed; left: 50%; bottom: calc(var(--bar-h) + 14px); z-index: 50; transform: translate(-50%, 10px); max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 12px; background: rgba(28,42,64,.92); color: #fff; font-size: 13.5px; line-height: 1.4; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---- phone */
@media (max-width: 720px) {
  :root { --bar-h: 62px; }
  #bar { padding: 0 6px 0 10px; gap: 6px; }
  .names { flex-direction: column; gap: 1px; }
  #name { max-width: 100%; font-size: 13.5px; }
  #desc { font-size: 11.5px; max-width: 100%; }
  #desc .keys { display: none; }
  .acts { gap: 4px; }
  .acts > button, .acts > a { height: 46px; min-width: 44px; padding: 0 10px; }
  .acts .primary { padding: 0 12px; }
  .acts kbd, #back .lbl, #out .lbl, #random .lbl, #map-random .lbl, #down .lbl, #stay .lbl, .lbl.long { display: none; }
  #picks { margin-top: 16px; }
  /* no room for the switch in the bar: the island's name is the switch */
  #stay, #open .lbl { display: none !important; }
  #isle-name { cursor: pointer; }
  body.staying #isle-name { background: #ffe2b8; color: #7a4a10; }
  body.staying #isle-name::before { content: 'Only '; }
  #pick-list button { padding: 9px 13px; }
  .lbl.short { display: inline; }
  #minimap { display: none; }
  #map-btn { padding: 0 10px; }
  #lit { display: none !important; }
  .card h2 { font-size: 26px; }
}
@media (max-width: 380px) {
  #open .lbl, #enter .lbl { display: none; }
}
@media (hover: none) {
  .hint { visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01s !important; animation-duration: .01s !important; }
}
@media (max-width: 720px) {
  .isle-tag { padding: 5px 10px 6px; }
  .isle-tag b { font-size: 17px; }
  .isle-tag small { font-size: 10.5px; }
}
