/* Soft Hours visual alignment v1. UI only; canonical roles, no runtime changes. */
:root,
#soft-hours-landing-prototype {
  --sh-background:#FDF8E9;
  --sh-surface:#FFFDF7;
  --sh-text:#49473C;
  --sh-secondary:#70695C;
  --sh-primary:#64624A;
  --sh-on-primary:#FFFDF7;
  --sh-border:#E6E0D2;
  --sh-input-border:#787365;
  --sh-focus:#527989;
  --sh-success:#4F7155;
  --sh-warning:#806126;
  --sh-error:#9B392F;
  --sh-sleep-surface:#EEE8F5;
  --sh-feed-surface:#E8EFE5;
  --sh-diaper-surface:#F6EDD3;
  --sh-add:#EDCFBB;
  --paper:var(--sh-background)!important;
  --card:var(--sh-surface)!important;
  --ink:var(--sh-text)!important;
  --muted:var(--sh-secondary)!important;
  --line:var(--sh-border)!important;
  --green:var(--sh-primary)!important;
  --green-dark:#514A36!important;
  --mint:var(--sh-feed-surface)!important;
  --today-paper:var(--sh-surface)!important;
  --today-line:var(--sh-border)!important;
  --today-ink:var(--sh-text)!important;
  --today-muted:var(--sh-secondary)!important;
  --today-sleep:#70608F!important;
  --today-feed:var(--sh-success)!important;
  --today-diaper:var(--sh-warning)!important;
}
body {background:var(--sh-background);color:var(--sh-text)}
/* Do not use the decorative border token to identify an editable control. */
input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea,
#modal .dialog .field input,#modal .dialog .field select,#modal .dialog .field textarea,
.more-unit-field select,.more-profile-tools select,.more-feedback,
.handoff-caregiver-form input,.handoff-note-form textarea {
  background:var(--sh-surface)!important;
  color:var(--sh-text)!important;
  border-color:var(--sh-input-border)!important;
  font-size:16px!important;
  min-height:48px;
  max-width:100%;
}
input::placeholder,textarea::placeholder {color:var(--sh-secondary);opacity:1}
input[aria-invalid=true],select[aria-invalid=true],textarea[aria-invalid=true] {border-color:var(--sh-error)!important}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,
textarea:focus-visible,summary:focus-visible,
.more-row:focus-visible,.more-child-card button:focus-visible,.more-child-card select:focus-visible {
  outline:3px solid var(--sh-focus)!important;
  outline-offset:2px!important;
}
.btn.primary,button.more-primary,.more-dialog-actions .more-primary,
#signin,#savePassword,form button[type=submit],#saveEntryButton,
.feature-tabs button[aria-pressed=true],.chart-toggle button[aria-pressed=true],
.week-chart-filters button[aria-pressed=true] {
  background:var(--sh-primary)!important;
  color:var(--sh-on-primary)!important;
  border-color:var(--sh-primary)!important;
  background-image:none!important;
  min-height:48px;
}
.btn.primary:hover:not(:disabled),button.more-primary:hover:not(:disabled),
#signin:hover:not(:disabled),#savePassword:hover:not(:disabled),
#saveEntryButton:hover:not(:disabled) {background:#514A36!important;border-color:#514A36!important}
.save-state.ok,.status-success {color:var(--sh-success)!important;background:var(--sh-feed-surface)!important}
.save-state.fail,.auth-error,.status-error {color:var(--sh-error)!important;background:#F5E7DF!important}
.save-state.pending,.status-warning {color:var(--sh-warning)!important;background:var(--sh-diaper-surface)!important}
/* Shared brand asset; the mark itself is not recolored. */
.brand {color:var(--sh-text)!important;font-family:Georgia,"Times New Roman",serif!important;font-weight:700!important;letter-spacing:-.035em}
.brand .sh-brand-mark {width:37px;height:37px;flex:none;display:block}
.brand .logo {width:40px;height:40px;padding:0;background:none;border:0;box-shadow:none;flex:none}
.brand .logo .sh-brand-mark {width:100%;height:100%}
#login>h1 {display:flex;align-items:center;gap:12px;font:700 30px/1.2 Georgia,"Times New Roman",serif;color:var(--sh-text)}
#login>h1::before {content:"";display:block;width:40px;height:40px;flex:none;background:url("assets/soft-hours-logo.svg") center/contain no-repeat}
/* Auth shell and legal templates. No auth state or routing changes. */
body>header {background:var(--sh-surface);border-color:var(--sh-border)}
#login {padding:24px}
#login label {color:var(--sh-text)}
#login small {color:var(--sh-secondary)}
#login a:link,#login a:visited {color:var(--sh-primary);text-underline-offset:3px}
#login button:not(#signin):not(#savePassword) {background:var(--sh-feed-surface);color:var(--sh-text);min-height:44px}
body.sh-legal {background:var(--sh-background);color:var(--sh-text);padding:24px}
body.sh-legal a:link,body.sh-legal a:visited {color:var(--sh-primary)}
body.sh-legal aside {background:var(--sh-feed-surface);color:var(--sh-text)}
/* Landing: keep content, sample charts and inverse section structure intact. */
#soft-hours-landing-prototype {background:var(--sh-background)!important;color:var(--sh-text)}
#soft-hours-landing-prototype .site-header {background:var(--sh-background)!important;border-color:var(--sh-border)}
#soft-hours-landing-prototype .hero-copy,
#soft-hours-landing-prototype .microcopy,
#soft-hours-landing-prototype .feature-strip p,
#soft-hours-landing-prototype .feature-copy p,
#soft-hours-landing-prototype .feature-copy .fine,
#soft-hours-landing-prototype .section-head p,
#soft-hours-landing-prototype .demo-name small,
#soft-hours-landing-prototype .demo-event small,
#soft-hours-landing-prototype .demo-time,
#soft-hours-landing-prototype .demo-date,
#soft-hours-landing-prototype .footer,
#soft-hours-landing-prototype .footer a,
#soft-hours-landing-prototype .faq p {color:var(--sh-secondary)!important}
#soft-hours-landing-prototype .preview-card,
#soft-hours-landing-prototype .feature-panel,
#soft-hours-landing-prototype .mini-phone,
#soft-hours-landing-prototype .btn:not(.primary),
#soft-hours-landing-prototype .step {background:var(--sh-surface)!important;border-color:var(--sh-border)!important}
#soft-hours-landing-prototype .final-cta {background:#514A36!important}
#soft-hours-landing-prototype .final-cta h2,
#soft-hours-landing-prototype .final-cta p {color:var(--sh-on-primary)!important}
#soft-hours-landing-prototype .feature-tabs button,
#soft-hours-landing-prototype .faq summary {min-height:44px}
/* V01–V04, V18: Today captions, category totals and empty state. */
#todayJournal #childAge,#todayJournal #todayDateCaption,
#todayJournal #loggedTodayTitle,#todayJournal #addGrowthToday {color:var(--sh-secondary)!important}
#todayJournal .date-controls {background:var(--sh-background)!important;border-color:var(--sh-border)!important}
#todayJournal #sleepShortcutStatus,#todayJournal #feedShortcutStatus,
#todayJournal #diaperShortcutStatus {color:var(--sh-text)!important;font-size:12px!important}
#todayJournal .logged-today-item.sleep {background:var(--sh-sleep-surface)!important}
#todayJournal .logged-today-item.feeds {background:var(--sh-feed-surface)!important}
#todayJournal .logged-today-item.diapers {background:var(--sh-diaper-surface)!important}
#todayJournal .logged-today-item small {color:var(--sh-secondary)!important;font-size:12px!important}
#todayJournal .logged-today-item.sleep strong {color:#70608F!important}
#todayJournal .logged-today-item.feeds strong {color:var(--sh-success)!important}
#todayJournal .logged-today-item.diapers strong {color:var(--sh-warning)!important}
#todayJournal .empty-log,#todayJournal .empty-log small,
#todayJournal .empty-log p,#todayJournal #timeline .empty-log span {color:var(--sh-secondary)!important;font-size:12px!important}
#todayJournal #timeline .empty-state small {color:var(--sh-secondary)!important;font-size:12px!important}
/* V05–V06: weekly chart annotations retain the existing graph. */
#summary .range-caption,#summary #weekSleepCoverage,
#summary .week-metric small,#summary .week-metric>span:not(.week-metric-icon),
#summary #weekChartSubtitle,#summary #weekFootnote,
#summary .week-axis,#summary .week-axis span,#summary .day-bar small,
#summary .chart-axis,#summary .chart-axis span {color:var(--sh-secondary)!important;font-size:12px!important}
#summary .week-chart,#summary .week-metric {background:var(--sh-surface)!important;border-color:var(--sh-border)!important}
#summary .week-metric[aria-pressed=true] {background:var(--sh-feed-surface)!important}
/* V07–V10: Care/Handoff styling only, with no new handoff controls. */
#routineCard.care-space {background:var(--sh-background)!important;color:var(--sh-text)!important}
.care-space .care-subtitle,.care-child-switch,.care-storage,
.care-head>.eyebrow,.care-head>.sub {color:var(--sh-secondary)!important}
.care-empty-important {color:var(--sh-text)!important}
.care-category [id^=careCount],.care-category small {color:var(--sh-text)!important}
.care-handoff-panel,.handoff-latest-item {background:var(--sh-surface)!important;border-color:var(--sh-border)!important}
.handoff-latest-item small,.handoff-latest-item span,
.handoff-caregiver-form>small,.handoff-note-footer small,
#handoffNoteSaved,.handoff-privacy {color:var(--sh-secondary)!important;font-size:12px!important}
.handoff-caregiver-form input,.handoff-note-form textarea {border-color:var(--sh-input-border)!important}
.care-chevron,.more-chevron {color:var(--sh-secondary)!important}
/* V11–V12: More values reflow under the copy instead of 8px cramped text. */
.more-group-title {color:var(--sh-secondary)!important;font-size:12px!important;letter-spacing:.08em}
.more-row {display:grid;grid-template-columns:32px minmax(0,1fr) 20px;gap:4px 12px;min-height:64px;padding:12px!important;border-color:var(--sh-border)!important;color:var(--sh-text)!important}
.more-row-icon {grid-column:1;grid-row:1/span 2}
.more-row-copy {grid-column:2;grid-row:1;min-width:0}
.more-row-copy strong {font-size:14px!important}
.more-row-copy small,.more-child-copy small {color:var(--sh-secondary)!important;font-size:12px!important}
.more-row-value,.more-row.is-planned .more-row-value {grid-column:2;grid-row:2;max-width:none!important;text-align:left;color:var(--sh-secondary)!important;font-size:12px!important;overflow-wrap:anywhere}
.more-chevron {grid-column:3;grid-row:1/span 2;align-self:center}
.more-profile-tools button,.more-edit-child {min-width:44px;min-height:44px}
.more-dialog,.more-list,.more-child-card {background:var(--sh-surface)!important;border-color:var(--sh-border)!important;color:var(--sh-text)!important}
.more-dialog-head p,.more-note,.more-unit-field label {color:var(--sh-secondary)!important;font-size:12px!important}
.more-unit-field {background:var(--sh-surface)!important;border-color:var(--sh-border)!important}
.more-dialog-actions button,.more-dialog-close {min-height:44px;min-width:44px}
/* V13–V17: forms, Add sheet and lower navigation. */
#modal .dialog,#quickSheet {background:var(--sh-surface)!important;border-color:var(--sh-border)!important;color:var(--sh-text)!important}
#modal .field label {font-size:12px!important;color:var(--sh-text)!important}
#modal .close {min-height:44px;min-width:44px;color:var(--sh-secondary)!important}
#quickSheet .sheet-scroll-hint {color:var(--sh-secondary)!important;font-size:12px!important}
#quickSheet button {min-height:44px}
#mobileBottomBar {background:var(--sh-surface)!important;border-color:var(--sh-border)!important;min-height:76px!important}
#mobileBottomBar .mobile-tab {color:var(--sh-secondary)!important;font-size:12px!important;min-height:48px;letter-spacing:0}
#mobileBottomBar .mobile-tab[aria-current=page] {color:var(--sh-primary)!important}
#mobileBottomBar #mobileAddRecord {color:var(--sh-text)!important}
#mobileBottomBar #mobileAddRecord .add-glyph {background:var(--sh-add)!important;color:var(--sh-text)!important}
@media(max-width:760px) {
  #mobileTodayScreen,#mobileWeekScreen,#mobileRoutineScreen,#mobileMoreScreen {padding-bottom:calc(96px + env(safe-area-inset-bottom))!important}
  #mobileMoreScreen .mobile-screen-heading p {font-size:12px!important;color:var(--sh-secondary)!important}
  #todayJournal .today-context .date-picker-trigger #todayDateCaption {font-size:12px!important}
  #summary .week-chart {padding:16px!important}
  #routineCard.care-space {padding:16px!important}
  .care-handoff-panel {padding:16px}
  .handoff-latest-item {padding:12px!important}
  .handoff-caregiver-form label,.handoff-note-form label {font-size:13px!important}
  #soft-hours-landing-prototype .wrap {padding-inline:20px!important}
  #soft-hours-landing-prototype .brand {font-size:22px!important}
  #soft-hours-landing-prototype .hero-copy {font-size:16px!important}
  #soft-hours-landing-prototype .microcopy {font-size:12px!important}
  #soft-hours-landing-prototype .btn {font-size:14px!important}
}
/* UI19 V05/V06 carried into the newly integrated range and growth components. */
#summary .week-range-fields label,
#summary .week-range-help,
#summary .growth-range-heading p,
#summary .growth-range-unit,
#summary .growth-range-empty,
#summary .growth-range-note {color:var(--sh-secondary)!important}
#summary .growth-range-card .growth-axis {fill:var(--sh-secondary)!important}
