:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --line: #e3e6eb;
  --text: #14181f;
  --muted: #667085;
  --accent: #1f6feb;
  --up: #d92d20;      /* 국내 관례: 상승 빨강 */
  --down: #1570ef;    /* 하락 파랑 */
  --ok: #12805c;
  --warn: #b54708;
  --radius: 12px;
  --ma5: #f59e0b; --ma20: #10b981; --ma60: #8b5cf6; --ma120: #94a3b8;
  --c-foreign: #8e4ec6; --c-inst: #f76b15; --c-indiv: #12a594;
  --font: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --c-foreign: #b07ce8; --c-inst: #ff8b3d; --c-indiv: #2ec4a6;  /* 어두운 화면에서 더 잘 보이게 */
    --bg: #0e1116;
    --surface: #161b22;
    --line: #262c36;
    --text: #e6e9ef;
    --muted: #8b95a5;
    --accent: #4c8dff;
    --ok: #3fb68b;
    --warn: #f0a050;
    --up: #f0524f;
    --down: #4c8dff;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.muted { color: var(--muted); }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }

/* ---------- 로그인 ---------- */
.page-login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-wrap { width: 100%; max-width: 380px; }
.login-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px 28px;
}
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.brand h1 { font-size: 22px; }
.brand p { margin: 2px 0 0; font-size: 13px; }
.brand-mark { color: var(--accent); display: inline-flex; }
.brand.small { margin: 0; gap: 8px; }
form label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 6px; }
form input[type=text], form input[type=password] {
  width: 100%; padding: 11px 12px; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
}
form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
button {
  font: inherit; font-weight: 600; cursor: pointer;
  border: 0; border-radius: 8px; padding: 11px 16px;
  background: var(--accent); color: #fff;
}
.login-card button { width: 100%; margin-top: 22px; }
button.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); padding: 6px 12px; font-size: 13px; }
button:hover { filter: brightness(1.08); }
.alert {
  margin: 0 0 8px; padding: 10px 12px; font-size: 13px; border-radius: 8px;
  color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, transparent);
}
.foot { text-align: center; font-size: 12px; margin-top: 18px; }

