/* Vita Health 365 — /mypage/wellness/weight-tracker styles.
 *
 * Apple Health–inspired dual-axis trend dashboard re-skinned to the
 * Vita palette (forest / moss / terracotta / amber / clay) per
 * PROMPT_WEIGHT_TRACKER.md §4. iOS purple/green/orange are NOT used.
 * Page tokens are local to this file; global tokens (--forest, --moss,
 * etc.) come from /assets/styles.css. The mypage shell (sidebar +
 * topbar + bottom bar) is owned by /mypage/mypage.css.
 */

:root {
  /* Vita base — re-declared locally so the page styles read self-contained
     even if /assets/styles.css is loaded out of order. Values match. */
  --vdw-bg:        #FBF7EE;
  --vdw-card:      #FFFFFF;
  --vdw-card-2:    #F7F3E8;
  --vdw-border:    #E6DFCF;
  --vdw-divider:   #EDE6D2;
  --vdw-ink:       #1B1F18;
  --vdw-ink-2:     #3A3F35;
  --vdw-muted:     #80847A;
  --vdw-muted-2:   #A5A89C;

  /* Series & semantics — spec §4.1. */
  --wt-weight:     #2C3D2A;  /* forest — Weight line */
  --wt-weight-2:   #6B7F5A;  /* moss   — Weight gradient start */
  --wt-bmi:        #C8674C;  /* terracotta — BMI line */
  --wt-goal:       #C99A4E;  /* amber — Goal */
  --wt-goal-2:     #A77527;  /* amber-deep — progress ring end */
  --wt-up:         #A14B36;  /* clay  — gain warning */
  --wt-down:       #6B7F5A;  /* moss  — loss good */
  --wt-link:       #2C3D2A;

  /* BMI categories — spec §4.1. */
  --wt-bmi-under:  #7B9EB8;  /* sage blue */
  --wt-bmi-normal: #6B7F5A;  /* moss */
  --wt-bmi-over:   #C99A4E;  /* amber */
  --wt-bmi-obese:  #C8674C;  /* terracotta */
}

/* The mypage shell uses --mp-font (Noto Sans). Re-state the family for
   page-scoped headings so Fraunces is reliably loaded for h1/h2 — the
   shell .mp-app * rule force-applies --mp-font otherwise. */
.wt-page,
.wt-page * { font-family: 'Noto Sans', 'Noto Sans KR', system-ui, -apple-system, sans-serif; }
.wt-page .wt-serif {
  font-family: 'Fraunces', Georgia, serif;
}

/* ─── Page container ─────────────────────────────────────────────── */
.wt-page {
  max-width: 1240px; margin: 0 auto;
  padding: 24px clamp(16px, 3vw, 32px) 60px;
  color: var(--vdw-ink);
}
@media (max-width: 720px) { .wt-page { padding: 16px 16px 40px; } }

