/* 올려드림 클릭 시안 — 8차: 디자인 시스템 하나(PC·휴대폰 같은 토큰·컴포넌트, 배치만 다름). 토큰 표는 맨 아래 8차 절. 외부 글꼴·패키지 없음 */
:root {
  --bg: #F2F4F7;
  --surface: #FFFFFF;
  --surface-2: #F7F8FA;
  --line: #E2E5EB;
  --line-strong: #CDD2DB;
  --text: #141821;
  --muted: #545C6B;
  --subtle: #6B7383;
  --accent: #2F54EB;
  --accent-strong: #1F3FC4;
  --accent-soft: #EAEFFF;
  --accent-ink: #FFFFFF;
  --ok: #157347;
  --ok-soft: #E2F3E9;
  --ok-bar: #2E9E62;
  --warn: #8A5A00;
  --warn-soft: #FFF3D1;
  --warn-bar: #F0A500;
  --bad: #B42318;
  --bad-soft: #FDE7E4;
  --bad-bar: #E5483B;
  --info-bar: #B4BBC7;   /* 안내 띠는 회색. 파랑은 주 버튼·현재 위치에만 */
  --nav-bg: #131A2C;
  --nav-item: #C9D0DF;
  --nav-muted: #8E97AB;
  --nav-active: #26304D;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .05);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .16);
  --r-card: 18px;
  --r-ctl: 12px;
  --font: "Pretendard", "Pretendard Variable", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  --fs-cap: 12px;
  --fs-sub: 13px;
  --fs-body: 15px;
  --fs-title: 18px;
  --fs-display: 24px;
  --ease-spring: cubic-bezier(.32, 1.25, .5, 1);   /* 손으로 끈 시트를 놓았을 때만 (모멘텀) */
  --ease-calm: cubic-bezier(.22, 1, .36, 1);        /* 넘침 없는 기본 (임계 감쇠) */
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0D1016;
  --surface: #161A22;
  --surface-2: #1C212B;
  --line: #272D39;
  --line-strong: #353C4B;
  --text: #ECEFF4;
  --muted: #A7AEBC;
  --subtle: #9098A8;
  --accent: #7B96FF;
  --accent-strong: #9CB0FF;
  --accent-soft: #1E2645;
  --accent-ink: #0D1016;
  --ok: #5CCB8F;
  --ok-soft: #13291E;
  --ok-bar: #3DB577;
  --warn: #F3C14B;
  --warn-soft: #2B2410;
  --warn-bar: #E2A92A;
  --bad: #FF8A7E;
  --bad-soft: #321615;
  --bad-bar: #F0645A;
  --info-bar: #4A5263;
  --nav-bg: #0A0D13;
  --nav-active: #1D2438;
  --shadow: 0 0 0 1px rgba(255, 255, 255, .02);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: var(--fs-body); line-height: 1.6; letter-spacing: 0; word-break: keep-all; overflow-wrap: break-word; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--text); text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; letter-spacing: -.01em; font-weight: 600; }
.small { line-height: 1.55; } .tiny, .badge, .hint { letter-spacing: 0; line-height: 1.5; }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 20px; height: 20px; flex: none; }
svg.i-sm { width: 14px; height: 14px; flex: none; }
svg.i-lg { width: 26px; height: 26px; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- 공통 조각 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: var(--r-ctl); border: 1px solid transparent; background: var(--surface-2); color: var(--text); font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--line-strong); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-strong); border-color: transparent; }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: var(--fs-sub); border-radius: 10px; }
.btn.block { width: 100%; }
.btn[disabled], fieldset[disabled] .btn { opacity: .5; cursor: not-allowed; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.tight { gap: 6px; }
.grow { flex: 1 1 auto; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sub); }
.tiny { font-size: var(--fs-cap); }
.strong { font-weight: 600; }
.num { font-variant-numeric: tabular-nums; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.divider { height: 1px; background: var(--line); margin: 4px 0; }

.card { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 16px; position: relative; overflow: hidden; }
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.card-title { font-size: var(--fs-body); font-weight: 600; display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.card-title .link { font-size: var(--fs-sub); font-weight: 600; text-decoration: none; }
.band-top::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--band, var(--info-bar)); }
.band-left::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--band, var(--info-bar)); }
.band-warn { --band: var(--warn-bar); }
.band-ok { --band: var(--ok-bar); }
.band-bad { --band: var(--bad-bar); }
.band-info { --band: var(--info-bar); }
.band-idle { --band: var(--line-strong); }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: var(--fs-cap); font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.badge.example { background: transparent; border: 1px dashed var(--line-strong); color: var(--subtle); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.ch { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sub); color: var(--muted); white-space: nowrap; }
/* 4차: 채널 점 색 = 그래프 색(--c-*, 아래 4차 그래프 절). 색은 채널을 따라간다 */
.ch-ig .dot { background: var(--c-ig); } .ch-th .dot { background: var(--c-th); } .ch-yt .dot { background: var(--c-yt); } .ch-tt .dot { background: var(--c-tt); } .ch-nb .dot { background: var(--c-nb); }

.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: var(--fs-body); font-weight: 600; color: var(--text); }
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--surface); }
.chip .x { opacity: .6; }

.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); gap: 2px; }
.seg button, .seg a { border: 0; background: transparent; padding: 6px 12px; min-height: 34px; border-radius: 9px; font-weight: 600; font-size: var(--fs-body); color: var(--muted); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.seg [aria-current="true"], .seg [aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button { flex: none; padding: 10px 12px; border: 0; background: none; border-bottom: 2px solid transparent; font-weight: 600; color: var(--muted); text-decoration: none; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.tabs [aria-current="true"] { color: var(--text); border-bottom-color: var(--accent); }
.tabs .count { font-size: var(--fs-cap); background: var(--surface-2); padding: 0 6px; border-radius: 999px; }

label.field { display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-sub); font-weight: 600; color: var(--muted); }
.input, .select, .textarea { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--r-ctl); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font-size: var(--fs-body); font-weight: 400; }
.textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.hint { font-size: var(--fs-cap); color: var(--subtle); font-weight: 400; }
.err-text { font-size: var(--fs-sub); color: var(--bad); font-weight: 600; display: flex; gap: 6px; align-items: flex-start; }

.switch { position: relative; display: inline-block; vertical-align: middle; width: 46px; height: 28px; flex: none; }
.switch input:disabled { cursor: not-allowed; }
.switch input:disabled + span { opacity: .4; }
.tbl.nt th { vertical-align: top; white-space: normal; min-width: 64px; }
.tbl.nt th:first-child, .tbl.nt td:first-child { white-space: normal; min-width: 0; width: 34%; }
.tbl.nt th, .tbl.nt td { padding-left: 6px; padding-right: 6px; }
.tbl.nt .addr { word-break: break-all; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line-strong); transition: background .15s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + span { background: var(--ok-bar); }
.switch input:checked + span::after { transform: translateX(18px); }

.kpi { display: flex; flex-direction: column; gap: 2px; }
.kpi .label { font-size: var(--fs-cap); color: var(--muted); font-weight: 600; }
.kpi .value { font-size: var(--fs-display); font-weight: 600; letter-spacing: -.02em; }
.kpi .delta { font-size: var(--fs-cap); font-weight: 600; color: var(--muted); }
.kpi .delta.up { color: var(--ok); }
.kpi .delta.down { color: var(--bad); }

.bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: var(--muted); }
.progress { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); }

