@font-face {
  font-family: "MiSans";
  src: url("./assets/MiSans-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "MiSans";
  src: url("./assets/MiSans-Semibold.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light;
  --canvas: #eef1e7;
  --paper: #f8f8f0;
  --paper-raised: #fffdf8;
  --paper-deep: #eff2e8;
  --soft: #eff2e8;
  --sage: #e6edd9;
  --ink: #283d30;
  --ink-secondary: #647062;
  --ink-muted: #889286;
  --line: rgba(52, 74, 49, 0.13);
  --line-strong: rgba(52, 74, 49, 0.22);
  --brand: #42664c;
  --brand-hover: #35553e;
  --brand-soft: #e6edd9;
  --brand-ink: #2f513a;
  --apricot: #b66c47;
  --apricot-soft: #f7ebe5;
  --apricot-ink: #82462b;
  --sun: #b78a34;
  --sun-soft: #f5efd9;
  --blue: #5a7772;
  --blue-soft: #e3ece9;
  --danger: #885239;
  --danger-soft: #f7ebe5;
  --radius-control: 12px;
  --radius-surface: 20px;
  --radius-sheet: 24px;
  --shadow-surface: 0 1px 2px rgba(45, 70, 52, 0.05), 0 12px 30px rgba(45, 70, 52, 0.08);
  --shadow-sheet: 0 -1px 0 rgba(45, 70, 52, 0.06), 0 -20px 52px rgba(45, 70, 52, 0.18);
  font-family: "MiSans", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

html,
body {
  min-width: 320px;
  min-height: 100dvh;
  background: var(--canvas);
}

body,
button,
input,
select,
textarea {
  font-family: "MiSans", "Microsoft YaHei", sans-serif;
}

body {
  color: var(--ink);
}

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

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}

.prototype-shell {
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100dvh;
  background: var(--paper);
}

.prototype-rail {
  z-index: 30;
  gap: 28px;
  height: 100dvh;
  padding: 32px 24px;
  color: var(--ink);
  background: #f1f4e9;
  border-right: 1px solid var(--line);
  box-shadow: none;
}

.prototype-rail::after {
  content: none;
}

.rail-brand {
  gap: 8px;
}

.rail-brand h1 {
  color: var(--ink);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.rail-brand h1::after {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 6px;
  border-radius: 50%;
  background: #d8a23b;
  vertical-align: 0.25em;
  content: "";
}

.rail-brand p,
.rail-note p,
.rail-status p {
  color: var(--ink-secondary);
  font-size: 0.875rem;
  line-height: 1.65;
}

.rail-brand .rail-kicker,
.rail-section h2 {
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.rail-status {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-surface);
  background: var(--paper-raised);
  box-shadow: none;
}

.rail-status > div:first-child span,
.rail-status > div:first-child strong {
  color: var(--ink);
}

.rail-progress {
  background: var(--soft);
}

.rail-progress span {
  background: var(--brand);
}

.screen-index button,
.flow-actions button {
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-control);
  color: var(--ink-secondary);
  font-size: 0.875rem;
  font-weight: 400;
}

.screen-index button:hover,
.screen-index button[aria-current="page"],
.flow-actions button:hover {
  color: var(--ink);
  background: var(--sage);
}

.screen-index button[aria-current="page"]::before {
  content: none;
}

.rail-note {
  margin-top: auto;
  border-color: var(--line);
}

.prototype-stage {
  display: block;
  min-width: 0;
  min-height: 100dvh;
  padding: 0;
  background: var(--paper);
}

.mobile-device {
  width: 100%;
  height: 100dvh;
  min-height: 640px;
  overflow: hidden;
  border-radius: 0;
  background: var(--paper);
  box-shadow: none;
}

.mobile-device::after {
  content: none;
}

.app-isolate,
.app-page {
  min-height: 100%;
  background: var(--paper);
}

.app-page.has-bottom-nav {
  padding-bottom: 56px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  min-height: 80px;
  padding: 16px 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 248, 240, 0.97);
  box-shadow: none;
}

.header-copy {
  min-width: 0;
}

.header-copy::before {
  display: block;
  margin-bottom: 2px;
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  content: "一起长大";
}

.header-copy h1 {
  margin: 0;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.header-copy p {
  margin: 3px 0 0;
  color: var(--ink-secondary);
  font-size: 0.875rem;
}

.view-switcher {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  color: var(--brand);
  background: var(--paper-raised);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: none;
}

.view-switcher:hover {
  background: var(--sage);
}

.screen-content {
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: 28px 32px 80px;
}

.child-switcher {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  max-width: 420px;
  margin: 0 0 20px;
  padding: 4px;
  border: 0;
  border-radius: 16px;
  background: var(--soft);
  box-shadow: none;
}

.child-switcher button {
  min-height: 40px;
  border: 0;
  border-radius: var(--radius-control);
  color: var(--ink-secondary);
  background: transparent;
  font-size: 0.875rem;
  font-weight: 400;
}

.child-switcher button[aria-pressed="true"] {
  color: var(--brand);
  background: var(--paper-raised);
  box-shadow: inset 0 0 0 1px var(--line);
}

.workflow-sync {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 24px;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--radius-control);
  color: var(--ink-secondary);
  background: var(--soft);
  font-size: 0.875rem;
  box-shadow: none;
}

.workflow-sync::before {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--brand);
  content: "";
}

