/* ===========================================================
   차값비교 — 디자인 토큰
   =========================================================== */
:root {
  --brand: #1a56db;
  --brand-ink: #0b3fa8;
  --brand-soft: #eaf0ff;
  --accent: #0fb9a4;
  --warn: #e0532f;
  --gold: #f0a500;

  --bg: #ffffff;
  --bg-alt: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --line: #e4e8f0;
  --line-2: #d3d9e6;
  --text: #121826;
  --text-2: #4a5468;
  --muted: #8a93a6;

  --ink-dark: #0d1220;

  --r-sm: 8px;
  --r: 14px;
  --r-lg: 20px;
  --shadow: 0 1px 2px rgba(18, 24, 38, .05), 0 8px 24px rgba(18, 24, 38, .06);
  --shadow-lg: 0 2px 6px rgba(18, 24, 38, .07), 0 18px 48px rgba(18, 24, 38, .12);

  --wrap: 1120px;
  --cta-h: 64px;
  --hd-h: 60px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #5b8cff;
    --brand-ink: #86a9ff;
    --brand-soft: #16203a;
    --accent: #28d3ba;

    --bg: #0c111c;
    --bg-alt: #101725;
    --surface: #141c2c;
    --surface-2: #192234;
    --line: #26314a;
    --line-2: #32405d;
    --text: #e9edf6;
    --text-2: #aab4c8;
    --muted: #78849c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .45), 0 18px 48px rgba(0, 0, 0, .5);
  }
}
:root[data-theme="dark"] {
  --brand: #5b8cff; --brand-ink: #86a9ff; --brand-soft: #16203a; --accent: #28d3ba;
  --bg: #0c111c; --bg-alt: #101725; --surface: #141c2c; --surface-2: #192234;
  --line: #26314a; --line-2: #32405d; --text: #e9edf6; --text-2: #aab4c8; --muted: #78849c;
}

/* ===========================================================
   기본
   =========================================================== */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    system-ui, "Malgun Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: break-word;
  padding-bottom: calc(var(--cta-h) + env(safe-area-inset-bottom));
}
@media (min-width: 900px) { body { padding-bottom: 0; } }

h1, h2, h3, h4 { margin: 0; line-height: 1.32; letter-spacing: -.02em; font-weight: 800; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 0 0 var(--r-sm) 0;
}
.skip:focus { left: 0; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

/* ===========================================================
   준비 중 안내 띠
   =========================================================== */
.demo-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 9px 16px;
  background: color-mix(in srgb, var(--gold) 16%, var(--bg));
  color: var(--text); border-bottom: 1px solid color-mix(in srgb, var(--gold) 35%, transparent);
  font-size: 13px; line-height: 1.5;
}
.demo-tag {
  flex: none; padding: 2px 8px; border-radius: 999px;
  background: var(--gold); color: #3a2800; font-weight: 800; font-size: 12px;
}
body.is-admin .demo-bar { display: none; }
.ft-note-demo {
  background: color-mix(in srgb, var(--gold) 12%, transparent);
  color: var(--text-2);
}

/* ===========================================================
   헤더
   =========================================================== */
.hd {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.hd-in { display: flex; align-items: center; gap: 20px; height: var(--hd-h); }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: -.03em; }
.logo-mark {
  width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #7fb0ff, var(--brand) 55%, var(--brand-ink));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
  flex: none;
}
.logo-txt { font-size: 19px; }
.logo-txt b { color: var(--brand); font-weight: 800; }

.gnb { display: none; gap: 4px; margin-left: 8px; }
@media (min-width: 900px) { .gnb { display: flex; } }
.gnb a {
  padding: 8px 12px; border-radius: var(--r-sm);
  color: var(--text-2); font-weight: 600; font-size: 15px;
}
.gnb a:hover { background: var(--surface-2); color: var(--text); }
.gnb a[aria-current="page"] { color: var(--brand); background: var(--brand-soft); }

.hd-act { display: none; margin-left: auto; gap: 8px; }
@media (min-width: 900px) { .hd-act { display: flex; } }

.hd-menu {
  margin-left: auto; width: 40px; height: 40px; border: 0; background: none;
  display: grid; place-content: center; gap: 4px; cursor: pointer; border-radius: var(--r-sm);
}
.hd-menu span { display: block; width: 19px; height: 2px; background: var(--text); border-radius: 2px; }
@media (min-width: 900px) { .hd-menu { display: none; } }

