/* TossDash 화면 — E 디자인(어두운 바탕 기본 · 설정에서 밝게). 색은 모두 아래 토큰으로만 쓴다.
   대비 검사함: 본문 ≥ 7:1 · 늘었음/줄었음 ≥ 5.8:1 · 표시 ≥ 3:1 */
:root {
  color-scheme: dark;
  --bg: #090d13; --surface: #10161f; --surface2: #161d27; --track: #1c2531; --seg: #2a3442; --line: #1c2531; --grid: #1c2531; --axis: #2a3442;
  --nav: #10161f; --nav-line: #222c3a; --ink: #e8edf4; --ink2: #b4bfcd; --muted: #98a3b3; --chev: #6b7687;
  --users: #3987e5; --users2: #2675a6; --money: #c98500; --money-track: #2b2412; --points: #8b7cf0; --points-bg: #221d3d;
  --bar-past: #5b6678; --ref: #b4bfcd; --ring: #10161f; --up: #2bbd4f; --up-bg: #12301c; --down: #ff7272; --down-bg: #36171a; --flat: #f5a524; --flat-bg: #2b2412;
  --h1: #2b2412; --h2: #4f3c12; --h3: #7d5a10; --h4: #b07c0c; --h5: #e3a21a; --hi1: #e8edf4; --hi2: #e8edf4; --hi3: #e8edf4; --hi4: #090d13; --hi5: #090d13;
  --future: #161d27; --future-ink: #8591a2; --tag-bg: #1c2531; --tag-ink: #b4bfcd; --gray1: #98a3b3; --gray2: #6b7687;
  --primary: #e3a21a; --primary-ink: #090d13; --primary-soft: #2b2412; --primary-soft-ink: #f0b43c; --danger: #ff7272;
  --overlay: rgba(0, 0, 0, 0.62); --handle: #3d4859; --field: #0c1118; --field-line: #2a3442; --mock: #161d27; --mock-bar: #1c2531; --mock-line: #2a3442;
  --sel-ring: #e8edf4; --wm-toss: #fff3d6; --wm-dash: #f5a524; --new-dot: #e8edf4; --keep: #6f8fb8; --name: #fff3d6; --nav-sel: #2a3442;
  --dock-bg: #161d27; --dock-line: #2a3442; --dock-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --sel-d: #2a3442; --sel-l: transparent; --sel-d-ink: #e8edf4; --sel-l-ink: #b4bfcd; --sel-d-w: 600; --sel-l-w: 500;
  --font: 'IBM Plex Sans KR', system-ui, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --nav-h: 72px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
:root[data-theme='light'] {
  color-scheme: light;
  --bg: #f2f4f7; --surface: #ffffff; --surface2: #f5f7fa; --track: #e4e8ee; --seg: #ffffff; --line: #eef0f4; --grid: #eef0f4; --axis: #e0e5ec;
  --nav: #ffffff; --nav-line: #e6e9ef; --ink: #0e1621; --ink2: #455163; --muted: #5f6a7a; --chev: #6b7687;
  --users: #2a78d6; --users2: #3a96c8; --money: #c07a00; --money-track: #f4e7cc; --points: #5b48c2; --points-bg: #efedf9;
  --bar-past: #8a94a3; --ref: #455163; --ring: #ffffff; --up: #0b6b2b; --up-bg: #e4f3e8; --down: #c22f2f; --down-bg: #fbe7e7; --flat: #f5a524; --flat-bg: #fbf1de;
  --h1: #fbf1de; --h2: #f5dcae; --h3: #ecc177; --h4: #dc9a2e; --h5: #9a5f00; --hi1: #0e1621; --hi2: #0e1621; --hi3: #0e1621; --hi4: #0e1621; --hi5: #ffffff;
  --future: #f5f7fa; --future-ink: #5f6a7a; --tag-bg: #eef0f4; --tag-ink: #455163; --gray1: #455163; --gray2: #8a94a3;
  --primary: #9a5f00; --primary-ink: #ffffff; --primary-soft: #fbf1de; --primary-soft-ink: #8a5400; --danger: #c22f2f;
  --overlay: rgba(14, 22, 33, 0.48); --handle: #d5dae1; --field: #ffffff; --field-line: #c9d0db; --mock: #f5f7fa; --mock-bar: #e9edf2; --mock-line: #dfe4ea;
  --sel-ring: #0e1621; --wm-toss: #3b2a20; --wm-dash: #e08a1e; --new-dot: #2a78d6; --keep: #4d6f99; --name: #0e1621; --nav-sel: #e4e8ee;
  --dock-bg: #ffffff; --dock-line: #e1e5eb; --dock-shadow: 0 10px 30px rgba(14, 22, 33, 0.16);
  --sel-d: transparent; --sel-l: #ffffff; --sel-d-ink: #455163; --sel-l-ink: #0e1621; --sel-d-w: 500; --sel-l-w: 600;
  --seg-ring: #6b7687;
}

/* ── 바탕 */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  word-break: keep-all; overflow-wrap: anywhere; /* 한글 낱말 가운데서 줄이 갈리지 않게 · 긴 영문 · 숫자는 어디서든 */
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
svg { flex: none; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
[tabindex='-1']:focus { outline: none; }
[hidden] { display: none !important; }

/* ── 틀: 폰은 아래 메뉴, 넓은 화면은 왼쪽 메뉴 */
.shell { min-height: 100vh; min-height: 100dvh; }
.main { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 24px + var(--dock-pad, 0px)); }
.main.no-nav { padding-bottom: calc(var(--safe-b) + 32px + var(--dock-pad, 0px)); }
.main.has-bar { padding-bottom: calc(var(--safe-b) + 140px + var(--dock-pad, 0px)); }
.page { width: 100%; max-width: 600px; margin: 0 auto; }
.rail { display: none; }

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: calc(8px + var(--safe-b)); background: var(--nav); border-top: 1px solid var(--nav-line);
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
}
.nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-decoration: none;
  color: var(--muted); font-size: 12px; font-weight: 500;
}
.nav a svg { box-sizing: content-box; padding: 3px 14px; border-radius: 15px; }
/* 고른 탭 = 아이콘 뒤 알약 + 굵게 · 전략 탭은 늘 금색 */
.nav a[aria-current='page'] { color: var(--ink); font-weight: 700; }
.nav a[aria-current='page'] svg { background: var(--nav-sel); }
.nav a.gold { color: var(--primary); }

/* ── 머리 */
.hdr { height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 8px 0 16px; }
.hdr-title { padding-left: 20px; }
.hdr-title .title { font-size: 22px; font-weight: 700; }
.hdr-back { justify-content: flex-start; gap: 2px; padding: 0 16px 0 4px; }
.hdr-back .title { font-size: 18px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand { display: flex; align-items: center; gap: 4px; text-decoration: none; min-width: 0; }
.wordmark { font-family: 'Jua', var(--font); line-height: 1; letter-spacing: -0.01em; white-space: nowrap; }
.wordmark .t { color: var(--wm-toss); }
.wordmark .d { color: var(--wm-dash); }
.hdr-right { display: flex; align-items: center; min-width: 0; }
.hdr-back .hdr-right { margin-left: auto; flex: none; }
.hdr-back .datebtn { padding: 0 4px 0 10px; }
.icon-btn {
  width: 44px; height: 44px; border: 0; background: transparent; display: flex; align-items: center; justify-content: center;
  color: var(--ink2); text-decoration: none; border-radius: 12px; flex: none;
}
.icon-btn.ink { color: var(--ink); }
.datebtn {
  height: 44px; padding: 0 10px; border: 0; background: transparent; display: flex; align-items: center; gap: 4px;
  font-size: 15px; font-weight: 500; color: var(--ink2); white-space: nowrap;
}

/* ── 기간 고르기 · 보기 고르기 */
.seg-wrap { padding: 16px 16px 0; }
.seg-wrap.tight { padding: 4px 16px 0; }
.seg { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; background: var(--track); border-radius: 12px; }
.seg > button, .seg > a {
  height: 44px; border: 0; border-radius: 12px; background: transparent; display: flex; align-items: center; justify-content: center;
  text-decoration: none; font-size: 14px; font-weight: 500; color: var(--ink2);
}
.seg > [aria-pressed='true'], .seg > [aria-current='page'] { background: var(--seg); box-shadow: inset 0 0 0 4px var(--track), inset 0 0 0 5px var(--seg-ring, transparent); font-weight: 600; color: var(--ink); }
/* 작은 고르기(광고 수익 · 순수익 — 목록 · 카드 머리) — 두 칸 넓이는 긴 글에 맞춰 같게 */
.seg.mini { display: inline-grid; grid-auto-columns: 1fr; flex: none; border-radius: 10px; }
.seg.mini > button { height: 32px; padding: 0 10px; border-radius: 10px; font-size: 13px; white-space: nowrap; }
.seg.mini > [aria-pressed='true'] { box-shadow: inset 0 0 0 3px var(--track), inset 0 0 0 4px var(--seg-ring, transparent); }
/* 카드 머리 — 머리말(또는 제목) 왼쪽 · 작은 고르기 오른쪽(좁으면 고르기가 다음 줄로) */
.money-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 8px; margin-bottom: 6px; }
.money-head.title { margin-bottom: 0; }
.money-head > .eyebrow { margin: 0; }
.money-head > .card-title, .money-head > h3 { flex: 1 1 auto; min-width: 0; }
.money-head > .seg.mini { margin-left: auto; }

