/* 똑디엠 디자인 토큰과 컴포넌트. 기준은 docs/PLAN.md "디자인 기준"
   모서리 규칙: 입력·버튼 10px, 카드 안쪽 14px, 패널·카드 20px, 배지·칩·내비 알약형 */
:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f0f1f4;
  --surface-3: #e8eaee;
  --line: rgba(16, 18, 24, 0.08);
  --line-strong: rgba(16, 18, 24, 0.15);
  --text: #0f1115;
  --muted: #5a606c;
  --faint: #646b78; /* 흰 바탕 5.4:1, --surface-2 위 4.8:1 (12px 표 머리글·보조 줄에 쓰여 4.5:1 이상으로 둔다) */
  --ink: #111318;
  --ink-2: #1b1e25;
  --ink-text: #f3f4f6;
  --ink-muted: #a2a8b3;
  --accent: #cf4519;
  --accent-hover: #b83b13;
  --accent-ink: #ffffff;
  --accent-soft: #fdece5;
  --accent-glow: rgba(232, 92, 44, 0.32);
  --danger: #b42318;
  --danger-soft: #fdecea;
  --ok: #157a3a;
  --ok-soft: #e4f4e9;
  --dm-me: #3797f0;
  --r-s: 10px;
  --r-m: 14px;
  --r-l: 20px;
  --radius-s: var(--r-s);
  --radius-l: var(--r-l);
  --shadow-1: 0 1px 2px rgba(16, 18, 24, 0.05), 0 0 0 1px var(--line);
  --shadow-2: 0 0 0 1px var(--line), 0 2px 4px rgba(16, 18, 24, 0.03), 0 16px 36px -16px rgba(16, 18, 24, 0.16);
  --shadow-3: 0 0 0 1px rgba(16, 18, 24, 0.06), 0 50px 90px -40px rgba(120, 40, 10, 0.38), 0 24px 48px -24px rgba(16, 18, 24, 0.28);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0e11;
    --surface: #16181d;
    --surface-2: #1d2026;
    --surface-3: #262a31;
    --line: rgba(255, 255, 255, 0.07);
    --line-strong: rgba(255, 255, 255, 0.14);
    --text: #eef0f3;
    --muted: #a3a9b4;
    --faint: #8b919c; /* --surface 위 5.6:1, --surface-2 위 5.2:1 */
    --ink: #1a1d23;
    --ink-2: #22262d;
    --accent: #f07a55;
    --accent-hover: #f48d6c;
    --accent-ink: #1c0d07;
    --accent-soft: #3a1f16;
    --accent-glow: rgba(240, 122, 85, 0.22);
    --danger: #f97066;
    --danger-soft: #3b1715;
    --ok: #5fcf86;
    --ok-soft: #14301f;
    --shadow-1: 0 0 0 1px var(--line);
    --shadow-2: 0 0 0 1px var(--line), 0 16px 36px -16px rgba(0, 0, 0, 0.6);
    --shadow-3: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 50px 90px -40px rgba(240, 122, 85, 0.25), 0 24px 48px -24px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: -0.012em;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -0.03em; }
p { margin: 0; }
::selection { background: var(--accent); color: var(--accent-ink); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 버튼 */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 16px;
  border-radius: var(--r-s); border: 0;
  font: inherit; font-weight: 600; font-size: 14px; letter-spacing: -0.01em; white-space: nowrap;
  text-decoration: none; cursor: pointer;
  transition: background .2s var(--ease), box-shadow .2s var(--ease), transform .15s var(--ease), color .2s;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:focus-visible, .input:focus-visible, .textarea:focus-visible, .select:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary {
  background: var(--accent); color: var(--accent-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 1px 2px rgba(120, 30, 5, 0.25), 0 6px 16px -6px var(--accent-glow);
}
.btn-primary:hover { background: var(--accent-hover); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(120, 30, 5, 0.3), 0 10px 22px -8px var(--accent-glow); }
.btn-ghost { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--line-strong), 0 1px 2px rgba(16, 18, 24, 0.04); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-ink { background: var(--text); color: var(--bg); }
.btn-ink:hover { opacity: 0.88; }
.btn-danger { background: transparent; color: var(--danger); box-shadow: 0 0 0 1px color-mix(in srgb, var(--danger) 45%, transparent); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-lg { height: 50px; padding: 0 24px; font-size: 15px; border-radius: 12px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn .ti { font-size: 18px; }
.btn .ti-arrow-right { transition: transform .2s var(--ease); }
.btn:hover .ti-arrow-right { transform: translateX(3px); }

/* 폼 */
.field { display: grid; gap: 7px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text); }
.field .help { font-size: 13px; color: var(--muted); }
.field .err { font-size: 13px; color: var(--danger); font-weight: 500; }
.input, .textarea, .select {
  width: 100%; min-height: 44px; padding: 10px 13px;
  border: 0; border-radius: var(--r-s);
  background: var(--surface); color: var(--text); font: inherit; font-size: 15px;
  box-shadow: 0 0 0 1px var(--line-strong), 0 1px 2px rgba(16, 18, 24, 0.04);
  transition: box-shadow .2s var(--ease);
}
.input:hover, .textarea:hover, .select:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 28%, transparent); }
.input:focus, .textarea:focus, .select:focus { outline: none; box-shadow: 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-soft); }
.textarea { min-height: 92px; resize: vertical; line-height: 1.55; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input[aria-invalid="true"] { box-shadow: 0 0 0 1px var(--danger), 0 0 0 4px var(--danger-soft); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); }
.form-stack { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }

.alert { display: flex; gap: 10px; padding: 13px 15px; border-radius: var(--r-m); font-size: 14px; }
.alert .ti { font-size: 18px; flex: none; margin-top: 1px; }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-ok { background: var(--ok-soft); color: var(--ok); }
.alert-info { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.alert-info .ti { color: var(--accent); }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); }
.badge-on { background: var(--ok-soft); color: var(--ok); }
.badge-on::before, .badge-warn::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-warn { background: var(--danger-soft); color: var(--danger); }
.badge-accent { background: var(--accent-soft); color: var(--accent); }

/* 패널과 표 */
.panel { background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow-1); }
.panel-pad { padding: 22px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 15px; font-weight: 700; }
.panel-title { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; }
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 600; font-size: 12px; color: var(--faint); padding: 12px 22px 10px; white-space: nowrap; border-bottom: 1px solid var(--line); }
.table td { padding: 13px 22px; border-top: 1px solid var(--line); vertical-align: middle; white-space: nowrap; max-width: 360px; overflow: hidden; text-overflow: ellipsis; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.table tr:first-child td { border-top: 0; }
.table td.right, .table th.right { text-align: right; }
.empty { padding: 48px 20px; text-align: center; display: grid; gap: 10px; justify-items: center; }
.empty .ti { font-size: 24px; color: var(--accent); width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); }
.empty p { max-width: 30em; font-size: 14px; }

/* 공개 페이지 */
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 28px; }
.site-head { position: sticky; top: 0; z-index: 20; backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); background: color-mix(in srgb, var(--bg) 78%, transparent); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-head.scrolled { border-bottom-color: var(--line); }
.site-nav { height: 68px; display: flex; align-items: center; justify-content: space-between; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 18px; letter-spacing: -0.045em; text-decoration: none; }
.logo-mark { width: 28px; height: 28px; border-radius: 8px; flex: none; box-shadow: 0 4px 10px -4px var(--accent-glow); }
.site-nav nav { display: flex; align-items: center; gap: 26px; font-size: 14px; }
.site-nav nav a.link { text-decoration: none; color: var(--muted); font-weight: 500; transition: color .15s; }
.site-nav nav a.link:hover { color: var(--text); }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px 0 10px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-1); font-size: 13px; font-weight: 600; color: var(--muted); }
.eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.kicker { font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: 0; }

