:root {
  --bg: #fafafa;
  --bg-elev: #ffffff;
  --bg-mute: #f2f2f0;
  --ink: #152018;
  --muted: #5a6356;
  --line: #e5e5e2;
  --accent: #215c38;
  --accent-ink: #ffffff;
  --accent-soft: rgba(33, 92, 56, 0.10);
  --ember: #c65a16;
  --ember-soft: rgba(198, 90, 22, 0.10);
  --mark: #f0c48a;
  --wash: rgba(33, 92, 56, 0.035);
  --warn: #c65a16;
  --ok: #215c38;
  --shadow: 0 12px 40px rgba(21, 32, 24, 0.07);
  --radius: 16px;
  --font: "Figtree", system-ui, sans-serif;
  --serif: "Newsreader", "Times New Roman", serif;
  --max: 1120px;
  --header: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #14110e;
  --bg-elev: #1d1915;
  --bg-mute: #2c261f;
  --ink: #f4ebe2;
  --muted: #b8a99a;
  --line: #3d342c;
  --accent: #e8883a;
  --accent-ink: #1a0e06;
  --accent-soft: rgba(232, 136, 58, 0.16);
  --ember: #e8883a;
  --ember-soft: rgba(232, 136, 58, 0.18);
  --mark: rgba(232, 136, 58, 0.28);
  --wash: rgba(232, 136, 58, 0.08);
  --warn: #f0a05a;
  --ok: #e8883a;
  --shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background:
    radial-gradient(900px 420px at 8% -8%, var(--wash), transparent 58%),
    radial-gradient(720px 400px at 100% 0%, var(--ember-soft), transparent 52%),
    var(--bg);
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
  font-size: 1.02rem;
}
html, body, .site-header, .site-footer, .chip, .tool-card, .dropzone, .toolbar, .note, .stat, .faq-item, .related-list a, .icon-btn, .btn {
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--ember); }
button, input, select, textarea { font: inherit; color: inherit; }
input[type="range"] { accent-color: var(--accent); }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }

.skip {
  position: absolute;
  left: 1rem;
  top: -40px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.4rem 0.8rem;
  z-index: 80;
}
.skip:focus { top: 0.6rem; }

.wrap { width: min(var(--max), calc(100% - 3.5rem)); margin-inline: auto; }
.wide { --max: 1200px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: var(--header);
}
.logo { display: flex; align-items: center; gap: 0.6rem; color: inherit; text-decoration: none; }
.logo-mark { color: var(--accent); display: grid; place-items: center; }
.logo-word { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; letter-spacing: -0.02em; }
.nav { display: flex; align-items: center; gap: 1.15rem; margin-left: auto; }
.nav > a, .nav-btn {
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-weight: 500;
  transition: background-size .28s var(--ease), color .2s ease;
}
.nav > a:hover, .nav > a.is-active { color: var(--ember); background-size: 100% 1px; }
.nav-btn { background-image: none; }
.nav-group { position: relative; }
.nav-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.7rem);
  width: min(640px, 92vw);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem 0.85rem;
  z-index: 30;
}
.nav-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.nav-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.45rem;
  font-weight: 600;
}
.nav-panel a, .site-footer a {
  display: block;
  color: inherit;
  text-decoration: none;
  padding: 0.22rem 0;
  font-weight: 500;
}
.nav-panel a:hover, .site-footer a:hover { color: var(--accent); }
.nav-all {
  display: inline-block !important;
  margin-top: 0.7rem;
  font-size: 0.9rem;
  color: var(--accent) !important;
}
.header-actions { display: flex; gap: 0.3rem; }
.icon-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  border-radius: 10px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: inherit;
  transition: transform .2s var(--ease), border-color .2s ease, background-color .35s ease;
}
.icon-btn:hover { transform: translateY(-1px); border-color: var(--accent); }
.icon-btn .ico { width: 18px; height: 18px; }
[data-theme="light"] .theme-moon, [data-theme="dark"] .theme-sun { display: none; }
html:not([data-theme]) .theme-moon { display: none; }
.nav-toggle { display: none; }

