/* style.css — English site base (sites-hq/templates/en). Palette and the one bold result card live in sites-hq/design/themes/<id>.css, appended by tools/apply-design.mjs. */
:root {
  --bg: #f5f5fa; --surface: #ffffff; --surface-2: #f8f9fb; --line: #e6e9ee; --line-2: #d5dae1;
  --text: #191f28; --text-2: #4e5968; --muted: #8b95a1;
  --brand: #5b47e0; --brand-strong: #4532c2; --brand-ink: #ffffff; --brand-soft: #f0edff; --brand-line: #ddd6ff;
  --up: #e03a3e; --up-bg: #fff0f0; --down: #2f6fe8; --down-bg: #edf3ff;
  --danger: #d92d20; --danger-bg: #fff1f0; --warn: #b54708; --warn-bg: #fff6e6; --info: #2f5fe8; --info-bg: #edf2ff; --ok: #079455; --ok-bg: #e7f8ef;
  --radius: 20px; --radius-md: 14px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .05);
  --shadow-lg: 0 2px 8px rgba(16, 24, 40, .06), 0 24px 56px rgba(16, 24, 40, .12);
  --wrap: 1080px;
  --font: var(--font-body, "Source Sans 3"), system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f17; --surface: #161a22; --surface-2: #1b2029; --line: #262c37; --line-2: #333a47;
    --text: #e9edf2; --text-2: #b7c0cc; --muted: #8893a2;
    --brand: #a796ff; --brand-strong: #c4b8ff; --brand-ink: #120d2b; --brand-soft: #221c42; --brand-line: #3a3170;
    --up: #ff8a8c; --up-bg: #3a1a1c; --down: #8fb4ff; --down-bg: #182540;
    --danger: #ff8b80; --danger-bg: #3a1b19; --warn: #f7b955; --warn-bg: #3a2b12; --info: #8fb0ff; --info-bg: #1a2440; --ok: #5bd69b; --ok-bg: #12301f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 4px 16px rgba(0, 0, 0, .25);
    --shadow-lg: 0 2px 8px rgba(0, 0, 0, .4), 0 24px 56px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 16px; line-height: 1.7; letter-spacing: -0.005em; overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-strong); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { letter-spacing: -0.03em; line-height: 1.3; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 10px; z-index: 100; background: var(--surface); color: var(--text); padding: 8px 14px; border-radius: 10px; box-shadow: var(--shadow); }
.skip:focus { left: 16px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); font-size: 0.92rem; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── 머리말 ── */
.site-header {
  position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: -0.03em; font-size: 1.05rem; min-width: 0; }
.logo:hover { color: var(--text); }
.logo-mark { width: 30px; height: 30px; flex: none; }
.logo-mark .lm-bg { fill: var(--brand); }
.logo-mark .lm-doc { fill: #fff; }
.logo-mark .lm-line { stroke: var(--brand); stroke-width: 3.6; stroke-linecap: round; fill: none; }
.logo-mark .lm-ok { fill: #12b76a; stroke: #fff; stroke-width: 3; }
.logo-mark .lm-tick { fill: none; stroke: #fff; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.logo-text { white-space: nowrap; }
.tag { font-size: 0.7rem; font-weight: 700; color: var(--text-2); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; letter-spacing: 0; white-space: nowrap; }
.nav { display: flex; gap: 2px; }
.nav a { color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 0.94rem; padding: 8px 12px; border-radius: 10px; white-space: nowrap; }
.nav a:hover { background: var(--surface); color: var(--text); }
.nav a[aria-current="page"] { color: var(--brand); background: var(--brand-soft); }
@media (max-width: 600px) {
  .nav a.nav-optional { display: none; }
  .nav a { padding: 8px 10px; font-size: 0.9rem; }
  .logo { font-size: 0.98rem; gap: 7px; }
  .logo-mark { width: 26px; height: 26px; }
}
@media (max-width: 380px) { .nav a[href="/#tool"] { display: none; } }

/* ── 버튼 ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2;
  border-radius: var(--radius-md); padding: 14px 22px; border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform .08s ease, background-color .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 30%, transparent); }
.btn-primary:hover { background: var(--brand-strong); color: var(--brand-ink); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--line-2); color: var(--text); }
.btn-sm { padding: 8px 13px; font-size: 0.9rem; border-radius: var(--radius-sm); font-weight: 600; }
.btn-block { width: 100%; }

/* ── 첫 화면 ── */
.hero { padding: 56px 0 28px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 720px; height: 720px; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 16%, transparent), transparent 70%);
}
.hero-grid { position: relative; display: grid; gap: 40px; align-items: center; }
@media (min-width: 940px) { .hero-grid { grid-template-columns: 1.08fr 0.92fr; } .hero { padding: 72px 0 40px; } }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 700; color: var(--brand); background: var(--brand-soft); border: 1px solid var(--brand-line); padding: 6px 12px; border-radius: 999px; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: #12b76a; box-shadow: 0 0 0 4px color-mix(in srgb, #12b76a 22%, transparent); }
.hero h1 { font-size: clamp(2.05rem, 6vw, 3.35rem); line-height: 1.2; letter-spacing: -0.045em; margin: 18px 0 16px; font-weight: 800; }
.hero h1 .hl { color: var(--brand); }
.lead { font-size: clamp(1.03rem, 2.4vw, 1.16rem); color: var(--text-2); margin: 0 0 26px; max-width: 33em; }
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 20px; list-style: none; padding: 0; margin: 24px 0 0; color: var(--text-2); font-size: 0.93rem; font-weight: 600; }
.trust li { display: inline-flex; align-items: center; gap: 7px; }
.trust .icon { width: 18px; height: 18px; color: var(--ok); stroke-width: 2.4; }