/* ── 첫 문장(사람 한 줄 · 수익 한 줄) */
.hl { padding: 8px 20px 0; display: flex; flex-direction: column; gap: 12px; }
.hl.pad-s { padding-top: 4px; }
.hl.pad-m { padding-top: 12px; }
.hl-row { display: flex; align-items: flex-end; gap: 8px; }
.hl h1, .hl .h1 { flex: 1; min-width: 0; margin: 0; font-size: 28px; line-height: 1.32; font-weight: 700; letter-spacing: -0.02em; }
.hl .line { display: block; white-space: nowrap; overflow: hidden; }
.hl .h1.wrap .line { white-space: normal; word-break: keep-all; overflow-wrap: anywhere; }
.hl .eyebrow-top { margin: 0 0 -6px; font-size: 13px; color: var(--muted); }
.hl .sub { font-size: 16px; color: var(--ink2); }
.hl-note { margin: -2px 0 0; display: flex; align-items: center; gap: 6px; font-size: 14px; line-height: 1.4; color: var(--ink2); }
.hl-note a { color: var(--primary-soft-ink); font-weight: 600; text-decoration: none; margin-left: 2px; white-space: nowrap; }
.mood { flex: none; overflow: visible; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px;
  font-size: 14px; font-weight: 600; white-space: nowrap;
}
.chip.up { background: var(--up-bg); color: var(--up); }
.chip.down { background: var(--down-bg); color: var(--down); }
.chip.flat { background: var(--surface); color: var(--ink2); }
.cmp-btn {
  display: inline-flex; align-items: center; gap: 2px; height: 34px; padding: 0 8px 0 12px; border: 0; border-radius: 999px;
  background: var(--surface); font-size: 14px; font-weight: 500; color: var(--ink2); white-space: nowrap; text-decoration: none;
}
.cmp-btn.static { padding: 0 12px; cursor: default; }

