
@layer legacy {
/* ── 실적노트 첫 화면(2026-10-13 시안): 카드 하나에 숫자 하나 + 작은 그림 하나,
   누르면 그 카드의 페이지. 청록은 쓰지 않는다(2026-10-25). ── */

.view-stats .stats-home[hidden], .view-stats .stats-page[hidden], .view-stats .stats-tiles[hidden], .view-stats .stats-start[hidden] { display: none; }
.view-stats .stats-home, .view-stats .stats-page, .view-stats .stats-tiles { display: grid; gap: 12px; min-width: 0; }

/* 카드 */
.stats-tile {
  display: grid; gap: 4px; width: 100%; min-width: 0; padding: 16px 16px 16px; border: 0;
  border-radius: var(--r-lg); background: var(--panel); box-shadow: var(--shadow-card);
  color: var(--text); text-align: left; font: inherit; cursor: pointer;
  transition: transform var(--spring-quick-ms) var(--spring-quick);
}
.stats-tile:active { transform: scale(.97); }
.stats-tile:focus-visible, .stats-back:focus-visible, .stats-measure-cta:focus-visible { outline: 3px solid color-mix(in srgb, var(--gold) 40%, transparent); outline-offset: 2px; }
.stats-tile-head { display: flex; align-items: center; gap: 6px; color: var(--gold); font-size: var(--fs-body-l); font-weight: 600; }
.stats-tile-head > span { flex: 1; min-width: 0; }
.stats-tile-icon { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.stats-tile-chev { width: 8px; height: 8px; margin-right: 4px; border-top: 2px solid var(--line-strong); border-right: 2px solid var(--line-strong); transform: rotate(45deg); }
.stats-tile-value { display: block; margin-top: 8px; color: var(--text); font-size: var(--fs-display-m); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stats-tile-value .stats-unit, .stats-page-title .stats-unit { margin-left: 4px; color: var(--muted); font-size: var(--fs-body-l); font-weight: 600; letter-spacing: 0; }
.stats-tile-sub { display: block; color: var(--muted); font-size: var(--fs-body); font-weight: 500; line-height: 1.45; }
.stats-tile-track { position: relative; display: block; height: 8px; margin-top: 12px; border-radius: var(--r-xs); background: var(--panel2); overflow: hidden; }
.stats-tile-track[hidden] { display: none; }
.stats-tile-track > i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: var(--r-xs); transition: width var(--spring-snappy-ms) var(--spring-snappy); }
.stats-tile-track > .is-projected { background: color-mix(in srgb, var(--gold) 22%, transparent); }
.stats-tile-track > .is-now { background: var(--gold); }
/* 이번 정산 (2026-10-16 시안 C): 정산 예상은 매출노트 정산 카드처럼 큰 금액 하나, 그 아래 세 판단은 한 카드 안의 문장 줄. */
.stats-forecast { padding: 20px 18px 18px; border: 1px solid var(--line); background: linear-gradient(180deg, color-mix(in srgb, #FFFFFF 4%, var(--panel)) 0%, var(--panel) 42%); box-shadow: var(--shadow-summary); }
html:not([data-theme="dark"]) .stats-forecast { border-color: var(--summary-border); background: linear-gradient(180deg, var(--panel) 0%, color-mix(in srgb, var(--panel) 75%, var(--panel2)) 100%); }
.stats-forecast-head { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: var(--fs-label); font-weight: 500; line-height: 20px; }
/* The period reads like the 매출노트 card and the header (9/26 - 10/25); the code face is for 구역코드 (2026-10-23). */
.stats-forecast-period { white-space: nowrap; font-variant-numeric: tabular-nums; }
.stats-forecast .stats-tile-value { margin-top: 4px; color: var(--gold); font-family: var(--font-amount); font-size: var(--fs-hero); line-height: 1.05; }
.stats-forecast .stats-tile-track { height: 6px; margin: 14px 0 6px; border-radius: var(--r-full); background: var(--panel3); }
.stats-forecast .stats-tile-track > i { border-radius: var(--r-full); }
.stats-forecast .stats-tile-sub { font-size: var(--fs-label); }
.stats-insights { display: grid; padding: 4px 18px; border-radius: var(--r-lg); background: var(--panel); box-shadow: var(--shadow-card); }
.stats-insight { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; min-height: 64px; margin: 0; padding: 12px 0; border: 0; background: transparent; color: var(--text); text-align: left; font: inherit; cursor: pointer; transition: opacity var(--spring-quick-ms) var(--spring-quick); }
.stats-insight + .stats-insight { box-shadow: inset 0 1px 0 var(--line); }
.stats-insight:active { opacity: .6; }
.stats-insight:disabled { cursor: default; opacity: 1; }
.stats-insight:disabled .stats-tile-chev { visibility: hidden; }
.stats-insight:focus-visible { outline: 3px solid color-mix(in srgb, var(--gold) 40%, transparent); outline-offset: 2px; border-radius: var(--r-sm); }
.stats-insight-copy { display: grid; flex: 1; gap: 2px; min-width: 0; }
.stats-insight-line { font-size: var(--fs-title); font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.stats-insight-line b { font-family: var(--font-numeric); font-weight: 700; font-variant-numeric: tabular-nums; }
.stats-insight-line b[data-tone="down"] { color: var(--red); }
.stats-insight-line b[data-tone="up"] { color: var(--green); }
.stats-insight .stats-tile-sub { font-size: var(--fs-caption); }
@keyframes stats-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* 기록 3일 미만 */
.stats-start { display: grid; justify-items: center; gap: 6px; padding: 28px 18px 24px; border-radius: var(--r-lg); background: var(--panel); box-shadow: var(--shadow-card); text-align: center; }
.stats-start-art { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 6px; border-radius: var(--r-lg); background: color-mix(in srgb, var(--gold) 12%, transparent); color: var(--gold); }
.stats-start-art .stats-tile-icon { width: 28px; height: 28px; stroke-width: 1.9; }
.stats-start h2 { margin: 0; color: var(--text); font-size: var(--fs-title-l); font-weight: 700; letter-spacing: -.02em; }
.stats-start p { margin: 0; color: var(--muted); font-size: var(--fs-body-l); line-height: 1.55; }
.stats-start-dots { display: flex; gap: 6px; margin-top: 8px; }
.stats-start-dots i { width: 28px; height: 6px; border-radius: var(--r-xs); background: var(--panel2); transition: background-color .3s; }
.stats-start-dots i.is-on { background: var(--gold); }
.stats-start small { color: var(--muted); font-size: var(--fs-body); }

/* 배송노트로 보는 실적 */
.stats-measure { display: grid; gap: 10px; min-width: 0; margin-top: 18px; }
.stats-measure-pill { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 13px; background: var(--primary-bg); color: var(--gold); font-size: var(--fs-label); font-weight: 600; }
.stats-measure-pill[hidden], .stats-measure-promo[hidden], .stats-measure-preview[hidden] { display: none; }
.stats-measure-promo { position: relative; display: grid; gap: 4px; padding: 18px 16px 16px; border-radius: var(--r-lg); background: var(--panel); box-shadow: var(--shadow-card); overflow: hidden; }
.stats-measure-promo::before { content: ""; position: absolute; right: -60px; top: -80px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, var(--primary-bg) 0%, transparent 70%); pointer-events: none; }
.stats-measure-promo-row { position: relative; display: flex; align-items: center; gap: 12px; }
.stats-measure-promo-icon { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: var(--r-md); background: linear-gradient(160deg, var(--gold2), var(--gold)); color: var(--gold-ink); }
.stats-measure-promo-icon .stats-tile-icon { width: 24px; height: 24px; stroke-width: 2; }
.stats-measure-promo strong { display: block; color: var(--text); font-size: var(--fs-title-m); font-weight: 700; letter-spacing: -.02em; }
.stats-measure-promo small { display: block; margin-top: 4px; color: var(--muted); font-size: var(--fs-body); line-height: 1.45; }
.stats-measure-preview { width: 100%; margin-top: 10px; border-radius: var(--r-md); }
.stats-measure-cta { position: relative; min-height: 50px; margin-top: 14px; border: 0; border-radius: var(--r-md); background: var(--gold); color: var(--gold-ink); font: 600 16px/1.2 var(--font-ui, inherit); cursor: pointer; }
.stats-measure-cta:active { filter: brightness(.94); }
.stats-measure-fine { position: relative; display: block; margin-top: 6px; color: var(--muted); font-size: var(--fs-label); text-align: center; }

/* 페이지 머리: ‹ 실적노트, 작은 머리말, 큰 숫자, 한 줄 */
.stats-page-head { display: grid; gap: 2px; margin: 0 2px 6px; }
.stats-back { justify-self: start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: -8px 0 4px -6px; padding: 0 6px; border: 0; background: transparent; color: var(--gold); font: 500 var(--fs-title-m)/1 var(--font-ui, inherit); cursor: pointer; }
.stats-back::before { content: ""; width: 9px; height: 9px; border-left: 2.4px solid currentColor; border-bottom: 2.4px solid currentColor; transform: rotate(45deg); }
.stats-page-eyebrow { color: var(--muted); font-size: var(--fs-body); font-weight: 600; }
.stats-page-title { margin: 0; color: var(--text); font-size: var(--fs-display-l); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; outline: none; }
.stats-page-sub { margin: 2px 0 0; color: var(--muted); font-size: var(--fs-body); font-weight: 500; line-height: 1.5; }
.stats-page-sub:empty { display: none; }

/* 등급 배지(2026-10-22 시안): 배지 + 4단 사다리 + 다음 등급까지 한 줄. 강조색은 --gold 하나 */
.stats-grade { display: grid; gap: 14px; min-width: 0; }
.stats-grade-head { display: flex; align-items: center; gap: 14px; }
.stats-grade-title { display: grid; gap: 2px; min-width: 0; }
.stats-grade-badge { color: var(--text); font-size: var(--fs-headline); font-weight: 700; letter-spacing: -.025em; line-height: 1.15; }
.stats-grade-note { color: var(--muted); font-size: var(--fs-body); font-weight: 500; font-variant-numeric: tabular-nums; }
.stats-grade-note b { font-family: var(--font-numeric); font-weight: 600; }
.stats-grade-ladder { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding-top: 14px; box-shadow: inset 0 1px 0 var(--line); }
.stats-grade-ladder > span { display: grid; justify-items: center; gap: 6px; color: var(--muted); font-size: var(--fs-caption); font-weight: 500; }
.stats-grade-ladder > .is-now { color: var(--gold); font-weight: 700; }
.stats-grade-next { margin: 0; color: var(--text); font-size: var(--fs-body); font-weight: 500; line-height: 1.45; font-variant-numeric: tabular-nums; }
.stats-grade-next b { font-family: var(--font-numeric); font-weight: 700; }
.stats-grade-next small { margin-left: 2px; color: var(--muted); font-size: var(--fs-label); font-weight: 500; }
/* 엠블럼(메달 색은 --grade-* 토큰, DESIGN-RULES 1절 예외 6) */
.stats-grade-emblem { display: block; flex: none; overflow: visible; }
.stats-grade-shield { stroke-width: 2.5; stroke-linejoin: round; }
.stats-grade-marks path { fill: none; stroke: var(--grade-ink); stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; }
.stats-grade-emblem.is-g0 .stats-grade-shield { fill: var(--grade-bronze); stroke: var(--grade-bronze-edge); }
.stats-grade-emblem.is-g1 .stats-grade-shield { fill: var(--grade-silver); stroke: var(--grade-silver-edge); }
.stats-grade-emblem.is-g2 .stats-grade-shield { fill: var(--grade-gold); stroke: var(--grade-gold-edge); }
.stats-grade-emblem.is-g3 .stats-grade-shield { fill: var(--grade-veteran); stroke: var(--grade-gold); }
.stats-grade-emblem.is-g3 .stats-grade-marks path, .stats-grade-laurel path { stroke: var(--grade-gold); }
.stats-grade-laurel path { fill: none; stroke-width: 2.2; stroke-linecap: round; }
.stats-grade-inner { fill: none; stroke: var(--grade-gold); stroke-width: 1.5; opacity: .6; }
.stats-grade-star { fill: var(--grade-gold); }
.stats-grade-emblem.is-off { filter: grayscale(1); opacity: .3; }

/* 배송노트 페이지 안의 막대·줄 */
.stats-measure-section-title { margin: 0; color: var(--muted); font-size: var(--fs-body-l); font-weight: 600; }
.stats-measure-bars { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; align-items: end; height: 170px; }
.stats-measure-bar { display: grid; justify-items: center; align-content: end; gap: 6px; height: 100%; }
.stats-measure-bar > i { display: block; width: 100%; border-radius: 7px; background: var(--line-strong); transform-origin: bottom; animation: stats-grow var(--spring-snappy-ms) var(--spring-snappy) both; }
.stats-measure-bar.is-best > i { background: var(--gold); }
.stats-measure-bar-value { color: var(--muted); font-size: var(--fs-label); font-weight: 500; font-variant-numeric: tabular-nums; }
.stats-measure-bar.is-best .stats-measure-bar-value { color: var(--gold); font-weight: 700; }
.stats-measure-bar-label { color: var(--muted); font-size: var(--fs-caption); white-space: nowrap; font-variant-numeric: tabular-nums; }
.stats-measure-bar:nth-child(2) > i { animation-delay: .05s; } .stats-measure-bar:nth-child(3) > i { animation-delay: .1s; }
.stats-measure-bar:nth-child(4) > i { animation-delay: .15s; } .stats-measure-bar:nth-child(5) > i { animation-delay: .2s; }
.stats-measure-bar:nth-child(n+6) > i { animation-delay: .25s; }
@keyframes stats-grow { from { transform: scaleY(0); } to { transform: none; } }
.stats-measure-rows { display: grid; margin: 4px -4px 0; }
.stats-measure-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; min-height: 52px; padding: 8px 4px; }
.stats-measure-row + .stats-measure-row { box-shadow: inset 0 1px 0 var(--line); }
.stats-measure-row > span { display: grid; gap: 2px; min-width: 0; }
.stats-measure-row b { color: var(--text); font-size: var(--fs-title); font-weight: 600; }
.stats-measure-row small { color: var(--muted); font-size: var(--fs-label); }
.stats-measure-row strong { color: var(--text); font-size: var(--fs-title-m); font-weight: 600; font-variant-numeric: tabular-nums; }
.stats-measure-row.is-best strong { color: var(--gold); font-weight: 700; }
.stats-measure-code { font-family: var(--font-code); font-weight: 700; letter-spacing: .01em; }
.stats-measure-track { grid-column: 1 / -1; position: relative; display: block; height: 8px; border-radius: var(--r-xs); background: var(--panel2); overflow: hidden; }
.stats-measure-track > i { position: absolute; left: 0; top: 0; bottom: 0; width: var(--bar, 0%); border-radius: var(--r-xs); background: var(--line-strong); transform-origin: left; animation: stats-grow-x var(--spring-snappy-ms) var(--spring-snappy) both; }
.stats-measure-row.is-best .stats-measure-track > i { background: var(--gold); }
@keyframes stats-grow-x { from { transform: scaleX(0); } to { transform: none; } }
.stats-measure-insight { margin: 4px 0 0; padding: 12px 14px; border-radius: var(--r-md); background: var(--primary-bg); color: var(--text); font-size: var(--fs-body-l); line-height: 1.5; }

/* 요일별: 공휴일 칸 */
.view-stats .wd-bars { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.view-stats .wd-col.is-holiday { padding-left: 4px; box-shadow: inset 1px 0 0 var(--line); }
.view-stats .wd-col.is-holiday .wd-label { color: var(--red); font-size: var(--fs-caption); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  .stats-tile, .stats-insight, .stats-tile-track > i { transition: none; }
  .stats-measure-bar > i, .stats-measure-track > i { animation: none; }
}



/* 첫 화면(2026-10-15): 하이라이트 → 이번 정산 → 추이 → 같은 구역. 최근 업무·지난 업무는 배송노트 탭으로 옮김 */
.view-stats .stats-section-head { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 14px 2px -2px; }
.view-stats .stats-section-head h2 { flex: 1; min-width: 0; margin: 0; color: var(--text); font-size: var(--fs-title-l); font-weight: 700; letter-spacing: -.025em; }
.stats-section-link { min-height: 36px; padding: 0 2px; border: 0; background: transparent; color: var(--gold); font: 500 var(--fs-body-l)/1 var(--font-ui, inherit); cursor: pointer; }
.stats-section-link:focus-visible, .stats-day-row:focus-visible, .stats-zone-row.is-link:focus-visible { outline: 3px solid color-mix(in srgb, var(--gold) 40%, transparent); outline-offset: 2px; }
.stats-trend-section, .stats-zone-section { display: grid; gap: 10px; min-width: 0; }
.stats-trend-section > .stats-section-head, .stats-zone-section > .stats-section-head { margin-bottom: 0; }
.stats-trend-section[hidden], .stats-zone-section[hidden], .stats-measure[hidden] { display: none; }

.stats-highlights { display: grid; padding: 2px 18px; border-radius: var(--r-lg); background: var(--panel); box-shadow: var(--shadow-card); }
.stats-highlights[hidden] { display: none; }
.stats-highlight { display: grid; grid-template-columns: 8px minmax(0, 1fr); align-items: start; gap: 12px; margin: 0; padding: 14px 0; }
.stats-highlight + .stats-highlight { box-shadow: inset 0 1px 0 var(--line); }
.stats-highlight > i { width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--line-strong); }
.stats-highlight:first-child > i { background: var(--gold); }
.stats-highlight b { display: block; color: var(--text); font-size: var(--fs-title); font-weight: 600; line-height: 1.45; }
.stats-highlight small { display: block; margin-top: 2px; color: var(--muted); font-size: var(--fs-label); line-height: 1.4; }

.stats-day-grid span { display: block; color: var(--muted); font-size: var(--fs-label); }
.stats-day-grid b small { margin-left: 2px; color: var(--muted); font-family: var(--font-ui); font-size: var(--fs-body); font-weight: 600; letter-spacing: 0; }
.stats-day-line { color: var(--muted); font-size: var(--fs-body); line-height: 1.45; }
.stats-day-line b { color: var(--text); font-weight: 600; }
.stats-day-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.stats-day-grid b { display: block; margin-top: 2px; color: var(--text); font-family: var(--font-numeric); font-size: var(--fs-title-xl); font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stats-day-grid b.is-code { font-family: var(--font-code); font-size: var(--fs-title); letter-spacing: .01em; }

/* 15분 배송 흐름: 칸마다 기록된 물량. 빗금 = 기록 없음(배송 없음이 아님), 바닥선 = 기록된 0건 */
.stats-flow-bars { display: flex; align-items: flex-end; gap: 2px; height: 120px; border-bottom: 1px solid var(--line); }
.stats-flow-bars > i { flex: 1; min-width: 0; height: var(--h); border-radius: 2px 2px 0 0; background: color-mix(in srgb, var(--text) 22%, transparent); }
.stats-flow-bars > i.is-peak { background: var(--gold); }
.stats-flow-bars > i.is-zero { height: 1px; background: var(--line-strong); }
.stats-flow-bars > i.is-gap { height: 100%; border-radius: 0; background: repeating-linear-gradient(135deg, transparent 0 3px, color-mix(in srgb, var(--muted) 28%, transparent) 3px 4px); }
.stats-flow { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 4px; }
.stats-flow-y { display: grid; align-content: space-between; height: 120px; color: var(--muted); font-size: var(--fs-caption); text-align: right; font-variant-numeric: tabular-nums; }
.stats-flow-x { grid-column: 2; display: grid; grid-template-columns: repeat(var(--slots), minmax(0, 1fr)); column-gap: 2px; color: var(--muted); font-size: var(--fs-caption); font-variant-numeric: tabular-nums; }
.stats-flow-x > span { grid-row: 1; justify-self: center; white-space: nowrap; }
.stats-flow-x > .is-start { justify-self: start; }
.stats-flow-x > .is-end { justify-self: end; }
.stats-flow-ends { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.stats-flow-ends > div:last-child { text-align: right; }
.stats-flow-ends span { display: block; color: var(--muted); font-size: var(--fs-label); }
.stats-flow-ends b { color: var(--text); font-family: var(--font-code); font-size: var(--fs-body); font-weight: 700; }

/* 추이·같은 구역: 카드 하나에 줄 몇 개 */
.stats-plain-card { display: grid; padding: 2px 18px; border-radius: var(--r-lg); background: var(--panel); box-shadow: var(--shadow-card); min-width: 0; }
.stats-trend-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 0; }
.stats-trend-row + .stats-trend-row, .stats-zone-row + .stats-zone-row { box-shadow: inset 0 1px 0 var(--line); }
.stats-trend-arrow { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--panel2); color: var(--text); }
.stats-trend-arrow .stats-tile-icon { width: 16px; height: 16px; }
.stats-trend-row b, .stats-zone-row b { display: block; color: var(--text); font-size: var(--fs-body-l); font-weight: 600; }
.stats-trend-row small, .stats-zone-row small { display: block; color: var(--muted); font-size: var(--fs-label); line-height: 1.4; }
.stats-trend-row strong, .stats-zone-row strong { color: var(--text); font-family: var(--font-numeric); font-size: var(--fs-title-m); font-weight: 700; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stats-zone-row strong small { display: block; color: var(--muted); font-family: var(--font-ui); font-size: var(--fs-label); font-weight: 500; }
.stats-zone-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 12px; padding: 12px 0; }
.stats-zone-row b { font-family: var(--font-code); letter-spacing: .01em; overflow-wrap: anywhere; }
/* 측정된 업무 하루가 있는 구역 줄은 그 구역의 최근 하루 상세를 연다 */
.stats-zone-row.is-link { grid-template-columns: minmax(0, 1fr) auto 12px; }
.stats-zone-chevron { grid-row: 1; grid-column: 3; color: var(--muted); font-size: var(--fs-title-l); line-height: 1; }
.stats-zone-row.is-link { width: 100%; border: 0; border-radius: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }

/* 하루 상세·지난 업무 */
.view-stats .stats-page-cards { display: grid; gap: 12px; min-width: 0; }
.view-stats .stats-page-cards:empty { display: none; }
.stats-measure-note { margin: 0 2px; color: var(--muted); font-size: var(--fs-label); line-height: 1.5; }
.stats-measure-row.is-off b, .stats-measure-row.is-off strong { color: var(--muted); }
.stats-day-row { width: 100%; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }

/* 배송노트 묶음(2026-10-22 시안 0-A): 하루 리듬 미니 지도 + 나의 배송 기록 + 비교. 강조색은 --gold 하나 */
.stats-delivery-section { display: grid; gap: 10px; min-width: 0; }
.stats-delivery-section[hidden], .stats-delivery-card[hidden], .stats-milestone-section[hidden] { display: none; }
.stats-delivery-section > .stats-section-head { margin-bottom: 0; }
.stats-delivery-section .stats-measure { margin-top: 0; }
.stats-delivery-card { display: grid; min-width: 0; padding: 0 18px; border-radius: var(--r-lg); background: var(--panel); box-shadow: var(--shadow-card); }
.stats-rhythm-mini { display: grid; gap: 10px; width: 100%; min-width: 0; margin: 0; padding: 16px 0 14px; border: 0; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: opacity var(--spring-quick-ms) var(--spring-quick); }
.stats-rhythm-mini-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stats-rhythm-mini-head b { font-size: var(--fs-title); font-weight: 600; }
.stats-rhythm-mini-head > span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: var(--fs-label); font-weight: 500; }
.stats-rhythm-line { color: var(--muted); font-size: var(--fs-body); font-weight: 500; line-height: 1.45; }
.stats-delivery-row { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 56px; margin: 0; padding: 10px 0; border: 0; background: transparent; box-shadow: inset 0 1px 0 var(--line); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: opacity var(--spring-quick-ms) var(--spring-quick); }
.stats-delivery-row > span { flex: 1; min-width: 0; font-size: var(--fs-title); font-weight: 600; }
.stats-delivery-row strong { font-family: var(--font-numeric); font-size: var(--fs-title-m); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stats-delivery-row strong small, .stats-share-card b small, .stats-share-hero strong small { margin-left: 2px; color: var(--muted); font-family: var(--font-ui); font-size: var(--fs-label); font-weight: 500; letter-spacing: 0; }
.stats-delivery-row.is-soon { cursor: default; }
.stats-delivery-row.is-soon small { color: var(--muted); font-size: var(--fs-label); font-weight: 500; }
:is(.stats-rhythm-mini, .stats-delivery-row:not(.is-soon), button.stats-rhythm-row):active { opacity: .6; }
:is(.stats-rhythm-mini, .stats-delivery-row, .stats-rhythm-row):focus-visible { outline: 3px solid color-mix(in srgb, var(--gold) 40%, transparent); outline-offset: 2px; border-radius: var(--r-sm); }

/* 하루 리듬 히트맵: 날짜 줄마다 15분 칸. 농도는 내 바쁜 칸 기준 다섯 단계, 회색은 상차·대기(추정) */
.stats-rhythm-grid { display: grid; gap: 2px; min-width: 0; }
.stats-rhythm-row, .stats-rhythm-axis { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 6px; min-width: 0; }
button.stats-rhythm-row { width: 100%; margin: 0; padding: 2px 0; border: 0; border-radius: var(--r-xs); background: transparent; color: inherit; font: inherit; cursor: pointer; transition: opacity var(--spring-quick-ms) var(--spring-quick); }
.stats-rhythm-label { color: var(--muted); font-family: var(--font-code); font-size: var(--fs-caption); font-weight: 500; letter-spacing: .01em; text-align: left; white-space: nowrap; }
.stats-rhythm-row.is-latest .stats-rhythm-label { color: var(--text); font-weight: 700; }
.stats-rhythm-label.is-sat { color: var(--blue); }
.stats-rhythm-label.is-sun { color: var(--red); }
:is(.stats-rhythm-cells, .stats-share-strip) { display: grid; grid-template-columns: repeat(var(--slots), minmax(0, 1fr)); gap: 1px; min-width: 0; }
.stats-rhythm-cells > i { display: block; height: 14px; border-radius: 2px; }
.stats-rhythm-grid.is-mini .stats-rhythm-cells > i { height: 12px; }
:is(.stats-rhythm-cells, .stats-share-strip) > :is(.is-work, .is-lead, .is-tail) { background: var(--panel3); }
:is(.stats-rhythm-cells, .stats-share-strip, .stats-rhythm-legend) .is-idle { background: color-mix(in srgb, var(--muted) 62%, var(--panel)); }
:is(.stats-rhythm-cells, .stats-share-strip, .stats-rhythm-legend) [data-level="1"] { background: color-mix(in srgb, var(--gold) 22%, var(--panel2)); }
:is(.stats-rhythm-cells, .stats-share-strip, .stats-rhythm-legend) [data-level="2"] { background: color-mix(in srgb, var(--gold) 36%, var(--panel2)); }
:is(.stats-rhythm-cells, .stats-share-strip, .stats-rhythm-legend) [data-level="3"] { background: color-mix(in srgb, var(--gold) 60%, var(--panel2)); }
:is(.stats-rhythm-cells, .stats-share-strip, .stats-rhythm-legend) [data-level="4"] { background: color-mix(in srgb, var(--gold) 82%, var(--panel2)); }
:is(.stats-rhythm-cells, .stats-share-strip, .stats-rhythm-legend) [data-level="5"] { background: var(--gold); }
.stats-rhythm-axis .stats-rhythm-cells > span { grid-row: 1; color: var(--muted); font-family: var(--font-code); font-size: var(--fs-caption); line-height: 1; white-space: nowrap; }
.stats-rhythm-row.is-usual { margin-top: 6px; padding-top: 8px; box-shadow: inset 0 1px 0 var(--line); }
.stats-rhythm-row.is-usual .stats-rhythm-label { color: var(--text); font-family: var(--font-ui); font-weight: 700; }
.stats-rhythm-row.is-usual .stats-rhythm-cells > i { height: 18px; }
.stats-rhythm-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.stats-rhythm-head small { color: var(--muted); font-size: var(--fs-caption); }
.stats-rhythm-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: var(--fs-caption); }
.stats-rhythm-legend > span { display: inline-flex; align-items: center; gap: 4px; }
.stats-rhythm-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.stats-usual-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 0; }
.stats-usual-row + .stats-usual-row { box-shadow: inset 0 1px 0 var(--line); }
.stats-usual-row > span { color: var(--text); font-size: var(--fs-body-l); font-weight: 600; }
.stats-usual-row strong { color: var(--text); font-family: var(--font-numeric); font-size: var(--fs-title-m); font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.stats-usual-row strong small { display: block; color: var(--muted); font-family: var(--font-ui); font-size: var(--fs-caption); font-weight: 500; }

/* 페이지 머리의 기간 세그먼트(2주/4주, 이번 달/전체) */
.stats-page-subrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 2px; }
.stats-page-tabs { display: inline-flex; flex: none; }

/* 나의 배송 기록: 공유할 카드(가구와 시간만) */
.stats-share-card { display: grid; gap: 20px; min-width: 0; padding: 22px 20px 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); box-shadow: var(--shadow-card); }
.stats-share-brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.stats-share-brand b { flex: 1; min-width: 0; font-size: var(--fs-body); font-weight: 700; }
.stats-share-logo { display: grid; place-items: center; width: 26px; height: 26px; border-radius: var(--r-sm); background: var(--gold); color: var(--gold-ink); }
.stats-share-logo svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.stats-share-range { color: var(--muted); font-family: var(--font-code); font-size: var(--fs-caption); letter-spacing: .01em; white-space: nowrap; }
.stats-share-hero { display: grid; gap: 6px; }
.stats-share-hero > span { color: var(--muted); font-size: var(--fs-body); font-weight: 500; }
.stats-share-hero > span:first-child { font-size: var(--fs-body-l); font-weight: 600; }
.stats-share-hero strong { color: var(--gold); font-family: var(--font-amount); font-size: var(--fs-hero); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.stats-share-hero strong small { font-size: var(--fs-title-m); font-weight: 600; }
.stats-share-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stats-share-stats > div { display: grid; gap: 4px; padding: 12px 10px; border-radius: var(--r-md); background: var(--panel2); }
.stats-share-stats b { font-family: var(--font-numeric); font-size: var(--fs-display-s); font-weight: 700; letter-spacing: -.022em; font-variant-numeric: tabular-nums; }
.stats-share-stats span { color: var(--muted); font-size: var(--fs-caption); font-weight: 500; }
.stats-share-day { display: grid; gap: 6px; }
.stats-share-day > span:first-child { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: var(--fs-caption); font-weight: 600; }
.stats-share-strip > i { display: block; height: 22px; border-radius: 2px; }
.stats-share-best { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--primary-bg); }
.stats-share-best svg { flex: none; width: 22px; height: 22px; fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stats-share-best b { display: block; font-size: var(--fs-body); font-weight: 700; }
.stats-share-best small { display: block; margin-top: 2px; color: var(--muted); font-size: var(--fs-caption); }
.stats-share-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stats-milestone-section { display: grid; gap: 10px; }
.stats-milestone-section > .stats-section-head { margin-bottom: 0; }
.stats-milestone { padding: 18px; }
.stats-milestone-track { display: block; height: 8px; border-radius: var(--r-full); background: var(--panel3); overflow: hidden; }
.stats-milestone-track > i { display: block; width: 0; height: 100%; border-radius: var(--r-full); background: var(--gold); transition: width var(--spring-snappy-ms) var(--spring-snappy); }
.stats-milestone p { margin: 10px 0 0; color: var(--muted); font-size: var(--fs-body); line-height: 1.45; }
.stats-milestone-pct { color: var(--muted); font-family: var(--font-numeric); font-size: var(--fs-label); font-weight: 600; font-variant-numeric: tabular-nums; }
/* 다른 사용자와 비교: 지표 세그먼트 · 대상 칩 · 등급 배지 · 분포 막대(나만 강조색) · 참여 */
.stats-peers-value small { color: var(--muted); font-family: var(--font-ui); font-size: var(--fs-label); font-weight: 500; letter-spacing: 0; }
.stats-peers-pill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px 0 6px; border-radius: var(--r-full); background: var(--primary-bg); color: var(--gold); font-family: var(--font-ui); font-size: var(--fs-label); font-weight: 700; letter-spacing: 0; white-space: nowrap; }
.stats-peers-pill small { color: inherit; font-size: inherit; font-weight: 500; opacity: .8; }
.stats-peers-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.stats-peers-scopes { display: flex; flex-wrap: wrap; gap: 6px; }
.stats-peers-card { display: grid; gap: 14px; }
.stats-peers-mine { display: flex; align-items: baseline; gap: 6px; margin: 0; color: var(--muted); font-size: var(--fs-title); font-weight: 600; }
.stats-peers-mine strong { color: var(--text); font-family: var(--font-numeric); font-size: var(--fs-hero); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stats-peers-mine strong small { margin-left: 4px; color: var(--muted); font-family: var(--font-ui); font-size: var(--fs-body-l); font-weight: 600; letter-spacing: 0; }
.stats-peers-chart { display: flex; align-items: flex-end; gap: 3px; height: 120px; border-bottom: 1px solid var(--line); }
.stats-peers-chart > span { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; min-width: 0; height: 100%; }
.stats-peers-chart > span > i { display: block; width: 100%; height: var(--h); border-radius: 2px 2px 0 0; background: color-mix(in srgb, var(--text) 22%, transparent); }
.stats-peers-chart > .is-mine > i { background: var(--gold); }
.stats-peers-chart b { color: var(--gold); font-size: var(--fs-caption); font-weight: 700; white-space: nowrap; }
.stats-peers-axis { display: flex; justify-content: space-between; gap: 8px; margin-top: -8px; color: var(--muted); font-size: var(--fs-caption); font-variant-numeric: tabular-nums; }
.stats-peers-join { display: grid; gap: 12px; }
.stats-peers-join-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stats-peers-join-head > span { display: grid; gap: 2px; min-width: 0; }
.stats-peers-join-head b { font-size: var(--fs-title); font-weight: 600; }
.stats-peers-join-head small { color: var(--muted); font-size: var(--fs-label); }
.stats-peers-leave { flex: none; }
.stats-share-grades { display: grid; gap: 8px; }
.stats-share-grades > span:first-child { color: var(--muted); font-size: var(--fs-caption); font-weight: 600; }
.stats-share-grades > span:last-child { display: flex; flex-wrap: wrap; gap: 6px; }
.stats-share-grades .stats-peers-pill { background: var(--panel2); color: var(--text); }
@media (prefers-reduced-motion: reduce) {
  .stats-milestone-track > i, .stats-rhythm-mini, .stats-delivery-row, button.stats-rhythm-row { transition: none; }
}

/* ── 2026-11-04 동작 시안: 업무 하루 ‹ ›, 정산별 페이지, 날짜별 기록 ── */
.view-stats .stats-day-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 -2px; padding: 0 2px; }
.view-stats .stats-day-nav > span { flex: 1; min-width: 0; color: var(--muted); font-size: var(--fs-label); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.view-stats .stats-day-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.view-stats .stats-day-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 6px; }
.view-stats .stats-day-grid-4 b { font-size: var(--fs-title); }
/* 정산서와 맞춰 보기 (2026-11-22 보완 시안): the statement's counts under the settlement's own figures */
.view-stats .stats-settle-check { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--line); }
.view-stats .stats-settle-check-title { margin: 0; color: var(--text); font-size: var(--fs-body); font-weight: 700; line-height: 1.4; }
.view-stats .stats-settle-pick { width: 100%; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: filter var(--motion-press-ms); }
.view-stats .stats-settle-pick:active { filter: brightness(.96); }
.view-stats .stats-settle-pick.is-on strong { color: var(--gold); }
.view-stats .stats-settle-pick strong small { margin-left: 1px; color: var(--muted); font-family: var(--font-ui); font-size: var(--fs-label); font-weight: 500; }
.view-stats .stats-daylist-section .stats-settle-amount { margin: 2px 0 10px; }
.view-stats .stats-daylist { display: flex; flex-direction: column; margin-top: 10px; }
.view-stats .stats-daylist-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; margin: 0; padding: 6px 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; }
.view-stats button.stats-daylist-row { cursor: pointer; transition: filter var(--motion-press-ms); }
.view-stats button.stats-daylist-row:active { filter: brightness(.96); }
.view-stats .stats-daylist-row + .stats-daylist-row { box-shadow: inset 0 1px 0 var(--line); }
.view-stats .stats-daylist-row > span:first-child { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.view-stats .stats-daylist-row b { font-size: var(--fs-title); font-weight: 600; }
.view-stats .stats-daylist-row small { color: var(--muted); font-size: var(--fs-label); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.view-stats .stats-daylist-amount { display: flex; flex: none; flex-direction: column; align-items: flex-end; gap: 2px; }
.view-stats .stats-daylist-amount strong { font: 700 var(--fs-title) var(--font-numeric); font-variant-numeric: tabular-nums; }
.view-stats .stats-daylist-amount strong small { margin-left: 1px; color: var(--muted); font-family: var(--font-ui); font-size: var(--fs-label); font-weight: 500; }
.view-stats .stats-daylist-row.is-new { animation: stats-row-in var(--motion-step-ms) var(--motion-ease-out) both; }
@keyframes stats-row-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.view-stats .stats-daylist-more { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; margin-top: 8px; border: 0; border-radius: var(--r-md); background: var(--panel2); color: var(--text); font: 700 var(--fs-body-l) var(--font-ui); cursor: pointer; }
.view-stats .stats-daylist-more[hidden] { display: none; }
.view-stats .stats-daylist-more:active { background: var(--btn-fill-pressed, var(--panel3)); }
@media (prefers-reduced-motion: reduce) { .view-stats .stats-daylist-row.is-new { animation: none; } }
}
