:root {
  color-scheme: light;
  --page: #e9ece6;
  --shell: rgba(250, 247, 239, 0.94);
  --surface: #faf7ef;
  --surface-strong: #fffdf7;
  --surface-tint: #eef1e9;
  --ink: #173b3a;
  --ink-2: #42615f;
  --muted: #596f6d;
  --line: rgba(23, 59, 58, 0.13);
  --line-strong: rgba(23, 59, 58, 0.23);
  --blue: #286777;
  --blue-soft: #70a5ad;
  --teal: #1f5654;
  --teal-soft: #dbe9e2;
  --warm: #b17c4c;
  --danger: #984a45;
  --focus: #155f74;
  --shadow: 0 24px 70px rgba(35, 60, 54, 0.13);
  --shadow-soft: 0 10px 28px rgba(35, 60, 54, 0.08);
  --radius-shell: 30px;
  --radius-panel: 22px;
  --radius-control: 14px;
  --ease: cubic-bezier(0.2, 0.75, 0.25, 1);
  --font-ui: "SF Pro Display", "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

html {
  scrollbar-color: rgba(71, 127, 159, 0.38) transparent;
}

body {
  min-width: 320px;
  background-color: var(--page);
  background-image:
    radial-gradient(circle at 50% -18%, rgba(255, 255, 255, 0.98), transparent 42rem),
    radial-gradient(circle at 8% 68%, rgba(142, 183, 175, 0.13), transparent 28rem),
    radial-gradient(circle, rgba(57, 91, 93, 0.17) 0 0.7px, transparent 1px);
  background-size: auto, auto, 18px 18px;
  color: var(--ink);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(71, 127, 159, 0.22);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

button,
input[type="range"],
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button,
input[type="range"] {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 12px;
  padding: 9px 13px;
  border: 2px solid var(--focus);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  display: flex;
  align-items: center;
  min-height: 44px;
}

.skip-link:focus {
  transform: translateY(0);
}

.ambient {
  position: fixed;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.ambient__wash {
  position: absolute;
  top: -12rem;
  left: 22%;
  width: 46rem;
  height: 31rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.88), transparent 68%);
  filter: blur(12px);
}

.ambient__ring {
  position: absolute;
  right: -12rem;
  bottom: -18rem;
  width: 38rem;
  height: 38rem;
  border: 1px solid rgba(69, 114, 115, 0.08);
  border-radius: 50%;
  box-shadow:
    0 0 0 5rem rgba(255, 255, 255, 0.12),
    0 0 0 10rem rgba(255, 255, 255, 0.08);
}

.app-shell {
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr);
  width: min(calc(100vw - 24px), 1540px);
  height: calc(100dvh - 24px);
  margin: 12px auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-shell);
  background:
    linear-gradient(132deg, rgba(255, 254, 250, 0.88), rgba(247, 245, 238, 0.76)),
    var(--shell);
  box-shadow:
    0 32px 90px rgba(55, 77, 70, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(22px) saturate(1.03);
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid rgba(53, 87, 90, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 10px;
  width: max-content;
  min-height: 44px;
  border-radius: 12px;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(71, 127, 159, 0.25);
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 28%, rgba(255, 255, 255, 0.96), transparent 40%),
    #edf3f1;
  color: var(--blue);
  box-shadow:
    inset 0 0 0 4px rgba(255, 255, 255, 0.35),
    0 7px 18px rgba(61, 102, 104, 0.08);
}

.brand__mark svg {
  width: 27px;
  height: 27px;
}

.brand__copy {
  display: grid;
  gap: 1px;
}

.brand__copy strong {
  font-size: 14px;
  font-weight: 720;
  letter-spacing: 0.015em;
}

.brand__copy small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.13em;
}

.product-title {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-2);
  font-size: 12px;
  white-space: nowrap;
}

.product-title strong {
  color: var(--ink);
  font-weight: 700;
}

.product-title i {
  width: 1px;
  height: 14px;
  background: var(--line-strong);
}

.product-title span {
  color: var(--muted);
}

.utilities {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 4px;
}

.utility-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--ink-2);
  font-size: 11px;
  transition:
    color 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.utility-button svg {
  width: 17px;
  height: 17px;
}

.utility-button:hover,
.utility-button:focus-visible,
.utility-button.is-active {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--blue);
}

.utility-count {
  position: absolute;
  top: 1px;
  right: 1px;
  display: grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  border: 2px solid #f9f7f1;
  border-radius: 999px;
  background: var(--blue);
  color: white;
  font-size: 11px;
  font-weight: 700;
}

.utility-count[hidden] {
  display: none;
}

.workspace {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr) 360px;
  gap: 14px;
  min-height: 0;
  padding: 14px;
}

.sound-library-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: var(--radius-panel);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.66), rgba(245, 245, 239, 0.72)),
    rgba(249, 248, 243, 0.82);
  box-shadow:
    0 15px 38px rgba(58, 81, 75, 0.07),
    inset 0 1px 0 #fff;
}

.library-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 13px 12px;
  border-bottom: 1px solid var(--line);
}

.library-header > div {
  display: grid;
  gap: 3px;
}

.library-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 680;
  letter-spacing: -0.02em;
}

.library-header p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.library-header > span {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(56, 107, 136, 0.08);
  color: var(--blue);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 8px;
  min-height: 0;
  overflow-y: auto;
  padding: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 107, 136, 0.3) transparent;
}

.sound-stage {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.stage-heading {
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 5px 18px 10px;
  text-align: center;
}

.stage-heading h1 {
  margin: 0;
  color: var(--ink);
  font-size: 25px;
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.stage-heading p {
  max-width: 38ch;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
  text-align: center;
}

.sound-map {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: clamp(8px, 1.7vw, 24px);
  min-height: 0;
  padding: 4px 7%;
}

.category-column {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: clamp(24px, 4vh, 42px);
}

.category-module {
  display: grid;
  justify-items: center;
  gap: 7px;
  width: 102px;
  min-height: 124px;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--ink-2);
  text-align: center;
  transition:
    color 180ms ease,
    transform 220ms var(--ease),
    background 180ms ease;
}

.category-module__art {
  position: relative;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  overflow: hidden;
  border: 1px solid rgba(53, 87, 90, 0.16);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.98), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(238, 243, 239, 0.72));
  color: #4e8092;
  box-shadow:
    0 11px 28px rgba(58, 82, 76, 0.1),
    inset 0 1px 0 #fff;
  transition:
    border-color 200ms ease,
    background 200ms ease,
    box-shadow 200ms ease,
    transform 220ms var(--ease);
}