.workflow-sync span {
  flex: 1;
}

.workflow-sync button,
.section-heading button,
.schedule-reminder button {
  min-height: 36px;
  padding: 6px 9px;
  color: var(--brand);
  background: transparent;
  font-size: 0.875rem;
  font-weight: 600;
}

.section {
  margin-top: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.section-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.section-heading > p {
  color: var(--ink-secondary);
  font-size: 0.875rem;
}

.voice-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  padding: 24px;
  border: 0;
  border-radius: var(--radius-surface);
  background: var(--sage);
  box-shadow: none;
}

.voice-panel::before,
.voice-panel::after {
  content: none;
}

.voice-eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.voice-copy h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.voice-copy p {
  margin: 6px 0 0;
  color: var(--ink-secondary);
  font-size: 1rem;
  line-height: 1.65;
}

.quick-entry-actions {
  display: grid;
  width: min(100%, 342px);
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.quick-entry-actions .voice-button.is-primary {
  grid-column: 1 / -1;
  min-height: 48px;
  border: 0;
  color: #fffdf8;
  background: var(--brand);
}

.quick-entry-actions .voice-button.is-primary:hover {
  background: var(--brand-hover);
}

.voice-button-mark {
  position: relative;
  display: inline-block;
  width: 14px;
  height: 18px;
  margin-right: 8px;
  border: 2px solid currentColor;
  border-radius: 8px;
  vertical-align: -4px;
}

.voice-button-mark::before {
  position: absolute;
  right: -6px;
  bottom: -5px;
  left: -6px;
  height: 8px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 10px 10px;
  content: "";
}

.voice-button-mark::after {
  position: absolute;
  bottom: -8px;
  left: 50%;
  width: 8px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  content: "";
  transform: translateX(-50%);
}

.voice-privacy-line {
  grid-column: 1 / -1;
  margin: 2px 2px 0;
  color: var(--ink-secondary);
  font-size: 0.75rem;
  line-height: 1.55;
}

.voice-recorder {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--sage);
}

.voice-recorder > div strong,
.voice-recorder > div p {
  display: block;
  margin: 0;
}

.voice-recorder > div strong {
  color: var(--ink);
  font-size: 0.9375rem;
}

.voice-recorder > div p {
  margin-top: 3px;
  color: var(--ink-secondary);
  font-size: 0.8125rem;
  line-height: 1.55;
}

.voice-recorder-mark {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  color: #fffdf8;
  background: var(--brand);
}

