:root {
  color-scheme: light;
  --bg: #f4f6fa; --surface: #ffffff; --surface-2: #eef2f8; --ink: #0f1a2e; --ink-2: #46526a; --muted: #7a8399;
  --line: #e2e7ef; --accent: #2a6fd6; --accent-ink: #ffffff; --accent-soft: #e5efff;
  --pos: #12875a; --neg: #d43f3f; --warn: #b77700; --pos-soft: #e3f5ec; --neg-soft: #fde9e9; --warn-soft: #fff4dc;
  --navy: #0f1a2e; --shadow: 0 1px 2px rgba(15, 26, 46, .05), 0 4px 16px rgba(15, 26, 46, .05);
  --r: 16px; --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a1120; --surface: #111a2c; --surface-2: #17223a; --ink: #e9eef7; --ink-2: #b4bed0; --muted: #8692a8;
    --line: #223050; --accent: #5b9cf2; --accent-ink: #08101f; --accent-soft: #1a2c4d;
    --pos: #3ccf8e; --neg: #ff6b6b; --warn: #f2b33d; --pos-soft: #12322a; --neg-soft: #3a1a20; --warn-soft: #3a2c10;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a1120; --surface: #111a2c; --surface-2: #17223a; --ink: #e9eef7; --ink-2: #b4bed0; --muted: #8692a8;
  --line: #223050; --accent: #5b9cf2; --accent-ink: #08101f; --accent-soft: #1a2c4d;
  --pos: #3ccf8e; --neg: #ff6b6b; --warn: #f2b33d; --pos-soft: #12322a; --neg-soft: #3a1a20; --warn-soft: #3a2c10;
  --shadow: none;
}

* { 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.5; -webkit-font-smoothing: antialiased; }
body.locked { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
h2 { font-size: 17px; margin: 0 0 10px; letter-spacing: -.2px; }
h3 { margin: 0; }
small { font-size: 12px; }
b { font-weight: 700; }
.pos { color: var(--pos); } .neg { color: var(--neg); } .zero { color: var(--muted); }
.muted { color: var(--ink-2); margin: 0 0 10px; }
.fine { color: var(--muted); font-size: 12px; margin: 10px 0 0; line-height: 1.6; }
.hint { color: var(--ink-2); font-size: 13px; margin: 10px 0 0; }
.warnline { background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 9px 12px; font-size: 13px; margin: 10px 0; }
.warnline.stale { display: flex; gap: 8px; align-items: flex-start; }
.warnline.stale > span { flex: 1; }
.warnline.stale .btn.icon { flex: none; width: 28px; height: 28px; min-height: 0; padding: 0; background: transparent; color: inherit; }
.boot { padding: 40vh 0; text-align: center; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 48px 16px; }
.empty.small { padding: 24px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 12px; padding: 10px 16px; font-weight: 600; cursor: pointer; text-decoration: none; min-height: 42px; }
.btn:hover { border-color: var(--muted); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { color: var(--neg); }
.btn.ghost { background: transparent; }
.btn.link { border: 0; background: none; color: var(--accent); padding: 8px; min-height: 0; }
.btn.sm { padding: 6px 12px; min-height: 34px; font-size: 13px; border-radius: 10px; }
.btn.icon { width: 38px; height: 38px; min-height: 38px; padding: 0; border-radius: 10px; font-size: 18px; }
.btn.block { width: 100%; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; }
.btns.end { justify-content: flex-end; margin-top: 16px; }

/* forms */
label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--ink-2); margin-bottom: 12px; font-weight: 600; }
input, select, textarea { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 9px 11px; font-size: 15px; font-weight: 400; color: var(--ink); min-height: 40px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
textarea { resize: vertical; }
.toggle { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; background: var(--surface-2); border-radius: 12px; padding: 12px; }
.toggle input { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); }
.toggle span { font-size: 15px; color: var(--ink); }
.toggle small { width: 100%; color: var(--muted); font-weight: 400; }

/* auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1200px 600px at 50% -10%, var(--accent-soft), transparent 70%), var(--bg); }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 28px 24px; box-shadow: var(--shadow); }
.tagline { color: var(--ink-2); margin: 6px 0 22px; font-size: 14.5px; }
.notice { border-radius: 10px; padding: 10px 12px; font-size: 13.5px; margin-bottom: 14px; }
.notice.ok { background: var(--pos-soft); color: var(--pos); } .notice.err { background: var(--neg-soft); color: var(--neg); }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 18px 0 12px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.seg { display: flex; background: var(--surface-2); border-radius: 12px; padding: 3px; margin-bottom: 16px; }
.seg button { flex: 1; border: 0; background: none; padding: 8px; border-radius: 9px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg.sm { margin: 0; } .seg.sm button { padding: 4px 12px; font-size: 13px; }

/* brand */
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 17px; letter-spacing: -.3px; }
.brand.big { font-size: 24px; }
.logo svg, .logo .mark { width: 30px; height: 30px; display: block; border-radius: 8px; }
.brand.big .logo svg, .brand.big .logo .mark { width: 38px; height: 38px; border-radius: 10px; }
.lg-bg { fill: var(--navy); } .lg-ln { fill: none; stroke: #4ecd96; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; } .lg-dt { fill: #ffbe50; }
:root[data-theme="dark"] .lg-bg { fill: #1f2d4a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lg-bg { fill: #1f2d4a; } }
.tag { font-size: 11px; font-weight: 700; background: var(--warn-soft); color: var(--warn); border-radius: 6px; padding: 2px 6px; }

/* shell */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line); padding: calc(env(safe-area-inset-top) + 10px) 16px 10px; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1100px; margin: 0 auto; }
.tabs-desk { display: none; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; max-width: 1100px; margin: 10px auto 0; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: 13.5px; cursor: pointer; color: var(--ink-2); }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 1100px; margin: 8px auto 0; }
.pills { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1 1 auto; min-width: 0; }
.pills::-webkit-scrollbar { display: none; }
.pill { flex: none; border: 0; background: none; padding: 5px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.pill.on { background: var(--accent-soft); color: var(--accent); }
.selects { display: flex; gap: 6px; }
.selects select { min-height: 32px; padding: 4px 8px; font-size: 13px; width: auto; max-width: 150px; border-radius: 8px; }
.custom { display: flex; align-items: center; gap: 6px; max-width: 1100px; margin: 8px auto 0; }
.custom input { min-height: 34px; padding: 5px 8px; font-size: 13.5px; }
.main { max-width: 1100px; margin: 0 auto; padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); }
.tabs-mob { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.tabs-mob button, .tabs-desk button { flex: 1; border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--muted); padding: 6px 0; cursor: pointer; }
.tabs-mob svg, .tabs-desk svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabs-mob button.on, .tabs-desk button.on { color: var(--accent); }

/* cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.card-h h2 { margin: 0; }
.hero .lbl { color: var(--ink-2); font-weight: 600; font-size: 14px; }
.hero .lbl small { color: var(--muted); font-weight: 500; margin-left: 4px; }
.hero .big { font-size: 38px; font-weight: 800; letter-spacing: -1px; line-height: 1.15; margin: 4px 0 10px; font-variant-numeric: tabular-nums; }
.parts, .rebate, .cal-sum { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; color: var(--ink-2); }
.parts b, .rebate b, .cal-sum b { font-variant-numeric: tabular-nums; }
.rebate { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; box-shadow: var(--shadow); min-width: 0; }
.kpi .lbl { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.kpi .val { font-size: 22px; font-weight: 800; letter-spacing: -.4px; font-variant-numeric: tabular-nums; margin-top: 2px; }
.kpi .sub { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.kpi .rets { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; margin-top: 2px; }
.kpi .rets span { display: flex; justify-content: space-between; gap: 8px; }
.kpi .rets b { font-size: 17px; }

/* onboarding */
.onboard ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.onboard li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: center; }
.onboard li .act { grid-column: 2; display: flex; gap: 6px; flex-wrap: wrap; }
.onboard li small { display: block; color: var(--muted); }
.onboard .ck { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: 14px; font-weight: 800; color: #fff; }
.onboard li.done .ck { background: var(--pos); border-color: var(--pos); }
.onboard li.done b { color: var(--muted); text-decoration: line-through; }

/* charts */
.chart { width: 100%; height: auto; display: block; max-width: 100%; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .zero { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; opacity: .7; }
.chart .axis { fill: var(--muted); font-size: 12px; font-family: var(--font); }
.chart .line { fill: none; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.pos { stroke: var(--pos); } .chart .line.neg { stroke: var(--neg); }
.chart .area.pos { fill: var(--pos); opacity: .10; } .chart .area.neg { fill: var(--neg); opacity: .10; }
.chart .dot { stroke: var(--surface); stroke-width: 2; } .chart .dot.pos { fill: var(--pos); } .chart .dot.neg { fill: var(--neg); }
.gauge .track { fill: var(--surface-2); }
.gauge .zone-none { fill: var(--neg-soft); } .gauge .zone-edge { fill: var(--warn-soft); } .gauge .zone-target { fill: var(--pos-soft); }
.gauge .mark-edge { stroke: var(--warn); stroke-width: 2; stroke-dasharray: 4 3; } .gauge .mark-target { stroke: var(--pos); stroke-width: 2; stroke-dasharray: 4 3; }
.gauge .lbl-edge { fill: var(--warn); font-size: 12.5px; font-weight: 700; font-family: var(--font); }
.gauge .lbl-target { fill: var(--pos); font-size: 12.5px; font-weight: 700; font-family: var(--font); }
.gauge .ci { stroke: var(--ink-2); stroke-width: 2; }
.gauge .me { fill: var(--accent); stroke: var(--surface); stroke-width: 3; }

/* diagnosis */
.badge { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.badge.good { background: var(--pos-soft); color: var(--pos); } .badge.mid { background: var(--warn-soft); color: var(--warn); } .badge.bad { background: var(--neg-soft); color: var(--neg); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 8px; }
.facts div { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.facts span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.facts b { font-size: 18px; font-variant-numeric: tabular-nums; }
.facts small { display: block; color: var(--muted); font-size: 11.5px; }
.verdict-line { font-size: 14.5px; margin: 8px 0 0; }

/* calendar */
.cal-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-h h2 { margin: 0; }
.cal-sum { margin-bottom: 12px; }
.grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)) minmax(0, 1.15fr); gap: 4px; }
.wd { text-align: center; font-size: 11.5px; color: var(--muted); font-weight: 700; padding: 2px 0; }
.cell { min-height: 62px; border: 0; border-radius: 10px; background: var(--surface-2); padding: 5px 4px; display: flex; flex-direction: column; align-items: flex-start; gap: 0; text-align: left; overflow: hidden; color: var(--ink); cursor: default; min-width: 0; }
.cell[data-action] { cursor: pointer; }
.cell.out { background: transparent; opacity: .35; }
.cell.pos { background: color-mix(in srgb, var(--pos) calc(var(--a, .15) * 100%), var(--surface)); }
.cell.neg { background: color-mix(in srgb, var(--neg) calc(var(--a, .15) * 100%), var(--surface)); }
.cell.today { outline: 2px solid var(--accent); outline-offset: -2px; }
.cell .dn { font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
.cell .pv { font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.3px; white-space: nowrap; }
.cell .pp { font-size: 10.5px; color: var(--ink-2); display: none; }
.cell .pn { font-size: 10px; color: var(--ink-2); }
.cell.wk { background: transparent; border: 1px dashed var(--line); }
.cell.wk.pos .pv { color: var(--pos); } .cell.wk.neg .pv { color: var(--neg); }

/* positions */
.list-h { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; color: var(--muted); font-size: 13px; }
.list-h span { flex: 1; }
.dayh { font-size: 13px; color: var(--muted); font-weight: 700; margin: 16px 4px 6px; }
.plist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.pitem { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 11px 13px; cursor: pointer; position: relative; box-shadow: var(--shadow); }
.pitem:hover { border-color: var(--muted); }
.pitem.excl { opacity: .6; }
.pitem.sel { border-color: var(--accent); background: var(--accent-soft); }
.pitem .box { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--line); display: grid; place-items: center; font-weight: 800; color: var(--accent); background: var(--surface); }
.pitem .box ~ .l1, .pitem .box ~ .l2 { margin-left: 32px; }
.l1, .l2 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.l2 { justify-content: space-between; margin-top: 4px; }
.sym { font-weight: 800; }
.side { font-size: 11.5px; font-weight: 800; border-radius: 6px; padding: 1px 6px; }
.side.long { background: var(--pos-soft); color: var(--pos); } .side.short { background: var(--neg-soft); color: var(--neg); }
.meta { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.t { font-size: 11.5px; font-weight: 600; border-radius: 6px; padding: 1px 7px; background: var(--surface-2); color: var(--ink-2); }
.t.setup { background: var(--accent-soft); color: var(--accent); }
.t.prof.manual { outline: 1px dashed var(--muted); }
.t.ex { background: var(--warn-soft); color: var(--warn); }
.nums { text-align: right; display: flex; flex-direction: column; font-variant-numeric: tabular-nums; flex: none; }
.nums b { font-size: 15px; } .nums small { font-size: 12px; font-weight: 600; }
.bulk { position: fixed; left: 12px; right: 12px; bottom: calc(72px + env(safe-area-inset-bottom)); z-index: 25; display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  background: var(--ink); color: var(--bg); border-radius: 16px; padding: 10px 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); max-width: 760px; margin: 0 auto; }
.bulk span { font-weight: 700; margin-right: auto; font-size: 13.5px; }
.bulk .btn { background: transparent; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 35%, transparent); }

/* tables */
.table-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; min-width: 560px; }
.tbl th, .tbl td { text-align: right; padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th:first-child { text-align: left; }
.tbl thead th { color: var(--muted); font-size: 12px; font-weight: 700; }
.tbl tbody tr { cursor: pointer; } .tbl tbody tr:hover { background: var(--surface-2); }
.tbl .few { display: block; color: var(--muted); font-size: 11px; }

/* settings rows */
.row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.row label { margin: 0; flex: 1 1 120px; min-width: 0; }
.row label.grow { flex: 2 1 180px; }
.row .btn.icon { flex: none; }
.row .note { width: 100%; font-size: 12px; color: var(--muted); }
.row .note.inline { width: auto; padding-bottom: 10px; }
.row.add { border-top: 0; padding-top: 0; }

/* sheets */
.scrim { position: fixed; inset: 0; background: rgba(5, 10, 20, .45); z-index: 40; animation: fade .15s ease; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; background: var(--surface); border-radius: 22px 22px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom));
  max-height: 88vh; overflow-y: auto; animation: up .2s ease; box-shadow: 0 -10px 40px rgba(0, 0, 0, .2); }