/* ─── Page header ────────────────────────────────────────────────── */
.wt-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.wt-header-title { display: flex; flex-direction: column; gap: 6px; }
.wt-eyebrow {
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--wt-goal);
}
.wt-h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 34px; font-weight: 600; line-height: 1.1;
  letter-spacing: -0.015em; color: var(--vdw-ink); margin: 0;
}
@media (max-width: 480px) { .wt-h1 { font-size: 28px; } }
.wt-h1-meta { font-size: 13px; color: var(--vdw-muted); margin-top: 4px; }
.wt-header-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-top: 10px; }
.wt-btn {
  font: 600 13px/1 inherit; padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--vdw-border); background: var(--vdw-card);
  color: var(--vdw-ink); cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .15s ease, border-color .15s ease;
}
.wt-btn:hover { background: var(--vdw-card-2); }
.wt-btn-primary {
  background: var(--vdw-ink); border-color: var(--vdw-ink); color: #fff;
}
.wt-btn-primary:hover { background: #2A2F26; border-color: #2A2F26; }

/* ─── Card primitives ────────────────────────────────────────────── */
.wt-card {
  background: var(--vdw-card);
  border: 1px solid var(--vdw-border);
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 10px 28px -16px rgba(27,31,24,0.10);
}
.wt-card-eyebrow {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; color: var(--vdw-ink-2);
  margin-bottom: 12px;
}
.wt-card-eyebrow .wt-dot { width: 8px; height: 8px; border-radius: 999px; }
.wt-card-eyebrow .wt-unit { margin-left: auto; color: var(--vdw-muted); font-weight: 500; font-size: 11.5px; letter-spacing: 0.02em; }

/* ─── Hero grid ──────────────────────────────────────────────────── */
.wt-hero {
  display: grid; gap: 16px;
  grid-template-columns: 1.15fr 1fr 0.95fr;
  margin-bottom: 20px;
}
@media (max-width: 1100px) {
  .wt-hero { grid-template-columns: 1fr 1fr; }
  .wt-hero > .wt-goal-card { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .wt-hero { grid-template-columns: 1fr; }
  .wt-hero > .wt-goal-card { grid-column: auto; }
}

/* Big number rows shared by Weight + BMI cards. */
.wt-bignum {
  display: flex; align-items: baseline; gap: 8px;
  font-feature-settings: "tnum";
}
.wt-bignum-value {
  font-size: 56px; font-weight: 700; letter-spacing: -0.035em;
  line-height: 1; color: var(--vdw-ink);
}
@media (max-width: 480px) { .wt-bignum-value { font-size: 44px; } }
.wt-bignum-unit { font-size: 16px; font-weight: 600; color: var(--vdw-muted); }

/* Weight delta pills. */
.wt-delta-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-top: 14px;
}
.wt-delta-pill {
  background: var(--vdw-card-2);
  border: 1px solid var(--vdw-divider);
  border-radius: 10px;
  padding: 7px 11px;
  display: flex; flex-direction: column; gap: 2px;
}
.wt-delta-label {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--vdw-muted);
}
.wt-delta-value {
  font-size: 13px; font-weight: 700;
  font-feature-settings: "tnum";
  color: var(--vdw-muted);
}
.wt-delta-value.is-down { color: var(--wt-down); }
.wt-delta-value.is-up   { color: var(--wt-up); }

/* BMI category pill. */
.wt-bmi-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.wt-cat-pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.01em;
}
.wt-cat-pill.cat-under  { background: rgba(123,158,184,0.16); color: var(--wt-bmi-under); }
.wt-cat-pill.cat-normal { background: rgba(107,127,90,0.16); color: var(--wt-bmi-normal); }
.wt-cat-pill.cat-over   { background: rgba(201,154,78,0.18); color: var(--wt-bmi-over); }
.wt-cat-pill.cat-obese  { background: rgba(200,103,76,0.16); color: var(--wt-bmi-obese); }

/* BMI 4-segment bar. */
.wt-bmi-bar {
  position: relative; margin-top: 18px;
  height: 8px; border-radius: 999px; overflow: visible;
  display: flex; gap: 2px;
}
.wt-bmi-seg { height: 100%; border-radius: 999px; }
.wt-bmi-seg.cat-under  { background: var(--wt-bmi-under);  flex: 2.5; }
.wt-bmi-seg.cat-normal { background: var(--wt-bmi-normal); flex: 4.5; }
.wt-bmi-seg.cat-over   { background: var(--wt-bmi-over);   flex: 2; }
.wt-bmi-seg.cat-obese  { background: var(--wt-bmi-obese);  flex: 7; }
.wt-bmi-pin {
  position: absolute; top: -4px;
  width: 4px; height: 16px; border-radius: 4px;
  background: var(--vdw-ink); border: 2px solid #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  transform: translateX(-2px);
}
.wt-bmi-ticks {
  display: flex; justify-content: space-between;
  margin-top: 6px;
  font-size: 10px; font-weight: 600; color: var(--vdw-muted-2);
  letter-spacing: 0.02em;
}

