@font-face {
  font-family: "Fraunces";
  src: url("./fonts/fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("./fonts/fraunces-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("./fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-sans: "Instrument Sans", "Avenir Next", "Segoe UI", sans-serif;
  --paper: #f2ecdd;
  --paper-deep: #e9e1cf;
  --paper-bright: #fbf8f0;
  --ink: #19372a;
  --ink-deep: #11281e;
  --ink-soft: #486051;
  --ink-faint: rgba(25, 55, 42, 0.54);
  --green: #1e4633;
  --green-mid: #50755a;
  --sage: #aac0a0;
  --sage-light: #dce7d3;
  --sage-wash: #eaf1e2;
  --gold: #c8a25c;
  --gold-deep: #997536;
  --gold-light: #ebd8ad;
  --terracotta: #b66349;
  --line: rgba(25, 55, 42, 0.14);
  --line-strong: rgba(25, 55, 42, 0.24);
  --shadow-lg: 0 46px 80px -58px rgba(20, 49, 35, 0.48), 0 12px 28px -20px rgba(20, 49, 35, 0.2);
  --shadow-md: 0 20px 44px -32px rgba(20, 49, 35, 0.32);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 15px;
  --page-gutter: 32px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 300px;
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(ellipse 60% 48% at 8% -8%, rgba(255, 255, 255, 0.88), transparent 66%),
    radial-gradient(ellipse 46% 44% at 89% 8%, rgba(185, 205, 170, 0.31), transparent 65%),
    radial-gradient(ellipse 58% 44% at 22% 110%, rgba(206, 189, 155, 0.22), transparent 70%),
    linear-gradient(180deg, #f5f0e4 0%, #f1ebdc 47%, #ede5d5 100%);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-dialog-open {
  overflow: hidden;
}

::selection {
  color: var(--ink-deep);
  background: #d8e5c9;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:not(:disabled),
a {
  cursor: pointer;
}

a {
  color: inherit;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 5000;
  padding: 11px 16px;
  border-radius: 10px;
  color: var(--paper-bright);
  background: var(--ink);
  font-size: 12px;
  transform: translateY(-150%);
  transition: transform 180ms ease;
}

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

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

.page-pad {
  width: min(calc(100% - var(--page-gutter) * 2), 1480px);
  margin-inline: auto;
}

.kicker {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 9.5px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0.145em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.kicker--light {
  color: rgba(242, 236, 221, 0.54);
}

.page-grain {
  position: fixed;
  inset: 0;
  z-index: 3000;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

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

.ambient-wash__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.7;
}

.ambient-wash__orb--one {
  top: -270px;
  right: -190px;
  width: 680px;
  height: 680px;
  background: radial-gradient(circle, rgba(248, 240, 211, 0.62), rgba(196, 211, 181, 0.08) 61%, transparent 70%);
}

.ambient-wash__orb--two {
  bottom: -380px;
  left: -240px;
  width: 780px;
  height: 780px;
  background: radial-gradient(circle, rgba(235, 218, 185, 0.4), rgba(239, 233, 218, 0.05) 62%, transparent 71%);
}

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

.ambient-petal {
  position: absolute;
  bottom: -7vh;
  left: var(--x);
  width: var(--size);
  height: calc(var(--size) * 1.45);
  border-radius: 75% 20% 70% 22%;
  background: var(--tint);
  opacity: 0;
  filter: blur(0.15px);
  animation: petal-drift var(--duration) linear infinite;
  animation-delay: var(--delay);
  will-change: transform, opacity;
}

@keyframes petal-drift {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  10% {
    opacity: var(--opacity);
  }
  58% {
    transform: translate3d(var(--drift), -58vh, 0) rotate(160deg);
  }
  100% {
    opacity: 0;
    transform: translate3d(calc(var(--drift) * -0.4), -112vh, 0) rotate(330deg);
  }
}

/* Header */
.topbar {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding-top: 23px;
  padding-bottom: 18px;
  animation: settle-in 720ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  color: var(--ink);
  text-decoration: none;
}

.brand__mark {
  width: 29px;
  height: 29px;
  color: var(--green);
  transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.brand:hover .brand__mark {
  transform: rotate(42deg) scale(1.04);
}

.brand__mark svg {
  width: 100%;
  height: 100%;
}

.brand__type {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 510;
  line-height: 1;
  letter-spacing: -0.052em;
}

.stage-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: center;
  min-height: 28px;
  padding: 6px 12px;
  border: 1px solid rgba(25, 55, 42, 0.12);
  border-radius: 999px;
  background: rgba(251, 248, 240, 0.38);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-soft);
  backdrop-filter: blur(8px);
}

.stage-pill__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green-mid);
  box-shadow: 0 0 0 3px rgba(80, 117, 90, 0.1);
}

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

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(25, 55, 42, 0.13);
  border-radius: 50%;
  background: rgba(251, 248, 240, 0.3);
  color: var(--ink-soft);
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.icon-button:hover {
  color: var(--ink);
  border-color: rgba(25, 55, 42, 0.25);
  background: rgba(251, 248, 240, 0.65);
  transform: translateY(-1px);
}

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

.icon-button--text {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 540;
  line-height: 1;
  padding-bottom: 2px;
}

#soundToggle .icon-sound-off {
  display: none;
}

#soundToggle[aria-pressed="false"] .icon-sound-on {
  display: none;
}

#soundToggle[aria-pressed="false"] .icon-sound-off {
  display: block;
}

.petal-wallet {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  margin-left: 3px;
  padding: 7px 13px 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: #f7f1e3;
  background: var(--ink);
  box-shadow: 0 8px 22px -16px rgba(17, 40, 30, 0.75);
}

.petal-wallet__icon {
  width: 18px;
  height: 18px;
  color: var(--gold-light);
  flex-shrink: 0;
}

.petal-wallet__copy {
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}

