:root {
  color-scheme: dark;
  font-family: "Inter", "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #09131a;
  color: #eaf6f6;
  --muted: #91a7af;
  --accent: #79e4c9;
  --line: #263943;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
svg { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.symbols { display: none; }
button, input { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled, input:disabled { opacity: .45; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.stage {
  position: relative;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(ellipse at 50% 46%, #163744, #0a1721 75%);
}
.stage[data-light="dusk"] { background: radial-gradient(ellipse at 50% 46%, #18304b, #090f20 76%); }
#world { position: absolute; inset: 0; touch-action: none; visibility: hidden; }
.stage[data-mode="live"] #world { visibility: visible; cursor: grab; }
.stage[data-mode="live"] #world:active { cursor: grabbing; }
#world:focus-visible { outline-offset: -3px; }
#world canvas { display: block; width: 100%; height: 100%; }
.loading {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(calc(100% - 48px), 230px);
  transform: translate(-50%, -50%);
  text-align: center;
  color: #c7dade;
}
.loading p { margin: 0 0 10px; font-size: .9rem; }
.loading progress { display: block; width: 100%; height: 8px; accent-color: var(--accent); }
.loading button { padding: 8px 15px; border: 1px solid var(--line); border-radius: 8px; background: #152832; }
.stage-settings {
  position: absolute;
  z-index: 1;
  inset-block: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-bottom));
  inset-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}
.stage-settings > * { pointer-events: auto; }
.icon-button {
  flex: none;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #c4d7dc;
}
.icon-button:not(:disabled):hover, .icon-button[aria-pressed="true"], .settings-toggle[aria-expanded="true"] {
  background: #203d46;
  color: var(--accent);
}
.settings-toggle { width: 44px; height: 44px; border: 1px solid #2b414b; background: #102029db; }
.panel {
  width: min(100%, 342px);
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #101e27f5;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 14px 42px #0006;
  padding: 16px 18px 0;
}
.panel h1 { font-size: 1rem; margin: 0 0 13px; font-weight: 650; }

.settings { padding: 13px 0; border-top: 1px solid var(--line); }
.settings h2 { font-size: .91rem; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; font-weight: 600; }
.settings h2 svg { color: #7c9ea7; }
.options { display: grid; grid-auto-columns: 1fr; grid-auto-flow: column; gap: 6px; padding: 4px; background: #0b171f; border: 1px solid #20353f; border-radius: 10px; }
.options button { border: 1px solid transparent; background: transparent; color: #a8bbc2; display: flex; justify-content: center; align-items: center; gap: 5px; padding: 8px 2px; border-radius: 7px; font-size: .875rem; white-space: nowrap; }
.options button[aria-pressed="true"], .options button:not(:disabled):hover { color: #a6f3e0; border-color: #335a58; background: #19373d; }
.slider-label { display: flex; align-items: center; justify-content: space-between; font-size: .875rem; color: #a8bbc2; }
output { color: var(--accent); font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; margin: 9px 0 0; accent-color: var(--accent); cursor: pointer; }
.optics-controls .slider-label:not(:first-child) { margin-top: 12px; }
.sun-clock-note { margin: 8px 0 0; color: #b8ccd0; font-size: .875rem; }
.pause { min-height: 40px; padding-inline: 9px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid #2c414a; border-radius: 10px; background: #152832; color: #c2d5da; font-size: .875rem; }
.pause:not(:disabled):hover { border-color: #4a8d85; color: var(--accent); }
.tools { display: flex; gap: 3px; align-items: center; flex-wrap: wrap; }
.tools .icon-button { width: 34px; height: 38px; }
.credits { color: var(--muted); font-size: .875rem; }
.credits summary { cursor: pointer; }
.credits div { margin-top: 8px; line-height: 1.65; }
.credits a { color: #a7dbd9; text-underline-offset: 3px; }
.stage:fullscreen { width: 100%; height: 100%; }
@media (max-width: 340px) { .views svg { display: none; } }
.submenu-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.submenu-button, .back-button, .fish-count-button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #152832;
  color: #d8e9ec;
  font-size: .875rem;
}
.submenu-button:hover, .back-button:hover, .fish-count-button:not(:disabled):hover {
  border-color: #4a8d85;
  color: var(--accent);
}
.submenu-header { display: flex; align-items: center; gap: 12px; margin-bottom: 13px; }
.submenu-header h2 { margin: 0; font-size: 1rem; }
.back-button { padding-inline: 11px; }
.fish-count-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fish-count-stepper { display: flex; align-items: center; gap: 4px; }
.fish-count-button { min-width: 44px; padding: 0; font-size: 1.125rem; }
.fish-count-stepper output { min-width: 2ch; text-align: center; }
