:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --line: #e6e8ec;
  --line-strong: #d5d9e0;
  --fg: #15181e;
  --muted: #646b78;
  --faint: #9aa1ad;
  --accent: #2f5bd8;
  --accent-soft: #eaf0fd;

  --ok-bg: #e5f4ea;    --ok-fg: #23794a;
  --warn-bg: #fdf1dc;  --warn-fg: #a06a0a;
  --skin-bg: #eef0f3;  --skin-fg: #48505d;
  --front-bg: #e7effd; --front-fg: #2c58c9;
  --admin-bg: #fbeee4; --admin-fg: #b0561b;
  --new-bg: #ffe9e3;   --new-fg: #cf4520;
  --no-bg: #fff4f3;    --no-line: #f6d4d0; --no-fg: #b4322a;

  --radius: 12px;
  --font: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111317; --surface: #191c22; --line: #262a32; --line-strong: #323743;
    --fg: #eceef2; --muted: #a0a7b4; --faint: #6f7684;
    --accent: #7e9cf5; --accent-soft: #1d2640;
    --ok-bg: #16301f;    --ok-fg: #7fd3a0;
    --warn-bg: #36290f;  --warn-fg: #f0c068;
    --skin-bg: #252930;  --skin-fg: #c4cad4;
    --front-bg: #1b2744; --front-fg: #9db6f7;
    --admin-bg: #3a2516; --admin-fg: #f1a46e;
    --new-bg: #40211a;   --new-fg: #ff9d80;
    --no-bg: #2a1716;    --no-line: #4a2421; --no-fg: #f19a92;
    color-scheme: dark;
  }
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] {
  --bg: #111317; --surface: #191c22; --line: #262a32; --line-strong: #323743;
  --fg: #eceef2; --muted: #a0a7b4; --faint: #6f7684;
  --accent: #7e9cf5; --accent-soft: #1d2640;
  --ok-bg: #16301f;    --ok-fg: #7fd3a0;
  --warn-bg: #36290f;  --warn-fg: #f0c068;
  --skin-bg: #252930;  --skin-fg: #c4cad4;
  --front-bg: #1b2744; --front-fg: #9db6f7;
  --admin-bg: #3a2516; --admin-fg: #f1a46e;
  --new-bg: #40211a;   --new-fg: #ff9d80;
  --no-bg: #2a1716;    --no-line: #4a2421; --no-fg: #f19a92;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.container { max-width: 1080px; margin: 0 auto; padding-inline: 20px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }

/* ── 상단 ── */
.hero { background: var(--surface); border-bottom: 1px solid var(--line); padding-block: 48px 32px; }
.eyebrow { margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .12em; color: var(--accent); }
.hero h1 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; letter-spacing: -.02em; }
.lead { margin: 10px 0 0; color: var(--muted); max-width: 60ch; }
.hero-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hero-link { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--fg); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.hero-link:hover { border-color: var(--accent); color: var(--accent); }
.stats { display: flex; flex-wrap: wrap; gap: 10px 32px; margin: 28px 0 0; }
.stats div { display: grid; gap: 2px; }
.stats dt { font-size: 12.5px; color: var(--muted); }
.stats dd { margin: 0; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* ── 필터 바 ── */
.toolbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.toolbar-inner { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; padding-block: 12px; }
.search {
  flex: 1 1 260px; min-width: 0;
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 0 12px; height: 40px;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search svg { width: 17px; height: 17px; fill: var(--faint); flex: none; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--fg); font: inherit; font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font: inherit; font-size: 13px; font-weight: 500;
  height: 32px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--fg);
  cursor: pointer; white-space: nowrap;
}
.chip:hover { border-color: var(--faint); }
.chip[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: var(--surface); }
.chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip .n { opacity: .55; margin-left: 4px; font-variant-numeric: tabular-nums; }

/* ── 범례 ── */
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12.5px; color: var(--muted); padding-block: 22px 6px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { font-style: normal; }

