/* ArcadeLand web — shared styles.
   One visual world on purpose: crayon-on-paper. Cream paper ground, purple crayon bands,
   torn-paper edges between sections, hand-drawn stickers used as accents only.
   Single theme by design: every color is set explicitly below. */
:root {
  color-scheme: light;
  --paper: #fff6e6;
  --paper-2: #f6ead3;
  --card: #fffdf8;
  --ink: #23174f;
  --ink-2: #554a80;
  --ink-3: #8a80ad;
  --line: #e4d9f3;
  --purple: #4b2bb7;
  --purple-2: #3a1f99;
  --night: #1d1342;
  --pink: #ff4f98;
  --pink-ink: #c8165f;
  --pink-press: #b3125a;
  --yellow: #ffd447;
  --yellow-soft: #fff1bd;
  --teal: #4ed7c5;
  --teal-ink: #0e7a6c;
  --teal-soft: #d8f6f1;
  --peri: #7d8bff;
  --lilac: #ece8f8;
  --rose: #ffe4ef;
  --cardboard: #d8b48c;
  --on-dark: #fff6e6;
  --on-dark-2: #d9d0f5;
  --ring: #fffaf2;

  --f-display: "Huninn", "Baloo 2", "PingFang TC", "Noto Sans TC", sans-serif;
  --f-latin: "Baloo 2", "Huninn", "PingFang TC", sans-serif;
  --f-body: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --f-pixel: "Silkscreen", "Courier New", monospace;

  --t-hero: clamp(44px, 7.2vw, 100px);
  --t-h2: clamp(32px, 4.6vw, 60px);
  --t-h3: clamp(23px, 2.2vw, 30px);
  --t-lead: clamp(19px, 1.7vw, 23px);
  --t-body: 18px;
  --t-small: 15.5px;

  --gutter: clamp(24px, 6vw, 96px);
  --gutter-x: max(var(--gutter), env(safe-area-inset-left, 0px));
  --gutter-r: max(var(--gutter), env(safe-area-inset-right, 0px));
  --maxw: 1120px;
  --nav-h: 68px;
  --r-lg: 28px;
  --r-md: 20px;
  --r-sm: 14px;
  --shadow: 0 10px 30px rgba(35, 23, 79, .12);
  --shadow-sm: 0 4px 14px rgba(35, 23, 79, .10);
  --sticker-shadow: drop-shadow(0 10px 14px rgba(35, 23, 79, .22));
  --ease: cubic-bezier(.2, .8, .2, 1);
  --tear: polygon(0 16px, 4% 5px, 9% 17px, 14% 3px, 20% 13px, 26% 0, 31% 15px, 37% 5px, 43% 17px, 49% 3px, 55% 14px, 61% 1px, 67% 16px, 73% 4px, 79% 13px, 85% 0, 91% 15px, 96% 5px, 100% 12px,
    100% calc(100% - 13px), 96% calc(100% - 2px), 91% calc(100% - 16px), 85% calc(100% - 4px), 79% calc(100% - 15px), 73% calc(100% - 1px), 67% calc(100% - 14px), 61% calc(100% - 3px), 55% calc(100% - 17px), 49% calc(100% - 5px), 43% calc(100% - 14px), 37% calc(100% - 1px), 31% calc(100% - 16px), 26% calc(100% - 4px), 20% calc(100% - 13px), 14% 100%, 9% calc(100% - 15px), 4% calc(100% - 3px), 0 calc(100% - 12px));
  --tear-bottom: polygon(0 0, 100% 0, 100% calc(100% - 13px), 96% calc(100% - 2px), 91% calc(100% - 16px), 85% calc(100% - 4px), 79% calc(100% - 15px), 73% calc(100% - 1px), 67% calc(100% - 14px), 61% calc(100% - 3px), 55% calc(100% - 17px), 49% calc(100% - 5px), 43% calc(100% - 14px), 37% calc(100% - 1px), 31% calc(100% - 16px), 26% calc(100% - 4px), 20% calc(100% - 13px), 14% 100%, 9% calc(100% - 15px), 4% calc(100% - 3px), 0 calc(100% - 12px));
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background-color: var(--paper); color: var(--ink);
  background-image: url("img/grain.png"); background-size: 320px 320px; background-blend-mode: multiply;
  font-family: var(--f-body); font-size: var(--t-body); line-height: 1.75; letter-spacing: .01em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--paper); }
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--yellow); color: var(--ink); }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3, h4 { margin: 0; font-family: var(--f-display); font-weight: 400; text-wrap: balance; letter-spacing: .01em; }
p { margin: 0; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: calc(var(--maxw) + 2 * var(--gutter)); margin-inline: auto; padding-left: var(--gutter-x); padding-right: var(--gutter-r); }
.wrap--narrow { max-width: calc(820px + 2 * var(--gutter)); }
.section { padding-block: clamp(72px, 9vw, 128px); position: relative; }
.section--tight { padding-block: clamp(48px, 6vw, 80px); }
.band { position: relative; }
.band--purple { background-color: var(--purple); background-image: url("img/crayon.png"); background-size: 420px auto; background-blend-mode: multiply; color: var(--on-dark); }
.band--night { background-color: var(--night); color: var(--on-dark); }
.band--sunken { background-color: var(--paper-2); }
.band--yellow { background-color: var(--yellow); }
.band--teal { background-color: var(--teal-soft); }
.band--lilac { background-color: var(--lilac); }
.band--cardboard { background-color: var(--cardboard); background-image: url("img/cardboard.png"); background-size: 480px 480px; }
.torn { clip-path: var(--tear); margin-block: -8px; }
.torn-bottom { clip-path: var(--tear-bottom); }
.invaders::after { content: ""; position: absolute; inset: 0; background: url("img/invaders.webp") 0 0 / 380px auto; opacity: .12; pointer-events: none; }

