/* LungLens / รู้ทันปอด — prototype styles (mobile-first) */
:root {
  --brand: #0e7490;          /* teal — trust */
  --brand-deep: #155e75;
  --brand-soft: #ecfeff;
  --ok: #15803d;             /* soft green — completed */
  --ok-soft: #f0fdf4;
  --warn: #b45309;           /* amber — attention */
  --warn-soft: #fffbeb;
  --urgent: #b91c1c;         /* red — urgent symptom pathway ONLY */
  --urgent-soft: #fef2f2;
  --ink: #1e293b;
  --ink-2: #475569;
  --ink-3: #94a3b8;
  --bg: #f8fafc;
  --card: #ffffff;
  --line: #e2e8f0;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(15,23,42,.08), 0 4px 14px rgba(15,23,42,.05);
  --font: "Noto Sans Thai", "IBM Plex Sans Thai", "Leelawadee UI", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg); color: var(--ink);
  font-size: 16px; line-height: 1.65;
  padding-bottom: 76px; /* bottom nav */
}
.skip-link {
  position: fixed; left: 12px; top: 8px; z-index: 200;
  transform: translateY(-150%);
  background: var(--ink); color: #fff; border-radius: 8px;
  padding: 10px 14px; font-weight: 700; text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid #f59e0b; outline-offset: 3px; }
#view:focus { outline: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- big-text mode (ก+) — easy reading for all ages ---------- */
body.big { font-size: 19px; }
body.big .btn { font-size: 19px; min-height: 58px; }
body.big .btn-sm { font-size: 17px; min-height: 48px; }
body.big .opt { font-size: 18px; min-height: 58px; padding: 15px 16px; }
body.big .q-title { font-size: 23px; }
body.big .card h2 { font-size: 22px; }
body.big .hero h1 { font-size: 30px; }
body.big .hero p, body.big .muted { font-size: 17px; }
body.big .q-note, body.big .tiny { font-size: 15px; }
body.big .factor h4 { font-size: 18px; }
body.big .fac h4 { font-size: 18px; }
body.big nav.bottom a { font-size: 13px; }
body.big nav.bottom a .ic { font-size: 24px; }
body.big .field input, body.big .field select, body.big .field textarea { font-size: 18px; min-height: 52px; }
body.big .progress-txt { font-size: 15px; }
body.big .chip { font-size: 14px; padding: 4px 12px; }

/* ---------- header ---------- */
header.app {
  position: sticky; top: 0; z-index: 30;
  background: var(--card); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
}
header.app .logo { font-weight: 700; color: var(--brand-deep); font-size: 17px; }
header.app .logo small { font-weight: 500; color: var(--ink-3); font-size: 12px; display: block; line-height: 1.2; }
header.app .spacer { flex: 1; }
.lang-btn, .icon-btn {
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
  border-radius: 999px; padding: 5px 12px; font-size: 13px; font-family: var(--font);
  cursor: pointer; min-height: 32px;
}
.demo-badge {
  background: var(--warn-soft); color: var(--warn); border: 1px solid #fcd34d;
  font-size: 11px; padding: 2px 8px; border-radius: 999px; white-space: nowrap;
}
@media (max-width: 420px) {
  header.app {
    display: grid; grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 4px 6px; padding: 8px 12px;
  }
  header.app .logo { grid-column: 1; grid-row: 1 / span 2; align-self: center; min-width: 0; }
  header.app .logo small { display: none; }
  header.app .spacer { display: none; }
  header.app .demo-badge { grid-column: 2 / 4; grid-row: 2; justify-self: end; font-size: 9px; }
  header.app #sizeBtn { grid-column: 2; grid-row: 1; }
  header.app #langBtn { grid-column: 3; grid-row: 1; }
}
.connection-status {
  align-items: center; background: var(--warn-soft); border-bottom: 1px solid #f59e0b;
  color: #78350f; display: flex; gap: 12px; justify-content: space-between;
  margin: 0 auto; max-width: 100%; padding: 9px 16px;
}
.connection-status[hidden] { display: none; }
.connection-status div { display: flex; flex-direction: column; min-width: 0; }
.connection-status span { font-size: 13px; }
.connection-status .btn { flex: 0 0 auto; width: auto; }
@media (max-width: 480px) {
  .connection-status { align-items: stretch; flex-direction: column; }
  .connection-status .btn { width: 100%; }
}

/* ---------- layout ---------- */
main { max-width: 640px; margin: 0 auto; padding: 16px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; margin-bottom: 14px;
}
.card h2 { font-size: 19px; margin-bottom: 8px; color: var(--brand-deep); }
.card h3 { font-size: 16px; margin: 12px 0 6px; }
.muted { color: var(--ink-2); font-size: 14px; }
.tiny { color: var(--ink-3); font-size: 12px; }
.center { text-align: center; }
.mt { margin-top: 12px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 130px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 48px; padding: 12px 18px;
  border-radius: 12px; border: 1px solid transparent;
  font-family: var(--font); font-size: 16px; font-weight: 600; cursor: pointer;
  text-decoration: none; text-align: center; color: var(--ink);
  transition: filter .15s;
}
.btn:active { filter: brightness(.95); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-secondary { background: var(--brand-soft); color: var(--brand-deep); border-color: #a5f3fc; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink-2); }
.btn-urgent { background: var(--urgent); color: #fff; }
.btn-sm { min-height: 38px; padding: 7px 14px; font-size: 14px; width: auto; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- landing ---------- */
.hero {
  background: linear-gradient(160deg, var(--brand-deep), var(--brand));
  color: #fff; border-radius: var(--radius); padding: 28px 20px; margin-bottom: 14px;
}
.hero h1 { font-size: 26px; line-height: 1.4; margin-bottom: 10px; }
.hero p { font-size: 15px; opacity: .92; margin-bottom: 18px; }
.hero .btn-primary { background: #fff; color: var(--brand-deep); }
.hero .btn-ghost { border-color: rgba(255,255,255,.5); color: #fff; margin-top: 8px; }
.benefits { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 480px) { .benefits { grid-template-columns: repeat(3, 1fr); } }
.benefit { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; font-size: 14px; }
.benefit .em { font-size: 22px; display: block; margin-bottom: 6px; }
.storyboard-trigger {
  align-items: center; aspect-ratio: 16 / 9; background: var(--ink); border: 0;
  border-radius: 10px; color: #fff; cursor: pointer; display: flex;
  justify-content: center; width: 100%;
}
.storyboard-trigger span { font-size: 40px; }
.edu-article-card { color: inherit; display: block; text-decoration: none; }
.edu-article-card:hover { border-color: var(--brand); }
.disclaimer {
  background: var(--warn-soft); border: 1px solid #fde68a; border-radius: 12px;
  padding: 12px 14px; font-size: 13px; color: #78350f; margin-top: 14px;
}

/* ---------- assessment ---------- */
.progress-wrap { margin-bottom: 14px; }
.progress-txt { font-size: 13px; color: var(--ink-2); margin-bottom: 6px; display: flex; justify-content: space-between; }
.progress-remaining { color: var(--ink-3); font-size: 12px; margin-bottom: 5px; }
.progress-bar { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress-bar > div { height: 100%; background: var(--brand); border-radius: 999px; transition: width .25s; }
.section-tag { display: inline-block; background: var(--brand-soft); color: var(--brand-deep); font-size: 12px; padding: 2px 10px; border-radius: 999px; margin-bottom: 8px; }
.q-title { font-size: 19px; font-weight: 700; margin-bottom: 6px; }
.q-note { font-size: 13px; color: var(--ink-2); background: var(--bg); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; }
.opts { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.opt {
  display: flex; align-items: center; gap: 10px;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--card);
  padding: 12px 14px; font-size: 15px; cursor: pointer; min-height: 48px;
  font-family: var(--font); text-align: left; width: 100%;
}
.opt.sel { border-color: var(--brand); background: var(--brand-soft); font-weight: 600; }
.opt input { accent-color: var(--brand); width: 18px; height: 18px; flex: none; }
.why-btn { background: none; border: none; color: var(--brand); font-size: 13px; font-family: var(--font); cursor: pointer; padding: 6px 0; text-decoration: underline; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field input[type=number], .field input[type=text], .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; font-size: 16px; font-family: var(--font);
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink);
}
.assess-nav { display: flex; gap: 10px; margin-top: 16px; }
.assess-nav .btn { flex: 1; }
.review-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.review-item {
  display: flex; align-items: flex-start; gap: 14px; justify-content: space-between;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; box-shadow: var(--shadow);
}
.review-item > div { min-width: 0; }
.review-item h3 { color: var(--brand-deep); font-size: 15px; margin-bottom: 4px; }
.review-item p { color: var(--ink-2); font-size: 14px; overflow-wrap: anywhere; }
.review-item .btn { flex: 0 0 auto; }
@media (max-width: 390px) {
  .review-item { flex-direction: column; }
  .review-item .btn { width: 100%; }
}

/* ---------- result bands ---------- */
.band { border-radius: var(--radius); padding: 18px; margin-bottom: 14px; border: 1px solid; }
.band h2 { font-size: 19px; margin-bottom: 6px; }
.band-green  { background: var(--ok-soft); border-color: #bbf7d0; color: #14532d; }
.band-amber  { background: var(--warn-soft); border-color: #fde68a; color: #78350f; }
.band-blue   { background: var(--brand-soft); border-color: #a5f3fc; color: var(--brand-deep); }
.band-gray   { background: var(--bg); border-color: var(--line); color: var(--ink-2); }
.band-urgent { background: var(--urgent-soft); border-color: #fecaca; color: #7f1d1d; }
.factor {
  border: 1px solid var(--line); border-left: 4px solid var(--warn); border-radius: 10px;
  padding: 12px 14px; margin-bottom: 10px; background: var(--card);
  display: block; width: 100%; text-align: left; color: inherit;
  font: inherit; cursor: pointer;
}
.factor h4 { font-size: 15px; margin-bottom: 4px; }
.factor .ev { display: inline-block; font-size: 11px; background: var(--bg); border: 1px solid var(--line); color: var(--ink-2); border-radius: 999px; padding: 1px 8px; margin-top: 6px; }

/* ---------- lists / facility ---------- */
.fac { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 10px; background: var(--card); }
.fac h4 { font-size: 15px; color: var(--brand-deep); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.chip { font-size: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; color: var(--ink-2); }
.chip.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-deep); }

/* ---------- education ---------- */
.edu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.edu-cat { border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 12px; font-size: 13.5px; cursor: pointer; font-family: var(--font); text-align: left; line-height: 1.45; }
.edu-cat:active { background: var(--brand-soft); }
.myth { border-radius: 10px; overflow: hidden; border: 1px solid var(--line); margin: 12px 0; font-size: 14px; }
.myth .m { background: var(--urgent-soft); padding: 10px 14px; }
.myth .f { background: var(--ok-soft); padding: 10px 14px; }
.article-sources {
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  color: var(--ink-2); font-size: 13px; padding: 12px 14px;
}
.article-sources ul { margin: 6px 0 0 20px; }
.article-sources a { color: var(--brand-deep); overflow-wrap: anywhere; }
.edu-article-card[hidden] { display: none; }
.plain-list { margin: 8px 0 12px 22px; }
.plain-list li { margin-bottom: 7px; }
code {
  background: var(--bg); border: 1px solid var(--line); border-radius: 5px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .9em;
  padding: 1px 5px;
}

/* ---------- assessment validation ---------- */
.assessment-error {
  align-items: flex-start; background: var(--warn-soft); border: 1px solid #d97706;
  border-left: 5px solid #d97706; border-radius: 10px; color: var(--ink);
  display: flex; flex-direction: column; gap: 2px; margin: 12px 0; padding: 11px 13px;
}
.assessment-error[hidden] { display: none !important; }
.assessment-error:focus { outline: 3px solid var(--focus); outline-offset: 2px; }
.assessment-error span { color: var(--ink-2); font-size: 14px; }
.field-invalid input, .field-invalid select, .field-invalid .chips {
  border-color: #b45309; box-shadow: 0 0 0 2px rgba(217, 119, 6, .18);
}
.field-help { color: var(--ink-2); font-size: 12px; margin-top: 5px; }

/* ---------- result clarity ---------- */
.result-overview { display: grid; gap: 10px; }
.result-overview section {
  align-items: flex-start; background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; display: grid; gap: 10px; grid-template-columns: 30px 1fr;
  padding: 12px;
}
.result-overview section > span {
  align-items: center; background: var(--brand); border-radius: 50%; color: #fff;
  display: flex; font-size: 13px; font-weight: 700; height: 28px; justify-content: center;
  width: 28px;
}
.result-overview h3 { color: var(--brand-deep); font-size: 15px; margin: 2px 0 5px; }
.result-overview p { font-size: 13.5px; margin: 2px 0; }
.result-limitations summary { color: var(--brand-deep); cursor: pointer; }
.result-limitations summary::marker { color: var(--brand); }

/* ---------- live air quality ---------- */
.air-compact {
  background: var(--brand-soft); border: 1px solid #a5f3fc; border-radius: 10px;
  color: var(--brand-deep); font-size: 13px; margin: 12px 0; padding: 10px 12px;
}
.air-compact a { color: var(--brand-deep); font-weight: 700; }
.air-location-control { display: flex; flex-wrap: wrap; gap: 8px; }
.air-location-control .btn { flex: 1 1 180px; }
.air-summary, .air-reading {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px;
}
.air-summary > div, .air-reading > div {
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  min-width: 0; padding: 10px; text-align: center;
}
.air-summary b, .air-reading b { display: block; color: var(--brand-deep); font-size: 19px; line-height: 1.3; }
.air-summary span, .air-reading span, .air-reading small {
  color: var(--ink-2); display: block; font-size: 11px; overflow-wrap: anywhere;
}
.air-guidance {
  border: 1px solid var(--line); border-left: 5px solid var(--brand);
  border-radius: 10px; margin-top: 12px; padding: 12px 14px;
}
.air-guidance p { color: var(--ink-2); font-size: 13px; margin-top: 3px; }
.air-very_good, .air-good, .air-model_good { background: var(--ok-soft); border-left-color: var(--ok); }
.air-moderate, .air-model_moderate, .air-model_sensitive {
  background: var(--warn-soft); border-left-color: #d97706;
}
.air-starting_impact, .air-model_unhealthy {
  background: #fff7ed; border-left-color: #c2410c;
}
.air-health_impact, .air-model_very_unhealthy, .air-model_hazardous {
  background: #faf5ff; border-left-color: #7e22ce;
}
.air-stale { background: var(--warn-soft); border-color: #f59e0b; }
.model-badge {
  background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink-2); display: inline-block; font-size: 10px; font-weight: 600;
  margin-left: 5px; padding: 1px 7px; vertical-align: middle;
}
.station-badge {
  background: var(--brand-soft); border: 1px solid #67e8f9; border-radius: 999px;
  color: var(--brand-deep); display: inline-block; font-size: 10px; font-weight: 700;
  margin-left: 5px; padding: 1px 7px; vertical-align: middle;
}
.air-forecast-chart {
  background: linear-gradient(180deg, var(--brand-soft), #fff); border: 1px solid var(--line);
  border-radius: 10px; display: block; height: auto; margin-top: 10px;
  max-height: 220px; overflow: visible; width: 100%;
}
.air-history-chart { background: linear-gradient(180deg, #ecfeff, #fff); }
.air-forecast-chart text {
  fill: var(--ink-2); font-family: var(--font); font-size: 11px;
}
.chart-axis { stroke: var(--ink-3); stroke-width: 1; }
.chart-grid { stroke: var(--line); stroke-dasharray: 5 5; stroke-width: 1; }
.chart-line { fill: none; stroke: var(--brand); stroke-linecap: round; stroke-linejoin: round; stroke-width: 4; }
.chart-point { fill: var(--card); stroke: var(--brand-deep); stroke-width: 2; }
.chart-line-history { stroke: #0891b2; }
.chart-point-history { stroke: #0e7490; }
.air-history-stale {
  background: var(--warn-soft); border: 1px solid #f59e0b; border-radius: 8px;
  color: var(--ink-2); font-size: 13px; margin: 8px 0; padding: 8px 10px;
}
.air-forecast-stats { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 8px; }
.air-forecast-stats span { color: var(--ink-2); font-size: 12px; }
.article-forecast {
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px;
}
.article-forecast h3 { color: var(--brand-deep); margin-top: 0; }
@media (max-width: 390px) {
  .air-summary, .air-reading { grid-template-columns: 1fr; }
  .air-summary > div, .air-reading > div { text-align: left; }
  .air-forecast-chart { min-height: 150px; }
  .air-location-control .btn { width: 100%; }
}

/* ---------- timeline ---------- */
.timeline { list-style: none; margin: 10px 0; }
.timeline li { position: relative; padding: 0 0 18px 26px; font-size: 14px; }
.timeline li::before {
  content: ""; position: absolute; left: 6px; top: 5px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--line);
}
.timeline li.done::before { background: var(--ok); }
.timeline li.now::before { background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.timeline li:not(:last-child)::after {
  content: ""; position: absolute; left: 10px; top: 17px; bottom: 0; width: 2px; background: var(--line);
}

/* ---------- provider ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
table.data th, table.data td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.data th { color: var(--ink-2); font-weight: 600; background: var(--bg); position: sticky; top: 0; }
table.data tr { cursor: pointer; }
table.data tr:hover td { background: var(--brand-soft); }
.badge { display: inline-block; font-size: 11px; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.badge.review { background: var(--brand-soft); color: var(--brand-deep); }
.badge.attention { background: var(--warn-soft); color: var(--warn); }
.badge.none { background: var(--ok-soft); color: var(--ok); }
.badge.incomplete { background: var(--bg); color: var(--ink-3); }
.badge.urgent { background: var(--urgent-soft); color: var(--urgent); }
.funnel-row { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; font-size: 13px; }
.funnel-row .lbl { width: 46%; color: var(--ink-2); }
.funnel-row .bar { flex: 1; height: 16px; background: var(--line); border-radius: 6px; overflow: hidden; }
.funnel-row .bar > div { height: 100%; background: var(--brand); }
.funnel-row .n { width: 44px; text-align: right; font-weight: 600; }

/* ---------- bottom nav ---------- */
nav.bottom {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  background: var(--card); border-top: 1px solid var(--line);
  display: flex; justify-content: space-around;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
nav.bottom a {
  flex: 1; text-align: center; text-decoration: none; color: var(--ink-3);
  font-size: 11px; padding: 4px 2px; border-radius: 10px;
}
nav.bottom a .ic { display: block; font-size: 20px; line-height: 1.2; }
nav.bottom a.active { color: var(--brand-deep); font-weight: 700; }

/* ---------- modal / toast / splash ---------- */
.modal-back {
  position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 60;
  display: flex; align-items: flex-end; justify-content: center;
}
@media (min-width: 480px) { .modal-back { align-items: center; } }
.modal {
  background: var(--card); border-radius: 18px 18px 0 0; max-width: 560px; width: 100%;
  max-height: 85vh; overflow-y: auto; padding: 20px;
}
@media (min-width: 480px) { .modal { border-radius: 18px; } }
.modal h3 { color: var(--brand-deep); margin-bottom: 8px; font-size: 17px; }
.toast {
  position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%);
  background: var(--ink); color: #fff; font-size: 14px; padding: 10px 18px;
  border-radius: 999px; z-index: 70; box-shadow: var(--shadow); max-width: 90vw; text-align: center;
}
#splash {
  position: fixed; inset: 0; z-index: 100; background: linear-gradient(160deg, var(--brand-deep), var(--brand));
  color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
}
#splash .lung { font-size: 52px; }
.spin { width: 26px; height: 26px; border: 3px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: sp 1s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

/* ---------- demo story ---------- */
.story { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; }
.story h1 { font-size: 28px; color: var(--brand-deep); margin-bottom: 12px; line-height: 1.4; }
.story .n { font-size: 13px; color: var(--ink-3); margin-bottom: 8px; }
details { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; background: var(--card); }
details summary { cursor: pointer; font-weight: 600; font-size: 14.5px; }
details[open] summary { margin-bottom: 6px; }
.share-card {
  background: linear-gradient(160deg, var(--brand-deep), var(--brand)); color: #fff;
  border-radius: 14px; padding: 22px; text-align: center; margin: 12px 0;
}
.share-card .big { font-size: 18px; font-weight: 700; margin-bottom: 8px; }

/* ---------- appointment-request draft ---------- */
.check-row {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg);
}
.check-row input { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 2px; }
.summary-list { margin: 12px 0; }
.summary-list > div {
  display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--line);
}
.summary-list dt { color: var(--ink-2); font-weight: 600; }
.summary-list dd { margin: 0; overflow-wrap: anywhere; }
.appointment-draft-banner {
  display: flex; flex-direction: column; gap: 3px; padding: 12px;
  border: 2px solid var(--warn); border-radius: 10px; color: var(--warn);
  background: var(--warn-soft); margin-bottom: 18px; text-align: center;
}
.appointment-print-warning {
  margin-top: 18px; padding: 14px; border: 2px solid var(--warn);
  background: var(--warn-soft); color: #78350f; border-radius: 10px;
}
.appointment-factor-summary { margin-top: 16px; }

@media (max-width: 420px) {
  .summary-list > div { grid-template-columns: 1fr; gap: 3px; }
}

@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; padding: 0; color: #111; }
  header.app, nav.bottom, #connectionStatus, #splash, .no-print, .toast, .modal-back { display: none !important; }
  main { max-width: none; padding: 0; margin: 0; }
  main > :not(.appointment-print) { display: none !important; }
  .appointment-print {
    display: block !important; border: 0; box-shadow: none; margin: 0;
    padding: 30mm 0 34mm; color: #111; break-inside: auto;
  }
  .appointment-draft-banner {
    position: fixed; top: 0; left: 0; right: 0; min-height: 20mm;
    display: flex !important; justify-content: center; z-index: 2;
  }
  .appointment-print-warning {
    position: fixed; bottom: 0; left: 0; right: 0; min-height: 23mm;
    display: block !important; z-index: 2; font-size: 10pt;
  }
  .appointment-print .summary-list > div { break-inside: avoid; }
  .appointment-draft-banner, .appointment-print-warning {
    border-color: #7c2d12; color: #7c2d12; background: #fff;
  }
}
