:root {
  --canvas: #dcd7d0;
  --paper: #f7f4ef;
  --paper-raised: #fffdfa;
  --paper-deep: #ece8e2;
  --ink: #272127;
  --ink-secondary: #6f686b;
  --ink-muted: #9b9496;
  --line: rgba(39, 33, 39, 0.08);
  --line-strong: rgba(39, 33, 39, 0.14);
  --brand: #493842;
  --brand-hover: #3d2f37;
  --brand-soft: #e9e2e7;
  --brand-ink: #493842;
  --apricot: #c97f5f;
  --apricot-soft: #f2e2d9;
  --apricot-ink: #774634;
  --sun: #b58b48;
  --sun-soft: #f0e7d5;
  --blue: #637b82;
  --blue-soft: #e1e8e9;
  --sage: #71846f;
  --sage-soft: #e2e9df;
  --sage-ink: #425340;
  --radius-control: 12px;
  --radius-surface: 20px;
  --radius-sheet: 30px;
  --shadow-surface:
    0 0 0 1px rgba(39, 33, 39, 0.035),
    0 2px 4px -2px rgba(39, 33, 39, 0.08),
    0 14px 36px -20px rgba(39, 33, 39, 0.22);
  --shadow-sheet:
    0 0 0 1px rgba(255, 255, 255, 0.45),
    0 -10px 52px rgba(39, 33, 39, 0.18);
}

/* Cloud collaboration */
.cloud-collaboration {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--sage, #71846f) 26%, transparent);
  border-radius: 24px;
  background:
    radial-gradient(circle at 92% 0%, rgb(113 132 111 / 16%), transparent 38%),
    linear-gradient(145deg, rgb(255 255 255 / 92%), rgb(245 241 235 / 94%));
  box-shadow: 0 14px 36px rgb(73 56 66 / 8%);
}

.cloud-collaboration.is-warning {
  border-color: rgb(201 127 95 / 38%);
  background:
    radial-gradient(circle at 92% 0%, rgb(201 127 95 / 15%), transparent 38%),
    linear-gradient(145deg, rgb(255 255 255 / 94%), rgb(250 244 238 / 95%));
}

.cloud-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.cloud-heading > div > span {
  display: block;
  margin-bottom: 5px;
  color: var(--sage, #71846f);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: .12em;
}

.cloud-heading h2 {
  margin: 0;
  color: var(--ink, #342c31);
  font-family: ui-serif, "Songti SC", serif;
  font-size: 21px;
}

.cloud-heading p {
  margin: 6px 0 0;
  color: var(--muted, #786e73);
  font-size: 13px;
  line-height: 1.55;
}

.cloud-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border: 3px solid rgb(113 132 111 / 18%);
  border-radius: 50%;
  background: var(--sage, #71846f);
  box-shadow: 0 0 0 5px rgb(113 132 111 / 10%);
}

.cloud-collaboration.is-warning .cloud-dot {
  border-color: rgb(201 127 95 / 18%);
  background: #c97f5f;
  box-shadow: 0 0 0 5px rgb(201 127 95 / 10%);
}

.cloud-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 15px 0;
}

.cloud-meta span,
.cloud-queue-note,
.cloud-conflict-note {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgb(113 132 111 / 9%);
  color: #566954;
  font-size: 11px;
  font-weight: 650;
}

.cloud-queue-note,
.cloud-conflict-note {
  display: inline-block;
  margin: 0 6px 12px 0;
}

.cloud-conflict-note {
  background: rgb(201 127 95 / 12%);
  color: #9a5d45;
}

.cloud-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 15px;
}

.cloud-onboarding-grid {
  display: grid;
  gap: 16px;
}

.cloud-onboarding-card {
  padding: 16px;
  border: 1px solid rgb(73 56 66 / 10%);
  border-radius: 18px;
  background: rgb(255 255 255 / 62%);
}

fieldset.cloud-onboarding-card {
  min-width: 0;
  margin: 0;
}

fieldset.cloud-onboarding-card legend {
  padding: 0 8px;
  color: var(--ink, #342c31);
  font-family: ui-serif, "Songti SC", serif;
  font-size: 17px;
  font-weight: 700;
}

.cloud-onboarding-card > div:first-child strong {
  color: var(--ink, #342c31);
  font-size: 16px;
}

.cloud-onboarding-card > div:first-child p,
.cloud-settings-summary p {
  margin: 5px 0 0;
  color: var(--muted, #786e73);
  font-size: 12px;
  line-height: 1.5;
}

.invite-input {
  text-transform: uppercase;
  letter-spacing: .14em;
}

.cloud-settings-summary {
  margin-bottom: 14px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgb(73 56 66 / 7%), rgb(113 132 111 / 8%));
}

.cloud-settings-summary strong {
  color: var(--ink, #342c31);
  font-family: ui-serif, "Songti SC", serif;
  font-size: 20px;
}

.cloud-loading {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 32px 12px;
  color: var(--muted, #786e73);
}

.cloud-loading span {
  width: 24px;
  height: 24px;
  border: 3px solid rgb(113 132 111 / 18%);
  border-top-color: var(--sage, #71846f);
  border-radius: 50%;
  animation: cloud-spin .8s linear infinite;
}

@keyframes cloud-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 360px) {
  .cloud-actions,
  .cloud-onboarding-card .field-row {
    grid-template-columns: 1fr;
  }

  .cloud-collaboration {
    padding: 17px;
  }
}

html,
body {
  background: var(--canvas);
}

body {
  letter-spacing: -0.01em;
}

button:focus-visible,
a:focus-visible {
  outline-color: #8e6f80;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline-color: #8e6f80;
}

.prototype-shell {
  grid-template-columns: minmax(300px, 360px) minmax(460px, 1fr);
}

.prototype-rail {
  gap: 36px;
  padding: 48px 42px 36px;
  color: #f8f3ef;
  background: #2b252a;
}

.prototype-rail::after {
  position: fixed;
  bottom: -170px;
  left: -110px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  box-shadow:
    0 0 0 42px rgba(255, 255, 255, 0.018),
    0 0 0 84px rgba(255, 255, 255, 0.012);
  content: "";
  pointer-events: none;
}

.rail-brand {
  position: relative;
  gap: 14px;
  padding-top: 18px;
}

.rail-brand::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: #d3a46b;
  content: "";
}

.rail-brand h1 {
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 2.625rem;
  font-weight: 600;
  letter-spacing: -0.07em;
}

.rail-brand p,
.rail-note p {
  color: rgba(248, 243, 239, 0.62);
  line-height: 1.7;
}

.rail-brand .rail-kicker,
.rail-section h2 {
  color: rgba(248, 243, 239, 0.44);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
}

.rail-status {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06);
}

.rail-status > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.rail-status span,
.rail-status p {
  margin: 0;
  color: rgba(248, 243, 239, 0.58);
  font-size: 0.75rem;
  line-height: 1.5;
}

.rail-status strong {
  color: #f8f3ef;
  font-size: 1.125rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.rail-progress {
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.rail-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #d3a46b;
}

.screen-index,
.flow-actions {
  gap: 6px;
}

.screen-index button,
.flow-actions button {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  color: rgba(248, 243, 239, 0.62);
}

.screen-index button:hover,
.screen-index button[aria-current="page"],
.flow-actions button:hover {
  color: #f8f3ef;
  background: rgba(255, 255, 255, 0.065);
}

.screen-index button[aria-current="page"]::before {
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: #d3a46b;
}

.rail-note {
  margin-top: auto;
  border-top-color: rgba(255, 255, 255, 0.08);
}

.prototype-stage {
  padding: 28px;
  background:
    radial-gradient(circle at 72% 20%, rgba(255, 255, 255, 0.58), transparent 36%),
    var(--canvas);
}

.mobile-device {
  width: min(100%, 438px);
  height: min(884px, calc(100dvh - 56px));
  min-height: min(700px, calc(100dvh - 56px));
  border-radius: 34px;
  background: var(--paper);
  box-shadow:
    0 0 0 1px rgba(39, 33, 39, 0.08),
    0 2px 3px rgba(39, 33, 39, 0.06),
    0 32px 80px -30px rgba(39, 33, 39, 0.34);
}

.mobile-device::after {
  position: absolute;
  z-index: 80;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.app-page {
  background: var(--paper);
}

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

.app-header {
  min-height: 82px;
  padding: max(18px, env(safe-area-inset-top)) 22px 12px;
  background: rgba(247, 244, 239, 0.82);
  backdrop-filter: blur(24px) saturate(165%);
}

.header-copy {
  display: grid;
  gap: 3px;
}

.header-copy h1 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.045em;
}

.header-copy p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.75rem;
  letter-spacing: 0.015em;
}

.view-switcher {
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--brand-ink);
  background: rgba(73, 56, 66, 0.08);
  box-shadow: inset 0 0 0 1px rgba(73, 56, 66, 0.06);
  font-size: 0.75rem;
}

.view-switcher::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--apricot);
  box-shadow: 0 0 0 3px rgba(201, 127, 95, 0.13);
  content: "";
  vertical-align: 1px;
}