.grid { display: grid; gap: 24px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
@media (max-width: 880px) { .split { grid-template-columns: minmax(0, 1fr); } }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.center { text-align: center; }
.center .row { justify-content: center; }

/* ---------- type ---------- */
.eyebrow { font-family: var(--f-pixel); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--pink-ink); display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 10px; height: 10px; background: currentColor; display: inline-block; }
.band--purple .eyebrow, .band--night .eyebrow { color: var(--yellow); }
.h-hero { font-size: var(--t-hero); line-height: 1.12; }
.h2 { font-size: var(--t-h2); line-height: 1.2; margin-top: 14px; }
.h3 { font-size: var(--t-h3); line-height: 1.35; }
.lead { font-size: var(--t-lead); line-height: 1.75; color: var(--ink-2); max-width: 40em; }
.band--purple .lead, .band--night .lead { color: var(--on-dark-2); }
.muted { color: var(--ink-2); }
.small { font-size: var(--t-small); line-height: 1.7; }
.note { font-size: 14px; line-height: 1.7; color: var(--ink-3); }
.band--purple .note, .band--night .note { color: var(--on-dark-2); }
.px { font-family: var(--f-pixel); letter-spacing: .06em; }
.num { font-family: var(--f-pixel); font-variant-numeric: tabular-nums; }
.hl { color: var(--pink-ink); }
.band--purple .hl, .band--night .hl { color: var(--yellow); }
.sec-head { max-width: 760px; margin-bottom: clamp(32px, 4vw, 56px); }
.sec-head.center { margin-inline: auto; }
.sec-head .lead { margin-top: 18px; }
.center .lead { margin-inline: auto; }
.bridge { font-family: var(--f-display); font-size: clamp(19px, 1.8vw, 24px); color: var(--pink-ink); display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.bridge::before { content: ""; width: 34px; border-top: 4px dotted currentColor; }
.band--purple .bridge, .band--night .bridge { color: var(--yellow); }

/* ---------- nav ---------- */
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; transition: background-color .3s, box-shadow .3s; }
.nav__in { height: var(--nav-h); display: flex; align-items: center; gap: 28px; }
.nav__logo { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.nav__logo img { height: 40px; width: auto; }
.nav__logo span { font-family: var(--f-pixel); font-size: 12px; letter-spacing: .1em; color: var(--ink-2); padding-left: 12px; border-left: 2px solid var(--line); }
.nav__links { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav__links a { text-decoration: none; font-weight: 500; font-size: 16px; padding: 8px 14px; border-radius: 999px; white-space: nowrap; transition: background-color .2s; }
@media (min-width: 901px) and (max-width: 1180px) { .nav__links a { padding: 8px 9px; font-size: 15px; } .nav__logo span { display: none; } }
.nav__links a:hover { background: var(--lilac); }
.nav__links a.is-active { background: var(--ink); color: var(--on-dark); }
.nav__sep { width: 2px; height: 22px; background: var(--line); margin-inline: 6px; }
.nav.is-scrolled { background: rgba(255, 246, 230, .88); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); box-shadow: 0 1px 0 rgba(35, 23, 79, .08); }
.nav.on-dark:not(.is-scrolled) .nav__links a { color: var(--on-dark); }
.nav.on-dark:not(.is-scrolled) .nav__links a:hover { background: rgba(255, 255, 255, .12); }
.nav.on-dark:not(.is-scrolled) .nav__logo span { color: var(--on-dark-2); border-color: rgba(255, 255, 255, .25); }
.nav__menu { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 14px; border: 0; background: var(--yellow); color: var(--ink); font-size: 20px; cursor: pointer; }
@media (max-width: 900px) {
  .nav__links { display: none; position: absolute; top: var(--nav-h); left: 12px; right: 12px; flex-direction: column; align-items: stretch; gap: 2px; padding: 12px; border-radius: 22px; background: var(--card); box-shadow: var(--shadow); }
  .nav__links.is-open { display: flex; }
  .nav__links a, .nav.on-dark:not(.is-scrolled) .nav__links a { color: var(--ink); font-size: 18px; padding: 12px 16px; }
  .nav__sep { width: auto; height: 2px; margin: 6px 8px; }
  .nav__menu { display: grid; place-items: center; }
  .nav .nav__cta-desk { display: none; }
}

/* ---------- buttons ---------- */
.btn { --bg: var(--ink); --fg: var(--on-dark); --press: #120a2f; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: 999px; border: 0;
  background: var(--bg); color: var(--fg); font-family: var(--f-display); font-size: 19px; text-decoration: none; cursor: pointer; white-space: nowrap;
  box-shadow: 0 5px 0 var(--press); transform: translateY(0); transition: transform .15s var(--ease), box-shadow .15s var(--ease), background-color .2s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--press); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--press); }