.voice-recorder-mark i {
  position: relative;
  width: 12px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 8px;
}

.voice-recorder-mark i::before {
  position: absolute;
  right: -5px;
  bottom: -5px;
  left: -5px;
  height: 8px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 9px 9px;
  content: "";
}

.voice-recorder-mark i::after {
  position: absolute;
  bottom: -8px;
  left: 50%;
  width: 8px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  content: "";
  transform: translateX(-50%);
}

.voice-record-button {
  min-height: 44px;
  padding: 9px 14px;
  border: 0;
  border-radius: var(--radius-control);
  color: #fffdf8;
  background: var(--brand);
  font-weight: 600;
}

.voice-record-button:hover {
  background: var(--brand-hover);
}

.voice-record-button:disabled {
  color: var(--ink-muted);
  background: rgba(255, 253, 248, 0.62);
}

.voice-live-status {
  min-height: 22px;
  margin: 0;
  color: var(--ink-secondary);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.voice-transcript-field {
  min-height: 116px;
}

.voice-safety-note,
.voice-draft-summary {
  padding: 14px 16px;
  border-left: 3px solid var(--sun);
  border-radius: 0 var(--radius-control) var(--radius-control) 0;
  background: var(--sun-soft);
}

.voice-safety-note strong,
.voice-safety-note p,
.voice-draft-summary span,
.voice-draft-summary p {
  display: block;
  margin: 0;
}

.voice-safety-note strong,
.voice-draft-summary span {
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
}

.voice-safety-note p,
.voice-draft-summary p,
.voice-draft-summary li {
  margin-top: 4px;
  color: var(--ink-secondary);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.voice-draft-summary ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.manual-entry-button,
.voice-button,
.calendar-add-button,
.btn,
.task-action,
.handoff-action,
.care-button,
.compact-action,
.task-manage {
  border-radius: var(--radius-control);
  font-weight: 600;
  box-shadow: none;
}

.manual-entry-button,
.voice-button {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 0.875rem;
}

.manual-entry-button.is-primary,
.btn-primary,
.calendar-add-button {
  color: #fffdf8;
  background: var(--brand);
}

.quick-entry-actions .manual-entry-button.is-primary {
  color: #fffdf8;
  background: var(--brand);
  box-shadow: none;
}

.manual-entry-button.is-primary:hover,
.btn-primary:hover,
.calendar-add-button:hover {
  background: var(--brand-hover);
}

.voice-button,
.btn-secondary,
.btn-soft,
.task-action,
.handoff-action,
.compact-action,
.task-manage {
  border: 1px solid var(--line);
  color: var(--brand);
  background: var(--paper-raised);
}

.quick-entry-actions .voice-button {
  border: 1px solid var(--line);
  color: var(--brand);
  background: var(--paper-raised);
  box-shadow: none;
}

.voice-button:hover,
.btn-secondary:hover,
.btn-soft:hover,
.task-action:hover,
.handoff-action:hover,
.compact-action:hover,
.task-manage:hover {
  background: var(--sage);
}

.workflow-examples {
  margin-top: 10px;
  padding: 0 4px;
  color: var(--ink-secondary);
  font-size: 0.875rem;
}

.workflow-examples summary {
  min-height: 40px;
  color: var(--brand);
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 28px 0 0;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.summary-item {
  padding: 0 20px;
  border-right: 1px solid var(--line);
}

.summary-item:first-child {
  padding-left: 0;
}

.summary-item:last-child {
  padding-right: 0;
  border-right: 0;
}

.summary-value {
  color: var(--ink);
  font-size: 1.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.summary-label {
  margin-top: 3px;
  color: var(--ink-secondary);
  font-size: 0.875rem;
}

.notice,
.garden-rule-note,
.empty-state {
  padding: 18px 20px;
  border: 0;
  border-radius: var(--radius-surface);
  color: var(--ink);
  background: var(--soft);
  box-shadow: none;
}

.notice strong,
.garden-rule-note strong,
.empty-state h3 {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
}

.notice p,
.garden-rule-note p,
.empty-state p {
  margin: 6px 0 0;
  color: var(--ink-secondary);
  font-size: 1rem;
  line-height: 1.65;
}

.task-list,
.history-list,
.member-list,
.reward-list {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.task-row,
.history-row,
.member-row,
.reward-row {
  border-color: var(--line);
  background: transparent;
}

.task-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
}

.task-meta,
.schedule-time {
  color: var(--ink-secondary);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.task-title,
.schedule-title,
.history-title,
.member-title,
.reward-title {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
}

.task-note,
.task-state-label,
.schedule-note,
.history-note,
.member-note,
.reward-note {
  color: var(--ink-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
}

.badge {
  padding: 3px 7px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
}

.progress-block {
  margin-top: 16px;
}

.progress-meta {
  margin-bottom: 8px;
  color: var(--ink-secondary);
  font-size: 0.875rem;
}

.progress-meta strong {
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}

.progress-track,
.tree-growth-track {
  height: 7px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #dce4d6;
}

.progress-fill,
.tree-growth-track > div {
  border-radius: inherit;
  background: var(--brand);
}

.upcoming-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-surface);
  background: var(--paper-raised);
  box-shadow: none;
}

.date-tile {
  border: 0;
  border-radius: 14px;
  color: var(--brand);
  background: var(--sage);
}

.upcoming-copy h3 {
  color: var(--ink);
  font-weight: 600;
}

.upcoming-copy p {
  color: var(--ink-secondary);
  line-height: 1.6;
}

.calendar-week-heading {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.calendar-week-heading h2 {
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 600;
}

.calendar-week-heading button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  color: var(--brand);
  background: var(--paper-raised);
}

.calendar-context {
  padding: 10px 0;
  border: 0;
  background: transparent;
}

.calendar-context span {
  color: var(--ink-secondary);
}

.calendar-add-button {
  min-height: 40px;
  padding: 8px 12px;
}

.week-strip {
  gap: 4px;
  margin-top: 16px;
  padding: 4px;
  border: 0;
  border-radius: 16px;
  background: var(--soft);
  box-shadow: none;
  scrollbar-width: none;
}

.week-strip::-webkit-scrollbar {
  display: none;
}

.day-button {
  min-height: 64px;
  border: 0;
  border-radius: var(--radius-control);
  color: var(--ink-secondary);
  background: transparent;
  font-weight: 400;
}

.day-button[aria-pressed="true"] {
  color: var(--brand);
  background: var(--paper-raised);
  box-shadow: inset 0 0 0 1px var(--line);
}

.day-button strong {
  font-variant-numeric: tabular-nums;
}

.handoff-alert {
  margin-top: 20px;
  padding: 18px 20px;
  border: 0;
  border-radius: var(--radius-surface);
  color: var(--ink);
  background: var(--sun-soft);
  box-shadow: none;
}

.schedule-list {
  display: grid;
  gap: 14px;
  border: 0;
  background: transparent;
}

.schedule-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-surface);
  background: var(--paper-raised);
  box-shadow: none;
}

.schedule-row::before {
  content: none;
}

.schedule-row.has-conflict {
  border-color: rgba(136, 82, 57, 0.36);
}

.schedule-time strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
}

.schedule-place {
  margin-top: 6px;
  color: var(--ink);
  font-size: 1rem;
}

.schedule-owner,
.member-role,
.handoff-status,
.security-status,
.resource-gain {
  border-radius: 8px;
  color: var(--brand);
  background: var(--sage);
  font-size: 0.75rem;
  font-weight: 600;
}

.handoff-line {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.handoff-people {
  gap: 10px;
}

.responsibility {
  min-width: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--soft);
}

.responsibility strong {
  color: var(--ink);
  font-weight: 600;
}

.responsibility em,
.handoff-point {
  color: var(--ink-secondary);
  font-size: 0.75rem;
}

.schedule-reminder {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--ink-secondary);
  background: transparent;
}