/* 첫 화면 오른쪽 — 검사 결과 미리보기 그림 */
.mock { position: relative; display: none; }
@media (min-width: 720px) { .mock { display: block; } }
.mock-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-lg); padding: 18px; transform: rotate(-1.2deg); }
.mock-top { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.mock-top i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.mock-top span { margin-left: 8px; font-size: 0.82rem; font-weight: 700; color: var(--muted); }
.mock-post { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: 0.9rem; color: var(--text-2); margin-bottom: 12px; line-height: 1.6; }
.mock-post b { color: var(--text); }
.mock-post mark { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); border-radius: 4px; padding: 0 3px; }
.mock-verdict { display: flex; align-items: center; gap: 8px; background: var(--danger-bg); color: var(--danger); font-weight: 800; border-radius: 12px; padding: 10px 12px; font-size: 0.95rem; margin-bottom: 10px; }
.mock-row { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-top: 1px dashed var(--line); font-size: 0.9rem; font-weight: 600; }
.mock-float {
  position: absolute; right: -6px; bottom: -18px; display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 9px 14px; box-shadow: var(--shadow-lg); font-size: 0.86rem; font-weight: 700; transform: rotate(1.5deg);
}
.mock-float .icon { width: 17px; height: 17px; color: var(--ok); stroke-width: 2.4; }

/* ── 구역·카드 ── */
.section { padding: 28px 0; }
.section-head { margin: 0 0 18px; }
.section-head h2 { font-size: clamp(1.4rem, 3.4vw, 1.75rem); margin: 0 0 6px; font-weight: 800; }
.section-head p { margin: 0; color: var(--text-2); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card h2, .card h3 { margin: 0 0 6px; font-size: 1.18rem; font-weight: 800; }
.card p { margin: 0 0 10px; }
.card-icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 14px; }
.card-icon .icon { width: 22px; height: 22px; }
.card-icon.red { background: var(--danger-bg); color: var(--danger); }
.card-icon.amber { background: var(--warn-bg); color: var(--warn); }
.card-icon.green { background: var(--ok-bg); color: var(--ok); }
.grid-2, .grid-4, .grid-3 { display: grid; gap: 14px; }
@media (max-width: 539px) {
  .feature { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; padding: 18px; }
  .feature .card-icon { grid-row: span 2; margin: 0; }
}
@media (min-width: 540px) { .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.feature p { color: var(--text-2); font-size: 0.95rem; margin: 0; }

/* ── 검사 도구 ── */
.tool { padding: 26px; border-radius: 24px; box-shadow: var(--shadow-lg); }
@media (max-width: 600px) { .tool { padding: 18px; border-radius: 20px; } }
.tool-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 18px; }
.tool-head h2 { font-size: 1.45rem; margin: 0; }
.tool-head p { margin: 0; color: var(--muted); font-size: 0.9rem; display: inline-flex; align-items: center; gap: 6px; }
.tool-head p .icon { width: 16px; height: 16px; color: var(--ok); }
.step { display: flex; align-items: center; gap: 10px; font-weight: 700; margin: 0 0 10px; padding: 0; }
.step-no { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--brand); color: var(--brand-ink); font-size: 0.8rem; font-weight: 800; flex: none; }
fieldset.chips-field { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span { display: inline-block; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.95rem; font-weight: 600; background: var(--surface-2); color: var(--text-2); transition: all .12s ease; }
.chips label:hover span { border-color: var(--line-2); color: var(--text); }
.chips input:checked + span { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 28%, transparent); }
.chips input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 20px; font-size: 0.95rem; cursor: pointer; color: var(--text-2); }
.check input, .manual input { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; border: 1.5px solid var(--line-2); border-radius: 6px; background: var(--surface); margin: 3px 0 0; flex: none; cursor: pointer; display: grid; place-items: center; transition: all .12s ease; }
.check input:checked, .manual input:checked { background: var(--brand); border-color: var(--brand); }
.check input:checked::after, .manual input:checked::after { content: ""; width: 10px; height: 6px; border: 2.5px solid var(--brand-ink); border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.editor { border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); margin-bottom: 14px; transition: border-color .12s ease, box-shadow .12s ease; }
.editor:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }
textarea {
  display: block; width: 100%; min-height: 210px; resize: vertical; padding: 16px; border: 0; border-radius: 16px 16px 0 0;
  background: transparent; color: var(--text); font: inherit; line-height: 1.7;
}
textarea:focus { outline: none; }
textarea::placeholder { color: var(--muted); }
.editor-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-top: 1px solid var(--line); }
.grow { flex: 1; }
.counter { font-size: 0.88rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.counter.over { color: var(--danger); }

/* 결과 */
#result { margin-top: 20px; }
.verdict { display: flex; align-items: flex-start; gap: 12px; border-radius: 16px; padding: 16px 18px; }
.verdict > .icon { width: 26px; height: 26px; margin-top: 1px; stroke-width: 2.2; }
.verdict-body { flex: 1; min-width: 0; }
.verdict-body strong { display: block; font-size: 1.08rem; font-weight: 800; letter-spacing: -0.02em; }
.verdict-body span { display: block; font-size: 0.92rem; opacity: 0.9; margin-top: 2px; }
.verdict-counts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.verdict.danger { background: var(--danger-bg); color: var(--danger); }
.verdict.warn { background: var(--warn-bg); color: var(--warn); }
.verdict.ok { background: var(--ok-bg); color: var(--ok); }
.findings { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.finding { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line-2); border-radius: 14px; padding: 14px 16px; }
.finding.danger { border-left-color: var(--danger); }
.finding.warn { border-left-color: var(--warn); }
.finding.info { border-left-color: var(--info); }
.finding .head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.finding .title { font-weight: 700; }
.badge { display: inline-flex; align-items: center; font-size: 0.74rem; font-weight: 800; border-radius: 999px; padding: 3px 9px; white-space: nowrap; letter-spacing: 0; }
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.plain { background: var(--surface); color: inherit; border: 1px solid currentColor; opacity: 0.85; }
.finding .match { margin: 10px 0 0; padding: 8px 12px; background: var(--surface-2); border-radius: 10px; font-size: 0.93rem; color: var(--text-2); }
.finding .detail { margin: 8px 0 0; color: var(--text-2); }
.finding .src { margin: 8px 0 0; font-size: 0.84rem; color: var(--muted); }

/* 권장 문구·직접 확인 */
.quote { position: relative; background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: 14px; padding: 16px 18px; font-weight: 700; color: var(--text); margin: 12px 0 12px; }
.copy-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.manual { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 4px; }
.manual label { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; padding: 10px 8px; border-radius: 12px; }
.manual label:hover { background: var(--surface-2); }
.manual .why { display: block; color: var(--muted); font-size: 0.88rem; margin-top: 2px; }
.manual input:checked + span > span:first-child { text-decoration: line-through; text-decoration-color: var(--muted); color: var(--text-2); }

/* 표 */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; margin: 12px 0; background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 0.93rem; }
th, td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
tr:last-child > * { border-bottom: 0; }
thead th { background: var(--surface-2); font-size: 0.85rem; color: var(--text-2); font-weight: 700; }
tbody th { text-align: center; width: 56px; }
.grade { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; font-weight: 800; }
.grade.a { background: var(--danger-bg); color: var(--danger); }
.grade.b { background: var(--warn-bg); color: var(--warn); }
.grade.c { background: var(--danger); color: var(--surface); }
table.compact { min-width: 0; }
table.compact td:first-child { white-space: nowrap; font-weight: 700; }

