/* VOICE a pop-up book's inside cover: playful, handmade, confident. IDEA paper pieces pinned to a sage cutting mat,
   each a little crooked, each casting a hard paper shadow. PICTURE the live game, framed like an open spread.
   COLOUR sage mat #cfc8a8, cream card, teal ink, pink + gold accents. TYPE Fraunces (soft, wonky) + DM Sans. */
:root { --mat: #cfc8a8; --mat2: #c3bd98; --card: #fbf3df; --card2: #f1e4c2; --ink: #33221a; --soft: #594b3a; --teal: #2a7673; --teal2: #1f5d5b; --pink: #c3456a; --gold: #e2ac3a; --shadow: #6b4e2f55; }
* { box-sizing: border-box; min-width: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; } html, body { margin: 0; }
body { background: var(--mat); color: var(--ink); font: 17px/1.55 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; overflow-x: clip;
  background-image: radial-gradient(#b9b38d 1px, transparent 1.4px); background-size: 26px 26px; }
h1, h2, h3 { font-family: Fraunces, Georgia, serif; font-weight: 700; line-height: 1.05; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
p { margin: 0; } a { color: var(--teal2); text-underline-offset: 3px; }
button, .btn { font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; border: 0; background: var(--card); border-radius: 6px; box-shadow: 2px 3px 0 var(--shadow); padding: 9px 16px; min-height: 44px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .12s, box-shadow .12s; white-space: nowrap; }
button:hover, .btn:hover { transform: translate(-1px, -2px) rotate(-.6deg); box-shadow: 3px 5px 0 var(--shadow); }
button:active, .btn:active { transform: translate(1px, 2px); box-shadow: 1px 1px 0 var(--shadow); }
.go { background: var(--teal); color: #fff; } .pinkb { background: var(--pink); color: #fff; } .big { font-size: 19px; padding: 13px 24px; min-height: 54px; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
input, textarea, select { font: inherit; font-size: 16px; color: var(--ink); background: #fffaf0; border: 2px solid #b9a888; border-radius: 6px; padding: 8px 10px; min-height: 44px; }
.top { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 10px max(3vw, 12px); background: var(--card); box-shadow: 0 3px 0 var(--shadow); }
.brand { font-family: Fraunces, Georgia, serif; font-weight: 700; font-size: 22px; color: var(--ink); text-decoration: none; margin-right: auto; display: inline-flex; align-items: center; gap: 9px; }
.brand svg { width: 30px; height: 30px; flex: none; } .brand span { color: var(--soft); font-weight: 600; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 max(4vw, 14px); }
section { padding: clamp(34px, 6vw, 76px) 0; }
.card { background: var(--card); border-radius: 8px; box-shadow: 3px 4px 0 var(--shadow); padding: 18px 20px; }
.muted { color: var(--soft); font-size: 15px; } .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.eyebrow { display: inline-block; background: var(--gold); color: var(--ink); font-weight: 700; font-size: 14px; padding: 4px 12px; border-radius: 4px; transform: rotate(-2deg); box-shadow: 2px 2px 0 var(--shadow); }
/* landing */
.hero { padding-bottom: clamp(20px, 4vw, 44px); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(20px, 4vw, 48px); align-items: center; padding-top: clamp(26px, 5vw, 60px); }
.hero h1 { font-size: clamp(38px, 5.6vw, 68px); margin: 16px 0 16px; } .hero h1 em { font-style: normal; color: var(--pink); display: inline-block; transform: rotate(-2deg); }
.hero p.lead { font-size: 19px; max-width: 46ch; }
.spread { position: relative; background: var(--card); border-radius: 10px; padding: 10px; box-shadow: 5px 7px 0 var(--shadow); transform: rotate(1.2deg); }
.spread .screen { position: relative; aspect-ratio: 16 / 10; border-radius: 6px; overflow: hidden; background: #b9c08e; }
.spread img, .spread iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; display: block; }
.spread .unfold { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-2deg); }
.spread .unfold:hover { transform: translate(-50%, -54%) rotate(-3deg); }
.spread figcaption { padding: 9px 6px 2px; font-size: 14px; color: var(--soft); }
.tape { position: absolute; top: -12px; left: 38px; width: 92px; height: 26px; background: #e9d9a6cc; transform: rotate(-5deg); box-shadow: 1px 1px 0 #0001; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 26px; counter-reset: s; }
.step { position: relative; padding-top: 30px; } .step:nth-child(1) { transform: rotate(-.8deg); } .step:nth-child(2) { transform: rotate(.6deg); } .step:nth-child(3) { transform: rotate(-.4deg); }
.step::before { counter-increment: s; content: counter(s); position: absolute; top: -18px; left: 16px; width: 44px; height: 44px; border-radius: 50%; background: var(--pink); color: #fff; font: 700 24px/44px Fraunces, serif; text-align: center; box-shadow: 2px 3px 0 var(--shadow); }
.step h3 { font-size: 23px; margin-bottom: 8px; } .step p + p, .step .copy { margin-top: 10px; }
.copy { display: flex; gap: 8px; align-items: stretch; } .copy code { flex: 1; background: var(--card2); border-radius: 6px; padding: 10px 12px; font: 600 15px/1.4 ui-monospace, Menlo, Consolas, monospace; overflow-wrap: anywhere; display: flex; align-items: center; }
.copy button { flex: none; background: var(--teal); color: #fff; }
.feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 26px; }
.feat h3 { font-size: 21px; margin: 10px 0 6px; } .feat svg { width: 46px; height: 46px; display: block; } .feat:nth-child(odd) { transform: rotate(-.5deg); } .feat:nth-child(even) { transform: rotate(.5deg); }
.band { background: var(--teal2); color: #fdf6e3; background-image: radial-gradient(#ffffff14 1px, transparent 1.4px); background-size: 26px 26px; } .band a { color: #ffe9a8; } .band .muted { color: #cfe3dc; }
.prompts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 16px; margin-top: 22px; }
.prompt { background: #fdf6e3; color: var(--ink); border-radius: 8px; padding: 16px 16px 12px; box-shadow: 3px 4px 0 #0004; display: flex; flex-direction: column; gap: 10px; } .prompt p { font-family: Fraunces, serif; font-size: 19px; line-height: 1.3; flex: 1; } .prompt button { align-self: flex-start; background: var(--card2); }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(18px, 4vw, 44px); align-items: center; }
.two img { width: 100%; border-radius: 8px; border: 10px solid var(--card); box-shadow: 4px 6px 0 var(--shadow); transform: rotate(-1.4deg); display: block; }
.ticks { list-style: none; padding: 0; margin: 14px 0 0; } .ticks li { padding: 6px 0 6px 30px; position: relative; } .ticks li::before { content: ''; position: absolute; left: 2px; top: 13px; width: 14px; height: 8px; border-left: 4px solid var(--pink); border-bottom: 4px solid var(--pink); transform: rotate(-45deg); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; margin-top: 24px; }
.game { background: var(--card); border-radius: 8px; box-shadow: 3px 4px 0 var(--shadow); overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column; transform: rotate(var(--r, 0deg)); transition: transform .15s, box-shadow .15s; }
.game:hover { transform: rotate(0deg) translateY(-4px); box-shadow: 4px 8px 0 var(--shadow); }
.game img, .game .ph { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; background: linear-gradient(135deg, #b9c08e, #8fb0a8); display: block; }
.game div { padding: 12px 14px 14px; } .game code { font: 600 14px ui-monospace, Menlo, Consolas, monospace; background: var(--card2); padding: 2px 8px; border-radius: 4px; } div.game:hover { transform: rotate(var(--r, 0deg)); box-shadow: 3px 4px 0 var(--shadow); } .game h3 { font-size: 21px; } .game p { margin: 6px 0 0; font-size: 14px; color: var(--soft); }
footer { padding: 30px max(4vw, 14px) 44px; font-size: 15px; color: var(--soft); text-align: center; }
/* studio and play */
.shell { display: flex; flex-direction: column; height: 100vh; height: 100dvh; } .shell .top { position: static; } .shell iframe { flex: 1; width: 100%; border: 0; display: block; background: var(--mat); min-height: 0; }
.tag { background: var(--card2); border-radius: 6px; padding: 6px 12px; font-size: 14px; display: inline-flex; gap: 8px; align-items: center; min-height: 44px; } .tag b { font: 700 15px ui-monospace, Menlo, Consolas, monospace; }
.title { font-family: Fraunces, serif; font-weight: 700; font-size: 19px; margin-right: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46vw; }
/* the setup is a fold-out card over the game, never a band that pushes the game down */
.shell { position: relative; } .shell .top { padding: 6px max(2vw, 10px); gap: 6px 10px; min-height: 56px; } .shell .top button, .shell .top .tag { min-height: 44px; padding-top: 4px; padding-bottom: 4px; }
.connect { position: absolute; top: 64px; right: max(2vw, 10px); z-index: 30; width: min(400px, calc(100vw - 20px)); max-height: calc(100dvh - 80px); overflow: auto; background: var(--card2); border-radius: 10px; padding: 12px; box-shadow: 4px 6px 0 var(--shadow); transform: rotate(.4deg); }
.connect[hidden] { display: none; } .connect h2 { font-size: 20px; margin: 2px 4px 10px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.connect ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; counter-reset: c; }
.connect li { background: var(--card); border-radius: 8px; padding: 10px 12px; box-shadow: 2px 3px 0 var(--shadow); counter-increment: c; } .connect li b:first-child::before { content: counter(c) '. '; color: var(--pink); } .connect li p { font-size: 14px; color: var(--soft); margin: 4px 0 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #b9a888; display: inline-block; } .dot.on { background: #4f9a5a; box-shadow: 0 0 0 3px #4f9a5a33; }
/* feedback */
.fb { display: grid; grid-template-columns: 70px 1fr; gap: 14px; align-items: start; margin-top: 14px; } .fb h3 { font-size: 19px; } .fb p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.pill { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: var(--card2); margin-right: 6px; } .pill.bug { background: #f0c9c0; }
dialog { border: 0; border-radius: 10px; background: var(--card); color: var(--ink); box-shadow: 5px 7px 0 var(--shadow); padding: 22px; width: min(440px, 92vw); } dialog::backdrop { background: #33221a66; }
dialog label { display: block; margin: 12px 0 4px; font-size: 14px; font-weight: 600; } dialog input, dialog textarea { width: 100%; }
#copybox { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 60; background: var(--card); border-radius: 8px; box-shadow: 3px 4px 0 var(--shadow); padding: 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; width: min(560px, 94vw); } #copybox input { flex: 1 1 200px; } #copybox label { font-size: 14px; font-weight: 600; flex-basis: 100%; }
.dead { flex: 1; display: flex; flex-direction: column; gap: 16px; align-items: center; justify-content: center; padding: 30px; text-align: center; } .dead h2 { font-size: 28px; }
.game .ph { display: grid; place-items: center; } .game .ph::after { content: 'No picture yet'; color: #33221a99; font-size: 14px; }
footer a, .muted a { display: inline-block; padding: 6px 0; }
@media (max-width: 860px) { html { scroll-padding-top: 128px; } .spread .screen { aspect-ratio: 4 / 5; } .brand { font-size: 19px; } .top { gap: 6px 8px; padding: 8px 10px; } .top .btn, .top button { padding: 8px 12px; }
  .connect { transform: none; left: 10px; right: 10px; width: auto; } .shell .title { flex-basis: auto; max-width: 62vw; font-size: 17px; } .tag { padding: 4px 10px; }
  .hero, .two { grid-template-columns: minmax(0, 1fr); } .steps { grid-template-columns: minmax(0, 1fr); } .spread, .two img { transform: none; } .title { max-width: 100%; flex-basis: 100%; } .hide-s { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
button:disabled, .btn[aria-disabled=true] { opacity: .5; cursor: default; transform: none; }
