/* 소프트 웜 테크 v3 — 따뜻한 오트밀 바탕 + 또렷한 글씨 + 에스프레소 포인트 (모바일 먼저) */
:root {
  --bg: #F1EDE6;
  --side: #F8F6F2;
  --panel: #FFFFFF;
  --tile: #F7F3EC;
  --hl: #F4EFE7;
  --line: #E6DFD4;
  --line-side: #E4DDD2;
  --text: #1F1B17;
  --menu: #3D3731;
  --sub: #6B635A;
  --faint: #8A8178;
  --done: #A39A90;
  --ink: #2B2622;          /* 에스프레소 */
  --on-ink: #FAF7F2;
  --brown: #8A6B45;
  --sand: #D9C4A3;
  --track: #F1ECE4;
  --count: #E4DDD2;
  /* 아이콘 칩 (배경 / 선) */
  --c-sand: #EDE3D3;    --c-sand-i: #8A6B45;
  --c-clay: #F0DFD6;    --c-clay-i: #A4573E;
  --c-sage: #DFE6D8;    --c-sage-i: #4E6B45;
  --c-slate: #DDE2E7;   --c-slate-i: #4B5866;
  --c-mustard: #EFE4C9; --c-mustard-i: #8C6A1E;
  --c-lilac: #E6DEEA;   --c-lilac-i: #6A4F78;
  --up: #A4573E;        /* 늘어남·문제 = 클레이 */
  --down: #4B5866;      /* 줄어듦 = 슬레이트 */
  --radius: 18px;
  --shadow: 0 1px 2px rgba(40, 30, 20, .04), 0 6px 20px rgba(40, 30, 20, .05);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: Pretendard, 'Noto Sans KR', -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  font-size: 15px; line-height: 1.7; -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brown); text-underline-offset: 3px; }
h1 { font-size: 30px; line-height: 1.3; margin: 0; font-weight: 800; letter-spacing: -0.6px; }
h2 { font-size: 18px; line-height: 1.4; margin: 0 0 14px; font-weight: 800; letter-spacing: -0.3px; }
h3, .label { font-size: 13px; margin: 0 0 8px; color: var(--brown); font-weight: 700; }
.num { font-variant-numeric: tabular-nums; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -3px; }

/* ---------- 뼈대 (휴대폰 먼저) ---------- */
.shell { min-height: 100vh; }
.side { display: none; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--side); border-bottom: 1px solid var(--line-side); }
.topbar .name { font-weight: 800; font-size: 15px; letter-spacing: -0.3px; }
.topbar .date { margin-left: auto; color: var(--faint); font-size: 12px; }
.topbar .icon-btn { width: 44px; height: 44px; margin: -6px -8px -6px 0; }
.symbol { width: 32px; height: 32px; border-radius: 9px; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; flex: none; }
.symbol .ic { width: 18px; height: 18px; }
.topbar .symbol { width: 28px; height: 28px; border-radius: 8px; }
.icon-btn { display: grid; place-items: center; border: 0; background: none; border-radius: 12px; color: var(--menu); cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: var(--hl); }

.main { padding: 18px 14px calc(150px + env(safe-area-inset-bottom)); min-width: 0; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--side); border-top: 1px solid var(--line-side); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 52px; justify-content: center; text-decoration: none; color: var(--sub); font-size: 11px; font-weight: 600; }
.tabbar .chip-ic { width: 34px; height: 28px; border-radius: 9px; display: grid; place-items: center; }
.tabbar a.on { color: var(--text); }
.tabbar a.on .chip-ic { background: var(--ink); color: var(--on-ink); }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .date { color: var(--faint); font-size: 12px; font-weight: 500; margin-bottom: 2px; }
.page-head p { margin: 4px 0 0; color: var(--sub); font-size: 14px; line-height: 1.6; }
h1 { font-size: 22px; }
/* 휴대폰: 화면의 주요 버튼은 하단 탭 위 한 줄로 */
.page-head .btn.primary { position: fixed; left: 14px; right: 14px; bottom: calc(72px + env(safe-area-inset-bottom)); z-index: 25; height: 52px; font-size: 16px; box-shadow: 0 0 0 4px var(--bg), 0 6px 20px rgba(40, 30, 20, .18); }
.page-head .date { display: none; }