.hero { position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; padding: 64px 0 96px; }
.hero h1 { margin-top: 22px; font-size: clamp(40px, 5.6vw, 70px); font-weight: 800; letter-spacing: -0.055em; line-height: 1.1; }
.hero h1 .hl { position: relative; color: var(--accent); white-space: nowrap; }
.hero h1 .hl::after { content: ""; position: absolute; left: 2%; right: 2%; bottom: 0.04em; height: 0.12em; border-radius: 99px; background: currentColor; opacity: 0.22; }
.hero .sub { margin-top: 22px; font-size: 18px; line-height: 1.65; color: var(--muted); max-width: 29em; }
.hero .cta { margin-top: 34px; display: flex; gap: 10px; flex-wrap: wrap; }
.trust { margin-top: 36px; display: flex; gap: 22px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.trust span { display: inline-flex; align-items: center; gap: 6px; }
.trust .ti { font-size: 17px; color: var(--text); }

.stage { position: relative; display: grid; place-items: center; padding: 20px 0; }
.stage::before { content: ""; position: absolute; inset: 6% 2% 0; background: radial-gradient(closest-side, var(--accent-glow), transparent 72%); filter: blur(10px); z-index: 0; }
.stage::after { content: ""; position: absolute; inset: -6% -10%; z-index: 0; background-image: radial-gradient(var(--line-strong) 1px, transparent 1px); background-size: 18px 18px; mask-image: radial-gradient(closest-side, #000 30%, transparent 78%); -webkit-mask-image: radial-gradient(closest-side, #000 30%, transparent 78%); opacity: 0.7; }
.device { position: relative; z-index: 1; width: 100%; max-width: 360px; padding: 10px; border-radius: 42px; background: linear-gradient(160deg, #2a2d34, #0e0f12); box-shadow: var(--shadow-3), inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.device .phone { max-width: none; margin: 0; border-radius: 33px; border: 0; }
.device .notch { position: absolute; top: 18px; left: 50%; width: 92px; height: 24px; margin-left: -46px; border-radius: 99px; background: #0b0c0e; z-index: 2; }
.device .phone .comment-row { padding-top: 52px; }
.chip { position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-2); font-size: 13px; line-height: 1.3; white-space: nowrap; animation: float 6s ease-in-out infinite; }
.chip strong { display: block; font-size: 13px; }
.chip span { color: var(--faint); font-size: 12px; }
.chip .ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; flex: none; }
.chip-a { bottom: 0; left: -6%; }
.chip-a .ico { background: var(--ok-soft); color: var(--ok); }
.chip-b { top: 24%; right: -8%; animation-delay: -3s; }
.chip-b .ico { background: var(--accent-soft); color: var(--accent); }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* 히어로 대화는 dm-play.js가 입력 중 점, 버튼 누름과 함께 한 장면씩 재생한다 (loop) */
.device .chat { align-content: start; transition: opacity .5s var(--ease); }
.facts strong span, .chip strong span { font-size: inherit; color: inherit; }
.device { transition: transform .5s var(--ease); }
.chip.pop { animation: pop .55s var(--ease), float 6s ease-in-out .55s infinite; }
@keyframes pop { 0% { transform: scale(.92); opacity: .4; } 60% { transform: scale(1.04); opacity: 1; } 100% { transform: none; } }
@keyframes arrive { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }

.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts div { padding: 26px 24px; border-left: 1px solid var(--line); }
.facts div:first-child { border-left: 0; padding-left: 0; }
.facts strong { display: block; font-size: 26px; font-weight: 800; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.facts span { font-size: 14px; color: var(--muted); }

.section { padding: 112px 0 0; }
.section-head { display: grid; gap: 14px; max-width: 760px; }
.section h2 { font-size: clamp(30px, 3.6vw, 44px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.18; text-wrap: balance; }
.section .lead { color: var(--muted); font-size: 17px; max-width: 36em; }

.flow { margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.flow li { list-style: none; position: relative; padding: 24px; border-radius: var(--r-l); background: var(--surface); box-shadow: var(--shadow-1); display: grid; gap: 8px; align-content: start; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.flow li:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.flow .step { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.flow .step b { font-size: 13px; font-weight: 700; color: var(--faint); font-variant-numeric: tabular-nums; }
.flow .step .ti { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: var(--surface-2); color: var(--text); }
.flow li:last-child .step .ti { background: var(--accent); color: var(--accent-ink); }
/* 작동 방식: 화면에 보이는 동안 단계가 차례로 켜진다 (landing.js) */
.flow.cycling li:last-child .step .ti { background: var(--surface-2); color: var(--text); }
.flow li::after { content: ""; position: absolute; left: 24px; right: 24px; bottom: 0; height: 3px; border-radius: 99px; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.flow li.on { box-shadow: var(--shadow-2), 0 0 0 1px var(--accent-soft); }
.flow.cycling li.on .step .ti { background: var(--accent); color: var(--accent-ink); }
.flow li.on::after { animation: step-bar var(--step, 2.4s) linear both; }
.flow:hover li.on::after { animation-play-state: paused; }
@keyframes step-bar { to { transform: scaleX(1); } }
.flow li strong { font-size: 17px; letter-spacing: -0.03em; }
.flow li p { font-size: 15px; line-height: 1.65; color: var(--muted); }

.bento { margin-top: 48px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(220px, auto); gap: 20px; }
.tile { position: relative; overflow: hidden; padding: 26px; border-radius: var(--r-l); background: var(--surface); box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: 8px; }
.tile h3 { font-size: 19px; letter-spacing: -0.035em; }
.tile p { font-size: 15px; line-height: 1.65; color: var(--muted); max-width: 30em; }
.tile .viz { margin-top: auto; padding-top: 22px; }
.tile-dark { grid-row: span 2; background: var(--ink); color: var(--ink-text); box-shadow: none; }
.tile-dark p { color: var(--ink-muted); }
.tile-dark::before { content: ""; position: absolute; width: 380px; height: 380px; right: -140px; top: -160px; background: radial-gradient(closest-side, var(--accent-glow), transparent); }
.tile-wide { grid-column: span 2; }
.tile .kicker { margin-bottom: 4px; }

.gate { display: grid; gap: 10px; }
.gate-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-m); background: var(--ink-2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); font-size: 13px; }
.gate-row .avatar { background: #2c3038; color: var(--ink-text); }
.gate-row b { display: block; font-size: 14px; }
.gate-row span { color: var(--ink-muted); }
.gate-row .badge { margin-left: auto; }
.gate-row .badge-on { background: rgba(95, 207, 134, 0.14); color: #6fdc95; }
.gate-row .badge-wait { background: rgba(240, 122, 85, 0.16); color: #ff9c7b; }
.gate-row .badge { transition: background .4s var(--ease), color .4s var(--ease); }
.gate-row.flip { animation: pop .55s var(--ease); }

.bars { display: flex; align-items: flex-end; gap: 8px; height: 96px; }
.bars i { flex: 1; border-radius: 6px 6px 3px 3px; background: var(--surface-3); height: var(--h); transform-origin: bottom; }
.bars i:last-child { background: var(--accent); }
.reveal.in .bars i { animation: grow .9s var(--ease) both; }
.bars i:nth-child(2) { animation-delay: .05s; } .bars i:nth-child(3) { animation-delay: .1s; } .bars i:nth-child(4) { animation-delay: .15s; }
.bars i:nth-child(5) { animation-delay: .2s; } .bars i:nth-child(6) { animation-delay: .25s; } .bars i:nth-child(7) { animation-delay: .3s; }
@keyframes grow { from { transform: scaleY(0.1); } to { transform: none; } }
.bars i { cursor: default; transition: background .2s var(--ease); }
.bars:hover i:hover { background: var(--accent); }
.bars:hover i:last-child:not(:hover) { background: var(--surface-3); }
.viz-cap { display: flex; justify-content: space-between; margin-top: 10px; font-size: 12px; color: var(--faint); }

.autos { display: grid; gap: 8px; }
.auto-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: var(--r-m); background: var(--surface-2); font-size: 13px; font-weight: 600; }
.auto-row { cursor: pointer; transition: color .25s var(--ease); }
.auto-row:has(.toggle:not(:checked)) { color: var(--faint); }
.toggle { appearance: none; -webkit-appearance: none; margin: 0; cursor: pointer; width: 34px; height: 20px; border-radius: 99px; background: var(--surface-3); position: relative; flex: none; transition: background .25s var(--ease); }
.toggle::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, 0.2); transition: transform .25s var(--ease); }
.toggle:checked { background: var(--accent); }
.toggle:checked::after { transform: translateX(14px); }
.toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.speed { display: grid; gap: 10px; }
.speed .meter { height: 10px; border-radius: 99px; margin: 0; }
.speed .meter span { transition: width 1.4s var(--ease); }
.speed .meter span { border-radius: 99px; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #ffb38f)); }

.compare { margin-top: 40px; overflow: hidden; }
.compare .table th { font-size: 13px; padding-top: 18px; padding-bottom: 14px; }
.compare .table th.us-head { color: var(--accent); }
.compare .table td { padding-top: 16px; padding-bottom: 16px; }
.compare td:first-child { font-weight: 600; }
.compare .us { color: var(--text); font-weight: 700; background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.compare .us .ti { color: var(--accent); margin-right: 6px; }
.compare .them { color: var(--muted); }
/* 여러 서비스 비교: 좁은 화면에서는 표만 옆으로 밀어 보고, 항목 이름 칸은 왼쪽에 붙어 있는다 */
.compare-wide { overflow-x: auto; }
.compare-wide .table { min-width: 820px; }
.compare-wide td:first-child, .compare-wide th:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); min-width: 150px; }
.compare-note { margin-top: 12px; font-size: 13px; color: var(--faint); max-width: 60ch; }

.plans { margin-top: 44px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.plan { position: relative; padding: 26px; border-radius: var(--r-l); background: var(--surface); box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: 14px; }
.plan h3 { font-size: 15px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan .price { font-size: 32px; font-weight: 800; letter-spacing: -0.05em; line-height: 1.1; }
.fair-note { margin-top: 20px; max-width: 72ch; padding: 14px 16px; border-radius: var(--r-m); background: var(--surface-2); font-size: 14px; color: var(--muted); }
.plan .yearly { margin-top: -8px; font-size: 13px; color: var(--accent); font-weight: 600; }
.plan .price small { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan ul { margin: 0; padding: 14px 0 0; border-top: 1px solid var(--line); list-style: none; display: grid; gap: 9px; font-size: 14px; }
.plan li { display: flex; gap: 8px; }
.plan li .ti { color: var(--accent); margin-top: 3px; flex: none; }
/* 유료 요금제: 아래 요금제 기능을 다 포함한다는 줄. 나머지 줄은 더 좋아지는 것만 */
.plan li.includes { font-weight: 700; color: var(--text); padding-bottom: 2px; }
.plan.pick li.includes { color: inherit; }
.plan .btn { margin-top: auto; }
.plan.pick { background: var(--ink); color: var(--ink-text); box-shadow: 0 30px 60px -30px rgba(16, 18, 24, 0.5); }
.plan.pick .price small, .plan.pick li { color: var(--ink-muted); }
.plan.pick li .ti { color: #ff9c7b; }
.plan.pick ul { border-top-color: rgba(255, 255, 255, 0.1); }
.plan.pick .badge-accent { background: var(--accent); color: var(--accent-ink); }

.faq-wrap { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 48px; align-items: start; }
.faq { display: grid; gap: 10px; }
.faq details { border-radius: var(--r-m); background: var(--surface); box-shadow: var(--shadow-1); padding: 0 20px; transition: box-shadow .2s; }
.faq details[open] { box-shadow: var(--shadow-2); }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 0; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 10px; height: 10px; flex: none; border-right: 2px solid var(--faint); border-bottom: 2px solid var(--faint); transform: rotate(45deg) translateY(-3px); transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq p { padding-bottom: 18px; margin-top: -4px; color: var(--muted); font-size: 14px; }

.closing { margin-top: 120px; position: relative; overflow: hidden; padding: 64px 56px; border-radius: 28px; background: var(--ink); color: var(--ink-text); display: flex; justify-content: space-between; align-items: center; gap: 28px; flex-wrap: wrap; }
.closing::before { content: ""; position: absolute; width: 620px; height: 620px; left: -200px; bottom: -420px; background: radial-gradient(closest-side, var(--accent-glow), transparent); }
.closing > * { position: relative; }
.closing h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.2; }
.closing p { margin-top: 10px; color: var(--ink-muted); }
.site-foot { padding: 40px 0 56px; font-size: 13px; color: var(--faint); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-foot a { text-decoration: none; margin-left: 18px; }
.site-foot a:hover { color: var(--text); }

.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* DM 미리보기 (실제 컴포넌트, 자동화 편집기와 공유) */
.phone { width: 100%; max-width: 360px; margin-left: auto; border-radius: 28px; background: var(--surface); overflow: hidden; box-shadow: var(--shadow-2); }
.phone-top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.phone-top strong { font-size: 14px; display: block; line-height: 1.3; }
.phone-top span { font-size: 12px; color: var(--faint); }
.chat { padding: 16px; display: grid; gap: 8px; font-size: 14px; }
.chat .stamp { justify-self: center; font-size: 12px; color: var(--faint); margin: 4px 0; }
.bubble { max-width: 82%; padding: 9px 13px; border-radius: 20px; white-space: pre-wrap; line-height: 1.45; overflow-wrap: anywhere; }
.bubble.them { background: var(--surface-2); justify-self: start; border-bottom-left-radius: 6px; }
.bubble.me { background: var(--dm-me); color: #fff; justify-self: end; border-bottom-right-radius: 6px; }
.bubble.card { padding: 0; overflow: hidden; background: var(--surface-2); }
.bubble.card p { padding: 10px 13px; }
.bubble.card .bbtn { display: block; padding: 10px 13px; border-top: 1px solid var(--line); text-align: center; font-weight: 600; color: var(--dm-me); white-space: nowrap; }
.chat .note { justify-self: center; font-size: 12px; color: var(--faint); padding: 2px 10px; border-radius: 99px; background: var(--surface-2); }
.comment-row { display: flex; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
.comment-row b { margin-right: 4px; }
.comment-row .reply { margin-top: 6px; color: var(--muted); padding: 6px 10px; border-radius: 10px; background: var(--surface-2); }

/* 앱 셸 */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100dvh; }
.side { padding: 20px 14px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100dvh; }
.side .logo { padding: 4px 10px; }
.side nav { display: grid; gap: 2px; }
.side nav a { display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 12px; border-radius: 11px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap; min-width: 0; transition: background .15s, color .15s; }
.side nav a:hover { background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--text); }
.side nav a[aria-current="page"] { background: var(--surface); color: var(--text); font-weight: 700; box-shadow: var(--shadow-1); }
.side nav a[aria-current="page"] .ti { color: var(--accent); }
.side nav a .ti { font-size: 19px; }
.side .nav-label { font-size: 12px; font-weight: 600; color: var(--faint); padding: 0 12px; margin-bottom: 6px; }
.side .me { margin-top: auto; padding: 12px; border-radius: var(--r-m); background: var(--surface); box-shadow: var(--shadow-1); font-size: 13px; display: grid; gap: 10px; }
.side .me .email { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .me .btn { width: 100%; }
.main { padding: 36px 40px 72px; max-width: 1240px; width: 100%; min-width: 0; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head > div { min-width: 0; }
.page-head h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.045em; }
.page-head p { margin-top: 6px; color: var(--muted); font-size: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.stack { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-between > div { min-width: 0; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { padding: 20px; border-radius: var(--r-l); background: var(--surface); box-shadow: var(--shadow-1); display: grid; gap: 4px; align-content: start; }
.stat .label { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; font-weight: 500; }
.stat .label .ti { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-size: 16px; background: var(--surface-2); color: var(--text); }
.stat:first-child { background: var(--ink); color: var(--ink-text); box-shadow: none; }
.stat:first-child .label { color: var(--ink-muted); }
.stat:first-child .label .ti { background: rgba(255, 255, 255, 0.08); color: #ff9c7b; }
.stat:first-child .value small { color: var(--ink-muted); }
.stat:first-child .meter { background: rgba(255, 255, 255, 0.1); }
.stat .value { font-size: 30px; font-weight: 800; letter-spacing: -0.045em; margin-top: 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat .value small { font-size: 14px; font-weight: 500; color: var(--faint); letter-spacing: 0; }

.meter { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 10px; }
.meter span { display: block; height: 100%; border-radius: 99px; background: var(--accent); }

.acct { display: flex; align-items: center; gap: 12px; }
.acct strong { display: block; font-size: 14px; }
.acct span { font-size: 12px; color: var(--faint); }

.steps { display: grid; gap: 8px; }
.steps a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-m); background: var(--surface-2); text-decoration: none; font-size: 14px; transition: background .15s; }
.steps a:hover { background: var(--surface-3); }
.steps a .ti { font-size: 20px; color: var(--faint); }
.steps a.done { color: var(--faint); text-decoration: line-through; }
.steps a.done .ti { color: var(--ok); }
.steps a:not(.done) { font-weight: 600; }
.steps a:not(.done)::after { content: "\2192"; margin-left: auto; color: var(--faint); }

.editor { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.editor .preview { position: sticky; top: 24px; display: grid; gap: 10px; }
.editor .preview .phone { margin: 0; }
fieldset.group { border: 0; border-radius: var(--r-l); background: var(--surface); box-shadow: var(--shadow-1); padding: 22px; margin: 0; display: grid; gap: 16px; min-width: 0; }
fieldset.group legend { float: left; width: 100%; font-weight: 700; font-size: 15px; padding: 0 0 4px; }
fieldset.group legend + * { clear: both; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.media-grid label { position: relative; cursor: pointer; border-radius: 12px; overflow: hidden; aspect-ratio: 1; background: var(--surface-2); display: grid; place-items: center; font-size: 12px; color: var(--muted); text-align: center; padding: 4px; box-shadow: inset 0 0 0 2px transparent; transition: box-shadow .15s, transform .15s; }
.media-grid label:hover { transform: translateY(-1px); }
.media-grid label img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media-grid input { position: absolute; opacity: 0; }
.media-grid label:has(input:checked) { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.media-grid label:has(input:checked)::after { content: "\2713"; position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.media-grid label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* 인증 화면 */
.auth { min-height: 100dvh; display: grid; grid-template-columns: minmax(460px, 5fr) 7fr; }
/* 폼과 로고를 같은 400px 축에 두고 칸 가운데에 놓는다 */
.auth-form { padding: 32px 48px; display: flex; flex-direction: column; align-items: center; }
.auth-form > .logo { width: 100%; max-width: 400px; }
.auth-form .inner { margin: auto 0; max-width: 400px; width: 100%; display: grid; gap: 24px; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; }
.auth-links a { display: inline-flex; align-items: center; min-height: 44px; }
.auth-form h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.045em; }
.auth-form .inner > .btn, .auth-form form .btn-lg { width: 100%; }
/* 오른쪽: 왼쪽 단계 안내 + 오른쪽 대화창. 대화가 재생되는 단계에 맞춰 목록 줄이 켜진다 */
.auth-side { position: relative; overflow: hidden; margin: 12px; border-radius: 28px; background: var(--ink); color: var(--ink-text); padding: 48px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); align-items: center; gap: 40px; }
.auth-side::before { content: ""; position: absolute; width: 700px; height: 700px; right: -260px; top: -280px; background: radial-gradient(closest-side, var(--accent-glow), transparent); }
.auth-side > * { position: relative; }
.auth-side h2 { font-size: 34px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.2; }
.auth-steps { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 4px; }
.auth-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 12px 14px; border-radius: var(--r-m); color: var(--ink-muted); font-size: 14px; line-height: 1.5; transition: background-color .35s var(--ease), color .35s var(--ease); }
.auth-steps b { display: block; color: var(--ink-text); font-size: 15px; font-weight: 700; }
.auth-steps i { font-style: normal; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: var(--ink-text); background: rgba(255, 255, 255, 0.07); transition: background-color .35s var(--ease); }
.auth-steps li[aria-current] { background: rgba(255, 255, 255, 0.06); color: var(--ink-text); }
.auth-steps li[aria-current] i { background: var(--accent); color: #fff; }
.auth-phone { width: 100%; border-radius: 26px; background: rgba(255, 255, 255, 0.03); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); overflow: hidden; }
.auth-phone-top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.auth-phone-top strong { display: block; font-size: 14px; line-height: 1.3; }
.auth-phone-top span:not(.avatar) { font-size: 12px; color: var(--ink-muted); }
.auth-phone .avatar { background: var(--ink-2); color: var(--ink-text); }
/* 새 말풍선이 아래에서 올라오고 오래된 건 위로 밀려 나가는 대화창 */
.auth-chat { height: min(400px, 46dvh); padding: 16px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; overflow: hidden; -webkit-mask-image: linear-gradient(transparent, #000 18%); mask-image: linear-gradient(transparent, #000 18%); transition: opacity .45s var(--ease); }
.auth-chat .bubble { font-size: 14px; flex: none; }
.auth-chat .bubble.them { align-self: flex-start; background: var(--ink-2); color: var(--ink-text); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.auth-chat .bubble.me { align-self: flex-end; }
.auth-chat .note { align-self: center; flex: none; font-size: 12px; color: var(--ink-muted); padding: 2px 10px; border-radius: 99px; background: rgba(255, 255, 255, 0.06); }
.auth-chat .bubble.card .bbtn { border-top-color: rgba(255, 255, 255, 0.08); color: #6fb6ff; }
/* 노트북 폭: 대화창을 줄이고, 더 좁으면 대화창을 빼고 단계 안내만 둔다 */
@media (max-width: 1359px) {
  .auth-side { padding: 40px; gap: 32px; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); }
  .auth-side h2 { font-size: 30px; }
}
@media (max-width: 1239px) {
  .auth-side { grid-template-columns: minmax(0, 1fr); }
  .auth-phone { display: none; }
}
.dm-event { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-m); background: rgba(255, 255, 255, 0.06); font-size: 13px; line-height: 1.4; }
.dm-event p { margin: 0; color: var(--ink-text); }
.dm-event p span { display: block; color: var(--ink-muted); }
.dm-event .avatar { width: 28px; height: 28px; font-size: 12px; }
.dm-click { align-self: center; background: var(--accent); }
.dm-click p, .dm-click p span { color: #fff; }
.dm-click .spark { width: 28px; height: 28px; border-radius: 99px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.2); font-size: 16px; }

@media (max-width: 1080px) {
  .chip-a { left: 0; }
  .chip-b { right: 0; }
}
@media (max-width: 960px) {
  .hero, .editor, .auth, .faq-wrap { grid-template-columns: minmax(0, 1fr); }
  .hero { gap: 40px; padding: 40px 0 72px; }
  .stage { padding: 10px 0 20px; width: 100%; max-width: 460px; margin: 0 auto; }
  .phone { margin: 0 auto; }
  .flow, .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tile-dark { grid-row: auto; grid-column: span 2; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts div:nth-child(3) { border-left: 0; padding-left: 0; }
  .facts div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .faq-wrap { gap: 28px; }
  .auth-side { display: none; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: sticky; top: 0; z-index: 10; height: auto; display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 12px 16px 10px; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
  .side > div:not(.me) { grid-column: 1 / -1; order: 3; min-width: 0; }
  .side > div:not(.me) + div:not(.me) { display: none; }
  .side nav { display: flex; overflow-x: auto; gap: 4px; scrollbar-width: none; padding: 3px 28px 3px 3px; margin: -3px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
  .side nav a { flex: none; height: 34px; }
  .side .nav-label, .side .me .email { display: none; }
  .side .me { margin: 0; padding: 0; background: none; box-shadow: none; order: 2; }
  .main { padding: 24px 16px 56px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .editor .preview { position: static; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .flow, .plans, .bento { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .tile-dark, .tile-wide { grid-column: auto; }
  .site-nav nav a.link { display: none; }
  .hero .sub { font-size: 16px; }
  .trust { gap: 14px; }
  .chip { display: none; }
  .stage::after { inset: -6% 0; }
  .section { padding-top: 88px; }
  .closing { padding: 40px 24px; margin-top: 88px; flex-direction: column; align-items: flex-start; }
  .auth-form { padding: 24px 16px; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .page-head h1 { font-size: 24px; }
  .stat .value { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* 줄바꿈: 긴 주소·이메일·오류 문구는 칸 안에서 끊는다 */
.badge, .stat .value, .price, .logo, .page-head .btn { white-space: nowrap; }
.mono, .err, .alert div, .help, td.wrap, .muted a { overflow-wrap: anywhere; }

/* 내비 숫자 배지, 떠 있는 문의 버튼 */
.side nav a .nav-badge, .help-fab .nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.help-fab { position: fixed; right: 20px; bottom: 20px; z-index: 20; display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px; border-radius: 99px; background: var(--ink); color: var(--ink-text); text-decoration: none; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-2); transition: transform .15s var(--ease); }
.help-fab:hover { transform: translateY(-2px); }
.help-fab .ti { font-size: 18px; color: #ff9c7b; }

/* 운영자 콘솔: 회원 화면과 헷갈리지 않게 왼쪽 메뉴를 어둡게 */
.admin-shell .side { background: var(--ink); color: var(--ink-text); }
.admin-shell .side .logo { color: var(--ink-text); }
.admin-shell .side nav a { color: var(--ink-muted); }
.admin-shell .side nav a:hover { background: rgba(255, 255, 255, 0.06); color: var(--ink-text); }
.admin-shell .side nav a[aria-current="page"] { background: rgba(255, 255, 255, 0.1); color: #fff; box-shadow: none; }
.admin-shell .side .me { background: rgba(255, 255, 255, 0.06); box-shadow: none; }
.admin-shell .side .me .email { color: var(--ink-muted); }
.admin-shell .side .me .btn { color: var(--ink-text); background: rgba(255, 255, 255, 0.08); box-shadow: none; }
.admin-brand { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.admin-shell .admin-brand .badge { background: rgba(255, 255, 255, 0.1); color: #ff9c7b; }
.admin-login { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.admin-login > .panel { width: 100%; max-width: 400px; }

/* 탭, 필터, 한꺼번에 바꾸기 */
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 3px; margin: -3px; }
.tabs a { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 99px; background: var(--surface); box-shadow: var(--shadow-1); text-decoration: none; font-size: 14px; color: var(--muted); }
.tabs a span { font-size: 12px; color: var(--faint); }
.tabs a[aria-current="page"] { background: var(--ink); color: var(--ink-text); box-shadow: none; font-weight: 600; }
.tabs a[aria-current="page"] span { color: var(--ink-muted); }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.filters .field { min-width: 130px; }
.filters .field.grow { flex: 1 1 200px; }
.filters .field label { font-size: 12px; }
.panel-head.bulk { justify-content: flex-start; flex-wrap: wrap; }
.panel-head.bulk .select { width: auto; height: 34px; }
.select-sm { height: 32px; width: auto; font-size: 13px; padding-top: 0; padding-bottom: 0; }
.inline-form { display: flex; gap: 6px; align-items: center; }
.meter-sm { height: 4px; margin-top: 6px; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.todo { display: flex; flex-wrap: wrap; gap: 8px; }
.todo a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--r-m); background: var(--accent-soft); color: var(--accent); text-decoration: none; font-size: 14px; font-weight: 600; }

/* 이름표 목록 */
.kv { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px 14px; margin: 0; font-size: 14px; }
.kv dt { color: var(--faint); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.kv-label { font-size: 12px; font-weight: 600; color: var(--faint); margin-bottom: 6px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.raw { margin: 0; padding: 14px; border-radius: var(--r-m); background: var(--ink); color: var(--ink-text); font-size: 12px; line-height: 1.55; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; }

/* 발송 기록: 줄을 누르면 자세히 */
.logs { list-style: none; margin: 0; padding: 0; }
.logs > li + li { border-top: 1px solid var(--line); }
.log summary { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 22px; cursor: pointer; list-style: none; transition: background .15s; }
.log summary::-webkit-details-marker { display: none; }
.log summary:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.log[open] summary { background: var(--surface-2); }
.log-dot { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); font-size: 16px; }
.log-error .log-dot { background: var(--danger-soft); color: var(--danger); }
.log-main { min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-sub { display: block; font-size: 12px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; }
.log-result { display: grid; justify-items: end; gap: 2px; font-size: 12px; }
.log-body { padding: 4px 22px 20px 64px; display: grid; gap: 16px; background: var(--surface-2); }
.log-message { white-space: pre-wrap; overflow-wrap: anywhere; padding: 12px 14px; border-radius: var(--r-m); background: var(--surface); box-shadow: var(--shadow-1); font-size: 14px; line-height: 1.55; max-width: 560px; }
.fix { padding: 14px 16px; border-radius: var(--r-m); background: var(--danger-soft); display: grid; gap: 6px; font-size: 14px; }
.fix strong { display: flex; align-items: center; gap: 6px; color: var(--danger); }
.fix-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }

/* 채팅 문의 */
.threads { list-style: none; margin: 0; padding: 0; }
.threads li + li { border-top: 1px solid var(--line); }
.threads a { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 15px 22px; text-decoration: none; font-size: 14px; }
.threads a:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.threads a.unread .thread-title { font-weight: 700; }
.thread-title { min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.thread-sub { flex-basis: 100%; font-size: 12px; color: var(--faint); font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.chatbox { display: grid; overflow: hidden; }
.chat-thread { display: grid; gap: 10px; align-content: start; padding: 20px; height: min(60dvh, 560px); overflow-y: auto; }
.msg { display: grid; gap: 3px; max-width: 78%; }
.msg.me { justify-self: end; justify-items: end; }
.msg.them { justify-self: start; }
.msg .bubble { max-width: 100%; }
.msg.them .bubble { background: var(--surface-2); border-bottom-left-radius: 6px; }
.msg.me .bubble { background: var(--ink); color: var(--ink-text); border-bottom-right-radius: 6px; }
.msg time { font-size: 12px; }
.chat-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; padding: 14px; border-top: 1px solid var(--line); }
.chat-form .textarea { min-height: 46px; resize: vertical; }
.chat-note, .chat-error { grid-column: 1 / -1; font-size: 13px; }
.chat-error { color: var(--danger); }
.support-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.mini-list { list-style: none; margin: 0; padding: 6px 0; }
.mini-list li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 22px; font-size: 14px; }
.mini-list li a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 960px) {
  .support-layout, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-shell .side { background: var(--ink); }
  .admin-brand .badge { display: none; }
}
@media (max-width: 640px) {
  .log summary { grid-template-columns: 30px minmax(0, 1fr); padding: 14px 16px; }
  .log-result { grid-column: 2; justify-items: start; }
  .log-body { padding: 4px 16px 18px; }
  .kv { grid-template-columns: 84px minmax(0, 1fr); }
  .threads a { grid-template-columns: minmax(0, 1fr) auto; padding: 14px 16px; }
  .threads a time { display: none; }
  .help-fab { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: 48px; height: 48px; padding: 0; justify-content: center; }
  .help-fab .fab-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .help-fab .ti { font-size: 21px; }
  .help-fab .nav-badge { position: absolute; top: -4px; right: -4px; margin: 0; }
  .shell .main { padding-bottom: 96px; }
  .msg { max-width: 90%; }
}

/* DM 대화 재생 (dm-play.js) */
.dm-wait { display: none !important; }
/* 랜딩 히어로(data-dm-hold): 안 나온 말풍선도 자리는 차지해 페이지 높이가 바뀌지 않는다 */
.dm-hold { visibility: hidden; }
[data-dm-hold] { position: relative; }
.bubble.typing-float { position: absolute; margin: 0; }
.dm-in { animation: arrive .45s var(--ease) both; }
.dm-fade .dm-in, [data-dm-play].dm-fade { opacity: 0; }
.bubble.typing { display: inline-flex; gap: 4px; align-items: center; padding: 12px 14px; flex: none; }
.bubble.typing i { width: 6px; height: 6px; border-radius: 99px; background: currentColor; opacity: .35; animation: typing 1.1s infinite ease-in-out; }
.bubble.typing i:nth-child(2) { animation-delay: .15s; }
.bubble.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: .9; transform: translateY(-3px); } }
.bbtn { transition: background .2s, transform .2s var(--ease); }
.bbtn.tapped { background: color-mix(in srgb, var(--dm-me) 18%, transparent); transform: scale(.97); }
.preview-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.editor .chat { min-height: 260px; align-content: start; }

/* 편집기: 반응할 곳 고르기, 상품 카드 */
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 99px; background: var(--surface-2); color: var(--muted); font-size: 14px; font-weight: 600; transition: background .15s, color .15s; }
.seg input:checked + span { background: var(--ink); color: var(--ink-text); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.cards-box { border-radius: var(--r-m); background: var(--surface-2); padding: 12px 14px; }
.cards-box summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.cards-box[open] summary { margin-bottom: 8px; }
.card-rows { display: grid; gap: 12px; margin-top: 10px; }
.card-row { display: grid; gap: 6px; padding: 12px; border-radius: var(--r-s); background: var(--surface); box-shadow: var(--shadow-1); }
.card-row[hidden] { display: none; }
.card-row-head { font-size: 13px; color: var(--muted); }
.card-row-2 { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 6px; }
.pair-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 220px); gap: 8px; }
.pair-row.three { grid-template-columns: minmax(0, 160px) minmax(0, 1fr) minmax(0, 200px); }
@media (max-width: 640px) {
  .pair-row, .pair-row.three { grid-template-columns: minmax(0, 1fr); padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .card-row-2 { grid-template-columns: minmax(0, 1fr); }
}
.backfill-box { margin-top: 12px; padding: 14px; border-radius: var(--r-m); background: var(--surface); box-shadow: var(--shadow-1); display: grid; gap: 10px; font-size: 13px; }

/* AI 문구 만들기 줄 */
.ai-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: -4px; }
.ai-row .help { margin: 0; }

/* 추첨 결과 */
.winner-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.winner-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.winner-list li:first-child { border-top: 0; }

/* 새 자동화의 시작 틀 고르기 */
.presets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; font-size: 13px; }

/* 자동화 성과: 단계별 막대 */
.funnel { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.funnel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; }
.funnel-head strong { font-size: 18px; }
.funnel-bar { height: 10px; margin-top: 8px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.funnel-bar span { display: block; height: 100%; min-width: 2px; border-radius: 5px; background: var(--accent); }
.funnel li p { margin-top: 6px; font-size: 13px; }