/* ── 공통 표식 ── */
.mk { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; font-size: 11.5px; font-weight: 700; font-style: normal; }
.mk.ok { background: var(--ok-bg); color: var(--ok-fg); }
.mk.warn { background: var(--warn-bg); color: var(--warn-fg); }
.tag { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 7px; border-radius: 5px; white-space: nowrap; font-style: normal; }
.tag.skin { background: var(--skin-bg); color: var(--skin-fg); }
.tag.front { background: var(--front-bg); color: var(--front-fg); }
.tag.admin { background: var(--admin-bg); color: var(--admin-fg); }
.tag.ap { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.apply-tags { margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.scope-group code { font-size: 12px; overflow-wrap: anywhere; }
.plans { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 4px 10px; color: var(--muted); }
.plans dt { font-weight: 700; color: var(--fg); }
.plans dd { margin: 0; }
.new { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: var(--new-bg); color: var(--new-fg); vertical-align: 2px; }
.area {
  display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px;
  border-radius: 7px; background: var(--accent-soft); color: var(--accent);
  font-size: 12.5px; font-weight: 700;
}

/* ── 구간 ── */
.tier { margin-top: 30px; }
.tier-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 12px; }
.tier-head h2 { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.tier-head h2 .count { color: var(--faint); font-weight: 500; font-size: 15px; margin-left: 4px; }
.tier-head p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; flex-basis: 100%; order: 3; }
.tier-price { font-size: 13px; font-weight: 600; color: var(--fg); background: var(--surface); border: 1px solid var(--line-strong); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }

.grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }

/* ── 카드 ── */
.card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 18px 16px;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.card:hover { border-color: var(--line-strong); box-shadow: 0 6px 20px -12px rgba(20, 30, 60, .25); transform: translateY(-1px); }
.card.has-demo { border-color: color-mix(in srgb, var(--ok-fg) 35%, var(--line)); }
.card.is-target { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.card-top { display: flex; align-items: center; gap: 8px; }
.card .areas { display: flex; gap: 4px; }
.card .code { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; letter-spacing: .02em; margin-right: auto; }
.card .name { font-size: 16.5px; font-weight: 700; letter-spacing: -.01em; line-height: 1.4; }
.card .desc { margin: 0; color: var(--muted); font-size: 14px; }

.facts {
  display: grid; grid-template-columns: max-content 1fr; gap: 6px 12px; align-items: center;
  margin: 2px 0 0; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 13px;
}
.facts dt { color: var(--faint); font-size: 12px; }
.facts dd { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; min-width: 0; }
.facts .cond { color: var(--muted); }
.facts .metric { display: inline-flex; align-items: center; gap: 5px; }

.facts .days { display: grid; gap: 1px; }
.facts .days strong { font-weight: 700; font-variant-numeric: tabular-nums; }
.facts .days-note { font-size: 12px; color: var(--muted); line-height: 1.45; }
.scope { border-top: 1px dashed var(--line); padding-top: 10px; font-size: 13px; }
.scope summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 13px; list-style: none; }
.scope summary::-webkit-details-marker { display: none; }
.scope summary::after { content: ' ▾'; }
.scope[open] summary::after { content: ' ▴'; }
.scope summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.scope-group { margin-top: 10px; }
.scope-group h4 { margin: 0 0 4px; font-size: 12px; color: var(--faint); font-weight: 600; }
.scope-group ul { margin: 0; padding-left: 16px; display: grid; gap: 3px; color: var(--muted); }
.tier-link { color: var(--accent); font-weight: 600; text-decoration: none; white-space: nowrap; }
.tier-link:hover { text-decoration: underline; }

