/* ══════════════════════════════════════════════════════════════════════════
   D'FUC? site template
   Palette from the logo (black / white / protest red) plus the legacy data
   colours: Old Normal green, New Normal red-brown, 5-yr CDR purple.
   ══════════════════════════════════════════════════════════════════════════ */
:root {
  --ink: #0d0d0d;
  --ink-2: #2b2b2b;
  --muted: #5f5f5f;
  --paper: #ffffff;
  --paper-2: #f5f4f0;
  --line: #e2e0da;
  --red: #d71920;
  --red-dark: #a8121a;
  --on: #0b6b2b;
  --on-light: #e3f3e7;
  --nn: #7a1414;
  --nn-light: #f8e6e3;
  --five: #7b3fa8;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.06);
  --display: 'Anton', Impact, 'Arial Narrow', sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --wrap: 1200px;
}

/* ── Base ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 140px; }
body { margin: 0; font-family: var(--body); font-size: 17px; line-height: 1.55; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--red); }
h1, h2, h3 { line-height: 1.15; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--paper); color: var(--ink); padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; border: 2px solid transparent;
  font: 700 1rem/1 var(--body); text-decoration: none; cursor: pointer;
  transition: transform .12s ease, background-color .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 9px 16px; font-size: .9rem; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-2); }
.btn-ghost { border-color: #fff; color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--ink); }

.chip {
  display: inline-block; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--paper);
  font: 600 .85rem/1.2 var(--body); color: var(--ink); text-decoration: none; cursor: pointer;
}
.chip:hover { border-color: var(--ink); }
.chip-red { background: var(--red); border-color: var(--red); color: #fff; }
.chip-red:hover { background: var(--red-dark); border-color: var(--red-dark); }

/* ── Header ────────────────────────────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--ink); color: #fff; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand img { background: #fff; border-radius: 10px; padding: 2px; }
.brand-word { font-family: var(--display); font-size: 1.7rem; letter-spacing: .02em; }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a, .nav-link-btn { color: #fff; text-decoration: none; font-weight: 600; font-size: .95rem; background: none; border: 0; cursor: pointer; font-family: var(--body); padding: 0; }
.site-nav a:not(.btn):hover, .nav-link-btn:hover { color: #ff8a8f; }
.nav-sep { width: 1px; height: 22px; background: #444; }
.nav-form { display: inline; margin: 0; }
.nav-user { color: #aaa; font-weight: 400; }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; position: relative; }
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  position: absolute; left: 10px; width: 24px; height: 2px; background: #fff; content: '';
}
.nav-toggle-bar { top: 21px; }
.nav-toggle-bar::before { top: -7px; left: 0; }
.nav-toggle-bar::after { top: 7px; left: 0; }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero {
  background:
    linear-gradient(180deg, rgba(13,13,13,.86), rgba(13,13,13,.97)),
    url('/assets/images/headers/vials-syringes.jpg') center / cover no-repeat,
    var(--ink);
  color: #fff;
  padding: 64px 0 72px;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 700; color: #ff8a8f; margin: 0 0 14px; }
.eyebrow-dark { color: var(--red); }
.hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.02; margin: 0 0 20px; letter-spacing: .01em; text-transform: uppercase; }
/* inline-block so the white box is sized by its own line-height instead of
   Anton's tall content area, which otherwise paints over the line above */