.tree-panel,
.family-garden-panel,
.reward-panel,
.cloud-collaboration {
  border: 0;
  border-radius: var(--radius-surface);
  background: var(--soft);
  box-shadow: none;
}

.tree-panel {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(260px, 1fr);
  gap: 20px 28px;
  align-items: start;
  padding: 24px;
}

.tree-scene.uses-forest-art {
  position: relative;
  display: grid;
  grid-row: 1 / span 3;
  grid-column: 1;
  width: 100%;
  height: 340px;
  place-items: center;
  overflow: hidden;
  border-radius: 16px;
  background: var(--paper);
  isolation: isolate;
}

.tree-scene.uses-forest-art.compact {
  display: grid;
  width: 144px;
  height: 144px;
  grid-row: auto;
  grid-column: auto;
  flex: 0 0 auto;
  background: transparent;
}

.tree-sprite {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  flex-shrink: 0;
  overflow: hidden;
  mix-blend-mode: multiply;
}

.tree-sprite.is-featured {
  width: min(92%, 332px);
}

.tree-sprite.is-compact,
.tree-choice-art {
  width: 100%;
}

.tree-cutout {
  position: absolute;
  bottom: 4%;
  left: 50%;
  display: block;
  overflow: hidden;
  transform: translateX(-50%);
}

