/* Gucci — interface.
   Two worlds, two voices. Everything about leaving (the departures board, the minutes, the key
   caps) is set in Big Shoulders, the condensed signage face drawn for the City of Chicago, on dark
   palm green. Everything about staying (titles, the list, what people say) is Gloock and Bricolage
   on shell pink paper, under a striped cabana awning. Flat fills, a palm-green outline and a hard
   little shadow on anything you can press. */
@font-face { font-family: 'Gloock'; src: url(../assets/fonts/gloock.woff) format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Bricolage Grotesque'; src: url(../assets/fonts/bricolage-400.woff) format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Bricolage Grotesque'; src: url(../assets/fonts/bricolage-700.woff) format('woff'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Big Shoulders'; src: url(../assets/fonts/bigshoulders-700.woff) format('woff'); font-weight: 700; font-display: swap; }
:root {
  --palm: #0d4a43; --palm-deep: #06302b; --palm-soft: #2c6a62;
  --flamingo: #ff4f86; --flamingo-deep: #d92f68;
  --sun: #ffd23f; --lagoon: #19b9a7; --shell: #fff8f3; --blush: #ffe4eb; --navy: #202e6c;
  --display: 'Gloock', 'Didot', 'Bodoni 72', Georgia, serif;
  --text: 'Bricolage Grotesque', ui-rounded, 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --board: 'Big Shoulders', 'Arial Narrow', 'Helvetica Neue', Impact, sans-serif;
  --press: 0 3px 0 var(--palm);
  --st: env(safe-area-inset-top, 0px); --sr: env(safe-area-inset-right, 0px); --sb: env(safe-area-inset-bottom, 0px); --sl: env(safe-area-inset-left, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #bfe9df; color: var(--palm); font-family: var(--text); font-size: 16px; line-height: 1.4; -webkit-font-smoothing: antialiased; touch-action: none; -webkit-user-select: none; user-select: none; overscroll-behavior: none; }
canvas#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; outline: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
#fade { position: fixed; inset: 0; background: var(--shell); pointer-events: none; z-index: 30; transition: opacity .7s ease; }
#flash { position: fixed; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 40; }
#flash.go { animation: flashgo .5s ease-out; }
@keyframes flashgo { 0% { opacity: .85; } 100% { opacity: 0; } }
#fps { position: fixed; left: 8px; bottom: 8px; z-index: 50; font: 12px/1.3 ui-monospace, monospace; background: rgba(6, 48, 43, .8); color: #fff; padding: 3px 7px; border-radius: 5px; pointer-events: none; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }
.ui > :not(.overlay) { transition: opacity .4s; }
body:not(.playing) .ui > :not(.overlay) { opacity: 0; pointer-events: none; }

/* ---------- top bar ---------- */
#topbar { position: fixed; z-index: 10; top: calc(12px + var(--st)); left: calc(12px + var(--sl)); right: calc(12px + var(--sr)); display: flex; justify-content: space-between; align-items: flex-start; pointer-events: none; }
body.playing #topbar > * { pointer-events: auto; }
#back { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 15px 0 10px; border-radius: 22px; background: var(--shell); border: 2px solid var(--palm); box-shadow: var(--press); color: var(--navy); font-weight: 700; font-size: .92rem; text-decoration: none; }
#back .arr { width: 18px; height: 18px; fill: none; stroke: var(--palm); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
#back .mark { width: 24px; height: 24px; border-radius: 6px; }
#buttons { display: flex; gap: 8px; align-items: center; }
.ib { position: relative; width: 44px; height: 44px; border-radius: 50%; background: var(--shell); border: 2px solid var(--palm); box-shadow: var(--press); display: grid; place-items: center; transition: transform .08s, box-shadow .08s; }
.ib svg { width: 22px; height: 22px; fill: none; stroke: var(--palm); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ib:active, #back:active, .btn:active, .x:active { transform: translateY(3px); box-shadow: 0 0 0 var(--palm); }
.ib .off-only { display: none; } .ib.off .off-only { display: inline; } .ib.off .on-only { display: none; } .ib.off { background: #e9ddd6; } .ib.off svg { opacity: .5; }
.ib.list { width: auto; display: flex; gap: 6px; padding: 0 9px 0 12px; border-radius: 22px; background: var(--flamingo); color: #fff; font-family: var(--board); font-weight: 700; font-size: 1.2rem; letter-spacing: .05em; text-transform: uppercase; line-height: 1; }
.ib.list svg { stroke: #fff; }
.ib.list i { font-style: normal; min-width: 26px; height: 26px; padding: 2px 6px 0; margin-left: 3px; border-radius: 13px; background: var(--sun); color: var(--palm); display: grid; place-items: center; font-size: 1.05rem; border: 2px solid var(--palm); }
.ib.bump { animation: bump .55s; }
@keyframes bump { 30% { transform: scale(1.16) rotate(-5deg); } 60% { transform: scale(.96) rotate(2deg); } }

/* ---------- the departures board ---------- */
#clock { position: fixed; z-index: 9; top: calc(12px + var(--st)); left: 50%; transform: translateX(-50%); width: min(336px, calc(100vw - 24px)); background: var(--palm); color: var(--shell); border: 2px solid var(--palm-deep); border-radius: 14px; padding: 9px 12px 8px; box-shadow: 0 3px 0 var(--palm-deep), 0 12px 26px rgba(6, 48, 43, .22); }
#clock .top { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
#clock .dest { display: flex; flex-direction: column; line-height: 1; min-width: 0; }
#clock .lbl { font-size: .74rem; font-weight: 700; color: #a9d8cf; margin-bottom: 4px; }
#clock .city { font-family: var(--board); font-weight: 700; font-size: 1.85rem; letter-spacing: .07em; text-transform: uppercase; }
#clock .when { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
#clockTime { position: relative; display: inline-block; font-family: var(--board); font-weight: 700; font-size: 1.95rem; line-height: 1; letter-spacing: .05em; color: var(--sun); background: var(--palm-deep); border-radius: 6px; padding: 5px 9px 3px; font-variant-numeric: tabular-nums; white-space: nowrap; transform-origin: 50% 50%; }
#clockTime::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: var(--palm); }
#clockTime.tick { animation: flap .55s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes flap { 0% { transform: perspective(240px) rotateX(-89deg); } 100% { transform: none; } }
#clockLate { font-family: var(--board); font-weight: 700; font-size: .86rem; letter-spacing: .09em; text-transform: uppercase; line-height: 1; padding: 3px 7px 2px; border-radius: 4px; background: var(--lagoon); color: var(--palm-deep); white-space: nowrap; }
#clockLate.late { background: var(--flamingo); color: #fff; }
#clockLate.gone { background: var(--sun); color: var(--palm-deep); }
#clock.bump #clockLate { animation: bump .55s; }
#clock .track { position: relative; height: 6px; border-radius: 3px; background: rgba(255, 248, 243, .18); margin: 12px 26px 0 8px; }
#clock .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 3px; background: linear-gradient(90deg, var(--sun), #ff9a5a); transition: width 1.2s cubic-bezier(.3, 1.3, .5, 1); }
#clock .sun { position: absolute; top: 50%; left: 0; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--sun); border: 2px solid var(--palm-deep); transition: left 1.2s cubic-bezier(.3, 1.3, .5, 1); }
#clock .goal { position: absolute; right: -24px; top: 50%; width: 20px; height: 20px; margin-top: -12px; }
#clock .goal svg { width: 100%; height: 100%; fill: none; stroke: #ffa46a; stroke-width: 2.2; stroke-linecap: round; }
#clock .sub { font-size: .76rem; margin-top: 8px; color: #a9d8cf; text-align: center; }

/* ---------- notes that slide in ---------- */
#toasts { position: fixed; z-index: 11; right: calc(12px + var(--sr)); top: calc(70px + var(--st)); width: min(318px, calc(100vw - 24px)); display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { position: relative; background: var(--shell); border: 2px solid var(--palm); border-radius: 14px; padding: 10px 14px 12px; box-shadow: var(--press); transform: translateX(118%) rotate(4deg); opacity: 0; transition: transform .45s cubic-bezier(.2, 1.3, .4, 1), opacity .25s; }
.toast.in { transform: none; opacity: 1; }
.toast b { display: block; font-family: var(--display); font-weight: 400; font-size: 1.25rem; line-height: 1.15; margin-bottom: 3px; }
.toast span { font-size: .92rem; line-height: 1.38; }
.toast.big { background: var(--palm); color: var(--shell); border-color: var(--palm-deep); box-shadow: 0 3px 0 var(--palm-deep); }
.toast.big b { color: var(--sun); }
.toast.task { padding-left: 56px; min-height: 66px; background: var(--blush); }
.toast.task::before { content: ''; position: absolute; left: 12px; top: 50%; width: 32px; height: 32px; margin-top: -16px; border-radius: 50%; background: var(--flamingo); border: 2px solid var(--palm); }
.toast.task::after { content: ''; position: absolute; left: 22px; top: 50%; width: 11px; height: 6px; margin-top: -6px; border-left: 3px solid #fff; border-bottom: 3px solid #fff; transform: rotate(-45deg); }
.toast.task.bonus { background: #dcf6f1; } .toast.task.bonus::before { background: var(--lagoon); }
.toast.task b { font-family: var(--text); font-weight: 700; font-size: .78rem; color: var(--flamingo-deep); margin-bottom: 1px; }
.toast.task.bonus b { color: #0a8073; }
.toast.task s { display: block; font-family: var(--display); font-size: 1.14rem; line-height: 1.16; text-decoration-thickness: 2px; text-decoration-color: var(--flamingo); }
.toast.task .m { display: inline-block; margin-top: 6px; font-family: var(--board); font-weight: 700; font-size: .95rem; letter-spacing: .05em; text-transform: uppercase; line-height: 1; background: var(--sun); color: var(--palm); border-radius: 4px; padding: 3px 7px 2px; }

/* ---------- things said in the world ---------- */
#bubbles { position: fixed; inset: 0; pointer-events: none; z-index: 6; overflow: hidden; }
.bubble { position: absolute; left: 0; top: 0; white-space: nowrap; will-change: transform; }
.bubble.sk { max-width: min(290px, 76vw); white-space: normal; background: var(--shell); border: 2px solid var(--palm); border-radius: 15px; padding: 6px 12px 8px; font-weight: 700; font-size: .93rem; line-height: 1.24; text-align: center; box-shadow: 0 3px 0 rgba(13, 74, 67, .92); }
.bubble.sk::after { content: ''; position: absolute; left: var(--tx, 50%); bottom: -8px; width: 12px; height: 12px; margin-left: -6px; background: var(--shell); border-right: 2px solid var(--palm); border-bottom: 2px solid var(--palm); transform: rotate(45deg); }
/* who is talking: a stripe in the colour they are wearing */
.bubble[data-who] { border-left-width: 9px; }
.bubble[data-who='dad'] { border-left-color: #ff7a55; } .bubble[data-who='mom'] { border-left-color: #27b3a4; } .bubble[data-who='big'] { border-left-color: #6f9de0; } .bubble[data-who='mid'] { border-left-color: #f2b316; } .bubble[data-who='small'] { border-left-color: #a98bff; }
.bubble.mark { width: 34px; height: 34px; margin-left: 0; border-radius: 50%; background: var(--flamingo); color: #fff; border: 2px solid var(--palm); box-shadow: var(--press); display: grid; place-items: center; font-family: var(--board); font-weight: 700; font-size: 1.55rem; line-height: 1; padding-top: 2px; animation: markpop .35s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes markpop { 0% { scale: .2; } 100% { scale: 1; } }
.bubble.woof { font-family: var(--board); font-weight: 700; font-size: 2rem; letter-spacing: .05em; color: var(--sun); -webkit-text-stroke: 6px var(--palm); paint-order: stroke fill; animation: woof .6s ease-out forwards; }
@keyframes woof { 0% { margin-top: 8px; scale: .5; } 35% { scale: 1.12; } 100% { margin-top: -22px; scale: 1; } }
.bubble.plus { font-family: var(--board); font-weight: 700; font-size: 1.3rem; letter-spacing: .05em; text-transform: uppercase; line-height: 1; background: var(--sun); color: var(--palm); border: 2px solid var(--palm); border-radius: 6px; padding: 4px 8px 2px; box-shadow: var(--press); animation: rise 1.7s cubic-bezier(.2, .8, .3, 1) forwards; }
@keyframes rise { 0% { margin-top: 14px; scale: .5; } 14% { scale: 1.1; } 22% { scale: 1; } 100% { margin-top: -52px; } }
#pop { position: fixed; left: 50%; top: 35%; z-index: 12; pointer-events: none; white-space: nowrap; font-family: var(--board); font-weight: 700; font-size: clamp(3.4rem, 11vw, 7.2rem); letter-spacing: .04em; line-height: 1; color: var(--sun); -webkit-text-stroke: 12px var(--palm); paint-order: stroke fill; text-shadow: 0 9px 0 var(--palm); opacity: 0; transform: translate(-50%, -50%) rotate(-5deg) scale(.4); }
#pop.show { animation: pop 1.25s cubic-bezier(.2, 1.4, .4, 1) forwards; }
@keyframes pop { 0% { opacity: 0; transform: translate(-50%, -50%) rotate(-10deg) scale(.3); } 16% { opacity: 1; transform: translate(-50%, -50%) rotate(-5deg) scale(1.08); } 28% { transform: translate(-50%, -50%) rotate(-5deg) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -64%) rotate(-5deg) scale(1.04); } }

/* ---------- what the keys do, right now ---------- */
#bottom { position: fixed; left: 0; right: 0; bottom: calc(18px + var(--sb)); display: flex; justify-content: center; pointer-events: none; z-index: 8; }
#prompt { display: flex; align-items: center; gap: 7px; background: var(--palm); color: var(--shell); border: 2px solid var(--palm-deep); border-radius: 13px; padding: 7px 15px 7px 8px; font-weight: 700; font-size: .98rem; box-shadow: 0 3px 0 var(--palm-deep); opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; }
#prompt.show { opacity: 1; transform: none; }
#prompt .sep { width: 2px; height: 18px; margin: 0 5px 0 7px; background: rgba(255, 248, 243, .28); font-size: 0; }
.key { display: inline-grid; place-items: center; min-width: 28px; height: 26px; padding: 2px 7px 0; margin: 0 3px 0 1px; border-radius: 5px; background: var(--sun); color: var(--palm); font-family: var(--board); font-weight: 700; font-size: 1.02rem; letter-spacing: .05em; text-transform: uppercase; line-height: 1; box-shadow: 0 2px 0 rgba(6, 48, 43, .5); vertical-align: middle; }
body.touch #bottom { display: none; }

/* ---------- thumbs ---------- */
#joy { position: fixed; left: 0; top: 0; z-index: 7; pointer-events: none; opacity: 0; transition: opacity .15s; }
#joy.on { opacity: 1; }
#joy .base { position: absolute; left: -58px; top: -58px; width: 116px; height: 116px; border-radius: 50%; background: rgba(255, 248, 243, .3); border: 2px solid rgba(13, 74, 67, .65); }
#joy .knob { position: absolute; left: -27px; top: -27px; width: 54px; height: 54px; border-radius: 50%; background: var(--flamingo); border: 2px solid var(--palm); box-shadow: var(--press); }
#joy.boost .knob { background: var(--sun); }
#joy .hint { display: none; position: absolute; left: -100px; top: 72px; width: 200px; text-align: center; font-weight: 700; font-size: .9rem; color: var(--shell); background: var(--palm); border-radius: 10px; padding: 5px 8px; }
#joy.ghost { transform: translate(calc(96px + var(--sl)), calc(100vh - 190px)); }
#joy.ghost .hint { display: block; } #joy.ghost .knob { animation: nudge 1.3s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translate(26px, -16px); } }
#act, #bark, #shake { display: none; position: fixed; z-index: 8; border-radius: 50%; border: 3px solid var(--palm); box-shadow: 0 5px 0 var(--palm); font-family: var(--board); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; line-height: .95; color: var(--palm); touch-action: none; transition: transform .06s, box-shadow .06s, background-color .2s; }
#act span, #bark span, #shake span { display: block; text-align: center; padding: 3px 6px 0; }
body.touch.playing #act, body.touch.playing #bark { display: grid; place-items: center; }
#act { right: calc(18px + var(--sr)); bottom: calc(28px + var(--sb)); width: 104px; height: 104px; background: var(--flamingo); color: #fff; font-size: 1.5rem; }
#act.idle { background: #ffc3d5; color: rgba(13, 74, 67, .5); }
#act.hot { background: var(--sun); color: var(--palm); animation: hot .7s ease-in-out infinite alternate; }
@keyframes hot { to { scale: 1.06; } }
#bark { right: calc(136px + var(--sr)); bottom: calc(24px + var(--sb)); width: 78px; height: 78px; background: var(--sun); font-size: 1.2rem; }
#shake { right: calc(34px + var(--sr)); bottom: calc(148px + var(--sb)); width: 72px; height: 72px; background: var(--lagoon); color: var(--palm-deep); font-size: 1.08rem; }
body.touch.playing #shake.show { display: grid; place-items: center; animation: markpop .3s cubic-bezier(.2, 1.6, .4, 1); }
#act:active, #bark:active, #shake:active { transform: translateY(5px); box-shadow: 0 0 0 var(--palm); }

/* ---------- sheets: the list, help, the ending ---------- */
.overlay { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: calc(14px + var(--st)) 12px calc(18px + var(--sb)); background: rgba(6, 48, 43, .56); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); opacity: 0; pointer-events: none; transition: opacity .22s; }
.overlay.show { opacity: 1; pointer-events: auto; }
.sheet { position: relative; width: min(900px, 100%); max-height: 100%; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; background: var(--shell); border: 2px solid var(--palm); border-radius: 20px; box-shadow: 0 6px 0 var(--palm); transform: translateY(16px) scale(.98); transition: transform .3s cubic-bezier(.2, 1.25, .4, 1); -webkit-user-select: text; user-select: text; }
.overlay.show .sheet { transform: none; }
/* a cabana awning: candy stripes with a scalloped edge */
.awning { position: relative; height: 30px; margin-bottom: 14px; background: repeating-linear-gradient(90deg, var(--flamingo) 0 24px, #fff 24px 48px); border-bottom: 2px solid var(--palm); flex: none; }
.awning::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 14px; background: radial-gradient(circle at 12px 0, var(--flamingo) 10.5px, var(--palm) 11px 12.6px, transparent 13px) 0 0 / 48px 14px repeat-x, radial-gradient(circle at 36px 0, #fff 10.5px, var(--palm) 11px 12.6px, transparent 13px) 0 0 / 48px 14px repeat-x; }
.x { position: absolute; right: 14px; top: 52px; z-index: 2; width: 42px; height: 42px; border-radius: 50%; background: var(--shell); border: 2px solid var(--palm); box-shadow: var(--press); display: grid; place-items: center; transition: transform .08s, box-shadow .08s; }
.x svg { width: 18px; height: 18px; fill: none; stroke: var(--palm); stroke-width: 2.8; stroke-linecap: round; }
.sheet > header, .lists, .how, .hrow { padding-left: 28px; padding-right: 28px; }
.sheet h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.9rem, 4.6vw, 2.75rem); line-height: 1.04; margin: 16px 0 6px; padding-right: 54px; letter-spacing: -.01em; }
.note { margin: 0; font-size: 1rem; line-height: 1.45; max-width: 62ch; color: var(--palm-soft); }
.note.sm { font-size: .88rem; margin: -2px 0 6px; }
.prog { position: relative; height: 12px; margin: 16px 0 22px; border-radius: 6px; background: #f6dfe4; border: 2px solid var(--palm); }
.prog i { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, var(--sun), #ff9a5a); transition: width .6s cubic-bezier(.3, 1.3, .5, 1); }
.prog .end { position: absolute; right: 0; top: 14px; font-size: .76rem; font-weight: 700; color: var(--palm-soft); }
.lists { display: grid; grid-template-columns: 1.04fr 1fr; gap: 6px 36px; padding-top: 4px; padding-bottom: 26px; align-items: start; }
.lists h3 { font-family: var(--display); font-weight: 400; font-size: 1.55rem; line-height: 1.1; margin: 0 0 8px; display: flex; align-items: center; gap: 10px; }
.chip { font-family: var(--board); font-weight: 700; font-size: .92rem; letter-spacing: .06em; text-transform: uppercase; line-height: 1; padding: 4px 7px 2px; border-radius: 4px; background: var(--flamingo); color: #fff; border: 2px solid var(--palm); }
.chip.alt { background: var(--lagoon); color: var(--palm-deep); }
.lists ol { list-style: none; margin: 0; padding: 0; }
.lists li { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1px 10px; padding: 8px 0 8px 33px; border-bottom: 1.5px dashed rgba(13, 74, 67, .22); }
.lists li::before { content: ''; position: absolute; left: 1px; top: 9px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--palm); background: #fff; }
.lists li.done::before { background: var(--lagoon); }
.lists li.done::after { content: ''; position: absolute; left: 7px; top: 15px; width: 9px; height: 5px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg); }
.lists li .t { font-weight: 700; font-size: 1rem; line-height: 1.25; }
.lists li.done .t { text-decoration: line-through; text-decoration-color: var(--flamingo); text-decoration-thickness: 2px; color: rgba(13, 74, 67, .55); }
.lists li .m { font-family: var(--board); font-weight: 700; font-size: .9rem; letter-spacing: .05em; text-transform: uppercase; line-height: 1; white-space: nowrap; background: var(--sun); border-radius: 4px; padding: 3px 6px 2px; }
.lists li.done .m { background: #d6f1ec; color: rgba(13, 74, 67, .7); }
.lists li .tip { grid-column: 1 / -1; font-size: .86rem; line-height: 1.3; color: var(--palm-soft); }
.lists li .tip:empty { display: none; }
.lists li.final { margin: 8px -10px 0; padding: 10px 10px 10px 43px; background: var(--blush); border: 2px solid var(--palm); border-radius: 12px; }
.lists li.final::before { left: 11px; top: 11px; } .lists li.final.done::after { left: 17px; top: 17px; }
.how { list-style: none; margin: 10px 0 0; }
.how li { display: grid; grid-template-columns: 190px 1fr; gap: 4px 14px; align-items: baseline; padding: 10px 0; border-bottom: 1.5px dashed rgba(13, 74, 67, .22); font-size: .98rem; line-height: 1.55; }
.how b { font-family: var(--display); font-weight: 400; font-size: 1.22rem; line-height: 1.2; }
.how .key { background: var(--palm); color: var(--sun); }
.tb { display: none; } body.touch .tb { display: inline; } body.touch .kb { display: none; }
p.tb { display: none; } body.touch p.tb { display: block; }
.hrow { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 24px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border-radius: 12px; background: var(--shell); border: 2px solid var(--palm); box-shadow: var(--press); font-weight: 700; font-size: 1rem; color: var(--palm); text-decoration: none; transition: transform .08s, box-shadow .08s; }
.btn.primary { background: var(--flamingo); color: #fff; }
.btn.quiet { border-color: transparent; box-shadow: none; background: none; text-decoration: underline; text-underline-offset: 3px; }
.btn:disabled { opacity: .65; cursor: default; }
#help .sheet { width: min(700px, 100%); }

/* the ending: a postcard home */
#ending .sheet { width: min(640px, 100%); }
#ending .kick { margin: 16px 28px 0; font-weight: 700; color: var(--flamingo-deep); }
#ending h2 { margin: 2px 28px 0; padding: 0; color: var(--flamingo); text-shadow: .045em .05em 0 var(--palm); font-size: clamp(2.2rem, 7vw, 3.4rem); }
#ending .line { margin: 12px 28px 0; line-height: 1.5; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 16px 28px 0; background: var(--palm); border: 2px solid var(--palm-deep); border-radius: 12px; overflow: hidden; }
.stats div { padding: 9px 8px 8px; text-align: center; color: #a9d8cf; font-size: .8rem; font-weight: 700; border-left: 2px solid var(--palm-deep); }
.stats div:first-child { border-left: 0; }
.stats b { display: block; font-family: var(--board); font-size: 1.7rem; letter-spacing: .05em; line-height: 1.05; color: var(--sun); text-transform: uppercase; }
.ep { display: grid; grid-template-columns: 150px 1fr; gap: 14px; align-items: center; margin: 16px 28px 0; padding: 12px; border-radius: 14px; background: var(--blush); border: 2px solid var(--palm); }
.ep .frame { border-radius: 8px; overflow: hidden; border: 2px solid var(--palm); aspect-ratio: 16 / 10; background: #fff; }
.ep img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kick2 { font-size: .8rem; font-weight: 700; color: var(--flamingo-deep); }
.gname { font-family: var(--display); font-size: 1.32rem; line-height: 1.1; margin: 2px 0 3px; }
.etitle { font-weight: 700; font-size: .95rem; line-height: 1.3; }
.eblurb { font-size: .86rem; line-height: 1.4; color: var(--palm-soft); margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#ending .row { display: flex; gap: 10px; flex-wrap: wrap; padding: 18px 28px 24px; }

/* ---------- the title: a panel under the awning, the house alive beside it ---------- */
#title { position: fixed; inset: 0; z-index: 25; display: flex; pointer-events: none; transition: opacity .45s, transform .6s cubic-bezier(.6, 0, .3, 1); }
#title.hide { opacity: 0; transform: translateX(-60px); }
#title .tc { pointer-events: auto; width: min(540px, 46vw); display: flex; flex-direction: column; overflow: auto; background: var(--shell); border-right: 2px solid var(--palm); box-shadow: 7px 0 0 rgba(13, 74, 67, .92); }
#title.hide .tc { pointer-events: none; }
#title .in { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: clamp(12px, 3vh, 36px) clamp(22px, 3.2vw, 48px) calc(26px + var(--sb)) calc(clamp(22px, 3.2vw, 48px) + var(--sl)); }
#title .ff { display: inline-flex; align-self: flex-start; align-items: center; gap: 9px; color: var(--navy); font-weight: 700; font-size: .95rem; text-decoration: none; }
#title .ff .mark { width: 28px; height: 28px; border-radius: 7px; }
#title h1 { font-family: var(--display); font-weight: 400; font-size: min(clamp(5.2rem, 12.5vw, 10.5rem), 21vh); line-height: .84; letter-spacing: -.025em; color: var(--flamingo); text-shadow: .04em .045em 0 var(--palm); margin: clamp(12px, 3.4vh, 34px) 0 0 -.03em; }
#title .tag { font-family: var(--display); font-size: clamp(1.35rem, 2.3vw, 1.95rem); line-height: 1.12; margin: clamp(14px, 2.4vh, 24px) 0 0; }
#title .board { display: inline-flex; align-self: flex-start; align-items: center; gap: 10px; margin: clamp(14px, 2.6vh, 26px) 0 0; padding: 7px 9px 6px 12px; background: var(--palm); color: var(--shell); border: 2px solid var(--palm-deep); border-radius: 10px; box-shadow: 0 3px 0 var(--palm-deep); line-height: 1; }
#title .board > * { white-space: nowrap; }
#title .board .lbl { font-size: .76rem; font-weight: 700; color: #a9d8cf; }
#title .board .city { font-family: var(--board); font-weight: 700; font-size: 1.45rem; letter-spacing: .07em; text-transform: uppercase; padding-top: 2px; }
#title .board b { font-family: var(--board); font-size: 1.45rem; letter-spacing: .05em; color: var(--sun); background: var(--palm-deep); border-radius: 5px; padding: 4px 7px 2px; }
#title .board i { font-style: normal; font-family: var(--board); font-weight: 700; font-size: .84rem; letter-spacing: .09em; text-transform: uppercase; background: var(--lagoon); color: var(--palm-deep); border-radius: 4px; padding: 3px 6px 2px; }
#title .sub { font-size: 1.06rem; line-height: 1.5; max-width: 40ch; margin: clamp(10px, 2vh, 18px) 0 0; }
#title .go { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: clamp(14px, 2.8vh, 26px); }
#title .btn.primary { min-height: 60px; padding: 0 30px; font-size: 1.18rem; border-radius: 16px; border-width: 2.5px; box-shadow: 0 4px 0 var(--palm); }
#loadtext { font-size: .92rem; color: var(--palm-soft); }
#title .keys { margin: clamp(12px, 2.4vh, 22px) 0 0; font-size: .92rem; color: var(--palm-soft); }
#title .keys .key { background: var(--palm); color: var(--sun); margin-left: 6px; } #title .keys .key:first-child { margin-left: 0; }

/* ---------- smaller screens ---------- */
@media (max-height: 640px) and (min-width: 721px) { #title .keys { display: none !important; } #title .awning { margin-bottom: 4px; } }
@media (min-width: 1700px) { html { font-size: 18px; } }
@media (max-width: 960px) {
  #clock { top: calc(66px + var(--st)); }
  #toasts { top: calc(196px + var(--st)); }
}
@media (max-width: 720px) {
  #back span { display: none; } #back { padding: 0 10px; }
  #clock { width: min(372px, calc(100vw - 24px)); padding: 8px 11px 7px; }
  #clock .city { font-size: 1.6rem; } #clockTime { font-size: 1.7rem; } #clock .sub { display: none; } #clock .track { margin-bottom: 5px; }
  #toasts { left: 12px; right: 12px; width: auto; top: calc(164px + var(--st)); }
  #title .board { gap: 8px; padding-left: 10px; } #title .board .city, #title .board b { font-size: 1.22rem; } #title .board .lbl { font-size: .7rem; }
  .stats b { font-size: 1.16rem; } .stats div { padding-left: 4px; padding-right: 4px; }
  .toast b { font-size: 1.12rem; }
  .sheet > header, .lists, .how, .hrow { padding-left: 16px; padding-right: 16px; }
  .lists { grid-template-columns: 1fr; gap: 22px; }
  .how li { grid-template-columns: 1fr; }
  #ending .kick, #ending h2, #ending .line { margin-left: 16px; margin-right: 16px; }
  .stats, .ep { margin-left: 16px; margin-right: 16px; } #ending .row { padding-left: 16px; padding-right: 16px; }
  .ep { grid-template-columns: 96px 1fr; }
  #title { flex-direction: column; justify-content: flex-end; }
  #title.hide { transform: translateY(60px); }
  #title .tc { width: 100%; max-height: 78vh; border-right: 0; border-top: 2px solid var(--palm); border-radius: 22px 22px 0 0; box-shadow: 0 -6px 0 rgba(13, 74, 67, .92); }
  #title .in { flex: none; padding: 4px 20px calc(22px + var(--sb)); }
  #title h1 { font-size: clamp(4.4rem, 25vw, 6.6rem); margin-top: 10px; }
  #title .tag { font-size: 1.35rem; margin-top: 10px; } #title .board { margin-top: 14px; } #title .sub { font-size: 1rem; margin-top: 10px; }
  #title .go { margin-top: 14px; } #title .btn.primary { width: 100%; }
  #title .keys { margin-top: 10px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  #clock { top: calc(8px + var(--st)); transform: translateX(-50%) scale(.8); transform-origin: 50% 0; }
  #clock .sub { display: none; }
  .ib.list span { display: none; } .ib.list { padding: 0 8px 0 10px; }
  #toasts { top: calc(62px + var(--st)); width: 280px; left: auto; }
  #act { width: 90px; height: 90px; font-size: 1.3rem; bottom: calc(16px + var(--sb)); } #bark { width: 68px; height: 68px; right: calc(118px + var(--sr)); bottom: calc(14px + var(--sb)); } #shake { width: 62px; height: 62px; right: calc(30px + var(--sr)); bottom: calc(116px + var(--sb)); }
  #title { flex-direction: row; justify-content: flex-start; }
  #title .tc { width: min(430px, 56vw); max-height: none; border-radius: 0; border-top: 0; border-right: 2px solid var(--palm); box-shadow: 7px 0 0 rgba(13, 74, 67, .92); }
  #title .in { padding: 0 22px 12px calc(22px + var(--sl)); justify-content: center; flex: 1; }
  #title h1 { font-size: 4.3rem; margin-top: 4px; } #title .tag { font-size: 1.15rem; margin-top: 6px; } #title .board { margin-top: 8px; } #title .sub { font-size: .9rem; margin-top: 6px; } #title .go { margin-top: 8px; } #title .btn.primary { min-height: 48px; width: auto; }
  #title .keys { display: none !important; } #title .awning { margin-bottom: 10px; height: 22px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01s !important; transition-duration: .01s !important; } }
