:root {
  color-scheme: light;
  --paper: #f7efe0;
  --parchment: #fff6e8;
  --sand: #d8bd8d;
  --moss: #68784f;
  --olive: #465238;
  --clay: #b96f45;
  --terracotta: #c98257;
  --amber: #d99b4a;
  --ink: #3f3128;
  --muted: #6f5743;
  --line: rgba(63, 49, 40, 0.16);
  --panel: rgba(255, 246, 232, 0.74);
  --panel-strong: rgba(255, 246, 232, 0.92);
  --warm-shadow: rgba(72, 49, 32, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body[data-time-mode="night"] {
  color-scheme: dark;
  --paper: #222a31;
  --parchment: #efe4cf;
  --sand: #b9a77f;
  --moss: #8fa276;
  --olive: #d2c5a2;
  --clay: #d28a62;
  --terracotta: #df9f74;
  --amber: #e3b266;
  --ink: #f3eadb;
  --muted: #d9c8ac;
  --line: rgba(247, 239, 224, 0.18);
  --panel: rgba(40, 44, 43, 0.64);
  --panel-strong: rgba(58, 56, 50, 0.86);
  --warm-shadow: rgba(7, 11, 15, 0.34);
}

button {
  font: inherit;
}

.app {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
}

.scene-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 246, 232, 0.82) 0%, rgba(225, 210, 181, 0.9) 44%, #c9b28b 100%);
  transition: background 280ms ease;
}

body[data-time-mode="night"] .scene-stage {
  background:
    radial-gradient(circle at 50% 36%, rgba(139, 150, 141, 0.5) 0%, rgba(53, 63, 68, 0.88) 48%, #1e2834 100%);
}

#garden-canvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

#garden-canvas.is-pointing {
  cursor: pointer;
}

#garden-canvas.is-dragging {
  cursor: grabbing;
}

.scene-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 48px 24px 170px;
  pointer-events: none;
  transition: opacity 280ms ease;
}

.scene-stage.is-rendered .scene-fallback {
  opacity: 0;
}