@media (min-width: 900px) {
  .shell { display: flex; }
  .topbar, .tabbar { display: none; }
  .side { display: flex; flex-direction: column; width: 250px; flex: none; position: sticky; top: 0; height: 100vh; background: var(--side); border-right: 1px solid var(--line-side); padding: 24px 16px 16px; }
  .logo { display: flex; align-items: center; gap: 11px; padding: 0 6px 24px; font-size: 18px; font-weight: 800; letter-spacing: -0.4px; line-height: 1.25; }
  .logo small { display: block; font-size: 12px; font-weight: 600; color: var(--faint); letter-spacing: 0; }
  .nav a { display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 12px; color: var(--menu); text-decoration: none; font-size: 14px; font-weight: 500; margin-bottom: 3px; min-height: 44px; }
  .nav a:hover { background: var(--hl); }
  .nav a.on { background: var(--ink); color: var(--on-ink); font-weight: 600; }
  .nav a.on .chip-ic { background: rgba(250, 247, 242, .12); color: var(--on-ink); }
  .account { margin-top: auto; border-top: 1px solid var(--line-side); padding-top: 14px; display: flex; align-items: center; gap: 10px; }
  .account .who { font-weight: 700; font-size: 14px; line-height: 1.3; }
  .account .who small { display: block; color: var(--faint); font-weight: 500; font-size: 12px; }
  .main { flex: 1; padding: 36px 40px 60px; max-width: 1190px; }
  h1 { font-size: 30px; }
  .page-head { margin-bottom: 24px; }
  .page-head .date { display: block; }
  .page-head .btn.primary { position: static; height: 44px; font-size: 15px; box-shadow: none; }
}
.chip-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.chip-ic .ic { width: 16px; height: 16px; }
.k-sand { background: var(--c-sand); color: var(--c-sand-i); }
.k-clay { background: var(--c-clay); color: var(--c-clay-i); }
.k-sage { background: var(--c-sage); color: var(--c-sage-i); }
.k-slate { background: var(--c-slate); color: var(--c-slate-i); }
.k-mustard { background: var(--c-mustard); color: var(--c-mustard-i); }
.k-lilac { background: var(--c-lilac); color: var(--c-lilac-i); }

/* ---------- 카드 ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.card + .card { margin-top: 12px; }
.grid > .card + .card { margin-top: 0; }
.card.dark { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.card.dark .label, .card.dark h3 { color: var(--sand); }
.card.dark .faint, .card.dark .muted { color: rgba(250, 247, 242, .62); }
@media (min-width: 900px) { .card { padding: 26px 28px; } .card + .card { margin-top: 20px; } h2 { font-size: 18px; } }
@media (max-width: 899px) { h2 { font-size: 16px; } }

.grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 899px) { .page-head > .row { width: 100%; } .page-head > .row input[type=date] { flex: 1; min-width: 0; } .g4 .kpi .value { font-size: 22px; } }
@media (min-width: 900px) { .grid { gap: 20px; } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .g-side { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } }
.mt { margin-top: 12px; }
@media (min-width: 900px) { .mt { margin-top: 20px; } }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--sub); }
.faint { color: var(--faint); font-size: 12px; }
.small { font-size: 13px; }

.kpi .label { color: var(--faint); font-weight: 600; font-size: 12px; margin: 0; }
.kpi .value { font-size: 26px; font-weight: 800; margin-top: 2px; letter-spacing: -0.6px; line-height: 1.3; }
.kpi .delta { font-size: 12px; margin-top: 4px; color: var(--sub); }
.up { color: var(--up); } .down { color: var(--down); }

/* 통계 타일 */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.tile { background: var(--tile); border-radius: 12px; padding: 14px 16px; min-width: 0; }
.tile .t-label { font-size: 12px; color: var(--faint); font-weight: 500; }
.tile .t-value { font-size: 17px; font-weight: 800; letter-spacing: -0.3px; word-break: keep-all; overflow-wrap: anywhere; line-height: 1.4; }
td.num { white-space: nowrap; }
.tile .t-note { font-size: 12px; color: var(--sub); }
@media (max-width: 420px) { .tile { padding: 12px; } }