.tree-cutout > img {
  position: absolute;
  max-width: none;
  margin: 0;
  object-fit: fill;
  filter: brightness(1.06);
  pointer-events: none;
}

.tree-summary,
.tree-growth-block,
.garden-resources {
  grid-column: 2;
}

.tree-summary h2,
.family-garden-heading h2,
.reward-panel h2,
.cloud-heading h2 {
  color: var(--ink);
  font-family: "MiSans", "Microsoft YaHei", sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.tree-summary p,
.family-garden-heading p,
.reward-panel p,
.cloud-heading p {
  color: var(--ink-secondary);
  font-size: 1rem;
  line-height: 1.65;
}

.tree-stage-label,
.family-garden-heading > div > span,
.cloud-heading > div > span {
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.tree-change-button {
  min-height: 36px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  color: var(--brand);
  background: var(--paper-raised);
  font-size: 0.875rem;
}

.garden-resources {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.garden-resources > div {
  padding: 14px 10px;
  border-right: 1px solid var(--line);
}

.garden-resources > div:last-child {
  border-right: 0;
}

.garden-resources strong {
  color: var(--ink);
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
}

.garden-resources span,
.garden-resources small {
  color: var(--ink-secondary);
}

.care-actions,
.harvest-ready,
.harvest-complete {
  grid-column: 1 / -1;
}

.care-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.care-button {
  min-height: 56px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--paper-raised);
}

.care-button span {
  color: var(--ink-secondary);
}

.care-button:disabled {
  color: var(--ink-muted);
  background: rgba(255, 253, 248, 0.55);
}

.family-garden-panel {
  padding: 24px;
}

.family-garden-heading {
  gap: 20px;
}

.family-garden-heading > strong {
  color: var(--brand);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.family-garden-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.family-tree-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper-raised);
  box-shadow: none;
}

.family-tree-card:hover {
  background: var(--sage);
  transform: none;
}

.family-tree-card > span:not(.tree-scene) {
  min-width: 0;
  text-align: left;
}

.family-tree-card strong {
  color: var(--ink);
  font-weight: 600;
}

.family-tree-card small {
  color: var(--ink-secondary);
}

.tree-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tree-choice-button {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 112px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper-raised);
  box-shadow: none;
}

.tree-choice-button[aria-checked="true"] {
  border-color: var(--brand);
  background: var(--sage);
}

.tree-choice-swatch {
  display: grid;
  width: 96px;
  height: 96px;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: var(--paper);
}

.tree-choice-copy {
  min-width: 0;
  text-align: left;
}