.drawer { border-top: 1px solid var(--line); background: var(--bg); }
.drawer nav { display: grid; padding: 8px 16px 14px; }
.drawer a { padding: 12px 4px; border-bottom: 1px solid var(--line); font-weight: 600; }
.drawer a:last-child { border-bottom: 0; }

/* ===========================================================
   버튼
   =========================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 13px 20px; border-radius: var(--r);
  border: 1px solid transparent; background: var(--surface-2); color: var(--text);
  font-weight: 700; cursor: pointer; text-align: center;
  transition: transform .06s ease, background .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-ink); }
.btn-dark { background: var(--ink-dark); color: #fff; }
.btn-line { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn-line:hover { border-color: var(--brand); color: var(--brand); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-sm { padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.btn-lg { padding: 17px 24px; font-size: 17px; width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ===========================================================
   섹션 공통
   =========================================================== */
.sec { padding: 48px 0; }
.sec-alt { background: var(--bg-alt); }
@media (min-width: 720px) { .sec { padding: 72px 0; } }

.sec-head { margin-bottom: 24px; }
.sec-head .eyebrow {
  display: inline-block; color: var(--brand); font-weight: 700; font-size: 14px;
  margin-bottom: 6px;
}
.sec-head h2 { font-size: 24px; }
@media (min-width: 720px) { .sec-head h2 { font-size: 30px; } }
.sec-head p { color: var(--text-2); margin-top: 8px; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow);
}
.grid { display: grid; gap: 14px; }
@media (min-width: 640px) { .g2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 640px) and (max-width: 899px) { .g4 { grid-template-columns: repeat(2, 1fr); } }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 11px; border-radius: 999px; background: var(--brand-soft);
  color: var(--brand); font-size: 13px; font-weight: 700;
}
.chip-gray { background: var(--surface-2); color: var(--text-2); }

/* ===========================================================
   히어로
   =========================================================== */
.hero { position: relative; overflow: hidden; background: var(--bg-alt); }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto -10%; height: 70%;
  background: radial-gradient(60% 100% at 50% 0%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 70%);
  pointer-events: none;
}
.hero-in { position: relative; padding: 36px 0 44px; }
@media (min-width: 900px) {
  .hero-in { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; padding: 64px 0 72px; }
}
.hero h1 { font-size: 30px; letter-spacing: -.035em; }
@media (min-width: 720px) { .hero h1 { font-size: 44px; } }
.hero h1 .hl { color: var(--brand); }
.hero-sub { margin-top: 14px; color: var(--text-2); font-size: 16px; }
@media (min-width: 720px) { .hero-sub { font-size: 18px; } }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

/* 견적 시작 폼 */
.quote-card { margin-top: 24px; }
@media (min-width: 900px) { .quote-card { margin-top: 0; } }
.quote-card .card { padding: 22px; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
.field { display: block; margin-bottom: 14px; }
.field > span.lb { display: block; font-size: 14px; font-weight: 700; margin-bottom: 7px; }
.field > span.hint { display: block; font-size: 13px; color: var(--muted); margin-top: 6px; }
.input, .select {
  width: 100%; padding: 14px 15px; border-radius: var(--r);
  border: 1.5px solid var(--line-2); background: var(--surface);
  font-size: 16px; transition: border-color .15s;
}
.input:focus, .select:focus { border-color: var(--brand); outline: none; }
.input.plate {
  text-align: center; font-size: 22px; font-weight: 800; letter-spacing: .06em;
  padding: 16px; font-variant-numeric: tabular-nums;
}
.input.err { border-color: var(--warn); }
.err-msg { color: var(--warn); font-size: 13px; margin-top: 6px; }

.seg { display: grid; grid-auto-flow: column; gap: 8px; }
.seg.col2 { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); }
.seg.col3 { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  display: block; text-align: center; padding: 12px 8px; cursor: pointer;
  border: 1.5px solid var(--line-2); border-radius: var(--r);
  font-weight: 600; font-size: 15px; background: var(--surface);
  transition: all .15s;
}
.seg label small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-top: 2px; }
.seg input:checked + label {
  border-color: var(--brand); background: var(--brand-soft); color: var(--brand);
}
.seg input:checked + label small { color: var(--brand); }
.seg input:focus-visible + label { outline: 3px solid var(--brand); outline-offset: 2px; }