.fallback-tray {
  width: min(980px, 82vw);
  aspect-ratio: 1.55;
  padding: clamp(18px, 3vw, 34px);
  border-radius: 6px;
  background: linear-gradient(145deg, #332d24 0%, #1d1b17 54%, #3b3227 100%);
  box-shadow: 0 34px 70px rgba(56, 43, 28, 0.28);
  transform: perspective(900px) rotateX(58deg) rotateZ(-8deg);
}

.fallback-sand {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 3px;
  background:
    radial-gradient(circle at 30% 26%, rgba(255, 250, 218, 0.72) 0 12%, transparent 28%),
    linear-gradient(145deg, #f5e8bd 0%, #ead7a7 64%, #d8bf89 100%);
  box-shadow: inset 0 0 42px rgba(109, 84, 47, 0.18);
}

.fallback-sand i {
  position: absolute;
  left: 8%;
  right: 8%;
  height: 2px;
  border-radius: 999px;
  background: rgba(144, 123, 88, 0.18);
  transform: rotate(-7deg);
}

.fallback-sand i:nth-child(1) { top: 22%; }
.fallback-sand i:nth-child(2) { top: 34%; left: 14%; right: 16%; }
.fallback-sand i:nth-child(3) { top: 48%; left: 10%; right: 12%; }
.fallback-sand i:nth-child(4) { top: 62%; left: 18%; right: 9%; }
.fallback-sand i:nth-child(5) { top: 76%; left: 12%; right: 20%; }

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

.top-hud,
.mode-status,
.bottom-rail,
.asset-edit-panel,
.notification-feed {
  pointer-events: auto;
}

.top-hud {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  left: 12px;
  right: 12px;
  display: grid;
  grid-template-columns: minmax(300px, 38vw) minmax(160px, 1fr) auto;
  align-items: start;
  gap: 16px;
}

.mode-switch {
  display: flex;
  gap: 6px;
  min-width: 0;
  width: min(560px, 44vw);
  padding: 5px;
  border: 1px solid rgba(255, 246, 232, 0.58);
  border-radius: 8px;
  background: rgba(255, 246, 232, 0.56);
  box-shadow: 0 10px 24px rgba(72, 49, 32, 0.08);
  backdrop-filter: blur(8px);
  overflow-x: auto;
  scrollbar-width: none;
}

.mode-switch::-webkit-scrollbar {
  display: none;
}

.mode-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 86px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: rgba(63, 49, 40, 0.78);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.mode-button span {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 246, 232, 0.88);
  color: rgba(63, 49, 40, 0.62);
  font-size: 0.7rem;
}

.mode-button[aria-pressed="true"] {
  border-color: rgba(104, 120, 79, 0.32);
  background: rgba(255, 246, 232, 0.96);
  color: var(--ink);
  box-shadow: 0 2px 9px rgba(72, 49, 32, 0.12);
}

.mode-button[aria-pressed="true"] span {
  background: rgba(104, 120, 79, 0.16);
  color: var(--olive);
}

.brand {
  justify-self: center;
  display: grid;
  justify-items: center;
  text-align: center;
  color: rgba(255, 246, 232, 0.94);
  text-shadow: 0 1px 8px rgba(63, 49, 40, 0.2);
}

.eyebrow {
  display: none;
}

.brand h1 {
  margin: 0;
  font-size: 1.32rem;
  line-height: 1;
  font-weight: 750;
}

.resources {
  margin-top: 4px;
  color: rgba(255, 246, 232, 0.72);
  font-size: 0.68rem;
}

.resources span {
  display: inline;
}

.resources strong {
  font: inherit;
}

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

.hud-button {
  position: relative;
  display: grid;
  grid-template-rows: 28px auto;
  place-items: center;
  width: 54px;
  height: 52px;
  padding: 4px;
  border: 1px solid rgba(255, 246, 232, 0.28);
  border-radius: 8px;
  background: rgba(255, 246, 232, 0.18);
  color: rgba(255, 246, 232, 0.94);
  cursor: pointer;
  filter: drop-shadow(0 1px 4px rgba(63, 49, 40, 0.18));
}

.hud-button:hover {
  background: rgba(255, 246, 232, 0.3);
}

.hud-button:disabled {
  cursor: not-allowed;
  opacity: 0.34;
  filter: none;
}

.hud-button .button-icon {
  width: 27px;
  height: 27px;
}

.hud-button > span:last-child:not(.button-icon) {
  color: rgba(255, 246, 232, 0.9);
  font-size: 0.6rem;
  font-weight: 800;
  line-height: 1;
}

.reset-icon {
  color: #ffe3c9;
}

.mode-status {
  position: absolute;
  top: max(64px, calc(env(safe-area-inset-top) + 64px));
  left: 50%;
  z-index: 3;
  display: grid;
  gap: 3px;
  max-width: min(420px, calc(100vw - 28px));
  padding: 9px 14px;
  border: 1px solid rgba(255, 246, 232, 0.62);
  border-radius: 999px;
  background: rgba(255, 246, 232, 0.68);
  color: var(--ink);
  box-shadow: 0 10px 22px rgba(72, 49, 32, 0.1);
  text-align: center;
  backdrop-filter: blur(8px);
  transform: translateX(-50%);
}

.mode-status strong {
  font-size: 0.78rem;
  line-height: 1;
}

.mode-status span {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.15;
}

.notification-feed {
  position: absolute;
  top: max(74px, calc(env(safe-area-inset-top) + 74px));
  right: 14px;
  z-index: 3;
  display: grid;
  gap: 8px;
  width: min(300px, calc(100% - 28px));
  pointer-events: none;
}

.feed-item {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid rgba(255, 246, 232, 0.72);
  border-radius: 8px;
  background: rgba(255, 246, 232, 0.84);
  color: var(--ink);
  box-shadow: 0 10px 20px rgba(72, 49, 32, 0.12);
  font-size: 0.82rem;
  backdrop-filter: blur(7px);
  animation: feed-life 15s ease forwards;
}

.feed-item.is-leaving {
  opacity: 0;
  transform: translateX(8px);
}

body[data-time-mode="night"] .top-hud,
body[data-time-mode="night"] .mode-status,
body[data-time-mode="night"] .bottom-rail,
body[data-time-mode="night"] .asset-edit-panel,
body[data-time-mode="night"] .feed-item {
  border-color: rgba(247, 239, 224, 0.18);
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 16px 34px rgba(7, 11, 15, 0.28);
}

body[data-time-mode="night"] .rail-label,
body[data-time-mode="night"] .tray-scroll-button,
body[data-time-mode="night"] .seed-button::before,
body[data-time-mode="night"] .asset-button::before,
body[data-time-mode="night"] .option-button::before,
body[data-time-mode="night"] .asset-edit-panel button {
  border-color: rgba(247, 239, 224, 0.16);
  background: rgba(239, 228, 207, 0.12);
  color: var(--ink);
}

body[data-time-mode="night"] .mode-status span,
body[data-time-mode="night"] .rail-label,
body[data-time-mode="night"] .rail-hint,
body[data-time-mode="night"] .asset-edit-copy span {
  color: var(--muted);
}

body[data-time-mode="night"] .seed-name,
body[data-time-mode="night"] .asset-name,
body[data-time-mode="night"] .option-button span:last-child {
  color: var(--ink);
}

@keyframes feed-life {
  0% { opacity: 0; transform: translateX(8px); }
  8%, 88% { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(8px); }
}

.bottom-rail {
  position: absolute;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 10px;
  width: auto;
  min-width: min(430px, calc(100vw - 28px));
  max-width: min(980px, calc(100vw - 28px));
  padding: 10px 14px;
  border: 1px solid rgba(255, 246, 232, 0.62);
  border-radius: 10px;
  background: rgba(255, 246, 232, 0.72);
  box-shadow: 0 16px 34px rgba(72, 49, 32, 0.14);
  backdrop-filter: blur(9px);
  overflow: hidden;
  transform: translateX(-50%);
}

.rail-label {
  z-index: 3;
  flex: 0 0 auto;
  min-width: 84px;
  padding: 8px 10px;
  border-right: 1px solid rgba(63, 49, 40, 0.12);
  background: linear-gradient(90deg, rgba(255, 246, 232, 0.96), rgba(255, 246, 232, 0.78));
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.tray-scroll-button {
  position: relative;
  flex: 0 0 34px;
  width: 34px;
  height: 54px;
  border: 1px solid rgba(63, 49, 40, 0.1);
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.82);
  color: var(--muted);
  box-shadow: 0 3px 10px rgba(72, 49, 32, 0.1);
  cursor: pointer;
}

.tray-scroll-button span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 11px;
  height: 11px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: translate(-35%, -50%) rotate(-45deg);
}

.tray-scroll-right span {
  transform: translate(-65%, -50%) rotate(135deg);
}

.tray-scroll-button:disabled {
  cursor: not-allowed;
  opacity: 0.34;
  box-shadow: none;
}