.category-module__art::after {
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.category-module__art svg {
  position: relative;
  z-index: 1;
  width: 63px;
  height: 63px;
}

.category-module__copy {
  display: grid;
  gap: 1px;
}

.category-module__copy strong {
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.category-module__copy small {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.category-module:hover .category-module__art {
  border-color: rgba(71, 127, 159, 0.35);
  transform: translateY(-4px);
}

.category-module:active .category-module__art {
  transform: translateY(-1px) scale(0.98);
}

.category-module.is-active .category-module__art {
  border-color: rgba(71, 127, 159, 0.62);
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.62), transparent 42%),
    linear-gradient(145deg, #dce9e6, #c4d9d8);
  box-shadow:
    0 14px 31px rgba(9, 22, 21, 0.16),
    0 0 0 5px rgba(255, 255, 255, 0.47),
    inset 0 1px 0 #fff;
}

.category-module.is-active .category-module__copy strong {
  color: var(--blue);
}

.category-module--special {
  display: flex;
  align-items: center;
  width: max-content;
  min-height: 52px;
  padding: 5px 13px 5px 5px;
  border: 1px solid rgba(53, 87, 90, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.category-module--special .category-module__art {
  width: 42px;
  height: 42px;
  box-shadow: none;
}

.category-module--special .category-module__art::after {
  inset: 4px;
}

.category-module--special .category-module__art svg {
  width: 34px;
  height: 34px;
}

.category-module--special .category-module__copy {
  text-align: left;
}

.category-module--special .category-module__copy small {
  display: none;
}

.scene-column {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  min-width: 0;
}

.soundscape {
  position: relative;
  width: min(100%, 510px);
  aspect-ratio: 1.32;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 51% 51% 20px 20px / 39% 39% 20px 20px;
  background: #dbe6e5;
  box-shadow:
    0 20px 44px rgba(56, 84, 80, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  isolation: isolate;
}

.soundscape::after {
  position: absolute;
  z-index: 4;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, transparent 52%, rgba(238, 245, 243, 0.2) 78%, rgba(244, 246, 241, 0.6));
  content: "";
  pointer-events: none;
}

.landscape {
  width: 100%;
  height: 100%;
  stroke: none;
}

.moon {
  fill: #f6f4eb;
  opacity: 0.95;
}

.moon-cut {
  fill: #dce7e7;
}

.cloud {
  fill: rgba(245, 247, 244, 0.62);
  animation: cloud-drift 22s ease-in-out infinite alternate;
}

.cloud--two {
  animation-delay: -8s;
  animation-duration: 27s;
}

.mountain--far {
  fill: url("#mountain-far");
  opacity: 0.72;
}

.mountain--near {
  fill: url("#mountain-near");
  opacity: 0.8;
}

.snowcap {
  fill: rgba(239, 245, 241, 0.52);
}

.shore {
  stroke: none;
}

.water-line {
  fill: none;
  stroke: rgba(248, 251, 248, 0.44);
  stroke-width: 4;
  stroke-dasharray: 64 13;
  animation: water-flow 7s linear infinite;
}

.water-line--two {
  stroke-width: 3;
  opacity: 0.72;
  animation-duration: 10s;
  animation-direction: reverse;
}

.lake-trees {
  fill: #446f71;
  opacity: 0.9;
}

.reeds {
  fill: none;
  stroke: #537d78;
  stroke-width: 3;
  opacity: 0.52;
}

.scene-play {
  position: absolute;
  z-index: 8;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 26%, rgba(255, 255, 255, 0.22), transparent 38%),
    var(--teal);
  color: #fffdf7;
  box-shadow:
    0 17px 30px rgba(9, 20, 19, 0.28),
    0 0 0 9px rgba(255, 255, 255, 0.16);
  transform: translate(-50%, -50%);
  transition:
    transform 200ms var(--ease),
    box-shadow 200ms ease,
    opacity 180ms ease;
}

.scene-play:hover:not(:disabled) {
  transform: translate(-50%, -50%) scale(1.06);
  box-shadow:
    0 20px 34px rgba(9, 20, 19, 0.32),
    0 0 0 11px rgba(255, 255, 255, 0.18);
}

.scene-play:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  box-shadow: 0 10px 20px rgba(9, 20, 19, 0.16);
}

.scene-play svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  stroke: none;
}

.scene-play svg:has(path[d^="M8 6"]) {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
}

.scene-live {
  position: absolute;
  z-index: 8;
  bottom: 16px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: rgba(245, 247, 242, 0.72);
  color: #486668;
  font-size: 11px;
  font-weight: 620;
  transform: translateX(-50%);
  backdrop-filter: blur(9px);
}

.scene-live i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #83a69d;
}

.soundscape.is-playing .scene-live i {
  background: var(--blue);
  box-shadow: 0 2px 7px rgba(15, 35, 33, 0.2);
  animation: live-pulse 1.8s ease-in-out infinite;
}

.scene-status {
  display: grid;
  justify-items: center;
  gap: 2px;
  text-align: center;
}

