/* Aquarium-only presentation. Fish, canvases, saved data and game rules are unchanged. */
html body:has(.aquarium) {
  color-scheme: dark;
  --ink: #e0f4fb;
  --muted: #9dbbc9;
  --mint: #78f3dc;
  --line: #294550;
  --paper: #07151e;
  --teal: #78f3dc;
  --font-display: var(--b2b-heading-font, 'Segoe UI', sans-serif);
  --font-body: var(--b2b-font, 'Segoe UI', sans-serif);
  background: radial-gradient(ellipse at 80% 0%, #12435380, transparent 46%),
    radial-gradient(ellipse at 0% 52%, #12434650, transparent 42%), #07151e;
  color: var(--ink);
  font-family: var(--font-body);
  scrollbar-color: #476c7b #0a1d28;
}
html body:has(.aquarium) .header {
  height: 80px;
  background: #091b26dc;
  border-color: #294550;
  box-shadow: 0 1px 0 #74ddda08;
}
html body:has(.aquarium) .brand {
  font-family: var(--font-display);
  color: #e0f9ff;
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -1px;
}
html body:has(.aquarium) .brand-mark {
  color: #82fce4;
  background: #133740;
  border: 1px solid #438077;
  border-radius: 12px;
  transform: none;
  box-shadow: 0 0 22px #68f8d718, inset 0 0 12px #68f8d70c;
}
body .brand-mark svg { transform: none; }
body .brand-dot, body h1 > span { color: #78f3dc; }
body .nav-active { border-bottom-color: #78f3dc; color: #d7edf6; }
body .nav-button, body .local-badge { color: #a4c4d2; }
body .nav-button:hover { color: #82fce4; }
body .local-badge { padding: 10px 14px; border: 1px solid #294550; border-radius: 30px; font-size: 16px; }
body .local-badge > span { background: #78f3dc; box-shadow: 0 0 10px #78f3dc80; }
body main { max-width: 1680px; padding-top: 30px; }
body .page-heading { margin-bottom: 25px; }
body .eyebrow { color: #83d6d0; font-size: 16px; letter-spacing: 2.2px; }
html body h1, html body h2 { color: #e0f4fb; font-family: var(--font-display); }
body h1 { font-weight: 550; letter-spacing: -1.5px; font-size: clamp(29px, 2.8vw, 44px); }
body h1 > span { font-size: 30px; }
body .page-heading p { color: #a3bdca; font-size: 16px; }
body .button { min-height: 48px; border-radius: 12px; }
html body:has(.aquarium) .button.primary {
  background: linear-gradient(115deg, #96ffe5, #59d6df);
  border: 1px solid #a6fff0;
  color: #062b35;
  box-shadow: 0 0 26px #63edd91c, inset 0 1px 0 #fff6;
}
html body:has(.aquarium) .button.primary:hover { background: #b4fff1; box-shadow: 0 0 30px #63edd930; }
body .workspace { grid-template-columns: minmax(0, 1fr) 292px; gap: 22px; }
body .aquarium {
  height: clamp(440px, 57vh, 730px);
  border-radius: 18px;
  border: 1px solid #54808a;
  box-shadow: 0 0 0 5px #102731, 0 0 0 6px #24404b, 0 18px 45px #0004;
}
body .aquarium::after {
  content: '';
  position: absolute;
  inset: 9px;
  border: 1px solid #adfff323;
  border-radius: 11px;
  pointer-events: none;
}
body .scene-heading {
  left: 18px; top: 18px; gap: 10px;
  background: #071d29d9;
  padding: 10px 14px;
  border: 1px solid #7fe0e04a;
  border-radius: 12px;
  text-shadow: none;
  backdrop-filter: blur(14px);
}
body .scene-symbol { background: #67f4d914; border-color: #7af0da59; color: #96ffe7; }
body .scene-heading strong { font-size: 16px; font-weight: 600; }
body .scene-heading span:not(.scene-symbol) { color: #afd7df; }
body .icon-button { min-width: 44px; min-height: 44px; background: #081e2bdb; border-color: #74e0dc55; border-radius: 10px; color: #c3fff0; }
body .fullscreen { right: 18px; top: 18px; }
body .icon-button:hover { background: #1b4652; }
body .scene-tip { color: #e5f6ff; background: #071d29c9; border-radius: 8px; padding: 7px 10px; left: 18px; }
body .ocean-toolbar {
  bottom: 20px; padding: 6px 10px; gap: 8px;
  background: #071d29ed; border: 1px solid #67c7c17a;
  border-radius: 12px; box-shadow: 0 8px 24px #0005;
}
body .ocean-toolbar button { min-height: 44px; color: #e0f4fb; border-radius: 7px; }
body .ocean-toolbar button:hover { background: #204550; }
body .ocean-toolbar button.active { color: #96ffe7; background: #26564f; }
body .ocean-toolbar .pause-button { min-width: 44px; }
body .toolbar-count { color: #b4d0df; }
body .toolbar-divider { background: #386170; }
body .target-hint, body .feed-scene-hint { background: #061c2bef; border: 1px solid #549c9a; color: #dcfff8; border-radius: 10px; }
body .collection, body .seabed-panel {
  background: linear-gradient(135deg, #122d3bef, #0b202ceF);
  border: 1px solid #2b4a57;
  border-radius: 18px;
  box-shadow: inset 0 1px 0 #8bded816, 0 10px 30px #0002;
}
body .collection { padding: 22px 18px; }
body .collection h2, body .seabed-heading h2 { font-size: 20px; font-weight: 550; letter-spacing: -.4px; }
body .collection-title > span { background: #153e49; border: 1px solid #396874; color: #9affdf; border-radius: 6px; font-variant-numeric: tabular-nums; }
body .collection-intro { color: #a0bdcb; font-size: 16px; margin-bottom: 18px; }
body .fish-list { gap: 9px; max-height: 300px; scrollbar-color: #476c7b #0a1d28; }
body .fish-card { background: #0a1e2b; border: 1px solid #284653; border-radius: 11px; padding: 10px; }
body .fish-card:hover { background: #143a47; border-color: #57928f; }
body .fish-card.selected { background: linear-gradient(110deg, #19483f, #122e3c); border-color: #71d8c2; box-shadow: inset 3px 0 0 #86ffe1, 0 0 16px #73f2d309; }
body .fish-card img { background: #d0f5eb12; border-radius: 8px; padding: 3px; width: 64px; height: 54px; }
body .fish-card strong { color: #e1f6fc; font-size: 16px; }
body .fish-card small { color: #a5c0cd; font-size: 16px; }
body .fish-card .selected-dot { background: #86ffe1; box-shadow: 0 0 8px #86ffe180; }
body .add-outline { border-color: #517280; color: #b3d8e1; border-radius: 10px; min-height: 48px; font-size: 16px; }
body .add-outline:hover { background: #173d47; }
body .small-label { color: #91c9cb; font-size: 16px; letter-spacing: 1.6px; }
body .selected-title strong { color: #e1f6fc; font-size: 18px; }
body .selection-info p, body .saved-note, body .key-hints span { color: #a0bdcb; }
body .key-hints kbd { background: #0a1d28; border-color: #42616d; color: #c8eee8; }
body .saved-note svg { color: #8befce; }
body .subtle-icon { color: #a8c8d5; min-width: 44px; min-height: 44px; }
body .subtle-icon:hover { background: #214451; color: #ecffff; }
body .aquarium-actions { margin-top: 20px; }
body .feed-button, body .edit-fish, body .aquarium-games button {
  color: #d9f4f6; background: #112e3b; border: 1px solid #3c6472;
  border-radius: 11px; min-height: 48px;
}
body .feed-button:hover, body .edit-fish:hover, body .aquarium-games button:hover { background: #204957; border-color: #84dfd1; }
body .feed-button[aria-pressed=true], body .aquarium-games button[aria-pressed=true] { color: #c7ffec; background: #17493f; border-color: #8df5d8; box-shadow: inset 0 0 0 1px #8df5d840; }
body .feeding-status, body .aquarium-game-status { color: #abc7d3; font-size: 16px; }
body .aquarium-games { gap: 9px; margin-top: 13px; }
body .aquarium-games button { position: relative; padding-top: 15px; padding-bottom: 15px; font-size: 16px; }
body .aquarium-games button::before { content: ''; display: block; width: 20px; height: 2px; border-radius: 2px; background: #69c4cc; margin: 0 auto 8px; }
body .aquarium-games button[aria-pressed=true]::before { background: #a2ffe2; box-shadow: 0 0 8px #a2ffe280; }
body .aquarium-game-hud { background: #071c2cf2; border: 1px solid #5aafad; border-radius: 11px; }
body .aquarium-game-hud button, body .feeding-stop { background: #22434f; color: #e5fff9; border: 1px solid #55918c; min-height: 44px; }
body .seabed-panel { padding: 22px; }
body .seabed-heading span { color: #a0bdcb; }
body .seabed-choice { background: #0a1e2b; border-color: #2b4a57; border-radius: 11px; padding: 5px 5px 12px; color: #deeff9; }
body .seabed-choice:hover { background: #143644; border-color: #6eb2b0; }
body .seabed-choice[aria-pressed=true] { background: #194238; border-color: #8ff1d3; }
body .seabed-choice img { border-radius: 6px; }
body .seabed-choice span { color: #aec6d3; }
body .flora-note { color: #b1cbd5; padding: 16px 0 0; border-top: 1px solid #294550; }
body .flora-note strong { color: #d6f7ee; font-weight: 600; }
body .flora-note small { color: #a0bdcb; }
body .flora-note a { color: #91e8d7; text-underline-offset: 3px; }
body footer, body footer > span:last-child { color: #92afbe; }
body .tiny-star { color: #8be9d6; }
html body:has(.aquarium) dialog { background: #0d2431; border: 1px solid #487a87; box-shadow: 0 24px 90px #0009, 0 0 45px #4acabb12; border-radius: 18px; color: #e0f4fb; }
body dialog::backdrop { background: #020e19c7; backdrop-filter: blur(10px); }
body .tabs { background: #071923; border: 1px solid #294550; padding: 5px; }
body .tabs button { color: #adc5d1; min-height: 44px; }
body .tabs button[aria-selected=true] { background: #214751; color: #c9fff0; box-shadow: inset 0 0 0 1px #579c98; }
body .drop-zone { background: radial-gradient(ellipse at center, #1b424e, #0a202e); border-color: #477b86; }
body .drop-zone:hover, body .drop-zone.dragging { background: #1c4651; border-color: #87ecdd; }
body .upload-circle { background: #1c4b51; color: #a0ffe1; border: 1px solid #55958f; }
body .drop-zone > span:not(.upload-circle), body .drop-zone small, body .upload-advice, body .drawing-advice,
body .dialog-bottom > span, body .flip-label, body .editor-note, body .help-content p { color: #adc5d1; }
body .text-button, body .toast button { color: #9af7df; }
body .fish-settings input[type=text] { background: #071923; color: #e8fbff; border-color: #416773; min-height: 46px; }
body .fish-settings input::placeholder { color: #849fac; }
body input[type=checkbox], body input[type=range] { accent-color: #7de9d3; }
body .drawing-tools > button { color: #d9f6ff; background: #173746; border: 1px solid #4d7683; min-height: 44px; border-radius: 7px; }
body .drawing-tools > button[aria-pressed=true] { background: #276251; color: #dcfff1; border-color: #8de9cf; }
body .palette button { border-color: #d2f1ee; }
body .palette button.active { outline: 2px solid #83ffe0; outline-offset: 3px; }
/* The artwork surface stays neutral so drawn and imported colours remain accurate. */
body .drawing-wrap, body .preview-checker { color-scheme: light; border-color: #7d9aa4; }
body .drawing-wrap > span { color: #6c827b; }
body .form-error { color: #ffc2a2; }
body .help-content li > span { background: #143e49; color: #a0ffe1; border: 1px solid #487d82; font-variant-numeric: tabular-nums; }
body .toast { background: #123746; border-color: #66b4b0; color: #e8fff9; }
body .empty-list { color: #b0cbd5; }
body .direction-pad { grid-template-columns: repeat(3, 44px); grid-template-rows: repeat(2, 44px); }
body .direction-pad button, body .depth-control button { background: #092330e8; border-color: #81cec280; color: #e3fff5; }
body .depth-control button { width: 44px; height: 44px; }
html body :is(button, a, input, canvas):focus-visible { outline: 3px solid #b1ffe4; outline-offset: 3px; }
body #ocean:focus-visible { outline-offset: -5px; }
body .aquarium:fullscreen { height: 100vh; height: 100dvh; border: 0; box-shadow: none; border-radius: 0; }
@media (max-width: 1100px) {
  body .workspace { grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; }
  body .collection { padding: 20px 14px; }
  body .header { gap: 20px; }
  body .header nav { gap: 24px; }
}
@media (max-width: 850px) {
  body .workspace { grid-template-columns: minmax(0, 1fr); }
  body .aquarium { height: 60vh; min-height: 430px; }
  body .collection { padding: 20px; }
  body .fish-list { max-height: none; padding-bottom: 5px; }
  body .local-badge { display: none; }
  body .direction-pad, body .depth-control { bottom: 100px; }
}
@media (max-width: 560px) {
  html body:has(.aquarium) .header { height: auto; min-height: 72px; gap: 8px; padding: 12px 5%; flex-wrap: wrap; }
  html body:has(.aquarium) .brand { font-size: 23px; }
  body .header nav { gap: 14px; font-size: 16px; }
  body .nav-active { min-height: 44px; }
  body .nav-button { font-size: 16px; min-height: 44px; }
  body main { padding-top: 25px; }
  body .eyebrow { font-size: 16px; letter-spacing: 1.5px; }
  body h1 { font-size: 29px; letter-spacing: -1px; }
  body h1 > span { font-size: 24px; margin-left: 8px; }
  body .page-heading { gap: 18px; }
  body .page-heading p { font-size: 16px; }
  body .aquarium { border-radius: 14px; box-shadow: 0 0 0 3px #102731, 0 0 0 4px #24404b; }
  body .scene-heading { left: 12px; top: 12px; padding: 9px; gap: 8px; max-width: calc(100% - 80px); }
  body .scene-heading strong { font-size: 16px; }
  body .scene-heading span:not(.scene-symbol) { font-size: 16px; }
  body .fullscreen { top: 12px; right: 12px; }
  body .ocean-toolbar { gap: 5px; padding: 5px 7px; max-width: calc(100% - 24px); }
  body .ocean-toolbar button { font-size: 16px; gap: 5px; padding: 4px; }
  body .toolbar-count { font-size: 16px; }
  body .direction-pad { left: 12px; grid-template-columns: repeat(3, 44px); grid-template-rows: repeat(2, 44px); }
  body .target-hint { bottom: 206px; }
  body .aquarium-games { gap: 6px; }
  body .aquarium-games button { font-size: 16px; padding: 12px 5px; }
  body .feed-button { width: 100%; }
  body .collection, body .seabed-panel { padding: 18px; border-radius: 14px; }
  body .seabed-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
  body .collection h2, body .seabed-heading h2 { font-size: 20px; }
  body .seabed-choice:last-child { grid-column: 1 / -1; }
  body .palette { flex-wrap: wrap; row-gap: 12px; }
  body .tabs button { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  body .button:hover { transform: none; }
}

body .custom-seabed-controls button{background:#17493f;border-color:#579c98;color:#e5fff9}body .custom-seabed-controls button:hover{background:#206354}body .custom-seabed-controls #removeSeabed{background:transparent;border-color:#487a87;color:#b1cbd5}body .custom-seabed-controls #seabedStatus{color:#a0bdcb}

/* A single return path from the game to the main site. */
body .page-heading .aquarium-home-link{
  display:inline-flex;align-items:center;min-height:44px;margin:0 0 6px;
  color:#9adbd5;font-size:16px;font-weight:700;text-decoration:none;
}
body .page-heading .aquarium-home-link:hover{text-decoration:underline;color:#c7fff1}

/* Keep help available without a separate navigation bar. */
body .page-heading #helpButton{display:inline-flex;align-items:center;gap:6px;min-height:44px;margin-top:4px;padding:8px 0;border:0;background:none;color:#9adbd5;font-size:16px;font-weight:700;text-align:left}
body .page-heading #helpButton:hover{color:#c7fff1}

/* The collection repeats the fish count; keep the scene controls whole at 320px. */
@media(max-width:360px){body .ocean-toolbar .toolbar-count{display:none}}

/* Let the water use its full column; keep readable gutters on surrounding UI. */
body:has(.aquarium) {
  --aquarium-gutter: clamp(12px, 2vw, 24px);
  --aquarium-left: max(var(--aquarium-gutter), env(safe-area-inset-left, 0px));
  --aquarium-right: max(var(--aquarium-gutter), env(safe-area-inset-right, 0px));
}
body:has(.aquarium) > main { width: 100%; max-width: none; padding-inline: 0; }
body .page-heading { padding-inline: var(--aquarium-left) var(--aquarium-right); }
body .ocean-column > :is(.aquarium-actions, .aquarium-games, .aquarium-game-status),
body .seabed-panel { margin-inline: var(--aquarium-left) var(--aquarium-right); }
body .collection { margin-right: var(--aquarium-right); }
body:has(.aquarium) footer { padding-inline: var(--aquarium-left) var(--aquarium-right); }
body .aquarium { box-shadow: inset 0 0 0 4px #102731, 0 18px 45px #0004; }
/* Rotated phones retain a full-width scene instead of acquiring a sidebar. */
@media (max-width: 1023px) {
  body .workspace { grid-template-columns: minmax(0, 1fr); }
  body .collection { margin-inline: var(--aquarium-left) var(--aquarium-right); }
}
/* Empty areas of the direction control must leave the sea touchable. */
#directionPad { pointer-events: none; }
#directionPad button { pointer-events: auto; }