/* 자주 걸리는 다섯 가지 */
.reasons { list-style: none; counter-reset: r; padding: 0; margin: 0; display: grid; gap: 12px; }
@media (min-width: 820px) { .reasons { grid-template-columns: 1fr 1fr; } .reasons li:last-child { grid-column: 1 / -1; } }
.reasons li { counter-increment: r; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 18px 18px 62px; box-shadow: var(--shadow); color: var(--text-2); }
.reasons li::before { content: counter(r); position: absolute; left: 18px; top: 18px; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 800; }
.reasons strong { display: block; color: var(--text); margin-bottom: 2px; }

/* 주제 카드 */
.topic-grid { display: grid; gap: 12px; }
@media (min-width: 720px) { .topic-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .topic-grid { grid-template-columns: repeat(3, 1fr); } }
.topic { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease; }
.topic:hover { transform: translateY(-2px); border-color: var(--brand-line); box-shadow: var(--shadow-lg); color: var(--text); }
.topic .card-icon { margin-bottom: 8px; }
.topic strong { font-size: 1.05rem; letter-spacing: -0.02em; }
.topic .topic-desc { color: var(--text-2); font-size: 0.92rem; }
.topic em { margin-top: auto; padding-top: 8px; font-style: normal; font-weight: 700; font-size: 0.9rem; color: var(--brand); }