.scene-status strong {
  max-width: 420px;
  overflow: hidden;
  color: var(--ink);
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scene-status span {
  color: var(--muted);
  font-size: 11px;
}

/* Scene overlays */
.scene-rain,
.scene-spring,
.scene-wind,
.scene-chime-rings {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 500ms ease;
}

.scene-rain {
  overflow: hidden;
}

.scene-rain i {
  position: absolute;
  top: 24%;
  left: var(--x);
  width: 1.5px;
  height: 14px;
  border-radius: 999px;
  background: rgba(65, 111, 132, 0.36);
  opacity: 0;
  transform: rotate(12deg) translateY(-24px);
}

.soundscape.has-rain .scene-rain {
  opacity: 1;
}

.soundscape.has-rain .scene-rain i {
  animation: rain-fall 1.3s linear infinite;
  animation-delay: var(--delay);
}

.scene-waves {
  position: absolute;
  z-index: 3;
  inset: 0;
  opacity: 0;
  transition: opacity 450ms ease;
}

.scene-waves path {
  fill: none;
  stroke: rgba(244, 250, 248, 0.75);
  stroke-width: 4;
  stroke-dasharray: 88 22;
}

.soundscape.has-waves .scene-waves {
  opacity: 1;
}

.soundscape.has-waves .scene-waves path {
  animation: wave-shift 5.5s linear infinite;
}

.soundscape.has-waves .scene-waves path:nth-child(2) {
  animation-duration: 7s;
  animation-direction: reverse;
}

.soundscape.has-waves .scene-waves path:nth-child(3) {
  animation-duration: 8s;
}

.scene-spring i {
  position: absolute;
  bottom: 17%;
  left: calc(12% + var(--bubble, 0) * 1%);
  width: 5px;
  height: 5px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  opacity: 0;
}

.scene-spring i:nth-child(1) { --bubble: 9; }
.scene-spring i:nth-child(2) { --bubble: 20; bottom: 22%; }
.scene-spring i:nth-child(3) { --bubble: 31; }
.scene-spring i:nth-child(4) { --bubble: 45; bottom: 26%; }
.scene-spring i:nth-child(5) { --bubble: 57; }
.scene-spring i:nth-child(6) { --bubble: 70; bottom: 20%; }

.soundscape.has-spring .scene-spring {
  opacity: 1;
}

.soundscape.has-spring .scene-spring i {
  animation: water-rise 3.4s ease-in infinite;
  animation-delay: calc(var(--bubble) * -0.045s);
}

.scene-wind i {
  position: absolute;
  top: calc(32% + var(--leaf-y, 0) * 1%);
  left: -20px;
  width: 11px;
  height: 5px;
  border-radius: 100% 0 100% 0;
  background: rgba(117, 147, 125, 0.6);
  opacity: 0;
}

.scene-wind i:nth-child(1) { --leaf-y: 0; animation-delay: 0s; }
.scene-wind i:nth-child(2) { --leaf-y: 7; animation-delay: -2.1s; }
.scene-wind i:nth-child(3) { --leaf-y: 12; animation-delay: -4.4s; }
.scene-wind i:nth-child(4) { --leaf-y: 4; animation-delay: -6.2s; }
.scene-wind i:nth-child(5) { --leaf-y: 16; animation-delay: -1.1s; }

.soundscape.has-wind .scene-wind {
  opacity: 1;
}

.soundscape.has-wind .scene-wind i {
  animation: leaf-drift 9s linear infinite;
}

.scene-chime-rings {
  z-index: 4;
}

.scene-chime-rings i {
  position: absolute;
  top: 20%;
  right: 20%;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  opacity: 0;
}

.scene-chime-rings i:nth-child(2) {
  animation-delay: -1.1s;
}

.scene-chime-rings i:nth-child(3) {
  animation-delay: -2.2s;
}

.soundscape.has-special .scene-chime-rings {
  opacity: 1;
}

.soundscape.has-special .scene-chime-rings i {
  animation: chime-ring 3.4s ease-out infinite;
}

/* Category icon language */
.icon-cloud {
  fill: rgba(81, 120, 135, 0.16);
  stroke: #5e8fa3;
  stroke-width: 1.6;
}

.icon-sun {
  fill: rgba(230, 193, 123, 0.54);
  stroke: rgba(171, 130, 74, 0.52);
  stroke-width: 1.3;
}

.icon-rain-drops {
  stroke: #5d94af;
  stroke-width: 1.8;
  animation: icon-rain 1.7s ease-in-out infinite;
}

.icon-water {
  stroke: #69a0aa;
  stroke-width: 2;
  stroke-dasharray: 24 7;
  animation: icon-water 3.2s linear infinite;
}

.icon-water--soft {
  opacity: 0.64;
  animation-direction: reverse;
}

.icon-stone {
  fill: rgba(102, 131, 126, 0.18);
  stroke: #71958b;
  stroke-width: 1.4;
}

.icon-tree {
  fill: rgba(87, 139, 116, 0.64);
  stroke: #568377;
  stroke-width: 1.2;
}

.icon-tree--small {
  opacity: 0.7;
}

.icon-wind {
  stroke: #759286;
  stroke-width: 1.9;
  animation: wind-line 3.8s ease-in-out infinite;
}

.icon-wind--short {
  opacity: 0.58;
  animation-delay: -1.6s;
}

.icon-leaf {
  fill: rgba(112, 157, 91, 0.55);
  stroke: #65885d;
  stroke-width: 1.1;
  animation: leaf-wiggle 3.2s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.icon-leaf--two {
  animation-delay: -1.3s;
}

.icon-chime-string {
  stroke: rgba(94, 112, 106, 0.52);
  stroke-width: 1.2;
}

.icon-chime {
  fill: rgba(172, 139, 91, 0.2);
  stroke: #a0825d;
  stroke-width: 1.4;
  animation: chime-sway 3.6s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: top center;
}

.icon-hill {
  fill: rgba(87, 139, 116, 0.16);
  stroke: #6c927e;
  stroke-width: 1.2;
}

.icon-tree--left {
  animation: tree-sway 4.2s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: bottom center;
}

.icon-tree--right {
  animation: tree-sway 4.8s ease-in-out infinite reverse;
  transform-box: fill-box;
  transform-origin: bottom center;
}

.icon-path {
  stroke: rgba(109, 139, 116, 0.55);
  stroke-width: 2;
}

.icon-branch {
  stroke: #8b7054;
  stroke-width: 2;
}

.icon-bird {
  fill: rgba(71, 108, 102, 0.22);
  stroke: #567f77;
  stroke-width: 1.4;
  transform-box: fill-box;
  transform-origin: center;
  animation: bird-bob 2.8s ease-in-out infinite;
}

.icon-bird--two {
  animation-delay: -1.2s;
}

.icon-eye {
  fill: #526e68;
  stroke: none;
}

.icon-grass {
  stroke: #879261;
  stroke-width: 1.6;
}

.icon-firefly,
.icon-spark {
  fill: #d9b067;
  stroke: none;
  animation: firefly-pulse 2.2s ease-in-out infinite;
}

.icon-firefly--one {
  animation-delay: -0.4s;
}

.icon-firefly--two {
  animation-delay: -1.2s;
}

.icon-firefly--three {
  animation-delay: -1.8s;
}

.icon-firefly-glow {
  stroke: rgba(211, 171, 96, 0.46);
  stroke-width: 1.5;
  stroke-dasharray: 3 5;
}

.icon-log {
  stroke: #7c5c46;
  stroke-width: 4;
}

.icon-flame--outer {
  fill: rgba(207, 112, 70, 0.28);
  stroke: #b86b49;
  stroke-width: 1.5;
  animation: flame-flicker 1.5s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: bottom center;
}

.icon-flame--inner {
  fill: rgba(230, 176, 93, 0.52);
  stroke: #c88e4e;
  stroke-width: 1.2;
  animation: flame-flicker 1.05s ease-in-out infinite alternate-reverse;
  transform-box: fill-box;
  transform-origin: bottom center;
}

.icon-spark--one {
  animation-delay: -0.7s;
}

.icon-spark--two {
  animation-delay: -1.5s;
}

.icon-cave-wall {
  fill: rgba(76, 108, 111, 0.15);
  stroke: #6b898c;
  stroke-width: 1.5;
}

.icon-drip {
  stroke: #6e9da6;
  stroke-width: 2;
  animation: drip-fall 2.7s ease-in infinite;
}

.icon-drip--two {
  animation-delay: -1.3s;
}

.icon-bowl {
  fill: rgba(179, 143, 87, 0.2);
  stroke: #a88351;
  stroke-width: 1.5;
}

.icon-bowl-rim,
.icon-sound-ring {
  stroke: #aa8b5c;
  stroke-width: 1.3;
}

.icon-sound-ring {
  opacity: 0.52;
  animation: sound-ring 3s ease-out infinite;
}

.icon-sound-ring--two {
  animation-delay: -1s;
}

.icon-sound-ring--three {
  animation-delay: -2s;
}

.icon-waveform {
  stroke: #638a98;
  stroke-width: 1.8;
  stroke-dasharray: 4 3;
  animation: waveform-shift 3s linear infinite;
}

.icon-noise-line {
  stroke: rgba(108, 139, 150, 0.5);
  stroke-width: 1.4;
}

.icon-cup {
  fill: rgba(161, 122, 87, 0.15);
  stroke: #9b7659;
  stroke-width: 1.5;
}

.icon-cup-handle {
  stroke: #9b7659;
  stroke-width: 1.5;
}

.icon-steam {
  stroke: rgba(122, 144, 139, 0.72);
  stroke-width: 1.4;
  animation: steam-rise 3s ease-in-out infinite;
}

.icon-steam--two {
  animation-delay: -1s;
}

.icon-steam--three {
  animation-delay: -2s;
}

.icon-book {
  fill: rgba(125, 126, 100, 0.17);
  stroke: #7d806a;
  stroke-width: 1.3;
}

.icon-page {
  stroke: rgba(125, 129, 104, 0.56);
  stroke-width: 1.1;
}

.icon-train {
  fill: rgba(100, 128, 143, 0.16);
  stroke: #6f8793;
  stroke-width: 1.4;
}

.icon-train-window {
  stroke: #718e9b;
  stroke-width: 1.3;
}

.icon-wheel {
  fill: rgba(112, 137, 147, 0.16);
  stroke: #6f8793;
  stroke-width: 1.3;
}

.icon-motion {
  stroke: #8199a3;
  stroke-width: 1.2;
  animation: wind-line 2.7s ease-in-out infinite;
}

.icon-fan-hub {
  fill: #66888d;
  stroke: none;
}

.icon-fan-blades {
  fill: rgba(103, 143, 147, 0.2);
  stroke: #64898c;
  stroke-width: 1.3;
  transform-box: fill-box;
  transform-origin: center;
  animation: fan-spin 7s linear infinite;
}

.icon-fan-cage {
  stroke: rgba(95, 132, 136, 0.42);
  stroke-width: 1.2;
}

/* Mixer */
.mixer-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: var(--radius-panel);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.76), rgba(248, 247, 241, 0.72)),
    var(--surface);
  box-shadow:
    0 15px 38px rgba(58, 81, 75, 0.08),
    inset 0 1px 0 #fff;
}

