:root {
  color-scheme: dark;
  --ink: #ecf4df;
  --muted: rgba(225, 238, 215, .58);
  --faint: rgba(225, 238, 215, .14);
  --glass: rgba(8, 21, 16, .67);
  --accent: #c9ef7b;
  --accent-soft: rgba(201, 239, 123, .24);
  --line: rgba(220, 240, 210, .16);
  --panel-width: 326px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #06100c;
}

button,
select,
input {
  font: inherit;
}

button,
select {
  color: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
}

.garden-shell {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 620px;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 74% 28%, rgba(74, 107, 82, .22), transparent 34%),
    radial-gradient(circle at 16% 90%, rgba(61, 97, 63, .16), transparent 42%),
    linear-gradient(145deg, #091811 0%, #06100c 58%, #020906 100%);
}

#garden {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  contain: strict;
  touch-action: none;
  cursor: crosshair;
}

.mist,
.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.mist {
  mix-blend-mode: screen;
  opacity: .5;
  filter: blur(24px);
  contain: paint;
  will-change: transform, opacity;
}

.mist-a {
  background:
    radial-gradient(ellipse at 35% 87%, rgba(138, 179, 126, .08), transparent 43%),
    radial-gradient(ellipse at 74% 48%, rgba(143, 169, 126, .07), transparent 28%);
  animation: breathe 13s ease-in-out infinite alternate;
}

.mist-b {
  background: linear-gradient(112deg, transparent 20%, rgba(190, 222, 170, .025) 51%, transparent 64%);
  transform: skewX(-10deg);
  animation: drift 20s linear infinite alternate;
}

.grain {
  z-index: 3;
  opacity: .2;
  background-image:
    repeating-radial-gradient(circle at 14% 33%, rgba(255,255,255,.08) 0 .45px, transparent .8px 4px),
    repeating-radial-gradient(circle at 73% 68%, rgba(0,0,0,.14) 0 .6px, transparent 1px 5px);
  background-size: 7px 9px, 11px 13px;
  mix-blend-mode: soft-light;
}

/* Chromium repaints full-screen blend/filter layers whenever the canvas below
   changes. The gradients already contain soft falloffs, so the lightweight
   composition keeps the atmosphere without forcing that extra full-screen pass. */
.chromium-renderer .mist,
.chromium-renderer .grain {
  mix-blend-mode: normal;
}

.chromium-renderer .mist {
  filter: none;
  opacity: .34;
  animation: none;
  will-change: auto;
}

.topbar,
.hero-copy,
.field-panel,
.instruction,
.footer {
  position: absolute;
  z-index: 5;
}

.topbar {
  top: 0;
  left: 0;
  right: 0;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 38px;
  border-bottom: 1px solid rgba(220, 240, 210, .1);
  background: linear-gradient(to bottom, rgba(3, 12, 8, .48), transparent);
}

.identity {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
}

.identity-mark {
  position: relative;
  width: 31px;
  height: 31px;
  border: 1px solid rgba(214, 244, 183, .42);
  border-radius: 50%;
}

.identity-mark::before,
.identity-mark::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 1px;
  height: 19px;
  background: var(--accent);
  transform-origin: bottom;
}

.identity-mark::before {
  transform: rotate(-28deg);
}

.identity-mark::after {
  transform: rotate(31deg);
}

.identity strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: .01em;
}

.identity small,
.topbar-meta,
.footer {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.identity small {
  display: block;
  margin-top: 4px;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}

.divider {
  width: 1px;
  height: 13px;
  margin: 0 4px;
  background: var(--line);
}

.hero-copy {
  left: clamp(28px, 5vw, 76px);
  top: 50%;
  width: min(490px, calc(100vw - 520px));
  transform: translateY(-46%);
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  max-width: 650px;
  color: #f0f4e8;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 6.2vw, 92px);
  font-weight: 400;
  line-height: .94;
  letter-spacing: -.055em;
  text-shadow: 0 8px 42px rgba(0, 0, 0, .4);
}

.lede {
  width: min(420px, 90%);
  margin: 24px 0 28px;
  color: rgba(231, 241, 223, .68);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 25px;
  pointer-events: auto;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(215, 244, 182, .52);
  border-radius: 999px;
  background: rgba(169, 211, 113, .08);
  color: #e9f5d9;
  font-size: 11px;
  letter-spacing: .04em;
  backdrop-filter: blur(10px);
  transition: background .3s, transform .3s, box-shadow .3s;
}

.primary-action:hover {
  transform: translateY(-2px);
  background: rgba(169, 211, 113, .16);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .22);
}