.seed-panel,
.asset-panel,
.option-panel {
  flex: 0 0 auto;
  min-width: 0;
  width: min(470px, calc(100vw - 230px));
  max-width: min(470px, calc(100vw - 230px));
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(111, 87, 67, 0.32) transparent;
}

.seed-panel::-webkit-scrollbar,
.asset-panel::-webkit-scrollbar,
.option-panel::-webkit-scrollbar {
  height: 6px;
}

.seed-panel::-webkit-scrollbar-thumb,
.asset-panel::-webkit-scrollbar-thumb,
.option-panel::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(111, 87, 67, 0.24);
}

.seed-list,
.asset-list,
.option-grid,
.path-style-panel {
  display: flex;
  align-items: stretch;
  gap: 10px;
  width: max-content;
}

.option-panel {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rail-hint {
  display: none;
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  white-space: nowrap;
}

.seed-button,
.asset-button,
.option-button {
  position: relative;
  display: grid;
  grid-template-rows: 50px auto;
  place-items: center;
  gap: 3px;
  width: 88px;
  min-width: 88px;
  min-height: 88px;
  padding: 4px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: rgba(63, 49, 40, 0.84);
  text-align: center;
  cursor: pointer;
}

.asset-button {
  scroll-snap-align: start;
}

.seed-button::before,
.asset-button::before,
.option-button::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 50%;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(63, 49, 40, 0.08);
  border-radius: 50%;
  background: rgba(255, 250, 241, 0.94);
  box-shadow: 0 2px 7px rgba(72, 49, 32, 0.11);
  transform: translateX(-50%);
}

.seed-button::after,
.asset-button::after,
.option-button::after {
  content: "";
  position: absolute;
  top: 59px;
  left: 50%;
  width: 22px;
  height: 3px;
  border-radius: 999px;
  background: transparent;
  transform: translateX(-50%);
}

.seed-button[aria-pressed="true"],
.asset-button[aria-pressed="true"],
.option-button[aria-pressed="true"] {
  border-color: rgba(104, 120, 79, 0.26);
  background: rgba(255, 246, 232, 0.44);
}

.seed-button[aria-pressed="true"]::before,
.asset-button[aria-pressed="true"]::before,
.option-button[aria-pressed="true"]::before {
  border-color: rgba(104, 120, 79, 0.48);
  box-shadow: 0 2px 8px rgba(72, 49, 32, 0.12), 0 0 0 4px rgba(104, 120, 79, 0.12);
}

.seed-button[aria-pressed="true"]::after,
.asset-button[aria-pressed="true"]::after,
.option-button[aria-pressed="true"]::after {
  background: var(--moss);
}

.seed-button .item-icon,
.asset-button .item-icon,
.option-button .button-icon {
  z-index: 1;
  grid-row: 1;
  justify-self: center;
  align-self: center;
}

.seed-button > span:not(.item-icon):not(.seed-count),
.asset-button > span:not(.item-icon) {
  z-index: 1;
  grid-row: 2;
  display: block;
  width: 82px;
}

.seed-name,
.asset-name,
.option-button span:last-child {
  display: block;
  overflow: hidden;
  max-width: 82px;
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.08;
  text-overflow: ellipsis;
}

.seed-name {
  display: -webkit-box;
  min-height: 1.45em;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.asset-name,
.option-button span:last-child {
  white-space: nowrap;
}

.seed-meta,
.asset-meta,
.seed-count {
  display: none;
}

.control-dock[data-mode="plant"] .asset-panel,
.control-dock[data-mode="plant"] .option-panel,
.control-dock[data-mode="asset"] .seed-panel,
.control-dock[data-mode="asset"] .option-panel,
.control-dock[data-mode="path"] .seed-panel,
.control-dock[data-mode="path"] .asset-panel,
.control-dock[data-mode="rake"] .seed-panel,
.control-dock[data-mode="rake"] .asset-panel,
.control-dock[data-mode="smooth"] .seed-panel,
.control-dock[data-mode="smooth"] .asset-panel {
  display: none;
}

.control-dock[data-mode="path"] #rake-button,
.control-dock[data-mode="path"] #smooth-button,
.control-dock[data-mode="rake"] #path-button,
.control-dock[data-mode="rake"] #smooth-button,
.control-dock[data-mode="smooth"] #path-button,
.control-dock[data-mode="smooth"] #rake-button,
.control-dock:not([data-mode="path"]) .path-style-panel,
.control-dock:not([data-mode="path"]) .rail-hint {
  display: none;
}

.control-dock[data-mode="path"] .option-panel {
  min-width: 420px;
}

.control-dock[data-mode="path"] .rail-hint {
  display: block;
}

.control-dock[data-mode="rake"] .option-grid,
.control-dock[data-mode="smooth"] .option-grid {
  justify-content: center;
  min-width: 116px;
}

.path-style-panel {
  padding: 5px;
  border: 1px solid rgba(63, 49, 40, 0.1);
  border-radius: 999px;
  background: rgba(232, 214, 184, 0.4);
}

.path-style-button {
  min-width: 72px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  cursor: pointer;
}

.path-style-button[aria-pressed="true"] {
  border-color: rgba(104, 120, 79, 0.28);
  background: var(--panel-strong);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(72, 49, 32, 0.1);
}

.path-style-button[data-path-style="water"] {
  border-radius: 56% 44% 58% 42% / 48% 56% 44% 52%;
}

.path-style-button[data-path-style="water"][aria-pressed="true"] {
  border-color: rgba(88, 138, 142, 0.28);
  background: rgba(232, 246, 236, 0.9);
}

.asset-edit-panel {
  position: absolute;
  left: 50%;
  bottom: calc(118px + env(safe-area-inset-bottom));
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(780px, calc(100vw - 28px));
  padding: 10px 12px;
  border: 1px solid rgba(255, 246, 232, 0.68);
  border-radius: 10px;
  background: rgba(255, 246, 232, 0.82);
  color: var(--ink);
  box-shadow: 0 14px 26px rgba(72, 49, 32, 0.13);
  backdrop-filter: blur(9px);
  transform: translateX(-50%);
}

.asset-edit-panel[hidden] {
  display: none;
}

.asset-edit-copy {
  display: grid;
  gap: 2px;
  min-width: 190px;
}

.asset-edit-copy strong {
  font-size: 0.84rem;
  line-height: 1;
}

.asset-edit-copy span {
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.12;
  white-space: nowrap;
}

.asset-edit-panel button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(63, 49, 40, 0.12);
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.92);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 850;
  cursor: pointer;
}

