@font-face { font-family: 'Wide'; src: url('assets/fonts/archivo-var.ttf') format('truetype'); font-weight: 100 900; font-stretch: 62% 125%; }
@font-face { font-family: 'Dot'; src: url('assets/fonts/vt323.ttf') format('truetype'); }
@font-face { font-family: 'Hand'; src: url('assets/fonts/caveat.woff2') format('woff2'); font-weight: 400 700; }

:root { --ink: #1E1E1E; --paper: #EEEDE6; --orange: #FF6A1A; --lime: #A8E05F; --lilac: #9B93FF; --pink: #FF7FB0; --yellow: #F2C230; --sea: #5BA8FF; }
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: #0e0e0e; overflow: hidden; font-family: 'Wide', system-ui, sans-serif; }

/* The whole app is laid out on a 1080x1920 stage and scaled to the phone, so every screen
   matches the exported cards pixel for pixel. */
#viewport { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; }
#stage { position: relative; width: 1080px; height: 1920px; transform-origin: center; flex: none; overflow: hidden; background: var(--ink); }

.card, .screen { position: absolute; inset: 0; overflow: hidden; }
.a { position: absolute; }
.wide { font-weight: 900; font-stretch: 125%; letter-spacing: -.025em; line-height: .92; }
.mid { font-weight: 700; font-stretch: 112%; }
.body { font-weight: 500; font-stretch: 100%; }
.dot { font-family: 'Dot', monospace; letter-spacing: .04em; line-height: 1; }
.bar { display: inline-block; padding: 4px 18px 10px; line-height: .95; }
.grain { position: absolute; inset: 0; background: url('assets/grain.png'); mix-blend-mode: overlay; opacity: .55; pointer-events: none; }

/* controls */
.btn { position: absolute; left: 50px; right: 50px; height: 116px; border-radius: 60px; display: flex; align-items: center; justify-content: center;
       font-weight: 700; font-stretch: 112%; font-size: 42px; cursor: pointer; border: none; }
.btn.light { background: #fff; color: var(--ink); }
.btn.dark { background: var(--ink); color: #fff; }
.btn[disabled] { opacity: .35; pointer-events: none; }
.link { position: absolute; left: 0; right: 0; text-align: center; font-weight: 700; font-stretch: 112%; font-size: 34px; cursor: pointer; }
.opt { position: relative; border: 4px solid #CFCBC0; background: #fff; border-radius: 26px; padding: 24px 90px 26px 32px; margin-bottom: 18px; cursor: pointer; }
.dark .opt { background: transparent; border-color: #555; }
.opt .t { font-weight: 900; font-stretch: 125%; letter-spacing: -.02em; font-size: 46px; line-height: 1.02; color: var(--ink); }
.dark .opt .t { color: #fff; }
.opt .s { font-weight: 500; font-size: 30px; margin-top: 8px; opacity: .75; color: var(--ink); }
.dark .opt .s { color: #fff; }
.opt.on { border-color: var(--acc, var(--yellow)); background: var(--acc, var(--yellow)); }
.opt.on .t, .opt.on .s { color: var(--ink); }
.opt.on::after { content: '✓'; position: absolute; right: 30px; top: 26px; font-weight: 900; font-size: 46px; color: var(--ink); }
.chip { display: inline-block; padding: 18px 28px; border-radius: 40px; margin: 0 14px 16px 0; font-weight: 900; font-stretch: 125%; letter-spacing: -.02em;
        font-size: 40px; border: 4px solid #555; color: #fff; cursor: pointer; }
.chip.on { background: var(--acc); border-color: var(--acc); color: var(--ink); }
.field { width: 100%; font: 500 40px 'Wide', sans-serif; padding: 28px 34px; border-radius: 30px; border: 4px solid #555; background: transparent; color: #fff; outline: none; }
.light .field, .field.light { border-color: var(--ink); background: #fff; color: var(--ink); }
.tile { position: relative; height: 270px; border-radius: 26px; background: #2A2A2A; border: 4px solid; padding: 26px; cursor: pointer; }
.tile .t { font-weight: 900; font-stretch: 125%; font-size: 38px; line-height: 1.02; color: #fff; letter-spacing: -.02em; }
.tile .s { position: absolute; left: 26px; bottom: 22px; font-size: 28px; color: #bbb; font-weight: 500; }
.tile.on { background: var(--acc); }
.tile.on .t, .tile.on .s { color: var(--ink); }
.tile.on::after { content: '✓'; position: absolute; right: 22px; top: 16px; font-weight: 900; font-size: 44px; color: var(--ink); }
.pic { position: relative; width: 300px; height: 300px; border-radius: 20px; overflow: hidden; border: 6px solid transparent; cursor: pointer; }
.pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pic.on { border-color: var(--yellow); }
.pic.on::after { content: '✓'; position: absolute; right: 12px; top: 10px; width: 56px; height: 56px; border-radius: 50%; background: var(--yellow); color: var(--ink);
                 font-weight: 900; font-size: 32px; display: flex; align-items: center; justify-content: center; }
.pic .notme { position: absolute; right: 10px; top: 10px; padding: 8px 16px; border-radius: 30px; background: rgba(30,30,30,.82); color: #fff;
               font-weight: 700; font-size: 24px; cursor: pointer; }
.pic .isyou { position: absolute; left: 10px; top: 10px; padding: 6px 14px; border-radius: 30px; background: var(--yellow); color: var(--ink);
              font-weight: 700; font-size: 22px; pointer-events: none; }
.pic .by { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 10px; background: rgba(30,30,30,.75); color: #fff;
           font-family: 'Dot', monospace; font-size: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.err { color: #FF8A7A; font-weight: 500; font-size: 34px; }

/* story player */
.player-ui { position: absolute; inset: 0; z-index: 5; }
.player-ui .tap { position: absolute; top: 180px; bottom: 300px; width: 50%; }
.player-ui .tap.prev { left: 0; } .player-ui .tap.next { right: 0; }
.segs { position: absolute; left: 40px; right: 40px; top: 44px; display: flex; gap: 8px; z-index: 6; }
.segs i { flex: 1; height: 8px; border-radius: 4px; background: rgba(255,255,255,.28); overflow: hidden; position: relative; }
.segs i b { position: absolute; inset: 0; background: #fff; transform-origin: left; transform: scaleX(0); }
.segs.light i { background: rgba(30,30,30,.22); } .segs.light i b { background: var(--ink); }
.segs i.done b { transform: scaleX(1); }
.segs i.now b { animation: fill var(--dur, 5s) linear forwards; }
.paused .segs i.now b { animation-play-state: paused; }
@keyframes fill { to { transform: scaleX(1); } }
.share-pill { position: absolute; left: 50%; transform: translateX(-50%); bottom: 160px; padding: 26px 54px; border-radius: 60px; font-weight: 700;
              font-stretch: 110%; font-size: 34px; cursor: pointer; z-index: 7; border: none; }
.spinner { width: 160px; height: 160px; border-radius: 50%; border: 18px solid #333; border-top-color: var(--orange); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pic.on .notme { top: 78px; }
/* card motion is GSAP now (film.js): entrances in the player, the whole film in film.html */
/* guess who (people card): tap an option, the answer lights up and the reveal line appears */
.guess-opt { display: inline-block; margin: 0 16px 16px 0; padding: 12px 24px 16px; border-radius: 40px; border: 4px solid var(--ink);
             font-weight: 900; font-stretch: 125%; font-size: 38px; letter-spacing: -.02em; color: var(--ink); cursor: pointer; }
.guess-reveal { visibility: hidden; }
.revealed .guess-reveal { visibility: visible; }
.revealed .guess-opt.right { background: var(--yellow); border-color: var(--yellow); }
.revealed .guess-opt:not(.right) { opacity: .3; }
/* the hero badge: their photo (or the island sticker) riding along the story progress */
.hero { position: absolute; top: 18px; width: 64px; height: 64px; margin-left: -32px; border-radius: 50%; border: 5px solid #fff; z-index: 8;
        background: var(--orange) center/cover; box-shadow: 0 6px 16px rgba(0,0,0,.35); pointer-events: none; }
.hero.ink { border-color: var(--ink); }
.hero.sticker { border: none; border-radius: 0; background-size: contain; background-repeat: no-repeat; box-shadow: none; }
@keyframes heroLand { to { left: 540px; top: 880px; width: 150px; height: 150px; margin-left: -75px; } }
.revealed .guess-opt.picked:not(.right) { opacity: 1; background: #fff; text-decoration: line-through; }

/* ---------- the Village Wrap: a cream paper archive (serif + mono captions, black-and-white plates) ---------- */
@font-face { font-family: 'Mono'; src: url('assets/fonts/jetbrains-mono.ttf') format('truetype'); }
.serif { font-family: 'Iowan Old Style', 'Charter', 'Georgia', 'Noto Serif', serif; font-weight: 400; letter-spacing: -.01em; line-height: 1.02; }
.mono { font-family: 'Mono', ui-monospace, Menlo, monospace; letter-spacing: .06em; text-transform: uppercase; line-height: 1.25; }
/* the Village Wrap's guess-who opener: tap a name (or wait) and the grid underneath is revealed */
.card.revealed .vguess { opacity: 0; pointer-events: none; transition: opacity .5s; }
.vguess .guess-opt.picked { background: #F4C21C !important; }
/* the format picker's full-screen preview: the next format slides in from the side it was swiped to */
@keyframes fpInR { from { transform: translateX(160px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fpInL { from { transform: translateX(-160px); opacity: 0; } to { transform: none; opacity: 1; } }
/* the questionnaire's Back: top-left where the logo sits, a big target at phone width */
.back { position: absolute; left: 34px; top: 72px; height: 134px; padding: 0 46px; border-radius: 67px; border: 5px solid; background: transparent; z-index: 6;
        font-weight: 900; font-stretch: 112%; font-size: 44px; letter-spacing: -.01em; cursor: pointer; }
