/* Gearwood Hill interactive books: shared look. One "book page" card at a time under a navy workshop bar
   that carries the letter slots. Single visual world, matching the printed books (light pages, navy and orange). */
:root {
  --navy: #1A2A49; --navy2: #2A3F6B; --orange: #F28C28; --orange-d: #D9731A; --teal: #18A0A8; --teal-l: #5BC6CA;
  --yellow: #FFC83B; --cream: #FFF4CC; --peach: #FDEBD4; --lav: #EBE6F4; --lteal: #DDF2F4; --paper: #FFFFFF;
  --ground: #EEF1F7; --text: #21262D; --muted: #5E6A80; --line: #DCE1EA; --red: #E4562D; --purple: #6A4FA3; --green: #2E9D5B;
  --f-display: "Poppins", "Trebuchet MS", "Segoe UI", sans-serif;
  --f-body: "Poppins", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --f-robot: "VT323", "Courier New", monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--ground); color: var(--text); font-family: var(--f-body); font-size: 18px; line-height: 1.6; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.15; text-wrap: balance; margin: 0; }
a { color: var(--teal); }

/* top bar */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--navy); color: #fff;
  padding-block: 10px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.topbar-in { max-width: 980px; margin: 0 auto; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.brand { font-family: var(--f-display); font-weight: 800; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; color: #fff; text-decoration: none; }
.brand b { color: var(--orange); }
.slots { display: flex; gap: 6px; align-items: center; margin-left: auto; flex-wrap: wrap; }
.slots .key { width: 22px; height: 22px; color: var(--yellow); margin-right: 2px; }
.slot { width: 32px; height: 38px; border-radius: 7px; border: 2px dashed #5A6E99; display: grid; place-items: center;
  font-family: var(--f-display); font-weight: 800; font-size: 20px; color: var(--navy); background: transparent; transition: background .3s; }
.slot.full { background: var(--yellow); border: 2px solid var(--yellow); }
.slot.gap { width: 8px; border: 0; }
.tools { display: flex; gap: 6px; }
.iconbtn { width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--navy2); color: #fff; display: grid; place-items: center; }
.iconbtn svg { width: 22px; height: 22px; }
.iconbtn[aria-pressed="true"] { background: var(--orange); }
.iconbtn.off { opacity: .55; }

/* stage */
.stage { padding-block: 22px 120px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.screen { max-width: 980px; margin: 0 auto; background: var(--paper); border-radius: 22px; box-shadow: 0 10px 30px rgba(26,42,73,.10); overflow: hidden; animation: pageIn .45s ease both; }
@keyframes pageIn { from { opacity: .4; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.band { background: var(--navy); color: #fff; padding: 18px 26px 20px; position: relative; overflow: hidden; }
.band.puzzle { background: var(--orange); }
.band.teal { background: var(--teal); }
.band .eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--yellow); }
.band.puzzle .eyebrow, .band.teal .eyebrow { color: var(--navy); }
.band h1 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; margin-top: 2px; }
.band .gearbg { position: absolute; right: -24px; top: -30px; width: 140px; height: 140px; opacity: .14; color: #fff; }
.body { padding: 24px 26px 28px; display: grid; gap: 20px; }
.split { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .split { grid-template-columns: 1.25fr 1fr; align-items: start; } .split.even { grid-template-columns: 1fr 1fr; } }
.split > * { min-width: 0; }
.col { display: grid; gap: 14px; align-content: start; min-width: 0; }
.story p { margin: 0 0 14px; max-width: 62ch; }
.story p:last-child { margin-bottom: 0; }
.bolt-voice { color: var(--teal); font-weight: 700; }
.note { background: var(--cream); border-left: 6px solid var(--orange); border-radius: 0 14px 14px 0; padding: 14px 18px; font-style: italic; }
.note p { margin: 0 0 8px; } .note p:last-child { margin: 0; }
.card { border-radius: 16px; padding: 14px 18px; display: grid; gap: 4px; }
.card h3 { font-size: 14px; letter-spacing: .1em; text-transform: uppercase; font-weight: 800; }
.card p { margin: 0; font-size: 16px; }
.card.fact { background: var(--lav); } .card.fact h3 { color: var(--purple); }
.card.spark { background: var(--lteal); } .card.spark h3 { color: var(--teal); }
.card.try { background: var(--peach); } .card.try h3 { color: var(--orange-d); }
.card.rule { background: var(--red); color: #fff; } .card.rule h3 { color: #fff; }
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.art { width: 100%; max-width: 100%; height: auto; display: block; }
.artbox { border-radius: 18px; overflow: hidden; background: var(--ground); }
.lead { font-size: 18px; margin: 0; max-width: 64ch; }
.small { font-size: 15px; color: var(--muted); }
.label { font-size: 14px; color: var(--muted); margin: 0 0 6px; }
.center { text-align: center; justify-items: center; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* Bolt */
.bolt-say { display: flex; align-items: flex-end; gap: 10px; }
.bolt-say svg { width: 92px; height: 100px; flex: none; }
.bubble { position: relative; background: var(--lteal); color: var(--navy); border-radius: 18px 18px 18px 4px; padding: 12px 16px;
  font-family: var(--f-robot); font-size: 24px; line-height: 1.1; letter-spacing: .02em; max-width: 52ch; margin: 0; }
.bubble.pop { animation: pop .35s ease; }
@keyframes pop { 0% { transform: scale(.92); } 60% { transform: scale(1.03); } 100% { transform: scale(1); } }
.bolt-eyelid { transform: scaleY(0); transform-box: fill-box; transform-origin: center; animation: blink 4.5s infinite; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(0); } 95% { transform: scaleY(1); } }
.bolt-happy .bolt-body { animation: hop .6s ease 2; transform-origin: 60px 120px; }
@keyframes hop { 50% { transform: translateY(-8px); } }
.bolt-glitch .bolt-body { animation: glitch .25s steps(2) infinite; }
@keyframes glitch { 50% { transform: translateX(2px) skewX(-3deg); } }

/* buttons */
.btn { border: 0; border-radius: 14px; padding: 12px 22px; min-height: 50px; font-weight: 700; background: var(--orange); color: #fff;
  display: inline-flex; align-items: center; gap: 8px; justify-content: center; box-shadow: 0 3px 0 var(--orange-d); text-decoration: none; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--orange-d); }
.btn.teal { background: var(--teal); box-shadow: 0 3px 0 #0E7C83; }
.btn.ghost { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 2px var(--line); }
.btn.navy { background: var(--navy); box-shadow: 0 3px 0 #0C1730; }
.btn.red { background: var(--red); box-shadow: 0 3px 0 #B33F1E; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* answer cards */
.vault-card { background: var(--cream); border: 3px solid var(--orange); border-radius: 18px; padding: 16px 18px; display: grid; gap: 10px; }
.vault-top { display: flex; align-items: center; gap: 12px; }
.vault-top svg { width: 36px; height: 36px; color: var(--orange); flex: none; }
.vault-top h3 { font-size: 18px; color: var(--navy); }
.vault-top p { margin: 0; font-size: 15px; color: var(--muted); }
.vault-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.letterbox { width: 66px; height: 66px; border-radius: 14px; border: 3px dashed var(--orange); background: #fff; text-align: center;
  font-family: var(--f-display); font-size: 34px; font-weight: 800; text-transform: uppercase; color: var(--navy); }
.letterbox.wide { width: 180px; font-size: 26px; letter-spacing: .08em; }
.letterbox.ok { border-style: solid; border-color: var(--green); background: #E7F6EC; }
.feedback { margin: 0; font-weight: 600; min-height: 1.6em; }
.feedback.good { color: var(--green); } .feedback.bad { color: var(--red); }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* hints */
.hints { display: grid; gap: 8px; }
.hint-item { background: var(--lteal); border-radius: 12px; padding: 10px 14px; font-size: 16px; animation: pageIn .3s ease both; }
.hint-item b { color: var(--teal); }
.btn.hintbtn { background: #fff; color: var(--teal); box-shadow: inset 0 0 0 2px var(--teal); justify-self: start; }
.btn.hintbtn.nudge { animation: nudge 1s ease 3; }
@keyframes nudge { 50% { transform: scale(1.06); } }

/* pager */
.pager { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(255,255,255,.96); border-top: 1px solid var(--line);
  padding-block: 10px calc(10px + env(safe-area-inset-bottom, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.pager-in { max-width: 980px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.pager .where { flex: 1; min-width: 0; text-align: center; font-size: 14px; color: var(--muted); font-weight: 600; }
.dots { display: flex; gap: 5px; justify-content: center; margin-top: 4px; flex-wrap: wrap; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); display: block; }
.dots i.done { background: var(--teal-l); } .dots i.now { background: var(--orange); transform: scale(1.3); }
.pager .btn { min-width: 112px; }

/* letter tiles and inputs */
.robot-screen { background: var(--navy); border-radius: 16px; padding: 16px; display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; }
.word { display: flex; gap: 6px; flex-wrap: wrap; }
.tile { display: grid; gap: 6px; justify-items: center; }
.tile button, .tile .face { width: 44px; height: 48px; border-radius: 9px; border: 0; background: var(--orange); color: #fff; font-family: var(--f-display); font-weight: 800; font-size: 24px; display: grid; place-items: center; }
.tile button.sel { background: var(--yellow); color: var(--navy); }
.tile input, .linput { width: 44px; height: 46px; border-radius: 9px; border: 2px solid #fff; background: #fff; text-align: center; font-weight: 800; font-size: 22px; text-transform: uppercase; color: var(--navy); }
.linput { border: 2px dashed var(--muted); }
.tile input.ok, .linput.ok { background: #DFF5E7; border: 2px solid var(--green); }
.linputs { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.linputs .sp { width: 16px; }
.alpha { display: flex; flex-wrap: wrap; gap: 4px; }
.alpha span { width: 32px; height: 36px; border-radius: 8px; background: var(--lteal); display: grid; place-items: center; font-weight: 700; color: var(--navy); font-size: 17px; position: relative; transition: background .2s; }
.alpha span.from { background: var(--orange); color: #fff; }
.alpha span.to { background: var(--yellow); color: var(--navy); }
.decoder { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 4px; }
.decoder button { border: 0; border-radius: 8px; background: var(--lteal); padding: 4px 0; line-height: 1.1; color: var(--navy); }
.decoder button b { display: block; font-size: 17px; } .decoder button small { font-size: 12px; color: var(--muted); }
.decoder button.sel { background: var(--yellow); }
.choices { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.choice { border: 3px solid var(--line); background: #fff; border-radius: 16px; padding: 14px; text-align: left; display: grid; gap: 6px; justify-items: start; }
.choice .badge { width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 20px; }
.choice[aria-pressed="true"] { border-color: var(--orange); background: var(--cream); }
.choice.right { border-color: var(--green); background: #E7F6EC; }
.choice.wrong { border-color: var(--red); background: #FDECE7; }
.chart { width: 100%; border-collapse: collapse; font-size: 15px; }
.chart th, .chart td { border: 1px solid var(--line); padding: 6px; text-align: center; }
.chart th { background: var(--navy); color: #fff; font-weight: 700; }
.chart td button { min-width: 46px; height: 40px; border-radius: 9px; border: 2px dashed var(--muted); background: #fff; font-weight: 800; font-size: 18px; }
.chart td button.T, .chart td button.Y { border: 2px solid var(--green); color: var(--green); background: #E7F6EC; }
.chart td button.F, .chart td button.N { border: 2px solid var(--red); color: var(--red); background: #FDECE7; }
.chart td.total { font-weight: 800; font-size: 20px; color: var(--navy); }
.chartwrap { overflow-x: auto; }
.lampbox { background: #0E1626; border-radius: 18px; padding: 18px; display: grid; justify-items: center; gap: 12px; }
.lampbox svg { width: 150px; height: auto; }
.lamp-glow { transition: opacity .05s; opacity: .08; }
.lampbox.on .lamp-glow { opacity: 1; }
.morse-line { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; font-family: var(--f-robot); font-size: 34px; color: var(--yellow); letter-spacing: .1em; }
.morse-line .gap { width: 30px; }
.morse-line span.now { color: #fff; text-shadow: 0 0 10px var(--yellow); }
.mchart { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.mchart button { border: 0; border-radius: 9px; background: var(--ground); padding: 6px 8px; display: flex; gap: 8px; align-items: center; color: var(--navy); }
.mchart b { font-size: 18px; width: 18px; }
.mchart span { font-family: var(--f-robot); font-size: 24px; letter-spacing: .08em; }
.gridbox { overflow-x: auto; }
.lgrid { border-collapse: separate; border-spacing: 4px; margin: 0 auto; }
.lgrid th { font-weight: 800; color: #fff; background: var(--navy); border-radius: 8px; width: 40px; height: 40px; }
.lgrid td { width: 44px; height: 44px; text-align: center; font-weight: 800; font-size: 20px; color: var(--navy); background: var(--ground); border-radius: 8px; }
.lgrid td button { width: 100%; height: 100%; border: 0; border-radius: 8px; background: transparent; font-weight: 800; font-size: 20px; color: var(--navy); }
.lgrid td.hl { background: var(--yellow); }
.lgrid td.path { background: var(--teal-l); }
.lgrid td.cur { background: var(--orange); color: #fff; } .lgrid td.cur button { color: #fff; }
.lgrid td.done { background: var(--green); color: #fff; } .lgrid td.done button { color: #fff; }
.scene { position: relative; background: #FBF3E4; border-radius: 18px; overflow: hidden; touch-action: manipulation; }
.scene svg { width: 100%; height: auto; display: block; }
.tickable { cursor: pointer; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button { width: 44px; height: 44px; border-radius: 10px; border: 0; background: var(--navy); color: #fff; font-size: 22px; font-weight: 800; }
.stepper output { font-size: 28px; font-weight: 800; color: var(--navy); min-width: 40px; text-align: center; }

/* keypad / vault */
.vault-stage { display: grid; gap: 18px; justify-items: center; }
.vault-door { width: min(300px, 70vw); height: auto; perspective: 900px; }
.vault-door svg { width: 100%; height: auto; display: block; transform-origin: 6% 50%; transition: transform 1.6s cubic-bezier(.5,0,.3,1); }
.vault-door.open svg { transform: rotateY(-78deg); }
.vault-gear { transform-origin: 150px 150px; }
.vault-door.spin .vault-gear { animation: spin 1s linear 2; }
@keyframes spin { to { transform: rotate(360deg); } }
.vslots { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.vslot { width: 52px; height: 62px; border-radius: 12px; background: #fff; border: 3px solid var(--navy); display: grid; place-items: center; font-family: var(--f-display); font-weight: 800; font-size: 30px; color: var(--navy); }
.vslot.cur { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(242,140,40,.25); }
.vslot.gap { width: 14px; border: 0; background: transparent; }
.keypad { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; width: 100%; max-width: 520px; }
.keypad button { height: 50px; border-radius: 10px; border: 0; background: var(--navy); color: #fff; font-weight: 800; font-size: 20px; box-shadow: 0 3px 0 #0C1730; }
.keypad button.wide { grid-column: span 2; background: var(--muted); }
.keypad button.go { grid-column: span 2; background: var(--orange); box-shadow: 0 3px 0 var(--orange-d); }
.mine { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; font-size: 15px; color: var(--muted); align-items: center; }
.mine b { background: var(--yellow); color: var(--navy); border-radius: 7px; padding: 2px 9px; font-size: 18px; }

/* cover */
.cover { background: var(--navy); color: #fff; }
.cover .inner { display: grid; gap: 18px; padding: 30px 26px; }
@media (min-width: 760px) { .cover .inner { grid-template-columns: 1.1fr 1fr; align-items: center; } }
.cover .eyebrow { color: var(--orange); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 14px; }
.cover h1 { font-size: clamp(38px, 7vw, 64px); font-weight: 800; line-height: 1; }
.cover h1 span { color: var(--orange); display: block; }
.cover .sub { color: #C9D3E8; margin: 0; }
.namefield { display: grid; gap: 6px; }
.namefield label { font-size: 14px; font-weight: 700; color: var(--yellow); letter-spacing: .06em; text-transform: uppercase; }
.namefield input { border-radius: 12px; border: 0; padding: 12px 14px; font-size: 20px; color: var(--navy); max-width: 360px; width: 100%; }
.namefield.light label { color: var(--orange-d); } .namefield.light input { border: 2px solid var(--line); }

/* certificate */
.cert { background: #FFF4E1; margin: 0; border: 10px solid var(--navy); border-radius: 18px; padding: 30px 24px; text-align: center; position: relative; display: grid; gap: 10px; justify-items: center; }
.cert .eyebrow { color: var(--orange-d); font-weight: 800; letter-spacing: .12em; font-size: 13px; text-transform: uppercase; }
.cert h2 { font-size: 30px; color: var(--navy); }
.cert h2 span { display: block; color: var(--teal); font-size: 42px; letter-spacing: .04em; }
.cert .who { font-family: var(--f-display); font-size: 30px; font-weight: 700; color: var(--navy); border-bottom: 2px solid var(--navy); min-width: 60%; padding: 0 10px; }
.cert .sigs { display: flex; gap: 40px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.cert .sigs div { display: grid; font-size: 13px; color: var(--muted); }
.cert .sigs b { font-family: var(--f-display); font-style: italic; font-size: 20px; color: var(--navy); border-bottom: 1px solid var(--navy); padding: 0 12px; }
.cert .corner { position: absolute; width: 36px; height: 36px; color: var(--orange); }
.qcard { background: var(--ground); border-radius: 16px; padding: 14px; display: grid; gap: 8px; }
.qcard p { margin: 0; font-weight: 700; color: var(--navy); }
.qcard textarea, .codebox textarea { width: 100%; border-radius: 10px; border: 2px solid var(--line); padding: 8px 10px; min-height: 64px; resize: vertical; font-size: 16px; background: #fff; }
.codebox { background: var(--lteal); border-radius: 16px; padding: 16px; display: grid; gap: 10px; }
.codeout { font-family: var(--f-robot); font-size: 30px; color: var(--navy); background: #fff; border-radius: 10px; padding: 8px 12px; min-height: 52px; word-break: break-word; }

/* kits (two-player books) */
.kitgate { border-radius: 18px; padding: 18px; display: grid; gap: 10px; justify-items: start; color: #fff; }
.kitgate.cb { background: var(--teal); } .kitgate.lo { background: var(--orange); }
.kitgate h3 { font-size: 20px; }
.kitgate p { margin: 0; }
.kitgate .btn { background: #fff; color: var(--navy); box-shadow: 0 3px 0 rgba(0,0,0,.2); }
.kitbody { border-radius: 18px; padding: 16px; display: grid; gap: 12px; border: 4px solid var(--teal); background: #fff; }
.kitbody.lo { border-color: var(--orange); }
.kitbody .kithead { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.kitbody .kithead b { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); }
.kitbody.lo .kithead b { color: var(--orange-d); }
.rolebox { border-radius: 14px; padding: 12px 14px; color: #fff; }
.rolebox.cb { background: var(--teal); } .rolebox.lo { background: var(--orange); }
.rolebox h3 { font-size: 14px; letter-spacing: .12em; text-transform: uppercase; }
.rolebox p { margin: 4px 0 0; font-size: 16px; }

/* grown-ups sheet */
.sheet { position: fixed; inset: 0; z-index: 50; background: rgba(14,22,38,.55); display: grid; place-items: center;
  padding-block: 16px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.sheet-card { background: #fff; border-radius: 20px; max-width: 620px; width: 100%; max-height: 92vh; overflow: auto; padding: 22px; display: grid; gap: 16px; }
.sheet-card h2 { font-size: 24px; color: var(--navy); }
.sheet-card p { margin: 0; font-size: 16px; }
.toggle { display: flex; gap: 12px; align-items: center; font-size: 16px; font-weight: 600; }
.toggle input { width: 24px; height: 24px; accent-color: var(--orange); }
.jump { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; }
.jump button { text-align: left; border: 0; border-radius: 10px; background: var(--ground); padding: 8px 12px; font-size: 14px; }
.answers { background: var(--cream); border-radius: 12px; padding: 12px 14px; font-size: 15px; }
.answers ol { margin: 0; padding-left: 22px; }
.holdbtn { position: relative; overflow: hidden; }
.holdbtn .fillbar { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(255,255,255,.35); }

.fly { position: fixed; z-index: 60; font-family: var(--f-display); font-weight: 800; font-size: 34px; color: var(--navy); background: var(--yellow); border-radius: 10px; width: 50px; height: 56px; display: grid; place-items: center; pointer-events: none; }
.after { display: none !important; } .solved .after { display: grid !important; }

@media (max-width: 560px) {
  body { font-size: 17px; }
  .band, .body { padding-left: 18px; padding-right: 18px; }
  .brand { display: none; }
  .slots { margin-left: 0; }
  .slot { width: 26px; height: 32px; font-size: 16px; }
  .decoder { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .keypad { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .pager .btn { min-width: 0; padding: 10px 14px; }
  .dots { display: none; }
  .lgrid td { width: 36px; height: 36px; font-size: 17px; } .lgrid th { width: 32px; height: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media print {
  body.printing .topbar, body.printing .pager, body.printing .band, body.printing .namefield, body.printing .bolt-say, body.printing .row, body.printing .small { display: none !important; }
  body.printing .stage { padding: 0; } body.printing .screen { box-shadow: none; }
}

/* invitation to the next book (used on the last screen of free books) */
.nextadv { display: grid; grid-template-columns: 120px 1fr; gap: 18px; align-items: center; background: var(--navy); color: #fff; border-radius: 18px; padding: 18px; }
.nextadv img { width: 120px; height: auto; border-radius: 10px; box-shadow: 0 6px 16px rgba(0,0,0,.35); transform: rotate(-3deg); }
.nextadv .eyebrow { color: var(--orange); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: 13px; }
.nextadv h3 { font-family: var(--f-display); font-size: 24px; margin: 4px 0 6px; }
.nextadv p { margin: 0 0 12px; opacity: .92; }
.nextadv .row a.ghostlink { color: #fff; font-weight: 700; }
.nextadv a.btn { text-decoration: none; }
@media (max-width: 520px) { .nextadv { grid-template-columns: 1fr; justify-items: center; text-align: center; } .nextadv .row { justify-content: center; } }
