@import url("https://cdn.jsdelivr.net/npm/@fontsource/fusion-pixel-12px-monospaced-sc@5.3.0/index.css");

:root {
  --forest: #173a31;
  --forest-deep: #0a211b;
  --forest-dark: #061712;
  --moss: #719a35;
  --moss-bright: #a7cc55;
  --wood: #7a4d2f;
  --wood-dark: #4a2b20;
  --paper: #f4e8bd;
  --paper-soft: #fff7d7;
  --paper-muted: #dfcf9c;
  --glass: #7bc6be;
  --gold: #e1bb4f;
  --signal-gold: #f1c75b;
  --coral: #d9664c;
  --ink: #183a31;
  --ink-soft: #655c46;
  --line: #3e5b49;
  --pixel-font: "Fusion Pixel 12px Monospaced SC", "Zpix", "Microsoft YaHei", monospace;
  --body-font: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --hard-shadow: 6px 6px 0 #081d18;
  --paper-shadow: 5px 5px 0 #9d7d4f;
}

* {
  box-sizing: border-box;
  border-radius: 0 !important;
}

[hidden] { display: none !important; }

html {
  min-width: 320px;
  background: var(--forest-dark);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--forest-dark);
  font-family: var(--body-font);
  font-synthesis: weight;
  letter-spacing: 0;
  text-rendering: geometricPrecision;
}

button,
input,
textarea,
summary {
  font: inherit;
  letter-spacing: 0;
}

