/* ball-chute.css: look of the Ball Chute page. Night factory floor, steel pipes, enamel balls. */
.bc{--bc-bg:#11151a;--bc-panel:#1a2028;--bc-line:#2c3540;--bc-ink:#e9e2cf;--bc-mute:#9aa6b0;--bc-hot:#ee5a3c;
  color:var(--bc-ink);font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;max-width:420px;margin:0 auto;
  padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
.bc *{box-sizing:border-box}
.bc-h1{font-size:1rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--bc-mute);margin:0 0 .5rem}
.bc-hud{display:grid;grid-template-columns:1fr auto auto;gap:.5rem;align-items:center;min-height:48px;margin-bottom:.4rem}
.bc-hud .l{display:flex;flex-direction:column;gap:2px;min-width:0}
#bc-level{font-weight:700;font-size:.95rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#bc-score{font-weight:800;font-size:1.5rem;line-height:1;font-variant-numeric:tabular-nums}
.bc-lives{display:flex;gap:6px}
.bc-pip{width:14px;height:14px;border-radius:50%;background:var(--bc-ink);border:2px solid #0b0e11;display:block}
.bc-pip.lost{background:transparent;border-color:#5a2a22}
.bc-btns{display:flex;gap:6px}
.bc-icon{width:48px;height:48px;border-radius:12px;border:2px solid var(--bc-line);background:var(--bc-panel);color:var(--bc-ink);
  display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0;touch-action:manipulation}
.bc-icon svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.bc-icon.off{color:var(--bc-hot)}
.bc-sub-hud{display:flex;justify-content:space-between;color:var(--bc-mute);font-size:.85rem;min-height:1.3em;margin-bottom:.3rem}
.bc-tip{font-size:.9rem;color:var(--bc-ink);min-height:2.6em;line-height:1.3;margin:0 0 .4rem}
.bc-stage{position:relative;margin:0 auto;border-radius:14px;overflow:hidden;border:2px solid #0b0e11;box-shadow:0 0 0 2px var(--bc-line);background:#11151a}
#bc-cv{display:block;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}
.bc-ov{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(10,12,15,.78);overflow-y:auto;padding:10px}
.bc-ov[hidden]{display:none}
.bc-panel{width:100%;max-width:300px;display:flex;flex-direction:column;gap:8px;align-items:stretch;text-align:center;margin:auto}
.bc-panel.wide{max-width:340px}
.bc-logo{margin:0;font-size:2.3rem;font-weight:900;letter-spacing:.02em;line-height:1;color:var(--bc-ink);text-shadow:0 3px 0 #0b0e11,0 0 0 #000}
.bc-logo.small{font-size:1.6rem}
.bc-sub{margin:0;font-size:.92rem;color:#c9c4b3;line-height:1.35}
.bc-best,.bc-how{margin:0;font-size:.8rem;color:var(--bc-mute);line-height:1.35}
.bc-btn{min-height:48px;border-radius:12px;border:2px solid var(--bc-line);background:var(--bc-panel);color:var(--bc-ink);font:inherit;font-weight:700;
  font-size:1rem;cursor:pointer;padding:.5rem .8rem;display:flex;flex-direction:column;align-items:center;justify-content:center;touch-action:manipulation}
.bc-btn small{font-weight:500;font-size:.75rem;color:var(--bc-mute)}
.bc-btn.main{background:var(--bc-hot);border-color:#8f2a16;color:#1a0d09;font-size:1.1rem}
.bc-btn:focus-visible,.bc-icon:focus-visible,.bc-lv:focus-visible{outline:3px solid #fff;outline-offset:2px}
.bc-btn:active,.bc-icon:active{transform:translateY(1px)}
.bc-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.bc-big{margin:0;font-size:2.4rem;font-weight:900;font-variant-numeric:tabular-nums;line-height:1}
.bc-big small{display:block;font-size:.8rem;font-weight:600;color:var(--bc-mute)}
.bc-stars{display:inline-flex;gap:6px;justify-content:center}
.bc-star{width:26px;height:26px;background:#2c3540;clip-path:polygon(50% 0,62% 36%,100% 38%,70% 60%,80% 100%,50% 76%,20% 100%,30% 60%,0 38%,38% 36%);display:block}
.bc-star.on{background:#f2b631}
.bc-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;max-height:46vh;overflow-y:auto;padding:2px}
.bc-lv{min-height:56px;border-radius:12px;border:2px solid var(--bc-line);background:var(--bc-panel);color:var(--bc-ink);cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font:inherit;touch-action:manipulation}
.bc-lv .bc-star{width:12px;height:12px}
.bc-lv .bc-stars{gap:2px}
.bc-noscript{padding:1rem;color:var(--bc-ink)}
@media (prefers-reduced-motion:reduce){.bc-btn:active,.bc-icon:active{transform:none}}
.bc-panel{background:linear-gradient(180deg,rgba(26,32,40,.94),rgba(17,21,26,.94));border:2px solid var(--bc-line);border-radius:16px;padding:14px 12px;animation:bc-pop .22s ease-out}
.bc-star.on{animation:bc-star .45s ease-out both}
.bc-star.on:nth-child(2){animation-delay:.12s}.bc-star.on:nth-child(3){animation-delay:.24s}
.bc-stage{background:radial-gradient(ellipse at 50% 30%,#1b232c,#0c0f13)}
@keyframes bc-pop{from{transform:scale(.94);opacity:0}to{transform:none;opacity:1}}
@keyframes bc-star{0%{transform:scale(0)}70%{transform:scale(1.3)}100%{transform:scale(1)}}
@media (prefers-reduced-motion:reduce){.bc-panel,.bc-star.on{animation:none}}

/* full screen: fill the stage, hide intro chrome, centre the board */
html.pip-immersive .game-wrap,html.pip-native .game-wrap{max-width:none;padding:6px 8px;display:flex;flex-direction:column}
html.pip-immersive .bc,html.pip-native .bc{max-width:none;width:100%;flex:1;min-height:0;display:flex;flex-direction:column}
html.pip-immersive .bc-h1,html.pip-native .bc-h1,html.pip-immersive .bc-tip:empty,html.pip-native .bc-tip:empty{display:none}
html.pip-immersive .bc-tip,html.pip-native .bc-tip{min-height:0;margin:0 0 .3rem;font-size:.85rem}
html.pip-immersive .bc-hud,html.pip-native .bc-hud{margin-bottom:.2rem}
html.pip-immersive .bc-stage,html.pip-native .bc-stage{flex:1;min-height:0;width:100%;display:flex;align-items:center;justify-content:center}
html.pip-immersive .bc-grid,html.pip-native .bc-grid{max-height:60vh}
@media (orientation:landscape) and (max-height:500px){html.pip-immersive .bc-hud,html.pip-native .bc-hud{min-height:44px}html.pip-immersive .bc-sub-hud,html.pip-native .bc-sub-hud{display:none}html.pip-immersive .bc-grid,html.pip-native .bc-grid{max-height:50vh;grid-template-columns:repeat(6,1fr)}}
.bc-stage::after{content:"";position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 0 40px rgba(0,0,0,.45);border-radius:12px}

/* full screen v2: tighter gutters, board as large as its aspect allows */
html.pip-immersive .game-wrap,html.pip-native .game-wrap{padding:2px max(4px,env(safe-area-inset-right)) max(2px,env(safe-area-inset-bottom)) max(4px,env(safe-area-inset-left))}
html.pip-immersive .bc,html.pip-native .bc{padding-left:0;padding-right:0}
html.pip-immersive .bc-stage,html.pip-native .bc-stage{border:0;border-radius:10px;box-shadow:none}
html.pip-immersive .bc-hud,html.pip-native .bc-hud{min-height:48px;margin-bottom:0}
@media (orientation:landscape) and (max-height:500px){
  html.pip-immersive .bc,html.pip-native .bc{display:grid;grid-template-columns:132px minmax(0,1fr);grid-template-rows:auto auto 1fr;column-gap:6px;align-content:start}
  html.pip-immersive .bc-hud,html.pip-native .bc-hud{grid-column:1;grid-row:1;display:flex;flex-direction:column;align-items:flex-start;gap:6px;margin:0}
  html.pip-immersive .bc-sub-hud,html.pip-native .bc-sub-hud{grid-column:1;grid-row:2;display:flex;flex-direction:column;gap:2px;margin:0}
  html.pip-immersive .bc-tip,html.pip-native .bc-tip{grid-column:1;grid-row:3;margin:0}
  html.pip-immersive .bc-stage,html.pip-native .bc-stage{grid-column:2;grid-row:1 / span 3;height:100%;min-height:0}
  html.pip-immersive .bc-noscript,html.pip-native .bc-noscript{grid-column:1}
}