.mixer-header {
  position: relative;
  display: grid;
  gap: 13px;
  padding: 15px 16px 13px;
  border-bottom: 1px solid var(--line);
}

.mixer-drawer-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: default;
}

.mixer-drawer-handle {
  display: none;
}

.mixer-header__title {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.mixer-header__title small {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.mixer-header__title strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.mixer-header__status {
  color: var(--muted);
  font-size: 11px;
}

.mixer-panel.is-playing .mixer-header__status {
  color: var(--blue);
}

.transport-controls {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
}

.transport-button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(71, 127, 159, 0.24);
  border-radius: 50%;
  background: #e9f0ee;
  color: var(--teal);
  box-shadow:
    0 8px 18px rgba(53, 92, 95, 0.09),
    inset 0 1px 0 #fff;
  transition:
    background 180ms ease,
    transform 180ms var(--ease);
}

.mixer-panel.is-playing .transport-button {
  background: var(--teal);
  color: #fff;
}

.transport-button:hover:not(:disabled) {
  transform: scale(1.04);
}

.transport-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.transport-button svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
  stroke: none;
}

.transport-button svg:has(path[d^="M8 6"]) {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
}

.transport-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.transport-copy strong {
  font-size: 12px;
  font-weight: 650;
}

.transport-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mixer-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.mix-list {
  height: 100%;
  overflow-y: auto;
  padding: 7px 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(71, 127, 159, 0.3) transparent;
}

.mix-list[hidden],
.empty-mix[hidden] {
  display: none;
}

.mix-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 63px;
  padding: 8px;
  border-radius: 13px;
  transition: background 160ms ease;
}

.mix-row + .mix-row {
  border-top: 1px solid rgba(53, 87, 90, 0.08);
  border-radius: 0 0 13px 13px;
}

.mix-row:hover {
  background: rgba(255, 255, 255, 0.6);
}

.mix-row__art {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--tone) 26%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--tone) 12%, #fff);
  color: var(--tone);
}

.mix-row__art svg {
  width: 34px;
  height: 34px;
}

.mix-row__content {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.mix-row__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.mix-row__heading > div {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.mix-row__heading strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 650;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.25;
}

.mix-row__heading small {
  color: var(--muted);
  font-size: 11px;
}

.mix-row__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 1px;
}

