/* Wonderful Things. Paper, ink, sand and brass: a field notebook from the 1920s.
   Cormorant Garamond for titles, Jost for reading, IBM Plex Mono for reports and telegrams, Kalam for handwriting. */
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 300 700; font-display: swap; src: url(../fonts/cormorant-normal-300-700-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F; }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 300 700; font-display: swap; src: url(../fonts/cormorant-normal-300-700-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+1E00-1E9F; }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 300 700; font-display: swap; src: url(../fonts/cormorant-italic-300-700-latin.woff2) format('woff2'); }
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 300 600; font-display: swap; src: url(../fonts/jost-normal-300-600-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC; }
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 300 600; font-display: swap; src: url(../fonts/jost-normal-300-600-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+1E00-1E9F; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/plexmono-400-latin.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/plexmono-600-latin.woff2) format('woff2'); }
@font-face { font-family: 'Kalam'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/kalam-normal-400-latin.woff2) format('woff2'); }
@font-face { font-family: 'Kalam'; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/kalam-normal-700-latin.woff2) format('woff2'); }

:root { --ink: #1d2433; --ink2: #3b4560; --paper: #f6eedc; --paper2: #eadfc6; --sand: #d9b77a; --brass: #b8893a; --red: #c0392b; --good: #2e7d4f; --passive: #1565a8; --active: #b3541e; --night: #141a28;
  --serif: 'Cormorant Garamond', Georgia, serif; --sans: 'Jost', 'Segoe UI', system-ui, sans-serif; --mono: 'IBM Plex Mono', ui-monospace, 'Courier New', monospace; --hand: 'Kalam', 'Comic Sans MS', cursive; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overscroll-behavior: none; touch-action: pan-x pan-y; -webkit-tap-highlight-color: transparent; background: var(--night); color: var(--ink); font: 400 18px/1.5 var(--sans); -webkit-font-smoothing: antialiased; overflow: hidden; }
[hidden] { display: none !important; }
p { margin: 0; } h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.05; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(46px, 7vw, 84px); letter-spacing: -0.01em; } h2 { font-size: clamp(30px, 3.6vw, 44px); } h3 { font-size: 26px; }
.screen { position: fixed; inset: 0; overflow-y: auto; }
.loading { color: var(--paper); display: grid; place-items: center; height: 100%; font: 500 26px var(--serif); }
.eyebrow { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--brass); font-weight: 600; }
.lead { font-size: 19px; } .fine { font-size: 15px; color: var(--ink2); } .err { color: var(--red); font-size: 15px; } .err:empty { display: none; }
.sub { font: italic 500 26px var(--serif); color: var(--ink2); margin-top: -6px; }
b.pas, .pas { color: var(--passive); font-weight: 600; } b.act, .act { color: var(--active); font-weight: 600; }

