@charset "UTF-8";

@font-face{font-family:"IBM Plex Sans Thai";src:url("./fonts/IBMPlexSansThai-Regular.woff2") format("woff2");font-style:normal;font-weight:400;font-display:swap;}
@font-face{font-family:"IBM Plex Sans Thai";src:url("./fonts/IBMPlexSansThai-Medium.woff2") format("woff2");font-style:normal;font-weight:500;font-display:swap;}
@font-face{font-family:"IBM Plex Sans Thai";src:url("./fonts/IBMPlexSansThai-SemiBold.woff2") format("woff2");font-style:normal;font-weight:600;font-display:swap;}


:root {
  --forest: #285b4d;
  --forest-dark: #1c453a;
  --forest-light: #e6efea;
  --ivory: #f0f4f1;
  --surface: #fff;
  --ink: #20332c;
  --muted: #58685f;
  --border: #dce5df;
  --orange: #ad744b;
  --orange-dark: #80502b;
  --orange-light: #faf0e4;
  --blue: #3f6479;
  --blue-light: #eaf1f5;
  --radius: 22px;
  --shadow: 0 3px 14px rgba(24, 44, 35, .035);
  font-family: "IBM Plex Sans Thai", -apple-system, BlinkMacSystemFont, "Thonburi", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body[data-role="caregiver"] {
  --forest: #285b4d; --forest-dark: #1c453a; --forest-light: #e6efea;
  --ivory: #f0f4f1; --ink: #20332c; --muted: #58685f; --border: #dce5df;
}
body[data-role="vhv"] {
  --forest: #8b592f; --forest-dark: #66411f; --forest-light: #f5eadb;
  --ivory: #f7f3ed; --ink: #382f25; --muted: #6d6257; --border: #e8dfd2;
}
body[data-role="clinic"] {
  --forest: #3f5f75; --forest-dark: #2c465a; --forest-light: #e6eef3;
  --ivory: #f0f3f6; --ink: #253541; --muted: #586976; --border: #dce3e9;
}
* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; scrollbar-gutter: stable; }
body { margin: 0; background: var(--ivory); color: var(--ink); font-size: 18px; line-height: 1.55; }
body.sheet-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; opacity: .52; }
a { color: var(--forest); text-underline-offset: 4px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 3px solid #c68a3a; outline-offset: 3px; }
svg { width: 24px; height: 24px; vertical-align: middle; flex: 0 0 auto; }
img { max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 30px; line-height: 1.3; letter-spacing: 0; font-weight: 600; }
h2 { font-size: 24px; line-height: 1.4; font-weight: 600; }
h3 { font-size: 20px; line-height: 1.45; font-weight: 600; }
h4 { font-size: 18px; line-height: 1.45; }
p + p { margin-top: 12px; }
strong { font-weight: 600; }
small, .small { font-size: 16px; line-height: 1.55; }
hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.success-text, .text-green { color: #2e653c; font-weight: 600; }
.text-orange { color: var(--orange-dark); }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.full-width { width: 100%; }
.row { display: flex; align-items: center; gap: 12px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; }
.grid { display: grid; gap: 22px; }
.grid-2, .two-col, .two-column, .form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; }
.grid-3, .three-col { grid-template-columns: repeat(3,minmax(0,1fr)); }
.span-2 { grid-column: span 2; }

.app-shell, .shell { min-height: 100dvh; display: grid; grid-template-columns: 248px minmax(0,1fr); max-width: 1600px; margin: 0 auto; }
.sidebar { background: var(--forest-dark); color: #fff; padding: 32px 18px 24px; position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 28px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark, .logo-mark { width: 46px; height: 46px; border-radius: 15px; background: rgba(255,255,255,.16); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.brand-mark svg { width: 28px; height: 28px; }
.brand-name { display: block; font-size: 27px; line-height: 1.2; letter-spacing: 0; font-weight: 600; }
.brand-dot { color: #e5c8a6; }
.brand-tagline { display: block; font-size: 16px; color: rgba(255,255,255,.8); margin-top: 3px; }
.sidebar-section-label { font-size: 16px; color: rgba(255,255,255,.73); padding: 0 14px; margin-bottom: -18px; }
.nav-list { display: flex; flex-direction: column; gap: 8px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 13px 14px; border: 0; border-radius: 14px; background: transparent; color: #fff; text-align: left; font-size: 18px; text-decoration: none; }
.nav-item:hover { background: rgba(255,255,255,.12); }
.nav-item.active { background: #fff; color: var(--forest-dark); font-weight: 600; }
.nav-count { margin-left: auto; min-width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; font-size: 16px; font-weight: 600; color: var(--forest-dark); background: #f4e4c9; }
.sidebar-bottom { margin-top: auto; }
.sidebar-help { padding: 18px 14px; margin-bottom: 18px; border-radius: 16px; background: rgba(255,255,255,.08); }
.sidebar-help > svg { margin-bottom: 10px; color: #e7d2b6; }
.sidebar-help strong { display: block; }
.sidebar-help p { margin-top: 6px; color: rgba(255,255,255,.8); font-size: 16px; }
.sidebar-footer { margin-top: 18px; padding: 18px 8px 0; border-top: 1px solid rgba(255,255,255,.18); color: rgba(255,255,255,.75); font-size: 16px; }
.main { min-width: 0; width: 100%; padding: 0 36px 44px; }
.topbar { position: sticky; z-index: 35; top: 0; display: flex; align-items: center; gap: 16px; min-height: 88px; margin: 0 -36px 0; padding: 16px 36px; background: var(--forest); color: #fff; }
.mobile-brand { display: flex; align-items: center; gap: 9px; color: #fff; font-size: 25px; font-weight: 600; letter-spacing: 0; white-space: nowrap; text-decoration: none; }
.mobile-brand > svg { width: 28px; height: 28px; }
.mobile-brand span { color: inherit; }
.role-picker { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 8px 13px; border: 1px solid rgba(255,255,255,.32); border-radius: 14px; background: rgba(255,255,255,.1); color: #fff; font-size: 18px; font-weight: 600; white-space: normal; text-align: center; }
.role-picker svg { width: 21px; height: 21px; }
.role-picker:hover { background: rgba(255,255,255,.18); }
.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-button, .topbar-help, .topbar-language { display: inline-flex; align-items: center; justify-content: center; gap: 7px; width: 46px; min-width: 46px; height: 46px; min-height: 46px; padding: 10px; border: 1px solid var(--border); border-radius: 14px; background: #fff; color: var(--forest); flex: 0 0 auto; }
.icon-button:hover { background: var(--forest-light); }
.topbar-help, .topbar-language { border-color: transparent; color: #fff; background: rgba(255,255,255,.1); }
.topbar-help:hover, .topbar-language:hover { background: rgba(255,255,255,.2); }
.topbar-language { width: auto; font-size: 16px; padding: 10px 11px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.85); font-size: 16px; }
.breadcrumb-separator { margin: 0 7px; opacity: .6; }
.role-switcher, .role-switch { display: flex; gap: 5px; padding: 4px; border-radius: 14px; background: rgba(255,255,255,.12); }
.role-button { display: flex; align-items: center; gap: 7px; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 10px; background: transparent; color: #fff; font-size: 16px; }
.role-button.active { color: var(--forest-dark); background: #fff; font-weight: 600; }
.demo-banner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 16px; line-height: 1.5; min-height: 48px; padding: 10px 0; margin-bottom: 8px; }
.demo-chip, .demo-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 16px; font-weight: 500; color: var(--muted); }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--forest); flex-shrink: 0; }
.page-content { min-width: 0; }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 24px; }
.page-header > :first-child { min-width: 0; }
.page-title { font-size: 30px; }
.eyebrow { display: block; font-size: 16px; color: var(--forest); margin-bottom: 7px; font-weight: 600; }
.subtitle, .page-description { color: var(--muted); margin-top: 8px; max-width: 680px; }
.child-picker { display: flex; flex-direction: column; gap: 6px; min-width: 220px; max-width: 100%; color: var(--muted); font-size: 16px; }
.child-picker .select { min-width: 0; color: var(--ink); font-size: 18px; }
.content-footer { display: flex; flex-wrap: wrap; gap: 9px 24px; color: var(--muted); font-size: 16px; margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--border); }
.content-footer span { display: inline-flex; align-items: center; gap: 7px; }
.content-footer svg { width: 18px; height: 18px; }
.bottom-nav { display: none; }

.card, .panel, .appointment-card { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card + .card { margin-top: 20px; }
.grid > .card, .stack > .card, .stat-grid > .card, .home-secondary > .card { margin-top: 0; }
.page-content > .card, .page-content > .grid, .page-content > .notice { margin-bottom: 22px; }
.card-header, .panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.card-title { font-size: 22px; }
.card-subtitle { color: var(--muted); font-size: 16px; margin-top: 5px; }
.section-heading, .section-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 28px 0 16px; }
.section-heading:first-child { margin-top: 0; }
.section-heading p { margin-top: 5px; color: var(--muted); }
.hero, .hero-card, .hero-illustration, .hero-mini-icon { display: none; }
.icon-box, .household-avatar, .avatar, .child-avatar { width: 50px; height: 50px; display: inline-flex; align-items: center; justify-content: center; border-radius: 16px; background: var(--forest-light); color: var(--forest); flex: 0 0 auto; font-size: 22px; font-weight: 600; }
.icon-box.soft { background: var(--forest-light); }
.icon-box.orange { background: var(--orange-light); color: var(--orange-dark); }
.icon-box.blue { background: var(--blue-light); color: var(--blue); }
.avatar.small, .avatar-sm { width: 44px; height: 44px; border-radius: 14px; font-size: 18px; }

.button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 54px; padding: 13px 18px; border: 1px solid var(--border); border-radius: 15px; background: #fff; color: var(--ink); font-size: 18px; font-weight: 600; line-height: 1.45; text-align: center; text-decoration: none; transition: background .15s, transform .15s; }
.button:hover, .btn:hover { background: var(--ivory); }
.button:active, .btn:active, .quick-action:active { transform: scale(.985); }
.button.primary, .btn-primary { background: var(--forest); border-color: var(--forest); color: #fff; }
.button.primary:hover, .btn-primary:hover { background: var(--forest-dark); border-color: var(--forest-dark); }
.button.secondary, .btn-secondary { background: var(--forest-light); border-color: transparent; color: var(--forest-dark); }
.button.ghost, .btn-ghost { background: transparent; border-color: transparent; color: var(--forest); }
.button.danger, .btn-danger { color: #913c32; background: #fbedeb; border-color: #eed5d0; }
.button.ghost:hover { background: var(--forest-light); }
.text-button, .link-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 0; border: 0; border-radius: 8px; background: transparent; color: var(--forest); font-size: 18px; font-weight: 600; text-align: left; line-height: 1.45; }
.text-button:hover, .link-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.actions, .button-row, .form-actions, .queue-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.badge { display: inline-flex; align-items: center; justify-content: center; padding: 5px 11px; border-radius: 10px; font-size: 16px; line-height: 1.45; font-weight: 600; color: #5b645e; background: #eef1ee; text-align: center; }
.badge.success, .badge.green, .badge-confirmed, .badge-completed { color: #2b6339; background: #e7f2e9; }
.badge.warning, .badge.orange, .badge-pending, .badge-requested { color: #825321; background: #fcf0dc; }
.badge.info, .badge.blue, .badge-suggested { color: #3b6179; background: #e7f0f6; }
.badge.danger, .badge.red { color: #8b3e34; background: #f9e7e3; }
.notice { display: flex; align-items: flex-start; gap: 12px; padding: 18px; margin: 20px 0; border-radius: 16px; color: var(--forest-dark); background: var(--forest-light); font-size: 18px; }
.notice > svg { margin-top: 2px; }
.notice .icon-box { width: 38px; height: 38px; border-radius: 12px; background: rgba(255,255,255,.5); }
.notice p { margin-top: 5px; }
.notice.info { color: #35556e; background: var(--blue-light); }
.notice.warning { color: #7b4a28; background: var(--orange-light); }
.notice.compact { padding: 14px 16px; }
.notice.small { font-size: 16px; }

.home-primary { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(250px,1fr); gap: 22px; margin-bottom: 22px; align-items: stretch; }
.home-secondary { display: block; }
.home-secondary > .helper-card { margin-bottom: 24px; }
.helper-card .button { margin-top: 12px; }
.helper-card h2 { font-size: 22px; }
.helper-card p { color: var(--muted); font-size: 18px; margin-top: 4px; }
.quick-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; align-content: stretch; }
.quick-action { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 14px; padding: 20px; min-height: 128px; border: 1px solid var(--border); border-radius: 20px; color: var(--ink); background: #fff; font-size: 18px; font-weight: 600; line-height: 1.45; text-align: left; box-shadow: var(--shadow); }
.quick-action > svg { width: 29px; height: 29px; color: var(--forest); }
.quick-action .icon-box { width: 48px; height: 48px; border-radius: 15px; }
.quick-action .icon-box svg { width: 28px; height: 28px; }
.home-primary .quick-actions:not(.home-tools) > .quick-action:last-child:nth-child(odd) { grid-column: 1 / -1; }
.quick-action:hover { border-color: var(--forest); }
.child-card .row { align-items: flex-start; }
.child-card .row.between { flex-wrap: wrap; }
.child-card p { margin-top: 4px; }
.child-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 18px 0; margin: 18px 0 4px; border-top: 1px solid var(--border); }
.child-summary > div { display: flex; flex-direction: column; gap: 3px; }
.child-summary > div + div { border-left: 1px solid var(--border); padding-left: 18px; }
.child-summary strong { color: var(--forest); font-size: 29px; line-height: 1.25; }
.child-summary span { color: var(--muted); font-size: 16px; }
.appointment-card.featured { border-color: var(--forest); }
.appointment-heading { display: flex; align-items: center; gap: 12px; }
.appointment-heading > .row { flex: 1 1 auto; min-width: 0; gap: 8px; }
.appointment-heading .icon-box { width: 44px; height: 44px; border-radius: 14px; }
.appointment-heading h2, .appointment-heading h3 { font-size: 20px; }
.appointment-heading > .badge { margin-left: auto; max-width: 145px; flex: 0 1 auto; }
.appointment-card .appointment-date { display: block; margin: 20px 0 2px; color: var(--forest); font-size: 32px; line-height: 1.35; letter-spacing: 0; font-weight: 600; }
.appointment-time { display: flex; align-items: center; gap: 9px; margin-bottom: 18px; color: var(--muted); font-size: 20px; }
.appointment-place { color: var(--ink); line-height: 1.5; }
.appointment-card > h3 { margin-bottom: 8px; }
.appointment-card > p.row { align-items: flex-start; margin: 12px 0; }
.appointment-card > p.row svg { margin-top: 3px; width: 22px; height: 22px; }
.appointment-actions { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--border); padding-top: 20px; margin-top: 20px; }
.appointment-actions .button { width: 100%; }
.appointment-actions .success-text { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.appointment-footnote { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 16px; }
.stat-grid, .stats-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin: 0 0 24px; }
.stat-card { padding: 20px; margin: 0; border: 1px solid var(--border); border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.stat-heading { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; color: var(--muted); font-size: 16px; line-height: 1.45; }
.stat-heading > svg { color: var(--forest); }
.stat-label { font-size: 16px; line-height: 1.45; color: var(--muted); }
.stat-heading .icon-box { width: 36px; height: 36px; border-radius: 12px; }
.stat-heading .icon-box svg { width: 21px; height: 21px; }
.stat-value, .stat-number { display: block; color: var(--forest); font-size: 36px; line-height: 1.25; font-weight: 600; margin: 13px 0 4px; }
.stat-value > span { font-size: 16px; color: var(--muted); font-weight: 500; margin-left: 5px; }
.stat-card > p { margin-top: 6px; font-size: 16px; color: var(--muted); }

.filter-toolbar, .filters, .toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 22px; }
.search-field { display: block; position: relative; flex: 1; min-width: 220px; }
.search-field svg { position: absolute; left: 16px; top: 16px; width: 22px; height: 22px; color: var(--muted); }
.search-field .input { padding-left: 49px; }
.filter-tabs, .filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-tab, .chip { min-height: 46px; padding: 9px 15px; border: 1px solid var(--border); border-radius: 13px; background: #fff; color: var(--muted); font-size: 16px; }
.filter-tab.active, .chip.active { color: #fff; border-color: var(--forest); background: var(--forest); font-weight: 600; }
.household-list { display: flex; flex-direction: column; gap: 14px; }
.household-row { padding: 22px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.household-row > .row { align-items: flex-start; }
.household-row > .row > div:first-child { flex: 1; min-width: 0; }
.household-row > .row > .badge { flex: 0 1 auto; max-width: 50%; }
.household-row p { color: var(--muted); margin-top: 6px; }
.household-row h3 .small { display: inline; font-weight: 500; margin-left: 5px; }
.household-actions { display: flex; flex-direction: column; align-items: stretch; gap: 12px; margin-top: 18px; }
.household-appointment { padding: 16px 0 0; border-top: 1px solid var(--border); margin-top: 16px !important; }
.household-appointment strong { color: var(--ink); font-size: 20px; }
.household-actions > .row { flex-wrap: wrap; gap: 10px; }
.household-actions > .row > .button { flex: 1; }
.household-actions .button { min-height: 54px; }
.card > .household-list > .household-row { padding: 22px 0; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; }
.card > .household-list > .household-row:first-child { padding-top: 0; }
.card > .household-list > .household-row:last-child { padding-bottom: 0; border-bottom: 0; }
.card.queue-item { margin-bottom: 20px; }
.queue-item > .row.between, .queue-item > .row.between > .row { align-items: flex-start; }
.queue-item p { margin-top: 5px; }
.queue-details { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; border-top: 1px solid var(--border); padding-top: 20px; margin: 20px 0; }
.queue-details > p { margin-top: 0; }
.queue-details > .notice { grid-column: 1 / -1; margin: 0; }
.request-detail { padding: 18px; color: var(--forest-dark); background: var(--forest-light); border-radius: 16px; }
.queue-actions { margin-top: 0; }
.checklist { margin-top: 18px; }
.checklist p { display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; }
.checklist svg { margin-top: 3px; color: var(--forest); }
.record-list { padding: 24px 0 16px; }
.record-item { display: flex; align-items: flex-start; gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--border); }
.record-item:first-child { padding-top: 0; }
.record-item:last-child { border-bottom: 0; }
.record-main { flex: 1; min-width: 0; }
.record-item p { margin-top: 4px; color: var(--muted); }
.record-item > .badge { max-width: 145px; }
.timeline { margin: 22px 0; }
.timeline-item { position: relative; padding: 0 0 22px 26px; border-left: 2px solid var(--border); margin-left: 7px; }
.timeline-item::before { content: ""; position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--forest); border: 3px solid #fff; left: -7px; top: 7px; }
.timeline-item:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline-item p { margin-bottom: 4px; }
.timeline-dot { display: none; }
.table-wrap { overflow-x: auto; overscroll-behavior-x: contain; margin: 20px -4px 0; }
.data-table, table { width: 100%; border-collapse: collapse; text-align: left; font-size: 18px; }
.data-table th, table th { padding: 14px 12px; background: var(--ivory); color: var(--muted); font-size: 16px; font-weight: 600; white-space: nowrap; }
.data-table td, table td { padding: 18px 12px; border-bottom: 1px solid var(--border); vertical-align: top; min-width: 110px; }
.data-table td:first-child { min-width: 200px; }
.data-table tr:last-child td { border-bottom: 0; }

.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.calendar-toolbar h3 { font-size: 20px; }
.calendar-toolbar > .row { gap: 6px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 5px; }
.calendar-weekday { padding: 4px 0 9px; color: var(--muted); text-align: center; font-size: 16px; }
.calendar-day { min-width: 0; min-height: 50px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 5px 0; border: 1px solid transparent; border-radius: 13px; background: #f4f6f3; color: #78827b; font-size: 18px; line-height: 1.2; }
.calendar-day:disabled { opacity: .72; }
.calendar-day.available { background: var(--forest-light); border-color: var(--forest-light); color: var(--forest-dark); font-weight: 600; }
.calendar-day.available:hover { border-color: var(--forest); }
.calendar-day.today { border: 2px solid var(--forest); }
.calendar-day.selected { color: #fff; background: var(--forest); }
.calendar-day.outside { visibility: hidden; }
.calendar-dot { display: block; width: 5px; height: 5px; border-radius: 50%; background: var(--forest); margin: 4px auto 0; }
.calendar-legend { display: flex; align-items: center; gap: 8px; margin: 18px 0 8px; font-size: 16px; color: var(--muted); }
.calendar-legend .calendar-dot { flex-shrink: 0; margin: 0; width: 7px; height: 7px; }
.service-list { margin: 14px 0 20px; }
.service-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.service-row:last-child { border-bottom: 0; }
.service-row h3 { font-size: 20px; }
.service-row p { color: var(--muted); margin-top: 4px; }
.service-row > .badge { flex: 0 1 auto; max-width: 45%; }
.calendar-details { margin-top: 20px; border-top: 1px solid var(--border); }
.calendar-details > summary { cursor: pointer; padding: 17px 0; min-height: 54px; color: var(--forest); font-weight: 600; }
.calendar-details > .calendar-toolbar { margin-top: 12px; }
.clinic-choice { gap: 12px; }
.clinic-choice > span:nth-child(2) { display: flex; flex: 1; flex-direction: column; gap: 3px; min-width: 0; }
.clinic-choice > span:nth-child(2) > span { font-size: 16px; color: var(--muted); }
.clinic-card h3 { margin-top: 16px; }
.clinic-card p { margin-top: 7px; }
.clinic-card .button { width: 100%; margin-top: 20px; }
.lesson-list { display: flex; flex-direction: column; gap: 14px; }
.lesson-list .lesson-card { margin-top: 0; }
.lesson-card.card { display: flex; align-items: center; gap: 16px; padding: 20px; overflow: hidden; text-align: left; color: var(--ink); transition: border-color .15s; }
.lesson-card:hover { border-color: var(--forest); }
.lesson-visual { width: 52px; height: 52px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; color: var(--forest); background: var(--forest-light); border-radius: 16px; }
.lesson-visual svg { width: 29px; height: 29px; }
.lesson-copy { flex: 1; min-width: 0; }
.lesson-copy h3 { font-size: 20px; }
.lesson-copy p { margin-top: 6px; font-size: 16px; color: var(--muted); }
.lesson-card > svg { width: 22px; height: 22px; color: var(--forest); }
.lesson-body { line-height: 1.75; }
.empty-state { padding: 32px 24px; border-radius: 18px; background: var(--ivory); color: var(--muted); text-align: center; }
.empty-state > svg { width: 38px; height: 38px; color: var(--forest); margin-bottom: 12px; }
.empty-state h3 { color: var(--ink); margin-bottom: 7px; }
.progress-track, .progress-bar { height: 9px; border-radius: 99px; background: var(--forest-light); overflow: hidden; margin: 12px 0; }
.progress-fill, .progress-bar > span { height: 100%; display: block; border-radius: inherit; background: var(--forest); }

.field, .form-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; min-width: 0; }
.label, .field > label, .form-field > label { color: var(--ink); font-size: 18px; font-weight: 600; }
.input, .select, .textarea, .form-field input, .form-field select, .form-field textarea { width: 100%; min-width: 0; min-height: 54px; padding: 13px 15px; border: 1px solid #becbc2; border-radius: 14px; background: #fff; color: var(--ink); font-size: 18px; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: #758178; }
.textarea { min-height: 116px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--forest); }
.field small, .form-field small, .help-text { color: var(--muted); font-size: 16px; }
.session-fieldset { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.session-fieldset legend { padding: 0; margin-bottom: 9px; }
.selection-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 18px 0; }
.session-option { display: flex; align-items: flex-start; gap: 12px; padding: 17px; margin-top: 10px; min-height: 70px; border: 1px solid var(--border); border-radius: 16px; background: #fff; color: var(--ink); cursor: pointer; }
.session-option.selected { border-color: var(--forest); box-shadow: inset 0 0 0 1px var(--forest); background: var(--forest-light); }
.session-option.unavailable { color: var(--muted); background: #f1f3f0; cursor: default; }
.session-option > input[type="radio"] { appearance: auto; width: 22px; height: 22px; flex: 0 0 auto; margin: 3px 0 0; accent-color: var(--forest); }
.session-option > span { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.session-option > span:last-child:not(:first-of-type) { margin-left: auto; text-align: right; font-size: 16px; }
.session-option strong { display: block; }
.form-error:empty { display: none; }
.form-error:not(:empty) { color: #913c32; background: #fbedeb; padding: 14px 16px; margin: 12px 0; border-radius: 13px; font-size: 16px; }
.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: flex; align-items: center; justify-content: center; padding: 26px; background: rgba(14,27,22,.45); backdrop-filter: blur(4px); }
.modal { width: min(640px,100%); max-height: calc(100dvh - 52px); display: flex; flex-direction: column; padding: 0 26px; border-radius: 27px; background: #fff; color: var(--ink); box-shadow: 0 24px 80px rgba(0,0,0,.16); overflow: hidden; }
.modal.wide { width: min(820px,100%); }
.sheet-handle { display: none; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 26px 0 20px; flex: 0 0 auto; background: #fff; }
.modal-header h2 { align-self: center; font-size: 25px; line-height: 1.4; }
.modal-header .icon-button { background: var(--ivory); border-color: transparent; border-radius: 50%; }
.modal-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 1px 24px; -webkit-overflow-scrolling: touch; }
.modal-body > h3 { margin: 24px 0 12px; }
.modal-body > p + form { margin-top: 22px; }
.modal-body > p + .appointment-card { margin-top: 20px; }
.modal-body > .notice:first-child { margin-top: 0; }
.modal-body > :last-child { margin-bottom: 0; }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 18px 0 24px; border-top: 1px solid var(--border); flex-shrink: 0; background: #fff; }
.modal-body .modal-footer { position: sticky; bottom: -24px; padding-bottom: 12px; margin: 0 -1px -12px; box-shadow: 0 -8px 18px rgba(255,255,255,.94); }
.modal-footer > .button { flex: 1; }
.role-options, .language-options { display: flex; flex-direction: column; gap: 12px; }
.role-option, .language-option { width: 100%; display: flex; align-items: center; gap: 15px; min-height: 88px; padding: 18px; border: 1px solid var(--border); border-radius: 18px; background: #fff; color: var(--ink); text-align: left; font-size: 18px; }
.role-option.selected, .language-option.selected { border-color: var(--forest); box-shadow: inset 0 0 0 1px var(--forest); background: var(--forest-light); }
.role-swatch { width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; border-radius: 15px; color: #fff; background: var(--forest); flex-shrink: 0; }
.role-option[data-role="caregiver"] .role-swatch, .role-swatch.caregiver { background: #285b4d; }
.role-option[data-role="vhv"] .role-swatch, .role-swatch.vhv { background: #8b592f; }
.role-option[data-role="clinic"] .role-swatch, .role-swatch.clinic { background: #3f5f75; }
.role-option-copy { flex: 1; min-width: 0; }
.role-option-copy strong, .language-option strong { display: block; font-size: 20px; }
.role-option-copy p, .role-option-copy > span, .language-option p, .language-option > span > span { display: block; margin-top: 3px; font-size: 17px; color: var(--muted); }
.language-option > span { flex: 1; min-width: 0; }
.language-options + p, .role-options + p { margin-top: 18px; font-size: 16px; }
.settings-list { display: flex; flex-direction: column; }
.settings-row { width: 100%; display: flex; align-items: center; gap: 14px; min-height: 66px; padding: 16px 4px; border: 0; border-bottom: 1px solid var(--border); background: #fff; color: var(--ink); font-size: 18px; text-align: left; }
.settings-row:last-child { border-bottom: 0; }
.settings-row > svg:first-child { color: var(--forest); }
.settings-row > svg:last-child:not(:first-child) { margin-left: auto; color: var(--muted); }
.emergency-number { display: flex; align-items: center; gap: 18px; padding: 22px; margin-bottom: 20px; color: #8a442d; background: #fcf0e9; border-radius: 18px; }
.emergency-number > svg { width: 36px; height: 36px; }
.emergency-number strong { display: block; font-size: 46px; line-height: 1.2; letter-spacing: 1px; }
.toast { position: fixed; z-index: 150; left: 50%; bottom: 28px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; width: max-content; max-width: calc(100vw - 32px); padding: 15px 20px; border-radius: 16px; background: var(--forest-dark); color: #fff; font-size: 16px; text-align: center; box-shadow: 0 6px 24px rgba(0,0,0,.17); }

@media (max-width: 1200px) {
  .app-shell, .shell { grid-template-columns: 220px minmax(0,1fr); }
  .main { padding-right: 26px; padding-left: 26px; }
  .topbar { margin-right: -26px; margin-left: -26px; padding-right: 26px; padding-left: 26px; }
  .home-primary { grid-template-columns: minmax(0,1.2fr) minmax(210px,1fr); }
  .quick-action { padding: 18px; }
  .grid-3 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stat-grid.grid-3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .stat-card { padding: 18px 16px; }
  .stat-heading .icon-box { display: none; }
}
@media (max-width: 960px) {
  .app-shell, .shell { grid-template-columns: 195px minmax(0,1fr); }
  .sidebar { padding: 28px 12px; }
  .brand { gap: 8px; }
  .brand-mark { width: 38px; height: 38px; border-radius: 12px; }
  .brand-name { font-size: 23px; }
  .brand-tagline { font-size: 16px; }
  .nav-item { padding: 12px 10px; gap: 10px; }
  .main { padding-left: 22px; padding-right: 22px; }
  .topbar { margin-left: -22px; margin-right: -22px; padding-left: 22px; padding-right: 22px; gap: 10px; }
  .topbar .mobile-brand { display: none; }
  .home-primary, .grid-2, .two-col, .two-column { grid-template-columns: minmax(0,1fr); }
  .quick-actions { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .quick-action { min-height: 124px; padding: 16px 12px; font-size: 16px; }
  .page-header { align-items: flex-start; flex-direction: column; gap: 16px; }
  .child-picker { width: 100%; }
  .queue-details { grid-template-columns: minmax(0,1fr); }
  .stat-grid, .stats-grid { gap: 10px; }
  .stat-card { padding: 16px 12px; }
  .stat-value { font-size: 32px; }
  .stat-card > p { display: none; }
  .household-actions { padding-left: 0; }
}
@media (max-width: 700px) {
  .app-shell, .shell { display: block; }
  .sidebar { display: none; }
  .main { max-width: 560px; margin: 0 auto; padding: 0 16px calc(110px + env(safe-area-inset-bottom)); }
  .topbar { flex-wrap: wrap; gap: 8px; margin: 0 -16px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; min-height: 72px; }
  .topbar .mobile-brand { display: flex; flex: 1; gap: 7px; font-size: 23px; }
  .mobile-brand > svg { width: 24px; height: 24px; }
  .role-picker { order: 3; width: 100%; justify-content: center; margin-left: 0; padding: 7px 10px; min-height: 44px; gap: 7px; font-size: 18px; border-radius: 13px; }
  .role-picker svg { width: 18px; height: 18px; }
  .topbar-actions { margin-left: auto; gap: 3px; }
  .topbar-help, .topbar-language { width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 9px; border-radius: 12px; }
  .topbar-language { width: auto; padding: 9px 7px; }
  .topbar-language > svg { display: none; }
  .topbar .breadcrumb { display: none; }
  .role-switcher { margin-left: auto; }
  .role-button { padding: 8px; gap: 4px; }
  .role-button svg { display: none; }
  .demo-banner { min-height: 44px; margin-bottom: 7px; padding: 10px 2px; gap: 5px; font-size: 16px; }
  .page-header { align-items: stretch; gap: 14px; margin-bottom: 18px; }
  .page-title, h1 { font-size: 28px; }
  h2 { font-size: 23px; }
  .page-header .eyebrow, .page-header .subtitle { display: none; }
  .child-picker { gap: 0; }
  .child-picker > .small { display: none; }
  .child-picker .select { height: 54px; background: #fff; }
  .card, .panel, .appointment-card { padding: 20px; border-radius: 21px; }
  .grid, .home-primary, .home-secondary { gap: 16px; }
  .grid-3, .three-col, .form-grid { grid-template-columns: minmax(0,1fr); }
  .grid > .card { margin-top: 0; }
  .page-content > .card, .page-content > .grid, .page-content > .notice { margin-bottom: 18px; }
  .home-primary { display: flex; flex-direction: column; margin-bottom: 18px; }
  .home-secondary { display: block; }
  .home-secondary > .card { margin-top: 0; }
  .quick-actions { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .quick-action { padding: 18px; min-height: 112px; gap: 12px; border-radius: 18px; font-size: 18px; }
  .quick-action > svg { width: 28px; height: 28px; }
  .appointment-heading { align-items: flex-start; gap: 10px; flex-wrap: wrap; }
  .appointment-heading .icon-box { width: 42px; height: 42px; border-radius: 13px; }
  .appointment-heading > .badge { margin-left: 0; max-width: none; }
  .appointment-card .appointment-date { font-size: 30px; margin-top: 18px; }
  .appointment-time { font-size: 20px; margin-bottom: 16px; }
  .appointment-actions { margin-top: 18px; padding-top: 18px; }
  .appointment-footnote { font-size: 16px; }
  .section-heading { margin: 25px 0 15px; align-items: flex-start; gap: 12px; }
  .section-heading .text-button { font-size: 16px; min-width: max-content; padding: 4px 0; }
  .child-summary { margin-top: 16px; padding: 16px 0 10px; }
  .child-card .row.between { gap: 12px; }
  .child-card .row.between > .row { gap: 12px; }
  .stat-grid, .stats-grid, .stat-grid.grid-3 { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; margin-bottom: 20px; }
  .stat-card { padding: 16px 12px; border-radius: 18px; }
  .stat-label { display: block; min-height: 46px; font-size: 16px; }
  .stat-value { margin: 9px 0 0; font-size: 32px; }
  .stat-value > span { display: block; margin-left: 0; margin-top: 2px; }
  .stat-heading .icon-box, .stat-card > p { display: none; }
  .household-row { padding: 20px; }
  .household-row > .row { gap: 12px; }
  .household-row h3 .small { display: block; margin-left: 0; }
  .household-actions > .row { width: 100%; }
  .household-actions > .row > .button { flex: 1 1 140px; padding-left: 12px; padding-right: 12px; }
  .household-actions .button.ghost { flex: 0 0 auto; }
  .filter-toolbar { gap: 14px; }
  .search-field { width: 100%; min-width: 0; flex-basis: 100%; }
  .filter-tabs { width: 100%; gap: 7px; }
  .filter-tab { padding: 9px 12px; }
  .queue-item > .row.between { flex-wrap: wrap; gap: 14px; }
  .queue-item > .row.between > .row { gap: 12px; }
  .queue-details { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .queue-actions { flex-direction: column; }
  .queue-actions .button { width: 100%; }
  .record-item { flex-wrap: wrap; gap: 12px; }
  .record-item > .record-main { min-width: calc(100% - 64px); }
  .record-item > .badge { max-width: none; margin-left: 62px; }
  .record-item > .icon-box { width: 44px; height: 44px; border-radius: 14px; }
  .notice { padding: 16px; gap: 10px; }
  .notice > svg { width: 22px; height: 22px; }
  .calendar-toolbar { gap: 8px; margin-bottom: 14px; }
  .calendar-toolbar h3 { font-size: 20px; }
  .calendar-toolbar .icon-button { width: 44px; min-width: 44px; height: 44px; min-height: 44px; }
  .calendar-grid { gap: 4px; margin-left: -8px; margin-right: -8px; }
  .calendar-day { min-height: 46px; border-radius: 12px; }
  .calendar-weekday { font-size: 16px; }
  .calendar-legend { align-items: flex-start; line-height: 1.5; }
  .calendar-legend .calendar-dot { margin-top: 8px; }
  .lesson-card.card { gap: 13px; padding: 18px; }
  .lesson-visual { width: 44px; height: 44px; border-radius: 14px; }
  .lesson-visual > svg { width: 26px; height: 26px; }
  .lesson-copy h3 { font-size: 20px; }
  .selection-grid { grid-template-columns: minmax(0,1fr); }
  .session-option { flex-wrap: wrap; padding: 16px; gap: 10px; }
  .session-option > span { flex: 1; }
  .session-option > span:last-child:not(:first-of-type) { flex-basis: 100%; margin-left: 32px; text-align: left; }
  .bottom-nav { position: fixed; z-index: 40; bottom: 0; left: 0; right: 0; display: flex; align-items: stretch; padding: 7px max(8px,calc((100vw - 560px) / 2)) calc(7px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.97); border-top: 1px solid var(--border); box-shadow: 0 -3px 18px rgba(20,40,30,.04); backdrop-filter: blur(15px); }
  .bottom-nav-item, .bottom-nav button { min-width: 0; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 62px; padding: 5px 3px; border: 0; border-radius: 16px; background: transparent; color: var(--muted); font-size: 16px; line-height: 1.4; text-decoration: none; }
  .bottom-nav svg { width: 25px; height: 25px; }
  .bottom-nav-item.active { background: var(--forest-light); color: var(--forest); font-weight: 600; }
  .modal-backdrop { align-items: flex-end; padding: 0; background: rgba(14,27,22,.42); }
  .modal { width: 100%; max-width: 560px; max-height: calc(100dvh - max(24px,env(safe-area-inset-top))); padding: 0 22px; border-radius: 28px 28px 0 0; box-shadow: 0 -12px 40px rgba(0,0,0,.12); }
  .sheet-handle { display: block; align-self: center; flex-shrink: 0; width: 38px; height: 5px; background: #c6ccc7; border-radius: 99px; margin: 10px auto 0; }
  .modal-header { padding: 16px 0 18px; gap: 14px; }
  .modal-header h2 { font-size: 25px; }
  .modal-header .icon-button { width: 44px; min-width: 44px; height: 44px; min-height: 44px; }
  .modal-body { padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
  .modal-footer { flex-direction: column-reverse; align-items: stretch; gap: 8px; padding: 16px 0 calc(18px + env(safe-area-inset-bottom)); }
  .modal-footer .button { width: 100%; flex: none; }
  .modal-body .modal-footer { bottom: calc(-22px - env(safe-area-inset-bottom)); padding-bottom: calc(14px + env(safe-area-inset-bottom)); margin-bottom: calc(-14px - env(safe-area-inset-bottom)); }
  .role-option, .language-option { padding: 17px; min-height: 88px; }
  .role-option-copy strong, .language-option strong { font-size: 20px; }
  .role-swatch { width: 46px; height: 46px; }
  .content-footer { margin-top: 28px; padding-top: 16px; gap: 8px; }
  .toast { bottom: calc(94px + env(safe-area-inset-bottom)); padding: 14px 17px; }
  .span-2 { grid-column: auto; }
}
@media (max-width: 380px) {
  .main { padding-left: 14px; padding-right: 14px; }
  .topbar { margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 14px; flex-wrap: wrap; gap: 8px; }
  .topbar .mobile-brand { flex: 1; }
  .role-picker { order: 3; margin-left: 0; min-height: 44px; width: 100%; justify-content: center; }
  .topbar-actions { margin-left: auto; }
  .page-title, h1 { font-size: 26px; }
  .card, .panel, .appointment-card { padding: 18px; }
  .calendar-grid { margin-left: -12px; margin-right: -12px; gap: 2px; }
  .calendar-day { min-height: 44px; }
  .stat-grid, .stat-grid.grid-3 { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .stat-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; }
  .stat-label { min-height: 0; font-size: 18px; }
  .stat-value { margin: 0; text-align: right; min-width: 62px; }
  .stat-value > span { display: inline; margin-left: 4px; }
  .appointment-card .appointment-date { font-size: 28px; }
  .modal { padding-left: 18px; padding-right: 18px; }
  .modal-header h2 { font-size: 23px; }
  .lesson-card.card { padding: 16px; gap: 10px; }
  .lesson-visual { width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  body { background: #fff; font-size: 12pt; }
  .app-shell { display: block; }
  .sidebar, .topbar, .bottom-nav, .modal-backdrop, .toast, .button, .text-button, .quick-actions { display: none !important; }
  .main { padding: 0; max-width: none; }
  .card, .appointment-card, .stat-card { box-shadow: none; break-inside: avoid; }
}

/* A child and one clear next step on the home screen. */
.child-profile { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:4px 4px 14px; }
.child-profile-copy { min-width:0; flex:1; }
.child-profile .child-picker { min-width:0; width:100%; max-width:300px; }
.child-profile .select { min-height:48px; padding:2px 26px 2px 0; border:0; border-radius:0; background:transparent; font-size:27px; font-weight: 600; line-height:1.4; }
.child-current-age { margin-top:6px; font-size:20px; color:var(--ink); }
.child-birth-date { margin-top:5px; color:var(--muted); font-size:17px; }
.home-tools { grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.home-tools .quick-action { min-height:108px; align-items:center; text-align:center; gap:10px; padding:16px 10px; }
.home-tools .quick-action strong { font-size:18px; font-weight:600; }
.home-tools .icon-box { width:44px; height:44px; background:transparent; }
.quiet-support { margin-top:12px; padding:14px 0; justify-content:flex-start; }
.knowledge-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; padding:8px 0; }
.knowledge-button { display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:22px; min-height:170px; padding:25px; border:1px solid var(--border); border-radius:22px; background:#fff; color:var(--ink); text-align:left; font-size:21px; font-weight: 600; line-height:1.45; box-shadow:var(--shadow); }
.knowledge-icon { display:inline-flex; color:var(--forest); }
.knowledge-button:hover { background:var(--forest-light); }
.knowledge-button:active { transform:scale(.98); }
.article-sheet .modal-header { border-bottom:1px solid var(--border); padding-bottom:18px; margin-bottom:22px; }
.article-sheet .modal-header h2 { font-size:26px; }
.knowledge-article { max-width:38em; margin:0 auto; color:var(--ink); font-size:20px; line-height:1.85; font-weight:400; }
.knowledge-article > p { margin:0 0 23px; }
.knowledge-article strong { font-weight: 600; }
.knowledge-article .article-urgent { padding:18px; border-left:4px solid #b77454; background:#fbf1e9; border-radius:3px 14px 14px 3px; color:#683b28; }
.article-sources { margin-top:32px; padding-top:21px; border-top:1px solid var(--border); }
.article-sources > p { font-size:18px; font-weight:600; margin:0 0 10px; }
.article-sources a { display:flex; align-items:center; justify-content:space-between; gap:15px; min-height:54px; padding:12px 0; border-bottom:1px solid var(--border); color:var(--forest); font-size:17px; line-height:1.55; text-decoration:none; }
.article-sources a:last-child { border-bottom:0; }
.article-sources a:hover { text-decoration:underline; }
.article-sources a > svg { flex-shrink:0; transform:rotate(-45deg); }
@media(min-width:901px){
 .child-profile { max-width:640px; padding:4px 20px 18px 0; }
 .knowledge-grid { max-width:850px; grid-template-columns:repeat(2,minmax(0,1fr)); }
 .knowledge-button { min-height:175px; }
}
@media(max-width:700px){
 .child-profile { gap:4px; padding-top:0; padding-bottom:14px; }
 .child-profile .select { font-size:25px; }
 .child-current-age { font-size:19px; }
 .home-primary .home-tools { grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }
 .home-tools .quick-action { min-height:106px; padding:14px 7px; gap:6px; }
 .home-tools .quick-action strong { font-size:17px; }
 .knowledge-grid { gap:14px; padding-top:6px; }
 .knowledge-button { min-height:158px; padding:23px; gap:23px; font-size:21px; }
 .article-sheet { max-height:calc(100dvh - env(safe-area-inset-top) - 12px); }
 .knowledge-article { font-size:20px; line-height:1.85; }
}
@media(max-width:360px){
 .child-profile .select { font-size:23px; }
 .child-current-age { font-size:18px; }
 .child-birth-date { font-size:17px; }
 .knowledge-button { min-height:142px; padding:19px; font-size:20px; }
 .home-tools .quick-action strong { font-size:17px; }
}

.doicare-mark{width:30px;height:30px;flex:0 0 auto;}
.brand-mark .doicare-mark{width:32px;height:32px;}
.mobile-brand{font-weight:600;letter-spacing:-.3px;}
.role-picker{font-weight:500;}
.button,.btn,.quick-action,.text-button{font-weight:500;}
.page-title,h1,h2,h3,.appointment-date{font-weight:600;}
.knowledge-button{font-weight:500;}
.demo-banner{min-height:38px;margin-bottom:5px;padding:7px 2px;}
@media(max-width:700px){.bottom-nav-item,.bottom-nav button{font-size:16px;}.topbar .mobile-brand{font-size:24px;}.mobile-brand .doicare-mark{width:29px;height:29px;}}

/* An optional reading size keeps the same tasks and familiar layout. */
body.large-text { font-size:20px; line-height:1.65; }
body.large-text .modal-body,
body.large-text .notice { font-size:20px; }
body.large-text .button,
body.large-text .btn,
body.large-text .text-button,
body.large-text .quick-action,
body.large-text .home-tools .quick-action strong,
body.large-text .input,
body.large-text .select,
body.large-text .textarea,
body.large-text .form-field input,
body.large-text .form-field select,
body.large-text .form-field textarea,
body.large-text .role-picker,
body.large-text .topbar-language,
body.large-text .role-option,
body.large-text .language-option,
body.large-text .filter-tab,
body.large-text .chip,
body.large-text .settings-row { font-size:20px; }
body.large-text .button,
body.large-text .btn,
body.large-text .input,
body.large-text .select,
body.large-text .textarea { min-height:56px; }
body.large-text .child-profile .select { font-size:27px; }
body.large-text .child-current-age { font-size:21px; }
body.large-text .badge,
body.large-text small,
body.large-text .small,
body.large-text .help-text,
body.large-text .muted,
body.large-text .field small,
body.large-text .form-field small,
body.large-text .form-error:not(:empty),
body.large-text .child-birth-date,
body.large-text .demo-banner,
body.large-text .card-subtitle,
body.large-text .appointment-footnote,
body.large-text .clinic-choice > span:nth-child(2) > span,
body.large-text .session-option > span:last-child:not(:first-of-type),
body.large-text .calendar-legend,
body.large-text .lesson-copy p,
body.large-text .toast,
body.large-text .role-option-copy > span,
body.large-text .role-option-copy p,
body.large-text .language-option > span > span,
body.large-text .language-option p,
body.large-text .language-options + p,
body.large-text .role-options + p,
body.large-text .stat-heading,
body.large-text .stat-label,
body.large-text .article-sources a { font-size:18px; }
body.large-text .knowledge-button { font-size:22px; }
body.large-text .knowledge-article { font-size:22px; line-height:1.85; }
body.large-text .bottom-nav-item,
body.large-text .bottom-nav button { font-size:16px; }
@media(max-width:360px){
 body.large-text .home-primary .home-tools { grid-template-columns:minmax(0,1fr); }
 body.large-text .home-tools .quick-action { flex-direction:row; justify-content:flex-start; min-height:72px; gap:14px; padding:14px 18px; text-align:left; }
 body.large-text .child-profile .select { font-size:25px; }
 body.large-text .appointment-heading > .badge { max-width:100%; }
}
@media(max-width:700px){
 .bottom-nav{padding-left:max(4px,calc((100vw - 560px) / 2));padding-right:max(4px,calc((100vw - 560px) / 2));}
 .bottom-nav-item,.bottom-nav button{padding-left:0;padding-right:0;}
 html[lang="th"] .bottom-nav-item>span{white-space:nowrap;}
}