.track-playback {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(56, 107, 136, 0.15);
  border-radius: 50%;
  background: rgba(230, 239, 236, 0.68);
  color: var(--blue);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.track-playback:hover {
  border-color: rgba(56, 107, 136, 0.34);
  background: #e2eeea;
}

.track-playback svg {
  width: 14px;
  height: 14px;
}

.track-playback__play {
  display: none;
  fill: currentColor;
  stroke: none;
}

.track-playback__pause {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.track-playback.is-paused .track-playback__play {
  display: block;
}

.track-playback.is-paused .track-playback__pause {
  display: none;
}

.mix-row.is-layer-paused .mix-row__art,
.mix-row.is-layer-paused .mix-row__heading > div {
  opacity: 0.5;
}

.mix-row.is-loading .mix-row__art {
  animation: track-loading 1.2s ease-in-out infinite;
}

.mix-row.has-error [data-track-meta] {
  color: var(--danger);
}

.remove-track {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #899998;
  transition:
    color 160ms ease,
    background 160ms ease;
}

.remove-track:hover {
  background: rgba(183, 101, 94, 0.09);
  color: var(--danger);
}

.remove-track svg {
  width: 13px;
  height: 13px;
}

.track-volume,
.master-volume-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 31px;
  align-items: center;
  gap: 7px;
}

.track-volume output,
.master-volume-control output {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

input[type="range"] {
  width: 100%;
  height: 28px;
  margin: 0;
  border-radius: 999px;
  outline: none;
  background:
    linear-gradient(
      90deg,
      var(--blue) 0%,
      var(--blue) var(--range-progress, 50%),
      rgba(53, 87, 90, 0.13) var(--range-progress, 50%),
      rgba(53, 87, 90, 0.13) 100%
    ) center / 100% 4px no-repeat;
  appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  border: 3px solid #fbfaf6;
  border-radius: 50%;
  background: var(--blue);
  box-shadow:
    0 0 0 1px rgba(53, 87, 90, 0.15),
    0 3px 7px rgba(49, 75, 75, 0.16);
  appearance: none;
}

input[type="range"]::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: 3px solid #fbfaf6;
  border-radius: 50%;
  background: var(--blue);
}

input[type="range"]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 5px;
}

.empty-mix {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 7px;
  height: 100%;
  min-height: 240px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.empty-mix__art {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 4px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.52);
  color: #7ca1a1;
}

.empty-mix__art svg {
  width: 38px;
  height: 38px;
}

.empty-mix strong {
  color: var(--ink-2);
  font-size: 12px;
}

.empty-mix span:last-child {
  max-width: 28ch;
  font-size: 11px;
  line-height: 1.65;
}

.mixer-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--line);
}

.footer-button {
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 620;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.footer-button--save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--teal);
  color: #fffdf7;
}

.footer-button--save:hover:not(:disabled) {
  background: #274f55;
}

.footer-button--quiet {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.42);
  color: var(--muted);
}

.footer-button--quiet:hover:not(:disabled),
.footer-button--quiet.confirming {
  border-color: rgba(183, 101, 94, 0.24);
  color: var(--danger);
}

.footer-button:disabled {
  cursor: not-allowed;
  opacity: 0.44;
}

.footer-button svg {
  width: 13px;
  height: 13px;
}

/* Dialogs */
dialog {
  color: var(--ink);
}

dialog::backdrop {
  background: rgba(33, 52, 52, 0.24);
  backdrop-filter: blur(3px);
}

.panel-dialog {
  max-height: min(74dvh, 680px);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 22px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.88), rgba(248, 247, 242, 0.92)),
    var(--surface);
  box-shadow: 0 28px 75px rgba(38, 59, 56, 0.22);
}

.category-dialog {
  position: fixed;
  width: min(360px, calc(100vw - 32px));
  margin: 0;
}

.utility-dialog {
  width: min(520px, calc(100vw - 32px));
}

.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--line);
}

.dialog-heading > div {
  display: grid;
}

.dialog-kicker {
  display: none;
}

.dialog-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 680;
  letter-spacing: -0.025em;
}

.icon-button {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.56);
  color: var(--muted);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.icon-button:hover {
  border-color: var(--line-strong);
  background: #fff;
  color: var(--ink);
}

.icon-button--danger:hover {
  border-color: rgba(183, 101, 94, 0.3);
  color: var(--danger);
}

.icon-button svg {
  width: 15px;
  height: 15px;
}

.dialog-note {
  margin: 0;
  padding: 11px 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.sound-options {
  max-height: min(53dvh, 480px);
  overflow-y: auto;
  padding: 0 8px 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(71, 127, 159, 0.3) transparent;
}

.sound-option {
  display: grid;
  grid-template-columns: 43px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 57px;
  padding: 7px 9px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  transition:
    background 160ms ease,
    opacity 160ms ease;
}

.sound-option:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.72);
}

.sound-option:disabled {
  cursor: default;
}

.sound-option.is-added {
  opacity: 0.62;
}

.sound-option.is-at-limit {
  opacity: 0.44;
}

.sound-option__icon {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--tone) 27%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--tone) 11%, #fff);
  color: var(--tone);
}

.sound-option__icon svg {
  width: 37px;
  height: 37px;
}

.sound-option__copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.sound-option__copy strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 650;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.3;
}

.sound-option__copy small {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.sound-option__action {
  min-width: 42px;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(49, 95, 102, 0.08);
  color: var(--teal);
  font-size: 11px;
  font-weight: 650;
  text-align: center;
}

.sound-option.is-added .sound-option__action {
  background: transparent;
  color: var(--muted);
}

.utility-content {
  max-height: min(65dvh, 590px);
  overflow-y: auto;
  padding: 0 12px 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(71, 127, 159, 0.3) transparent;
}

.utility-list {
  display: grid;
  gap: 5px;
}

.utility-option {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.32);
  text-align: left;
  transition: background 160ms ease;
}

.utility-option:hover {
  background: rgba(255, 255, 255, 0.8);
}

.utility-option__index {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #dfeae6;
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
}

.utility-option > span:nth-child(2) {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.utility-option strong {
  font-size: 11px;
  font-weight: 650;
}

.utility-option small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.utility-option > svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.favorite-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  align-items: center;
  gap: 6px;
  min-height: 56px;
  padding: 5px 7px 5px 12px;
  border-bottom: 1px solid rgba(53, 87, 90, 0.08);
}

