/* [데모] AI 경매 플랫폼 · 데모용 스타일. 실제 서비스 화면이 아닙니다. */
/* Layout: sticky top bar + step nav (the demo scenario) over one working view; cards only where a block is a separate object */
:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #eceff4;
  --fg: #17202c;
  --muted: #5a6575;
  --line: #d9dee6;
  --accent: #2f45a3;
  --accent-soft: #e6eafa;
  --on-accent: #ffffff;
  --good: #1d7f55;
  --warn: #a8690f;
  --bad: #b83a26;
  --good-soft: #e3f3eb;
  --warn-soft: #fbf0dc;
  --bad-soft: #fbe6e2;
  --bubble: #fdf6d8;
  --font-head: "IBM Plex Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-body: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f141b; --surface: #171e28; --surface-2: #1f2833; --fg: #e5e9ef; --muted: #9aa5b4; --line: #2b3542;
    --accent: #93a5ff; --accent-soft: #232c4d; --on-accent: #0f141b;
    --good: #52c48f; --warn: #e3ac4e; --bad: #f08570; --good-soft: #17382a; --warn-soft: #3a2d14; --bad-soft: #3d1f1a; --bubble: #3a3518;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f141b; --surface: #171e28; --surface-2: #1f2833; --fg: #e5e9ef; --muted: #9aa5b4; --line: #2b3542;
  --accent: #93a5ff; --accent-soft: #232c4d; --on-accent: #0f141b;
  --good: #52c48f; --warn: #e3ac4e; --bad: #f08570; --good-soft: #17382a; --warn-soft: #3a2d14; --bad-soft: #3d1f1a; --bubble: #3a3518;
  color-scheme: dark;
}
* { box-sizing: border-box; }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
body { margin: 0; }
[hidden] { display: none !important; }
body { background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 14px; line-height: 1.6; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }
h1, h2, h3 { font-family: var(--font-head); text-wrap: balance; margin: 0; line-height: 1.3; }
h1 { font-size: 17px; font-weight: 700; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--surface); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.brand small { color: var(--muted); font-size: 12px; }
.demo-pill { font-size: 12px; color: var(--warn); background: var(--warn-soft); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.steps { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: thin; }
.step { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; white-space: nowrap; font-size: 13px; border: 1px solid transparent; }
.step:hover { background: var(--surface-2); }
.step .dot { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--muted); font-variant-numeric: tabular-nums; }
.step.done .dot { background: var(--good-soft); color: var(--good); }
.step.on { color: var(--fg); border-color: var(--line); background: var(--bg); font-weight: 500; }
.step.on .dot { background: var(--accent); color: var(--on-accent); }

main { padding-block: 24px 64px; display: grid; gap: 20px; }
.view-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.view-head p { color: var(--muted); margin-top: 4px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 820px) { .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 14px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.hint { color: var(--muted); font-size: 12.5px; }
.label { font-size: 12px; color: var(--muted); letter-spacing: 0.02em; }

.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fields .full { grid-column: 1 / -1; }
@media (max-width: 520px) { .fields { grid-template-columns: minmax(0, 1fr); } }
.field { display: grid; gap: 4px; min-width: 0; }
.field label { font-size: 12.5px; color: var(--muted); }
input[type=text], input[type=number], input[type=date], input[type=tel], input[type=datetime-local], select, textarea {
  width: 100%; font: inherit; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-width: 0;
}
textarea { resize: vertical; line-height: 1.7; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.unit { position: relative; }
.unit input { padding-right: 44px; }
.unit span { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 12px; pointer-events: none; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.checks label { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--fg); }

.btn { font: inherit; font-weight: 500; border-radius: 8px; padding: 8px 14px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.pill { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.accent { background: var(--accent-soft); color: var(--accent); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 500; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }

.notice { border-radius: 8px; padding: 10px 14px; font-size: 13px; background: var(--surface-2); color: var(--muted); }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.empty { text-align: center; padding: 40px 20px; display: grid; gap: 12px; justify-items: center; color: var(--muted); }

/* analysis */
.summary { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 820px) { .summary { grid-template-columns: minmax(0, 1fr); } }
.big { font-family: var(--font-head); font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.25; }
.range { position: relative; height: 44px; margin-top: 8px; }
.range .track { position: absolute; left: 0; right: 0; top: 18px; height: 8px; border-radius: 4px; background: var(--surface-2); }
.range .band { position: absolute; top: 14px; height: 16px; border-radius: 4px; background: var(--accent); opacity: 0.28; }
.range .tick { position: absolute; top: 8px; width: 2px; height: 28px; border-radius: 1px; transform: translateX(-1px); }
.key { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; font-size: 12.5px; }
@media (max-width: 520px) { .key { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.key div { display: grid; gap: 2px; }
.key i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.score-total { display: flex; align-items: baseline; gap: 6px; }
.score-total .big { font-size: 40px; }
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 32px; align-items: center; gap: 10px; font-size: 13px; }
.bar { height: 10px; background: var(--surface-2); border-radius: 5px; overflow: hidden; }
.bar b { display: block; height: 100%; border-radius: 5px; background: var(--accent); }
.strat { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 6px; }
.strat.mid { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cautions { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.score-cell { font-weight: 700; font-variant-numeric: tabular-nums; }

/* content */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tab { font: inherit; background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 14px; color: var(--muted); cursor: pointer; }
.tab.on { color: var(--fg); border-bottom-color: var(--accent); font-weight: 500; }

/* alimtalk */
.phone { background: var(--surface-2); border-radius: 14px; padding: 16px; display: grid; gap: 8px; }
.bubble { background: var(--bubble); color: var(--fg); border-radius: 4px 14px 14px 14px; padding: 12px 14px; white-space: pre-wrap; font-size: 13.5px; max-width: 340px; }
.bubble-from { font-size: 12px; color: var(--muted); }

/* report + site */
.doc { max-width: 760px; margin: 0 auto; width: 100%; }
.site-hero { background: var(--accent); color: var(--on-accent); border-radius: var(--radius); padding: 32px 24px; display: grid; gap: 8px; }
.site-hero h2 { font-size: 24px; }
.site-hero p { opacity: 0.9; }
.prop-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--fg); color: var(--bg); padding: 10px 18px; border-radius: 8px; font-size: 13.5px; z-index: 20; max-width: calc(100% - 32px); }
@media (prefers-reduced-motion: no-preference) { .step, .btn, .bar b { transition: background-color .15s, width .4s; } }

/* demo labels */
.demo-banner { display: flex; gap: 10px; align-items: flex-start; border: 1px dashed var(--warn); background: var(--warn-soft); color: var(--warn); border-radius: 8px; padding: 10px 14px; font-size: 13px; }
.demo-banner strong { white-space: nowrap; }
.demo-stamp { position: fixed; right: max(12px, env(safe-area-inset-right, 0px)); bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 15; background: var(--warn); color: var(--surface); font-family: var(--font-head); font-weight: 700; font-size: 12px; letter-spacing: 0.06em; padding: 6px 12px; border-radius: 999px; pointer-events: none; box-shadow: 0 2px 8px rgb(0 0 0 / 0.18); }
.demo-tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; color: var(--warn); border: 1px solid var(--warn); border-radius: 4px; padding: 0 5px; margin-right: 6px; vertical-align: 1px; }