.hero {
  padding: 3.2rem 0 1.2rem;
  animation: rise .75s var(--ease) both;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 2.4rem;
  align-items: start;
}
.life-stack {
  display: grid;
  grid-template-columns: 1.05fr 0.78fr 1fr;
  gap: 0.65rem;
  margin-top: 1.5rem;
  align-items: end;
}
.life-stack figure,
.life-film figure,
.life-banner,
.life-frame {
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--bg-mute);
}
.life-stack img,
.life-film img,
.life-banner img,
.life-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.life-stack figure:nth-child(1) img { height: 168px; }
.life-stack figure:nth-child(2) {
  transform: translateY(-14px);
}
.life-stack figure:nth-child(2) img { height: 210px; }
.life-stack figure:nth-child(3) {
  transform: translateY(10px);
}
.life-stack figure:nth-child(3) img { height: 156px; }
.life-banner img { height: min(42vw, 340px); }
.life-frame img { height: 280px; }
.page-visual {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 0.7rem;
  margin: 1.4rem 0 1.6rem;
  max-width: 34rem;
}
.page-visual .life-frame img { height: 200px; }
.note .life-frame {
  margin: 0 0 1rem;
  box-shadow: none;
}
.note .life-frame img { height: 168px; }
.life-film {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr 1fr 0.7fr 1.15fr;
  gap: 0.4rem;
  margin: 0 0 1.8rem;
}
.life-film figure { border-radius: 12px; }
.life-film img { height: 108px; }
[data-theme="dark"] .life-stack img,
[data-theme="dark"] .life-film img,
[data-theme="dark"] .life-banner img,
[data-theme="dark"] .life-frame img {
  filter: brightness(0.9) saturate(1.06);
}
.eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 0.7rem;
}
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 550;
  letter-spacing: -0.025em;
  line-height: 1.18;
  margin: 0 0 0.7rem;
}
h1 { font-size: clamp(2.1rem, 4.4vw, 3.35rem); }
h2 { font-size: clamp(1.55rem, 2.6vw, 2.05rem); }
h3 { font-size: 1.2rem; font-family: var(--font); letter-spacing: -0.02em; font-weight: 650; }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 38rem; margin: 0 0 1.2rem; }
.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1.2rem 0 0;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.86rem;
  color: var(--muted);
  transition: transform .25s var(--ease), border-color .25s ease, color .25s ease;
}
.chip:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--ember) 45%, var(--line)); color: var(--ink); }
.chip .ico { width: 14px; height: 14px; color: var(--ember); }

.workspace { padding: 2.4rem 0 2.2rem; }
.workspace-hero {
  width: min(40.5rem, calc(100% - 3.5rem));
  margin-inline: auto;
  animation: rise .75s var(--ease) both;
}
.workspace-copy { max-width: none; margin-bottom: 1.15rem; }
.workspace-copy .lede { max-width: none; }

.dropzone {
  border: 1.5px dashed color-mix(in srgb, var(--accent) 45%, var(--line));
  background: var(--bg-elev);
  border-radius: calc(var(--radius) + 4px);
  min-height: 220px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.dropzone:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--ember) 55%, var(--line));
}
.dropzone.is-over, .dropzone:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: scale(1.01);
}
.dropzone-inner { text-align: center; padding: 2rem 1.2rem; }
.dropzone-inner p { margin: 0.2rem 0; }
.dropzone.is-compact {
  min-height: 0;
  margin-top: 0.7rem;
}
.dropzone.is-compact .dropzone-inner {
  padding: 0.65rem 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  text-align: left;
}
.dropzone.is-compact .drop-ico {
  margin: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
}
.dropzone.is-compact .drop-ico .ico { width: 16px; height: 16px; }
.dropzone.is-compact .muted { display: none; }

