/* ============================================================
   LS — 동네 매장 쇼윈도 · 디자인 시스템
   기획 03번 6장(디자인 시스템 범위)의 데모 구현.

   설계 전제: 이 서비스의 1차 정보는 "지금 열려 있는가" 다.
   그래서 불 켜진 창 / 꺼진 창을 단일 시각 장치로 쓴다.
   영업 중 = 간판 백열색이 돌고, 종료 = 채도가 내려간다.
   ============================================================ */

/* ---------- 토큰 ---------- */
:root {
  /* 저녁 골목 — 손님 앱 */
  --ink-900: #101822;
  --ink-800: #16202b;
  --ink-700: #1f2b38;
  --ink-600: #2b3947;
  --ink-500: #3b4b5c;

  /* 간판 백열 — 영업 중 전용. 다른 용도로 쓰지 않는다. */
  --lit: #f5b544;
  --lit-soft: #ffd79a;
  --lit-glow: rgba(245, 181, 68, 0.16);

  /* 간판 초록 — 액션 */
  --act: #0e9f8e;
  --act-dark: #0b8275;
  --act-soft: rgba(14, 159, 142, 0.14);

  /* 상태 */
  --warn: #e8a33d;
  --danger: #e2574c;
  --dim: #7a8a9b;

  /* 주광 — 관리자 웹 */
  --paper: #f2f4f6;
  --paper-card: #ffffff;
  --paper-line: #dbe1e8;
  --paper-line-soft: #e9edf1;
  --text-900: #16202b;
  --text-700: #41505f;
  --text-500: #6b7b8c;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;

  --font-display: 'Hahmlet', 'Apple SD Gothic Neo', serif;
  --font-ui: 'IBM Plex Sans KR', 'Apple SD Gothic Neo', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  /* 한국어는 어절 단위로만 줄을 바꾼다. 없으면 "것부/터" 처럼 끊긴다. */
  word-break: keep-all;
  overflow-wrap: break-word;
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-900);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--act);
  outline-offset: 2px;
  border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   1. 데모 가이드 (랜딩) — 저녁 거리
   ============================================================ */

.guide {
  background: var(--ink-900);
  color: #dde5ee;
  min-height: 100vh;
}

.guide-shell { max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; }

/* 히어로 — 불 켜진 창들이 이 서비스의 첫 장면이다 */
.hero {
  position: relative;
  padding: 5.5rem 0 6rem;
  overflow: hidden;
}
.hero-windows {
  position: absolute;
  inset: auto 0 0 0;
  height: 130px;
  display: flex;
  gap: 10px;
  align-items: flex-end;
  opacity: 0.9;
  pointer-events: none;
  mask-image: linear-gradient(to top, #000 0%, #000 42%, transparent 100%);
}
.hero-win {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: var(--ink-700);
  border: 1px solid var(--ink-600);
  border-bottom: none;
}
.hero-win[data-lit='1'] {
  background: linear-gradient(to top, rgba(245, 181, 68, 0.3), rgba(245, 181, 68, 0.62));
  border-color: rgba(245, 181, 68, 0.6);
  box-shadow: 0 0 34px rgba(245, 181, 68, 0.22);
}

.hero-inner { position: relative; z-index: 1; }

.hero-eyebrow {
  font-size: 0.8125rem;
  color: var(--lit);
  margin-bottom: 1.25rem;
  font-variant-numeric: tabular-nums;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5.2vw, 3.9rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.035em;
  color: #fff;
  max-width: 26ch;
}
.hero-sub {
  margin-top: 1.4rem;
  font-size: 1.0625rem;
  color: #9fb1c4;
  max-width: 56ch;
  line-height: 1.75;
}

.hero-meta {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0 2.25rem;
  font-size: 0.875rem;
  color: #8296ab;
}
.hero-meta b { color: #cfdbe7; font-weight: 600; }

/* 세 입구 */
.doors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1rem;
  padding: 1rem 0 3.5rem;
}
.door {
  display: block;
  text-decoration: none;
  background: var(--ink-800);
  border: 1px solid var(--ink-600);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color 0.18s, background 0.18s;
}
.door:hover, .door:focus-visible {
  border-color: rgba(245, 181, 68, 0.5);
  background: var(--ink-700);
}
.door-role { font-size: 0.8125rem; color: var(--lit); margin-bottom: 0.5rem; }
.door-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.02em;
}
.door-desc { margin-top: 0.6rem; font-size: 0.875rem; color: #91a4b8; line-height: 1.65; }
.door-ids {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--ink-600);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #6d8299;
}

/* 가이드 섹션 */
.g-section { padding: 3rem 0; border-top: 1px solid var(--ink-700); }
.g-section > h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.025em;
  margin-bottom: 0.6rem;
}
.g-section > .g-lede { color: #93a6ba; max-width: 64ch; line-height: 1.75; margin-bottom: 2rem; }

.g-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: 1rem; }