.screen-content {
  gap: 32px;
  padding: 10px 22px 36px;
}

.child-switcher {
  gap: 2px;
  padding: 3px;
  border-radius: 14px;
  background: rgba(39, 33, 39, 0.055);
  box-shadow: inset 0 1px 2px rgba(39, 33, 39, 0.035);
}

.child-switcher button {
  min-height: 44px;
  border-radius: 11px;
  color: var(--ink-muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

.child-switcher button[aria-pressed="true"] {
  color: var(--ink);
  background: var(--paper-raised);
  box-shadow:
    0 0 0 1px rgba(39, 33, 39, 0.025),
    0 3px 10px rgba(39, 33, 39, 0.07);
}

.section {
  gap: 14px;
}

.section-heading {
  align-items: center;
}

.section-heading h2 {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.section-heading p,
.section-heading button {
  color: var(--ink-muted);
  font-size: 0.75rem;
}

.section-heading button {
  min-height: 44px;
  padding: 0 6px;
  color: var(--brand-ink);
  font-weight: 600;
}

.voice-panel {
  position: relative;
  gap: 18px;
  padding: 22px;
  overflow: hidden;
  border-radius: 24px;
  color: #fbf7f2;
  background: var(--brand);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 2px 4px -2px rgba(39, 33, 39, 0.22),
    0 20px 38px -24px rgba(73, 56, 66, 0.72);
}

.voice-panel::after {
  position: absolute;
  top: -58px;
  right: -54px;
  width: 160px;
  height: 160px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 50%;
  box-shadow: 0 0 0 24px rgba(255, 255, 255, 0.025);
  content: "";
  pointer-events: none;
}

.voice-copy {
  position: relative;
  z-index: 1;
}

.voice-eyebrow {
  display: block;
  margin-bottom: 8px;
  color: #d8b884;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.voice-copy h2 {
  font-size: 1.1875rem;
  letter-spacing: -0.025em;
}

.voice-copy p {
  margin-top: 7px;
  max-width: 25ch;
  color: rgba(251, 247, 242, 0.68);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.voice-button {
  position: relative;
  z-index: 1;
  min-height: 40px;
  padding: 0 13px;
  border-radius: 12px;
  color: var(--brand);
  background: #fbf7f2;
  box-shadow: 0 6px 18px rgba(25, 19, 23, 0.15);
  font-size: 0.8125rem;
}

.quick-entry-actions {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  min-width: 98px;
}

.quick-entry-actions .voice-button,
.homework-entry-button,
.manual-entry-button {
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.quick-entry-actions .voice-button,
.manual-entry-button {
  color: rgba(251, 247, 242, 0.86);
  background: rgba(255, 255, 255, 0.075);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.13);
}

.homework-entry-button {
  color: var(--brand);
  background: #fbf7f2;
  box-shadow: 0 6px 18px rgba(25, 19, 23, 0.15);
}

.quick-entry-actions .voice-button:hover,
.manual-entry-button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.homework-entry-button:hover {
  background: #fffdfa;
}

.summary-strip {
  padding: 2px 0 0;
}

.summary-item {
  padding: 0 18px;
  border-left-color: var(--line);
}

.summary-value {
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 1.625rem;
  font-weight: 500;
  letter-spacing: -0.06em;
}

.summary-label {
  margin-top: 5px;
  color: var(--ink-muted);
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
}

.notice {
  gap: 5px;
  padding: 14px 16px;
  border-radius: 16px;
  color: var(--apricot-ink);
  background: var(--apricot-soft);
  box-shadow: inset 3px 0 var(--apricot);
}

.notice strong {
  font-size: 0.8125rem;
}

.notice p {
  color: rgba(119, 70, 52, 0.75);
  font-size: 0.8125rem;
}

.task-list,
.schedule-list,
.member-list,
.reward-list,
.history-list {
  padding: 0 16px;
  border-radius: 18px;
  background: var(--paper-raised);
  box-shadow: var(--shadow-surface);
}

.task-row,
.schedule-row,
.member-row,
.reward-row,
.history-row {
  gap: 13px;
  padding: 15px 0;
  border-top-color: var(--line);
}

.task-row:first-child,
.schedule-row:first-child,
.member-row:first-child,
.reward-row:first-child,
.history-row:first-child {
  padding-top: 15px;
}

.task-row:last-child,
.schedule-row:last-child,
.member-row:last-child,
.reward-row:last-child,
.history-row:last-child {
  padding-bottom: 15px;
}

.task-meta,
.schedule-time {
  width: 44px;
  flex-basis: 44px;
  color: var(--ink-muted);
  font-size: 0.6875rem;
}

.task-title,
.schedule-title,
.member-title,
.reward-title,
.history-title {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.5;
}

.task-title {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.task-note,
.schedule-note,
.member-note,
.reward-note,
.history-note {
  margin-top: 4px;
  color: var(--ink-secondary);
  font-size: 0.8125rem;
  line-height: 1.55;
}

.badge,
.schedule-owner {
  padding: 3px 7px;
  color: var(--sage-ink);
  background: var(--sage-soft);
  font-size: 0.625rem;
  letter-spacing: 0.02em;
}

.badge.chore {
  color: var(--apricot-ink);
  background: var(--apricot-soft);
}

.badge.sport {
  color: #435960;
  background: var(--blue-soft);
}

.badge.family {
  color: #6d5327;
  background: var(--sun-soft);
}

.task-action {
  min-height: 44px;
  padding: 0 10px;
  border-radius: 10px;
  color: var(--brand-ink);
  background: var(--brand-soft);
  font-size: 0.75rem;
}

.task-action:disabled {
  color: var(--ink-muted);
  background: var(--paper-deep);
}

.member-role {
  color: var(--ink-muted);
  font-size: 0.6875rem;
  line-height: 1.5;
}

.energy-inline {
  color: var(--apricot);
}

.progress-block {
  gap: 10px;
}

.progress-meta p,
.progress-meta strong {
  font-size: 0.75rem;
}

.progress-meta p {
  color: var(--ink-muted);
}

.progress-track {
  height: 5px;
  background: rgba(39, 33, 39, 0.07);
}

.progress-fill {
  background: var(--sage);
}

.upcoming-panel {
  gap: 16px;
  padding: 16px;
  border-radius: 18px;
  background: var(--paper-raised);
  box-shadow: var(--shadow-surface);
}

.date-tile {
  width: 50px;
  height: 56px;
  border-radius: 13px;
  color: #fffaf5;
  background: var(--apricot);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.22);
}

.date-tile strong {
  font-size: 1.125rem;
  font-weight: 500;
}

.date-tile span {
  color: rgba(255, 250, 245, 0.74);
}

.upcoming-copy h3 {
  font-size: 0.9375rem;
}

.upcoming-copy p {
  font-size: 0.8125rem;
}

.upcoming-copy .upcoming-handoff {
  margin-top: 3px;
  color: var(--brand-ink);
  font-size: 0.75rem;
  font-weight: 600;
}

.bottom-nav {
  right: 12px;
  bottom: max(10px, env(safe-area-inset-bottom));
  left: 12px;
  gap: 2px;
  padding: 5px;
  border: 0;
  border-radius: 18px;
  background: rgba(255, 253, 250, 0.82);
  box-shadow:
    0 0 0 1px rgba(39, 33, 39, 0.045),
    0 12px 36px rgba(39, 33, 39, 0.13);
  backdrop-filter: blur(24px) saturate(170%);
}

.bottom-nav button {
  min-height: 46px;
  border-radius: 13px;
  color: var(--ink-muted);
  font-size: 0.6875rem;
  letter-spacing: 0.03em;
}

.bottom-nav button[aria-current="page"] {
  color: var(--brand-ink);
  background: rgba(73, 56, 66, 0.085);
}

.bottom-nav button[aria-current="page"]::before {
  position: absolute;
  right: 17px;
  bottom: 7px;
  left: 17px;
  height: 2px;
  border-radius: 2px;
  background: var(--apricot);
  content: "";
}

.week-strip {
  gap: 3px;
  padding: 5px;
  border-radius: 18px;
  background: var(--paper-raised);
  box-shadow: var(--shadow-surface);
}

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

.calendar-week-heading h2 {
  margin: 0;
  font-size: 1rem;
  text-align: center;
}

.calendar-week-heading button {
  min-width: 44px;
  min-height: 44px;
  border-radius: 13px;
  color: var(--brand-ink);
  background: var(--paper-raised);
  box-shadow: var(--shadow-surface);
  font-size: 1.5rem;
}

.calendar-add-button {
  min-height: 44px;
  border-radius: 13px;
  color: var(--brand-ink);
  background: var(--brand-soft);
  font-size: 0.8125rem;
  font-weight: 700;
}

.day-button {
  min-height: 58px;
  border-radius: 13px;
  color: var(--ink-muted);
}

.day-button span {
  font-size: 0.625rem;
}

.day-button strong {
  font-size: 0.8125rem;
}

.day-button[aria-pressed="true"] {
  color: #fffaf5;
  background: var(--brand);
  box-shadow: 0 7px 16px rgba(73, 56, 66, 0.2);
}

.schedule-list {
  position: relative;
}

.schedule-row {
  position: relative;
}

.schedule-row.has-conflict {
  margin: 0 -8px;
  padding-right: 8px;
  padding-left: 8px;
  border-radius: 14px;
  background: #fff6ed;
}

.schedule-row::before {
  position: absolute;
  top: 21px;
  left: 49px;
  width: 6px;
  height: 6px;
  border: 2px solid var(--paper-raised);
  border-radius: 50%;
  background: var(--apricot);
  box-shadow: 0 0 0 1px rgba(201, 127, 95, 0.22);
  content: "";
}

.schedule-row .schedule-content {
  padding-left: 4px;
}

.schedule-time span {
  display: block;
  margin-top: 2px;
}

.schedule-place {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.schedule-reminder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
}

.schedule-reminder span {
  color: var(--ink-muted);
  font-size: 0.6875rem;
}

.schedule-reminder button {
  min-height: 44px;
  flex: 0 0 auto;
  padding: 0 10px;
  border-radius: 11px;
  color: var(--brand-ink);
  background: var(--brand-soft);
  font-size: 0.6875rem;
  font-weight: 700;
}

.conflict-notice {
  background: #fff2e7;
  box-shadow: inset 3px 0 #c56d54;
}

.handoff-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 16px;
  border-radius: 17px;
  color: var(--brand-ink);
  background: var(--brand-soft);
  box-shadow: inset 3px 0 var(--brand);
}

.handoff-alert > div {
  min-width: 0;
}

.handoff-alert strong,
.handoff-alert p {
  margin: 0;
}

.handoff-alert strong {
  font-size: 0.8125rem;
  font-weight: 600;
}

.handoff-alert p {
  margin-top: 4px;
  color: rgba(73, 56, 66, 0.7);
  font-size: 0.75rem;
  line-height: 1.5;
}

.handoff-alert button,
.handoff-action {
  position: relative;
  min-height: 44px;
  flex: 0 0 auto;
  padding: 0 10px;
  border-radius: 10px;
  color: var(--brand-ink);
  background: var(--paper-raised);
  box-shadow: 0 0 0 1px rgba(73, 56, 66, 0.1);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.handoff-alert button::after,
.handoff-action::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100%, 48px);
  height: 48px;
  transform: translate(-50%, -50%);
  content: "";
}

.handoff-line {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(73, 56, 66, 0.055);
}

.handoff-route {
  min-width: 0;
  flex: 1;
}

.handoff-people {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.handoff-point {
  color: var(--ink-muted);
  font-size: 0.6875rem;
}

.responsibility {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 1px 5px;
}

.responsibility small {
  color: var(--ink-muted);
  font-size: 0.625rem;
}

.responsibility strong {
  min-width: 0;
  overflow: hidden;
  color: var(--brand-ink);
  font-size: 0.75rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.responsibility em {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 4px;
  color: var(--sage-ink);
  font-size: 0.625rem;
  font-style: normal;
}

.responsibility em::before {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: var(--sage);
  content: "";
}

.responsibility.pending em {
  color: var(--apricot-ink);
}

.responsibility.pending em::before {
  background: var(--apricot);
}

.handoff-people i {
  color: var(--apricot);
  font-size: 0.75rem;
  font-style: normal;
}

.handoff-point {
  margin: 3px 0 0;
  overflow: hidden;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.handoff-status {
  flex: 0 0 auto;
  color: var(--ink-muted);
  font-size: 0.6875rem;
}

.handoff-status.pending {
  color: var(--apricot-ink);
}

.handoff-status.completed,
.handoff-status.confirmed {
  color: var(--sage-ink);
}

.empty-state {
  padding: 30px 20px;
  border-radius: 18px;
  background: var(--paper-deep);
}

.pet-panel {
  gap: 18px;
  padding: 12px 12px 18px;
  border-radius: 24px;
  background: var(--paper-raised);
  box-shadow: var(--shadow-surface);
}

.pet-panel.away {
  background: var(--paper-raised);
}

.pet-scene {
  min-height: 236px;
  border-radius: 18px;
  background: #dfe7dc;
  box-shadow: inset 0 0 0 1px rgba(66, 83, 64, 0.04);
}

.pet-scene::before {
  position: absolute;
  top: 28px;
  right: 30px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 253, 247, 0.58);
  box-shadow:
    -238px 42px 0 -23px rgba(255, 253, 247, 0.45),
    -46px 104px 0 -25px rgba(255, 253, 247, 0.38);
  content: "";
}

.pet-scene::after {
  right: -10%;
  bottom: -58px;
  left: -10%;
  height: 120px;
  background: #a8b9a2;
}

.pet {
  transform: translateY(4px);
  filter: drop-shadow(0 10px 8px rgba(66, 83, 64, 0.12));
}

.pet-body,
.pet-head,
.pet-head::before,
.pet-head::after,
.pet-tail {
  background-color: #c97f5f;
}

.pet-head {
  background-color: #d9906f;
}

.pet-face {
  top: 39px;
  left: 52px;
  width: 6px;
  height: 6px;
  border: 0;
  border-radius: 50%;
  background: #493842;
  box-shadow: 24px 0 0 #493842;
}

.pet-face::after {
  top: 8px;
  left: 10px;
  width: 10px;
  height: 6px;
  border-bottom: 2px solid #493842;
  border-radius: 0 0 10px 10px;
}

.pet-shadow {
  background: rgba(66, 83, 64, 0.13);
  filter: blur(2px);
}

.pet-away-card {
  max-width: 260px;
  padding: 20px;
  border-radius: 16px;
  background: rgba(255, 253, 250, 0.92);
  box-shadow:
    0 0 0 1px rgba(39, 33, 39, 0.04),
    0 16px 32px rgba(39, 33, 39, 0.11);
  transform: rotate(-0.6deg);
}

.pet-summary,
.action-row {
  padding: 0 8px;
}

.pet-summary h2,
.reward-panel h2 {
  font-size: 1.0625rem;
  letter-spacing: -0.025em;
}

.pet-summary p,
.reward-panel p {
  font-size: 0.8125rem;
}

.energy-count {
  color: var(--apricot);
  font-size: 1.0625rem;
}

.tree-panel {
  display: grid;
  gap: 18px;
  padding: 12px 12px 18px;
  border-radius: 24px;
  background: var(--paper-raised);
  box-shadow: var(--shadow-surface);
}

.tree-scene {
  --tree-leaf: #71846f;
  --tree-leaf-light: #8ea08a;
  --tree-accent: #bd5e4c;
  --tree-accent-light: #e7b9a8;
  position: relative;
  min-height: 246px;
  overflow: hidden;
  border-radius: 18px;
  background: #e4ebe2;
  box-shadow: inset 0 0 0 1px rgba(66, 83, 64, 0.045);
  isolation: isolate;
}

.tree-orange {
  --tree-leaf: #637b63;
  --tree-leaf-light: #82957b;
  --tree-accent: #d08043;
  --tree-accent-light: #edc08f;
}

.tree-peach {
  --tree-leaf: #72866f;
  --tree-leaf-light: #91a18d;
  --tree-accent: #c97f78;
  --tree-accent-light: #edc5bf;
}

.tree-cherry {
  --tree-leaf: #778678;
  --tree-leaf-light: #94a093;
  --tree-accent: #cc96a0;
  --tree-accent-light: #efd4d8;
}

.tree-ginkgo {
  --tree-leaf: #a18d4f;
  --tree-leaf-light: #b6a76d;
  --tree-accent: #d1aa48;
  --tree-accent-light: #ead79b;
}

.tree-starlight {
  --tree-leaf: #68778c;
  --tree-leaf-light: #8795aa;
  --tree-accent: #8b789f;
  --tree-accent-light: #c8bdd3;
  background: #dfe5e8;
}

.garden-sun {
  position: absolute;
  top: 24px;
  right: 28px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #f2dfaa;
  box-shadow: 0 0 0 10px rgba(242, 223, 170, 0.2);
}

.garden-cloud {
  position: absolute;
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 253, 250, 0.58);
}

.garden-cloud::before,
.garden-cloud::after {
  position: absolute;
  bottom: 0;
  border-radius: 50%;
  background: inherit;
  content: "";
}

.garden-cloud::before {
  left: 9px;
  width: 19px;
  height: 19px;
}

.garden-cloud::after {
  right: 9px;
  width: 13px;
  height: 13px;
}

.cloud-one {
  top: 58px;
  left: 25px;
  width: 62px;
}

.cloud-two {
  top: 105px;
  right: 20px;
  width: 40px;
  opacity: 0.6;
  transform: scale(0.72);
}

.garden-ground {
  position: absolute;
  right: -8%;
  bottom: -48px;
  left: -8%;
  height: 108px;
  border-radius: 50% 50% 0 0;
  background: #aabca4;
  box-shadow: inset 0 10px 20px rgba(255, 255, 255, 0.12);
  z-index: -1;
}

.tree-plant {
  position: absolute;
  bottom: 35px;
  left: 50%;
  width: 178px;
  height: 178px;
  transform: translateX(-50%);
  transform-origin: 50% 100%;
}

.tree-seed,
.tree-sprout,
.tree-form {
  display: none;
  position: absolute;
  bottom: 0;
  left: 50%;
}

.stage-0 .tree-seed {
  display: block;
  width: 22px;
  height: 15px;
  border-radius: 60% 40% 58% 42%;
  background: #8a6a4b;
  box-shadow: 0 10px 0 -5px rgba(77, 65, 53, 0.18);
  transform: translateX(-50%) rotate(-10deg);
}

.stage-1 .tree-sprout {
  display: block;
  width: 54px;
  height: 74px;
  transform: translateX(-50%);
}

.tree-sprout .sprout-stem {
  position: absolute;
  bottom: 0;
  left: 26px;
  width: 4px;
  height: 55px;
  border-radius: 4px;
  background: #62745e;
}

.tree-sprout .sprout-leaf {
  position: absolute;
  top: 17px;
  width: 27px;
  height: 15px;
  border-radius: 85% 15% 85% 15%;
  background: var(--tree-leaf);
}

.tree-sprout .leaf-left {
  left: 2px;
  transform: rotate(20deg);
}

.tree-sprout .leaf-right {
  right: 0;
  border-radius: 15% 85% 15% 85%;
  transform: rotate(-16deg);
}

.stage-2 .tree-form,
.stage-3 .tree-form,
.stage-4 .tree-form {
  display: block;
}

.tree-form {
  width: 172px;
  height: 178px;
  transform: translateX(-50%);
  transform-origin: 50% 100%;
  filter: drop-shadow(0 9px 7px rgba(66, 83, 64, 0.12));
  transition: transform 280ms ease;
}

.stage-2 .tree-form {
  transform: translateX(-50%) scale(0.66);
}

.stage-3 .tree-form {
  transform: translateX(-50%) scale(0.86);
}

.tree-trunk {
  position: absolute;
  bottom: 0;
  left: 75px;
  width: 24px;
  height: 90px;
  border-radius: 14px 14px 7px 7px;
  background: #98765a;
  box-shadow: inset -7px 0 rgba(91, 68, 51, 0.11);
}

.tree-trunk::before,
.tree-trunk::after {
  position: absolute;
  top: 18px;
  width: 36px;
  height: 9px;
  border-radius: 9px;
  background: inherit;
  content: "";
  z-index: -1;
}

.tree-trunk::before {
  left: -22px;
  transform: rotate(35deg);
}

.tree-trunk::after {
  right: -22px;
  transform: rotate(-35deg);
}

.tree-crown {
  position: absolute;
  border-radius: 50%;
  background: var(--tree-leaf);
  box-shadow:
    inset -7px -9px rgba(47, 66, 46, 0.055),
    inset 5px 6px rgba(255, 255, 255, 0.045);
  animation: tree-crown-breathe 4.4s ease-in-out infinite;
}

.crown-one {
  top: 25px;
  left: 45px;
  width: 84px;
  height: 82px;
}

.crown-two {
  top: 57px;
  left: 13px;
  width: 78px;
  height: 70px;
  background: var(--tree-leaf-light);
  animation-delay: -1.1s;
}

.crown-three {
  top: 58px;
  right: 8px;
  width: 80px;
  height: 72px;
  animation-delay: -2.2s;
}

.crown-four {
  top: 12px;
  left: 67px;
  width: 60px;
  height: 60px;
  background: var(--tree-leaf-light);
  animation-delay: -3.2s;
}

.tree-face {
  position: absolute;
  top: 72px;
  left: 64px;
  width: 47px;
  height: 33px;
  border-radius: 44% 44% 52% 52%;
  background: rgba(255, 253, 250, 0.1);
  z-index: 4;
}

.tree-eye {
  position: absolute;
  top: 9px;
  width: 5px;
  height: 7px;
  border-radius: 50%;
  background: rgba(50, 47, 48, 0.76);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.36);
  transform-origin: 50% 70%;
  animation: tree-blink 5.2s ease-in-out infinite;
}

.tree-eye.eye-left {
  left: 11px;
}

.tree-eye.eye-right {
  right: 11px;
}

.tree-cheek {
  position: absolute;
  top: 18px;
  width: 8px;
  height: 4px;
  border-radius: 50%;
  background: rgba(222, 151, 147, 0.58);
}

.tree-cheek.cheek-left {
  left: 4px;
}

.tree-cheek.cheek-right {
  right: 4px;
}

.tree-smile {
  position: absolute;
  top: 17px;
  left: 19px;
  width: 10px;
  height: 6px;
  border-bottom: 2px solid rgba(50, 47, 48, 0.68);
  border-radius: 0 0 9px 9px;
}

@keyframes tree-crown-breathe {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-2px) scale(1.018);
  }
}