.card-foot { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card .price { font-size: 19px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.demo-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; text-decoration: none;
  color: #fff; background: var(--accent); padding: 7px 12px; border-radius: 8px;
}
.demo-btn:hover { filter: brightness(1.08); }
.demo-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.demo-wait { font-size: 12.5px; color: var(--faint); background: var(--bg); padding: 6px 10px; border-radius: 8px; }

/* ── 카드 썸네일 (assets/thumbs.js) ── */
:root {
  --th-bg: #f1f3f6; --th-frame: #ffffff; --th-frame-line: #d5d9e0;
  --th-s: #e9ecf0; --th-m: #cfd4dc; --th-dk: #2a2f38; --th-kakao: #fee500; --th-kakao-fg: #191600;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --th-bg: #15181d; --th-frame: #1f232a; --th-frame-line: #343a46; --th-s: #2a2f38; --th-m: #3a404c; --th-dk: #0d0f12; }
}
:root[data-theme="dark"] { --th-bg: #15181d; --th-frame: #1f232a; --th-frame-line: #343a46; --th-s: #2a2f38; --th-m: #3a404c; --th-dk: #0d0f12; }
.thumb {
  display: block; margin: -6px -6px 2px; border-radius: 9px; overflow: hidden;
  background: var(--th-bg); border: 1px solid var(--line);
}
.thumb svg { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; font-family: var(--font); }
.thumb .fr { fill: var(--th-frame); stroke: var(--th-frame-line); stroke-width: 1; }
.thumb .s { fill: var(--th-s); }
.thumb .m { fill: var(--th-m); }
.thumb .dk { fill: var(--th-dk); }
.thumb .a { fill: var(--accent); }
.thumb .as { fill: var(--accent-soft); }
.thumb .ao { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.thumb .k { fill: var(--th-kakao); }
.thumb .sh { fill: var(--th-frame); stroke: var(--th-frame-line); filter: drop-shadow(0 -2px 4px rgba(20, 30, 60, .12)); }
.thumb .xs { fill: color-mix(in srgb, var(--no-fg) 16%, transparent); stroke: var(--no-fg); stroke-width: 1.2; stroke-dasharray: 3 2; }
.thumb .xd { fill: none; stroke: var(--no-fg); stroke-width: 1.2; stroke-dasharray: 3 2; }
.thumb .x { fill: var(--no-fg); }
.thumb .ln, .thumb .lt, .thumb .la, .thumb .lx, .thumb .lw, .thumb .ld { fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.thumb .ln { stroke: var(--faint); }
.thumb .lt { stroke: var(--th-m); stroke-width: 1; }
.thumb .la { stroke: var(--accent); }
.thumb .lx { stroke: var(--no-fg); stroke-width: 1.8; }
.thumb .lw { stroke: #fff; stroke-width: 2; }
.thumb .ld { stroke: var(--accent); stroke-width: 1; stroke-dasharray: 2 2; }
.thumb .fade0 { stop-color: var(--th-s); stop-opacity: 0; }
.thumb .fade1 { stop-color: var(--th-frame); stop-opacity: 1; }
.thumb text { font-size: 7px; font-weight: 500; fill: var(--muted); }
.thumb .tb { fill: var(--fg); font-weight: 700; }
.thumb .ta { fill: var(--accent); font-weight: 700; }
.thumb .tw { fill: #fff; font-weight: 700; }
.thumb .tk { fill: var(--th-kakao-fg); font-weight: 700; }
.thumb .tx { fill: var(--no-fg); font-weight: 700; }
.thumb .tf { fill: var(--faint); }
.thumb .f5 { font-size: 5.5px; }
.thumb .f6 { font-size: 6.2px; }
.thumb .f8 { font-size: 8.5px; }
.thumb .f12 { font-size: 13px; }
a.thumb:hover { border-color: var(--line-strong); }

/* ── 고객용 / 내부용 (assets/access.js 가 <html data-view> 지정) ── */
/* 판정 전에는 둘 다 숨겨 깜빡임 없이 */
html:not([data-view="internal"]) [data-internal],
html:not([data-view="customer"]) [data-customer] { display: none !important; }
.staffbar { background: var(--fg); color: var(--surface); font-size: 13px; }
.staffbar-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; min-height: 40px; padding-block: 6px; }
.staffbar-badge { font-weight: 700; font-size: 12px; padding: 2px 8px; border-radius: 5px; background: var(--accent); color: #fff; }
.staffbar-badge.is-customer { background: var(--ok-fg); }
.staffbar-user { opacity: .75; margin-right: auto; min-width: 0; overflow-wrap: anywhere; }
.staffbar a { color: inherit; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; }
.staffbar a:hover { text-decoration: underline; }

.staffbar-note { opacity: .75; font-size: 12.5px; }

/* ── 내부용: 고객 화면 노출 스위치 ── */
.vis-switch { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--muted); user-select: none; }
.vis-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.vis-track { position: relative; width: 34px; height: 20px; border-radius: 999px; background: var(--line-strong); transition: background .15s ease; flex: none; }
.vis-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s ease; }
.vis-switch input:checked + .vis-track { background: var(--ok-fg); }
.vis-switch input:checked + .vis-track::after { transform: translateX(14px); }
.vis-switch input:checked ~ .vis-label { color: var(--ok-fg); }
.vis-switch input:focus-visible + .vis-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.vis-switch input:disabled + .vis-track { opacity: .5; }
.vis-label { min-width: 2.2em; }
.card.is-off { background: color-mix(in srgb, var(--surface) 55%, var(--bg)); border-style: dashed; border-color: var(--line-strong); }
.card.is-off > :not(.card-top) { opacity: .5; }
.card.is-off .vis-label { color: var(--no-fg); }

.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 50;
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 10px;
  background: var(--fg); color: var(--surface); font-size: 14px; font-weight: 600;
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .35); transition: opacity .2s ease, transform .2s ease;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { background: var(--no-fg); color: #fff; }

/* ── 고객용: 키오스크형 카드 (html.is-kiosk) ── */
.is-kiosk .hero h1 { font-size: clamp(28px, 5vw, 44px); }
.is-kiosk .lead { font-size: 16.5px; }
.is-kiosk .chip { height: 40px; padding: 0 16px; font-size: 14px; font-weight: 600; }
.is-kiosk .grid { gap: 18px; }
.is-kiosk .tier { margin-top: 44px; }
.is-kiosk .tier-head h2 { font-size: 22px; font-weight: 800; }
.is-kiosk .tier-price { background: var(--accent-soft); border-color: transparent; color: var(--accent); }

.kcard { padding: 0; gap: 0; overflow: hidden; border-radius: 16px; }
.kcard.has-demo { border-color: var(--line); }
.k-open {
  display: block; width: 100%; padding: 0; margin: 0; border: 0; background: none; color: inherit;
  font: inherit; text-align: left; cursor: pointer;
}
.k-open:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 16px 16px 0 0; }
.thumb.k-thumb { position: relative; display: block; margin: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: var(--th-bg); }
.k-thumb svg { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; font-family: var(--font); transition: transform .25s ease; }
.kcard:hover .k-thumb svg { transform: scale(1.03); }
.thumb.k-thumb.is-large { border: 1px solid var(--line); border-radius: 14px; }
.k-badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; }
.k-badge { font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--surface); color: var(--fg); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.k-badge.is-new { background: var(--new-fg); color: #fff; }
.k-badge.is-demo { color: var(--ok-fg); }
.k-body { display: grid; gap: 4px; padding: 16px 18px 0; }
.k-area { font-size: 12px; font-weight: 600; color: var(--accent); margin: 0; }
.k-pitch { font-size: 18.5px; font-weight: 800; line-height: 1.35; letter-spacing: -.02em; text-wrap: balance; }
.k-name { font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.k-effects { list-style: none; margin: 0; padding: 12px 18px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.k-effects li {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600;
  padding: 4px 9px 4px 7px; border-radius: 999px; background: var(--ok-bg); color: var(--ok-fg);
}
.k-effects li::before { content: ''; width: 12px; height: 12px; flex: none; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6.2 11.6 2.6 8l1.1-1.1 2.5 2.5 6.1-6.1 1.1 1.1z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6.2 11.6 2.6 8l1.1-1.1 2.5 2.5 6.1-6.1 1.1 1.1z'/%3E%3C/svg%3E") center / contain no-repeat; }
.k-effects.is-large { padding: 0; gap: 8px; }
.k-effects.is-large li { font-size: 14px; padding: 7px 12px 7px 10px; }
.k-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 18px; }
.k-pp { display: grid; gap: 1px; }
.k-period { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.ksheet-foot > .ksheet-facts { display: flex; gap: 24px; }
.ksheet-facts > div { display: grid; }
.period-warn { font-size: 12px; font-weight: 600; color: var(--no-fg); background: var(--no-bg); border-radius: 6px; padding: 3px 7px; margin-top: 3px; line-height: 1.45; }
.k-price { font-size: 20px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.k-demo {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px;
  border-radius: 12px; background: var(--accent); color: #fff; font-size: 14.5px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.k-demo:hover { filter: brightness(1.08); }
.k-demo:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.k-demo.is-large { min-height: 52px; padding: 0 24px; font-size: 16px; }
.k-soon { font-size: 13px; color: var(--faint); }

/* 자세히 보기 — PC 가운데 창, 모바일 아래 시트 */
.ksheet {
  width: min(560px, calc(100% - 32px)); max-height: min(88vh, 880px); padding: 0; margin: auto;
  border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--fg);
  box-shadow: 0 24px 64px -16px rgba(0, 0, 0, .4); overflow: auto; overscroll-behavior: contain;
}
.ksheet::backdrop { background: rgba(10, 12, 16, .55); }
.ksheet[open] { animation: ksheet-in .2s ease; }
@keyframes ksheet-in { from { opacity: 0; transform: translateY(12px); } }
.ksheet-inner { position: relative; padding: 20px 22px 0; display: grid; gap: 10px; }
.ksheet-close {
  position: absolute; top: 28px; right: 30px; z-index: 1; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: color-mix(in srgb, var(--surface) 85%, transparent); color: var(--fg);
  font-size: 26px; line-height: 1; cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
}
.ksheet-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ksheet .k-area { margin-top: 6px; }
.ksheet-pitch { font-size: clamp(22px, 4.5vw, 26px); font-weight: 800; letter-spacing: -.02em; line-height: 1.3; }
.ksheet-name { margin: 0; font-size: 14.5px; color: var(--muted); }
.ksheet-code { font-size: 12px; color: var(--faint); margin-left: 4px; font-variant-numeric: tabular-nums; }
.ksheet-desc { margin: 4px 0 0; font-size: 15.5px; line-height: 1.65; }
.ksheet-h { margin: 10px 0 2px; font-size: 14px; font-weight: 700; }
/* 기대 효과 세 줄 — 핵심 지표 · 작동 원리 · 기대 효과 (내부 카드의 "기대 효과 자세히" 도 같이 씀) */
.ksheet-effect { margin: 0; display: grid; gap: 14px; }
.ksheet-effect dt { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.ksheet-effect dd { margin: 0; font-size: 14.5px; line-height: 1.6; }
.ksheet-effect .result { font-weight: 600; }
.kpi-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.kpi-zone { font-size: 12px; font-weight: 700; color: var(--skin-fg); background: var(--skin-bg); border-radius: 6px; padding: 2px 8px; }
.kpi-lead { font-size: 13.5px; font-weight: 700; color: var(--front-fg); background: var(--front-bg); border-radius: 999px; padding: 3px 11px; }
.kpi-ms { font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 2px 8px; }
.kpi-ms.o { background: var(--ok-bg); color: var(--ok-fg); }
.kpi-ms.t { background: var(--warn-bg); color: var(--warn-fg); }
.kpi-ms.x { background: var(--no-bg); color: var(--no-fg); }
.kpi-ms.q { background: var(--th-s); color: var(--muted); }
.kpi-extra { display: block; font-size: 13px; color: var(--muted); margin-top: 6px; }
.kpi-extra b { font-weight: 600; color: var(--fg); }
.kcard > .ksheet-effect { padding: 14px 18px 0; gap: 10px; }
.kcard > .ksheet-effect dd { font-size: 13.5px; }
.scope .ksheet-effect { gap: 10px; }
.scope .ksheet-effect dd { font-size: 13px; }
.ksheet-note { margin: 6px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--bg); color: var(--muted); font-size: 13.5px; }
.ksheet-foot {
  position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 8px -22px 0; padding: 14px 22px calc(16px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line);
}
.ksheet-foot > div { display: grid; }
.ksheet-plabel { font-size: 12px; color: var(--muted); }
html.has-sheet { overflow: hidden; }

/* ── 테마 전환 버튼 (assets/theme.js) ── */
.theme-toggle {
  display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0;
  border-radius: 9px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--fg); cursor: pointer;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hero .container { position: relative; }
.hero .theme-toggle { position: absolute; top: 0; right: 20px; }
@media (max-width: 720px) { .hero .theme-toggle { right: 16px; } }

/* ── 하단 ── */
.dont, .notes { margin-top: 40px; padding: 22px 24px; border-radius: var(--radius); }
.dont { background: var(--no-bg); border: 1px solid var(--no-line); }
.dont h2 { font-size: 17px; color: var(--no-fg); }
.dont p { margin: 8px 0 0; }
.dont ul { margin: 12px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.dont .why { font-size: 13px; color: var(--muted); margin-top: 12px; }
.notes { background: var(--surface); border: 1px solid var(--line); }
.notes h2 { font-size: 17px; }
.notes ul { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 14px; color: var(--muted); }
.notes b { color: var(--fg); margin-right: 8px; }
.empty { text-align: center; color: var(--muted); padding: 48px 0; }
.footer { color: var(--faint); font-size: 12.5px; padding-block: 32px 48px; }

/* ── 모바일 ── */
@media (max-width: 720px) {
  .container { padding-inline: 16px; }
  .hero { padding-block: 32px 24px; }
  .toolbar-inner { gap: 8px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: 100%; padding-bottom: 2px; }
  .chips::-webkit-scrollbar { display: none; }
  .grid, .is-kiosk .grid { grid-template-columns: 1fr; }
  .thumb svg { max-height: 150px; }
  .is-kiosk .chip { height: 38px; padding: 0 14px; }
  .ksheet { width: 100%; max-width: none; max-height: 92vh; max-height: 92dvh; margin: auto 0 0; border-radius: 20px 20px 0 0; border-bottom: 0; }
  .ksheet[open] { animation-name: ksheet-up; }
  .ksheet-inner { padding: 16px 16px 0; }
  .ksheet-close { top: 24px; right: 24px; }
  .ksheet-foot { margin-inline: -16px; padding-inline: 16px; }
}
@keyframes ksheet-up { from { transform: translateY(40%); } }

@media (prefers-reduced-motion: reduce) {
  .card, .k-thumb svg, .vis-track, .vis-track::after, .toast { transition: none; }
  .card:hover { transform: none; }
  .kcard:hover .k-thumb svg { transform: none; }
  .ksheet[open] { animation: none; }
}

/* ══ 메뉴판 — 애플 톤의 타일 격자 (index.html <body class="board"> 에만) ══
 * 넓은 화면 4열 · 넘기지 않고 한눈에. 타일: 그림 · New/영역 · 이름 · 카피 · 핵심 지표 / 가격 · 체험하기 › [자세히]
 * 다른 화면(데모 · 점검표 · 진단)은 위 기본 스타일 그대로 */
.board {
  --bg: #f5f5f7; --surface: #ffffff; --fg: #1d1d1f; --muted: #6e6e73; --faint: #86868b;
  --line: #e3e3e8; --line-strong: #d2d2d7; --accent: #0071e3; --accent-soft: #e8f1fc; --link: #0066cc;
  --new-fg: #b64400; --pill-hover: #0077ed; --tile-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px -12px rgba(0, 0, 0, .12);
  --m-fix: linear-gradient(180deg, #f2ebe7, #faf7f5); --m-ui: linear-gradient(180deg, #e7eef8, #f6f8fc);
  --m-flow: linear-gradient(180deg, #ebe8f6, #f7f6fc); --m-measure: linear-gradient(180deg, #e8eef0, #f6f8f9);
  --m-repurchase: linear-gradient(180deg, #e4f1ea, #f5faf7); --m-later: linear-gradient(180deg, #ececee, #f6f6f7);
  --th-bg: transparent;
  letter-spacing: -.01em;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .board {
    --bg: #000000; --surface: #1c1c1e; --fg: #f5f5f7; --muted: #a1a1a6; --faint: #6e6e73;
    --line: #2c2c2e; --line-strong: #3a3a3c; --accent: #0071e3; --accent-soft: #0b2440; --link: #2997ff;
    --new-fg: #ff9a4d; --tile-shadow: none;
    --m-fix: linear-gradient(180deg, #2a2320, #222); --m-ui: linear-gradient(180deg, #1c2533, #212224);
    --m-flow: linear-gradient(180deg, #25222f, #212123); --m-measure: linear-gradient(180deg, #212729, #212223);
    --m-repurchase: linear-gradient(180deg, #1c2a23, #212222); --m-later: linear-gradient(180deg, #262628, #212123);
  }
}
:root[data-theme="dark"] .board {
  --bg: #000000; --surface: #1c1c1e; --fg: #f5f5f7; --muted: #a1a1a6; --faint: #6e6e73;
  --line: #2c2c2e; --line-strong: #3a3a3c; --accent: #0071e3; --accent-soft: #0b2440; --link: #2997ff;
  --new-fg: #ff9a4d; --tile-shadow: none;
  --m-fix: linear-gradient(180deg, #2a2320, #222); --m-ui: linear-gradient(180deg, #1c2533, #212224);
  --m-flow: linear-gradient(180deg, #25222f, #212123); --m-measure: linear-gradient(180deg, #212729, #212223);
  --m-repurchase: linear-gradient(180deg, #1c2a23, #212222); --m-later: linear-gradient(180deg, #262628, #212123);
}
.board .container { max-width: 1440px; padding-inline: 32px; }

/* 상단 — 짧게 (목록이 바로 보이게) */
.board .hero { background: var(--surface); border-bottom: 0; padding-block: 44px 32px; }
.board .eyebrow { color: var(--muted); letter-spacing: .04em; font-size: 13px; }
.board .hero h1 { font-size: clamp(32px, 4.4vw, 52px); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.board .lead { font-size: 18px; line-height: 1.5; max-width: 60ch; margin-top: 12px; color: var(--muted); }
.board .hero-links { gap: 8px 24px; margin-top: 18px; }
.board .hero-links .hero-link { height: auto; padding: 0; border: 0; background: none; color: var(--link); font-size: 16px; font-weight: 500; }
.board .hero-links .hero-link::after { content: '\203A'; margin-left: 4px; }
.board .hero-links .hero-link:hover { text-decoration: underline; }
.board .stats { gap: 10px 40px; margin-top: 26px; }
.board .stats dt { font-size: 13px; }
.board .stats dd { font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.board .theme-toggle { border-radius: 50%; background: var(--bg); border-color: transparent; }

/* 필터 바 — 반투명 · 구간 바로가기 */
.board .toolbar { background: color-mix(in srgb, var(--surface) 82%, transparent); border-bottom-color: var(--line); }
.board .toolbar-inner { padding-block: 12px 10px; }
.board .search { border-radius: 12px; border-color: var(--line); background: var(--bg); height: 42px; flex-basis: 320px; }
.board .chip { height: 34px; padding: 0 14px; font-size: 14px; border-color: var(--line-strong); background: var(--surface); }
.board .chip[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: var(--surface); }
.tier-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; width: 100%; font-size: 14px; }
.tier-nav a { display: inline-flex; align-items: center; min-height: 32px; color: var(--muted); text-decoration: none; font-weight: 500; }
.tier-nav a:hover { color: var(--link); }
.tier-nav span { margin-left: 5px; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.board .legend { padding-block: 22px 0; font-size: 13px; }

/* 구간 제목 줄 */
.board .tier { margin-top: 0; padding-top: 44px; scroll-margin-top: 150px; }
.board .tier-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-bottom: 18px; }
.board .tier-head h2 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 700; letter-spacing: -.025em; line-height: 1.2; }
.board .tier-head h2 .count { font-size: 15px; font-weight: 600; color: var(--faint); margin-left: 8px; letter-spacing: 0; }
.board .tier-price { order: 2; margin-left: auto; background: var(--surface); border: 1px solid var(--line); padding: 4px 12px; border-radius: 999px; color: var(--fg); font-size: 14px; font-weight: 600; }
.board .tier-head p { flex-basis: 100%; order: 3; margin: 2px 0 0; font-size: 15px; color: var(--muted); }
.board .tier-link { color: var(--link); font-weight: 500; }
.board .tier-link::after { content: '\203A'; margin-left: 4px; }
.board .lead, .board .tier-head p, .ptile-name, .ptile-pitch { word-break: keep-all; overflow-wrap: anywhere; }

/* 타일 격자 */
.ptile-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
@media (max-width: 1320px) { .ptile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 880px) { .ptile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } }
@media (max-width: 560px) { .ptile-grid { grid-template-columns: minmax(0, 1fr); } }

.ptile {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--surface); border-radius: 22px; padding: 10px; box-shadow: var(--tile-shadow);
  color: var(--fg); cursor: pointer; transition: transform .25s ease, box-shadow .25s ease;
}
.ptile:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(0, 0, 0, .04), 0 16px 36px -16px rgba(0, 0, 0, .22); }
.ptile-media {
  display: grid; place-items: center; width: 100%; padding: 0; border: 0; cursor: pointer; overflow: hidden;
  border-radius: 14px; background: var(--m-ui); aspect-ratio: 16 / 9;
}
.tier-fix .ptile-media { background: var(--m-fix); }
.tier-flow .ptile-media { background: var(--m-flow); }
.tier-measure .ptile-media { background: var(--m-measure); }
.tier-repurchase .ptile-media { background: var(--m-repurchase); }
.tier-later .ptile-media { background: var(--m-later); }
.ptile-media .thumb { display: block; width: 100%; margin: 0; border: 0; border-radius: 0; background: none; overflow: visible; }
.ptile-media .thumb svg { width: 100%; height: auto; aspect-ratio: 2 / 1; transition: transform .4s cubic-bezier(.2, .8, .2, 1); }
.ptile:hover .ptile-media .thumb svg { transform: scale(1.04); }
.ptile-media:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.ptile-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 8px 0; flex: 1; }
.ptile-eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; min-height: 18px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.ptile-new { font-weight: 700; color: var(--new-fg); }
.ptile-name { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.35; letter-spacing: -.02em; }
.ptile-pitch { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted); }

.ptile-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding: 12px 8px 4px; border-top: 1px solid var(--line); }
.ptile-price { white-space: nowrap; margin: 0; display: grid; gap: 1px; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.ptile-more-hint { margin-left: auto; color: var(--link); font-size: 14px; font-weight: 600; white-space: nowrap; }
.ptile-more-hint::after { content: '\203A'; margin-left: 3px; font-size: 1.15em; line-height: 1; }
.ptile:hover .ptile-more-hint { text-decoration: underline; }
.pill {
  display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 16px;
  border: 0; border-radius: 980px; background: var(--accent); color: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.pill:hover { background: var(--pill-hover); }
.pill:focus-visible, .ptile-link:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; }
.ptile-link { display: inline-flex; align-items: center; min-height: 36px; color: var(--link); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.ptile-link::after { content: '\203A'; margin-left: 3px; font-size: 1.15em; line-height: 1; }
.ptile-link:hover { text-decoration: underline; }

/* 내부용: 위 코드 · 노출 스위치, 아래 내부 정보 */
.ptile-meta { display: flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 4px 8px; }
.ptile-meta .areas { display: flex; gap: 4px; }
.ptile-meta .area { min-width: 22px; height: 22px; font-size: 11.5px; border-radius: 6px; }
.ptile-meta .code { margin-right: auto; font-size: 12.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.ptile-more { margin: 8px 0 0; padding: 8px 8px 2px; border-top: 1px solid var(--line); font-size: 13.5px; }
.ptile-more > summary { cursor: pointer; list-style: none; color: var(--link); font-size: 13.5px; font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.ptile-more > summary::-webkit-details-marker { display: none; }
.ptile-more > summary::after { content: ' \25BE'; margin-left: 4px; }
.ptile-more[open] > summary::after { content: ' \25B4'; }
.ptile-more .facts { margin-top: 6px; }
.ptile.is-off { box-shadow: none; outline: 1px dashed var(--line-strong); }
.ptile.is-off .ptile-media, .ptile.is-off .ptile-body, .ptile.is-off .ptile-foot { opacity: .4; }
.ptile.is-off .vis-label { color: var(--no-fg); }
.ptile.is-target { box-shadow: 0 0 0 3px var(--accent); }

/* 하단 · 자세히 창 */
.board .bottom { padding-top: 56px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.board .dont, .board .notes { margin: 0; border-radius: 22px; padding: 24px 28px; border: 0; }
.board .notes { background: var(--surface); }
.board .dont h2, .board .notes h2 { font-size: 20px; letter-spacing: -.02em; }
.board .ksheet { border-radius: 24px; border: 0; }
.board .ksheet-pitch { font-weight: 700; }
.board .k-demo { border-radius: 980px; background: var(--accent); font-weight: 600; font-size: 16px; }
.board .thumb.k-thumb.is-large { border: 0; border-radius: 18px; background: var(--m-ui); }
.board .footer { text-align: center; }

@media (max-width: 720px) {
  .board .container { padding-inline: 16px; }
  .board .hero { padding-block: 32px 24px; }
  .board .tier { padding-top: 36px; scroll-margin-top: 170px; }
  .board .tier-price { margin-left: 0; }
  .tier-nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tier-nav::-webkit-scrollbar { display: none; }
  .tier-nav a { white-space: nowrap; }
  .board .bottom { grid-template-columns: minmax(0, 1fr); }
  .board .dont, .board .notes { padding: 20px; }
  .board .ksheet { border-radius: 22px 22px 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ptile, .ptile-media .thumb svg { transition: none; }
  .ptile:hover { transform: none; }
  .ptile:hover .ptile-media .thumb svg { transform: none; }
}

/* 항목별 · 문제별 전환 (애플식 세그먼트) */
.view-switch { display: inline-flex; padding: 3px; border-radius: 999px; background: color-mix(in srgb, var(--fg) 7%, transparent); flex: none; }
.view-switch button {
  min-height: 36px; padding: 0 18px; border: 0; border-radius: 999px; background: none; color: var(--muted);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.view-switch button[aria-pressed="true"] { background: var(--surface); color: var(--fg); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.view-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 문제별 보기 */
.prob-lead p { margin: 28px 0 0; font-size: 16px; color: var(--muted); }
.prob-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
@media (max-width: 1100px) { .prob-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .prob-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; } }
.prob { background: var(--surface); border-radius: 22px; padding: 20px 20px 16px; box-shadow: var(--tile-shadow); display: grid; gap: 10px; }
.prob-title { font-size: 18px; font-weight: 700; line-height: 1.4; letter-spacing: -.02em; word-break: keep-all; overflow-wrap: anywhere; }
.prob-kpi { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.prob-kpi span { font-size: 11.5px; color: var(--muted); background: var(--bg); padding: 2px 7px; border-radius: 6px; }
.prob-items { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
.prob-item {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%;
  min-height: 48px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  color: var(--fg); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s ease, background .15s ease;
}
.prob-item:hover { border-color: var(--accent); background: var(--accent-soft); }
.prob-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.prob-rank { min-width: 34px; text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.prob-rank.is-first { color: #fff; background: var(--accent); border-radius: 999px; padding: 3px 0; }
.prob-name { font-size: 14.5px; font-weight: 600; line-height: 1.4; word-break: keep-all; overflow-wrap: anywhere; }
.prob-name b { font-size: 12px; font-weight: 600; color: var(--muted); margin-right: 6px; font-variant-numeric: tabular-nums; }
.prob-price { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.prob-note { margin: 2px 0 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.prob-note::before { content: '참고 '; font-weight: 700; color: var(--fg); }
.ksheet-probs { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14.5px; }

@media (max-width: 720px) {
  .view-switch { width: 100%; }
  .view-switch button { flex: 1; }
  .prob { padding: 16px 14px 12px; }
  .prob-item { grid-template-columns: auto minmax(0, 1fr); }
  .prob-price { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) { .prob-item { transition: none; } }
.board .hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 22px 0 0; }
.board .hero-cta .pill { min-height: 46px; padding: 0 24px; font-size: 16px; text-decoration: none; }
.board .hero-cta span { font-size: 14px; color: var(--muted); }
a.pill { text-decoration: none; }
