/* ==========================================================================
   AILO Dashboard D15 — 카페노트 POS (카페 매장 운영)
   원형: 에스프레소 아이콘 레일 + 크래프트 페이퍼 카드 3단 그리드 / 타이포: Gowun Dodum 제목 + Nanum Pen Script 손글씨 메모 + Pretendard
   컬러: 크림 · 크라프트 바탕 + 커피 브라운, 히트맵은 브라운 단색 순차 램프
   ========================================================================== */
:root {
  --ailo-bg: #ece1cc;
  --ailo-fg: #2a1d14;
  --ailo-muted: #6b5644;
  --ailo-line: rgba(90, 60, 35, .16);
  --ailo-accent: #6b3f22;
  --ailo-header-h: 68px;

  --d15-paper: #fdf6e9;
  --d15-paper-2: #f6ecda;
  --d15-rail: #2a1a10;
  --d15-rail-2: #3d2717;
  --d15-rail-fg: #f1e3cc;
  --d15-rail-muted: #b8a185;
  --d15-caramel: #c8873a;
  --d15-crema: #f3dcb8;
  --d15-round: "Gowun Dodum", var(--ailo-font);
  --d15-pen: "Nanum Pen Script", cursive;
  --d15-rail-w: 96px;

  /* 차트 범주색 (validate_palette.js light/#fdf6e9 전 항목 통과) */
  --d15-s1: #a0582a;
  --d15-s2: #2a86b0;
  --d15-s3: #6f8a2a;
  --d15-s4: #b0507a;
  --d15-cmp: #bcab96;   /* 비교 시리즈(지난주) 비강조 */
  --d15-grid: #eadfcb;

  /* 히트맵 순차 램프 (브라운 단색, 밝음→어두움) */
  --d15-h0: #f5e9d8;
  --d15-h1: #ebd4b5;
  --d15-h2: #ddb68a;
  --d15-h3: #cc9664;
  --d15-h4: #b47444;
  --d15-h5: #8f552d;
  --d15-h6: #6a3a1c;

  --d15-good: #2e6b2a;
  --d15-good-bg: #e2eed6;
  --d15-warn: #865400;
  --d15-warn-bg: #f7e6c4;
  --d15-bad: #a83224;
  --d15-bad-bg: #f6d9d1;
}

body {
  background-color: var(--ailo-bg);
  background-image:
    radial-gradient(rgba(120, 80, 40, .07) 1px, transparent 1.2px),
    radial-gradient(rgba(255, 255, 255, .35) 1px, transparent 1.2px);
  background-size: 7px 7px, 11px 11px;
  background-position: 0 0, 3px 5px;
  font-size: 14.5px;
}

.app { display: flex; min-height: 100vh; }
.app__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ===== 아이콘 레일 ===== */
.rail {
  width: var(--d15-rail-w); flex: none; background: var(--d15-rail); color: var(--d15-rail-fg);
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; align-items: stretch;
  padding: 16px 10px; gap: 6px; z-index: 60;
  background-image: repeating-linear-gradient(90deg, rgba(255,255,255,.015) 0 2px, transparent 2px 5px);
}
.rail__logo { display: grid; place-items: center; padding: 4px 0 14px; border-bottom: 1px dashed rgba(241, 227, 204, .2); margin-bottom: 8px; }
.rail__cup {
  width: 50px; height: 50px; border-radius: 50%; background: var(--d15-crema); display: grid; place-items: center;
  box-shadow: inset 0 0 0 5px var(--d15-caramel), inset 0 0 0 9px var(--d15-crema);
  position: relative;
}
.rail__cup::after { content: ""; width: 16px; height: 9px; border-radius: 50%; border: 2.5px solid var(--d15-rail); border-color: var(--d15-rail) transparent transparent transparent; rotate: 180deg; position: absolute; top: 15px; }
.rail__logo span { font-family: var(--d15-round); font-size: 12px; margin-top: 6px; letter-spacing: -.02em; color: var(--d15-rail-fg); }
.rail__close { display: none; }
.rail__nav { display: flex; flex-direction: column; gap: 4px; flex: 1; overflow-y: auto; }
.rail__link {
  display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 4px; border-radius: 14px;
  font-size: 11.5px; font-weight: 600; color: var(--d15-rail-muted); text-align: center; line-height: 1.2;
  transition: background .2s, color .2s; position: relative;
}
.rail__link i { font-size: 18px; }
.rail__link:hover { background: var(--d15-rail-2); color: var(--d15-rail-fg); }
.rail__link.is-active { background: var(--d15-crema); color: var(--d15-rail); }
.rail__link.is-active::before { content: ""; position: absolute; left: -10px; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; background: var(--d15-caramel); }
.rail__dot { position: absolute; top: 6px; right: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--d15-caramel); border: 2px solid var(--d15-rail); }
.rail__foot { font-size: 11px; text-align: center; color: var(--d15-rail-muted); padding-top: 10px; border-top: 1px dashed rgba(241, 227, 204, .2); }
.rail__foot b { display: block; color: var(--d15-rail-fg); font-size: 13px; }