@keyframes tree-blink {
  0%,
  43%,
  47%,
  100% {
    transform: scaleY(1);
  }

  45% {
    transform: scaleY(0.12);
  }
}

.tree-bloom,
.tree-fruit {
  display: none;
  position: absolute;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--tree-accent-light);
  box-shadow: 0 0 0 4px rgba(255, 253, 250, 0.34);
}

.stage-3 .tree-bloom,
.stage-4 .tree-fruit {
  display: block;
}

.tree-fruit {
  width: 15px;
  height: 15px;
  background: var(--tree-accent);
  box-shadow: inset -3px -3px rgba(75, 47, 44, 0.09);
}

.tree-fruit::before {
  position: absolute;
  top: -4px;
  left: 7px;
  width: 5px;
  height: 5px;
  border-radius: 5px 0 5px 0;
  background: var(--tree-leaf);
  content: "";
  transform: rotate(-28deg);
}

.bloom-one,
.fruit-one {
  top: 54px;
  left: 40px;
}

.bloom-two,
.fruit-two {
  top: 38px;
  right: 43px;
}

.bloom-three,
.fruit-three {
  top: 97px;
  left: 30px;
}

.fruit-four {
  top: 73px;
  right: 19px;
}

/* Each tree keeps the same friendly face while developing its own silhouette. */
.tree-apple .tree-bloom {
  width: 8px;
  height: 8px;
  background: #e5a89f;
  box-shadow:
    -5px 0 0 -1px #f2d3cd,
    5px 0 0 -1px #f2d3cd,
    0 -5px 0 -1px #f5ddd7,
    0 5px 0 -1px #f5ddd7;
}

