@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;600;700;800&family=Noto+Serif+KR:wght@500;700;900&display=swap');

:root {
  --accent: #121E36;
  --accent-2: #B8292F;
  --accent-soft: #EFECE5;
  --accent-tint: #F8F6F1;
  --gold: #C88A1E;
  --ink: #1F2229;
  --quiet: #5C616B;
  --line: #E0DBD1;
  --paper: #FAF9F5;
  --white: #FFFFFF;
  --serif: 'Noto Serif KR', 'Batang', Georgia, serif;
  --sans: 'Noto Sans KR', 'Malgun Gothic', -apple-system, sans-serif;
  --wrap: 1120px;
}

/* Proposal-specific themes */
body.theme-hub   { --accent: #0E1628; --accent-2: #B8292F; --accent-tint: #F7F6F2; --gold: #C88A1E; }
body.theme-plan1 { --accent: #13223D; --accent-2: #C88A1E; --accent-tint: #F6F7FA; --gold: #C88A1E; }
body.theme-plan2 { --accent: #181A1F; --accent-2: #A61C28; --accent-tint: #FAF8F5; --gold: #B88B2B; }
body.theme-plan3 { --accent: #6D2F43; --accent-2: #1E4D8C; --accent-tint: #FBF8F0; --gold: #B77A28; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 112px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.85;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; height: auto; }
figure, p, h1, h2, h3, h4, dl, dd { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 4px;
}

/* Top Obangsaek hairline */
.obang-line { display: flex; height: 4px; width: 100%; }
.obang-line span { flex: 1; }

/* Global Portal Switcher Bar */
.portal-bar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: #0E1628;
  color: #E2E8F0;
  border-bottom: 1px solid #23304A;
}
.portal-bar-inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 24px;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.portal-brand {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 15px;
  color: #FFFFFF;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.portal-brand em { font-style: normal; color: #EAB308; }
.portal-nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.portal-nav::-webkit-scrollbar { display: none; }
.portal-nav a {
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #CBD5E1;
  border-radius: 4px;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.portal-nav a:hover { background: rgba(255,255,255,0.09); color: #fff; }
.portal-nav a.current { background: #EAB308; color: #0E1628; font-weight: 800; }

/* Sub-Header & 4-Tab Bar (R17 Integrated Review Architecture) */
.sub-header {
  background: var(--accent-tint);
  border-bottom: 1px solid var(--line);
}
.sub-header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px 24px 0;
}
.version-note {
  font-size: 12.5px;
  color: var(--quiet);
  margin-bottom: 10px;
}
.plan-eyebrow {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-2);
  margin-bottom: 6px;
}
.plan-h1 {
  font-family: var(--serif);
  font-size: clamp(26px, 3.6vw, 40px);
  font-weight: 900;
  line-height: 1.26;
  color: var(--accent);
  letter-spacing: -0.025em;
  margin-bottom: 8px;
}
.plan-brand-line {
  font-size: 15.5px;
  color: var(--quiet);
  max-width: 48em;
  margin-bottom: 20px;
}
.tabs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.tabs {
  display: flex;
  gap: 2px;
  overflow-x: auto;
}
.tabs a {
  padding: 12px 18px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--quiet);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.tabs a:hover { color: var(--accent); }
.tabs a[aria-selected="true"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: var(--white);
}
.width-btn {
  margin-bottom: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  background: var(--white);
  font-size: 12px;
  font-weight: 600;
  color: var(--quiet);
  border-radius: 4px;
}
.width-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Panels */
.panel[hidden] { display: none !important; }
.panel-wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 44px 24px 80px;
}
body.story-narrow .story-container {
  max-width: 860px;
  margin: 0 auto;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: var(--white);
}

/* Transparent AI Notice Banner (R17 style honesty) */
.ai-notice {
  background: var(--accent-tint);
  border: 1px solid var(--line);
  padding: 11px 18px;
  font-size: 12.5px;
  color: var(--quiet);
  line-height: 1.65;
  margin: 22px auto 0;
  max-width: calc(100% - 48px);
}
.ai-notice strong { color: var(--accent); }

/* Editorial Story Sections (R17 detail.html rhythm) */
.story-wrap {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 36px;
}
body.story-narrow .story-wrap {
  max-width: 860px;
  padding: 0 36px;
}
.section-space { padding-block: 76px; }
.section-space.compact { padding-block: 52px; }
.section-divider { border-top: 1px solid var(--line); }

/* Editorial Hero inside Story Tab */
.ed-hero {
  display: grid;
  grid-template-columns: 1.02fr 1.18fr;
  gap: 44px;
  align-items: center;
  padding-block: 44px 64px;
}
body.story-narrow .ed-hero {
  grid-template-columns: 1fr;
  gap: 28px;
  padding-block: 32px 48px;
}
.ed-hero .edition {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-2);
  margin-bottom: 16px;
}
.ed-hero h2.hero-h {
  font-family: var(--serif);
  font-size: clamp(28px, 3.1vw, 39px);
  font-weight: 900;
  line-height: 1.24;
  letter-spacing: -0.03em;
  color: var(--accent);
  margin-bottom: 20px;
}
.ed-hero .hero-desc {
  font-size: 15.5px;
  line-height: 1.88;
  color: var(--quiet);
  margin-bottom: 26px;
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  border-bottom: 1.5px solid var(--accent);
  padding-bottom: 6px;
}
.photo-frame {
  position: relative;
  cursor: zoom-in;
  overflow: hidden;
  background: var(--accent-tint);
  border: 1px solid var(--line);
}
.photo-frame img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform .35s ease;
}
.photo-frame:hover img { transform: scale(1.018); }
.zoom-cue {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: rgba(255,255,255,0.92);
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 11px;
  border-radius: 999px;
  pointer-events: none;
}
figcaption {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--quiet);
  margin-top: 10px;
}

/* Full-Bleed Brand Story Band (R17 #story equivalent) */
.story-band {
  background: var(--accent);
  color: #F4F1EC;
}
.story-band-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 52px;
  align-items: center;
}
body.story-narrow .story-band-inner {
  grid-template-columns: 1fr 0.95fr;
  gap: 36px;
}
.story-band h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 900;
  line-height: 1.25;
  color: #FFFFFF;
  margin-bottom: 24px;
}
.story-band p {
  font-size: 15.5px;
  line-height: 1.95;
  color: #E2E6EE;
}
.story-band p + p { margin-top: 18px; }
.story-band .photo-frame { border-color: rgba(255,255,255,0.22); }

/* Main Story Essay (8-10 sentences, literary rhythm) */
.main-essay {
  max-width: 720px;
  margin: 0 auto;
}
.main-essay p {
  font-size: 17px;
  line-height: 1.95;
  color: var(--ink);
  margin-bottom: 18px;
}
.main-essay p:last-child { margin-bottom: 0; }

/* Section Headings */
.sec-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 34px;
  flex-wrap: wrap;
}
.sec-head h2 {
  font-family: var(--serif);
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 900;
  line-height: 1.28;
  color: var(--accent);
  letter-spacing: -0.025em;
}
.sec-head > p {
  font-size: 15px;
  color: var(--quiet);
  line-height: 1.75;
  max-width: 300px;
}

/* Object List (poetic 1-line role per item) */
.object-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 32px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.object-list dt {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--accent);
}
.object-list dd {
  font-size: 13.5px;
  color: var(--quiet);
  margin-top: 6px;
  line-height: 1.65;
}

/* Interactive Item Chapters (Day/Night, Inside/Outside, NFC Language) */
.chapter-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 48px;
  align-items: center;
}
.chapter-grid.rev { grid-template-columns: 0.92fr 1.08fr; }
.chapter-copy h2 {
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 35px);
  font-weight: 900;
  line-height: 1.3;
  color: var(--accent);
  margin-bottom: 14px;
}
.phrase-display {
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  color: var(--accent-2);
  line-height: 1.25;
  margin: 12px 0 20px;
}
.chapter-copy p { font-size: 15.5px; line-height: 1.9; margin-bottom: 14px; }
.spec-note {
  font-size: 12.5px !important;
  color: var(--quiet) !important;
  line-height: 1.75 !important;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  margin-top: 16px;
}

/* Interactive Mode Switcher (Day/Night or NFC Simulator) */
.mode-box {
  background: var(--accent-tint);
  border: 1px solid var(--line);
  padding: 18px;
}
.mode-visual {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
}
.mode-visual img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: filter .35s ease;
}
.mode-visual.is-night img { filter: brightness(0.72) contrast(1.18) saturate(1.22); }
.mode-visual.is-red img { filter: brightness(0.75) sepia(0.35) hue-rotate(-32deg) saturate(1.6); }
.mode-visual.is-blue img { filter: brightness(0.75) sepia(0.35) hue-rotate(175deg) saturate(1.5); }
.mode-badge-overlay {
  position: absolute;
  left: 12px;
  top: 12px;
  background: rgba(14, 22, 40, 0.85);
  color: #EAB308;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
}
.mode-controls {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.mode-controls button {
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--quiet);
  border: 1px solid var(--line);
  background: var(--white);
}
.mode-controls button[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.mode-caption {
  font-size: 12.5px;
  color: var(--quiet);
  text-align: center;
  margin-top: 10px;
  line-height: 1.6;
}

/* NFC Phone Preview Card */
.nfc-phone {
  background: #0E1628;
  color: #F8FAFC;
  border-radius: 16px;
  padding: 20px;
  border: 2px solid #2A3856;
  margin-top: 14px;
}
.nfc-phone .nfc-top {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: #EAB308;
  font-weight: 700;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #23304A;
}
.nfc-phone h4 { font-family: var(--serif); font-size: 17px; color: #fff; margin-bottom: 8px; }
.nfc-phone p { font-size: 13.5px; color: #CBD5E1; line-height: 1.7; margin-bottom: 8px; }

/* Letters / Cards Collection (10 letters full text accordion or table) */
.letters-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 22px;
}
.letter-card {
  background: var(--accent-tint);
  border: 1px solid var(--line);
  padding: 16px 18px;
}
.letter-card summary {
  font-weight: 700;
  font-size: 15px;
  color: var(--accent);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.letter-card summary::after { content: '+'; font-size: 19px; color: var(--accent-2); }
.letter-card[open] summary::after { content: '−'; }
.letter-card .l-num {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--accent-2);
  margin-right: 8px;
}
.letter-card p {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink);
}

/* Packaging / Box-in-Box Section */
.flat-points {
  list-style: none;
  padding: 0;
  margin: 26px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.flat-points li {
  border-top: 2.5px solid var(--accent);
  padding-top: 12px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--quiet);
}
.flat-points strong {
  display: block;
  font-size: 15px;
  color: var(--accent);
  margin-bottom: 5px;
}
.svg-diagram {
  background: var(--accent-tint);
  border: 1px solid var(--line);
  padding: 20px;
  margin: 24px 0 10px;
}

/* Package Choice Cards (NO funding language — B2C / B2B pricing) */
.pkg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}
.pkg-card {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pkg-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  cursor: zoom-in;
}
.pkg-card h3 { font-size: 17px; font-weight: 800; color: var(--accent); }
.pkg-card .pkg-items { font-size: 13.5px; color: var(--quiet); line-height: 1.65; flex: 1; }
.pkg-card .pkg-box { font-size: 12.5px; font-weight: 700; color: var(--accent-2); }
.pkg-card .pkg-price {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  font-size: 13px;
  color: var(--quiet);
}
.pkg-card .pkg-price strong {
  display: block;
  font-size: 19px;
  color: var(--accent);
  font-weight: 800;
}

/* Tables (R17 Cost Breakdown & Specs) */
.table-scroll { overflow-x: auto; margin: 16px 0 24px; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  background: var(--white);
}
table.data th, table.data td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
}
table.data thead th {
  background: var(--accent-tint);
  color: var(--accent);
  font-weight: 800;
  white-space: nowrap;
}
table.data tbody th {
  background: #FCFBFA;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tag-verified {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  background: #E6F4EA;
  color: #137333;
  padding: 1px 6px;
  border-radius: 3px;
}
.tag-est {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  background: #FEF3C7;
  color: #92400E;
  padding: 1px 6px;
  border-radius: 3px;
}
.tag-cond {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  background: #FCE8E6;
  color: #A50E0E;
  padding: 1px 6px;
  border-radius: 3px;
}

