/* mtools 디자인 시스템 — 토큰 → 기본 → 레이아웃 → 컴포넌트 → 페이지 순.
   브레이크포인트: 480 / 768 / 1024 / 1280 (이 값만 사용) */

:root {
  --bg: #f5f6f8;
  --bg-elev: #ffffff;
  --bg-sunken: #eef0f3;
  --line: #e3e6eb;
  --line-strong: #cfd4dc;
  --ink: #0f1728;
  --ink-2: #394356;
  --ink-3: #6b7486;
  --ink-4: #9aa2b1;
  --brand: #0c9b6a;
  --brand-ink: #087a53;
  --brand-soft: #e5f6ef;
  --violet: #6653ff;
  --violet-soft: #eeebff;
  --amber: #f0a020;
  --amber-soft: #fff4e0;
  --red: #e5484d;
  --red-soft: #fdecec;
  --blue: #2f7cf6;
  --blue-soft: #e8f0fe;
  --good: var(--brand);
  --warn: var(--amber);
  --bad: var(--red);
  --radius-s: 8px;
  --radius: 14px;
  --radius-l: 20px;
  --shadow-s: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .06);
  --shadow-l: 0 12px 40px rgba(16, 24, 40, .12);
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --nav-h: 64px;
  --tab-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0f15; --bg-elev: #151a23; --bg-sunken: #10141b; --line: #252c38; --line-strong: #343d4c;
    --ink: #eef1f6; --ink-2: #c3cad6; --ink-3: #8b94a5; --ink-4: #636c7d;
    --brand: #22c28a; --brand-ink: #4fd8a6; --brand-soft: #0f2a21; --violet: #8f80ff; --violet-soft: #1e1a3d;
    --amber-soft: #2e2410; --red-soft: #2f1517; --blue-soft: #132238;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25); --shadow-l: 0 12px 40px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c0f15; --bg-elev: #151a23; --bg-sunken: #10141b; --line: #252c38; --line-strong: #343d4c;
  --ink: #eef1f6; --ink-2: #c3cad6; --ink-3: #8b94a5; --ink-4: #636c7d;
  --brand: #22c28a; --brand-ink: #4fd8a6; --brand-soft: #0f2a21; --violet: #8f80ff; --violet-soft: #1e1a3d;
  --amber-soft: #2e2410; --red-soft: #2f1517; --blue-soft: #132238;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25); --shadow-l: 0 12px 40px rgba(0,0,0,.5);
  color-scheme: dark;
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: 15px; line-height: 1.6; letter-spacing: -0.01em; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; letter-spacing: -0.025em; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
::selection { background: var(--brand-soft); }