.tree-choice-copy > span,
.tree-choice-copy small {
  color: var(--ink-secondary);
  font-size: 0.75rem;
  line-height: 1.5;
}

.tree-choice-copy strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
}

.harvest-ready,
.harvest-complete {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 16px;
  background: var(--sage);
}

.harvest-complete > div:not(.harvest-keepsake),
.harvest-ready > div {
  flex: 1;
}

.harvest-keepsake {
  display: grid;
  width: 112px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 600;
}

.harvest-keepsake .tree-sprite {
  width: 92px;
}

.reward-panel,
.cloud-collaboration {
  position: relative;
  overflow: hidden;
  padding: 24px;
}

.reward-panel::after,
.cloud-collaboration::after {
  content: none;
}

.reward-panel > * {
  position: static;
}

.reward-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.reward-progress > div {
  padding: 14px 12px;
  border-right: 1px solid var(--line);
  background: transparent;
}

.reward-progress > div:last-child {
  border-right: 0;
}

.reward-progress strong {
  color: var(--ink);
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
}

.reward-progress span {
  color: var(--ink-secondary);
  font-size: 0.75rem;
}

.cloud-collaboration {
  border: 1px solid var(--line);
  background: var(--paper-raised);
}

.cloud-collaboration.is-warning {
  border-color: rgba(136, 82, 57, 0.28);
  background: var(--apricot-soft);
}

.cloud-dot {
  border: 0;
  background: var(--brand);
  box-shadow: none;
}

.cloud-meta {
  gap: 6px;
  margin: 16px 0;
}

.cloud-meta span,
.cloud-queue-note,
.cloud-conflict-note {
  border-radius: 8px;
  color: var(--brand);
  background: var(--sage);
  font-size: 0.75rem;
  font-weight: 600;
}

.cloud-actions {
  gap: 8px;
}

.avatar {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  color: var(--brand);
  background: var(--sage);
  outline: 1px solid rgba(52, 74, 49, 0.08);
  outline-offset: -1px;
  box-shadow: none;
}

.sheet-backdrop {
  background: rgba(28, 42, 29, 0.44);
  backdrop-filter: none;
}

.sheet {
  border: 0;
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  background: var(--paper-raised);
  box-shadow: var(--shadow-sheet);
}

.sheet-header {
  padding: 18px 20px 10px;
  border: 0;
  background: var(--paper-raised);
}

.sheet-header::after {
  content: none;
}