.alert { display: flex; gap: 8px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; font-size: var(--fs-body); }
.alert.bad { background: var(--bad-soft); color: var(--bad); }
.alert.warn { background: var(--warn-soft); color: var(--warn); }
.alert.info { background: var(--surface-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
.alert .grow { color: var(--text); }
.alert strong { color: inherit; }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 32px 16px; color: var(--muted); }
.empty .ill { width: 64px; height: 64px; border-radius: 20px; background: var(--surface-2); color: var(--muted); display: grid; place-items: center; }
.empty h3 { color: var(--text); font-size: var(--fs-body); }

.list { display: flex; flex-direction: column; }
.list > .item { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.list > .item:first-child { border-top: 0; }

.thumb { width: 64px; height: 64px; border-radius: 12px; flex: none; display: grid; place-items: center; color: rgba(255,255,255,.9); font-size: var(--fs-cap); font-weight: 600; text-align: center; padding: 4px; }
.ph1 { background: #D98A9E; }
.ph2 { background: #6FA98A; }
.ph3 { background: #C9A15A; }
.ph4 { background: #8392CF; }

/* 잠긴 기능 */
.locked { position: relative; }
.lock-banner { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); margin-bottom: 16px; }
.lock-banner .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); display: grid; place-items: center; flex: none; }
.locked-body { opacity: .55; filter: saturate(.6); pointer-events: none; user-select: none; }
.lock-mark { display: inline-flex; vertical-align: -2px; margin-left: 3px; }

/* 토스트·시트 */
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: #1B2130; color: #fff; padding: 12px 16px; border-radius: 12px; font-size: var(--fs-body); box-shadow: var(--shadow-lg); z-index: 60; max-width: calc(100vw - 32px); display: flex; gap: 8px; align-items: center; }
.mode-pc .toast { bottom: 28px; }
.scrim { position: fixed; inset: 0; background: rgba(10, 14, 22, .45); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.mode-pc .scrim { align-items: center; }
.sheet { background: var(--surface); width: 100%; max-width: 480px; max-height: 88vh; overflow: auto; border-radius: 22px 22px 0 0; padding: 20px 16px 28px; box-shadow: var(--shadow-lg); }
.mode-pc .sheet { border-radius: 18px; padding: 22px; }
.sheet h2 { font-size: var(--fs-title); margin-bottom: 4px; }
.sheet .grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line-strong); margin: -8px auto 12px; }
.mode-pc .sheet .grab { display: none; }

/* ---------- 셸 ---------- */
.app { min-height: 100vh; }
.side, .tabbar { display: none; }

/* 모바일 B안 */
.mode-mobile .app { max-width: 480px; margin: 0 auto; background: var(--bg); min-height: 100vh; position: relative; }
@media (min-width: 520px) { .mode-mobile .app { box-shadow: 0 0 0 1px var(--line); } }
.mode-mobile .topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; padding: 12px 16px 8px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); }
.mode-mobile .topbar h1 { font-size: var(--fs-display); font-weight: 600; letter-spacing: -.02em; flex: 1; min-width: 0; }
.mode-mobile .view { padding: 4px 16px 120px; display: flex; flex-direction: column; gap: 16px; }
.mode-mobile .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(10px + env(safe-area-inset-bottom)); z-index: 30; }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; text-decoration: none; color: var(--subtle); font-size: var(--fs-cap); font-weight: 600; }
.tabbar a[aria-current="page"] { color: var(--accent); }
.tabbar .make { position: relative; }
.tabbar .make span.fab { width: 56px; height: 56px; border-radius: 50%; background: var(--text); color: var(--surface); display: grid; place-items: center; margin-top: -26px; box-shadow: 0 6px 16px rgba(16, 24, 40, .22); border: 4px solid var(--surface); }
.tabbar .lab { display: inline-flex; align-items: center; gap: 2px; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; border: 0; background: transparent; color: var(--text); cursor: pointer; text-decoration: none; flex: none; }
.icon-btn:hover { background: var(--surface-2); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: var(--fs-sub); font-weight: 600; text-decoration: none; color: var(--text); white-space: nowrap; }
.pill .sep { color: var(--subtle); }

/* PC C안 */
.mode-pc .app { display: grid; grid-template-columns: 228px 1fr; min-height: 100vh; }
.mode-pc .side { display: flex; flex-direction: column; background: var(--nav-bg); color: var(--nav-item); padding: 16px 12px; position: sticky; top: 0; height: 100vh; overflow: auto; gap: 2px; }
.side .brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 16px; color: #fff; font-weight: 600; font-size: var(--fs-body); }
.side .brand .logo { width: 30px; height: 30px; border-radius: 9px; background: rgba(255,255,255,.12); display: grid; place-items: center; color: #fff; }
.side .brand .logo-a { height: 28px; width: auto; display: block; color: var(--text); --logo-accent: var(--accent); }   /* 8차: 밝은 메뉴 → 로고 D1 밝은 판(글자 본문색·꺾쇠 강조색, 기호는 파비콘과 같은 파란 칸) */
.onb-logo .logo-a { height: 28px; width: auto; display: block; color: var(--text); --logo-accent: var(--accent); }
.side .biz { margin: 0 4px 12px; padding: 10px; border-radius: 10px; background: rgba(255,255,255,.05); font-size: var(--fs-sub); display: flex; gap: 8px; align-items: center; color: #E7EAF1; }
.side .sec { font-size: var(--fs-cap); font-weight: 600; color: var(--nav-muted); padding: 16px 12px 8px; letter-spacing: 0; }
.side a.nav { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 8px; color: var(--nav-item); text-decoration: none; font-size: var(--fs-body); font-weight: 500; }
.side a.nav:hover { background: rgba(255,255,255,.06); color: #fff; }
.side a.nav[aria-current="page"] { background: var(--nav-active); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.side a.nav.is-locked { color: var(--nav-muted); }
.side a.nav .cnt { margin-left: auto; font-size: var(--fs-cap); background: var(--warn-bar); color: #1B1300; border-radius: 999px; padding: 0 7px; font-weight: 600; }
.side .trial { margin-top: auto; padding: 12px; border-radius: 10px; background: rgba(255,255,255,.06); font-size: var(--fs-sub); color: #E7EAF1; display: flex; flex-direction: column; gap: 8px; }
.side .trial .progress { background: rgba(255,255,255,.12); }
.mode-pc .main { min-width: 0; display: flex; flex-direction: column; }
.mode-pc .topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 24px; background: var(--surface); border-bottom: 1px solid var(--line); min-height: 60px; }
.mode-pc .topbar h1 { font-size: var(--fs-title); font-weight: 600; flex: 1; min-width: 0; }
.mode-pc .view { padding: 20px 24px 40px; display: flex; flex-direction: column; gap: 16px; max-width: 1440px; width: 100%; }

.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mode-mobile .g3.kpis { gap: 8px; }
.mode-mobile .g3.kpis .card { padding: 12px; }
.mode-mobile .g3.kpis .kpi .value { font-size: var(--fs-h2); }
.mode-pc .g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.mode-pc .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mode-mobile .g4, .mode-mobile .g6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mode-mobile .g2.keep { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mode-mobile .g2:not(.keep) { grid-template-columns: 1fr; }
.mode-pc .split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.mode-pc .split-even { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.mode-mobile .split, .mode-mobile .split-even { display: flex; flex-direction: column; gap: 16px; }
.pc-only { display: none !important; }
.mode-pc .pc-only { display: revert !important; }
.mode-pc .mobile-only { display: none !important; }

/* 표 (PC) */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-sub); }
.tbl th { text-align: left; font-weight: 600; color: var(--muted); font-size: var(--fs-cap); padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.tbl td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.is-fail td { background: color-mix(in srgb, var(--bad-soft) 60%, transparent); }
.tbl .num { text-align: right; }
.tbl .c-main { width: 100%; min-width: 200px; }
.tbl td:not(.c-main) { white-space: nowrap; }
.card.p0 { padding: 0; }
.card .card-head { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 600; }

/* 예약 카드 (모바일) */
.post { display: flex; gap: 12px; align-items: center; padding: 16px 16px 16px 20px; }
.post .time { font-weight: 600; font-size: var(--fs-body); width: 52px; flex: none; font-variant-numeric: tabular-nums; }
.post .title { font-size: var(--fs-body); font-weight: 600; }
.post .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 2px; }

/* 캘린더 */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); background: var(--surface); border-radius: 12px; overflow: hidden; }
.cal .dow { font-size: var(--fs-cap); font-weight: 600; color: var(--muted); padding: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface-2); text-align: center; }
.cal .day { min-height: 104px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; cursor: pointer; background: var(--surface); text-align: left; border-top: 0; border-left: 0; font: inherit; color: inherit; }
.cal .day:hover { background: var(--surface-2); }
.cal .day.out { color: var(--subtle); background: var(--surface-2); }
.cal .day .dn { font-size: var(--fs-cap); font-weight: 600; display: flex; justify-content: space-between; }
.cal .day.today .dn b { background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 0 7px; }
.cal .ev { font-size: var(--fs-cap); padding: 2px 6px; border-radius: 6px; background: var(--surface-2); display: flex; gap: 4px; align-items: center; overflow: hidden; white-space: nowrap; }
.cal .ev.fail { background: var(--bad-soft); color: var(--bad); }
.cal .ev.check { background: var(--warn-soft); color: var(--warn); }
.cal .more { font-size: var(--fs-cap); color: var(--muted); padding-left: 4px; }
.mode-mobile .cal .day { min-height: 58px; padding: 4px; align-items: center; }
.mode-mobile .cal .ev, .mode-mobile .cal .more { display: none; }
.mode-mobile .cal .dots { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; }
.mode-pc .cal .dots { display: none; }
.cal .dots .dot { width: 6px; height: 6px; }

.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.mode-mobile .week { grid-template-columns: 1fr; }
.week .col { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 6px; min-height: 160px; }
.mode-mobile .week .col { min-height: 0; }
.week .col h4 { font-size: var(--fs-sub); display: flex; justify-content: space-between; }
.week .col.today { border-color: var(--accent); }
.wev { border-radius: 8px; padding: 6px 8px; background: var(--surface-2); font-size: var(--fs-cap); position: relative; padding-left: 10px; overflow: hidden; }
.wev::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--band, var(--info-bar)); }

