/* Fishdle 2: shared tokens, component states, and lightweight ocean scenes. */
:root {
  --ocean-deep:#061b29; --ocean-midnight:#0a2536; --ocean-surface:#123b50;
  --reef-turquoise:#20c7b7; --reef-seafoam:#d7f6f0; --reef-coral:#ffad7b;
  --ocean-white:#eafdfb; --ocean-muted:#9dbbc4; --ocean-line:#315163;
  --ocean-radius:22px; --ocean-small-radius:12px; --ocean-gap:24px;
  --ocean-shadow:0 18px 55px #0003; --ocean-fast:160ms; --ocean-ease:cubic-bezier(.2,.8,.2,1);
}
html[data-theme] { --bg:var(--ocean-deep); --surface:var(--ocean-midnight); --text:var(--ocean-white); --muted:var(--ocean-muted); --border:var(--ocean-line); --accent:var(--reef-turquoise); color-scheme:dark; background:var(--ocean-deep); }
html[data-theme=light] { --bg:#e7f4f1; --surface:#f7fffc; --text:#102e3c; --muted:#476372; --border:#a1c4c3; --ocean-deep:#e7f4f1; --ocean-midnight:#f7fffc; --ocean-surface:#daeeeb; --ocean-white:#102e3c; --ocean-muted:#476372; --ocean-line:#a1c4c3; --reef-turquoise:#08776d; --reef-coral:#a54c17; color-scheme:light; }
body, .deep-sea-site body { background:radial-gradient(ellipse at 12% 0%,#20c7b70b,transparent 50%),var(--ocean-deep); color:var(--ocean-white); }
.site-header { max-width:1280px; margin-inline:auto; min-height:76px; border-bottom:1px solid var(--ocean-line); background:transparent; }
.brand { letter-spacing:-.045em; font-weight:850; }
.brand-mark { background:var(--reef-turquoise); color:#061b29; border-radius:14px; }
.desktop-nav { gap:6px; }
.desktop-nav .nav-link { border-radius:99px; padding:10px 17px; font-size:.86rem; color:var(--ocean-muted); }
.desktop-nav .nav-link.active { background:#20c7b718; color:var(--reef-turquoise); }
.site-header .header-actions { gap:8px; }
.site-header .profile-chip { max-width:130px; }
.page-shell { width:min(1200px,calc(100% - 48px)); }
.surface, .game-card, .deep-sea-console, .fishdex-card { background:var(--ocean-midnight); border-color:var(--ocean-line); border-radius:var(--ocean-radius); box-shadow:var(--ocean-shadow); }
.button { border-radius:var(--ocean-small-radius); min-height:44px; transition:transform var(--ocean-fast) var(--ocean-ease),background var(--ocean-fast); }
.button-primary { background:var(--reef-turquoise); color:#061b29; border-color:var(--reef-turquoise); font-weight:750; }
.button-secondary { background:var(--ocean-surface); color:var(--ocean-white); border-color:var(--ocean-line); }
.button:hover { transform:translateY(-1px); }
input, select { color:var(--ocean-white); background:var(--ocean-deep); border:1px solid var(--ocean-line); border-radius:10px; min-height:44px; max-width:100%; }
input::placeholder { color:var(--ocean-muted); opacity:1; }
:focus-visible { outline:3px solid var(--reef-coral); outline-offset:4px; }
.eyebrow { color:var(--reef-turquoise); font-size:.68rem; font-weight:800; letter-spacing:.14em; text-transform:uppercase; }
.game-heading h1, .deep-sea-console-header h1 { letter-spacing:-.04em; }
.game-heading .lede { color:var(--ocean-muted); }
.classic-game-shell .game-layout { gap:24px; }
.deep-sea-game-shell .deep-sea-shell { background:transparent; padding-bottom:0; }
.deep-sea-topbar { border:0; box-shadow:none; }
.deep-sea-console { overflow:hidden; }
.deep-sea-grid .water-stage { border:1px solid #37637a; border-radius:16px; background:radial-gradient(ellipse at 50% 0%,#1e64716b,transparent 70%),linear-gradient(#0a354a,#071e30); }
.deep-sea-console-header, .deep-sea-grid .clue-strip { background:transparent; }
.ocean-hub { margin:38px auto 0; max-width:1120px; }
.ocean-section-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; margin:30px 0 18px; }
.ocean-section-heading h2 { font-size:1.65rem; letter-spacing:-.035em; margin:4px 0; }
.ocean-section-heading h1 { font-size:clamp(2.3rem,5vw,3.8rem); letter-spacing:-.05em; margin:0; }
.ocean-section-heading a { color:var(--reef-turquoise); font-size:.85rem; font-weight:650; white-space:nowrap; }
.ocean-panel { display:block; border:1px solid var(--ocean-line); border-radius:var(--ocean-radius); background:var(--ocean-midnight); padding:24px; color:var(--ocean-white); text-decoration:none; }
.ocean-panel p { color:var(--ocean-muted); font-size:.85rem; }
.ocean-hub-grid { display:grid; grid-template-columns:1fr 1fr; gap:var(--ocean-gap); }
.reef-preview { overflow:hidden; padding:0; }
.reef-preview-water { height:150px; position:relative; overflow:hidden; background:radial-gradient(ellipse at 30% 0%,#397c7870,transparent 70%),linear-gradient(#103b50,#082638); }
.reef-preview-floor { position:absolute; inset:auto -5% -17px; height:40px; background:#194852; border-radius:50%; }
.preview-swimmer { position:absolute; width:74px; height:60px; left:18%; top:25%; animation:ocean-drift 12s ease-in-out infinite alternate; }
.preview-swimmer:nth-child(2) { left:48%; top:40%; animation-delay:-4s; }
.preview-swimmer:nth-child(3) { left:72%; top:14%; animation-delay:-7s; }
.preview-swimmer:nth-child(4) { left:30%; top:56%; animation-delay:-9s; }
.preview-swimmer:nth-child(5) { left:66%; top:62%; animation-delay:-2s; }
.preview-swimmer img, .preview-swimmer svg { width:100%; height:100%; object-fit:contain; fill:#a2dfcf; }
.preview-swimmer circle { fill:#07334a; }
.reef-preview-caption { display:flex; justify-content:space-between; padding:16px 24px 0; }
.reef-preview-caption small { display:block; color:var(--ocean-muted); font-size:.72rem; }
.reef-preview-caption strong { font-size:1.3rem; }
.reef-preview>p { padding:0 24px 14px; font-size:.76rem; }
.ocean-progress h3 { margin:10px 0 20px; font-size:1.45rem; }
.ocean-metrics { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-bottom:20px; }
.ocean-metrics strong { display:block; color:var(--reef-coral); font-size:1.9rem; letter-spacing:-.05em; }
.ocean-metrics small, .ocean-progress>small { font-size:.72rem; color:var(--ocean-muted); }
progress { width:100%; height:7px; border:0; border-radius:99px; overflow:hidden; background:var(--ocean-surface); accent-color:var(--reef-turquoise); }
progress::-webkit-progress-bar { background:var(--ocean-surface); }
progress::-webkit-progress-value { background:var(--reef-turquoise); border-radius:99px; }
.ocean-game-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.ocean-game-card { position:relative; overflow:hidden; min-height:215px; padding:28px 24px; border:1px solid var(--ocean-line); border-radius:var(--ocean-radius); background:radial-gradient(ellipse at 100% 0%,#20c7b71c,transparent 70%),var(--ocean-midnight); color:var(--ocean-white); text-decoration:none; }
.ocean-game-abyss { background:radial-gradient(ellipse at 100% 0%,#b99cff22,transparent 70%),var(--ocean-midnight); }
.ocean-game-tide { background:radial-gradient(ellipse at 100% 0%,#ffad7b22,transparent 70%),var(--ocean-midnight); }
.ocean-game-card small { color:var(--ocean-muted); font-size:.58rem; font-weight:700; letter-spacing:.1em; }
.ocean-game-card h3 { margin:30px 0 8px; font-size:1.45rem; }
.ocean-game-card p { max-width:85%; color:var(--ocean-muted); font-size:.8rem; min-height:36px; }
.ocean-game-card>span:last-child { color:var(--reef-turquoise); font-size:.8rem; }
.ocean-game-symbol { position:absolute; right:22px; top:33px; font-size:4.5rem; font-weight:200; opacity:.25; color:var(--reef-turquoise); transform:rotate(-12deg); }
.living-ocean-shell { padding-bottom:30px; }
.ocean-reef-toolbar { display:flex; align-items:end; flex-wrap:wrap; gap:16px; margin:24px 0 16px; }
.ocean-reef-toolbar label, .ocean-decor-tools label { display:grid; gap:6px; font-size:.75rem; color:var(--ocean-muted); }
.ocean-reef-toolbar select { min-width:160px; padding-inline:12px; }
#ocean-save-status { font-size:.8rem; align-self:center; }
.living-aquarium { position:relative; isolation:isolate; min-height:440px; overflow:hidden; border:1px solid #417b89; border-radius:28px; background:radial-gradient(ellipse at 40% 0%,#286b7470,transparent 65%),linear-gradient(#10485d,#061c31); }
.habitat-deep { background:radial-gradient(ellipse at 50% 100%,#303b6650,transparent 70%),#050e23; }
.habitat-fresh { background:linear-gradient(#204e46,#102d32); }
.habitat-seabed { background:linear-gradient(#1d5362,#142e3c); }
.habitat-ocean { background:linear-gradient(#154b71,#061d39); }
.lighting-moonlit { filter:brightness(.8) saturate(.8); }
.lighting-twilight { background-color:#23194b; background-blend-mode:screen; }
.aquarium-light { position:absolute; inset:-80% 0 0; pointer-events:none; background:conic-gradient(from 156deg at 30% 0%,transparent 0deg,#aef6e018 8deg,transparent 14deg,#aef6e00c 20deg,transparent 30deg); }
.aquarium-floor { position:absolute; bottom:-20px; left:-10%; width:120%; height:90px; border-radius:50%; background:linear-gradient(#346365,#163a48); box-shadow:0 -12px 50px #123a4d; }
.habitat-fresh .aquarium-floor { background:#234a38; }
.habitat-deep .aquarium-floor { background:#172139; }
.aquarium-residents { position:absolute; inset:24px 50px 100px; }
.aquarium-fish { position:absolute; left:12%; top:14%; width:112px; height:95px; padding:0; background:none; border:0; color:#a6e3d5; cursor:pointer; animation:ocean-drift 14s ease-in-out infinite alternate; }
.aquarium-fish:nth-child(4n+2) { left:40%; top:30%; animation-delay:-4s; }
.aquarium-fish:nth-child(4n+3) { left:70%; top:12%; animation-delay:-8s; }
.aquarium-fish:nth-child(4n) { left:24%; top:65%; animation-delay:-11s; }
.aquarium-fish:nth-child(7n+5) { left:62%; top:58%; animation-delay:-3s; }
.aquarium-fish:nth-child(7n+6) { left:7%; top:47%; animation-delay:-6s; }
.aquarium-fish:nth-child(7n) { left:48%; top:2%; animation-delay:-9s; }
.aquarium-fish img, .aquarium-fish svg { width:100%; height:70px; object-fit:contain; fill:currentColor; filter:drop-shadow(0 8px 10px #0003); }
.aquarium-fish circle { fill:#0b253c; }
.aquarium-fish.fish-large { width:145px; }
.aquarium-fish.fish-small { width:80px; }
.aquarium-fish span { display:block; font-size:10px; color:#eafdfb; padding:3px 6px; border-radius:8px; background:#061b2970; opacity:0; }
.aquarium-fish:hover, .aquarium-fish:focus-visible { animation-play-state:paused; z-index:2; }
.aquarium-fish:hover span, .aquarium-fish:focus-visible span { opacity:1; }
.aquarium-fish[hidden], .aquarium-empty[hidden] { display:none; }
.aquarium-empty { position:absolute; inset:30% 20% auto; text-align:center; color:#cee6eb; font-size:1rem; }
.aquarium-empty a { display:inline-block; color:#8be8d8; margin-top:12px; }
.aquarium-decorations { position:absolute; bottom:12px; inset-inline:16px; display:grid; grid-template-columns:repeat(12,1fr); gap:3px; }
.decoration-anchor { min-height:48px; font-size:30px; color:#9cd1ac; border:1px dashed #a0dbcc30; border-radius:8px; background:transparent; cursor:pointer; }
.decoration-anchor:hover { background:#20c7b722; }
.aquarium-caption { color:var(--ocean-muted); font-size:.7rem; line-height:1.6; max-width:780px; }
.ocean-decor-tools { display:flex; align-items:center; justify-content:space-between; gap:20px; margin:24px 0; }
.ocean-decor-tools h2 { font-size:1.1rem; margin:0; }
.ocean-decor-tools p { margin-bottom:0; }
.ocean-map { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.ocean-biome { padding:24px; border:1px solid var(--ocean-line); border-radius:18px; background:linear-gradient(140deg,#20c7b712,transparent),var(--ocean-midnight); text-align:start; cursor:pointer; color:var(--ocean-white); }
.ocean-biome[aria-pressed=true] { border-color:var(--reef-turquoise); }
.ocean-biome>span { display:block; height:50px; color:var(--reef-turquoise); font-size:2.5rem; }
.ocean-biome strong, .ocean-biome small { display:block; margin-bottom:10px; }
.ocean-biome small { font-size:.75rem; color:var(--ocean-muted); }
.ocean-collection-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:14px; }
.collection-card { padding:20px; }
.collection-card h3 { font-size:1rem; margin:0; }
.collection-card small { display:block; margin-top:12px; color:var(--ocean-muted); font-size:.7rem; }
.collection-card.is-complete { border-color:var(--reef-coral); }
.ocean-achievements { display:flex; flex-wrap:wrap; gap:10px; margin-top:24px; }
.ocean-badge { padding:10px 14px; border:1px solid var(--ocean-line); border-radius:99px; color:var(--ocean-muted); font-size:.73rem; }
.ocean-badge.earned { color:var(--reef-coral); border-color:#ffad7b55; background:#ffad7b08; }
.ocean-inspect { max-width:440px; background:var(--ocean-midnight); color:var(--ocean-white); padding:28px; border:1px solid var(--ocean-line); border-radius:22px; }
.ocean-inspect p { line-height:1.7; color:var(--ocean-muted); }
.ocean-inspect::backdrop { background:#010d19ba; backdrop-filter:blur(5px); }
.fishdex-shell .fishdex-grid { gap:18px; grid-template-columns:repeat(auto-fill,minmax(235px,1fr)); }
.fishdex-card .fishdex-card-media { background:radial-gradient(ellipse at 50% 50%,#20c7b719,transparent 70%); min-height:160px; }
.fishdex-card h2 { font-size:1.15rem; }
.fishdex-card i { font-size:.75rem; color:var(--ocean-muted); }
.fishdex-card .fishdex-card-actions { flex-wrap:wrap; }
.fishdex-card .discovery-notes { margin:14px 0 0; color:var(--ocean-muted); font-size:.75rem; }
.discovery-notes summary { cursor:pointer; padding-block:8px; }
.fishdex-v2-filters { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:18px; }
.fishdex-v2-filters label { flex:1; min-width:145px; font-size:.73rem; color:var(--ocean-muted); }
.fishdex-v2-filters select { display:block; width:100%; margin-top:6px; }
.fishdex-filter-count { color:var(--ocean-muted); font-size:.8rem; }
.is-paused .aquarium-fish { animation-play-state:paused; }
@keyframes ocean-drift { 0% { transform:translate(-20px,0) rotate(-2deg); } 50% { transform:translate(25px,9px) rotate(1deg); } 100% { transform:translate(65px,-8px) rotate(-1deg); } }
@media (max-width:760px) {
  .page-shell { width:calc(100% - 24px); }
  .site-header { padding-inline:14px; min-height:64px; }
  .site-header .header-actions .button { padding-inline:12px; font-size:.75rem; }
  .mobile-nav { display:grid; grid-template-columns:repeat(5,1fr); background:var(--ocean-midnight); border-top:1px solid var(--ocean-line); padding-bottom:env(safe-area-inset-bottom); }
  .mobile-nav a { min-height:54px; color:var(--ocean-muted); font-size:.62rem; }
  .mobile-nav a.active { color:var(--reef-turquoise); }
  .ocean-hub-grid { grid-template-columns:1fr; gap:16px; }
  .ocean-section-heading { align-items:start; margin-top:24px; gap:12px; }
  .ocean-section-heading h2 { font-size:1.35rem; }
  .ocean-section-heading>a { font-size:.72rem; }
  .ocean-game-grid { grid-template-columns:1fr; gap:12px; }
  .ocean-game-card { min-height:150px; padding:20px; }
  .ocean-game-card h3 { margin-top:16px; font-size:1.25rem; }
  .ocean-game-card p { min-height:0; }
  .ocean-game-symbol { top:15px; }
  .reef-heading { flex-wrap:wrap; }
  .ocean-reef-toolbar { gap:10px; }
  .ocean-reef-toolbar label { flex:1; min-width:120px; }
  .ocean-reef-toolbar select { min-width:0; width:100%; }
  .living-aquarium { min-height:340px; border-radius:20px; }
  .aquarium-residents { inset:20px 30px 100px 0; }
  .aquarium-fish { width:75px; }
  .aquarium-fish.fish-large { width:90px; }
  .aquarium-fish.fish-small { width:60px; }
  .aquarium-decorations { grid-template-columns:repeat(6,1fr); }
  .decoration-anchor { min-height:38px; font-size:23px; }
  .ocean-map { grid-template-columns:repeat(2,1fr); gap:10px; }
  .ocean-biome { padding:16px; }
  .ocean-decor-tools { align-items:stretch; flex-direction:column; }
  .ocean-decor-tools select { width:100%; }
  .ocean-collection-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .collection-card { padding:14px; }
  .collection-card h3 { font-size:.86rem; }
  .fishdex-shell .fishdex-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .fishdex-card .fishdex-card-media { min-height:110px; }
  .fishdex-card .fishdex-card-body { padding:12px; }
  .fishdex-card h2 { font-size:.95rem; }
  .fishdex-card .s14-fishdex-meta { font-size:.7rem; }
  .ocean-hub { margin-top:24px; }
}
@media (prefers-reduced-motion:reduce) { .aquarium-fish,.preview-swimmer { animation:none; } .button { transition:none; } }
@media (forced-colors:active) { .living-aquarium,.ocean-panel,.ocean-biome,.ocean-game-card { border:1px solid CanvasText; } }

html[data-theme], html.deep-sea-site { --ink:var(--ocean-white); --ink-soft:var(--ocean-muted); --paper:var(--ocean-deep); --white:var(--ocean-midnight); --mist:var(--ocean-surface); --foam:var(--ocean-surface); --line:var(--ocean-line); --deep:var(--reef-turquoise); --sea:var(--reef-turquoise); --aqua:var(--reef-turquoise); }
.tide-actions { display:flex; gap:10px; margin-top:16px; flex-wrap:wrap; }
#tide-reward-status { margin-top:12px; color:var(--ocean-muted); font-size:.85rem; }
.account-merge-notice { font-size:.8rem; line-height:1.6; color:var(--ocean-muted); margin-block:12px; }
html[data-theme] body { background:radial-gradient(ellipse at 12% 0%,#20c7b70b,transparent 50%),var(--ocean-deep); color:var(--ocean-white); }
html[data-theme] .deep-sea-shell { --ds-cream:var(--ocean-white); --ds-cream-muted:var(--ocean-muted); --ds-panel:var(--ocean-midnight); --ds-panel-strong:var(--ocean-midnight); --ds-panel-soft:var(--ocean-surface); --ds-ocean-900:var(--ocean-deep); }
html[data-theme=light] .button-primary { color:#fff; }
html[data-theme=light] .deep-sea-console-header h1 { color:#08776d; }
.ocean-daily .deep-sea-back,.ocean-daily .deep-sea-identity { display:none; }
.ocean-daily .deep-sea-topbar { min-height:0; justify-content:flex-end; padding:0 4px 8px; margin:0; }
.ocean-daily .deep-sea-tutorial { margin-block:4px 10px; padding:8px 14px; }
@media(min-width:761px) { .mobile-nav { display:none; } }
@media(max-width:760px) {
  .ocean-daily .deep-sea-console { display:flex; flex-direction:column; }
  .ocean-daily .deep-sea-console>* { order:5; }
  .ocean-daily .deep-sea-console>.deep-sea-console-header { order:0; }
  .ocean-daily .deep-sea-console>.water-stage { order:1; }
  .ocean-daily .deep-sea-console>.guess-zone { order:2; margin-top:12px; }
  .ocean-daily .deep-sea-console>.clue-strip { order:3; }
  .ocean-daily .deep-sea-console>.attempt-track { order:4; }
  .ocean-daily #classic-tutorial { display:none; }
  .ocean-daily .deep-sea-grid .water-stage { min-height:170px; height:180px; }
  .ocean-daily .deep-sea-grid .silhouette-frame { height:150px; }
  .ocean-daily .deep-sea-console-header { padding-block:10px; }
}
@media(max-width:760px) and (max-height:650px) {
  .ocean-daily .deep-sea-grid .water-stage { min-height:140px; height:145px; }
  .ocean-daily .deep-sea-grid .silhouette-frame { height:125px; }
}
.clue-narrowing { display:block; margin-top:8px; font-size:.7rem; color:var(--ocean-muted); }
.aquarium-fish.motion-bottom { top:78%; animation-duration:25s; }
.aquarium-fish.motion-cruise { animation-duration:35s; }
.aquarium-fish.motion-school { animation-duration:10s; }
.aquarium-fish.motion-shelter { animation-duration:18s; }
.has-coral .aquarium-fish.motion-shelter { top:65%; left:25%; animation-name:ocean-shelter; }
.habitat-deep .aquarium-fish { color:#b5adeb; }
.habitat-fresh .aquarium-fish { color:#b9dc9d; }
.decoration-anchor[data-decoration=rock] { color:#94aeb2; font-size:42px; }
.decoration-anchor[data-decoration=coral] { color:#ffad9c; }
.decoration-anchor[data-decoration=lantern] { color:#c2b1ff; text-shadow:0 0 15px #b2a6ff; }
.decoration-anchor[data-decoration=plant],.decoration-anchor[data-decoration=garden] { color:#87cf9d; }
.aquarium-fish:nth-child(n+8) { margin-top:12px; margin-left:24px; }
.aquarium-fish:nth-child(n+15) { margin-top:-20px; margin-left:-32px; }
.aquarium-fish:nth-child(n+22) { margin-top:40px; margin-left:12px; }
@keyframes ocean-shelter { from { transform:translate(-12px,10px) rotate(-4deg); } to { transform:translate(15px,-12px) rotate(4deg); } }
.artwork-placeholder { display:grid; place-items:center; width:100%; min-height:65px; font-size:50px; color:var(--ocean-muted); }
.aquarium-fish .artwork-placeholder { display:grid; opacity:1; background:none; color:#a6e3d5; }
@media(prefers-reduced-motion:reduce) { .living-aquarium .aquarium-fish { animation:none !important; } }
html[data-theme=light] .site-header,html[data-theme=light] .mobile-nav { background:var(--ocean-midnight); }
html[data-theme=light] .site-footer,html[data-theme=light] .site-footer a { color:var(--ocean-muted); }
html[data-theme=light] .deep-sea-shell { --ds-teal-300:#08776d; --ds-teal-400:#08776d; --ds-gold-300:#8b5f00; --ds-gold-400:#8b5f00; }
html[data-theme=light] .deep-sea-shell .search-feedback,html[data-theme=light] .deep-sea-shell .clue-label,html[data-theme=light] .deep-sea-shell .status-message { color:var(--ocean-muted); }
html[data-theme=light] .deep-sea-shell #cast { background:#08776d; color:#fff; }
html[data-theme=light] .deep-sea-shell .button-secondary { background:#daeeeb; color:#102e3c; }