.tree-apple .tree-fruit {
  width: 16px;
  height: 16px;
  border-radius: 48% 52% 55% 45%;
  background: #ba5849;
}

.tree-orange {
  background: #e7ebdf;
}

.tree-orange .crown-one {
  top: 29px;
  left: 39px;
  width: 96px;
  height: 78px;
}

.tree-orange .crown-two {
  top: 55px;
  left: 9px;
  width: 84px;
  height: 74px;
}

.tree-orange .crown-three {
  top: 55px;
  right: 4px;
  width: 88px;
  height: 74px;
}

.tree-orange .tree-bloom {
  width: 7px;
  height: 7px;
  background: #e7c792;
  box-shadow:
    -5px 0 0 -1px #f4ead7,
    5px 0 0 -1px #f4ead7,
    0 -5px 0 -1px #f7efe2,
    0 5px 0 -1px #f7efe2;
}

.tree-orange .tree-fruit {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #ce7c3d;
  box-shadow:
    inset -3px -3px rgba(114, 61, 28, 0.11),
    0 0 0 2px rgba(255, 245, 224, 0.24);
}

.tree-peach {
  background: #eee8df;
}

.tree-peach .crown-one {
  top: 36px;
  left: 36px;
  width: 103px;
  height: 70px;
}

.tree-peach .crown-two {
  top: 58px;
  left: 3px;
  width: 93px;
  height: 69px;
}

.tree-peach .crown-three {
  top: 59px;
  right: 0;
  width: 93px;
  height: 68px;
}

.tree-peach .crown-four {
  top: 20px;
  left: 55px;
  width: 72px;
  height: 62px;
}

.tree-peach .tree-bloom {
  width: 9px;
  height: 9px;
  background: #c97876;
  box-shadow:
    -6px 0 0 -1px #edc1bc,
    6px 0 0 -1px #edc1bc,
    0 -6px 0 -1px #f2d0cb,
    0 6px 0 -1px #f2d0cb;
}

.tree-peach .tree-fruit {
  width: 18px;
  height: 17px;
  border-radius: 48% 48% 55% 55%;
  background: #d4897f;
  box-shadow:
    inset -5px -2px rgba(142, 80, 74, 0.09),
    inset 5px 0 rgba(255, 221, 207, 0.13);
}

