:root {
  --page: #fafaf8;
  --ink: #141414;
  --muted: #6b6b68;
}
html,
body {
  background: var(--page);
  height: 100%;
  margin: 0;
}
body {
  color: var(--ink);
  font:
    15px/1.4 "DM Sans",
    system-ui,
    -apple-system,
    Segoe UI,
    sans-serif;
  overflow: hidden;
}
.page {
  box-sizing: border-box;
  height: 100%;
  padding: max(10px, env(safe-area-inset-top)) 12px
    max(12px, env(safe-area-inset-bottom));
  flex-direction: column;
  align-items: center;
  gap: 6px;
  display: flex;
}
.title {
  letter-spacing: -0.025em;
  margin: 0;
  font:
    600 clamp(28px, 4.2vh, 40px) / 1.1 "DM Sans",
    sans-serif;
}
.pond-frame {
  flex: auto;
  width: 100%;
  min-height: 240px;
  position: relative;
}
#pond {
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  width: 100%;
  height: 100%;
  display: block;
  position: absolute;
  inset: 0;
}
#ui {
  pointer-events: none;
  position: absolute;
  inset: 0;
}
.controls {
  align-items: center;
  gap: 8px;
  display: flex;
}
.sound {
  width: 40px;
  height: 40px;
  color: var(--ink);
  cursor: pointer;
  background: #1414140d;
  border: 1px solid #14141414;
  border-radius: 999px;
  place-items: center;
  padding: 0;
  transition:
    color 0.25s,
    background-color 0.2s;
  display: grid;
}
.sound[hidden] {
  display: none;
}
.sound[aria-pressed="false"] {
  color: var(--muted);
}
.sound:hover {
  background: #14141414;
}
.sound:focus-visible {
  outline-offset: 1px;
  outline: 2px solid #3b6e5c;
}
.sound svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6px;
  stroke-linecap: round;
  stroke-linejoin: round;
  width: 20px;
  height: 20px;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform: rotate(-4deg);
}
.sound:hover svg {
  transform: rotate(4deg) scale(1.08);
}
.sound:active svg {
  transition-duration: 0.1s;
  transform: rotate(-4deg) scale(0.88);
}
.sound.pop svg {
  animation: 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) pop;
}
.note {
  min-height: 1.2em;
  color: var(--muted);
  margin: 0;
  font-size: 12px;
}
.dock {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  display: flex;
  position: absolute;
  bottom: 12px;
  left: 12px;
}
.notices {
  gap: 8px;
  display: grid;
}
.notices:empty {
  display: none;
}
.notice {
  color: #eef6f7;
  background: #081e28b8;
  border-radius: 10px;
  margin: 0;
  padding: 8px 12px;
}
.fps {
  color: #d8f3e4;
  background: #00000073;
  border-radius: 6px;
  padding: 3px 7px;
  font:
    11px/1.3 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  position: absolute;
  top: 8px;
  left: 8px;
}
.debug-overlay {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}

@keyframes pop { 0% { transform: scale(.8); } 45% { transform: scale(1.12); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .sound svg, .sound.pop svg { transition: none; animation: none; } }
