@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,700&family=Atkinson+Hyperlegible:ital,wght@0,400;0,700;1,400&family=Noto+Sans+TC:wght@400;700&family=Noto+Serif+TC:wght@500&display=swap');

:root {
  --paper: #eef1f4;
  --surface: #ffffff;
  --ink: #1d2340;
  --muted: #555b75;
  --fig: #6b2e5f;
  --fig-soft: #f3e6ef;
  --leaf: #c9d8b6;
  --line: #d3d8e0;
  --max: 68rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #161a2c;
    --surface: #1f2440;
    --ink: #eef1f4;
    --muted: #b3b8cc;
    --fig: #e3a3d2;
    --fig-soft: #3a2a44;
    --leaf: #3d4a33;
    --line: #333a5a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #161a2c;
  --surface: #1f2440;
  --ink: #eef1f4;
  --muted: #b3b8cc;
  --fig: #e3a3d2;
  --fig-soft: #3a2a44;
  --leaf: #3d4a33;
  --line: #333a5a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.0625rem/1.65 'Atkinson Hyperlegible', system-ui, sans-serif;
}
a { color: var(--fig); text-underline-offset: 0.18em; }
:focus-visible { outline: 3px solid var(--fig); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: 'Bricolage Grotesque', system-ui, sans-serif; line-height: 1.1; margin: 0 0 0.6em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 500; }
p { margin: 0 0 1em; max-width: 38em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 48rem) { .wrap { padding: 0 2rem; } }

/* header */
.site-header { padding: 1.25rem 0; }
.site-header .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.logo { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1.25rem; color: var(--ink); text-decoration: none; }
.logo span { color: var(--fig); }
.nav { display: flex; gap: 1.1rem; font-size: 0.95rem; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { text-decoration: underline; }

/* buttons */
.button {
  display: inline-block; background: var(--fig); color: var(--paper); border: 0; cursor: pointer;
  font: 700 1rem 'Atkinson Hyperlegible', sans-serif; text-decoration: none;
  padding: 0.85rem 1.4rem; border-radius: 999px;
}
.button:hover { filter: brightness(1.1); }
.button.ghost { background: transparent; color: var(--fig); border: 2px solid var(--fig); padding: 0.7rem 1.2rem; }

/* hero */
.hero { padding: 2.5rem 0 4rem; }
.hero-grid { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 56rem) { .hero-grid { grid-template-columns: 1fr 1.05fr; } }
.hero .lede { font-size: 1.25rem; color: var(--muted); }

/* composer */
.composer {
  background: var(--surface); border: 1px solid var(--line); border-radius: 1.25rem;
  padding: 1.5rem; box-shadow: 0 1px 0 var(--line);
}
.composer h2 { font-size: 1.35rem; margin-bottom: 1rem; }
.field { margin-bottom: 1.1rem; }
.field > label, .field > .label { display: block; font-weight: 700; margin-bottom: 0.4rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  font: inherit; font-size: 0.95rem; cursor: pointer;
  background: transparent; color: var(--ink); border: 1px solid var(--line);
  border-radius: 999px; padding: 0.4rem 0.9rem;
}
.chip[aria-pressed="true"] { background: var(--fig); border-color: var(--fig); color: var(--paper); }
select, textarea, input[type="text"] {
  width: 100%; font: inherit; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 0.75rem; padding: 0.65rem 0.8rem;
}
textarea { min-height: 7rem; resize: vertical; }
.hint { font-size: 0.9rem; color: var(--muted); margin: 0.35rem 0 0; }
.composer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; }
.composer-actions .address { color: var(--muted); font-size: 0.95rem; }
.preview {
  margin-top: 1.25rem; border-top: 1px dashed var(--line); padding-top: 1rem;
  font-size: 0.92rem; color: var(--muted);
}
.preview dt { font-weight: 700; color: var(--ink); }
.preview dd { margin: 0 0 0.5rem; white-space: pre-wrap; word-break: break-word; }