/* ---------------------------------------------------------------- nav */
.nav {
  position: sticky; top: 0; z-index: 40; height: var(--nav-h);
  background: color-mix(in srgb, var(--bg-elev) 86%, transparent);
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { max-width: 1240px; margin: 0 auto; height: 100%; display: flex; align-items: center; gap: 28px; padding: 0 24px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: -0.03em; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), #13c28b 60%, #53d6a8); color: #fff; font-size: 15px; font-weight: 900;
}
.logo small { font-weight: 600; color: var(--ink-3); font-size: 12px; margin-left: 2px; }
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-links a { padding: 8px 12px; border-radius: 10px; color: var(--ink-3); font-weight: 600; font-size: 14.5px; transition: .15s; }
.nav-links a:hover { color: var(--ink); background: var(--bg-sunken); }
.nav-links a.active { color: var(--ink); background: var(--bg-sunken); }
.nav-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-elev); cursor: pointer; position: relative; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.user-chip .who { display: flex; flex-direction: column; line-height: 1.15; padding-right: 6px; }
.user-chip .who b { font-size: 13px; }
.user-chip .who span { font-size: 11px; color: var(--ink-3); }
.menu-pop { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-l); padding: 8px; display: none; }
.menu-pop.open { display: block; }
.menu-pop a, .menu-pop button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 9px; border: 0; background: none; cursor: pointer; font-size: 14px; color: var(--ink-2); text-align: left; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--bg-sunken); color: var(--ink); }
.menu-pop .meta { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; font-size: 12.5px; color: var(--ink-3); }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-elev); display: grid; place-items: center; cursor: pointer; color: var(--ink-2); }
.icon-btn:hover { color: var(--ink); border-color: var(--line-strong); }
.icon { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.tabbar { display: none; }

/* ---------------------------------------------------------------- layout */
.page { max-width: 1240px; margin: 0 auto; padding: 32px 24px 80px; }
.page-narrow { max-width: 880px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 28px; font-weight: 800; }
.page-head p { color: var(--ink-3); margin-top: 6px; }
.eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; color: var(--brand-ink); text-transform: uppercase; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.wrap { flex-wrap: wrap; }

/* ---------------------------------------------------------------- components */
.card { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow-s); }
.card-pad { padding: 24px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px 0; }
.card-head h2, .card-head h3 { font-size: 17px; font-weight: 750; }
.card-head .sub { font-size: 13px; color: var(--ink-3); }
.card-body { padding: 16px 24px 24px; }
.section-title { display: flex; align-items: baseline; gap: 10px; margin: 36px 0 14px; }
.section-title h2 { font-size: 20px; font-weight: 800; }
.section-title span { color: var(--ink-3); font-size: 13.5px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px;
  border-radius: 12px; border: 1px solid var(--line-strong); background: var(--bg-elev); color: var(--ink);
  font-weight: 700; font-size: 14.5px; cursor: pointer; transition: transform .08s, background .15s, border-color .15s, box-shadow .15s;
  white-space: nowrap; user-select: none;
}
.btn:hover { border-color: var(--ink-4); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 4px 14px color-mix(in srgb, var(--brand) 30%, transparent); }
.btn-primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); }
.btn-violet { background: var(--violet); border-color: var(--violet); color: #fff; box-shadow: 0 4px 14px color-mix(in srgb, var(--violet) 30%, transparent); }
.btn-violet:hover { filter: brightness(.95); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: var(--bg-elev); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--bg-sunken); border-color: transparent; }
.btn-lg { height: 52px; padding: 0 24px; font-size: 16px; border-radius: 14px; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--bg-sunken); color: var(--ink-2); white-space: nowrap; }
.badge-good { background: var(--brand-soft); color: var(--brand-ink); }
.badge-warn { background: var(--amber-soft); color: #b36b00; }
.badge-bad { background: var(--red-soft); color: var(--red); }
.badge-violet { background: var(--violet-soft); color: var(--violet); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
:root[data-theme="dark"] .badge-warn { color: var(--amber); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.field .hint { font-size: 12.5px; color: var(--ink-3); }
.input, .select, .textarea {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--bg-elev); outline: none; transition: border-color .15s, box-shadow .15s; font-size: 15px;
}
.textarea { height: auto; min-height: 84px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); }
.input-group { display: flex; gap: 8px; }

.search-hero { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 20px; border-radius: 18px; background: var(--bg-elev); border: 1.5px solid var(--line-strong); box-shadow: var(--shadow); transition: .15s; }
.search-hero:focus-within { border-color: var(--brand); box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand) 14%, transparent), var(--shadow); }
.search-hero input { flex: 1; border: 0; outline: 0; background: transparent; height: 48px; font-size: 17px; min-width: 0; }
.search-hero .icon { color: var(--ink-3); width: 22px; height: 22px; }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-elev); font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; transition: .15s; }
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip.on { background: var(--ink); color: var(--bg-elev); border-color: var(--ink); }

.stat { padding: 20px; }
.stat .label { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.stat .value { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; margin-top: 4px; }
.stat .delta { font-size: 12.5px; margin-top: 2px; color: var(--ink-3); }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12.5px; color: var(--ink-3); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.me td { background: var(--brand-soft); }
.table .r { text-align: right; }

.progress { height: 8px; border-radius: 99px; background: var(--bg-sunken); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 99px; background: var(--brand); transition: width .5s cubic-bezier(.2,.8,.2,1); }

.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid; font-size: 14px; }
.alert-bad { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 25%, transparent); }
.alert-warn { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 30%, transparent); }
.alert-info { background: var(--blue-soft); border-color: color-mix(in srgb, var(--blue) 25%, transparent); }
.alert b { display: block; margin-bottom: 2px; }