.sheet-header h2 {
  color: var(--ink);
  font-family: "MiSans", "Microsoft YaHei", sans-serif;
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.sheet-close {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  color: var(--ink-secondary);
  background: var(--paper);
}

.sheet-body {
  padding: 10px 20px calc(24px + env(safe-area-inset-bottom));
}

.field-group,
.field,
.school-notice-form {
  gap: 16px;
}

.field > label,
.select-field > label,
.textarea-field > label,
.field-legend {
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
}

.field input,
.field select,
.field textarea,
.select-field,
.textarea-field,
.pin-field {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  color: var(--ink);
  background: var(--paper);
  font-size: 1rem;
  box-shadow: none;
}

.sheet-actions {
  gap: 8px;
  padding-top: 8px;
}

.btn {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 0.875rem;
}

.school-notice-entry,
.school-notice-record,
.school-notice-preview,
.school-notice-edit-item,
.school-notice-confirm {
  border-color: var(--line);
  border-radius: 16px;
  background: var(--paper-raised);
  box-shadow: none;
}

.school-notice-tabs {
  padding: 4px;
  border: 0;
  border-radius: 16px;
  background: var(--soft);
}

.school-notice-tabs button[aria-pressed="true"] {
  color: var(--brand);
  background: var(--paper-raised);
  box-shadow: inset 0 0 0 1px var(--line);
}

.bottom-nav {
  display: none;
}

.toast {
  border: 0;
  border-radius: var(--radius-control);
  color: #fffdf8;
  background: var(--ink);
  box-shadow: var(--shadow-surface);
}

@media (max-width: 880px) {
  .prototype-shell {
    display: block;
  }

  .prototype-rail {
    display: none;
  }

  .prototype-stage,
  .mobile-device,
  .app-isolate,
  .app-page {
    width: 100%;
    height: 100dvh;
  }

  .app-page.has-bottom-nav {
    padding-bottom: calc(84px + env(safe-area-inset-bottom));
  }

  .bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    display: flex;
    height: calc(72px + env(safe-area-inset-bottom));
    padding: 6px 12px max(8px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: var(--paper-raised);
    box-shadow: none;
  }

  .bottom-nav button {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 56px;
    flex: 1;
    align-content: center;
    justify-items: center;
    gap: 3px;
    border-radius: var(--radius-control);
    color: var(--ink-secondary);
    background: transparent;
    font-size: 0.75rem;
    font-weight: 400;
  }

  .bottom-nav button::before {
    display: block;
    width: 18px;
    height: 18px;
    background: currentColor;
    content: "";
    -webkit-mask-position: center;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-position: center;
    mask-repeat: no-repeat;
    mask-size: contain;
  }

  .bottom-nav button::after {
    content: none;
  }

  .bottom-nav button[data-screen="today"]::before {
    -webkit-mask-image: url("./assets/home.svg");
    mask-image: url("./assets/home.svg");
  }

  .bottom-nav button[data-screen="calendar"]::before {
    -webkit-mask-image: url("./assets/calendar-days.svg");
    mask-image: url("./assets/calendar-days.svg");
  }

  .bottom-nav button[data-screen="growth"]::before {
    -webkit-mask-image: url("./assets/sparkles.svg");
    mask-image: url("./assets/sparkles.svg");
  }

  .bottom-nav button[data-screen="family"]::before {
    -webkit-mask-image: url("./assets/users.svg");
    mask-image: url("./assets/users.svg");
  }

  .bottom-nav button[aria-current="page"] {
    color: var(--brand);
    background: var(--sage);
  }

  .bottom-nav .voice-nav-button {
    color: var(--brand);
    font-weight: 600;
  }

  .bottom-nav .voice-nav-button::before {
    content: none;
  }

  .bottom-nav .voice-nav-button > span {
    position: relative;
    display: block;
    width: 34px;
    height: 34px;
    margin-top: -15px;
    border: 4px solid var(--paper-raised);
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 5px 14px rgba(45, 70, 52, 0.22);
  }

  .bottom-nav .voice-nav-button > span::before {
    position: absolute;
    top: 7px;
    left: 11px;
    width: 8px;
    height: 12px;
    border: 2px solid #fffdf8;
    border-radius: 6px;
    content: "";
  }

  .bottom-nav .voice-nav-button > span::after {
    position: absolute;
    top: 11px;
    left: 8px;
    width: 14px;
    height: 10px;
    border: 2px solid #fffdf8;
    border-top: 0;
    border-radius: 0 0 8px 8px;
    content: "";
  }

  .tree-panel {
    grid-template-columns: minmax(260px, 400px) minmax(240px, 1fr);
  }
}

@media (max-width: 700px) {
  .app-header {
    min-height: 72px;
    padding: 12px 20px;
  }

  .screen-content {
    width: 100%;
    padding: 20px 20px 104px;
  }

  .view-switcher {
    min-height: 48px;
  }

  .app-page button,
  .sheet button {
    min-height: 48px;
  }

  .child-switcher {
    max-width: none;
  }

  .child-switcher button,
  .manual-entry-button,
  .voice-button,
  .calendar-add-button,
  .btn,
  .task-action,
  .handoff-action,
  .compact-action,
  .task-manage {
    min-height: 48px;
  }

  .voice-panel {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 16px;
    padding: 20px;
  }

  .quick-entry-actions {
    grid-template-columns: 1fr 1fr;
  }

  .voice-recorder {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .voice-record-button {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 48px;
  }

  .task-row {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 10px 12px;
  }

  .task-action,
  .task-manage,
  .task-row > .member-role {
    grid-column: 2;
    justify-self: start;
  }

  .calendar-week-heading {
    grid-template-columns: 48px minmax(0, 1fr) 48px;
  }

  .calendar-week-heading button {
    min-width: 48px;
    min-height: 48px;
  }

  .week-strip {
    overflow-x: auto;
  }

  .day-button {
    min-width: 48px;
    min-height: 72px;
  }

  .tree-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding: 16px;
  }

  .tree-scene.uses-forest-art,
  .tree-summary,
  .tree-growth-block,
  .garden-resources,
  .care-actions,
  .harvest-ready,
  .harvest-complete {
    grid-row: auto;
    grid-column: 1;
  }

  .tree-scene.uses-forest-art {
    height: 292px;
  }

  .family-garden-panel,
  .reward-panel,
  .cloud-collaboration {
    padding: 20px;
  }

  .family-garden-grid {
    grid-template-columns: 1fr;
  }

  .family-tree-card {
    min-height: 148px;
  }

  .tree-choice-grid {
    grid-template-columns: 1fr;
  }

  .tree-choice-button {
    min-height: 120px;
  }

  .care-actions {
    grid-template-columns: 1fr;
  }

  .care-button {
    min-height: 64px;
  }

  .harvest-ready,
  .harvest-complete {
    align-items: flex-start;
    flex-direction: column;
  }

  .harvest-ready .btn,
  .harvest-complete .btn {
    width: 100%;
  }

  .field input,
  .field select,
  .field textarea,
  .select-field,
  .textarea-field,
  .pin-field {
    font-size: 1rem;
  }
}

@media (max-width: 420px) {
  .app-header {
    gap: 10px;
    padding-inline: 16px;
  }

  .header-copy::before {
    font-size: 0.6875rem;
  }

  .header-copy h1 {
    font-size: 1.125rem;
  }

  .header-copy p,
  .view-switcher {
    font-size: 0.8125rem;
  }

  .screen-content {
    padding: 18px 16px 104px;
  }

  .voice-copy h2 {
    font-size: 1.375rem;
  }

  .summary-item {
    padding-inline: 12px;
  }

  .summary-value {
    font-size: 1.5rem;
  }

  .schedule-row {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 12px;
    padding: 16px;
  }

  .handoff-line {
    align-items: stretch;
    flex-direction: column;
  }

  .responsibility {
    padding: 9px;
  }

  .tree-scene.uses-forest-art {
    height: 260px;
  }

  .tree-sprite.is-featured {
    width: 260px;
    max-width: 100%;
  }

  .garden-resources > div {
    padding-inline: 6px;
  }

  .reward-progress > div {
    padding-inline: 6px;
  }

  .sheet-header {
    padding-inline: 16px;
  }

  .sheet-body {
    padding-inline: 16px;
  }
}

@media (max-width: 360px) {
  .app-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .view-switcher {
    max-width: 112px;
    padding-inline: 9px;
    white-space: normal;
  }

  .quick-entry-actions,
  .summary-strip {
    grid-template-columns: 1fr;
  }

  .quick-entry-actions .manual-entry-button,
  .quick-entry-actions .voice-button {
    min-height: 48px;
    font-size: 0.875rem;
  }

  .summary-strip {
    gap: 0;
    padding: 0;
  }

  .summary-item,
  .summary-item:first-child,
  .summary-item:last-child {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 12px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .summary-item:last-child {
    border-bottom: 0;
  }

  .task-row {
    grid-template-columns: 1fr;
  }

  .task-meta,
  .task-action,
  .task-manage,
  .task-row > .member-role {
    grid-column: 1;
  }

  .schedule-row {
    grid-template-columns: 1fr;
  }

  .schedule-time {
    display: flex;
    gap: 6px;
    align-items: baseline;
  }

  .tree-choice-button {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .tree-choice-swatch {
    width: 84px;
    height: 84px;
  }
}

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