button { min-height: 44px; }
button, summary, a { -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: wait; filter: grayscale(.35); opacity: .58; }
h1, h2, p, figure { margin-top: 0; }
h1, h2 { letter-spacing: 0; }
h1,
h2,
button,
summary,
.brand-lockup,
.step-progress,
.service-status,
.view-kicker,
.greenhouse-status,
.scene-toolbar,
.phase-journey,
.today-focus,
.furniture-preview {
  font-family: var(--pixel-font);
}
img, svg, canvas {
  display: block;
  max-width: 100%;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

.terrarium-app { min-height: 100vh; overflow: clip; }
.app-view { position: relative; min-height: calc(100vh - 76px); overflow: hidden; }
.app-view[hidden] { display: none !important; }

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

.app-header {
  position: relative;
  z-index: 100;
  display: grid;
  grid-template-columns: auto minmax(340px, 1fr) auto;
  align-items: center;
  gap: clamp(18px, 4vw, 60px);
  min-height: 76px;
  padding: 10px clamp(18px, 4vw, 64px);
  color: var(--paper-soft);
  background: var(--forest-deep);
  border-bottom: 5px solid var(--wood);
  box-shadow: 0 5px 0 #071a15;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--paper-soft);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  background: var(--wood);
  border: 4px solid #071a15;
  box-shadow: 4px 4px 0 #071a15, inset 0 -6px 0 #5b351f;
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  top: -13px;
  width: 15px;
  height: 19px;
  content: "";
  background: var(--moss-bright);
  border: 3px solid #071a15;
}

.brand-mark::before { left: -1px; }
.brand-mark::after { right: -1px; background: #85b743; }
.brand-mark i { position: absolute; left: 14px; top: 0; width: 4px; height: 23px; background: #264f2f; }
.brand-copy { display: grid; gap: 2px; }
.brand-copy b { font-size: 19px; line-height: 1; text-shadow: 2px 2px 0 #071a15; }
.brand-copy small { color: var(--moss-bright); font-size: 9px; }

.step-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-self: center;
  width: min(650px, 100%);
  gap: 8px;
}

.step-progress-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #91a69b;
  font-size: 11px;
  white-space: nowrap;
}

.step-progress-item::after {
  height: 4px;
  min-width: 14px;
  flex: 1;
  content: "";
  background: #315447;
  box-shadow: 0 3px 0 #061712;
}

.step-progress-item:last-child::after { display: none; }

.step-progress-item b {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  color: #c6d5ca;
  background: #24483b;
  border: 3px solid #071a15;
  box-shadow: 3px 3px 0 #071a15;
  font-size: 10px;
}

.step-progress-item[data-state="active"] { color: #ffe38a; }
.step-progress-item[data-state="active"] b { color: #182c22; background: var(--gold); }
.step-progress-item[data-state="complete"] { color: #c6e66e; }
.step-progress-item[data-state="complete"] b { color: #173a31; background: var(--moss-bright); }
.step-progress-item[data-state="complete"]::after { background: #709a37; }

.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }

.service-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 10px;
  color: #e8f2c6;
  background: #234d3d;
  border: 3px solid #0b251e;
  box-shadow: 3px 3px 0 #071a15;
  font-size: 9px;
  white-space: nowrap;
}

.service-status i {
  width: 9px;
  height: 9px;
  background: var(--moss-bright);
  border: 2px solid #071a15;
  box-shadow: 0 0 0 2px #527137;
}

.service-status[data-mode="offline"] { color: #ffd6c7; background: #67342c; }
.service-status[data-mode="offline"] i { background: var(--coral); box-shadow: none; }

.tool-menu { position: relative; }
.tool-menu summary {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--paper-soft);
  background: #234d3d;
  border: 3px solid #071a15;
  box-shadow: 3px 3px 0 #071a15;
  cursor: pointer;
  list-style: none;
  font-size: 18px;
}
.tool-menu summary::-webkit-details-marker { display: none; }

.tool-menu nav {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: grid;
  min-width: 230px;
  padding: 8px;
  background: var(--paper);
  border: 4px solid #071a15;
  box-shadow: var(--hard-shadow);
}

.tool-menu a,
.tool-menu button {
  min-height: 38px;
  padding: 9px 10px;
  color: var(--ink);
  background: var(--paper-soft);
  border: 0;
  border-bottom: 2px solid #c7ad70;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  font-size: 10px;
}
.tool-menu a:hover, .tool-menu button:hover { color: #071a15; background: var(--gold); }

.scene-backdrop,
.dialogue-scene {
  --home-scene-x: 50%;
  --home-scene-y: 50%;
  position: absolute;
  z-index: 0;
  inset: 0;
  background-color: #0b2019;
  background-image: url("/assets/pixel-greenhouse-interior.png");
  background-position: center;
  background-size: cover;
  image-rendering: pixelated;
  transition: filter 120ms steps(2, end);
}

.pixel-scene-effects-active .scene-backdrop,
.pixel-scene-effects-active .dialogue-scene {
  background-position:
    calc(var(--home-scene-x) + var(--pixel-scene-shift-x))
    calc(var(--home-scene-y) + var(--pixel-scene-shift-y) + var(--pixel-scene-scroll-y));
}

.scene-backdrop::before,
.dialogue-scene::before {
  position: absolute;
  z-index: 1;
  top: 10.5%;
  left: 47.5%;
  width: 9px;
  height: 9px;
  content: "";
  pointer-events: none;
  background: #ffe79a;
  box-shadow:
    0 0 0 4px rgba(240, 198, 83, .48),
    0 0 0 11px rgba(240, 198, 83, .18),
    0 0 0 20px rgba(240, 198, 83, .08);
  opacity: .52;
  transform: translate(-50%, -50%);
  animation: glass-lamp-flicker 2.8s steps(4, end) infinite;
}

.scene-backdrop::after,
.dialogue-scene::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: rgba(6, 23, 18, .18);
}

.dialogue-scene::after { background: rgba(5, 18, 14, .48); }
.glass-line, .window-glow, .shelf-line { display: none; }

.hanging-vine {
  position: absolute;
  z-index: 2;
  top: -4px;
  display: block;
  width: 5px;
  height: 74px;
  pointer-events: none;
  background: #3b683d;
  box-shadow:
    5px 18px 0 #64833f,
    -5px 36px 0 #315b39,
    5px 54px 0 #7b9848;
  opacity: .72;
  transform-origin: 50% 0;
  animation: vine-step-sway 3.4s steps(4, end) infinite;
}

.vine-a { left: 27%; }
.vine-b { right: 18%; height: 58px; animation-delay: -1.2s; }

.terrarium-app[data-scene-light="night"] .scene-backdrop,
.terrarium-app[data-scene-light="night"] .dialogue-scene {
  filter: brightness(.7) saturate(.82) hue-rotate(7deg);
}

.terrarium-app[data-scene-light="night"] .scene-backdrop::before,
.terrarium-app[data-scene-light="night"] .dialogue-scene::before {
  background: #fff0a5;
  box-shadow:
    0 0 0 5px rgba(255, 218, 109, .72),
    0 0 0 14px rgba(255, 218, 109, .3),
    0 0 0 28px rgba(255, 218, 109, .12);
  opacity: 1;
}

.terrarium-app[data-scene-state="thinking"] .scene-backdrop::after,
.terrarium-app[data-scene-state="thinking"] .dialogue-scene::after {
  background: rgba(5, 18, 14, .38);
}

.terrarium-app[data-scene-state="error"] .scene-backdrop::after,
.terrarium-app[data-scene-state="error"] .dialogue-scene::after {
  background: rgba(91, 31, 28, .3);
  box-shadow: inset 0 0 0 6px rgba(218, 102, 76, .62);
}

.scene-hotspot-layer {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translate3d(var(--pixel-scene-shift-x, 0), calc(var(--pixel-scene-shift-y, 0) + var(--pixel-scene-scroll-y, 0)), 0);
}

.pixel-home .ambience-trigger {
  position: absolute;
  top: 13.5%;
  left: 47.5%;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  min-height: 52px;
  padding: 0;
  pointer-events: auto;
  touch-action: manipulation;
  color: var(--paper-soft);
  background: transparent;
  border: 0;
  box-shadow: none;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.pixel-home .ambience-trigger:hover,
.pixel-home .ambience-trigger:active,
.pixel-home .ambience-trigger:focus-visible {
  filter: none;
  outline: 0 !important;
  box-shadow: none;
  transform: translate(-50%, -50%);
}

.ambience-trigger:focus-visible .scene-trigger-pixel {
  box-shadow:
    0 0 0 3px #173a31,
    0 0 0 6px #8ed5cf,
    12px 0 0 -2px #ffe38a,
    -12px 0 0 -2px #ffe38a,
    0 12px 0 -2px #ffe38a,
    0 -12px 0 -2px #ffe38a;
}

.scene-trigger-pixel {
  width: 8px;
  height: 8px;
  background: #ffe38a;
  border: 2px solid #183a31;
  box-shadow:
    12px 0 0 -2px #8ed5cf,
    -12px 0 0 -2px #8ed5cf,
    0 12px 0 -2px #8ed5cf,
    0 -12px 0 -2px #8ed5cf;
  animation: hotspot-pulse 1.8s steps(4, end) infinite;
}

.scene-trigger-label {
  position: absolute;
  top: calc(100% + 2px);
  left: 50%;
  display: grid;
  min-width: 112px;
  padding: 5px 8px;
  color: #fff0c4;
  background: #6b4328;
  border: 2px solid #24170f;
  box-shadow: 3px 3px 0 rgba(7, 27, 21, .72), inset 0 2px 0 #a56e3d;
  font-family: var(--pixel-font);
  font-size: 9px;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity 80ms steps(1, end), transform 80ms steps(1, end);
}

.scene-trigger-label small { color: #cfe5ba; font-size: 8px; }
.ambience-trigger:hover .scene-trigger-label,
.ambience-trigger:focus-visible .scene-trigger-label,
.ambience-trigger[aria-pressed="true"] .scene-trigger-label { opacity: 1; transform: translate(-50%, 0); }

.seed-composition {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(360px, 460px) minmax(420px, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  width: min(1440px, 100%);
  min-height: calc(100vh - 76px);
  margin: 0 auto;
  padding: 34px clamp(24px, 5vw, 76px) 42px;
  pointer-events: none;
}

.seed-panel,
.seed-furniture { pointer-events: auto; }

.paper-panel,
.dialogue-panel {
  color: var(--ink);
  background: var(--paper);
  border: 3px solid #132d25;
  box-shadow: 6px 6px 0 rgba(5, 20, 16, .72), inset 0 0 0 2px #d5bd79;
}

.seed-panel {
  position: relative;
  align-self: center;
  width: min(100%, 460px);
  padding: 28px 30px 30px;
}

.view-kicker {
  margin-bottom: 9px;
  color: #8b3f30;
  font-size: 11px;
  text-transform: uppercase;
}

.seed-panel h1,
.dialogue-panel h1 {
  margin-bottom: 12px;
  color: #183a31;
  font-size: 38px;
  line-height: 1.15;
  text-shadow: 2px 2px 0 #d9c68c;
}

.panel-lead { max-width: 40em; margin-bottom: 20px; color: #61553f; font-size: 14px; line-height: 1.65; }
#goal-form, #agent-form { display: grid; gap: 12px; }
label, .field-group > span:first-child { color: #493627; font-size: 13px; font-weight: 700; }

input,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px;
  color: var(--ink);
  background: var(--paper-soft);
  border: 2px solid #315b48;
  box-shadow: inset 3px 3px 0 #dfcf9c;
  outline: 0;
  font-family: var(--body-font);
  font-size: 14px;
}

textarea { min-height: 104px; resize: vertical; line-height: 1.7; }
input:focus, textarea:focus { border-color: var(--gold); outline: 3px solid #183a31; outline-offset: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-group { display: grid; gap: 7px; }
.minute-field { position: relative; display: block; }
.minute-field input { padding-right: 52px; }
.minute-field b { position: absolute; top: 16px; right: 12px; color: #735f43; font-size: 12px; }

.goal-presets,
.minute-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.goal-presets button,
.minute-presets button,
.choice-button {
  min-height: 34px;
  padding: 7px 10px;
  color: #244337;
  background: #e8dcad;
  border: 2px solid #315b48;
  box-shadow: 2px 2px 0 rgba(107, 67, 40, .58);
  cursor: pointer;
  font-size: 12px;
}

.goal-presets button:hover,
.minute-presets button:hover,
.choice-button:hover,
.minute-presets button[aria-pressed="true"] {
  color: #172c23;
  background: var(--gold);
  box-shadow: 2px 2px 0 #8c6b27;
}

.minute-presets { align-items: center; }
.minute-presets > span { margin-right: 2px; color: #69593f; font-size: 12px; }

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 11px 18px;
  color: var(--paper-soft);
  background: var(--moss);
  border: 3px solid #193321;
  box-shadow: 4px 4px 0 #47641e;
  cursor: pointer;
  font-size: 14px;
}
.primary-button:hover { background: #85aa3b; }
.primary-button:active { transform: translate(4px, 4px); box-shadow: none; }
.form-message { min-height: 30px; margin: 12px 0 0; color: #6a5d43; font-size: 12px; line-height: 1.55; }
.form-message::before { margin-right: 6px; color: #6e9c37; content: ">"; }
.form-message[data-state="error"], .inline-error:not(:empty) { color: #8b3028; }
.seed-furniture { display: none; }

.seed-story {
  position: relative;
  min-height: min(680px, calc(100vh - 128px));
  overflow: visible;
}
.seed-tutor {
  position: absolute;
  z-index: 2;
  right: clamp(0px, 2vw, 28px);
  bottom: 34px;
  display: block;
  width: clamp(290px, 29vw, 420px);
  height: clamp(380px, 46vw, 540px);
  filter: drop-shadow(8px 10px 0 rgba(6, 23, 18, .34));
}
.story-note {
  position: absolute;
  z-index: 3;
  top: 15%;
  left: 0;
  width: min(300px, 56%);
  padding: 14px 16px;
  color: #2e3324;
  background: rgba(244, 232, 189, .96);
  border: 2px solid #132d25;
  box-shadow: 4px 4px 0 rgba(5, 20, 16, .62);
}
.story-note::after {
  position: absolute;
  right: 38px;
  bottom: -18px;
  width: 18px;
  height: 18px;
  content: "";
  background: var(--paper);
  border-right: 2px solid #132d25;
  border-bottom: 2px solid #132d25;
  transform: rotate(45deg);
}
.story-note span { display: block; margin-bottom: 7px; color: #58772b; font-family: var(--pixel-font); font-size: 10px; }
.story-note strong { font-size: 14px; line-height: 1.7; }
.artist-stage { margin: 0; overflow: hidden; }
.artist-sprite { display: block; width: 100%; height: 100%; }

.dialogue-view { background: #102a23; }
.dialogue-composition {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: end;
  gap: 0;
  width: min(1220px, calc(100% - 36px));
  min-height: calc(100vh - 76px);
  margin: 0 auto;
  padding: 28px 0 42px;
  pointer-events: none;
}

.dialogue-panel { pointer-events: auto; }

.dialogue-character-column {
  position: relative;
  z-index: 2;
  display: grid;
  align-items: end;
  justify-items: center;
  min-height: 250px;
  padding: 14px 12px 0;
  background: #679f8b;
  border: 4px solid #0a211b;
  border-right: 0;
  box-shadow: 7px 7px 0 rgba(5, 18, 14, .76), inset 0 -18px 0 #60402b;
}

.dialogue-character-column::before {
  position: absolute;
  top: 12px;
  right: 12px;
  left: 12px;
  height: 4px;
  content: "NPC PORTRAIT";
  color: #e9f4c4;
  border-top: 4px solid #244c3d;
  font-size: 8px;
  text-align: center;
}

.agent-tutor { width: 190px; height: 220px; filter: drop-shadow(5px 5px 0 rgba(13, 35, 28, .46)); }
.dialogue-furniture { display: none; }
.dialogue-panel { position: relative; min-height: 390px; padding: 30px 32px; }
.dialogue-panel h1 { font-size: 34px; }

.speech-bubble {
  position: relative;
  min-height: 92px;
  margin-bottom: 16px;
  padding: 16px;
  color: #312b20;
  background: var(--paper-soft);
  border: 2px solid #315b48;
  box-shadow: inset 3px 3px 0 #dfcf9c;
  font-size: 14px;
  line-height: 1.7;
}

.speech-bubble::before { margin-right: 8px; color: #a34637; content: ">"; }
.choice-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.choice-button { min-width: 0; min-height: 44px; font-size: 13px; }

/* Keep the dialogue as the strongest paper surface without stacking frames. */
.dialogue-panel {
  border: 3px solid #3e2417;
  clip-path: none;
  background: #f5e6ba;
  box-shadow:
    6px 7px 0 rgba(24, 14, 10, .62),
    inset 0 0 0 2px #d0aa65;
  filter: none;
}

.dialogue-panel::before { display: none; }

.speech-bubble {
  isolation: isolate;
  padding-top: 20px;
  background: #fff0c4;
  border: 2px solid #452719;
  box-shadow: 3px 3px 0 #8f5e35, inset 0 0 0 2px #d9b773;
  filter: none;
}

.speech-bubble::before {
  position: absolute;
  top: -12px;
  left: 12px;
  margin: 0;
  padding: 3px 8px;
  color: #fff0c4;
  content: "对话";
  background: #6b3e24;
  border: 2px solid #352016;
  box-shadow: 2px 2px 0 #a86f3d;
  font-size: 9px;
  line-height: 1;
}

.speech-bubble::after {
  position: absolute;
  left: -14px;
  bottom: 17px;
  width: 14px;
  height: 18px;
  content: "";
  background: #fff0c4;
  border-bottom: 2px solid #452719;
  border-left: 2px solid #452719;
  box-shadow: -2px 2px 0 #352016;
}

.choice-list { counter-reset: dialogue-choice; }

.choice-button {
  position: relative;
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 9px;
  counter-increment: dialogue-choice;
  padding: 8px 10px;
  color: #3d291b;
  text-align: left;
  background: #ead7a2;
  border: 2px solid #472a1b;
  clip-path: none;
  box-shadow: 0 3px 0 #8f5d35, inset 0 2px 0 #fff0c4;
  filter: none;
}

.choice-button::before {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  color: #fff0c4;
  content: counter(dialogue-choice, decimal-leading-zero);
  background: #754627;
  border: 1px solid #352016;
  box-shadow: inset 0 -2px 0 #4b2c1d;
  font-size: 10px;
}

.choice-button::after {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  color: #6d4b30;
  content: "·";
  background: #cfb77e;
  border: 1px solid #674329;
  box-shadow: none;
  font-size: 12px;
}

.choice-button:hover,
.choice-button:focus,
.choice-button[aria-pressed="true"],
.choice-button:disabled:focus {
  color: #fff3cf;
  background: #174f43;
  border-color: #11362e;
  box-shadow:
    0 0 0 2px #63cfc4,
    0 3px 0 #102e28,
    inset 0 2px 0 #2f7668;
  filter: none;
  opacity: 1;
  outline: 0;
}

.choice-button:hover::after,
.choice-button:focus::after,
.choice-button[aria-pressed="true"]::after,
.choice-button:disabled:focus::after {
  color: #fff0c4;
  content: "✓";
  background: #1e7568;
  border-color: #fff0c4;
  box-shadow: inset 0 2px 0 #55b9ae;
  font-size: 11px;
}

.choice-button:not(:disabled):active {
  transform: translateY(4px);
  box-shadow:
    0 0 0 2px #63cfc4,
    0 1px 0 #102e28,
    inset 0 2px 0 #2f7668;
}

.seed-panel input,
.seed-panel textarea,
.dialogue-panel input,
.dialogue-panel textarea {
  padding-top: 13px;
  color: #38261b;
  background: #fff0c4;
  border: 2px solid #4a2b1c;
  box-shadow: inset 3px 3px 0 #d8bc7b;
}

.seed-panel input:focus,
.seed-panel textarea:focus,
.dialogue-panel input:focus,
.dialogue-panel textarea:focus {
  border-color: #174f43;
  outline: 0;
  box-shadow:
    0 0 0 2px #63cfc4,
    inset 3px 3px 0 #d8bc7b;
}

.form-message {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  color: #174f43;
  background: #fff0c4;
  border: 0;
  border-left: 2px solid #4a2b1c;
  clip-path: none;
  box-shadow: none;
  filter: none;
}

.form-message::before {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin: 0;
  color: #fff0c4;
  content: "i";
  background: #238678;
  border: 1px solid #123b34;
  box-shadow: inset 0 -2px 0 #15584f;
}

.form-message[data-state="error"] {
  color: #792f29;
  background: #f6d1b5;
  border-color: #7e2f29;
  box-shadow: none;
}

.form-message[data-state="error"]::before {
  color: #fff0c4;
  content: "!";
  background: #b5473d;
  border-color: #6f2b26;
  box-shadow: inset 0 -3px 0 #7b302a;
}

.story-note {
  isolation: isolate;
  background: #fff0c4;
  border: 2px solid #452719;
  box-shadow: 4px 4px 0 rgba(24, 14, 10, .5);
  filter: none;
}

.story-note::before { display: none; }

.story-note::after {
  right: 38px;
  left: auto;
  bottom: -18px;
  width: 18px;
  height: 18px;
  background: #fff0c4;
  border: 0;
  border-right: 2px solid #452719;
  border-bottom: 2px solid #452719;
  box-shadow: 2px 2px 0 #352016;
  clip-path: none;
  transform: rotate(45deg);
}

/* Home controls share one cut-paper and carved-wood silhouette. */
.pixel-home .paper-panel,
.pixel-home .dialogue-panel {
  border: 0;
  clip-path: polygon(
    0 12px,
    10px 12px,
    10px 0,
    calc(100% - 10px) 0,
    calc(100% - 10px) 12px,
    100% 12px,
    100% calc(100% - 12px),
    calc(100% - 10px) calc(100% - 12px),
    calc(100% - 10px) 100%,
    10px 100%,
    10px calc(100% - 12px),
    0 calc(100% - 12px)
  );
  box-shadow: none;
  filter: drop-shadow(7px 8px 0 rgba(5, 20, 16, .72));
}

.pixel-home .paper-panel::before,
.pixel-home .dialogue-panel::before {
  position: absolute;
  z-index: 0;
  inset: 3px;
  display: block;
  content: "";
  pointer-events: none;
  border: 3px solid #3e2417;
  box-shadow:
    inset 0 0 0 2px #d0aa65,
    inset 0 8px 0 rgba(255, 249, 218, .42),
    inset 0 -7px 0 rgba(168, 111, 61, .15);
  clip-path: inherit;
}

.pixel-home .paper-panel > *,
.pixel-home .dialogue-panel > * { position: relative; z-index: 1; }

.seed-panel h1:focus,
.dialogue-panel h1:focus,
.scene-toolbar h1:focus { outline: 0; }

.pixel-home .seed-panel input,
.pixel-home .seed-panel textarea,
.pixel-home .dialogue-panel input,
.pixel-home .dialogue-panel textarea {
  border: 3px solid #4a2b1c !important;
  clip-path: polygon(0 7px, 7px 7px, 7px 0, calc(100% - 7px) 0, calc(100% - 7px) 7px, 100% 7px, 100% calc(100% - 7px), calc(100% - 7px) calc(100% - 7px), calc(100% - 7px) 100%, 7px 100%, 7px calc(100% - 7px), 0 calc(100% - 7px));
  box-shadow: inset 4px 4px 0 #d8bc7b, inset -3px -3px 0 #f9e4ad !important;
}

.pixel-home .seed-panel input:focus,
.pixel-home .seed-panel textarea:focus,
.pixel-home .dialogue-panel input:focus,
.pixel-home .dialogue-panel textarea:focus {
  outline: 3px solid #63cfc4 !important;
  outline-offset: 2px !important;
  box-shadow: inset 4px 4px 0 #d8bc7b, inset -3px -3px 0 #fff0c4 !important;
}

.pixel-home .goal-presets button,
.pixel-home .minute-presets button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-inline: 11px;
  color: #3d291b;
  background: #ead7a2;
  border: 0;
  clip-path: polygon(0 6px, 6px 6px, 6px 0, calc(100% - 6px) 0, calc(100% - 6px) 6px, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 6px calc(100% - 6px), 0 calc(100% - 6px));
  box-shadow: inset 0 0 0 2px #4a2b1c, inset 0 3px 0 #fff0c4, inset 0 -4px 0 #b4874c;
}

.pixel-home .goal-presets button::before {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  content: "";
  background: #7b9848;
  border: 1px solid #284530;
  box-shadow: 3px -3px 0 -1px #a7cc55;
}

.pixel-home .minute-presets button::before {
  width: 5px;
  height: 11px;
  content: "";
  background: #8b5a34;
  box-shadow: 5px 0 0 #c18a4e;
}

.pixel-home .goal-presets button:hover,
.pixel-home .minute-presets button:hover,
.pixel-home .minute-presets button[aria-pressed="true"] {
  color: #172c23;
  background: #f1c75b;
  box-shadow: inset 0 0 0 2px #4a2b1c, inset 0 3px 0 #ffe9a1, inset 0 -4px 0 #b77b2f;
}

.pixel-home .primary-button {
  position: relative;
  border: 0;
  clip-path: polygon(0 8px, 8px 8px, 8px 0, calc(100% - 8px) 0, calc(100% - 8px) 8px, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 8px calc(100% - 8px), 0 calc(100% - 8px));
  box-shadow:
    inset 0 0 0 3px #3f2818,
    inset 0 5px 0 #ffe49a,
    inset 0 -6px 0 #b67b2d,
    0 5px 0 #7f4d2a,
    0 8px 0 #071b15;
}

.pixel-home .primary-button::before,
.pixel-home .primary-button::after {
  position: absolute;
  top: 50%;
  width: 6px;
  height: 6px;
  content: "";
  background: #6b4328;
  border: 1px solid #342413;
  transform: translateY(-50%);
}

.pixel-home .primary-button::before { left: 11px; }
.pixel-home .primary-button::after { right: 11px; }

.pixel-home .primary-button:hover {
  background: #f4ce62;
  box-shadow:
    inset 0 0 0 3px #3f2818,
    inset 0 5px 0 #ffecad,
    inset 0 -6px 0 #b67b2d,
    0 6px 0 #7f4d2a,
    0 9px 0 #071b15;
}

.pixel-home .primary-button:active {
  transform: translateY(5px);
  box-shadow: inset 0 0 0 3px #3f2818, inset 0 3px 0 #ffe49a, inset 0 -4px 0 #b67b2d;
}

.seed-furniture {
  position: absolute;
  z-index: 5;
  left: 0;
  bottom: 10px;
  display: grid;
  grid-template-columns: repeat(5, minmax(58px, 1fr));
  align-items: end;
  width: min(470px, 62%);
  min-height: 126px;
  padding: 0 8px 18px;
  pointer-events: auto;
}

.seed-furniture::before,
.seed-furniture::after {
  position: absolute;
  right: 0;
  bottom: 14px;
  left: 0;
  content: "";
  pointer-events: none;
  background: #70472b;
  border: 3px solid #2a1a12;
  box-shadow: inset 0 4px 0 #a56e3d, 0 5px 0 rgba(7, 27, 21, .68);
}

.seed-furniture::before { height: 18px; }
.seed-furniture::after { right: 14px; left: 14px; bottom: 0; height: 14px; background: #4f321f; }

.pixel-home .scene-prop {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: 76px auto;
  align-items: end;
  justify-items: center;
  min-width: 0;
  min-height: 112px;
  padding: 0 2px;
  color: #fff0c4;
  background: transparent;
  border: 0;
  box-shadow: none;
  text-decoration: none;
  cursor: pointer;
  transform: none;
}

.pixel-home .scene-prop:hover,
.pixel-home .scene-prop:active,
.pixel-home .scene-prop:focus-visible {
  filter: none;
  box-shadow: none;
  transform: none;
}

.scene-prop-art {
  display: block;
  width: 68px;
  height: 72px;
  overflow: hidden;
  filter: drop-shadow(3px 4px 0 rgba(7, 27, 21, .58));
  transform-origin: 50% 100%;
  transition: transform 90ms steps(2, end), filter 90ms steps(2, end);
}

.scene-prop-tutor .scene-prop-art { width: 72px; height: 76px; }
.scene-prop-reminder .scene-prop-art { width: 58px; height: 68px; }
.scene-prop-postcard .scene-prop-art { width: 62px; height: 68px; }

.scene-prop-label {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 26px;
  place-items: center;
  padding: 4px 3px;
  color: #fff0c4;
  background: #6b4328;
  border: 2px solid #2a1a12;
  box-shadow: inset 0 2px 0 #a56e3d, 2px 2px 0 rgba(7, 27, 21, .6);
  font-family: var(--pixel-font);
  font-size: 8px;
  line-height: 1.15;
  text-align: center;
}

.scene-prop-label small {
  position: absolute;
  right: -2px;
  bottom: calc(100% + 6px);
  left: -2px;
  padding: 4px;
  color: #19382f;
  background: #fff0c4;
  border: 2px solid #4a2b1c;
  box-shadow: 2px 2px 0 rgba(7, 27, 21, .62);
  font-size: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 70ms steps(1, end), transform 70ms steps(1, end);
}

.scene-prop:hover .scene-prop-art,
.scene-prop:focus-visible .scene-prop-art { filter: drop-shadow(4px 5px 0 rgba(7, 27, 21, .64)) brightness(1.08); transform: translateY(-4px); }
.scene-prop:hover .scene-prop-label small,
.scene-prop:focus-visible .scene-prop-label small { opacity: 1; transform: translateY(0); }

.scene-prop-checkin .scene-prop-art { animation: prop-leaf-sway 2.7s steps(4, end) infinite; }
.terrarium-app[data-scene-state="thinking"] .scene-prop-reminder .scene-prop-art,
.terrarium-app[data-scene-light="night"] .scene-prop-reminder .scene-prop-art { animation: prop-lamp-flicker 1.4s steps(3, end) infinite; }
.terrarium-app[data-active-prop="postcard"] .scene-prop-postcard .scene-prop-art { animation: prop-celebrate 700ms steps(4, end) infinite; }

.seed-tutor .artist-sprite { animation: tutor-idle-step 2.6s steps(4, end) infinite; }
.terrarium-app[data-scene-state="thinking"] .seed-tutor .artist-sprite { animation: tutor-thinking-step 900ms steps(3, end) infinite; }
.terrarium-app[data-scene-state="error"] .seed-tutor .artist-sprite { animation: tutor-error-step 380ms steps(2, end) 2; }

.story-note strong::after {
  display: inline-block;
  width: 6px;
  height: 10px;
  margin-left: 5px;
  content: "";
  background: #6b4328;
  animation: dialogue-cursor 900ms steps(2, end) infinite;
}

.pixel-home .dialogue-composition {
  grid-template-columns: minmax(280px, 340px) minmax(480px, 760px);
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 3vw, 38px);
  width: min(1240px, calc(100% - 48px));
}

.pixel-home .dialogue-character-column {
  min-height: 520px;
  padding: 0;
  overflow: visible;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.pixel-home .dialogue-character-column::before { display: none; }

.pixel-home .agent-tutor {
  position: relative;
  z-index: 4;
  width: min(310px, 100%);
  height: 430px;
  align-self: end;
  filter: drop-shadow(7px 8px 0 rgba(7, 27, 21, .48));
}

.dialogue-furniture {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  pointer-events: none;
}

.dialogue-furniture-item { position: absolute; display: block; overflow: hidden; filter: drop-shadow(4px 5px 0 rgba(7, 27, 21, .5)); }
.dialogue-bookcase { left: -74px; bottom: 0; width: 190px; height: 230px; }
.dialogue-lamp { right: -14px; bottom: 64px; width: 92px; height: 116px; animation: prop-lamp-flicker 1.8s steps(4, end) infinite; }
.dialogue-plant { right: 14px; bottom: 0; width: 88px; height: 92px; animation: prop-leaf-sway 2.7s steps(4, end) infinite; }

.pixel-home .dialogue-panel { min-height: 430px; padding: 30px 34px 32px; background: #f5e6ba; }

.pixel-home .speech-bubble {
  min-height: 104px;
  padding: 22px 18px 18px;
  background: #fff0c4;
  border: 0;
  clip-path: polygon(0 8px, 8px 8px, 8px 0, calc(100% - 8px) 0, calc(100% - 8px) 8px, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) calc(100% - 8px), calc(100% - 8px) 100%, 30px 100%, 18px calc(100% - 10px), 8px 100%, 8px calc(100% - 8px), 0 calc(100% - 8px));
  box-shadow: inset 0 0 0 3px #452719, inset 0 0 0 6px #d9b773;
}

.pixel-home .speech-bubble::before {
  top: 0;
  left: 14px;
  padding: 4px 9px;
  content: "培育师";
  clip-path: polygon(0 4px, 4px 4px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% 100%, 0 100%);
}

.pixel-home .speech-bubble::after { display: none; }

.pixel-home .choice-button {
  min-height: 48px;
  border: 0;
  clip-path: polygon(0 7px, 7px 7px, 7px 0, calc(100% - 7px) 0, calc(100% - 7px) 7px, 100% 7px, 100% calc(100% - 7px), calc(100% - 7px) calc(100% - 7px), calc(100% - 7px) 100%, 7px 100%, 7px calc(100% - 7px), 0 calc(100% - 7px));
  box-shadow: inset 0 0 0 2px #472a1b, inset 0 3px 0 #fff0c4, inset 0 -4px 0 #a87743;
}

.pixel-home .choice-button:hover,
.pixel-home .choice-button:focus,
.pixel-home .choice-button[aria-pressed="true"] {
  box-shadow: inset 0 0 0 2px #11362e, inset 0 3px 0 #55a696, inset 0 -4px 0 #102e28, 0 0 0 3px #63cfc4;
}

.goal-summary { display: grid; margin: 8px 0 18px; border: 2px solid #315b48; }
.summary-item { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 12px; padding: 11px; background: var(--paper-soft); border-bottom: 1px solid #c8ad70; }
.summary-item:last-child { border-bottom: 0; }
.summary-item span { color: #796848; font-size: 12px; }
.summary-item strong { min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
.confirm-button { width: 100%; }
.inline-error { min-height: 22px; margin: 10px 0 0; font-size: 12px; }

.greenhouse-view {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: calc(100vh - 76px);
  padding: 0;
  background: var(--forest-dark);
}

.greenhouse-status {
  position: relative;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(260px, 2fr) repeat(3, minmax(120px, 1fr));
  width: 100%;
  min-width: 0;
  color: var(--paper-soft);
  background: #0b2a22;
  border: 0;
  border-bottom: 2px solid #6b4328;
  box-shadow: 0 3px 0 #061712;
}

.greenhouse-status > div { display: grid; gap: 3px; min-width: 0; padding: 10px 16px; border-right: 1px solid #315447; }
.greenhouse-status > div:last-child { border-right: 0; }
.greenhouse-status span { color: #a7cc55; font-size: 10px; }
.greenhouse-status strong { overflow: hidden; color: #fff1b4; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }

.greenhouse-workspace {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) minmax(300px, 360px) 18px;
  grid-template-rows: 14px auto minmax(260px, 1fr) auto 18px;
  gap: 12px;
  width: 100%;
  min-height: calc(100vh - 132px);
  overflow: hidden;
}
.scene-toolbar {
  position: relative;
  z-index: 32;
  grid-column: 3;
  grid-row: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
  min-height: 50px;
  padding: 8px;
  color: var(--paper-soft);
  background: rgba(11, 42, 34, .9);
  border: 2px solid rgba(142, 213, 207, .38);
  box-shadow: 3px 3px 0 rgba(5, 18, 14, .66);
}
.scene-toolbar > div:first-child { display: none; }
.scene-control-groups { display: flex; align-items: center; gap: 7px; min-width: 0; }
.scene-variant-switcher, .tutor-action-switcher { display: grid; min-width: 0; border: 1px solid #071a15; box-shadow: none; }
.scene-variant-switcher { grid-template-columns: repeat(2, minmax(62px, 1fr)); }
.tutor-action-switcher { grid-template-columns: repeat(3, minmax(58px, 1fr)); }
.scene-variant-switcher button, .tutor-action-switcher button {
  min-width: 0;
  min-height: 38px;
  padding: 6px 9px;
  color: #cee0c4;
  background: #285342;
  border: 0;
  border-right: 2px solid #0b251e;
  box-shadow: none;
  cursor: pointer;
  font-size: 10px;
}
.scene-variant-switcher button:last-child, .tutor-action-switcher button:last-child { border-right: 0; }
.scene-variant-switcher button[aria-pressed="true"], .tutor-action-switcher button[aria-pressed="true"] { color: #172c23; background: var(--gold); box-shadow: inset 0 -4px 0 #a07c29; }

.scene-shell {
  position: relative;
  z-index: 0;
  grid-column: 1 / -1;
  grid-row: 1 / -1;
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: #071a15;
  border: 0;
  box-shadow: none;
}
.scene-stage {
  --scene-sky: #8ed5cf;
  --scene-frame: #173a31;
  --scene-floor: #274f3d;
  --scene-foundation: #9acb62;
  --scene-practice: #48a07b;
  --scene-sprint: #ee7d68;
  --scene-accent: #f5c84f;
  --scene-ink: #173229;
  --scene-label: #fff4c2;
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100%;
  min-height: calc(100vh - 132px);
  aspect-ratio: auto;
  overflow: hidden;
  background-color: #0b2019;
  background-image: url("/assets/pixel-greenhouse-interior.png");
  background-position: center;
  background-size: cover;
  border: 0;
  transition: filter 120ms steps(2, end);
}

.pixel-scene-effects-active .scene-stage {
  background-position:
    calc(50% + var(--pixel-scene-shift-x))
    calc(50% + var(--pixel-scene-shift-y) + var(--pixel-scene-scroll-y));
}

.pixel-scene-effects-active .scene-zone,
.pixel-scene-effects-active .scene-tutor {
  translate: var(--pixel-scene-shift-x) calc(var(--pixel-scene-shift-y) + var(--pixel-scene-scroll-y));
}

.scene-stage::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
  pointer-events: none;
  background: rgba(5, 18, 14, .03);
}

.scene-stage::after {
  position: absolute;
  z-index: 2;
  inset: 0;
  content: "";
  pointer-events: none;
  border: 6px solid rgba(7, 26, 21, .58);
}

.scene-stage[data-style-id="sunlit-citrus"] { filter: saturate(1.02) brightness(1.02); }
.scene-stage[data-style-id="rainy-neon"] { filter: saturate(.82) brightness(.68) hue-rotate(8deg); }
.scene-stage[data-style-id="rainy-neon"]::before { background: rgba(18, 54, 69, .26); }
.scene-stage[data-tutor-action="water"]::before { box-shadow: inset 0 0 0 5px rgba(123, 198, 190, .2); }
.scene-stage[data-tutor-action="encourage"]::before { box-shadow: inset 0 0 0 5px rgba(225, 187, 79, .22); }
.isometric-grid { display: none; }
.scene-loading { position: absolute; z-index: 20; inset: 50% 0 auto; color: var(--paper-soft); text-align: center; font-size: 11px; }

.scene-zone {
  position: absolute;
  z-index: var(--zone-z);
  left: var(--zone-x);
  top: var(--zone-y);
  width: var(--zone-width);
  height: var(--zone-height);
  min-width: 0;
  color: var(--scene-ink);
  pointer-events: none;
}

.zone-hit-target {
  position: absolute;
  z-index: 18;
  inset: 0;
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 0;
  pointer-events: auto;
  touch-action: manipulation;
  color: var(--paper-soft);
  background: transparent;
  border: 0;
  box-shadow: none;
  cursor: pointer;
  clip-path: polygon(0 8px, 8px 8px, 8px 0, calc(100% - 8px) 0, calc(100% - 8px) 8px, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 8px calc(100% - 8px), 0 calc(100% - 8px));
  transition: background 80ms steps(2, end), box-shadow 80ms steps(2, end);
}

.pixel-home .zone-hit-target:hover,
.pixel-home .zone-hit-target:active,
.pixel-home .zone-hit-target:focus-visible {
  filter: none;
  transform: none;
  box-shadow: inset 0 0 0 3px #ffe38a, inset 0 0 0 7px rgba(23, 58, 49, .78);
}

.scene-zone[data-selected="true"] .zone-hit-target {
  background: rgba(241, 199, 91, .08);
  box-shadow: inset 0 0 0 3px rgba(241, 199, 91, .86), inset 0 0 0 6px rgba(23, 58, 49, .6);
}

.zone-hit-target > span {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 5px 7px;
  color: #fff0c4;
  background: #6b4328;
  border: 2px solid #24170f;
  box-shadow: 2px 2px 0 rgba(7, 27, 21, .72), inset 0 2px 0 #a56e3d;
  font-family: var(--pixel-font);
  font-size: 8px;
  line-height: 1;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 70ms steps(1, end), transform 70ms steps(1, end);
}

.zone-hit-target:hover > span,
.zone-hit-target:focus-visible > span,
.scene-zone[data-selected="true"] .zone-hit-target > span { opacity: 1; transform: translateY(0); }

.zone-platform { display: none; }
.zone-template, .zone-decoration { display: none; }
.zone-growth-plant {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 86px;
  width: clamp(58px, 7vw, 100px);
  aspect-ratio: 1;
  overflow: hidden;
  filter: drop-shadow(5px 6px 0 rgba(9, 28, 22, .46));
  transform: translateX(-50%);
}

.zone-copy {
  position: absolute;
  z-index: 6;
  right: 5%;
  bottom: 22%;
  left: 5%;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 3px 8px;
  padding: 7px 8px;
  color: #1b3027;
  background: rgba(244, 232, 189, .94);
  border: 2px solid #102b24;
  box-shadow: 3px 3px 0 rgba(6, 23, 18, .58);
}
.phase-number { color: #8b3f30; font-family: var(--pixel-font); font-size: 9px; }
.current-badge { justify-self: end; padding: 2px 4px; color: #172c23; background: var(--gold); border: 1px solid #172c23; font-family: var(--pixel-font); font-size: 8px; }
.zone-copy strong { grid-column: 1 / -1; overflow: hidden; font-family: var(--pixel-font); font-size: 13px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.zone-copy small { grid-column: 1 / -1; overflow: hidden; color: #6d624c; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.growth-badge { justify-self: start; padding: 2px 4px; color: var(--paper-soft); background: #24483b; border: 2px solid #102b24; font-size: 7px; }
.zone-task { grid-column: 1 / -1; overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.zone-copy small,
.growth-badge,
.zone-task { display: none; }

.scene-tutor {
  position: absolute;
  z-index: 50;
  overflow: visible;
  pointer-events: none;
}
.scene-tutor-frame {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(5px 6px 0 rgba(6, 23, 18, .36));
  opacity: 0;
}

.scene-tutor-artist {
  position: absolute;
  z-index: 2;
  top: -38%;
  right: -58%;
  bottom: -8%;
  left: -58%;
  overflow: visible;
  filter: drop-shadow(4px 5px 0 rgba(6, 23, 18, .4));
  pointer-events: none;
}

.scene-tutor-artist .artist-sprite { animation: tutor-idle-step 2.4s steps(4, end) infinite; }
.scene-stage[data-tutor-action="water"] .scene-tutor-artist .artist-sprite { animation: tutor-thinking-step 900ms steps(3, end) infinite; }
.scene-stage[data-tutor-action="encourage"] .scene-tutor-artist .artist-sprite { animation: prop-celebrate 700ms steps(4, end) infinite; }

.scene-tutor-trigger {
  position: absolute;
  z-index: 3;
  inset: -36% -55% -10%;
  display: block;
  min-height: 44px;
  padding: 0;
  pointer-events: auto;
  touch-action: manipulation;
  color: var(--paper-soft);
  background: transparent;
  border: 0;
  box-shadow: none;
  cursor: pointer;
}

.pixel-home .scene-tutor-trigger:hover,
.pixel-home .scene-tutor-trigger:active,
.pixel-home .scene-tutor-trigger:focus-visible {
  filter: none;
  transform: none;
  box-shadow: inset 0 0 0 3px #ffe38a, inset 0 0 0 6px rgba(23, 58, 49, .68);
}

.scene-tutor-trigger::after {
  position: absolute;
  right: calc(100% + 6px);
  bottom: 10px;
  min-width: 72px;
  padding: 5px 7px;
  color: #fff0c4;
  content: "动作 · " attr(data-action-label);
  background: #6b4328;
  border: 2px solid #24170f;
  box-shadow: 2px 2px 0 rgba(7, 27, 21, .72), inset 0 2px 0 #a56e3d;
  font-family: var(--pixel-font);
  font-size: 8px;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translateX(4px);
  transition: opacity 70ms steps(1, end), transform 70ms steps(1, end);
}

.scene-tutor-trigger:hover::after,
.scene-tutor-trigger:focus-visible::after { opacity: 1; transform: translateX(0); }

.scene-tutor::before,
.scene-tutor::after {
  position: absolute;
  display: block;
  content: "";
  image-rendering: pixelated;
}

.scene-tutor::before {
  width: 7px;
  height: 7px;
  opacity: 0;
}

.scene-tutor::after {
  top: -18px;
  right: calc(100% + 8px);
  min-width: 54px;
  padding: 6px 8px;
  color: #173229;
  background: var(--paper-soft);
  border: 2px solid #102b24;
  box-shadow: 2px 2px 0 rgba(6, 23, 18, .68);
  font-size: 10px;
  line-height: 1;
  text-align: center;
}

.scene-stage[data-tutor-action="idle"] .scene-tutor::after { content: "..."; }
.scene-stage[data-tutor-action="water"] .scene-tutor::before {
  top: 36px;
  left: -28px;
  opacity: 1;
  background: #8ed5cf;
  box-shadow: 10px 8px 0 #67b7bd, 20px 18px 0 #8ed5cf, 29px 30px 0 #67b7bd;
}
.scene-stage[data-tutor-action="water"] .scene-tutor::after { color: #17464a; content: "滴答"; }
.scene-stage[data-tutor-action="encourage"] .scene-tutor::before {
  top: 16px;
  left: 58%;
  opacity: 1;
  background: var(--gold);
  box-shadow: 18px -9px 0 #fff0a3, 37px 8px 0 var(--gold), -18px 13px 0 #fff0a3, 48px 29px 0 #e59d3c;
}
.scene-stage[data-tutor-action="encourage"] .scene-tutor::after { color: #733d21; content: "加油!"; }

.phase-journey {
  position: relative;
  z-index: 34;
  grid-column: 2;
  grid-row: 4;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
  margin: 0;
  padding: 8px;
  list-style: none;
  color: var(--paper-soft);
  background: rgba(11, 42, 34, .94);
  border: 2px solid rgba(142, 213, 207, .42);
  box-shadow: 4px 4px 0 rgba(5, 18, 14, .7);
}
.phase-card {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 7px 14px 7px 9px;
  border-right: 1px solid rgba(142, 213, 207, .28);
}
.phase-card:last-child { border-right: 0; }
.phase-card::after {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: -5px;
  width: 9px;
  height: 9px;
  content: "";
  background: var(--glass);
  border: 2px solid #0b2a22;
  transform: translateY(-50%) rotate(45deg);
}
.phase-card:last-child::after { display: none; }
.phase-card:first-child { background: rgba(241, 199, 91, .1); }
.phase-art {
  width: 56px;
  height: 56px;
  padding: 3px;
  background: rgba(255, 241, 200, .92);
  border: 1px solid rgba(241, 199, 91, .64);
}
.phase-card > div:last-child { min-width: 0; }
.phase-card b { display: block; margin-bottom: 3px; color: var(--signal-gold); font-size: 10px; }
.phase-card h2 { overflow: hidden; margin: 0 0 3px; color: #fff1c8; font-size: 13px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.phase-card p { overflow: hidden; margin: 0; color: #c4d6c8; font-family: var(--body-font); font-size: 11px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.today-focus {
  position: relative;
  z-index: 34;
  grid-column: 3;
  grid-row: 4;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: auto;
  min-width: 0;
  padding: 12px;
  color: var(--ink);
  background: rgba(255, 241, 200, .97);
  border: 3px solid #173a31;
  box-shadow: 4px 4px 0 rgba(5, 18, 14, .72);
}
.today-focus span { color: #8b3f30; font-size: 10px; }
.today-focus h2 { margin: 4px 0 0; color: #173a31; font-family: var(--body-font); font-size: 13px; line-height: 1.45; }
.today-focus .primary-button { width: 100%; min-width: 0; min-height: 44px; padding: 8px 12px; font-size: 13px; }

.furniture-preview {
  position: relative;
  z-index: 34;
  grid-column: 3;
  grid-row: 3;
  align-self: end;
  display: grid;
  grid-template-columns: auto repeat(3, 56px);
  align-items: center;
  gap: 7px;
  width: 100%;
  min-width: 0;
  padding: 9px;
  color: var(--paper-soft);
  background: rgba(11, 42, 34, .86);
  border: 1px solid rgba(142, 213, 207, .34);
  box-shadow: none;
}
.preview-heading { display: grid; gap: 3px; padding-right: 6px; }
.preview-heading span { color: var(--gold); font-size: 10px; }
.preview-heading small { color: #b9c9b5; font-family: var(--body-font); font-size: 10px; }
.furniture-item { min-width: 0; width: 56px; aspect-ratio: 1; overflow: hidden; background: #e8dcad; border: 1px solid #315b48; }
.plan-result {
  position: absolute;
  z-index: 40;
  top: 96px;
  left: 18px;
  display: grid;
  gap: 5px;
  width: min(430px, calc(100% - 36px));
  padding: 12px;
  pointer-events: none;
  color: #1b3027;
  background: var(--paper);
  border: 0;
  clip-path: polygon(0 7px, 7px 7px, 7px 0, calc(100% - 7px) 0, calc(100% - 7px) 7px, 100% 7px, 100% calc(100% - 7px), calc(100% - 7px) calc(100% - 7px), calc(100% - 7px) 100%, 7px 100%, 7px calc(100% - 7px), 0 calc(100% - 7px));
  box-shadow: inset 0 0 0 3px #102b24, inset 0 0 0 6px #d0aa65;
  filter: drop-shadow(3px 4px 0 rgba(5, 18, 14, .66));
}
.plan-result[hidden] { display: none; }
.plan-result strong { font-size: 13px; }
.plan-result span { color: #6d624c; font-size: 12px; line-height: 1.55; }

:where(button, input, textarea, summary, a):focus-visible { outline: 4px solid #ffe38a; outline-offset: 3px; }
[aria-busy="true"] { cursor: wait; }

@keyframes glass-lamp-flicker {
  0%, 100% { opacity: .52; }
  40% { opacity: .7; }
  56% { opacity: .45; }
}

@keyframes vine-step-sway {
  0%, 100% { transform: rotate(-1deg); }
  50% { transform: rotate(2deg); }
}

@keyframes hotspot-pulse {
  0%, 100% { opacity: .62; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.14); }
}

@keyframes prop-leaf-sway {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-2px) rotate(2deg); }
}

@keyframes prop-lamp-flicker {
  0%, 100% { filter: drop-shadow(3px 4px 0 rgba(7, 27, 21, .58)) brightness(1); }
  50% { filter: drop-shadow(3px 4px 0 rgba(7, 27, 21, .58)) brightness(1.18); }
}

@keyframes prop-celebrate {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes tutor-idle-step {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

@keyframes tutor-thinking-step {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes tutor-error-step {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(3px); }
}

@keyframes dialogue-cursor {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.social-capture { min-width: 0; overflow: hidden; background: #071a15; }
.social-capture .app-header,
.social-capture .greenhouse-status,
.social-capture .scene-toolbar,
.social-capture .phase-journey,
.social-capture .today-focus,
.social-capture .furniture-preview,
.social-capture .plan-result,
.social-capture .scene-tutor { display: none; }
.social-capture .terrarium-app,
.social-capture .greenhouse-view,
.social-capture .greenhouse-workspace,
.social-capture .scene-shell { width: 100vw; max-width: none; height: 100vh; min-height: 0; padding: 0; margin: 0; border: 0; box-shadow: none; }
.social-capture .greenhouse-workspace { display: block; }
.social-capture .scene-stage { width: 100vw; height: 100vh; min-height: 0; aspect-ratio: auto; border: 0; }

@media (min-width: 720px) and (max-width: 1199px) {
  .app-header { grid-template-columns: auto 1fr auto; gap: 16px; padding-inline: 18px; }
  .brand-copy b { font-size: 16px; }
  .step-progress-item { font-size: 10px; }
  .seed-composition { grid-template-columns: minmax(340px, 430px) minmax(300px, 1fr); padding-inline: 24px; gap: 20px; }
  .seed-story { min-height: 540px; }
  .seed-tutor { right: -8px; bottom: 66px; width: clamp(250px, 34vw, 360px); height: clamp(340px, 48vw, 470px); }
  .seed-furniture { width: 100%; grid-template-columns: repeat(5, minmax(48px, 1fr)); }
  .scene-prop-art { width: 56px; height: 62px; }
  .scene-prop-tutor .scene-prop-art { width: 60px; height: 64px; }
  .scene-prop-reminder .scene-prop-art { width: 48px; height: 58px; }
  .scene-prop-label { font-size: 7px; }
  .story-note { top: 12%; left: 0; width: min(250px, 58%); }
  .pixel-home .dialogue-composition { grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); width: calc(100% - 32px); gap: 16px; }
  .pixel-home .dialogue-character-column { min-height: 440px; }
  .pixel-home .agent-tutor { width: 250px; height: 350px; }
  .dialogue-bookcase { left: -58px; width: 160px; height: 200px; }
  .dialogue-lamp { right: -4px; width: 76px; height: 96px; }
  .greenhouse-status { min-width: 0; grid-template-columns: minmax(180px, 1.6fr) repeat(3, minmax(86px, .8fr)); }
  .greenhouse-status > div { padding-inline: 8px; }
  .greenhouse-workspace { grid-template-columns: 14px minmax(0, 1fr) minmax(270px, 320px) 14px; gap: 10px; }
  .scene-variant-switcher { grid-template-columns: repeat(2, minmax(52px, 1fr)); }
  .tutor-action-switcher { grid-template-columns: repeat(3, minmax(50px, 1fr)); }
  .scene-stage { min-height: calc(100vh - 132px); background-position: 52% center; }
  .zone-growth-plant { bottom: 92px; width: 64px; }
  .zone-copy { padding: 7px; }
  .zone-copy strong { font-size: 11px; }
  .phase-card { grid-template-columns: 42px minmax(0, 1fr); gap: 6px; padding-inline: 7px; }
  .phase-art { width: 42px; height: 42px; }
  .phase-card h2 { font-size: 11px; }
  .phase-card p { display: none; }
  .furniture-preview { grid-template-columns: auto repeat(3, 48px); }
  .furniture-item { width: 48px; }
}

@media (max-width: 719px) {
  .app-header { grid-template-columns: 1fr auto; gap: 7px; min-height: 88px; padding: 8px 12px; }
  .brand-copy small, .service-status { display: none; }
  .brand-copy b { font-size: 15px; }
  .brand-mark { width: 32px; height: 32px; }
  .step-progress { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  .step-progress-item { gap: 5px; font-size: 10px; }
  .step-progress-item b { width: 22px; height: 22px; border-width: 2px; box-shadow: 2px 2px 0 #071a15; font-size: 9px; }
  .step-progress-item::after { height: 3px; }
  .tool-menu summary { width: 38px; height: 38px; }
  .app-view { min-height: calc(100vh - 88px); overflow: visible; }

  .seed-view, .dialogue-view { background: var(--forest-dark); }
  .scene-backdrop, .dialogue-scene { --home-scene-x: 50%; --home-scene-y: 50%; height: clamp(240px, 40vh, 390px); background-position: 50% center; }
  .scene-hotspot-layer { height: clamp(240px, 40vh, 390px); }
  .pixel-home .ambience-trigger { top: 14%; left: 72%; width: 46px; height: 46px; min-height: 46px; }
  .scene-trigger-label { display: none; }
  .hanging-vine { height: 52px; opacity: .54; }
  .seed-composition { display: block; min-height: calc(100vh - 88px); padding: calc(clamp(240px, 40vh, 390px) - 16px) 12px 28px; }
  .seed-panel { z-index: 5; width: 100%; padding: 22px 18px 24px; }
  .seed-panel h1, .dialogue-panel h1 { font-size: 30px; }
  .panel-lead { font-size: 14px; }
  label, .field-group > span:first-child { font-size: 14px; }
  input, textarea { font-size: 16px; }
  .seed-story { position: absolute; z-index: 4; top: 0; right: 0; left: 0; min-height: clamp(240px, 40vh, 390px); pointer-events: none; }
  .seed-tutor { right: -4px; bottom: 76px; width: min(210px, 58vw); height: min(250px, 31vh); filter: drop-shadow(5px 6px 0 rgba(6, 23, 18, .28)); }
  .story-note { top: 22px; left: 12px; width: min(190px, 54%); padding: 10px 12px; }
  .story-note span { font-size: 9px; }
  .story-note strong { font-size: 13px; line-height: 1.55; }
  .field-row, .choice-list { grid-template-columns: 1fr; }
  .goal-presets button { flex: 1 1 30%; padding-inline: 5px; }
  .minute-presets > span { width: 100%; }

  .seed-furniture {
    right: 8px;
    bottom: 10px;
    left: 8px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: auto;
    min-height: 66px;
    padding: 0 3px 12px;
  }
  .seed-furniture::before { bottom: 8px; height: 13px; border-width: 2px; }
  .seed-furniture::after { right: 10px; bottom: 0; left: 10px; height: 9px; border-width: 2px; }
  .pixel-home .scene-prop { grid-template-rows: 42px auto; min-height: 58px; padding-inline: 1px; }
  .scene-prop-art,
  .scene-prop-tutor .scene-prop-art,
  .scene-prop-reminder .scene-prop-art,
  .scene-prop-postcard .scene-prop-art { width: 42px; height: 44px; }
  .scene-prop-reminder .scene-prop-art { width: 36px; }
  .scene-prop-label { min-height: 18px; padding: 3px 1px; border-width: 1px; font-size: 7px; box-shadow: inset 0 1px 0 #a56e3d, 1px 1px 0 rgba(7, 27, 21, .6); }
  .scene-prop-label small { display: none; }

  .pixel-home .dialogue-composition { display: block; width: 100%; min-height: calc(100vh - 88px); padding: calc(clamp(240px, 40vh, 390px) - 16px) 12px 26px; }
  .pixel-home .dialogue-character-column { position: absolute; z-index: 4; top: 18px; right: 8px; left: auto; width: 182px; min-height: 232px; padding: 0; background: transparent; border: 0; box-shadow: none; }
  .dialogue-character-column::before { display: none; }
  .pixel-home .agent-tutor { width: 172px; height: 224px; }
  .dialogue-bookcase { display: none; }
  .dialogue-lamp { right: -2px; bottom: 24px; width: 48px; height: 62px; }
  .dialogue-plant { right: 34px; bottom: 0; width: 50px; height: 54px; }
  .pixel-home .dialogue-panel { z-index: 5; width: 100%; min-height: 0; padding: 22px 18px 24px; }
  .pixel-home .speech-bubble { min-height: 88px; padding: 18px 13px 14px; font-size: 14px; }

  .greenhouse-view { display: block; min-height: calc(100vh - 88px); }
  .greenhouse-status { width: 100%; min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .greenhouse-status > div { min-width: 0; padding: 8px 10px; border-right: 1px solid #315447; }
  .greenhouse-status > div:nth-child(n+3) { display: none; }
  .greenhouse-status span { font-size: 9px; }
  .greenhouse-status strong { font-size: 12px; }
  .greenhouse-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto clamp(240px, 40vh, 420px) auto auto;
    grid-template-areas:
      "toolbar"
      "scene"
      "journey"
      "focus";
    gap: 0;
    min-height: 0;
    overflow: visible;
  }
  .scene-toolbar { grid-area: toolbar; justify-content: stretch; min-height: 0; padding: 7px 10px; background: #0b2a22; border: 0; border-bottom: 1px solid #315447; box-shadow: none; }
  .scene-control-groups { display: grid; width: 100%; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 6px; }
  .scene-variant-switcher, .tutor-action-switcher { width: 100%; }
  .scene-variant-switcher { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tutor-action-switcher { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .scene-shell { grid-area: scene; min-height: 0; }
  .scene-stage { height: 100%; min-height: 0; background-position: 54% center; }
  .scene-stage::after { border-width: 4px; }
  .scene-zone { top: var(--zone-y); }
  .zone-growth-plant { display: block; bottom: 30px; width: 42px; }
  .zone-copy { display: none; }
  .zone-hit-target > span,
  .scene-tutor-trigger::after { display: none; }
  .phase-journey { grid-area: journey; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 6px; background: #0b2a22; border: 0; border-top: 2px solid #6b4328; border-bottom: 1px solid #315447; box-shadow: none; }
  .phase-card { grid-template-columns: 36px minmax(0, 1fr); gap: 6px; padding: 7px 6px; }
  .phase-art { width: 36px; height: 36px; padding: 2px; }
  .phase-card b { font-size: 10px; }
  .phase-card h2 { margin-bottom: 0; font-size: 11px; }
  .phase-card p { display: none; }
  .today-focus { grid-area: focus; width: auto; min-width: 0; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 12px; border: 0; border-bottom: 2px solid #6b4328; box-shadow: none; }
  .today-focus h2 { font-size: 13px; }
  .today-focus .primary-button { width: auto; min-width: 112px; min-height: 42px; padding: 7px 10px; font-size: 13px; }
  .furniture-preview { display: none; }
  .plan-result { top: 154px; left: 10px; width: calc(100% - 20px); }
}

@media (max-width: 390px) {
  .brand-lockup { gap: 7px; }
  .brand-copy b { font-size: 13px; }
  .seed-panel h1, .dialogue-panel h1 { font-size: 27px; }
  .goal-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .goal-presets button { min-width: 0; font-size: 11px; }
  .minute-presets button { flex: 1; min-width: 0; padding-inline: 4px; }
  .zone-decoration { display: none; }
  .phase-card { grid-template-columns: 30px minmax(0, 1fr); gap: 4px; padding-inline: 4px; }
  .phase-art { width: 30px; height: 30px; }
  .phase-card h2 { font-size: 11px; }
  .today-focus { grid-template-columns: minmax(0, 1fr); }
  .today-focus .primary-button { width: 100%; min-width: 0; }
}

@media (pointer: coarse) {
  .hanging-vine,
  .scene-trigger-pixel,
  .scene-prop-art,
  .seed-tutor .artist-sprite,
  .dialogue-furniture-item,
  .story-note strong::after { animation: none !important; }
}

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