/* BOM & MOQ Interactive Calculator (R17 index.html style upgraded) */
.bom-box {
  background: var(--accent-tint);
  border: 1.5px solid var(--accent);
  padding: 24px;
  margin-top: 28px;
}
.bom-box h3 { font-size: 18px; color: var(--accent); margin-bottom: 6px; }
.bom-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin: 16px 0 20px;
}
.bom-field {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 12px 14px;
}
.bom-field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
}
.bom-field input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--accent);
  font-size: 15px;
  font-weight: 700;
  font-family: var(--sans);
}
.bom-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.bom-kpi {
  background: var(--accent);
  color: #fff;
  padding: 14px 16px;
}
.bom-kpi span { display: block; font-size: 11.5px; color: #CBD5E1; margin-bottom: 4px; }
.bom-kpi strong { font-size: 17px; color: #EAB308; }
.bom-moq-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.moq-chip {
  font-size: 12.5px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  background: var(--white);
}
.moq-chip.ok { border-color: #137333; background: #E6F4EA; color: #137333; font-weight: 700; }
.moq-chip.warn { border-color: #B8292F; background: #FCE8E6; color: #A50E0E; font-weight: 700; }

/* Making Process Steps */
.making-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.making-steps li {
  border-top: 2px solid var(--line);
  padding-top: 16px;
}
.making-steps li.current { border-top-color: var(--accent); }
.making-steps span { font-size: 12px; font-weight: 700; color: var(--accent-2); }
.making-steps h3 { font-size: 16.5px; margin: 8px 0 8px; color: var(--accent); }
.making-steps p { font-size: 13.5px; color: var(--quiet); line-height: 1.7; }

/* FAQ & Details */
.faq-wrap {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 48px;
  align-items: start;
}
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  padding: 18px 34px 18px 0;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  position: relative;
}
.faq-list summary::after {
  content: '+';
  position: absolute;
  right: 6px;
  top: 14px;
  font-size: 22px;
  color: var(--accent);
  font-weight: 400;
}
.faq-list details[open] summary::after { content: '−'; }
.faq-list details p {
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--quiet);
  padding-bottom: 20px;
}

/* Hub Cards */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin: 28px 0 38px;
}
.hub-card {
  border: 1px solid var(--line);
  background: var(--white);
  display: flex;
  flex-direction: column;
  transition: transform .15s, box-shadow .15s;
}
.hub-card:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(14,22,40,0.08); }
.hub-card-top { height: 5px; }
.hub-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.hub-card-body { padding: 22px; display: flex; flex-direction: column; flex: 1; gap: 10px; }
.hub-card-tag { font-size: 12px; font-weight: 800; color: var(--accent-2); }
.hub-card h3 { font-family: var(--serif); font-size: 21px; font-weight: 900; color: var(--accent); line-height: 1.3; }
.hub-card .hub-quote { font-size: 14px; color: var(--quiet); line-height: 1.7; }
.hub-card ul { padding-left: 18px; font-size: 13.5px; color: var(--ink); line-height: 1.7; margin: 4px 0 8px; }
.hub-card-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hub-meta { font-size: 12.5px; color: var(--quiet); }
.hub-meta strong { color: var(--ink); }
.btn-open {
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  background: var(--accent);
  color: #fff;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
}
.btn-open:hover { opacity: 0.92; }

/* Email Copy Box */
.email-box {
  background: var(--accent-tint);
  border: 1px solid var(--line);
  padding: 24px;
  white-space: pre-wrap;
  font-size: 14.5px;
  line-height: 1.8;
  margin: 14px 0 16px;
}
.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
}
.btn-action.secondary {
  background: var(--white);
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

/* Footer */
.site-footer {
  background: var(--accent);
  color: #CBD5E1;
  padding: 44px 24px;
  margin-top: 40px;
}
.site-footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13px;
}
.site-footer strong { color: #fff; font-family: var(--serif); font-size: 16px; }

/* Dialog Lightbox */
dialog#img-viewer {
  border: 0;
  padding: 48px 28px 22px;
  background: #fff;
  width: min(1160px, 94vw);
  max-height: 94vh;
}
dialog#img-viewer::backdrop { background: rgba(14, 22, 40, 0.85); backdrop-filter: blur(4px); }
.viewer-close {
  position: absolute;
  right: 16px;
  top: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  padding: 6px 12px;
  border: 1px solid var(--line);
}
#viewer-img { max-width: 100%; max-height: 76vh; margin: 0 auto; object-fit: contain; }
#viewer-cap { font-size: 13px; color: var(--quiet); text-align: center; margin-top: 14px; }

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(14px);
  background: #0E1628;
  color: #EAB308;
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 120;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 900px) {
  .ed-hero, .story-band-inner, .chapter-grid, .chapter-grid.rev, .faq-wrap, .hub-grid, .pkg-grid, .making-steps, .flat-points, .letters-grid, .bom-summary {
    grid-template-columns: 1fr;
  }
  .object-list { grid-template-columns: repeat(2, 1fr); }
  .story-wrap { padding: 0 20px; }
  .section-space { padding-block: 52px; }
}
@media print {
  .portal-bar, .tabs-row, .zoom-cue, .mode-controls, .btn-action, .toast { display: none !important; }
  .panel[hidden] { display: block !important; }
}