.favorite-option > button:first-child {
  display: grid;
  gap: 2px;
  padding: 7px 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.favorite-option strong {
  overflow: hidden;
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.favorite-option small {
  color: var(--muted);
  font-size: 11px;
}

.utility-empty {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 35px 22px 40px;
  color: var(--muted);
  text-align: center;
}

.utility-empty strong {
  color: var(--ink-2);
  font-size: 12px;
}

.utility-empty span {
  max-width: 31ch;
  font-size: 11px;
  line-height: 1.7;
}

.timer-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-top: 5px;
}

.timer-option {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.46);
  color: var(--ink-2);
  font-size: 11px;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.timer-option:hover,
.timer-option.is-active {
  border-color: rgba(71, 127, 159, 0.28);
  background: #e6efec;
  color: var(--blue);
}

.timer-current {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.master-volume-control {
  grid-template-columns: 58px minmax(0, 1fr) 38px;
  padding: 16px 8px 8px;
}

.master-volume-control span {
  color: var(--ink-2);
  font-size: 11px;
}

.volume-scale {
  display: flex;
  justify-content: space-between;
  padding: 0 8px;
  color: var(--muted);
  font-size: 11px;
}

.toast {
  position: fixed;
  z-index: 1000;
  bottom: 24px;
  left: 50%;
  max-width: calc(100vw - 32px);
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(49, 95, 102, 0.94);
  box-shadow: 0 15px 34px rgba(43, 70, 72, 0.2);
  color: #fffdf7;
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition:
    opacity 180ms ease,
    transform 220ms var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

noscript {
  position: fixed;
  z-index: 1000;
  inset: auto 12px 12px;
  padding: 14px;
  border-radius: 12px;
  background: #6d4d49;
  color: #fff;
  text-align: center;
}

:where(button, a, input):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

button:disabled {
  pointer-events: none;
}

/* Motion */
@keyframes cloud-drift {
  from { transform: translateX(-8px); }
  to { transform: translateX(16px); }
}

@keyframes water-flow {
  to { stroke-dashoffset: -77; }
}

@keyframes live-pulse {
  50% { opacity: 0.55; }
}

@keyframes rain-fall {
  0% { opacity: 0; transform: rotate(12deg) translateY(-26px); }
  18% { opacity: 0.8; }
  100% { opacity: 0; transform: rotate(12deg) translateY(220px); }
}

@keyframes wave-shift {
  to { stroke-dashoffset: -110; }
}

@keyframes water-rise {
  0% { opacity: 0; transform: translateY(12px) scale(0.7); }
  25% { opacity: 0.9; }
  100% { opacity: 0; transform: translateY(-82px) scale(1.2); }
}

@keyframes leaf-drift {
  0% { opacity: 0; transform: translate(-10px, 10px) rotate(-18deg); }
  12% { opacity: 0.75; }
  100% { opacity: 0; transform: translate(600px, -40px) rotate(190deg); }
}

@keyframes chime-ring {
  0% { opacity: 0.7; transform: scale(0.5); }
  100% { opacity: 0; transform: scale(2.7); }
}

@keyframes icon-rain {
  0%, 100% { transform: translateY(-1px); opacity: 0.8; }
  50% { transform: translateY(3px); opacity: 1; }
}

@keyframes icon-water {
  to { stroke-dashoffset: -31; }
}

@keyframes wind-line {
  0%, 100% { transform: translateX(-1px); }
  50% { transform: translateX(3px); }
}

@keyframes leaf-wiggle {
  0%, 100% { transform: rotate(-7deg); }
  50% { transform: rotate(10deg); }
}

@keyframes chime-sway {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(3deg); }
}

@keyframes tree-sway {
  0%, 100% { transform: rotate(-1.5deg); }
  50% { transform: rotate(2deg); }
}

@keyframes bird-bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-2px) rotate(2deg); }
}

@keyframes firefly-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.15); }
}

@keyframes flame-flicker {
  0% { transform: scaleX(0.92) skewX(-2deg); }
  50% { transform: scaleX(1.04) skewX(2deg); }
  100% { transform: scaleX(0.96) skewX(-1deg); }
}

@keyframes drip-fall {
  0% { opacity: 0; transform: translateY(-8px); }
  22% { opacity: 0.9; }
  100% { opacity: 0; transform: translateY(13px); }
}

@keyframes sound-ring {
  0% { opacity: 0.1; transform: translateY(5px) scale(0.82); }
  45% { opacity: 0.65; }
  100% { opacity: 0; transform: translateY(-4px) scale(1.08); }
}

@keyframes waveform-shift {
  to { stroke-dashoffset: -42; }
}

@keyframes steam-rise {
  0% { opacity: 0; transform: translateY(5px); }
  35% { opacity: 0.75; }
  100% { opacity: 0; transform: translateY(-7px); }
}

@keyframes fan-spin {
  to { transform: rotate(360deg); }
}

@keyframes track-loading {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

.page-hidden *,
.page-hidden *::before,
.page-hidden *::after {
  animation-play-state: paused !important;
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 214px minmax(0, 1fr) 330px;
    gap: 10px;
  }

  .sound-map {
    padding-inline: 2%;
  }

  .category-module {
    width: 88px;
  }

  .category-module__art {
    width: 72px;
    height: 72px;
  }

  .category-module__art svg {
    width: 56px;
    height: 56px;
  }

  .soundscape {
    width: min(100%, 440px);
  }
}

@media (max-height: 780px) and (min-width: 901px) {
  .app-shell {
    grid-template-rows: 58px minmax(0, 1fr);
  }

  .stage-heading {
    padding-top: 1px;
    padding-bottom: 4px;
  }

  .stage-heading h1 {
    font-size: 22px;
  }

  .sound-map {
    padding-block: 0;
  }

  .soundscape {
    width: min(100%, 425px);
  }

  .category-column {
    gap: 16px;
  }

  .category-module__art {
    width: 66px;
    height: 66px;
  }

  .category-module__art svg {
    width: 50px;
    height: 50px;
  }

  .category-module {
    min-height: 104px;
  }

  .scene-status strong {
    font-size: 15px;
  }

  .category-module--special {
    min-height: 46px;
  }
}