/* 단계 (첫 사용·키워드 DM·쇼츠) */
.steps { display: flex; gap: 6px; }
.steps i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.steps i.on { background: var(--accent); }
.stepper { display: flex; flex-direction: column; gap: 0; }
.stepper .st { display: flex; gap: 12px; padding: 10px 0; }
.stepper .st .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: var(--fs-sub); font-weight: 600; background: var(--surface-2); color: var(--muted); flex: none; border: 1px solid var(--line); }
.stepper .st.done .n { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.stepper .st.cur .n { background: var(--accent); color: var(--accent-ink); border-color: transparent; }

.onb { min-height: 100vh; display: flex; flex-direction: column; max-width: 520px; margin: 0 auto; padding: 20px 16px 28px; gap: 18px; }
.onb .top { display: flex; align-items: center; gap: 10px; }
.onb h2 { font-size: var(--fs-display); letter-spacing: -.02em; }
.onb .foot { margin-top: auto; display: flex; gap: 8px; }
.choice { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; width: 100%; }
.choice[aria-pressed="true"] { border-color: var(--text); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--text); }
.choice .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; flex: none; }

/* 자동응답 카드 */
.reply .orig { font-size: var(--fs-body); }
.reply .draft { background: var(--surface-2); border-radius: 12px; padding: 8px 12px; font-size: var(--fs-body); border: 1px solid var(--line); }
.reply .draft .lab { font-size: var(--fs-cap); font-weight: 600; color: var(--muted); display: flex; gap: 6px; align-items: center; margin-bottom: 2px; }
.reply .acts { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 8px; }
.mode-pc .reply .acts { display: flex; }

/* 편집기 미리보기 */
.preview-phone { border-radius: 22px; border: 1px solid var(--line); background: var(--surface); padding: 12px; max-width: 340px; width: 100%; margin: 0 auto; }
.preview-phone .ph-img { aspect-ratio: 4 / 5; border-radius: 10px; }
.preview-phone .ph-head { display: flex; gap: 8px; align-items: center; font-size: var(--fs-sub); font-weight: 600; margin-bottom: 8px; }
.preview-phone .ph-head .av { width: 28px; height: 28px; border-radius: 50%; background: #D98A9E; }
.check-list { display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-sub); }
.check-list div { display: flex; gap: 8px; align-items: flex-start; }
.check-list .ok { color: var(--ok); }
.check-list .warn { color: var(--warn); }
.check-list .bad { color: var(--bad); }

/* 채팅 */
.chat { display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 86%; padding: 8px 12px; border-radius: 12px; font-size: var(--fs-body); }
.msg.me { align-self: flex-end; background: var(--text); color: var(--surface); border-bottom-right-radius: 4px; }
.msg.ai { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg .tag { font-size: var(--fs-cap); font-weight: 600; color: var(--muted); display: flex; gap: 4px; align-items: center; margin-bottom: 4px; }

/* 시안 도구 */
.proto-fab { position: fixed; right: 16px; bottom: 96px; z-index: 40; display: inline-flex; gap: 6px; align-items: center; padding: 0 14px; min-height: 40px; border-radius: 999px; border: 1px dashed var(--line-strong); background: var(--surface); color: var(--muted); font-size: var(--fs-sub); font-weight: 600; box-shadow: var(--shadow-lg); cursor: pointer; }
.mode-pc .proto-fab { bottom: 20px; }
@media (min-width: 560px) { .mode-mobile .proto-fab { right: calc(50% - 240px + 16px); } }
.opt-group { display: flex; flex-direction: column; gap: 6px; }
.opt-group > span { font-size: var(--fs-sub); font-weight: 600; color: var(--muted); }
.swatch { width: 22px; height: 22px; border-radius: 50%; display: inline-block; }

/* 운영자 */
.admin-flag { background: var(--warn-bar); color: #1B1300; font-size: var(--fs-cap); font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.map-list a { text-decoration: none; color: var(--text); }
.map-list .item:hover { background: var(--surface-2); }

/* ---------- 움직임 (2차) — 누름 반응·화면 전환·바텀시트 스프링. prefers-reduced-motion이면 끔 ---------- */
.btn, .chip, .choice, .tabbar a, a.card, .seg a, .seg button, .icon-btn, .pill, .map-list .item { transition: transform .1s var(--ease-out), background-color .16s, border-color .16s, opacity .16s; -webkit-tap-highlight-color: transparent; }
.btn:active:not([disabled]), .chip:active, .choice:active, .icon-btn:active, .pill:active { transform: scale(.97); }
.map-list a.item:active { transform: scale(.99); }
.toast { animation: toastIn .2s var(--ease-out); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 4px); } to { opacity: 1; transform: translate(-50%, 0); } }
a.card:active { transform: scale(.985); }
.tabbar a:active svg { transform: scale(.88); }
.tabbar a svg { transition: transform .12s var(--ease-out); }
.view.enter { animation: viewIn .18s var(--ease-out); }
@keyframes viewIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.scrim { animation: scrimIn .2s ease-out; transition: background-color .24s; }
.scrim.closing { background: rgba(10, 14, 22, 0); }
@keyframes scrimIn { from { background: rgba(10, 14, 22, 0); } }
.sheet { animation: sheetUp .36s var(--ease-calm); will-change: transform; touch-action: pan-y; }
.mode-pc .sheet { animation: sheetPop .26s var(--ease-out); }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheetPop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.sheet.dragging { animation: none; transition: none; }
.sheet.settle { transition: transform .42s var(--ease-spring); }
.sheet.leave { transition: transform .26s var(--ease-out); }
.mode-mobile .sheet .grab { cursor: grab; padding: 10px 0; margin: -18px auto 4px; width: 64px; height: 24px; background: none; position: relative; }
.mode-mobile .sheet .grab::before { content: ""; position: absolute; left: 12px; right: 12px; top: 10px; height: 4px; border-radius: 4px; background: var(--line-strong); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .btn:active, .chip:active, .choice:active, .icon-btn:active, .pill:active, a.card:active, .tabbar a:active svg { transform: none !important; }
}