.preview-panel {
  margin-top: 0.9rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem;
  animation: rise .45s var(--ease) both;
}
.preview-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
.preview-panel.is-split .preview-split {
  grid-template-columns: 1fr 1fr;
}
.preview-frame { margin: 0; }
.preview-frame figcaption {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.4rem;
}
.preview-stage {
  border-radius: 12px;
  min-height: 180px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(45deg, color-mix(in srgb, var(--line) 55%, transparent) 25%, transparent 25%) 0 0 / 16px 16px,
    linear-gradient(-45deg, color-mix(in srgb, var(--line) 55%, transparent) 25%, transparent 25%) 0 8px / 16px 16px,
    var(--bg-mute);
}
.preview-stage img {
  max-width: 100%;
  max-height: 280px;
  width: auto;
  height: auto;
  display: block;
  border-radius: 4px;
}
.preview-bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.8rem;
  margin-top: 0.7rem;
  font-size: 0.88rem;
}
.preview-bar p { margin: 0; }
#preview-name {
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.preview-thumbs {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  margin-top: 0.75rem;
  padding-bottom: 0.15rem;
}
.preview-thumbs button {
  flex: 0 0 auto;
  border: 2px solid transparent;
  padding: 0;
  border-radius: 10px;
  background: none;
  cursor: pointer;
}
.preview-thumbs button.is-on { border-color: var(--accent); }
.preview-thumbs img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
.drop-ico {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.8rem;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  animation: ico-float 4.5s var(--ease) infinite;
}
.drop-ico .ico { width: 24px; height: 24px; }
.linkish { color: var(--accent); font-weight: 600; }
.muted { color: var(--muted); }

.toolbar {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 0.85rem;
}
.controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.8rem 1rem;
  align-items: end;
}
.tool-hint {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.45;
}
.field { display: grid; gap: 0.3rem; }
.field span, .field label { font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.field input[type="text"],
.field input[type="number"],
.field input[type="email"],
.field input[type="range"],
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
}
.field textarea { min-height: 120px; resize: vertical; }
.field-row { display: flex; align-items: center; gap: 0.5rem; }
.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.seg button, .preset-btn {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 999px;
  padding: 0.32rem 0.7rem;
  cursor: pointer;
}
.seg button.is-on, .preset-btn.is-on {
  background: var(--ember);
  color: #fff8f0;
  border-color: transparent;
}
[data-theme="dark"] .seg button.is-on,
[data-theme="dark"] .preset-btn.is-on {
  color: #1a0e06;
}
.check { display: flex; align-items: center; gap: 0.45rem; font-size: 0.92rem; }
.toolbar-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.btn, .btn-primary, .btn-ghost {
  border-radius: 999px;
  padding: 0.55rem 1.05rem;
  border: 1px solid var(--line);
  background: var(--bg);
  cursor: pointer;
  font-weight: 600;
  transition: transform .2s var(--ease), filter .2s ease, box-shadow .2s ease, background-color .35s ease, color .35s ease;
}
.btn:hover, .btn-ghost:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
}
.btn-primary:hover {
  background: var(--ember);
  color: #fff8f0;
  filter: none;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px var(--ember-soft);
}
[data-theme="dark"] .btn-primary:hover {
  background: color-mix(in srgb, var(--accent) 82%, #fff);
  color: #1a0e06;
}
.btn-ghost { background: transparent; }
.btn[hidden], [hidden] { display: none !important; }

.status {
  margin-top: 0.8rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.results { margin-top: 1.2rem; }
.results-head {
  display: none;
  justify-content: flex-end;
  margin-bottom: 0.65rem;
}
.results.has-many .results-head { display: flex; }
.results-head h2,
.results-head .muted { display: none; }
.results-head-actions { display: flex; }
.result-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.85rem; }
.result-list.is-many {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}
.result-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.85rem;
}
.result-card img, .result-card canvas {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  border-radius: 12px;
  background:
    linear-gradient(45deg, color-mix(in srgb, var(--line) 55%, transparent) 25%, transparent 25%) 0 0 / 16px 16px,
    linear-gradient(-45deg, color-mix(in srgb, var(--line) 55%, transparent) 25%, transparent 25%) 0 8px / 16px 16px,
    var(--bg-mute);
}
.result-list.is-many .result-card img,
.result-list.is-many .result-card canvas { max-height: 180px; }
.result-card h3 { margin: 0; font-size: 0.95rem; word-break: break-word; }
.result-meta { font-size: 0.88rem; color: var(--muted); margin: 0; text-align: center; }
.result-actions { display: flex; flex-direction: column; gap: 0.5rem; margin: 0; }
.result-actions .btn-primary {
  width: 100%;
  min-width: 0;
  padding: 0.8rem 1.15rem;
  font-size: 1.05rem;
  text-align: center;
}
.save-up { color: var(--ok); font-weight: 650; }
.save-down { color: var(--warn); }