@media (max-width: 900px) {
  body {
    background-size: auto, auto, 16px 16px;
  }

  .app-shell {
    grid-template-rows: 56px minmax(0, 1fr);
    width: 100%;
    height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding:
      env(safe-area-inset-top, 0)
      10px
      0;
  }

  .brand {
    gap: 7px;
  }

  .brand__mark {
    width: 34px;
    height: 34px;
  }

  .brand__copy strong {
    font-size: 13px;
  }

  .brand__copy small,
  .product-title {
    display: none;
  }

  .utilities {
    gap: 1px;
  }

  .utility-button {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
  }

  .utility-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 76px minmax(0, 1fr);
    gap: 5px;
    padding: 7px 9px calc(86px + env(safe-area-inset-bottom, 0));
  }

  .sound-library-panel {
    display: block;
    border-radius: 14px;
  }

  .library-header {
    display: none;
  }

  .category-grid {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 5px 7px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .category-grid::-webkit-scrollbar {
    display: none;
  }

  .sound-stage {
    height: auto;
  }

  .stage-heading {
    display: block;
    padding: 4px 10px 3px;
  }

  .stage-heading h1 {
    font-size: 21px;
    text-align: center;
  }

  .stage-heading p {
    display: none;
  }

  .sound-map {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    align-items: center;
    padding: 2px 0 0;
  }

  .category-module {
    gap: 4px;
    flex: 0 0 66px;
    width: 66px;
    min-height: 64px;
    scroll-snap-align: start;
  }

  .category-module__art {
    width: 48px;
    height: 48px;
  }

  .category-module__art::after {
    inset: 4px;
  }

  .category-module__art svg {
    width: 39px;
    height: 39px;
  }

  .category-module__copy strong {
    font-size: 11px;
  }

  .category-module__copy small {
    display: none;
  }

  .scene-column {
    gap: 5px;
  }

  .soundscape {
    width: min(100%, 430px);
    max-height: calc(100dvh - 305px);
    aspect-ratio: 1.22;
    min-height: 210px;
  }

  .scene-play {
    width: 55px;
    height: 55px;
  }

  .scene-status strong {
    max-width: 240px;
    font-size: 15px;
  }

  .mixer-panel {
    position: fixed;
    z-index: 40;
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom, 0));
    left: 8px;
    height: min(72dvh, 620px);
    border-radius: 22px;
    box-shadow: 0 -16px 42px rgba(47, 72, 69, 0.18);
    transform: translateY(calc(100% - 86px));
    transition: transform 320ms var(--ease);
  }

  .mixer-panel.is-open {
    transform: translateY(0);
  }

  .mixer-header {
    grid-template-rows: 22px auto;
    gap: 7px;
    padding: 8px 13px 9px;
  }

  .mixer-drawer-toggle {
    justify-items: center;
    grid-template-columns: 1fr;
    min-height: 22px;
    cursor: pointer;
  }

  .mixer-drawer-handle {
    display: block;
    width: 34px;
    height: 4px;
    border-radius: 999px;
    background: rgba(53, 87, 90, 0.2);
  }

  .mixer-header__title {
    position: absolute;
    top: 8px;
    left: 13px;
    display: grid;
    gap: 0;
  }

  .mixer-header__title small {
    font-size: 11px;
  }

  .mixer-header__title strong {
    font-size: 11px;
  }

  .mixer-header__status {
    position: absolute;
    top: 10px;
    right: 13px;
    font-size: 11px;
  }

  .transport-controls {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 9px;
  }

  .transport-button {
    width: 44px;
    height: 44px;
  }

  .mixer-footer {
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0));
  }

  .panel-dialog {
    top: auto !important;
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom, 0));
    left: 8px !important;
    width: auto;
    max-height: min(72dvh, 620px);
    margin: 0;
    border-radius: 22px;
  }

  .category-dialog {
    max-height: min(60dvh, 560px);
  }

  .sound-options,
  .utility-content {
    max-height: min(50dvh, 470px);
  }

  .toast {
    bottom: calc(98px + env(safe-area-inset-bottom, 0));
  }
}

@media (max-width: 410px) {
  .brand__copy strong {
    font-size: 12px;
  }

  .utility-button {
    width: 44px;
    min-width: 44px;
  }

  .sound-map {
    grid-template-columns: minmax(0, 1fr);
  }

  .category-module {
    flex-basis: 64px;
    width: 64px;
  }

  .category-module__art {
    width: 44px;
    height: 44px;
  }

  .category-module__art svg {
    width: 35px;
    height: 35px;
  }

  .soundscape {
    min-height: 195px;
  }
}

@media (max-height: 690px) and (max-width: 900px) {
  .stage-heading h1 {
    font-size: 18px;
  }

  .sound-map {
    padding-top: 0;
  }

  .soundscape {
    max-height: calc(100dvh - 250px);
    min-height: 176px;
  }

  .scene-status span {
    display: none;
  }

  .category-column {
    gap: 9px;
  }
}

@media (max-height: 500px) and (max-width: 900px) {
  .stage-heading {
    padding-block: 1px;
  }

  .stage-heading h1 {
    font-size: 17px;
  }

  .workspace {
    grid-template-rows: 68px minmax(0, 1fr);
    gap: 4px;
    padding-bottom: calc(78px + env(safe-area-inset-bottom, 0));
  }

  .category-grid {
    padding-block: 4px;
  }

  .category-module {
    min-height: 56px;
  }

  .category-module__art {
    width: 38px;
    height: 38px;
  }

  .category-module__art svg {
    width: 31px;
    height: 31px;
  }

  .sound-map {
    padding-top: 1px;
  }

  .soundscape {
    width: min(100%, 360px);
    height: 110px;
    min-height: 110px;
    max-height: 110px;
    aspect-ratio: auto;
  }

  .scene-column {
    gap: 3px;
  }

  .scene-status strong {
    font-size: 13px;
  }

  .scene-status span {
    display: none;
  }

  .mixer-panel {
    transform: translateY(calc(100% - 78px));
  }

  .toast {
    bottom: calc(88px + env(safe-area-inset-bottom, 0));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Field-recording atelier */
:root {
  --library: #1d3d3a;
  --library-deep: #142f2d;
  --library-text: #f7f1e6;
  --library-muted: #b9c8c0;
  --library-line: rgba(244, 239, 226, 0.14);
  --library-gold: #dfbc82;
}

body {
  background-color: var(--page);
  background-image:
    radial-gradient(circle at 48% -12%, rgba(255, 253, 246, 0.95), transparent 38rem),
    radial-gradient(ellipse at 12% 76%, rgba(111, 151, 136, 0.15), transparent 30rem),
    radial-gradient(ellipse at 90% 16%, rgba(218, 187, 137, 0.13), transparent 26rem),
    radial-gradient(circle, rgba(30, 67, 63, 0.15) 0 0.65px, transparent 0.9px);
  background-size: auto, auto, auto, 18px 18px;
}

.app-shell {
  border-color: rgba(255, 252, 244, 0.96);
  background:
    linear-gradient(128deg, rgba(255, 252, 245, 0.92), rgba(243, 242, 233, 0.86)),
    var(--shell);
  box-shadow:
    0 38px 105px rgba(9, 18, 16, 0.17),
    0 2px 0 rgba(255, 255, 255, 0.75) inset;
}

.topbar {
  background: linear-gradient(180deg, rgba(255, 253, 246, 0.65), rgba(250, 247, 239, 0.25));
  border-bottom-color: rgba(23, 59, 58, 0.1);
}

.brand__mark {
  border-color: rgba(40, 103, 119, 0.34);
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.98), transparent 42%),
    #e6efea;
  color: var(--blue);
  box-shadow:
    inset 0 0 0 4px rgba(255, 255, 255, 0.35),
    0 8px 20px rgba(31, 73, 68, 0.12);
}

.product-title strong {
  letter-spacing: 0.02em;
}

.utility-button {
  color: #365856;
}

.utility-button:hover,
.utility-button:focus-visible,
.utility-button.is-active {
  border-color: rgba(31, 86, 84, 0.14);
  background: rgba(255, 253, 246, 0.84);
  color: var(--teal);
}

.sound-library-panel {
  position: relative;
  border-color: rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(circle at 80% 0%, rgba(193, 184, 143, 0.18), transparent 14rem),
    linear-gradient(160deg, #244641, var(--library) 48%, var(--library-deep));
  box-shadow:
    0 20px 44px rgba(8, 20, 19, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.sound-library-panel::before {
  position: absolute;
  right: -5rem;
  bottom: -7rem;
  width: 17rem;
  height: 17rem;
  border: 1px solid rgba(241, 235, 219, 0.07);
  border-radius: 50%;
  box-shadow:
    0 0 0 2.8rem rgba(241, 235, 219, 0.035),
    0 0 0 5.6rem rgba(241, 235, 219, 0.022);
  content: "";
  pointer-events: none;
}

.library-header {
  border-bottom-color: var(--library-line);
}

.library-header h2 {
  color: var(--library-text);
  font-size: 16px;
}

.library-header p {
  color: var(--library-muted);
}

.library-header > span {
  border: 1px solid rgba(232, 209, 163, 0.2);
  background: rgba(239, 223, 190, 0.08);
  color: var(--library-gold);
}

.category-grid {
  scrollbar-color: rgba(232, 219, 190, 0.45) transparent;
}

.category-module {
  color: var(--library-text);
}

.category-module__art {
  border-color: rgba(255, 252, 243, 0.18);
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.99), transparent 42%),
    linear-gradient(145deg, #fbf7ed, #e4e9df);
  box-shadow:
    0 10px 24px rgba(7, 27, 25, 0.2),
    inset 0 1px 0 #fff;
}

.category-module__art::after {
  border-color: rgba(255, 255, 255, 0.64);
}

.category-module__copy strong {
  color: var(--library-text);
}

.category-module__copy small {
  color: var(--library-muted);
}

.category-module:hover .category-module__art {
  border-color: rgba(232, 209, 163, 0.6);
}

.category-module.is-active .category-module__art {
  border-color: var(--library-gold);
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.7), transparent 42%),
    linear-gradient(145deg, #f4e4c6, #d4dfd3);
  box-shadow:
    0 13px 27px rgba(6, 25, 23, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.category-module.is-active .category-module__copy strong {
  color: var(--library-gold);
}

.stage-heading h1 {
  color: #173d3c;
  font-size: 27px;
  letter-spacing: -0.032em;
}

.stage-heading p {
  color: #4f6866;
}

.soundscape {
  width: min(100%, 548px);
  border-color: rgba(255, 253, 247, 0.94);
  background: #c7d9d8;
  box-shadow:
    0 30px 58px rgba(8, 20, 18, 0.24),
    0 4px 0 rgba(255, 255, 255, 0.45) inset,
    0 0 0 8px rgba(255, 252, 243, 0.36);
}

.soundscape::before {
  position: absolute;
  z-index: 2;
  inset: 0;
  border-radius: inherit;
  content: "";
  pointer-events: none;
  opacity: 0;
  transition: opacity 600ms ease;
}

.soundscape.has-fire::before {
  background: radial-gradient(circle at 30% 92%, rgba(221, 133, 69, 0.35), transparent 44%);
  opacity: 1;
}

.soundscape.has-cafe::before,
.soundscape.has-library::before {
  background: radial-gradient(circle at 68% 16%, rgba(229, 183, 111, 0.28), transparent 42%);
  opacity: 1;
}

.soundscape.has-insects::before {
  background: radial-gradient(circle at 74% 18%, rgba(238, 219, 167, 0.22), transparent 32%);
  opacity: 1;
}

.soundscape.has-meditation::before {
  background: radial-gradient(circle at 50% 44%, rgba(237, 206, 147, 0.23), transparent 42%);
  opacity: 1;
}

.soundscape.has-cave::before {
  background: radial-gradient(circle at 50% 42%, transparent 35%, rgba(27, 59, 57, 0.18) 100%);
  opacity: 1;
}

.soundscape.has-train::before {
  background: linear-gradient(100deg, transparent 18%, rgba(238, 242, 231, 0.24) 48%, transparent 72%);
  opacity: 1;
}

.scene-play {
  border-color: rgba(255, 248, 231, 0.88);
  background:
    radial-gradient(circle at 36% 24%, rgba(255, 255, 255, 0.26), transparent 38%),
    #194c4b;
  box-shadow:
    0 17px 32px rgba(8, 20, 19, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.scene-live {
  border-color: rgba(255, 251, 238, 0.58);
  background: rgba(246, 242, 229, 0.82);
  color: #315b59;
}

.scene-status strong {
  font-size: 19px;
}

.mixer-panel {
  border-color: rgba(255, 253, 247, 0.96);
  background:
    linear-gradient(155deg, rgba(255, 254, 249, 0.92), rgba(246, 243, 233, 0.88)),
    var(--surface);
  box-shadow:
    0 22px 52px rgba(34, 61, 54, 0.11),
    inset 0 1px 0 #fff;
}

.mixer-header {
  border-bottom-color: rgba(23, 59, 58, 0.11);
}

.transport-button {
  border-color: rgba(31, 86, 84, 0.22);
  background: #e6efea;
}

.mixer-panel.is-playing .transport-button {
  background: #194c4b;
}

.mix-row {
  border-radius: 12px;
}

.mix-row + .mix-row {
  border-top-color: rgba(23, 59, 58, 0.09);
}

.sound-copy strong,
.sound-option__copy strong {
  color: var(--ink);
}

.footer-button--save {
  background: #194c4b;
}

.footer-button--save:hover:not(:disabled) {
  background: #123d3c;
}

@media (max-width: 1180px) {
  .soundscape {
    width: min(100%, 460px);
  }
}

@media (max-height: 780px) and (min-width: 901px) {
  .soundscape {
    width: min(100%, 440px);
  }

  .category-module {
    min-height: 112px;
  }
}

@media (max-width: 900px) {
  .sound-library-panel {
    border-color: rgba(255, 255, 255, 0.12);
    background:
      radial-gradient(circle at 92% 0%, rgba(207, 186, 140, 0.17), transparent 12rem),
      linear-gradient(135deg, #244641, #173532);
    box-shadow: 0 10px 24px rgba(8, 20, 18, 0.18);
  }

  .category-grid {
    scrollbar-color: transparent transparent;
  }

  .category-module__copy strong {
    color: var(--library-text);
  }

  .soundscape {
    width: min(100%, 430px);
  }

  .stage-heading h1 {
    font-size: 22px;
  }
}

@media (max-height: 500px) and (max-width: 900px) {
  .soundscape {
    width: min(100%, 380px);
  }
}
