/*!
 * Bell Snake v2 — the cover's meadow over the same game (with js/kid-kit.js).
 * Colours from the cover (covers/bell-snake/scene.js): sky #8fd6f4, hills
 * #a9dbc4 / #9dd25f, the board a mint meadow #dff1cb with faint navy dots, the
 * body a white navy-edged tube. The engine draws the board
 * (window.SNAKE_SKIN = "v2"); this file restyles the DOM around it.
 */
body.is-v2 { background: #8fd6f4; }
body.is-v2 .bs-scenery .kk-scene { position: absolute; inset: 0; }

/* the game's own menu stays in the page (the kit presses its buttons) but is never seen */
html.kk-menu-on body.is-v2 { overflow: hidden; }
body.is-v2 #bsMenu { visibility: hidden; }

/* picture icons: the game's own snake */
.kk-ico .v2-ico { display: grid; place-items: center; width: 100%; height: 100%; }
.kk-ico .v2-ico svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 3px 0 rgba(27, 35, 62, 0.2)); }

/* the cover's snake crawling along the bottom of the front */
.v2-crawler {
  position: absolute; left: 0; right: 0; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 1;
  height: clamp(72px, 13vh, 118px); pointer-events: none;
  animation: v2-crawl 3.2s ease-in-out infinite;
}
.v2-crawler svg { width: 100%; height: 100%; display: block; }
.v2-crawler .v2-token { animation: v2-glow 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes v2-crawl { 50% { translate: 6px 0; } }
@keyframes v2-glow { 50% { scale: 1.08; } }
.kk-menu:not([data-view="front"]):not([data-view="sheet"]) .v2-crawler { display: none; }
@media (max-height: 640px) { .v2-crawler { display: none; } }

/* a locked stone that isn't reached yet: a little "not yet" shake */
.kk-stone.kk-nope { animation: v2-nope 0.36s ease-in-out; }
@keyframes v2-nope { 25% { translate: calc(-50% - 6px) -50%; } 75% { translate: calc(-50% + 6px) -50%; } }

/* the game's rows, moved into the grown-ups sheet, wear the kit's pills */
.kk-sheet .bs-optrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 6px; }
.kk-sheet .bs-optlabel { display: none; }
.kk-sheet .bs-opthint { flex-basis: 100%; margin: 2px 0 0; font-size: 12.5px; font-weight: 700; color: #6a7392; line-height: 1.45; }
.kk-sheet .bs-opt {
  appearance: none; border: 2px solid #d5dced; background: #fff; color: #1b233e;
  font: 900 14px/1 Nunito, system-ui, sans-serif; padding: 10px 16px; border-radius: 999px; min-height: 44px; cursor: pointer; box-shadow: none;
}
.kk-sheet .bs-opt.is-on { background: #1b233e; border-color: #1b233e; color: #fff; }
.kk-sheet .bs-speed { padding: 6px 14px; border-radius: 18px; }
.kk-sheet .bs-speed small { font-size: 10px; }

/* ── Play: light pills on the meadow ────────────────────────────────────── */
body.is-v2 .bs-chip {
  border: 0; border-radius: 999px; flex-direction: row; align-items: baseline; justify-content: center; gap: 6px;
  background: rgba(255, 255, 255, 0.94); box-shadow: 0 3px 0 rgba(27, 35, 62, 0.12);
}
body.is-v2 .bs-chip b { font-family: "Grobold", "Nunito", system-ui, sans-serif; font-weight: 400; font-variant-numeric: tabular-nums; }
body.is-v2 #bsCanvas { background: #dff1cb; border: 5px solid #fff; border-radius: 28px; box-shadow: 0 8px 0 rgba(27, 35, 62, 0.14); }
body.is-v2 .bs-pad button { border: 0; border-radius: 18px; background: rgba(255, 255, 255, 0.94); box-shadow: 0 4px 0 rgba(27, 35, 62, 0.14); }
body.is-v2 .bs-pad button:active { background: #1b233e; color: #fff; box-shadow: none; transform: translateY(3px); }
body.is-v2 .bs-hint { color: #1b233e; opacity: 0.7; }
body.is-v2 .bs-step { border-radius: 10px; }
body.is-v2 .bs-step, body.is-v2 .bs-mel { font-family: "Grobold", "Nunito", system-ui, sans-serif; font-weight: 400; }
body.is-v2 .bs-toast { box-shadow: 0 4px 0 rgba(27, 35, 62, 0.2); }
/* the scale toast: the bells' colours as flat stripes */
body.is-v2 .bs-toast.is-scale { background: linear-gradient(90deg, #e72829 0 16.6%, #f39422 0 33.3%, #e3d600 0 50%, #6abb4a 0 66.6%, #099695 0 83.3%, #7b569e 0); }

/* the countdown and PAUSED in Grobold, like the title */
body.is-v2 .bs-count {
  font-family: "Grobold", "Nunito", system-ui, sans-serif; font-weight: 400;
  text-shadow: 0 0.07em 0 rgba(27, 35, 62, 0.35);
}

/* ── Results: a soft card, a Grobold title, chunky buttons ──────────────── */
body.is-v2 .bs-veil { background: rgba(27, 35, 62, 0.34); backdrop-filter: none; }
body.is-v2 .bs-card { border-radius: 32px; background: #fdfbf6; box-shadow: 0 20px 50px rgba(27, 35, 62, 0.3); }
body.is-v2 .bs-card h2 {
  font-family: "Grobold", "Nunito", system-ui, sans-serif; font-weight: 400;
  font-variant-caps: small-caps; text-transform: lowercase; letter-spacing: 0;
  font-size: clamp(30px, 7vw, 40px); color: #6ab845; text-shadow: 0 0.07em 0 #4c8f30;
}
body.is-v2 .bs-card h2::first-letter { text-transform: uppercase; }
body.is-v2 .bs-big span { font-family: "Grobold", "Nunito", system-ui, sans-serif; font-weight: 400; color: #009999; }
body.is-v2 .bs-mel { border-radius: 9px; }
body.is-v2 .bs-again { border-radius: 999px; box-shadow: 0 5px 0 #4c8f30; background: #6ab845; }
body.is-v2 .bs-mine { border-radius: 999px; border: 0; background: #7b569e; color: #fff; box-shadow: 0 5px 0 #5d3f7c; }

/* a phone held sideways: the card fits the short screen */
@media (max-height: 520px) and (orientation: landscape) {
  body.is-v2 .bs-veil { padding: 10px; }
  body.is-v2 .bs-card { width: min(560px, 100%); padding: 12px 18px 8px; }
  body.is-v2 .bs-card h2 { margin-bottom: 2px; font-size: 28px; }
  body.is-v2 .bs-big { margin-bottom: 4px; }
  body.is-v2 .bs-big span { font-size: 40px; }
  body.is-v2 .bs-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 6px; }
  body.is-v2 .bs-melodyrow { margin-bottom: 6px; }
  body.is-v2 .bs-mine, body.is-v2 .bs-again { display: inline-block; width: calc(50% - 8px); height: 48px; margin: 0 2px 4px; }
  body.is-v2 .bs-menu-btn2 { padding: 4px; }
}

/* ten challenges: smaller stones so neighbours keep a gap on the arch */
body.is-v2 .kk-stone { width: clamp(60px, 7.2vw, 92px); border-width: 5px; }
body.is-v2 .kk-num { font-size: clamp(24px, 3vw, 38px); }
body.is-v2 .kk-go { width: 38px; height: 38px; right: -12px; top: -12px; }

/* an upright phone: three buttons in one row */
@media (orientation: portrait) and (max-width: 700px) {
  body.is-v2 .kk-big { gap: 10px; flex-wrap: nowrap; }
  body.is-v2 .kk-big:has(.kk-btn:nth-child(3)) .kk-btn { width: min(28vw, 150px); }
}

/* a phone held sideways: the map is short, so the stones shrink to keep their gaps */
@media (max-height: 500px) and (orientation: landscape) {
  body.is-v2 .kk-stone { width: 62px; border-width: 4px; }
  body.is-v2 .kk-num { font-size: 26px; }
  body.is-v2 .kk-stone .kk-lock { width: 24px; height: 24px; }
  body.is-v2 .kk-go { width: 32px; height: 32px; right: -10px; top: -10px; }
}