/* ── 글 페이지 ── */
.prose { max-width: 760px; margin: 0 auto; padding: 28px 20px 56px; }
.crumb { margin: 8px 0 0; font-size: 0.9rem; color: var(--muted); }
.crumb a { color: var(--text-2); text-decoration: none; font-weight: 600; }
.crumb a:hover { color: var(--brand); }
.prose h1 { font-size: clamp(1.85rem, 5.4vw, 2.6rem); line-height: 1.25; letter-spacing: -0.04em; margin: 12px 0 12px; font-weight: 800; }
.prose h1 + .muted { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.9rem; color: var(--text-2); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin: 0 0 8px; }
.prose h2 { font-size: clamp(1.22rem, 3vw, 1.42rem); margin: 48px 0 14px; font-weight: 800; padding-top: 4px; }
.prose h2::before { content: ""; display: block; width: 28px; height: 4px; border-radius: 4px; background: var(--brand); margin-bottom: 12px; }
.prose .card h2::before, .prose .summary h2::before { display: none; }
.prose p, .prose li { margin: 0 0 12px; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li::marker { color: var(--brand); }
.prose strong { font-weight: 700; }
.prose .src { font-size: 0.85rem; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 14px 0 0; line-height: 1.8; }
.prose .src a { color: var(--text-2); }
.prose .src a:hover { color: var(--brand); }
.prose code { font-size: 0.88em; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; word-break: break-all; }
.summary { background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: var(--radius); padding: 20px 22px 10px; margin: 20px 0 12px; }
.summary > strong:first-child { display: flex; align-items: center; gap: 8px; color: var(--brand); font-weight: 800; margin-bottom: 10px; }
.summary > strong:first-child::before { content: ""; width: 20px; height: 20px; flex: none; background: currentColor; -webkit-mask: var(--i-bolt) center / contain no-repeat; mask: var(--i-bolt) center / contain no-repeat; }
.summary ul { margin: 0; }
.summary li { margin-bottom: 10px; }
:root { --i-bolt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13 2 4 14h7l-1 8 9-12h-7z'/%3E%3C/svg%3E"); }
.example { margin: 0 0 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; box-shadow: var(--shadow); }
.example figcaption { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 800; border-radius: 999px; padding: 3px 10px; margin-bottom: 12px; }
.example.good figcaption { background: var(--ok-bg); color: var(--ok); }
.example.bad figcaption { background: var(--danger-bg); color: var(--danger); }
.example.good figcaption::before { content: "✓"; }
.example.bad figcaption::before { content: "✕"; }
.example pre { margin: 0; white-space: pre-wrap; font: inherit; font-size: 0.95rem; line-height: 1.7; color: var(--text); padding-left: 52px; position: relative; min-height: 40px; }
.example pre::before { content: ""; position: absolute; left: 0; top: 2px; width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--brand-line), var(--brand)); }
.faq { margin: 0; display: grid; gap: 10px; }
.faq dt { font-weight: 700; background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: 14px 14px 0 0; padding: 14px 16px 4px 50px; position: relative; margin-top: 4px; }
.faq dt::before { content: "Q"; position: absolute; left: 16px; top: 13px; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); font-size: 0.8rem; font-weight: 800; }
.faq dd { margin: -10px 0 0; background: var(--surface); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 14px 14px; padding: 4px 16px 14px 50px; color: var(--text-2); }
.prose .card.soft {
  margin-top: 40px; border: 0; color: #fff; border-radius: 22px; padding: 26px;
  background: radial-gradient(120% 140% at 100% 0%, #8f7dff 0%, transparent 55%), linear-gradient(135deg, #5b47e0, #3d2bb0);
  box-shadow: 0 18px 40px color-mix(in srgb, #5b47e0 30%, transparent);
}
.prose .card.soft h2 { color: #fff; margin: 0 0 8px; font-size: 1.3rem; }
.prose .card.soft p { color: rgba(255, 255, 255, .88); }
.prose .card.soft a { display: inline-flex; align-items: center; gap: 6px; background: #fff; color: #3d2bb0; font-weight: 800; text-decoration: none; padding: 11px 18px; border-radius: 12px; margin-top: 4px; }
.prose .card.soft a:hover { background: #eef2ff; }
.topics { list-style: none; padding: 0 !important; margin: 0 0 10px; display: grid; gap: 10px; }
@media (min-width: 640px) { .prose .topics { grid-template-columns: 1fr 1fr; } }
.topics li { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; color: var(--text-2); font-size: 0.93rem; transition: border-color .12s ease, transform .12s ease; }
.topics li:hover { border-color: var(--brand-line); transform: translateY(-1px); }
.topics li::marker { content: ""; }
.topics a { font-weight: 700; text-decoration: none; color: var(--text); font-size: 1rem; }
.topics a::after { content: " →"; color: var(--brand); }
.summary .topics { grid-template-columns: 1fr; }
.summary .topics li { background: var(--surface); }

/* ── 꼬리말 ── */
.site-footer { margin-top: 48px; border-top: 1px solid var(--line); background: var(--surface); }
.footer-grid { display: grid; gap: 28px; padding-top: 36px; padding-bottom: 24px; }
@media (min-width: 820px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; } }
.footer-about p { color: var(--muted); font-size: 0.88rem; margin: 12px 0 0; max-width: 36em; }
.footer-links { display: flex; flex-direction: column; gap: 6px; font-size: 0.92rem; }
.footer-links strong { font-size: 0.85rem; color: var(--text); margin-bottom: 4px; }
.footer-links a { color: var(--text-2); text-decoration: none; }
.footer-links a:hover { color: var(--brand); }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 16px; padding-bottom: 28px; color: var(--muted); font-size: 0.84rem; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* ── 물타기 계산기 ── */
.calc-hero { padding: 36px 0 10px; position: relative; }
.calc-hero h1 { font-size: clamp(2rem, 6vw, 2.9rem); line-height: 1.2; letter-spacing: -0.045em; margin: 14px 0 10px; font-weight: 800; }
.calc-hero h1 .hl { color: var(--brand); }
.calc-hero .lead { margin-bottom: 0; }
.calc { display: grid; gap: 16px; align-items: start; }
@media (min-width: 940px) { .calc { grid-template-columns: 1.12fr 0.88fr; } .calc-result { position: sticky; top: 84px; } }
.calc-input { padding: 22px; border-radius: 24px; }
@media (max-width: 600px) { .calc-input { padding: 16px; border-radius: 20px; } }
.tabs { display: flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 4px; gap: 4px; margin-bottom: 16px; }
.tabs button { flex: 1; border: 0; background: transparent; font: inherit; font-weight: 700; color: var(--text-2); padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.tabs button:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.group { border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin: 0 0 12px; background: var(--surface); }
.group-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 800; font-size: 0.98rem; margin: 0 0 12px; }
.group-title small { font-weight: 600; color: var(--muted); font-size: 0.82rem; }
.fields { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.field { min-width: 0; }
.field label { display: block; font-size: 0.84rem; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); padding: 0 12px; transition: border-color .12s ease, box-shadow .12s ease, background-color .12s ease; }
.input:focus-within { border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }
.input input { flex: 1; min-width: 0; width: 100%; border: 0; background: transparent; font: inherit; font-size: 1.05rem; font-weight: 600; padding: 11px 0; color: var(--text); font-variant-numeric: tabular-nums; }
.input input:focus { outline: none; }
.input input::placeholder { color: var(--muted); font-weight: 500; }
.input .unit { color: var(--muted); font-size: 0.88rem; font-weight: 600; margin-left: 6px; white-space: nowrap; }
.buy-row { display: grid; grid-template-columns: 1fr 1fr 1fr 44px; gap: 8px; align-items: end; padding: 12px 0 0; margin-top: 12px; border-top: 1px dashed var(--line); }
.buy-row:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.buy-row .row-no { grid-column: 1 / -1; font-size: 0.8rem; font-weight: 800; color: var(--brand); margin-bottom: -2px; }
@media (max-width: 560px) { .buy-row { grid-template-columns: 1fr 1fr; } .buy-row .field-amount { grid-column: 1 / 2; } .buy-row .remove { justify-self: end; } }
.remove { width: 44px; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.remove:hover { color: var(--up); border-color: var(--line-2); }
.remove .icon { width: 18px; height: 18px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.settings { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 14px; }
.settings .chips span { padding: 7px 14px; font-size: 0.9rem; }
details.more { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 12px; }
details.more summary { cursor: pointer; font-weight: 700; color: var(--text-2); font-size: 0.92rem; }
details.more .fields { margin-top: 12px; }
.hint { font-size: 0.82rem; color: var(--muted); margin: 8px 0 0; }

.calc-result { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 22px; box-shadow: var(--shadow-lg); }
.result-label { font-size: 0.9rem; font-weight: 700; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.result-big { font-size: clamp(2.1rem, 6.5vw, 2.7rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1.15; margin: 6px 0 8px; font-variant-numeric: tabular-nums; overflow-wrap: break-word; }
.result-big small { font-size: 0.5em; font-weight: 700; color: var(--text-2); margin-left: 4px; letter-spacing: 0; }
.delta { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 0.92rem; padding: 4px 10px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.delta.down { color: var(--down); background: var(--down-bg); }
.delta.up { color: var(--up); background: var(--up-bg); }
.delta.flat { color: var(--text-2); background: var(--surface-2); }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.stat { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.stat span { display: block; font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.stat strong { display: block; font-size: 1.06rem; font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; overflow-wrap: break-word; }
.stat.up strong { color: var(--up); }
.stat.down strong { color: var(--down); }
.stat.wide { grid-column: 1 / -1; }
.compare { margin-top: 16px; display: grid; gap: 8px; }
.compare-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: 14px; padding: 12px 14px; font-size: 0.94rem; }
.compare-row b { font-variant-numeric: tabular-nums; }
.compare-row .arrow { color: var(--brand); font-weight: 800; }
.empty { text-align: center; color: var(--muted); padding: 26px 8px 18px; }
.empty .icon { width: 34px; height: 34px; margin: 0 auto 10px; color: var(--brand); display: block; }
.warn-box { background: var(--warn-bg); color: var(--warn); border-radius: 14px; padding: 12px 14px; font-weight: 600; font-size: 0.93rem; margin-top: 12px; }
.result-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; align-items: center; }
.note { font-size: 0.8rem; color: var(--muted); margin: 14px 0 0; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); color: var(--text-2); }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font-weight: 800; margin-bottom: 10px; }
.steps strong { display: block; color: var(--text); margin-bottom: 2px; }
.formula { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; font-weight: 700; text-align: center; font-size: 1.02rem; margin: 12px 0; box-shadow: var(--shadow); }
.formula small { display: block; font-weight: 500; color: var(--muted); font-size: 0.85rem; margin-top: 6px; }
.logo-mark .lm-drop { fill: #fff; }
.logo-mark .lm-wave { fill: none; stroke: var(--brand); stroke-width: 3.2; stroke-linecap: round; }

/* family-links: 꼬리말 4칸 */
@media (min-width: 820px) { .footer-grid { grid-template-columns: 1.4fr repeat(3, 1fr); } }

/* design-v2 */
/* design-v2 · base — 조용한 틀. 입력·표·글은 담백하게 두고, 힘은 결과 카드(사이트별 서식) 한 곳에만 쓴다.
   sites-hq/tools/apply-design.mjs 가 각 사이트 style.css 끝의 design-v2 표시 사이에 넣는다. 여기서 고치고 다시 돌린다. */
:root { --radius: 14px; --radius-md: 12px; --radius-sm: 10px; --shadow: none; --shadow-lg: none; }

/* 첫 화면: 한 단어 색 강조·알약 라벨·점 장식을 걷어 낸다 */
.hero::before { display: none; }
.hero h1 .hl, .calc-hero h1 .hl { color: inherit; }
.eyebrow { display: block; background: none; border: 0; padding: 0; border-radius: 0; color: var(--text-2); font-weight: 600; font-size: 0.92rem; }
.eyebrow .dot { display: none; }
.calc-hero { padding: 44px 0 14px; }
.calc-hero h1 { font-size: clamp(2.05rem, 6.2vw, 3.1rem); line-height: 1.16; letter-spacing: -0.055em; margin: 10px 0 12px; }
.lead { max-width: 30em; }
.crumb { font-size: 0.88rem; }
.hero-split { display: grid; gap: 28px; align-items: end; }
@media (min-width: 900px) { .hero-split { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 48px; } }
.hero-split .lead { margin-bottom: 0; }

/* 계산기 목록: 똑같은 카드 대신 줄로 나뉜 색인 */
.topic-grid { display: block; border-top: 1px solid var(--text); }
@media (min-width: 760px) { .topic-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 44px; } }
.topic { display: block; background: none; border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0; padding: 16px 2px 15px; box-shadow: none; transform: none; color: var(--text); }
.topic:hover { transform: none; box-shadow: none; border-color: var(--line-2); }
.topic .card-icon, .topic em { display: none; }
.topic strong { display: block; font-size: 1.1rem; letter-spacing: -0.03em; }
.topic .topic-desc { display: block; margin-top: 3px; font-size: 0.92rem; line-height: 1.55; }
.topic:hover strong, .topic:focus-visible strong { color: var(--brand-strong); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }

/* 입력: 카드 안의 카드를 없애고 묶음만 남긴다 */
.calc-input.card { background: none; border: 0; box-shadow: none; padding: 0; border-radius: 0; }
.group { border-radius: var(--radius); border-color: var(--line-2); }
.chips input:checked + span { box-shadow: none; }
.btn-primary { box-shadow: none; }
.tabs button[aria-selected="true"] { box-shadow: 0 0 0 1px var(--line-2); }

/* 결과: 사이트별 서식이 덮어쓰기 전의 공통 바탕 — 서식의 ::before/::after 가 붙도록 늘 위치 지정 요소로 둔다 */
.calc-result { box-shadow: none; position: relative; }
@media (min-width: 940px) { .calc-result { position: sticky; } }
.calc > #result { margin-top: 0; }
.delta { background: none !important; padding: 0; border-radius: 0; font-weight: 700; font-size: 0.95rem; }
.delta.flat { color: var(--text-2); }

/* 설명 구역 */
.steps li { background: none; border: 0; border-top: 2px solid var(--text); border-radius: 0; padding: 14px 0 0; box-shadow: none; }
.steps li::before { width: auto; height: auto; background: none; border-radius: 0; color: var(--muted); font-size: 0.85rem; justify-content: start; margin-bottom: 4px; }
.formula { box-shadow: none; text-align: left; }
.faq { gap: 0; border-top: 1px solid var(--text); }
.faq dt { background: none; border: 0; border-radius: 0; padding: 16px 0 4px; margin: 0; }
.faq dt::before { display: none; }
.faq dd { background: none; border: 0; border-radius: 0; margin: 0; padding: 0 0 16px; border-bottom: 1px solid var(--line-2); }
.prose h2::before { display: none; }
.prose h1 + .muted { display: block; background: none; border: 0; padding: 0; border-radius: 0; }
.mock-card, .mock-float { box-shadow: 0 1px 0 var(--line-2); }
.table-wrap { border-radius: 10px; }

/* design-v2 · English overrides — Latin type wants far less negative tracking than Hangul, and numbers must never split. */
body { letter-spacing: 0; }
h1, h2, h3, .logo, .topic strong, .verdict-body strong { letter-spacing: -0.01em; }
.hero h1, .calc-hero h1, .prose h1 { letter-spacing: -0.02em; }
.calc-hero h1 { line-height: 1.1; }
.result-big { letter-spacing: -0.02em; }
.stat strong, .result-big, .delta { overflow-wrap: normal; }
.stat strong { white-space: nowrap; }

/* family-links-en: calculators and games stacked in one footer column */
.footer-family { display: grid; gap: 22px; align-content: start; }

/* design-v2 · Ice Crush — the game canvas is the hero: a dark slate tray under a cold light, with ice standing on it.
   Everything around it stays quiet and pale. Fredoka (rounded) only for the h1 and section heads; Figtree for the rest.
   Tools sit on a rack right under the tray. */
:root {
  --font-body: "Figtree";
  --font-display: "Fredoka";
  --bg: #eef4f7; --surface: #ffffff; --surface-2: #e3edf2; --text: #0f2230; --text-2: #3a5060; --muted: #566b79;
  --line: #d6e3ea; --line-2: #bcd0db;
  --brand: #0b6f99; --brand-strong: #075a7e; --brand-ink: #ffffff; --brand-soft: #dcf0f8; --brand-line: #a6d2e6;
  --danger: #b42318;
  --mat: #1a2731; --mat-edge: #2f4351; --rack: #dde9ef; --rack-edge: #c4d6e0;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1418; --surface: #131f26; --surface-2: #1a2a33; --text: #e8f2f7; --text-2: #b9cbd5; --muted: #93a8b5;
    --line: #22333d; --line-2: #31495a;
    --brand: #5cc8f2; --brand-strong: #8fdaf7; --brand-ink: #04202d; --brand-soft: #12303d; --brand-line: #2a5d73;
    --danger: #ff8b80;
    --mat: #0d151b; --mat-edge: #26394a; --rack: #16242c; --rack-edge: #2a3e4b;
  }
}
:root[data-theme="dark"] {
  --bg: #0c1418; --surface: #131f26; --surface-2: #1a2a33; --text: #e8f2f7; --text-2: #b9cbd5; --muted: #93a8b5;
  --line: #22333d; --line-2: #31495a;
  --brand: #5cc8f2; --brand-strong: #8fdaf7; --brand-ink: #04202d; --brand-soft: #12303d; --brand-line: #2a5d73;
  --mat: #0d151b; --mat-edge: #26394a; --rack: #16242c; --rack-edge: #2a3e4b;
}
body { background: var(--bg); color: var(--text); }

/* frame */
a { color: var(--brand-strong); }
a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--brand-strong); }
.logo-mark .lm-bg { fill: var(--brand); }
.logo-mark .lm-fg { fill: none; stroke: #fff; stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-mark .lm-fg { stroke: #04202d; } }
.calc-hero h1, .prose h1, .section-head h2, .prose h2, .play-intro h1 { font-family: var(--font-display), var(--font); font-weight: 600; letter-spacing: -0.01em; }
.prose h2, .section-head h2 { font-weight: 500; }

/* play area: the tray comes first */
.play { padding: 14px 0 30px; margin-bottom: 8px; }
.play-stage { display: grid; gap: 12px; grid-template-areas: "intro" "col" "side"; }
.play-intro { grid-area: intro; }
.play-col { grid-area: col; min-width: 0; }
.play-side { grid-area: side; min-width: 0; }
.play-intro h1 { font-size: clamp(1.6rem, 6.4vw, 2.6rem); line-height: 1.08; margin: 0 0 4px; }
.play-intro .lead { margin: 0; font-size: 1rem; color: var(--text-2); max-width: 34em; }
@media (min-width: 900px) {
  .play { padding: 28px 0 40px; }
  .play-stage { grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.75fr); grid-template-areas: "col intro" "col side"; grid-template-rows: auto 1fr; column-gap: 36px; row-gap: 16px; }
  .play-intro { padding-top: 4px; }
}

/* the tray (signature): dark slate, a frosty inner edge */
.mat { position: relative; height: clamp(400px, min(124vw, 62svh), 620px); border-radius: 22px; overflow: hidden; background: var(--mat); border: 1px solid var(--mat-edge);
  box-shadow: inset 0 0 0 3px rgba(220, 240, 252, 0.06); user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
@media (min-width: 900px) { .mat { height: clamp(480px, 70vh, 640px); } }
.mat canvas { display: block; width: 100%; height: 100%; touch-action: none; -webkit-tap-highlight-color: transparent; cursor: crosshair; }
.mat canvas#game { position: relative; z-index: 1; }
.mat .mat-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.mat .ice-label, .mat .tap-hint, .mat .mat-actions, .mat .debug { z-index: 2; }
.mat canvas:focus { outline: none; }
.mat canvas:focus-visible { outline: 3px solid #8fdaf7; outline-offset: -5px; border-radius: 22px; }
.ice-label { position: absolute; left: 12px; top: 12px; margin: 0; max-width: calc(100% - 120px); padding: 5px 12px; border-radius: 999px; background: rgba(12, 22, 28, 0.62); color: #eaf6fc; font-weight: 600; font-size: 0.88rem; pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tap-hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); margin: 0; padding: 6px 14px; border-radius: 999px; background: rgba(12, 22, 28, 0.6); color: #eaf6fc; font-size: 0.86rem; font-weight: 600; pointer-events: none; white-space: nowrap; }
.mat-actions { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
.mat-btn { pointer-events: auto; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(240, 248, 252, 0.94); color: #0f2230; font: inherit; font-weight: 700; font-size: 0.95rem; cursor: pointer; }
.mat-btn[hidden], .temp-ctl[hidden] { display: none; }
.mat-btn:focus-visible, .temp-ctl button:focus-visible { outline: 3px solid #8fdaf7; outline-offset: 2px; }
.temp-ctl { pointer-events: auto; display: flex; flex-direction: column; border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(12, 22, 28, 0.66); overflow: hidden; }
.temp-ctl button { min-height: 44px; min-width: 76px; padding: 0 12px; border: 0; background: none; font: inherit; font-size: 0.84rem; font-weight: 700; color: #cfe3ee; cursor: pointer; }
.temp-ctl button + button { border-top: 1px solid rgba(255, 255, 255, 0.12); }
.temp-ctl button[aria-pressed="true"] { background: #dcf0f8; color: #0b3550; }
.debug { position: absolute; left: 12px; bottom: 12px; margin: 0; padding: 2px 8px; border-radius: 6px; background: rgba(0, 0, 0, 0.55); color: #fff; font: 12px/1.5 ui-monospace, Consolas, monospace; pointer-events: none; }
.status { min-height: 3.1em; margin: 10px 2px 0; color: var(--text-2); font-weight: 500; font-size: 0.97rem; line-height: 1.5; }

/* the tool rack */
.toolbar { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; margin-top: 10px; padding: 6px; border-radius: 16px; background: var(--rack); border: 1px solid var(--rack-edge); }
@media (min-width: 560px) { .toolbar { grid-template-columns: repeat(11, minmax(0, 1fr)); } }
.toolbar[hidden] { display: none; }
.tool-btn { display: grid; justify-items: center; align-content: center; gap: 1px; min-height: 56px; padding: 6px 1px 4px; border-radius: 12px; border: 1px solid transparent; background: transparent; color: var(--text-2); font: inherit; font-size: 0.68rem; font-weight: 700; line-height: 1.15; cursor: pointer; }
.tool-btn svg { width: 26px; height: 26px; }
.tool-btn span { max-width: 100%; overflow-wrap: anywhere; text-align: center; }
.tool-btn:hover { background: var(--surface); }
.tool-btn[aria-pressed="true"] { background: var(--surface); border-color: var(--brand-line); color: var(--brand-strong); box-shadow: inset 0 -3px 0 var(--brand); }
.tool-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.tool-btn:focus-visible { outline: 3px solid var(--brand); outline-offset: 1px; }

/* mode panels under the tray */
.panel { margin-top: 10px; padding: 10px 12px 12px; border-radius: 16px; background: var(--rack); border: 1px solid var(--rack-edge); }
.panel[hidden] { display: none; }
.panel-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 8px; }
.panel-row:last-child { margin-bottom: 0; }
.panel-row[hidden] { display: none; }
.panel-label { flex: 0 0 100%; margin: 2px 0 0; font-size: 0.8rem; font-weight: 700; color: var(--text-2); }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.chip i { width: 16px; height: 16px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18); }
.chip[aria-pressed="true"] { border: 2px solid var(--brand-strong); color: var(--text); background: var(--brand-soft); }
.chip:disabled { opacity: 0.45; cursor: not-allowed; }
.chip:focus-visible { outline: 3px solid var(--brand); outline-offset: 1px; }
.panel .btn { min-height: 44px; }
.panel .btn[hidden] { display: none; }
.panel-note { margin: 0; font-size: 0.86rem; color: var(--muted); }
.meter { flex: 1 1 140px; height: 12px; border-radius: 999px; background: color-mix(in srgb, var(--text) 12%, transparent); overflow: hidden; }
.meter::before { content: ""; display: block; height: 100%; width: var(--v, 0%); background: var(--brand); border-radius: inherit; }
.cmp-out { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.cmp-out li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; font-size: 0.9rem; color: var(--text-2); }
.cmp-out strong { color: var(--text); }
.cmp-bar { grid-column: 1 / -1; display: block; height: 10px; border-radius: 999px; background: color-mix(in srgb, var(--text) 10%, transparent); overflow: hidden; }
.cmp-bar i { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.cmp-db { grid-column: 1 / -1; font-size: 0.8rem; }

/* side controls */
.modes { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.mode-btn { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); font: inherit; font-weight: 700; font-size: 0.9rem; cursor: pointer; }
.mode-btn[aria-pressed="true"] { border: 2px solid var(--brand-strong); background: var(--brand-soft); color: var(--text); }
.mode-btn:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.play-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; margin: 0 0 12px; }
.play-actions .btn { min-height: 48px; }
.play-actions .btn-primary { min-width: 130px; font-size: 1.02rem; }
.picker { position: relative; }
.picker summary { list-style: none; display: inline-flex; align-items: center; min-height: 48px; cursor: pointer; }
.picker summary::-webkit-details-marker { display: none; }
.picker-list { position: absolute; z-index: 20; left: 0; top: calc(100% + 6px); width: min(330px, calc(100vw - 32px)); max-height: 420px; overflow-y: auto; padding: 6px 8px 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 14px 40px rgba(10, 30, 45, 0.22); }
@media (max-width: 899px) { .picker-list { position: fixed; left: 16px; right: 16px; top: auto; bottom: 16px; width: auto; max-height: 60vh; } }
.picker-group { margin: 10px 4px 4px; font-size: 0.8rem; font-weight: 700; color: var(--muted); }
.pick-btn { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 8px; border: 0; border-radius: 10px; background: none; color: var(--text); font: inherit; font-size: 0.93rem; text-align: left; cursor: pointer; }
.pick-btn:hover, .pick-btn:focus-visible { background: var(--brand-soft); outline: none; }
.pick-btn i { flex: none; width: 18px; height: 18px; border-radius: 5px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2); }
.share-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 4px; }
.share-row .btn { min-height: 44px; }
.share-msg { min-height: 1.4em; margin: 2px 0 12px; overflow-wrap: anywhere; }
.settings-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.toggle { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 0 15px 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); font: inherit; font-weight: 600; font-size: 0.93rem; cursor: pointer; }
.toggle::before { content: ""; flex: none; width: 30px; height: 18px; border-radius: 999px; background: radial-gradient(circle at 9px 9px, var(--surface) 0 6px, transparent 6.5px), var(--line-2); }
.toggle[aria-pressed="true"] { color: var(--text); border-color: var(--brand-line); background: var(--brand-soft); }
.toggle[aria-pressed="true"]::before { background: radial-gradient(circle at 21px 9px, #fff 0 6px, transparent 6.5px), var(--brand); }
.toggle:disabled { opacity: 0.55; cursor: not-allowed; }
.side-note { margin: 10px 0 0; font-size: 0.9rem; color: var(--muted); }
.side-note[hidden] { display: none; }
.link-btn { border: 0; padding: 0; margin: 0; background: none; font: inherit; color: var(--brand-strong); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 44px; }
.link-btn:hover { color: var(--text); }
.streak-box { margin: 0 0 16px; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.streak-num { margin: 0 0 8px; color: var(--text-2); font-weight: 600; }
.streak-num strong { font-family: var(--font-display), var(--font); font-weight: 600; font-size: 2rem; color: var(--text); line-height: 1; }
.week { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.week li { display: grid; justify-items: center; gap: 2px; min-width: 30px; font-size: 0.78rem; color: var(--muted); }
.week .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); }
.week li.done .dot { background: var(--brand); border-color: var(--brand); }
.week li.today .wd { color: var(--text); font-weight: 700; }

/* text sections */
.narrow { max-width: 760px; }
.howto-section { padding-top: 28px; }
.howto { list-style: none; counter-reset: step; margin: 20px 0 0; padding: 0; border-top: 1px solid var(--line-2); }
.howto li { counter-increment: step; display: grid; grid-template-columns: 26px 1fr; gap: 4px; padding: 11px 0; border-bottom: 1px solid var(--line); color: var(--text-2); line-height: 1.55; }
.howto li::before { content: counter(step); font-family: var(--font-display), var(--font); font-weight: 600; color: var(--brand-strong); }
.howto strong { color: var(--text); }
.keys { margin: 14px 0 0; font-size: 0.9rem; color: var(--muted); }
.kbd { font: inherit; font-size: 0.85em; font-weight: 700; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; padding: 0 6px; background: var(--surface); color: var(--text-2); white-space: nowrap; }
.safety-note { margin: 14px 0 0; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); font-size: 0.9rem; color: var(--text-2); }
.safety-note strong { color: var(--text); }
.prose-lite p { color: var(--text-2); max-width: 42em; }
.about-ice p { color: var(--text-2); max-width: 40em; }

/* gallery and item pages */
.ice-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; margin-bottom: 4px; }
.ice-jump a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-weight: 700; font-size: 0.86rem; text-decoration: none; }
.ice-jump a:hover { border-color: var(--brand); }
.ice-group { scroll-margin-top: 80px; }
.ice-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.ice-card { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 14px; align-items: center; padding: 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; min-height: 112px; }
.ice-card:hover { border-color: var(--brand-line); }
.ice-card svg { display: block; width: 92px; height: 92px; border-radius: 12px; }
.ice-card strong { display: block; font-size: 1.04rem; }
.ice-card span span { display: block; color: var(--muted); font-size: 0.88rem; line-height: 1.45; }
.ice-detail { display: grid; gap: 22px; align-items: start; }
@media (min-width: 760px) { .ice-detail { grid-template-columns: 200px minmax(0, 1fr); gap: 40px; } }
.ice-art svg { display: block; width: 180px; height: 180px; border-radius: 18px; }
.ice-text p { color: var(--text-2); max-width: 40em; }
.facts { margin: 12px 0 16px; display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; }
.facts dt { font-weight: 700; color: var(--text); }
.facts dd { margin: 0; color: var(--text-2); }

/* the freezer */
.coll-tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin: 0 0 8px; }
.coll-tools[hidden], .coll-empty[hidden] { display: none; }
.coll-tools .muted { margin: 0; }
.coll-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.coll-empty { padding: 22px 0 8px; color: var(--text-2); }
.coll-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.coll-item { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 8px 14px; align-items: center; padding: 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.coll-thumb { width: 84px; height: 84px; border-radius: 12px; overflow: hidden; background: var(--mat); }
.coll-thumb img, .coll-thumb canvas { display: block; width: 100%; height: 100%; object-fit: cover; }
.coll-text { display: grid; min-width: 0; }
.coll-text strong { font-size: 1rem; }
.coll-text span { color: var(--muted); font-size: 0.88rem; }
.coll-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linejoin: round; }
.icon-btn.star[aria-pressed="true"] svg { fill: #f5b301; stroke: #b98700; }
.icon-btn:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.badges { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.badge-item { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; border: 1px dashed var(--line-2); color: var(--muted); }
.badge-item strong { color: var(--text-2); }
.badge-item span { font-size: 0.9rem; }
.badge-item em { font-style: normal; font-size: 0.82rem; }
.badge-item.got { border: 1px solid var(--brand-line); background: var(--brand-soft); color: var(--text-2); }
.badge-item.got strong { color: var(--text); }
.badge-item.got em { color: var(--brand-strong); font-weight: 700; }
.coll-section .btn-sm, .coll-actions .btn { min-height: 44px; }

/* phones: show every menu item as a second, swipeable row */
@media (max-width: 600px) {
  .header-inner { flex-wrap: wrap; height: auto; padding-top: 10px; row-gap: 0; }
  .site-header .nav { order: 2; width: 100%; overflow-x: auto; scrollbar-width: none; margin: 0 -10px; padding: 2px 0 8px; }
  .site-header .nav::-webkit-scrollbar { display: none; }
  .nav a.nav-optional { display: inline-block; }
  .nav a { padding: 7px 10px; font-size: 0.88rem; }
}
/* /design-v2 */
