/* 판매가 캘린더 — 통합 스타일 (reference shell + project-specific) */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable.min.css");
@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700;9..144,800&family=JetBrains+Mono:wght@400;500;600&display=swap");

/* ─ tokens ─ */
:root {
  --bg-base:    #f4f3ee;
  --bg-panel:   #faf9f5;
  --bg-surface: #ffffff;
  --bg-hover:   #ebe9e2;
  --bg-sunken:  #efede6;

  --border-light: #e6e4dc;
  --border-dark:  #d5d3c8;
  --border-ink:   #2b2a27;

  --text-main:  #2b2a27;
  --text-sub:   #57544d;
  --text-muted: #8a8780;
  --text-faint: #b9b5ab;

  --accent:       #c96442;
  --accent-hover: #b15534;
  --accent-light: #f7e9e2;
  --accent-ink:   #7c3a1f;

  --weekend:   #b15534;
  --today-bg:  #fff4d8;
  --today-bd:  #d4a93a;

  --green-muted: #507d5a;
  --red-muted:   #c96442;
  --promo-color: #a48b7a;

  --font-sans:    "Pretendard Variable", Pretendard, "Inter", "Noto Sans KR", sans-serif;
  --font-display: "Fraunces", "Georgia", "Noto Serif KR", serif;
  --font-serif:   "Fraunces", "Georgia", serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;
}

/* ─ reset ─ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-main);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}
button { font-family: inherit; }

/* ─ scrollbar hidden ─ */
.no-scroll::-webkit-scrollbar { display: none; }
.no-scroll { scrollbar-width: none; }

/* ─ app shell (full-page) ─ */
#shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-base);
  color: var(--text-main);
  font-family: var(--font-sans);
  position: relative;
}

/* ─ body row (side + main + bi-side) ─ */
.body-row {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* ─ view pane show/hide ─ */
.view-pane { display: none; flex: 1; overflow: auto; flex-direction: column; }
.view-pane.on { display: flex; }

/* ══════════════════════════════════════════
   TOPBAR
══════════════════════════════════════════ */
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 24px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
  height: 64px;
  overflow-x: auto;
  scrollbar-width: none;
}
.topbar::-webkit-scrollbar { display: none; }
.topbar .brand { white-space: nowrap; flex-shrink: 0; }
.topbar .tb-btn { flex-shrink: 0; }
.topbar .tb-sheet { flex-shrink: 0; }

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.6px;
  color: var(--text-main);
  display: flex; align-items: baseline; gap: 8px;
}
.brand .dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; display: inline-block; transform: translateY(-2px); }
.brand .sub { font-family: var(--font-mono); font-weight: 500; font-size: 11px; color: var(--text-muted); letter-spacing: 0; text-transform: uppercase; }

.tb-sp { flex: 1; }

.tb-btn {
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--border-dark);
  background: var(--bg-surface);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.tb-btn:hover { background: var(--bg-hover); }