/* ---------- 버튼·입력 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: 0 16px; cursor: pointer; font-weight: 700; white-space: nowrap; color: var(--text); text-decoration: none; }
.btn:hover { background: var(--hl); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--on-ink); border-radius: 14px; }
.btn.primary:hover { background: #3a332e; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--sub); }
.btn.ghost:hover { background: var(--hl); }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.danger { color: var(--up); }
.btn:disabled { opacity: .5; cursor: default; }
.link-add { display: inline-flex; align-items: center; gap: 4px; color: var(--brown); font-weight: 700; font-size: 14px; background: none; border: 0; padding: 8px 0; min-height: 44px; cursor: pointer; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; background: var(--panel); padding: 3px; gap: 2px; max-width: 100%; }
.seg button { border: 0; background: none; padding: 0 12px; min-height: 38px; border-radius: 9px; cursor: pointer; color: var(--sub); font-weight: 600; white-space: nowrap; }
.seg button.on { background: var(--ink); color: var(--on-ink); }
input[type=text], input[type=password], input[type=number], input[type=date], input:not([type]), select, textarea {
  border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: 0 13px; min-height: 44px; outline: none; min-width: 0; font-size: 16px;
}
textarea { padding: 10px 13px; width: 100%; resize: vertical; min-height: 96px; line-height: 1.6; }
@media (min-width: 900px) { input[type=text], input[type=password], input[type=number], input[type=date], input:not([type]), select, textarea { font-size: 15px; } }
input:focus, select:focus, textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px var(--track); }
input[type=checkbox] { accent-color: var(--ink); width: 18px; height: 18px; flex: none; }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-weight: 700; font-size: 13px; margin-bottom: 6px; color: var(--menu); }
label.field input, label.field select { width: 100%; }
.search { display: flex; gap: 8px; }
.search input { flex: 1; font-size: 16px; min-height: 52px; }
.search .btn { min-height: 52px; }

/* 칩 */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; font-size: 13px; background: var(--panel); line-height: 1.5; }
.chip.click { cursor: pointer; }
.chip.click:hover { background: var(--hl); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.chip.on small { color: var(--sand); }
.chip .x { cursor: pointer; color: var(--faint); margin-left: 2px; padding: 0 2px; }
.chip small { color: var(--faint); }
.chip-input { display: flex; flex-wrap: wrap; gap: 6px; border: 1px solid var(--line); border-radius: 12px; padding: 6px; background: var(--panel); }
.chip-input input { border: 0 !important; box-shadow: none !important; flex: 1; min-width: 120px; min-height: 32px; padding: 0 6px; }

.badge { display: inline-block; white-space: nowrap; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--count); color: var(--menu); }
.badge.good { background: var(--c-sage); color: var(--c-sage-i); }
.badge.mid { background: var(--c-mustard); color: var(--c-mustard-i); }
.badge.bad { background: var(--c-clay); color: var(--c-clay-i); }
.badge.blue { background: var(--c-slate); color: var(--c-slate-i); }