/* sections */
section { padding: 3.5rem 0; }
.band { background: var(--surface); border-block: 1px solid var(--line); }
.steps { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1.5rem; counter-reset: step; }
@media (min-width: 48rem) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step); display: inline-grid; place-items: center;
  width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--leaf); color: var(--ink);
  font-weight: 700; margin-bottom: 0.8rem;
}

/* example shuffler */
.shuffle { display: grid; gap: 1.25rem; align-items: center; margin-top: 1.5rem; }
@media (min-width: 48rem) { .shuffle { grid-template-columns: 1fr auto; } }
.shuffle blockquote {
  margin: 0; background: var(--fig-soft); border-radius: 1rem; padding: 1.4rem 1.6rem;
  font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(1.25rem, 2.6vw, 1.7rem); line-height: 1.3;
}
.shuffle blockquote small { display: block; margin-top: 0.6rem; font: 0.9rem 'Atkinson Hyperlegible', sans-serif; color: var(--muted); }
.shuffle-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.notice { background: var(--leaf); border-radius: 1rem; padding: 1.25rem 1.5rem; margin-top: 2rem; }
.notice p { margin: 0; max-width: none; }

details { border-bottom: 1px solid var(--line); padding: 1rem 0; }
details summary { cursor: pointer; font-weight: 700; }
details p { margin: 0.6rem 0 0; color: var(--muted); }

/* careers */
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.5rem 0 2rem; }
.roles { display: grid; gap: 1rem; align-items: start; }
@media (min-width: 48rem) { .roles { grid-template-columns: 1fr 1fr; } }
.role { background: var(--surface); border: 1px solid var(--line); border-radius: 1.25rem; padding: 1.4rem 1.5rem; }
.role[hidden] { display: none; }
.role h3 { font-size: 1.35rem; font-weight: 700; margin-bottom: 0.3rem; }
.role .meta { color: var(--muted); font-size: 0.92rem; margin-bottom: 0.8rem; }
.role details { border: 0; padding: 0.5rem 0 0; }
.role details summary { color: var(--fig); }
.role dl { margin: 0.8rem 0 0; }
.role dt { font-weight: 700; margin-top: 0.6rem; }
.role dd { margin: 0.2rem 0 0; color: var(--muted); }
.role .apply { margin-top: 1rem; }
.process { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1.25rem; counter-reset: step; }
@media (min-width: 48rem) { .process { grid-template-columns: repeat(3, 1fr); } }
.process li { counter-increment: step; }
.process li::before {
  content: counter(step); display: inline-grid; place-items: center;
  width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--leaf); color: var(--ink);
  font-weight: 700; margin-bottom: 0.8rem;
}

/* legal pages */
.doc { padding: 2rem 0 4rem; }
.doc h1 { font-size: clamp(2rem, 5vw, 3rem); }
.doc h2 { font-size: 1.35rem; margin-top: 2rem; }
.doc li { max-width: 38em; margin-bottom: 0.4em; }
.updated { color: var(--muted); }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; padding: 1rem 1.5rem; margin: 1.5rem 0; max-width: 38em; }
.toc ol { margin: 0.4rem 0 0; padding-left: 1.2rem; }

