:root{--ink:#0e1c22;--slate:#16313b;--chalk:#f1ead8;--orange:#ff7a3d;--mustard:#e6b422;--sage:#9bc4a0;--sky:#7fb7d6}
.cc{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;color:var(--chalk)}
.cc button{font-family:inherit;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.cc-bar{display:flex;align-items:center;gap:.5rem;margin-bottom:.5rem}
.cc-bar #cc-wall{flex:1;min-width:0;font-size:.82rem;font-weight:700;letter-spacing:.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--chalk)}
.cc-tool{min-height:44px;min-width:44px;padding:0 .8rem;border-radius:12px;border:2px solid rgba(241,234,216,.5);background:var(--slate);color:var(--chalk);font-size:.8rem;font-weight:700;cursor:pointer}
.cc-tool[aria-pressed="false"]{opacity:.7}
.cc-tool:disabled{opacity:.35;cursor:default}
.cc-streak{display:inline-block;margin:.3rem 0;padding:.25rem .7rem;border-radius:999px;background:rgba(255,122,61,.18);border:1px solid rgba(255,122,61,.55);color:#ffb08a;font-size:.82rem;font-weight:700}
.cc-goal{height:8px;border-radius:4px;background:#2b4752;overflow:hidden;margin:.3rem auto;max-width:220px}
.cc-goal i{display:block;height:100%;background:var(--orange)}
.cc-card{animation:cc-rise .28s ease-out}
@keyframes cc-rise{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
.cc-score.pop{animation:cc-pop .5s ease-out}
@keyframes cc-pop{0%{transform:scale(.6)}60%{transform:scale(1.15)}100%{transform:scale(1)}}
.cc-stage{position:relative;height:clamp(380px,calc(100svh - 250px),640px);border-radius:18px;overflow:hidden;background:var(--ink);border:2px solid #2b4752;box-shadow:0 6px 0 #091418}
.cc-stage canvas{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:none;outline:none;cursor:pointer}
.cc-panel{position:absolute;inset:0;overflow:auto;-webkit-overflow-scrolling:touch;background:rgba(14,28,34,.9);display:flex;padding:max(.75rem,env(safe-area-inset-top)) .75rem max(.75rem,env(safe-area-inset-bottom))}
.cc-panel[hidden]{display:none}
.cc-card{margin:auto;width:100%;max-width:340px;text-align:center}
.cc-card h2{font-size:1.7rem;font-weight:800;letter-spacing:.01em;margin-bottom:.4rem;color:var(--chalk)}
.cc-lead{font-size:.92rem;line-height:1.45;margin-bottom:.8rem;color:#d8d2c2}
.cc-dim{color:#9fb3b9;font-size:.78rem}
.cc-info{margin:.55rem 0;line-height:1.4}
.cc-btn{min-height:48px;padding:.5rem 1rem;border-radius:14px;border:2px solid rgba(241,234,216,.55);background:var(--slate);color:var(--chalk);font-size:.95rem;font-weight:700;cursor:pointer}
.cc-btn:disabled{opacity:.4;cursor:default}
.cc-btn.cc-primary{display:block;width:100%;margin:.6rem 0;min-height:56px;font-size:1.15rem;background:var(--orange);border-color:#ffb08a;color:#1a0d06;box-shadow:0 4px 0 #a8441a}
.cc-btn.cc-primary:active{transform:translateY(3px);box-shadow:0 1px 0 #a8441a}
.cc-btn.cc-small{min-width:48px;font-size:1.5rem;padding:0}
.cc-pick{display:flex;align-items:center;gap:.5rem;margin:.4rem 0}
.cc-pickmid{flex:1;display:flex;flex-direction:column;gap:2px;font-size:.88rem;min-width:0}
.cc-pickmid strong{font-size:1.05rem}
.cc-row{display:flex;gap:.5rem;justify-content:center;flex-wrap:wrap}
.cc-row .cc-btn{flex:1;min-width:130px}
.cc-stars{display:inline-flex;gap:5px;justify-content:center;margin:.2rem 0}
.cc-stars i{width:18px;height:18px;background:#2b4752;clip-path:polygon(50% 0,62% 36%,100% 38%,70% 60%,80% 100%,50% 76%,20% 100%,30% 60%,0 38%,38% 36%)}
.cc-stars i.on{background:#ffd23f}
.cc-score{font-size:2.6rem;font-weight:800;line-height:1.1;margin:.3rem 0;color:#ffd23f}
.cc-tag{font-weight:700;color:var(--sage);margin:.2rem 0}
.cc-chalks{display:flex;align-items:center;justify-content:center;gap:.4rem;margin-top:.5rem}
.cc-chalk{width:44px;height:44px;border-radius:50%;padding:0;border:3px solid #2b4752;background:var(--c)}
.cc-chalk.sel{border-color:var(--orange)}
.cc-chalk:disabled{opacity:.25}
.cc-board{list-style:none;margin:.5rem 0 1rem;padding:0;text-align:left}
.cc-board li{display:flex;justify-content:space-between;padding:.55rem .2rem;border-bottom:1px dashed rgba(241,234,216,.25);font-size:.92rem}
.cc-board li.cur{color:#ffd23f}
.cc-help{font-size:.78rem;color:#9fb3b9;min-height:1.2em;margin-top:.4rem}
.cc-about{margin-top:1.2rem;color:#d8d2c2;font-size:.9rem;line-height:1.55}
.cc-about h2{font-size:1.05rem;margin:.9rem 0 .3rem;color:var(--chalk)}
.cc-about ul{padding-left:1.1rem}
.cc button:focus-visible,.cc-tool:focus-visible{outline:3px solid var(--mustard);outline-offset:2px}
/* full screen: the stage fills the screen, the wall takes all the room under the dock */
html.pip-immersive .game-wrap,html.pip-native .game-wrap,.game-wrap:fullscreen{display:flex;flex-direction:column;padding:max(.4rem,env(safe-area-inset-top)) max(.5rem,env(safe-area-inset-right)) max(.4rem,env(safe-area-inset-bottom)) max(.5rem,env(safe-area-inset-left));overflow:hidden}
html.pip-immersive .cc,html.pip-native .cc,.game-wrap:fullscreen .cc{flex:1;min-height:0;display:flex;flex-direction:column}
html.pip-immersive .cc-stage,html.pip-native .cc-stage,.game-wrap:fullscreen .cc-stage{flex:1;min-height:0;height:auto;border-radius:14px;box-shadow:none}
html.pip-immersive .cc-about,html.pip-native .cc-about,.game-wrap:fullscreen .cc-about,html.pip-immersive .cc-help,html.pip-native .cc-help{display:none}
html.pip-immersive .cc-bar,html.pip-native .cc-bar{margin-bottom:.35rem}
@media (orientation:landscape) and (max-height:520px){html.pip-immersive .cc-card h2,html.pip-native .cc-card h2{font-size:1.25rem;margin-bottom:.2rem}html.pip-immersive .cc-lead,html.pip-native .cc-lead{margin-bottom:.4rem;font-size:.82rem}}
@media (prefers-reduced-motion:reduce){.cc *{animation:none!important;transition:none!important}}