.empty { text-align: center; padding: 48px 20px; color: var(--ink-3); }
.empty .icon { width: 36px; height: 36px; margin: 0 auto 10px; color: var(--ink-4); }
.skeleton { background: linear-gradient(90deg, var(--bg-sunken), var(--line), var(--bg-sunken)); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.spinner { width: 18px; height: 18px; border: 2.5px solid color-mix(in srgb, currentColor 25%, transparent); border-top-color: currentColor; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.toast-wrap { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: var(--bg-elev); padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-l); animation: toastIn .25s ease; max-width: 90vw; }
.toast.bad { background: var(--red); color: #fff; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

.modal-back { position: fixed; inset: 0; background: rgba(10, 14, 22, .48); z-index: 60; display: none; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(3px); }
.modal-back.open { display: flex; animation: fadeIn .15s; }
.modal { width: 100%; max-width: 640px; max-height: calc(100vh - 40px); overflow: auto; background: var(--bg-elev); border-radius: var(--radius-l); box-shadow: var(--shadow-l); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg-elev); z-index: 1; }
.modal-head h3 { font-size: 18px; font-weight: 800; }
.modal-body { padding: 20px 24px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--bg-elev); }
@keyframes fadeIn { from { opacity: 0; } }

.seg { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--bg-sunken); gap: 2px; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 9px; font-size: 13.5px; font-weight: 700; color: var(--ink-3); cursor: pointer; }
.seg button.on { background: var(--bg-elev); color: var(--ink); box-shadow: var(--shadow-s); }