/* ===== 상단바 ===== */
.top {
  min-height: var(--ailo-header-h); display: flex; align-items: center; gap: 12px;
  padding: 12px clamp(16px, 2.6vw, 28px); position: sticky; top: 0; z-index: 40;
  background: rgba(236, 225, 204, .94); backdrop-filter: blur(8px);
  border-bottom: 2px dashed var(--ailo-line);
}
.ib {
  width: 42px; height: 42px; flex: none; border-radius: 50%; border: 1.5px solid var(--ailo-line); background: var(--d15-paper);
  display: inline-grid; place-items: center; color: var(--ailo-fg); position: relative; transition: border-color .2s, color .2s;
}
.ib:hover { border-color: var(--ailo-accent); color: var(--ailo-accent); }
.top__burger { display: none; }
.store { display: flex; flex-direction: column; min-width: 0; }
.store__crumb { font-size: 12px; color: var(--ailo-muted); white-space: nowrap; }
.store__crumb a:hover { color: var(--ailo-accent); text-decoration: underline; }
.store h1 { font-family: var(--d15-round); font-size: clamp(18px, 1.8vw, 22px); font-weight: 400; letter-spacing: -.03em; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.open-badge { font-family: var(--ailo-font); font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--d15-good-bg); color: var(--d15-good); display: inline-flex; align-items: center; gap: 5px; }
.open-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.top__search { margin-left: auto; position: relative; width: min(300px, 28vw); }
.top__search i { position: absolute; left: 15px; top: 50%; translate: 0 -50%; color: var(--ailo-muted); font-size: 13px; }
.top__search input { width: 100%; height: 42px; border-radius: 99px; border: 1.5px solid var(--ailo-line); background: var(--d15-paper); padding: 0 16px 0 40px; font-size: 14px; color: var(--ailo-fg); }
.top__search input:focus { outline: 2px solid var(--ailo-accent); outline-offset: 1px; }
.nbadge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--d15-s1); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--ailo-bg); }
.dd { position: relative; }
.dd__panel {
  position: absolute; right: 0; top: calc(100% + 12px); width: 330px; max-width: calc(100vw - 32px); display: none; z-index: 90;
  background: var(--d15-paper); border-radius: 6px; padding: 14px 14px 18px; box-shadow: 0 16px 34px rgba(50, 30, 15, .22);
  -webkit-mask: radial-gradient(circle 6px at 50% 100%, transparent 98%, #000) 0 0 / 18px 100% repeat-x; mask: radial-gradient(circle 6px at 50% 100%, transparent 98%, #000) 0 0 / 18px 100% repeat-x;
}
.dd__panel.is-open { display: block; }
.dd__panel h2 { font-family: var(--d15-round); font-size: 16px; font-weight: 400; padding-bottom: 10px; border-bottom: 1.5px dashed var(--ailo-line); margin-bottom: 6px; display: flex; justify-content: space-between; }
.dd__panel h2 small { font-family: var(--ailo-font); font-size: 12px; color: var(--ailo-muted); }
.dd__panel li a { display: block; padding: 9px 4px; border-bottom: 1px dotted var(--ailo-line); font-size: 13px; line-height: 1.45; }
.dd__panel li a:hover { background: var(--d15-paper-2); }
.dd__panel li time { display: block; font-size: 11.5px; color: var(--ailo-muted); }
.who { display: flex; align-items: center; gap: 10px; }
.who__av { width: 42px; height: 42px; border-radius: 50%; background: var(--d15-caramel); color: var(--d15-rail); font-weight: 800; display: grid; place-items: center; font-size: 15px; border: 2px solid var(--d15-paper); box-shadow: 0 0 0 1.5px var(--ailo-line); }
.who__t { line-height: 1.25; white-space: nowrap; }
.who__t b { display: block; font-size: 14px; }
.who__t span { font-size: 12px; color: var(--ailo-muted); }

/* ===== 본문 ===== */
.content { padding: clamp(16px, 2.4vw, 28px); display: grid; gap: clamp(14px, 1.6vw, 20px); }
.filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pills { display: inline-flex; gap: 6px; }
.pills button {
  border: 1.5px solid var(--ailo-fg); background: transparent; color: var(--ailo-fg); border-radius: 99px;
  padding: 7px 18px; font-weight: 700; font-size: 13.5px; transition: background .2s, color .2s;
}
.pills button:hover { background: var(--d15-paper); }
.pills button[aria-pressed="true"] { background: var(--ailo-fg); color: var(--d15-paper); }
.filters__note { font-family: var(--d15-pen); font-size: 22px; color: var(--ailo-accent); line-height: 1; }
.filters__btn { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 99px; background: var(--ailo-accent); color: #fff; padding: 10px 18px; font-weight: 700; font-size: 13.5px; }
.filters__btn:hover { background: var(--d15-rail); }

.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 20px); }
.paper {
  background: var(--d15-paper); border-radius: 6px; padding: clamp(14px, 1.6vw, 20px); position: relative; min-width: 0;
  box-shadow: 0 1px 0 rgba(90, 60, 35, .12), 0 6px 16px -8px rgba(90, 60, 35, .35);
  background-image: linear-gradient(rgba(160, 110, 60, .035) 1px, transparent 1px);
  background-size: 100% 26px;
}
.paper__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.paper__head h2 { font-family: var(--d15-round); font-weight: 400; font-size: 18px; letter-spacing: -.03em; display: flex; align-items: center; gap: 8px; }
.paper__head h2 i { color: var(--d15-s1); font-size: 15px; }
.paper__head p { font-size: 12.5px; color: var(--ailo-muted); }
.paper__link { font-size: 12.5px; font-weight: 700; color: var(--ailo-accent); border-bottom: 1.5px solid currentColor; }
.paper__link:hover { color: var(--d15-s1); }
.tape::before {
  content: ""; position: absolute; top: -9px; left: 50%; width: 86px; height: 20px; translate: -50% 0; rotate: -3deg;
  background: rgba(214, 186, 140, .65); box-shadow: 0 1px 2px rgba(0,0,0,.08);
  -webkit-mask: linear-gradient(90deg, transparent 0 3px, #000 3px calc(100% - 3px), transparent 0); mask: linear-gradient(90deg, transparent 0 3px, #000 3px calc(100% - 3px), transparent 0);
}

.g-receipt { grid-column: span 4; }
.g-kpis { grid-column: span 5; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 20px); }
.g-stamp { grid-column: span 3; }
.g-heat { grid-column: span 8; }
.g-rank { grid-column: span 4; }
.g-line { grid-column: span 7; }
.g-feed { grid-column: span 5; }
.g-table { grid-column: span 8; }
.g-memo { grid-column: span 4; display: grid; gap: clamp(14px, 1.6vw, 20px); align-content: start; }

