/* Geenius Town (lane 1131). Two states of one page: the list (no script, no WebGL: the page as it is served) and the town (html.live:
   the canvas fills the screen, the list becomes a panel, a tapped resident gets a card). The build appends one colour rule per resident. */
@font-face { font-family: 'Bricolage'; src: url('/fonts/bricolage-grotesque-wdth-latin.woff2') format('woff2'); font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; }
@font-face { font-family: 'Geist'; src: url('/fonts/geist-latin.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --sky: #5BAAE8; --sky-low: #FFE7C6; --ink: #33261F; --ink-2: #6B574B; --paper: #FFF9EE; --line: rgba(74, 58, 51, .14); --go: #1F7A5C;
  --head: 'Bricolage', system-ui, sans-serif; --text: 'Geist', system-ui, sans-serif; --r: 18px;
  --shadow: 0 18px 44px -18px rgba(60, 40, 20, .45), 0 2px 6px rgba(60, 40, 20, .12);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; font: 400 16px/1.5 var(--text); color: var(--ink); background: linear-gradient(var(--sky) 0, #A9D8F5 34%, var(--sky-low) 78%, #CFE9B4 100%) fixed; }
h1, h2 { font-family: var(--head); font-stretch: 85%; letter-spacing: -.02em; margin: 0; line-height: 1.05; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 12px; border-radius: 10px; z-index: 9; }
.skip:focus { left: 8px; }

/* ---- the list: the whole story without the town ---- */
#town { display: none; }
.title { padding: clamp(28px, 7vw, 72px) 20px 0; text-align: center; color: #fff; text-shadow: 0 2px 14px rgba(20, 60, 110, .35); }
.title h1 { font-size: clamp(44px, 9vw, 92px); font-weight: 800; }
.title p { margin: 6px 0 0; font: 600 clamp(18px, 3.2vw, 26px)/1.2 var(--head); font-stretch: 90%; }
main { max-width: 1040px; margin: 0 auto; padding: 18px 20px 40px; }
.lead, .still { max-width: 46ch; margin: 10px auto; text-align: center; font-size: 18px; color: #fff; text-shadow: 0 1px 10px rgba(20, 60, 110, .4); }
.still { font-size: 14px; opacity: .92; }
#residents h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
#residents ul { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
#residents a { display: grid; grid-template-columns: 72px 1fr; grid-template-rows: auto 1fr; column-gap: 14px; align-items: center; height: 100%; padding: 14px 16px; text-decoration: none; background: var(--paper); border-radius: var(--r); box-shadow: var(--shadow); border-bottom: 5px solid var(--c, var(--go)); transition: transform .18s ease; }
#residents a:hover { transform: translateY(-3px); }
#residents img { grid-row: 1 / 3; width: 72px; height: 72px; }
.who b { font: 700 21px/1.1 var(--head); font-stretch: 88%; display: block; }
.who i { font-style: normal; font-size: 13px; color: var(--ink-2); }
.line { font-size: 14.5px; color: var(--ink-2); align-self: start; }
footer { text-align: center; padding: 0 20px 34px; font-size: 14px; }
footer a { display: inline-block; padding: 9px 16px; border-radius: 999px; background: rgba(255, 249, 238, .86); text-decoration: none; font-weight: 600; box-shadow: 0 2px 10px rgba(60, 40, 20, .14); }
footer a:hover { background: var(--paper); }
.go { display: inline-block; padding: 12px 20px; border-radius: 999px; background: var(--go); color: #fff; font: 700 16px/1 var(--head); text-decoration: none; }
.lost { text-align: center; padding-top: 22vh; color: #fff; }
.lost h1 { font-size: clamp(34px, 6vw, 60px); }

/* ---- the town ---- */
html.live, html.live body { height: 100%; overflow: hidden; overscroll-behavior: none; }
html.live #town { display: block; position: fixed; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
html.live .title { position: fixed; z-index: 2; top: max(16px, env(safe-area-inset-top)); left: max(18px, env(safe-area-inset-left)); padding: 0; text-align: left; pointer-events: none; }
html.live .title { text-shadow: 0 2px 0 rgba(51, 38, 31, .22), 0 4px 20px rgba(51, 38, 31, .4); }
html.live .title h1 { font-size: clamp(30px, 4.4vw, 54px); }
html.live .title p { font-size: clamp(15px, 1.7vw, 20px); margin-top: 2px; }
html.live main { position: fixed; z-index: 3; top: max(16px, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); margin: 0; padding: 0; max-width: none; display: flex; flex-direction: column; align-items: flex-end; pointer-events: none; }
html.live main > * { pointer-events: auto; }
html.live .lead, html.live .still { display: none; }
#who { font: 700 15px/1 var(--head); color: var(--ink); padding: 11px 16px; min-height: 44px; border: 0; border-radius: 999px; background: rgba(255, 249, 238, .9); box-shadow: 0 2px 10px rgba(60, 40, 20, .16); cursor: pointer; }
#who:hover { background: var(--paper); }
html.live #residents { display: none; margin-top: 10px; width: min(330px, calc(100vw - 32px)); max-height: calc(100dvh - 150px); overflow: auto; background: var(--paper); border-radius: var(--r); box-shadow: var(--shadow); padding: 8px; }
html.live #residents.open { display: block; }
html.live #residents ul { margin: 0; display: block; }
html.live #residents a { grid-template-columns: 40px 1fr; grid-template-rows: auto; padding: 7px 10px; box-shadow: none; background: none; border-bottom: 0; border-left: 4px solid var(--c, var(--go)); border-radius: 10px; }
html.live #residents a:hover { transform: none; background: rgba(74, 58, 51, .07); }
html.live #residents img { width: 40px; height: 40px; grid-row: auto; }
html.live #residents .who b { font-size: 16px; display: inline; margin-right: 6px; }
html.live #residents .line { display: none; }
html.live footer { position: fixed; z-index: 2; left: max(16px, env(safe-area-inset-left)); bottom: max(14px, env(safe-area-inset-bottom)); padding: 0; }
#hint { position: fixed; z-index: 2; left: 50%; bottom: max(64px, calc(env(safe-area-inset-bottom) + 58px)); transform: translateX(-50%); margin: 0; padding: 9px 16px; border-radius: 999px; background: rgba(51, 38, 31, .72); color: #fff; font-size: 14px; white-space: nowrap; pointer-events: none; transition: opacity .6s ease; }
#hint.gone { opacity: 0; }

#card { position: fixed; z-index: 4; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); width: min(360px, calc(100vw - 32px)); padding: 18px 18px 14px; background: var(--paper); border-radius: 22px; box-shadow: var(--shadow); border-top: 6px solid var(--c, var(--go)); animation: up .32s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes up { from { transform: translateY(18px); opacity: 0; } }
#card-face { float: right; width: 84px; height: 84px; margin: -6px -4px 4px 10px; }
#card-who { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
#card-name { font-size: 30px; font-weight: 800; margin-top: 2px; }
#card-line { margin: 8px 0 0; font-size: 16px; }
#card-doing { margin: 6px 0 0; font-size: 14px; color: var(--ink-2); }
.acts { margin: 14px 0 0; }
.acts .go { display: block; text-align: center; padding: 14px 18px; }
.nav { margin: 10px 0 0; display: flex; gap: 8px; justify-content: space-between; }
.nav button { min-height: 44px; min-width: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--ink); font: 600 14px/1 var(--text); cursor: pointer; }
.nav button:hover { background: rgba(74, 58, 51, .07); }
@media (max-width: 640px) {
  #card { left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); width: auto; padding: 14px 14px 10px; }
  #card-face { width: 64px; height: 64px; }
  #card-name { font-size: 25px; }
  #card-doing { display: none; }
  html.live.carded footer, html.live.carded #hint { display: none; }
}
@media (prefers-reduced-motion: reduce) { #card { animation: none; } #residents a, #hint { transition: none; } }

.r-goalmrr{--c:#4338CA}
.r-linkaloo{--c:#22D3EE}
.r-author{--c:#9A3412}
.r-prompt-verse{--c:#5B3FD9}
.r-mailaloo{--c:#1F5BE6}
.r-geenius-os{--c:#F28A3C}
.r-recaloo{--c:#C2255C}
.r-engagaloo{--c:#1F5BE6}
.r-video{--c:#6D28D9}
.r-careers{--c:#1D4ED8}
.r-goalaloo{--c:#15803D}
.r-sendaloo{--c:#2563EB}