.sheet .close { position: absolute; right: 12px; top: 12px; border: 0; background: var(--surface-2); }
.sheet h2 { padding-right: 44px; font-size: 19px; display: flex; align-items: center; gap: 8px; }
.pnl-big { font-size: 28px; font-weight: 800; letter-spacing: -.5px; margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.pnl-big small { font-size: 14px; color: var(--ink-2); font-weight: 600; margin-left: 4px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; background: var(--surface-2); border-radius: 14px; padding: 12px 14px; margin-bottom: 16px; }
.kv span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.kv b { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.opts { display: grid; gap: 6px; margin-bottom: 14px; }
.opt { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 12px 14px; font-weight: 600; cursor: pointer; }
.opt:hover { border-color: var(--accent); }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 2px dashed var(--line); border-radius: 16px; padding: 34px 16px; text-align: center; cursor: pointer; color: var(--ink); background: var(--surface-2); }
.drop.over, .drop:hover { border-color: var(--accent); background: var(--accent-soft); }
.drop b { font-size: 15.5px; } .drop small { color: var(--muted); font-weight: 500; }
.guide { padding-left: 18px; color: var(--ink-2); font-size: 13.5px; margin: 14px 0 0; }
.guide li { margin-bottom: 4px; }
.files { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.files li { border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.files li > b { display: block; } .files li > small { display: block; color: var(--muted); margin-bottom: 8px; word-break: break-all; }
.files li label { margin: 0; }
.files li.bad { border-color: var(--neg); background: var(--neg-soft); } .files li.bad small { color: var(--neg); margin: 0; }
.files .res { font-size: 13.5px; color: var(--ink-2); } .files .res em { color: var(--warn); font-style: normal; }
.toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 60;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; transition: all .2s ease; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--neg); color: #fff; }
@keyframes up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } }

@media (min-width: 560px) {
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cell { min-height: 78px; padding: 7px 8px; }
  .cell .pv { font-size: 13px; } .cell .pp { display: block; } .cell .pn { font-size: 11px; }
  .kv { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .tabs-mob { display: none; }
  .tabs-desk { display: flex; gap: 2px; flex: 1; justify-content: center; }
  .tabs-desk button { flex: none; flex-direction: row; gap: 6px; font-size: 14px; padding: 8px 14px; border-radius: 10px; }
  .tabs-desk button.on { background: var(--accent-soft); }
  .tabs-desk svg { width: 18px; height: 18px; }
  .main { padding-bottom: 48px; }
  .bulk { bottom: 24px; }
  .toast { bottom: 32px; }
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; transform: translate(-50%, -50%); width: 520px; border-radius: 22px; max-height: 86vh; animation: fade .15s ease; }
  .sheet.wide { width: 640px; }
  .hero .big { font-size: 44px; }
}

/* upload guide & checklist */
.gd-wrap { margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.gd-wrap summary { cursor: pointer; font-weight: 700; color: var(--accent); }
.gd { font-size: 14px; color: var(--ink-2); }
.gd-lead { margin: 10px 0 12px; line-height: 1.65; }
.gd-ex { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.gd-ex h3 { font-size: 15px; color: var(--ink); margin: 0 0 6px; }
.gd-ex h3 small { font-size: 12px; color: var(--muted); font-weight: 600; margin-left: 6px; }
.gd-ex ol { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 8px; }
.gd-ex li { line-height: 1.5; color: var(--ink); }
.gd-ex li small { display: block; color: var(--muted); margin-top: 1px; }
.gd-ex p { margin: 0; line-height: 1.65; }
.gd-note { font-size: 12.5px; color: var(--warn) !important; margin-top: 8px !important; }
.req, .opt { display: inline-block; font-size: 11px; font-weight: 800; border-radius: 6px; padding: 1px 6px; margin-right: 6px; vertical-align: 1px; }
.req { background: var(--accent-soft); color: var(--accent); } .opt { background: var(--surface); color: var(--muted); border: 1px solid var(--line); }
.ck { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.ck-h { font-weight: 800; margin-bottom: 6px; }
.ck-list { list-style: none; padding: 0; margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; }
.ck-list li { display: flex; align-items: center; gap: 6px; }
.ck-list li span { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.ck-list li.ok span { background: var(--pos-soft); color: var(--pos); }
.ck-list li.no span { background: var(--neg-soft); color: var(--neg); }
.ck-list li.no { color: var(--neg); font-weight: 700; }
.ck-list li.opt span { background: var(--surface-2); color: var(--muted); }
.ck-list small { color: var(--muted); font-weight: 500; }
.ck-bad, .ck-warn, .ck-info { font-size: 13px; line-height: 1.6; border-radius: 10px; padding: 8px 10px; margin: 6px 0 0; }
.ck-bad { background: var(--neg-soft); color: var(--neg); } .ck-warn { background: var(--warn-soft); color: var(--warn); } .ck-info { background: var(--surface-2); color: var(--ink-2); }
.btn.link.inline { padding: 0; display: inline; font-size: inherit; font-weight: 700; }

/* help "?" buttons and sheet */
.help { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 6px; padding: 0; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); color: var(--muted); font-size: 11px; font-weight: 800; line-height: 1; cursor: pointer; vertical-align: 2px; flex: none; }
.help:hover { border-color: var(--accent); color: var(--accent); }
.help.static { cursor: default; vertical-align: 0; }
.helpbody h3 { font-size: 13px; color: var(--muted); margin: 16px 0 4px; }
.helpbody h3:first-child { margin-top: 4px; }
.helpbody p { margin: 0; line-height: 1.7; color: var(--ink); }

/* analysis tab */
.intro { color: var(--ink-2); font-size: 13.5px; margin: 0 2px 12px; line-height: 1.7; }
.few-chip { opacity: .5; font-weight: 700; }
.sub-h { display: flex; align-items: center; margin: 18px 0 6px; }
.sub-h:first-of-type { margin-top: 4px; }
.sub-h h3 { margin: 0; font-size: 14.5px; }
.gtable { overflow-x: auto; }
.gtable table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 13.5px; }
.gtable th, .gtable td { padding: 8px 6px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
.gtable thead th { font-size: 12px; color: var(--muted); font-weight: 700; }
.gtable tbody th { text-align: left; font-weight: 700; }
.gtable thead th:first-child { text-align: left; }
.gtable tbody th small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 600; }
.gtable tr.few td, .gtable tr.few th { opacity: .5; }
.gtable .avgc { text-align: right; }
.gtable .avgc span:first-child { display: inline-block; min-width: 56px; }
.gtable .wide { display: none; }
.mbar { display: inline-block; position: relative; width: 56px; height: 8px; margin-left: 6px; border-radius: 4px; background: var(--surface-2); vertical-align: 0; }
.mbar::after { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--muted); opacity: .5; }
.mbar i { position: absolute; top: 0; bottom: 0; border-radius: 4px; }
.mbar i.pos { background: var(--pos); } .mbar i.neg { background: var(--neg); }
.obs { font-size: 12.5px; color: var(--ink-2); margin: 8px 2px 0; }
.frow + .frow { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.fh { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.fh .muted { margin: 0; font-size: 12.5px; }

/* chart tooltip */
.chartwrap { position: relative; touch-action: pan-y; }
.chart .cursor line { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .cursor circle { fill: var(--surface); stroke: var(--ink); stroke-width: 2; }
.ctip { position: absolute; top: 0; z-index: 2; pointer-events: none; background: var(--navy); color: #fff; border-radius: 10px; padding: 7px 10px; font-size: 12px; line-height: 1.45; display: flex; flex-direction: column; box-shadow: var(--shadow); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ctip[hidden] { display: none; }
.ctip b { font-size: 12.5px; } .ctip small { opacity: .7; }
.ctip em { font-style: normal; font-weight: 700; } .ctip em.pos { color: #6ee7b7; } .ctip em.neg { color: #fca5a5; }

/* compact position rows */
.pitem { padding: 9px 12px; }
.dayh { margin: 12px 4px 5px; }
.plist { gap: 6px; }

@media (min-width: 560px) {
  .gtable .wide { display: table-cell; }
  .mbar { width: 80px; }
}
@media (min-width: 900px) {
  .pitem { display: flex; align-items: center; gap: 14px; padding: 8px 14px; border-radius: 12px; box-shadow: none; }
  .pitem .l1 { flex: 1; min-width: 0; }
  .pitem .l2 { margin-top: 0; flex: 0 0 auto; gap: 14px; }
  .pitem .nums { flex-direction: row; align-items: baseline; gap: 10px; min-width: 150px; justify-content: flex-end; }
  .pitem .box ~ .l1 { margin-left: 32px; } .pitem .box ~ .l2 { margin-left: 0; }
  .plist { gap: 4px; }
}
.gtable tbody th { white-space: normal; min-width: 64px; }
.gtable .mid { display: none; }
.main .card { min-width: 0; }
@media (min-width: 480px) { .gtable .mid { display: table-cell; } }

/* ---------- landing ---------- */
.land { --lw: 1080px; background: var(--bg); overflow-x: hidden; }
.l-top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.l-bar { max-width: var(--lw); margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.l-nav { display: flex; gap: 6px; }
.btn.lg { padding: 13px 22px; font-size: 16px; border-radius: 14px; font-weight: 700; }
.l-hero { max-width: var(--lw); margin: 0 auto; padding: 40px 16px 24px; text-align: center; background: radial-gradient(900px 420px at 50% 0%, var(--accent-soft), transparent 70%); }
.l-logo { width: 150px; height: auto; display: block; margin: 0 auto 8px; }
.l-hero h1 { font-size: 34px; letter-spacing: -1px; line-height: 1.2; margin: 6px 0 12px; }
.l-sub { color: var(--ink-2); font-size: 16px; line-height: 1.7; margin: 0 auto 22px; max-width: 640px; word-break: keep-all; }
.br-d { display: none; }
.l-cta-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.l-note { color: var(--muted); font-size: 13px; margin: 14px 0 0; }
.l-shots { position: relative; margin: 34px auto 0; max-width: 980px; padding-right: 0; }
.l-img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 10px 40px rgba(15, 26, 46, .12); background: #fff; }
.l-desk { border-radius: 14px; }
.l-phone { position: absolute; right: -6px; bottom: -22px; width: 30%; max-width: 230px; border-radius: 22px; border: 5px solid #0f1a2e; box-shadow: 0 16px 40px rgba(15, 26, 46, .28); }
.l-cap { color: var(--muted); font-size: 12px; margin: 34px 0 0; }
.l-points { max-width: var(--lw); margin: 18px auto 0; padding: 0 16px; display: grid; gap: 10px; }
.l-points div, .l-trust div { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); }
.l-points b, .l-trust b { font-size: 16px; }
.l-points p, .l-trust p { margin: 6px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.65; word-break: keep-all; }
.l-feat { max-width: var(--lw); margin: 0 auto; padding: 44px 16px 0; display: grid; gap: 18px; align-items: center; }
.l-num { font-size: 13px; font-weight: 800; color: var(--accent); letter-spacing: 1px; }
.l-feat h2 { font-size: 25px; line-height: 1.3; letter-spacing: -.6px; margin: 4px 0 10px; }
.l-feat p { color: var(--ink-2); font-size: 15px; line-height: 1.75; margin: 0; word-break: keep-all; }
.l-steps { max-width: var(--lw); margin: 56px auto 0; padding: 0 16px; }
.l-steps h2, .l-final h2 { font-size: 25px; letter-spacing: -.6px; text-align: center; margin: 0 0 18px; }
.l-steps ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; counter-reset: st; }
.l-steps li { counter-increment: st; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px 16px 62px; position: relative; box-shadow: var(--shadow); }
.l-steps li::before { content: counter(st); position: absolute; left: 18px; top: 16px; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; }
.l-steps li b { font-size: 16px; }
.l-steps li p { margin: 6px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.7; }
.l-trust { max-width: var(--lw); margin: 40px auto 0; padding: 0 16px; display: grid; gap: 10px; }
.l-final { max-width: var(--lw); margin: 56px auto 0; padding: 40px 16px; text-align: center; }
.l-final .btn.link { margin-top: 12px; }
.l-foot { text-align: center; color: var(--muted); font-size: 12px; padding: 24px 16px 40px; border-top: 1px solid var(--line); }
.auth-logo { width: 120px; height: auto; display: block; margin: 0 auto 4px; }
.auth-card .back { padding: 0; margin: -6px 0 6px; font-size: 13.5px; }
.auth-card .tagline { text-align: center; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .l-logo, :root:not([data-theme="light"]) .auth-logo { filter: invert(1); } }
:root[data-theme="dark"] .l-logo, :root[data-theme="dark"] .auth-logo { filter: invert(1); }
@media (min-width: 720px) {
  .l-hero { padding-top: 56px; }
  .l-hero h1 { font-size: 48px; }
  .l-logo { width: 190px; }
  .br-d { display: inline; }
  .l-points, .l-trust { grid-template-columns: repeat(3, 1fr); }
  .l-feat { grid-template-columns: 5fr 7fr; gap: 40px; padding-top: 72px; }
  .l-feat.rev .l-feat-txt { order: 2; }
  .l-feat h2 { font-size: 30px; }
  .l-steps ol { grid-template-columns: repeat(3, 1fr); }
  .l-phone { right: -24px; bottom: -36px; width: 24%; }
}
.warn-t { color: var(--warn); font-weight: 700; }
.samplebar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); border-radius: 14px; padding: 10px 14px; margin-bottom: 12px; }
.samplebar p { margin: 0; font-size: 13.5px; color: var(--ink); }
.samplebar .btns { margin: 0; }
.l-demo { display: block; margin: 10px auto 0; font-size: 14px; }
.l-hero h1.l-en { font-family: "Poppins", var(--font); font-weight: 700; letter-spacing: -0.5px; }
@media (min-width: 720px) { .l-hero h1.l-en { letter-spacing: -1.2px; } }
.br-m { display: inline; }
@media (min-width: 720px) { .br-m { display: none; } }