.asset-edit-panel button:hover,
.path-style-button:hover,
.seed-button:hover,
.asset-button:hover,
.option-button:hover {
  background-color: rgba(255, 250, 241, 0.72);
}

.asset-edit-panel button:disabled {
  cursor: not-allowed;
  opacity: 0.44;
}

.asset-edit-panel .asset-delete-button {
  border-color: rgba(185, 111, 69, 0.24);
  background: rgba(201, 130, 87, 0.12);
  color: #7c3d2b;
}

.button-icon,
.item-icon {
  position: relative;
  display: block;
  width: 30px;
  height: 30px;
}

.button-icon::before,
.button-icon::after,
.item-icon i {
  position: absolute;
  display: block;
}

.rake-icon::before,
.rake-icon::after,
.path-icon::before,
.path-icon::after,
.undo-icon::before,
.undo-icon::after,
.redo-icon::before,
.redo-icon::after,
.smooth-icon::before,
.smooth-icon::after,
.save-icon .button-icon::before,
.camera-icon .button-icon::before,
.camera-icon .button-icon::after,
.view-icon .button-icon::before,
.view-icon .button-icon::after,
.reset-icon .button-icon::before,
.reset-icon .button-icon::after {
  content: "";
  position: absolute;
}

.rake-icon::before {
  left: 4px;
  right: 4px;
  top: 5px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 5px 0 currentColor, 0 10px 0 currentColor, 0 15px 0 currentColor;
}

.rake-icon::after {
  left: 8px;
  top: 4px;
  width: 3px;
  height: 20px;
  border-radius: 999px;
  background: currentColor;
}

.path-icon::before {
  left: 4px;
  right: 4px;
  top: 13px;
  height: 6px;
  border-radius: 999px;
  background: rgba(141, 123, 99, 0.86);
  transform: rotate(-12deg);
}

.path-icon::after {
  left: 8px;
  right: 8px;
  top: 8px;
  height: 2px;
  border-radius: 999px;
  background: rgba(141, 123, 99, 0.56);
  box-shadow: 0 10px 0 rgba(141, 123, 99, 0.44);
  transform: rotate(-12deg);
}