/* footer */
.site-footer { padding: 2.5rem 0; color: var(--muted); font-size: 0.92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.site-footer a { color: var(--muted); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- oracles ---------- */
.crumb { margin: 0 0 0.5rem; font-size: 0.95rem; }
.sketch { filter: url(#scribble); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 1.25rem; padding: 1.5rem; }
.band .panel { background: var(--paper); }
.oracle-grid { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 56rem) { .oracle-grid { grid-template-columns: 1fr 1fr; } }
.placeholder { color: var(--muted); }

.oracle-cards { display: grid; gap: 1rem; }
@media (min-width: 48rem) { .oracle-cards { grid-template-columns: 1fr 1fr; } }
.oracle-card {
  display: block; text-decoration: none; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 1.25rem; padding: 1.5rem;
}
.oracle-card:hover { border-color: var(--fig); }
.oracle-card svg { width: 4.5rem; height: 4.5rem; color: var(--fig); }
.oracle-card h2 { font-size: 1.5rem; margin: 0.6rem 0 0.4rem; }
.oracle-card p { margin: 0; color: var(--muted); }

/* lots */
.cylinder-row { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.cylinder { width: 5.5rem; height: 7rem; color: var(--fig); }
.cylinder.shaking { animation: shake 0.6s ease-in-out; }
@keyframes shake { 0%,100% { transform: rotate(0); } 20% { transform: rotate(-12deg); } 40% { transform: rotate(10deg); } 60% { transform: rotate(-8deg); } 80% { transform: rotate(5deg); } }
.blocks { display: flex; gap: 0.6rem; }
.block { width: 3.4rem; height: 1.8rem; border: 3px solid var(--fig); border-radius: 2rem 2rem 0.4rem 0.4rem; background: var(--fig-soft); }
.block.flat { border-radius: 0.4rem 0.4rem 2rem 2rem; background: var(--fig); }
.block.round { background: var(--fig-soft); }
.reading .lot-number { color: var(--muted); margin: 0; }
.reading h3 { font-size: 1.8rem; font-weight: 700; margin: 0.2rem 0 0.4rem; }
.grade { color: var(--fig); font-weight: 700; }
.verse { margin: 1rem 0; font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.4rem; line-height: 1.35; border-left: 4px solid var(--leaf); padding-left: 1rem; }
.speech { background: var(--fig-soft); border-radius: 1rem 1rem 1rem 0.2rem; padding: 1rem 1.2rem; margin-top: 1rem; }
.speech p { margin: 0; }
.speech .speaker { font-weight: 700; margin-bottom: 0.3rem; }

/* sayings */
.saying-stage { margin-top: 1.5rem; display: grid; gap: 1rem; }
.saying-card { margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 1.25rem; padding: 2rem 1.75rem; min-height: 11rem; }
.saying-card blockquote { margin: 0; font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(1.35rem, 3vw, 2rem); line-height: 1.3; max-width: 32em; }
.saying-card figcaption { margin-top: 0.9rem; color: var(--muted); }
.saying-card.flip { animation: flip 0.45s ease-out; }
@keyframes flip { from { transform: rotateX(70deg); opacity: 0; } to { transform: none; opacity: 1; } }
.saying-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.75rem; }
@media (min-width: 48rem) { .saying-list { grid-template-columns: 1fr 1fr; } }
.saying-list li { border-left: 3px solid var(--leaf); padding-left: 1rem; }
.saying-list p { margin: 0; }
.saying-list small { color: var(--muted); }

/* tarot */
.toggle { display: inline-flex; align-items: center; gap: 0.5rem; }
.toggle input { width: 1.1rem; height: 1.1rem; accent-color: var(--fig); }
.spread { display: grid; gap: 1.5rem; margin-top: 2rem; grid-template-columns: repeat(auto-fit, minmax(10rem, 15rem)); }
.slot .pos { font-weight: 700; margin: 0 0 0.5rem; }
.tcard { position: relative; display: block; width: 100%; aspect-ratio: 100 / 140; border: 0; padding: 0; background: none; cursor: pointer; perspective: 800px; }
.tback, .tfront { position: absolute; inset: 0; border-radius: 0.8rem; backface-visibility: hidden; transition: transform 0.6s; }
.tback { background: var(--fig); background-image: radial-gradient(circle at 50% 50%, var(--fig-soft) 0 12%, transparent 13%), repeating-linear-gradient(45deg, transparent 0 10px, rgba(255,255,255,0.12) 10px 12px); border: 4px solid var(--surface); }
.tfront { transform: rotateY(180deg); }
.tcard.open .tback { transform: rotateY(-180deg); }
.tcard.open .tfront { transform: rotateY(0); }
.tcard.open .tfront.rev svg { transform: rotate(180deg); }
.tfront svg, .deck-card svg { display: block; width: 100%; height: 100%; color: var(--ink); }
.card-bg { fill: var(--surface); stroke: var(--line); }
.card-num { font: 700 9px 'Bricolage Grotesque', sans-serif; fill: var(--fig); }
.tmeaning h3 { font-size: 1.1rem; font-weight: 700; margin: 0.8rem 0 0.3rem; }
.tmeaning p { margin: 0; color: var(--muted); }
.deck { display: grid; gap: 1rem; margin-top: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); align-items: start; }
.deck-card { border: 0; padding: 0; }
.deck-card summary { list-style: none; cursor: pointer; }
.deck-card summary::-webkit-details-marker { display: none; }
.deck-card summary svg { aspect-ratio: 100 / 140; height: auto; }
.deck-card summary span { display: block; font-size: 0.9rem; font-weight: 700; margin-top: 0.4rem; }
.deck-card p { font-size: 0.88rem; margin: 0.4rem 0 0; color: var(--muted); }

/* zi wei */
.zw-form { display: grid; gap: 0.5rem; justify-items: start; }
.zw-fields { display: grid; gap: 0 1rem; width: 100%; }
@media (min-width: 40rem) { .zw-fields { grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); } }
.lunar-manual { width: 100%; border-bottom: 0; padding-top: 0; }
input[type="date"] { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 0.75rem; padding: 0.6rem 0.8rem; }
.zw-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; background: var(--line); border: 4px solid var(--line); border-radius: 1rem; overflow: hidden; }
.zw-cell, .zw-center { background: var(--surface); padding: 0.5rem; min-height: 7.5rem; font-size: 0.85rem; display: flex; flex-direction: column; }
.zw-center { grid-column: 2 / 4; grid-row: 2 / 4; justify-content: center; text-align: center; background: var(--fig-soft); }
.zw-center p { margin: 0.1rem auto; }
.zw-center .big { font: 700 1.3rem 'Bricolage Grotesque', sans-serif; }
.zw-cell.is-life { box-shadow: inset 0 0 0 3px var(--fig); }
.zw-cell .pal { font-weight: 700; margin: 0 0 0.3rem; }
.zw-cell ul { list-style: none; padding: 0; margin: 0; flex: 1; }
.zw-cell li.major { font-weight: 700; color: var(--fig); }
.zw-cell li.minor { color: var(--muted); }
.zw-cell .gz { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.75rem; }
.body-tag { font-size: 0.7rem; background: var(--leaf); border-radius: 999px; padding: 0 0.4rem; font-weight: 700; }
.tf { font-size: 0.65rem; font-weight: 700; border-radius: 999px; padding: 0 0.35rem; color: var(--paper); background: var(--fig); white-space: nowrap; }
.tf3 { background: var(--muted); }
@media (max-width: 40rem) { .zw-cell, .zw-center { font-size: 0.7rem; padding: 0.3rem; min-height: 6.5rem; } .tf { font-size: 0.55rem; } .zw-center .big { font-size: 1rem; } }
.zw-reading { margin-top: 2rem; }
.zw-reading h3 { font-size: 1.3rem; font-weight: 700; margin-top: 1.5rem; }
.zw-list { padding-left: 1.2rem; }
.zw-list li { margin-bottom: 0.4rem; max-width: 40em; }

/* principle */
.principle { display: grid; gap: 1.5rem; margin-top: 1.5rem; }
@media (min-width: 48rem) { .principle { grid-template-columns: 1fr 1fr; } }
.principle div { background: var(--surface); border: 1px solid var(--line); border-radius: 1.25rem; padding: 1.5rem; }
.principle h3 { font-size: 1.4rem; font-weight: 700; }
.principle p { margin: 0; color: var(--muted); }
.principle .weight { color: var(--fig); font-weight: 700; margin-top: 0.8rem; }
.button:disabled { opacity: 0.45; cursor: not-allowed; filter: none; }
.incense { width: 3.2rem; height: 6.4rem; color: var(--fig); overflow: visible; }
.incense .ember { fill: var(--line); }
.incense .smoke { opacity: 0; }
.incense.lit .ember { fill: #e0782f; }
.incense.lit .smoke { opacity: 0.7; animation: smoke 3s ease-in-out infinite; transform-origin: 30px 34px; }
@keyframes smoke { 0% { transform: translateY(0) scaleX(1); opacity: 0.7; } 50% { transform: translateY(-4px) scaleX(-1); opacity: 0.4; } 100% { transform: translateY(0) scaleX(1); opacity: 0.7; } }
@media (prefers-reduced-motion: reduce) { .incense.lit .smoke { animation: none; } }
.classic { margin: 1rem 0; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--fig); border-radius: 0.75rem; padding: 1rem 1.2rem; max-width: 44em; }
.classic blockquote { margin: 0 0 0.5rem; font-family: 'Noto Serif TC', 'Songti TC', serif; font-size: 1.15rem; line-height: 1.7; }
.classic figcaption { color: var(--muted); font-size: 0.95rem; }
.classic figcaption span { font-size: 0.85rem; }
.classic-star { font-weight: 700; margin: 0 0 0.3rem; }
.classic-all { margin-top: 1rem; }
.zh-note { background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; padding: 1rem 1.5rem; margin: 1rem 0; max-width: 44em; }
.zh-note p { margin: 0 0 0.5em; }
.lang-switch { font-weight: 700; }

/* furnace */
.furnace-grid { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 56rem) { .furnace-grid { grid-template-columns: 1fr 1fr; } }
.furnace-grid h2 { font-size: 1.5rem; }
.paper-list { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 0.75rem; }
.paper-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 0.9rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; padding: 0.8rem 1rem; }
.paper-list h3 { font-size: 1.05rem; font-weight: 700; margin: 0; }
.paper-list p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.paper-swatch { width: 2.6rem; height: 2.6rem; border-radius: 0.3rem; box-shadow: inset 0 0 0 4px rgba(0,0,0,0.12); }
.paper-swatch.silver, .sheet.silver { background: linear-gradient(135deg, #e9edf2, #b7bec9); }
.paper-swatch.gold, .sheet.gold { background: linear-gradient(135deg, #f6dc7a, #c9962c); }
.paper-swatch.longevity, .sheet.longevity { background: linear-gradient(135deg, #f3c26b, #c0392b); }
.qty { display: flex; align-items: center; gap: 0.4rem; }
.qty output { min-width: 1.6rem; text-align: center; font-weight: 700; }
.qbtn { width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-size: 1.2rem; cursor: pointer; }
.qbtn:hover { border-color: var(--fig); }
@media (max-width: 30rem) { .paper-list li { grid-template-columns: auto 1fr; } .qty { grid-column: 1 / -1; justify-content: flex-end; } }
.cart { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; border-top: 1px dashed var(--line); padding-top: 1rem; }
.cart p { margin: 0; }
.furnace-panel { text-align: center; }
.furnace-stage { position: relative; max-width: 18rem; margin: 0 auto; }
.furnace { width: 100%; height: auto; display: block; }
.f-roof { fill: #b8862b; stroke: #6b4b12; stroke-width: 3; stroke-linejoin: round; }
.f-roof-line { stroke: #6b4b12; stroke-width: 3; stroke-linecap: round; }
.f-body { fill: #d4a33b; stroke: #6b4b12; stroke-width: 3; stroke-linejoin: round; }
.f-base { fill: #8a6219; stroke: #6b4b12; stroke-width: 3; }
.f-mouth { fill: #3a2410; stroke: #6b4b12; stroke-width: 3; }
.flame { fill: #f3a340; opacity: 0.55; transform-origin: 112px 186px; animation: flicker 1.4s ease-in-out infinite; }
.flame.f2 { fill: #f06b2b; animation-delay: 0.2s; }
.flame.f3 { fill: #ffd25a; animation-delay: 0.4s; }
@keyframes flicker { 0%,100% { transform: scaleY(1); } 50% { transform: scaleY(0.82) skewX(3deg); } }
.burning .flame { opacity: 1; animation: roar 0.5s ease-in-out 5, flicker 1.4s ease-in-out 2.5s infinite; }
@keyframes roar { 0%,100% { transform: scale(1.1, 1.3); } 50% { transform: scale(1.25, 1.7); } }
.sheets { position: absolute; inset: 0; pointer-events: none; }
.sheet { position: absolute; top: -2%; width: 1.8rem; height: 1.3rem; border-radius: 2px; opacity: 0; }
.burning .sheet { animation: drop 1.3s ease-in forwards; }
@keyframes drop { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(50% - 0.9rem), 13rem) rotate(260deg) scale(0.4); } }
@media (prefers-reduced-motion: reduce) { .flame, .burning .flame, .burning .sheet { animation: none; } }
.burn-msg { min-height: 3em; margin: 1rem auto 0; }
.burn-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin: 1rem 0 0; text-align: left; }
.burn-stats div { background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; padding: 0.8rem 1rem; }
.burn-stats dt { color: var(--muted); font-size: 0.85rem; }
.burn-stats dd { margin: 0.2rem 0 0; font: 700 1.4rem 'Bricolage Grotesque', sans-serif; color: var(--fig); }
.mission-list { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: 1rem; counter-reset: m; }
@media (min-width: 56rem) { .mission-list { grid-template-columns: repeat(3, 1fr); } }
.mission-list li { counter-increment: m; background: var(--paper); border: 1px solid var(--line); border-radius: 1.25rem; padding: 1.25rem 1.5rem; }
.mission-list h3 { font-size: 1.25rem; font-weight: 700; }

.mission-list p { margin: 0; color: var(--muted); }
.mission-close { font: 700 1.3rem/1.4 'Bricolage Grotesque', sans-serif; max-width: 30em; }
.closing { text-align: center; padding: 4.5rem 0; }
.closing h2 { max-width: 20em; margin: 0 auto 0.5rem; }
.closing p { margin: 0 auto 1.5rem; color: var(--muted); font-size: 1.2rem; }
section:not(.band) .oracle-card { background: var(--surface); }
body.zh { font-family: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', system-ui, sans-serif; }
body.zh h1, body.zh h2, body.zh h3 { font-family: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif; letter-spacing: 0; }
body.zh p { max-width: 36em; }

/* theme toggle */
.theme-toggle { font: inherit; font-size: 0.95rem; background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 0.15rem 0.7rem; cursor: pointer; }
.theme-toggle:hover { border-color: var(--fig); }
.panel-title { font-size: 1.4rem; font-weight: 700; }

/* home, v3 */
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0 2rem; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin: 0; max-width: 34rem; }
.stat-row div { border-top: 3px solid var(--fig); padding-top: 0.6rem; }
.stat-row dt { color: var(--muted); font-size: 0.85rem; }
.stat-row dd { margin: 0.15rem 0 0; font: 700 1.15rem/1.25 'Bricolage Grotesque', sans-serif; }
body.zh .stat-row dd { font-family: 'Noto Sans TC', 'PingFang TC', sans-serif; }
@media (max-width: 30rem) { .stat-row { grid-template-columns: 1fr; } }
.section-lede { color: var(--muted); font-size: 1.12rem; max-width: 40em; }
@media (min-width: 56rem) { .steps.steps-4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 48rem) and (max-width: 56rem) { .steps.steps-4 { grid-template-columns: 1fr 1fr; } }
.steps h3 { font-weight: 700; }
@media (min-width: 64rem) { .oracle-cards.oracle-cards-4 { grid-template-columns: repeat(4, 1fr); } }
.oracle-card h3 { font-size: 1.25rem; font-weight: 700; margin: 0 0 0.4rem; }
.closing.band { border-bottom: 0; }
.ask-cta { margin-top: 2.5rem; background: var(--fig-soft); border-radius: 1.25rem; padding: 1.75rem 2rem; display: grid; gap: 1rem; align-items: center; }
@media (min-width: 48rem) { .ask-cta { grid-template-columns: 1fr auto; } }
.ask-cta h2 { font-size: 1.6rem; margin: 0 0 0.3rem; }
.ask-cta p { margin: 0; }

/* typography pass */
h1, h2, h3, .lede, .section-lede, .mission-close, .closing p { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
.h1-long { font-size: clamp(1.9rem, 4.4vw, 3.3rem); line-height: 1.15; max-width: 24em; }
body.zh { line-break: strict; }
body.zh p, body.zh li, body.zh dd { line-height: 1.85; letter-spacing: 0.02em; }
body.zh h1 { line-height: 1.25; letter-spacing: 0.01em; }
body.zh h2 { line-height: 1.3; }
body.zh h3 { line-height: 1.4; }
body.zh .lede, body.zh .section-lede { line-height: 1.75; }
body.zh .hint { line-height: 1.7; }
body.zh .h1-long { font-size: clamp(1.8rem, 4vw, 3rem); max-width: 18em; }
.hero h1 { max-width: 12em; }
body.zh .hero h1 { max-width: 9em; }
.hero h1.h1-long { max-width: 22em; }

/* about */
.about-grid { display: grid; gap: 2rem 3rem; margin-top: 1.5rem; }
@media (min-width: 56rem) { .about-grid { grid-template-columns: 1fr 1.15fr; } }
.believe-label { font-weight: 700; color: var(--fig); margin-bottom: 0.6rem; }
.beliefs { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.9rem; }
.beliefs li { font: 700 clamp(1.25rem, 2.4vw, 1.6rem)/1.3 'Bricolage Grotesque', sans-serif; padding-left: 1rem; border-left: 4px solid var(--fig); max-width: none; }
body.zh .beliefs li { font-family: 'Noto Sans TC', 'PingFang TC', sans-serif; line-height: 1.45; letter-spacing: 0.01em; }
.about-grid h3 { margin-top: 1.5rem; font-weight: 700; }
.num-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 2.5rem 0 1.5rem; }
.num-row div { display: flex; flex-direction: column-reverse; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 0.8rem; }
.num-row dd { margin: 0; font: 700 clamp(2rem, 5vw, 3rem)/1 'Bricolage Grotesque', sans-serif; color: var(--fig); }
.num-row dt { color: var(--muted); margin-top: 0.4rem; font-size: 0.95rem; }
@media (max-width: 40rem) { .num-row { grid-template-columns: 1fr 1fr; } }
.stat-row { grid-template-columns: repeat(2, minmax(0, 12rem)); }
@media (max-width: 30rem) { .stat-row { grid-template-columns: 1fr 1fr; } }
.role dl dt { color: var(--ink); }
.role dd { line-height: 1.6; }
.lede, .section-lede { text-wrap: pretty; }
.roles { align-items: stretch; }
.role { display: flex; flex-direction: column; }
.role .apply { margin-top: auto; align-self: flex-start; }
.role details { margin-bottom: 1rem; }
@media (min-width: 48rem) { .process { grid-template-columns: repeat(2, minmax(0, 22rem)); gap: 2rem; } }
body.zh .hero h1.h1-long { max-width: 20em; }

/* fireworks and furnace flare */
.furnace-stage { overflow: visible; }
.sky { position: absolute; inset: -20% -15% 30% -15%; pointer-events: none; z-index: 2; }
.burst { position: absolute; width: 0; height: 0; }
.burst i { position: absolute; width: 6px; height: 6px; border-radius: 50%; opacity: 0; animation: spark 1.3s ease-out forwards; }
@keyframes spark { 0% { opacity: 1; transform: translate(0, 0) scale(1); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.3); } }
.flare .flame { opacity: 1; animation: flare 0.35s ease-in-out 10 alternate, flicker 1.4s ease-in-out 3.5s infinite; }
@keyframes flare { from { transform: scale(1.4, 1.9); } to { transform: scale(1.9, 2.8); } }
.flare .furnace { animation: rumble 0.12s linear 20; }
@keyframes rumble { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-2px, 1px); } 75% { transform: translate(2px, -1px); } }
.burn-msg.big-thanks { font: 700 1.25rem/1.5 'Bricolage Grotesque', sans-serif; color: var(--fig); }
body.zh .burn-msg.big-thanks { font-family: 'Noto Sans TC', 'PingFang TC', sans-serif; }
@media (prefers-reduced-motion: reduce) { .flare .flame, .flare .furnace { animation: none; } }
.keeper-note { margin-top: 2rem; display: grid; gap: 0.75rem; max-width: 44rem; }
.keeper-note p { margin: 0; display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; padding: 0.9rem 1.2rem; max-width: none; }
.keeper-note .who { font-weight: 700; color: var(--fig); }
@media (max-width: 30rem) { .keeper-note p { grid-template-columns: 1fr; gap: 0.2rem; } }

/* justified Chinese text */
body.zh p, body.zh li, body.zh dd, body.zh blockquote { text-align: justify; text-justify: inter-character; }
body.zh .closing p, body.zh .closing h2, body.zh .furnace-panel p, body.zh .zw-center p, body.zh .hint, body.zh .stat-row dd, body.zh .num-row dd, body.zh .num-row dt { text-align: inherit; }
body.zh .furnace-panel p { text-align: center; }
p, li, dd, blockquote { text-wrap: pretty; widows: 2; orphans: 2; }
.about-story p:last-child { font: 700 clamp(1.2rem, 2.2vw, 1.5rem)/1.45 'Bricolage Grotesque', sans-serif; color: var(--fig); }
body.zh .about-story p:last-child { font-family: 'Noto Sans TC', 'PingFang TC', sans-serif; }
.name-card { background: var(--paper); border: 1px solid var(--line); border-radius: 1.25rem; padding: 1.5rem 1.75rem; align-self: start; }
section:not(.band) .name-card { background: var(--surface); }
.name-card h3 { margin-top: 0; font-weight: 700; }
.name-card p:last-child { margin-bottom: 0; }
@media (min-width: 56rem) { .about-grid { grid-template-columns: 1.4fr 1fr; } }
.name-card p { text-align: left !important; }
details p { max-width: 46em; }
body.zh details p { max-width: 46em; }
.furnace-panel { overflow: hidden; }
body.zh .keeper-note p, body.zh .keeper-note span, body.zh .ask-cta p, body.zh .role p, body.zh .role dd, body.zh .saying-list p, body.zh .speech p { text-align: left; }
body.zh .section-lede, body.zh .lede { text-wrap: balance; text-align: left; }

/* Chinese: keep phrases whole in short blocks (break only at punctuation) */
body.zh .notice p, body.zh .hint, body.zh .ask-cta p, body.zh .keeper-note span, body.zh details p, body.zh .oracle-card p,
body.zh .role p, body.zh .role dd, body.zh #furnace > .wrap > p, body.zh .section-lede, body.zh .lede, body.zh .closing p,
body.zh .speech p, body.zh .tmeaning p, body.zh .deck-card p, body.zh .saying-list p, body.zh .steps p, body.zh .paper-list p,
body.zh .composer .hint, body.zh .about-story p:last-child, body.zh .burn-msg {
  text-align: left;
}
body.zh h1, body.zh h2, body.zh h3, body.zh summary { word-break: keep-all; overflow-wrap: anywhere; }
.zw { white-space: nowrap; }
body.zh .closing p, body.zh .closing h2 { text-align: center; }

body.zh .reading p, body.zh .classic figcaption, body.zh .zw-list li { text-align: left; }
.hero-kicker { font: 700 clamp(1.8rem, 4.2vw, 3rem)/1.2 'Bricolage Grotesque', sans-serif; margin: 0; max-width: 14em; text-wrap: balance; }
body.zh .hero-kicker { font-family: 'Noto Sans TC', 'PingFang TC', sans-serif; line-height: 1.35; max-width: 10em; }
.hero-grid > div:first-child { align-self: center; }
.hero-grid > div:first-child .hero-actions { margin-top: 0; }
/* hero without slogan: composer is the hero */
@media (min-width: 56rem) { .hero-grid { grid-template-columns: 1fr; } }
.hero-grid { gap: 1.5rem; }
.hero-grid > div:first-child { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1.25rem 2rem; }
.hero-grid > div:first-child .hero-actions { margin: 0; }
.hero-grid > div:first-child .stat-row { flex: 0 1 26rem; }
.hero .composer { width: 100%; }
@media (min-width: 56rem) {
  .hero .composer { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2.5rem; }
  .hero .composer h2 { grid-column: 1 / -1; }
  .hero .composer .field:nth-of-type(3), .hero .composer .composer-actions { grid-column: 1; }
  .hero .composer .preview { grid-column: 2; grid-row: 2 / span 3; margin-top: 0; border-top: 0; border-left: 1px dashed var(--line); padding: 0 0 0 1.5rem; }
  .hero .composer > .hint:last-child { grid-column: 1 / -1; }
}