.hl { display: inline-block; color: var(--red); background: #fff; padding: .03em .12em 0; line-height: 1; vertical-align: baseline; }
.lede { font-size: 1.15rem; color: #d6d6d6; max-width: 38em; margin: 0 0 28px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-stat { background: #fff; color: var(--ink); border-radius: var(--radius); padding: 28px; box-shadow: 0 20px 50px rgba(0,0,0,.4); border-top: 6px solid var(--red); }
.hero-stat p { margin: 0; }
.hero-stat-label { font-size: .85rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.hero-stat-number { font-family: var(--display); font-size: clamp(3.2rem, 8vw, 5.4rem); line-height: 1; color: var(--red); margin: 10px 0 6px !important; }
.hero-stat-phrase { font-size: 1.1rem; font-weight: 700; }
.hero-stat-foot { font-size: .92rem; color: var(--muted); margin-top: 10px !important; padding-top: 10px; border-top: 1px solid var(--line); }
.share-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.share-label { font-size: .85rem; font-weight: 700; margin-right: 4px; }
.share-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 12px; border-radius: 999px; border: 0; font: 800 .9rem var(--body); text-decoration: none; cursor: pointer; color: #fff; }
.share-x { background: #000; }
.share-fb { background: #1877f2; }
.share-copy { background: var(--paper-2); color: var(--ink); }

/* ── Status ────────────────────────────────────────────────────────────── */
.app-status { margin: 16px 0 0; padding: 12px 14px; border-radius: 10px; border: 1px solid #e6b800; background: #fff8dc; color: #6d5200; font-size: .95rem; }
.app-status-hidden { display: none; }
.app-status-error { border-color: #c0392b; background: #fff0ee; color: #8b1e14; }

/* ── Filter bar (sticky under the header) ──────────────────────────────── */
.filter-bar { position: sticky; top: 64px; z-index: 40; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.filter-inner { display: flex; align-items: end; gap: 12px; padding-top: 12px; padding-bottom: 12px; overflow-x: auto; }
.filter-title { font-family: var(--display); font-weight: 400; font-size: 1.6rem; margin: 0 8px 4px 0; text-transform: uppercase; }
.filter { display: flex; flex-direction: column; gap: 3px; min-width: 130px; flex: 1 1 0; }
.filter span { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.filter select {
  width: 100%; padding: 9px 32px 9px 12px; border: 1px solid var(--line); border-radius: 10px;
  font: 600 .95rem var(--body); color: var(--ink); background: var(--paper-2);
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.filter select:hover { border-color: var(--ink); }

/* ── Explorer body ─────────────────────────────────────────────────────── */
.explore { background: var(--paper-2); padding-bottom: 72px; }
.explore-body { display: flex; flex-direction: column; gap: 28px; padding-top: 28px; }
.explore-body > *:empty, .story-row > *:empty, .side-panel > *:empty, .summary-cards > *:empty { display: none; }

/* Overview: flag (inline background from app.js) washed out behind cards */
.overview { position: relative; border-radius: var(--radius); overflow: hidden; background-size: cover !important; background-position: center !important; background-repeat: no-repeat; box-shadow: var(--shadow); }
.overview::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,.55), rgba(255,255,255,.88)); }
.overview-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .9fr) minmax(0, 1fr); gap: 20px; padding: 24px; align-items: start; }
.proud-sponsors img { width: 100%; border-radius: 10px; box-shadow: var(--shadow); }
.summary-cards { display: flex; flex-direction: column; gap: 14px; }
.summary-card { background: #fff; border-radius: 12px; padding: 18px; text-align: center; font-family: var(--display); font-size: 1.7rem; line-height: 1.2; box-shadow: var(--shadow); }
.summary-card hr { border: 0; border-top: 1px solid var(--line); margin: 8px 0; }
.summary-year { border-top: 5px solid var(--red); }
.summary-nn { border-top: 5px solid var(--nn); }
.side-panel { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cause-breakdown { background: rgba(255,255,255,.92); border-radius: 12px; padding: 16px 18px; font-size: .92rem; max-height: 420px; overflow: auto; box-shadow: var(--shadow); }
.cause-breakdown ol { margin: 8px 0 0; padding-left: 22px; }
.cause-breakdown li { margin: 4px 0; }
.cause-breakdown img { vertical-align: middle; }
.refs { background: var(--ink); color: #fff; border-radius: 12px; padding: 14px 18px; font-size: .9rem; }
.refs a { color: #ffd84d; }
.refs ul { margin: 6px 0 0; padding-left: 18px; }

/* Narrative boxes (HTML comes from TextSummaryService) */
.claim-box { background: #fff; border-radius: var(--radius); padding: 24px 28px; box-shadow: var(--shadow); font-size: 1.05rem; min-width: 0; overflow-wrap: anywhere; }
.claim-box h2 { font-family: var(--display); font-weight: 400; font-size: 1.8rem; margin: 0 0 12px; text-transform: uppercase; }
.claim-box ol, .claim-box ul { padding-left: 22px; }
.claim-box p:first-child, .claim-box ol:first-child { margin-top: 0; }
.claim-box p:last-child, .claim-box ol:last-child { margin-bottom: 0; }
.claim-lead { border-left: 6px solid var(--ink); }
.targetValue { background: var(--ink); color: #fff; font-weight: 800; padding: 0 .3em; border-radius: 4px; }
.claim-callout { border: 3px dashed var(--ink); box-shadow: none; background: #fffdf3; }
.claim-band { background: var(--five); color: #fff; }
.claim-band h2 { color: #fff; margin: 0; }
.claim-closing { background: var(--ink); color: #f2f2f2; font-size: 1.4rem; line-height: 1.4; font-weight: 600; padding: 36px 40px; }
.claim-closing a { color: #ff8a8f; }

/* Story rows: claim + chart side by side */
.story-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr); gap: 24px; align-items: start; }
.story-row-flip > :first-child { order: 2; }
.story-row-flip { grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); }
.story-row:has(> :first-child:empty), .story-row:has(> :last-child:empty) { grid-template-columns: minmax(0, 1fr); }

.chart-card { margin: 0; background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.chart-card figcaption { font-weight: 800; font-size: 1.05rem; margin-bottom: 12px; }
.chart-card img { display: block; width: 100%; border-radius: 8px; cursor: zoom-in; background: var(--paper-2); min-height: 120px; }
.chart-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* Inline merch prompt */
.merch-strip { display: flex; align-items: center; justify-content: space-between; gap: 20px; background: var(--red); color: #fff; border-radius: var(--radius); padding: 22px 28px; }
.merch-strip p { margin: 0; font-size: 1.1rem; }
.merch-strip .btn { background: #fff; color: var(--red); flex-shrink: 0; }

/* CDR tables */
.table-card { border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); overflow-x: auto; min-width: 0; }
.table-on { background: var(--on); color: #fff; display: flex; flex-wrap: wrap; gap: 12px 32px; }
.table-five { background: var(--five); color: #fff; }
.table-nn { background: var(--nn-light); color: var(--nn); border: 3px solid var(--nn); }
.d4-header-row, .d2-header-row { flex-basis: 100%; font-family: var(--display); font-size: 1.5rem; margin-bottom: 10px; text-transform: uppercase; letter-spacing: .01em; }
.d2-header-row span { padding: 0 8px; border-radius: 6px; }
.table-nn .d2-header-row span { background: transparent !important; padding: 0; }
.cdr-cols { border-collapse: collapse; font-size: .95rem; font-variant-numeric: tabular-nums; align-self: start; }
.cdr-cols th, .cdr-cols td { padding: 3px 12px; text-align: right; white-space: nowrap; }
.cdr-cols th:first-child, .cdr-cols td:first-child { text-align: left; }
.cdr-cols th { font-weight: 700; opacity: .85; border-bottom: 1px solid currentColor; }
.cdr-cols tr.cdr-total td { font-weight: 800; }
.table-on .cdr-total td { background: #fff; color: var(--on); }

/* Age-category slider */
.age-slider { background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.image-slider { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.slider-item { text-align: center; }
.slider-images img { max-width: 100%; height: auto; border-radius: 8px; }
.image-caption { margin-top: 12px; padding: 16px 20px; font-weight: 600; font-size: 1rem; color: #fff; background: var(--ink); border-radius: 10px; text-align: left; }
.slider-navigation { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.slider-navigation a { padding: 6px 12px; border-radius: 999px; background: var(--paper-2); color: var(--ink); text-decoration: none; font-size: .85rem; font-weight: 600; border: 1px solid var(--line); }
.slider-navigation a.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ── Section scaffolding ───────────────────────────────────────────────── */
.section-title { font-family: var(--display); font-weight: 400; font-size: clamp(2.2rem, 5vw, 3.4rem); text-transform: uppercase; margin: 0 0 12px; line-height: 1; }
.section-lede { font-size: 1.12rem; color: var(--muted); max-width: 44em; margin: 0 0 36px; }

/* ── Merch ─────────────────────────────────────────────────────────────── */
.merch { padding: 80px 0; background: var(--paper); }
.product-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 20px; }
.product-card { display: flex; flex-direction: column; background: var(--paper-2); border-radius: var(--radius); padding: 22px; color: var(--ink); text-decoration: none; border: 2px solid transparent; transition: border-color .15s ease, transform .15s ease; }
.product-card:hover { border-color: var(--ink); transform: translateY(-3px); }
.product-card h3 { margin: 16px 0 4px; font-size: 1.15rem; }
.product-card p { margin: 0 0 14px; color: var(--muted); font-size: .95rem; }
.product-cta { margin-top: auto; font-weight: 800; color: var(--red); }
.product-art { position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; background: #fff; border-radius: 10px; }
.product-art svg { width: 62%; fill: var(--ink); stroke: var(--ink); }
.product-feature { background: var(--ink); color: #fff; }
.product-feature p { color: #bdbdbd; }
.product-feature .product-art { background: #1d1d1d; }
.tee-art svg { width: 78%; fill: #f4f4f4; stroke: none; }
.tee-chart { position: absolute; top: 34%; left: 50%; transform: translateX(-50%); width: 30%; aspect-ratio: 4/3; object-fit: contain; background: #fff; border-radius: 3px; }
.merch-note { margin: 28px 0 0; padding: 14px 18px; background: #fffdf3; border: 1px dashed #c9b458; border-radius: 10px; }

/* ── Support ───────────────────────────────────────────────────────────── */
.support { padding: 80px 0; background: var(--ink); color: #fff; }
.support .section-lede { color: #bdbdbd; }
.tier-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.tier { position: relative; display: flex; flex-direction: column; background: #fff; color: var(--ink); border-radius: var(--radius); padding: 28px; }
.tier h3 { font-family: var(--display); font-weight: 400; font-size: 2rem; text-transform: uppercase; margin: 0; }
.tier-price { color: var(--muted); font-weight: 700; margin: 4px 0 16px; }
.tier ul { padding-left: 20px; margin: 0 0 24px; }
.tier li { margin: 6px 0; }
.tier .btn, .tier form { margin-top: auto; }
.tier form .btn { width: 100%; }
.tier-pro { outline: 4px solid var(--red); }
.tier-badge { position: absolute; top: -14px; right: 20px; margin: 0; background: var(--red); color: #fff; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: 5px 12px; border-radius: 999px; }
.tier-once form { margin: 0 0 16px; }
.btc { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: .9rem; }
.btc img { width: 56px; }
.btc code { font-size: .68rem; font-weight: 400; word-break: break-all; color: var(--muted); }

/* ── Method ────────────────────────────────────────────────────────────── */
.method { padding: 80px 0; background: var(--paper); }
.method-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.method p { font-size: 1.05rem; }
.tag { display: inline-block; padding: 1px 10px; border-radius: 999px; font-weight: 800; font-size: .9em; }
.tag-on { background: var(--on-light); color: var(--on); }
.tag-nn { background: var(--nn-light); color: var(--nn); }
.method-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0; }
.method-facts div { background: var(--paper-2); border-radius: 12px; padding: 18px; }
.method-facts dt { font-family: var(--display); font-size: 2.2rem; color: var(--red); line-height: 1; }
.method-facts dd { margin: 6px 0 0; font-weight: 600; font-size: .92rem; }

/* ── Footer ────────────────────────────────────────────────────────────── */
.site-footer { background: #000; color: #cfcfcf; padding: 48px 0 24px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-brand { display: flex; gap: 16px; align-items: center; }
.footer-brand img { background: #fff; border-radius: 12px; }
.footer-brand p { margin: 0; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links h3 { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 4px; }
.footer-links a { color: #cfcfcf; text-decoration: none; }
.footer-links a:hover { color: #fff; }
.footer-legal { border-top: 1px solid #222; margin-top: 32px; padding-top: 18px; font-size: .8rem; color: #8a8a8a; }

/* ── Image modal ───────────────────────────────────────────────────────── */
.modal { display: none; position: fixed; z-index: 100; inset: 0; padding: 50px 16px; overflow: auto; background: rgba(0,0,0,.92); }
.modal-content { margin: auto; display: block; width: 100%; max-width: 1280px; border-radius: 8px; }
.close { position: absolute; top: 6px; right: 22px; color: #f1f1f1; font-size: 52px; font-weight: 700; cursor: pointer; line-height: 1; }
.close:hover, .close:focus { color: #bbb; }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .hero-grid, .method-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .overview-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .side-panel { grid-column: 1 / -1; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tier-grid { grid-template-columns: minmax(0, 1fr); max-width: 520px; }
  .story-row, .story-row-flip { grid-template-columns: minmax(0, 1fr); }
  .story-row-flip > :first-child { order: 0; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 120px; }
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--ink); padding: 8px 16px 20px; border-top: 1px solid #222; }
  .site-nav.is-open { display: flex; }
  .site-nav a, .nav-link-btn { padding: 12px 0; border-bottom: 1px solid #222; text-align: left; }
  .site-nav .btn { margin-top: 12px; border-bottom: 0; text-align: center; }
  .nav-sep { display: none; }
  .hero { padding: 40px 0 48px; }
  .filter-bar { position: static; }
  .filter-inner { flex-wrap: wrap; }
  .filter { min-width: calc(50% - 6px); }
  .filter-title { width: 100%; }
  .overview-inner { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .claim-box { padding: 20px; }
  .claim-closing { font-size: 1.15rem; padding: 24px; }
  .table-card { padding: 14px; }
  .cdr-cols { font-size: .82rem; }
  .cdr-cols th, .cdr-cols td { padding: 3px 7px; }
  .d4-header-row, .d2-header-row { font-size: 1.2rem; }
  .merch-strip { flex-direction: column; align-items: flex-start; }
  .product-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .merch, .support, .method { padding: 56px 0; }
}

/* ══════════════════════════════════════════════════════════════════════════
   Merch studio (/studio)
   ══════════════════════════════════════════════════════════════════════════ */
.studio { background: var(--paper-2); padding: 24px 0 96px; }
.studio-notice { margin: 0 0 16px; padding: 10px 14px; background: #fffdf3; border: 1px dashed #c9b458; border-radius: 10px; font-size: .9rem; }
.studio-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: start; }

/* Stage */
.studio [hidden] { display: none !important; }
.stage-col { position: sticky; top: 80px; }
.stage-wrap { background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.stage { position: relative; width: 100%; aspect-ratio: 7 / 10; background: #f1f0eb; border-radius: 10px; overflow: hidden; touch-action: none; user-select: none; }
.stage-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.stage-flag { position: absolute; inset: 0; background: #fff; box-shadow: inset 0 0 0 10px #f3f3f3, inset 0 0 40px rgba(0,0,0,.08); }
.stage-is-flag { background: #d9d6cf; }
.grommet { position: absolute; top: 4%; left: 2.5%; width: 3.2%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #fff 30%, #9a9a9a 32%, #c7c7c7 60%, #8a8a8a 62%); }
.grommet-r { left: auto; right: 2.5%; }
.print-area { position: absolute; outline: 2px dashed rgba(215,25,32,.65); outline-offset: -2px; overflow: hidden; }
.layer { position: absolute; cursor: grab; }
.layer:active { cursor: grabbing; }
.layer img { display: block; width: 100%; height: auto; pointer-events: none; }
.layer-text { display: inline-block; font-family: var(--display); line-height: 1; white-space: nowrap; text-transform: uppercase; pointer-events: none; }
.layer.selected { outline: 2px solid var(--red); outline-offset: 2px; }
.handle { display: none; position: absolute; right: -9px; bottom: -9px; width: 18px; height: 18px; background: #fff; border: 3px solid var(--red); border-radius: 50%; cursor: nwse-resize; }
.layer.selected .handle { display: block; }
.stage-loading { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255,255,255,.8); font-weight: 700; color: var(--muted); }
.stage-hint { margin: 12px 0 0; font-size: .85rem; color: var(--muted); }

/* Panel */
.panel { background: #fff; border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); min-width: 0; }
.panel-title { font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 4vw, 2.8rem); text-transform: uppercase; margin: 0; line-height: 1; }
.panel-lede { margin: 6px 0 20px; color: var(--muted); }
.step { padding: 18px 0; border-top: 1px solid var(--line); }
.step h2 { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; margin: 0 0 12px; }
.step-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-size: .85rem; }
.product-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; }
.product-tabs button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border: 2px solid var(--line); border-radius: 10px; background: var(--paper-2); font: 700 .9rem var(--body); color: var(--ink); cursor: pointer; }
.product-tabs button small { font-weight: 600; color: var(--muted); }
.product-tabs button.active { border-color: var(--ink); background: var(--ink); color: #fff; }
.product-tabs button.active small { color: #ccc; }
.product-tabs button:disabled { opacity: .45; cursor: not-allowed; }
.product-desc { margin: 10px 0 0; font-size: .88rem; color: var(--muted); }
.swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #bbb; background: var(--sw); cursor: pointer; padding: 0; }
.swatch.active { box-shadow: 0 0 0 3px var(--red); }
.swatch-name { font-size: .88rem; font-weight: 600; margin-left: 4px; }
.sizes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.size { min-width: 44px; padding: 7px 10px; border: 2px solid var(--line); border-radius: 8px; background: #fff; font: 700 .85rem var(--body); cursor: pointer; }
.size.active { border-color: var(--ink); background: var(--ink); color: #fff; }
.size-one { font-size: .88rem; color: var(--muted); }
.art-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 14px; }
.art-tabs button { padding: 8px 12px; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; background: none; font: 700 .9rem var(--body); color: var(--muted); cursor: pointer; }
.art-tabs button.active { color: var(--ink); border-bottom-color: var(--red); }
.input { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; font: 600 .95rem var(--body); background: var(--paper-2); color: var(--ink); }
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; }
.field-inline { display: flex; align-items: center; gap: 10px; margin: 0; }
.field-inline > span { margin: 0; }
.field-inline .input { width: auto; }
.pane-note { margin: 0 0 12px; font-size: .92rem; color: var(--muted); }
.pane-link { display: inline-block; margin-top: 10px; font-size: .88rem; }
.chart-pick-card { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.chart-pick-card img { width: 140px; border-radius: 6px; border: 1px solid var(--line); }
.chart-pick-card p { margin: 0; font-size: .9rem; font-weight: 600; }
.chart-pick-row { display: flex; gap: 8px; align-items: center; }
.chart-pick-row .input { flex: 1; }
.art-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; max-height: 300px; overflow: auto; padding: 2px; }
.art-grid-faces { margin-top: 10px; }
.art-grid-faces .art img { object-fit: contain; background: #fff; }
.art { display: flex; flex-direction: column; gap: 4px; padding: 6px; border: 2px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font: 600 .72rem var(--body); color: var(--ink); text-align: center; }
.art img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: var(--paper-2); }
.art:hover { border-color: var(--ink); }
.art span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#pane-text .swatches { margin: 4px 0 12px; }
.layers { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.layers-empty { margin: 0; font-size: .88rem; color: var(--muted); }
.layer-row { border: 2px solid var(--line); border-radius: 10px; padding: 8px 10px; cursor: pointer; }
.layer-row.selected { border-color: var(--red); }
.layer-row-head { display: flex; align-items: center; gap: 10px; }
.layer-row-head img { width: 36px; height: 36px; object-fit: cover; border-radius: 6px; background: var(--paper-2); }
.layer-row-text { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 6px; background: var(--ink); font-family: var(--display); font-size: 1.1rem; }
.layer-row-label { flex: 1; font-size: .85rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 1rem; cursor: pointer; }
.icon-btn:hover { border-color: var(--ink); }
.layer-row-ctl { display: none; gap: 14px; margin-top: 8px; }
.layer-row.selected .layer-row-ctl { display: flex; }
.layer-row-ctl label { flex: 1; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.layer-row-ctl input { width: 100%; accent-color: var(--red); }
.order-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.price { text-align: right; }
.price-total { display: block; font-family: var(--display); font-size: 2rem; line-height: 1; }
.price-note { font-size: .8rem; color: var(--muted); }
.btn-buy { width: 100%; font-size: 1.1rem; padding: 16px 22px; }
.btn-buy:disabled, .studio-bar .btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.order-error { margin: 12px 0 0; padding: 10px 12px; border-radius: 8px; background: #fff0ee; color: #8b1e14; border: 1px solid #c0392b; font-size: .9rem; }
.order-fine { margin: 12px 0 0; font-size: .8rem; color: var(--muted); }
.studio-bar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: var(--ink); color: #fff; box-shadow: 0 -4px 20px rgba(0,0,0,.25); }
.studio-bar-price { font-family: var(--display); font-size: 1.4rem; }

@media (max-width: 1000px) {
  .studio-grid { grid-template-columns: minmax(0, 1fr); }
  .stage-col { position: static; }
  .stage-wrap { padding: 10px; }
  .stage { max-height: 62vh; aspect-ratio: auto; height: 62vh; }
  .stage-is-flag { height: auto; aspect-ratio: 56 / 34.5; }
  .studio-bar { display: flex; }
}
@media (max-width: 760px) {
  .panel { padding: 18px; }
  .product-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chart-pick-card { flex-direction: column; align-items: flex-start; }
  .chart-pick-card img { width: 100%; }
}