/* Goal card progress ring + footer. */
.wt-goal-card { padding: 20px 22px; }
.wt-goal-body {
  display: flex; gap: 16px; align-items: center;
}
.wt-goal-ring-wrap { flex: 0 0 auto; }
.wt-goal-ring { display: block; }
.wt-goal-ring-bg { stroke: #EDE6D2; }
.wt-goal-ring-fill { stroke: url(#wtGoalGrad); stroke-linecap: round; }
.wt-goal-ring-pct {
  font-family: 'Noto Sans', sans-serif;
  font-size: 22px; font-weight: 700; letter-spacing: -0.025em;
  font-feature-settings: "tnum"; fill: var(--vdw-ink);
}
.wt-goal-ring-sub {
  font-size: 9.5px; font-weight: 500; fill: var(--vdw-muted);
  letter-spacing: 0.02em;
}
.wt-goal-meta { flex: 1; min-width: 0; }
.wt-goal-foot {
  display: grid; grid-template-columns: 1fr 1px 1fr;
  gap: 12px; margin-top: 8px; align-items: center;
}
.wt-goal-foot .rule { width: 1px; height: 26px; background: var(--vdw-divider); }
.wt-goal-stat-label { font-size: 10.5px; font-weight: 600; color: var(--vdw-muted); letter-spacing: 0.02em; }
.wt-goal-stat-value { font-size: 16px; font-weight: 700; font-feature-settings: "tnum"; }
.wt-goal-stat-value.is-down { color: var(--wt-down); }
.wt-goal-empty {
  font-size: 13px; color: var(--vdw-muted); line-height: 1.5;
  margin-top: 8px;
}
.wt-goal-empty a {
  color: var(--wt-link); font-weight: 600; text-decoration: underline;
}

/* ─── Chart card ─────────────────────────────────────────────────── */
.wt-chart-card { padding: 22px; margin-bottom: 16px; }
.wt-chart-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 6px;
}
.wt-chart-head h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 18px; font-weight: 600; letter-spacing: -0.01em;
  margin: 0; color: var(--vdw-ink);
}
.wt-chart-head .wt-chart-range { font-size: 12px; color: var(--vdw-muted); }
.wt-chart-head .wt-chart-spacer { flex: 1; }

/* Series chips. */
.wt-chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.wt-chip {
  background: var(--vdw-card-2);
  border: 1px solid var(--vdw-border);
  border-radius: 999px;
  padding: 6px 12px; font-size: 12.5px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--vdw-muted);
  cursor: pointer; transition: background .15s ease, border-color .15s ease;
}
.wt-chip:hover { background: #F0EAD8; }
.wt-chip .wt-dot { width: 8px; height: 8px; border-radius: 999px; opacity: 0.4; }
.wt-chip.is-on {
  background: #fff;
  border: 1.5px solid var(--vdw-ink);
  color: var(--vdw-ink);
}
.wt-chip.is-on .wt-dot { opacity: 1; }

/* Period segment. */
.wt-seg {
  display: inline-flex; padding: 3px; gap: 2px;
  background: rgba(43,61,42,0.08); border-radius: 10px;
}
.wt-seg button {
  background: transparent; border: 0; cursor: pointer;
  padding: 6px 12px; border-radius: 7px;
  font: 600 12px/1 inherit; color: var(--vdw-ink-2);
  transition: background .15s ease, color .15s ease;
}
.wt-seg button.is-on {
  background: #fff;
  color: var(--vdw-ink);
  box-shadow: 0 1px 2px rgba(27,31,24,0.06);
}

/* Chart frame. */
.wt-chart-frame {
  position: relative;
  height: 320px;
  margin-top: 14px;
}
@media (max-width: 720px) { .wt-chart-frame { height: 280px; } }
.wt-chart-frame svg { width: 100%; height: 100%; display: block; overflow: visible; }
.wt-chart-empty {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--vdw-muted); font-size: 13px;
}
.wt-chart-legend {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin-top: 10px; font-size: 11.5px; color: var(--vdw-muted);
}
.wt-chart-legend .wt-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.wt-chart-legend .wt-dot { width: 8px; height: 8px; border-radius: 999px; }

