:root {
  --bg: #F2EFE9;
  --water-top: rgba(20, 90, 110, 0.06);
  --ink: #0D0D0D;
  --muted: rgba(13, 13, 13, 0.46);
  --line: rgba(13, 13, 13, 0.14);
  --accent: #FF3B0A;
  --teal: #0F766E;
  --kelp: #15803D;
  --font-sans: 'Space Grotesk', 'Bahnschrift', 'Roboto Flex', sans-serif;
  --font-mono: 'IBM Plex Mono', 'JetBrains Mono', 'DejaVu Sans Mono', monospace;
}

html[data-theme="obsidian"] {
  --bg: #070A0E;
  --water-top: rgba(56, 189, 248, 0.055);
  --ink: #E9ECEF;
  --muted: rgba(233, 236, 239, 0.44);
  --line: rgba(233, 236, 239, 0.14);
  --accent: #FF4D1A;
  --teal: #5EEAD4;
  --kelp: #4ADE80;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  transition: background-color 200ms ease, color 200ms ease;
}

.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1.1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.74rem;
}

.topbar__left,
.topbar__center,
.topbar__right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.topbar__center {
  color: var(--muted);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.brand {
  font-weight: 600;
}

.ctl {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 0.3rem 0.6rem;
  font-size: 0.7rem;
  white-space: nowrap;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}

.ctl:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.ctl[aria-pressed="true"] {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.tank-wrap {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  position: relative;
  touch-action: none;
  user-select: none;
}

#tank-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

@media (max-width: 640px) {
  .topbar__center {
    display: none;
  }
  .topbar {
    padding: 0.55rem 0.75rem;
  }
  .ctl {
    padding: 0.28rem 0.45rem;
    font-size: 0.65rem;
  }
}