.new-garden-icon {
  color: var(--accent);
  font-size: 14px;
  transition: transform .45s ease;
}

.primary-action:hover .new-garden-icon {
  transform: rotate(135deg);
}

.text-action {
  padding: 8px 0;
  border-bottom: 1px solid rgba(225, 238, 215, .26);
  background: transparent;
  color: rgba(235, 244, 226, .68);
  font-size: 10px;
  letter-spacing: .07em;
  transition: color .2s, border-color .2s;
}

.text-action:hover {
  color: var(--ink);
  border-color: var(--accent);
}

.field-panel {
  top: 110px;
  right: 30px;
  width: var(--panel-width);
  border: 1px solid var(--line);
  border-radius: 3px;
  background: linear-gradient(150deg, rgba(18, 35, 27, .75), rgba(5, 16, 11, .77));
  box-shadow: 0 25px 70px rgba(0, 0, 0, .26);
  backdrop-filter: blur(24px) saturate(120%);
  overflow: hidden;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 15px 17px 14px 20px;
  border-bottom: 1px solid var(--line);
}

.panel-heading .eyebrow {
  margin-bottom: 5px;
  color: var(--muted);
}

.panel-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 400;
}

.icon-button {
  width: 29px;
  height: 29px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
}

.panel-body {
  max-height: 680px;
  opacity: 1;
  transition: max-height .5s ease, opacity .3s ease;
}

.field-panel.collapsed .panel-body {
  max-height: 0;
  opacity: 0;
}

.season-orbit {
  display: grid;
  grid-template-columns: 62px 1fr;
  align-items: center;
  gap: 12px;
  padding: 16px 20px 13px;
}

.orbit-art {
  position: relative;
  width: 54px;
  height: 54px;
}

.orbit-ring,
.orbit-core,
.orbit-seed {
  position: absolute;
  border-radius: 50%;
}

.orbit-ring {
  inset: 1px;
  border: 1px solid rgba(201, 239, 123, .23);
  border-right-color: rgba(201, 239, 123, .8);
  transform: rotate(-37deg);
  animation: orbit 14s linear infinite;
}