.tree-cherry {
  background: #eee4e4;
}

.tree-cherry .garden-ground {
  background: #b8b5a6;
}

.tree-cherry .tree-trunk {
  left: 77px;
  width: 20px;
  height: 94px;
  background: #947061;
}

.tree-cherry .crown-one {
  top: 37px;
  left: 30px;
  width: 113px;
  height: 61px;
  border-radius: 54% 54% 42% 42%;
}

.tree-cherry .crown-two {
  top: 54px;
  left: 0;
  width: 99px;
  height: 66px;
  border-radius: 58% 44% 48% 50%;
}

.tree-cherry .crown-three {
  top: 54px;
  right: -1px;
  width: 99px;
  height: 66px;
  border-radius: 44% 58% 50% 48%;
}

.tree-cherry .crown-four {
  top: 21px;
  left: 59px;
  width: 64px;
  height: 52px;
}

.tree-cherry .tree-bloom {
  width: 8px;
  height: 8px;
  border-radius: 70% 30% 70% 30%;
  background: #f5dce0;
  box-shadow:
    -16px 8px 0 -1px #eabfc7,
    16px 10px 0 -1px #efd0d5,
    -8px -10px 0 -1px #f3d8dc,
    9px -13px 0 -1px #e7b7c1;
  transform: rotate(34deg);
}

.tree-cherry.stage-4 .tree-bloom {
  display: block;
}

.tree-cherry.stage-4 .tree-fruit {
  display: none;
}

.tree-cherry .bloom-three {
  animation: cherry-petal-drift 4.8s ease-in-out infinite;
}

.tree-ginkgo {
  background: #eee9d5;
}

.tree-ginkgo .garden-ground {
  background: #bbb48c;
}

.tree-ginkgo .tree-crown {
  border-radius: 90% 90% 18% 18% / 72% 72% 28% 28%;
  clip-path: none;
  animation: none;
}

.tree-ginkgo .crown-one {
  top: 25px;
  left: 51px;
  width: 71px;
  height: 75px;
}

.tree-ginkgo .crown-two {
  top: 51px;
  left: 8px;
  width: 82px;
  height: 76px;
  transform: rotate(-12deg);
}

.tree-ginkgo .crown-three {
  top: 51px;
  right: 7px;
  width: 82px;
  height: 76px;
  transform: rotate(12deg);
}

.tree-ginkgo .crown-four {
  top: 8px;
  left: 67px;
  width: 55px;
  height: 61px;
}

.tree-ginkgo .tree-bloom,
.tree-ginkgo .tree-fruit {
  width: 18px;
  height: 16px;
  border-radius: 90% 90% 16% 16% / 74% 74% 26% 26%;
  background: #d5b957;
  box-shadow: none;
  clip-path: none;
}

.tree-ginkgo .tree-fruit::before {
  display: none;
}

.tree-starlight {
  background: #536074;
}

.tree-starlight .garden-sun {
  background: #f2e7bb;
  box-shadow: 0 0 0 10px rgba(242, 231, 187, 0.11), 0 0 28px rgba(242, 231, 187, 0.18);
}

.tree-starlight .garden-cloud {
  background: rgba(236, 237, 239, 0.19);
}

.tree-starlight .garden-ground {
  background: #737b88;
}

.tree-starlight .tree-trunk {
  background: #7f6d69;
}

.tree-starlight .tree-face {
  background: rgba(255, 255, 255, 0.08);
}

.tree-starlight .tree-eye {
  background: rgba(255, 248, 219, 0.88);
}

.tree-starlight .tree-smile {
  border-bottom-color: rgba(255, 248, 219, 0.8);
}

.tree-starlight .tree-bloom,
.tree-starlight .tree-fruit {
  width: 16px;
  height: 16px;
  border-radius: 0;
  background: #e7dca5;
  box-shadow: none;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 56%, 79% 94%, 50% 71%, 21% 94%, 32% 56%, 2% 35%, 39% 35%);
  filter: drop-shadow(0 0 5px rgba(247, 231, 165, 0.62));
  animation: starlight-twinkle 2.8s ease-in-out infinite;
}

.tree-starlight .tree-fruit {
  width: 19px;
  height: 19px;
  background: #c9b9de;
}

.tree-starlight .tree-fruit::before {
  display: none;
}

.tree-starlight .bloom-two,
.tree-starlight .fruit-two {
  animation-delay: -0.9s;
}

.tree-starlight .bloom-three,
.tree-starlight .fruit-three {
  animation-delay: -1.8s;
}

@keyframes cherry-petal-drift {
  0%,
  100% {
    opacity: 0.9;
    transform: translate(0, 0) rotate(34deg);
  }

  50% {
    opacity: 0.62;
    transform: translate(5px, 7px) rotate(52deg);
  }
}

@keyframes starlight-twinkle {
  0%,
  100% {
    opacity: 0.68;
    transform: scale(0.88) rotate(-3deg);
  }

  50% {
    opacity: 1;
    transform: scale(1.08) rotate(4deg);
  }
}

.tree-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 0 8px;
}

.tree-summary h2,
.tree-summary p,
.tree-growth-block p,
.family-garden-heading h2,
.family-garden-heading p,
.family-rain-progress p,
.garden-rule-note p,
.harvest-ready p,
.harvest-complete p {
  margin: 0;
}

.tree-summary h2,
.family-garden-heading h2 {
  margin-top: 4px;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.tree-summary p,
.family-garden-heading p {
  margin-top: 5px;
  color: var(--ink-secondary);
  font-size: 0.75rem;
  line-height: 1.55;
}

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

.tree-change-button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 10px;
  color: var(--brand-ink);
  background: transparent;
  box-shadow: 0 0 0 1px var(--line-strong);
  font-size: 0.75rem;
}

.tree-growth-block {
  display: grid;
  gap: 8px;
  padding: 0 8px;
}

.tree-growth-track {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--sage-soft);
}

.tree-growth-track > div {
  height: 100%;
  border-radius: inherit;
  background: var(--sage);
  transition: width 320ms ease;
}

.garden-resources {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 14px 0;
  border-block: 1px solid var(--line);
}

.garden-resources > div {
  display: grid;
  gap: 2px;
  padding: 0 12px;
  border-left: 1px solid var(--line);
  text-align: center;
}

.garden-resources > div:first-child {
  border-left: 0;
}

.garden-resources span,
.garden-resources small {
  color: var(--ink-muted);
  font-size: 0.6875rem;
}

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

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

.care-button {
  display: grid;
  gap: 3px;
  min-height: 54px;
  padding: 9px 6px;
  border-radius: 12px;
  color: var(--brand-ink);
  background: var(--paper-deep);
  box-shadow: 0 0 0 1px transparent;
}

.care-button:hover {
  background: var(--brand-soft);
}

.care-button:disabled {
  color: var(--ink-muted);
  cursor: not-allowed;
  opacity: 0.58;
}

.care-button strong {
  font-size: 0.8125rem;
  font-weight: 600;
}

.care-button span {
  overflow: hidden;
  font-size: 0.625rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.harvest-ready,
.harvest-complete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border-radius: 15px;
  background: var(--sun-soft);
}

.harvest-complete {
  background: var(--sage-soft);
}

.harvest-ready strong,
.harvest-complete strong {
  font-size: 0.8125rem;
}

.harvest-ready p,
.harvest-complete p {
  margin-top: 3px;
  color: var(--ink-secondary);
  font-size: 0.6875rem;
  line-height: 1.45;
}

.harvest-ready .btn,
.harvest-complete .btn {
  flex: 0 0 auto;
  min-height: 44px;
}

.resource-gain {
  flex: 0 0 auto;
  color: var(--sage-ink);
  font-size: 0.6875rem;
  font-weight: 600;
}

.family-garden-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 24px;
  background: var(--paper-raised);
  box-shadow: var(--shadow-surface);
}

.family-garden-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.family-garden-heading > strong {
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 600;
}

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

.family-tree-card {
  min-width: 0;
  padding: 6px 6px 12px;
  border-radius: 17px;
  color: var(--ink);
  background: var(--paper-deep);
  text-align: left;
}

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

.family-tree-card .tree-scene.compact {
  min-height: 132px;
  border-radius: 13px;
}

.tree-scene.compact .garden-sun {
  top: 15px;
  right: 16px;
  width: 28px;
  height: 28px;
  box-shadow: 0 0 0 6px rgba(242, 223, 170, 0.18);
}

.tree-scene.compact .garden-cloud,
.tree-scene.compact .cloud-two {
  display: none;
}

.tree-scene.compact .garden-ground {
  bottom: -37px;
  height: 72px;
}

.tree-scene.compact .tree-plant {
  bottom: 21px;
  transform: translateX(-50%) scale(0.56);
}

.family-tree-card > span {
  display: grid;
  gap: 2px;
  padding: 10px 6px 0;
}