/* ── 용어(점선 밑줄) — 누르거나 마우스를 올리면 쉬운 설명 한 줄(ui.js term) */
.term {
  position: relative; display: inline; margin: 0; padding: 0; border: 0; border-radius: 4px; background: none;
  font: inherit; color: inherit; letter-spacing: inherit; line-height: inherit; text-align: inherit; white-space: nowrap; cursor: help;
  text-decoration: underline dotted; text-decoration-thickness: 1.5px; text-underline-offset: 0.22em;
  text-decoration-color: color-mix(in srgb, currentColor 60%, transparent);
}
.term::after { content: ''; position: absolute; inset: -8px -4px; } /* 누르는 자리를 글자보다 넉넉히 */
.term-tip {
  position: fixed; z-index: 70; left: 0; top: 0; width: max-content; max-width: min(300px, calc(100vw - 16px)); padding: 8px 12px; border-radius: 10px;
  background: var(--ink); color: var(--bg); font-size: 13px; line-height: 1.45; font-weight: 500; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.term-tip::after { content: ''; position: absolute; top: 100%; left: var(--ax, 50%); width: 10px; height: 10px; margin: -6px 0 0 -5px; background: inherit; transform: rotate(45deg); border-radius: 0 0 2px 0; }
.term-tip.below::after { top: 0; margin-top: -4px; border-radius: 2px 0 0 0; }
/* 링크 상자 안에 용어가 있을 때 — 상자를 덮는 링크 위로 용어만 올린다 */
.has-cover { position: relative; }
.cover { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.cover:focus-visible { border-radius: inherit; }
.has-cover .term { z-index: 2; }

/* ── 숫자 상자 */
.tiles { margin: 12px 16px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tiles.m20 { margin-top: 20px; }
.tile {
  background: var(--surface); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 6px;
  text-decoration: none; color: var(--ink); min-width: 0;
}
.tile-label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 4px; flex: none; }
.dot.money { background: var(--money); }
.dot.users { background: var(--users); }
.dot.points { background: var(--points); }
.tile-value { font-size: 24px; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; font-variant-numeric: tabular-nums; }
.tile-value.s22 { font-size: 22px; }
.tile-value.down { color: var(--down); } /* 순수익 적자 */
.tile-line { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-line.wrap { white-space: normal; }
.tile-cap { font-size: 11px; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; color: var(--muted); white-space: nowrap; overflow: hidden; }
/* 넘침 대비(ui.js fitSmall) — 줄여도 넘치면 ' · ' 사이에서만 접는다 */
.grp { white-space: nowrap; }
.fold { white-space: normal !important; text-overflow: clip !important; }
.tile-cap.under { margin-top: 6px; font-size: 12px; letter-spacing: 0; }
.spark { display: block; width: 100%; height: 36px; margin-top: 2px; }
.bar-track { margin-top: 14px; height: 10px; border-radius: 5px; background: var(--money-track); overflow: hidden; }
.bar-track > span { display: block; height: 10px; border-radius: 5px; background: var(--money); }
.mini-bars { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.mini-bars .kv { display: flex; justify-content: space-between; gap: 8px; }
.mini-bars .kv > span { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; }
.mini-bars .kv > b { flex: none; white-space: nowrap; }
.mini-bars .kv + .bar { margin-bottom: 4px; }
.mini-bars b { color: var(--ink); font-weight: 600; }
.mini-bars b.down { color: var(--down); }
.mini-bars .bar { height: 6px; }
.mini-bars .bar > span { display: block; height: 6px; border-radius: 0 3px 3px 0; }

/* ── 묶음 · 카드 */
.sec { margin: 28px 16px 0; }
.h2row { display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px 4px; gap: 8px; }
.h2row.base { align-items: baseline; margin-right: 4px; }
.h2 { margin: 0 4px 12px; font-size: 19px; font-weight: 700; }
.h2row .h2 { margin: 0; }
.h2-side { font-size: 13px; color: var(--muted); white-space: nowrap; }
.more { height: 44px; display: flex; align-items: center; gap: 2px; text-decoration: none; font-size: 14px; font-weight: 500; color: var(--ink2); white-space: nowrap; border: 0; background: transparent; padding: 0; }
.card { margin: 12px 16px 0; background: var(--surface); border-radius: 20px; padding: 20px; display: block; text-decoration: none; color: var(--ink); }
.card.flush { padding: 0; overflow: hidden; }
.card.m16 { margin-top: 16px; }
.card.m20 { margin-top: 20px; }
.card.m0 { margin: 0; }
.card.list { padding: 6px 20px; }
.eyebrow { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 16px; font-weight: 700; margin: 0; }
.card-title.s17 { font-size: 17px; }
.card-sub { margin-top: 8px; font-size: 14px; color: var(--ink2); }
.card-sub b, .ink b, b.ink { color: var(--ink); font-weight: 600; }
.divider { height: 1px; background: var(--line); margin: 0 20px; }
.chev { flex: none; display: flex; color: var(--chev); }
.lh { margin: 8px 0 0; text-align: right; font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── 눈여겨볼 것 */
.nrow { display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 12px 16px 12px 20px; text-decoration: none; color: var(--ink); }
.nicon { flex: none; width: 40px; height: 40px; border-radius: 20px; display: flex; align-items: center; justify-content: center; }
.nicon.up { background: var(--up-bg); color: var(--up); }
.nicon.down { background: var(--down-bg); color: var(--down); }
.ntext { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ntitle { font-size: 16px; font-weight: 600; }
.nsub { font-size: 14px; color: var(--muted); }
/* 묶음은 통째로 다음 줄로 · 한 묶음이 한 줄보다 길면(좁은 폰) 그 안에서만 줄을 바꿔 화면 밖으로 나가지 않게 */
.nsub .item, .items .item { display: inline-block; max-width: 100%; }
.calm-row { display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 12px 20px; color: var(--ink2); font-size: 15px; }

/* ── 앱 줄(이름 · 사용자 | 막대 | 값 | 변화) */
.arow {
  display: grid; grid-template-columns: 112px minmax(0, 1fr) 60px 52px; align-items: center; column-gap: 8px; min-height: 52px;
  text-decoration: none; color: var(--ink);
}
.arow.no-chg { grid-template-columns: 112px minmax(0, 1fr) 60px; column-gap: 10px; min-height: 50px; }
.aname { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.aname .n { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aname .u { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.tag-new { padding: 1px 5px; border-radius: 5px; background: var(--tag-bg); color: var(--tag-ink); font-size: 11px; font-weight: 600; }
/* 새 버전 검토 상태(10/28) — 폰은 사용자 줄(신규 옆 · 칸이 모자라면 다음 줄로) · PC 표는 이름 옆(이름이 길면 이름만 줄임표) */
.aname .n.has-rv { display: flex; align-items: center; gap: 6px; }
.aname .n.has-rv .nt { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.list .aname .u.has-rv { flex-wrap: wrap; row-gap: 4px; padding-block: 1px; }
.tag-rv.rv-wide { display: none; }
.pc-table .tag-rv.rv-wide { display: inline-block; }
.pc-table .tag-rv.rv-narrow { display: none; }
.tag-rv { flex: none; padding: 1px 5px; border-radius: 5px; font-size: 11px; font-weight: 600; line-height: 1.4; white-space: nowrap; background: var(--tag-bg); color: var(--tag-ink); }
.tag-rv.waiting { background: var(--primary-soft); color: var(--primary-soft-ink); }
.tag-rv.rejected { background: var(--down-bg); color: var(--down); }
.abar { position: relative; height: 8px; }
.abar > span { display: block; min-width: 2px; height: 8px; border-radius: 0 4px 4px 0; background: var(--money); }
.abar.points > span { background: var(--points); }
/* 0 기준 막대 — 음수(순수익 적자)는 0선 왼쪽으로 내림 색 · 0선은 음수가 있을 때만 */
.abar > span.neg { position: absolute; top: 0; background: var(--down); border-radius: 4px 0 0 4px; }
.abar > .zero { position: absolute; top: -4px; bottom: -4px; width: 1px; background: var(--chev); }
.aval { text-align: right; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; }
.aval.down, .anet.down { color: var(--down); }
/* PC 앱 표의 순수익 · 1,000회 노출당 수익 칸 */
.anet, .aecpm { text-align: right; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; }
.aecpm { font-weight: 500; color: var(--ink2); }
/* 좁은 폰(320) — 막대 칸이 0px 이라 0선 눈금 · 최소 넓이 조각만 남는다 → 숨김 */
@media (max-width: 340px) { .arow .abar > * { display: none; } }
.achg { text-align: right; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; font-variant-numeric: tabular-nums; }
.achg.up { color: var(--up); }
.achg.down { color: var(--down); }
.achg.flat { color: var(--muted); font-weight: 400; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 40px; font-size: 13px; color: var(--muted); }
.list-head .cmp-link { height: 40px; display: inline-flex; align-items: center; gap: 2px; margin-right: -4px; border: 0; background: transparent; color: var(--ink2); font-size: 13px; padding: 0; }

/* ── 왜 바뀌었나(0 기준선 양쪽 막대) */
.wrow { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.wrow.first { margin-top: 16px; }
.wrow .kv { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.wrow .kv b { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wbar { position: relative; display: block; height: 10px; }
.wbar .zero { position: absolute; top: -3px; bottom: -3px; width: 1px; background: var(--chev); }
.wbar .fill { position: absolute; top: 0; height: 10px; }
.wbar .fill.pos { border-radius: 0 5px 5px 0; }
.wbar .fill.neg { border-radius: 5px 0 0 5px; }
.fill.users { background: var(--users); }
.fill.money { background: var(--money); }

/* ── 유입 경로 */
.ibar { margin-top: 14px; display: flex; gap: 2px; height: 12px; }
.ibar > span { min-width: 2px; }
.ibar > span:first-child { border-radius: 6px 0 0 6px; }
.ibar > span:last-child { border-radius: 0 6px 6px 0; }
.ibar > span:only-child { border-radius: 6px; }
.ileg { margin-top: 12px; display: flex; flex-wrap: wrap; column-gap: 12px; row-gap: 6px; font-size: 13px; color: var(--ink2); }
.ileg.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 8px; font-size: 14px; }
.ileg > span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.ileg .k { width: 9px; height: 9px; border-radius: 5px; flex: none; }
.ileg.two .k { width: 10px; height: 10px; }
.ileg b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.c-users { background: var(--users); }
.c-users2 { background: var(--users2); }
.c-gray1 { background: var(--gray1); }
.c-gray2 { background: var(--gray2); }

/* ── 달력(작게 · 크게) */
.cal-week { margin-top: 12px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; font-size: 11px; color: var(--muted); }
.cal-grid { margin-top: 6px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; font-size: 11px; font-weight: 600; line-height: 28px; }
.cal-cell { height: 28px; border-radius: 7px; border: 0; padding: 0; font-size: 11px; font-weight: 600; color: inherit; background: transparent; text-decoration: none; display: block; }
.cal-cell.future { background: var(--future); color: var(--future-ink); font-weight: 400; }
.cal-cell.none { background: var(--future); color: var(--future-ink); font-weight: 400; }
/* 순수익 적자인 날(작은 달력) — 큰 달력 .bcell.neg 와 같은 색 */
.cal-cell.neg { background: var(--down-bg); color: var(--down); }
.l1 { background: var(--h1); color: var(--hi1); }
.l2 { background: var(--h2); color: var(--hi2); }
.l3 { background: var(--h3); color: var(--hi3); }
.l4 { background: var(--h4); color: var(--hi4); }
.l5 { background: var(--h5); color: var(--hi5); }
.sel-ring { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--sel-ring); }
.heat-legend { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.heat-legend .scale { display: inline-flex; align-items: center; gap: 4px; }
.heat-legend .scale i { width: 14px; height: 14px; border-radius: 4px; }
.heat-legend .new { display: inline-flex; align-items: center; gap: 6px; }
.heat-legend .new i { width: 7px; height: 7px; border-radius: 4px; background: var(--new-dot); }
.heat-legend .extra { display: inline-flex; align-items: center; gap: 12px; }
.heat-legend .loss { display: inline-flex; align-items: center; gap: 6px; }
.heat-legend .loss i { width: 14px; height: 14px; border-radius: 4px; background: var(--down-bg); box-shadow: inset 0 0 0 1px var(--down); }
.bigcal-week { margin-top: 16px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; font-size: 12px; color: var(--muted); }
.bigcal { margin-top: 8px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.bcell {
  position: relative; height: 58px; border-radius: 10px; padding: 6px; border: 0; font-size: 12px; text-align: left;
  display: flex; flex-direction: column; justify-content: space-between; text-decoration: none; color: var(--future-ink); background: transparent; min-width: 0;
}
.bcell.future { background: var(--future); }
.bcell.none { background: var(--future); }
.bcell .d { font-size: 12px; font-weight: 600; }
/* 오른쪽 1px — 줄여 맞춘 숫자의 마지막 글자(좁힌 자간만큼 글자가 칸 끝을 넘는다)가 잘리지 않게 */
.bcell .v { align-self: flex-end; font-family: var(--mono); font-size: 11px; letter-spacing: -0.04em; white-space: nowrap; max-width: 100%; overflow: hidden; padding-right: 1px; }
.bcell .launch { position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 4px; background: var(--new-dot); }
.bcell.l1 { background: var(--h1); color: var(--hi1); }
.bcell.l2 { background: var(--h2); color: var(--hi2); }
.bcell.l3 { background: var(--h3); color: var(--hi3); }
.bcell.l4 { background: var(--h4); color: var(--hi4); }
.bcell.l5 { background: var(--h5); color: var(--hi5); }
/* 순수익 적자인 날 — 색 칸 다섯과 따로(내림 색 · 숫자 앞에 −) */
.bcell.neg { background: var(--down-bg); color: var(--down); }
/* 금액 글자 — 적자(0 아래)는 내림 색(달력 이달 순수익 · 예상 순수익) */
.amt.down { color: var(--down); }
@media (max-width: 380px) { .bcell { padding: 6px 4px; } .bcell .v { font-size: 10px; } }
/* 320 폭 — 적자 네 자리(−9,999)도 8px 아래로 줄이지 않고 들어가게 칸 안 여백 · 숫자 자간을 조금 더 줄인다 */
@media (max-width: 340px) { .bcell { padding: 6px 3px; } .bcell .v { letter-spacing: -0.07em; } }
.month-nav { display: flex; align-items: center; gap: 2px; margin-left: -6px; }
.month-nav .m { font-size: 16px; font-weight: 600; }
.icon-btn:disabled { color: var(--chev); opacity: 0.5; }
.launch-row { display: flex; align-items: flex-start; gap: 14px; padding: 12px 20px; }
.launch-row .date { width: 40px; flex: none; font-family: var(--mono); font-size: 13px; color: var(--muted); line-height: 22px; }

/* ── 그래프 카드 */
.chart-title { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; }
.chart-sum { margin: 8px 0 12px; font-size: 14px; color: var(--ink2); }
.chart-sum b { color: var(--ink); font-weight: 600; }
.chart { position: relative; width: 100%; }
.chart svg { display: block; overflow: visible; }
/* 그래프 값 읽기 — 위에 얹은 투명한 판 · 고른 칸 말고는 흐리게 · 말풍선(ui.js readable) */
.chart-read { position: absolute; inset: 0; z-index: 2; border-radius: 8px; touch-action: pan-y; -webkit-tap-highlight-color: transparent; }
.chart svg .bars { transition: opacity 0.12s; }
.chart svg.reading .bars { opacity: 0.35; }
.chart-tip {
  position: absolute; top: -10px; left: 0; z-index: 3; pointer-events: none; display: flex; flex-direction: column; gap: 1px; padding: 6px 10px;
  border-radius: 10px; background: var(--dock-bg); border: 1px solid var(--dock-line); box-shadow: var(--dock-shadow); white-space: nowrap;
}
.chart-tip .d { font-size: 12px; color: var(--muted); }
.chart-tip .v { font-size: 15px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.chart-foot { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.chart-foot .ref { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.chart-foot .ref i { flex: none; width: 16px; border-top: 1.5px dashed var(--ref); }
.chart-foot .lhl { font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crow {
  width: 100%; padding: 0; border: 0; background: transparent; text-align: left;
  display: grid; grid-template-columns: 124px minmax(0, 1fr) 64px; column-gap: 8px; align-items: center; height: 40px; font-size: 14px; text-decoration: none; color: var(--ink);
}
.crow .nm { display: inline-flex; align-items: center; gap: 2px; min-width: 0; white-space: nowrap; overflow: hidden; }
.crow .nm.rest { color: var(--ink2); }
.crow .track { position: relative; height: 40px; }
.crow .track .zero { position: absolute; top: 8px; bottom: 8px; width: 1px; background: var(--chev); }
.crow .track .fill { position: absolute; top: 16px; height: 8px; }
.crow .track .fill.up { background: var(--up); border-radius: 0 4px 4px 0; }
.crow .track .fill.down { background: var(--down); border-radius: 4px 0 0 4px; }
.crow .v { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.crow .v.up { color: var(--up); }
.crow .v.down { color: var(--down); }
.crow.sub .nm { padding-left: 14px; color: var(--ink2); font-size: 13px; }

/* ── 첫 14일 · 프로모션 줄 */
.frow { display: grid; grid-template-columns: 104px minmax(0, 1fr) 64px; align-items: center; column-gap: 10px; height: 46px; }
.frow .n { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frow.me .n { font-weight: 600; }
.frow .u { font-size: 12px; color: var(--muted); white-space: nowrap; }
.frow .bar { height: 10px; }
.frow .bar > span { display: block; height: 10px; border-radius: 0 5px 5px 0; background: var(--bar-past); min-width: 2px; }
.frow.me .bar > span { background: var(--money); }
.frow .v { text-align: right; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink2); white-space: nowrap; }
.frow.me .v { color: var(--ink); }
/* 순수익 적자(출시 14일 · 카드 제목 금액) — 내림 색 */
.frow .v.down, .frow.me .v.down, .card-title.down { color: var(--down); }
.prow { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 20px; }
.prow .n { flex: 1; min-width: 0; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow .c { font-size: 14px; color: var(--muted); white-space: nowrap; }
.prow .v { min-width: 44px; text-align: right; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pitem { padding: 12px 20px; display: flex; flex-direction: column; gap: 8px; }
.pitem .top { display: flex; align-items: baseline; gap: 8px; }
.pitem .t { flex: 1; min-width: 0; font-size: 15px; line-height: 1.4; overflow: hidden; word-break: keep-all; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.pitem .v { font-size: 15px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pitem .bot { display: flex; align-items: center; gap: 10px; }
.pitem .bar { flex: 1; height: 8px; min-width: 0; }
.pitem .bar > span { display: block; height: 8px; background: var(--points); border-radius: 0 4px 4px 0; min-width: 2px; }
.pitem .bar.budget { border-radius: 4px; background: var(--points-bg); overflow: hidden; }
.pitem .bar.budget > span { border-radius: 4px; }
.pitem .bar.budget.ended { background: var(--track); }
.pitem .bar.budget.ended > span { background: var(--bar-past); }
.pitem .app { width: 88px; flex: none; text-align: right; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pitem .note { font-size: 13px; color: var(--muted); }
.pitem .note.bad { color: var(--down); font-weight: 600; }
.pitem .note + .note { margin-top: -4px; }
.pitem.tap { cursor: pointer; }
.pitem.tap:hover { background: var(--surface2); }
.pitem.tap:focus-visible { outline-offset: -2px; border-radius: 0; }
/* 프로모션 상세 판 */
.pd { padding: 0 0 12px; }
.pd-t { margin: 4px 20px 0; font-size: 17px; font-weight: 700; line-height: 1.4; word-break: keep-all; overflow-wrap: anywhere; }
.pd-sub { margin: 4px 20px 8px; font-size: 14px; color: var(--muted); }
.pd .prow { align-items: baseline; min-height: 0; padding: 12px 20px; }
.pd .prow + .prow { border-top: 1px solid var(--line); }
.pd .prow .n { flex: none; font-size: 14px; color: var(--muted); }
.pd .prow .v { flex: 1; min-width: 0; white-space: normal; word-break: keep-all; overflow-wrap: anywhere; text-align: right; }
.rowbtn {
  width: 100%; min-height: 56px; padding: 0 16px 0 20px; border: 0; background: transparent; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; font-size: 16px; color: var(--ink); text-align: left; text-decoration: none;
}
.rowbtn[aria-expanded='true'] .chev svg { transform: rotate(90deg); }
.expand { padding: 0 20px 20px; }
.wide-btn {
  width: 100%; height: 52px; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; gap: 4px;
  font-size: 15px; font-weight: 500; color: var(--ink2);
}
.big-money { padding: 16px 20px 0; display: flex; flex-direction: column; gap: 6px; }
.big-money .label { font-size: 15px; color: var(--ink2); }
.big-money .v { font-size: 48px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ── 아래에서 올라오는 판 */
.sheet-root { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: var(--overlay); animation: fade 0.18s ease-out; }
.sheet {
  position: relative; width: 100%; max-width: 600px; max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border-radius: 24px 24px 0 0; padding: 10px 0 calc(28px + var(--safe-b)); animation: rise 0.22s ease-out;
}
.sheet.tall { height: calc(100dvh - 200px); max-height: none; }
.sheet-handle { width: 36px; height: 4px; border-radius: 2px; background: var(--handle); margin: 0 auto; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 4px 20px; gap: 8px; }
.sheet-head h2 { font-size: 18px; font-weight: 700; margin: 0; }
.sheet-body { padding: 6px 20px 0; }
.sheet-body > * + * { margin-top: 12px; }
.radio-row { display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 0 20px; width: 100%; border: 0; background: transparent; text-align: left; color: var(--ink); }
.radio { flex: none; width: 22px; height: 22px; border-radius: 11px; border: 2px solid var(--chev); display: flex; align-items: center; justify-content: center; }
.radio-row[aria-checked='true'] .radio { border-color: var(--primary); }
.radio-row[aria-checked='true'] .radio::after { content: ''; width: 10px; height: 10px; border-radius: 5px; background: var(--primary); }
.radio-row .t { font-size: 16px; font-weight: 500; }
.radio-row[aria-checked='true'] .t { font-weight: 600; }
.radio-row .s { font-size: 14px; color: var(--muted); }
.radio-row .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sum3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--surface2); border-radius: 16px; padding: 14px 4px; }
.sum3 > div { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.sum3 > div + div { border-left: 1px solid var(--axis); }
.sum3 .k { font-size: 13px; color: var(--muted); }
.sum3 .v { display: inline-flex; align-items: center; gap: 3px; max-width: 100%; overflow: hidden; font-size: 13px; font-weight: 600; white-space: nowrap; }
.sum3 .v.up { color: var(--up); }
.sum3 .v.down { color: var(--down); }
.sum3 .v.flat { color: var(--ink2); }
.daynav { padding: 24px 16px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.daynav button { height: 52px; border: 0; border-radius: 14px; background: var(--track); display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 15px; font-weight: 600; color: var(--ink); }
.daynav button:disabled { background: var(--surface2); color: var(--chev); }
@keyframes rise { from { transform: translateY(24px); opacity: 0.6; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ── 단추 · 입력 */
.btn {
  height: 56px; border: 0; border-radius: 14px; background: var(--primary); color: var(--primary-ink); font-size: 17px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; text-decoration: none; padding: 0 16px;
}
.btn:disabled, .btn[aria-disabled='true'] { opacity: 0.45; }
.btn.soft { height: 48px; border-radius: 12px; background: var(--primary-soft); color: var(--primary-soft-ink); font-size: 15px; }
.btn.gray { height: 52px; background: var(--track); color: var(--ink); font-size: 15px; }
.btn.small { height: 40px; width: auto; border-radius: 10px; font-size: 14px; padding: 0 14px; }
.btn.danger { background: var(--down-bg); color: var(--down); }
.text-btn { height: 44px; border: 0; background: transparent; font-size: 15px; color: var(--ink2); padding: 0 12px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.text-btn.danger { color: var(--danger); font-size: 14px; }
.text-btn.link { color: var(--primary-soft-ink); font-weight: 600; padding: 0; height: auto; }
.text-btn.help { color: var(--primary-soft-ink); font-weight: 600; }
.view-bar { padding-bottom: 8px; }
.text-btn.to-signup b { margin-left: 6px; color: var(--primary-soft-ink); font-weight: 700; }
.bottom-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; padding: 12px 16px calc(20px + var(--safe-b)); background: var(--bg);
  display: flex; flex-direction: column; gap: 10px;
}
.bottom-bar > .inner { width: 100%; max-width: 568px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.bottom-bar .gap4 { gap: 4px; }
.bottom-note { margin: 0; text-align: center; font-size: 13px; color: var(--muted); }
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink2); }
.field input, .field textarea, .input {
  height: 52px; padding: 0 14px; border: 1px solid var(--field-line); border-radius: 12px; background: var(--field); font-size: 16px; color: var(--ink); width: 100%; font-weight: 400;
}
.field textarea, textarea.input { height: auto; padding: 12px; font-family: var(--mono); font-size: 14px; line-height: 1.5; resize: none; }
.field input.mono, .input.mono { font-family: var(--mono); letter-spacing: 0.04em; }
.field input[readonly] { background: var(--surface2); border-color: transparent; color: var(--ink2); cursor: default; }
.page-lead { margin: 4px 24px 16px; font-size: 15px; color: var(--ink2); }
.label-row { padding: 12px 20px; display: flex; flex-direction: column; gap: 8px; }
.label-row + .label-row { border-top: 1px solid var(--line); }
.label-row .id { font-family: var(--mono); font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.label-row .inputs { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 8px; }
.label-row .input { height: 46px; }
.field input:focus, .field textarea:focus, .input:focus { outline: 2px solid var(--primary); outline-offset: 0; border-color: transparent; }
.field .hint { font-size: 13px; font-weight: 400; color: var(--muted); }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; color: var(--ink2); cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check .box { flex: none; width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--chev); display: flex; align-items: center; justify-content: center; color: transparent; }
.check input:checked + .box { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.check input:focus-visible + .box { outline: 2px solid var(--primary); outline-offset: 2px; }
.msg { font-size: 14px; color: var(--ink2); }
.msg.bad { color: var(--down); }
.msg.good { color: var(--up); }
.switch { flex: none; width: 52px; height: 32px; border: 0; border-radius: 16px; background: var(--track); padding: 3px; display: flex; justify-content: flex-start; transition: background 0.15s; }
.switch::after { content: ''; width: 26px; height: 26px; border-radius: 13px; background: var(--chev); transition: transform 0.15s, background 0.15s; }
.switch[aria-checked='true'] { background: var(--primary); }
.switch[aria-checked='true']::after { background: var(--primary-ink); transform: translateX(20px); }
.switch:disabled { opacity: 0.5; }
.theme-seg { display: grid; grid-template-columns: repeat(2, 76px); background: var(--track); border-radius: 12px; }
.theme-seg button { height: 40px; border: 0; border-radius: 12px; box-shadow: inset 0 0 0 4px var(--track); font-size: 14px; }
.theme-seg .d { background: var(--sel-d); color: var(--sel-d-ink); font-weight: var(--sel-d-w); }
.theme-seg .l { background: var(--sel-l); color: var(--sel-l-ink); font-weight: var(--sel-l-w); }
/* 설정 줄 안의 고르기(용어) — 테마 고르기와 같은 크기 */
.seg.pick { flex: none; grid-auto-flow: initial; grid-template-columns: repeat(2, 76px); }
.seg.pick > button { height: 40px; white-space: nowrap; }

/* ── 설정 줄 */
.set-h { margin: 24px 24px 8px; font-size: 14px; font-weight: 600; color: var(--muted); }
.set-card { margin: 0 16px; background: var(--surface); border-radius: 20px; overflow: hidden; }
.lrow {
  width: 100%; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 0 16px 0 20px; border: 0; background: transparent;
  text-align: left; color: var(--ink); text-decoration: none; font-size: 16px;
}
.lrow.tall { min-height: 64px; }
.lrow .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lrow .t { font-size: 16px; }
.lrow .s { font-size: 13px; color: var(--muted); }
.lrow .s.bad { color: var(--down); }
.lrow .s.good { color: var(--up); }
.status-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; white-space: nowrap; }
.status-dot i { width: 8px; height: 8px; border-radius: 4px; background: currentColor; }
.status-dot.good { color: var(--up); }
.status-dot.bad { color: var(--down); }
.status-dot.muted { color: var(--muted); }
.profile { margin: 8px 16px 0; background: var(--surface); border-radius: 20px; padding: 16px 20px; display: flex; align-items: center; gap: 14px; }
.avatar { flex: none; width: 48px; height: 48px; border-radius: 24px; background: var(--primary-soft); color: var(--primary-soft-ink); display: flex; align-items: center; justify-content: center; }
.profile .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.profile .t { font-size: 17px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile .s { font-size: 13px; color: var(--muted); }
.center-row { margin: 20px 16px 0; display: flex; justify-content: center; }

/* ── 토스 연결 걸음 · 지난 자료 띠 */
.badge { flex: none; width: 24px; height: 24px; border-radius: 12px; background: var(--primary); color: var(--primary-ink); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.step-card { border: 1px solid var(--nav-line); background: var(--surface); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.step-cap { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; }
.step-ok { margin: -4px 0 0; display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; color: var(--up); }
.step-how { margin: 0; padding: 0 0 0 22px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.5; color: var(--ink2); word-break: keep-all; }
.step-card > .btn.small { align-self: flex-start; }
.sheet textarea.input.plain { font-family: inherit; font-size: 15px; }
/* 서비스 관리 — 토스 연결 단계 */
.lk-row { display: grid; grid-template-columns: 88px 1fr 5.6em; align-items: center; gap: 10px; padding: 8px 20px; font-size: 14px; }
.lk-row .n { color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lk-row .bar { height: 8px; border-radius: 4px; background: var(--track); overflow: hidden; }
.lk-row .bar > span { display: block; height: 8px; background: var(--primary); border-radius: 4px; min-width: 2px; }
.lk-row .v { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.lk-note { margin: 6px 20px 0; font-size: 13px; line-height: 1.5; color: var(--muted); word-break: keep-all; }
/* 앱 안 브라우저 안내(카카오톡 …) */
.inapp { margin: 0 0 16px; padding: 14px; border-radius: 14px; background: var(--primary-soft); color: var(--primary-soft-ink); display: flex; flex-direction: column; gap: 12px; }
.inapp-t { margin: 0; display: flex; gap: 8px; font-size: 15px; line-height: 1.5; font-weight: 600; word-break: keep-all; }
.inapp-t svg { flex: none; margin-top: 3px; }
.inapp-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.auth-body .inapp { margin: 0 0 20px; }
.step-arrow { height: 32px; display: flex; align-items: center; justify-content: center; color: var(--chev); }
.mock { border-radius: 10px; background: var(--mock); overflow: hidden; }
.mock .bar { height: 34px; display: flex; align-items: center; padding: 0 10px; background: var(--mock-bar); }
.mock .url { flex: 1; min-width: 0; height: 22px; border-radius: 11px; background: var(--field); display: flex; align-items: center; gap: 6px; padding: 0 10px; font-family: var(--mono); font-size: 11px; color: var(--ink2); overflow: hidden; white-space: nowrap; }
.mock .url mark { background: var(--primary-soft); color: var(--primary-soft-ink); padding: 1px 3px; border-radius: 3px; }
.mock .body { height: 106px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 13px; }
.mock .ln { width: 150px; height: 12px; border-radius: 6px; background: var(--mock-line); }
.mock .in { width: 150px; height: 26px; border-radius: 8px; background: var(--field); border: 1px solid var(--mock-line); }
.mock .go { width: 150px; height: 26px; border-radius: 8px; background: var(--bar-past); }
.strip { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; row-gap: 10px; }
.strip .m { font-size: 13px; color: var(--muted); white-space: nowrap; }
.strip .days { display: grid; grid-template-columns: repeat(31, minmax(0, 1fr)); gap: 2px; }
.strip .days > i { height: 18px; border-radius: 3px; }
.strip .days > i.have { background: var(--primary); }
.strip .days > i.todo { box-shadow: inset 0 0 0 1.5px var(--chev); }
.strip .days > i.fail { box-shadow: inset 0 0 0 1.5px var(--down); }
.strip-legend { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; color: var(--muted); }
.strip-legend span { display: inline-flex; align-items: center; gap: 6px; }
.strip-legend i { width: 12px; height: 12px; border-radius: 3px; }
.strip-legend i.have { background: var(--primary); }
.strip-legend i.todo { box-shadow: inset 0 0 0 1.5px var(--chev); }
.strip-legend i.fail { box-shadow: inset 0 0 0 1.5px var(--down); }
.strip .y { grid-column: 1 / -1; margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--ink2); }
.strip .y:first-child { margin-top: 0; }
.strip .days > i.now, .strip-legend i.now { background: var(--primary-soft); box-shadow: inset 0 0 0 1.5px var(--primary); }
.strip .days > i.now { animation: td-pulse 1.6s ease-in-out infinite; }
@keyframes td-pulse { 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) { .strip .days > i.now { animation: none; } }
.bf-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 15px; }
.bf-top .t { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bf-top .v { flex: none; font-variant-numeric: tabular-nums; color: var(--ink2); }
.prog { position: relative; margin: 44px 0 20px; }
.prog .bird { position: absolute; bottom: 7px; transform: translateX(-50%); transition: left 0.4s; }
.prog .track { height: 10px; border-radius: 5px; background: var(--money-track); overflow: hidden; }
.prog .track > span { display: block; height: 10px; border-radius: 5px; background: var(--primary); transition: width 0.4s; }
.kv-line { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 15px; }
.kv-line .k { font-weight: 600; }
.kv-line .v { font-variant-numeric: tabular-nums; color: var(--ink2); white-space: nowrap; }

/* ── 상태 화면(불러오는 중 · 처음 · 문제) */
.state { min-height: calc(100dvh - 160px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 32px 24px; gap: 12px; }
.state.inline { min-height: 0; padding: 28px 20px; }
.state h1, .state .t { font-size: 22px; line-height: 1.35; font-weight: 700; letter-spacing: -0.01em; }
.state p, .state .s { font-size: 15px; color: var(--ink2); max-width: 340px; }
.state .s.lines { white-space: pre-line; }
.state .s.eta { font-size: 17px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.state .rid { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.state .actions { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 320px; }
.state .prog { width: 100%; max-width: 320px; margin: 44px 0 8px; }
.banner { margin: 8px 16px 0; padding: 12px 14px; border-radius: 14px; display: flex; align-items: center; gap: 10px; font-size: 14px; line-height: 1.4; background: var(--surface); color: var(--ink2); }
.banner.bad { background: var(--down-bg); color: var(--down); }
.banner.warn { background: var(--primary-soft); color: var(--primary-soft-ink); }
.banner .txt { flex: 1; min-width: 0; }
.banner a, .banner button { flex: none; border: 0; background: transparent; padding: 0; font-weight: 600; color: inherit; text-decoration: underline; text-underline-offset: 3px; }
body.offline { padding-top: 36px; }
.net-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 50; min-height: 36px; padding: 8px 16px; text-align: center; font-size: 13px; font-weight: 600; background: var(--down-bg); color: var(--down); }
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 16px); transform: translateX(-50%); z-index: 60; max-width: calc(100% - 32px); width: max-content;
  padding: 12px 16px; border-radius: 14px; background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 500; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
body.no-nav .toast { bottom: calc(var(--safe-b) + 24px); }
body.has-bar .toast { bottom: calc(var(--bar-h, 140px) + 12px); }
.skel { background: linear-gradient(90deg, var(--surface) 0%, var(--surface2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; border-radius: 12px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ── 자료 받는 중 — 아래 메뉴 · 긴 단추 위에 떠 있는 판(작게 접으면 오른쪽 알약) */
.dock {
  position: fixed; z-index: 30; left: 12px; right: 12px; bottom: calc(var(--nav-h) + var(--safe-b) + 12px); max-width: 568px; margin: 0 auto;
  display: flex; justify-content: flex-end; pointer-events: none;
}
body.no-nav .dock { bottom: calc(var(--safe-b) + 16px); }
body.has-bar .dock { bottom: calc(var(--bar-h, 140px) + 12px); }
.dock > * { pointer-events: auto; }
.dock.min .dock-card, .dock:not(.min) .dock-pill { display: none; }
.dock-card { width: 100%; padding: 14px 16px; border-radius: 20px; background: var(--dock-bg); border: 1px solid var(--dock-line); box-shadow: var(--dock-shadow); }
.dock-top { display: flex; align-items: flex-start; gap: 8px; }
.dock-say { flex: 1; min-width: 0; font-size: 16px; line-height: 1.4; font-weight: 600; color: var(--ink); }
.dock-say .grp { display: inline-block; white-space: nowrap; }
.dock-min { flex: none; width: 44px; height: 44px; margin: -10px -12px -10px 0; border: 0; border-radius: 12px; background: transparent; color: var(--ink2); display: flex; align-items: center; justify-content: center; }
.dock-prog { display: flex; align-items: flex-end; gap: 10px; margin-top: 2px; }
.dock-rail { position: relative; flex: 1; min-width: 0; padding-top: 25px; }
.dock-bird { position: absolute; top: 1px; transform: translateX(-50%); transition: left 0.6s; }
.dock-track { height: 8px; border-radius: 4px; background: var(--money-track); overflow: hidden; }
.dock-track > span { display: block; height: 8px; border-radius: 4px; background: var(--primary); transition: width 0.6s; }
.dock-pct { flex: none; min-width: 3.2em; margin-bottom: -4px; text-align: right; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink2); }
.dock-tip { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--dock-line); display: flex; align-items: flex-start; gap: 8px; min-height: calc(13px + 2.9em); font-size: 14px; line-height: 1.45; color: var(--ink2); }
.dock-tip .tag { flex: none; margin-top: 1px; padding: 0 7px; border-radius: 6px; background: var(--primary-soft); color: var(--primary-soft-ink); font-size: 12px; font-weight: 700; line-height: 19px; }
.dock-tip .t { flex: 1; min-width: 0; transition: opacity 0.22s; }
.dock-tip .t.out { opacity: 0; }
.dock-pill {
  position: relative; overflow: hidden; height: 44px; padding: 0 12px 0 10px; border-radius: 22px; border: 1px solid var(--dock-line); background: var(--dock-bg);
  box-shadow: var(--dock-shadow); display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap;
}
.dock-pill .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--primary-soft); transition: width 0.6s; }
.dock-pill > :not(.fill) { position: relative; }
.dock-pill .txt { font-variant-numeric: tabular-nums; }
.dock-pill > svg:last-child { transform: rotate(180deg); color: var(--ink2); }
body.has-dock .toast { bottom: calc(var(--dock-top, 0px) + 12px); }
/* 가로로 눕힌 폰처럼 낮은 화면은 꿀팁을 빼고 날짜 · 막대만 · 태블릿은 판이 넓어 꿀팁이 한 줄에 든다 */
@media (max-height: 560px) { .dock-tip { display: none; } }
@media (min-width: 600px) and (max-width: 899px) { .dock-tip { min-height: calc(13px + 1.45em); } }
@media (min-width: 900px) {
  .dock { left: auto; right: 24px; bottom: 24px; width: 360px; max-width: none; margin: 0; }
}

/* ── 운영 · 목록 표 */
.tlist { display: flex; flex-direction: column; }
.titem { padding: 12px 20px; display: flex; flex-direction: column; gap: 4px; }
.titem + .titem { border-top: 1px solid var(--line); }
.titem .top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.titem .t { font-size: 15px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.titem .side { font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.titem .s { font-size: 13px; color: var(--muted); word-break: keep-all; overflow-wrap: anywhere; }
.titem .s.bad { color: var(--down); }
.titem .note { font-size: 14px; line-height: 1.5; color: var(--ink); word-break: keep-all; overflow-wrap: anywhere; }
.titem .note.pre { white-space: pre-wrap; }
.titem .acts { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.code-box { font-family: var(--mono); font-size: 15px; background: var(--field); border: 1px solid var(--field-line); border-radius: 12px; padding: 12px 14px; white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; color: var(--ink); }
.qr { display: flex; justify-content: center; padding: 12px; background: #ffffff; border-radius: 16px; width: max-content; margin: 0 auto; }
.qr svg { display: block; }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat-grid .tile { padding: 12px 14px; }

/* ── 로그인 */
.auth { min-height: 100vh; min-height: 100dvh; padding-bottom: calc(176px + var(--safe-b)); }
.auth-brand { padding: 76px 20px 0; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.auth-brand.small { padding-top: 40px; gap: 10px; }
.auth-body { padding: 44px 16px 0; width: 100%; max-width: 480px; margin: 0 auto; }
.auth-body h1 { font-size: 24px; line-height: 1.35; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.auth-body .lead { font-size: 15px; color: var(--ink2); margin-bottom: 20px; }
.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 16px; }
.steps li { display: flex; flex-direction: column; gap: 10px; }
.steps .cap { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; }
.steps .s { font-size: 14px; color: var(--ink2); }

/* ── 넓은 화면: 가운데 줄 · 왼쪽 메뉴 */
@media (min-width: 600px) {
  .bottom-bar { left: 50%; right: auto; width: 600px; transform: translateX(-50%); }
  .toast { bottom: 32px; }
}
@media (min-width: 900px) {
  .nav { display: none; }
  .rail {
    display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; width: 240px; z-index: 20; padding: 20px 12px;
    background: var(--nav); border-right: 1px solid var(--nav-line); gap: 4px;
  }
  .rail .brand { padding: 0 8px 20px; }
  .rail a {
    display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 12px; border-radius: 12px; text-decoration: none;
    color: var(--muted); font-size: 15px; font-weight: 500;
  }
  .rail a[aria-current='page'] { background: var(--nav-sel); color: var(--ink); font-weight: 700; }
  .rail a.gold { color: var(--primary); }
  .rail .spacer { flex: 1; }
  .shell.with-rail .main { margin-left: 240px; padding-bottom: calc(48px + var(--dock-pad, 0px)); }
  .shell.with-rail .main.has-bar { padding-bottom: calc(140px + var(--dock-pad, 0px)); }
  .shell.with-rail .hdr-home .brand { visibility: hidden; }
  .page { max-width: 640px; }
  .shell.with-rail .bottom-bar { left: calc(50% + 120px); width: 600px; }
  .sheet-root { align-items: center; }
  .sheet { border-radius: 24px; max-width: 480px; padding-bottom: 24px; }
  .sheet.tall { height: auto; max-height: calc(100dvh - 96px); }
  .sheet-handle { display: none; }
  .toast { bottom: 32px; left: calc(50% + 120px); }
}

/* ── PC(1200 이상): 격자 배치(A) — 12칸 · 줄마다 칸 높이를 맞춤 · 스크롤 하나 · 머리 줄은 위에 붙음(제목 왼쪽 · 기간 · 날짜 · 설정 오른쪽).
   화면이 격자로 그렸을 때만(.page.wide · ui.js pcTop · pcGrid) — 600~1199 는 위의 가운데 줄 그대로 */
@media (min-width: 1200px) {
  .page.wide { max-width: 1440px; padding: 0 32px; }
  .pc-top { position: sticky; top: 0; z-index: 10; height: 76px; padding: 0; gap: 16px; justify-content: flex-start; background: var(--bg); }
  body.offline .pc-top { top: 36px; }
  .pc-top > .icon-btn.ink { margin: 0 -6px 0 -12px; }
  .pc-top .title { margin-right: auto; min-width: 0; font-size: 24px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pc-top .hdr-right { flex: none; gap: 8px; }
  .pc-top .seg { width: 264px; }
  .pc-top .seg > button, .pc-top .seg > a, .pc-top .datebtn { height: 40px; }
  .pc-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px 20px; align-items: stretch; padding-top: 4px; }
  .pc-grid > * { margin: 0 !important; min-width: 0; }
  .pc-grid > .sec { display: flex; flex-direction: column; }
  .pc-grid > .sec > .card, .pc-grid > .sec > .tiles, .pc-grid > .sec > .pc-cols3 { flex: 1; margin: 0; }
  .pc-grid > .sec > .h2row { flex: none; height: 32px; margin: 0 4px 12px; }
  .pc-grid > .sec > .h2 { flex: none; height: 32px; margin: 0 4px 12px; line-height: 32px; white-space: nowrap; }
  .pc-grid > .sec > .h2row .h2 { margin: 0; }
  .pc-grid > .sec > .h2row .more { height: 32px; }
  .pc-grid > .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
  .pc-grid > .hl { align-self: start; padding: 4px 4px 0 !important; }
  .pc-grid > .big-money { align-self: center; padding: 0 4px; }
  .pc-grid > .pc-note { padding: 0 4px !important; }
  .pc-cols3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .pc-cols3 > .card { margin: 0; }
  .pc-bigcal .bcell { height: 76px; }
  .pc-ret .tiles { gap: 12px; }
  .pc-ret .tile { padding: 0; background: transparent; }
  /* 앱 표 — 앱 · 사용자 · 광고 수익(막대 · 금액) · 변화(광고 수익) · 순수익 · 1,000회 노출당 수익 · 칸 제목은 정렬 단추.
     칸은 줄마다 같은 자리(px · fr만) — 1200 폭에서 칸 제목(가장 긴 '1,000회 노출당 수익' · '30일 평균 대비' + 화살표)이 들어가게 */
  .pc-apphead { display: flex; align-items: center; gap: 16px; padding: 4px 4px 0; }
  .pc-apphead .hl { flex: 0 1 auto; min-width: 0; padding: 0; }
  .pc-table { padding: 0 24px 8px; }
  .pc-table .pc-thead, .pc-table .arow { display: grid; grid-template-columns: minmax(140px, 1.2fr) 104px minmax(80px, 2fr) 80px 108px 80px 136px; align-items: center; column-gap: 16px; }
  .pc-table .pc-thead { height: 52px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
  .pc-table .th { justify-self: start; height: 40px; padding: 0 4px; margin: 0 -4px; border: 0; border-radius: 8px; background: transparent; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 500; color: var(--muted); white-space: nowrap; }
  .pc-table .th:hover { color: var(--ink); }
  .pc-table .th[aria-pressed='true'] { color: var(--ink); font-weight: 600; }
  .pc-table .th.num { justify-self: end; }
  .pc-table .th.rev { grid-column: 3 / span 2; justify-self: end; }
  .pc-table .arow { height: 52px; margin: 0 -24px; padding: 0 24px; }
  .pc-table a.arow:hover { background: var(--surface2); }
  .pc-table .arow .aname { display: contents; }
  .pc-table .arow .aname .n { grid-column: 1; font-size: 15px; }
  .pc-table .arow .aname .u { grid-column: 2; justify-self: end; flex-direction: row-reverse; font-size: 14px; color: var(--ink2); font-variant-numeric: tabular-nums; }
  .pc-table .arow .abar { grid-column: 3; }
  .pc-table .arow .aval { grid-column: 4; font-size: 15px; }
  /* 변화 칸은 글 차례(순수익 · 1,000회 노출당 수익 뒤)보다 앞 칸이라 줄을 1 로 묶는다(자동 배치가 다음 줄로 내리지 않게) */
  .pc-table .arow .achg { grid-column: 5; grid-row: 1; font-size: 13px; }
  .pc-table .arow .anet { grid-column: 6; font-size: 15px; }
  .pc-table .arow .aecpm { grid-column: 7; font-size: 15px; }
}

/* ── 내 자료 점검 */
.prob { display: flex; align-items: center; gap: 10px; padding: 12px 20px; }
.prob .ic { flex: none; display: flex; color: var(--down); }
.prob .t { flex: 1; min-width: 0; font-size: 15px; line-height: 1.4; }
.prob .btn { flex: none; }
.titem .acts { display: flex; gap: 4px; margin: 2px 0 0 -8px; }
.titem .acts .text-btn { height: 32px; padding: 0 8px; font-size: 14px; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 100; padding: 10px 14px; border-radius: 10px; background: var(--primary); color: var(--primary-ink); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
/* ── 프로모션 앱 정하기 */
.pair-t { font-size: 15px; line-height: 1.4; overflow: hidden; word-break: keep-all; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.pair-s { font-size: 13px; color: var(--muted); }
.label-row select.input { height: 46px; }

/* ── 전략(P1 · 세부기획/02-전략.md) — 카드는 칸 제목(카드 밖 h2) 아래 · 알약 24px · 점 목록은 '·'로 줄을 시작하지 않는다 */
.pill { display: inline-flex; align-items: center; gap: 2px; height: 24px; padding: 0 8px; border-radius: 8px; font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap; vertical-align: middle; font-variant-numeric: tabular-nums; flex: none; }
.pill.up { background: var(--up-bg); color: var(--up); }
.pill.down { background: var(--down-bg); color: var(--down); }
.pill.warn { background: var(--primary-soft); color: var(--primary-soft-ink); }
.pill.tag { background: var(--tag-bg); color: var(--tag-ink); }
/* 앱 이름 — 가장 밝은 글자(어두운 화면은 따뜻한 크림) + 굵게. 노란색은 눈이 아파서 뺌(10/27) */
.st-name { color: var(--name); font-weight: 700; }
.st-range { margin: 12px 20px 0; font-size: 13px; line-height: 1.4; color: var(--muted); }
.st-range.top { margin-top: 4px; }
.st-sec.st-top { margin-top: 20px; }
/* 섹션 제목은 한 줄 고정 — 좁으면 옆 글이 줄임표로 물러남('앱마다'가 '앱마 / 다'로 쪼개지지 않게) */
.st-sec > .h2row .h2 { flex: none; white-space: nowrap; }
.st-sec > .h2row > .h2-side { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.st-card { background: var(--surface); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; color: var(--ink); }
.st-card.rows { padding: 4px 0; gap: 0; }
.st-card.kvs { gap: 12px; }
.st-say { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink2); }
.st-div { flex: none; height: 1px; background: var(--line); }
.st-cap { font-size: 13px; line-height: 1.4; color: var(--muted); }
.st-cap.pad { display: block; padding: 14px 20px 4px; }
.st-list { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.st-list.s6 { gap: 6px; }
.st-list.s8 { gap: 8px; }
.st-list.s10 { gap: 10px; }
.st-list.s12 { gap: 12px; }
.st-kv { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; line-height: 1.4; min-width: 0; }
.st-kv.s15 { font-size: 15px; }
.st-kv.s14 { font-size: 14px; }
.st-kv .k { min-width: 0; overflow-wrap: anywhere; }
.st-kv .k.muted { color: var(--muted); }
.st-kv .k.ink2 { color: var(--ink2); }
.st-kv .k.ink, .st-kv .ink { color: var(--ink); }
.st-kv .v { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink); }
.st-kv .v.up { color: var(--up); }
.st-kv .v.down { color: var(--down); }
.st-bar { display: block; height: 8px; border-radius: 4px; background: var(--track); overflow: hidden; }
.st-bar > span { display: block; height: 100%; border-radius: 4px; }
.st-bar.up > span { background: var(--up); }
.st-bar.down > span { background: var(--down); }
.st-bar.users > span { background: var(--users); }
.st-eff { display: flex; flex-direction: column; gap: 6px; }
.st-flow { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink2); }
.st-flow b { font-size: 17px; font-weight: 700; color: var(--ink); }
.st-flow .up, .st-amt.up { color: var(--up); font-weight: 600; }
.st-flow .down, .st-amt.down { color: var(--down); font-weight: 600; }
/* 성장 진단 — 폰은 줄(이름 · 값 · 꺾쇠) · PC 는 칸 */
.st-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) 20px; column-gap: 12px; align-items: center; padding: 16px 14px 16px 20px; text-decoration: none; color: var(--ink); }
.st-row + .st-row { border-top: 1px solid var(--line); }
.st-row .lab { align-self: start; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding-top: 1px; }
.st-row .lab .l, .st-stage .top .l { font-size: 15px; font-weight: 700; white-space: nowrap; }
.st-row .body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.st-met { font-size: 13px; line-height: 1.4; color: var(--muted); }
.st-vrow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.st-val { font-size: 22px; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.st-sub { font-size: 13px; line-height: 1.45; color: var(--muted); }
.st-wait { font-size: 15px; line-height: 1.45; color: var(--ink2); }
.st-stages { display: grid; gap: 20px; }
.st-stage { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 18px 18px 20px 20px; border-radius: 20px; background: var(--surface); text-decoration: none; color: var(--ink); }
.st-stage:hover { background: var(--surface2); }
.st-stage .top { display: flex; align-items: center; gap: 8px; min-height: 24px; margin-bottom: 4px; }
.st-stage .top .chev { margin-left: auto; }
.st-stage .st-val { font-size: 24px; }
/* 효과 검증 */
.st-ev { display: flex; flex-direction: column; gap: 10px; }
.st-ev .top, .st-pend .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.st-ev .tt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.st-ev .when { font-size: 13px; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }
.st-ev .what { font-size: 16px; font-weight: 600; }
.st-pends { display: flex; flex-direction: column; gap: 14px; }
.st-more.st-pends { padding-top: 14px; border-top: 1px solid var(--line); }
.st-pend { display: flex; flex-direction: column; gap: 4px; }
.st-pend .n { min-width: 0; font-size: 15px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.st-pend .d { flex: none; font-size: 13px; line-height: 1.6; color: var(--muted); white-space: nowrap; }
.st-chips { display: flex; flex-wrap: wrap; gap: 6px; }
/* 운영 점검 */
.st-issue { display: flex; align-items: center; gap: 12px; }
.st-issue .t { min-width: 0; font-size: 16px; font-weight: 600; line-height: 1.4; word-break: keep-all; overflow-wrap: anywhere; }
.st-bang { flex: none; width: 32px; height: 32px; border-radius: 16px; display: flex; align-items: center; justify-content: center; }
.st-bang.bad { background: var(--down-bg); color: var(--down); }
.st-bang.ok { background: var(--up-bg); color: var(--up); }
.st-bang.none { background: var(--tag-bg); color: var(--muted); }
.st-settle { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink2); }
.st-check { display: flex; align-items: center; gap: 12px; padding: 12px 20px; }
.st-check + .st-check { border-top: 1px solid var(--line); }
.st-check .tt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.st-check .n { font-size: 15px; font-weight: 600; }
.st-check-none { margin: 0; padding: 12px 20px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.4; color: var(--muted); }
.st-ct { font-size: 15px; font-weight: 700; }
.st-link { align-self: flex-start; display: inline-flex; align-items: center; gap: 2px; height: 32px; font-size: 14px; font-weight: 500; color: var(--ink2); text-decoration: none; }
.st-col { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
/* 추천 */
.st-recs { display: flex; flex-direction: column; gap: 12px; }
.st-rec { gap: 12px; }
.st-rec .nm { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; }
.st-rec .nm .n { min-width: 0; font-size: 14px; font-weight: 600; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-rec .act { margin: 0; font-size: 18px; line-height: 1.4; font-weight: 700; word-break: keep-all; overflow-wrap: anywhere; }
.st-also { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 12px; background: var(--surface2); font-size: 13px; line-height: 1.45; color: var(--ink2); }
.st-also .h { font-weight: 600; color: var(--muted); }
.st-end { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.st-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.st-gain { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.st-gain b { font-size: 16px; font-weight: 700; color: var(--up); }
.st-gain b.down { color: var(--down); }
.st-nogain { font-size: 14px; line-height: 1.4; color: var(--muted); }
.st-hide { flex: none; height: 44px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--track); color: var(--ink2); font-size: 14px; font-weight: 500; }
.st-hide:disabled { opacity: 0.45; }
.st-all { display: flex; align-items: center; justify-content: center; gap: 4px; height: 52px; margin-top: 12px; border-radius: 16px; background: var(--primary-soft); color: var(--primary-soft-ink); font-size: 15px; font-weight: 700; text-decoration: none; }
/* 자세히 */
.st-insight { gap: 8px; }
.st-insight p { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.5; word-break: keep-all; overflow-wrap: anywhere; }
.st-route { display: flex; flex-direction: column; gap: 6px; padding: 14px 20px; }
.st-route + .st-route { border-top: 1px solid var(--line); }
.st-route .top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.st-route .k { font-size: 15px; font-weight: 600; }
.st-route .v { font-size: 15px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.st-line { font-size: 13px; line-height: 1.45; color: var(--muted); }
.st-line.ink2 { color: var(--ink2); }
.st-table { display: flex; flex-direction: column; font-size: 14px; }
.st-table .tr { display: grid; grid-template-columns: minmax(0, 1fr) 72px 84px; align-items: center; column-gap: 8px; min-height: 40px; border-top: 1px solid var(--line); }
.st-table .tr.th { min-height: 32px; border-top: 0; font-size: 12px; color: var(--muted); }
.st-table .tr > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.st-table .tr > span + span { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.st-rowset { display: flex; flex-direction: column; }
.st-rowset > .st-app + .st-app, .st-more.st-rowset { border-top: 1px solid var(--line); }
.st-card.rows .st-morebtn { border-top: 1px solid var(--line); }
.st-app { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 16px 20px; }
.st-app .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.st-app .n { min-width: 0; font-size: 15px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.st-app .side { flex: none; font-size: 13px; color: var(--muted); white-space: nowrap; }
.st-app .big { flex: none; font-size: 17px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.st-app .lbl { font-size: 13px; color: var(--muted); }
.st-app .pills { flex: none; display: inline-flex; gap: 6px; }
.st-app > .st-list { margin-top: 4px; }
.st-weak { color: var(--down); font-weight: 600; }
.st-plain { color: var(--ink); font-weight: 600; }
.st-seg { display: flex; gap: 2px; height: 12px; }
.st-seg > span { min-width: 6px; }
.st-seg > span:first-child { border-radius: 6px 0 0 6px; }
.st-seg > span:last-child { border-radius: 0 6px 6px 0; }
.st-seg > span:only-child { border-radius: 6px; }
.st-seg .grow, .st-grp i.grow { background: var(--up); }
.st-seg .keep, .st-grp i.keep { background: var(--keep); }
.st-seg .reduce, .st-grp i.reduce { background: var(--primary); }
.st-seg .stop, .st-grp i.stop { background: var(--down); }
.st-seg .data, .st-grp i.data { background: var(--gray2); }
.st-grp { display: grid; grid-template-columns: 96px minmax(0, 1fr); column-gap: 10px; font-size: 14px; line-height: 1.5; }
.st-grp .g { align-self: start; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; }
.st-grp .g i { flex: none; width: 8px; height: 8px; border-radius: 4px; }
.st-grp .names { min-width: 0; color: var(--ink2); }
.st-cann { display: flex; flex-direction: column; gap: 8px; }
.st-cann .t { font-size: 13px; font-weight: 600; color: var(--muted); }
.st-cann .big { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.45; word-break: keep-all; overflow-wrap: anywhere; }
.st-stack { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; font-size: 14px; line-height: 1.45; }
.st-stack .l { color: var(--muted); }
.st-stack .vv { margin-left: auto; display: inline-flex; gap: 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.st-stack .vv b { font-weight: 600; }
.st-stack .vv span { color: var(--muted); }
.st-stack .vv span.down { color: var(--down); font-weight: 600; }
.st-head { gap: 6px; }
.st-head .l { font-size: 14px; color: var(--muted); }
.st-head .big { font-size: 26px; line-height: 1.3; font-weight: 700; font-variant-numeric: tabular-nums; }
.st-head .pills { display: flex; flex-wrap: wrap; gap: 6px; }
.st-amt { font-size: 15px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* 내 기준 */
.st-form { gap: 16px; }
.st-field { display: flex; flex-direction: column; gap: 8px; }
.st-field .l { font-size: 14px; font-weight: 600; color: var(--ink2); }
.st-input { position: relative; display: block; }
.st-input .input { padding-right: 44px; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
.st-input .input::-webkit-outer-spin-button, .st-input .input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.st-input .u { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 15px; color: var(--muted); pointer-events: none; }
.st-hid { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.st-hid .tt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.st-hid .n { font-size: 15px; font-weight: 600; }
.st-hid .a { font-size: 13px; line-height: 1.4; color: var(--muted); word-break: keep-all; overflow-wrap: anywhere; }
@media (min-width: 1200px) {
  .pc-grid > .sec > .st-card, .pc-grid > .sec > .st-stages, .pc-grid > .sec > .st-recwrap, .pc-grid > .sec > .st-recs { flex: 1; }
  .pc-grid > .st-hero-pc { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
  .st-hero-pc .hl { flex: 0 1 auto; min-width: 0; padding: 4px 4px 0; }
  .st-hero-pc .st-range { flex: none; margin: 0 4px 10px; white-space: nowrap; }
  .pc-grid > .st-range, .page.wide > div > .st-range.top { margin: 0 4px 16px; }
  .st-recs-pc .st-recs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
  .st-recs-pc .st-all { margin-top: 20px; }
  .two .st-rowset { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; padding: 0 4px; }
  .two .st-rowset > .st-app { border-top: 1px solid var(--line); }
  .two .st-rowset > .st-app:nth-child(-n + 2) { border-top: 0; }
  .st-card.kvs.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .row3 .st-kv { flex-direction: column; align-items: flex-start; gap: 4px; }
  .row3 .st-kv .v { margin-left: 0; font-size: 22px; }
  .st-cols2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 40px; }
  /* 오른쪽 칸에 섹션을 쌓을 때도 칸 안 섹션과 같은 머리 높이 · 여백(왼쪽 섹션과 줄이 맞게) */
  .st-col > .sec { margin: 0; display: flex; flex-direction: column; }
  .st-col > .sec > .h2row { flex: none; height: 32px; margin: 0 4px 12px; }
  .st-col > .sec > .h2row .h2 { margin: 0; }
  .st-col > .sec:last-child, .st-col > .sec:last-child > .st-card { flex: 1; }
  /* 두 줄 목록은 열 사이를 넓게(값 뒤에 옆 칸 이름이 붙어 한 쌍으로 읽히지 않게) */
  .st-list.st-cols2 { column-gap: 40px; }
}

/* ── 앱 상세 · 흐름 새 카드(10/28) */
/* 광고 성과 · 사용자 구성 · 앱 정보(screens/insight.js · 숫자는 detail.js) · 흐름 최근 30일 그래프 넷.
   폰은 카드 안 머리말 + 줄 · PC 는 칸 제목을 카드 밖으로 + 칸 나눔. 좁으면 옆 글 · 값이 다음 줄로 내려간다(자르지 않음) */
.ins-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 8px; margin-bottom: 6px; }
.ins-head .eyebrow { margin: 0; }
.ins-side { font-size: 13px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.ins-subrow { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 8px; }
.ins-sub { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.ins-parts { display: flex; flex-direction: column; min-width: 0; }
.ins-part { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ins-part + .ins-part, .ins-mets + .ins-parts { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.card-title + .ins-parts { margin-top: 16px; }
/* 광고 성과 — 폰: 줄(이름 · 값 · 변화 알약) · PC: 세 칸(이름 위 · 큰 값) + 형식별 · 업계 순위 두 칸 */
.ins-mets { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.ins-met { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 12px; min-width: 0; }
.ins-met .k { font-size: 15px; color: var(--ink2); }
.ins-met .v { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.ins-met .v b { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.ins-met .cap { flex-basis: 100%; font-size: 12px; line-height: 1.4; color: var(--muted); }
.ins-fmt { display: flex; flex-direction: column; gap: 6px; }
.ins-fmt + .ins-fmt { margin-top: 4px; }
.ins-fmt .top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 15px; }
.ins-fmt .top .k { font-weight: 600; }
.ins-fmt .top .v { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ins-bar { display: block; height: 8px; border-radius: 4px; background: var(--track); overflow: hidden; }
.ins-bar > span { display: block; height: 100%; border-radius: 4px; }
.ins-bar.money > span { background: var(--money); }
.ins-bar.users > span { background: var(--users); }
.ins-line { font-size: 13px; line-height: 1.45; color: var(--muted); }
.ins-kvs { display: flex; flex-direction: column; gap: 10px; }
.ins-kv { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 16px; font-size: 15px; line-height: 1.45; min-width: 0; }
.ins-kv .k { color: var(--ink2); }
.ins-kv .v { margin-left: auto; min-width: 0; text-align: right; font-weight: 600; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.ins-kv.code .v { font-family: var(--mono); font-size: 14px; font-weight: 500; }
.ins-kv.down .v { color: var(--down); }
.ins-ad.pc .ins-mets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 0; }
.ins-ad.pc .ins-met { flex-direction: column; flex-wrap: nowrap; align-items: flex-start; justify-content: flex-start; gap: 6px; }
.ins-ad.pc .ins-met .k { font-size: 13px; color: var(--muted); }
.ins-ad.pc .ins-met .v { margin-left: 0; }
.ins-ad.pc .ins-met .v b { font-size: 24px; line-height: 1.25; }
.ins-ad.pc .ins-met .cap { flex-basis: auto; }
.ins-ad.pc.wide .ins-parts.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
.ins-ad.pc.wide .ins-parts.two > .ins-part + .ins-part { margin-top: 0; padding-top: 0; border-top: 0; }
/* 사용자 구성 — 연령대 여섯 줄(이름 | 막대 | 비중 | 사람 — 줄끼리 칸이 맞게 한 격자) · 성별 · 사용 기기 두 칸 띠(유입 경로 띠와 같은 꼴) */
.ins-ages { display: grid; grid-template-columns: max-content minmax(24px, 1fr) max-content; align-items: baseline; gap: 9px 10px; font-size: 14px; }
.ins-ages .ins-bar { align-self: center; }
.ins-age, .ins-age .v { display: contents; }
.ins-age .g { color: var(--ink2); white-space: nowrap; }
.ins-age .v b { text-align: right; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ins-age .v .n { text-align: right; font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ins-part .ibar, .ins-part .ileg { margin-top: 0; }
.ins-leg .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.ins-leg > span { flex-wrap: wrap; max-width: 100%; }
.ins-aud.wide .ins-parts { display: grid; grid-template-columns: minmax(0, 2fr); grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.ins-aud.wide .ins-part + .ins-part, .ins-info.pc .ins-part + .ins-part { margin: 0 0 0 32px; padding: 0 0 0 32px; border-top: 0; border-left: 1px solid var(--line); }
/* 앱 정보 — 한 줄 소개(제목) · 줄(이름 왼쪽 · 값 오른쪽) · 검색 키워드 꼬리표 · 누적. PC 는 묶음 수만큼 같은 너비 칸 */
.card-title.ins-desc { display: block; font-size: 17px; line-height: 1.4; overflow-wrap: anywhere; }
.ins-kws { display: flex; flex-wrap: wrap; gap: 6px; }
.ins-kw { display: inline-flex; align-items: center; min-height: 28px; padding: 3px 10px; border-radius: 8px; background: var(--tag-bg); color: var(--tag-ink); font-size: 13px; line-height: 1.3; overflow-wrap: anywhere; }
.ins-info.pc .ins-parts { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
/* 흐름 최근 30일 그래프 넷 — 1200~1399 는 2×2(한 칸이 좁아 위 한 줄이 접히지 않게) · 1400 이상은 네 칸 한 줄 */
@media (min-width: 1200px) {
  .pc-cols3.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1400px) {
  .pc-cols3.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