.orbit-core {
  inset: 11px;
  background: radial-gradient(circle at 35% 30%, #d7f4a0, #79924c 62%, #314729);
  box-shadow: 0 0 25px rgba(176, 215, 109, .16);
}

.orbit-core::after {
  content: "";
  position: absolute;
  inset: 8px 13px 8px 14px;
  border-radius: 80% 15% 80% 15%;
  border: 1px solid rgba(17, 46, 28, .62);
  transform: rotate(40deg);
}

.orbit-seed {
  top: 0;
  left: 26px;
  width: 4px;
  height: 4px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.season-orbit small,
.sound-heading small {
  display: block;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.season-orbit strong,
.sound-heading strong {
  display: block;
  margin: 4px 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 400;
}

.season-orbit span {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .03em;
}

.season-orbit .weather-readout {
  display: block;
  margin-top: 4px;
  color: var(--accent);
  font-size: 8px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.season-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 0 20px 15px;
}

.season-tabs button {
  height: 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: rgba(255, 255, 255, .015);
  color: var(--muted);
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.season-tabs button:first-child {
  border-radius: 14px 0 0 14px;
}

.season-tabs button:last-child {
  border-right: 1px solid var(--line);
  border-radius: 0 14px 14px 0;
}

.season-tabs button.active {
  background: var(--accent-soft);
  color: var(--ink);
}

.control-block {
  padding: 12px 20px 5px;
}

.control-block label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 9px;
  color: rgba(231, 241, 223, .67);
  font-size: 9px;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.control-block output {
  color: var(--accent);
}

.palette-block {
  padding: 13px 20px 5px;
}

.palette-label {
  display: block;
  margin-bottom: 10px;
  color: rgba(231, 241, 223, .67);
  font-size: 9px;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.palette-swatches {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 31px;
}

.palette-swatch {
  position: relative;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 2px solid rgba(5, 15, 10, .9);
  border-radius: 50%;
  outline: 1px solid rgba(220, 240, 210, .18);
  background: transparent;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .22);
  transition: transform .2s ease, outline-color .2s ease, box-shadow .2s ease;
}

.palette-swatch span {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: conic-gradient(
    var(--swatch-a) 0 25%,
    var(--swatch-b) 25% 50%,
    var(--swatch-c) 50% 75%,
    var(--swatch-d) 75% 100%
  );
}

.palette-swatch:hover {
  transform: translateY(-2px) scale(1.05);
  outline-color: rgba(220, 240, 210, .5);
}

.palette-swatch.active {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  box-shadow: 0 0 16px var(--accent-soft);
}

.palette-swatch:focus-visible {
  outline: 2px solid #f4f8ed;
  outline-offset: 4px;
}

input[type="range"] {
  width: 100%;
  height: 14px;
  margin: 0;
  appearance: none;
  background: transparent;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 1px;
  background: linear-gradient(90deg, var(--accent), rgba(225, 238, 215, .2));
}

input[type="range"]::-webkit-slider-thumb {
  width: 9px;
  height: 9px;
  margin-top: -4px;
  appearance: none;
  border: 2px solid #102119;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 9px var(--accent-soft);
}

input[type="range"]::-moz-range-track {
  height: 1px;
  background: rgba(225, 238, 215, .2);
}

input[type="range"]::-moz-range-progress {
  height: 1px;
  background: var(--accent);
}

input[type="range"]::-moz-range-thumb {
  width: 8px;
  height: 8px;
  border: 1px solid #102119;
  border-radius: 50%;
  background: var(--accent);
}

.sound-block {
  margin: 14px 20px 0;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .12);
}

.sound-heading {
  display: grid;
  grid-template-columns: 29px 1fr auto auto;
  align-items: center;
  gap: 9px;
}

.sound-glyph {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(201, 239, 123, .3);
  border-radius: 50%;
  color: var(--accent);
}

.sound-heading strong {
  margin-bottom: 0;
  font-size: 12px;
}

.meter {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  width: 23px;
  height: 18px;
}

.meter i {
  display: block;
  width: 2px;
  height: 20%;
  background: var(--accent);
  opacity: .65;
  transition: height .12s;
}

.meter i:nth-child(2) { height: 48%; }
.meter i:nth-child(3) { height: 78%; }
.meter i:nth-child(4) { height: 34%; }
.meter i:nth-child(5) { height: 56%; }

.sound-toggle {
  min-width: 44px;
  height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(201, 239, 123, .3);
  border-radius: 999px;
  background: transparent;
  color: rgba(231, 242, 219, .72);
  font-size: 7px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.sound-toggle:hover,
.sound-toggle.playing {
  background: var(--accent-soft);
  color: var(--ink);
}

select {
  width: 100%;
  margin-top: 11px;
  padding: 8px 25px 8px 9px;
  border: 1px solid var(--line);
  border-radius: 2px;
  outline: none;
  background: #102018;
  color: rgba(237, 245, 228, .78);
  font-size: 9px;
}

.volume-control {
  margin-top: 10px;
}

.volume-control label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  color: rgba(231, 241, 223, .58);
  font-size: 8px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.volume-control output {
  color: var(--accent);
}

.stream-note {
  margin: 8px 1px 0;
  color: rgba(225, 238, 215, .42);
  font-size: 8px;
  line-height: 1.45;
}

.stream-note a {
  color: rgba(222, 242, 193, .72);
}

.panel-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 14px 20px 17px;
}

.panel-actions button {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(255, 255, 255, .025);
  color: rgba(232, 242, 224, .62);
  font-size: 10.5px;
  letter-spacing: .01em;
  transition: background .2s, color .2s;
}

.panel-actions #reseedButton {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: var(--accent-soft);
  color: var(--ink);
  box-shadow: inset 0 0 18px rgba(255, 255, 255, .025);
}

.panel-actions button:hover {
  background: var(--accent-soft);
  color: var(--ink);
}

.panel-actions #reseedButton:hover {
  background: color-mix(in srgb, var(--accent) 27%, rgba(255, 255, 255, .025));
}

.instruction {
  left: clamp(28px, 5vw, 76px);
  bottom: 67px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(232, 242, 224, .63);
  font-size: 9px;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.instruction strong,
.instruction small {
  display: block;
}

.instruction small {
  margin-top: 3px;
  color: rgba(232, 242, 224, .32);
  font-size: 7px;
  letter-spacing: .12em;
}

.mouse-glyph {
  position: relative;
  width: 17px;
  height: 26px;
  border: 1px solid rgba(232, 242, 224, .45);
  border-radius: 9px;
}

.mouse-glyph::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 7px;
  width: 1px;
  height: 5px;
  background: var(--accent);
  animation: scroll 1.8s ease-in-out infinite;
}

.footer {
  left: 0;
  right: 0;
  bottom: 0;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 38px;
  border-top: 1px solid rgba(220, 240, 210, .08);
  background: linear-gradient(to top, rgba(3, 12, 8, .45), transparent);
  font-size: 7px;
}

.toast {
  position: absolute;
  z-index: 8;
  left: 50%;
  bottom: 62px;
  max-width: min(430px, calc(100vw - 40px));
  padding: 10px 15px;
  border: 1px solid rgba(205, 236, 174, .22);
  border-radius: 2px;
  background: rgba(5, 16, 11, .82);
  color: rgba(235, 244, 226, .78);
  font-size: 9px;
  letter-spacing: .06em;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  backdrop-filter: blur(12px);
  transition: opacity .3s, transform .3s;
}

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

.planting-prompt {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: 112px;
  display: grid;
  justify-items: center;
  gap: 6px;
  width: min(310px, calc(100vw - 40px));
  padding: 15px 18px 14px;
  border: 1px solid rgba(207, 239, 172, .22);
  border-radius: 3px;
  background: rgba(5, 16, 11, .72);
  color: rgba(239, 247, 230, .88);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  backdrop-filter: blur(14px);
  transition: opacity .45s ease, transform .45s ease;
}

.planting-prompt.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.planting-prompt strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 400;
}

.planting-prompt small {
  color: var(--muted);
  font-size: 7px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.prompt-seed {
  position: relative;
  width: 7px;
  height: 11px;
  border: 1px solid var(--accent);
  border-radius: 55% 45% 55% 45%;
  box-shadow: 0 0 13px var(--accent-soft);
  transform: rotate(32deg);
  animation: seed-hover 2.2s ease-in-out infinite;
}

.footer a {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .16em;
  text-decoration: none;
  transition: color .2s;
}

.footer a:hover {
  color: var(--accent);
}

@keyframes breathe {
  from { opacity: .32; transform: scale(1); }
  to { opacity: .72; transform: scale(1.08); }
}

@keyframes drift {
  from { transform: translateX(-8%) skewX(-10deg); }
  to { transform: translateX(8%) skewX(-10deg); }
}

@keyframes pulse {
  50% { opacity: .35; box-shadow: 0 0 4px var(--accent); }
}

@keyframes orbit {
  to { transform: rotate(323deg); }
}

@keyframes scroll {
  0%, 100% { transform: translateY(0); opacity: .2; }
  50% { transform: translateY(7px); opacity: 1; }
}

@keyframes seed-hover {
  0%, 100% { transform: translateY(0) rotate(32deg); }
  50% { transform: translateY(-4px) rotate(46deg); }
}

@media (max-width: 900px) {
  .garden-shell {
    min-height: 580px;
  }

  .topbar {
    height: 70px;
    padding: 0 20px;
  }

  .topbar-meta .divider,
  #clock {
    display: none;
  }

  .hero-copy {
    top: 35%;
    left: 24px;
    width: calc(100vw - 48px);
  }

  .hero-copy h1 {
    font-size: clamp(44px, 12vw, 72px);
  }

  .field-panel {
    top: auto;
    right: 16px;
    bottom: 55px;
    width: min(326px, calc(100vw - 32px));
  }

  .field-panel:not(.collapsed) {
    max-height: calc(100vh - 90px);
    overflow-y: auto;
  }

  .field-panel:not(.collapsed) ~ .instruction {
    display: none;
  }

  .instruction {
    left: 22px;
    bottom: 58px;
  }

  .footer {
    padding: 0 20px;
  }

  .footer a:last-child {
    display: none;
  }
}

@media (max-width: 560px) {
  .identity small,
  #statusText,
  .lede {
    display: none;
  }

  .hero-copy {
    top: 28%;
  }

  .hero-copy h1 {
    font-size: clamp(42px, 14vw, 64px);
  }

  .hero-actions {
    margin-top: 24px;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

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