.btn { font: 500 17px/1 var(--sans); padding: 13px 22px; border-radius: 999px; border: 2px solid var(--ink); cursor: pointer; background: var(--paper); color: var(--ink); transition: transform .12s, box-shadow .12s; }
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 0 rgba(29,36,51,.25); } .btn:active:not(:disabled) { transform: translateY(1px); box-shadow: none; }
.btn.primary { background: var(--ink); color: var(--paper); } .btn.ghost { background: transparent; } .btn.light { border-color: rgba(246,238,220,.7); color: var(--paper); background: rgba(20,26,40,.45); }
.btn.small { padding: 9px 15px; font-size: 15px; } .btn.big { font-size: 21px; padding: 17px 34px; } .btn:disabled { opacity: .45; cursor: default; }
.btn.ayuda { border-color: var(--brass); color: #7a5716; background: #fff6df; }
.btn:focus-visible, input:focus-visible, .tile:focus-visible, .opt:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---- the first page ---- */
.title-art { position: fixed; inset: 0; background: linear-gradient(90deg, rgba(20,26,40,.5), rgba(20,26,40,0) 60%), url("../art/title.webp") center / cover, linear-gradient(#3f6fb5, #f4d7a1); }
.title-art.dim { filter: brightness(.55) saturate(.9); }
.title-card { position: relative; width: min(600px, calc(100% - 32px)); margin: clamp(16px, 7vh, 80px) auto clamp(16px, 7vh, 80px) clamp(16px, 6vw, 90px); background: var(--paper); border-radius: 6px; padding: clamp(22px, 3.4vw, 40px); display: grid; gap: 14px; box-shadow: 0 0 0 1px #cdbb95, 0 24px 60px rgba(0,0,0,.45); }
.title-card::before { content: ""; position: absolute; inset: 7px; border: 1px solid #cdbb95; pointer-events: none; border-radius: 3px; }
.title-card.small { margin-left: auto; margin-right: auto; } .title-card.wide { width: min(860px, calc(100% - 32px)); margin-left: auto; margin-right: auto; }
.signin { display: grid; gap: 10px; padding: 14px; background: var(--paper2); border-radius: 6px; } .signin label { display: grid; gap: 4px; font-size: 15px; color: var(--ink2); }
input { font: 400 18px var(--sans); padding: 10px 12px; border: 2px solid var(--ink2); border-radius: 6px; background: #fff; color: var(--ink); }
.big-input { display: grid; gap: 6px; font: 500 22px var(--serif); } .big-input input { font: 700 30px var(--hand); border: 0; border-bottom: 3px solid var(--ink); border-radius: 0; background: transparent; padding: 4px 2px; }

/* ---- a film ---- */
.film { background: #000; overflow: hidden; } #film-video, #film-still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000 center / cover no-repeat; }
#film-still { animation: drift 14s linear both; } @keyframes vdrift { from { transform: scale(1); } to { transform: scale(1.08) translate(-1%, -.6%); } } @keyframes drift { from { transform: scale(1.02); } to { transform: scale(1.14) translate(-1.5%, -1%); } }
.film-shade { position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,.25), rgba(0,0,0,0) 22%, rgba(0,0,0,0) 62%, rgba(0,0,0,.82)); }
#film-words { position: absolute; left: 50%; bottom: 9vh; transform: translateX(-50%); width: min(900px, 92vw); text-align: center; font: 500 clamp(24px, 3.4vw, 40px)/1.25 var(--serif); color: #fff; text-shadow: 0 2px 12px #000, 0 0 2px #000; min-height: 2.5em; }
#film-words span { animation: rise .5s both; display: inline-block; } @keyframes rise { from { opacity: 0; transform: translateY(8px); } }
#film-skip { position: absolute; right: 18px; top: 16px; }

/* ---- a site ---- */
#s-world { overflow: hidden; background: #000; } #view { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hud { position: absolute; z-index: 3; color: var(--paper); text-shadow: 0 1px 6px rgba(0,0,0,.7); }
.hud.tl { left: 16px; top: 12px; display: grid; } .hud.tl b { font: 600 28px/1.05 var(--serif); } .hud.tl span { font-size: 15px; letter-spacing: .08em; }
.hud.tr { right: 14px; top: 12px; display: flex; gap: 10px; align-items: center; font-weight: 500; }
.coin { padding: 6px 14px; border-radius: 999px; background: rgba(20,26,40,.6); border: 1.5px solid var(--sand); color: #ffe7b0; } #hud-finds { padding: 6px 12px; border-radius: 999px; background: rgba(20,26,40,.6); }
.hud.help { left: 50%; bottom: 10px; transform: translateX(-50%); font-size: 15px; white-space: nowrap; background: rgba(20,26,40,.5); padding: 5px 14px; border-radius: 999px; }
#prompt { position: absolute; left: 50%; top: 60%; transform: translateX(-50%); z-index: 3; font: 600 22px var(--sans); color: #fff; background: rgba(20,26,40,.78); border: 2px solid var(--sand); padding: 8px 20px; border-radius: 999px; pointer-events: none; }
#arrow { position: absolute; z-index: 3; left: 50%; top: 6px; transform: translateX(-50%); display: grid; justify-items: center; gap: 2px; pointer-events: none; }
#compass { width: 124px; height: auto; filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)); }
#compass text { font: 700 12px var(--serif); fill: #3d2a0d; text-anchor: middle; } #compass text.cp-n { fill: #b3261c; font-size: 14px; }
#compass-dial, #arrow-icon { transform-origin: 60px 62px; }
#compass .cp-tip { animation: tip 1.4s ease-in-out infinite; } @keyframes tip { 50% { fill: #fff3c2; r: 5.2px; } }
#arrow-text { color: #fff7dd; font: 600 16px var(--sans); background: rgba(20,26,40,.72); border: 1.5px solid var(--sand); padding: 4px 16px; border-radius: 999px; white-space: nowrap; text-shadow: none; }
@media (max-width: 760px) { #arrow { top: 52px; } #compass { width: 84px; } #arrow-text { font-size: 14px; } }
@media (prefers-reduced-motion: reduce) { #compass .cp-tip { animation: none; } }
#talk { position: absolute; z-index: 5; left: 50%; bottom: 46px; transform: translateX(-50%); width: min(820px, calc(100% - 28px)); display: flex; gap: 16px; align-items: center; background: var(--paper); border-radius: 10px; padding: 14px 18px; box-shadow: 0 0 0 2px var(--ink), 0 14px 40px rgba(0,0,0,.5); animation: rise .25s both; }
#talk-face { width: 104px; height: 104px; object-fit: contain; object-position: bottom; flex: none; background: var(--paper2); border-radius: 8px; }
#talk div { flex: 1; display: grid; gap: 2px; } #talk-name { font: 700 22px var(--serif); color: var(--active); } #talk-text { font-size: 21px; line-height: 1.35; }

/* ---- a puzzle ---- */
.mini-bg { position: fixed; inset: 0; background: radial-gradient(ellipse at 50% 30%, #3a3324, #17130c 75%); }
.mini-wrap { position: relative; width: min(1100px, 100%); height: 100%; margin: 0 auto; padding: 14px clamp(10px, 2vw, 24px) 16px; display: grid; grid-template-rows: auto 1fr; gap: 12px; }
.mini-head { display: flex; gap: 14px; justify-content: space-between; align-items: flex-start; color: var(--paper); } .mini-head h2 { color: #ffe7b0; } .mini-head .lead { font-size: 21px; margin-top: 4px; }
.mini-tools { display: flex; gap: 8px; align-items: center; flex: none; } .mini-tools .btn.ghost { border-color: rgba(246,238,220,.6); color: var(--paper); }
.clock { font: 600 22px var(--mono); color: #ffe7b0; padding: 6px 12px; border-radius: 8px; background: rgba(0,0,0,.4); min-width: 76px; text-align: center; } .clock.out { color: #b9ad94; }
#mini-host { position: relative; min-height: 0; display: grid; place-items: center; }
#mini-host canvas { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: 0 0 0 3px #5a4a2c, 0 18px 50px rgba(0,0,0,.6); touch-action: none; cursor: crosshair; background: #2a2418; }
.mini-note { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); color: #ffe7b0; font-size: 18px; background: rgba(0,0,0,.55); padding: 6px 16px; border-radius: 999px; pointer-events: none; white-space: nowrap; }
.mini-side { display: grid; gap: 6px; align-content: start; color: var(--paper); font-size: 18px; } .mini-side li.done { text-decoration: line-through; color: #9fd3a8; } .mini-side ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.mini-row { display: flex; gap: 16px; align-items: stretch; justify-content: center; width: 100%; height: 100%; min-height: 0; } .mini-row > canvas { min-width: 0; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(90px, 150px)); gap: 12px; }
.card { aspect-ratio: 1; border-radius: 10px; border: 3px solid #6b5630; background: repeating-linear-gradient(45deg, #c9b58a, #c9b58a 8px, #bfa977 8px, #bfa977 16px); cursor: pointer; padding: 0; position: relative; overflow: hidden; }
.card img { position: absolute; inset: 8%; width: 84%; height: 84%; object-fit: contain; opacity: 0; transition: opacity .2s; } .card.up, .card.won { background: #efe2c2; } .card.up img, .card.won img { opacity: 1; } .card.won { border-color: var(--good); box-shadow: 0 0 0 3px rgba(46,125,79,.35); }
.choices4 { display: grid; grid-template-columns: repeat(4, minmax(90px, 170px)); gap: 14px; } .seal-big { width: min(240px, 34vw); aspect-ratio: 1; object-fit: contain; }
.print { aspect-ratio: 1; border-radius: 12px; border: 3px solid #6b5630; background: #b9ad94; cursor: pointer; padding: 10px; } .print img { width: 100%; height: 100%; object-fit: contain; filter: grayscale(1) contrast(.9) brightness(.9); }
.print.no { border-color: var(--red); opacity: .5; } .print.yes { border-color: var(--good); box-shadow: 0 0 0 4px rgba(46,125,79,.4); }
.mini-col { display: grid; gap: 16px; justify-items: center; color: var(--paper); font-size: 19px; text-align: center; }
.end-card { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(15,12,6,.72); z-index: 5; animation: rise .3s both; } .end-card > div { background: var(--paper); border-radius: 10px; padding: 26px 30px; display: grid; gap: 12px; justify-items: center; text-align: center; max-width: 520px; box-shadow: 0 0 0 2px var(--ink); }

/* ---- the discovery ---- */
#s-find { background: #0d0f16; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(340px, 1fr); }
.find-pic { background: #1b1f2b center / cover no-repeat; min-height: 40vh; animation: reveal 1.6s both; } @keyframes reveal { from { filter: brightness(2.2) blur(8px); transform: scale(1.06); } }
.find-card { background: var(--paper); padding: clamp(18px, 2.6vw, 34px); display: grid; gap: 14px; align-content: start; overflow-y: auto; }
#find-lines { display: grid; gap: 12px; } .say { display: flex; gap: 12px; align-items: flex-start; animation: rise .35s both; } .say img { width: 62px; height: 62px; object-fit: contain; object-position: bottom; background: var(--paper2); border-radius: 8px; flex: none; }
.say div { display: grid; } .say b.who { font: 700 18px var(--serif); color: var(--active); } .say p { font-size: 20px; line-height: 1.35; }
#find-words { display: grid; gap: 6px; padding: 12px 14px; background: var(--paper2); border-left: 4px solid var(--brass); border-radius: 4px; font-size: 17px; } #find-words b { font-family: var(--hand); font-size: 19px; } #find-words i { color: var(--ink2); }
.key { font-size: 15px; color: var(--ink2); }

/* ---- the report ---- */
.report-bg { position: fixed; inset: 0; background: linear-gradient(rgba(20,16,8,.55), rgba(20,16,8,.8)), url("../art/telegraph.webp") center / cover, #2a2418; }
.report-wrap { position: relative; width: min(1180px, 100%); min-height: 100%; margin: 0 auto; padding: clamp(10px, 2vw, 26px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 1fr); gap: 20px; align-items: start; }
.paper { background: #fbf6e9; padding: 22px 26px 26px; border-radius: 3px; box-shadow: 0 14px 40px rgba(0,0,0,.5); font-family: var(--mono); display: grid; gap: 12px; transform: rotate(-0.6deg); position: relative; }
.paper header { border-bottom: 2px solid var(--ink); padding-bottom: 10px; display: grid; gap: 2px; } .paper-top { font-size: 12px; letter-spacing: .14em; } .paper h2 { font: 700 30px var(--serif); } .paper-meta { font-size: 14px; color: var(--ink2); }
#paper-lines { margin: 0; padding-left: 28px; display: grid; gap: 10px; min-height: 250px; align-content: start; font-size: 17px; line-height: 1.4; }
#paper-lines li.wait { color: #b5ab95; } #paper-lines li.now { color: var(--ink2); } #paper-lines li.now::after { content: "▍"; animation: blink 1s steps(2) infinite; } @keyframes blink { 50% { opacity: 0; } }
#paper-lines li .pts { float: right; font-size: 13px; color: var(--good); margin-left: 8px; } #paper-lines li .pts.zero { color: var(--red); }
.paper-sign { font: 700 24px var(--hand); text-align: right; color: var(--ink2); min-height: 30px; }
.stamps { position: absolute; right: 18px; top: 14px; display: flex; gap: 6px; } .stamp { width: 58px; height: 58px; border-radius: 50%; border: 3px double var(--red); color: var(--red); display: grid; place-items: center; font: 700 11px var(--mono); transform: rotate(-12deg); animation: thump .35s both; text-align: center; line-height: 1; } @keyframes thump { from { transform: scale(2.4) rotate(-30deg); opacity: 0; } }
.desk { background: var(--paper); border-radius: 10px; padding: 20px 22px; display: grid; gap: 14px; box-shadow: 0 0 0 2px var(--ink), 0 14px 40px rgba(0,0,0,.5); position: sticky; top: 14px; }
.q-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; } .q-n { font: 600 14px var(--mono); letter-spacing: .1em; color: var(--ink2); }
.q-ask { font: 600 23px/1.2 var(--serif); } .tag { display: inline-block; font: 600 13px var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; background: var(--ink); color: var(--paper); }
.q-show { font: 400 22px/1.45 var(--mono); padding: 14px 16px; background: #fff; border: 2px solid var(--ink); border-radius: 8px; } .gap { display: inline-block; min-width: 86px; border-bottom: 3px solid var(--red); text-align: center; color: var(--red); font-weight: 600; margin: 0 4px; }
.opts { display: flex; flex-wrap: wrap; gap: 10px; } .opts.long { display: grid; }
.opt { font: 500 20px var(--mono); padding: 12px 18px; border-radius: 10px; border: 2px solid var(--ink); background: #fff; cursor: pointer; text-align: left; color: var(--ink); }
.opt:hover:not(:disabled) { background: #fff6df; } .opt.no { border-color: var(--red); color: var(--red); text-decoration: line-through; opacity: .6; } .opt.yes { border-color: var(--good); background: #e4f3e8; color: var(--good); }
.tiles { display: flex; flex-wrap: wrap; gap: 8px; min-height: 52px; } .tile { font: 500 19px var(--mono); padding: 10px 14px; border-radius: 8px; border: 2px solid var(--ink); background: #fff8e6; cursor: pointer; color: var(--ink); box-shadow: 0 3px 0 rgba(29,36,51,.3); }
.tiles.built { padding: 10px; background: #fff; border: 2px dashed var(--ink2); border-radius: 8px; min-height: 66px; align-items: center; } .tiles.built:empty::before { content: attr(data-empty); color: #a79f8c; font: 400 17px var(--sans); }
.word { font: 500 22px var(--mono); padding: 4px 6px; border: 2px solid transparent; border-radius: 6px; background: transparent; cursor: pointer; color: var(--ink); } .word:hover { border-color: var(--red); } .word.bad { color: var(--red); text-decoration: line-through; border-color: var(--red); } .word.ok { color: #9b9484; }
.why { padding: 12px 14px; border-radius: 8px; background: #fbe9e6; border-left: 5px solid var(--red); font-size: 18px; animation: rise .25s both; } .why.good { background: #e4f3e8; border-color: var(--good); }
.why .who { display: flex; gap: 10px; align-items: center; margin-bottom: 4px; font: 700 17px var(--serif); color: var(--red); } .why img { width: 44px; height: 44px; object-fit: contain; }
.telegram { background: #f3e6b8; border: 2px solid #8a7335; padding: 16px 18px; font: 600 17px/1.6 var(--mono); letter-spacing: .04em; text-transform: uppercase; border-radius: 3px; } .telegram small { display: block; font-size: 12px; letter-spacing: .18em; color: #7a6530; margin-bottom: 6px; }
.note-card { display: grid; gap: 8px; } .note-card .ex { font: 400 19px/1.4 var(--mono); padding: 6px 12px; background: #fff; border-left: 4px solid var(--passive); border-radius: 4px; } .note-es { font-size: 16px; color: var(--ink2); padding: 10px 12px; background: #fff6df; border-radius: 6px; display: grid; gap: 4px; }
.ayuda-box { padding: 10px 14px; background: #fff6df; border: 2px solid var(--brass); border-radius: 8px; font-size: 17px; color: #5d4411; }

/* ---- the newspaper ---- */
.press-bg { position: fixed; inset: 0; background: radial-gradient(ellipse at center, #4a3d28, #17130c); }
.news { position: relative; width: min(880px, calc(100% - 24px)); margin: clamp(10px, 4vh, 40px) auto; background: #efe6d0; padding: clamp(18px, 3vw, 40px); box-shadow: 0 20px 60px rgba(0,0,0,.6); display: grid; gap: 12px; color: #1a1712; animation: paper-in .9s cubic-bezier(.2,.8,.2,1) both; }
@keyframes paper-in { from { transform: rotate(-200deg) scale(.1); opacity: 0; } }
.news-name { font: 700 clamp(40px, 6.4vw, 76px)/1 var(--serif); text-align: center; letter-spacing: .01em; border-bottom: 4px double #1a1712; padding-bottom: 8px; }
.news-line { display: flex; justify-content: space-between; font: 500 13px var(--mono); letter-spacing: .1em; text-transform: uppercase; border-bottom: 1px solid #1a1712; padding-bottom: 6px; }
.news h2 { font: 700 clamp(30px, 4.6vw, 54px)/1.02 var(--serif); text-align: center; } .news h2 .me { color: var(--red); }
.news-body { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; align-items: start; } .news-body img { width: 100%; filter: grayscale(1) sepia(.25) contrast(1.05); border: 1px solid #1a1712; }
.news-body p { font: 400 19px/1.5 var(--serif); text-align: justify; } .news-body .me { font-weight: 700; background: #ffe9a8; padding: 0 3px; } .news small { font: 500 13px var(--mono); color: #4a4334; }

/* ---- sheets ---- */
#veil { position: fixed; inset: 0; z-index: 20; background: rgba(10,12,20,.7); display: grid; place-items: center; padding: 14px; overflow-y: auto; }
.sheet { width: min(700px, 100%); max-height: calc(100vh - 28px); overflow-y: auto; background: var(--paper); border-radius: 10px; padding: clamp(18px, 3vw, 32px); display: grid; gap: 14px; box-shadow: 0 0 0 2px var(--ink), 0 24px 60px rgba(0,0,0,.5); animation: rise .25s both; } .sheet.wide { width: min(980px, 100%); }
.tabs { display: flex; gap: 8px; border-bottom: 2px solid var(--ink); } .tab { font: 600 17px var(--sans); padding: 9px 16px; border: 2px solid var(--ink); border-bottom: 0; border-radius: 8px 8px 0 0; background: var(--paper2); cursor: pointer; color: var(--ink); } .tab.on { background: var(--ink); color: var(--paper); }
.nb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; } .nb-card { background: #fff; border: 1.5px solid #cdbb95; border-radius: 6px; padding: 10px; display: grid; gap: 6px; font-size: 16px; } .nb-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 4px; } .nb-card b { font: 700 20px var(--serif); }
.nb-report { font: 400 15px/1.5 var(--mono); background: #fbf6e9; padding: 12px 14px 12px 32px; border: 1px solid #cdbb95; margin: 0; } .verbs { columns: 3; font: 400 15px/1.7 var(--mono); } .verbs b { color: var(--passive); }
.board ol { margin: 4px 0 0; padding-left: 26px; } .board li.me { font-weight: 700; color: var(--active); }
/* the report card (js/card.js); the PDF is drawn on its own in the same layout */
.sheet.rc { gap: 12px; }
.rc-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; border-bottom: 3px double var(--ink); padding-bottom: 10px; }
.rc-who { display: grid; justify-items: end; text-align: right; } .rc-name { font: 700 30px/1.1 var(--hand); color: var(--red); }
.rc-sites { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.rc-site { background: var(--paper2); border: 1px solid #cdbb95; border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.rc-site h3 { font-size: 22px; } .rc-site ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 9px; } .rc-site li { display: grid; gap: 4px; font-size: 16px; }
.rc-stamps { display: flex; gap: 6px; } .rc-stamps i { width: 17px; height: 17px; border-radius: 50%; border: 2px dashed #cdbb95; } .rc-stamps i.on { border: 4px double var(--red); }
.rc-sum { font-weight: 600; border-top: 1px solid #cdbb95; padding-top: 6px; margin-top: auto; }
.rc-total { font: 600 24px var(--serif); text-align: center; }
.rc-skill { display: grid; grid-template-columns: 1fr auto 110px; gap: 14px; align-items: center; padding: 8px 0; border-top: 1px solid #cdbb95; }
.rc-skill > div { display: grid; } .rc-skill.off { opacity: .6; } .rc-word { font-weight: 600; }
.rc-bar { display: flex; gap: 4px; } .rc-bar i { width: 26px; height: 14px; border-radius: 3px; border: 1.5px solid #cdbb95; } .rc-bar i.on { background: var(--passive); border-color: var(--passive); }
.rc-note { font: 400 20px/1.4 var(--hand); display: grid; gap: 4px; } .rc-sign { color: var(--red); font-weight: 700; text-align: right; }
@media (max-width: 640px) { .rc-sites { grid-template-columns: 1fr; } .rc-skill { grid-template-columns: 1fr auto; } .rc-word { grid-column: 2; } .rc-head { flex-direction: column; align-items: start; } .rc-who { justify-items: start; text-align: left; } }
#toast { position: fixed; left: 50%; top: 18px; transform: translateX(-50%); z-index: 30; background: var(--ink); color: var(--paper); padding: 10px 20px; border-radius: 999px; font-size: 17px; box-shadow: 0 8px 24px rgba(0,0,0,.4); animation: rise .25s both; }
.credits { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: 16px; } .credits dt { font: 700 18px var(--serif); } .credits dd { margin: 0; }

@media (max-width: 860px) { #s-find, .report-wrap, .news-body { grid-template-columns: 1fr; } .desk { position: static; } .hud.help { display: none; } .cards { grid-template-columns: repeat(3, 1fr); } .choices4 { grid-template-columns: repeat(2, 1fr); } .title-card { margin-left: auto; margin-right: auto; } .mini-row { flex-direction: column; } .verbs { columns: 2; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01s !important; transition: none !important; } }

/* the report, second version: the five parts of a report, and question styles the child knows from English books */
#paper-lines { list-style: none; padding-left: 0; }
#paper-lines li small { display: block; font: 600 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--brass); margin-bottom: 1px; }
#paper-lines li.wait small { color: #c9bfa8; }
.q-given { font: 400 21px/1.4 var(--mono); padding: 10px 14px; border-left: 5px solid var(--brass); background: #fff8e6; border-radius: 0 8px 8px 0; margin: 0; }
.q-question { font: 600 21px/1.3 var(--serif); margin: 0; }
.q-hint { font: 600 18px var(--mono); color: var(--ink2); white-space: nowrap; }
.q-input { font: 600 22px var(--mono); width: 150px; max-width: 100%; padding: 4px 10px; border: 0; border-bottom: 3px solid var(--red); background: #fff8e6; color: var(--ink); text-align: center; border-radius: 6px 6px 0 0; margin: 2px 4px; }
.q-input.mid { width: 230px; }
.q-input.wide { width: 100%; text-align: left; margin: 8px 0 0; }
.q-input.bad { background: #fde8e4; } .q-input.ok { border-color: var(--good); color: var(--good); background: #e4f3e8; } .q-input.shown { border-color: var(--ink2); color: var(--ink2); }
.gap.ok { color: var(--good); border-color: var(--good); }
.opts.abc { display: grid; gap: 8px; } .opts.abc .opt { display: flex; gap: 12px; align-items: baseline; }
.opt .letter { flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--paper); font: 700 15px var(--mono); }
.opt.yes .letter { background: var(--good); } .opt.no .letter { background: var(--red); }
.opts.box { padding: 12px; border: 2px dashed var(--ink2); border-radius: 10px; background: #fffdf6; justify-content: center; }

/* the real photograph of a find: a print laid over the painting */
.find-pic { position: relative; display: grid; place-items: center; overflow: hidden; }
#find-real { margin: 0; position: relative; max-width: min(78%, 620px); background: #fbf7ec; padding: 12px 12px 10px; border-radius: 3px; box-shadow: 0 2px 0 #d8cfb8, 0 22px 50px rgba(0,0,0,.6); transform: rotate(-1.6deg); animation: print .55s cubic-bezier(.2,.9,.3,1.15) both; }
#find-real[hidden] { display: none; }
@keyframes print { from { opacity: 0; transform: translateY(-40px) rotate(5deg) scale(1.12); } }
#find-real img { display: block; max-width: 100%; max-height: 58vh; width: auto; height: auto; margin: 0 auto; background: #222; }
#find-real figcaption { display: grid; gap: 2px; padding-top: 8px; } #find-real-say { font: 600 19px/1.25 var(--hand); color: var(--ink); } #find-real small { font-size: 12px; color: var(--ink2); }
.real-tag { position: absolute; left: -10px; top: -14px; z-index: 1; font: 700 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; background: var(--red); color: #fff; padding: 4px 10px; border-radius: 3px; transform: rotate(-3deg); box-shadow: 0 3px 8px rgba(0,0,0,.35); }
.say.real-say { border-left: 4px solid var(--red); padding-left: 12px; } .say.real-say b.who { color: var(--red); }
.nb-real { display: grid; grid-template-columns: 74px 1fr; gap: 8px; align-items: center; margin-top: 6px; padding-top: 6px; border-top: 1px dashed #cdbf9f; } .nb-real img { width: 74px; height: 56px; aspect-ratio: auto; border-radius: 0; object-fit: cover; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); } .nb-real span { font-size: 13px; line-height: 1.25; color: var(--ink2); }
@media (prefers-reduced-motion: reduce) { #find-real { animation: none; } }
@media (max-width: 760px) { #find-real { max-width: 88%; } #find-real img { max-height: 30vh; } }
.credit-photos { margin: 0; padding-left: 20px; display: grid; gap: 3px; font-size: 15px; } .credit-photos a { color: var(--active); }

/* the download of the game's files, on the first page */
.keep { display: grid; gap: 6px; justify-items: start; padding: 10px 12px; background: var(--paper2); border-left: 4px solid var(--brass); border-radius: 4px; }
.keep[hidden] { display: none; } .keep .fine { margin: 0; }
.keep-bar { width: 100%; height: 12px; border-radius: 999px; background: #e3d6b8; overflow: hidden; border: 1px solid #cdbb95; } .keep-bar[hidden] { display: none; }
.keep-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #c9983f, #e9c46a); border-radius: 999px; transition: width .25s; }
.keep.done { border-left-color: var(--good); }

/* ---- phones ---- */
/* a phone held upright */
@media (max-width: 640px) {
  .hud.tl { display: none; } .hud.tr { left: 8px; right: 8px; top: 8px; gap: 6px; justify-content: flex-end; flex-wrap: wrap; } .hud.tr .btn.small { padding: 6px 10px; font-size: 13px; } .coin, #hud-finds { padding: 5px 10px; font-size: 13px; }
  #arrow { top: 50px; }
  #talk { bottom: 12px; gap: 10px; padding: 10px 12px; flex-wrap: wrap; } #talk-face { width: 64px; height: 64px; } #talk-text { font-size: 18px; } #talk-name { font-size: 19px; } #talk div { min-width: 60%; } #talk-next { margin-left: auto; }
  .mini-wrap { height: auto; min-height: 100%; grid-template-rows: auto auto; --mini-top: 250px; } #mini-host { place-items: start center; }
  .mini-head { display: grid; gap: 6px; } .mini-tools { order: -1; justify-self: end; } .mini-head h2 { font-size: 28px; } .mini-head .lead { font-size: 18px; } .mini-head .eyebrow { display: none; }
  .cards { width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .mini-note { white-space: normal; text-align: center; width: 90%; font-size: 16px; }
  #desk { order: -1; padding: 14px; } #paper-lines { min-height: 0; } .q-ask { font-size: 20px; } .q-show { font-size: 19px; padding: 10px 12px; } .opt { font-size: 18px; padding: 10px 12px; } .q-input { font-size: 19px; }
  .find-pic { min-height: 36vh; } .say p { font-size: 18px; }
  .sub { font-size: 21px; }
}
/* a phone on its side: little height */
@media (max-height: 520px) and (min-width: 560px) {
  .title-card { margin-top: 8px; margin-bottom: 8px; padding: 16px 22px; gap: 8px; } .title-card h1 { font-size: 36px; } .sub { font-size: 18px; margin-top: -4px; } .title-card .lead { font-size: 16px; }
  .hud.tl b { font-size: 20px; } .hud.tl span { font-size: 12px; } .hud.tr { top: 8px; gap: 6px; } .hud.tr .btn.small { padding: 6px 10px; font-size: 13px; } .coin, #hud-finds { padding: 5px 10px; font-size: 13px; }
  #arrow { top: 2px; } #compass { width: 74px; } #arrow-text { font-size: 13px; padding: 2px 12px; }
  #talk { bottom: 8px; padding: 8px 12px; } #talk-face { width: 64px; height: 64px; } #talk-text { font-size: 18px; }
  .mini-wrap { padding: 8px 12px; gap: 6px; --mini-top: 104px; } .mini-head .eyebrow { display: none; } .mini-head h2 { font-size: 22px; } .mini-head .lead { font-size: 15px; margin: 0; } .mini-tools .btn.small { padding: 5px 10px; font-size: 13px; } .clock { font-size: 15px; }
  .mini-row { flex-direction: row; } .mini-side { font-size: 15px; overflow-y: auto; max-height: calc(100dvh - 104px); } .mini-col { gap: 8px; font-size: 16px; }
  .cards { width: min(100%, calc((100dvh - 110px) * 3)); grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; } .mini-note { font-size: 14px; bottom: 2px; }
  #s-find { grid-template-columns: 1fr 1fr; } .find-card { padding: 12px 16px; gap: 8px; } .find-card h2 { font-size: 26px; } .say p { font-size: 16px; } .say img { width: 44px; height: 44px; } #find-real { max-width: 88%; padding: 8px 8px 6px; } #find-real img { max-height: 52vh; } #find-real-say { font-size: 15px; }
  .report-wrap { grid-template-columns: minmax(0, .8fr) minmax(300px, 1.2fr); gap: 10px; padding: 8px; } #desk { order: 0; position: sticky; top: 8px; padding: 12px 14px; gap: 8px; max-height: calc(100dvh - 16px); overflow-y: auto; }
  .paper { padding: 12px 14px; } .paper h2 { font-size: 22px; } #paper-lines { font-size: 14px; gap: 6px; min-height: 0; } .q-ask { font-size: 18px; } .q-show { font-size: 17px; padding: 8px 12px; } .opt { font-size: 16px; padding: 7px 12px; } .q-input { font-size: 17px; }
  .news { margin: 8px auto; padding: 14px 20px; } .news-body { grid-template-columns: 1.1fr 1fr; }
}
/* a phone on its side: the puzzles with a picture and buttons under it keep both on the screen */
@media (max-height: 520px) and (min-width: 560px) {
  .mini-wrap { height: auto; min-height: 100%; }
  .mini-col { --mini-top: 190px; gap: 6px; } .mini-col .actions { margin: 0; }
  .seal-big { width: min(130px, 30dvh); } .choices4 { grid-template-columns: repeat(4, minmax(56px, 24dvh)); gap: 8px; }
}

/* a phone held upright: please turn it */
#turn { position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 24px; text-align: center; background: radial-gradient(ellipse at 50% 40%, #2b3550, #0d0f16 75%); color: var(--paper); }
#turn[hidden] { display: none; }
#turn h2 { font: 700 34px/1.1 var(--serif); color: #ffe7b0; } #turn p { font-size: 19px; max-width: 300px; margin: 0; } #turn .turn-es { font-style: italic; color: #c9bfa8; font-size: 17px; }
.turn-phone { width: 150px; height: 150px; }
.turn-body { transform-origin: 60px 60px; animation: turn-it 2.6s ease-in-out infinite; }
.turn-arrow { animation: turn-arrow 2.6s ease-in-out infinite; }
@keyframes turn-it { 0%, 20% { transform: rotate(0deg); } 50%, 80% { transform: rotate(-90deg); } 100% { transform: rotate(0deg); } }
@keyframes turn-arrow { 0%, 15% { opacity: 1; } 45%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .turn-body { animation: none; transform: rotate(-90deg); } .turn-arrow { animation: none; } }

/* buttons and taps: no double-tap zoom, no grey flash; screens that scroll do not bounce the page */
button, .btn, .opt, .tile, .word, .card, .pick { touch-action: manipulation; } .screen { overscroll-behavior: contain; }

/* the two sticks on a touch screen: walk on the left, look on the right; the use button sits above the right stick */
.stick { position: absolute; bottom: 26px; width: 136px; height: 136px; border-radius: 50%; background: radial-gradient(circle, rgba(20,26,40,.18), rgba(20,26,40,.42)); border: 2px solid rgba(246,238,220,.55); z-index: 4; touch-action: none; transition: border-color .15s, background .15s; }
.stick[hidden] { display: none; } .stick.on { border-color: #ffe7b0; background: radial-gradient(circle, rgba(20,26,40,.25), rgba(20,26,40,.55)); }
#pad { left: 22px; } #look { right: 22px; }
.stick i { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px; border-radius: 50%; background: rgba(246,238,220,.85); box-shadow: 0 3px 10px rgba(0,0,0,.35); pointer-events: none; }
.stick.on i { background: #ffe7b0; }
.stick b { position: absolute; left: 50%; top: 100%; transform: translate(-50%, 4px); font: 600 12px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: rgba(246,238,220,.85); text-shadow: 0 1px 4px rgba(0,0,0,.8); pointer-events: none; }
@media (max-height: 520px) and (min-width: 560px) {
  .stick { width: 108px; height: 108px; bottom: 26px; } #pad { left: 16px; } #look { right: 16px; } .stick i { width: 44px; height: 44px; margin: -22px; } .stick b { font-size: 10px; transform: translate(-50%, 2px); }
  .hud.help { display: none; }
}

/* Interact (the same as E): above the Look stick. Dim when there is nothing to use; it glows and pulses when there is. */
.act { position: absolute; right: 44px; bottom: 196px; z-index: 4; width: 76px; height: 76px; border-radius: 50%; padding: 0; display: grid; place-items: center; cursor: pointer; touch-action: manipulation;
  border: 2px solid rgba(246,238,220,.45); background: rgba(20,26,40,.42); color: rgba(246,238,220,.5); transition: background .2s, color .2s, border-color .2s, transform .1s; }
.act[hidden] { display: none; } .act svg { width: 40px; height: 40px; }
.act b { position: absolute; left: 50%; top: 100%; transform: translate(-50%, 4px); font: 600 12px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: rgba(246,238,220,.7); text-shadow: 0 1px 4px rgba(0,0,0,.8); white-space: nowrap; pointer-events: none; }
.act.ready { border-color: #fff3c2; background: radial-gradient(circle at 40% 35%, #ffe9a6, #e2a83a 70%); color: #3d2a0d; animation: act-glow 1.3s ease-in-out infinite; }
.act.ready b { color: #ffe7b0; }
.act.ready:active { transform: scale(.92); }
@keyframes act-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,220,130,.75), 0 0 16px 4px rgba(255,196,80,.55); } 50% { box-shadow: 0 0 0 12px rgba(255,220,130,0), 0 0 30px 12px rgba(255,196,80,.85); } }
@media (prefers-reduced-motion: reduce) { .act.ready { animation: none; box-shadow: 0 0 24px 8px rgba(255,196,80,.75); } }
@media (max-height: 520px) and (min-width: 560px) { .act { width: 62px; height: 62px; right: 38px; bottom: 156px; } .act svg { width: 32px; height: 32px; } .act b { font-size: 10px; transform: translate(-50%, 2px); } }