.smooth-icon::before {
  left: 5px;
  right: 5px;
  top: 14px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.smooth-icon::after {
  left: 8px;
  top: 8px;
  width: 14px;
  height: 11px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 999px 999px;
}

.undo-icon::before,
.redo-icon::before {
  top: 7px;
  width: 15px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: transparent;
}

.undo-icon::before {
  left: 5px;
  border-right-color: transparent;
}

.redo-icon::before {
  right: 5px;
  border-left-color: transparent;
}

.undo-icon::after,
.redo-icon::after {
  top: 7px;
  width: 8px;
  height: 8px;
  background: currentColor;
}

.undo-icon::after {
  left: 3px;
  clip-path: polygon(0 50%, 100% 0, 100% 100%);
}

.redo-icon::after {
  right: 3px;
  clip-path: polygon(100% 50%, 0 0, 0 100%);
}

.save-icon .button-icon::before {
  left: 5px;
  top: 4px;
  width: 17px;
  height: 19px;
  border: 2px solid currentColor;
  border-top-width: 4px;
  border-radius: 2px;
  box-shadow: inset 0 -5px 0 rgba(255, 255, 255, 0.22);
}

.reset-icon .button-icon::before {
  left: 4px;
  top: 4px;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-left-color: transparent;
  border-radius: 50%;
}

.reset-icon .button-icon::after {
  top: 3px;
  right: 3px;
  width: 8px;
  height: 8px;
  background: currentColor;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.time-icon .button-icon::before {
  left: 6px;
  top: 6px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(255, 246, 232, 0.18);
}

.time-icon[aria-pressed="true"] .button-icon::before {
  left: 7px;
  top: 5px;
  width: 17px;
  height: 17px;
  background: transparent;
  box-shadow: inset -5px 0 0 currentColor;
}

.camera-icon .button-icon::before {
  left: 5px;
  top: 8px;
  width: 18px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 5px;
}

.camera-icon .button-icon::after {
  left: 12px;
  top: 12px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 9px -6px 0 -2px currentColor;
}

.view-icon .button-icon::before {
  left: 5px;
  top: 5px;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
}

.view-icon .button-icon::after {
  left: 12px;
  top: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.icon-moss i {
  border-radius: 55% 45% 52% 48% / 62% 50% 50% 38%;
  background: #5e8f61;
}

.icon-moss i:nth-child(1) { width: 21px; height: 10px; left: 3px; top: 16px; transform: rotate(-7deg); }
.icon-moss i:nth-child(2) { width: 18px; height: 9px; left: 12px; top: 13px; background: #6fa36c; transform: rotate(11deg); }
.icon-moss i:nth-child(3) { width: 14px; height: 8px; left: 8px; top: 10px; background: #d9e6a7; }

.icon-bamboo i {
  width: 4px;
  border-radius: 999px;
  background: #2f8f6b;
}

.icon-bamboo i:nth-child(1) { left: 6px; bottom: 4px; height: 24px; }
.icon-bamboo i:nth-child(2) { left: 14px; bottom: 3px; height: 28px; }
.icon-bamboo i:nth-child(3) { left: 22px; bottom: 5px; height: 21px; }
.icon-bamboo i:nth-child(4),
.icon-bamboo i:nth-child(5),
.icon-bamboo i:nth-child(6) {
  width: 10px;
  height: 5px;
  border-radius: 50%;
  background: #b7e2be;
}

.icon-bamboo i:nth-child(4) { left: 3px; top: 9px; transform: rotate(-28deg); }
.icon-bamboo i:nth-child(5) { left: 16px; top: 6px; transform: rotate(24deg); }
.icon-bamboo i:nth-child(6) { left: 21px; top: 13px; transform: rotate(18deg); }

.icon-maple i:first-child {
  left: 7px;
  top: 5px;
  width: 15px;
  height: 14px;
  border-radius: 50%;
  background: #b85645;
  box-shadow: -6px 4px 0 #d78250, 7px 5px 0 #9e473b;
}

.icon-maple i:nth-child(2) {
  left: 14px;
  top: 16px;
  width: 5px;
  height: 12px;
  border-radius: 999px;
  background: #5b3727;
  transform: rotate(10deg);
}

.icon-maple i:nth-child(3) {
  left: 18px;
  top: 12px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d78250;
}

.icon-maple i:nth-child(4) {
  left: 5px;
  top: 13px;
  width: 10px;
  height: 9px;
  border-radius: 50%;
  background: #b85645;
}

.icon-cherry i:nth-child(1) {
  left: 14px;
  top: 16px;
  width: 5px;
  height: 13px;
  border-radius: 999px;
  background: #7b5848;
  transform: rotate(-8deg);
}

.icon-cherry i:nth-child(2),
.icon-cherry i:nth-child(3),
.icon-cherry i:nth-child(4),
.icon-cherry i:nth-child(5) {
  border-radius: 50%;
  background: #e8a9b9;
}

.icon-cherry i:nth-child(2) { left: 5px; top: 8px; width: 12px; height: 11px; }
.icon-cherry i:nth-child(3) { left: 14px; top: 4px; width: 13px; height: 12px; background: #f6d5dc; }
.icon-cherry i:nth-child(4) { left: 21px; top: 10px; width: 10px; height: 10px; }
.icon-cherry i:nth-child(5) { left: 11px; top: 13px; width: 9px; height: 9px; background: #f6d5dc; }

.icon-rock i {
  background: #a99c88;
  clip-path: polygon(15% 35%, 42% 8%, 82% 20%, 100% 62%, 72% 94%, 24% 86%, 0 58%);
}

.icon-rock i:first-child { left: 4px; top: 11px; width: 20px; height: 16px; }
.icon-rock i:last-child { left: 14px; top: 8px; width: 14px; height: 18px; background: #c3b391; }

.icon-stone i:first-child {
  left: 11px;
  top: 4px;
  width: 12px;
  height: 24px;
  background: #c3b391;
  clip-path: polygon(40% 0, 88% 18%, 100% 82%, 48% 100%, 0 76%, 12% 22%);
}

.icon-stone i:last-child {
  left: 6px;
  top: 21px;
  width: 22px;
  height: 8px;
  border-radius: 50%;
  background: rgba(85, 73, 58, 0.22);
}

.icon-pond i:first-child {
  left: 3px;
  top: 9px;
  width: 24px;
  height: 16px;
  border-radius: 50%;
  background: #5aa7b0;
  border: 3px solid #8d7b63;
}

.icon-pond i:nth-child(2),
.icon-pond i:nth-child(3) {
  width: 8px;
  height: 4px;
  border-radius: 50%;
}

.icon-pond i:nth-child(2) { left: 10px; top: 15px; background: #d96a37; }
.icon-pond i:nth-child(3) { left: 18px; top: 14px; background: #f3ede0; }

.icon-lantern i:first-child {
  left: 8px;
  top: 9px;
  width: 16px;
  height: 17px;
  border-radius: 2px;
  background: #b4aa93;
  clip-path: polygon(0 16%, 100% 16%, 86% 100%, 14% 100%);
}

.icon-lantern i:nth-child(2) {
  left: 12px;
  top: 12px;
  width: 8px;
  height: 9px;
  border-radius: 3px;
  background: #ffd889;
  box-shadow: 0 0 9px rgba(255, 216, 137, 0.75);
}

.icon-lantern i:nth-child(3) {
  left: 5px;
  top: 2px;
  width: 22px;
  height: 13px;
  background: #8c806c;
  clip-path: polygon(50% 0, 100% 78%, 72% 100%, 28% 100%, 0 78%);
}

.icon-lantern::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 23px;
  width: 4px;
  height: 7px;
  border-radius: 999px;
  background: #8c806c;
}

.icon-bowl i:first-child {
  left: 4px;
  top: 12px;
  width: 24px;
  height: 14px;
  border-radius: 0 0 50% 50%;
  background: #8f846f;
}

.icon-bowl i:nth-child(2) {
  left: 7px;
  top: 10px;
  width: 18px;
  height: 8px;
  border-radius: 50%;
  background: #5aa7b0;
}

.icon-bowl i:nth-child(3) {
  left: 12px;
  top: 12px;
  width: 9px;
  height: 4px;
  border-radius: 50%;
  border: 1px solid #e6f5ee;
}

.icon-leaves i {
  width: 13px;
  height: 8px;
  border-radius: 50% 0 50% 50%;
  background: #b85645;
}

.icon-leaves i:nth-child(1) { left: 5px; top: 9px; transform: rotate(-25deg); }
.icon-leaves i:nth-child(2) { left: 14px; top: 11px; background: #d78250; transform: rotate(28deg); }
.icon-leaves i:nth-child(3) { left: 8px; top: 18px; background: #8c7040; transform: rotate(12deg); }
.icon-leaves i:nth-child(4) { left: 18px; top: 19px; background: #c7504a; transform: rotate(-18deg); }

.icon-flowers i:nth-child(1),
.icon-flowers i:nth-child(2),
.icon-flowers i:nth-child(3) {
  border-radius: 50%;
  background: #5f9a65;
}

.icon-flowers i:nth-child(1) { left: 5px; top: 16px; width: 16px; height: 9px; }
.icon-flowers i:nth-child(2) { left: 12px; top: 11px; width: 15px; height: 9px; }
.icon-flowers i:nth-child(3) { left: 10px; top: 19px; width: 17px; height: 8px; }

.icon-flowers i:nth-child(4),
.icon-flowers i:nth-child(5) {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.icon-flowers i:nth-child(4) { left: 11px; top: 10px; background: #f3d58d; }
.icon-flowers i:nth-child(5) { left: 20px; top: 15px; background: #c7504a; }

.icon-lilies i:nth-child(1) {
  left: 4px;
  top: 10px;
  width: 24px;
  height: 15px;
  border-radius: 50%;
  background: #5aa7b0;
  border: 2px solid rgba(141, 123, 99, 0.68);
}

.icon-lilies i:nth-child(2),
.icon-lilies i:nth-child(3) {
  width: 10px;
  height: 8px;
  border-radius: 50% 50% 50% 0;
  background: #5f9a65;
}

.icon-lilies i:nth-child(2) { left: 8px; top: 13px; transform: rotate(-18deg); }
.icon-lilies i:nth-child(3) { left: 17px; top: 15px; transform: rotate(26deg); }
.icon-lilies i:nth-child(4) { left: 14px; top: 12px; width: 5px; height: 5px; border-radius: 50%; background: #f3ede0; }

.icon-stepping i {
  width: 9px;
  height: 7px;
  border-radius: 50%;
  background: #b9ad93;
}

.icon-stepping i:nth-child(1) { left: 3px; top: 17px; transform: rotate(-18deg); }
.icon-stepping i:nth-child(2) { left: 9px; top: 11px; width: 10px; height: 8px; }
.icon-stepping i:nth-child(3) { left: 17px; top: 15px; background: #c3b391; transform: rotate(14deg); }
.icon-stepping i:nth-child(4) { left: 22px; top: 8px; width: 8px; height: 7px; }
.icon-stepping i:nth-child(5) { left: 12px; top: 21px; background: #a99c88; }

.icon-pebbleCircle i {
  width: 5px;
  height: 4px;
  border-radius: 50%;
  background: #a99c88;
}

.icon-pebbleCircle i:nth-child(1) { left: 14px; top: 5px; }
.icon-pebbleCircle i:nth-child(2) { left: 20px; top: 7px; background: #c3b391; }
.icon-pebbleCircle i:nth-child(3) { left: 24px; top: 12px; }
.icon-pebbleCircle i:nth-child(4) { left: 23px; top: 18px; background: #c3b391; }
.icon-pebbleCircle i:nth-child(5) { left: 18px; top: 23px; }
.icon-pebbleCircle i:nth-child(6) { left: 12px; top: 24px; background: #c3b391; }
.icon-pebbleCircle i:nth-child(7) { left: 7px; top: 21px; }
.icon-pebbleCircle i:nth-child(8) { left: 4px; top: 15px; background: #c3b391; }
.icon-pebbleCircle i:nth-child(9) { left: 6px; top: 9px; }
.icon-pebbleCircle i:nth-child(10) { left: 10px; top: 6px; background: #c3b391; }
.icon-pebbleCircle i:nth-child(11) { left: 14px; top: 14px; background: rgba(141, 123, 99, 0.28); }
.icon-pebbleCircle i:nth-child(12) { left: 17px; top: 14px; background: rgba(141, 123, 99, 0.22); }

.icon-bambooFence i:nth-child(1),
.icon-bambooFence i:nth-child(2),
.icon-bambooFence i:nth-child(3),
.icon-bambooFence i:nth-child(4) {
  width: 4px;
  height: 22px;
  bottom: 5px;
  border-radius: 999px;
  background: #3f8f61;
}

.icon-bambooFence i:nth-child(1) { left: 5px; }
.icon-bambooFence i:nth-child(2) { left: 12px; bottom: 4px; }
.icon-bambooFence i:nth-child(3) { left: 19px; }
.icon-bambooFence i:nth-child(4) { left: 26px; bottom: 6px; }
.icon-bambooFence i:nth-child(5),
.icon-bambooFence i:nth-child(6) {
  left: 4px;
  width: 25px;
  height: 4px;
  border-radius: 999px;
  background: #27684b;
}
.icon-bambooFence i:nth-child(5) { top: 12px; }
.icon-bambooFence i:nth-child(6) { top: 20px; }

.icon-bridge i:nth-child(1) {
  left: 4px;
  top: 15px;
  width: 24px;
  height: 8px;
  border-radius: 12px 12px 4px 4px;
  background: #9a6b43;
}

.icon-bridge i:nth-child(2),
.icon-bridge i:nth-child(3) {
  top: 11px;
  width: 4px;
  height: 14px;
  border-radius: 999px;
  background: #6f4a32;
}

.icon-bridge i:nth-child(2) { left: 7px; }
.icon-bridge i:nth-child(3) { right: 7px; }
.icon-bridge i:nth-child(4),
.icon-bridge i:nth-child(5) {
  top: 10px;
  width: 20px;
  height: 3px;
  border-radius: 999px;
  background: #6f4a32;
}
.icon-bridge i:nth-child(4) { left: 6px; }
.icon-bridge i:nth-child(5) { left: 6px; top: 20px; }

.icon-bonsai i:nth-child(1) {
  left: 9px;
  top: 19px;
  width: 15px;
  height: 9px;
  border-radius: 0 0 7px 7px;
  background: #8d6b56;
}

.icon-bonsai i:nth-child(2) {
  left: 15px;
  top: 12px;
  width: 4px;
  height: 11px;
  border-radius: 999px;
  background: #5b3727;
  transform: rotate(-13deg);
}

.icon-bonsai i:nth-child(3),
.icon-bonsai i:nth-child(4),
.icon-bonsai i:nth-child(5) {
  border-radius: 50%;
  background: #5f8f61;
}

.icon-bonsai i:nth-child(3) { left: 5px; top: 8px; width: 13px; height: 9px; }
.icon-bonsai i:nth-child(4) { left: 14px; top: 5px; width: 14px; height: 10px; background: #6fa36c; }
.icon-bonsai i:nth-child(5) { left: 17px; top: 13px; width: 10px; height: 8px; }

.icon-reeds i {
  width: 3px;
  border-radius: 999px;
  background: #5b7d4a;
}

.icon-reeds i:nth-child(1) { left: 7px; bottom: 5px; height: 20px; transform: rotate(-8deg); }
.icon-reeds i:nth-child(2) { left: 13px; bottom: 4px; height: 24px; }
.icon-reeds i:nth-child(3) { left: 19px; bottom: 5px; height: 18px; transform: rotate(7deg); }
.icon-reeds i:nth-child(4),
.icon-reeds i:nth-child(5),
.icon-reeds i:nth-child(6) {
  width: 5px;
  height: 9px;
  border-radius: 999px;
  background: #8c7040;
}
.icon-reeds i:nth-child(4) { left: 5px; top: 6px; }
.icon-reeds i:nth-child(5) { left: 11px; top: 4px; }
.icon-reeds i:nth-child(6) { left: 18px; top: 9px; }

.icon-teaSet i:nth-child(1) {
  left: 5px;
  top: 17px;
  width: 23px;
  height: 8px;
  border-radius: 50%;
  background: #8c7040;
}

.icon-teaSet i:nth-child(2) {
  left: 9px;
  top: 10px;
  width: 10px;
  height: 9px;
  border-radius: 50%;
  background: #f3ede0;
}

.icon-teaSet i:nth-child(3),
.icon-teaSet i:nth-child(4) {
  width: 7px;
  height: 6px;
  border-radius: 0 0 50% 50%;
  background: #f3ede0;
}
.icon-teaSet i:nth-child(3) { left: 19px; top: 13px; }
.icon-teaSet i:nth-child(4) { left: 14px; top: 20px; }
.icon-teaSet i:nth-child(5) { left: 18px; top: 12px; width: 9px; height: 3px; border-radius: 50%; background: #b96f45; }

.icon-torii i:nth-child(1),
.icon-torii i:nth-child(2) {
  top: 9px;
  width: 5px;
  height: 20px;
  border-radius: 999px;
  background: #b85645;
}
.icon-torii i:nth-child(1) { left: 9px; }
.icon-torii i:nth-child(2) { right: 9px; }
.icon-torii i:nth-child(3),
.icon-torii i:nth-child(4),
.icon-torii i:nth-child(5) {
  left: 4px;
  width: 24px;
  height: 4px;
  border-radius: 999px;
  background: #b85645;
}
.icon-torii i:nth-child(3) { top: 7px; background: #5b3727; }
.icon-torii i:nth-child(4) { top: 13px; }
.icon-torii i:nth-child(5) { top: 24px; width: 18px; left: 7px; background: rgba(91, 55, 39, 0.72); }

.icon-windChime i:nth-child(1) {
  left: 8px;
  top: 5px;
  width: 4px;
  height: 23px;
  border-radius: 999px;
  background: #8c7040;
}

.icon-windChime i:nth-child(2) { left: 9px; top: 7px; width: 17px; height: 3px; border-radius: 999px; background: #8c7040; }
.icon-windChime i:nth-child(3) { left: 18px; top: 11px; width: 10px; height: 4px; border-radius: 50%; background: #8c7040; }
.icon-windChime i:nth-child(4),
.icon-windChime i:nth-child(5),
.icon-windChime i:nth-child(6) {
  width: 3px;
  height: 12px;
  border-radius: 999px;
  background: #c3b391;
}
.icon-windChime i:nth-child(4) { left: 18px; top: 15px; }
.icon-windChime i:nth-child(5) { left: 22px; top: 15px; }
.icon-windChime i:nth-child(6) { left: 26px; top: 15px; }

.icon-paperLantern i:nth-child(1) {
  left: 14px;
  top: 7px;
  width: 4px;
  height: 20px;
  border-radius: 999px;
  background: #5b3727;
}

.icon-paperLantern i:nth-child(2) {
  left: 9px;
  top: 9px;
  width: 14px;
  height: 17px;
  border-radius: 50%;
  background: #ffe2a8;
  box-shadow: 0 0 10px rgba(255, 216, 137, 0.75);
}

.icon-paperLantern i:nth-child(3),
.icon-paperLantern i:nth-child(4) {
  left: 12px;
  width: 9px;
  height: 3px;
  border-radius: 999px;
  background: #5b3727;
}
.icon-paperLantern i:nth-child(3) { top: 8px; }
.icon-paperLantern i:nth-child(4) { top: 24px; }
.icon-paperLantern i:nth-child(5) { left: 7px; top: 15px; width: 19px; height: 9px; border-radius: 50%; background: rgba(255, 216, 137, 0.2); }

.icon-log i:nth-child(1) {
  left: 5px;
  top: 14px;
  width: 24px;
  height: 9px;
  border-radius: 999px;
  background: #7a5738;
  transform: rotate(-7deg);
}

.icon-log i:nth-child(2),
.icon-log i:nth-child(3) {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b99b70;
}
.icon-log i:nth-child(2) { left: 3px; top: 15px; }
.icon-log i:nth-child(3) { left: 24px; top: 12px; }
.icon-log i:nth-child(4),
.icon-log i:nth-child(5) {
  width: 10px;
  height: 5px;
  border-radius: 50%;
  background: #5f8f61;
}
.icon-log i:nth-child(4) { left: 10px; top: 11px; transform: rotate(-8deg); }
.icon-log i:nth-child(5) { left: 17px; top: 16px; transform: rotate(12deg); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.mode-button:focus-visible,
.hud-button:focus-visible,
.seed-button:focus-visible,
.asset-button:focus-visible,
.option-button:focus-visible,
.path-style-button:focus-visible,
.tray-scroll-button:focus-visible,
.asset-edit-panel button:focus-visible,
#garden-canvas:focus-visible {
  outline: 3px solid rgba(104, 120, 79, 0.74);
  outline-offset: 3px;
}

@media (max-width: 980px) {
  .top-hud {
    grid-template-columns: minmax(220px, 1fr) auto;
    grid-template-areas:
      "mode actions"
      "brand brand";
  }

  .mode-switch {
    grid-area: mode;
    width: min(100%, calc(100vw - 260px));
  }

  .brand {
    grid-area: brand;
    margin-top: 2px;
  }

  .hud-actions {
    grid-area: actions;
  }

  .mode-status {
    top: 108px;
  }

  .asset-edit-panel {
    overflow-x: auto;
  }
}

@media (max-width: 700px), (max-height: 650px) {
  .app {
    min-height: 520px;
  }

  .top-hud {
    left: 8px;
    right: 8px;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "actions actions"
      "mode mode";
    gap: 7px;
  }

  .brand {
    display: none;
  }

  .hud-actions {
    justify-self: end;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .hud-actions::-webkit-scrollbar {
    display: none;
  }

  .hud-button {
    width: 48px;
    height: 48px;
  }

  .mode-switch {
    width: calc(100vw - 16px);
  }

  .mode-button {
    min-width: 78px;
  }

  .mode-status {
    top: 104px;
    padding: 8px 12px;
  }

  .mode-status strong {
    font-size: 0.74rem;
  }

  .mode-status span {
    font-size: 0.64rem;
  }

  .bottom-rail {
    bottom: max(8px, env(safe-area-inset-bottom));
    width: auto;
    min-width: 0;
    max-width: calc(100vw - 16px);
    padding: 8px 10px;
  }

  .rail-label {
    min-width: 76px;
    padding: 7px 8px;
    font-size: 0.64rem;
  }

  .tray-scroll-button {
    flex-basis: 30px;
    width: 30px;
    height: 50px;
  }

  .seed-panel,
  .asset-panel,
  .option-panel {
    width: min(390px, calc(100vw - 168px));
    max-width: min(390px, calc(100vw - 168px));
  }

  .seed-button,
  .asset-button,
  .option-button {
    width: 82px;
    min-width: 82px;
    min-height: 78px;
  }

  .seed-name,
  .asset-name,
  .option-button span:last-child {
    max-width: 78px;
    font-size: 0.66rem;
  }

  .control-dock[data-mode="path"] .option-panel {
    min-width: 230px;
  }

  .path-style-button {
    min-width: 64px;
    min-height: 36px;
    padding: 0 10px;
  }

  .rail-hint {
    display: none !important;
  }

  .asset-edit-panel {
    bottom: calc(98px + env(safe-area-inset-bottom));
    justify-content: flex-start;
    overflow-x: auto;
    padding: 8px;
  }

  .asset-edit-copy {
    min-width: 168px;
  }

  .asset-edit-copy span {
    white-space: normal;
  }

  .asset-edit-panel button {
    min-width: 74px;
  }

  .notification-feed {
    top: 58px;
    right: 8px;
    width: min(280px, calc(100vw - 16px));
  }
}

@media (pointer: coarse) {
  .seed-button,
  .asset-button,
  .option-button,
  .path-style-button,
  .asset-edit-panel button,
  .hud-button,
  .mode-button {
    touch-action: manipulation;
  }
}

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

@media (forced-colors: active) {
  .mode-switch,
  .mode-status,
  .bottom-rail,
  .asset-edit-panel,
  .feed-item,
  .hud-button,
  .seed-button,
  .asset-button,
  .option-button,
  .path-style-button {
    border: 1px solid CanvasText;
    background: Canvas;
    color: CanvasText;
  }

  .tray-scroll-button {
    border: 1px solid CanvasText;
  }
}