.petal-wallet__copy strong {
  min-width: 28px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.petal-wallet__copy span {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(247, 241, 227, 0.52);
}

.petal-wallet.is-bumped strong {
  animation: number-bump 380ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes number-bump {
  0% { transform: translateY(0); }
  35% { transform: translateY(-3px) scale(1.04); }
  100% { transform: translateY(0); }
}

/* Layout */
.layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 388px;
  align-items: start;
  gap: 22px;
  padding-bottom: 54px;
}

.main-column,
.sidebar {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 20px;
}

.main-column {
  animation: settle-in 820ms 60ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.sidebar {
  animation: settle-in 820ms 150ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes settle-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Glasshouse */
.glasshouse {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(25, 55, 42, 0.13);
  border-radius: var(--radius-xl);
  background: var(--paper-bright);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.scene {
  position: relative;
  height: 390px;
  overflow: hidden;
  isolation: isolate;
  background: #dce7d1;
}

.scene__art {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  transform: scale(1.018);
  transform-origin: 50% 100%;
}

.scene__haze {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(248, 244, 234, 0.91) 0%, rgba(248, 244, 234, 0.47) 23%, rgba(248, 244, 234, 0.03) 48%, transparent 61%),
    linear-gradient(90deg, rgba(248, 244, 234, 0.3), transparent 35%);
}

.scene__frame {
  position: absolute;
  inset: 13px;
  z-index: 5;
  border: 1px solid rgba(251, 248, 239, 0.38);
  border-radius: 20px;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(25, 55, 42, 0.035), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.scene__sun-glint {
  position: absolute;
  top: 38px;
  right: 102px;
  z-index: 1;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 249, 222, 0.23), transparent 67%);
  filter: blur(5px);
  pointer-events: none;
}

.scene-head {
  position: absolute;
  top: 31px;
  left: 33px;
  z-index: 6;
  width: min(590px, 63%);
  pointer-events: none;
}

.scene-head__kicker {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  color: rgba(25, 55, 42, 0.51);
}

.scene-head h1 {
  margin: 13px 0 13px;
  font-family: var(--font-display);
  font-size: clamp(40px, 4.1vw, 59px);
  font-weight: 410;
  line-height: 0.975;
  letter-spacing: -0.043em;
  color: var(--ink-deep);
  text-wrap: balance;
}

.scene-head h1 em {
  font-weight: 380;
  color: #3f684b;
}

.scene-head__lede {
  max-width: 320px;
  margin: 0;
  font-size: 11.5px;
  line-height: 1.55;
  letter-spacing: 0.005em;
  color: rgba(25, 55, 42, 0.61);
}

.bloom-badge {
  position: absolute;
  top: 27px;
  right: 28px;
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 137px;
  padding: 10px 12px;
  border: 1px solid rgba(25, 55, 42, 0.1);
  border-radius: 15px;
  background: rgba(250, 247, 238, 0.69);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 14px 32px -28px rgba(16, 42, 29, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(12px);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.bloom-badge:hover {
  transform: translateY(-2px);
  background: rgba(250, 247, 238, 0.88);
  border-color: rgba(25, 55, 42, 0.2);
}

.bloom-badge__count {
  font-family: var(--font-display);
  font-size: 29px;
  font-weight: 450;
  line-height: 0.85;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}

.bloom-badge__copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-bottom: 1px;
}

.bloom-badge__copy > span {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.bloom-badge__copy small {
  max-width: 93px;
  overflow: hidden;
  font-size: 8.5px;
  line-height: 1.35;
  color: var(--ink-faint);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bloom-badge__arrow {
  width: 14px;
  height: 14px;
  margin-left: auto;
  color: var(--ink-faint);
  transition: transform 180ms ease;
}

.bloom-badge:hover .bloom-badge__arrow {
  transform: translateX(2px);
}

.garden-pollen {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.pollen {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: rgba(255, 250, 220, 0.9);
  box-shadow: 0 0 8px 2px rgba(255, 247, 207, 0.34);
  opacity: 0;
  animation: pollen-float var(--duration) var(--delay) ease-in-out infinite;
}

@keyframes pollen-float {
  0%, 100% {
    opacity: 0;
    transform: translate3d(0, 8px, 0);
  }
  28% {
    opacity: 0.68;
  }
  62% {
    opacity: 0.32;
    transform: translate3d(var(--drift), -22px, 0);
  }
  84% {
    opacity: 0;
  }
}

.garden-plants {
  position: absolute;
  right: 0;
  bottom: 38px;
  left: 0;
  z-index: 3;
  height: 248px;
  pointer-events: none;
}

.plant {
  --scale: 1;
  position: absolute;
  bottom: var(--bottom);
  left: var(--x);
  z-index: var(--z);
  width: var(--width);
  height: 170px;
  color: var(--flower);
  transform: translateX(-50%) scale(var(--scale));
  transform-origin: 50% 100%;
  pointer-events: auto;
}

.plant__grow {
  width: 100%;
  height: 100%;
  transform-origin: 50% 100%;
  animation: plant-grow 920ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.plant--instant .plant__grow {
  animation: none;
}

.plant__sway {
  width: 100%;
  height: 100%;
  transform-origin: 50% 100%;
  animation: plant-sway var(--sway-duration) var(--sway-delay) ease-in-out infinite alternate;
}

.plant__sway svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 5px 5px rgba(35, 69, 44, 0.07));
}

.plant--golden .plant__sway svg {
  filter: drop-shadow(0 0 7px rgba(217, 179, 92, 0.32)) drop-shadow(0 5px 5px rgba(35, 69, 44, 0.08));
}

.plant__tag {
  position: absolute;
  bottom: calc(100% - 18px);
  left: 50%;
  z-index: 20;
  padding: 4px 8px;
  border: 1px solid rgba(25, 55, 42, 0.12);
  border-radius: 6px;
  color: var(--ink);
  background: rgba(251, 248, 240, 0.92);
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity 160ms ease, transform 160ms ease;
  backdrop-filter: blur(5px);
}

.plant:hover .plant__tag {
  opacity: 1;
  transform: translate(-50%, 0);
}

.plant--golden .plant__tag {
  border-color: rgba(153, 117, 54, 0.3);
  color: var(--gold-deep);
}

@keyframes plant-grow {
  0% {
    opacity: 0;
    transform: scaleY(0.12) scaleX(0.65) translateY(8px);
  }
  54% {
    opacity: 1;
  }
  100% {
    transform: scaleY(1) scaleX(1) translateY(0);
  }
}

@keyframes plant-sway {
  from { transform: rotate(-1.25deg); }
  to { transform: rotate(1.4deg); }
}

.garden-bee {
  position: absolute;
  top: 202px;
  left: -8%;
  z-index: 4;
  width: 44px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 700ms ease;
}

.garden-bee svg {
  width: 100%;
  height: auto;
}

.garden-bee.is-active {
  opacity: 0.92;
  animation: bee-path 27s linear infinite, bee-bob 1.4s ease-in-out infinite alternate;
}

@keyframes bee-path {
  from { left: -8%; }
  to { left: 106%; }
}

@keyframes bee-bob {
  from { transform: translateY(-8px) rotate(-5deg); }
  to { transform: translateY(10px) rotate(4deg); }
}

.garden-caption {
  position: absolute;
  bottom: 16px;
  left: 27px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: min(54%, 430px);
  min-height: 30px;
  padding: 7px 11px 7px 8px;
  border: 1px solid rgba(25, 55, 42, 0.1);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(250, 247, 238, 0.73);
  font-family: var(--font-display);
  font-size: 10.5px;
  font-style: italic;
  line-height: 1.3;
  letter-spacing: 0.005em;
  box-shadow: 0 8px 22px -22px rgba(16, 42, 29, 0.3);
  backdrop-filter: blur(9px);
}

.garden-caption__mark {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  border-radius: 50%;
  color: var(--green-mid);
  background: rgba(156, 181, 141, 0.22);
}

.garden-caption__mark svg {
  width: 13px;
  height: 13px;
}

.golden-widget {
  position: absolute;
  right: 27px;
  bottom: 16px;
  z-index: 4;
  width: 205px;
  padding: 9px 11px 10px;
  border: 1px solid rgba(25, 55, 42, 0.1);
  border-radius: 12px;
  color: var(--ink-soft);
  background: rgba(250, 247, 238, 0.7);
  box-shadow: 0 8px 22px -22px rgba(16, 42, 29, 0.28);
  backdrop-filter: blur(9px);
  transition: border-color 300ms ease, box-shadow 300ms ease, background 300ms ease;
}

.golden-widget.is-ready {
  border-color: rgba(163, 126, 55, 0.42);
  background: rgba(250, 245, 229, 0.86);
  box-shadow: 0 0 0 1px rgba(207, 170, 95, 0.12), 0 0 22px rgba(218, 183, 105, 0.17);
}

.golden-widget__head {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 6px;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.115em;
  text-transform: uppercase;
  color: rgba(64, 89, 68, 0.68);
}

.golden-widget__head svg {
  width: 11px;
  height: 11px;
  color: var(--gold-deep);
}

.golden-widget__count {
  margin-left: auto;
  font-size: 8.5px;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.golden-widget__track {
  position: relative;
  overflow: hidden;
  height: 3px;
  border-radius: 99px;
  background: rgba(25, 55, 42, 0.13);
}

.golden-widget__track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c49b51, #edcf8d);
  transition: width 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.golden-widget.is-ready .golden-widget__head svg {
  animation: gold-twinkle 1.8s ease-in-out infinite;
}

@keyframes gold-twinkle {
  0%, 100% { transform: rotate(0) scale(1); opacity: 1; }
  50% { transform: rotate(20deg) scale(1.16); opacity: 0.72; }
}

/* Type console */
.console {
  position: relative;
  z-index: 7;
  padding: 21px 27px 18px;
  background:
    radial-gradient(ellipse 60% 110% at 8% 0%, rgba(255, 255, 255, 0.7), transparent 67%),
    linear-gradient(180deg, #fbf8f0, #f7f2e6);
  border-top: 1px solid rgba(25, 55, 42, 0.1);
}

.console-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 13px;
}

.console-head__copy {
  min-width: 0;
}

.console-label {
  display: block;
  margin-bottom: 4px;
  color: var(--ink-soft);
}

.console-feedback {
  min-height: 16px;
  margin: 0;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--ink-faint);
  transition: color 180ms ease;
}

.console-feedback.is-success {
  color: var(--green);
}

.console-feedback.is-error {
  color: var(--terracotta);
}

.console-feedback.is-golden {
  color: var(--gold-deep);
}

.flow-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  min-height: 35px;
  padding: 6px 10px;
  border: 1px solid rgba(25, 55, 42, 0.12);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.32);
  white-space: nowrap;
  transition: border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.flow-pill svg {
  width: 16px;
  height: 16px;
  color: var(--green-mid);
}

.flow-pill__value {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.flow-pill__label {
  padding-top: 1px;
  font-size: 8.5px;
  font-weight: 650;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.flow-pill__chain {
  padding: 1px 0 0 8px;
  border-left: 1px solid rgba(25, 55, 42, 0.13);
  font-size: 8.5px;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
}

.flow-pill.is-hot {
  border-color: rgba(163, 126, 55, 0.28);
  background: rgba(245, 235, 209, 0.5);
  box-shadow: 0 0 0 1px rgba(200, 162, 92, 0.06);
}

.flow-pill.is-hot svg,
.flow-pill.is-hot .flow-pill__value {
  color: var(--gold-deep);
}

.typebed {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 9px 10px 9px 16px;
  border: 1px solid rgba(25, 55, 42, 0.18);
  border-radius: 16px;
  background: rgba(255, 253, 247, 0.83);
  box-shadow: inset 0 1px 2px rgba(30, 70, 51, 0.025), 0 7px 18px -18px rgba(25, 55, 42, 0.25);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.typebed:focus-within {
  border-color: rgba(37, 88, 62, 0.71);
  background: #fffdf8;
  box-shadow:
    0 0 0 4px rgba(54, 102, 71, 0.08),
    inset 0 1px 2px rgba(30, 70, 51, 0.025),
    0 10px 26px -22px rgba(25, 55, 42, 0.3);
}

.typebed.is-valid {
  border-color: rgba(87, 122, 89, 0.47);
}

.typebed.is-invalid {
  border-color: rgba(182, 99, 73, 0.46);
}

.typebed.is-error {
  animation: typebed-shake 380ms cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes typebed-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

.typebed__seed {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  flex: 0 0 33px;
  border-radius: 50%;
  color: var(--green-mid);
  background: var(--sage-wash);
}

.typebed__seed svg {
  width: 18px;
  height: 18px;
}

#wordInput {
  width: 100%;
  min-width: 0;
  padding: 7px 0 9px;
  border: 0;
  outline: none;
  color: var(--ink);
  background: transparent;
  font-family: var(--font-display);
  font-size: clamp(25px, 2.5vw, 32px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.023em;
  caret-color: var(--green-mid);
}

#wordInput::placeholder {
  color: rgba(25, 55, 42, 0.29);
  font-style: italic;
  font-weight: 390;
}

.reward-preview {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  min-width: 54px;
  flex: 0 0 auto;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 550;
  line-height: 1.3;
  white-space: nowrap;
  transition: color 180ms ease;
}

.reward-preview.is-valid {
  color: var(--green-mid);
}

.reward-preview.is-valid .reward-preview__value {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 520;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}

.reward-preview.is-golden {
  color: var(--gold-deep);
}

.reward-preview.is-invalid {
  color: var(--terracotta);
}

.reward-preview.is-golden .reward-preview__value {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 520;
}

.plant-button {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
  min-height: 43px;
  padding: 12px 15px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  color: #f8f2e4;
  background: var(--ink);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.plant-button kbd {
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  font-family: var(--font-sans);
  font-size: 8.5px;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: none;
  color: rgba(248, 242, 228, 0.4);
}

.plant-button:hover:not(:disabled) {
  background: #234d38;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -17px rgba(19, 49, 35, 0.75);
}

.plant-button:active:not(:disabled) {
  transform: translateY(0) scale(0.985);
}

.plant-button:disabled {
  cursor: default;
  opacity: 0.45;
}

.console-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  min-height: 16px;
}

.rules-line {
  margin: 0;
  font-size: 9.5px;
  line-height: 1.45;
  color: var(--ink-faint);
}

.rules-line span {
  color: var(--ink-soft);
}

.seed-selected {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  color: var(--gold-deep);
  font-size: 9.5px;
  font-weight: 600;
  white-space: nowrap;
}

.seed-selected svg {
  width: 13px;
  height: 13px;
}

.stage-line {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 9;
  height: 2px;
  overflow: hidden;
  background: rgba(25, 55, 42, 0.08);
}

.stage-line span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, rgba(97, 129, 95, 0.55), rgba(200, 162, 92, 0.7));
  transition: width 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* Wild seeds */
.seed-panel {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
  padding: 19px 20px;
  border: 1px solid rgba(25, 55, 42, 0.1);
  border-radius: var(--radius-lg);
  background: rgba(250, 247, 239, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(9px);
}

.seed-intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 2px 4px 2px 5px;
}

.seed-intro h2 {
  margin: 7px 0 5px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 420;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.seed-intro h2 em {
  font-weight: 380;
  color: var(--green-mid);
}

.seed-intro > p:not(.kicker) {
  max-width: 190px;
  margin: 0 0 13px;
  font-size: 10.5px;
  line-height: 1.48;
  color: var(--ink-faint);
}

.shuffle-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 6px 8px;
  border: 1px solid rgba(25, 55, 42, 0.13);
  border-radius: 8px;
  color: var(--ink-soft);
  background: rgba(251, 248, 240, 0.46);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.shuffle-button:hover {
  color: var(--ink);
  border-color: rgba(25, 55, 42, 0.24);
  background: var(--paper-bright);
}

.shuffle-button svg {
  width: 14px;
  height: 14px;
  transition: transform 320ms ease;
}

.shuffle-button:hover svg {
  transform: rotate(18deg);
}

.seed-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.seed-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 119px;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
  padding: 13px 13px 12px;
  border: 1px solid rgba(25, 55, 42, 0.12);
  border-radius: 13px;
  color: var(--ink);
  background:
    linear-gradient(150deg, var(--seed-tint) 0%, rgba(255, 252, 245, 0.9) 74%),
    #fbf7ee;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), border-color 180ms ease, box-shadow 220ms ease;
}

.seed-card::after {
  content: "";
  position: absolute;
  right: -38px;
  bottom: -69px;
  width: 116px;
  height: 152px;
  border: 1px solid var(--seed-accent);
  border-radius: 48% 52% 48% 52%;
  opacity: 0.1;
  transform: rotate(30deg);
  pointer-events: none;
}

.seed-card:hover {
  z-index: 2;
  transform: translateY(-3px);
  border-color: rgba(25, 55, 42, 0.26);
  box-shadow: 0 15px 25px -22px rgba(25, 55, 42, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.seed-card.is-selected {
  border-color: rgba(25, 55, 42, 0.72);
  box-shadow: 0 0 0 1px rgba(25, 55, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  background:
    linear-gradient(150deg, var(--seed-tint) 0%, rgba(255, 252, 245, 0.95) 70%),
    #fbf7ee;
}

.seed-card__top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}

.seed-card__category {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  font-size: 7.5px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--seed-accent);
}

.seed-card__dot {
  width: 4px;
  height: 4px;
  flex: 0 0 4px;
  border-radius: 50%;
  background: currentColor;
}

.seed-card__bonus {
  flex: 0 0 auto;
  font-family: var(--font-display);
  font-size: 9px;
  font-style: italic;
  color: var(--gold-deep);
  opacity: 0.8;
}

.seed-card__word {
  position: relative;
  z-index: 1;
  display: block;
  overflow: hidden;
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: clamp(26px, 2.4vw, 31px);
  font-weight: 430;
  line-height: 1;
  letter-spacing: -0.045em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seed-card__bottom {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  margin-top: auto;
  padding-top: 9px;
  color: var(--ink-faint);
  font-size: 8.5px;
  letter-spacing: 0.02em;
}

.seed-card__bottom span:last-child {
  font-variant-numeric: tabular-nums;
}

.seed-card__check {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: none;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: var(--paper-bright);
  background: var(--ink);
}

.seed-card__check svg {
  width: 12px;
  height: 12px;
}

.seed-card.is-selected .seed-card__check {
  display: grid;
}

.seed-card.is-selected .seed-card__bonus {
  opacity: 0;
}

.seed-card.is-typing {
  border-color: var(--seed-accent);
}

/* Conservatory shop */
.shop {
  position: relative;
  overflow: hidden;
  padding: 25px 21px 18px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-xl);
  color: #f4ede0;
  background:
    radial-gradient(ellipse 105% 78% at 96% -3%, rgba(135, 160, 111, 0.36), transparent 58%),
    radial-gradient(ellipse 70% 50% at 0% 100%, rgba(111, 82, 49, 0.24), transparent 62%),
    #19392a;
  box-shadow: 0 44px 70px -55px rgba(15, 39, 27, 0.82), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.shop::before {
  content: "";
  position: absolute;
  top: -110px;
  right: -110px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(242, 236, 221, 0.07);
  border-radius: 50%;
  pointer-events: none;
}

.shop__header {
  position: relative;
  z-index: 1;
}

.shop h2 {
  margin: 9px 0 9px;
  font-family: var(--font-display);
  font-size: clamp(29px, 2.4vw, 34px);
  font-weight: 400;
  line-height: 1.015;
  letter-spacing: -0.037em;
  color: #f9f3e5;
}

.shop h2 em {
  font-weight: 360;
  color: #d9c28b;
}

.shop__lede {
  max-width: 274px;
  margin: 0;
  font-size: 10.5px;
  line-height: 1.5;
  color: rgba(244, 237, 224, 0.54);
}

.shop__ornament {
  display: block;
  width: 92px;
  height: 14px;
  margin-top: 14px;
  color: rgba(217, 194, 139, 0.72);
}

.shop-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.upgrade {
  position: relative;
  padding: 12px 12px 11px;
  border: 1px solid rgba(247, 240, 226, 0.1);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
  transition: background 180ms ease, border-color 180ms ease, opacity 240ms ease;
}

.upgrade:hover {
  border-color: rgba(247, 240, 226, 0.17);
  background: rgba(255, 255, 255, 0.055);
}

.upgrade.is-locked {
  opacity: 0.52;
}

.upgrade.is-locked:hover {
  border-color: rgba(247, 240, 226, 0.1);
  background: rgba(255, 255, 255, 0.035);
}

.upgrade.is-new {
  animation: upgrade-reveal 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes upgrade-reveal {
  0% {
    opacity: 0.45;
    transform: translateY(5px);
    border-color: rgba(217, 194, 139, 0.55);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    border-color: rgba(247, 240, 226, 0.1);
  }
}

.upgrade__row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.upgrade__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(222, 205, 164, 0.1);
  border-radius: 10px;
  color: #dfc68f;
  background: rgba(223, 198, 143, 0.08);
}

.upgrade__icon svg {
  width: 19px;
  height: 19px;
}

.upgrade__body {
  min-width: 0;
  padding-top: 1px;
}

.upgrade__heading {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.upgrade__heading h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0.005em;
  color: #f7f0e2;
}

.upgrade__level {
  color: rgba(242, 233, 217, 0.38);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.upgrade__desc {
  margin: 4px 0 0;
  color: rgba(240, 231, 215, 0.48);
  font-size: 9.5px;
  line-height: 1.4;
}

.upgrade__effect {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  margin-top: 6px;
  color: rgba(221, 198, 148, 0.74);
  font-size: 8px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.upgrade__effect span:last-child {
  overflow: hidden;
  color: rgba(240, 231, 215, 0.48);
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upgrade__buy {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 57px;
  min-height: 38px;
  padding: 5px 7px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: rgba(245, 238, 224, 0.43);
  background: rgba(255, 255, 255, 0.055);
  font-size: 9.5px;
  font-weight: 650;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.upgrade__buy svg {
  width: 11px;
  height: 11px;
  opacity: 0.8;
}

.upgrade__buy small {
  font-size: 7px;
  font-weight: 500;
  letter-spacing: 0.04em;
  opacity: 0.55;
}

.upgrade.is-ready .upgrade__buy {
  color: #253b2c;
  background: #e8d6ad;
  border-color: rgba(255, 250, 235, 0.22);
  box-shadow: 0 0 0 1px rgba(232, 214, 173, 0.06), 0 4px 12px -8px rgba(0, 0, 0, 0.4);
}

.upgrade.is-ready .upgrade__buy:hover {
  background: #f1e1bc;
  transform: translateY(-1px);
}

.upgrade.is-ready .upgrade__buy:active {
  transform: translateY(0);
}

.upgrade.is-maxed .upgrade__buy {
  color: rgba(217, 194, 139, 0.7);
  background: rgba(217, 194, 139, 0.08);
}

.upgrade.is-locked .upgrade__buy {
  color: rgba(245, 238, 224, 0.35);
  background: rgba(255, 255, 255, 0.04);
}

.upgrade.is-locked .upgrade__icon {
  color: rgba(223, 198, 143, 0.55);
}

.shop__note {
  position: relative;
  z-index: 1;
  margin: 14px 2px 0;
  color: rgba(242, 233, 217, 0.28);
  font-size: 8.5px;
  line-height: 1.4;
  text-align: center;
  letter-spacing: 0.02em;
}

/* Ledger */
.ledger {
  padding: 17px 18px 18px;
  border: 1px solid rgba(25, 55, 42, 0.11);
  border-radius: 19px;
  background: rgba(250, 247, 239, 0.57);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
}

.ledger__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 11px;
  border-bottom: 1px solid rgba(25, 55, 42, 0.09);
}

.ledger__head > span {
  color: var(--ink-faint);
  font-family: var(--font-display);
  font-size: 9.5px;
  font-style: italic;
}

.ledger-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.ledger-stat {
  min-width: 0;
  padding: 12px 7px 2px;
}

.ledger-stat:nth-child(odd) {
  padding-left: 0;
  border-right: 1px solid rgba(25, 55, 42, 0.08);
}

.ledger-stat:nth-child(even) {
  padding-left: 14px;
}

.ledger-stat:nth-child(n + 3) {
  padding-top: 12px;
  border-top: 1px solid rgba(25, 55, 42, 0.08);
}

.ledger-stat strong {
  display: block;
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 440;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ledger-stat--word strong {
  font-size: 18px;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.ledger-stat span {
  display: block;
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 8px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sidebar-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: -3px 0 0;
  color: var(--ink-faint);
  font-size: 8.5px;
  text-align: center;
}

.sidebar-note svg {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
}

/* Footer */
.footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 13px;
  padding-top: 19px;
  padding-bottom: 26px;
  border-top: 1px solid rgba(25, 55, 42, 0.1);
  color: var(--ink-faint);
  font-size: 9px;
  letter-spacing: 0.035em;
}

.footer__mark {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 450;
  letter-spacing: -0.04em;
  color: var(--ink-soft);
}

.footer__line {
  width: 31px;
  height: 1px;
  background: rgba(25, 55, 42, 0.18);
}

.footer__note {
  flex: 1;
}

.footer__help {
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(25, 55, 42, 0.22);
  color: var(--ink-soft);
  background: none;
  font-size: 9px;
  letter-spacing: 0.045em;
  transition: color 160ms ease, border-color 160ms ease;
}

.footer__help:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* Toast */
.toast {
  position: fixed;
  bottom: max(24px, env(safe-area-inset-bottom));
  left: 50%;
  z-index: 4000;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: min(520px, calc(100vw - 32px));
  padding: 11px 16px 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: #f7f1e3;
  background: rgba(19, 45, 32, 0.96);
  box-shadow: 0 18px 36px -20px rgba(14, 32, 22, 0.6);
  font-size: 11px;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: opacity 240ms ease, transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
  backdrop-filter: blur(12px);
}

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

.toast.is-golden {
  color: #fff5d9;
  background: rgba(75, 56, 23, 0.96);
}

.toast__mark {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  border-radius: 50%;
  color: var(--gold-light);
  background: rgba(235, 216, 173, 0.12);
}

.toast__mark svg {
  width: 14px;
  height: 14px;
}

/* Dialogs */
.dialog {
  width: min(690px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(25, 55, 42, 0.14);
  border-radius: 24px;
  color: var(--ink);
  background: var(--paper-bright);
  box-shadow: 0 50px 120px -35px rgba(12, 32, 21, 0.48);
}

.dialog::backdrop {
  background: rgba(14, 31, 22, 0.48);
  backdrop-filter: blur(7px);
}

.dialog[open] {
  animation: dialog-in 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.dialog__shell {
  max-height: calc(100vh - 50px);
  overflow-y: auto;
  padding: 31px 36px 33px;
  scrollbar-width: thin;
  scrollbar-color: rgba(25, 55, 42, 0.25) transparent;
}

.dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.dialog__head h2 {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.045em;
}

.dialog__close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  padding: 0;
  border: 1px solid rgba(25, 55, 42, 0.13);
  border-radius: 50%;
  color: var(--ink-soft);
  background: transparent;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.dialog__close:hover {
  color: var(--ink);
  border-color: rgba(25, 55, 42, 0.24);
  background: var(--sage-wash);
}

.dialog__close svg {
  width: 16px;
  height: 16px;
}

.dialog__lede {
  max-width: 510px;
  margin: 16px 0 0;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink-soft);
}

.rule-list {
  display: grid;
  gap: 0;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(25, 55, 42, 0.1);
}

.rule-list li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  padding: 17px 0 16px;
  border-bottom: 1px solid rgba(25, 55, 42, 0.09);
}

.rule-list__number {
  padding-top: 2px;
  font-family: var(--font-display);
  font-size: 12px;
  font-style: italic;
  color: var(--gold-deep);
}

.rule-list h3 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 470;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.rule-list p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-faint);
}

.dialog__tip {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 20px;
  padding: 13px 15px;
  border-radius: 12px;
  background: var(--sage-wash);
  color: var(--ink-soft);
}

.dialog__tip svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  color: var(--green-mid);
}

.dialog__tip p {
  margin: 0;
  font-size: 10.5px;
  line-height: 1.55;
}

.dialog__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 24px;
}

.dialog__actions--end {
  justify-content: flex-end;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--quiet {
  border-color: rgba(25, 55, 42, 0.17);
  color: var(--ink-soft);
  background: transparent;
}

.button--quiet:hover {
  color: var(--ink);
  border-color: rgba(25, 55, 42, 0.3);
  background: var(--sage-wash);
}

.button--danger {
  color: var(--paper-bright);
  background: var(--terracotta);
}

.button--danger:hover {
  background: #a3533b;
}

.text-link {
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  color: var(--ink-faint);
  background: none;
  font-size: 9.5px;
  letter-spacing: 0.025em;
}

.text-link--danger {
  color: var(--terracotta);
}

.text-link:hover {
  color: var(--ink);
}

.text-link--danger:hover {
  color: #91402b;
}

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

.dialog--herbarium .dialog__shell {
  display: flex;
  min-height: min(540px, calc(100vh - 70px));
  flex-direction: column;
}

.herbarium-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 15px;
  margin-top: 20px;
  color: var(--ink-faint);
  font-size: 10.5px;
}

.herbarium-summary p {
  margin: 0;
}

.herbarium-summary strong {
  margin-right: 2px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 460;
  color: var(--ink);
}

.herbarium-summary > span {
  font-family: var(--font-display);
  font-size: 10.5px;
  font-style: italic;
  text-align: right;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 17px;
  padding: 10px 13px;
  border: 1px solid rgba(25, 55, 42, 0.13);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.65);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.search-field:focus-within {
  border-color: rgba(37, 88, 62, 0.55);
  box-shadow: 0 0 0 3px rgba(54, 102, 71, 0.07);
}

.search-field svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: var(--ink-faint);
}

.search-field input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 12px;
}

.search-field input::placeholder {
  color: var(--ink-faint);
  font-style: italic;
}

.search-field > span {
  color: var(--ink-faint);
  font-size: 9px;
  white-space: nowrap;
}

.herbarium-words {
  display: flex;
  align-content: flex-start;
  gap: 7px;
  flex: 1;
  flex-wrap: wrap;
  min-height: 164px;
  max-height: 54vh;
  overflow-y: auto;
  padding: 3px 3px 3px 1px;
  scrollbar-width: thin;
  scrollbar-color: rgba(25, 55, 42, 0.2) transparent;
}

.herbarium-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid rgba(25, 55, 42, 0.1);
  border-radius: 7px;
  background: rgba(255, 253, 247, 0.55);
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1;
  animation: chip-in 300ms both;
}

.herbarium-chip::before {
  content: "";
  width: 4px;
  height: 4px;
  flex: 0 0 4px;
  border-radius: 50%;
  background: var(--chip);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--chip) 18%, transparent);
}

@keyframes chip-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

.herbarium-empty {
  width: 100%;
  padding: 48px 20px;
  color: var(--ink-faint);
  font-family: var(--font-display);
  font-size: 18px;
  font-style: italic;
  text-align: center;
}

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

.dialog--confirm .dialog__lede {
  margin-top: 15px;
}

.seed-card {
  animation: seed-card-in 460ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes seed-card-in {
  from {
    opacity: 0;
    transform: translateY(7px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.petal-burst {
  position: fixed;
  z-index: 90;
  pointer-events: none;
}

.burst-petal {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--s, 5px);
  height: calc(var(--s, 5px) * 0.72);
  margin: calc(var(--s, 5px) / -2) 0 0 calc(var(--s, 5px) / -2);
  border-radius: 60% 40% 55% 45% / 55% 60% 40% 45%;
  opacity: 0;
  animation: burst-fly 980ms cubic-bezier(0.16, 0.7, 0.3, 1) var(--delay, 0s) both;
}

@keyframes burst-fly {
  0% {
    opacity: 0;
    transform: translate(0, 0) rotate(0deg) scale(0.6);
  }
  12% {
    opacity: 0.95;
  }
  70% {
    opacity: 0.85;
  }
  100% {
    opacity: 0;
    transform: translate(var(--x), calc(var(--y) + 66px)) rotate(var(--r)) scale(1);
  }
}

.glasshouse.is-celebrating {
  animation: celebration-glow 1.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.glasshouse.is-celebrating .scene__frame {
  animation: celebration-frame 1.8s ease-out;
}

@keyframes celebration-glow {
  0% {
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 0 0 0 rgba(224, 196, 128, 0);
  }
  28% {
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 0 0 4px rgba(224, 196, 128, 0.3), 0 0 90px -18px rgba(228, 196, 121, 0.65);
  }
  100% {
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 0 0 0 rgba(224, 196, 128, 0);
  }
}

@keyframes celebration-frame {
  0%,
  100% {
    border-color: rgba(251, 248, 239, 0.38);
  }
  30% {
    border-color: rgba(255, 241, 194, 0.85);
  }
}

@media (max-width: 1270px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) 354px;
    gap: 18px;
  }

  .scene {
    height: 376px;
  }

  .scene-head {
    width: min(540px, 62%);
  }

  .scene-head h1 {
    font-size: clamp(38px, 4.1vw, 52px);
  }

  .shop {
    padding-inline: 18px;
  }

  .console {
    padding-inline: 23px;
  }
}

@media (max-width: 1100px) {
  :root {
    --page-gutter: 25px;
  }

  .layout {
    grid-template-columns: minmax(0, 1fr) 326px;
    gap: 16px;
  }

  .seed-panel {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .seed-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    column-gap: 15px;
    padding: 0;
  }

  .seed-intro .kicker {
    grid-column: 1;
  }

  .seed-intro h2 {
    grid-column: 1;
    margin-top: 6px;
  }

  .seed-intro > p:not(.kicker) {
    max-width: 340px;
    grid-column: 1;
    margin: 4px 0 0;
  }

  .shuffle-button {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: center;
    margin-bottom: 2px;
  }

  .scene {
    height: 364px;
  }

  .bloom-badge {
    top: 23px;
    right: 22px;
  }

  .scene-head {
    top: 27px;
    left: 26px;
    width: min(480px, 63%);
  }

  .scene-head h1 {
    font-size: clamp(37px, 4.6vw, 48px);
  }

  .console {
    padding: 19px 20px 17px;
  }

  .flow-pill__chain {
    display: none;
  }

  .garden-caption {
    left: 20px;
    max-width: 51%;
  }

  .golden-widget {
    right: 20px;
    width: 189px;
  }
}

@media (max-width: 980px) {
  :root {
    --page-gutter: 23px;
  }

  .topbar {
    grid-template-columns: 1fr auto;
  }

  .stage-pill {
    display: none;
  }

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

  .sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    grid-template-areas:
      "shop ledger"
      "shop note";
    align-items: start;
    gap: 16px;
  }

  .shop {
    grid-area: shop;
  }

  .ledger {
    grid-area: ledger;
  }

  .sidebar-note {
    grid-area: note;
  }

  .shop-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shop__lede {
    max-width: 400px;
  }

  .shop__ornament {
    display: none;
  }

  .scene {
    height: 420px;
  }

  .scene-head {
    width: min(600px, 66%);
  }

  .scene-head h1 {
    font-size: clamp(44px, 6.1vw, 58px);
  }

  .scene-head__lede {
    max-width: 360px;
  }

  .garden-plants {
    height: 280px;
  }

  .plant {
    height: 185px;
  }

  .seed-intro > p:not(.kicker) {
    max-width: 430px;
  }

  .seed-card__word {
    font-size: 31px;
  }
}

@media (max-width: 760px) {
  :root {
    --page-gutter: 18px;
  }

  .topbar {
    padding-top: 16px;
    padding-bottom: 15px;
  }

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

  .brand__type {
    font-size: 23px;
  }

  .topbar__actions {
    gap: 6px;
  }

  .icon-button {
    width: 34px;
    height: 34px;
  }

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

  .petal-wallet {
    min-height: 34px;
    padding: 6px 10px;
  }

  .petal-wallet__copy span {
    display: none;
  }

  .petal-wallet__copy strong {
    min-width: 0;
    font-size: 12px;
  }

  .layout {
    gap: 16px;
    padding-bottom: 36px;
  }

  .main-column {
    gap: 16px;
  }

  .glasshouse {
    border-radius: 22px;
  }

  .scene {
    height: 356px;
  }

  .scene__frame {
    inset: 9px;
    border-radius: 16px;
  }

  .scene-head {
    top: 22px;
    left: 19px;
    width: calc(100% - 115px);
  }

  .scene-head__kicker {
    font-size: 8.5px;
  }

  .scene-head h1 {
    margin: 9px 0 8px;
    font-size: clamp(31px, 8.7vw, 43px);
    line-height: 0.98;
  }

  .scene-head__lede {
    display: none;
  }

  .bloom-badge {
    top: 16px;
    right: 15px;
    min-width: 0;
    gap: 6px;
    padding: 8px 9px;
    border-radius: 12px;
  }

  .bloom-badge__count {
    font-size: 24px;
  }

  .bloom-badge__copy > span {
    font-size: 7.5px;
  }

  .bloom-badge__copy small {
    display: none;
  }

  .bloom-badge__arrow {
    width: 11px;
    height: 11px;
  }

  .garden-plants {
    bottom: 48px;
    height: 205px;
  }

  .plant {
    height: 146px;
  }

  .garden-caption {
    right: 13px;
    bottom: 11px;
    left: 13px;
    max-width: none;
    min-height: 28px;
    padding: 6px 10px 6px 7px;
    font-size: 9.5px;
  }

  .golden-widget {
    right: 13px;
    bottom: 49px;
    width: 169px;
    padding: 7px 9px 8px;
  }

  .golden-widget__head {
    font-size: 7px;
    margin-bottom: 5px;
  }

  .golden-widget__count {
    font-size: 7.5px;
  }

  .garden-bee {
    top: 212px;
    width: 36px;
  }

  .console {
    padding: 17px 15px 14px;
  }

  .console-head {
    gap: 8px;
    margin-bottom: 10px;
  }

  .console-feedback {
    max-width: 47ch;
    font-size: 10px;
  }

  .flow-pill {
    gap: 5px;
    min-height: 31px;
    padding: 5px 7px;
  }

  .flow-pill svg {
    width: 14px;
    height: 14px;
  }

  .flow-pill__value {
    font-size: 17px;
  }

  .flow-pill__label {
    display: none;
  }

  .typebed {
    min-height: 57px;
    gap: 7px;
    padding: 7px 7px 7px 10px;
    border-radius: 13px;
  }

  .typebed__seed {
    width: 27px;
    height: 27px;
    flex-basis: 27px;
  }

  .typebed__seed svg {
    width: 15px;
    height: 15px;
  }

  #wordInput {
    padding: 7px 0 8px;
    font-size: clamp(22px, 7vw, 29px);
  }

  .reward-preview {
    min-width: 37px;
    font-size: 8.5px;
  }

  .reward-preview.is-valid .reward-preview__value,
  .reward-preview.is-golden .reward-preview__value {
    font-size: 15px;
  }

  .plant-button {
    min-height: 38px;
    padding: 10px 11px;
    font-size: 9px;
    letter-spacing: 0.08em;
  }

  .plant-button kbd {
    display: none;
  }

  .console-foot {
    margin-top: 8px;
  }

  .rules-line {
    font-size: 8.75px;
  }

  .seed-selected {
    font-size: 8.5px;
  }

  .seed-panel {
    padding: 17px 14px 14px;
    border-radius: 17px;
  }

  .seed-intro h2 {
    font-size: 25px;
  }

  .seed-intro > p:not(.kicker) {
    font-size: 9.5px;
  }

  .seed-list {
    display: grid;
    grid-template-columns: none;
    grid-auto-columns: minmax(158px, 61%);
    grid-auto-flow: column;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 2px 5px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .seed-list::-webkit-scrollbar {
    display: none;
  }

  .seed-card {
    min-height: 110px;
    scroll-snap-align: start;
  }

  .seed-card__word {
    font-size: 28px;
  }

  .sidebar {
    display: flex;
    gap: 14px;
  }

  .shop {
    padding: 22px 17px 16px;
    border-radius: 22px;
  }

  .shop h2 {
    font-size: 31px;
  }

  .shop-list {
    grid-template-columns: 1fr;
  }

  .upgrade {
    padding: 12px 13px;
  }

  .upgrade__desc {
    font-size: 10px;
  }

  .upgrade__effect {
    font-size: 8.5px;
  }

  .ledger {
    padding: 15px 16px 16px;
  }

  .ledger-stat strong {
    font-size: 23px;
  }

  .footer {
    gap: 9px;
    padding-top: 16px;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    font-size: 8.5px;
  }

  .footer__line {
    width: 18px;
  }

  .footer__note {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dialog {
    width: min(100%, calc(100vw - 20px));
    max-height: calc(100vh - 20px);
    border-radius: 20px;
  }

  .dialog__shell {
    max-height: calc(100vh - 22px);
    padding: 25px 20px 26px;
  }

  .dialog__head {
    gap: 10px;
  }

  .dialog__head h2 {
    font-size: 34px;
  }

  .dialog__lede {
    font-size: 11.5px;
  }

  .rule-list li {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 7px;
    padding: 14px 0;
  }

  .rule-list h3 {
    font-size: 17px;
  }

  .rule-list p {
    font-size: 10.5px;
  }

  .dialog__tip {
    padding: 11px 12px;
  }

  .dialog__actions {
    align-items: stretch;
    flex-direction: column-reverse;
    gap: 13px;
    margin-top: 20px;
  }

  .dialog__actions--end {
    flex-direction: column-reverse;
  }

  .dialog__actions .text-link {
    align-self: flex-start;
  }

  .dialog--herbarium .dialog__shell {
    min-height: min(480px, calc(100vh - 40px));
  }

  .herbarium-summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
    margin-top: 15px;
  }

  .herbarium-summary > span {
    text-align: left;
  }

  .herbarium-words {
    max-height: 48vh;
  }

  .toast {
    bottom: max(14px, env(safe-area-inset-bottom));
    width: max-content;
    max-width: calc(100vw - 24px);
    font-size: 10px;
  }
}

@media (max-width: 430px) {
  .scene {
    height: 328px;
  }

  .scene-head {
    width: calc(100% - 98px);
  }

  .scene-head h1 {
    font-size: clamp(29px, 8.8vw, 37px);
  }

  .scene-head__kicker {
    font-size: 7.5px;
    letter-spacing: 0.1em;
  }

  .bloom-badge {
    gap: 4px;
    padding: 7px 8px;
  }

  .bloom-badge__count {
    font-size: 21px;
  }

  .bloom-badge__copy > span {
    font-size: 7px;
  }

  .garden-plants {
    height: 183px;
    bottom: 51px;
  }

  .plant {
    height: 128px;
  }

  .golden-widget {
    width: 151px;
  }

  .golden-widget__head span:first-of-type {
    letter-spacing: 0.06em;
  }

  .garden-caption {
    font-size: 9px;
  }

  .typebed__seed {
    display: none;
  }

  .plant-button {
    padding-inline: 10px;
  }

  .console-head__copy .console-feedback {
    overflow: hidden;
    max-width: 210px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .seed-intro {
    column-gap: 8px;
  }

  .shuffle-button {
    padding-inline: 8px;
    font-size: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .ambient-petal,
  .garden-pollen,
  .garden-bee {
    display: none !important;
  }
}