.family-tree-card strong {
  overflow: hidden;
  font-size: 0.75rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.family-tree-card small {
  color: var(--ink-muted);
  font-size: 0.6875rem;
}

.family-rain-progress {
  display: grid;
  gap: 8px;
}

.family-rain-progress p {
  color: var(--ink-secondary);
  font-size: 0.6875rem;
}

.garden-rule-note {
  padding: 18px;
  border-radius: 17px;
  background: var(--sage-soft);
}

.garden-rule-note strong {
  color: var(--sage-ink);
  font-size: 0.875rem;
}

.garden-rule-note p {
  margin-top: 6px;
  color: var(--ink-secondary);
  font-size: 0.75rem;
  line-height: 1.6;
}

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

.tree-choice-button {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  min-height: 92px;
  padding: 12px;
  border-radius: 15px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 0 0 1px var(--line);
  text-align: left;
}

.tree-choice-button[aria-checked="true"] {
  background: var(--sage-soft);
  box-shadow: 0 0 0 1px rgba(66, 83, 64, 0.28);
}

.tree-choice-swatch {
  --tree-leaf: #71846f;
  --tree-accent: #bd5e4c;
  position: relative;
  flex: 0 0 42px;
  width: 42px;
  height: 48px;
}

.tree-choice-swatch.tree-orange {
  --tree-leaf: #637b63;
  --tree-accent: #d08043;
}

.tree-choice-swatch.tree-peach {
  --tree-leaf: #72866f;
  --tree-accent: #c97f78;
}

.tree-choice-swatch.tree-cherry {
  --tree-leaf: #778678;
  --tree-accent: #cc96a0;
}

.tree-choice-swatch.tree-ginkgo {
  --tree-leaf: #a18d4f;
  --tree-accent: #d1aa48;
}

.tree-choice-swatch.tree-starlight {
  --tree-leaf: #68778c;
  --tree-accent: #8b789f;
  background: transparent;
}

.tree-choice-swatch .swatch-trunk {
  position: absolute;
  bottom: 0;
  left: 19px;
  width: 6px;
  height: 25px;
  border-radius: 4px;
  background: #8f6e52;
}

.tree-choice-swatch .swatch-crown {
  position: absolute;
  top: 2px;
  left: 6px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--tree-leaf);
  box-shadow:
    -11px 9px 0 -2px var(--tree-leaf),
    11px 9px 0 -2px var(--tree-leaf),
    inset -5px -5px rgba(47, 66, 46, 0.06),
    8px 4px 0 -5px var(--tree-accent);
}

.tree-choice-swatch.tree-orange .swatch-crown {
  top: 3px;
  left: 5px;
  width: 32px;
  height: 30px;
  box-shadow:
    -12px 9px 0 -2px var(--tree-leaf),
    12px 9px 0 -2px var(--tree-leaf),
    inset -5px -5px rgba(47, 66, 46, 0.06),
    9px 5px 0 -4px var(--tree-accent);
}

.tree-choice-swatch.tree-peach .swatch-crown {
  top: 6px;
  left: 4px;
  width: 34px;
  height: 27px;
  border-radius: 52% 52% 45% 45%;
  box-shadow:
    -12px 7px 0 -2px var(--tree-leaf),
    12px 7px 0 -2px var(--tree-leaf),
    -8px -3px 0 -5px var(--tree-accent),
    9px 2px 0 -5px var(--tree-accent);
}

.tree-choice-swatch.tree-cherry .swatch-crown {
  top: 8px;
  left: 3px;
  width: 36px;
  height: 23px;
  border-radius: 58% 58% 42% 42%;
  box-shadow:
    -10px 6px 0 -2px var(--tree-leaf),
    10px 6px 0 -2px var(--tree-leaf),
    -7px -2px 0 -4px var(--tree-accent),
    8px 3px 0 -4px var(--tree-accent);
}

.tree-choice-swatch.tree-ginkgo .swatch-crown {
  top: 4px;
  left: 5px;
  width: 32px;
  height: 32px;
  border-radius: 50% 50% 14% 14%;
  box-shadow: none;
  clip-path: polygon(50% 100%, 0 31%, 9% 11%, 28% 0, 50% 9%, 72% 0, 91% 11%, 100% 31%);
}

.tree-choice-swatch.tree-starlight .swatch-crown {
  top: 2px;
  left: 5px;
  width: 33px;
  height: 33px;
  border-radius: 0;
  box-shadow: none;
  clip-path: polygon(50% 0, 62% 34%, 98% 36%, 69% 57%, 79% 94%, 50% 72%, 21% 94%, 31% 57%, 2% 36%, 38% 34%);
}

.tree-choice-copy {
  display: grid;
  min-width: 0;
}

.tree-choice-copy > span {
  color: var(--ink-muted);
  font-size: 0.625rem;
}

.tree-choice-copy strong {
  margin-top: 1px;
  font-size: 0.8125rem;
  font-weight: 600;
}

.tree-choice-copy small {
  display: -webkit-box;
  margin-top: 3px;
  overflow: hidden;
  color: var(--ink-secondary);
  font-size: 0.625rem;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.btn {
  min-height: 44px;
  border-radius: 11px;
  font-size: 0.8125rem;
}

.btn-primary {
  color: #fffaf5;
  background: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
}

.btn-primary:hover {
  background: var(--brand-hover);
  box-shadow: 0 0 0 1px var(--brand-hover);
}

.btn-secondary {
  color: var(--brand-ink);
  background: var(--paper-raised);
  box-shadow: 0 0 0 1px var(--line-strong);
}

.badge-grid {
  gap: 0;
  padding: 16px 0;
  border-radius: 18px;
  background: var(--paper-raised);
  box-shadow: var(--shadow-surface);
}

.badge-stat {
  gap: 5px;
  padding: 2px 14px;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.badge-stat:first-child {
  border-left: 0;
}

.badge-stat strong {
  font-size: 1.0625rem;
  font-weight: 500;
}

.badge-stat span {
  color: var(--ink-muted);
  font-size: 0.6875rem;
}

.reward-panel {
  position: relative;
  gap: 18px;
  padding: 20px;
  overflow: hidden;
  border-radius: 22px;
  color: #5a452d;
  background: var(--sun-soft);
  box-shadow: inset 0 0 0 1px rgba(109, 83, 39, 0.04);
}

.reward-panel::after {
  position: absolute;
  top: -58px;
  right: -58px;
  width: 140px;
  height: 140px;
  border: 1px solid rgba(109, 83, 39, 0.1);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.reward-panel > * {
  position: relative;
  z-index: 1;
}

.reward-panel p {
  color: rgba(90, 69, 45, 0.72);
}

.reward-progress {
  gap: 0;
}

.reward-progress div {
  gap: 4px;
  padding: 4px 12px;
  border-left: 1px solid rgba(90, 69, 45, 0.12);
  border-radius: 0;
  background: transparent;
}

.reward-progress div:first-child {
  padding-left: 0;
  border-left: 0;
}

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

.reward-progress strong {
  font-size: 0.9375rem;
}

.reward-progress span {
  color: rgba(90, 69, 45, 0.65);
}

.avatar {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  color: var(--sage-ink);
  background: var(--sage-soft);
  box-shadow: inset 0 0 0 1px rgba(66, 83, 64, 0.05);
  font-size: 0.75rem;
}

.avatar.apricot {
  color: var(--apricot-ink);
  background: var(--apricot-soft);
}

.avatar.blue {
  color: #435960;
  background: var(--blue-soft);
}

.compact-action {
  min-height: 44px;
  padding-inline: 8px;
  color: var(--brand-ink);
  font-size: 0.75rem;
}

.sheet-backdrop {
  background: rgba(31, 25, 29, 0.46);
  backdrop-filter: blur(8px) saturate(120%);
}

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

.sheet-header {
  position: relative;
  min-height: 68px;
  padding: 16px 20px 12px;
  border-bottom: 0;
}

.sheet-header::after {
  position: absolute;
  top: 9px;
  left: 50%;
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: rgba(39, 33, 39, 0.12);
  content: "";
  transform: translateX(-50%);
}

.sheet-header h2 {
  font-size: 1.125rem;
}

.sheet-close {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--paper-deep);
}

.sheet-body {
  gap: 20px;
  padding: 18px 20px 22px;
}

.field-group {
  gap: 8px;
}

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

.field-row > .field-group {
  min-width: 0;
}

.field-group label,
.field-legend {
  color: var(--ink-secondary);
  font-size: 0.8125rem;
}

.reminder-choice,
.conflict-confirm {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 48px;
  padding: 12px;
  border-radius: 14px;
  background: var(--paper-deep);
}

.reminder-choice input,
.conflict-confirm input {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin-top: 1px;
  accent-color: var(--brand);
}

.reminder-choice span {
  display: grid;
  gap: 3px;
}

.reminder-choice strong {
  color: var(--ink);
  font-size: 0.8125rem;
}

.reminder-choice small,
.conflict-confirm span {
  color: var(--ink-secondary);
  font-size: 0.75rem;
  line-height: 1.5;
}

.conflict-confirm {
  background: #fff2e7;
}

.conflict-confirm[hidden] {
  display: none;
}

.field,
.select-field,
.textarea-field {
  min-height: 48px;
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 0 0 1px var(--line-strong);
}

.field[aria-invalid="true"],
.select-field[aria-invalid="true"],
.textarea-field[aria-invalid="true"] {
  box-shadow: 0 0 0 2px #a95d50;
}

.transcript {
  padding: 16px;
  border-radius: 16px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
}

.homework-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 2px;
}

.homework-step > span {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--sage-ink);
  background: var(--sage-soft);
  font-size: 0.6875rem;
  font-weight: 700;
  place-items: center;
}

