:root{--ink:#161616;--paper:#fbf8f1;--hot:#e4572e;--soft:#bdb7ab}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;height:100%;background:var(--paper);font-family:'Patrick Hand',cursive;color:var(--ink);overflow:hidden;overscroll-behavior:none}
#frame{position:fixed;top:0;right:0;bottom:0;left:0;margin:auto;width:100%;max-width:1180px;max-height:860px;display:flex;flex-direction:column;background:var(--paper)}
@media (min-width:1240px) and (min-height:900px){#frame{border-radius:10px;box-shadow:0 10px 40px rgba(0,0,0,.10)} body{background:#ece7dc}}
#hud{flex:none;display:flex;justify-content:space-between;align-items:center;gap:8px;padding:calc(8px + env(safe-area-inset-top)) 14px 6px;font-size:15px;letter-spacing:.06em;color:#666}
#brand{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#dots{white-space:nowrap}#dots i{display:inline-block;width:9px;height:9px;border:2px solid var(--ink);border-radius:50%;margin:0 2px;transition:.3s}
#dots i.on{background:var(--ink)}#dots i.cur{background:var(--hot);border-color:var(--hot);transform:scale(1.3)}
#dots .count{display:none;font-size:16px}
#right{display:flex;align-items:center;white-space:nowrap}
#snd{font-size:18px;background:none;border:2px solid var(--ink);border-radius:50%;width:40px;height:40px;margin-left:10px;cursor:pointer}
#stage{position:relative;flex:1;min-height:0}
.scene{position:absolute;inset:0;display:flex;flex-direction:column;padding:0 16px calc(12px + env(safe-area-inset-bottom))}
.top{flex:none;text-align:center}.mid{position:relative;flex:1;min-height:120px;display:flex;align-items:center;justify-content:center}
.fbz{flex:none;text-align:center;min-height:0}.bot{flex:none}
.words{font-size:clamp(20px,2.6vw + 8px,31px);line-height:1.25;margin:6px auto 0;max-width:820px}
.words b{color:var(--hot);font-weight:normal}
.words.fb{font-size:clamp(18px,1.8vw + 8px,26px);margin:6px auto}
.big{font-size:clamp(38px,6vw,64px);line-height:1.05;margin:8px 0}
.kicker{font-size:17px;letter-spacing:.18em;color:var(--hot)}.sub{font-size:clamp(19px,2vw + 8px,26px);color:#555;margin-top:6px}
.note{font-size:15px;color:#888;margin-top:6px}
.score{font-size:clamp(18px,2vw + 6px,26px);margin-top:4px}
.btns{display:flex;flex-wrap:wrap;justify-content:center;gap:12px;margin-top:8px}
.btn{font:inherit;font-size:clamp(18px,1.6vw + 8px,24px);min-height:52px;padding:8px 22px;background:#fff;border:3px solid var(--ink);border-radius:14px;cursor:pointer;box-shadow:4px 5px 0 var(--ink);transition:transform .12s,box-shadow .12s;line-height:1.15;max-width:440px}
.btn:hover{transform:translate(-2px,-2px);box-shadow:6px 7px 0 var(--ink)}
.btn:active{transform:translate(3px,4px);box-shadow:1px 1px 0 var(--ink)}
.btn.hot{background:var(--ink);color:#fff;box-shadow:4px 5px 0 var(--hot)}
.btn[disabled]{opacity:.35;pointer-events:none}
svg.art{position:absolute;inset:0;width:100%;height:100%}
.ink{fill:none;stroke:var(--ink);stroke-width:3.2;stroke-linecap:round;stroke-linejoin:round}
.fillw{fill:#fff}.hotf{fill:var(--hot);stroke:none}
.lbl{font-family:'Patrick Hand';font-size:22px;fill:var(--ink)}.bubble{font-family:'Patrick Hand';font-size:20px}
.clickable{cursor:pointer}.grab{cursor:grab}
.card{position:relative;z-index:2;width:100%;background:#fff;border:3px solid var(--ink);border-radius:14px;padding:14px 18px;box-shadow:5px 6px 0 var(--ink);font-size:clamp(18px,1.6vw + 8px,22px);line-height:1.3;max-height:100%;overflow:auto}
.cardhead{font-size:15px;color:#888;letter-spacing:.04em;margin-bottom:6px}
.postbody{font-size:clamp(19px,1.6vw + 9px,23px)}.cmt{font-size:18px;border-top:1.5px dashed #ccc;padding:4px 0}.react{font-size:15px;color:#777;margin-top:6px}
.chip{font:inherit;font-size:18px;min-height:48px;padding:6px 12px;background:#fff;border:3px solid var(--ink);border-radius:10px;box-shadow:3px 4px 0 var(--ink);cursor:pointer}
.row{display:flex;gap:12px;width:100%;max-width:860px;justify-content:center;align-items:stretch}
.row .card{flex:1;text-align:center;cursor:pointer;padding:12px 10px}
.row .card:hover{transform:translate(-2px,-2px) rotate(-1deg)}
a{color:#1a56c4}
/* phones */
@media (max-width:700px){
  #brand{font-size:13px;max-width:52%}#dots i{display:none}#dots .count{display:inline}
  .btns{flex-direction:column;align-items:stretch;gap:9px}.btn{max-width:none;width:100%;font-size:19px;padding:8px 14px}
  .btns.chips{flex-direction:row;flex-wrap:wrap}.btns.chips .chip{flex:1 1 45%}
  .row{flex-direction:column;gap:8px}.row .card{flex:none;text-align:left;font-size:17px}.row .card div[style*="font-size:44px"]{font-size:28px!important;display:inline;margin-right:6px}
  .lbl{font-size:26px}.bubble{font-size:24px}
}
/* phone landscape: short screens */
@media (max-height:500px){
  #hud{padding-top:4px;padding-bottom:2px}.words{font-size:19px;margin-top:2px}.words.fb{font-size:17px;margin:2px auto}
  .big{font-size:32px}.sub{font-size:17px}.btns{flex-direction:row;flex-wrap:wrap;gap:8px;margin-top:4px}.btn{width:auto;min-height:44px;font-size:17px;padding:4px 14px}
  .row{flex-direction:row}.card{font-size:16px;padding:8px 12px}.postbody{font-size:17px}
}
.score{width:auto!important}
.mid{overflow:auto;align-items:safe center}
.row .card{max-width:none!important}
svg.art{overflow:visible}
@media (max-width:700px){.bubble{font-size:22px}}

/* ---- Batch 1: header, progress, sound intro, pitch buttons ---- */
#hud{display:flex;justify-content:space-between;align-items:center;padding:calc(8px + env(safe-area-inset-top)) calc(14px + env(safe-area-inset-right)) 6px calc(14px + env(safe-area-inset-left));min-height:52px}
#left{display:flex;gap:12px;align-items:baseline;white-space:nowrap}#brand{font-size:16px;letter-spacing:.14em;color:var(--hot)}
#dots{font-size:15px;color:#999;letter-spacing:.04em}
#clock{font-size:16px;font-variant-numeric:tabular-nums;color:#555}#snd{flex:none}
#pbar{flex:none;height:4px;background:#ece7dc;margin:0 14px}#prog{display:block;height:100%;width:0;background:var(--hot);border-radius:2px;transition:width .4s}
@media (max-width:420px){#clock .cl{display:none}#clock::before{content:'⏳ '}}
.scene{padding-bottom:calc(14px + env(safe-area-inset-bottom))}
.btn .cat{color:var(--hot);font-weight:normal}
.btns.pitches .btn{font-size:clamp(17px,1.4vw + 8px,21px);text-align:left}
.note{font-size:clamp(16px,1vw + 9px,19px);color:#777;line-height:1.3}
.tally{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin:6px auto;font-size:clamp(17px,1.4vw + 8px,22px)}
.tally div{border:2.5px solid var(--ink);border-radius:10px;padding:4px 12px;background:#fff}.tally span{color:var(--hot);margin-right:8px}
.score{text-align:center}.score.day{font-size:clamp(24px,2vw + 14px,34px)}
#sintro{position:fixed;inset:0;z-index:50;background:radial-gradient(circle 34px at var(--cx) var(--cy),transparent 30px,rgba(15,15,15,.9) 34px);font-family:'Patrick Hand',cursive}
#sintro .sarrow{position:absolute}#sintro .scard{position:absolute;left:50%;transform:translateX(-50%);width:min(92vw,440px);text-align:center;color:#fff}
.stitle{font-size:32px}.ssub{font-size:19px;opacity:.85;margin:4px 0 12px}
#sintro .btn{color:var(--ink)}#sintro .btn.hot{background:#fff;color:var(--ink);box-shadow:4px 5px 0 var(--hot)}
@media (max-width:700px){#sintro .btns{flex-direction:column}}
@media (max-height:500px){#sintro .scard{top:auto!important;bottom:12px}#sintro .sarrow{display:none}.note{font-size:15px}.tally{font-size:16px}}
@media (max-height:500px){
  .mid{min-height:70px}.score{font-size:16px;margin:0}.score.day{font-size:20px}
  .btns.pitches{flex-wrap:nowrap}.btns.pitches .btn{font-size:14px;min-height:40px;padding:4px 8px;flex:1 1 0}
  .big{font-size:28px;margin:2px 0}.kicker{font-size:13px}.note{font-size:14px}
  .tally{margin:2px auto;font-size:14px}.tally div{padding:2px 8px}
  #hud{min-height:40px}#snd{width:34px;height:34px}
}
@media (max-width:700px){#brand{max-width:none;overflow:visible}}
@media (max-height:500px){.scene{padding-bottom:calc(6px + env(safe-area-inset-bottom))}.mid{min-height:50px}.tally{flex-wrap:nowrap;gap:6px}.btns{margin-top:2px}}

.btns .btn{animation:btnin .4s both}@keyframes btnin{from{opacity:0;translate:0 16px}to{opacity:1;translate:0 0}}
/* portrait: compact pitch buttons so the drawing gets the room */
@media (max-width:700px){
  .btns.pitches .btn{min-height:44px;font-size:17px;padding:6px 12px}
  .btns.r2{flex-direction:row;flex-wrap:wrap}.btns.r2 .btn{flex:1 1 30%;font-size:15px;padding:4px 6px;text-align:center}.btns.r2 .btn.hot{flex:1 1 100%;font-size:19px}
  .words.fb{font-size:18px}
}