/* Chart tooltip — absolute div positioned by JS. */
.wt-tooltip {
  position: absolute; pointer-events: none;
  background: rgba(27,31,24,0.92); color: #fff;
  border-radius: 12px; padding: 10px 12px;
  font-size: 12px; min-width: 140px;
  opacity: 0; transition: opacity .12s ease;
  z-index: 5;
}
.wt-tooltip.is-on { opacity: 1; }
.wt-tooltip .wt-tip-date { font-size: 11px; opacity: 0.75; margin-bottom: 6px; color: #EBE6D6; }
.wt-tooltip .wt-tip-row { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.wt-tooltip .wt-tip-row + .wt-tip-row { margin-top: 4px; }
.wt-tooltip .wt-tip-label { opacity: 0.75; flex: 1; }
.wt-tooltip .wt-tip-value { font-weight: 700; font-feature-settings: "tnum"; }
.wt-tooltip .wt-dot { width: 7px; height: 7px; border-radius: 999px; }

/* ─── Bottom grid ────────────────────────────────────────────────── */
.wt-bottom {
  display: grid; grid-template-columns: 1.3fr 1fr;
  gap: 16px;
}
@media (max-width: 1100px) { .wt-bottom { grid-template-columns: 1fr; } }

.wt-averages-stack { display: flex; flex-direction: column; gap: 16px; }

.wt-averages-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
@media (max-width: 480px) { .wt-averages-grid { grid-template-columns: 1fr; } }
.wt-avg-card { padding: 16px 18px; }
.wt-avg-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.wt-avg-label { font-size: 12px; font-weight: 600; color: var(--vdw-ink-2); }
.wt-avg-range { font-size: 11px; color: var(--vdw-muted); }
.wt-avg-value {
  font-size: 30px; font-weight: 700; letter-spacing: -0.025em;
  font-feature-settings: "tnum";
  color: var(--vdw-ink); margin-top: 4px;
  display: flex; align-items: baseline; gap: 6px;
}
.wt-avg-value .wt-unit { font-size: 13px; font-weight: 500; color: var(--vdw-muted); letter-spacing: 0; }
.wt-avg-foot { font-size: 12px; color: var(--vdw-muted); margin-top: 8px; }
.wt-avg-foot .wt-cat-text.cat-normal { color: var(--wt-bmi-normal); font-weight: 600; }
.wt-avg-foot .wt-cat-text.cat-under  { color: var(--wt-bmi-under);  font-weight: 600; }
.wt-avg-foot .wt-cat-text.cat-over   { color: var(--wt-bmi-over);   font-weight: 600; }
.wt-avg-foot .wt-cat-text.cat-obese  { color: var(--wt-bmi-obese);  font-weight: 600; }
.wt-avg-spark { display: block; margin-top: 10px; height: 32px; width: 100%; }
.wt-avg-spark path { fill: none; stroke: var(--wt-weight); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Selected-day detail card. */
.wt-detail-card { padding: 16px 18px; }
.wt-detail-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.wt-detail-title { font-size: 13.5px; font-weight: 600; color: var(--vdw-ink-2); }
.wt-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.wt-detail-grid > div {
  display: flex; flex-direction: column; gap: 2px;
}
.wt-detail-label { font-size: 10.5px; font-weight: 600; color: var(--vdw-muted); letter-spacing: 0.02em; }
.wt-detail-value {
  font-size: 26px; font-weight: 700; letter-spacing: -0.025em;
  font-feature-settings: "tnum";
}
.wt-detail-value.is-weight { color: var(--wt-weight); }
.wt-detail-value.is-bmi    { color: var(--wt-bmi); }
.wt-detail-note {
  margin-top: 12px;
  background: var(--vdw-card-2);
  border: 1px solid var(--vdw-divider);
  border-left: 3px solid var(--wt-weight);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--vdw-ink-2);
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.wt-detail-note::before {
  content: '“';
  color: var(--vdw-muted);
  margin-right: 2px;
}
.wt-detail-note::after {
  content: '”';
  color: var(--vdw-muted);
  margin-left: 2px;
}
.wt-row-note {
  display: block; margin-top: 4px;
  font-size: 11.5px; color: var(--vdw-muted);
  font-style: italic; line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
}
.wt-detail-hint {
  margin-top: 12px;
  background: var(--vdw-card-2);
  border: 1px solid var(--vdw-divider);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 11.5px;
  color: var(--vdw-muted);
}
.wt-detail-back {
  background: none; border: 0; cursor: pointer;
  color: var(--wt-link); font: 600 12px/1 inherit; padding: 6px 0;
}

/* Records list. */
.wt-records-card { padding: 16px 18px; }
.wt-records-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.wt-records-title { font-size: 14.5px; font-weight: 700; letter-spacing: -0.005em; color: var(--vdw-ink); }
.wt-records-link { font-size: 12px; font-weight: 600; color: var(--wt-link); text-decoration: none; }
.wt-records-link:hover { text-decoration: underline; }
.wt-records-list { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.wt-row {
  display: grid; grid-template-columns: 56px 1fr auto;
  align-items: center; gap: 14px;
  padding: 10px 8px; border-radius: 12px;
  cursor: pointer; transition: background .12s ease;
}
.wt-row:hover { background: var(--vdw-card-2); }
.wt-row.is-selected {
  background: rgba(44,61,42,0.08);
  box-shadow: inset 0 0 0 1.5px rgba(44,61,42,0.22);
}
.wt-row-date {
  display: flex; flex-direction: column; align-items: center;
  border-right: 1px solid var(--vdw-divider);
  padding-right: 8px;
}
.wt-row-day {
  font-size: 22px; font-weight: 700; font-feature-settings: "tnum";
  line-height: 1; color: var(--vdw-ink);
}
.wt-row-mon { font-size: 10.5px; color: var(--vdw-muted); margin-top: 2px; }
.wt-row-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wt-row-weight {
  font-size: 17px; font-weight: 700; font-feature-settings: "tnum";
  color: var(--vdw-ink);
}
.wt-row-weight .wt-unit { font-size: 11px; font-weight: 500; color: var(--vdw-muted); }
.wt-row-bmi { font-size: 11.5px; color: var(--vdw-muted); }
.wt-row-bmi .wt-cat-text { font-weight: 600; }
.wt-row-bmi .wt-cat-text.cat-normal { color: var(--wt-bmi-normal); }
.wt-row-bmi .wt-cat-text.cat-under  { color: var(--wt-bmi-under); }
.wt-row-bmi .wt-cat-text.cat-over   { color: var(--wt-bmi-over); }
.wt-row-bmi .wt-cat-text.cat-obese  { color: var(--wt-bmi-obese); }
.wt-row-delta {
  font-size: 13px; font-weight: 700; font-feature-settings: "tnum";
  padding: 6px 10px; border-radius: 8px;
  color: var(--vdw-muted); background: var(--vdw-card-2);
}
.wt-row-delta.is-down { color: var(--wt-down); background: rgba(107,127,90,0.12); }
.wt-row-delta.is-up   { color: var(--wt-up);   background: rgba(161,75,54,0.12); }

/* Empty state for the records list (and the page itself when 0 logs). */
.wt-empty {
  padding: 22px 16px; text-align: center;
  color: var(--vdw-muted); font-size: 13.5px;
  background: var(--vdw-card-2);
  border: 1px dashed var(--vdw-border);
  border-radius: 14px;
  display: flex; flex-direction: column; gap: 10px;
  align-items: center;
}
.wt-empty .wt-btn { margin-top: 4px; }

/* ─── Modal (entry + goal) ───────────────────────────────────────── */
.wt-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(27,31,24,0.35);
  display: none; align-items: center; justify-content: center;
  z-index: 1000; padding: 16px;
}
.wt-modal-backdrop.is-on { display: flex; }
.wt-modal {
  background: var(--vdw-card);
  border-radius: 16px; padding: 22px;
  width: 100%; max-width: 420px;
  /* Cap height so the modal stays scrollable on small phones with the
     on-screen keyboard up, instead of pushing the save button off
     the bottom of the screen. */
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,0.22);
}
.wt-modal h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 22px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--vdw-ink); margin: 0 0 4px;
}
.wt-modal-sub { color: var(--vdw-muted); font-size: 13px; margin: 0 0 16px; line-height: 1.5; }
.wt-field { margin-bottom: 12px; }
.wt-field label { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--vdw-ink); }
.wt-field label .wt-req { color: var(--wt-up); }
.wt-field label .wt-counter { margin-left: auto; font-weight: 500; color: var(--vdw-muted); font-size: 11.5px; }
.wt-unit-toggle {
  margin-left: auto; display: inline-flex; gap: 0;
  border-radius: 8px; overflow: hidden;
  border: 1px solid var(--vdw-border);
}
.wt-unit-btn {
  background: transparent; border: 0; padding: 4px 10px;
  font: 600 11px/1 inherit; color: var(--vdw-muted);
  cursor: pointer; letter-spacing: 0.04em; text-transform: lowercase;
}
.wt-unit-btn.is-on { background: var(--vdw-ink); color: var(--vdw-card); }
.wt-unit-btn:focus { outline: 2px solid rgba(44,61,42,0.18); outline-offset: 1px; }
.wt-field input,
.wt-field textarea {
  width: 100%; padding: 10px 12px;
  border-radius: 10px; border: 1px solid var(--vdw-border);
  background: var(--vdw-card);
  font: 500 15px/1.3 inherit; color: var(--vdw-ink);
  font-feature-settings: "tnum";
}
.wt-field input:focus,
.wt-field textarea:focus {
  outline: 2px solid rgba(44,61,42,0.18); outline-offset: 1px;
  border-color: var(--wt-weight);
}
.wt-field textarea { resize: vertical; min-height: 60px; }
.wt-modal-preview {
  background: var(--vdw-card-2);
  border-radius: 10px; padding: 10px 12px;
  font-size: 12.5px; color: var(--vdw-muted); margin: 14px 0 4px;
  display: flex; flex-direction: column; gap: 4px;
}
.wt-modal-preview strong { color: var(--vdw-ink); font-weight: 700; font-feature-settings: "tnum"; }
.wt-modal-err {
  display: none; margin: 10px 0 0;
  background: #FBE9DC; color: #8c3a25;
  padding: 10px 12px; border-radius: 10px; font-size: 12.5px;
}
.wt-modal-err.is-on { display: block; }
.wt-modal-actions {
  display: flex; gap: 10px; justify-content: flex-end;
  padding-top: 16px;
}
.wt-modal-actions .wt-btn { font-size: 13.5px; padding: 9px 18px; }
.wt-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ─── Narrow-viewport polish (spec §5 ≤ 480px) ───────────────────── */
@media (max-width: 480px) {
  /* Series chips + period segment can wrap to two lines without the
     segment overflowing — but if a translation lengthens any tick
     label, we still want a graceful horizontal scroll rather than a
     wrap that lines up oddly. */
  .wt-chart-head { gap: 8px; }
  .wt-seg { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
  .wt-seg button { white-space: nowrap; }
  /* Records-row gap shrinks so the 56-col date block and delta pill
     don't crowd the body on tiny phones. */
  .wt-row { gap: 10px; padding: 10px 6px; }
  .wt-row-date { padding-right: 6px; }
}