.homework-step strong,
.homework-step p {
  margin: 0;
}

.homework-step strong {
  font-size: 0.875rem;
}

.homework-step p {
  margin-top: 3px;
  color: var(--ink-secondary);
  font-size: 0.75rem;
  line-height: 1.5;
}

.homework-photo-dropzone {
  position: relative;
  display: grid;
  min-height: 172px;
  gap: 7px;
  padding: 18px;
  overflow: hidden;
  border-radius: 18px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  cursor: pointer;
  place-items: center;
  text-align: center;
}

.homework-photo-dropzone:focus-within {
  outline: 2px solid #8e6f80;
  outline-offset: 0;
}

.homework-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.homework-camera-mark {
  position: relative;
  display: block;
  width: 54px;
  height: 40px;
  border-radius: 12px;
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px rgba(73, 56, 66, 0.15);
}

.homework-camera-mark::before {
  position: absolute;
  top: -6px;
  left: 17px;
  width: 20px;
  height: 9px;
  border-radius: 6px 6px 2px 2px;
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px rgba(73, 56, 66, 0.15);
  content: "";
}

.homework-camera-mark span {
  position: absolute;
  top: 10px;
  left: 17px;
  width: 20px;
  height: 20px;
  border: 4px solid var(--brand);
  border-radius: 50%;
}

.homework-photo-dropzone > strong {
  font-size: 0.875rem;
  font-weight: 600;
}

.homework-photo-dropzone > small {
  max-width: 28ch;
  color: var(--ink-muted);
  font-size: 0.6875rem;
  line-height: 1.45;
}

.homework-photo-preview[hidden] {
  display: none;
}

.homework-photo-preview:not([hidden]) {
  display: block;
  width: 100%;
  height: 136px;
  border-radius: 13px;
  object-fit: cover;
}

.homework-photo-dropzone.has-photo {
  min-height: 220px;
  padding: 10px 10px 14px;
}

.homework-photo-dropzone.has-photo .homework-camera-mark {
  display: none;
}

.homework-demo-button {
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  color: var(--brand-ink);
  background: var(--brand-soft);
  font-size: 0.75rem;
  font-weight: 600;
}

.homework-privacy-note {
  margin: 0;
  padding: 12px 13px;
  border-radius: 13px;
  color: var(--sage-ink);
  background: var(--sage-soft);
  font-size: 0.6875rem;
  line-height: 1.55;
}

.homework-processing {
  display: grid;
  min-height: 230px;
  gap: 12px;
  place-items: center;
  text-align: center;
}

.homework-processing strong,
.homework-processing p {
  margin: 0;
}

.homework-processing strong {
  font-size: 0.9375rem;
}

.homework-processing p {
  max-width: 31ch;
  color: var(--ink-secondary);
  font-size: 0.75rem;
  line-height: 1.55;
}

.homework-scan-frame {
  position: relative;
  width: 126px;
  height: 92px;
  overflow: hidden;
  border-radius: 14px;
  background: var(--paper-deep);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.homework-scan-frame::before,
.homework-scan-frame::after,
.homework-scan-frame i,
.homework-scan-frame b {
  position: absolute;
  right: 18px;
  left: 18px;
  height: 4px;
  border-radius: 4px;
  background: rgba(73, 56, 66, 0.18);
  content: "";
}

.homework-scan-frame::before {
  top: 25px;
}

.homework-scan-frame::after {
  top: 40px;
}

.homework-scan-frame i {
  top: 55px;
  right: 42px;
}

.homework-scan-frame b {
  top: 0;
  right: 8px;
  left: 8px;
  height: 2px;
  background: var(--apricot);
  box-shadow: 0 0 12px rgba(201, 127, 95, 0.28);
  animation: homework-scan 1.5s ease-in-out infinite;
}

.homework-result-summary {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 15px;
  border-radius: 15px;
  background: var(--sage-soft);
}

.homework-result-summary > div {
  display: grid;
  gap: 2px;
}

.homework-result-summary span,
.homework-result-summary p {
  color: var(--sage-ink);
  font-size: 0.6875rem;
}

.homework-result-summary strong {
  color: var(--sage-ink);
  font-size: 1.0625rem;
  font-weight: 600;
}

.homework-result-summary p {
  margin: 0;
  text-align: right;
}

.homework-review-list {
  display: grid;
  gap: 10px;
}

.homework-review-item {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
}

.homework-review-item.needs-review {
  box-shadow: inset 3px 0 #c98a58, 0 0 0 1px var(--line);
}

.homework-review-item.is-duplicate {
  opacity: 0.72;
  background: var(--paper-deep);
}

.recognition-confidence {
  margin-left: auto;
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--sage-ink);
  background: var(--sage-soft);
  font-size: 0.625rem;
  font-weight: 700;
}

.recognition-confidence.is-low {
  color: #7a493b;
  background: var(--sun-soft);
}

.duplicate-summary,
.duplicate-note {
  color: #744735;
  background: #fff2e7;
}

.duplicate-summary {
  padding: 12px 14px;
  border-radius: 14px;
}

.duplicate-summary strong,
.duplicate-summary p,
.duplicate-note {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.5;
}

.duplicate-summary p {
  margin-top: 3px;
}

.duplicate-note {
  padding: 8px 10px;
  border-radius: 10px;
}

.verification-choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 52px;
  padding: 13px;
  border-radius: 14px;
  background: var(--brand-soft);
}

.verification-choice input {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin-top: 1px;
  accent-color: var(--brand);
}

.verification-choice span {
  display: grid;
  gap: 3px;
}

.verification-choice strong {
  color: var(--ink);
  font-size: 0.8125rem;
}

.verification-choice small {
  color: var(--ink-secondary);
  font-size: 0.75rem;
  line-height: 1.5;
}

.homework-review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.homework-subject {
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--sage-ink);
  background: var(--sage-soft);
  font-size: 0.6875rem;
  font-weight: 600;
}

.homework-include {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--ink-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
}

.homework-include input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.homework-time-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 126px;
  align-items: center;
  gap: 12px;
}

.homework-time-row label {
  color: var(--ink-secondary);
  font-size: 0.75rem;
  font-weight: 600;
}

.homework-time-row .field {
  min-width: 0;
}

@keyframes homework-scan {
  0%,
  100% {
    transform: translateY(10px);
  }

  50% {
    transform: translateY(70px);
  }
}

.handoff-summary-card {
  display: grid;
  gap: 0;
  padding: 4px 16px;
  border-radius: 16px;
  background: var(--brand-soft);
}

.handoff-summary-card > div {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid rgba(73, 56, 66, 0.08);
}

.handoff-summary-card > div:first-child {
  border-top: 0;
}

.handoff-summary-card span {
  color: rgba(73, 56, 66, 0.62);
  font-size: 0.75rem;
}

.handoff-summary-card strong {
  min-width: 0;
  color: var(--brand-ink);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.5;
}

.handoff-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.handoff-progress li {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--ink-muted);
  text-align: center;
}

.handoff-progress li::before {
  position: absolute;
  z-index: 0;
  top: 13px;
  right: 50%;
  left: -50%;
  height: 1px;
  background: var(--line-strong);
  content: "";
}

.handoff-progress li:first-child::before {
  display: none;
}

.handoff-progress li span {
  position: relative;
  z-index: 1;
  display: grid;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: var(--paper-deep);
  box-shadow: 0 0 0 1px var(--line-strong);
  font-size: 0.6875rem;
  font-weight: 600;
  place-items: center;
}

.handoff-progress li strong {
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.4;
}

.handoff-progress li.done {
  color: var(--sage-ink);
}

.handoff-progress li.done::before {
  background: rgba(113, 132, 111, 0.42);
}

.handoff-progress li.done span {
  color: #f9f7f1;
  background: var(--sage);
  box-shadow: 0 0 0 1px var(--sage);
}

.handoff-progress li.active {
  color: var(--brand-ink);
}

.handoff-progress li.active span {
  color: #f9f7f1;
  background: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
}

.responsibility-panel {
  display: grid;
  gap: 10px;
}

.responsibility-panel .section-heading h3,
.responsibility-panel .section-heading p {
  margin: 0;
}

.responsibility-panel .section-heading h3 {
  font-size: 0.9375rem;
  font-weight: 600;
}

.responsibility-panel .section-heading p {
  color: var(--ink-muted);
  font-size: 0.75rem;
}

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