.g-card {
  background: var(--ink-800);
  border: 1px solid var(--ink-700);
  border-radius: var(--radius);
  padding: 1.35rem;
}
.g-card h3 { font-size: 1.0625rem; color: #fff; margin-bottom: 0.5rem; }
.g-card p { font-size: 0.875rem; color: #93a6ba; line-height: 1.7; }
.g-card .ref {
  display: inline-block;
  margin-top: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--lit);
  background: var(--lit-glow);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

/* 단계 안내 — 실제 순서가 있으므로 번호를 쓴다 */
.steps { counter-reset: s; display: grid; gap: 0.75rem; }
.step {
  counter-increment: s;
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 1rem;
  background: var(--ink-800);
  border: 1px solid var(--ink-700);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
}
.step::before {
  content: counter(s);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--ink-900);
  background: var(--lit);
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 600;
}
.step b { color: #fff; font-weight: 600; display: block; margin-bottom: 0.2rem; }
.step span { font-size: 0.875rem; color: #93a6ba; line-height: 1.7; }
.step a { color: var(--act); text-decoration-color: var(--act-soft); text-underline-offset: 2px; }

.g-note {
  background: rgba(226, 87, 76, 0.08);
  border: 1px solid rgba(226, 87, 76, 0.28);
  border-radius: var(--radius);
  padding: 1.15rem 1.3rem;
  font-size: 0.875rem;
  color: #e9b6b1;
  line-height: 1.75;
}
.g-note b { color: #f3d3d0; }

.g-foot {
  padding: 2.5rem 0 4rem;
  border-top: 1px solid var(--ink-700);
  font-size: 0.8125rem;
  color: #6d8299;
  line-height: 1.8;
}

/* 표 (가이드 안) */
.g-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.g-table th, .g-table td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--ink-700);
  vertical-align: top;
}
.g-table th { color: #a8bace; font-weight: 600; font-size: 0.8125rem; }
.g-table td { color: #93a6ba; }
.g-table code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--lit);
}

/* ============================================================
   2. 손님 앱 · 사장님 모드 — 휴대폰 프레임
   ============================================================ */

.stage {
  min-height: 100vh;
  background:
    radial-gradient(1200px 500px at 50% -10%, #1d2a38 0%, var(--ink-900) 60%),
    var(--ink-900);
  padding: 2rem 1.25rem 3rem;
}

.stage-bar {
  max-width: 68rem;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  color: #9fb1c4;
  font-size: 0.875rem;
}
.stage-bar a { color: #9fb1c4; text-decoration: none; }
.stage-bar a:hover { color: #fff; }
.stage-bar .sep { color: var(--ink-500); }
.stage-bar strong { color: #fff; font-weight: 600; }
.stage-bar .spacer { flex: 1; }

.stage-grid {
  max-width: 68rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 1.75rem;
  align-items: start;
}
@media (max-width: 960px) {
  .stage-grid { grid-template-columns: 1fr; }
}

/* 휴대폰 */
.phone {
  width: 390px;
  max-width: 100%;
  background: var(--ink-800);
  border: 1px solid var(--ink-600);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  height: 780px;
  position: sticky;
  top: 1.5rem;
}
@media (max-width: 960px) { .phone { position: static; height: 720px; } }

.phone-status {
  display: flex;
  justify-content: space-between;
  padding: 0.55rem 1.25rem 0.3rem;
  font-size: 0.6875rem;
  color: #7f93a8;
  font-variant-numeric: tabular-nums;
  background: var(--ink-800);
}

.phone-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.phone-body::-webkit-scrollbar { width: 6px; }
.phone-body::-webkit-scrollbar-thumb { background: var(--ink-600); border-radius: 3px; }

/* 앱 헤더 — 03번 1-7장 와이어 */
.app-head {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--ink-800);
  border-bottom: 1px solid var(--ink-700);
  padding: 0.65rem 0.9rem;
}
.app-head-row { display: flex; align-items: center; gap: 0.5rem; }
.dong-pick {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.0625rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.3rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}
.dong-pick:hover { background: var(--ink-700); }
.dong-pick .caret { font-size: 0.7rem; color: var(--dim); }

.icon-btn {
  background: none;
  border: none;
  color: #a8bace;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  position: relative;
  padding: 0;
}
.icon-btn:hover { background: var(--ink-700); color: #fff; }
.icon-btn .badge {
  position: absolute;
  top: 1px; right: 1px;
  min-width: 15px;
  height: 15px;
  border-radius: 8px;
  background: var(--danger);
  color: #fff;
  font-size: 0.625rem;
  display: grid;
  place-items: center;
  padding: 0 3px;
  font-variant-numeric: tabular-nums;
}

.seg {
  display: flex;
  background: var(--ink-900);
  border-radius: 7px;
  padding: 2px;
  gap: 2px;
}
.seg button {
  background: none;
  border: none;
  color: var(--dim);
  font-size: 0.75rem;
  padding: 0.3rem 0.65rem;
  border-radius: 5px;
  white-space: nowrap;
}
.seg button[aria-pressed='true'] { background: var(--ink-600); color: #fff; }

/* 필터 칩 */
.chips {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.6rem 0.9rem 0.1rem;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  background: var(--ink-700);
  border: 1px solid var(--ink-600);
  color: #b8c7d6;
  font-size: 0.75rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.chip[aria-pressed='true'] {
  background: var(--act-soft);
  border-color: var(--act);
  color: #5fe0cf;
}
.chip.chip-lit[aria-pressed='true'] {
  background: var(--lit-glow);
  border-color: var(--lit);
  color: var(--lit-soft);
}
.chip .n { font-variant-numeric: tabular-nums; opacity: 0.8; }

.list-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.95rem 0.4rem;
  font-size: 0.75rem;
  color: var(--dim);
}
.list-meta select {
  background: var(--ink-700);
  border: 1px solid var(--ink-600);
  color: #cfdbe7;
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.4rem;
  font-size: 0.75rem;
}

/* ---------- 매장 카드 — 03번 1-7장 ---------- */
.s-card {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 0.8rem;
  padding: 0.85rem 0.95rem;
  border-bottom: 1px solid var(--ink-700);
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  width: 100%;
  text-align: left;
  color: inherit;
}
.s-card:hover { background: var(--ink-700); }

/* 사진은 1:1 고정 — 사장님이 올린 사진 비율이 섞여도 목록이 흐트러지지 않는다 */
.s-thumb {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 9px;
  overflow: hidden;
  background: var(--ink-600);
  flex: 0 0 auto;
}
.s-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 불 켜진 창 / 꺼진 창 — 이 데모의 단일 시각 장치 */
.s-card[data-open='open'] .s-thumb {
  box-shadow: 0 0 0 1.5px rgba(245, 181, 68, 0.55), 0 0 18px var(--lit-glow);
}
.s-card[data-open='break'] .s-thumb { box-shadow: 0 0 0 1.5px rgba(245, 181, 68, 0.28); }
.s-card[data-open='closed'] .s-thumb img,
.s-card[data-open='day_off'] .s-thumb img,
.s-card[data-open='temp_closed'] .s-thumb img {
  filter: saturate(0.35) brightness(0.62);
}

.s-main { min-width: 0; }
.s-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.s-name .new {
  font-size: 0.625rem;
  background: var(--act);
  color: #06241f;
  padding: 0.05rem 0.3rem;
  border-radius: 3px;
  font-weight: 600;
}
.s-meta {
  font-size: 0.75rem;
  color: var(--dim);
  margin-top: 0.15rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}
.s-meta .dot { color: var(--ink-500); }

.open-tag { display: inline-flex; align-items: center; gap: 0.28rem; font-weight: 500; }
.open-tag::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.open-tag[data-s='open']        { color: var(--lit); }
.open-tag[data-s='break']       { color: var(--warn); }
.open-tag[data-s='temp_closed'] { color: var(--danger); }
.open-tag[data-s='closed'],
.open-tag[data-s='day_off']     { color: var(--dim); }

.s-post {
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  color: #b8c7d6;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}
.s-post.empty { color: var(--ink-500); font-style: normal; }
.s-foot {
  margin-top: 0.3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.6875rem;
  color: var(--dim);
}

.heart {
  background: none;
  border: none;
  padding: 0.15rem;
  font-size: 1rem;
  line-height: 1;
  color: var(--ink-500);
}
.heart[aria-pressed='true'] { color: var(--danger); }

/* ---------- 추천 사유 + 점수 분해 ---------- */
.why {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.6875rem;
  color: var(--lit-soft);
  background: var(--lit-glow);
  border: 1px solid rgba(245, 181, 68, 0.22);
  padding: 0.14rem 0.45rem;
  border-radius: 999px;
}
.score-btn {
  background: none;
  border: 1px solid var(--ink-600);
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
}
.score-btn:hover { color: #cfdbe7; border-color: var(--ink-500); }

.breakdown {
  margin-top: 0.6rem;
  background: var(--ink-900);
  border: 1px solid var(--ink-700);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: #a8bace;
}
.bd-row { display: grid; grid-template-columns: 1.6rem 4.6rem 1fr 3.1rem; gap: 0.4rem; align-items: center; padding: 0.12rem 0; }
.bd-k { color: var(--lit); }
.bd-l { color: var(--dim); font-family: var(--font-ui); font-size: 0.6875rem; }
.bd-bar { height: 4px; background: var(--ink-700); border-radius: 2px; overflow: hidden; }
.bd-bar i { display: block; height: 100%; background: var(--act); border-radius: 2px; }
.bd-v { text-align: right; font-variant-numeric: tabular-nums; }
.bd-total {
  margin-top: 0.4rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--ink-700);
  display: flex;
  justify-content: space-between;
  color: #fff;
}
.bd-pen { color: var(--danger); }
.bd-formula { color: var(--ink-500); margin-bottom: 0.45rem; font-size: 0.625rem; }

/* ---------- 섹션 ---------- */
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 1.15rem 0.95rem 0.5rem;
}
.sec-head h2 {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  color: #fff;
  letter-spacing: -0.02em;
}
.sec-head .more { background: none; border: none; color: var(--act); font-size: 0.75rem; }
.sec-note { padding: 0 0.95rem 0.5rem; font-size: 0.6875rem; color: var(--dim); line-height: 1.6; }

/* 가로 스크롤 카드 (홈 "지금 영업 중") */
.hscroll { display: flex; gap: 0.65rem; overflow-x: auto; padding: 0.25rem 0.95rem 0.8rem; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.h-card {
  flex: 0 0 132px;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  color: inherit;
}
.h-card .pic {
  width: 132px; height: 132px;
  border-radius: 11px;
  overflow: hidden;
  background: var(--ink-600);
  position: relative;
}
.h-card .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.h-card[data-open='open'] .pic {
  box-shadow: 0 0 0 1.5px rgba(245, 181, 68, 0.55), 0 0 22px var(--lit-glow);
}
.h-card[data-open='closed'] .pic img, .h-card[data-open='day_off'] .pic img {
  filter: saturate(0.35) brightness(0.62);
}
.h-card .nm { font-size: 0.8125rem; font-weight: 600; color: #fff; margin-top: 0.4rem; }
.h-card .mt { font-size: 0.6875rem; color: var(--dim); }

/* ---------- 빈 화면 (빈 화면 금지 규칙) ---------- */
.empty-state {
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--dim);
}
.empty-state .ttl { color: #cfdbe7; font-weight: 600; margin-bottom: 0.4rem; }
.empty-state p { font-size: 0.8125rem; line-height: 1.7; }
.empty-state .acts { margin-top: 1.1rem; display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; }

/* ---------- 스켈레톤 ---------- */
.skel {
  background: linear-gradient(90deg, var(--ink-700) 25%, var(--ink-600) 50%, var(--ink-700) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---------- 버튼 ---------- */
.btn {
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 0.6rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--ink-700);
  color: #cfdbe7;
  transition: filter 0.15s, background 0.15s;
}
.btn:hover { filter: brightness(1.12); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--act); color: #04231f; }
.btn-lit { background: var(--lit); color: #2a1c00; }
.btn-ghost { background: none; border-color: var(--ink-600); color: #b8c7d6; }
.btn-danger { background: rgba(226, 87, 76, 0.16); color: #f0a7a0; border-color: rgba(226, 87, 76, 0.4); }
.btn-sm { padding: 0.35rem 0.65rem; font-size: 0.75rem; border-radius: 7px; }
.btn-block { width: 100%; display: block; }

/* ---------- 바텀시트 ---------- */
.sheet-wrap {
  position: absolute;
  inset: 0;
  background: rgba(5, 10, 16, 0.6);
  display: flex;
  align-items: flex-end;
  z-index: 20;
}
.sheet {
  width: 100%;
  background: var(--ink-800);
  border-radius: 18px 18px 0 0;
  border-top: 1px solid var(--ink-600);
  max-height: 86%;
  overflow-y: auto;
  animation: slideup 0.2s ease-out;
}
@keyframes slideup { from { transform: translateY(14px); opacity: 0.6; } to { transform: none; opacity: 1; } }
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.1rem 0.6rem;
  position: sticky;
  top: 0;
  background: var(--ink-800);
}
.sheet-head h3 { font-family: var(--font-display); font-size: 1.0625rem; color: #fff; }
.sheet-body { padding: 0 1.1rem 1.4rem; }

/* ---------- 탭바 ---------- */
.tabbar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--ink-700);
  background: var(--ink-800);
}
.tabbar button {
  background: none;
  border: none;
  padding: 0.55rem 0 0.7rem;
  color: var(--dim);
  font-size: 0.625rem;
  display: grid;
  gap: 0.15rem;
  justify-items: center;
  position: relative;
}
.tabbar button[aria-current='page'] { color: var(--lit); }
.tabbar .ic { font-size: 1.05rem; line-height: 1; }
.tabbar .tb-badge {
  position: absolute;
  top: 0.35rem;
  right: 50%;
  margin-right: -1.15rem;
  background: var(--danger);
  color: #fff;
  font-size: 0.5625rem;
  min-width: 14px;
  height: 14px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  padding: 0 3px;
}

/* ---------- 토스트 ---------- */
.toasts {
  position: absolute;
  left: 0; right: 0; bottom: 4.6rem;
  display: grid;
  gap: 0.4rem;
  padding: 0 0.9rem;
  z-index: 40;
  pointer-events: none;
}
.toast {
  background: #0b1320;
  border: 1px solid var(--ink-600);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  font-size: 0.8125rem;
  color: #dde5ee;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
  animation: slideup 0.18s ease-out;
}
.toast.ok { border-color: rgba(14, 159, 142, 0.5); }
.toast.warn { border-color: rgba(232, 163, 61, 0.5); }
.toast.err { border-color: rgba(226, 87, 76, 0.5); }
.toast b { display: block; color: #fff; margin-bottom: 0.1rem; }

/* ============================================================
   3. 해설 패널 (휴대폰 옆) — 심사자가 내부 동작을 본다
   ============================================================ */
.insight { display: grid; gap: 1rem; }
.ins-card {
  background: var(--ink-800);
  border: 1px solid var(--ink-700);
  border-radius: var(--radius);
  overflow: hidden;
}
.ins-head {
  padding: 0.85rem 1.05rem;
  border-bottom: 1px solid var(--ink-700);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}
.ins-head h3 { font-size: 0.9375rem; color: #fff; }
.ins-head .tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--lit);
  background: var(--lit-glow);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
}
.ins-body { padding: 1.05rem; font-size: 0.8125rem; color: #a8bace; line-height: 1.75; }
.ins-body p + p { margin-top: 0.7rem; }
.ins-body code { font-family: var(--font-mono); font-size: 0.75rem; color: var(--lit-soft); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 0.9rem; font-size: 0.8125rem; }
.kv dt { color: var(--dim); }
.kv dd { margin: 0; color: #cfdbe7; font-variant-numeric: tabular-nums; }

.pre {
  background: var(--ink-900);
  border: 1px solid var(--ink-700);
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: #9fb1c4;
  overflow-x: auto;
  white-space: pre;
  line-height: 1.6;
}

.pipe { display: grid; gap: 0.3rem; }
.pipe-step {
  display: grid;
  grid-template-columns: 1.2rem 1fr auto;
  gap: 0.6rem;
  align-items: center;
  font-size: 0.75rem;
  padding: 0.4rem 0.55rem;
  border-radius: var(--radius-sm);
  background: var(--ink-900);
  border: 1px solid var(--ink-700);
  color: #a8bace;
}
.pipe-step .mk { font-size: 0.8rem; }
.pipe-step[data-r='pass'] { border-color: rgba(14, 159, 142, 0.4); }
.pipe-step[data-r='pass'] .mk { color: var(--act); }
.pipe-step[data-r='fail'] { border-color: rgba(226, 87, 76, 0.4); }
.pipe-step[data-r='fail'] .mk { color: var(--danger); }
.pipe-step[data-r='skip'] { opacity: 0.5; }
.pipe-step .nn { font-family: var(--font-mono); font-size: 0.6875rem; color: var(--dim); }

/* ============================================================
   4. 지도 (좌표 기반 벡터 — 지도 SDK 미확정 Q5)
   ============================================================ */
.map-wrap { position: relative; background: var(--ink-900); }
.map-svg { display: block; width: 100%; height: auto; }
.map-road { stroke: var(--ink-600); fill: none; stroke-linecap: round; }
.map-road-major { stroke: #334455; }
.map-dong { fill: rgba(255, 255, 255, 0.022); stroke: var(--ink-600); stroke-dasharray: 3 3; }
.map-dong-label { fill: #5b6e82; font-size: 9px; font-family: var(--font-ui); }
.map-ring { fill: rgba(14, 159, 142, 0.05); stroke: rgba(14, 159, 142, 0.35); stroke-dasharray: 4 3; }
.map-me { fill: var(--act); stroke: #04231f; stroke-width: 2; }
.map-pin { cursor: pointer; }
.map-pin circle { stroke: var(--ink-900); stroke-width: 1.5; }
.map-pin[data-open='open'] circle { fill: var(--lit); }
.map-pin[data-open='break'] circle { fill: var(--warn); }
.map-pin[data-open='closed'] circle,
.map-pin[data-open='day_off'] circle,
.map-pin[data-open='temp_closed'] circle { fill: #55687c; }
.map-pin.sel circle { stroke: #fff; stroke-width: 2.5; }
.map-cluster circle { fill: var(--ink-600); stroke: var(--ink-500); }
.map-cluster text { fill: #cfdbe7; font-size: 10px; text-anchor: middle; font-family: var(--font-mono); }
.map-legend {
  position: absolute;
  left: 0.6rem; bottom: 0.6rem;
  background: rgba(16, 24, 34, 0.9);
  border: 1px solid var(--ink-600);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.55rem;
  font-size: 0.625rem;
  color: var(--dim);
  display: grid;
  gap: 0.2rem;
}
.map-legend i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 0.3rem; }
.map-note {
  padding: 0.55rem 0.9rem;
  font-size: 0.6875rem;
  color: var(--dim);
  background: var(--ink-800);
  border-top: 1px solid var(--ink-700);
  line-height: 1.6;
}
.map-redo {
  position: absolute;
  top: 0.6rem; left: 50%;
  transform: translateX(-50%);
}

/* ============================================================
   5. 사장님 모드
   ============================================================ */
.o-head {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--ink-700);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.o-head .nm { font-family: var(--font-display); font-size: 1.1rem; color: #fff; letter-spacing: -0.02em; }

.toggle-card {
  margin: 0.9rem 1rem;
  background: var(--ink-700);
  border: 1px solid var(--ink-600);
  border-radius: 13px;
  padding: 0.95rem 1rem;
}
.toggle-card[data-on='1'] {
  background: linear-gradient(135deg, rgba(245, 181, 68, 0.14), rgba(245, 181, 68, 0.05));
  border-color: rgba(245, 181, 68, 0.45);
}
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.toggle-row .lb { font-size: 0.9375rem; font-weight: 600; color: #fff; }
.toggle-card .hrs { font-size: 0.75rem; color: var(--dim); margin-top: 0.35rem; }
.toggle-card .auto { font-size: 0.6875rem; color: var(--lit); margin-top: 0.45rem; }

.switch {
  width: 50px; height: 28px;
  border-radius: 999px;
  background: var(--ink-900);
  border: 1px solid var(--ink-500);
  position: relative;
  flex: 0 0 auto;
  transition: background 0.16s, border-color 0.16s;
  padding: 0;
}
.switch i {
  position: absolute;
  top: 2px; left: 2px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #64768a;
  transition: transform 0.16s, background 0.16s;
}
.switch[aria-pressed='true'] { background: var(--lit-glow); border-color: var(--lit); }
.switch[aria-pressed='true'] i { transform: translateX(22px); background: var(--lit); }

.o-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 0 1rem 0.9rem;
}
.o-stat {
  background: var(--ink-700);
  border: 1px solid var(--ink-600);
  border-radius: 11px;
  padding: 0.75rem 0.85rem;
}
.o-stat .lb { font-size: 0.6875rem; color: var(--dim); }
.o-stat .v {
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}
.o-stat .d { font-size: 0.75rem; font-weight: 500; }
.o-stat .d.up { color: var(--act); }
.o-stat .d.flat { color: var(--dim); }

/* 가장 큰 버튼 — 03번 2-5장 */
.o-cta {
  margin: 0 1rem 0.9rem;
  background: var(--lit);
  border: none;
  border-radius: 13px;
  padding: 1.1rem;
  color: #2a1c00;
  display: grid;
  gap: 0.15rem;
  text-align: center;
  width: calc(100% - 2rem);
  box-shadow: 0 8px 24px rgba(245, 181, 68, 0.2);
}
.o-cta .t1 { font-size: 1.0625rem; font-weight: 700; }
.o-cta .t2 { font-size: 0.75rem; opacity: 0.78; }

.quota-bar { margin: 0 1rem 1rem; }
.quota-bar .row { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--dim); margin-bottom: 0.35rem; }
.quota-bar .track { height: 5px; background: var(--ink-700); border-radius: 3px; overflow: hidden; }
.quota-bar .track i { display: block; height: 100%; background: var(--act); }

/* 30초 측정 */
.stopwatch {
  position: sticky;
  top: 0;
  z-index: 8;
  background: var(--ink-900);
  border-bottom: 1px solid var(--ink-700);
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}
.stopwatch .t { color: var(--lit); font-variant-numeric: tabular-nums; font-size: 1.0625rem; }
.stopwatch .t.over { color: var(--danger); }
.stopwatch .lb { color: var(--dim); font-family: var(--font-ui); font-size: 0.6875rem; }

.pick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; padding: 0.9rem 1rem; }
.pick {
  position: relative;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: var(--ink-600);
  padding: 0;
  aspect-ratio: 1;
}
.pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pick[aria-pressed='true'] { border-color: var(--act); }
.pick .ord {
  position: absolute;
  top: 4px; left: 4px;
  width: 19px; height: 19px;
  border-radius: 50%;
  background: var(--act);
  color: #04231f;
  font-size: 0.6875rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.pick .cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, rgba(5, 10, 16, 0.92));
  color: #dde5ee;
  font-size: 0.625rem;
  padding: 0.6rem 0.35rem 0.3rem;
  text-align: left;
  line-height: 1.3;
}

.cand {
  width: 100%;
  text-align: left;
  background: var(--ink-700);
  border: 1.5px solid var(--ink-600);
  border-radius: 11px;
  padding: 0.85rem 0.9rem;
  color: #dde5ee;
  font-size: 0.875rem;
  line-height: 1.65;
  margin-bottom: 0.55rem;
}
.cand:hover { border-color: var(--ink-500); }
.cand[aria-pressed='true'] { border-color: var(--act); background: var(--act-soft); }
.cand .cn {
  display: flex;
  justify-content: space-between;
  font-size: 0.6875rem;
  color: var(--dim);
  margin-bottom: 0.4rem;
  font-family: var(--font-mono);
}
.cand .tg { margin-top: 0.5rem; display: flex; gap: 0.25rem; flex-wrap: wrap; }
.cand .tg span {
  font-size: 0.625rem;
  background: var(--ink-900);
  border: 1px solid var(--ink-600);
  color: var(--dim);
  padding: 0.08rem 0.35rem;
  border-radius: 999px;
}

.reject-list { display: grid; gap: 0.4rem; }
.reject {
  background: rgba(226, 87, 76, 0.07);
  border: 1px solid rgba(226, 87, 76, 0.26);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.7rem;
  font-size: 0.75rem;
  color: #d9a8a3;
  line-height: 1.6;
}
.reject .rr { color: #f0a7a0; font-family: var(--font-mono); font-size: 0.6875rem; display: block; margin-bottom: 0.15rem; }

.ta {
  width: 100%;
  background: var(--ink-900);
  border: 1px solid var(--ink-600);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  color: #dde5ee;
  font-size: 0.875rem;
  line-height: 1.7;
  resize: vertical;
  min-height: 7.5rem;
}
.ta:focus { outline: none; border-color: var(--act); }
.count { text-align: right; font-size: 0.6875rem; color: var(--dim); margin-top: 0.3rem; font-variant-numeric: tabular-nums; }
.count.bad { color: var(--danger); }

.kw-row { display: flex; gap: 0.35rem; flex-wrap: wrap; padding: 0 1rem 0.5rem; }
.kw {
  background: var(--ink-700);
  border: 1px solid var(--ink-600);
  color: #b8c7d6;
  font-size: 0.75rem;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
}
.kw[aria-pressed='true'] { background: var(--act-soft); border-color: var(--act); color: #5fe0cf; }

.field { padding: 0 1rem 0.9rem; }
.field label { display: block; font-size: 0.75rem; color: var(--dim); margin-bottom: 0.35rem; }
.field input[type='text'], .field input[type='time'], .field input[type='date'], .field select {
  width: 100%;
  background: var(--ink-900);
  border: 1px solid var(--ink-600);
  border-radius: 9px;
  padding: 0.55rem 0.7rem;
  color: #dde5ee;
  font-size: 0.875rem;
}

/* ============================================================
   6. 관리자 웹 — 주광
   ============================================================ */
.admin { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; background: var(--paper); }
@media (max-width: 900px) { .admin { grid-template-columns: 1fr; } }

.side {
  background: var(--ink-900);
  color: #9fb1c4;
  padding: 1.25rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.side-brand { padding: 0.25rem 0.6rem 1.15rem; }
.side-brand .nm {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  color: #fff;
  letter-spacing: -0.02em;
}
.side-brand .sub { font-size: 0.6875rem; color: #6d8299; margin-top: 0.1rem; }
.side-group { font-size: 0.625rem; color: #566b80; padding: 0.9rem 0.6rem 0.3rem; }
.side a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  border-radius: 7px;
  font-size: 0.8125rem;
  text-decoration: none;
  color: #9fb1c4;
}
.side a:hover { background: var(--ink-700); color: #fff; }
.side a[aria-current='page'] { background: var(--ink-700); color: #fff; }
.side a .cnt {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  background: var(--danger);
  color: #fff;
  border-radius: 999px;
  padding: 0.02rem 0.35rem;
  min-width: 1.15rem;
  text-align: center;
}
.side a .cnt.calm { background: var(--ink-600); color: #b8c7d6; }
.side-foot { margin-top: auto; padding: 1rem 0.6rem 0; font-size: 0.6875rem; color: #566b80; line-height: 1.7; }
.side-foot a { display: inline; padding: 0; color: var(--act); }

.main { padding: 1.5rem 1.75rem 3rem; min-width: 0; }
@media (max-width: 700px) { .main { padding: 1.25rem 1rem 2rem; } }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head h1 { font-family: var(--font-display); font-size: 1.55rem; letter-spacing: -0.025em; }
.page-head .lede { font-size: 0.8125rem; color: var(--text-500); margin-top: 0.3rem; max-width: 70ch; line-height: 1.7; }
.page-head .ref { font-family: var(--font-mono); font-size: 0.6875rem; color: var(--text-500); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: 0.85rem; margin-bottom: 1.5rem; }
.stat {
  background: var(--paper-card);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius);
  padding: 0.95rem 1.05rem;
}
.stat .lb { font-size: 0.75rem; color: var(--text-500); }
.stat .v { font-size: 1.65rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; margin-top: 0.15rem; }
.stat .sub { font-size: 0.6875rem; color: var(--text-500); margin-top: 0.1rem; }
.stat[data-alarm='1'] { border-color: rgba(226, 87, 76, 0.45); background: #fef6f5; }
.stat[data-alarm='1'] .v { color: #c0392f; }

.panel {
  background: var(--paper-card);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.panel-head {
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--paper-line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.panel-head h2 { font-size: 1rem; }
.panel-head .ref { font-family: var(--font-mono); font-size: 0.6875rem; color: var(--text-500); }
.panel-head .acts { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.panel-body { padding: 1.1rem; }
.panel-body.flush { padding: 0; }
.panel-note {
  padding: 0.8rem 1.1rem;
  background: #f7f9fb;
  border-top: 1px solid var(--paper-line-soft);
  font-size: 0.75rem;
  color: var(--text-500);
  line-height: 1.7;
}

/* 표 */
.tbl { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
.tbl th {
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text-500);
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--paper-line);
  background: #f8fafb;
  white-space: nowrap;
  position: sticky;
  top: 0;
}
.tbl td { padding: 0.6rem 0.85rem; border-bottom: 1px solid var(--paper-line-soft); vertical-align: middle; }
.tbl tbody tr:hover { background: #f8fafb; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--font-mono); font-size: 0.75rem; }
.tbl .nowrap { white-space: nowrap; }
.tbl-scroll { overflow-x: auto; max-height: 30rem; overflow-y: auto; }

.pill {
  display: inline-block;
  font-size: 0.6875rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  border: 1px solid;
  white-space: nowrap;
  font-weight: 500;
}
.pill-ok      { color: #0b7a6c; border-color: #9ad9d0; background: #e8f8f6; }
.pill-wait    { color: #946100; border-color: #f0d49a; background: #fdf6e7; }
.pill-bad     { color: #b3382e; border-color: #f0b4ae; background: #fdf0ef; }
.pill-calm    { color: var(--text-500); border-color: var(--paper-line); background: #f4f6f8; }
.pill-lit     { color: #8a5d00; border-color: #f3cf90; background: #fdf4e3; }

.mono { font-family: var(--font-mono); font-size: 0.75rem; }
.muted { color: var(--text-500); }
.small { font-size: 0.75rem; }

/* 심사 대조 화면 — 03번 3-7장 2단 */
.review-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; }
@media (max-width: 1100px) { .review-grid { grid-template-columns: 1fr; } }
.review-col { padding: 1.1rem; }
.review-col + .review-col { border-left: 1px solid var(--paper-line-soft); }
@media (max-width: 1100px) { .review-col + .review-col { border-left: none; border-top: 1px solid var(--paper-line-soft); } }
.review-col > h3 { font-size: 0.8125rem; color: var(--text-500); margin-bottom: 0.7rem; font-weight: 600; }

.dl { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 0.4rem 0.9rem; font-size: 0.8125rem; }
.dl dt { color: var(--text-500); }
.dl dd { margin: 0; }

.caveat {
  margin-top: 0.8rem;
  background: #fdf6e7;
  border: 1px solid #f0d49a;
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.8rem;
  font-size: 0.75rem;
  color: #7a5100;
  line-height: 1.65;
}

.shots { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.shots img {
  width: 92px; height: 92px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--paper-line);
}

.minimap { border: 1px solid var(--paper-line); border-radius: var(--radius-sm); overflow: hidden; background: #eef1f4; }
.minimap svg { display: block; width: 100%; height: auto; }
.minimap .mm-road { stroke: #d2d9e0; fill: none; }
.minimap .mm-pin { fill: var(--danger); stroke: #fff; stroke-width: 2; }
.minimap .mm-near { fill: #8ba0b5; }
.minimap .mm-label { fill: #5b6e82; font-size: 8px; font-family: var(--font-ui); }

.decide-bar {
  padding: 1rem 1.1rem;
  border-top: 1px solid var(--paper-line);
  background: #f8fafb;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.decide-bar .memo {
  flex: 1 1 18rem;
  min-width: 12rem;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  font-size: 0.8125rem;
  background: #fff;
}

.abtn {
  border: 1px solid var(--paper-line);
  background: #fff;
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-900);
}
.abtn:hover { background: #f4f6f8; }
.abtn-primary { background: var(--act); border-color: var(--act-dark); color: #fff; }
.abtn-primary:hover { background: var(--act-dark); }
.abtn-danger { background: #fff; border-color: #f0b4ae; color: #b3382e; }
.abtn-danger:hover { background: #fdf0ef; }
.abtn-sm { padding: 0.28rem 0.55rem; font-size: 0.75rem; }
.abtn:disabled { opacity: 0.5; cursor: not-allowed; }

/* 가중치 미리보기 — 06번 9-2장 2단 비교 */
.cmp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; }
@media (max-width: 900px) { .cmp { grid-template-columns: 1fr; } }
.cmp-col { padding: 0.9rem 1.1rem; }
.cmp-col + .cmp-col { border-left: 1px solid var(--paper-line-soft); background: #fbfcfd; }
@media (max-width: 900px) { .cmp-col + .cmp-col { border-left: none; border-top: 1px solid var(--paper-line-soft); } }
.cmp-col h3 { font-size: 0.8125rem; margin-bottom: 0.2rem; }
.cmp-col .ws { font-family: var(--font-mono); font-size: 0.6875rem; color: var(--text-500); margin-bottom: 0.7rem; }
.rank-row {
  display: grid;
  grid-template-columns: 1.6rem minmax(0, 1fr) 3.3rem 2.6rem;
  gap: 0.45rem;
  align-items: center;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--paper-line-soft);
  font-size: 0.8125rem;
}
.rank-row .rk { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-500); text-align: right; }
.rank-row .nm2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row .sc { font-family: var(--font-mono); font-size: 0.75rem; text-align: right; font-variant-numeric: tabular-nums; }
.rank-row .dv { font-family: var(--font-mono); font-size: 0.6875rem; text-align: right; }
.rank-row .dv.up { color: #0b7a6c; }
.rank-row .dv.down { color: #b3382e; }
.rank-row .dv.new { color: #946100; }

.wsliders { display: grid; gap: 0.75rem; }
.wsl { display: grid; grid-template-columns: 1.3rem 5.5rem minmax(0, 1fr) 3.2rem; gap: 0.6rem; align-items: center; }
.wsl .k { font-family: var(--font-mono); font-size: 0.8125rem; color: #946100; font-weight: 600; }
.wsl .l { font-size: 0.8125rem; }
.wsl input[type='range'] { width: 100%; accent-color: var(--act); }
.wsl .v {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.wsl .f { grid-column: 2 / -1; font-size: 0.6875rem; color: var(--text-500); margin-top: -0.4rem; font-family: var(--font-mono); }
.wsum { margin-top: 0.9rem; font-size: 0.8125rem; display: flex; justify-content: space-between; }
.wsum .bad { color: #b3382e; }

.bars { display: grid; gap: 0.35rem; }
.bar-row { display: grid; grid-template-columns: 7rem minmax(0, 1fr) 3.2rem; gap: 0.6rem; align-items: center; font-size: 0.8125rem; }
.bar-row .tr { height: 8px; background: #e9edf1; border-radius: 4px; overflow: hidden; }
.bar-row .tr i { display: block; height: 100%; background: var(--act); border-radius: 4px; }
.bar-row .tr i.lit { background: var(--lit); }
.bar-row .vv { text-align: right; font-family: var(--font-mono); font-size: 0.75rem; font-variant-numeric: tabular-nums; }

.timefit-tbl input {
  width: 3.4rem;
  border: 1px solid var(--paper-line);
  border-radius: 5px;
  padding: 0.2rem 0.3rem;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.alert-row {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  margin-bottom: 0.4rem;
}
.alert-row[data-l='warn']   { background: #fdf6e7; color: #7a5100; }
.alert-row[data-l='danger'] { background: #fdf0ef; color: #b3382e; }
.alert-row[data-l='info']   { background: #eef4fa; color: #2c5578; }

.seg-a { display: inline-flex; border: 1px solid var(--paper-line); border-radius: 8px; overflow: hidden; background: #fff; }
.seg-a button { background: none; border: none; padding: 0.35rem 0.7rem; font-size: 0.75rem; color: var(--text-700); }
.seg-a button + button { border-left: 1px solid var(--paper-line); }
.seg-a button[aria-pressed='true'] { background: var(--ink-900); color: #fff; }

.spark { display: flex; align-items: flex-end; gap: 2px; height: 48px; }
.spark i { flex: 1; background: var(--act-soft); border-radius: 2px 2px 0 0; min-height: 2px; }
.spark i.hi { background: var(--act); }

.empty-admin { padding: 2.5rem 1.1rem; text-align: center; color: var(--text-500); font-size: 0.875rem; }
.empty-admin .t { color: var(--text-900); font-weight: 600; margin-bottom: 0.3rem; }

.loading { padding: 2rem 1.1rem; color: var(--text-500); font-size: 0.875rem; }

/* 공통 유틸 */
.row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.hide { display: none !important; }
.sr {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
