/* Mobile subpages leave a glimpse of the parent screen above the sheet. */
body:has(dialog[open]) { overflow: hidden; }
.parent-sheet, dialog.parent-sheet-existing {
  box-sizing: border-box; position: fixed; inset: auto 0 0; margin: 0 auto;
  width: min(680px, 100%); max-width: 100%; height: 90dvh; max-height: 90dvh;
  border: 0; border-radius: 30px 30px 0 0; background: var(--background, #f5f7f2);
  color: var(--ink, #202229); box-shadow: 0 -12px 70px #192b2829;
  overflow: auto; overscroll-behavior: contain; padding: 24px 24px max(32px, env(safe-area-inset-bottom));
}
.parent-sheet { padding: 0; }
.parent-sheet[open], dialog.parent-sheet-existing[open] { animation: parent-sheet-enter .28s cubic-bezier(.2,.8,.2,1); }
.parent-sheet::backdrop, dialog.parent-sheet-existing::backdrop { background: #20292959; backdrop-filter: blur(4px); }
.parent-sheet-heading { position: sticky; top: 0; z-index: 3; padding: 20px 24px 18px; background: var(--background, #f5f7f2); }
.parent-sheet-heading h2 { margin: 32px 0 0; font-size: clamp(28px, 7vw, 38px); line-height: 1.12; letter-spacing: -1px; text-wrap: balance; }
.parent-sheet-close, dialog.parent-sheet-existing #settingsClose, dialog.parent-sheet-existing #parentFeedbackClose, dialog.parent-sheet-existing #weeklyClose {
  display: block; margin-left: auto; width: 44px; height: 44px; min-height: 44px; padding: 0;
  border: 1px solid #d9ded8; border-radius: 50%; background: #ffffffc9; color: #202229;
  font: 300 34px/1 system-ui, sans-serif; cursor: pointer;
}
.parent-sheet-body { padding: 0 24px max(32px, env(safe-area-inset-bottom)); }
.parent-sheet :focus-visible { outline: 3px solid var(--teal-dark); outline-offset: 3px; }
.parent-sheet-body > .in-parent-sheet { margin: 0; padding: 0; border: 0; width: 100%; }
.parent-sheet-body > details.in-parent-sheet > summary { display: none; }
.parent-details > summary::after { content: '›'; }
.parent-sheet-body > .flower-detail { background: transparent; border-radius: 0; }
.parent-sheet-body .flower-detail-heading { display: none; }
.parent-sheet-body .flower-detail-row { padding: 18px 0; font-size: 16px; }
.parent-sheet-body .flower-detail-note { margin-top: 20px; font-size: 14px; line-height: 1.65; }
.parent-sheet-frame { display: block; height: 66dvh; border: 0; background: white; }
.parent-sheet-existing .settings-heading, .parent-sheet-existing .weekly-toolbar { position: sticky; top: -24px; z-index: 3; background: var(--background, #f5f7f2); }
.parent-sheet-existing .parent-feedback-close { position: sticky; top: 0; right: 0; z-index: 3; }
.parent-sheet-existing .parent-feedback-eyebrow { margin-top: 12px; }
.parent-sheet-existing .reading-settings-actions { bottom: -32px; }
.parent-sheet-body > .info-panel { position: static; box-shadow: none; max-height: none; background: transparent; }
.parent-sheet-body > .info-panel > .info-close, .parent-sheet-body > .info-panel > h2 { display: none; }
@keyframes parent-sheet-enter { from { transform: translateY(60px); opacity: .5; } to { transform: translateY(0); opacity: 1; } }
@media (min-width: 740px) { .parent-sheet, dialog.parent-sheet-existing { bottom: 24px; height: min(820px, 88dvh); max-height: 88dvh; border-radius: 30px; } }
@media (prefers-reduced-motion: reduce) { .parent-sheet[open], dialog.parent-sheet-existing[open] { animation: none; } }

/* Today's word total is the doorway; outcomes stay fully visible in its sheet. */
.parent-today-numbers > .today-word-activity-open { display: flex; align-items: baseline; gap: 9px; min-height: 54px; min-width: 0; padding: 0 12px 0 0; background: transparent; color: inherit; text-align: left; cursor: pointer; border-radius: 8px; }
.parent-today-numbers > .today-word-activity-open:hover { background: #cce6d980; }
.parent-today-numbers > .today-word-activity-open:focus-visible { outline: 3px solid var(--teal-dark); outline-offset: 4px; }
.parent-today-numbers > .today-word-activity-open + div { padding-left: 18px; border-left: 1px solid #c7ded3; }
.parent-today-numbers .today-word-arrow { margin-left: auto; align-self: center; font-size: 25px; color: var(--teal-dark); }
.word-activity-date { margin: 0 0 20px; font-size: 13px; color: #717a75; }
.word-activity-overview { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.word-activity-metric { display: flex; flex-direction: column; gap: 8px; padding: 22px 20px; border-radius: 22px; }
.word-activity-metric.is-good { background: #e0eee5; color: #236449; }
.word-activity-metric.is-unsure { background: #f7ead8; color: #8a581f; }
.word-activity-metric strong { font-size: 44px; font-weight: 750; line-height: 1; letter-spacing: -1.5px; font-variant-numeric: tabular-nums; }
.word-activity-metric > span { font-size: 13px; font-weight: 600; }
.word-activity-note { margin: 16px 0 30px; color: #717a75; font-size: 12px; line-height: 1.6; }
.word-activity-group + .word-activity-group { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line); }
.word-activity-group h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font-size: 19px; letter-spacing: -.4px; }
.word-activity-symbol { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #e0eee5; color: #236449; font-size: 17px; }
.is-unsure .word-activity-symbol { background: #f7ead8; color: #8a581f; }
.word-activity-words { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.word-activity-word { display: flex; align-items: baseline; gap: 9px; padding: 12px 16px; border: 1px solid #dce5dd; border-radius: 14px; background: #fffefa; font-size: 19px; font-weight: 600; }
.is-unsure .word-activity-word { border-color: #e8d9c5; }
.word-activity-word small { color: #7b807a; font-size: 11px; font-weight: 500; }
.word-activity-empty { margin: 0; color: #717a75; font-size: 14px; line-height: 1.6; }

/* Petal subpages combine a compact stage summary with the complete word targets. */
.flower-stage-description { margin: 0 0 28px; color: #5f6c65; font-size: 15px; line-height: 1.7; }
.flower-target-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.flower-target-heading h3 { margin: 0; font-size: 22px; letter-spacing: -.5px; }
.flower-pattern { padding: 0; border: 0; background: transparent; }
.flower-pattern + .flower-pattern { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line); }
.flower-pattern h4 { margin: 0 0 14px; font-size: 16px; line-height: 1.45; }
.flower-word-group + .flower-word-group { margin-top: 22px; }
.flower-word-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 5px 12px; margin-bottom: 10px; }
.flower-word-heading h5 { margin: 0; font-size: 14px; }
.flower-word-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.flower-word-chip { display: flex; align-items: baseline; gap: 7px; max-width: 100%; padding: 8px 11px; border: 1px solid #e3dfd4; border-radius: 10px; background: #fcf8ef; color: #554b36; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.is-ready .flower-word-chip { color: #25665d; background: #eaf4ef; border-color: #d1e5dc; }
.flower-word-emoji { font-size: 16px; }
.flower-words-empty { margin: 0; color: #7a817c; font-size: 12px; line-height: 1.6; }

/* One quiet, aligned readiness summary beside the petal title. */
.parent-sheet-title-row { display: flex; align-items: center; gap: 20px; margin-top: 28px; }
.parent-sheet-title-row h2 { flex: 1; min-width: 0; margin: 0; font-size: clamp(26px, 7vw, 34px); text-wrap: pretty; }
.flower-stage-score { flex: 0 0 auto; text-align: right; color: var(--stage-ink); }
.flower-stage-total { white-space: nowrap; font-size: 23px; line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -.6px; }
.flower-stage-total strong { font-size: 34px; font-weight: 750; }
.flower-stage-total > span { color: #6c7973; font-weight: 500; }
.flower-stage-caption { display: block; margin-top: 4px; font-size: 11px; line-height: 1.4; font-weight: 600; }
