/* Bell Shark — flat pastel ocean.
   The menu wears Bass Attack's ocean painting (reused, not copied: see the
   url below); play is a full-screen canvas with a light DOM HUD on top. Same
   type, navy ink and chroma palette as the rest of the arcade. */

:root {
  --bk-ink: #1b233e;
  --bk-sea: #bfe2f0;
  --bk-deep: #2c6f8f;
  --bk-teal: #176877;
  --bk-paper: #ffffff;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: Nunito, system-ui, -apple-system, sans-serif;
  color: var(--bk-ink);
  background: linear-gradient(#d8f0f9, var(--bk-sea) 55%, #cfe8dc);
  -webkit-text-size-adjust: 100%;
}
body { overscroll-behavior: none; }

.bk-app {
  position: relative;
  min-height: 100svh;
}

/* ── Menu ─────────────────────────────────────────────────────────────── */
.bk-menu {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(72px + env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom));
  background: url("../../bass-attack-v1/assets/ocean-field.jpg") center bottom / cover no-repeat fixed, var(--bk-sea);
}
.bk-title {
  margin: 0;
  font-size: clamp(44px, 9vw, 72px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.5px;
  color: #173a5c;
  text-shadow: 0 3px 0 rgba(255, 255, 255, 0.7);
}
.bk-sub {
  margin: 8px 0 0;
  font-size: 20px;
  font-weight: 800;
  color: #2c5877;
}
.bk-hero {
  width: 360px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 360 / 150;
  margin-top: 8px;
}
.bk-quick-blurb { color: #fff; font-size: 16px; font-weight: 800; }

.bk-levels-title {
  margin: 12px 0 12px;
  font-size: 22px;
  font-weight: 900;
  color: #173a5c;
}
.bk-levels {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 176px), 1fr));
  gap: 12px;
  width: min(960px, 100%);
}
.bk-level {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  column-gap: 10px;
  align-items: center;
  min-height: 92px;
  padding: 12px 12px 10px;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--bk-ink);
  text-align: left;
  font: inherit;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(23, 58, 92, 0.16);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.bk-level:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 0 rgba(23, 58, 92, 0.16); }