.toggle { position: relative; width: 44px; height: 26px; flex: none; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle span { position: absolute; inset: 0; border-radius: 99px; background: var(--line-strong); transition: .2s; cursor: pointer; }
.toggle span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.toggle input:checked + span { background: var(--brand); }
.toggle input:checked + span::after { transform: translateX(18px); }

/* ---------------------------------------------------------------- place card (검색 결과) */
.place-list { display: flex; flex-direction: column; gap: 10px; }
.place-item { display: flex; gap: 14px; padding: 14px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--bg-elev); cursor: pointer; transition: .15s; align-items: center; text-align: left; width: 100%; }
.place-item:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.place-item.selected { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }
.place-thumb { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; background: var(--bg-sunken); flex: none; }
.place-meta { flex: 1; min-width: 0; }
.place-meta h4 { font-size: 16px; font-weight: 750; display: flex; gap: 8px; align-items: center; }
.place-meta .cat { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.place-meta .addr { font-size: 13px; color: var(--ink-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.place-meta .stats { display: flex; gap: 12px; margin-top: 6px; font-size: 12.5px; color: var(--ink-2); flex-wrap: wrap; }
.rank-pill { min-width: 34px; height: 34px; border-radius: 10px; background: var(--bg-sunken); display: grid; place-items: center; font-weight: 800; font-size: 14px; color: var(--ink-2); flex: none; }

/* ---------------------------------------------------------------- steps / runner */
.steps { display: flex; gap: 8px; margin-bottom: 20px; }
.steps .s { flex: 1; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--bg-elev); border: 1px solid var(--line); font-weight: 700; font-size: 14px; color: var(--ink-3); }
.steps .s i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-sunken); font-style: normal; font-size: 12.5px; }
.steps .s.on { color: var(--ink); border-color: var(--brand); }
.steps .s.on i { background: var(--brand); color: #fff; }
.steps .s.done i { background: var(--brand-soft); color: var(--brand-ink); }

.runner { padding: 28px; }
.runner-top { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.runner-top .pct { font-size: 40px; font-weight: 850; letter-spacing: -0.04em; }
.timeline { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.timeline li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--ink-4); font-weight: 600; font-size: 14.5px; }
.timeline li .st { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; flex: none; }
.timeline li.active { color: var(--ink); background: var(--bg-sunken); }
.timeline li.active .st { border-color: var(--brand); color: var(--brand); }
.timeline li.done { color: var(--ink-2); }
.timeline li.done .st { background: var(--brand); border-color: var(--brand); color: #fff; }
.logbox { margin-top: 16px; max-height: 160px; overflow: auto; font-size: 13px; color: var(--ink-3); padding: 12px 14px; border-radius: 12px; background: var(--bg-sunken); line-height: 1.8; }

/* ---------------------------------------------------------------- report */
.report-hero { display: grid; grid-template-columns: 1fr auto; gap: 28px; padding: 28px; align-items: center; position: relative; overflow: hidden; }
.report-hero .place-head { display: flex; gap: 18px; align-items: center; }
.report-hero .cover { width: 96px; height: 96px; border-radius: 20px; object-fit: cover; background: var(--bg-sunken); flex: none; }
.report-hero h1 { font-size: 28px; font-weight: 850; }
.report-hero .meta { color: var(--ink-3); font-size: 14px; margin-top: 4px; }
.report-hero .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.gauge { position: relative; width: 168px; height: 168px; flex: none; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge .center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gauge .score { font-size: 46px; font-weight: 850; letter-spacing: -0.05em; line-height: 1; }
.gauge .of { font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.grade { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; font-weight: 900; font-size: 17px; color: #fff; }
.grade-S { background: linear-gradient(135deg, #0c9b6a, #19c98e); }
.grade-A { background: linear-gradient(135deg, #2f7cf6, #5b9bff); }
.grade-B { background: linear-gradient(135deg, #6653ff, #8d7fff); }
.grade-C { background: linear-gradient(135deg, #f0a020, #f6bc55); }
.grade-D { background: linear-gradient(135deg, #e5484d, #f07377); }

.consult { padding: 24px 28px; background: linear-gradient(135deg, var(--brand-soft), color-mix(in srgb, var(--violet-soft) 60%, var(--bg-elev))); border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--line)); }
.consult h2 { font-size: 21px; font-weight: 850; margin: 6px 0 10px; }
.consult p { color: var(--ink-2); font-size: 15px; line-height: 1.75; }
.sw { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.sw ul { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 14px; }
.sw h4 { font-size: 13px; font-weight: 800; }

.pillar { padding: 16px 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg-elev); }
.pillar .top { display: flex; justify-content: space-between; align-items: baseline; }
.pillar .name { font-weight: 750; font-size: 14.5px; }
.pillar .pts { font-weight: 800; font-size: 20px; letter-spacing: -0.03em; }
.pillar .pts small { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.pillar .desc { font-size: 12.5px; color: var(--ink-3); margin-top: 8px; line-height: 1.5; }
.pillar .progress { margin-top: 10px; }

.rank-card { padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.rank-card .kw { font-weight: 700; color: var(--ink-2); font-size: 14px; }
.rank-card .big { font-size: 38px; font-weight: 850; letter-spacing: -0.04em; line-height: 1.1; }
.rank-card .big small { font-size: 15px; color: var(--ink-3); font-weight: 600; margin-left: 4px; }

.action { display: flex; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.action:last-child { border-bottom: 0; }
.action input[type=checkbox] { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand); flex: none; cursor: pointer; }
.action .body { flex: 1; min-width: 0; }
.action .t { font-weight: 750; font-size: 15px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.action .d { font-size: 14px; color: var(--ink-2); margin-top: 4px; line-height: 1.6; }
.action .gain { font-weight: 800; color: var(--brand-ink); font-size: 14px; white-space: nowrap; }
.action.checked .t, .action.checked .d { text-decoration: line-through; color: var(--ink-4); }

.check { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px dashed var(--line); align-items: start; }
.check:last-child { border-bottom: 0; }
.check .ico { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; }
.check .ico.good { background: var(--brand-soft); color: var(--brand-ink); }
.check .ico.warn { background: var(--amber-soft); color: #c27800; }
.check .ico.bad { background: var(--red-soft); color: var(--red); }
.check .lbl { font-weight: 700; font-size: 14.5px; }
.check .val { font-size: 13.5px; color: var(--ink-2); margin-top: 1px; }
.check .why { font-size: 13px; color: var(--ink-3); margin-top: 6px; line-height: 1.6; }
.check .pts { font-weight: 800; font-size: 14px; white-space: nowrap; }

.kw-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-elev); font-size: 14px; font-weight: 650; cursor: pointer; }
.kw-chip:hover { border-color: var(--brand); }
.kw-chip small { color: var(--ink-3); font-weight: 500; font-size: 12px; }

.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding-top: 10px; }
.bars .b { flex: 1; background: var(--brand); border-radius: 6px 6px 2px 2px; min-height: 3px; position: relative; opacity: .85; transition: .2s; }
.bars .b:hover { opacity: 1; }
.bars .b span { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--ink-3); font-weight: 700; white-space: nowrap; }
.bars-x { display: flex; gap: 6px; margin-top: 6px; }
.bars-x span { flex: 1; text-align: center; font-size: 10.5px; color: var(--ink-4); }

.meter { display: flex; flex-direction: column; gap: 6px; }
.meter .row-between { font-size: 13.5px; }

.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 28px; border-radius: var(--radius-l); background: linear-gradient(120deg, #1c1640, #3b2bb8 55%, #6653ff); color: #fff; margin-top: 32px; overflow: hidden; position: relative; }
.cta-band h3 { font-size: 22px; font-weight: 850; }
.cta-band p { color: rgba(255,255,255,.78); margin-top: 6px; }
.cta-band .btn { background: #fff; color: #2a1f86; border-color: #fff; }

/* ---------------------------------------------------------------- landing */
.hero { position: relative; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; background:
  radial-gradient(60% 60% at 15% 10%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 70%),
  radial-gradient(50% 50% at 90% 20%, color-mix(in srgb, var(--violet) 16%, transparent), transparent 70%); }
.hero-inner { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; padding: 72px 24px 56px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 { font-size: 52px; font-weight: 900; letter-spacing: -0.045em; line-height: 1.15; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--brand), #16c08a 40%, var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 18px; color: var(--ink-2); margin-top: 20px; line-height: 1.7; max-width: 560px; }
.hero .cta { display: flex; gap: 10px; margin-top: 32px; flex-wrap: wrap; }
.hero .trust { display: flex; gap: 22px; margin-top: 28px; color: var(--ink-3); font-size: 13.5px; flex-wrap: wrap; }
.hero .trust span { display: flex; align-items: center; gap: 6px; }

.mock { position: relative; height: 480px; }
.mock .m-report { position: absolute; left: 0; top: 20px; width: 78%; padding: 22px; border-radius: 22px; background: var(--bg-elev); border: 1px solid var(--line); box-shadow: var(--shadow-l); animation: float 7s ease-in-out infinite; }
.mock .m-phone { position: absolute; right: 0; top: 0; width: 210px; height: 420px; border-radius: 34px; background: #0b0d12; padding: 9px; box-shadow: var(--shadow-l); animation: float 7s ease-in-out infinite -3.5s; }
.mock .m-screen { width: 100%; height: 100%; border-radius: 26px; overflow: hidden; position: relative; background: #222; }
.mock .m-slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; animation: slideshow 12s infinite; }
.mock .m-slide:nth-child(2) { animation-delay: 4s; }
.mock .m-slide:nth-child(3) { animation-delay: 8s; }
.mock .m-cap { position: absolute; left: 0; right: 0; top: 44%; text-align: center; font-family: "Black Han Sans", sans-serif; font-size: 22px; line-height: 1.25; }
.mock .m-cap b { background: #ffe14d; color: #111; padding: 2px 8px; border-radius: 6px; font-weight: 400; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.mock .m-bars { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 4px; z-index: 2; }
.mock .m-bars i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.35); overflow: hidden; }
.mock .m-bars i::after { content: ""; display: block; height: 100%; background: #fff; width: 0; animation: bar 12s infinite; }
.mock .m-bars i:nth-child(2)::after { animation-delay: 4s; }
.mock .m-bars i:nth-child(3)::after { animation-delay: 8s; }
@keyframes bar { 0% { width: 0; } 33% { width: 100%; } 33.01%, 100% { width: 0; } }
@keyframes slideshow { 0% { opacity: 0; transform: scale(1); } 3% { opacity: 1; } 33% { opacity: 1; transform: scale(1.12); } 36%, 100% { opacity: 0; } }
@keyframes float { 50% { transform: translateY(-10px); } }

.feature { padding: 32px; border-radius: 24px; position: relative; overflow: hidden; }
.feature .ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px; }
.feature .ic .icon { width: 24px; height: 24px; }
.feature h3 { font-size: 22px; font-weight: 850; }
.feature p { color: var(--ink-2); margin-top: 10px; }
.feature ul { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 10px; }
.feature li { display: flex; gap: 10px; font-size: 14.5px; color: var(--ink-2); }
.feature li .icon { color: var(--brand); margin-top: 3px; width: 16px; height: 16px; }
.how { counter-reset: how; }
.how .step { padding: 24px; }
.how .step::before { counter-increment: how; content: counter(how); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--ink); color: var(--bg-elev); font-weight: 800; margin-bottom: 14px; }
.how .step h4 { font-size: 17px; font-weight: 800; }
.how .step p { color: var(--ink-3); font-size: 14px; margin-top: 6px; }
.pricing { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; padding: 36px; align-items: center; }
.pricing h2 { font-size: 30px; font-weight: 900; }
.footer { border-top: 1px solid var(--line); padding: 28px 24px 100px; text-align: center; color: var(--ink-3); font-size: 13px; }

/* ---------------------------------------------------------------- login */
.auth-wrap { min-height: calc(100vh - var(--nav-h)); display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 420px; padding: 36px; }
.auth-card h1 { font-size: 26px; font-weight: 850; }
.auth-card .desc { color: var(--ink-3); margin: 8px 0 26px; font-size: 14.5px; }
.auth-links { display: flex; justify-content: center; gap: 14px; margin-top: 20px; font-size: 13.5px; color: var(--ink-3); }
.auth-links a:hover { color: var(--ink); text-decoration: underline; }

/* ---------------------------------------------------------------- studio */
.studio { display: grid; grid-template-columns: 280px minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.studio > * { min-width: 0; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .row { flex-wrap: wrap; }
.scene-list { display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.scene-item { display: flex; gap: 10px; padding: 8px; border-radius: 12px; border: 1.5px solid transparent; cursor: pointer; align-items: center; background: var(--bg-sunken); transition: .12s; }
.scene-item:hover { border-color: var(--line-strong); }
.scene-item.on { border-color: var(--violet); background: var(--violet-soft); }
.scene-item.drag-over { border-style: dashed; border-color: var(--violet); }
.scene-item .th { width: 44px; height: 78px; border-radius: 8px; background: #222 center/cover; flex: none; }
.scene-item .tx { min-width: 0; flex: 1; }
.scene-item .tx b { font-size: 12px; color: var(--violet); font-weight: 800; }
.scene-item .tx p { font-size: 13px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.4; }
.scene-item .tx span { font-size: 11.5px; color: var(--ink-3); }
.stage { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 20px; position: sticky; top: calc(var(--nav-h) + 16px); }
.phone { width: min(100%, 340px); aspect-ratio: 9 / 16; border-radius: 30px; background: #000; padding: 8px; box-shadow: var(--shadow-l); }
.phone canvas { width: 100%; height: 100%; border-radius: 23px; display: block; background: #111; }
.player { display: flex; align-items: center; gap: 12px; width: min(100%, 340px); }
.player input[type=range] { flex: 1; accent-color: var(--violet); }
.player .time { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; min-width: 78px; text-align: right; }
.inspector { padding: 0; }
.inspector .sec { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.inspector .sec:last-child { border-bottom: 0; }
.inspector h4 { font-size: 13px; font-weight: 800; color: var(--ink-3); letter-spacing: .02em; }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; max-height: 210px; overflow: auto; }
.gallery button { aspect-ratio: 3/4; border-radius: 8px; border: 2px solid transparent; background: var(--bg-sunken) center/cover; cursor: pointer; padding: 0; }
.gallery button.on { border-color: var(--violet); }
.gallery .up { display: grid; place-items: center; color: var(--ink-3); border: 1.5px dashed var(--line-strong); }
.theme-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.theme-card { padding: 12px; border-radius: 12px; border: 1.5px solid var(--line); cursor: pointer; text-align: left; background: var(--bg-elev); }
.theme-card.on { border-color: var(--violet); box-shadow: 0 0 0 3px color-mix(in srgb, var(--violet) 18%, transparent); }
.theme-card .sw8 { height: 44px; border-radius: 8px; margin-bottom: 8px; display: grid; place-items: center; font-weight: 900; font-size: 15px; background: #1b1b1f; }
.theme-card b { font-size: 13.5px; display: block; }
.theme-card span { font-size: 11.5px; color: var(--ink-3); line-height: 1.4; display: block; }
.render-box { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.video-out { width: 100%; border-radius: 14px; background: #000; aspect-ratio: 9/16; max-height: 520px; }
.copy-box { padding: 12px 14px; border-radius: 12px; background: var(--bg-sunken); font-size: 13.5px; white-space: pre-wrap; line-height: 1.6; }
.save-state { font-size: 12.5px; color: var(--ink-3); }

.project-card { overflow: hidden; display: flex; flex-direction: column; }
.project-card .cv { aspect-ratio: 9/12; background: #1b1b1f center/cover; position: relative; }
.project-card .cv .badge { position: absolute; left: 10px; top: 10px; }
.project-card .bd { padding: 14px 16px; }
.project-card .bd b { display: block; font-size: 15px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.report-card { display: flex; gap: 14px; padding: 16px; align-items: center; transition: .15s; }
.report-card:hover { box-shadow: var(--shadow); border-color: var(--line-strong); }
.report-card img, .report-card .ph { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; background: var(--bg-sunken); flex: none; }
.report-card .info { flex: 1; min-width: 0; }
.report-card .info b { display: block; font-size: 15px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.report-card .info span { font-size: 12.5px; color: var(--ink-3); }
.report-card .sc { font-size: 24px; font-weight: 850; letter-spacing: -0.04em; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1280px) {
  .studio { grid-template-columns: 240px minmax(0, 1fr) 320px; }
}
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 48px; }
  .mock { height: 440px; max-width: 560px; margin: 0 auto; width: 100%; }
  .hero h1 { font-size: 42px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio { grid-template-columns: 1fr 1fr; }
  .studio .stage { grid-column: 1 / -1; grid-row: 1; position: static; }
  .pricing { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  body { font-size: 14.5px; }
  .nav-links, .user-chip .who { display: none; }
  .nav-inner { padding: 0 16px; gap: 12px; }
  .page { padding: 20px 16px calc(var(--tab-h) + 40px); }
  .page-head h1 { font-size: 23px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; height: calc(var(--tab-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom); background: color-mix(in srgb, var(--bg-elev) 92%, transparent);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 700; color: var(--ink-4); }
  .tabbar a .icon { width: 22px; height: 22px; }
  .tabbar a.active { color: var(--brand); }
  .card-pad, .runner { padding: 18px; }
  .card-head { padding: 16px 18px 0; }
  .card-body { padding: 12px 18px 18px; }
  .report-hero { grid-template-columns: 1fr; padding: 20px; gap: 18px; }
  .report-hero .gauge { margin: 0 auto; width: 150px; height: 150px; }
  .report-hero h1 { font-size: 22px; }
  .report-hero .cover { width: 68px; height: 68px; border-radius: 16px; }
  .sw { grid-template-columns: 1fr; }
  .steps .s span { display: none; }
  .steps .s { justify-content: center; }
  .studio { grid-template-columns: 1fr; }
  .studio .scene-list { flex-direction: row; overflow-x: auto; }
  .studio .scene-item { flex-direction: column; min-width: 96px; align-items: stretch; }
  .studio .scene-item .th { width: 100%; height: 110px; }
  .studio .scene-item .tx span { display: none; }
  .cta-band { flex-direction: column; align-items: flex-start; }
  .hero h1 { font-size: 34px; }
  .hero .lead { font-size: 16px; }
  .mock { height: auto; }
  .mock .m-report { position: relative; width: 100%; top: 0; animation: none; }
  .mock .m-phone { display: none; }
  .toolbar > .row:first-child { flex: 1 1 100%; }
  .toolbar .btn-sm { height: 32px; padding: 0 10px; font-size: 12.5px; }
  .stage { padding: 14px; }
  .phone { width: min(100%, 300px); }
  .toast-wrap { bottom: calc(var(--tab-h) + 20px); }
  .table-cards thead { display: none; }
  .table-cards tr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .table-cards td { border: 0; padding: 2px 0; }
  .table-cards td[data-label]::before { content: attr(data-label) " "; color: var(--ink-3); font-size: 12px; }
  .table-cards td.is-title { grid-column: 1 / -1; font-weight: 750; }
}
@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .search-hero { padding-left: 14px; }
  .search-hero input { font-size: 16px; }
  .search-hero .btn { padding: 0 14px; }
  .hero h1 { font-size: 30px; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
}

/* ---------------------------------------------------------------- print (리포트 PDF 저장) */
@media print {
  .nav, .tabbar, .no-print, .toast-wrap { display: none !important; }
  body { background: #fff; }
  .page { padding: 0; max-width: none; }
  .card { box-shadow: none; break-inside: avoid; }
}