/* ===========================================================
   3-way 비교 그래프
   =========================================================== */
.compare { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: end; min-height: 220px; }
.cmp-col { text-align: center; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.cmp-bar {
  border-radius: 12px 12px 0 0; background: linear-gradient(180deg, var(--line-2), var(--line));
  transition: height .7s cubic-bezier(.2, .8, .2, 1);
  min-height: 24px;
}
.cmp-col.win .cmp-bar { background: linear-gradient(180deg, #5b8cff, var(--brand) 60%, var(--brand-ink)); }
.cmp-amt { font-weight: 800; font-size: 17px; margin-top: 10px; font-variant-numeric: tabular-nums; }
.cmp-col.win .cmp-amt { color: var(--brand); }
.cmp-lb { font-size: 13px; color: var(--text-2); margin-bottom: 8px; font-weight: 600; }
.cmp-note { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ===========================================================
   결과 화면
   =========================================================== */
.result-hero {
  background: linear-gradient(135deg, var(--brand), var(--brand-ink));
  color: #fff; border-radius: var(--r-lg); padding: 26px 22px; text-align: center;
}
.result-hero .lb { font-size: 14px; opacity: .85; font-weight: 600; }
.result-hero .amt { font-size: 32px; font-weight: 800; margin: 6px 0 4px; letter-spacing: -.03em; }
@media (min-width: 720px) { .result-hero .amt { font-size: 42px; } }
.result-hero .sub { font-size: 14px; opacity: .9; }

.calc-list { display: grid; gap: 0; margin-top: 8px; }
.calc-row {
  display: flex; justify-content: space-between; gap: 12px; align-items: flex-start;
  padding: 13px 0; border-bottom: 1px solid var(--line);
}
.calc-row:last-child { border-bottom: 0; }
.calc-row .k { font-weight: 700; font-size: 15px; }
.calc-row .k small { display: block; font-weight: 500; color: var(--muted); font-size: 13px; margin-top: 3px; }
.calc-row .v { font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.calc-row .v.pos { color: var(--accent); }
.calc-row .v.neg { color: var(--warn); }
.calc-row .v.neu { color: var(--muted); font-weight: 600; }

/* ===========================================================
   단계 / 리스트 / FAQ
   =========================================================== */
.steps { counter-reset: s; display: grid; gap: 12px; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step-no {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand); color: #fff; display: grid; place-content: center;
  font-size: 14px; font-weight: 800;
}
.step h4 { font-size: 16px; }
.step p { color: var(--text-2); font-size: 14px; margin-top: 3px; }

.trust { display: grid; gap: 10px; }
.trust li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.trust li::before {
  content: "✓"; flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand); display: grid; place-content: center;
  font-size: 13px; font-weight: 800; margin-top: 1px;
}

.faq details {
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
  padding: 0 16px; margin-bottom: 10px;
}
.faq summary {
  cursor: pointer; padding: 16px 0; font-weight: 700; list-style: none;
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 22px; flex: none; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding-bottom: 16px; color: var(--text-2); font-size: 15px; }

/* 시세표 */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table.pt { width: 100%; border-collapse: collapse; min-width: 520px; }
table.pt th, table.pt td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); }
table.pt th { background: var(--surface-2); font-size: 14px; font-weight: 700; }
table.pt td { font-size: 15px; }
table.pt tr:last-child td { border-bottom: 0; }
table.pt .amt { font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.pt .models { color: var(--muted); font-size: 13px; }

/* 후기 */
.reviews { display: grid; gap: 12px; }
.review .stars { color: var(--gold); font-size: 14px; letter-spacing: 2px; }
.review .txt { margin: 8px 0; font-size: 15px; color: var(--text-2); }
.review .meta { font-size: 13px; font-weight: 700; }

/* 사례 카드 */
.case { text-align: center; }
.case .yr { font-size: 12px; font-weight: 700; color: var(--brand); }
.case .nm { font-size: 17px; font-weight: 800; margin: 4px 0 10px; }
.case dl { display: grid; gap: 6px; margin: 0; }
.case .r { display: flex; justify-content: space-between; font-size: 14px; }
.case .r.hl { color: var(--brand); font-weight: 800; }
.case .up {
  margin-top: 10px; padding: 8px; border-radius: 10px;
  background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 14px;
}

/* 알림 박스 */
.note {
  border-radius: var(--r); padding: 14px 16px; font-size: 14px;
  background: var(--brand-soft); color: var(--brand-ink); border: 1px solid transparent;
}
.note b { display: block; margin-bottom: 4px; }
.note-warn { background: color-mix(in srgb, var(--warn) 10%, transparent); color: var(--warn); }
.note-gray { background: var(--surface-2); color: var(--text-2); }

/* 약관 동의 */
.agree { display: grid; gap: 2px; }
.agree label { display: flex; gap: 10px; align-items: center; padding: 11px 2px; cursor: pointer; font-size: 15px; }
.agree input { width: 20px; height: 20px; accent-color: var(--brand); flex: none; }
.agree .all { border-bottom: 1px solid var(--line); margin-bottom: 6px; font-weight: 800; }

/* 진행 표시 */
.prog { display: flex; gap: 6px; margin-bottom: 20px; }
.prog i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.prog i.on { background: var(--brand); }

/* 신청 완료 */
.done-ico {
  width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-content: center; font-size: 30px;
}
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.summary-row:last-child { border-bottom: 0; }
.summary-row .k { color: var(--text-2); }
.summary-row .v { font-weight: 700; text-align: right; }

/* 신청 내역 */
.apply-item { display: block; }
.apply-item + .apply-item { margin-top: 12px; }
.apply-item .top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.apply-item .plate { font-size: 18px; font-weight: 800; letter-spacing: .04em; }

/* ===========================================================
   하단 고정 CTA
   =========================================================== */
.cta-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  display: grid; grid-template-columns: 76px 76px 1fr; gap: 8px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
@media (min-width: 900px) { .cta-bar { display: none; } }
.cta {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  height: 48px; border-radius: var(--r); font-size: 12px; font-weight: 700;
  background: var(--surface-2); color: var(--text-2);
}
.cta svg { width: 20px; height: 20px; fill: currentColor; }
.cta-kko { background: #fee500; color: #191600; }
.cta-main {
  background: var(--brand); color: #fff; font-size: 15px; flex-direction: row;
}

/* PWA 설치 안내 */
.install {
  position: fixed; left: 12px; right: 12px; z-index: 46;
  bottom: calc(var(--cta-h) + 12px + env(safe-area-inset-bottom));
}
@media (min-width: 900px) { .install { left: auto; width: 380px; right: 20px; bottom: 20px; } }
.install-in {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 12px 14px; box-shadow: var(--shadow-lg);
}
.install-ico {
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  background: radial-gradient(circle at 32% 30%, #7fb0ff, var(--brand) 55%, var(--brand-ink));
}
.install-in b { font-size: 14px; }
.install-in p { font-size: 12px; color: var(--muted); }
.install-x { border: 0; background: none; color: var(--muted); font-size: 22px; cursor: pointer; line-height: 1; padding: 0 2px; }

/* 토스트 */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--cta-h) + 20px + env(safe-area-inset-bottom)); z-index: 60;
  background: var(--ink-dark); color: #fff; padding: 12px 20px;
  border-radius: 999px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg);
  animation: toastIn .25s ease;
}
@media (min-width: 900px) { .toast { bottom: 24px; } }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } }

/* ===========================================================
   푸터
   =========================================================== */
.ft { background: var(--bg-alt); border-top: 1px solid var(--line); padding: 36px 0 32px; margin-top: 8px; }
.ft-top { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.ft-nav { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: var(--text-2); font-weight: 600; }
.ft-biz { font-size: 13px; color: var(--muted); line-height: 1.9; }
.ft-biz span { margin-right: 14px; white-space: nowrap; }
.ft-note {
  margin-top: 16px; padding: 14px 16px; border-radius: var(--r);
  background: var(--surface-2); color: var(--text-2); font-size: 13px; line-height: 1.7;
}
.ft-copy { margin-top: 14px; font-size: 13px; color: var(--muted); }

/* ===========================================================
   관리자 콘솔 — PC 기준
   =========================================================== */
body.is-admin { padding-bottom: 0; background: var(--bg-alt); }
body.is-admin .hd, body.is-admin .ft, body.is-admin .cta-bar, body.is-admin .install { display: none; }

.admin { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
@media (min-width: 1000px) { .admin { grid-template-columns: 268px 1fr; } }

.admin-side {
  background: var(--surface); border-bottom: 1px solid var(--line);
  padding: 20px 18px; display: flex; flex-direction: column; gap: 18px;
}
@media (min-width: 1000px) {
  .admin-side { border-bottom: 0; border-right: 1px solid var(--line); position: sticky; top: 0; height: 100vh; }
}
.admin-brand { display: flex; align-items: center; gap: 10px; }
.admin-brand b { display: block; font-size: 16px; }
.admin-brand span { font-size: 12px; color: var(--muted); }
.admin-filter .field { margin-bottom: 16px; }
.admin-side-foot { margin-top: auto; display: grid; gap: 8px; }

.admin-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip {
  padding: 7px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--surface);
  font-size: 13px; font-weight: 600; color: var(--text-2);
}
.fchip:hover { border-color: var(--brand); color: var(--brand); }
.fchip.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.admin-main { padding: 20px 18px 40px; min-width: 0; }
@media (min-width: 1000px) { .admin-main { padding: 28px 32px 48px; } }
.admin-head {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start;
  justify-content: space-between; margin-bottom: 20px;
}
.admin-head h1 { font-size: 24px; }

.kpi { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; }
@media (min-width: 760px) { .kpi { grid-template-columns: repeat(4, 1fr); } }
.kpi-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 4px;
}
.kpi-card span { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi-card b { font-size: 26px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

.admin-body { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
@media (min-width: 1280px) { .admin-body { grid-template-columns: minmax(0, 1fr) 340px; } }

.admin-table-wrap {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden; min-width: 0;
}
.admin-table-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.table-scroll { overflow-x: auto; }
table.adm { width: 100%; border-collapse: collapse; min-width: 720px; }
table.adm th, table.adm td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); }
table.adm th { background: var(--surface-2); font-size: 12px; font-weight: 700; color: var(--text-2); white-space: nowrap; }
table.adm td { font-size: 14px; vertical-align: top; }
table.adm td .small { white-space: nowrap; }
table.adm td:first-child { white-space: nowrap; }
table.adm tbody tr { cursor: pointer; }
table.adm tbody tr:hover { background: var(--surface-2); }
table.adm tbody tr.sel { background: var(--brand-soft); }
table.adm tbody tr:last-child td { border-bottom: 0; }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

.badge {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.b-blue { background: var(--brand-soft); color: var(--brand); }
.b-gold { background: color-mix(in srgb, var(--gold) 16%, transparent); color: #a97400; }
.b-green { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.b-gray { background: var(--surface-2); color: var(--muted); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .b-gold { color: var(--gold); } }

.tag-sample {
  display: inline-block; padding: 2px 6px; border-radius: 5px; margin-left: 4px;
  background: var(--surface-2); color: var(--muted); font-size: 11px; font-weight: 700;
}

.admin-empty { padding: 48px 20px; text-align: center; }

/* 로그인 / 로딩 게이트 */
.admin-gate {
  min-height: 100vh; display: grid; place-items: center;
  padding: 24px 16px; background: var(--bg-alt);
}
.admin-login { width: 100%; max-width: 380px; }

.admin-detail {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 18px;
}
@media (min-width: 1280px) { .admin-detail { position: sticky; top: 20px; } }
.detail-empty { padding: 40px 10px; text-align: center; }
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.detail-head h2 { font-size: 21px; letter-spacing: .02em; }
.detail-rows { border-top: 1px solid var(--line); margin-bottom: 16px; }
.detail-act { margin-top: 14px; }
.detail-act .lb { display: block; font-size: 13px; font-weight: 700; margin-bottom: 8px; }

/* ===========================================================
   넓은 화면 보정 — 집에서 PC로 보는 사용자 화면
   =========================================================== */
@media (min-width: 1280px) {
  :root { --wrap: 1200px; }
  .hero h1 { font-size: 50px; }
  .hero-in { gap: 56px; }
}
@media (min-width: 1000px) {
  /* 본문이 지나치게 넓어지지 않도록 읽기 폭을 제한 */
  .sec-head p, .ft-note { max-width: 62ch; }
}

/* 애니메이션 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.fade { animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }
