/* ════════ 토큰 조회 모달 — token-usage.js 짝 ════════
   aws-cost.css 와 같은 오버레이·카드 결. 색·간격은 common.css 토큰. */
.tku-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(16, 24, 40, .45);
  display: flex; align-items: center; justify-content: center; padding: 20px; }
.tku-overlay[hidden] { display: none; }
.tku-modal { background: var(--surface, #fff); border-radius: var(--radius-lg, 20px); width: 100%; max-width: 760px; max-height: 88vh;
  display: flex; flex-direction: column; box-shadow: var(--shadow-pop, 0 12px 44px rgba(16, 24, 40, .22)); overflow: hidden; }

.tku-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line, #ECEEF1); flex: 0 0 auto; }
.tku-head h3 { margin: 0; font-size: 15px; font-weight: 700; color: var(--text, #1A1D21); white-space: nowrap; }
.tku-months { display: flex; gap: 6px; flex: 1 1 auto; overflow-x: auto; }
.tku-mchip { border: 1px solid var(--line-strong, #D6DAE0); background: var(--surface, #fff); color: var(--text-2, #4A5159);
  font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: var(--radius-pill, 999px); cursor: pointer; white-space: nowrap; }
.tku-mchip:hover { background: var(--surface-2, #F4F5F7); }
.tku-mchip.on { background: var(--brand, #3E4D41); border-color: var(--brand, #3E4D41); color: #fff; }
.tku-x { border: none; background: none; font-size: 15px; cursor: pointer; color: var(--muted, #79818B); padding: 4px 9px; border-radius: 8px; }
.tku-x:hover { background: var(--surface-2, #F4F5F7); color: var(--text, #1A1D21); }

.tku-body { padding: 16px 18px 20px; flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.tku-body > * { flex: 0 0 auto; }
.tku-note { color: var(--muted, #79818B); font-size: 13px; text-align: center; padding: 34px 0; line-height: 1.6; }

.tku-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tku-kpi { background: var(--surface-3, #FAFBFC); border: 1px solid var(--line, #ECEEF1); border-radius: var(--radius-md, 12px); padding: 12px 14px; }
.tku-kpi .l { font-size: 11.5px; color: var(--muted, #79818B); font-weight: 600; }
.tku-kpi .v { font-size: 20px; font-weight: 800; color: var(--text, #1A1D21); margin-top: 4px; font-variant-numeric: tabular-nums; }
.tku-kpi .s { font-size: 11.5px; color: var(--text-2, #4A5159); margin-top: 2px; }

.tku-card { border: 1px solid var(--line, #ECEEF1); border-radius: var(--radius-md, 12px); overflow: hidden; }
.tku-card-h { font-size: 12.5px; font-weight: 700; color: var(--text, #1A1D21); padding: 10px 14px; background: var(--thead-bg, #EEF0F3); }
.tku-sub { font-weight: 500; color: var(--muted, #79818B); margin-left: 6px; }

.tku-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tku-table th { text-align: left; font-weight: 700; color: var(--text-2, #4A5159); padding: 8px 12px; border-bottom: 1px solid var(--line, #ECEEF1); white-space: nowrap; }
.tku-table td { padding: 9px 12px; border-bottom: 1px solid var(--line, #ECEEF1); vertical-align: middle; }
.tku-table tbody tr:nth-child(even) td { background: rgba(243, 244, 246, .5); }
.tku-table tbody tr:last-child td { border-bottom: none; }
.tku-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tku-table .nm { font-weight: 700; color: var(--text, #1A1D21); }
.tku-table .bar-h { width: 30%; }
.tku-table .bar { display: flex; align-items: center; gap: 8px; }
.tku-tube { flex: 1 1 auto; height: 7px; border-radius: 999px; background: var(--surface-2, #F4F5F7); overflow: hidden; }
.tku-tube i { display: block; height: 100%; border-radius: 999px; background: var(--sage, #9BAA9E); }
.tku-table tbody tr:first-child .tku-tube i { background: var(--brand, #3E4D41); }
.tku-table .pct { font-size: 11.5px; color: var(--text-2, #4A5159); min-width: 30px; text-align: right; font-variant-numeric: tabular-nums; }
.tku-table .seen { color: var(--text-2, #4A5159); white-space: nowrap; }
.tku-table .seen.old { color: var(--neg, #D23B3B); font-weight: 600; }

.tku-chart { padding: 10px 12px 6px; position: relative; }
.tku-chart svg { display: block; max-width: 100%; }
.tku-chart .g { stroke: var(--grid, #EEF0F2); stroke-width: 1; }
.tku-chart .ax { font-size: 10px; fill: var(--muted, #79818B); }
.tku-chart .b { fill: var(--chart-roas, #6E8472); }
.tku-chart .b.on { fill: var(--brand, #3E4D41); }
.tku-chart .hit { fill: transparent; cursor: default; }
.tku-tip { position: absolute; z-index: 3; pointer-events: none; min-width: 150px; background: var(--surface, #fff);
  border-radius: var(--radius-sm, 10px); box-shadow: var(--shadow-pop, 0 4px 8px rgba(16,24,40,.06), 0 16px 40px rgba(16,24,40,.12));
  padding: 9px 11px; font-size: 12px; color: var(--text, #1A1D21); }
.tku-tip[hidden] { display: none; }
.tku-tip .th { font-weight: 700; margin-bottom: 5px; }
.tku-tip .tr { display: flex; justify-content: space-between; gap: 14px; line-height: 1.65; font-variant-numeric: tabular-nums; }
.tku-tip .tr.tot b { font-weight: 800; }
.tku-tip .tr.sub { color: var(--muted, #79818B); }

.tku-models { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tku-mrow { display: flex; justify-content: space-between; gap: 10px; padding: 8px 14px; font-size: 12.5px; border-bottom: 1px solid var(--line, #ECEEF1); }
.tku-mrow .mk { color: var(--text-2, #4A5159); }
.tku-mrow .mv { font-weight: 700; color: var(--text, #1A1D21); font-variant-numeric: tabular-nums; }

.tku-table tfoot td { background: var(--thead-bg, #EEF0F3); font-weight: 800; border-bottom: none; border-top: 1px solid var(--line-2, #E4E7EB); }
.tku-mtotal { background: var(--thead-bg, #EEF0F3); border-bottom: none; }
.tku-mtotal .mk { font-weight: 800; color: var(--text, #1A1D21); }
.tku-mtable tr.mrow { cursor: pointer; }
.tku-mtable tr.mrow:hover td { background: var(--surface-2, #F4F5F7); }
.tku-mtable tr.mrow.sel td { background: var(--sage-tint, #EAEFEB); }
.tku-mtable tr.mrow:focus-visible { outline: 2px solid var(--sage, #9BAA9E); outline-offset: -2px; }
.tku-foot { margin: 0; font-size: 11.5px; color: var(--muted, #79818B); line-height: 1.6; }

@media (max-width: 640px) {
  .tku-kpis { grid-template-columns: 1fr; }
  .tku-models { grid-template-columns: 1fr; }
  .tku-table .bar-h, .tku-table td.barc { display: none; }
  .tku-head { flex-wrap: wrap; }
}

/* ═════════ 디자인 시스템(/디자인 — 토스다운 라이트) 2026-10-15 ═════════
   배치·문구는 위 그대로. 질감만 덮는다: 회색 판 위 흰 카드 · 남색 세 겹 그림자 · 파랑은 점으로만 ·
   유광 튜브 막대 · 젤리 칩 · 한 곳만 밝은 덩어리(API 환산) · 줄 올림 스며듦 · 등장 expo.
   값 정본: ~/.claude/skills/디자인/assets/toss-glass.css */
.tku-overlay {
  --tk-t1: #191F28; --tk-t2: #4E5968; --tk-t3: #8B95A1; --tk-t4: #B0B8C1;
  --tk-blue: #3182F6; --tk-blue-d: #2468DC; --tk-red: #F04452;
  --tk-line: rgba(2,32,71,.10);
  --tk-sh-card: 0 1px 2px rgba(2,32,71,.05), 0 4px 12px -2px rgba(2,32,71,.06), 0 16px 32px -14px rgba(3,31,63,.12);
  --tk-sh-up:   0 1px 2px rgba(2,32,71,.05), 0 8px 18px -4px rgba(2,32,71,.08), 0 26px 44px -18px rgba(3,31,63,.18);
  --tk-ease: cubic-bezier(.16,1,.3,1);
  background: rgba(10,18,36,.38);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", sans-serif;
}
/* 창 = 회색 판(솟은 유리 조리법) */
.tku-modal {
  border-radius: 28px;
  background: linear-gradient(160deg, #F8F9FB 0%, #F1F3F6 55%, #ECEFF3 100%);
  box-shadow: inset 1.5px 1.5px 0 #fff, inset 0 -1px 0 rgba(2,32,71,.05),
    0 1px 2px rgba(2,32,71,.06), 0 30px 70px -24px rgba(3,31,63,.38);
  animation: tkuIn .5s var(--tk-ease) both;
}
@keyframes tkuIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.tku-head { border-bottom: 0; padding: 18px 22px 6px; }
.tku-head h3 { font-size: 16px; font-weight: 800; color: var(--tk-t1); letter-spacing: -.02em; }
.tku-x { color: var(--tk-t3); border-radius: 10px; transition: background-color .35s var(--tk-ease); }
.tku-x:hover { background: rgba(2,32,71,.05); color: var(--tk-t1); }

/* 달 선택 = 젤리 단추, 고른 것 = 파랑 젤리 */
.tku-mchip {
  border: 0; border-radius: 999px; padding: 6px 13px; font-size: 12.5px; font-weight: 700; color: var(--tk-t2);
  background: linear-gradient(180deg, #FFFFFF, #EEF2F8);
  box-shadow: inset 0 1px 0 #fff, inset 0 -1.5px 0 rgba(120,140,180,.22), 0 3px 8px -4px rgba(40,70,140,.25);
  transition: transform .35s var(--tk-ease), box-shadow .35s var(--tk-ease);
}
.tku-mchip:hover { background: linear-gradient(180deg, #FFFFFF, #E9EEF6); }
.tku-mchip:active { transform: scale(.96); transition-duration: .2s; }
.tku-mchip.on {
  color: #1B64DA; background: linear-gradient(180deg, #E8F3FF, #C9E2FF); border: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), inset 0 0 0 1.5px rgba(49,130,246,.55), inset 0 -2px 0 rgba(49,130,246,.25), 0 6px 14px -6px rgba(49,130,246,.5);
}
.tku-months { padding: 4px 2px 8px; }   /* 젤리 그림자가 잘리지 않게 */

.tku-body { padding: 10px 22px 22px; gap: 14px; }
.tku-note { color: var(--tk-t3); }

/* 흰 카드(KPI·표·차트) — 회색 판 위에서 떠 보이게, 올리면 그림자만 .4초에 깊어짐 */
.tku-kpi, .tku-card {
  border: 0; border-radius: 16px; background: #FFFFFF;
  box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(2,32,71,.05), var(--tk-sh-card);
  transition: box-shadow .4s var(--tk-ease);
}
.tku-kpi:hover, .tku-card:hover { box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(2,32,71,.06), var(--tk-sh-up); }
.tku-kpi { padding: 14px 16px; }
.tku-kpi .l { color: var(--tk-t3); font-weight: 700; }
.tku-kpi .v { font-size: 22px; font-weight: 800; color: var(--tk-t1); letter-spacing: -.02em; }
.tku-kpi .s { color: var(--tk-t2); }
/* 가장 중요한 한 곳(API 환산) = 밝은 덩어리 — 오른쪽 위 한 점 빛 + 아래 하늘 빛줄 + 반사 띠 */
.tku-kpis .tku-kpi:nth-child(2) {
  position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(70% 90% at 92% -10%, rgba(156,200,255,.38), transparent 65%), linear-gradient(180deg, #FFFFFF 0%, #F7FAFF 60%, #EEF4FD 100%);
  box-shadow: inset 1.5px 1.5px 0 #fff, inset 0 0 0 1px rgba(49,130,246,.10), inset 0 -2px 0 rgba(106,166,255,.55), inset 0 -14px 22px -14px rgba(106,166,255,.30), 0 2px 0 rgba(170,190,225,.35), 0 20px 36px -16px rgba(30,80,170,.30);
}
.tku-kpis .tku-kpi:nth-child(2)::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
  background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,.7) 50%, transparent 62%); animation: tkuGlint 3s ease-in-out infinite; }
@keyframes tkuGlint { 0%, 100% { transform: translateX(-60%); opacity: 0; } 45% { opacity: 1; } 70% { transform: translateX(60%); opacity: 0; } }
.tku-kpis .tku-kpi:nth-child(2) .v { color: #1B64DA; }

/* 카드 머리 — 회색 띠 대신 흰 바탕 + 들인 구분선(글자와 10px 이상) */
.tku-card-h { background: transparent; font-size: 13px; font-weight: 800; color: var(--tk-t1); padding: 14px 16px 12px; position: relative; }
.tku-card-h::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 1px; background: var(--tk-line); }
.tku-sub { color: var(--tk-t3); font-weight: 600; }

/* 표 — 좌우 들인 구분선 · 줄무늬 없이 · 줄 올림은 옅게 스며듦 */
.tku-card .tku-table { width: calc(100% - 20px); margin: 0 10px 4px; }
.tku-table th { color: var(--tk-t3); font-weight: 700; font-size: 11.5px; border-bottom: 1px solid var(--tk-line); padding: 10px 10px; }
.tku-table td { border-bottom: 1px solid var(--tk-line); padding: 10px 10px; color: var(--tk-t2); transition: background-color .35s var(--tk-ease); }
.tku-table tbody tr:nth-child(even) td { background: transparent; }
.tku-table tbody tr:hover td { background: rgba(2,32,71,.035); }
.tku-table .nm { color: var(--tk-t1); font-weight: 800; }
.tku-table .num { color: var(--tk-t1); font-weight: 700; }
.tku-table tfoot td { background: transparent; border-top: 0; border-bottom: 0; color: var(--tk-t1); font-weight: 800; padding-top: 12px; padding-bottom: 12px; }
.tku-table tfoot tr td:first-child { border-radius: 10px 0 0 10px; }
.tku-table tfoot tr td:last-child  { border-radius: 0 10px 10px 0; }
.tku-table tfoot td { background: linear-gradient(180deg, #F6F8FB, #EEF1F5); }
.tku-table .seen { color: var(--tk-t2); }
.tku-table .seen.old { color: var(--tk-red); font-weight: 700; }
.tku-mtable tr.mrow:hover td { background: rgba(2,32,71,.035); }
.tku-mtable tr.mrow.sel td { background: rgba(49,130,246,.06); }
.tku-mtable tr.mrow:focus-visible { outline: 2px solid var(--tk-blue); }

/* 비중 막대 = 유광 튜브(작은 판: 단색 홈 + 위 그늘 한 줄) */
.tku-tube { display: block; height: 7px; background: rgba(2,32,71,.10); box-shadow: inset 0 1px 1.5px rgba(2,32,71,.14); }
.tku-tube i, .tku-table tbody tr:first-child .tku-tube i {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #9CC8FF 0%, #4C8DFF 45%, #2F6FE6 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), inset 0 -1px 1px rgba(10,50,150,.35), 0 2px 6px -2px rgba(49,130,246,.55);
  animation: tkuFill .9s var(--tk-ease) both;
}
.tku-tube i::after { content: ""; position: absolute; inset: 0; width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent); animation: tkuShine 3.2s ease-in-out infinite; }
@keyframes tkuShine { from { transform: translateX(-100%); } to { transform: translateX(334%); } }
@keyframes tkuFill { from { transform: scaleX(0); transform-origin: left; } to { transform: scaleX(1); transform-origin: left; } }
.tku-table .pct { color: var(--tk-t3); font-weight: 700; }

/* 그래프 — 유광 파랑 막대(위 밝고 아래 진함), 올린 막대는 한 단계 진하게 · 격자 옅게 */
.tku-chart .g { stroke: rgba(2,32,71,.06); }
.tku-chart .ax { fill: var(--tk-t3); font-weight: 600; }
.tku-chart .b { fill: url(#tkuBarGrad); transition: opacity .35s var(--tk-ease); }
.tku-chart .b.on { fill: url(#tkuBarGradOn); }
.tku-tip { border-radius: 12px; background: #FFFFFF;
  box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(2,32,71,.06), 0 1px 2px rgba(2,32,71,.06), 0 12px 28px -10px rgba(3,31,63,.28); }
.tku-tip .th { color: var(--tk-t1); font-weight: 800; }
.tku-tip .tr { color: var(--tk-t2); }
.tku-tip .tr.tot b { color: #1B64DA; }
.tku-tip .tr.sub { color: var(--tk-t3); }

/* 모델별 금액 — 들인 구분선 · 합계 줄은 회색 젤리 */
.tku-models { padding: 0 10px; }
.tku-mrow { border-bottom: 1px solid var(--tk-line); padding: 10px 6px; transition: background-color .35s var(--tk-ease); }
.tku-mrow:hover { background: rgba(2,32,71,.035); }
.tku-mrow .mk { color: var(--tk-t2); }
.tku-mrow .mv { color: var(--tk-t1); font-weight: 800; }
.tku-mtotal { margin: 8px 10px 10px; border: 0; border-radius: 10px; padding: 11px 12px; background: linear-gradient(180deg, #F6F8FB, #EEF1F5); }
.tku-mtotal .mk { color: var(--tk-t1); }

.tku-foot { color: var(--tk-t3); }

@media (prefers-reduced-motion: reduce) {
  .tku-modal, .tku-tube i, .tku-tube i::after, .tku-kpis .tku-kpi:nth-child(2)::after { animation: none; }
}

/* 2차 — 창 전체를 같은 질감으로: 머리줄 회색 띠 걷기 · 위쪽은 흐린 유리 머리 */
.tku-overlay .tku-table thead th { background: transparent; position: static; }
.tku-head { position: relative; z-index: 2; background: rgba(248,249,251,.78);
  -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: 0 1px 0 rgba(2,32,71,.06), 0 10px 24px -20px rgba(3,31,63,.35); padding-bottom: 8px; }
.tku-body { padding-top: 16px; }
.tku-mrow:nth-last-child(-n+2):nth-child(odd), .tku-mrow:last-child { border-bottom: 0; }
