/* Ball Launch-only bits on top of /arcade/arcade.css (the shared board-game chrome). */
.bl-levels button { min-width: 44px; padding: 0 12px; }
.bl-levels .stars { display: block; font-size: .62rem; line-height: 1; letter-spacing: -1px; margin-top: -2px; }
.bl .arc-board canvas { aspect-ratio: 16 / 9; touch-action: none; cursor: grab; }
.bl .arc-board canvas.aiming { cursor: grabbing; }
/* Header badge = the Super Rocko sticker: a wide flying pose on a square canvas, so
   show it 3:2 and crop the empty space above and below him (sizes follow arcade.css). */
.bl .arc-title-badge { width: auto; aspect-ratio: 3 / 2; object-fit: cover; }
/* 10 levels + endless + bonus don't fit one row on a phone held upright: wrap instead of
   pushing the whole page sideways. */
.bl-levels { flex-wrap: wrap; justify-content: center; max-width: 100%; border-radius: 22px; }
/* scene picker (🎨): unlockable backdrops */
.bl-scenes { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-top: 10px; }
.bl-scene { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; border-radius: 16px; border: 2px solid #E7DCC6;
  background: #FFFDF7; cursor: pointer; font: 700 1rem Fredoka, sans-serif; color: #1c2434; }
.bl-scene .ic { font-size: 2rem; line-height: 1; }
.bl-scene small { font: 600 .78rem Nunito, sans-serif; color: #6b6557; }
.bl-scene.on { border-color: #FFC93C; box-shadow: 0 0 0 3px rgba(255,201,60,.5); }
.bl-scene.locked { opacity: .55; cursor: default; }
/* the main menu: bigger, bouncier tiles; Play first and gold */
.bl-menu { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.bl-menu .bl-scene { padding: 16px 10px; transition: transform .12s ease; }
.bl-menu .bl-scene:hover, .bl-menu .bl-scene:focus-visible { transform: translateY(-3px) rotate(-1deg); }
.bl-menu .bl-scene .ic { font-size: 2.6rem; }
.bl-menu .bl-scene > span:nth-child(2) { font: 700 1.1rem Fredoka, sans-serif; }
.bl-menu .bl-scene.go { grid-column: 1 / -1; flex-direction: row; justify-content: center; gap: 14px; background: #FFC93C; border-color: #E0A92B; }
.bl-menu .bl-scene.go .ic { font-size: 2.2rem; } .bl-menu .bl-scene.go small { color: #5a4a14; }
/* the difficulty chooser in the main menu */
.bl-diff { display: flex; gap: 8px; margin-top: 6px; }
.bl-diff button { flex: 1; min-height: 46px; border-radius: 999px; border: 2px solid #E7DCC6; background: #FFFDF6; font: 700 1rem Fredoka, sans-serif; color: #1c2434; cursor: pointer; }
.bl-diff button.on { background: #3A8FE0; border-color: #1F5FA8; color: #FFFFFF; box-shadow: 0 3px 0 #1F5FA8; }
.bl-diff-note { margin: 6px 2px 0; font: 600 .85rem Nunito, sans-serif; color: #6b6557; }
@media (max-height: 520px) {   /* a phone held sideways: four across, compact, so the whole menu fits */
  .bl-menu { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .bl-menu .bl-scene { padding: 8px 4px; gap: 2px; } .bl-menu .bl-scene .ic { font-size: 1.7rem; } .bl-menu .bl-scene small { display: none; }
  .bl-menu .bl-scene > span:nth-child(2) { font-size: .95rem; } .bl-menu .bl-scene.go { padding: 8px; } .bl-menu .bl-scene.go small { display: inline; }
}
.bl-scenes-h { margin: 14px 0 2px; font: 700 1rem Fredoka, sans-serif; color: #1c2434; }
/* Ball Closet (the row under the game): pick your ball; locked ones greyed with a lock */
.bl-closet { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 12px auto 0; max-width: 100%; }
.bl-closet[hidden] { display: none; }
.bl-ball { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 72px; min-height: 72px; padding: 6px 8px;
  border-radius: 18px; border: 2px solid #E7DCC6; background: #FFFDF7; cursor: pointer; font: 700 .8rem Fredoka, sans-serif; color: #1c2434; }
.bl-ball img { width: 40px; height: 40px; }
.bl-ball[aria-pressed="true"] { border-color: #FFC93C; box-shadow: 0 0 0 3px rgba(255,201,60,.55); background: #FFF6D8; }
.bl-ball.locked img { filter: grayscale(1); opacity: .5; }
.bl-ball.locked span { color: #8a826f; }
.bl-ball i { position: absolute; top: 2px; right: 4px; font-style: normal; font-size: .9rem; }
.bl-ball-more .ic { font-size: 1.9rem; line-height: 40px; }
.bl-scene img { display: block; }
/* the closet has its own slot in the side rail (computers + phones held sideways) */
@media (min-width: 980px) {
  .bl .arc-stage { grid-template-areas: "board msg" "board actions" "board tools" "board closet" "board ."; grid-template-rows: auto auto auto auto 1fr; }
  .bl .bl-closet { grid-area: closet; margin: 14px 0 0; }
}
/* phones held sideways: the rail is short, so the closet goes compact (icons only, still big
   enough to tap) and the duplicate "Try again" button goes: the 🔄 Retry pill in the top bar
   does the same job. Keeps every button off the game and the game as big as it can be. */
@media (orientation: landscape) and (max-height: 600px) {
  .bl .arc-stage { grid-template-areas: "board msg" "board actions" "board tools" "board closet" "board ."; grid-template-rows: auto auto auto auto 1fr; }
  .bl .arc-tools { display: none; }
  .bl .bl-closet { grid-area: closet; display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin: 4px 0 0; }
  .bl .bl-ball { min-width: 0; min-height: 44px; padding: 3px; border-radius: 12px; }
  .bl .bl-ball img { width: 28px; height: 28px; }
  .bl .bl-ball span { display: none; }
  .bl .bl-ball-more .ic { font-size: 1.5rem; line-height: 30px; display: block; }
}
/* "🔑 Have a code?" box at the bottom of the Help and Scene screens */
.bl-code { margin: 18px 0 0; padding: 12px 14px; border-radius: 16px; background: #FFF6DA; border: 2px dashed #FFC93C; }
.bl-code label { display: block; font: 700 1rem Fredoka, sans-serif; color: #1c2434; margin-bottom: 8px; }
.bl-code div { display: flex; gap: 8px; }
.bl-code input { flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 2px solid #E7DCC6; font: 600 1rem Nunito, sans-serif; }
.bl-code .btn { min-height: 44px; }
.bl-code-msg { margin: 6px 0 0; font-weight: 700; color: #9C2A1C; min-height: 0; }
.bl-code-msg:empty { display: none; }
/* 14 balls: the closet row shows icons only (names are in the 🧺 Closet dialog and each button's label) */
.bl-closet { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; }
.bl-ball { min-width: 0; min-height: 52px; padding: 4px; border-radius: 14px; }
.bl-ball img { width: 34px; height: 34px; }
.bl-ball span { display: none; }
.bl-ball-more .ic { display: block; font-size: 1.6rem; line-height: 34px; }
@media (min-width: 980px) { .bl .bl-closet { grid-template-columns: repeat(5, 1fr); } }
/* Build-a-Fort palette (in the actions area): a grid of piece buttons */
.arc-actions.bl-kit { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.arc-actions.bl-kit .btn { min-height: 46px; padding: 0 10px; font-size: .95rem; justify-content: center; }
.arc-actions.bl-kit .btn[aria-pressed="true"] { box-shadow: 0 0 0 3px #FFC93C; }
@media (min-width: 980px) { .arc-actions.bl-kit { grid-template-columns: 1fr 1fr; } }
@media (orientation: landscape) and (max-height: 600px) { .arc-actions.bl-kit { grid-template-columns: 1fr 1fr 1fr; gap: 4px; } .arc-actions.bl-kit .btn { min-height: 36px; font-size: .8rem; padding: 0 4px; } }
.bl-toggle { display: flex; gap: 10px; align-items: center; margin: 14px 0 0; font-weight: 700; cursor: pointer; }
.bl-toggle input { width: 24px; height: 24px; accent-color: #FFC93C; }

/* ---- rework (Ron, 2026-09-28): one "where am I" button, one "your ball" card, picture help ---- */
.bl-levels.bl-where-bar { display: flex; flex-wrap: nowrap; align-items: stretch; gap: 6px; padding: 4px; }
.bl-where-bar .bl-nav { min-width: 44px; min-height: 48px; border-radius: 14px; font-size: 1.1rem; }
.bl-where-bar .bl-nav:disabled { opacity: .3; }
.bl-where { flex: 1 1 auto; display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 8px; min-height: 48px; min-width: 150px; padding: 4px 14px; border-radius: 16px; text-align: left; }
.bl-where b { font: 700 1.15rem Fredoka, sans-serif; line-height: 1.1; }
.bl-where small { grid-column: 1; font: 600 .78rem Nunito, sans-serif; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.bl-where i { grid-column: 2; grid-row: 1 / span 2; font-style: normal; font-size: 1.1rem; }
.bl-lvgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; margin-top: 8px; }
.bl-lv { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 16px; border: 2px solid #E7DCC6; background: #FFFDF7; cursor: pointer; color: #1c2434; }
.bl-lv b { font: 700 1.6rem Fredoka, sans-serif; line-height: 1; }
.bl-lv .st { color: #F5A623; letter-spacing: 1px; font-size: .95rem; } .bl-lv .st em { font-style: normal; color: #D8D0BF; }
.bl-lv small { font: 600 .7rem Nunito, sans-serif; color: #6b6557; text-align: center; line-height: 1.15; }
.bl-lv.on { border-color: #FFC93C; box-shadow: 0 0 0 3px rgba(255,201,60,.5); background: #FFF6D8; }
.bl .bl-closet.v2 { display: flex; flex-wrap: nowrap; gap: 8px; align-items: stretch; margin-top: 12px; grid-template-columns: none; }
.bl-cur { flex: 1 1 auto; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; min-height: 64px; padding: 6px 12px; border-radius: 18px;
  border: 2px solid #FFC93C; background: #FFFDF7; cursor: pointer; text-align: left; color: #1c2434; box-shadow: 0 4px 0 #E3B232; }
.bl-cur img { width: 52px; height: 52px; }
.bl-cur b { display: block; font: 700 1.05rem Fredoka, sans-serif; line-height: 1.1; }
.bl-cur small { display: block; font: 700 .85rem Nunito, sans-serif; color: #B8302B; }
.bl-cur i { font-style: normal; font: 700 .85rem Fredoka, sans-serif; background: #FFC93C; border-radius: 999px; padding: 6px 10px; white-space: nowrap; }
.bl-who { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; min-width: 64px; padding: 4px 6px; border-radius: 18px; border: 2px solid #FF7FB0; background: #FFF4F8; cursor: pointer; color: #1c2434; }
.bl-who img { width: 44px; height: 44px; } .bl-who small { font: 700 .72rem Fredoka, sans-serif; }
.bl-newball { text-align: center; } .bl-newball img { width: 120px; height: 120px; } .bl-newball h3 { font: 700 1.5rem Fredoka, sans-serif; margin: 6px 0 2px; } .bl-newball p { font-weight: 800; color: #B8302B; margin: 0 0 12px; }
.bl-howto { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.bl-howto div { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 12px 8px; border-radius: 16px; background: #FFF6DA; }
.bl-howto span { font-size: 2.2rem; line-height: 1; } .bl-howto b { font: 700 .95rem Fredoka, sans-serif; color: #1c2434; }
.bl-more { margin-top: 14px; } .bl-more summary { cursor: pointer; font: 700 1rem Fredoka, sans-serif; padding: 8px 0; }
@media (orientation: landscape) and (max-height: 600px) {
  .bl .bl-closet.v2 { display: flex; margin: 4px 0 0; }
  .bl-cur { min-height: 48px; padding: 4px 8px; gap: 6px; } .bl-cur img { width: 36px; height: 36px; } .bl-cur b { font-size: .9rem; } .bl-cur small { font-size: .72rem; } .bl-cur i { display: none; }
  .bl-who { min-width: 48px; } .bl-who img { width: 32px; height: 32px; } .bl-who small { display: none; }
  .bl-where-bar .bl-nav, .bl-where { min-height: 34px; } .bl-where b { font-size: .95rem; } .bl-where small { display: none; }
}
/* phones held upright: the level picker gets its own row under the title (it was squeezing it) */
@media (max-width: 560px) {
  .bl .arc-head { grid-template-areas: "title title" "diff diff" "ctl ctl"; }
  .bl .bl-where-bar { width: 100%; }
  .bl .bl-where small { max-width: none; }
}
/* computers: the ball card fits the 250px side column */
@media (min-width: 980px) {
  .bl .bl-closet.v2 { min-width: 0; }
  .bl-cur { min-width: 0; grid-template-columns: auto 1fr; } .bl-cur i { display: none; }
  .bl-cur img { width: 44px; height: 44px; } .bl-who { min-width: 58px; }
}
/* the level picker keeps ONE width whatever the level's name, so the ◀ ▶ arrows stay put and you
   can click them over and over (Ron, 2026-09-28) */
.bl-levels.bl-where-bar { flex: 0 0 auto; width: 320px; box-sizing: border-box; }
.bl-where-bar .bl-where { flex: 1 1 0; min-width: 0; }
.bl-where b, .bl-where small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (orientation: landscape) and (max-height: 600px) { .bl-levels.bl-where-bar { width: 240px; } }
@media (max-width: 560px) { .bl-levels.bl-where-bar { width: 100%; } }

/* ---- full-width board (Ron, 2026-09-28): everything floats over the game (body.bl-ov, set by fitNow;
   phones held upright keep the stacked layout) ---- */
body.bl-ov .arc-stage { display: block; position: relative; width: max-content; max-width: 100%; margin: 0 auto; }
body.bl-ov .arc-board { margin: 0 auto; }
body.bl-ov .arc-tools { display: none !important; }
body.bl-ov .arc-msg { position: absolute; z-index: 5; top: 11.5%; left: 50%; transform: translateX(-50%); width: max-content; max-width: 58%; margin: 0;
  min-height: 0; padding: 6px 14px; font-size: clamp(.78rem, 1.25vw, 1.02rem); line-height: 1.25; background: rgba(255,255,255,.88); border-radius: 14px;
  box-shadow: 0 4px 14px rgba(10,4,30,.25); pointer-events: none; display: block; text-align: center; }
body.bl-ov .arc-msg.has-buddy { padding-left: 14px; } body.bl-ov .arc-msg .arc-buddy { display: none; }
body.bl-ov .arc-msg::before { display: none; }
body.bl-ov .arc-actions:not([hidden]) { position: absolute; z-index: 6; top: 50%; left: 50%; transform: translate(-50%, -45%); margin: 0; display: flex; flex-direction: column;
  align-items: stretch; gap: 8px; padding: 14px; min-width: 250px; max-height: 76%; overflow: auto; background: rgba(36,20,84,.86); border-radius: 22px; box-shadow: 0 12px 30px rgba(10,4,30,.5); }
body.bl-ov .arc-actions .btn { min-height: 44px; justify-content: center; }
/* a bonus game's finish: the Keep going button sits at the bottom so the result card (medal + score, drawn on the canvas) stays clear (Ron) */
body.bl-ov .arc-actions.bl-bonus-end:not([hidden]) { top: auto; bottom: 4%; transform: translateX(-50%); min-width: 0; padding: 10px 14px; }
body.bl-ov .arc-actions.bl-kit:not([hidden]) { top: 11%; left: 1%; transform: none; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 8px; min-width: 0; width: 30%; max-width: 300px; max-height: 84%; }
body.bl-ov .arc-actions.bl-kit .btn { min-height: 34px; font-size: .8rem; padding: 0 4px; }
body.bl-ov .bl-closet.v2 { position: absolute; z-index: 5; top: 10.5%; left: 1.2%; margin: 0; width: auto; max-width: 34%; }
body.bl-ov .bl-cur { min-height: 0; padding: 4px 10px 4px 6px; gap: 6px; grid-template-columns: auto 1fr; box-shadow: 0 3px 0 #E3B232, 0 6px 14px rgba(10,4,30,.25); }
body.bl-ov .bl-cur img { width: clamp(26px, 3vw, 40px); height: clamp(26px, 3vw, 40px); }
body.bl-ov .bl-cur b { font-size: clamp(.72rem, 1.05vw, .95rem); } body.bl-ov .bl-cur small { font-size: clamp(.62rem, .85vw, .78rem); } body.bl-ov .bl-cur i { display: none; }
body.bl-ov .bl-who { min-width: 0; padding: 2px 6px; } body.bl-ov .bl-who img { width: clamp(26px, 3vw, 38px); height: clamp(26px, 3vw, 38px); } body.bl-ov .bl-who small { display: none; }
body.bl-ov.arc-full .arc-main { padding: 0 !important; max-width: none !important; }
body.bl-ov.arc-full .arc-stage { margin: 0 auto; }
body.bl-ov .arc-msg { top: 13%; max-width: 50%; }
@media (max-width: 1000px) { body.bl-ov .bl-cur small { display: none; } body.bl-ov .bl-closet.v2 { max-width: 24%; } body.bl-ov .arc-msg { max-width: 48%; font-size: .74rem; padding: 4px 10px; } }
/* full screen: the ✕ sits on the right edge below the squirrel counter instead of on it */
body.bl-ov.arc-full .arc-exitfull { top: auto; bottom: 70px; right: 10px; }

/* the Sound mixer (🔊 in the top bar): Jingles and Sound effects, each on/off + volume */
.bl-mix-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px 12px; padding: 12px 4px; border-bottom: 2px dashed #EFE6D2; }
.bl-mix-row:last-child { border-bottom: 0; }
.bl-mix-row .ic { font-size: 1.8rem; }
.bl-mix-row b { font: 700 1.15rem Fredoka, sans-serif; color: #1c2434; }
.bl-mix-tog { min-width: 70px; min-height: 44px; border-radius: 999px; border: 0; cursor: pointer; font: 700 1rem Fredoka, sans-serif; background: #2E9E5B; color: #fff; box-shadow: 0 4px 0 #1B6B3B; }
.bl-mix-tog.off { background: #C9CED6; color: #4E5563; box-shadow: 0 4px 0 #9AA3B0; }
.bl-mix-row input[type=range] { grid-column: 1 / -1; width: 100%; height: 32px; accent-color: #FFC93C; }
.bl-mix-row input[type=range]:disabled { opacity: .35; }
/* the header got a 😎 difficulty pill (Ron: "put the difficulties on the main bar"): keep the title on
   one line; when the bar is crowded the kit drops the pills' words, but the difficulty and the Menu
   keep theirs (an emoji alone doesn't say "how hard") */
.bl .arc-head h1 { white-space: nowrap; }
.bl .arc-compact #btn-diff .lbl, .bl .arc-compact #btn-menu .lbl { display: inline; }
.bl .arc-controls #btn-diff .lbl { display: inline; }   /* (phones hide every pill's word; this one keeps it) */