/* ---------- 상단바 ---------- */
.topbar {
  display: flex; align-items: center; gap: 24px;
  padding: 12px 24px; background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: 0;
}
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.nav a, .nav span { padding: 6px 10px; border-radius: 6px; font-size: 14px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.nav a.active { color: var(--text); background: var(--bg); font-weight: 600; }
.nav .disabled { opacity: .5; cursor: not-allowed; }
.logout { display: flex; align-items: center; gap: 10px; }
.user { font-size: 13px; }

/* ---------- 본문 ---------- */
.container { max-width: 1040px; margin: 0 auto; padding: 28px 24px 40px; }
.hero { margin-bottom: 20px; }
.hero h2 { font-size: 22px; }
.hero p { margin: 6px 0 0; font-size: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin-bottom: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.card h3 { font-size: 15px; }
.status { display: flex; align-items: flex-start; gap: 12px; }
.status > div { flex: 1; min-width: 0; }
.status p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex: none; }
.status.ok .dot { background: var(--ok); }
.status.bad .dot { background: var(--warn); }
.badge { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.status.ok .badge { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.status.bad .badge { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }

.stages { list-style: none; margin: 14px 0 0; padding: 0; }
.stage { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.stage:first-child { border-top: 0; }
.stage .no {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-size: 13px; font-weight: 700; border: 1px solid var(--line); color: var(--muted); flex: none;
}
.stage > div { flex: 1; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.stage > div span { font-size: 13px; }
.stage .state { font-size: 12px; font-weight: 600; color: var(--muted); }
.stage.done .no { background: var(--ok); border-color: var(--ok); color: #fff; }
.stage.done .state { color: var(--ok); }
.stage.next .no { border-color: var(--accent); color: var(--accent); }
.stage.next .state { color: var(--accent); }
.container .foot { text-align: left; margin-top: 20px; }

@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; gap: 10px 16px; padding: 10px 16px; }
  .nav { order: 3; flex-basis: 100%; }
  .container { padding: 20px 16px 32px; }
  .user { display: none; }
}

/* ---------- 2단계 ---------- */
a { color: inherit; }
.brand.small { text-decoration: none; color: var(--text); }
.small { font-size: 12.5px; }
.block { display: block; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.up { color: var(--up); }
.down { color: var(--down); }
.warn-text { color: var(--warn); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.container > .card + .card, .container > .grid + .card, .container > .tiles + .card { margin-top: 16px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.status-grid { grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 10px; }
.status-grid .card { padding: 12px 14px; gap: 10px; }
.status-grid h3 { font-size: 14px; }
.note { margin: 14px 0 0; padding: 12px 14px; border-radius: 8px; font-size: 13.5px;
  background: color-mix(in srgb, var(--accent) 8%, transparent); }
.note.card { margin: 0 0 16px; border-color: color-mix(in srgb, var(--accent) 25%, var(--line)); }
code { font-size: 12.5px; padding: 1px 5px; border-radius: 4px; background: var(--bg); border: 1px solid var(--line); }
.empty { padding: 24px 0 8px; text-align: center; }

/* 검색 */
.topsearch { position: relative; width: 240px; }
.topsearch input, .bigsearch input {
  width: 100%; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; font-size: 14px;
}
.bigsearch { position: relative; }
.bigsearch input { padding: 13px 16px; font-size: 16px; }
.topsearch input:focus, .bigsearch input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; margin: 0; padding: 4px;
  list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 8px 24px rgb(0 0 0 / .12); max-height: 360px; overflow-y: auto;
}
.topsearch .suggest { min-width: 300px; }
.suggest li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 10px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.suggest li span { font-size: 12.5px; white-space: nowrap; }
.suggest li.on, .suggest li[data-i]:hover { background: var(--bg); }

/* 수집 현황 */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpis > div { padding: 12px 14px; border-radius: 10px; background: var(--bg); display: flex; flex-direction: column; gap: 2px; }
.kpis span { font-size: 12.5px; }
.kpis strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.kpis em { font-style: normal; font-size: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
th.num { text-align: right; }
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.watch tbody tr { cursor: pointer; }
.watch td + td { white-space: nowrap; }
.watch tbody tr:hover { background: var(--bg); }
.watch a { text-decoration: none; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; white-space: nowrap;
  color: var(--muted); background: var(--bg); }
.pill.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.pill.running { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.pill.error, .pill.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
button:disabled { opacity: .45; cursor: not-allowed; }
.stage.now .no { background: var(--accent); border-color: var(--accent); color: #fff; }
.stage.now .state { color: var(--accent); }

/* 종목 상세 */
.stock-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.stock-head h2 { font-size: 24px; }
.stock-head .code { font-size: 15px; font-weight: 500; }
.stock-head p { margin: 2px 0; }
.stock-head .price strong { font-size: 26px; font-variant-numeric: tabular-nums; margin-right: 6px; }
.stock-head a { text-decoration: none; color: var(--muted); }
.actions { display: flex; gap: 8px; }
.actions button { padding: 9px 16px; font-size: 14px; }
.actions button.ghost { padding: 9px 16px; font-size: 14px; color: var(--text); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 8px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 4px; font-variant-numeric: tabular-nums; font-weight: 600; }
.tile .muted { font-size: 12px; font-weight: 500; }
.chart-card { padding-bottom: 12px; }
.chart { width: 100%; height: 420px; }
.chart.short { height: 260px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin: -4px 0 8px; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 5px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { background: transparent; color: var(--muted); border-radius: 0; padding: 5px 11px; font-size: 13px; }
.seg button.on { background: var(--bg); color: var(--text); }
.flows td { padding: 7px 10px; font-size: 13.5px; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 8px; font-size: 14px; transition: .2s; z-index: 50; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 860px) {
  .topsearch { order: 4; width: 100%; }
  .topsearch .suggest { min-width: 0; }
}
@media (max-width: 640px) {
  .chart { height: 320px; }
  .chart.short { height: 220px; }
  .stock-head .price strong { font-size: 22px; }
}

/* ---------- 3단계: 신호 ---------- */
.sig { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.sig-buy { color: var(--up); background: color-mix(in srgb, var(--up) 12%, transparent); }
.sig-sell { color: var(--down); background: color-mix(in srgb, var(--down) 12%, transparent); }
.sig-hold { color: var(--muted); background: var(--bg); }
.score { font-variant-numeric: tabular-nums; }
.chip { display: inline-block; font-size: 12px; padding: 2px 8px; margin: 2px 4px 2px 0; border-radius: 6px;
  background: var(--bg); border: 1px solid var(--line); white-space: nowrap; }
td.reasons { min-width: 220px; }
.star { color: var(--ma5); }
.subhead { margin: 18px 0 8px; font-size: 14px; }

.sigcount { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.sigcount p { margin: 0; flex-basis: 100%; }
.sc { display: flex; align-items: baseline; gap: 8px; padding: 8px 14px; border-radius: 10px; text-decoration: none; background: var(--bg); }
.sc span { font-size: 13px; color: var(--muted); }
.sc strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.sc.buy strong { color: var(--up); }
.sc.sell strong { color: var(--down); }
.watchsig { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.watchsig li { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.watchsig a { text-decoration: none; font-weight: 600; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.seg a { display: inline-block; padding: 6px 12px; font-size: 13px; color: var(--muted); text-decoration: none; }
.seg a.on { background: var(--bg); color: var(--text); font-weight: 600; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); text-decoration: none; }
.toggle .box { width: 18px; height: 18px; border: 1px solid var(--line); border-radius: 5px; display: grid; place-items: center; font-size: 12px; }
.toggle.on { color: var(--text); }
.toggle.on .box { background: var(--accent); border-color: var(--accent); color: #fff; }
td.area { color: var(--muted); }
td.area.hi { color: var(--up); font-weight: 600; }
td.area.lo { color: var(--down); font-weight: 600; }
.pager { display: flex; gap: 16px; justify-content: center; align-items: center; margin-top: 16px; font-size: 14px; }
.pager a { text-decoration: none; color: var(--accent); }

.scorecard { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(240px, 1.3fr) minmax(200px, 1fr); gap: 24px; margin-bottom: 16px; }
.score-main .big { display: flex; align-items: baseline; gap: 6px; margin: 4px 0 10px; }
.score-main .big strong { font-size: 42px; line-height: 1; font-variant-numeric: tabular-nums; }
.gauge { position: relative; display: flex; height: 8px; border-radius: 99px; overflow: visible; }
.gauge .zone { height: 100%; }
.gauge .zone.sell { background: color-mix(in srgb, var(--down) 35%, transparent); border-radius: 99px 0 0 99px; }
.gauge .zone.hold { background: var(--line); }
.gauge .zone.buy { background: color-mix(in srgb, var(--up) 35%, transparent); border-radius: 0 99px 99px 0; }
.gauge i { position: absolute; top: -4px; width: 4px; height: 16px; margin-left: -2px; border-radius: 2px; background: var(--text); }
.gauge-labels { display: flex; justify-content: space-between; margin-top: 4px; }
.score-main p { margin: 10px 0 0; }
.areas { display: flex; flex-direction: column; gap: 8px; }
.areas p { margin: 4px 0 0; }
.area-row { display: grid; grid-template-columns: 84px 1fr 32px; align-items: center; gap: 10px; font-size: 13.5px; }
.area-row .bar { position: relative; height: 8px; background: var(--bg); border-radius: 99px; }
.area-row .bar::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--line); }
.area-row .bar i { position: absolute; top: 0; bottom: 0; border-radius: 99px; }
.area-row .bar i.hi { background: var(--up); }
.area-row .bar i.lo { background: var(--down); }
.why ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; line-height: 1.8; }
@media (max-width: 860px) { .scorecard { grid-template-columns: 1fr; } }
.tile { min-width: 0; }
.tile > span:not(.muted) { overflow-wrap: anywhere; }
@media (max-width: 640px) { .tiles { grid-template-columns: repeat(2, 1fr); } }

/* ---------- 4단계: AI ---------- */
.ai-card { margin-bottom: 16px; border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.ai-card .actions { align-items: center; }
#ai-result.loading { opacity: .45; }
.ai-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ai-headline { font-size: 17px; }
.ai-summary { margin: 10px 0 14px; line-height: 1.7; }
.levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.lvl { background: var(--bg); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lvl strong { font-size: 16px; font-variant-numeric: tabular-nums; }
.pn { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 10px; }
.pn ul { margin: 4px 0 0; padding-left: 18px; font-size: 14px; line-height: 1.7; color: var(--text); }
.pn ul.up li::marker { color: var(--up); }
.pn ul.down li::marker { color: var(--down); }
.pn li.up, .pn li.down { color: var(--text); }
.brief { margin: 0 0 12px; line-height: 1.7; }
.senti { font-size: 12.5px; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: var(--bg); color: var(--muted); }
.senti.pos { color: var(--up); background: color-mix(in srgb, var(--up) 12%, transparent); }
.senti.neg { color: var(--down); background: color-mix(in srgb, var(--down) 12%, transparent); }
.newslist { list-style: none; margin: 8px 0 0; padding: 0; }
.newslist li { padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.newslist li:first-child { border-top: 0; }
.newslist a { text-decoration: none; }
.newslist a:hover { text-decoration: underline; }
.tag { font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 5px; background: var(--bg); color: var(--muted); }
.tag.dart { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.ai-news { margin-bottom: 12px; }
.ai-news ul { margin: 4px 0 0; padding-left: 18px; font-size: 14px; line-height: 1.7; }
.ai-src { margin: 4px 0 8px; }
.ai-src ul { margin: 6px 0 0; padding-left: 18px; font-size: 13.5px; line-height: 1.8; }
.ai-src a { text-decoration: none; }
.gsearch { margin: 4px 0 8px; }
.gsuggest { display: block; width: 100%; height: 64px; border: 0; margin-top: 4px; background: transparent; }

/* ---------- 5단계: 백테스트·설정 ---------- */
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px 18px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field .lbl { font-size: 13px; font-weight: 600; }
.field input[type=number], .field select {
  font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 11px; width: 100%;
}
.field input:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.field.check { flex-direction: row; align-items: flex-start; gap: 10px; cursor: pointer; }
.field.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.field.run { justify-content: flex-end; }
.field.run button { width: 100%; }
.wpct { font-style: normal; font-weight: 500; }
.settings-form .card + .card { margin-top: 16px; }
.actions-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 16px; }
.btns { display: flex; gap: 8px; }
.btns button { padding: 10px 22px; }
.btns button.ghost { padding: 10px 16px; font-size: 14px; color: var(--text); }
.keylist { list-style: none; margin: 10px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; }
.keylist .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--line); margin-right: 6px; vertical-align: middle; }
.keylist .dot.on { background: var(--ok); }
a.btn { display: inline-flex; align-items: center; text-decoration: none; border-radius: 8px; padding: 9px 16px; font-size: 14px; font-weight: 600; }
a.btn.ghost { border: 1px solid var(--line); color: var(--text); }
.runs tr.on td { background: color-mix(in srgb, var(--accent) 7%, transparent); }
button.tiny { padding: 2px 8px; font-size: 12px; }
.verdict { margin: 0 0 14px; font-size: 15px; line-height: 1.7; }
#bt-result .tiles { margin-bottom: 14px; }
.bt-tables { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 8px; }
.note.small { font-size: 12.5px; }
.more { display: block; margin: 12px auto 0; }
.settings-form + .card { margin-top: 16px; }
.container > .note { margin: 0 0 16px; }
/* 보유 종목 */
.field.wide { grid-column: span 2; }
.field input[type=text], .field input[type=date] { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; width: 100%; }
.field .bigsearch input { padding: 9px 11px; font-size: 15px; }
.field.run { flex-direction: row; align-items: flex-end; gap: 8px; }
.holdings tr.warn-row td { background: color-mix(in srgb, var(--warn) 7%, transparent); }
.holdings td.acts { white-space: nowrap; }
.pill.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
ul.plain { margin: 8px 0 0; padding-left: 18px; line-height: 1.9; font-size: 14px; }
@media (max-width: 640px) { .field.wide { grid-column: auto; } }
.price.live strong { font-size: 26px; }
.live-tag { font-size: 12.5px; color: var(--muted); padding: 2px 8px; border-radius: 99px; background: var(--bg); }
.live-tag.on { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.price.sub strong { font-size: 16px; }
.live-cell strong { font-variant-numeric: tabular-nums; }
.live-warn { display: inline-block; margin-top: 3px; font-size: 11.5px; }
tr.moved td { background: color-mix(in srgb, var(--warn) 6%, transparent); }
.live-warn-box { margin: 6px 0; color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, transparent); }

/* ================= 6단계: 업종 수급 대시보드 ================= */
.warnbar { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 10px 14px; margin-bottom: 14px;
  border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); background: color-mix(in srgb, var(--warn) 9%, var(--surface));
  border-radius: 10px; font-size: 14px; }
.warnbar strong { color: var(--warn); }
.warnbar a { margin-left: auto; }
.ok-note { border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.ok-text { color: var(--ok); }
.nowrap { white-space: nowrap; }
.dash-hero { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }

.sumrow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.sumcell { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.sumcell span { display: block; font-size: 12.5px; }
.sumcell strong { display: block; font-size: 19px; margin: 4px 0 2px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sumcell strong a { color: inherit; }
.sumcell em { font-style: normal; font-size: 12.5px; }

.aibrief p { margin: 6px 0 0; line-height: 1.7; }
.pill.ai { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); border-color: transparent; font-weight: 600; }

.dash-main { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.dash-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; }
.dash-main > .card, .dash-two > .card { margin: 0; }

/* 지도: 대분류 = 열, 밸류체인 = 칸 */
.map-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.bigcol { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.bigname { font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-bottom: 2px; }
.tiles-col { display: flex; flex-direction: column; gap: 4px; }
.sm-tile { display: flex; flex-direction: column; justify-content: center; min-height: 40px; padding: 4px 6px; border-radius: 6px;
  color: var(--text); text-decoration: none; background: var(--bg); border: 1px solid transparent; line-height: 1.2; transition: transform .08s; }
.sm-tile:hover { border-color: var(--text); text-decoration: none; transform: translateY(-1px); }
.sm-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.sm-tile .tname { font-size: 11px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; word-break: keep-all; overflow-wrap: anywhere; }
.sm-tile .tval { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.lv1 { background: color-mix(in srgb, var(--up) 14%, var(--surface)); }
.lv2 { background: color-mix(in srgb, var(--up) 30%, var(--surface)); }
.lv3 { background: color-mix(in srgb, var(--up) 52%, var(--surface)); }
.lv4 { background: color-mix(in srgb, var(--up) 78%, var(--surface)); color: #fff; }
.lv-1 { background: color-mix(in srgb, var(--down) 14%, var(--surface)); }
.lv-2 { background: color-mix(in srgb, var(--down) 30%, var(--surface)); }
.lv-3 { background: color-mix(in srgb, var(--down) 52%, var(--surface)); }
.lv-4 { background: color-mix(in srgb, var(--down) 78%, var(--surface)); color: #fff; }
.lv0 { background: var(--bg); }
.map-legend { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; margin-top: 12px; }
.map-legend i { width: 18px; height: 10px; border-radius: 3px; display: inline-block; }
.map-legend .legend-note { margin-left: 10px; }
.seg button { cursor: pointer; }

/* 유입·유출 상위 */
.tl-title { font-size: 14px; margin: 4px 0 6px; }
.tl-title + .toplist + .tl-title { margin-top: 14px; }
.toplist { list-style: none; margin: 0; padding: 0; }
.toplist li { display: grid; grid-template-columns: minmax(0, 1fr) 72px 64px; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); }
.toplist li:first-child { border-top: 0; }
.toplist a, .issue-list a, .sumcell a { min-width: 0; color: var(--text); text-decoration: none; }
.toplist a:hover .tl-name, .issue-list a:hover, .sumcell a:hover { text-decoration: underline; }
.issue-list a.ititle { color: var(--muted); }
.toplist .tl-name { font-weight: 600; font-size: 13.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toplist strong { text-align: right; font-variant-numeric: tabular-nums; font-size: 13.5px; }
.spark { width: 72px; height: 22px; overflow: visible; }
.spark polyline { fill: none; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark.up polyline { stroke: var(--up); }
.spark.down polyline { stroke: var(--down); }

/* 공시 이슈 */
.issue-list { list-style: none; margin: 0; padding: 0; }
.issue-list li { padding: 8px 0; border-top: 1px solid var(--line); }
.issue-list li:first-child { border-top: 0; }
.issue-list .ititle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ikind { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; margin-right: 4px; white-space: nowrap;
  background: color-mix(in srgb, var(--warn) 14%, var(--surface)); color: var(--warn); }
.ikind.k-conversion { background: color-mix(in srgb, var(--up) 12%, var(--surface)); color: var(--up); }
.ikind.k-merger { background: color-mix(in srgb, var(--c-foreign) 14%, var(--surface)); color: var(--c-foreign); }
.ikind.k-split { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); }
.kind-notes { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }

/* 보조 지표 (접힘) */
details.aux { margin-top: 14px; }
details.aux summary { cursor: pointer; list-style: none; display: flex; gap: 10px; align-items: baseline; }
details.aux summary::-webkit-details-marker { display: none; }
details.aux summary::before { content: "▸"; color: var(--muted); }
details.aux[open] summary::before { content: "▾"; }
details.aux table { margin-top: 10px; }
table.compact td { padding-top: 7px; padding-bottom: 7px; }
.auxtabs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 4px; margin-bottom: 14px; }
.auxtabs a { padding: 6px 12px; border-radius: 999px; color: var(--muted); border: 1px solid var(--line); background: var(--surface); font-size: 14px; }
.auxtabs a.on { color: var(--text); border-color: var(--text); font-weight: 600; }
.auxtabs span { margin-left: 8px; }

/* 처음 준비 */
.setup-steps { margin: 10px 0 14px; padding-left: 20px; line-height: 1.9; }
.setup-steps li.done { color: var(--muted); }

/* 업종 표·상세 */
.sectbl td.sorted, .watch td.sorted { font-weight: 700; }
.histchart { width: 100%; height: auto; display: block; margin-top: 8px; }
.histchart .axis { stroke: var(--line); }
.histchart rect.up { fill: color-mix(in srgb, var(--up) 70%, transparent); }
.histchart rect.down { fill: color-mix(in srgb, var(--down) 70%, transparent); }
.histchart .mline { fill: none; stroke: var(--text); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.histaxis { display: flex; justify-content: space-between; }
.secchips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.secchips .chip { text-decoration: none; }

/* 관리 */
.upload { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 8px 0 12px; }
.matchbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; }
.mstat { font-size: 12.5px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; }
.mstat.m-matched { color: var(--ok); }
.mstat.m-candidate { color: var(--warn); }
.mstat.m-delisted, .mstat.m-notfound { color: var(--up); }
.mstat.m-excluded { color: var(--muted); }
.probs td.acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.codein { display: inline-flex; gap: 4px; }
.codein input { width: 92px; padding: 4px 8px; font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text); }
.userform { display: grid; grid-template-columns: 1fr 1fr 1.4fr auto; gap: 10px; align-items: end; }
.userform select, .userform input { width: 100%; }
form.inline { display: inline-flex; gap: 4px; align-items: center; margin: 0; }
.users td.acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pwreset input { width: 120px; padding: 4px 8px; font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text); }
button.danger { color: var(--up); }

@media (max-width: 1100px) {
  .dash-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .sumrow { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .sumcell { padding: 12px; }
  .sumcell strong { font-size: 16px; }
  .dash-two { grid-template-columns: minmax(0, 1fr); }
  /* 휴대폰: 대분류 = 한 줄, 칸이 옆으로 줄바꿈 (가로 스크롤 없음) */
  .map-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .bigcol { flex-direction: row; align-items: flex-start; gap: 8px; }
  .bigname { width: 54px; flex: 0 0 54px; text-align: left; white-space: normal; padding-top: 10px; }
  .tiles-col { flex-direction: row; flex-wrap: wrap; flex: 1; }
  .sm-tile { width: calc(33.333% - 3px); min-height: 44px; }
  .map-legend .legend-note { margin-left: 0; width: 100%; }
  .userform { grid-template-columns: minmax(0, 1fr); }
  .auxtabs span { margin-left: 0; width: 100%; }
}

/* 큰손 순매수: 외국인·기관 따로 */
.netcell .netrow { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 3px; }
.netcell .netrow span { display: inline; font-size: 13px; color: var(--muted); }
.netcell .netrow strong { display: inline; font-size: 17px; margin: 0; }
.netcell em { display: block; margin-top: 3px; }
.splitline { display: block; font-size: 11.5px; font-weight: 400; color: var(--muted); margin-top: 2px; white-space: nowrap; }
.splitline .up, .splitline .down { font-weight: 600; }
.sumcell .splitline span, .kpis .splitline span { display: inline; font-size: inherit; }
.kpis .splitline { font-style: normal; }

/* 업종 차트 (주식 차트형) */
.schart { position: relative; width: 100%; margin-top: 6px; }
.schart-svg { display: block; width: 100%; height: auto; overflow: visible; font-variant-numeric: tabular-nums; touch-action: pan-y; }
.schart-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.schart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg-line { display: inline-block; width: 18px; height: 3px; border-radius: 2px; }
.lg-idx { background: linear-gradient(90deg, var(--up) 50%, var(--down) 50%); }
.lg-bar { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: linear-gradient(90deg, var(--up) 50%, var(--down) 50%); }
.inv-bg-f { background: var(--c-foreign); } .inv-bg-i { background: var(--c-inst); } .inv-bg-p { background: var(--c-indiv); }
b.inv-f { color: var(--c-foreign); font-weight: 600; } b.inv-i { color: var(--c-inst); font-weight: 600; } b.inv-p { color: var(--c-indiv); font-weight: 600; }
.schart-tip { position: absolute; z-index: 5; pointer-events: none; min-width: 190px; padding: 9px 11px; font-size: 12.5px; line-height: 1.65;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.schart-tip strong { display: block; margin-bottom: 2px; }
.schart-tip i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.schart-tip span { color: var(--muted); }
.schart-card .seg button { min-width: 48px; }
/* 업종 비중표 */
.sectbl .thsort { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.sectbl .thsort:hover { text-decoration: underline; }
.sectbl th.sorted, .sectbl th.sorted a, .sectbl th.sorted .thsort { color: var(--text); font-weight: 700; }
.sectable-card { margin-top: 14px; }
.more-btn { margin-top: 10px; width: 100%; }
.ibadge { display: inline-block; font-size: 11px; font-weight: 700; padding: 0 6px; border-radius: 999px; vertical-align: 1px;
  background: color-mix(in srgb, var(--warn) 18%, var(--surface)); color: var(--warn); white-space: nowrap; }
@media (max-width: 760px) { .sectbl .hide-m { display: none; } .sectbl .split-h, .sectbl .split-c { display: none; } }
/* 중요 이슈 */
.impstrip { border: 1px solid color-mix(in srgb, var(--warn) 40%, var(--line)); background: color-mix(in srgb, var(--warn) 6%, var(--surface));
  border-radius: var(--radius); padding: 10px 14px; margin-bottom: 14px; }
.impstrip-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin-bottom: 4px; }
.impstrip-head strong { color: var(--warn); }
.impstrip-head a { margin-left: auto; }
.impstrip ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 4px 18px; }
.impstrip li { padding: 5px 0; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.impstrip li a strong { color: var(--text); }
.impstrip a.ikind { text-decoration: none; }
.sm-tile { position: relative; }
.tdot { position: absolute; top: -6px; right: -5px; z-index: 1; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; font-size: 10.5px; font-weight: 700;
  line-height: 16px; text-align: center; color: #fff; background: var(--warn); box-shadow: 0 0 0 2px var(--surface); }
.tdot.static { position: static; display: inline-block; box-shadow: none; }
.lg-mark { display: inline-block; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 8px solid var(--warn); }
.tip-mark { color: var(--warn); font-weight: 600; }
/* 큰발 */
.bf-check strong { color: var(--text); }
.bftbl tr.bf-off td { opacity: .55; }
.bftbl tr.bf-off:hover td { opacity: .85; }
.pill.bf-new { background: color-mix(in srgb, var(--up) 14%, var(--surface)); color: var(--up); border-color: transparent; font-weight: 700; }
.bf-rules { margin: 10px 0 6px; padding-left: 20px; line-height: 1.7; }
.bfline { margin: 10px 0 0; padding: 8px 10px; border-radius: 8px; border-left: 3px solid var(--up); background: color-mix(in srgb, var(--up) 6%, var(--surface)); }
.bfline.bf-sell { border-left-color: var(--down); background: color-mix(in srgb, var(--down) 6%, var(--surface)); }
.bfline.bf-buy a strong { color: var(--up); }
.bfline.bf-sell a strong { color: var(--down); }
.bftag { display: inline-block; font-size: 11px; font-weight: 700; padding: 0 6px; border-radius: 999px; text-decoration: none; }
.bftag.bf-buy { color: var(--up); background: color-mix(in srgb, var(--up) 12%, var(--surface)); }
.bftag.bf-sell { color: var(--down); background: color-mix(in srgb, var(--down) 12%, var(--surface)); }
.lg-bf { display: inline-block; width: 0; height: 12px; border-left: 2px dashed var(--up); vertical-align: -1px; }
/* 사용법 */
.help-toc { margin: 0 0 14px; display: inline-flex; }
.help h3 { margin-top: 0; }
.help h4 { margin: 18px 0 6px; font-size: 15px; }
.help-key { padding: 10px 12px; border-radius: 8px; background: var(--surface-2, color-mix(in srgb, var(--text) 4%, var(--surface))); }
.helptbl td, .helptbl th, .watch.helptbl td + td { vertical-align: top; line-height: 1.55; white-space: normal; }
.helptbl { table-layout: auto; width: 100%; }
.helptbl td:first-child { white-space: nowrap; }
.help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 28px; }
.help ul, .help ol { padding-left: 20px; line-height: 1.7; margin: 0; }
.help-terms { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; line-height: 1.55; }
.help-terms dt { font-weight: 700; }
.help-terms dd { margin: 0; color: var(--muted); }
@media (max-width: 640px) { .help-terms { grid-template-columns: 1fr; } .help-terms dd { margin-bottom: 6px; } .helptbl td:first-child { white-space: normal; } }
/* 타겟1 */
.t1-conds { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 10px; }
.t1-cond { border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 13px; background: var(--surface); }
.t1-cond em { font-style: normal; color: var(--muted); font-size: 12px; }
.t1-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 12px; }
.t1-kpi { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.t1-kpi span { font-size: 12.5px; }
.t1-kpi strong { font-size: 24px; line-height: 1.2; }
.t1-kpi em { font-style: normal; font-size: 12px; }
.t1tbl tr.t1-win td:nth-child(5) { background: color-mix(in srgb, var(--up) 7%, transparent); }
.t1tbl tr.t1-lose td:nth-child(5) { background: color-mix(in srgb, var(--down) 7%, transparent); }
.t1-notes { padding-left: 20px; line-height: 1.7; margin: 0; }
.t1-kpi strong span { font-size: inherit; }
/* 지도: 월간·주간·일간 한눈에 */
.sm-tile .tmulti { display: none; }
.sector-map[data-mode="mwd"] .sm-tile .tval { display: none; }
.sector-map[data-mode="mwd"] .sm-tile .tmulti { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.sector-map[data-mode="mwd"] .sm-tile { background: var(--bg); justify-content: flex-start; padding: 5px 5px 4px; }
.sector-map[data-mode="mwd"] .sm-tile .tname { -webkit-line-clamp: 2; }
.sector-map[data-mode="cum"] .mode-note-mwd { display: none; }
.tm { display: flex; justify-content: space-between; align-items: baseline; gap: 3px; border-radius: 4px; padding: 1px 4px;
  font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.35; }
.tm b { font-weight: 600; font-size: 10px; opacity: .75; }
.tm.lv0 { background: color-mix(in srgb, var(--text) 5%, var(--surface)); }
.seg-sm { margin-bottom: 8px; display: flex; flex-wrap: wrap; }
.seg-sm button { font-size: 12px; padding: 4px 8px; }
@media (max-width: 760px) { .sector-map[data-mode="mwd"] .sm-tile { width: calc(33.333% - 3px); } }
/* 확인 창 */
#uid { cursor: default; user-select: none; }
.u-dlg { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 100; }
.u-box { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; width: min(300px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 8px; }
.u-box input { font-size: 18px; letter-spacing: 4px; text-align: center; }
.u-acts { display: flex; justify-content: flex-end; gap: 8px; }
/* 내 전략 */
.dk-verdict { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.dk-verdict.pass { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--accent); }
.dk-verdict.few, .dk-verdict.none { background: color-mix(in srgb, var(--text) 8%, var(--surface)); color: var(--muted); }
.dk-verdict.neg { background: color-mix(in srgb, var(--down) 14%, var(--surface)); color: var(--down); }
.dk-verdict.half { background: color-mix(in srgb, var(--warn) 14%, var(--surface)); color: var(--warn); }
.dk-prefs { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; align-items: end; }
.dk-prefs label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.dk-prefs label span { color: var(--muted); font-size: 12px; }
.dk-chk { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; padding: 1px 6px; border-radius: 999px; }
.dk-chk.ok { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.dk-chk.no { color: var(--muted); background: color-mix(in srgb, var(--text) 6%, var(--surface)); text-decoration: line-through; }
.dk-banner { padding: 10px 12px; border-radius: 8px; border-left: 3px solid var(--warn); background: color-mix(in srgb, var(--warn) 8%, var(--surface)); margin: 0 0 12px; }
.dk-calc { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.dk-calc output { font-size: 20px; font-weight: 700; display: block; }
.dk-prefs input:not([type=checkbox]), .dk-calc input { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 14px; font-variant-numeric: tabular-nums; }
.dk-prefs { align-items: start; }
.dk-prefs label { justify-content: flex-start; }
.dk-prefs button { align-self: center; }
.dk-calc label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.dk-calc > div { padding-top: 4px; }
/* 메뉴가 많아져서: 중간 폭에서는 간격·검색창을 줄여 한 줄에 다 보이게 */
@media (max-width: 1440px) and (min-width: 761px) {
  .topbar { gap: 14px; padding: 12px 16px; }
  .nav { gap: 2px; }
  .nav a, .nav span { padding: 6px 7px; font-size: 13.5px; }
  .topsearch { width: 170px; }
}
/* 엄선 */
.strict-tbl { margin-top: 10px; }
.strict-h { margin: 16px 0 4px; font-size: 14px; }
.mode-badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; vertical-align: middle;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
/* 증여 */
.gifttbl td { vertical-align: top; }
.gift-win { min-width: 150px; }
.gwbar { position: relative; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--text) 10%, var(--surface)); margin: 4px 0 3px; }
.gwbar span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--warn); }
.gwbar i { position: absolute; top: -3px; width: 2px; height: 12px; background: var(--text); opacity: .6; }
.gifttbl tr.gift-cancel td { opacity: .6; }
.lg-band { display: inline-block; width: 14px; height: 10px; background: color-mix(in srgb, var(--warn) 25%, transparent); vertical-align: -1px; }
.gifttbl td, .gifttbl th, .watch.gifttbl td + td { white-space: normal; }
.gifttbl td:first-child { min-width: 150px; }
.gifttbl td:nth-child(2) { min-width: 180px; max-width: 320px; }
.watch.gifttbl td.num, .watch.gifttbl td + td.num { white-space: nowrap; }
