/* The Playbook Kit: paper and ink, a green field, coral for "go", volt for what you can tap. */
html, body { min-height: 100%; }
#app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; background: var(--paper); border-bottom: var(--bw) solid var(--ink); }
.top .logo { font-size: 22px; }
@media (max-width: 420px) { .top .logo { font-size: 17px; gap: 7px; } .top .mark, .top .mark svg { width: 28px !important; height: 28px !important; } }
.top .mark { background: none; width: 34px; height: 34px; } .top .mark svg { width: 34px; height: 34px; display: block; }
.top-r { display: flex; align-items: center; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 36px; padding: 0 12px; border: 2px solid var(--ink); border-radius: 999px; background: var(--white); font: 600 14px/1 var(--sans); text-decoration: none; }
.pill b { font: 900 19px/1 var(--display); }
.iconbtn { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 2px solid var(--ink); border-radius: 12px; background: var(--white); cursor: pointer; font-size: 18px; line-height: 1; text-decoration: none; }
.screen { flex: 1; width: min(640px, 100%); margin: 0 auto; padding: 22px 16px 40px; }
.lede { font-size: 17px; color: var(--ink2); margin: 10px 0 0; }
.muted { color: var(--ink3); font-size: 14px; display: block; }
.center { text-align: center; justify-content: center; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
.btn.big { min-height: 58px; padding: 0 28px; font-size: 19px; }
.btn.grow { flex: 1; }
h1 { font-size: clamp(42px, 10vw, 68px); }
.err-t { color: var(--coral2); font-weight: 600; min-height: 1em; margin: 6px 0 0; font-size: 14px; }
input { font: 600 20px var(--sans); color: var(--ink); background: var(--white); border: var(--bw) solid var(--ink); border-radius: 14px; padding: 12px 14px; width: 100%; outline: none; }
#ga { width: 110px; text-align: center; font: 900 30px var(--display); }
.form { padding: 18px; margin-top: 16px; }

/* home */
.how h1 { margin: 6px 0 18px; }
.how-steps { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 10px; }
.how-steps li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--white); border: var(--bw) solid var(--ink); border-radius: 18px; box-shadow: var(--lift); font-size: 18px; }
.how-steps b { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--volt); border: 2px solid var(--ink); font: 900 22px var(--display); }
.how-steps em { font-style: normal; font: 900 24px/1 var(--display); text-transform: uppercase; margin-right: 4px; }
.lv-head h1 { font-size: clamp(38px, 8vw, 58px); margin: 6px 0 16px; }
.path { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 10px; }
.lv { text-align: left; display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 14px; padding: 10px 16px 10px 10px; background: var(--white); border: var(--bw) solid var(--ink); border-radius: 18px; text-decoration: none; transition: transform .18s cubic-bezier(.34,1.56,.64,1); }
.lv:hover { transform: translateY(-2px); }
.lv-n { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 14px; background: var(--paper2); font: 900 28px var(--display); border: 2px solid var(--ink); }
.lv.done .lv-n { background: var(--volt); }
.lv.now { box-shadow: 0 5px 0 var(--ink); background: #fff7f3; }
.lv.now .lv-n { background: var(--coral); color: var(--white); animation: bob 1.6s ease-in-out infinite; }
.lv.lock { opacity: .72; }
.lv-t small { display: block; font: 600 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink3); }
.lv-t b { font: 900 24px/1.05 var(--display); text-transform: uppercase; }
.lv-s { color: var(--coral); letter-spacing: 2px; }
.path-gate { text-align: center; margin: 8px 0 2px; border-top: 3px dashed var(--ink); }
.path-gate span { position: relative; top: -13px; padding: 4px 12px; background: var(--ink); color: var(--white); border-radius: 999px; font: 700 12px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
@keyframes bob { 50% { transform: translateY(-4px); } }

/* the stage: learn and play */
.screen.play { display: flex; flex-direction: column; padding: 12px 16px 16px; max-width: 560px; height: calc(100vh - 62px); height: calc(100dvh - 62px); flex: none; overflow: hidden; }
.stage { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.st-top h2 { font-size: 34px; margin: 2px 0 6px; }
.st-top .q { font: 800 21px/1.25 var(--sans); text-transform: none; letter-spacing: 0; min-height: 2.5em; margin: 6px 0 0; }
.dots, .prog { display: flex; gap: 6px; }
.dots i, .prog i { flex: 1; height: 8px; border-radius: 4px; background: var(--paper2); border: 1.5px solid var(--ink); transition: background .3s; }
.dots i.now, .prog i.now { background: var(--white); animation: pulse .9s infinite alternate; }
.dots i.ok, .prog i.ok { background: var(--volt); } .prog i.no { background: var(--coral); }
@keyframes pulse { to { transform: scaleY(1.3); } }
.hud { display: flex; align-items: center; gap: 12px; }
.hud .prog { flex: 1; }
.hearts { font-size: 22px; color: var(--coral); letter-spacing: 2px; }
.boardwrap { position: relative; flex: 1; min-height: 0; overflow: visible; display: flex; justify-content: center; align-items: center; }
.board { position: relative; flex: none; border: 3px solid var(--ink); border-radius: 18px; overflow: hidden; box-shadow: 0 5px 0 var(--ink); background: #1f7d3c; }
.board-svg { display: block; width: 100%; height: 100%; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.timer { position: absolute; left: 0; right: 0; bottom: -14px; height: 8px; border-radius: 4px; background: var(--paper2); overflow: hidden; border: 1.5px solid var(--ink); }
.timer i { display: block; height: 100%; background: var(--turf); transform-origin: left; transition: background .2s; }
.timer i.hot { background: var(--coral); }
.st-bot { min-height: 128px; }
.teach-t { font: 600 19px/1.4 var(--sans); margin: 4px 0 0; min-height: 3.2em; }
.why { padding: 14px 16px; border: 3px solid var(--ink); border-radius: 18px; background: #23332a; color: #f1f5ec; }
.why.good { border-top: 7px solid var(--volt); } .why.bad { border-top: 7px solid var(--coral); }
.why p { margin: 0 0 12px; font: 600 17px/1.4 var(--sans); }
.why .btn { width: 100%; }
.peek { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 3; }
.peek.on { opacity: 1; }
.peek-card { width: min(320px, 92%); padding: 10px; background: var(--white); border: 3px solid var(--ink); border-radius: 16px; position: relative; overflow: hidden; }
.peek-card .eyebrow { margin: 2px 2px 8px; }
.peek-card i { position: absolute; left: 0; bottom: 0; height: 5px; width: 100%; background: var(--coral); animation: shrink 3.4s linear both; }
@keyframes shrink { to { width: 0; } }
.hand { position: absolute; z-index: 4; font-size: 44px; transform: translate(-30%, 0); opacity: 0; pointer-events: none; }
.hand.on { animation: tapme 1.2s ease-in-out infinite; }
@keyframes tapme { 0% { opacity: 0; transform: translate(-30%, 30px); } 30% { opacity: 1; transform: translate(-30%, 0); } 50% { transform: translate(-30%, 8px) scale(.9); } 70% { transform: translate(-30%, 0); } 100% { opacity: 0; } }

/* the board's SVG */
.b-apron { fill: #1f7d3c; }
.b-turf.a { fill: #37ad55; } .b-turf.b { fill: #31a04e; }
.b-ez { fill: #ff5a36; }
.b-line { stroke: #fff; stroke-width: .35; } .b-line.goal { stroke-width: .5; } .b-line.mid { stroke-width: .55; }
.b-line.norun { stroke-dasharray: 1 .8; stroke-width: .3; opacity: .85; }
.b-tick { stroke: #fff; stroke-width: .18; opacity: .8; }
.b-edge { fill: none; stroke: #fff; stroke-width: .5; }
.b-zone { fill: var(--volt); opacity: .38; animation: zpulse 1.4s ease-in-out infinite alternate; }
.b-zone.cool { fill: #fff; opacity: .22; animation: none; }
@keyframes zpulse { to { opacity: .2; } }
.b-p .b-dot { stroke: #15171c; stroke-width: .35; }
.b-p.o .b-dot { fill: #ff5a36; } .b-p.d .b-dot { fill: #2f5bff; }
.b-p .b-lab { font: 800 1.35px var(--sans); fill: #fff; pointer-events: none; }
.b-flag { fill: #d8ff3a; stroke: #15171c; stroke-width: .15; transition: transform .5s cubic-bezier(.2,1.4,.4,1), opacity .5s; transform-box: fill-box; transform-origin: center; }
.b-flag.pulled { transform: translate(3px, -3px) rotate(160deg); opacity: 0; }
.b-p.you .b-dot { stroke: #d8ff3a; stroke-width: .6; }
.b-p.hi .b-dot { stroke: #d8ff3a; stroke-width: .7; animation: hi 1s ease-in-out infinite alternate; }
@keyframes hi { to { stroke-width: .25; } }
.b-ball { pointer-events: none; }
.b-chalk path:first-child { stroke: #fff; stroke-width: .45; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.b-chalk .b-arrow { fill: #fff; opacity: .9; }
.b-chalk.answer path:first-child { stroke: #d8ff3a; stroke-width: .6; } .b-chalk.answer .b-arrow { fill: #d8ff3a; }
.b-chalk.faint { opacity: .45; }
.b-chalk.sight path:first-child { stroke: #d8ff3a; stroke-dasharray: .9 .6; }
.b-chalk.arm path:first-child { stroke: #15171c; stroke-width: .8; }
.b-cap rect { fill: #15171c; }
.b-cap text { font: 800 1.25px var(--sans); fill: #fff; }
.b-cap.big rect { display: none; } .b-cap.big text { font: 900 3.2px var(--display); fill: #fff; stroke: #15171c; stroke-width: .35; paint-order: stroke; }
.b-cap.hand rect { display: none; } .b-cap.hand text { font-size: 2px; }
.b-cone path { fill: #ff8a1f; stroke: #15171c; stroke-width: .2; }
.b-t { cursor: pointer; animation: tin .35s calc(var(--i) * .06s) both cubic-bezier(.34,1.56,.64,1); }
@keyframes tin { from { opacity: 0; } }
.b-t.zone rect { fill: rgba(216,255,58,.16); stroke: #d8ff3a; stroke-width: .45; stroke-dasharray: 1.2 .7; animation: dash 1.2s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -3.8; } }
.b-t.zone:hover rect { fill: rgba(216,255,58,.32); }
.b-t .ring { fill: none; stroke: #d8ff3a; stroke-width: .55; transform-box: fill-box; transform-origin: center; animation: ring 1s ease-in-out infinite alternate; }
.b-t.spot .ring { fill: rgba(216,255,58,.45); stroke: #15171c; stroke-width: .3; }
@keyframes ring { to { transform: scale(1.18); } }
.b-t .hit { fill: transparent; }
.b-t.chip rect { fill: #fff; stroke: #15171c; stroke-width: .35; }
.b-t.chip text { font: 800 1.7px var(--sans); fill: #15171c; pointer-events: none; }
.b-t.chip:hover rect { fill: #f3ffd0; }
.b-t.right .ring, .b-t.right.zone rect, .b-t.right.chip rect { stroke: #fff; fill: rgba(35,129,60,.85); animation: none; }
.b-t.right.chip text { fill: #fff; }
.b-t.wrong .ring, .b-t.wrong.zone rect, .b-t.wrong.chip rect { stroke: #fff; fill: rgba(232,70,31,.85); animation: none; }
.b-t.wrong.chip text { fill: #fff; }
.b-t.gone { opacity: .15; pointer-events: none; }
.b-t.right, .b-t.wrong { pointer-events: none; }

/* done + playbook */
.done { display: grid; justify-items: center; gap: 8px; text-align: center; padding-top: 10px; }
.stars { display: flex; gap: 8px; font-size: 62px; line-height: 1; }
.stars span { color: var(--paper2); -webkit-text-stroke: 3px var(--ink); animation: pop .5s calc(var(--i) * .18s + .2s) both cubic-bezier(.34,1.56,.64,1); }
.stars span.on { color: var(--volt); }
@keyframes pop { from { transform: scale(0) rotate(-30deg); } }
.newpage { width: 100%; text-align: left; margin-top: 10px; }
.page { display: block; padding: 16px 18px; background: var(--white); border: var(--bw) solid var(--ink); border-radius: 6px 18px 18px 6px; box-shadow: var(--lift); text-decoration: none; position: relative; }
.page::before { content: ""; position: absolute; left: 10px; top: 14px; bottom: 14px; width: 6px; background: repeating-linear-gradient(180deg, var(--ink) 0 6px, transparent 6px 22px); border-radius: 3px; opacity: .8; }
.page header { display: flex; align-items: center; gap: 10px; padding-left: 14px; }
.page header b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--ink); color: var(--volt); font: 900 20px var(--display); }
.page h3 { font-size: 28px; }
.page ul { margin: 10px 0 0; padding-left: 34px; }
.page li { margin: 6px 0; font-size: 16px; }
.page-art { margin: 12px 0 0 14px; border-radius: 12px; overflow: hidden; }
.page.ghost { background: var(--paper2); box-shadow: none; }
.page.ghost p { margin: 8px 0 0 14px; color: var(--ink3); }
.pg-plays { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pg-plays figure { margin: 0; } .pg-plays figcaption { font: 800 12px var(--sans); text-align: center; margin-top: 2px; }
.book-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.book-head h1 { font-size: 46px; }
.pages { display: grid; gap: 14px; margin-top: 20px; }

/* paywall */
.unlock { display: grid; gap: 18px; }
.unlock h1 { font-size: clamp(40px, 9vw, 60px); margin: 6px 0 14px; }
.kit { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kit li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--white); border: 2px solid var(--ink); border-radius: 12px; font-weight: 700; }
.kit b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--volt); border: 1.5px solid var(--ink); font: 900 15px var(--display); }
.unlock-r { padding: 20px; display: grid; gap: 10px; }
.price { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin: 0; }
.price b { font: 900 72px/1 var(--display); } .price span { font-weight: 700; color: var(--ink2); }

/* modal, toast */
.modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgba(21,23,28,.45); }
.modal-in { position: relative; width: min(420px, 100%); padding: 22px; }
.modal-in h2 { font-size: 40px; margin: 4px 0 8px; }
.modal-x { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border: 2px solid var(--ink); border-radius: 50%; background: var(--white); cursor: pointer; }
.toast { position: fixed; z-index: 90; left: 50%; bottom: 30px; transform: translateX(-50%); padding: 12px 18px; background: var(--ink); color: var(--white); border-radius: 14px; font-weight: 600; }

@media (min-width: 900px) {
  .screen.play { width: min(1000px, 100%); max-width: none; display: block; }
  .stage { display: grid; grid-template-columns: minmax(0, 1fr) 360px; grid-template-rows: auto 1fr; gap: 14px 28px; height: 100%; }
  .stage .st-top { grid-column: 2; grid-row: 1; }
  .stage .boardwrap { grid-column: 1; grid-row: 1 / span 2; }
  .stage .st-bot { grid-column: 2; grid-row: 2; }
  .unlock { grid-template-columns: 1fr 300px; align-items: start; }
  .screen:has(.unlock) { width: min(900px, 100%); }
}
@media print {
  .top, .book-head .btn, .page.ghost { display: none !important; }
  .page { break-inside: avoid; box-shadow: none; }
}
