:root {
  --ink: #1d1d1d;
  --ink-soft: #647181;
  --paper: #ffffff;
  --canvas: #f6f7fa;
  --mint-50: #edf2f9;
  --mint-100: #d6e8ff;
  --mint-200: #a5c1dc;
  --mint-500: #1d70d8;
  --mint-700: #014dab;
  --blue-50: #def6e2;
  --blue-500: #098880;
  --coral-50: #fff2ed;
  --coral-500: #df745b;
  --amber-50: #fff9e9;
  --amber-500: #d9a334;
  --line: #dae3ef;
  --shadow: 0 14px 34px rgba(1, 77, 171, .1);
  --radius-lg: 15px;
  --radius-md: 10px;
  --max-width: 1660px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { max-width: 100%; overflow-x: clip; scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 280px;
  max-width: 100%;
  overflow-x: clip;
  background: var(--canvas);
  color: var(--ink);
  font-family: "IBM Plex Sans", Arial, system-ui, sans-serif;
  line-height: 1.55;
}

button, input { font: inherit; }
button { color: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid rgba(67, 135, 199, .35);
  outline-offset: 2px;
}

.app-shell { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 34px 30px 20px; }

.app-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 42px;
  margin-bottom: 24px;
  padding: 28px 30px;
  border-radius: 15px;
  background: #fff;
}
.app-header__title { min-width: 0; }
.app-header h1 {
  margin: 7px 0 13px;
  color: #000;
  font-size: clamp(2.25rem, 4vw, 4.2rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.045em;
  text-transform: uppercase;
}
.app-header__title > p { margin: 0; color: var(--ink-soft); font-size: 1rem; }
.app-header__meta { display: flex; min-width: 310px; flex-direction: column; align-items: flex-end; gap: 14px; padding-top: 10px; }
.institution-marks { display: flex; align-items: stretch; gap: 9px; }
.institution-marks span { display: flex; align-items: center; min-height: 49px; padding: 7px 11px; border-left: 3px solid #13a9ce; color: #16495a; font-size: .65rem; font-weight: 800; line-height: 1.15; text-transform: uppercase; }
.regional-brand { display: flex; align-items: center; gap: 13px; padding-left: 14px; border-left: 4px solid #22d081; color: #014dab; text-align: left; }
.regional-brand span { max-width: 155px; font-size: .78rem; font-weight: 800; line-height: 1.2; text-transform: uppercase; }
.regional-brand small { padding-left: 13px; border-left: 1px solid rgba(22,73,90,.24); font-size: .66rem; font-weight: 700; line-height: 1.35; }
.hotline { margin: 0; color: #172729; font-size: .88rem; }
.hotline strong { font-size: 1.04rem; }
.edition { padding: 7px 10px; border-radius: 6px; background: #edf2f9; color: #707b88; font-size: .72rem; font-weight: 700; }
.app-controls { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 18px; padding: 7px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.app-controls .tabs { flex: 0 0 auto; margin: 0; border: 0; background: transparent; }
.app-controls .search { width: min(440px, 46%); margin: 0; }
.app-controls .search input { min-height: 46px; background: #f6f7fa; }

.schedule-board { overflow-x: auto; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(125deg, #fff 0%, #edf2f9 100%); box-shadow: 0 12px 30px rgba(1,77,171,.07); scrollbar-color: #1d70d8 transparent; }
.schedule-matrix {
  display: grid;
  min-width: 960px;
  padding: 20px 20px 24px;
  align-items: stretch;
}
.matrix-corner { grid-row: 1 / span 2; position: sticky; z-index: 4; left: 0; display: flex; align-items: flex-end; padding: 0 28px 20px 8px; background: linear-gradient(90deg, #fff 88%, rgba(255,255,255,0)); color: #014dab; font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.matrix-group { display: flex; align-items: center; justify-content: center; min-height: 42px; color: #111f21; font-size: .96rem; font-weight: 800; }
.matrix-group:not(.is-last)::after { content: ""; width: 65%; height: 12px; margin-left: 10px; border-top: 3px solid #1d70d8; border-radius: 50%; }
.matrix-age { display: flex; min-height: 82px; align-items: center; justify-content: center; padding: 8px 4px 16px; border-left: 2px solid #1d70d8; color: #111; font-size: .95rem; font-weight: 700; line-height: 1.08; text-align: center; }
.matrix-label { position: sticky; z-index: 3; left: 0; display: flex; min-height: 84px; align-items: center; gap: 12px; padding: 10px 30px 10px 8px; background: linear-gradient(90deg, #fff 88%, rgba(255,255,255,0)); color: #101a1b; font-size: clamp(.8rem, 1.08vw, 1rem); font-weight: 700; line-height: 1.14; text-transform: uppercase; }
.matrix-label::after { position: absolute; right: 0; width: 16px; height: 3px; content: ""; background: #22d081; }
.matrix-label__icon { display: grid; flex: 0 0 39px; width: 39px; height: 39px; place-items: center; border: 2px solid var(--row-accent); border-radius: 13px; color: var(--row-accent); font-size: 1.1rem; transform: rotate(-5deg); }
.matrix-cell { position: relative; display: grid; min-height: 84px; place-items: center; border-left: 2px solid rgba(29,112,216,.68); }
.matrix-cell::before { position: absolute; z-index: 0; left: -2px; right: 0; top: 50%; height: 3px; content: ""; background: rgba(34,208,129,.72); }
.dose-node { position: relative; z-index: 1; display: grid; width: 58px; height: 58px; padding: 5px; place-items: center; border: 0; border-radius: 50%; background: #22d081; color: #063c2a; border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(9,136,128,.26), 0 3px 8px rgba(1,77,171,.10); font-size: .72rem; font-weight: 700; line-height: .9; text-align: center; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
.dose-node strong { display: block; font-size: 1.25rem; line-height: .85; }
.dose-node:hover, .dose-node:focus-visible { transform: translateY(-2px) scale(1.08); box-shadow: 0 0 0 2px rgba(1,77,171,.18), 0 8px 20px rgba(1,77,171,.22); }
.dose-node.is-code strong { font-size: 1rem; line-height: 1; }
.dose-node.is-renewal { background: #014dab; color: #fff; }
.mobile-calendar { display: none; }
.calendar-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 30px; padding: 18px 13px 0; color: #315b63; font-size: .8rem; text-transform: uppercase; }
.calendar-legend span { display: flex; align-items: center; gap: 8px; }
.calendar-legend__explain { max-width: 820px; text-transform: none; line-height: 1.4; }
.calendar-legend b { display: grid; width: 37px; height: 37px; place-items: center; border-radius: 50%; background: #22d081; color: #063c2a; font-size: .76rem; }
.calendar-legend__note { margin-left: auto; color: #758d92; text-transform: none; }

.calendar-action-hint {
  display: flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 10px 4px;
  color: #315b63;
  font-size: .82rem;
  line-height: 1.35;
}
.calendar-action-hint__icon {
  display: grid;
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 8px;
  background: #e6f0fc;
  color: #014dab;
  font-weight: 900;
}
.calendar-action-hint strong { color: #014dab; }

.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 230px;
  overflow: hidden;
  padding: 44px 52px;
  border-radius: 30px;
  background: linear-gradient(125deg, #e2f7f0 0%, #f6fbef 100%);
}
.hero::before, .hero::after {
  position: absolute;
  content: "";
  border-radius: 999px;
  background: rgba(255, 255, 255, .42);
}
.hero::before { width: 230px; height: 230px; top: -130px; right: 210px; }
.hero::after { width: 150px; height: 150px; right: -60px; bottom: -50px; }
.hero__copy { position: relative; z-index: 1; min-width: 0; max-width: 730px; }
.hero h1 { max-width: 700px; margin: 8px 0 12px; overflow-wrap: anywhere; font-size: clamp(2rem, 4.5vw, 3.55rem); line-height: 1.08; letter-spacing: -.05em; }
.hero p { max-width: 630px; margin: 0; color: var(--ink-soft); font-size: 1.02rem; }
.hero__mark {
  position: relative;
  z-index: 1;
  display: grid;
  flex: 0 0 116px;
  width: 116px;
  height: 116px;
  margin-left: 28px;
  place-items: center;
  border: 1px solid rgba(31, 157, 131, .16);
  border-radius: 36px;
  background: rgba(255,255,255,.7);
  box-shadow: 0 16px 35px rgba(17, 113, 95, .1);
  transform: rotate(4deg);
}
.hero__mark svg { width: 70px; fill: rgba(31,157,131,.12); stroke: var(--mint-500); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.eyebrow { color: var(--mint-700); font-size: .76rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }

.content-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 18px 0 26px;
  padding: 14px 18px;
  border: 1px solid #f1dfb5;
  border-radius: 14px;
  background: var(--amber-50);
  color: #725c2f;
  font-size: .82rem;
}
.content-note svg { flex: 0 0 20px; width: 20px; fill: none; stroke: var(--amber-500); stroke-width: 1.8; stroke-linecap: round; }
.content-note p { margin: 0; }

.tabs {
  display: inline-flex;
  gap: 5px;
  margin-bottom: 18px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.72);
}
.tab {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 700;
  cursor: pointer;
  transition: .18s ease;
}
.tab:hover { background: var(--mint-50); color: var(--mint-700); }
.tab.is-active { background: #014dab; color: #fff; box-shadow: 0 3px 12px rgba(1,77,171,.18); }
.tab svg, .search svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.search {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 38px;
}
.search > svg { position: absolute; left: 18px; color: var(--ink-soft); }
.search input {
  width: 100%;
  min-height: 54px;
  padding: 12px 50px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 5px 18px rgba(27,76,70,.04);
}
.search input::placeholder { color: #8ba09f; }
.search input:focus { border-color: var(--mint-500); }
.search__clear { position: absolute; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--mint-50); color: var(--mint-700); font-size: 1.4rem; cursor: pointer; }

.view { animation: reveal .32s ease; }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-heading h2 { margin: 3px 0 0; font-size: clamp(1.55rem, 3vw, 2.05rem); letter-spacing: -.035em; }
.section-heading p { margin: 0; color: var(--ink-soft); font-size: .9rem; }

.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.age-card {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: 0 7px 24px rgba(27,76,70,.05);
}
.age-card::after { position: absolute; content: ""; width: 64px; height: 64px; right: -28px; top: -28px; border-radius: 50%; background: var(--accent-soft); }
.age-card__number { display: grid; width: 36px; height: 36px; margin-bottom: 18px; place-items: center; border-radius: 11px; background: var(--accent-soft); color: var(--accent); font-size: .8rem; font-weight: 800; }
.age-card h3 { margin: 0 0 4px; font-size: 1.15rem; }
.age-card__hint { display: block; margin-bottom: 17px; color: var(--ink-soft); font-size: .75rem; }
.vaccination-list { display: flex; flex-wrap: wrap; gap: 8px; }
.vaccine-chip {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid var(--accent-border);
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--ink);
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.vaccine-chip:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(27,76,70,.12); }
.vaccine-chip svg { flex: 0 0 15px; width: 15px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; }
.vaccine-chip small { display: block; margin-top: 3px; color: var(--ink-soft); font-size: .61rem; font-weight: 600; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 18px; }
.info-card {
  display: flex;
  min-height: 180px;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.info-card:hover { transform: translateY(-3px); border-color: var(--mint-200); box-shadow: var(--shadow); }
.info-card__icon { display: grid; width: 42px; height: 42px; margin-bottom: 17px; place-items: center; border-radius: 13px; background: var(--mint-50); color: var(--mint-700); }
.info-card__icon svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.info-card h3 { margin: 0 0 7px; font-size: 1.03rem; }
.info-card p { display: -webkit-box; overflow: hidden; margin: 0 0 16px; color: var(--ink-soft); font-size: .88rem; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.info-card__link { margin-top: auto; color: var(--mint-700); font-size: .8rem; font-weight: 800; }
.empty-state { grid-column: 1/-1; padding: 40px 20px; border: 1px dashed var(--line); border-radius: 18px; color: var(--ink-soft); text-align: center; }

.catchup-callout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: min(900px, 100%);
  margin: 0 auto 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 7px 20px rgba(27, 76, 70, .05);
}
.catchup-callout__icon { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; background: var(--mint-100); color: var(--mint-700); font-size: 1.35rem; font-weight: 800; }
.catchup-callout strong { color: var(--ink); font-size: .98rem; }
.catchup-callout p { margin: 2px 0 0; color: var(--ink-soft); font-size: .84rem; }
.catchup-callout button { min-height: 40px; padding: 8px 13px; border: 1px solid var(--mint-200); border-radius: 11px; background: var(--mint-50); color: var(--mint-700); font-size: .8rem; font-weight: 800; cursor: pointer; }
.catchup-callout button:hover { background: var(--mint-100); }

.principle-card { margin-bottom: 26px; padding: 28px 30px; border: 1px solid #c8e7df; border-radius: 22px; background: linear-gradient(130deg, #e6f8f2, #f7fcfa); }
.principle-card > span { color: var(--mint-700); font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.principle-card h3 { max-width: 820px; margin: 7px 0 8px; font-size: clamp(1.35rem, 2.6vw, 2.05rem); line-height: 1.22; }
.principle-card p { max-width: 850px; margin: 0; color: var(--ink-soft); font-size: 1rem; }
.catchup-hero { padding: 34px; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(135deg, #edf2f9 0%, #f6f7fa 58%, #def6e2 100%); box-shadow: 0 14px 34px rgba(1,77,171,.08); }
.catchup-hero__eyebrow { display: inline-block; margin-bottom: 8px; color: var(--mint-700); font-size: .77rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.catchup-hero > h3 { max-width: 920px; margin: 0; color: #153f3c; font-size: clamp(1.65rem, 3.4vw, 2.75rem); line-height: 1.13; letter-spacing: -.04em; }
.catchup-hero__lead { max-width: 850px; margin: 13px 0 25px; color: #486c68; font-size: 1.05rem; line-height: 1.65; }
.assurance-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.assurance-grid article { display: flex; align-items: flex-start; gap: 12px; min-height: 158px; padding: 18px; border: 1px solid rgba(31,157,131,.16); border-radius: 16px; background: rgba(255,255,255,.76); }
.assurance-grid article > span { display: grid; flex: 0 0 35px; width: 35px; height: 35px; place-items: center; border-radius: 11px; background: var(--mint-100); color: var(--mint-700); font-size: 1.05rem; font-weight: 800; }
.assurance-grid strong { display: block; margin-bottom: 5px; color: var(--ink); font-size: .95rem; }
.assurance-grid p { margin: 0; color: var(--ink-soft); font-size: .83rem; line-height: 1.58; }
.family-doctor-message { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 17px 18px; border-radius: 15px; background: #fff; }
.family-doctor-message > span { display: grid; flex: 0 0 42px; width: 42px; height: 42px; place-items: center; border-radius: 13px; background: var(--blue-50); color: var(--blue-500); }
.family-doctor-message svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.family-doctor-message p { margin: 0; color: var(--ink-soft); font-size: .92rem; line-height: 1.55; }
.family-doctor-message strong { display: block; margin-bottom: 2px; color: var(--ink); }
.primary-action { min-height: 49px; margin-top: 17px; padding: 12px 19px; border: 0; border-radius: 13px; background: var(--mint-700); color: #fff; font-size: .9rem; font-weight: 800; cursor: pointer; }
.primary-action:hover { background: #0d5f50; }
.catchup-hero > .inline-sources { display: inline-flex; margin-left: 12px; vertical-align: middle; }
.decision-process { margin: 30px 0 10px; padding: 28px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.72); scroll-margin-top: 18px; }
.decision-process .section-heading { margin-bottom: 20px; }
.decision-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.decision-step { display: flex; gap: 14px; padding: 17px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); }
.decision-step > span { display: grid; flex: 0 0 38px; width: 38px; height: 38px; place-items: center; border-radius: 12px; background: var(--mint-50); color: var(--mint-700); font-weight: 800; }
.decision-step h3 { margin: 1px 0 5px; font-size: .96rem; }
.decision-step p { margin: 0; color: var(--ink-soft); font-size: .84rem; line-height: 1.55; }
.doctor-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 15px; padding: 18px; border-radius: 15px; background: var(--blue-50); }
.doctor-cta strong { color: #234f72; }
.doctor-cta p { margin: 3px 0 0; color: #587489; font-size: .86rem; }
.doctor-cta button { flex: 0 0 auto; min-height: 43px; padding: 10px 14px; border: 1px solid #c9ddf1; border-radius: 11px; background: #fff; color: #245d8f; font-size: .8rem; font-weight: 800; cursor: pointer; }
.scenarios-heading { margin-top: 38px; }
.scenario-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(265px, 1fr)); gap: 16px; }
.scenario-card { display: flex; min-height: 218px; flex-direction: column; align-items: flex-start; padding: 23px; border: 1px solid var(--line); border-radius: 19px; background: var(--paper); text-align: left; cursor: pointer; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.scenario-card:hover { transform: translateY(-3px); border-color: var(--mint-500); box-shadow: var(--shadow); }
.scenario-card__mark { display: grid; width: 42px; height: 42px; margin-bottom: 16px; place-items: center; border-radius: 13px; background: var(--mint-50); color: var(--mint-700); }
.scenario-card__mark svg, .system-card__icon svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.scenario-card h3, .system-card h3 { margin: 0 0 8px; font-size: 1.05rem; line-height: 1.35; }
.scenario-card p, .system-card p { margin: 0 0 18px; color: var(--ink-soft); font-size: .88rem; line-height: 1.6; }
.scenario-card > span:last-child { margin-top: auto; color: var(--mint-700); font-size: .82rem; font-weight: 800; }
.practical-subheading { margin-top: 48px; }
.system-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.system-card { padding: 23px; border: 1px solid var(--line); border-radius: 19px; background: rgba(255,255,255,.75); }
.system-card__icon { display: grid; width: 42px; height: 42px; margin-bottom: 16px; place-items: center; border-radius: 13px; background: var(--blue-50); color: var(--blue-500); }
.system-card .detail-list { font-size: .86rem; }
.inline-sources { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.inline-sources a { padding: 6px 9px; border-radius: 8px; background: var(--mint-50); color: var(--mint-700); font-size: .72rem; font-weight: 800; text-decoration: none; }

.faq-list { display: grid; gap: 30px; }
.question-group > h3 { margin: 0 0 12px; color: var(--mint-700); font-size: 1rem; letter-spacing: .03em; }
.question-group > div { display: grid; gap: 9px; }
.question-item { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.question-item summary { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 18px; color: var(--ink); font-size: .95rem; font-weight: 750; line-height: 1.45; cursor: pointer; list-style: none; }
.question-item summary::-webkit-details-marker { display: none; }
.question-item summary span { flex: 0 0 auto; color: var(--mint-700); font-size: 1.4rem; transition: transform .18s ease; }
.question-item[open] summary span { transform: rotate(45deg); }
.question-item[open] summary { background: var(--mint-50); }
.question-answer { padding: 4px 18px 18px; }
.question-answer > p { margin: 12px 0 0; color: var(--ink-soft); font-size: .94rem; line-height: 1.7; }
.decision-note { margin: 10px 0 18px; padding: 18px; border: 1px solid #ecd9a9; border-radius: 13px; background: var(--amber-50); }
.decision-note strong { color: #705624; }
.decision-note p { margin: 5px 0 0; color: #725f38; font-size: .92rem; line-height: 1.6; }

.results-header { margin-bottom: 22px; }
.results-header h2 { margin: 0 0 5px; font-size: 1.45rem; }
.results-header p { margin: 0; color: var(--ink-soft); font-size: .87rem; }
.search-groups { display: grid; gap: 25px; }
.search-group h3 { margin: 0 0 12px; font-size: .9rem; color: var(--ink-soft); }
.result-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.result-item { display: flex; width: 100%; min-height: 72px; align-items: center; gap: 13px; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); text-align: left; cursor: pointer; }
.result-item:hover { border-color: var(--mint-500); }
.result-item__tag { padding: 5px 8px; border-radius: 8px; background: var(--mint-50); color: var(--mint-700); font-size: .65rem; font-weight: 800; text-transform: uppercase; }
.result-item span:last-child { font-size: .88rem; font-weight: 700; }

.dialog-backdrop { position: fixed; z-index: 90; inset: 0; background: rgba(17, 50, 49, .45); backdrop-filter: blur(4px); animation: fade .2s ease; }
.detail-panel {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  width: min(700px, 100%);
  height: 100dvh;
  overflow: hidden;
  border: 0;
  background: var(--paper);
  box-shadow: -20px 0 70px rgba(17,50,49,.22);
  animation: slideIn .28s ease;
}
@keyframes fade { from { opacity: 0; } }
@keyframes slideIn { from { transform: translateX(100%); } }
.detail-panel__handle { display: none; }
.detail-panel__topbar { display: flex; height: 68px; align-items: center; gap: 9px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.detail-panel__context { overflow: hidden; flex: 1; color: var(--ink-soft); font-size: .88rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.icon-button { display: grid; flex: 0 0 42px; width: 42px; height: 42px; place-items: center; border: 0; border-radius: 12px; background: var(--mint-50); cursor: pointer; }
.icon-button:hover { background: var(--mint-100); }
.icon-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.detail-panel__body { height: calc(100dvh - 68px); overflow-y: auto; padding: 40px 46px 64px; overscroll-behavior: contain; }
.detail-kicker { display: inline-block; margin-bottom: 13px; padding: 6px 10px; border-radius: 8px; background: var(--mint-50); color: var(--mint-700); font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.detail-panel h2 { margin: 0 0 12px; font-size: clamp(2rem, 4.4vw, 2.75rem); line-height: 1.14; letter-spacing: -.04em; }
.detail-lead { margin: 0 0 34px; color: var(--ink-soft); font-size: 1.06rem; line-height: 1.65; }
.detail-section { padding: 28px 0; border-top: 1px solid var(--line); }
.detail-section h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 17px; font-size: 1.16rem; }
.detail-section h3 svg { width: 22px; fill: none; stroke: var(--mint-500); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.detail-section p { margin: 10px 0; color: var(--ink-soft); font-size: 1rem; line-height: 1.7; }
.detail-section strong { color: var(--ink); }
.detail-list { margin: 11px 0 0; padding-left: 22px; color: var(--ink-soft); font-size: .98rem; line-height: 1.65; }
.detail-list li + li { margin-top: 9px; }
.schedule-list { display: grid; gap: 8px; }
.schedule-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 15px; border-radius: 12px; background: var(--mint-50); font-size: .96rem; }
.schedule-row strong { font-size: .88rem; text-align: right; }
.related-list { display: flex; flex-wrap: wrap; gap: 8px; }
.related-button { min-height: 46px; padding: 10px 15px; border: 1px solid var(--mint-200); border-radius: 11px; background: var(--mint-50); color: var(--mint-700); font-size: .92rem; font-weight: 800; cursor: pointer; }
.related-button:hover { background: var(--mint-100); }
.safety-box { margin-top: 17px; padding: 18px; border-radius: 13px; background: var(--coral-50); }
.safety-box p { margin-top: 0; color: #825246; font-weight: 700; }
.calm-advice { border: 1px solid #f0ded7; background: #fff8f5; }
.calm-advice p { margin-bottom: 6px; color: #765b52; }
.calm-advice span { color: var(--ink-soft); font-size: .96rem; line-height: 1.65; }
.source-list { display: grid; gap: 10px; }
.source-link { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; padding: 14px 15px; border: 1px solid var(--line); border-radius: 12px; background: #fbfdfd; color: var(--ink); text-decoration: none; transition: border-color .18s ease, background .18s ease; }
.source-link:hover { border-color: var(--mint-500); background: var(--mint-50); }
.source-link span { grid-column: 1 / -1; color: var(--mint-700); font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.source-link strong { font-size: .92rem; line-height: 1.4; }
.source-link em { align-self: center; color: var(--mint-700); font-size: .76rem; font-style: normal; font-weight: 800; white-space: nowrap; }
.lock-scroll { overflow: hidden; }

.error-state, .noscript { margin: 30px 0; padding: 30px; border-radius: 18px; background: #fff0ec; color: #824b3e; text-align: center; }
footer { margin-top: 50px; padding: 22px 0 5px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: .77rem; text-align: center; }
footer p { margin: 0; }
footer .copyright { margin-top: 7px; font-size: .72rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); clip-path: inset(50%); white-space: nowrap; }

html.is-embedded body { background: transparent; }
html.is-embedded .app-shell { max-width: none; padding: 0; }
html.is-embedded .app-header { align-items: center; gap: 20px; margin-bottom: 12px; padding: 18px 22px 16px; }
html.is-embedded .app-header h1 { margin: 4px 0 8px; font-size: clamp(2.15rem, 3.15vw, 3.15rem); line-height: .98; }
html.is-embedded .app-header__title > p { font-size: .9rem; }
html.is-embedded .app-header__meta { min-width: 255px; gap: 8px; padding-top: 0; }
html.is-embedded .regional-brand { display: none; }
html.is-embedded .edition { font-size: .68rem; white-space: nowrap; }
html.is-embedded .app-controls { gap: 12px; margin-bottom: 10px; padding: 5px; }
html.is-embedded .app-controls .search input { min-height: 42px; }
html.is-embedded .tab { min-height: 40px; padding-top: 7px; padding-bottom: 7px; }
html.is-embedded .catchup-callout { margin-bottom: 10px; padding: 10px 14px; }
html.is-embedded .catchup-callout__icon { width: 34px; height: 34px; border-radius: 10px; font-size: 1.1rem; }
html.is-embedded .catchup-callout button { min-height: 36px; }
html.is-embedded .calendar-action-hint { margin-bottom: 8px; }
html.is-embedded .schedule-matrix { min-width: 930px; padding: 12px 14px 16px; }
html.is-embedded .matrix-corner { padding: 0 20px 10px 5px; font-size: .63rem; }
html.is-embedded .matrix-group { min-height: 30px; font-size: .82rem; }
html.is-embedded .matrix-group:not(.is-last)::after { height: 8px; border-top-width: 2px; }
html.is-embedded .matrix-age { min-height: 56px; padding: 5px 3px 9px; font-size: .79rem; }
html.is-embedded .matrix-label { min-height: 62px; gap: 9px; padding: 6px 20px 6px 5px; font-size: .76rem; }
html.is-embedded .matrix-label__icon { flex-basis: 31px; width: 31px; height: 31px; border-radius: 10px; font-size: .92rem; }
html.is-embedded .matrix-cell { min-height: 62px; }
html.is-embedded .dose-node { width: 48px; height: 48px; padding: 4px; font-size: .62rem; }
html.is-embedded .dose-node strong { font-size: 1.05rem; }
html.is-embedded .dose-node.is-code strong { font-size: .83rem; }
html.is-embedded .calendar-legend { gap: 8px 18px; padding: 10px 8px 0; font-size: .72rem; }
html.is-embedded footer { display: none; }

@media (min-width: 701px) and (max-width: 1450px) {
  .app-header h1 { font-size: clamp(2.15rem, 3.3vw, 3.15rem); }
  .schedule-matrix { min-width: 930px; }
  .matrix-label { font-size: .8rem; }
  .matrix-age { font-size: .82rem; }
}

@media (max-width: 1120px) {
  .app-controls { flex-wrap: wrap; }
  .app-controls .tabs { flex: 1 1 100%; }
  .app-controls .search { width: 100%; }
}

@media (max-width: 700px) {
  .app-shell { padding: 12px 14px 18px; }
  .app-header { display: block; padding: 12px 2px 20px; }
  .app-header h1 { font-size: clamp(2rem, 10.2vw, 2.65rem); overflow-wrap: anywhere; }
  .app-header__title > p { font-size: .9rem; }
  .app-header__meta { min-width: 0; align-items: flex-start; gap: 9px; padding-top: 20px; }
  .institution-marks { display: none; }
  .regional-brand { gap: 9px; padding-left: 10px; }
  .regional-brand span { font-size: .7rem; }
  .regional-brand small { font-size: .61rem; }
  .app-controls { display: block; padding: 5px; }
  .app-controls .tabs { margin-bottom: 7px; }
  .app-controls .search { width: 100%; }
  .schedule-board { display: none; }
  .mobile-calendar { display: block; }
  .calendar-legend { display: none; }
  .calendar-action-hint { margin: 0 0 12px; font-size: .8rem; }
  .hero { min-height: 0; padding: 30px 24px; border-radius: 22px; }
  .hero h1 { font-size: clamp(1.85rem, 8.5vw, 2.35rem); }
  .hero__mark { display: none; }
  .content-note { margin-bottom: 18px; }
  .tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .tab { min-width: 0; justify-content: center; padding-inline: 5px; font-size: .79rem; white-space: nowrap; }
  .tab svg { display: none; }
  .search { margin-bottom: 30px; }
  .section-heading { display: block; margin-bottom: 20px; }
  .section-heading p { margin-top: 5px; }
  .timeline { display: block; position: relative; padding-left: 17px; }
  .timeline::before { position: absolute; content: ""; top: 12px; bottom: 12px; left: 3px; width: 2px; background: var(--mint-200); }
  .age-card { min-height: 0; margin-bottom: 14px; padding: 20px; border-radius: 18px; overflow: visible; }
  .age-card::before { position: absolute; content: ""; top: 25px; left: -20px; width: 10px; height: 10px; border: 3px solid var(--canvas); border-radius: 50%; background: var(--accent); }
  .age-card::after { display: none; }
  .age-card__number { float: right; width: 32px; height: 32px; margin: 0 0 8px 12px; }
  .vaccine-chip { min-height: 44px; }
  .card-grid, .result-list { grid-template-columns: 1fr; }
  .info-card { min-height: 160px; }
  .catchup-callout { grid-template-columns: auto minmax(0, 1fr); gap: 13px; padding: 16px; }
  .catchup-callout__icon { width: 38px; height: 38px; }
  .catchup-callout button { grid-column: 1 / -1; width: 100%; }
  .scenario-grid, .system-grid { grid-template-columns: 1fr; }
  .principle-card { padding: 22px; }
  .catchup-hero { padding: 22px; }
  .catchup-hero__lead { font-size: .96rem; }
  .assurance-grid, .decision-steps { grid-template-columns: 1fr; }
  .assurance-grid article { min-height: 0; }
  .family-doctor-message { align-items: flex-start; }
  .primary-action { width: 100%; }
  .catchup-hero > .inline-sources { display: flex; margin-left: 0; }
  .decision-process { padding: 20px; }
  .doctor-cta { display: block; }
  .doctor-cta button { width: 100%; margin-top: 13px; }
  .scenario-card { min-height: 0; }
  .question-item summary { font-size: .92rem; }
  .dialog-backdrop { background: rgba(17,50,49,.38); }
  .detail-panel { top: max(7vh, 36px); width: 100%; height: calc(100dvh - max(7vh, 36px)); border-radius: 24px 24px 0 0; animation-name: sheetIn; }
  @keyframes sheetIn { from { transform: translateY(100%); } }
  .detail-panel__handle { display: block; width: 45px; height: 5px; margin: 9px auto 0; border-radius: 5px; background: var(--line); }
  .detail-panel__topbar { height: 57px; padding: 7px 14px; }
  .detail-panel__body { height: calc(100% - 71px); padding: 26px 24px 46px; }
  .detail-panel h2 { font-size: clamp(2rem, 9vw, 2.45rem); }
  .detail-lead { font-size: 1rem; }
  .detail-section p { font-size: .98rem; }
  .detail-list { font-size: .96rem; }
  html.is-embedded .app-shell { padding: 0; }
  html.is-embedded .app-header { padding: 22px 15px; border-radius: 0; }
  html.is-embedded .app-controls { border-radius: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}


/* v5: compact embedded UX, about view and anchored detail panel */
.app-shell { position: relative; }
.brand-watermark {
  position: absolute;
  z-index: 0;
  top: 22px;
  right: 32px;
  width: 150px;
  height: 150px;
  color: #014dab;
  opacity: .035;
  pointer-events: none;
}
.brand-watermark svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.app-header, .app-controls, main, footer { position: relative; z-index: 1; }

.compact-heading { margin-bottom: 18px; }
.subview-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.subview-toolbar > span { color: var(--ink-soft); font-size: .8rem; font-weight: 700; }
.subview-back { min-height: 40px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--mint-700); font-size: .82rem; font-weight: 800; cursor: pointer; }
.subview-back:hover { background: var(--mint-50); }

.about-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.about-brand-card, .about-card { padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.about-brand-card { background: linear-gradient(135deg, #fff 0%, #edf2f9 100%); }
.about-brand-card img { display: block; width: 205px; max-width: 100%; margin-bottom: 20px; border-radius: 4px; }
.about-brand-card h3, .about-card h3 { margin: 0 0 10px; font-size: 1.15rem; }
.about-brand-card p, .about-card p { margin: 0 0 12px; color: var(--ink-soft); font-size: .9rem; line-height: 1.6; }
.about-edition { display: inline-block; margin-top: 5px; }
.about-links { display: grid; gap: 8px; }
.about-links a { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--mint-50); color: var(--mint-700); font-size: .82rem; font-weight: 800; text-decoration: none; }
.about-links a:hover { background: var(--mint-100); }

/* Main "Корисно" should fit in one screen more often. */
#practical-main .catchup-hero { padding: 26px 30px; }
#practical-main .catchup-hero > h3 { font-size: clamp(1.55rem, 2.65vw, 2.25rem); }
#practical-main .catchup-hero__lead { margin: 10px 0 18px; font-size: .96rem; line-height: 1.5; }
#practical-main .assurance-grid article { min-height: 126px; padding: 15px; }
#practical-main .family-doctor-message { padding: 13px 15px; }
#practical-main .primary-action { margin-top: 13px; }
#practical-main .inline-sources { margin-top: 10px; }
#practical-more .scenario-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#practical-more .scenario-card { min-height: 185px; padding: 19px; }
#practical-more .decision-process { margin-top: 24px; }
#practical-more .practical-subheading { margin-top: 30px; }

/* In embedded mode details open next to the clicked item rather than at the top of a tall iframe. */
html.is-embedded .dialog-backdrop {
  position: absolute;
  inset: 0;
  min-height: 100%;
}
html.is-embedded .detail-panel {
  position: absolute;
  top: var(--detail-top, 8px);
  right: 14px;
  width: min(680px, calc(100% - 28px));
  height: 690px;
  max-height: 690px;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 22px 70px rgba(17,50,49,.25);
  animation-name: slideIn;
}
html.is-embedded .detail-panel__topbar { height: 56px; padding: 7px 12px; background: rgba(255,255,255,.98); }
html.is-embedded .detail-panel__body { height: calc(100% - 56px); padding: 24px 32px 34px; }
html.is-embedded .detail-panel h2 { font-size: clamp(2rem, 3vw, 2.55rem); }
html.is-embedded .detail-lead { margin-bottom: 22px; font-size: .98rem; line-height: 1.5; }
html.is-embedded .detail-section { padding: 20px 0; }
html.is-embedded .detail-section h3 { margin-bottom: 12px; }
html.is-embedded .detail-section p { margin: 7px 0; font-size: .94rem; line-height: 1.55; }
html.is-embedded .detail-list { font-size: .92rem; line-height: 1.5; }
html.is-embedded .schedule-row { padding: 10px 12px; }

/* Six tabs plus search at 100% zoom. */
html.is-embedded .app-controls { gap: 8px; }
html.is-embedded .app-controls .tabs { min-width: 0; flex: 1 1 auto; }
html.is-embedded .tabs { gap: 2px; }
html.is-embedded .tab { padding-left: 10px; padding-right: 10px; font-size: .79rem; }
html.is-embedded .tab svg { width: 17px; }
html.is-embedded .app-controls .search { flex: 0 1 350px; width: 350px; }
html.is-embedded .app-header__meta { min-width: 0; }
html.is-embedded .edition { white-space: normal; text-align: right; }
html.is-embedded .calendar-action-hint { margin-bottom: 7px; }

@media (max-width: 1180px) {
  html.is-embedded .app-controls { flex-wrap: wrap; }
  html.is-embedded .app-controls .tabs { width: 100%; }
  html.is-embedded .app-controls .search { width: 100%; flex-basis: 100%; }
  #practical-more .scenario-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .brand-watermark { width: 95px; height: 95px; top: 16px; right: 15px; opacity: .03; }
  .about-grid { grid-template-columns: 1fr; }
  #practical-main .catchup-hero { padding: 20px; }
  #practical-more .scenario-grid { grid-template-columns: 1fr; }
  .subview-toolbar { align-items: flex-start; flex-direction: column; }
  html.is-embedded .detail-panel { top: var(--detail-top, 8px); right: 6px; width: calc(100% - 12px); height: 650px; max-height: 650px; border-radius: 16px; }
  html.is-embedded .detail-panel__body { padding: 22px 20px 30px; }
}

/* v6: fullscreen, source/navigation polish, quiz and search highlighting */
.fullscreen-button {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f6f7fa;
  color: #014dab;
  font-size: .8rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.fullscreen-button:hover { background: #edf2f9; }
.fullscreen-button.is-active { background: #014dab; color: #fff; border-color: #014dab; }
.fullscreen-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
html.is-embedded .fullscreen-button { width: 46px; padding: 8px; }
html.is-embedded .fullscreen-button span { display: none; }

html:fullscreen { background: var(--canvas); overflow: auto; }
html:fullscreen body { min-height: 100vh; }
html:fullscreen .app-shell { max-width: none; width: 100%; padding: 18px 22px 28px; }
html:fullscreen .app-header { padding-top: 22px; padding-bottom: 22px; }
html:fullscreen .schedule-matrix { min-width: 1100px; }

/* Make the restored legend useful but visually secondary. */
.calendar-legend { padding-top: 11px; gap: 10px 22px; }
.calendar-legend__explain { max-width: 980px; font-size: .78rem; }
.calendar-legend__note { font-size: .74rem; }

/* Search-to-calendar orientation: show where the user landed, then fade. */
.matrix-age,
.matrix-cell,
.age-card { transition: background-color .22s ease, box-shadow .22s ease, outline-color .22s ease; }
.matrix-age.is-period-highlight {
  background: rgba(29,112,216,.10);
  box-shadow: inset 0 3px 0 rgba(29,112,216,.55);
}
.matrix-cell.is-period-highlight { background: rgba(29,112,216,.055); }
.dose-node.is-search-dose-highlight {
  animation: searchPulse 1.05s ease-in-out 2;
  box-shadow: 0 0 0 5px rgba(1,77,171,.22), 0 8px 22px rgba(1,77,171,.24);
}
.age-card.is-period-highlight {
  outline: 4px solid rgba(29,112,216,.28);
  outline-offset: 2px;
}
@keyframes searchPulse {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

/* Practical secondary screen: all requested modules are visibly part of the same subview. */
#practical-more .practical-module { margin: 0 0 22px; }
#practical-more .decision-process.practical-module { margin-top: 0; }
#practical-more .practical-subheading { margin-top: 0; }
#practical-more .system-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#practical-more .doctor-cta { margin-top: 8px; }

/* Simple self-check module. */
.quiz-module {
  margin: 0 0 30px;
  padding: 22px;
  border: 1px solid #c9ddf1;
  border-radius: 16px;
  background: linear-gradient(135deg, #f7fbff 0%, #edf2f9 100%);
}
.quiz-module__intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 15px;
}
.quiz-module__intro h3 { margin: 3px 0 0; font-size: 1.2rem; }
.quiz-module__intro p { max-width: 430px; margin: 0; color: var(--ink-soft); font-size: .82rem; text-align: right; }
.quiz-card,
.quiz-result {
  padding: 18px;
  border: 1px solid rgba(1,77,171,.12);
  border-radius: 13px;
  background: #fff;
}
.quiz-progress { display: block; margin-bottom: 8px; color: #014dab; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.quiz-card h4 { margin: 0 0 14px; font-size: 1.02rem; line-height: 1.4; }
.quiz-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.quiz-options button,
.quiz-feedback button,
.quiz-result button {
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}
.quiz-options button:hover:not(:disabled) { border-color: #1d70d8; background: #f4f8ff; }
.quiz-options button.is-correct { border-color: #22a96b; background: #e9f8ef; color: #0b5d38; }
.quiz-options button.is-wrong { border-color: #d78878; background: #fff1ee; color: #8e3f31; }
.quiz-options button:disabled { cursor: default; }
.quiz-feedback { margin-top: 14px; padding: 14px; border-radius: 11px; background: #f6f7fa; }
.quiz-feedback > strong { display: block; margin-bottom: 3px; }
.quiz-feedback p { margin: 0 0 9px; color: var(--ink-soft); font-size: .86rem; }
.quiz-feedback button { margin-top: 10px; border-color: #014dab; background: #014dab; color: #fff; }
.quiz-result { text-align: center; }
.quiz-result > strong { display: block; margin: 2px 0 5px; color: #014dab; font-size: 2rem; }
.quiz-result p { margin: 0 0 13px; color: var(--ink-soft); }
.quiz-result button { border-color: #014dab; color: #014dab; }

@media (max-width: 1180px) {
  #practical-more .system-grid { grid-template-columns: 1fr; }
  .fullscreen-button span { display: none; }
  .fullscreen-button { width: 46px; padding: 8px; }
}
@media (max-width: 760px) {
  .quiz-module__intro { align-items: flex-start; flex-direction: column; }
  .quiz-module__intro p { text-align: left; }
  .quiz-options { grid-template-columns: 1fr; }
  .calendar-legend__note { width: 100%; margin-left: 0; }
}

/* v8: age summaries and compact practical subtopics */
.calendar-guidance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.calendar-guidance-row .calendar-action-hint { flex: 1 1 auto; margin-bottom: 0; }
.calendar-quiz-link {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #c9ddf1;
  border-radius: 10px;
  background: #f7fbff;
  color: #014dab;
  font-size: .78rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.calendar-quiz-link:hover { background: #edf5ff; border-color: #9fc2e7; }

.age-summary {
  margin: 0 0 10px;
  padding: 15px 17px;
  border: 1px solid #c9ddf1;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fbff 0%, #f3f8fd 100%);
  box-shadow: 0 8px 24px rgba(1,77,171,.07);
}
.age-summary__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.age-summary__head h3 { margin: 2px 0 0; font-size: 1.12rem; }
.age-summary__close { width: 32px; height: 32px; border: 0; border-radius: 9px; background: #fff; color: var(--ink-soft); font-size: 1.25rem; cursor: pointer; }
.age-summary__close:hover { background: #edf2f9; color: var(--ink); }
.age-summary > p { margin: 7px 0 12px; color: var(--ink-soft); font-size: .88rem; line-height: 1.5; }
.age-summary__vaccines { display: flex; flex-wrap: wrap; gap: 8px; }
.age-summary__vaccine { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 7px 10px; border: 1px solid #c9ddf1; border-radius: 9px; background: #fff; color: var(--ink); cursor: pointer; }
.age-summary__vaccine:hover { border-color: #1d70d8; background: #f7fbff; }
.age-summary__vaccine strong { font-size: .82rem; }
.age-summary__vaccine span { color: var(--ink-soft); font-size: .74rem; }

.practical-link-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.practical-link-card { min-height: 174px; padding: 19px; border: 1px solid var(--line); border-radius: 15px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.practical-link-card:hover { transform: translateY(-2px); border-color: #9fc2e7; box-shadow: 0 10px 28px rgba(1,77,171,.08); }
.practical-link-card__icon { display: grid; width: 36px; height: 36px; place-items: center; margin-bottom: 14px; border-radius: 10px; background: #edf5ff; color: #014dab; font-weight: 900; }
.practical-link-card strong { display: block; margin-bottom: 7px; font-size: 1rem; }
.practical-link-card p { margin: 0 0 14px; color: var(--ink-soft); font-size: .84rem; line-height: 1.5; }
.practical-link-card em { color: #014dab; font-size: .78rem; font-style: normal; font-weight: 800; }
.practical-topic-card { padding-bottom: 6px; }
#practical-topic .system-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
#practical-topic .scenario-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
.practical-sources-card { margin-top: 16px; }
.public-health-note { background: linear-gradient(135deg, #f7fbff 0%, #eef8f4 100%); margin: 0 -12px; padding-left: 12px; padding-right: 12px; border-radius: 12px; }

@media (max-width: 1180px) {
  .calendar-guidance-row { align-items: stretch; flex-direction: column; }
  .calendar-quiz-link { align-self: flex-start; }
  .practical-link-grid { grid-template-columns: 1fr; }
  #practical-topic .system-grid, #practical-topic .scenario-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .age-summary__vaccines { display: grid; grid-template-columns: 1fr; }
  .age-summary__vaccine { justify-content: space-between; width: 100%; }
}

/* v9: floating age summary without changing the calendar layout */
.schedule-stage { position: relative; }
.age-summary {
  position: absolute;
  z-index: 24;
  top: 12px;
  left: 50%;
  width: min(460px, calc(100% - 24px));
  margin: 0;
  transform: translateX(-50%);
  background: rgba(248,251,255,.98);
  box-shadow: 0 16px 42px rgba(1,77,171,.16);
  backdrop-filter: blur(8px);
}
.age-summary[hidden] { display: none !important; }

@media (max-width: 700px) {
  .age-summary {
    position: fixed;
    z-index: 95;
    right: 10px;
    left: 10px;
    width: auto;
    max-height: min(54dvh, 430px);
    overflow-y: auto;
    transform: none;
  }
}


/* v10: age summary opens only from the age label, not from an empty matrix cell. */
.matrix-age[data-period-id] { cursor: pointer; }
.matrix-age[data-period-id]:hover { background: rgba(29,112,216,.065); }
.matrix-age[data-period-id]:focus-visible { outline: 3px solid rgba(29,112,216,.35); outline-offset: -3px; }
.matrix-cell { cursor: default; }


/* v11: adaptive embedded mode and separate self-check tab */
html.is-embedded .app-header {
  min-height: 0;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
html.is-embedded .app-header__title {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 10px;
}
html.is-embedded .app-header__title .eyebrow {
  flex: 0 0 auto;
  font-size: .62rem;
  letter-spacing: .09em;
}
html.is-embedded .app-header h1 {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.85rem);
  line-height: 1.05;
  letter-spacing: -.025em;
  text-transform: none;
  white-space: nowrap;
}
html.is-embedded .app-header__title > p { display: none; }
html.is-embedded .app-header__meta { margin-left: auto; }
html.is-embedded .edition {
  padding: 5px 8px;
  font-size: .61rem;
  line-height: 1.2;
}
html.is-embedded .brand-watermark { top: 8px; right: 16px; width: 82px; height: 82px; opacity: .025; }
html.is-embedded .app-controls { margin-bottom: 8px; padding: 4px; }
html.is-embedded .tab { min-height: 36px; gap: 5px; padding: 6px 8px; font-size: .71rem; }
html.is-embedded .tab svg { display: none; }
html.is-embedded .app-controls .search input { min-height: 38px; padding-top: 8px; padding-bottom: 8px; }
html.is-embedded .fullscreen-button { min-height: 38px; }
html.is-embedded .catchup-callout { margin-bottom: 7px; }
html.is-embedded .calendar-guidance-row { margin-bottom: 5px; }
html.is-embedded .schedule-board { border-radius: 12px; }
html.is-embedded .schedule-matrix { padding: 9px 9px 12px; }
html.is-embedded .matrix-corner { padding-right: 10px; }
html.is-embedded .matrix-label { padding-right: 10px; }
html.is-embedded .detail-panel {
  height: var(--detail-height, 620px);
  max-height: var(--detail-height, 620px);
}
html.is-embedded .quiz-module--standalone { max-width: 980px; margin: 0 auto; }

@media (max-width: 1250px) {
  html.is-embedded .app-controls { flex-wrap: wrap; }
  html.is-embedded .app-controls .tabs { width: 100%; flex: 1 1 100%; }
  html.is-embedded .tabs { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); width: 100%; }
  html.is-embedded .tab { justify-content: center; min-width: 0; white-space: nowrap; }
  html.is-embedded .app-controls .search { flex: 1 1 auto; width: auto; min-width: 230px; }
}

@media (max-width: 1020px) {
  html.is-embedded .app-header__meta { display: none; }
  html.is-embedded .app-header { padding: 9px 12px; }
  html.is-embedded .app-header h1 { font-size: clamp(1.15rem, 2.3vw, 1.55rem); }
  html.is-embedded .tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  html.is-embedded .tab { font-size: .69rem; }
  html.is-embedded .matrix-group { font-size: .72rem; }
  html.is-embedded .matrix-age { min-height: 50px; padding: 4px 2px 7px; font-size: .69rem; }
  html.is-embedded .matrix-label { min-height: 56px; gap: 6px; padding: 5px 7px 5px 3px; font-size: .66rem; }
  html.is-embedded .matrix-label__icon { display: none; }
  html.is-embedded .matrix-cell { min-height: 56px; }
  html.is-embedded .dose-node { width: 42px; height: 42px; font-size: .55rem; }
  html.is-embedded .dose-node strong { font-size: .92rem; }
  html.is-embedded .dose-node.is-code strong { font-size: .72rem; }
  html.is-embedded .calendar-legend { font-size: .67rem; }
}

@media (max-width: 820px) and (min-width: 701px) {
  html.is-embedded .app-header__title .eyebrow { display: none; }
  html.is-embedded .app-header h1 { font-size: 1.15rem; }
  html.is-embedded .tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  html.is-embedded .tab { padding-inline: 5px; font-size: .65rem; }
  html.is-embedded .calendar-action-hint { font-size: .72rem; }
  html.is-embedded .calendar-quiz-link { font-size: .7rem; }
}

@media (max-width: 700px) {
  html.is-embedded .app-header { padding: 10px 12px; border-radius: 0; }
  html.is-embedded .app-header__title { display: block; }
  html.is-embedded .app-header__title .eyebrow { display: inline-block; }
  html.is-embedded .app-header h1 { margin-top: 2px; font-size: 1.25rem; white-space: normal; }
  html.is-embedded .tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html.is-embedded .detail-panel { height: min(72dvh, 620px); max-height: min(72dvh, 620px); }
}

/* v12: mobile viewport polish */
@media (max-width: 700px) {
  /* Keep the detail sheet inside short phone screens instead of forcing 650px. */
  html.is-embedded .detail-panel {
    height: min(650px, calc(100dvh - 16px));
    max-height: calc(100dvh - 16px);
  }

  .detail-panel {
    max-height: calc(100dvh - 16px);
  }

  .detail-panel__body {
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 390px) {
  html.is-embedded .app-header { padding: 8px 10px; }
  html.is-embedded .app-header h1 { font-size: 1.12rem; }
  html.is-embedded .tab { min-height: 34px; padding: 5px 6px; font-size: .66rem; }
  html.is-embedded .app-controls .search { min-width: 0; width: 100%; flex-basis: 100%; }
  html.is-embedded .fullscreen-button { min-height: 36px; }
  html.is-embedded .detail-panel {
    right: 4px;
    width: calc(100% - 8px);
    border-radius: 14px;
  }
  html.is-embedded .detail-panel__body { padding: 18px 16px 26px; }
  html.is-embedded .detail-panel h2 { font-size: clamp(1.65rem, 8vw, 2rem); }
}

@media (max-width: 340px) {
  html.is-embedded .tab { font-size: .61rem; padding-inline: 4px; }
  html.is-embedded .app-header h1 { font-size: 1.03rem; }
  html.is-embedded .detail-panel__body { padding-inline: 14px; }
}

/* v14: audit fixes, accessibility and clearer calendar notes */
.edition { color: #536273; }
.search input::placeholder { color: #5f7474; opacity: 1; }
.calendar-legend__note { color: #52686e; }

.calendar-scope-notes {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
  color: #4d5e6d;
  font-size: .8rem;
  line-height: 1.5;
}
.calendar-scope-notes p { margin: 0; }
.calendar-scope-notes strong { color: var(--ink); }

.age-card__age-button {
  display: inline-block;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-align: left;
  cursor: pointer;
}
.age-card__age-button:hover { color: var(--mint-700); text-decoration: underline; text-underline-offset: 3px; }
.age-card__age-button:focus-visible { border-radius: 4px; }

.inline-sources a { text-underline-offset: 2px; }

html.is-embedded .detail-panel {
  height: var(--detail-height, 620px);
  max-height: var(--detail-height, 620px);
}

@media (max-width: 700px) {
  /* Keep the KDP/DP explanation visible on phones instead of hiding it entirely. */
  .calendar-legend {
    display: flex;
    gap: 8px;
    padding: 12px 2px 0;
    font-size: .74rem;
  }
  .calendar-legend__explain { width: 100%; max-width: none; }
  .calendar-legend__note { display: none; }
  .calendar-legend b { flex: 0 0 32px; width: 32px; height: 32px; }
  .calendar-scope-notes { font-size: .76rem; }
}

@media (max-width: 390px) {
  html.is-embedded .tab { font-size: .69rem; }
}

@media (max-width: 340px) {
  html.is-embedded .tab { font-size: .66rem; }
}


/* v15: cleaner header, bigger tabs, compact free note */
.app-header { display: block; padding: 20px 26px 18px; }
.app-header__title { text-align: center; }
.app-header h1 { margin: 0 0 12px; font-size: clamp(2.4rem, 4.3vw, 3.5rem); line-height: 1.02; letter-spacing: -.03em; text-transform: none; }
.app-header__title > p { max-width: 920px; margin: 0 auto; }
.app-header__meta, .app-header__title .eyebrow, .edition { display: none !important; }
.tabs { gap: 7px; }
.tab { min-height: 50px; padding: 11px 18px; font-size: .96rem; border-radius: 9px; }
.app-controls .search input { min-height: 52px; }
.calendar-guidance-row { align-items: flex-start; gap: 12px 16px; }
.calendar-quick-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.calendar-free-note { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 14px; border: 1px solid #c9ddf1; border-radius: 10px; background: #f7fbff; color: #014dab; font-size: .86rem; font-weight: 800; line-height: 1.25; }
.calendar-quiz-link { min-height: 44px; padding: 10px 14px; font-size: .84rem; }
.calendar-action-hint__icon { background: #edf5ff; font-size: .95rem; font-weight: 800; text-transform: uppercase; }
.calendar-scope-notes, #calendar-scope-note, #hepb-birth-note { display: none !important; }

html.is-embedded .app-header { padding: 14px 18px 12px; }
html.is-embedded .app-header__title { display: block; text-align: center; }
html.is-embedded .app-header h1 { margin: 0; font-size: clamp(1.7rem, 2.4vw, 2.35rem); white-space: normal; }
html.is-embedded .tab { min-height: 44px; padding: 8px 10px; font-size: .84rem; }
html.is-embedded .app-controls .search input { min-height: 44px; }
html.is-embedded .calendar-guidance-row { margin-bottom: 10px; }
html.is-embedded .calendar-quick-actions { gap: 10px; }
html.is-embedded .calendar-free-note { min-height: 40px; padding: 8px 12px; font-size: .78rem; }
html.is-embedded .calendar-quiz-link { min-height: 40px; font-size: .77rem; }

@media (max-width: 1250px) {
  html.is-embedded .tabs { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  html.is-embedded .tab { font-size: .8rem; }
}
@media (max-width: 1180px) {
  .calendar-guidance-row { flex-direction: column; }
  .calendar-quick-actions { width: 100%; justify-content: flex-start; }
}
@media (max-width: 1020px) {
  html.is-embedded .app-header h1 { font-size: clamp(1.45rem, 2.7vw, 1.9rem); }
  html.is-embedded .tab { min-height: 42px; font-size: .78rem; }
}
@media (max-width: 700px) {
  .app-header { padding: 16px 12px; }
  .app-header h1 { font-size: clamp(1.9rem, 8vw, 2.5rem); }
  .tab { min-height: 46px; font-size: .86rem; }
  .calendar-action-hint { margin-left: 0; }
  .calendar-free-note, .calendar-quiz-link { width: 100%; justify-content: center; }
  html.is-embedded .app-header { padding: 12px 10px; }
  html.is-embedded .app-header h1 { font-size: 1.38rem; }
  html.is-embedded .tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html.is-embedded .tab { min-height: 40px; font-size: .74rem; }
}
@media (max-width: 390px) {
  html.is-embedded .app-header h1 { font-size: 1.24rem; }
  html.is-embedded .tab { font-size: .7rem; }
}


/* v16: calmer free-vaccination note and self-check after calendar */
.calendar-guidance-row { align-items: center; }
.calendar-action-hint { width: auto; flex: 1 1 auto; margin: 0; padding: 0; }
.calendar-action-hint__icon { display: none !important; }
.calendar-free-note {
  display: block;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #315b63;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}
.calendar-free-note::before { content: "✓"; margin-right: 7px; color: #098880; font-weight: 900; }
.calendar-quick-actions { display: none !important; }
.calendar-after-quiz {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 12px 4px 0;
  color: #647181;
  font-size: .78rem;
}
.calendar-after-quiz .calendar-quiz-link {
  min-height: 38px;
  padding: 7px 11px;
  border-color: #d4e1ee;
  background: #fff;
  font-size: .76rem;
  box-shadow: none;
}
.calendar-after-quiz .calendar-quiz-link:hover { background: #f7fbff; border-color: #aac9e7; }
html.is-embedded .calendar-guidance-row { margin-bottom: 8px; }
html.is-embedded .calendar-free-note { font-size: .75rem; }
html.is-embedded .calendar-after-quiz { margin-top: 9px; font-size: .72rem; }
html.is-embedded .calendar-after-quiz .calendar-quiz-link { min-height: 34px; padding: 6px 10px; font-size: .72rem; }

@media (max-width: 1180px) {
  .calendar-guidance-row { align-items: flex-start; flex-direction: column; gap: 4px; }
  .calendar-free-note { white-space: normal; }
}
@media (max-width: 700px) {
  .calendar-after-quiz { align-items: flex-start; flex-direction: column; margin: 10px 0 0; }
  .calendar-after-quiz .calendar-quiz-link { width: auto; justify-content: flex-start; }
  .calendar-free-note { font-size: .78rem; }
}


/* v17: calmer search and cleaner self-check link */
.search input::-webkit-search-cancel-button,
.search input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}
.search input::-ms-clear,
.search input::-ms-reveal { display: none; width: 0; height: 0; }
.calendar-after-quiz { justify-content: flex-end; }
@media (max-width: 700px) {
  .calendar-after-quiz { align-items: flex-start; }
}

/* v18: mobile-first calendar flow for narrow WordPress embeds */
.mobile-calendar-note { display: none; }
.mobile-calendar-toolbar { display: none; }
.mobile-vaccine-overview, .mobile-free-note { display: none; }

@media (max-width: 700px) {
  body { background: #f3f6fa; }
  .app-shell { padding: 0 12px 18px; }

  .app-header {
    position: relative;
    overflow: hidden;
    margin: 0 -12px 8px;
    padding: 22px 18px 20px;
    border: 0;
    border-radius: 0 0 22px 22px;
    background: linear-gradient(135deg, #fff 5%, #eef5ff 64%, #eaf8f2 100%);
    box-shadow: 0 8px 24px rgba(1,77,171,.08);
  }
  .app-header::after {
    position: absolute;
    right: -28px;
    bottom: -52px;
    width: 132px;
    height: 132px;
    border: 22px solid rgba(34,208,129,.13);
    border-radius: 50%;
    content: "";
  }
  .app-header__title { position: relative; z-index: 1; text-align: left; }
  .app-header h1 {
    max-width: 315px;
    margin: 0 0 8px;
    font-size: clamp(1.62rem, 7.7vw, 2.05rem);
    line-height: 1.02;
    letter-spacing: -.035em;
  }
  .app-header__title > p {
    display: block;
    max-width: 310px;
    margin: 0;
    color: #536779;
    font-size: .82rem;
    line-height: 1.4;
  }

  .app-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 7px;
    margin: 0 0 14px;
    padding: 7px;
    border-radius: 14px;
    box-shadow: 0 7px 22px rgba(1,77,171,.06);
  }
  .app-controls .tabs {
    grid-column: 1 / -1;
    display: flex;
    gap: 6px;
    width: auto;
    margin: 0 -1px 1px;
    padding: 0 1px 3px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }
  .app-controls .tabs::-webkit-scrollbar { display: none; }
  .tab,
  html.is-embedded .tab {
    flex: 0 0 auto;
    min-height: 42px;
    gap: 7px;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 11px;
    font-size: .78rem;
    scroll-snap-align: start;
  }
  .tab svg,
  html.is-embedded .tab svg { display: block; flex: 0 0 17px; width: 17px; }
  .tab:not(.is-active) { border-color: #e4eaf1; background: #f8fafc; }
  .app-controls .search { grid-column: 1; width: 100%; min-width: 0; margin: 0; }
  .app-controls .search input,
  html.is-embedded .app-controls .search input {
    min-height: 44px;
    padding: 9px 42px;
    background: #f6f8fb;
  }
  .search > svg { left: 14px; width: 18px; }
  .fullscreen-button,
  html.is-embedded .fullscreen-button { grid-column: 2; width: 44px; min-height: 44px; padding: 8px; }

  main { min-width: 0; }
  .calendar-guidance-row { margin: 0 2px 10px; }
  .calendar-action-hint { display: none; }
  .calendar-free-note { font-size: .76rem; }

  .mobile-calendar {
    overflow: hidden;
    margin: 0;
    border: 1px solid #d5e1ee;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(1,77,171,.1);
  }
  .mobile-calendar__heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin: 0;
    padding: 18px 18px 14px;
  }
  .mobile-calendar__heading h2 { margin-top: 1px; font-size: 1.48rem; }
  .mobile-calendar__heading p { max-width: 142px; margin: 0; color: #607184; font-size: .7rem; line-height: 1.35; text-align: right; }
  .timeline { display: block; padding: 0; }
  .timeline::before { display: none; }

  .mobile-age-rail {
    position: relative;
    display: flex;
    gap: 0;
    padding: 4px 12px 13px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }
  .mobile-age-rail::-webkit-scrollbar { display: none; }
  .mobile-age-rail::before {
    position: absolute;
    top: 24px;
    right: 26px;
    left: 26px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, #22d081, #1d70d8);
    content: "";
  }
  .mobile-age-tab {
    position: relative;
    z-index: 1;
    display: grid;
    flex: 0 0 72px;
    justify-items: center;
    padding: 0 3px;
    border: 0;
    background: transparent;
    color: #526474;
    cursor: pointer;
    scroll-snap-align: center;
  }
  .mobile-age-tab > span {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 3px solid #22c983;
    border-radius: 50%;
    background: #fff;
    color: #075f45;
    box-shadow: 0 0 0 4px #fff;
    font-size: .72rem;
    font-weight: 850;
    transition: .18s ease;
  }
  .mobile-age-tab > small {
    width: 72px;
    margin-top: 7px;
    overflow: hidden;
    font-size: .62rem;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-age-tab.is-active > span {
    border-color: #014dab;
    background: #014dab;
    color: #fff;
    box-shadow: 0 0 0 4px #fff, 0 5px 14px rgba(1,77,171,.3);
    transform: scale(1.08);
  }
  .mobile-age-tab.is-active > small { color: #014dab; }

  .mobile-age-detail {
    position: relative;
    margin: 0;
    padding: 19px 18px 16px;
    border-top: 1px solid #dce6f0;
    background: linear-gradient(145deg, #f9fbff 0%, #fff 48%, #f2fbf7 100%);
  }
  .mobile-age-detail::before {
    position: absolute;
    top: -2px;
    left: 18px;
    width: 74px;
    height: 3px;
    border-radius: 3px;
    background: #014dab;
    content: "";
  }
  .mobile-age-detail__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
  .mobile-age-detail__head h3 { margin: 2px 0 1px; font-size: 1.42rem; line-height: 1.12; letter-spacing: -.025em; }
  .mobile-age-detail__head p { margin: 0; color: #647181; font-size: .75rem; }
  .mobile-age-detail__count { flex: 0 0 auto; color: #014dab; font-size: 1.08rem; font-weight: 850; }
  .mobile-age-detail__count small { color: #7b8998; font-size: .7rem; }
  .mobile-age-detail__summary { margin: 13px 0 15px; color: #43586a; font-size: .82rem; line-height: 1.5; }

  .mobile-vaccine-list { display: grid; gap: 8px; }
  .mobile-vaccine-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 52px;
    min-height: 64px;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 7px 7px 7px 14px;
    border: 1px solid #d9e6e2;
    border-radius: 14px;
    background: rgba(255,255,255,.92);
    text-align: left;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(17,73,63,.045);
  }
  .mobile-vaccine-row__name strong { display: block; font-size: .88rem; line-height: 1.24; }
  .mobile-vaccine-row__name small { display: block; margin-top: 3px; color: #647181; font-size: .67rem; }
  .mobile-dose {
    display: grid;
    width: 48px;
    height: 48px;
    place-content: center;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #22d081;
    color: #063c2a;
    box-shadow: 0 0 0 1px rgba(9,136,128,.26), 0 4px 10px rgba(1,77,171,.11);
    line-height: .82;
    text-align: center;
  }
  .mobile-dose strong { font-size: 1.04rem; }
  .mobile-dose small { display: block; font-size: .52rem; font-weight: 750; }
  .mobile-dose.is-renewal { background: #014dab; color: #fff; }
  .mobile-dose strong.is-code { max-width: 38px; font-size: .7rem; line-height: 1; }
  .mobile-vaccine-row:active { transform: scale(.985); }

  .mobile-age-detail__nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; }
  .mobile-age-detail__nav button {
    min-height: 39px;
    padding: 7px 10px;
    border: 0;
    background: transparent;
    color: #014dab;
    font-size: .76rem;
    font-weight: 800;
    cursor: pointer;
  }
  .mobile-age-detail__nav button:disabled { color: #a5afb9; cursor: default; }

  .calendar-after-quiz { margin: 11px 2px 0; }
  .calendar-after-quiz .calendar-quiz-link { min-height: 42px; border-radius: 11px; }
  .calendar-legend { display: none; }
  .mobile-calendar-note {
    display: block;
    margin: 10px 2px 0;
    border: 1px solid #d9e3ed;
    border-radius: 12px;
    background: rgba(255,255,255,.7);
    color: #526678;
    font-size: .76rem;
  }
  .mobile-calendar-note summary {
    padding: 11px 13px;
    color: #315367;
    font-weight: 800;
    cursor: pointer;
  }
  .mobile-calendar-note p { margin: 0; padding: 0 13px 13px; line-height: 1.5; }

  .section-heading:not(.mobile-calendar__heading) { padding-top: 5px; }
  .card-grid { gap: 10px; }
  .info-card {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    min-height: 0;
    gap: 2px 13px;
    padding: 15px;
    border-radius: 14px;
  }
  .info-card__icon { grid-row: 1 / span 3; width: 46px; height: 46px; margin: 0; }
  .info-card h3, .info-card p, .info-card__link { grid-column: 2; }
  .info-card h3 { margin: 0; }
  .info-card p { margin: 2px 0 5px; font-size: .78rem; -webkit-line-clamp: 1; }
  .info-card__link { font-size: .72rem; }
}

@media (max-width: 700px) {
  html.is-embedded body { background: #f3f6fa; }
  html.is-embedded .app-shell { padding: 0 12px 16px; }
  html.is-embedded .app-header { margin: 0 -12px 8px; padding: 20px 18px 18px; border: 0; border-radius: 0 0 22px 22px; }
  html.is-embedded .app-header__title { text-align: left; }
  html.is-embedded .app-header h1 { max-width: none; margin: 0 0 7px; font-size: 1.45rem; }
  html.is-embedded .app-header__title > p { display: none; }
  html.is-embedded .app-controls { display: grid; margin-bottom: 14px; padding: 7px; border-radius: 14px; }
  html.is-embedded .tabs { display: flex; width: auto; }
  html.is-embedded .app-controls .search { width: 100%; min-width: 0; }
}

@media (max-width: 360px) {
  .app-shell,
  html.is-embedded .app-shell { padding-right: 9px; padding-left: 9px; }
  .app-header,
  html.is-embedded .app-header { margin-right: -9px; margin-left: -9px; padding-right: 14px; padding-left: 14px; }
  .app-header h1,
  html.is-embedded .app-header h1 { max-width: none; font-size: 1.36rem; }
  .app-header__title > p,
  html.is-embedded .app-header__title > p { max-width: 285px; font-size: .75rem; }
  .mobile-calendar__heading { padding-right: 14px; padding-left: 14px; }
  .mobile-calendar__heading p { max-width: 116px; }
  .mobile-age-detail { padding-right: 14px; padding-left: 14px; }
  .mobile-age-detail__head h3 { font-size: 1.28rem; }
}

/* v19: full mobile scheme with a table / age view switch */
@media (max-width: 700px) {
  .calendar-guidance-row { display: none; }
  .mobile-calendar-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 9px;
    padding: 5px;
    border: 1px solid #d7e2ee;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(1,77,171,.06);
  }
  .mobile-calendar-switch {
    display: grid;
    flex: 1 1 auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 3px;
    border-radius: 10px;
    background: #eef4fb;
  }
  .mobile-calendar-switch button {
    min-height: 38px;
    padding: 7px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #5b6d80;
    font-size: .76rem;
    font-weight: 800;
    cursor: pointer;
  }
  .mobile-calendar-switch button.is-active {
    background: #0867d1;
    color: #fff;
    box-shadow: 0 4px 10px rgba(1,77,171,.2);
  }
  .mobile-table-hint {
    flex: 0 0 auto;
    padding-right: 5px;
    color: #687b8d;
    font-size: .63rem;
    font-weight: 700;
    white-space: nowrap;
  }

  .schedule-stage { display: none; }
  .schedule-board {
    display: block;
    margin: 0;
    border-radius: 16px;
    background: linear-gradient(125deg, #fff 0%, #eef6ff 100%);
    box-shadow: 0 12px 28px rgba(1,77,171,.09);
    scroll-snap-type: x proximity;
  }
  .schedule-matrix,
  html.is-embedded .schedule-matrix { padding: 8px 8px 12px; }
  .matrix-corner,
  html.is-embedded .matrix-corner {
    min-height: 32px;
    padding: 0 12px 8px 4px;
    font-size: .58rem;
    line-height: 1.2;
  }
  .matrix-group,
  html.is-embedded .matrix-group { min-height: 30px; font-size: .68rem; }
  .matrix-age,
  html.is-embedded .matrix-age {
    min-height: 54px;
    padding: 5px 2px 8px;
    font-size: .65rem;
    line-height: 1.08;
  }
  .matrix-label,
  html.is-embedded .matrix-label {
    min-height: 57px;
    gap: 5px;
    padding: 5px 12px 5px 4px;
    font-size: .62rem;
    line-height: 1.14;
  }
  .matrix-label__icon,
  html.is-embedded .matrix-label__icon { display: none; }
  .matrix-cell,
  html.is-embedded .matrix-cell { min-height: 57px; }
  .dose-node,
  html.is-embedded .dose-node { width: 40px; height: 40px; padding: 3px; font-size: .53rem; }
  .dose-node strong,
  html.is-embedded .dose-node strong { font-size: .88rem; }
  .dose-node.is-code strong,
  html.is-embedded .dose-node.is-code strong { font-size: .67rem; }

  .mobile-vaccine-overview {
    display: block;
    overflow: hidden;
    border: 1px solid #d5e1ee;
    border-radius: 18px;
    background: linear-gradient(145deg, #fff 0%, #f5faff 58%, #f1fbf7 100%);
    box-shadow: 0 12px 28px rgba(1,77,171,.08);
  }
  .mobile-overview-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 16px 13px;
    border-bottom: 1px solid #dce6f0;
  }
  .mobile-overview-head h2 { margin: 2px 0 0; font-size: 1.2rem; line-height: 1.15; }
  .mobile-overview-head > span { color: #6a7b8c; font-size: .67rem; font-weight: 700; line-height: 1.15; text-align: right; white-space: nowrap; }
  .mobile-overview-head > span small { display: block; margin-top: 3px; color: #014dab; font-size: .58rem; }
  .mobile-overview-list { padding: 6px 10px; }
  .mobile-overview-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(16px, .42fr) 48px;
    min-height: 62px;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 6px 4px 6px 7px;
    border: 0;
    border-bottom: 1px solid #dfe8ee;
    background: transparent;
    text-align: left;
    cursor: pointer;
  }
  .mobile-overview-row:last-child { border-bottom: 0; }
  .mobile-overview-row__name strong { display: block; font-size: .78rem; line-height: 1.22; }
  .mobile-overview-row__name small { display: block; margin-top: 3px; color: #647688; font-size: .65rem; }
  .mobile-overview-row__line { height: 3px; border-radius: 3px; background: linear-gradient(90deg, #22d081, #1d70d8); }
  .mobile-overview-row .mobile-dose { width: 44px; height: 44px; }
  .mobile-overview-row:active { background: rgba(230,240,252,.7); }
  .mobile-full-table-link {
    width: calc(100% - 20px);
    min-height: 42px;
    margin: 5px 10px 11px;
    padding: 8px 10px;
    border: 1px solid #cbdcec;
    border-radius: 11px;
    background: #fff;
    color: #014dab;
    font-size: .73rem;
    font-weight: 800;
    cursor: pointer;
  }

  #calendar-view:not(.is-ages-mode) .mobile-calendar { display: none; }
  #calendar-view.is-ages-mode .mobile-vaccine-overview { display: none; }
  #calendar-view.is-ages-mode .mobile-calendar { display: block; }
  #calendar-view.is-table-mode .mobile-vaccine-overview,
  #calendar-view.is-table-mode .mobile-calendar { display: none; }
  #calendar-view.is-table-mode .schedule-stage { display: block; }

  .mobile-free-note {
    display: block;
    margin: 10px 3px 0;
    color: #315b63;
    font-size: .74rem;
    font-weight: 700;
  }
  .mobile-free-note::before { margin-right: 7px; color: #098880; content: "✓"; font-weight: 900; }
}

@media (max-width: 370px) {
  .mobile-table-hint { display: none; }
}

/* v20: compact mobile app shell and actionable schedule summaries */
.mobile-title,
.overview-shortcut,
.home-shortcut,
.search-toggle,
.about-shortcut,
.mobile-calendar-actions { display: none; }

@media (max-width: 700px) {
  body { padding-bottom: 78px; }
  .app-shell,
  html.is-embedded .app-shell { padding: 0 10px 16px; }

  .app-header,
  html.is-embedded .app-header {
    min-height: 64px;
    margin: 0 -10px 10px;
    padding: 13px 134px 13px 15px;
    border: 0;
    border-bottom: 1px solid #d8e4ef;
    border-radius: 0 0 15px 15px;
    background-color: #f1f7fd;
    background-image:
      linear-gradient(rgba(1,77,171,.035) 1px, transparent 1px),
      linear-gradient(90deg, rgba(1,77,171,.035) 1px, transparent 1px),
      linear-gradient(135deg, rgba(255,255,255,.96), rgba(230,244,255,.92));
    background-size: 14px 14px, 14px 14px, auto;
    box-shadow: 0 5px 16px rgba(1,77,171,.07);
  }
  .app-header::after { display: none; }
  .desktop-title { display: none; }
  .mobile-title { display: inline; }
  .app-header h1,
  html.is-embedded .app-header h1 {
    max-width: none;
    margin: 0;
    font-size: 1.3rem;
    line-height: 1.08;
    letter-spacing: -.025em;
    white-space: nowrap;
  }
  .app-header__title > p,
  html.is-embedded .app-header__title > p { display: none; }
  .brand-watermark { display: none; }

  .app-controls,
  html.is-embedded .app-controls {
    position: absolute;
    z-index: 70;
    top: 9px;
    right: 8px;
    display: flex;
    gap: 4px;
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .overview-shortcut,
  .home-shortcut,
  .search-toggle,
  .about-shortcut {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    padding: 0;
    border: 1px solid #cfdeec;
    border-radius: 11px;
    background: rgba(255,255,255,.92);
    color: #014dab;
    cursor: pointer;
  }
  .overview-shortcut svg,
  .home-shortcut svg,
  .search-toggle svg,
  .about-shortcut svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .overview-shortcut.is-active,
  .home-shortcut.is-active,
  .about-shortcut.is-active,
  .app-controls.is-search-open .search-toggle {
    border-color: #014dab;
    background: #014dab;
    color: #fff;
    box-shadow: 0 4px 11px rgba(1,77,171,.22);
  }
  .app-controls.is-search-open .overview-shortcut.is-active,
  .app-controls.is-search-open .home-shortcut.is-active,
  .app-controls.is-search-open .about-shortcut.is-active {
    border-color: #cfdeec;
    background: rgba(255,255,255,.92);
    color: #014dab;
    box-shadow: none;
  }
  .app-controls.is-search-open .search-toggle svg { display: none; }
  .app-controls.is-search-open .search-toggle::after { content: "×"; font-size: 1.4rem; line-height: 1; }
  .app-controls .search,
  html.is-embedded .app-controls .search {
    position: absolute;
    top: 47px;
    right: 0;
    display: none;
    width: min(360px, calc(100vw - 20px));
    min-width: 0;
    margin: 0;
    padding: 6px;
    border: 1px solid #cfdeec;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(1,52,115,.2);
  }
  .app-controls.is-search-open .search,
  html.is-embedded .app-controls.is-search-open .search { display: flex; }
  .app-controls .search input,
  html.is-embedded .app-controls .search input { min-height: 44px; }
  .fullscreen-button,
  html.is-embedded .fullscreen-button { display: none; }

  .app-controls .tabs,
  html.is-embedded .app-controls .tabs {
    position: fixed;
    z-index: 84;
    right: 8px;
    bottom: max(7px, env(safe-area-inset-bottom));
    left: 8px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    width: auto;
    margin: 0;
    padding: 5px;
    overflow: visible;
    border: 1px solid #cad9e7;
    border-radius: 16px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 12px 34px rgba(1,52,115,.2);
    backdrop-filter: blur(12px);
  }
  #tab-quiz,
  #tab-about { display: none; }
  .tab,
  html.is-embedded .tab {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 50px;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 5px 2px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: #657789;
    font-size: .61rem;
    line-height: 1.05;
    white-space: nowrap;
  }
  .tab svg,
  html.is-embedded .tab svg { display: block; width: 18px; height: 18px; }
  .tab.is-active {
    background: #eaf3ff;
    color: #014dab;
    box-shadow: none;
  }
  .tab.is-active::before {
    position: absolute;
    top: 2px;
    width: 20px;
    height: 3px;
    border-radius: 3px;
    background: #1d70d8;
    content: "";
  }

  .mobile-calendar-toolbar {
    margin-bottom: 8px;
    padding: 4px;
    border-radius: 13px;
  }
  .mobile-calendar-switch { width: 100%; }
  .mobile-calendar-switch button { min-height: 36px; }
  .mobile-table-hint { display: none; }

  .mobile-overview-head,
  .mobile-calendar__heading {
    align-items: center;
    padding: 12px 14px 10px;
  }
  .mobile-overview-head h2,
  .mobile-calendar__heading h2 { font-size: 1.05rem; }
  .mobile-calendar__heading p { display: none; }
  .mobile-overview-list,
  .mobile-age-list { padding: 4px 9px 8px; }

  .mobile-overview-row,
  .mobile-age-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 58px 62px;
    min-height: 66px;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 6px 3px 6px 7px;
    border: 0;
    border-bottom: 1px solid #dfe8ee;
    background: transparent;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
  }
  .mobile-overview-row.has-dtp-flow { grid-template-columns: minmax(0, 1fr) 70px 62px; gap: 6px; }
  .mobile-overview-row:last-child,
  .mobile-age-row:last-of-type { border-bottom: 0; }
  .mobile-overview-row__name strong,
  .mobile-age-row__name strong { display: block; font-size: .76rem; line-height: 1.2; }
  .mobile-overview-row__name small,
  .mobile-age-row__name small { display: block; margin-top: 3px; color: #627588; font-size: .62rem; line-height: 1.2; }

  .mobile-mini-chart {
    display: flex;
    min-width: 52px;
    align-items: center;
    justify-content: center;
  }
  .mobile-mini-chart i {
    position: relative;
    z-index: 1;
    display: block;
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #22c983;
    box-shadow: 0 0 0 1px #13a975;
  }
  .mobile-mini-chart i + i { margin-left: 5px; }
  .mobile-mini-chart i + i::before {
    position: absolute;
    top: 1px;
    right: 6px;
    width: 7px;
    height: 2px;
    background: #20b889;
    content: "";
  }
  .mobile-mini-chart b { margin-left: 4px; color: #014dab; font-size: .65rem; }
  .mobile-mini-chart b.is-cycle { font-size: .9rem; line-height: 1; }
  .mobile-mini-chart.is-dtp-flow { min-width: 68px; gap: 2px; }
  .mobile-mini-chart.is-dtp-flow .dtp-step {
    display: grid;
    min-width: 20px;
    justify-items: center;
    padding: 3px 2px;
    border: 1px solid #9edac6;
    border-radius: 7px;
    background: #effbf6;
    color: #087556;
    line-height: .9;
  }
  .mobile-mini-chart.is-dtp-flow .dtp-step strong { font-size: .64rem; }
  .mobile-mini-chart.is-dtp-flow .dtp-step small { margin-top: 2px; font-size: .42rem; font-weight: 900; }
  .mobile-mini-chart.is-dtp-flow em { color: #5d7890; font-size: .55rem; font-style: normal; font-weight: 900; }

  .mobile-dose-total,
  .mobile-age-row__meta {
    display: grid;
    min-width: 60px;
    justify-items: center;
    padding: 4px 4px 3px;
    border: 1px solid #b9d5ef;
    border-radius: 10px;
    background: #f0f7ff;
    color: #014dab;
    line-height: 1;
  }
  .mobile-dose-total strong,
  .mobile-age-row__meta strong { font-size: 1rem; }
  .mobile-total-value { display: flex; align-items: center; justify-content: center; gap: 3px; }
  .mobile-total-value b { color: #098880; font-size: .88rem; line-height: 1; }
  .mobile-dose-total small,
  .mobile-age-row__meta small { margin-top: 1px; font-size: .54rem; font-weight: 800; }
  .mobile-dose-total em,
  .mobile-age-row__meta em {
    width: 100%;
    margin-top: 4px;
    padding: 3px 2px;
    border-radius: 5px;
    background: #014dab;
    color: #fff;
    font-size: .56rem;
    font-style: normal;
    font-weight: 800;
    text-align: center;
  }
  .mobile-overview-row:active,
  .mobile-age-row:active,
  .mobile-age-row.is-active { background: rgba(230,240,252,.72); }

  .mobile-calendar { border-radius: 18px; }
  .timeline { padding: 0; }
  .mobile-age-detail {
    position: relative;
    width: auto;
    margin: 0 0 7px;
    padding: 13px;
    border: 1px solid #cbddeb;
    border-radius: 13px;
    background: linear-gradient(145deg, #f7fbff, #f2fbf7);
    box-shadow: inset 3px 0 0 #1d70d8;
  }
  .mobile-age-detail::before { display: none; }
  .mobile-age-detail__head h3 { font-size: 1.12rem; }
  .mobile-age-detail__summary { margin: 9px 0 10px; font-size: .75rem; }
  .mobile-vaccine-list { gap: 6px; }
  .mobile-vaccine-row { min-height: 54px; border-radius: 11px; }
  .mobile-vaccine-row .mobile-dose { width: 42px; height: 42px; }

  .calendar-after-quiz { display: none; }
  .mobile-calendar-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 11px 0 0;
  }
  .mobile-calendar-actions button {
    display: grid;
    grid-template-columns: 35px minmax(0, 1fr);
    min-height: 57px;
    align-items: center;
    gap: 1px 9px;
    padding: 8px 10px;
    border: 1px solid #d4e1ed;
    border-radius: 12px;
    background: #fff;
    color: #17384d;
    text-align: left;
    cursor: pointer;
  }
  .mobile-calendar-actions button:only-child { grid-column: 1 / -1; }
  .mobile-calendar-actions button > span {
    grid-row: 1 / span 2;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    background: #eaf3ff;
    color: #014dab;
    font-size: .92rem;
    font-weight: 900;
  }
  .mobile-calendar-actions strong { align-self: end; font-size: .72rem; }
  .mobile-calendar-actions small { align-self: start; color: #687b8d; font-size: .58rem; }
  .mobile-calendar-actions button.is-about {
    grid-template-columns: 1fr;
    width: 44px;
    min-height: 44px;
    justify-self: end;
    padding: 4px;
    border-radius: 50%;
  }
  .mobile-calendar-actions button.is-about > span { grid-row: auto; border-radius: 50%; }
}

@media (max-width: 340px) {
  .app-header h1,
  html.is-embedded .app-header h1 { font-size: 1.08rem; }
  .mobile-overview-row,
  .mobile-age-row { grid-template-columns: minmax(0, 1fr) 47px 58px; gap: 5px; }
  .mobile-mini-chart i + i { margin-left: 3px; }
}

/* v21: denser desktop header and a branched KDP/DP mobile diagram */
.about-scope-card {
  border-color: #bfd8eb;
  background: linear-gradient(140deg, #f4f9ff 0%, #effaf5 100%);
}
.about-scope-card p strong { color: #014dab; }

@media (min-width: 1181px) {
  .app-shell { padding-top: 18px; }
  .app-header,
  html.is-embedded .app-header {
    margin-bottom: 10px;
    padding: 14px 20px 13px;
    border-radius: 12px;
  }
  .app-header h1,
  html.is-embedded .app-header h1 {
    margin: 0 0 6px;
    font-size: clamp(2rem, 2.8vw, 2.7rem);
    line-height: 1;
  }
  .app-header__title > p,
  html.is-embedded .app-header__title > p { display: block; font-size: .82rem; }
  .app-controls,
  html.is-embedded .app-controls { gap: 9px; margin-bottom: 10px; padding: 5px; }
  .tabs,
  html.is-embedded .tabs { gap: 3px; }
  .tab,
  html.is-embedded .tab { min-height: 40px; padding: 7px 11px; font-size: .78rem; }
  .app-controls .search,
  html.is-embedded .app-controls .search { flex: 0 1 290px; width: min(290px, 24vw); }
  .app-controls .search input,
  html.is-embedded .app-controls .search input { min-height: 40px; padding-top: 7px; padding-bottom: 7px; }
  .fullscreen-button,
  html.is-embedded .fullscreen-button { min-height: 40px; }
  .calendar-guidance-row,
  html.is-embedded .calendar-guidance-row { margin-bottom: 6px; }
  .calendar-action-hint,
  .calendar-free-note { font-size: .74rem; }
}

@media (max-width: 700px) {
  .mobile-overview-row.has-dtp-flow {
    grid-template-columns: minmax(0, 1fr) 62px;
    grid-template-rows: auto auto;
    row-gap: 3px;
  }
  .mobile-overview-row.has-dtp-flow .mobile-overview-row__name { grid-column: 1; grid-row: 1; }
  .mobile-overview-row.has-dtp-flow .mobile-dtp-flow { grid-column: 1; grid-row: 2; }
  .mobile-overview-row.has-dtp-flow .mobile-dose-total { grid-column: 2; grid-row: 1 / span 2; }

  .mobile-dtp-flow {
    display: flex;
    width: max-content;
    align-items: center;
    gap: 4px;
    margin-top: 1px;
  }
  .dtp-phase {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 5px;
    border: 1px solid #8ed8bd;
    border-radius: 7px;
    background: #ebfaf4;
    color: #087556;
    line-height: 1;
  }
  .dtp-phase.is-dp {
    border-color: #9bc5ef;
    background: #edf5ff;
    color: #014dab;
  }
  .dtp-phase b { font-size: .55rem; }
  .dtp-phase small { font-size: .45rem; font-weight: 800; }
  .mobile-dtp-flow > i { color: #60778c; font-size: .68rem; font-style: normal; font-weight: 900; }
  .mobile-dtp-flow > strong { color: #014dab; font-size: .76rem; line-height: 1; }
}

@media (max-width: 340px) {
  .mobile-dtp-flow { gap: 3px; }
  .dtp-phase { padding-right: 4px; padding-left: 4px; }
}

/* v22: compact sticky desktop / WordPress navigation */
@media (min-width: 701px) {
  .app-shell,
  html.is-embedded .app-shell { padding-top: 8px; }

  .app-header,
  html.is-embedded .app-header {
    min-height: 0;
    margin-bottom: 6px;
    padding: 9px 16px;
    border-radius: 11px;
  }
  .app-header h1,
  html.is-embedded .app-header h1 {
    margin: 0;
    font-size: clamp(1.55rem, 2.35vw, 2rem);
    line-height: 1.05;
    letter-spacing: -.035em;
  }
  .app-header__title > p,
  html.is-embedded .app-header__title > p { display: none; }

  .app-controls,
  html.is-embedded .app-controls {
    position: sticky;
    z-index: 82;
    top: 6px;
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    margin-bottom: 6px;
    padding: 4px;
    border-radius: 12px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 8px 24px rgba(1,52,115,.12);
    backdrop-filter: blur(12px);
  }
  .app-controls .tabs,
  html.is-embedded .app-controls .tabs {
    display: flex;
    flex: 1 1 auto;
    gap: 2px;
    width: auto;
    min-width: 0;
    margin: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .app-controls .tabs::-webkit-scrollbar { display: none; }
  .tab,
  html.is-embedded .tab {
    flex: 0 0 auto;
    min-height: 38px;
    gap: 6px;
    padding: 6px 9px;
    border-radius: 9px;
    font-size: .73rem;
    white-space: nowrap;
  }
  .tab svg,
  html.is-embedded .tab svg { display: block; flex: 0 0 17px; width: 17px; }

  .search-toggle,
  .about-shortcut {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;
    padding: 0;
    border: 1px solid #cfdeec;
    border-radius: 9px;
    background: #f7faff;
    color: #014dab;
    cursor: pointer;
  }
  .search-toggle svg,
  .about-shortcut svg {
    width: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .about-shortcut.is-active,
  .app-controls.is-search-open .search-toggle {
    border-color: #014dab;
    background: #014dab;
    color: #fff;
  }
  .app-controls.is-search-open .search-toggle svg { display: none; }
  .app-controls.is-search-open .search-toggle::after {
    content: "×";
    font-size: 1.35rem;
    line-height: 1;
  }

  .app-controls .search,
  html.is-embedded .app-controls .search {
    position: absolute;
    top: calc(100% + 6px);
    right: 44px;
    display: none;
    width: min(390px, calc(100vw - 32px));
    min-width: 0;
    margin: 0;
    padding: 6px;
    border: 1px solid #cfdeec;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(1,52,115,.2);
  }
  .app-controls.is-search-open .search,
  html.is-embedded .app-controls.is-search-open .search { display: flex; }
  .app-controls .search input,
  html.is-embedded .app-controls .search input {
    min-height: 42px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .fullscreen-button,
  html.is-embedded .fullscreen-button {
    flex: 0 0 38px;
    width: 38px;
    min-height: 38px;
    padding: 0;
    border-radius: 9px;
  }
  .fullscreen-button span { display: none; }
  .calendar-guidance-row,
  html.is-embedded .calendar-guidance-row { margin-bottom: 5px; }
}

@media (min-width: 701px) and (max-width: 1100px) {
  .tab,
  html.is-embedded .tab {
    width: 38px;
    justify-content: center;
    padding-right: 0;
    padding-left: 0;
    overflow: hidden;
    font-size: 0;
  }
  .tab.is-active,
  html.is-embedded .tab.is-active {
    width: auto;
    justify-content: flex-start;
    padding-right: 10px;
    padding-left: 10px;
    font-size: .73rem;
  }
  .calendar-action-hint { display: none; }
  .calendar-guidance-row { justify-content: flex-end; }
}

/* v23: fit the calendar inside narrow WordPress mobile columns */
@media (max-width: 380px) {
  .app-shell,
  html.is-embedded .app-shell { padding-right: 6px; padding-left: 6px; }

  .app-header,
  html.is-embedded .app-header {
    margin-right: -6px;
    margin-left: -6px;
    padding-right: 126px;
    padding-left: 11px;
  }
  .app-header h1,
  html.is-embedded .app-header h1 { font-size: 1.02rem; }
  .home-shortcut,
  .search-toggle,
  .about-shortcut {
    width: 36px;
    height: 36px;
  }

  .mobile-overview-head {
    align-items: flex-end;
    gap: 6px;
    padding: 10px 10px 8px;
  }
  .mobile-overview-head h2 {
    font-size: .94rem;
    white-space: nowrap;
  }
  .mobile-overview-head > span { font-size: .58rem; }
  .mobile-overview-list { padding-right: 5px; padding-left: 5px; }

  .mobile-overview-row,
  .mobile-age-row {
    grid-template-columns: minmax(0, 1fr) 50px 56px;
    gap: 4px;
    padding-right: 1px;
    padding-left: 4px;
  }
  .mobile-overview-row__name strong,
  .mobile-age-row__name strong { font-size: .72rem; }
  .mobile-overview-row__name small,
  .mobile-age-row__name small { font-size: .59rem; }

  .mobile-mini-chart { min-width: 46px; }
  .mobile-mini-chart i {
    flex-basis: 7px;
    width: 7px;
    height: 7px;
  }
  .mobile-mini-chart i + i { margin-left: 3px; }
  .mobile-mini-chart i + i::before {
    right: 5px;
    width: 6px;
  }

  .mobile-dose-total,
  .mobile-age-row__meta {
    min-width: 54px;
    padding-right: 2px;
    padding-left: 2px;
  }
  .mobile-dose-total em,
  .mobile-age-row__meta em { font-size: .52rem; }

  .mobile-calendar-actions { gap: 6px; }
  .mobile-calendar-actions button {
    grid-template-columns: 31px minmax(0, 1fr);
    gap: 1px 6px;
    padding-right: 7px;
    padding-left: 7px;
  }
  .mobile-calendar-actions button > span {
    width: 31px;
    height: 31px;
  }
  .mobile-calendar-actions strong { font-size: .67rem; }
}

/* v24: one compact sticky mobile header with top navigation */
.app-topbar { display: contents; }

@media (max-width: 700px) {
  body { padding-bottom: 0; }

  .app-topbar {
    display: block;
    position: sticky;
    z-index: 90;
    top: 0;
    margin: 0;
    padding: 0 0 5px;
    background: rgba(243,246,250,.97);
    box-shadow: 0 7px 18px rgba(1,52,115,.08);
    backdrop-filter: blur(12px);
  }
  .app-header,
  html.is-embedded .app-header {
    min-height: 50px;
    margin-bottom: 4px;
    padding-top: 10px;
    padding-right: 156px;
    padding-bottom: 10px;
    padding-left: 11px;
    border-radius: 0 0 12px 12px;
    box-shadow: none;
  }
  .app-header h1,
  html.is-embedded .app-header h1 {
    font-size: 1.08rem;
    line-height: 1;
  }

  .app-controls,
  html.is-embedded .app-controls {
    position: static;
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  .overview-shortcut,
  .home-shortcut,
  .search-toggle,
  .about-shortcut {
    position: absolute;
    z-index: 93;
    top: 8px;
    width: 34px;
    height: 34px;
    border-radius: 9px;
  }
  .overview-shortcut { right: 120px; }
  .home-shortcut { right: 82px; }
  .search-toggle { right: 44px; }
  .about-shortcut { right: 6px; }
  .overview-shortcut svg,
  .home-shortcut svg,
  .search-toggle svg,
  .about-shortcut svg { width: 16px; }

  .app-controls .tabs,
  html.is-embedded .app-controls .tabs {
    position: static;
    right: auto;
    bottom: auto;
    left: auto;
    z-index: auto;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1px;
    width: 100%;
    margin: 0;
    padding: 4px;
    overflow: hidden;
    border: 1px solid #cad9e7;
    border-radius: 13px;
    background: rgba(255,255,255,.97);
    box-shadow: 0 5px 14px rgba(1,52,115,.1);
  }
  .tab,
  html.is-embedded .tab {
    min-height: 42px;
    gap: 1px;
    padding: 4px 1px;
    border-radius: 9px;
    font-size: .56rem;
  }
  .tab svg,
  html.is-embedded .tab svg { width: 16px; height: 16px; }
  .tab.is-active::before { top: 1px; height: 2px; }

  .app-controls .search,
  html.is-embedded .app-controls .search {
    position: absolute;
    z-index: 96;
    top: 47px;
    right: 6px;
    width: min(350px, calc(100vw - 12px));
  }

  html.is-embedded .dialog-backdrop {
    position: fixed;
    z-index: 86;
    inset: 0;
    min-height: 0;
  }
  html.is-embedded .detail-panel {
    position: fixed;
    top: 112px;
    right: 6px;
    width: calc(100% - 12px);
    height: calc(100dvh - 120px);
    max-height: calc(100dvh - 120px);
    border-radius: 14px;
  }
  html.is-embedded .detail-panel__topbar {
    position: sticky;
    z-index: 2;
    top: 0;
  }
  html.is-embedded .detail-panel__body {
    height: calc(100% - 56px);
    padding-top: 18px;
  }
}