.crop-stage {
  position: relative;
  margin-top: 1rem;
  background: var(--bg-mute);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 240px;
  display: grid;
  place-items: center;
}
.crop-stage img { max-height: 62vh; width: auto; }
.crop-rect {
  position: absolute;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 9999px rgba(16, 18, 20, 0.45);
  cursor: move;
}

.section { padding: 3rem 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { max-width: 40rem; margin-bottom: 1.5rem; }

.tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.2rem; }
.tabs button {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  cursor: pointer;
  font-weight: 600;
  transition: background-color .22s var(--ease), color .22s ease, transform .22s var(--ease);
}
.tabs button:hover { transform: translateY(-1px); }
.tabs button.is-on { background: var(--ink); color: var(--bg); border-color: transparent; }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.85rem;
}
.tool-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  padding: 1rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  min-height: 118px;
  transition: transform .28s var(--ease), border-color .28s ease, box-shadow .28s ease, background-color .35s ease;
}
.tool-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  box-shadow: var(--shadow);
  color: inherit;
}
.tool-card .ico-wrap {
  width: 40px; height: 40px; border-radius: 11px;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center;
  transition: transform .28s var(--ease);
}
.tool-card:hover .ico-wrap { transform: scale(1.06); }
.tool-card .ico { width: 20px; height: 20px; }
.tool-card h3 { margin: 0 0 0.25rem; }
.tool-card p { margin: 0; color: var(--muted); font-size: 0.92rem; }

.prose, .prose-block { max-width: 42rem; }
.prose p, .prose-block p, .article p { margin: 0 0 1rem; color: color-mix(in srgb, var(--ink) 88%, var(--muted)); }
.prose ul, .article ul, .prose-block ul,
.prose ol, .article ol, .prose-block ol { padding-left: 1.15rem; margin: 0 0 1rem; }
.prose li, .article li { margin: 0.25rem 0; }
.article { padding: 1.5rem 0 3.2rem; }
.article h2 { margin-top: 2.1rem; }
.article h3 { margin-top: 1.4rem; }
.article .life-banner { margin: 1.35rem 0 1.5rem; max-width: 46rem; }
.article .life-banner img { width: 100%; height: 280px; object-fit: cover; border-radius: var(--radius); display: block; }

.code-block { margin: 1.2rem 0 1.7rem; max-width: 46rem; }
.code-block figcaption {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.4rem;
}
.code-block .codebox { margin: 0; }

.detail-split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.4rem;
  align-items: start;
  margin: 1.4rem 0 1.8rem;
  max-width: 52rem;
}
.detail-split .life-frame { margin: 0; }
.detail-split .life-frame img { width: 100%; height: 240px; object-fit: cover; border-radius: var(--radius); display: block; }

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: start;
}
.note {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
}
.note ol { margin: 0; padding-left: 1.1rem; }
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
}
.stat {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
}
.stat b { display: block; font-size: 1.35rem; font-family: var(--serif); }

.faq-list { display: grid; gap: 0.55rem; max-width: 46rem; }
.faq-item {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.15rem 0.9rem 0.15rem;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 650;
  padding: 0.75rem 0;
}
.faq-item p { margin: 0 0 0.85rem; }

.related { margin: 2rem 0 3rem; }
.related-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.related-list a {
  display: grid;
  text-decoration: none;
  color: inherit;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
}
.related-list span { color: var(--muted); font-size: 0.92rem; }

.crumbs { font-size: 0.86rem; color: var(--muted); margin: 1.2rem 0 0; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.35rem; list-style: none; padding: 0; margin: 0; }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: 0.35rem; color: var(--line); }
.crumbs a { color: inherit; text-decoration: none; }