/* 영수증 (매출 히어로) */
.receipt {
  padding-bottom: 30px; background-image: none;
  -webkit-mask: radial-gradient(circle 7px at 50% 100%, transparent 98%, #000) 0 0 / 20px 100% repeat-x;
  mask: radial-gradient(circle 7px at 50% 100%, transparent 98%, #000) 0 0 / 20px 100% repeat-x;
}
.receipt__top { text-align: center; border-bottom: 1.5px dashed var(--ailo-line); padding-bottom: 12px; }
.receipt__top h2 { font-family: var(--d15-round); font-weight: 400; font-size: 17px; }
.receipt__top p { font-size: 12px; color: var(--ailo-muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.receipt__label { font-size: 13px; color: var(--ailo-muted); margin-top: 14px; }
.hero-num { font-size: clamp(38px, 3.8vw, 52px); font-weight: 800; letter-spacing: -.04em; line-height: 1.05; margin: 2px 0 6px; }
.hero-num small { font-size: 18px; font-weight: 700; margin-left: 2px; }
.receipt__rows { margin-top: 12px; border-top: 1.5px dashed var(--ailo-line); padding-top: 10px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.receipt__rows li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.receipt__rows li span:first-child { display: inline-flex; align-items: center; gap: 7px; }
.receipt__rows li i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.segbar { display: flex; gap: 2px; height: 28px; margin-top: 12px; }
.segbar span { border-radius: 4px; color: #fff; font-size: 11.5px; font-weight: 700; display: flex; align-items: center; padding-left: 7px; white-space: nowrap; overflow: visible; transition: flex-basis .4s var(--ailo-ease); min-width: 0; }
.segbar span.is-tight { font-size: 0; padding: 0; }

/* KPI */
.kpi { display: flex; flex-direction: column; gap: 4px; }
.kpi__label { font-size: 12.5px; color: var(--ailo-muted); font-weight: 600; display: flex; align-items: center; gap: 7px; }
.kpi__label i { width: 26px; height: 26px; border-radius: 50%; background: var(--d15-crema); color: var(--ailo-accent); display: grid; place-items: center; font-size: 12px; }
.kpi__val { font-size: clamp(22px, 2vw, 27px); font-weight: 800; letter-spacing: -.03em; line-height: 1.2; }
.kpi__val small { font-size: 13px; font-weight: 700; color: var(--ailo-muted); margin-left: 2px; }
.kpi__sub { font-size: 12px; color: var(--ailo-muted); border-top: 1px dashed var(--ailo-line); padding-top: 8px; margin-top: 4px; }
.kpi__foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 6px; margin-top: auto; padding-top: 8px; }
.delta { font-size: 12px; font-weight: 700; display: inline-flex; gap: 3px; align-items: center; flex-wrap: wrap; }
.delta.is-good { color: var(--d15-good); }
.delta.is-bad { color: var(--d15-bad); }
.delta em { font-style: normal; color: var(--ailo-muted); font-weight: 500; }
.spark { width: 76px; height: 28px; flex: none; }

/* 스탬프 카드 */
.stampcard { border-radius: 10px; background: var(--d15-rail); color: var(--d15-rail-fg); padding: 14px; position: relative; overflow: hidden; }
.stampcard::after { content: ""; position: absolute; right: -28px; bottom: -28px; width: 110px; height: 110px; border-radius: 50%; border: 14px solid rgba(200, 135, 58, .25); }
.stampcard__t { font-family: var(--d15-pen); font-size: 22px; line-height: 1; color: var(--d15-crema); }
.stampcard__who { font-size: 12px; color: var(--d15-rail-muted); margin: 2px 0 10px; }
.stamps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; position: relative; z-index: 1; }
.stamps li { aspect-ratio: 1; border-radius: 50%; border: 1.5px dashed rgba(241, 227, 204, .35); display: grid; place-items: center; font-size: 13px; }
.stamps li.is-on { border: 0; background: var(--d15-caramel); color: var(--d15-rail); rotate: -12deg; }
.stamps li.is-gift { border-color: var(--d15-crema); color: var(--d15-crema); }
.mstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 12px; text-align: center; }
.mstats li { background: var(--d15-paper-2); border-radius: 8px; padding: 8px 4px; font-size: 11.5px; color: var(--ailo-muted); }
.mstats b { display: block; font-size: 16px; color: var(--ailo-fg); }
.regulars { margin-top: 10px; font-size: 12.5px; }
.regulars li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dotted var(--ailo-line); gap: 8px; }
.regulars li span { color: var(--ailo-muted); }

/* 히트맵 */
.hm-wrap { overflow-x: auto; padding-bottom: 4px; }
.hm { border-collapse: separate; border-spacing: 3px; width: 100%; min-width: 640px; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.hm th { font-weight: 600; color: var(--ailo-muted); text-align: center; padding: 0 2px; white-space: nowrap; }
.hm tbody th { text-align: right; padding-right: 8px; width: 64px; }
.hm tbody tr.is-today th { color: var(--ailo-accent); font-weight: 800; }
.hm td { height: 30px; border-radius: 4px; background: var(--d15-h0); cursor: default; position: relative; transition: outline-color .15s; outline: 2px solid transparent; outline-offset: -1px; }
.hm td:hover, .hm td:focus-visible { outline-color: var(--ailo-fg); }
.hm td.is-future { background: repeating-linear-gradient(135deg, var(--d15-paper-2) 0 4px, var(--d15-grid) 4px 6px); }
.hm tbody tr.is-today td { box-shadow: inset 0 0 0 1.5px var(--ailo-accent); }
.hm-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: var(--ailo-muted); }
.hm-scale { display: flex; align-items: center; gap: 6px; }
.hm-scale ol { display: flex; gap: 2px; }
.hm-scale li { width: 22px; height: 10px; border-radius: 2px; }
.hm-peak b { color: var(--ailo-fg); }
.hm-tip {
  position: fixed; z-index: 200; pointer-events: none; background: var(--d15-rail); color: var(--d15-rail-fg);
  font-size: 12px; padding: 7px 10px; border-radius: 6px; line-height: 1.35; opacity: 0; transition: opacity .12s; white-space: nowrap;
}
.hm-tip b { display: block; font-size: 15px; color: #fff; }
.hm-tip.is-on { opacity: 1; }

/* 차트 */
.chart-box { position: relative; height: 280px; }
.chart-box--rank { height: 320px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ailo-fg); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 16px; height: 3px; border-radius: 2px; display: inline-block; }
.tv { margin-top: 8px; font-size: 12.5px; }
.tv summary { cursor: pointer; color: var(--ailo-muted); font-weight: 700; width: max-content; }
.tv summary:hover { color: var(--ailo-accent); }
.tv__wrap { overflow-x: auto; margin-top: 6px; max-height: 220px; overflow-y: auto; }
.tv table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tv th, .tv td { padding: 5px 8px; border-bottom: 1px dotted var(--ailo-line); text-align: right; white-space: nowrap; }
.tv th:first-child, .tv td:first-child { text-align: left; }

/* 주문 피드 */
.feed li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px dashed var(--ailo-line); }
.feed li:last-child { border-bottom: 0; }
.feed__no { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; font-weight: 700; background: var(--d15-paper-2); border: 1px solid var(--ailo-line); border-radius: 6px; padding: 3px 7px; }
.feed__body { font-size: 13px; line-height: 1.45; min-width: 0; }
.feed__body span { display: block; font-size: 12px; color: var(--ailo-muted); }
.feed__amt { text-align: right; font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.feed__amt span { display: block; font-size: 11.5px; color: var(--ailo-muted); font-weight: 500; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.chip--make { background: var(--d15-warn-bg); color: var(--d15-warn); }
.chip--ready { background: var(--d15-good-bg); color: var(--d15-good); }
.chip--done { background: var(--d15-paper-2); color: var(--ailo-muted); }

/* 테이블 */
.tsearch { position: relative; }
.tsearch i { position: absolute; left: 12px; top: 50%; translate: 0 -50%; font-size: 12px; color: var(--ailo-muted); }
.tsearch input { height: 36px; border-radius: 99px; border: 1.5px solid var(--ailo-line); background: var(--d15-paper-2); padding: 0 14px 0 32px; font-size: 13px; width: 210px; max-width: 100%; color: var(--ailo-fg); }
.tsearch input:focus { outline: 2px solid var(--ailo-accent); outline-offset: 1px; }
.twrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; min-width: 720px; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 700; color: var(--ailo-muted); padding: 9px 10px; border-top: 2px solid var(--ailo-fg); border-bottom: 1px solid var(--ailo-fg); white-space: nowrap; }
.tbl th button { border: 0; background: none; padding: 0; color: inherit; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.tbl th button i { font-size: 10px; opacity: .5; }
.tbl th button:hover { color: var(--ailo-fg); }
.tbl th[aria-sort="ascending"] button, .tbl th[aria-sort="descending"] button { color: var(--ailo-accent); }
.tbl th[aria-sort="ascending"] button i, .tbl th[aria-sort="descending"] button i { opacity: 1; }
.tbl td { padding: 11px 10px; border-bottom: 1px dashed var(--ailo-line); white-space: nowrap; }
.tbl tbody tr:hover td { background: rgba(243, 220, 184, .35); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .sub { display: block; font-size: 11.5px; color: var(--ailo-muted); }
.lvl { display: inline-block; width: 64px; height: 6px; border-radius: 99px; background: var(--d15-grid); vertical-align: middle; margin-right: 8px; overflow: hidden; }
.lvl i { display: block; height: 100%; border-radius: 99px; background: var(--d15-s1); }
.st { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; }
.st--ok { background: var(--d15-good-bg); color: var(--d15-good); }
.st--mid { background: var(--d15-paper-2); color: var(--ailo-muted); border: 1px solid var(--ailo-line); }
.st--order { background: var(--d15-warn-bg); color: var(--d15-warn); }
.st--out { background: var(--d15-bad-bg); color: var(--d15-bad); }
.tbl__empty { text-align: center; padding: 26px !important; color: var(--ailo-muted); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; font-size: 12.5px; color: var(--ailo-muted); }
.pager__btns { display: flex; gap: 4px; }
.pager__btns button { min-width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--ailo-line); background: transparent; font-weight: 700; font-size: 12.5px; }
.pager__btns button:hover:not(:disabled) { border-color: var(--ailo-accent); color: var(--ailo-accent); }
.pager__btns button[aria-current="page"] { background: var(--ailo-fg); border-color: var(--ailo-fg); color: var(--d15-paper); }
.pager__btns button:disabled { opacity: .35; cursor: default; }

/* 메모 · 근무 */
.memo {
  background: #fbeeb0; background-image: linear-gradient(rgba(140, 100, 20, .12) 1px, transparent 1px); background-size: 100% 30px;
  rotate: .8deg; padding-top: 22px;
}
.memo h2 { font-family: var(--d15-pen); font-size: 30px; font-weight: 400; line-height: 1; margin-bottom: 4px; }
.memo li { font-family: var(--d15-pen); font-size: 22px; line-height: 30px; color: #3a2a10; display: flex; gap: 8px; }
.memo li s { color: #8a7a5a; }
.memo li i { font-size: 13px; margin-top: 9px; color: var(--d15-s1); }
.crew li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dotted var(--ailo-line); font-size: 13px; }
.crew li:last-child { border-bottom: 0; }
.crew__av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12px; color: #fff; flex: none; }
.crew li > span:nth-child(2) { flex: 1; min-width: 0; }
.crew li em { font-style: normal; display: block; font-size: 11.5px; color: var(--ailo-muted); }
.crew__time { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--ailo-muted); }

.foot { padding: 16px clamp(16px, 2.6vw, 28px) 26px; font-size: 12px; color: var(--ailo-muted); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-top: 2px dashed var(--ailo-line); margin: 0 clamp(16px, 2.6vw, 28px); padding-inline: 0; }
.foot a:hover { color: var(--ailo-accent); }

.rail-overlay { display: none; }

/* ===== 반응형 ===== */
@media (max-width: 1399.98px) {
  .g-receipt { grid-column: span 5; }
  .g-kpis { grid-column: span 7; }
  .g-stamp { grid-column: span 12; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 20px; align-items: start; }
  .g-stamp .paper__head { grid-column: 1 / -1; }
  .who__t { display: none; }
}
@media (max-width: 1199.98px) {
  .g-heat, .g-rank, .g-line, .g-feed, .g-table, .g-memo { grid-column: span 12; }
  .g-memo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991.98px) {
  .rail {
    position: fixed; left: 0; top: 0; bottom: 0; height: auto; width: min(280px, 84vw); padding: 18px 16px;
    translate: -100% 0; visibility: hidden; z-index: 130; transition: translate .3s var(--ailo-ease), visibility .3s;
  }
  html.sb-open .rail { translate: 0 0; visibility: visible; box-shadow: 18px 0 40px rgba(0, 0, 0, .3); transition: translate .3s var(--ailo-ease), visibility 0s; } /* 열 때 visibility 즉시 → 곧바로 포커스 가능 */
  .rail__logo { flex-direction: row; display: flex; gap: 12px; justify-content: flex-start; align-items: center; }
  .rail__logo span { font-size: 17px; margin: 0; }
  .rail__close { display: inline-grid; place-items: center; margin-left: auto; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(241, 227, 204, .25); background: transparent; color: var(--d15-rail-fg); }
  .rail__link { flex-direction: row; justify-content: flex-start; font-size: 14.5px; gap: 14px; padding: 12px 14px; text-align: left; }
  .rail__link i { width: 22px; text-align: center; font-size: 16px; }
  .rail__link.is-active::before { left: -16px; }
  .rail__dot { position: static; margin-left: auto; }
  .rail-overlay { display: block; position: fixed; inset: 0; z-index: 120; background: rgba(30, 18, 8, .55); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
  html.sb-open .rail-overlay { opacity: 1; visibility: visible; }
  html.sb-open body { overflow: hidden; }
  .top__burger { display: inline-grid; }
  .g-receipt, .g-kpis { grid-column: span 12; }
  .g-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
  .top { flex-wrap: wrap; }
  .top__search { order: 5; flex-basis: 100%; width: auto; margin-left: 0; }
  .top__tools { margin-left: auto; }
  .g-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-stamp, .g-memo { grid-template-columns: minmax(0, 1fr); }
  .store__crumb { display: none; }
}
@media (max-width: 575.98px) {
  .filters__btn { margin-left: 0; width: 100%; justify-content: center; }
  .pills { width: 100%; }
  .pills button { flex: 1; padding-inline: 8px; }
  .open-badge { display: none; }
  .spark { width: 56px; }
  .kpi__foot { flex-wrap: wrap; }
  .chart-box { height: 250px; }
  .tsearch, .tsearch input { width: 100%; }
}
