/* /play/ pages only. Loaded after /styles.css. No inline styles (CSP style-src 'self'). */
.play-hub .games{list-style:none;padding:0;margin:28px 0 0;display:grid;gap:16px}
.play-hub .game-card{border:1px solid var(--faint);border-radius:14px;padding:18px 20px;display:flex;gap:16px;align-items:center}
.play-hub .game-card img{width:64px;height:64px;border-radius:12px;flex:none}
.play-hub .game-card h3{font-size:1.15rem;margin:0 0 4px;text-transform:none;letter-spacing:0}
.play-hub .game-card p{margin:0;color:var(--muted);font-size:.95rem}
.play-hub .game-card.soon{opacity:.7}
.play-hub .soon-face{width:64px;height:64px;border-radius:12px;flex:none;border:1px dashed var(--faint);display:flex;align-items:center;justify-content:center;font-size:1.6rem;color:var(--muted)}

.wd{margin:24px 0 0}
.wd-hud{display:flex;flex-wrap:wrap;gap:8px 18px;align-items:center;font-family:var(--mono);font-size:.9rem;color:var(--muted);margin:0 0 10px}
.wd-hud b{color:var(--text);font-weight:600}
.wd-lives{color:var(--brand);letter-spacing:.1em;font-size:1.05rem}
.wd-timer{height:6px;border-radius:999px;background:var(--faint);overflow:hidden;margin:0 0 14px}
.wd-bar{height:100%;width:100%;background:var(--accent);transform-origin:left center;transform:scaleX(1);transition:transform .2s linear}
.wd-bar.low{background:var(--brand)}
@media (prefers-reduced-motion:reduce){.wd-bar{transition:none}}
.wd-msg{min-height:1.7em;margin:0 0 12px;font-weight:600}
.wd-msg.ok{color:var(--accent)}
.wd-msg.bad{color:#ff8a80}
.wd-grid{display:grid;gap:8px;grid-template-columns:repeat(3,1fr);max-width:560px;margin:0 auto}
.wd-grid.wd-n4{grid-template-columns:repeat(4,1fr)}
.wd-grid.wd-n5{grid-template-columns:repeat(5,1fr);gap:6px}
.wd-cell{appearance:none;-webkit-appearance:none;aspect-ratio:1/1;min-width:0;min-height:56px;padding:6%;margin:0;border:2px solid var(--faint);border-radius:14px;background:#11161d;cursor:pointer;display:flex;align-items:center;justify-content:center;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.wd-cell:hover:not(:disabled){border-color:var(--muted)}
.wd-cell img,.wd-cell svg{width:100%;height:100%;object-fit:contain;pointer-events:none;user-select:none}
.wd-cell:disabled{cursor:default}
.wd-cell.miss{border-color:rgba(221,80,71,.8);background:rgba(221,80,71,.12);opacity:.55}
.wd-cell.found{border-color:var(--accent);background:rgba(124,242,154,.12);box-shadow:0 0 0 3px rgba(124,242,154,.25)}
.wd-start-wrap{text-align:center;margin:18px 0 0}
.wd-start-wrap .btn{border:0;font:inherit;font-weight:600;cursor:pointer}
.wd .btn-ghost{display:inline-block;background:none;border:1px solid var(--accent);color:var(--accent);font:inherit;font-weight:600;padding:12px 28px;border-radius:999px;cursor:pointer}
.wd .btn-ghost:hover{background:rgba(124,242,154,.1)}
.wd-over{border:1px solid var(--faint);border-radius:14px;padding:16px 18px;margin:18px 0 0;text-align:center}
.wd-over h2{margin:0 0 6px;font-size:1.2rem}
.wd-over p{margin:0 0 12px}
.wd-rules{margin:28px 0 0}
.wd-rules h2{font-size:1.1rem}
.wd-target{display:flex;align-items:center;gap:14px;margin:18px 0 0}
.wd-target img{width:72px;height:72px;flex:none}
.wd-target p{margin:0}
.wd [hidden],.play-hub [hidden]{display:none!important}
/* Impossible Throw */
.it-canvas{display:block;width:100%;height:auto;aspect-ratio:3/2;max-width:720px;margin:0 auto;border:1px solid var(--faint);border-radius:14px;background:#0d1218;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent;cursor:pointer}
.it .wd-msg{margin:12px 0 0}
.it .it-hold{min-width:220px;min-height:52px;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.it .it-hold.held{background:rgba(124,242,154,.18)}
.it-face-inline{display:inline;width:1.4em;height:1.4em;vertical-align:-.3em;margin:0 .15em}
/* ===== Kids' book (/play/kids-book/): school-safe, book-first challenge hub (v5, consolidated) ===== */
.kids-footer p:first-child{max-width:60ch}
.play-hub #teachers,.play-hub #schools{scroll-margin-top:72px}
.kbf-page .wrap{max-width:1040px}
.kbf-page .wrap>p,.kbf-page .wrap>ul.plain,.kbf-page .wrap>h2,.kbf-inside>p{max-width:44rem}
.kbf-hero{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);gap:48px;align-items:center;margin:8px 0 12px}
.kbf-copy h1{margin-top:.2em;text-wrap:balance}
.kbf-copy h1 em{display:block}
.kbf-copy p{text-wrap:pretty}
.kbf-tags{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0 0;padding:0;list-style:none}
.kbf-tags li{border:1px solid var(--accent);color:var(--accent);border-radius:999px;padding:3px 12px;font-size:.82rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase}
.kbf-ctas{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin:22px 0 0}
/* 3D book */
.kbf-book{margin:0;text-align:center}
.kbf-book .book{position:relative;display:inline-block;width:100%;max-width:30rem;perspective:1400px;padding:0 16px 16px 24px;box-sizing:border-box}
.kbf-book .book-inner{position:relative;transform:rotateY(-16deg) rotateX(3deg);transform-style:preserve-3d;transition:transform .4s ease}
.kbf-book .book:hover .book-inner{transform:rotateY(-6deg) rotateX(1deg)}
.kbf-book .book-inner img{display:block;width:100%;height:auto;aspect-ratio:1/1;object-fit:cover;border-radius:3px 10px 10px 3px;box-shadow:18px 22px 40px rgba(0,0,0,.6),4px 4px 0 #f3efe2,7px 7px 0 #d9d3c1,10px 10px 0 #f3efe2,12px 12px 0 #c8c1ac}
.kbf-book .book-inner::before{content:"";position:absolute;left:0;top:0;bottom:0;width:22px;border-radius:3px 0 0 3px;background:linear-gradient(90deg,rgba(0,0,0,.45),rgba(255,255,255,.18) 40%,rgba(0,0,0,.25) 70%,rgba(0,0,0,0));z-index:2;pointer-events:none}
.kbf-book .book-inner::after{content:"";position:absolute;left:-14px;top:2%;bottom:2%;width:14px;background:linear-gradient(90deg,#1f4a2a,#2f6b3a);transform:rotateY(-70deg);transform-origin:right center;border-radius:3px 0 0 3px}
.kbf-book figcaption{margin-top:22px;font-weight:700}
.kbf-book figcaption span{display:block;font-weight:400;color:var(--muted);font-size:.9rem}
/* stats + rules */
.kbf-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:40px 0 0;padding:0;list-style:none}
.kbf-stats li{border:1px solid var(--faint);border-radius:12px;padding:14px 16px;color:var(--muted);font-size:.9rem;line-height:1.35}
.kbf-stats b{display:block;color:var(--text);font-size:1.6rem;line-height:1.1;margin-bottom:4px}
.kbf-stats li:first-child b{color:#ffd640}
.kbf-rules{margin:40px 0 0}
.kbf-rules ol{list-style:none;counter-reset:kbf;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:14px 0 0;padding:0}
.kbf-rules li{counter-increment:kbf;position:relative;border:1px solid var(--faint);border-radius:12px;padding:44px 16px 16px;font-size:.95rem}
.kbf-rules li::before{content:counter(kbf);position:absolute;top:12px;left:16px;width:24px;height:24px;border-radius:50%;background:var(--accent);color:#0a0d11;font-weight:800;font-size:.85rem;line-height:24px;text-align:center}
.kbf-rules li b{display:block;color:var(--text);margin-bottom:2px}
/* spreads: fixed 4:3 frame, contain (never crop the printed spread titles) */
.kbf-inside{margin:44px 0 8px}
.kbf-strip{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:18px 0 0;padding:0;list-style:none;align-items:stretch}
.kbf-strip figure{margin:0;height:100%;display:flex;flex-direction:column;border:1px solid var(--faint);border-radius:12px;overflow:hidden;background:#11161c}
.kbf-strip img{display:block;width:100%;height:auto;aspect-ratio:4/3;object-fit:contain;background:#feecc6}
.kbf-strip figcaption{padding:10px 14px 12px;font-size:.95rem;font-weight:600}
.kbf-strip figcaption b{display:block;color:var(--accent);font-size:.76rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;margin-bottom:2px}
/* dare callout */
.kbf-dare{display:flex;align-items:center;gap:18px;margin:36px 0 8px;padding:18px 20px;border:1px solid var(--accent);border-radius:14px;background:rgba(124,242,154,.06)}
.kbf-dare img{width:72px;height:72px;flex:none}
.kbf-dare div{flex:1;min-width:0}
.kbf-dare p{margin:0;color:var(--muted);font-size:.95rem}
.kbf-dare .kbf-dare-h{color:var(--text);font-weight:800;font-size:1.15rem;margin-bottom:2px}
.kbf-dare .btn{flex:none}
@media (max-width:820px){
  .kbf-hero{grid-template-columns:1fr;gap:28px}
  .kbf-book{order:-1}
  .kbf-book .book{max-width:20rem}
  .kbf-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .kbf-rules ol{grid-template-columns:1fr}
  .kbf-dare{flex-wrap:wrap}
  .kbf-dare .btn{width:100%;text-align:center}
}
@media (max-width:520px){.kbf-strip{grid-template-columns:1fr}}
@media (prefers-reduced-motion:reduce){.kbf-book .book-inner,.kbf-book .book:hover .book-inner{transform:none;transition:none}}
.kbf-page .btn-ghost{display:inline-block;border:1px solid var(--accent);color:var(--accent);font-weight:600;text-decoration:none;padding:13px 26px;border-radius:999px}
.kbf-page .btn-ghost:hover{background:rgba(124,242,154,.1)}
/* Impossible Throw v2: modes, banner, results strip */
.it-modes{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin:0 0 12px}
.it-mode-btn{background:none;border:1px solid var(--faint);color:var(--muted);font:inherit;font-size:.9rem;font-weight:600;padding:8px 16px;border-radius:999px;cursor:pointer;min-height:40px}
.it-mode-btn[aria-pressed="true"]{border-color:var(--accent);color:var(--accent);background:rgba(124,242,154,.08)}
.it-mode-btn[hidden]{display:none}
.it-banner{margin:0 0 12px;padding:10px 14px;border:1px solid var(--accent);border-radius:12px;background:rgba(124,242,154,.06);font-weight:600;text-align:center}
.it-strip{display:flex;flex-wrap:wrap;gap:4px;justify-content:center;margin:0 0 14px;min-height:0}
.it-mark{display:inline-block;width:18px;height:18px;border-radius:4px;background:#ff8a80}
.it-mark.hit{background:var(--accent)}
.it-mark.clean{background:#ffd640}
.it .it-retry{margin-left:.5rem}
.wd-over .it-share{border:0;font:inherit;font-weight:700;cursor:pointer;margin-right:.5rem}
.it-next{margin:14px 0 0;font-size:.92rem;color:var(--muted)}
@media (max-width:520px){.wd-over .btn-ghost{margin:6px 4px 0!important}}