.tb-btn.ink { background: var(--text-main); color: #fff; border-color: var(--text-main); }
.tb-btn.ink:hover { background: #000; }
.tb-btn.gh { background: var(--bg-base); }
.tb-btn.icon { padding: 0 10px; }
.tb-btn .key { font-family: var(--font-mono); font-size: 10px; opacity: .7; padding-left: 4px; }
.tb-btn.rank-tog { background: var(--accent); color: #fff; border-color: var(--accent); }
.tb-btn.rank-tog.off { background: var(--bg-surface); color: var(--text-main); border-color: var(--border-dark); }

/* ─ sheet selector ─ */
.tb-sheet {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px;
  padding: 0 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  position: relative;
  min-width: 220px;
}
.tb-sheet .lbl {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.tb-sheet select {
  border: none; background: none; outline: none;
  font-family: inherit; font-size: 12px;
  font-weight: 600; color: var(--text-main);
  flex: 1; cursor: pointer;
}
.tb-sheet .caret { color: var(--text-muted); }

/* ══════════════════════════════════════════
   SUBBAR (tabs)
══════════════════════════════════════════ */
.subbar {
  display: flex; align-items: center; gap: 0;
  padding: 0 24px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  height: 48px;
  flex-shrink: 0;
}
.tabs { display: flex; gap: 4px; flex-shrink: 0; }
.tab {
  height: 48px;
  padding: 0 14px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  display: inline-flex; align-items: center; gap: 6px;
  letter-spacing: -0.2px;
  transition: color .15s;
}
.tab:hover { color: var(--text-main); }
.tab.on { color: var(--text-main); border-bottom-color: var(--accent); font-weight: 700; }
.tab .badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  background: var(--accent-light);
  color: var(--accent-ink);
  padding: 2px 6px;
  border-radius: 4px;
}
.subbar-sp { flex: 1; }

/* ══════════════════════════════════════════
   LEFT SIDEBAR (product list)
══════════════════════════════════════════ */
.side {
  width: 220px;
  flex-shrink: 0;
  background: var(--bg-panel);
  border-right: 1px solid var(--border-light);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.side-hdr {
  padding: 14px 18px 10px;
  display: flex; align-items: center; justify-content: space-between;
}
.side-hdr-l { display: flex; flex-direction: column; gap: 2px; }
.side-hdr h4 { font-size: 12px; font-weight: 700; color: var(--text-muted); letter-spacing: 0.5px; text-transform: uppercase; }
.side-hdr .ct { font-family: var(--font-mono); font-size: 10px; color: var(--text-faint); }
.side-hdr a { font-size: 11px; color: var(--accent); cursor: pointer; font-weight: 600; }

.side-list {
  flex: 1; overflow-y: auto; padding: 0 8px 12px;
  scrollbar-width: none;
}
.side-list::-webkit-scrollbar { display: none; }
.side-it {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 10px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--text-sub);
  transition: background .12s, color .12s;
}
.side-it:hover { background: var(--bg-hover); }
.side-it.on { background: var(--bg-surface); color: var(--text-main); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.side-chk {
  width: 14px; height: 14px;
  border: 1.5px solid var(--border-dark);
  border-radius: 4px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; color: #fff;
}
.side-it.on .side-chk { background: var(--accent); border-color: var(--accent); }
.side-it .ct { margin-left: auto; font-family: var(--font-mono); font-size: 10px; color: var(--text-faint); font-weight: 500; }

/* ══════════════════════════════════════════
   MAIN CONTENT
══════════════════════════════════════════ */
.main {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
}

/* ─ calendar header bar ─ */
.calhdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}
.calhdr-l { display: flex; align-items: baseline; gap: 14px; }
.calhdr .month {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -1.2px;
  color: var(--text-main);
  line-height: 1;
}
.calhdr .month .yr { color: var(--text-faint); font-weight: 500; margin-left: 8px; font-size: 22px; }
.calhdr .meta { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.calhdr .meta strong { color: var(--accent); font-weight: 700; }

.calhdr-r { display: flex; align-items: center; gap: 6px; }
.iconbtn {
  width: 32px; height: 32px;
  border: 1px solid var(--border-dark);
  background: var(--bg-surface);
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-sub);
  transition: background .12s, color .12s, border-color .12s;
}
.iconbtn:hover { background: var(--bg-hover); color: var(--text-main); }
.iconbtn.active { background: var(--text-main); color: #fff; border-color: var(--text-main); }
.todaybtn { padding: 0 12px; width: auto; font-size: 12px; font-weight: 600; gap: 6px; }

/* ─ channel chips bar ─ */
.chips {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 28px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px;
  padding: 0 10px 0 8px;
  border: 1px solid var(--border-dark);
  border-radius: 13px;
  background: var(--bg-surface);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-sub);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  flex-shrink: 0;
  transition: background .12s;
}
.chip:hover { background: var(--bg-hover); }
.chip.on { color: #fff; border-color: transparent; background: var(--c, var(--text-main)); }
.chip .swatch {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--c, #999);
}
.chip.on .swatch { background: rgba(255,255,255,.5); }
.chip .ct { font-family: var(--font-mono); font-size: 10px; opacity: .7; font-weight: 500; }
.chip-all { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.5px; padding: 0 12px; }
.chip-all.on { background: var(--text-main) !important; color: #fff; border-color: var(--text-main); }

/* ─ calendar canvas ─ */
.cal {
  flex: 1; min-height: 0;
  overflow: auto;
  background: var(--bg-surface);
  scrollbar-width: thin;
  scrollbar-color: var(--border-dark) transparent;
}
.cal::-webkit-scrollbar { width: 8px; height: 8px; }
.cal::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: 4px; }
.cal::-webkit-scrollbar-track { background: transparent; }

/* ══════════════════════════════════════════
   STATUSBAR
══════════════════════════════════════════ */
.statusbar {
  padding: 8px 28px;
  background: var(--bg-panel);
  border-top: 1px solid var(--border-light);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
  display: flex; align-items: center; gap: 16px;
  flex-shrink: 0;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.statusbar .dotok { width: 6px; height: 6px; background: #5a9c6a; border-radius: 50%; box-shadow: 0 0 0 3px rgba(90,156,106,.18); display: inline-block; }
.statusbar .doterr { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 0 3px rgba(201,100,66,.18); display: inline-block; }
.statusbar .sp { flex: 1; }

/* ══════════════════════════════════════════
   RIGHT BI PANEL
══════════════════════════════════════════ */
.bi-side {
  width: 280px;
  flex-shrink: 0;
  background: var(--bg-panel);
  border-left: 1px solid var(--border-light);
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.bi-side.collapsed { width: 0; border-left: none; }
.bi-inner {
  width: 280px;
  display: flex; flex-direction: column;
  height: 100%;
  flex-shrink: 0;
}
.bi-hdr {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.bi-hdr-l { display: flex; flex-direction: column; gap: 2px; }
.bi-hdr-l h4 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.bi-hdr-l .sub {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.bi-close {
  border: none; background: none; cursor: pointer;
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  border-radius: 5px;
  font-size: 14px;
}
.bi-close:hover { background: var(--bg-hover); color: var(--text-main); }
.bi-list {
  flex: 1; overflow-y: auto;
  padding: 12px 14px 18px;
  display: flex; flex-direction: column;
  gap: 12px;
  scrollbar-width: none;
}
.bi-list::-webkit-scrollbar { display: none; }
.bi-item {
  display: flex; flex-direction: column;
  gap: 5px;
  padding-bottom: 11px;
  border-bottom: 1px dashed var(--border-light);
}
.bi-item:last-child { border-bottom: none; }
.bi-item .top-row { display: flex; align-items: center; gap: 6px; }
.bi-item .rank {
  font-family: var(--font-mono); font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-base);
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.3px;
}
.bi-item .rank.gold { background: var(--accent); color: #fff; }
.bi-item .ch {
  font-family: var(--font-mono); font-size: 10px;
  font-weight: 700;
  color: var(--c);
  letter-spacing: 0.5px;
}
.bi-item .prod {
  font-size: 11.5px; color: var(--text-main); font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bi-item .row { display: flex; align-items: center; gap: 8px; }
.bi-item .bar {
  flex: 1; height: 8px;
  background: var(--bg-base);
  border-radius: 4px; overflow: hidden;
}
.bi-item .bar .fill { height: 100%; background: var(--c); border-radius: 4px; }
.bi-item .price {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--text-main);
  flex-shrink: 0;
}
.bi-item .price.discount { color: var(--accent); }
.bi-item .pct-tag {
  font-family: var(--font-mono); font-size: 9.5px;
  font-weight: 700;
  background: var(--accent-light);
  color: var(--accent-ink);
  padding: 1px 4px;
  border-radius: 3px;
  margin-left: 4px;
}
/* legacy bi-pane (old renderBi) */
.bi-pane {
  display: flex; flex: 1; overflow: auto;
  padding: 20px 16px;
  background: var(--bg-panel);
  flex-direction: column;
  gap: 14px;
  scrollbar-width: none;
}
.bi-pane::-webkit-scrollbar { display: none; }
.bi-lbl { font-size: 13px; color: var(--text-main); font-weight: 500; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bi-row { display: flex; align-items: center; gap: 10px; }
.bi-bar { height: 10px; border-radius: 5px; background: var(--accent); min-width: 4px; }
.bi-val { font-size: 13px; font-weight: 700; color: var(--text-main); }
.bi-close-btn { border: none; background: none; cursor: pointer; font-size: 18px; color: var(--text-muted); line-height: 1; padding: 0; }
.bi-close-btn:hover { color: var(--accent); }

/* ══════════════════════════════════════════
   VARIATION A — 월간 그리드
══════════════════════════════════════════ */
.A-dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
}
.A-dow span {
  padding: 10px 14px 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.A-dow span:first-child { color: var(--weekend); }
.A-dow span:last-child  { color: #4a7ea3; }

.A-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--border-light);
  gap: 1px;
}
.A-cell {
  background: var(--bg-surface);
  min-height: 122px;
  padding: 8px 10px 6px;
  position: relative;
  display: flex; flex-direction: column;
  gap: 4px;
  overflow: hidden;
}
.A-cell.other { background: var(--bg-base); color: var(--text-faint); }
.A-cell.other .A-day { color: var(--text-faint); }
.A-cell.today { background: var(--today-bg); }
.A-cell .A-day {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1;
}
.A-cell.weekend .A-day { color: var(--weekend); }
.A-cell.today .A-day { color: var(--accent-ink); font-weight: 800; }
.A-cell .A-day .lbl { font-family: var(--font-mono); font-size: 9px; font-weight: 500; color: var(--text-muted); margin-left: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.A-cell.today .A-day .lbl { color: var(--accent-ink); }
.A-evs { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; flex: 1; }
.A-ev {
  display: flex; align-items: center; gap: 5px;
  padding: 3px 6px 3px 4px;
  border-radius: 4px;
  background: var(--c-bg);
  color: var(--c-fg);
  font-size: 10.5px;
  line-height: 1.15;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  border-left: 3px solid var(--c);
  transition: transform .12s, box-shadow .12s;
}
.A-ev:hover { transform: translateX(1px); box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.A-ev .ico {
  width: 12px; height: 12px;
  border-radius: 3px;
  background: var(--c);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 8px; font-weight: 700;
  flex-shrink: 0;
  font-family: var(--font-mono);
}
.A-ev .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.A-ev .pct { font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; background: var(--c); color: #fff; padding: 1px 4px; border-radius: 3px; flex-shrink: 0; }
.A-cell .A-more { font-family: var(--font-mono); font-size: 9.5px; color: var(--text-muted); padding: 1px 4px; cursor: pointer; text-transform: uppercase; letter-spacing: 0.5px; }

/* ══════════════════════════════════════════
   VARIATION B — 스윔레인 (간트)
══════════════════════════════════════════ */
.B-wrap { display: grid; grid-template-columns: 180px 1fr; height: 100%; }
.B-headcol {
  border-right: 1px solid var(--border-light);
  background: var(--bg-panel);
  display: flex; flex-direction: column;
  position: sticky; left: 0; z-index: 3;
}
.B-headcol .B-hcell {
  height: 36px;
  border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center;
  padding: 0 14px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px;
  background: var(--bg-panel);
}
.B-headcol .B-lane {
  height: 68px;
  border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px;
  background: var(--bg-panel);
}
.B-lane .swatch { width: 4px; height: 36px; border-radius: 2px; background: var(--c); flex-shrink: 0; }
.B-lane .nm { display: flex; flex-direction: column; gap: 2px; }
.B-lane .nm-main { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--text-main); letter-spacing: -0.3px; line-height: 1; }
.B-lane .nm-sub { font-family: var(--font-mono); font-size: 9.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

.B-body { overflow: auto; position: relative; scrollbar-width: thin; }
.B-body::-webkit-scrollbar { height: 8px; width: 8px; }
.B-body::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: 4px; }
.B-track { display: grid; grid-auto-flow: column; grid-auto-columns: 38px; position: relative; }
.B-dcell {
  height: 36px;
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--bg-panel);
  position: sticky; top: 0; z-index: 2;
  gap: 1px;
}
.B-dcell .dow { font-family: var(--font-mono); font-size: 9px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.5px; }
.B-dcell .dnum { font-family: var(--font-display); font-size: 13px; font-weight: 600; color: var(--text-main); line-height: 1; }
.B-dcell.weekend .dnum { color: var(--weekend); }
.B-dcell.today { background: var(--today-bg); }
.B-dcell.today .dnum { color: var(--accent-ink); font-weight: 800; }
.B-lcell {
  height: 68px;
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-surface);
  position: relative;
}
.B-lcell.weekend { background: #fbfaf6; }
.B-lcell.today { background: rgba(255,244,216,0.4); }
.B-lcell.empty::after {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, transparent 0, transparent 4px, rgba(0,0,0,.012) 4px, rgba(0,0,0,.012) 8px);
  pointer-events: none;
}
.B-bar {
  position: absolute;
  top: 8px; bottom: 8px;
  background: var(--c);
  color: #fff;
  border-radius: 6px;
  padding: 5px 9px;
  display: flex; flex-direction: column;
  justify-content: center; gap: 1px;
  font-size: 10.5px; line-height: 1.1;
  cursor: pointer; z-index: 1;
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
  overflow: hidden;
  transition: transform .12s, box-shadow .12s;
}
.B-bar:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.18); z-index: 5; }
.B-bar .nm { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.B-bar .row2 { display: flex; align-items: baseline; gap: 6px; font-family: var(--font-mono); font-size: 9.5px; font-weight: 500; }
.B-bar .row2 .strike { opacity: .55; text-decoration: line-through; }
.B-bar .row2 .now { font-weight: 700; font-size: 10.5px; }
.B-bar .row2 .pct { margin-left: auto; background: rgba(255,255,255,.22); padding: 1px 4px; border-radius: 3px; font-weight: 700; }

/* ══════════════════════════════════════════
   CALENDAR PROMO VIEW (legacy p-* classes)
══════════════════════════════════════════ */
.p-day {
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  border-radius: 8px;
  min-height: 110px;
  display: flex;
  flex-direction: column;
}
.p-other { background: var(--bg-base) !important; }
.p-today { background: var(--today-bg) !important; border-color: var(--today-bd) !important; }
.p-evt-bar {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  font-weight: 600 !important;
  letter-spacing: -0.2px;
}
.p-evt-bar:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.18) !important;
  z-index: 10 !important;
}

/* ══════════════════════════════════════════
   CHANNEL COMPARE VIEW
══════════════════════════════════════════ */
.ch-wrap { padding: 24px 32px; display: flex; flex-direction: column; gap: 12px; }
.ch-group { margin-bottom: 24px; }
.ch-title { font-family: var(--font-serif); font-size: 16px; font-weight: 700; color: var(--text-main); padding: 4px 0 12px; border-bottom: 1px solid var(--border-light); margin-bottom: 12px; }
.ch-row {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.02);
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  margin-bottom: 8px;
}
.ch-row:hover { border-color: #d1cfc5; transform: translateY(-2px); box-shadow: 0 6px 12px rgba(0,0,0,.06); }
.ch-row.promo { border-left: 4px solid var(--promo-color); }
.ch-row.no-op { opacity: .5; cursor: default; box-shadow: none; background: transparent; }
.ch-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.ch-name { font-size: 14px; font-weight: 600; color: var(--text-main); width: 80px; flex-shrink: 0; }
.ch-price { font-size: 18px; font-weight: 700; width: 120px; flex-shrink: 0; text-align: right; }
.ch-bar-wrap { flex: 1; height: 8px; background: var(--border-light); border-radius: 4px; overflow: hidden; }
.ch-bar { height: 100%; border-radius: 4px; }
.ch-trend { font-size: 13px; width: 80px; text-align: right; flex-shrink: 0; white-space: nowrap; color: var(--text-muted); }

/* ══════════════════════════════════════════
   HISTORY
══════════════════════════════════════════ */
.hist-wrap { margin-top: 12px; overflow: auto; scrollbar-width: none; }
.hist-wrap::-webkit-scrollbar { display: none; }
.hist-row { display: flex; align-items: center; gap: 10px; font-size: 12px; padding: 6px 0; border-bottom: 1px solid var(--bg-base); }
.hbar { height: 8px; border-radius: 4px; min-width: 4px; }
.hval { margin-left: auto; font-weight: 600; }

/* ══════════════════════════════════════════
   PRICE EDIT PANE
══════════════════════════════════════════ */
.edit-wrap {
  flex: 1; display: flex; flex-direction: column;
  overflow: auto; scrollbar-width: thin;
  background: var(--bg-base); padding: 28px;
}
.edit-card {
  max-width: 920px; width: 100%; margin: 0 auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 28px 32px 24px;
  box-shadow: 0 4px 16px rgba(0,0,0,.04);
}
.edit-card h2 {
  font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -0.6px;
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px;
}
.edit-card h2 .sub { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.edit-card .lede { font-size: 12.5px; color: var(--text-sub); margin-bottom: 22px; }

.edit-field { border: 1px solid var(--border-light); background: var(--bg-panel); border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; }
.edit-field-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.edit-field-hdr .nm { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; }
.edit-field-hdr .all { font-size: 11px; color: var(--accent); cursor: pointer; font-weight: 600; }
.edit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; max-height: 160px; overflow-y: auto; scrollbar-width: thin; }
.edit-grid::-webkit-scrollbar { width: 4px; }
.edit-grid::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: 2px; }
.edit-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  background: var(--bg-surface); border: 1px solid var(--border-light);
  border-radius: 7px; font-size: 12px; cursor: pointer;
  transition: background .12s, border-color .12s;
  font-weight: 500; color: var(--text-sub);
}
.edit-chip:hover { background: var(--bg-hover); }
.edit-chip.on { background: var(--accent-light); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.edit-chip .chk { width: 13px; height: 13px; border: 1.5px solid var(--border-dark); border-radius: 3px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 9px; color: #fff; }
.edit-chip.on .chk { background: var(--accent); border-color: var(--accent); }
.edit-chip .sw { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex-shrink: 0; }

.edit-inputs { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.edit-inputs .field { display: flex; flex-direction: column; gap: 5px; }
.edit-inputs label { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; }
.edit-inputs input { height: 40px; padding: 0 14px; border: 1px solid var(--border-dark); border-radius: 9px; font-size: 14px; font-family: var(--font-mono); font-weight: 600; outline: none; background: var(--bg-surface); color: var(--text-main); transition: border-color .12s, box-shadow .12s; }
.edit-inputs input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }

.edit-actions { display: flex; gap: 10px; padding-top: 4px; }
.edit-actions .btn { flex: 1; height: 44px; border-radius: 10px; font-family: var(--font-sans); font-size: 14px; font-weight: 700; cursor: pointer; border: 1px solid var(--border-dark); background: var(--bg-surface); color: var(--text-main); letter-spacing: -0.2px; transition: background .12s, border-color .12s; }
.edit-actions .btn:hover { background: var(--bg-hover); }
.edit-actions .btn.pri { flex: 2; background: var(--text-main); color: #fff; border-color: var(--text-main); }
.edit-actions .btn.pri:hover { background: #000; }

/* legacy edit-form-card (old vEdit) */
.edit-form-card {
  background: var(--bg-surface); border: 1px solid var(--border-light);
  border-radius: 16px; padding: 32px 40px;
  width: 100%; max-width: 850px;
  box-shadow: 0 8px 24px rgba(0,0,0,.03);
}
.edit-form-card h2 { font-family: var(--font-serif); font-size: 22px; color: var(--text-main); margin-bottom: 20px; display: flex; align-items: center; gap: 8px; }
.multi-select-container { border: 1px solid var(--border-dark); border-radius: 10px; background: var(--bg-panel); padding: 12px; margin-bottom: 16px; max-height: 140px; overflow-y: auto; scrollbar-width: none; }
.multi-select-container::-webkit-scrollbar { display: none; }
.ms-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.ms-header span { font-size: 13px; font-weight: 700; }
.ms-header label { font-size: 11px; color: var(--accent); cursor: pointer; font-weight: 700; }
.ms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
.ms-item { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; padding: 6px 8px; border-radius: 6px; background: var(--bg-surface); border: 1px solid var(--border-light); transition: all .2s; }
.ms-item:hover { background: var(--bg-hover); }
.ms-item input { width: 14px; height: 14px; cursor: pointer; accent-color: var(--accent); margin-top: 2px; flex-shrink: 0; }
.ms-item span { font-size: 12px; line-height: 1.4; }
.edit-form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.edit-form-grid div { display: flex; flex-direction: column; gap: 6px; }
.edit-form-grid label { font-size: 13px; font-weight: 700; color: var(--text-muted); }
.edit-form-grid input { height: 42px; padding: 0 16px; border: 1px solid var(--border-dark); border-radius: 10px; font-size: 14px; outline: none; transition: all .2s; }
.edit-form-grid input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }

/* ══════════════════════════════════════════
   FLOATING PRICE TABLE WINDOW
══════════════════════════════════════════ */
.floating-window {
  position: fixed;
  top: 8vh; left: 12vw;
  width: 720px; min-width: 400px;
  max-height: 82vh;
  background: var(--bg-surface);
  border: 3px solid #000;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.3), 0 2px 8px rgba(0,0,0,.2);
  display: none;
  flex-direction: column;
  z-index: 2000;
  resize: both;
  overflow: hidden;
  animation: slideUp .2s ease-out;
  transition: opacity .15s;
}
.floating-window.open { display: flex; }
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.fw-header {
  padding: 14px 20px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  display: flex; justify-content: space-between; align-items: center;
  cursor: grab; user-select: none; flex-shrink: 0;
}
.fw-header:active { cursor: grabbing; }
.fw-header h3 { font-size: 15px; margin: 0; color: var(--text-main); font-family: var(--font-serif); font-weight: 700; display: flex; align-items: center; gap: 8px; }
.fw-header button { border: none; background: none; font-size: 20px; cursor: pointer; color: var(--text-muted); line-height: 1; padding: 0; }
.fw-header button:hover { color: var(--text-main); }
.fw-opacity-wrap {
  display: flex; align-items: center; gap: 8px;
  margin: 0 12px; padding: 4px 12px;
  background: var(--bg-base); border-radius: 8px; border: 1px solid var(--border-light);
  cursor: default;
}
.fw-opacity-wrap label { font-size: 11px; color: var(--text-muted); font-weight: 600; white-space: nowrap; cursor: default; }
.fw-opacity-wrap input[type="range"] { width: 90px; height: 5px; -webkit-appearance: none; appearance: none; background: linear-gradient(to right, var(--border-dark), var(--accent)); border-radius: 3px; outline: none; cursor: pointer; }
.fw-opacity-wrap input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 2.5px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); cursor: pointer; }
.fw-body { padding: 0; flex: 1; min-height: 0; overflow-y: auto; overflow-x: auto; background: var(--bg-surface); scrollbar-width: none; }
.fw-body::-webkit-scrollbar { display: none; }

/* ─ price table ─ */
.pt-table { width: 100%; min-width: 640px; border-collapse: collapse; text-align: left; font-size: 13px; }
.pt-table th { background: var(--bg-panel); padding: 12px 16px; font-weight: 800; font-size: 11.5px; color: #000; border-bottom: 2px solid #000; position: sticky; top: 0; z-index: 2; white-space: nowrap; }
.pt-table td { padding: 11px 16px; border-bottom: 1px solid #c9c9c9; color: #333; vertical-align: middle; }
.pt-ch-header { background: var(--bg-panel) !important; }
.pt-ch-header td { padding: 8px 16px !important; border-top: 2px solid var(--border-dark); border-bottom: 1px solid var(--border-light); }
.pt-ch-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; letter-spacing: -0.3px; }
.pt-ch-badge .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.pt-ch-badge .cnt { font-size: 11px; color: var(--text-muted); font-weight: 500; margin-left: 4px; }
.pt-table tbody tr:hover td { background: var(--bg-hover) !important; }
.pt-group-even td:not(.pt-ch-cell) { background: rgba(0,0,0,.012); }
.price-col { text-align: right; font-variant-numeric: tabular-nums; width: 110px; }
.sale-badge { display: inline-block; background: var(--red-muted); color: #fff; font-size: 10.5px; padding: 2px 5px; border-radius: 4px; font-weight: 700; margin-left: 6px; vertical-align: baseline; line-height: 1; }
.strike-price { text-decoration: line-through; color: #aaa; font-size: 12px; font-weight: 400; margin-right: 8px; }
.cur-price-hlt { font-weight: 700; color: var(--red-muted); font-size: 13.5px; }

/* ══════════════════════════════════════════
   MODALS (mw / modal — inline)
══════════════════════════════════════════ */
.mw {
  display: none; position: absolute; inset: 0;
  background: rgba(0,0,0,.25);
  z-index: 999;
  align-items: center; justify-content: center;
  backdrop-filter: blur(2px);
}
.mw.open { display: flex; }
.modal {
  background: var(--bg-surface); border-radius: 16px;
  width: 380px; overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,.1);
  animation: slideUp .2s ease-out;
}
.mhdr { padding: 18px 24px; border-bottom: 1px solid var(--border-light); display: flex; align-items: center; justify-content: space-between; }
.mbody { padding: 24px; overflow-y: auto; scrollbar-width: none; }
.mbody::-webkit-scrollbar { display: none; }
.mfoot { padding: 16px 24px; background: var(--bg-panel); border-top: 1px solid var(--border-light); display: flex; justify-content: flex-end; gap: 10px; }
button.mbtn { height: 40px; padding: 0 20px; border: 1px solid var(--border-dark); border-radius: 10px; font-size: 14px; font-weight: 600; background: var(--bg-surface); cursor: pointer; transition: all .2s; }
button.mbtn.pri { background: var(--accent); color: #fff; border-color: var(--accent); }
button.mbtn:hover { background: var(--bg-hover); }

/* ══════════════════════════════════════════
   MODAL (reference style — modal-overlay / modal-shell)
══════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(43,42,39,.4);
  backdrop-filter: blur(3px);
  z-index: 100;
  display: none;
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-shell {
  background: var(--bg-surface); border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
  display: flex; flex-direction: column;
  max-height: 86vh; overflow: hidden;
  animation: slideUp .2s ease-out;
}
.modal-shell.s-date  { width: 380px; }
.modal-shell.s-admin { width: 520px; }
.modal-shell.s-help  { width: 760px; }
.modal-hdr { padding: 18px 24px; border-bottom: 1px solid var(--border-light); display: flex; align-items: center; justify-content: space-between; }
.modal-hdr h3 { font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: -0.3px; }
.modal-hdr .x { border: none; background: none; cursor: pointer; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-muted); border-radius: 6px; font-size: 16px; }
.modal-hdr .x:hover { background: var(--bg-hover); color: var(--text-main); }
.modal-body { padding: 20px 24px; overflow-y: auto; flex: 1; scrollbar-width: thin; }
.modal-foot { padding: 14px 22px; background: var(--bg-panel); border-top: 1px solid var(--border-light); display: flex; justify-content: flex-end; gap: 10px; }
.modal-foot .btn { height: 38px; padding: 0 16px; border-radius: 9px; font-size: 13px; font-weight: 700; cursor: pointer; border: 1px solid var(--border-dark); background: var(--bg-surface); }
.modal-foot .btn:hover { background: var(--bg-hover); }
.modal-foot .btn.pri { background: var(--text-main); color: #fff; border-color: var(--text-main); }

/* ─ date picker ─ */
.date-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.date-nav .lbl { font-family: var(--font-display); font-size: 16px; font-weight: 700; letter-spacing: -0.3px; }
.date-nav button { width: 30px; height: 30px; border: 1px solid var(--border-dark); background: var(--bg-surface); border-radius: 7px; cursor: pointer; font-size: 14px; }
.date-nav button:hover { background: var(--bg-hover); }
.date-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 12px; }
.date-grid .dow { text-align: center; font-family: var(--font-mono); font-size: 9.5px; color: var(--text-muted); padding: 4px 0; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.date-grid .cell { text-align: center; padding: 8px 0; font-family: var(--font-mono); font-size: 12px; cursor: pointer; border-radius: 6px; font-weight: 500; color: var(--text-main); }
.date-grid .cell:hover { background: var(--bg-hover); }
.date-grid .cell.other { color: var(--text-faint); }
.date-grid .cell.today { background: var(--today-bg); color: var(--accent-ink); font-weight: 800; }
.date-grid .cell.in-range { background: var(--accent-light); color: var(--accent-ink); border-radius: 0; }
.date-grid .cell.range-start, .date-grid .cell.range-end { background: var(--accent); color: #fff; font-weight: 700; }
.date-grid .cell.range-start { border-radius: 6px 0 0 6px; }
.date-grid .cell.range-end { border-radius: 0 6px 6px 0; }

/* ══════════════════════════════════════════
   ADMIN TABS
══════════════════════════════════════════ */
.admin-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border-light); padding: 0 20px; flex-shrink: 0; }
.admin-tab { border: none; background: none; padding: 8px 14px; font-size: 12px; font-weight: 600; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; transition: all .2s; }
.admin-tab:hover { color: var(--text-main); }
.admin-tab.on { color: var(--text-main); border-bottom-color: var(--accent); }
.admin-pane { display: none; }
.admin-pane.on { display: block; }
.admin-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.admin-field label { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.admin-field input { height: 38px; padding: 0 14px; border: 1px solid var(--border-dark); border-radius: 8px; font-size: 13px; outline: none; }
.admin-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.admin-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.admin-result { margin-top: 10px; padding: 10px 12px; border-radius: 8px; font-size: 12px; background: var(--accent-light); color: var(--accent-ink); border-left: 3px solid var(--accent); display: none; }
.admin-result.show { display: block; }

/* ══════════════════════════════════════════
   HELP OVERLAY
══════════════════════════════════════════ */
.help-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(43,42,39,.45);
  z-index: 9999;
  align-items: center; justify-content: center;
  backdrop-filter: blur(3px);
}
.help-overlay.open { display: flex; }
.help-modal {
  background: var(--bg-surface); border-radius: 20px;
  width: min(780px, 92vw); max-height: 88vh;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,.18);
  overflow: hidden;
}
.help-header { display: flex; align-items: center; justify-content: space-between; padding: 22px 28px 18px; border-bottom: 1px solid var(--border-light); flex-shrink: 0; }
.help-header h2 { font-family: var(--font-serif); font-size: 20px; font-weight: 700; color: var(--text-main); letter-spacing: -0.4px; }
.help-close { border: none; background: none; font-size: 22px; cursor: pointer; color: var(--text-muted); line-height: 1; padding: 4px; }
.help-close:hover { color: var(--accent); }
.help-nav { display: flex; gap: 0; padding: 0 28px; border-bottom: 1px solid var(--border-light); flex-shrink: 0; overflow-x: auto; scrollbar-width: none; }
.help-nav::-webkit-scrollbar { display: none; }
.help-nav-btn { border: none; background: none; padding: 12px 18px; font-size: 13px; font-weight: 600; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.help-nav-btn:hover { color: var(--text-main); }
.help-nav-btn.on { color: var(--accent); border-bottom-color: var(--accent); }
.help-body { flex: 1; overflow-y: auto; padding: 28px; scrollbar-width: none; }
.help-body::-webkit-scrollbar { display: none; }
.help-section { display: none; }
.help-section.on { display: block; }
.help-section h3 { font-family: var(--font-serif); font-size: 16px; font-weight: 700; color: var(--text-main); margin: 0 0 14px; letter-spacing: -0.3px; }
.help-section h3:not(:first-child) { margin-top: 28px; }
.help-section p, .help-section li { font-size: 13.5px; line-height: 1.75; color: var(--text-main); margin: 0 0 10px; }
.help-section ul, .help-section ol { padding-left: 20px; margin: 0 0 16px; }
.help-section li { margin-bottom: 6px; }
.help-tip { background: var(--accent-light); border-left: 3px solid var(--accent); padding: 14px 18px; border-radius: 0 10px 10px 0; margin: 16px 0; font-size: 13px; line-height: 1.7; color: var(--text-main); }
.help-tip strong { color: var(--accent); }
.help-warn { background: #fef3e2; border-left: 3px solid var(--red-muted); padding: 14px 18px; border-radius: 0 10px 10px 0; margin: 16px 0; font-size: 13px; line-height: 1.7; }
.help-warn strong { color: var(--red-muted); }
.help-step { display: flex; gap: 14px; margin: 14px 0; align-items: flex-start; }
.help-step-num { flex-shrink: 0; width: 28px; height: 28px; background: var(--accent); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.help-step-body { flex: 1; font-size: 13.5px; line-height: 1.7; }
.help-kbd { display: inline-block; background: var(--bg-base); border: 1px solid var(--border-dark); border-radius: 5px; padding: 1px 7px; font-size: 12px; font-family: monospace; color: var(--text-main); vertical-align: baseline; }
.help-badge { display: inline-block; background: var(--green-muted); color: #fff; font-size: 10px; padding: 2px 8px; border-radius: 10px; font-weight: 700; margin-left: 6px; vertical-align: middle; }
.help-badge.admin { background: var(--accent); }

/* ══════════════════════════════════════════
   판매가 추이 — 공통
══════════════════════════════════════════ */
.trend-wrap {
  padding: 20px 28px 8px;
  display: flex; flex-direction: column;
  gap: 16px; flex: 1; min-height: 0; overflow: hidden;
}
.trend-cards {
  display: flex; flex-wrap: wrap; gap: 10px;
  flex-shrink: 0;
}
.trend-card {
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 16px 20px;
  background: var(--bg-surface);
  display: flex; flex-direction: column; gap: 4px;
  border-top: 3px solid var(--c, var(--border-dark));
  min-width: 148px;
  position: relative; overflow: hidden;
}
.trend-card .ch-row {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px;
}
.trend-card .ch-row .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.trend-card .ch-row .best-badge {
  margin-left: auto; font-size: 10px; font-weight: 700;
  background: var(--accent); color: #fff;
  border-radius: 4px; padding: 1px 6px;
}
.trend-card .price {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 800;
  color: var(--text-main); letter-spacing: -0.5px; line-height: 1;
}
.trend-card.discounted .price { color: var(--accent); }
.trend-card .delta {
  font-size: 12px; font-weight: 600; margin-top: 5px;
  display: inline-flex; align-items: center; gap: 4px;
}
.trend-card .delta.down { color: var(--red-muted); }
.trend-card .delta.flat { color: var(--text-muted); }
.trend-card .promo-days { font-size: 12px; color: var(--promo-color); margin-top: 4px; }

/* ── T1 멀티라인 ── */
.T1-chart-wrap {
  flex: 1; min-height: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 20px;
  position: relative; overflow: hidden;
}

/* ── T2 스몰 멀티플 ── */
.T2-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  padding: 4px 2px;
}
.T2-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-top: 3px solid var(--c, var(--border-dark));
  border-radius: 12px;
  padding: 14px 16px 10px;
  display: flex; flex-direction: column; gap: 4px;
  min-height: 180px; position: relative;
}
.T2-card .row1 {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-display); font-size: 14px; font-weight: 700; letter-spacing: -0.2px;
}
.T2-card .row1 .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.T2-card .row1 .pct {
  margin-left: auto; font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 4px;
  background: var(--bg-base); color: var(--text-muted); letter-spacing: 0.5px;
}
.T2-card.discounted .row1 .pct { background: var(--accent-light); color: var(--accent-ink); }
.T2-card .row2 { display: flex; align-items: baseline; gap: 6px; font-family: var(--font-mono); }
.T2-card .row2 .now { font-size: 18px; font-weight: 700; letter-spacing: -0.3px; color: var(--text-main); font-family: var(--font-display); }
.T2-card.discounted .row2 .now { color: var(--accent); }
.T2-card .row2 .reg { font-size: 10px; color: var(--text-faint); text-decoration: line-through; }
.T2-chart { position: relative; flex: 1; min-height: 90px; margin-top: 4px; }
.T2-chart canvas { width: 100%; height: 100%; }

/* ── T3 히트맵 ── */
.T3-wrap {
  flex: 1; min-height: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  display: flex; flex-direction: column; overflow: hidden;
}
.T3-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 14px 20px 10px;
  border-bottom: 1px solid var(--border-light);
}
.T3-head h4 { font-family: var(--font-display); font-size: 16px; font-weight: 700; letter-spacing: -0.3px; }
.T3-table { flex: 1; min-height: 0; overflow: auto; }
.T3-table::-webkit-scrollbar { height: 6px; width: 6px; }
.T3-table::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: 3px; }
.T3-grid {
  display: grid;
  grid-template-columns: 140px repeat(var(--ndays), 18px);
  gap: 1px; padding: 8px; min-width: max-content;
}
.T3-cell {
  height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 600;
  border-radius: 3px; position: relative;
}
.T3-cell.head-x { background: transparent; color: var(--text-faint); font-size: 9px; letter-spacing: 0.3px; text-transform: uppercase; }
.T3-cell.head-x.weekend { color: var(--weekend); }
.T3-cell.head-x.today { color: var(--accent-ink); font-weight: 800; }
.T3-chrow .ch-lbl {
  background: var(--bg-panel);
  display: flex; align-items: center; gap: 8px;
  padding: 0 12px; font-size: 12px; font-weight: 700;
  font-family: var(--font-display); letter-spacing: -0.2px;
  color: var(--text-main); border-radius: 4px;
  height: 28px; position: sticky; left: 0; z-index: 2;
}
.T3-chrow .ch-lbl .swatch { width: 6px; height: 18px; border-radius: 2px; background: var(--c); }
.T3-cell.heat { background: var(--heat-bg, var(--bg-base)); color: var(--heat-fg, var(--text-muted)); border-radius: 3px; }
.T3-cell.heat.today { box-shadow: inset 0 0 0 1.5px var(--accent); }
.T3-cell.heat.null { background: repeating-linear-gradient(45deg, transparent 0, transparent 2px, rgba(0,0,0,0.04) 2px, rgba(0,0,0,0.04) 4px); color: var(--text-faint); }