/* 표 */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; line-height: 1.5; }
th { color: var(--faint); font-weight: 600; font-size: 12px; white-space: nowrap; }
th.sort { cursor: pointer; user-select: none; }
td.r, th.r { text-align: right; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--hl); }
table.kv td:first-child { white-space: nowrap; color: var(--sub); }
.ellipsis { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 차트 */
.chart { width: 100%; display: block; overflow: visible; }
.chart .axis { stroke: var(--line); }
.chart text { fill: var(--faint); font-size: 11px; }
.chart .bar { fill: var(--sand); cursor: pointer; }
.chart .bar:hover { fill: var(--brown); }
.chart .line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.chart .dot { fill: var(--ink); }
.spark { width: 120px; height: 32px; }
.spark path { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.spark-cell { width: 100%; }
.spark-cell .spark { width: 100%; max-width: 140px; min-width: 60px; }
.progress, .bar-mini { height: 7px; background: var(--track); border-radius: 4px; overflow: hidden; }
.progress > i, .bar-mini > i { display: block; height: 100%; background: var(--ink); border-radius: 4px; }
.card.dark .bar-mini { background: rgba(250, 247, 242, .12); }
.card.dark .bar-mini > i { background: var(--sand); }

/* 점수 */
.score { display: flex; align-items: center; gap: 14px; }
.score .ring { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 20px; flex: none; }
ul.tips { margin: 10px 0 0; padding-left: 18px; color: var(--menu); font-size: 14px; }
ul.tips li { margin: 3px 0; }

/* 상품 목록 */
.prod { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.prod:last-child { border-bottom: 0; }
.prod img { width: 48px; height: 48px; object-fit: cover; border-radius: 10px; background: var(--tile); flex: none; }
.prod .rank { width: 26px; text-align: center; font-weight: 800; color: var(--sub); flex: none; }

/* 대시보드 */
.greet { font-size: 21px; font-weight: 800; letter-spacing: -0.5px; line-height: 1.4; margin: 0 0 8px; }
@media (min-width: 900px) { .greet { font-size: 23px; } }
.brief p { margin: 0; color: var(--menu); }
.big-num { font-size: 30px; font-weight: 800; letter-spacing: -0.8px; line-height: 1.25; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; }
.week .day { padding: 6px 0; border-radius: 14px; min-width: 0; }
.week .wd { color: var(--faint); font-size: 12px; }
.week .dn { width: 36px; height: 36px; line-height: 36px; margin: 4px auto 6px; border-radius: 50%; font-weight: 700; }
.week .today .dn { background: var(--ink); color: var(--on-ink); }
.week .amt { font-weight: 700; font-size: 13px; white-space: nowrap; }
.week .bar-v { height: 64px; margin: 6px auto 4px; width: 10px; background: var(--track); border-radius: 5px; display: flex; align-items: flex-end; overflow: hidden; }
.week .bar-v i { display: block; width: 100%; background: var(--ink); border-radius: 5px; }
.week .day:not(.today) .bar-v i { background: var(--sand); }
.todo-add { margin: 4px 0 8px; }
.todo-add input[type=date] { width: 150px; }
.todo { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.todo:last-child { border-bottom: 0; }
.todo label { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; min-width: 0; cursor: pointer; min-height: 40px; }
.todo label:has(.t) { flex: 1; }
.todo.done .t { color: var(--done); text-decoration: line-through; }
.todo.suggest a { color: var(--menu); text-decoration: none; font-size: 14px; }
.todo.suggest a:hover { text-decoration: underline; }
.count { display: inline-block; background: var(--count); color: var(--menu); font-size: 12px; font-weight: 700; border-radius: 999px; padding: 0 9px; line-height: 22px; vertical-align: 2px; }

/* 설계 */
.design-grid { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .design-grid { grid-template-columns: minmax(0, 250px) minmax(0, 1fr); } }
.design-list .item { padding: 10px 12px; border-radius: 12px; cursor: pointer; min-height: 44px; }
.design-list .item:hover { background: var(--hl); }
.design-list .item.on { background: var(--ink); color: var(--on-ink); }
.design-list .item.on .faint { color: var(--sand); }
.cand { background: var(--tile); border-radius: 12px; padding: 14px 16px; margin-bottom: 8px; }
.cand .t { font-weight: 800; font-size: 16px; letter-spacing: -0.3px; }
.check { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; min-height: 44px; cursor: pointer; }
.check input { margin-top: 3px; }
.check input:checked + span { color: var(--done); text-decoration: line-through; }
.savebar { position: sticky; bottom: calc(140px + env(safe-area-inset-bottom)); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; box-shadow: 0 6px 20px rgba(40, 30, 20, .10); z-index: 5; }
@media (min-width: 900px) { .savebar { bottom: 16px; } }

/* 알림·빈 화면 */
.notice { background: var(--hl); color: var(--menu); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.notice.warn { background: var(--c-mustard); border-color: transparent; color: #4a3a12; }
.notice.bad { background: var(--c-clay); border-color: transparent; color: #5a2e20; }
.empty { text-align: center; color: var(--sub); padding: 36px 16px; }
.empty .big { width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 14px; background: var(--tile); color: var(--brown); display: grid; place-items: center; }
.empty .big .ic { width: 24px; height: 24px; }
#toast { position: fixed; left: 50%; bottom: calc(140px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
@media (min-width: 900px) { #toast { bottom: 96px; } }
#toast div { background: var(--ink); color: var(--on-ink); padding: 11px 18px; border-radius: 12px; box-shadow: 0 6px 20px rgba(40, 30, 20, .2); max-width: 90vw; font-size: 14px; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 모달 */
.modal-bg { position: fixed; inset: 0; background: rgba(31, 27, 23, .38); display: grid; place-items: center; z-index: 50; padding: 14px; }
.modal { background: var(--panel); border-radius: var(--radius); padding: 22px; width: min(900px, 100%); max-height: 85vh; overflow: auto; box-shadow: 0 10px 40px rgba(40, 30, 20, .2); }

/* 로그인 */
.login { min-height: 100vh; display: grid; place-items: center; padding: 14px; }
.login .card { width: min(400px, 100%); padding: 30px 26px; }
.login .logo { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.login .btn.primary { width: 100%; min-height: 52px; }

/* ---------- 메뉴 묶음 · 더보기 ---------- */
.nav-gap { height: 1px; background: var(--line-side); margin: 10px 8px; }
.modal-bg.sheet { align-items: end; padding: 0; }
.modal-bg.sheet .modal { border-radius: 20px 20px 0 0; width: 100%; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
.more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.more-grid a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 14px; background: var(--tile); color: var(--menu); text-decoration: none; font-size: 13px; font-weight: 600; text-align: center; min-height: 76px; }

/* ---------- 목록 + 편집 (회의 · 전략 기록) ---------- */
.split { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .split { grid-template-columns: minmax(0, 320px) minmax(0, 1fr); align-items: start; } }
.list-col { display: flex; flex-direction: column; gap: 4px; max-height: 70vh; overflow-y: auto; margin-right: -6px; padding-right: 6px; }
.list-item { padding: 10px 12px; border-radius: 12px; cursor: pointer; border: 1px solid transparent; min-height: 44px; }
.list-item:hover { background: var(--hl); }
.list-item.on { background: var(--ink); color: var(--on-ink); }
.list-item.on .faint { color: var(--sand); }
.list-item.on .badge { background: rgba(250, 247, 242, .14); color: var(--on-ink); }
.title-input { width: 100%; font-size: 20px !important; font-weight: 800; letter-spacing: -0.4px; border-color: transparent !important; padding: 0 4px !important; }
.title-input:focus { border-color: var(--line) !important; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters select { flex: 1 1 140px; }
.filters input { flex: 2 1 180px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
.badge.k-sand { background: var(--c-sand); color: var(--c-sand-i); }
.badge.k-clay { background: var(--c-clay); color: var(--c-clay-i); }
.badge.k-sage { background: var(--c-sage); color: var(--c-sage-i); }
.badge.k-slate { background: var(--c-slate); color: var(--c-slate-i); }
.badge.k-mustard { background: var(--c-mustard); color: var(--c-mustard-i); }
.badge.k-lilac { background: var(--c-lilac); color: var(--c-lilac-i); }
.dot.k-sand { background: var(--c-sand-i); } .dot.k-clay { background: var(--c-clay-i); } .dot.k-sage { background: var(--c-sage-i); }
.dot.k-slate { background: var(--c-slate-i); } .dot.k-mustard { background: var(--c-mustard-i); } .dot.k-lilac { background: var(--c-lilac-i); }
.chip.on .dot { background: var(--on-ink); }
button.badge { border: 0; cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 3px; }

/* 서식 있는 글 */
.rich { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.rich-bar { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.rich-bar button { border: 0; background: none; border-radius: 8px; min-width: 36px; height: 34px; padding: 0 8px; cursor: pointer; color: var(--menu); font-weight: 700; font-size: 13px; }
.rich-bar button:hover { background: var(--hl); }
.rich-body { min-height: 200px; padding: 12px 14px; outline: none; line-height: 1.7; font-size: 15px; overflow-wrap: anywhere; }
.rich-body:empty::before { content: attr(data-placeholder); color: var(--faint); }
.rich-body img, .md img { max-width: 100%; border-radius: 10px; margin: 6px 0; cursor: zoom-in; }
.rich-body h3, .md h3 { font-size: 16px; font-weight: 800; margin: 12px 0 4px; }
.rich-body blockquote { margin: 6px 0; padding: 4px 12px; border-left: 3px solid var(--sand); color: var(--sub); }
.rich-body ul, .rich-body ol, .md ul, .md ol { padding-left: 22px; margin: 4px 0; }
.sum-box { background: var(--tile); border-radius: 12px; padding: 14px 16px; margin-top: 8px; }
.md p { margin: 4px 0; }
.md h3:first-child { margin-top: 0; }

/* 할 일 */
.todo-form { display: flex; flex-direction: column; gap: 8px; }
.todo-form > input { width: 100%; }
.todo-form .row > * { flex: 1 1 120px; }
.todo-form .row .btn { flex: 0 0 auto; }
.todo-title { border: 0; background: none; text-align: left; padding: 6px 0; cursor: pointer; color: inherit; font: inherit; min-height: 40px; }
.todo-edit { background: var(--tile); border-radius: 12px; padding: 12px; margin: 4px 0 8px; display: flex; flex-direction: column; gap: 8px; }
.todo-edit .row > select, .todo-edit .row > input { flex: 1 1 120px; }
.todo-edit textarea { min-height: 72px; }

/* 상품별 분석 */
.an-table td { white-space: nowrap; }
.an-table tr.total td { border-top: 2px solid var(--line); background: var(--hl); }
.link-cell { border: 0; background: none; padding: 0; text-align: left; cursor: pointer; color: inherit; font: inherit; }
.link-cell:hover b { text-decoration: underline; }
.rate-input { width: 64px; min-height: 34px !important; padding: 0 8px !important; text-align: right; font-size: 14px !important; }
.g4t { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .g4t { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.up-good { color: var(--c-sage-i); font-weight: 700; } .down-bad { color: var(--c-clay-i); font-weight: 700; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--sub); margin-top: 6px; }
.legend i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }

/* ---------- 데이터 입력 ---------- */
.drop { border: 1.5px dashed var(--line); border-radius: 14px; background: var(--tile); padding: 22px 16px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; cursor: pointer; color: var(--menu); }
.drop:hover, .drop.over { border-color: var(--ink); background: var(--hl); }
.up-line { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.up-line:last-child { border-bottom: 0; }
table.cal { border-collapse: separate; border-spacing: 0; }
table.cal th, table.cal td { padding: 4px 2px; border-bottom: 1px solid var(--line); text-align: center; }
.cal-name { text-align: left !important; white-space: nowrap; padding-right: 10px !important; font-size: 12px; color: var(--menu); position: sticky; left: 0; background: var(--panel); z-index: 1; }
.cal-h { font-size: 11px; color: var(--faint); min-width: 22px; }
.cal-h.today { color: var(--ink); font-weight: 800; }
.cal-h.sun { color: var(--c-clay-i); }
.cal-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--track); border: 0; padding: 0; vertical-align: middle; }
.cal-dot.on { background: var(--ink); }
button.cal-dot.on { cursor: pointer; }
button.cal-dot.on:hover { background: var(--c-clay-i); transform: scale(1.3); }
.cal-dot.future { background: transparent; }