/* ---------- 4차 (2026-12-01) — 요금제·AI 사용·충전 안내·사업자 표시·프롬프트 ---------- */
.meter .progress { height: 8px; }
.meter a { color: var(--text); }
.prompt-on { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: var(--fs-sub); color: var(--muted); }
.prompt-on a { color: var(--text); font-weight: 600; }
.plan .price { font-size: var(--fs-title); font-weight: 600; letter-spacing: -.01em; }
.plan .per { font-size: var(--fs-sub); font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan.is-cur { box-shadow: inset 0 0 0 1.5px var(--text); }
.mode-pc .plan.is-cur { border-color: var(--text); box-shadow: inset 0 0 0 .5px var(--text); }
.plan .check-list { flex: 1; }
.rules { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.biz-info { padding: 12px 4px 0; border-top: 1px solid var(--line); }
.biz-info dl { margin: 0; display: grid; grid-template-columns: 1fr; gap: 4px; font-size: var(--fs-cap); color: var(--subtle); }
.mode-pc .biz-info dl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.biz-info dl > div { display: flex; gap: 8px; }
.biz-info dt { font-weight: 600; color: var(--muted); flex: none; }
.biz-info dd { margin: 0; }
.card.picked { box-shadow: inset 0 0 0 1.5px var(--text); }
.mode-pc .card.picked { border-color: var(--text); }
.create-list .item { padding: 16px; gap: 12px; align-items: center; }
.create-list .ic, .make-list .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; flex: none; color: var(--text); }
.make-list > .item { padding: 8px 0; min-height: 48px; }

/* ---------- 4차 그래프 (SVG 직접) — 채널 색은 dataviz 검증기 통과(밝게·어둡게, CVD ΔE ≥ 13.7) ---------- */
:root { --c-ig: #D62D84; --c-th: #6250D6; --c-yt: #E0281E; --c-tt: #00A3A8; --c-nb: #2E8B2E; }
.c-ig { --c: var(--c-ig); } .c-th { --c: var(--c-th); } .c-yt { --c: var(--c-yt); } .c-tt { --c: var(--c-tt); } .c-nb { --c: var(--c-nb); }
.donut-wrap { display: flex; align-items: center; gap: 16px; }
.donut { width: 132px; height: 132px; flex: none; }
.donut circle { fill: none; stroke-width: 20; }
.donut .track { stroke: var(--surface-2); }
.donut .seg { stroke: var(--c); }
.donut .d-num { text-anchor: middle; font-size: 18px; font-weight: 600; fill: var(--text); font-variant-numeric: tabular-nums; }
.donut .d-sub { text-anchor: middle; font-size: 12px; fill: var(--muted); }
.d-leg { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-sub); }
.d-leg li { display: flex; align-items: center; gap: 8px; min-height: 24px; }
.d-leg .sw { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.d-leg .pct { width: 40px; text-align: right; }
.chart .bars { width: 100%; height: auto; max-height: 220px; display: block; }
.mode-pc .chart .bars { max-width: 720px; }
.bars .grid { stroke: var(--line); stroke-width: 1; }
.bars .ax { font-size: 11px; fill: var(--subtle); font-variant-numeric: tabular-nums; }
.bars .b-cur { fill: var(--text); }
.bars .b-prev { fill: var(--line-strong); }
.bars .b-bad { fill: var(--bad-bar); }
.bars .hit { fill: transparent; }
.bars g:hover .hit { fill: var(--surface-2); }
.bars .thr { stroke: var(--bad); stroke-width: 1; stroke-dasharray: 4 3; }
.bars .thr-t { fill: var(--bad); }
.c-leg { display: flex; gap: 16px; color: var(--muted); margin-bottom: 4px; }
.c-leg span { display: inline-flex; align-items: center; gap: 6px; }
.c-leg i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.c-leg .k-cur { background: var(--text); } .c-leg .k-prev { background: var(--line-strong); }
@media (max-width: 360px) { .donut-wrap { flex-direction: column; align-items: stretch; } .donut { align-self: center; } }
/* 4차 디자인: 라벨+입력 묶음은 모두 세로로 (div.field가 label.field와 같게) */
div.field { display: flex; flex-direction: column; gap: 8px; }
div.field > .seg { align-self: flex-start; }

/* ---------- 5차 (2026-12-01) — 리포트 › 데이터 연결 · AI 추가 요청사항 · 수정본 ---------- */
.dc-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dc-line .sep { color: var(--subtle); }
.dc-line a { color: var(--text); font-weight: 600; }
.howto { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.howto summary { cursor: pointer; color: var(--text); font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.howto ol { margin: 4px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.upzone { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px 16px; border-radius: 12px; border: 1.5px dashed var(--line-strong); background: var(--surface-2); text-align: center; transition: border-color .16s, background-color .16s; }
.upzone .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--surface); display: grid; place-items: center; color: var(--muted); }
.upzone.hot { border-color: var(--text); background: var(--surface); }
.dc-files .ic { width: 36px; height: 36px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; flex: none; color: var(--muted); }
.dc-files .item { align-items: flex-start; }
.dc-use { color: var(--muted); margin-top: 2px; }
/* AI 추가 요청사항 칸 */
.req { display: flex; flex-direction: column; gap: 8px; }
.req .chip { min-height: 32px; font-size: var(--fs-sub); font-weight: 500; }
.req .order { font-size: var(--fs-cap); color: var(--subtle); }
.req textarea.textarea, .fix textarea.textarea { min-height: 64px; }
/* 고쳐서 다시 만들기 + 수정본 */
.fix { border-top: 1px solid var(--line); padding-top: 8px; }
.fix summary { cursor: pointer; font-weight: 600; color: var(--text); min-height: 32px; display: flex; align-items: center; font-size: var(--fs-sub); }
.fix .body { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.versions { display: flex; flex-direction: column; gap: 8px; }
.mode-pc .versions.ver2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ver { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; display: flex; flex-direction: column; gap: 4px; background: var(--surface); }
.ver.rev { background: var(--surface-2); }
.ver .ask { font-size: var(--fs-cap); color: var(--muted); }
.img-row { display: flex; gap: 8px; flex-wrap: wrap; }
.img-row .thumb { width: 88px; height: 88px; }
.script-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }
.script-card p { margin: 0; white-space: pre-line; }

/* ---------- 5차 보완 (2026-12-01) — 쇼츠 목소리·배속 · 자주 쓰는 것(별 저장 → 맨 위 칩, 어디서나 같은 모양) ---------- */
.star { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 32px; min-height: 32px; padding: 0 8px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; font: inherit; font-size: var(--fs-sub); font-weight: 500; flex: none; transition: background-color .16s, color .16s, border-color .16s; }
.star:hover { background: var(--surface-2); color: var(--text); }
.star.has-text { border-color: var(--line); }
.star[aria-pressed="true"] { color: var(--text); }
.star[aria-pressed="true"] svg { fill: currentColor; }
.fav-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fav-lab { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-cap); color: var(--muted); font-weight: 600; }
.fav-lab svg { fill: currentColor; }
.fav-chip { min-height: 32px; padding: 4px 12px; font-size: var(--fs-sub); font-weight: 500; max-width: 100%; white-space: normal; text-align: left; border-radius: 16px; }
.chip-pair { display: inline-flex; align-items: center; }
.voice-panel { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
.voice-row { display: flex; align-items: center; gap: 4px; }
.voice-row .choice { flex: 1; min-width: 0; padding: 8px 12px; }
.mode-mobile .voice-row .btn { padding: 0 8px; }
.auto-sh { padding: 12px; border-radius: 12px; background: var(--surface-2); margin: 4px 0 8px; }
.auto-sh .choice, .auto-sh .seg button[aria-pressed="true"] { background: var(--surface); }
.sh-voice, .auto-voice { text-align: right; font-weight: 600; font-size: var(--fs-sub); }
.fav-groups { display: grid; gap: 12px; }
.mode-pc .fav-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fav-group { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; }
.fav-group .list .item { padding: 4px 0; min-height: 40px; gap: 4px; }
.err-text[hidden] { display: none; }

/* ---------- 6차 휴대폰 품질 (2026-12-01 · 마스터 1353 "모바일 UI가 PC 웹에 비해 퀄리티가 떨어지는데 올려줘") ----------
   기준: design-skills apple-design(누르는 곳 44px·큰 제목이 작아지는 상단 바·안전 영역·넘침 없는 움직임) + frontend-design(위계·리듬) → 마지막 unslop.
   모두 .mode-mobile 아래에만 건다 → PC(C안)는 그대로. 작은 단추는 '보이는 크기'는 두고 투명 테두리로 누르는 칸만 44px로 넓힌다(여백 상쇄 → 줄 간격 그대로). */
:root { --seg-on: #FFFFFF; --bar-bg: rgba(255, 255, 255, .94); --top-bg: rgba(242, 244, 247, .94); }
:root[data-theme="dark"] { --seg-on: #2A3140; --bar-bg: rgba(22, 26, 34, .94); --top-bg: rgba(13, 16, 22, .94); }

/* 상단 바: 큰 제목 28px → 내리면 17px + 아래 머리카락 선. 노치 안전 영역 */
.mode-mobile .topbar { min-height: 60px; padding: calc(8px + env(safe-area-inset-top)) 16px 8px; gap: 4px; background: var(--top-bg); -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px); box-shadow: 0 1px 0 transparent; transition: box-shadow .2s var(--ease-out), min-height .2s var(--ease-out); }
.mode-mobile .topbar h1 { font-size: var(--fs-large); line-height: 1.25; letter-spacing: -.02em; transition: font-size .2s var(--ease-out); }
.mode-mobile .topbar.has-back h1 { font-size: var(--fs-h2); }
.mode-mobile .topbar .back { margin-left: -12px; }
.mode-mobile .topbar.scrolled { min-height: 52px; box-shadow: 0 .5px 0 var(--line-strong); }
.mode-mobile .topbar.scrolled h1 { font-size: var(--fs-title); }
.mode-mobile .topbar .pill { margin-left: auto; }
.mode-mobile .topbar > .badge.example { margin-left: auto; }
.mode-mobile .topbar .icon-btn:last-child { margin-right: -10px; }

/* 본문 리듬: 바깥 16 · 카드 사이 16 · 카드 안 16 · 섹션 머리 위 8 더 */
.mode-mobile .view { padding: 8px 16px calc(112px + env(safe-area-inset-bottom)); gap: 16px; }
.sec-head { margin-top: 8px; margin-bottom: -4px; }
.sec-head h2 { font-size: var(--fs-title); }
.day-label { margin-bottom: -6px; }
.mode-mobile .kpi .label { font-size: var(--fs-sub); }

/* 하단 탭: 반투명 + 흐림, 글자 줄 맞춤(가운데 만들기 단추는 떠 있고 글자는 다른 탭과 같은 줄), 홈 바 안전 영역 */
.mode-mobile .tabbar { background: var(--bar-bg); -webkit-backdrop-filter: saturate(1.6) blur(20px); backdrop-filter: saturate(1.6) blur(20px); border-top: 0; box-shadow: 0 -.5px 0 var(--line-strong); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
.mode-mobile .tabbar a { justify-content: flex-end; gap: 4px; min-height: 52px; padding-bottom: 2px; }
.mode-mobile .tabbar .make { position: relative; }
.mode-mobile .tabbar .make span.fab { position: absolute; left: 50%; top: -22px; margin: 0; transform: translateX(-50%); width: 52px; height: 52px; border-width: 3px; border-color: var(--bg); box-shadow: 0 4px 12px rgba(16, 24, 40, .2); }
.mode-mobile .tabbar a:active svg { transform: none; }
.mode-mobile .tabbar a:active { opacity: .6; }

/* 누르는 곳 44px — 보이는 크기는 그대로 두고 투명 테두리로 넓힌 뒤 바깥 여백으로 상쇄 */
.mode-mobile .chip, .mode-mobile .req .chip, .mode-mobile .fav-chip { min-height: 44px; min-width: 44px; justify-content: center; margin: -6px; border: 6px solid transparent; border-radius: calc(var(--r-md) + 6px); background-clip: padding-box; box-shadow: inset 0 0 0 1px var(--line); }   /* 8차: 보이는 크기 32 = PC 칩, 누르는 칸만 44 */
.mode-mobile .chip[aria-pressed="true"] { border-color: transparent; box-shadow: inset 0 0 0 1px var(--accent); }
.mode-mobile .fav-chip { justify-content: flex-start; }
.mode-mobile .chip-pair { margin: 0; }
.mode-mobile .star { min-width: 44px; min-height: 44px; margin: -6px; border: 6px solid transparent; background-clip: padding-box; border-radius: calc(var(--r-md) + 6px); }
.mode-mobile .star.has-text { border-color: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.mode-mobile .pill { min-height: 44px; border-radius: calc(var(--r-md) + 5px); border: 5px solid transparent; background-clip: padding-box; box-shadow: inset 0 0 0 1px var(--line); margin: -5px 0; padding: 0 12px; }
.mode-mobile .seg { display: flex; width: 100%; padding: 0; border-radius: var(--r-md); gap: 0; }
.mode-mobile .seg > a, .mode-mobile .seg > button { flex: 1 1 0; justify-content: center; min-height: 44px; border: 4px solid transparent; background-clip: padding-box; border-radius: calc(var(--r-sm) + 4px); padding: 0 8px; white-space: nowrap; }
.mode-mobile .seg [aria-current="true"], .mode-mobile .seg [aria-pressed="true"] { background-color: var(--seg-on); box-shadow: inset 0 0 0 1px var(--line); }
.mode-mobile div.field > .seg { align-self: stretch; }
.mode-mobile .switch input { inset: -8px -4px; }
.mode-mobile summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; cursor: pointer; }
.mode-mobile summary::-webkit-details-marker { display: none; }
.mode-mobile summary::after { content: ""; flex: none; width: 7px; height: 7px; margin: 0 4px 3px 0; border-right: 1.8px solid var(--subtle); border-bottom: 1.8px solid var(--subtle); transform: rotate(45deg); transition: transform .2s var(--ease-calm); }
.mode-mobile details[open] > summary::after { transform: translate(0, 3px) rotate(-135deg); }
.mode-mobile a.link, .mode-mobile .card-title .link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; margin: -12px -8px; padding: 0 8px; text-decoration: none; font-weight: 600; color: var(--muted); }
.mode-mobile .tabs a, .mode-mobile .tabs button { min-height: 44px; }
.mode-mobile .week .col h4 a { display: inline-grid; place-items: center; width: 44px; height: 44px; margin: -12px -8px -12px 0; }
.mode-mobile .week .col h4 { align-items: center; }
.mode-mobile .proto-fab { width: 44px; height: 44px; min-height: 44px; padding: 0; justify-content: center; border-radius: 50%; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); opacity: .9; }
.mode-mobile .proto-fab .pf-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (min-width: 560px) { .mode-mobile .proto-fab { right: calc(50% - 240px + 12px); } }

/* 필터 칩 한 줄: 줄바꿈 대신 옆으로 밀기(화면 끝까지) */
.mode-mobile .chip-scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: -4px -16px; padding: 4px 20px; scroll-padding: 0 20px; }
.mode-mobile .chip-scroll::-webkit-scrollbar { display: none; }
.mode-mobile .chip-scroll > * { flex: none; }

/* 예약 카드: 시각 | 제목 + 상태(오른쪽) / 채널·방식. 왼쪽 띠는 둥근 카드에 잘린 조각 대신 안쪽 짧은 막대 */
.post-head { display: flex; align-items: center; gap: 8px; }
.post-head { align-items: flex-start; }
.post-head .title { flex: 1 1 auto; min-width: 0; }
.mode-mobile .post-head .title.ellipsis { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.45; }
.post-head .badge { margin-top: 1px; }
.post-head .badge { flex: none; }
.mode-mobile .post { padding: 14px 16px 14px 20px; }
.mode-mobile .post .meta { gap: 6px 8px; margin-top: 4px; }
.mode-mobile .band-left::before { top: 14px; bottom: 14px; left: 0; width: 4px; border-radius: 0 4px 4px 0; }
.r-meta { display: flex; flex-direction: column; gap: 2px; }
.r-meta .badge { flex: none; }

/* 캘린더: 세그먼트 한 줄 꽉 + 아래 줄 '달 · 새 글' 양끝 */
.mode-mobile .cal-head { flex-direction: column; align-items: stretch; gap: 12px; }
.mode-mobile .cal-month { justify-content: space-between; }
.mode-mobile .cal-month .strong { font-size: var(--fs-title); }
.mode-mobile .cal .day { min-height: 52px; }
.mode-mobile .cal .day.today .dn b { padding: 1px 8px; }

/* 표 → 휴대폰 목록 (가로로 밀어야 보이는 표 없앰) */
.m-rows > .item { padding: 12px 16px; }
.card .m-rows > .item:first-child { border-top: 0; }
.card.p0 .m-rows > .item { padding: 12px 16px; }
.card.stack .m-rows > .item { padding: 12px 0; }
.m-name .ch { font-size: var(--fs-body); color: var(--text); font-weight: 600; }
.mini3 { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mini3 dt { font-size: var(--fs-cap); color: var(--muted); }
.mini3 dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.m-rows .up { color: var(--ok); }
/* 설정형 목록(알림): 무리 머리 + 한 줄 44px 이상 */
.m-group { display: flex; flex-direction: column; gap: 8px; }
.m-group-h { font-size: var(--fs-sub); font-weight: 600; color: var(--muted); padding: 0 4px; }
.m-set > .item { padding: 10px 16px; min-height: 52px; }
.m-set .addr { word-break: break-all; }

/* 그래프 글자: 휴대폰에서 줄어든 배율까지 쳐서 12px 이상 */
.mode-mobile .bars .ax { font-size: 14px; }
.mode-mobile .donut .d-sub { font-size: 13px; }
.mode-mobile .donut-wrap { flex-direction: column; align-items: stretch; gap: 12px; }
.mode-mobile .donut { align-self: center; width: 148px; height: 148px; }
.mode-mobile .d-leg li { min-height: 32px; border-top: 1px solid var(--line); }
.mode-mobile .d-leg li:first-child { border-top: 0; }

/* 요금제 카드: 휴대폰은 한 줄에 하나(두 칸에 눌려 줄바꿈되던 문제) */
.mode-mobile .plans { grid-template-columns: 1fr; }
.mode-mobile .plan .price { font-size: var(--fs-h2); }

/* 연결 카드: 채널 이름이 카드 제목 */
.mode-mobile .card > .row.between > .ch:first-child { font-size: var(--fs-body); color: var(--text); font-weight: 600; }

/* 바텀시트: 손잡이 · 닫기 단추 · 안쪽 여백 · 홈 바 안전 영역 · 키보드가 올라오면 보이는 높이 기준(dvh) */
.sheet { position: relative; }
.sheet:focus { outline: none; }
.sheet-x { position: absolute; top: 12px; right: 12px; color: var(--muted); }
.mode-pc .sheet-x { top: 14px; right: 14px; }
.sheet > h2 { padding-right: 48px; }
.mode-mobile .sheet { max-height: 88vh; max-height: 88dvh; padding: 16px 20px calc(20px + env(safe-area-inset-bottom)); border-radius: var(--r-lg) var(--r-lg) 0 0; overscroll-behavior: contain; }
.mode-mobile .sheet > h2 { margin-top: 4px; margin-bottom: 8px; }
.mode-mobile .sheet .sheet-x { top: 14px; }

/* 빈 상태·오류 */
.mode-mobile .empty { padding: 40px 20px; }
.mode-mobile .alert > .btn, .mode-mobile .alert > a.btn { align-self: center; }
.mode-mobile .prompt-on a, .mode-mobile .dc-line a { display: inline-flex; align-items: center; min-height: 44px; margin: -12px 0; padding: 0 4px; }
.mode-mobile .prompt-on { min-height: 44px; }
.mode-mobile .dow-row { flex-wrap: nowrap; gap: 6px; }
.mode-mobile .dow-row .chip { flex: 1 1 0; min-width: 0; padding: 0; }
/* 만들기 안쪽 화면: 하단 탭 대신 엄지 닿는 아래 고정 주 버튼(편집기 '예약하기') */
.mode-mobile .no-tab .view { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
.mode-mobile .no-tab .m-cta { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 480px; z-index: 30; margin: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--bar-bg); -webkit-backdrop-filter: saturate(1.6) blur(20px); backdrop-filter: saturate(1.6) blur(20px); box-shadow: 0 -.5px 0 var(--line-strong); }
.mode-mobile .no-tab:has(.m-cta) .view { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
.mode-mobile .app.no-tab + .proto-fab { bottom: calc(16px + env(safe-area-inset-bottom)); }
.mode-mobile .app.no-tab:has(.m-cta) + .proto-fab { bottom: calc(88px + env(safe-area-inset-bottom)); }

/* ---------------- 7차: 채널별 AI 기본 스타일 (마스터 1367) ---------------- */
.draft-body { margin: 0; white-space: pre-line; }
.draft-shape { margin-top: -2px; }
.draft-head { align-items: center; gap: 8px; flex-wrap: wrap; }
.draft-head .small.strong { display: inline-flex; align-items: center; gap: 6px; }
.ch-style-on .strong { color: var(--text); }
.ai-ch { gap: 8px; }
/* 같은 주제 · 채널별 비교: PC 3칸, 휴대폰 아래로 */
.cmp summary { cursor: pointer; font-weight: 600; font-size: var(--fs-sub); min-height: 32px; display: flex; align-items: center; }
.cmp-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 12px; }
.mode-pc .cmp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cmp-col { padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
/* 설정 › 채널별 기본 스타일 */
.chs-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-top: 4px; }
.chs + .chs { border-top: 1px solid var(--line); }
.chs > summary { cursor: pointer; padding: 10px 12px; display: flex; align-items: center; gap: 8px; }
.chs > summary .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tight-row { gap: 6px; flex-wrap: wrap; }
.chs-sum { display: block; }
.chs[open] > summary { background: var(--surface-2); }
.chs-body { padding: 12px; }
.chs-dl { margin: 0; display: grid; gap: 6px; font-size: var(--fs-sub); }
.chs-dl > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; }
.chs-dl dt { color: var(--subtle); }
.chs-dl dd { margin: 0; color: var(--text); }
.chs-why { gap: 6px; align-items: center; }
.chs-mine { border-top: 1px solid var(--line); padding-top: 10px; }
.mode-mobile .chs > summary { padding: 10px 12px; min-height: 56px; }
.mode-mobile .chs-dl > div { grid-template-columns: 1fr; gap: 0; }
.mode-mobile .chs-dl dt { font-size: var(--fs-cap); }
.mode-mobile .ai-ch { gap: 8px 4px; }
.mode-mobile .cmp summary { min-height: 44px; }
.split-even + .cmp { margin-top: 16px; }

/* ================= 8차 통일 디자인 (2026-12-01 · 마스터 1373 "전문 사이트처럼. 웹이랑 모바일 스타일이 완전 달라") =================
   디자인 시스템 하나. PC·휴대폰은 같은 토큰·같은 컴포넌트를 쓰고, 다른 것은 배치(왼쪽 메뉴/하단 탭, 표/목록 칸 배치)와
   누르는 크기(--h-ctl·--h-sm)뿐. 규칙: 모서리 3단계(작은 표시 sm · 누르는 것·안쪽 칸 md · 바깥 카드·시트 lg),
   그림자 2단계(sh-1 떠 있는 작은 것 · sh-2 시트·토스트, 카드는 그림자 대신 머리카락 테두리), 간격 4px 단위,
   글자 한 줄 단계(휴대폰만 큰 제목 28), 강조색(로고 파랑)은 주 버튼·현재 위치·선택에만. 선택 표시는 어디서나 '연한 파랑 바탕 + 파랑 글자'.
   토큰 표:
   | 무리 | 토큰 | 값 |
   | 색 | --accent · --accent-soft · --accent-strong | #2F54EB(로고) · #EAEFFF · #1F3FC4 (어둡게 #7B96FF · #1E2645) |
   | 회색 | --bg · --surface · --surface-2 · --line · --line-strong · --subtle · --muted · --text | #F2F4F7 · #FFF · #F7F8FA · #E2E5EB · #CDD2DB · #6B7383 · #545C6B · #141821 |
   | 상태 | --ok · --warn · --bad (+ -soft 바탕) | #157347 · #8A5A00 · #B42318 |
   | 모서리 | --r-sm · --r-md · --r-lg | 6 · 10 · 14 |
   | 그림자 | --sh-1 · --sh-2 | 0 1px 2px / 0 12px 32px (어둡게는 선·검정) |
   | 간격 | --sp-1~8 | 4 · 8 · 12 · 16 · 20 · 24 · 32 |
   | 글자 | --fs-cap · sub · body · title · h2 · display · large | 12 · 13 · 15 · 17 · 20 · 24 · 28(휴대폰 큰 제목만) |
   | 높이 | --h-ctl · --h-sm · --h-row | PC 40 · 32 · 48 / 휴대폰 48 · 44 · 48 (모양 같음, 크기만) | */
:root {
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px;
  --sh-1: 0 1px 2px rgba(16, 24, 40, .08);
  --sh-2: 0 12px 32px rgba(16, 24, 40, .16);
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px;
  --fs-cap: 12px; --fs-sub: 13px; --fs-body: 15px; --fs-title: 17px; --fs-h2: 20px; --fs-display: 24px; --fs-large: 28px;
  --h-ctl: 40px; --h-sm: 32px; --h-row: 48px;
  --r-card: var(--r-lg); --r-ctl: var(--r-md); --shadow: var(--sh-1); --shadow-lg: var(--sh-2);
  --nav-w: 232px;
}
:root[data-theme="dark"] { --sh-1: 0 0 0 1px rgba(255, 255, 255, .06); --sh-2: 0 12px 32px rgba(0, 0, 0, .5); --shadow: var(--sh-1); --shadow-lg: var(--sh-2); }
.mode-mobile { --h-ctl: 48px; --h-sm: 44px; }

/* 카드: 머리카락 테두리, 그림자 없음 — 두 화면 같음 */
:root .card { border-radius: var(--r-lg); border: 1px solid var(--line); box-shadow: none; }
:root .card .card-head { padding: var(--sp-3) var(--sp-4); font-size: var(--fs-body); }
:root .card-title { font-size: var(--fs-body); }
/* 색 띠 없앰(장식). 상태는 배지·글자로 이미 보임 */
:root .band-top::before, :root .band-left::before { display: none; }
:root .post { padding: var(--sp-3) var(--sp-4); }
.post .time { width: 48px; }

/* 버튼·입력: 모양 같고 높이만 토큰 */
:root .btn { min-height: var(--h-ctl); padding: 0 var(--sp-4); border-radius: var(--r-md); font-size: var(--fs-body); }
:root .btn.sm { min-height: var(--h-sm); padding: 0 var(--sp-3); border-radius: var(--r-md); font-size: var(--fs-sub); }
:root .input, :root .select { min-height: var(--h-ctl); border-radius: var(--r-md); font-size: var(--fs-body); }
:root .textarea { border-radius: var(--r-md); font-size: var(--fs-body); }
:root .icon-btn { border-radius: var(--r-md); }
:root .switch input:checked + span { background: var(--accent); }

/* 칩: 보이는 높이 32·모서리 md(휴대폰은 투명 테두리로 누르는 칸만 44). 선택 = 연한 파랑 + 파랑 글자 */
.mode-pc .chip { min-height: var(--h-sm); border-radius: var(--r-md); padding: 0 var(--sp-3); }
.mode-pc .fav-chip { border-radius: var(--r-md); }
.chip { font-size: var(--fs-sub); font-weight: 500; }
.chip[aria-pressed="true"] { background-color: var(--accent-soft); border-color: var(--accent); color: var(--accent); }   /* background 줄임형을 쓰면 휴대폰 투명 테두리(누르는 칸)까지 칠해짐 */
.mode-mobile .chip[aria-pressed="true"] { background-color: var(--accent-soft); }
:root .star { border-radius: var(--r-md); }
:root .pill { border-radius: var(--r-md); }

/* 세그먼트: 바깥 md · 안 sm · 선택은 표면색 + 안쪽 선(두 화면 같음) */
:root .seg { border-radius: var(--r-md); }
.mode-pc .seg > a, .mode-pc .seg > button { border-radius: var(--r-sm); min-height: var(--h-sm); font-size: var(--fs-sub); }
.seg [aria-current="true"], .seg [aria-pressed="true"] { background: var(--seg-on); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--text); }
:root .tabs [aria-current="true"] { color: var(--accent); }

/* 배지: 작은 사각(sm). 알약 모양 없앰 */
:root .badge { border-radius: var(--r-sm); }

/* 알림 띠·잠금 띠·빈 상태 */
:root .alert { border-radius: var(--r-md); padding: var(--sp-3) var(--sp-4); }
:root .lock-banner { border-radius: var(--r-lg); box-shadow: none; }
:root .lock-banner .ic, .empty .ill, .create-list .ic, .make-list .ic, .choice .ic, .upzone .ic { border-radius: var(--r-md); }
.empty h3 { font-size: var(--fs-title); }

/* 표와 목록: 같은 행 — 높이 48 · 안쪽 12/16 · 머리카락 선 · 머리 줄은 12px 회색 글자 */
.tbl th { padding: var(--sp-2) var(--sp-3); font-size: var(--fs-cap); }
.tbl td { padding: var(--sp-3); height: var(--h-row); font-size: var(--fs-sub); }
.tbl th:first-child, .tbl td:first-child { padding-left: var(--sp-4); }
.tbl th:last-child, .tbl td:last-child { padding-right: var(--sp-4); }
/* 입력 묶음 머리 글자: label.field와 div.field가 같게(13px·600·회색) */
div.field > span:first-child { font-size: var(--fs-sub); font-weight: 600; color: var(--muted); }
.tbl tr.is-fail td { background: none; }
.list > .item { min-height: var(--h-row); }
.m-rows > .item, .card.p0 .m-rows > .item { padding: var(--sp-3) var(--sp-4); }
.m-group-h { font-size: var(--fs-cap); }
.kpi .label { font-size: var(--fs-sub); }
.kpi .value, .d-leg, .mini3 dd { font-variant-numeric: tabular-nums; }

/* 안쪽 칸(카드 안의 묶음) = md */
:root .reply .draft, .ver, .script-card, .fav-group, .cmp-col, .chs-list, .upzone, .auto-sh, .prompt-on, .week .col, .thumb, .choice, .dc-files .ic, .side .biz, .side .trial { border-radius: var(--r-md); }
:root .choice { border-width: 1px; }
.choice[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
:root .cal { border-radius: var(--r-lg); }
.preview-phone { border-radius: var(--r-lg); }
.msg { border-radius: var(--r-lg); }

/* 시트(PC 모달 = 휴대폰 시트): 같은 머리(제목 17 + 오른쪽 위 닫기) · 같은 아래 단추 줄(취소 왼쪽 · 주 버튼 오른쪽, 반씩) */
:root .sheet { border-radius: var(--r-lg); }
.mode-mobile .sheet { border-radius: var(--r-lg) var(--r-lg) 0 0; }
.mode-pc .sheet { padding: var(--sp-5) var(--sp-6) var(--sp-6); }
.sheet h2 { font-size: var(--fs-title); }
.sheet-foot { display: flex; gap: var(--sp-2); margin-top: var(--sp-4); }
.sheet-foot > .btn { flex: 1 1 0; }
.toast { background: var(--text); color: var(--surface); border-radius: var(--r-md); }

/* 그래프: 채널 색(--c-*)은 그대로, 이번 주 막대는 강조색(그래프만 색을 가짐) */
.bars .b-cur { fill: var(--accent); }
.c-leg .k-cur { background: var(--accent); }

/* ---------- 메뉴 통일: PC 왼쪽 메뉴 = 밝은 바탕 + 로고 D1, 휴대폰 하단 탭과 같은 아이콘·같은 강조 ---------- */
.mode-pc .app { grid-template-columns: var(--nav-w) 1fr; }
:root .side { background: var(--surface); color: var(--muted); border-right: 1px solid var(--line); padding: var(--sp-4) var(--sp-3); gap: 2px; }
.side .brand { color: var(--text); padding: var(--sp-1) var(--sp-2) var(--sp-4); }
.side .brand .logo { background: var(--surface-2); color: var(--text); border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--line); }
.side .biz { margin: 0 0 var(--sp-2); padding: var(--sp-2) var(--sp-3); background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.side .sec { color: var(--subtle); padding: var(--sp-5) var(--sp-3) var(--sp-2); }
.side a.nav { min-height: 36px; padding: 0 var(--sp-2); gap: var(--sp-2); border-radius: var(--r-md); color: var(--muted); font-weight: 500; }
.side a.nav:hover { background: var(--surface-2); color: var(--text); }
.side a.nav[aria-current="page"] { background: transparent; box-shadow: none; color: var(--accent); font-weight: 600; }
.side a.nav.is-locked { color: var(--subtle); }
.side a.nav .cnt { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); border-radius: var(--r-sm); padding: 0 6px; font-variant-numeric: tabular-nums; }
.side .trial { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.side .trial .progress { background: var(--line); }
.side .trial a { color: var(--text); }
/* 아이콘 칸: 메뉴·탭 같은 부품(.nav-ic) — 현재 위치면 연한 파랑 칸 + 파랑 아이콘 */
.nav-ic { display: inline-grid; place-items: center; width: 40px; height: 28px; border-radius: var(--r-md); flex: none; color: var(--subtle); transition: background-color .16s, color .16s; }
.nav-ic svg.i { width: 20px; height: 20px; }
[aria-current="page"] > .nav-ic { background: var(--accent-soft); color: var(--accent); }
.side a.nav:hover .nav-ic { color: var(--text); }
.side a.nav[aria-current="page"]:hover .nav-ic { color: var(--accent); }
/* 하단 탭: 떠 있던 검은 만들기 단추 없앰 → 다섯 탭 같은 모양 */
.mode-mobile .tabbar a { justify-content: center; gap: 2px; padding-bottom: 0; color: var(--subtle); }
.mode-mobile .tabbar a[aria-current="page"] { color: var(--accent); }
.mode-mobile .tabbar .make span.fab { position: static; transform: none; width: auto; height: auto; margin: 0; border: 0; box-shadow: none; background: none; color: inherit; border-radius: 0; display: contents; }
.tabbar .lab { font-size: var(--fs-cap); }