.responsibility-card {
  position: relative;
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 12px;
  border-radius: 14px;
  background: var(--paper-deep);
  box-shadow: inset 0 0 0 1px transparent;
}

.responsibility-card.is-mine {
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px rgba(73, 56, 66, 0.1);
}

.responsibility-card span,
.responsibility-card strong,
.responsibility-card em {
  display: block;
  min-width: 0;
}

.responsibility-card span {
  overflow: hidden;
  color: var(--ink-muted);
  font-size: 0.6875rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.responsibility-card strong {
  font-size: 1rem;
  font-weight: 600;
}

.responsibility-card em {
  color: var(--sage-ink);
  font-size: 0.75rem;
  font-style: normal;
}

.responsibility-card.pending em {
  color: var(--apricot-ink);
}

.handoff-sheet-actions .btn:last-child {
  flex: 1;
}

.handoff-confirm-note {
  padding: 13px 14px;
  border-radius: 14px;
  background: var(--paper-deep);
}

.handoff-confirm-note strong,
.handoff-confirm-note p {
  margin: 0;
}

.handoff-confirm-note strong {
  font-size: 0.8125rem;
  font-weight: 600;
}

.handoff-confirm-note p {
  margin-top: 4px;
  color: var(--ink-secondary);
  font-size: 0.75rem;
  line-height: 1.55;
}

.choice-stack {
  gap: 10px;
}

.choice-button {
  min-height: 54px;
  padding: 12px 14px;
  border-radius: 15px;
  color: var(--ink-secondary);
  background: var(--paper);
  box-shadow: 0 0 0 1px var(--line);
}

.choice-button[aria-checked="true"],
.choice-button[aria-pressed="true"] {
  color: var(--brand-ink);
  background: var(--brand-soft);
  box-shadow: 0 0 0 1px rgba(73, 56, 66, 0.24);
}

.invite-code {
  gap: 10px;
  padding: 22px;
  border-radius: 18px;
  background: var(--brand-soft);
}

.invite-code strong {
  color: var(--brand-ink);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 1.875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.security-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
}

.security-status.is-safe {
  color: var(--sage-ink);
  background: var(--sage-soft);
}

.security-status.is-warning {
  color: #7a493b;
  background: var(--apricot-soft);
}

.security-intro,
.danger-confirm {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 16px;
}

.security-intro {
  color: var(--brand-ink);
  background: var(--brand-soft);
}

.security-intro > span {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.security-intro strong,
.danger-confirm strong {
  font-size: 0.9375rem;
}

.security-intro p,
.danger-confirm p {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.6;
}

.danger-confirm {
  color: #7a493b;
  background: var(--apricot-soft);
}

.pin-field {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.22em;
}

.form-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  color: #7a342d;
  background: #f8e4df;
  font-size: 0.75rem;
  line-height: 1.5;
}

.form-error[hidden] {
  display: none;
}

.btn-danger {
  color: #fffaf5;
  background: #8f4d46;
}

#parent-pin-form .btn,
#clear-local-data-form .btn,
#task-editor-form .btn {
  min-height: 48px;
}

.task-manage {
  min-width: 48px;
  min-height: 44px;
  flex: 0 0 auto;
  padding: 0 10px;
  border-radius: 12px;
  color: var(--ink-secondary);
  background: var(--paper-deep);
  font-size: 0.75rem;
  font-weight: 600;
}

.task-record-card,
.task-edit-warning {
  display: grid;
  gap: 5px;
  padding: 14px;
  border-radius: 16px;
  background: var(--paper-deep);
}

.task-record-card span,
.task-record-card p,
.task-edit-warning p {
  margin: 0;
  color: var(--ink-secondary);
  font-size: 0.8125rem;
  line-height: 1.55;
}

.task-record-card strong,
.task-edit-warning strong {
  font-size: 0.9375rem;
}

.task-edit-warning {
  color: #744735;
  background: var(--sun-soft);
}

.task-delete-button {
  min-height: 48px;
  border-radius: 14px;
  color: #8f4d46;
  background: #f8e4df;
  font-size: 0.875rem;
  font-weight: 600;
}

.compact-action.danger {
  color: #8f4d46;
  background: #f8e4df;
}

.danger-setting .history-title {
  color: #7a493b;
}

.toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-radius: 14px;
  color: #fffaf5;
  background: #2b252a;
  box-shadow: 0 12px 36px rgba(31, 25, 29, 0.22);
}

.toast button {
  min-width: 48px;
  min-height: 44px;
  flex: 0 0 auto;
  padding: 0 10px;
  border-radius: 10px;
  color: #2b252a;
  background: #fffaf5;
  font-size: 0.75rem;
  font-weight: 700;
  pointer-events: auto;
}

.toast.is-visible {
  pointer-events: auto;
}

@media (max-width: 880px) {
  html,
  body,
  .prototype-stage {
    background: var(--paper);
  }

  .mobile-device {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .prototype-stage {
    min-height: 100dvh;
    padding: 0;
  }

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

  .sheet {
    border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  }
}

@media (max-width: 360px) {
  .screen-content,
  .app-header {
    padding-right: 16px;
    padding-left: 16px;
  }

  .voice-panel {
    gap: 14px;
  }

  .quick-entry-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .quick-entry-actions .voice-button,
  .homework-entry-button,
  .manual-entry-button {
    width: 100%;
    min-width: 0;
  }

  .homework-result-summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .homework-result-summary p {
    text-align: left;
  }

  .homework-review-item {
    padding: 12px;
  }

  .homework-time-row {
    grid-template-columns: minmax(0, 1fr) 118px;
  }

  .summary-item {
    padding: 0 11px;
  }

  .task-list,
  .schedule-list,
  .member-list,
  .reward-list,
  .history-list {
    padding: 0 13px;
  }

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

  .handoff-action {
    align-self: flex-start;
  }

  .tree-panel {
    padding-right: 10px;
    padding-left: 10px;
  }

  .tree-scene {
    min-height: 220px;
  }

  .tree-summary,
  .harvest-ready,
  .harvest-complete {
    align-items: stretch;
    flex-direction: column;
  }

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

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

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

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

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

@media (prefers-reduced-transparency: reduce) {
  .app-header,
  .bottom-nav,
  .sheet-backdrop {
    backdrop-filter: none;
  }

  .app-header,
  .bottom-nav {
    background: var(--paper-raised);
  }
}

@media (prefers-contrast: more) {
  .bottom-nav,
  .task-list,
  .schedule-list,
  .member-list,
  .reward-list,
  .history-list {
    box-shadow: 0 0 0 1px rgba(39, 33, 39, 0.22);
  }
}

/* Account choice: email accounts and owner-managed no-login caregivers. */
.member-entry-grid .cloud-onboarding-card {
  display: grid;
  gap: 16px;
  align-content: space-between;
}

.member-entry-grid .cloud-onboarding-card .btn {
  width: 100%;
}

.managed-member-row {
  margin: 0 -8px;
  padding-right: 8px;
  padding-left: 8px;
  border-radius: 14px;
  background: linear-gradient(90deg, rgb(233 242 224 / 58%), transparent 72%);
}

/* Workflow pass: preserve the established palette, clarify status and next actions. */
.workflow-sync,
.calendar-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-secondary);
  font-size: 0.75rem;
}
.workflow-sync { margin: -8px 0 16px; }
.workflow-sync span { min-width: 0; overflow-wrap: anywhere; }
.workflow-sync button,
.calendar-context button,
.workflow-examples button {
  flex-shrink: 0;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 12px;
  color: var(--brand);
  background: var(--paper-deep);
  font-weight: 600;
}
.quick-entry-actions .manual-entry-button.is-primary {
  color: var(--brand);
  background: var(--paper-raised);
}
.workflow-examples { margin-top: -16px; color: var(--ink-secondary); font-size: 0.75rem; }
.workflow-examples summary { min-height: 44px; padding: 12px 0; cursor: pointer; }
.workflow-examples p { margin: 0 0 8px; line-height: 1.6; }
.workflow-examples > div { display: flex; gap: 8px; }
.task-state-label { margin: 5px 0 0; font-size: 0.7rem; line-height: 1.5; color: var(--ink-secondary); }
.task-action { min-width: 64px; min-height: 44px; white-space: normal; max-width: 90px; }
.workflow-handoff-entry { width: 100%; margin-top: 12px; }
.workflow-discard { margin-top: 16px; padding: 14px; border-radius: 16px; background: var(--paper-deep); }
.workflow-discard p { margin: 0 0 12px; line-height: 1.6; }
button[aria-busy="true"] { opacity: 0.6; cursor: progress; }
summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
@media (max-width: 480px), (pointer: coarse) {
  .field, .select-field, .textarea-field { font-size: 16px; }
  .task-row { flex-wrap: wrap; }
  .task-content { min-width: 120px; }
  .task-row > .task-manage, .task-row > .task-action { margin-left: auto; }
  .workflow-discard .sheet-actions { grid-template-columns: 1fr; }
}