.bk-level:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 2px 0 rgba(23, 58, 92, 0.16); }
.bk-level:focus-visible { outline: 4px solid #183e74; outline-offset: 3px; }
.bk-level-emoji { grid-row: 1 / span 3; font-size: 32px; text-align: center; }
.bk-level-name { font-size: 17px; font-weight: 900; line-height: 1.15; }
.bk-level-num { color: #4f7390; font-weight: 800; margin-right: 4px; }
.bk-level-blurb { font-size: 13px; font-weight: 700; color: #45607a; line-height: 1.25; }
.bk-level-stars { font-size: 15px; letter-spacing: 1px; color: #f2b72b; }
.bk-level-stars .off { color: #cdd8e2; }
/* Progress lock: not reached yet. The paywall has its own class — a level can be both. */
.bk-level.is-locked { background: rgba(255, 255, 255, 0.6); cursor: not-allowed; }
.bk-level.is-locked :is(.bk-level-emoji, .bk-level-name) { opacity: 0.5; }
.bk-level.is-paywalled { cursor: pointer; }

/* ── Play ─────────────────────────────────────────────────────────────── */
.bk-play {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #9fd2e6;
  /* the canvas IS the controller: no scrolling, zooming or text selection */
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.bk-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: crosshair;
}

/* Fish counter sits under the chrome's Menu pill, clear of the reef's middle. */
.bk-hud {
  position: absolute;
  top: calc(70px + env(safe-area-inset-top));
  left: calc(12px + env(safe-area-inset-left));
  pointer-events: none;
}
.bk-count {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 84px;
  padding: 6px 12px 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 3px 0 rgba(23, 58, 92, 0.14);
}
.bk-count b { font-size: 26px; font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; }
.bk-count small { font-size: 12px; font-weight: 900; letter-spacing: 0.6px; text-transform: uppercase; color: #45607a; }
.bk-count.is-bump b { animation: bk-bump 260ms ease-out; }
@keyframes bk-bump { 40% { transform: scale(1.3); } }

/* Target prompt: top centre, between the chrome's Menu and Pause pills. */
.bk-prompt {
  position: absolute;
  top: calc(10px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 200px);
  pointer-events: none;
}
.bk-prompt-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 3px 0 rgba(23, 58, 92, 0.14);
  font-size: 22px;
  font-weight: 900;
  white-space: nowrap;
}
.bk-note {
  --c: #9aa3b8;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--c);
  color: var(--bk-ink);
  font-size: 17px;
  font-weight: 900;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.55);
}
.bk-note i {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  font-style: normal;
  font-size: 14px;
}
.bk-note.is-small { width: 22px; height: 22px; box-shadow: none; }
.bk-note.is-small i { display: none; }
.bk-note.is-done { opacity: 0.45; }
.bk-note.is-next { animation: bk-next 900ms ease-in-out infinite; outline: 3px solid var(--bk-ink); outline-offset: 2px; }
.bk-note.is-mystery { --c: #dfe7ee; }
.bk-note.is-mystery i { background: transparent; color: #6d8397; }
.bk-note.is-sing { animation: bk-sing 380ms ease-out; }
@keyframes bk-next { 50% { transform: scale(1.14); } }
@keyframes bk-sing { 40% { transform: scale(1.35); background: #fff4b8; } }

.bk-hear {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: 10px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--bk-teal);
  color: #fff;
  font: 900 20px/1 Nunito, system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 4px 0 #0e4852;
}
.bk-hear:active { transform: translateY(3px); box-shadow: 0 1px 0 #0e4852; }
.bk-hear:focus-visible { outline: 4px solid #fff; outline-offset: 3px; }
.bk-hear span { font-size: 24px; }

.bk-toast {
  position: absolute;
  top: calc(150px + env(safe-area-inset-top));
  left: 50%;
  transform: translate(-50%, -8px);
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(27, 35, 62, 0.86);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}
.bk-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

.bk-banner {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  padding: 0 16px;
  color: #fff;
  font-size: clamp(34px, 7vw, 64px);
  font-weight: 900;
  text-align: center;
  line-height: 1.05;
  text-shadow: 0 4px 0 rgba(23, 58, 92, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
}
.bk-banner.is-on { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* ── Results ──────────────────────────────────────────────────────────── */
.bk-veil {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(23, 58, 92, 0.42);
  overflow-y: auto;
}
.bk-card {
  width: min(440px, 100%);
  padding: 22px 22px 18px;
  border-radius: 24px;
  background: #fff;
  text-align: center;
  box-shadow: 0 10px 0 rgba(23, 58, 92, 0.2);
  animation: bk-pop 280ms ease-out;
}
@keyframes bk-pop { from { transform: scale(0.9); opacity: 0; } }
.bk-card h2 { margin: 0; font-size: 30px; font-weight: 900; color: #173a5c; }
.bk-stars { margin: 6px 0 2px; font-size: 40px; letter-spacing: 4px; color: #f2b72b; }
.bk-stars .off { color: #dde5ec; }
.bk-big { display: flex; flex-direction: column; align-items: center; margin: 4px 0; }
.bk-big span { font-size: 56px; font-weight: 900; line-height: 1; }
.bk-big small { font-size: 15px; font-weight: 800; color: #45607a; }
.bk-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin: 10px 0; font-size: 15px; font-weight: 700; color: #45607a; }
.bk-stats b { color: var(--bk-ink); }
.bk-noterow { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 8px 0 10px; }
.bk-noterow .bk-bar { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12px; font-weight: 900; }
.bk-noterow .bk-bar u { display: block; width: 26px; border-radius: 6px 6px 3px 3px; background: var(--c); text-decoration: none; }
.bk-pearl { margin: 4px 0 10px; font-size: 16px; font-weight: 800; color: #6a4c93; }
.bk-card button {
  display: block;
  width: 100%;
  min-height: 56px;
  margin-top: 10px;
  border: 0;
  border-radius: 16px;
  font: 900 20px/1 Nunito, system-ui, sans-serif;
  cursor: pointer;
}
.bk-card button:focus-visible { outline: 4px solid #183e74; outline-offset: 3px; }
.bk-next { background: var(--bk-teal); color: #fff; }
.bk-next:hover { background: #145967; }
.bk-again { background: #e4f1f7; color: #173a5c; }
.bk-menu-btn { background: transparent; color: #2c5877; min-height: 48px !important; font-size: 17px !important; }

@media (max-width: 560px) {
  .bk-prompt { max-width: calc(100% - 24px); top: calc(66px + env(safe-area-inset-top)); }
  .bk-hud { top: calc(130px + env(safe-area-inset-top)); }
  .bk-prompt-line { font-size: 18px; padding: 6px 12px; }
  .bk-toast { top: calc(200px + env(safe-area-inset-top)); }
}

@media (prefers-reduced-motion: reduce) {
  .bk-note.is-next, .bk-note.is-sing, .bk-count.is-bump b, .bk-card { animation: none; }
}