.btn--coin { --bg: var(--pink); --fg: #fff; --press: var(--pink-press); }
.btn--yellow { --bg: var(--yellow); --fg: var(--ink); --press: #c9a22a; }
.btn--light { --bg: var(--card); --fg: var(--ink); --press: #d7cbe9; }
.btn--ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px currentColor; }
.btn--ghost:hover, .btn--ghost:active { box-shadow: inset 0 0 0 2px currentColor; }
.btn--sm { min-height: 42px; padding: 0 18px; font-size: 16px; box-shadow: 0 4px 0 var(--press); }
.btn--lg { min-height: 62px; padding: 0 34px; font-size: 22px; }
.btn .coin { width: 20px; height: 20px; border-radius: 50%; background: var(--yellow); box-shadow: inset 0 0 0 3px #e0a800; flex: none; }
.link-arrow { font-weight: 700; color: var(--purple); text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.link-arrow::after { content: "→"; transition: transform .2s var(--ease); }
.link-arrow:hover::after { transform: translateX(4px); }
.microcopy { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 15px; color: var(--ink-2); margin-top: 16px; }
.microcopy span::before { content: "✓ "; color: var(--teal-ink); font-weight: 700; }
.band--purple .microcopy, .band--night .microcopy { color: var(--on-dark-2); }
.band--purple .microcopy span::before, .band--night .microcopy span::before { color: var(--teal); }

/* ---------- pieces ---------- */
.card { background: var(--card); border-radius: var(--r-md); box-shadow: inset 0 0 0 2px var(--line); padding: clamp(22px, 2.4vw, 32px); min-width: 0; }
.card--raised { box-shadow: 0 0 0 6px var(--ring), var(--shadow); }
.card--yellow { background: var(--yellow-soft); box-shadow: none; }
.card--rose { background: var(--rose); box-shadow: none; }
.card--teal { background: var(--teal-soft); box-shadow: none; }
.card--lilac { background: var(--lilac); box-shadow: none; }
.card--dark { background: var(--night); color: var(--on-dark); box-shadow: none; }
.card h3 { font-size: 24px; line-height: 1.4; }
.card p { margin-top: 8px; color: var(--ink-2); }
.card--dark p { color: var(--on-dark-2); }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 2px var(--line); font-size: 15px; font-weight: 500; }
.tag { display: inline-block; font-family: var(--f-pixel); font-size: 12px; letter-spacing: .08em; padding: 5px 10px 4px; border-radius: 8px; background: var(--yellow); color: var(--ink); }
.tag--pink { background: var(--pink); color: #fff; }
.tag--teal { background: var(--teal); }
.tag--lilac { background: var(--lilac); }
.sticker { filter: var(--sticker-shadow); pointer-events: none; user-select: none; }
.float { animation: float 6s ease-in-out infinite; }
.float--slow { animation-duration: 8s; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
.hud { display: inline-flex; flex-direction: column; gap: 6px; padding: 16px 22px 14px; border-radius: 18px; background: var(--night); color: var(--yellow); box-shadow: 0 0 0 5px var(--ring), var(--shadow); }
.hud__label { font-family: var(--f-pixel); font-size: 12px; letter-spacing: .14em; color: var(--teal); }
.hud__digits { font-family: var(--f-pixel); font-size: clamp(26px, 3.4vw, 40px); line-height: 1; display: flex; gap: 14px; font-variant-numeric: tabular-nums; }
.hud__digits small { display: block; font-size: 11px; letter-spacing: .12em; color: var(--on-dark-2); margin-top: 6px; }
.photo { border-radius: var(--r-md); overflow: hidden; background: var(--paper-2); box-shadow: 0 0 0 6px var(--ring), var(--shadow); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo figcaption { font-size: 13px; color: var(--ink-3); padding: 8px 4px 0; }
.quote { position: relative; }
.quote blockquote { margin: 0; font-size: 18px; line-height: 1.85; }
.quote cite { display: block; margin-top: 14px; font-style: normal; font-family: var(--f-pixel); font-size: 12.5px; letter-spacing: .08em; color: var(--pink-ink); }
.quote h3 { color: var(--purple); font-size: 22px; margin-bottom: 10px; }
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.list li { display: flex; gap: 12px; }
.list li::before { content: ""; flex: none; width: 9px; height: 9px; margin-top: .72em; background: var(--pink); }
.list--check li::before { content: "✓"; width: auto; height: auto; margin-top: 0; background: none; color: var(--teal-ink); font-weight: 700; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0; border-radius: var(--r-sm); overflow: hidden; box-shadow: inset 0 0 0 2px var(--line); }
.kv > * { padding: 14px 20px; background: var(--card); }
.kv > :nth-child(4n+1), .kv > :nth-child(4n+2) { background: #fbf4e7; }
.kv dt { font-family: var(--f-display); color: var(--purple); font-size: 17px; }
.kv dd { margin: 0; min-width: 0; }
@media (max-width: 560px) { .kv { grid-template-columns: minmax(0, 1fr); } .kv dt { padding-bottom: 0; } .kv > :nth-child(4n+1), .kv > :nth-child(4n+2) { background: var(--card); } .kv dd { padding-top: 2px; } .kv dt:nth-of-type(odd), .kv dt:nth-of-type(odd) + dd { background: #fbf4e7; } }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--r-md); box-shadow: inset 0 0 0 2px var(--line); background: var(--card); -webkit-overflow-scrolling: touch; }
table.t { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 640px; font-size: 16px; line-height: 1.55; color: var(--ink); background: var(--card); }
.t th, .t td { padding: 13px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.t thead th { position: sticky; top: 0; background: var(--ink); color: var(--on-dark); font-family: var(--f-display); font-weight: 400; font-size: 17px; z-index: 2; }
.t thead th small { display: block; font-family: var(--f-pixel); font-size: 11px; letter-spacing: .08em; color: var(--yellow); }
.t tbody th { font-weight: 500; }
.t .grp th { background: var(--lilac); font-family: var(--f-display); color: var(--purple); font-size: 17px; }
.t td.c, .t th.c { text-align: center; }
.t .yes { color: var(--teal-ink); font-weight: 700; }
.t .no { color: #c9bfdc; }
.t tr:last-child > * { border-bottom: 0; }
.t th:first-child { position: sticky; left: 0; background: var(--card); z-index: 1; }
.t thead th:first-child { background: var(--ink); z-index: 3; }
.t .grp th:first-child { background: var(--lilac); }
.t .hlcol { background: #fff3cc; }
.t thead th.hlcol { background: var(--pink); }

/* ---------- accordion ---------- */
.acc { border-radius: var(--r-sm); background: var(--card); box-shadow: inset 0 0 0 2px var(--line); }
.acc + .acc { margin-top: 12px; }
.acc summary { list-style: none; cursor: pointer; padding: 20px 24px; display: flex; justify-content: space-between; gap: 16px; align-items: center; font-family: var(--f-display); font-size: 20px; line-height: 1.45; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "+"; font-family: var(--f-pixel); font-size: 22px; color: var(--purple); flex: none; transition: transform .25s var(--ease); }
.acc[open] summary::after { transform: rotate(45deg); }
.acc[open] { background: var(--yellow-soft); box-shadow: 0 0 0 4px var(--ring), var(--shadow-sm); }
.acc__body { padding: 0 24px 22px; color: var(--ink-2); }
@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
  .acc::details-content { block-size: 0; overflow: hidden; transition: block-size .35s var(--ease), content-visibility .35s allow-discrete; }
  .acc[open]::details-content { block-size: auto; }
}

/* ---------- tabs ---------- */
.tabs { display: inline-flex; flex-wrap: wrap; gap: 8px; padding: 6px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 2px var(--line); }
.tabs button { border: 0; background: transparent; padding: 10px 20px; border-radius: 999px; font-family: var(--f-pixel); font-size: 14px; letter-spacing: .06em; color: var(--ink-2); cursor: pointer; transition: background-color .2s, color .2s; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--yellow); }
[role="tabpanel"] { animation: tabin .4s var(--ease); }
@keyframes tabin { from { opacity: .3; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }

/* ---------- footer ---------- */
.footer { padding-block: 72px 48px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
.footer h4 { font-family: var(--f-pixel); font-size: 13px; letter-spacing: .12em; color: var(--purple); margin-bottom: 12px; font-weight: 400; }
.footer a { text-decoration: none; display: block; padding: 3px 0; }
.footer a:hover { color: var(--purple); }
.footer__base { margin-top: 48px; padding-top: 18px; border-top: 2px solid rgba(35, 23, 79, .18); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 14px; }

/* ---------- motion ---------- */
.pop { animation: pop .8s var(--ease) both; animation-delay: var(--d, 0s); }
@keyframes pop { from { opacity: 0; transform: scale(.6) rotate(var(--rot0, -14deg)); } to { opacity: 1; transform: scale(1) rotate(var(--rot, 0deg)); } }
.rise { animation: rise .9s var(--ease) both; animation-delay: var(--d, 0s); }
@keyframes rise { from { translate: 0 22px; } to { translate: 0 0; } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 70%; }
    @keyframes reveal { from { opacity: .15; translate: 0 48px; } to { opacity: 1; translate: 0 0; } }
    .reveal-scale { animation: revscale linear both; animation-timeline: view(); animation-range: entry 0% cover 40%; }
    @keyframes revscale { from { scale: .92; opacity: .3; } to { scale: 1; opacity: 1; } }
    .drift { animation: drift linear both; animation-timeline: view(); animation-range: cover; }
    @keyframes drift { from { translate: 0 40px; } to { translate: 0 -40px; } }
  }
}
@media (prefers-reduced-motion: reduce) { .pop, .rise, .float, [role="tabpanel"] { animation: none !important; } }

/* ---------- misc ---------- */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); translate: -50% 20px; opacity: 0; pointer-events: none; z-index: 90; padding: 12px 20px; border-radius: 999px; background: var(--ink); color: var(--on-dark); font-size: 15px; transition: opacity .25s, translate .25s var(--ease); }
.toast.is-on { opacity: 1; translate: -50% 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.divider-dots { border: 0; border-top: 4px dotted var(--line); margin: 0; }
.marquee { overflow: hidden; white-space: nowrap; }
.marquee__track { display: inline-flex; gap: 32px; padding-right: 32px; animation: marquee 38s linear infinite; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* ---------- one section = one screen (desktop) ---------- */
@media (min-width: 900px) and (min-height: 560px) {
  .screen { min-height: calc(100svh - var(--nav-h)); display: flex; flex-direction: column; justify-content: center; padding-block: clamp(24px, 5vh, 64px); }
  .screen > .wrap { width: 100%; }
  .screen .sec-head { margin-bottom: clamp(18px, 3.2vh, 40px); }
  .screen .sec-head .lead { margin-top: 10px; }
  .screen .bridge { margin-bottom: clamp(8px, 1.6vh, 18px); font-size: clamp(17px, 2.2vh, 22px); }
  .screen .h2 { font-size: clamp(28px, min(4.2vw, 5.6vh), 54px); margin-top: 8px; }
  .screen .lead { font-size: clamp(16px, min(1.6vw, 2.3vh), 21px); line-height: 1.7; }
  .screen .card { padding: clamp(16px, 2.4vh, 28px); }
  .screen .card h3 { font-size: clamp(18px, 2.6vh, 24px); }
  .screen .card p { font-size: clamp(14.5px, 1.95vh, 17px); line-height: 1.65; margin-top: 6px; }
}

/* manual-copy fallback */
dialog.copybox { width: min(520px, calc(100vw - 24px)); padding: 22px; border: 0; border-radius: 22px; background: var(--paper); color: var(--ink); box-shadow: 0 0 0 6px var(--yellow), 0 24px 60px rgba(20, 10, 50, .4); }
dialog.copybox::backdrop { background: rgba(29, 19, 66, .55); }
.copybox p { font-size: 15.5px; color: var(--ink-2); }
.copybox textarea { display: block; width: 100%; min-height: 150px; margin: 12px 0; padding: 12px 14px; border: 0; border-radius: 14px; background: var(--card); color: var(--ink); font: inherit; font-size: 15px; line-height: 1.6; box-shadow: inset 0 0 0 2px var(--line); resize: vertical; }

/* ---------- section seams ----------
   Each seam is drawn by the LOWER section: a torn strip in its own colour rises into the section above.
   The strip is real background, never a see-through gap, so it works between any two colours. */
:root { --tear-d: 18px; --tear-up: polygon(0 16px, 4% 5px, 9% 17px, 14% 3px, 20% 13px, 26% 0, 31% 15px, 37% 5px, 43% 17px, 49% 3px, 55% 14px, 61% 1px, 67% 16px, 73% 4px, 79% 13px, 85% 0, 91% 15px, 96% 5px, 100% 12px, 100% 100%, 0 100%); }
.torn, .torn-bottom { clip-path: none; margin-block: 0; }
main > section:is(.torn, .band):not(:first-child), main > :is(.torn, .torn-bottom, .band) + section, .footer { position: relative; }
main > section:is(.torn, .band):not(:first-child)::before, main > :is(.torn, .torn-bottom, .band) + section::before, .footer::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: calc(100% - 1px); height: var(--tear-d); z-index: 2; pointer-events: none;
  clip-path: var(--tear-up);
  background-color: var(--paper); background-image: url("img/grain.png"); background-size: 320px 320px; background-blend-mode: multiply;
}
:is(main > section:is(.torn, .band):not(:first-child), main > :is(.torn, .torn-bottom, .band) + section, .footer).band::before { background: inherit; background-blend-mode: inherit; }
/* the last screen before the footer ends where its content ends, no empty band above the footer */
main > section.screen:last-child { min-height: 0; padding-block: clamp(64px, 10vh, 120px) clamp(72px, 11vh, 130px); }