.preset-grid { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.codebox {
  background: var(--bg-mute);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem;
  overflow: auto;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.82rem;
  white-space: pre-wrap;
}
.swatches { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.swatch {
  width: 112px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-elev);
  cursor: pointer;
  text-align: left;
  padding: 0;
}
.swatch i { display: block; height: 42px; }
.swatch span { display: block; padding: 0.4rem 0.5rem; font-size: 0.78rem; font-family: ui-monospace, Consolas, monospace; }

.form { display: grid; gap: 0.8rem; max-width: 32rem; }
.form-msg { min-height: 1.3rem; }
.form-msg.is-ok { color: var(--ok); }
.form-msg.is-err { color: var(--warn); }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.inspect-table { width: 100%; border-collapse: collapse; }
.inspect-table th, .inspect-table td { text-align: left; padding: 0.45rem 0; border-bottom: 1px solid var(--line); }
.inspect-table th { color: var(--muted); font-weight: 600; width: 40%; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.4rem 0 1.4rem;
  background: var(--bg-elev);
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 1.5rem; }
.footer-brand p { color: var(--muted); max-width: 26rem; }
.footer-end { margin-top: 1.6rem; color: var(--muted); font-size: 0.88rem; }

.compare { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.8rem; }
.compare article {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
}
.compare h3 { margin-top: 0; }

mark.mark {
  background: linear-gradient(transparent 54%, var(--mark) 54%);
  color: inherit;
  padding: 0 0.14em;
  font: inherit;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
h1 mark.mark {
  background: linear-gradient(transparent 46%, var(--mark) 46%);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  animation: none;
}
[data-reveal].is-in {
  animation: rise .7s var(--ease) forwards;
}
.tool-grid[data-reveal].is-in .tool-card {
  animation: rise .55s var(--ease) both;
}
.tool-grid[data-reveal].is-in .tool-card:nth-child(1) { animation-delay: .02s; }
.tool-grid[data-reveal].is-in .tool-card:nth-child(2) { animation-delay: .06s; }
.tool-grid[data-reveal].is-in .tool-card:nth-child(3) { animation-delay: .1s; }
.tool-grid[data-reveal].is-in .tool-card:nth-child(4) { animation-delay: .14s; }
.tool-grid[data-reveal].is-in .tool-card:nth-child(5) { animation-delay: .18s; }
.tool-grid[data-reveal].is-in .tool-card:nth-child(6) { animation-delay: .22s; }
.tool-grid[data-reveal].is-in .tool-card:nth-child(7) { animation-delay: .26s; }
.tool-grid[data-reveal].is-in .tool-card:nth-child(8) { animation-delay: .3s; }

.related-list a, .stat, .faq-item, .note {
  transition: transform .25s var(--ease), border-color .25s ease, box-shadow .25s ease, background-color .35s ease;
}
.related-list a:hover, .stat:hover, .note:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  box-shadow: var(--shadow);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes ico-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@media (max-width: 960px) {
  .hero-grid, .split, .stat-row, .compare, .footer-grid, .detail-split { grid-template-columns: 1fr; }
  .nav-cols { grid-template-columns: 1fr; }
  .preview-panel.is-split .preview-split { grid-template-columns: 1fr; }
  .life-stack figure { transform: none; }
  .page-visual { max-width: none; }
}
@media (max-width: 780px) {
  .nav-toggle { display: grid; }
  .nav {
    display: none;
    position: absolute;
    inset: var(--header) 0 auto 0;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--line);
    padding: 0.8rem 1rem 1.1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
  }
  body.nav-open .nav { display: flex; }
  .nav-panel { position: static; width: 100%; box-shadow: none; }
  .result-card img, .result-card canvas { max-height: 280px; }
  h1 { font-size: 2rem; }
  .hero { padding-top: 2rem; }
  .life-film { grid-template-columns: 1fr 1fr 1fr; }
  .life-film figure:nth-child(n+4) { display: none; }
  .life-stack { grid-template-columns: 1fr 1fr; }
  .life-stack figure:nth-child(3) { grid-column: 1 / -1; }
  .life-stack figure:nth-child(3) img { height: 180px; }
  .page-visual { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero, .workspace-hero, .tool-card, .dropzone, .btn, .chip, .icon-btn, [data-reveal], .life-stack figure { transition: none; animation: none; transform: none; }
  [data-reveal] { opacity: 1; transform: none; }
  .drop-ico { animation: none; }
}
