/* =========================================================
   배달지사 — 공통 스타일
   색은 아래 :root 변수만 고치면 전체에 반영됩니다.
   ========================================================= */

:root {
  color-scheme: light;
  /* 바탕: 퍼스트 라이더스 블루·화이트에 맞춘 차가운 회백색 */
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --line: #e2e6eb;
  --line-strong: #cbd2da;
  --text: #20252b;
  --text-2: #59616a;
  --text-3: #868e97;

  --accent: #4f6577;          /* 화면별로 아래에서 바뀜 */
  --accent-ink: #ffffff;
  --accent-soft: #eef1f3;

  --danger: #9c4f47;
  --danger-soft: #f6ecea;
  --info: #4f6577;
  --info-soft: #eef1f3;
  --ok: #5a7566;
  --ok-soft: #edf2ee;
  --warn: #7d6a45;
  --warn-soft: #f4efe4;

  /* 홈 브랜드 블루 계열 */
  --brand-ink: #0a6fb0;
  --brand-soft: #e8f5ff;
  --brand-soft-line: #bfe3fb;
  --dashed: #d5dbe2;
  --backdrop: rgba(35, 39, 43, .4);

  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(35, 39, 43, .04), 0 8px 24px rgba(35, 39, 43, .06);
  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}

/* 화면별 포인트 색 (채도 낮게) */
/* 소속기사 = 퍼스트 라이더스 브랜드 블루, 바이크샵 고객 = 회색 */
[data-login="affiliated"], [data-signup="affiliated"] { --accent: #2f5b9a; --accent-soft: #eaf0f8; }
[data-login="rider"],      [data-signup="rider"]      { --accent: #676d74; --accent-soft: #eff0f1; }
[data-login="operator"]                               { --accent: #786754; --accent-soft: #f3efe9; }
[data-login="master"]                                 { --accent: #363b41; --accent-soft: #ececea; }

/* =========================================================
   다크 모드
   - 휴대폰·PC가 다크 모드면 자동으로 적용
   - 머리말의 달/해 버튼으로 직접 바꾸면 그 선택을 기억 (data-theme)
   ========================================================= */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f151c;
    --surface: #171f28;
    --surface-2: #1c2530;
    --line: #29333f;
    --line-strong: #3a4654;
    --text: #e5eaf0;
    --text-2: #a8b2bc;
    --text-3: #7d8893;
    --accent: #6f8aa3;
    --accent-ink: #ffffff;
    --accent-soft: #1e2833;
    --danger: #ee8b80;
    --danger-soft: #3a2224;
    --info: #9db8d6;
    --info-soft: #1d2836;
    --ok: #8cc4a2;
    --ok-soft: #1a2c23;
    --warn: #e0c58f;
    --warn-soft: #33291a;
    --brand-ink: #4fb6ff;
    --brand-soft: rgba(0, 161, 255, .12);
    --brand-soft-line: rgba(0, 161, 255, .35);
    --dashed: #3a4654;
    --backdrop: rgba(0, 0, 0, .6);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  --panel-ink: #e5eaf0;
  }
  :root:not([data-theme="light"]) [data-login="affiliated"], :root:not([data-theme="light"]) [data-signup="affiliated"] { --accent: #4a7fc8; --accent-soft: #1b2a3e; --panel: #1b3150; }
  :root:not([data-theme="light"]) [data-login="rider"], :root:not([data-theme="light"]) [data-signup="rider"] { --accent: #7c848d; --accent-soft: #232a32; --panel: #262d35; }
  :root:not([data-theme="light"]) [data-login="operator"] { --accent: #9c8468; --accent-soft: #2b251e; --panel: #352d24; }
  :root:not([data-theme="light"]) [data-login="master"] { --accent: #c3c9cf; --accent-ink: #11171e; --accent-soft: #252c34; --panel: #222a33; }
  :root:not([data-theme="light"]) .app-logo .logo-on-light { display: none; }
  :root:not([data-theme="light"]) .app-logo .logo-on-dark { display: block; }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f151c;
  --surface: #171f28;
  --surface-2: #1c2530;
  --line: #29333f;
  --line-strong: #3a4654;
  --text: #e5eaf0;
  --text-2: #a8b2bc;
  --text-3: #7d8893;
  --accent: #6f8aa3;
  --accent-ink: #ffffff;
  --accent-soft: #1e2833;
  --danger: #ee8b80;
  --danger-soft: #3a2224;
  --info: #9db8d6;
  --info-soft: #1d2836;
  --ok: #8cc4a2;
  --ok-soft: #1a2c23;
  --warn: #e0c58f;
  --warn-soft: #33291a;
  --brand-ink: #4fb6ff;
  --brand-soft: rgba(0, 161, 255, .12);
  --brand-soft-line: rgba(0, 161, 255, .35);
  --dashed: #3a4654;
  --backdrop: rgba(0, 0, 0, .6);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  --panel-ink: #e5eaf0;
}
:root[data-theme="dark"] [data-login="affiliated"], :root[data-theme="dark"] [data-signup="affiliated"] { --accent: #4a7fc8; --accent-soft: #1b2a3e; --panel: #1b3150; }
:root[data-theme="dark"] [data-login="rider"], :root[data-theme="dark"] [data-signup="rider"] { --accent: #7c848d; --accent-soft: #232a32; --panel: #262d35; }
:root[data-theme="dark"] [data-login="operator"] { --accent: #9c8468; --accent-soft: #2b251e; --panel: #352d24; }
:root[data-theme="dark"] [data-login="master"] { --accent: #c3c9cf; --accent-ink: #11171e; --accent-soft: #252c34; --panel: #222a33; }
:root[data-theme="dark"] .app-logo .logo-on-light { display: none; }
:root[data-theme="dark"] .app-logo .logo-on-dark { display: block; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; line-height: 1.3; letter-spacing: -0.02em; }
p { margin: 0; }
[hidden] { display: none !important; }

.brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 16px; letter-spacing: -0.01em;
  color: inherit; text-decoration: none;
}
.brand::before {
  content: ''; width: 10px; height: 10px; border-radius: 3px;
  background: var(--accent);
}
.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--accent);
}

/* ---------- 폼 ---------- */
.field { display: grid; gap: 6px; margin-bottom: 16px; align-content: start; }
.field label { font-size: 14px; font-weight: 600; color: var(--text); }
.field .hint { font-size: 13px; color: var(--text-3); }
.input, .field input {
  width: 100%; height: 48px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); color: var(--text);
  font: inherit; font-size: 16px; /* iOS 확대 방지 */
  transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder { color: var(--text-3); }
.field input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 68px; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  height: 36px; padding: 0 10px; border: 0; border-radius: 8px;
  background: transparent; color: var(--text-2); font: inherit; font-size: 13px; cursor: pointer;
}
.pw-toggle:hover { background: var(--surface-2); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background .15s, opacity .15s, border-color .15s;
}
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { width: 100%; height: 50px; background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn:focus-visible, .pw-toggle:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

.notice {
  margin: 4px 0 16px; padding: 12px 14px; border-radius: 10px;
  font-size: 14px; line-height: 1.5; white-space: pre-line;
  background: var(--danger-soft); color: var(--danger);
}
.notice[data-kind="info"] { background: var(--info-soft); color: var(--info); }
.notice[data-kind="ok"] { background: var(--ok-soft); color: var(--ok); }
.notice a { color: inherit; font-weight: 600; }

/* ---------- 동의 항목 ---------- */
.consents {
  margin: 8px 0 20px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface-2);
}
.consent-row {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px;
  font-size: 14px; cursor: pointer;
}
.consent-row + .consent-row, .consent-row + details, details + .consent-row { border-top: 1px solid var(--line); }
.consent-all { font-weight: 700; }
.consent-row input {
  width: 18px; height: 18px; margin: 2px 0 0; flex: none;
  accent-color: var(--accent);
}
.consent-row .tag { color: var(--text-3); font-weight: 500; margin-right: 4px; }
.consent-row .tag.req { color: var(--accent); }
details.consent-detail { padding: 0 14px 12px 42px; font-size: 13px; color: var(--text-2); }
details.consent-detail summary { cursor: pointer; color: var(--text-3); margin-bottom: 6px; }
details.consent-detail dl { margin: 0; display: grid; grid-template-columns: 72px 1fr; gap: 4px 8px; }
details.consent-detail dt { color: var(--text-3); }
details.consent-detail dd { margin: 0; }

/* =========================================================
   로그인·가입 화면
   기본 = 레이아웃 A (가운데 카드형)
   ========================================================= */
.auth-shell {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 20px; padding: 32px 16px;
}
.auth-brand { width: min(420px, 100%); text-align: center; }
.auth-brand-copy, .auth-brand-foot { display: none; }
.auth-main { width: min(420px, 100%); display: grid; gap: 16px; }
body[data-signup] .auth-brand, body[data-signup] .auth-main { width: min(480px, 100%); }

.auth-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 28px 24px;
}
.auth-card > .eyebrow { margin-bottom: 6px; }
.auth-card > h2 { font-size: 22px; margin-bottom: 6px; }
.auth-card > .lead { color: var(--text-2); font-size: 14px; margin-bottom: 24px; }
.auth-alt { margin-top: 18px; text-align: center; font-size: 14px; color: var(--text-2); }
.auth-switch {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px;
  font-size: 13px; color: var(--text-3);
}
.auth-switch a { color: var(--text-2); text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

@media (min-width: 480px) {
  .auth-card { padding: 36px 36px 32px; }
}

/* =========================================================
   레이아웃 B (좌우 분할형)
   ========================================================= */
body[data-layout="b"] .auth-shell {
  display: grid; grid-template-columns: 1fr; grid-template-rows: auto 1fr;
  align-items: stretch; justify-content: stretch;
  gap: 0; padding: 0;
}
body[data-layout="b"] .auth-brand {
  width: auto; text-align: left;
  background: var(--panel, var(--accent)); color: var(--panel-ink, var(--accent-ink));
  padding: 20px 16px 28px;
  display: flex; flex-direction: column; gap: 20px;
}
body[data-layout="b"] .auth-brand .brand::before { background: var(--panel-ink, var(--accent-ink)); opacity: .85; }
body[data-layout="b"] .auth-brand-copy { display: grid; gap: 8px; }
body[data-layout="b"] .auth-brand-copy .eyebrow { color: inherit; opacity: .75; }
body[data-layout="b"] .auth-brand-copy h1 { font-size: 22px; font-weight: 700; }
body[data-layout="b"] .auth-brand-copy p:last-child { font-size: 14px; opacity: .8; }
body[data-layout="b"] .auth-main {
  width: auto; padding: 28px 16px 40px; align-content: start; justify-items: center;
}
body[data-layout="b"] .auth-card {
  width: min(420px, 100%); border: 0; box-shadow: none; background: transparent; padding: 0;
}
body[data-signup][data-layout="b"] .auth-card { width: min(480px, 100%); }
body[data-layout="b"] .auth-card > .eyebrow { display: none; }

@media (min-width: 900px) {
  body[data-layout="b"] .auth-shell { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); grid-template-rows: auto; min-height: 100dvh; }
  body[data-layout="b"] .auth-brand {
    padding: 40px 48px; justify-content: space-between;
    position: sticky; top: 0; height: 100vh; height: 100dvh;
  }
  body[data-layout="b"] .auth-brand-copy { gap: 14px; max-width: 420px; }
  body[data-layout="b"] .auth-brand-copy h1 { font-size: 34px; line-height: 1.25; }
  body[data-layout="b"] .auth-brand-copy p:last-child { font-size: 15px; }
  body[data-layout="b"] .auth-brand-foot { display: block; font-size: 13px; opacity: .6; }
  body[data-layout="b"] .auth-main { align-content: center; padding: 48px; }
  body[data-layout="b"] .auth-card > h2 { font-size: 26px; }
}

/* =========================================================
   로그인 후 화면 (앱)
   ========================================================= */
.app-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.app-header-inner {
  max-width: 960px; margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.app-user { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); min-width: 0; }
.app-user .name { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  background: var(--accent-soft); color: var(--accent);
}
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--danger-soft); color: var(--danger); }
.chip.good { background: var(--ok-soft); color: var(--ok); }
.app-header .btn { height: 36px; padding: 0 12px; font-size: 14px; }
/* 로그인 후 화면 머리말: 글자 로고 (좁은 화면에서도 항상 보이게) */
.app-logo { display: block; flex: 0 1 auto; min-width: 72px; }
.app-logo img { display: block; width: clamp(80px, 27vw, 129px); max-width: 100%; height: auto; }
.app-logo .logo-on-dark { display: none; }
.app-user .name { min-width: 0; }
@media (max-width: 420px) {
  .app-header-inner { gap: 8px; }
  .app-user { gap: 6px; }
  .app-header .btn { padding: 0 10px; font-size: 13px; }
  .app-user .chip { padding: 0 7px; font-size: 11px; }
}

.app-main { max-width: 960px; margin: 0 auto; padding: 24px 16px 64px; display: grid; gap: 16px; }
.page-title { font-size: 22px; margin: 8px 0 4px; }
.page-sub { color: var(--text-2); font-size: 14px; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 20px;
}
.card > h2 { font-size: 16px; margin-bottom: 14px; }
.grid-2 { display: grid; gap: 16px; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.kv { display: grid; grid-template-columns: 96px 1fr; gap: 10px 12px; margin: 0; font-size: 14px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; }

.balance { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.balance small { font-size: 16px; font-weight: 600; color: var(--text-2); margin-left: 2px; }

.ledger { list-style: none; margin: 0; padding: 0; }
.ledger li {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px;
  padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px;
}
.ledger li:first-child { border-top: 0; }
.ledger .reason { font-weight: 500; }
.ledger .meta { color: var(--text-3); font-size: 13px; }
.ledger .amt { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.ledger .amt.plus { color: var(--ok); }
.ledger .amt.minus { color: var(--danger); }
.ledger .after { text-align: right; color: var(--text-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.empty { color: var(--text-3); font-size: 14px; padding: 8px 0; }

.toggle-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; font-size: 14px; cursor: pointer; }
.toggle-row + .toggle-row { border-top: 1px solid var(--line); }
.toggle-row input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.toggle-row .desc { display: block; color: var(--text-3); font-size: 13px; }

.loading { color: var(--text-3); font-size: 14px; padding: 40px 0; text-align: center; }

/* =========================================================
   관리자 화면
   ========================================================= */
.admin-shell { max-width: 1200px; margin: 0 auto; }
.admin-nav {
  position: sticky; top: 61px; z-index: 9;
  display: flex; gap: 4px; overflow-x: auto;
  padding: 8px 16px; background: var(--bg); border-bottom: 1px solid var(--line);
}
.admin-nav a {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 38px; padding: 0 14px; border-radius: 10px;
  color: var(--text-2); text-decoration: none; font-size: 14px; font-weight: 600;
}
.admin-nav a:hover { background: var(--surface); }
.admin-nav a[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.admin-nav .count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--accent-ink); font-size: 12px;
}
/* 사업별 묶음 이름: 색 띠 없이 작은 점으로만 구분 (라이더스 = 소속기사 블루, 바이크샵 = 회색) */
.nav-group {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 38px; padding: 0 4px 0 14px; margin-left: 8px; border-left: 1px solid var(--line);
  font-size: 12px; font-weight: 600; color: var(--text-3); white-space: nowrap;
}
.biz-dot, .nav-group[data-biz]::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%; flex: none; display: inline-block;
}
[data-biz="riders"].nav-group::before, .biz-dot[data-biz="riders"] { background: #2f5b9a; }
[data-biz="shop"].nav-group::before, .biz-dot[data-biz="shop"] { background: #8a9097; }
.biz-label { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 800; color: var(--text); margin: 0; }
.biz-label .biz-dot { width: 10px; height: 10px; }
/* 현황: 사업별 묶음. 두 묶음 사이에 넓은 간격과 가로선 */
.biz-group { display: grid; gap: 16px; min-width: 0; }
.biz-group + .biz-group { margin-top: 36px; padding-top: 44px; border-top: 2px solid color-mix(in srgb, var(--text) 28%, transparent); }
/* 퍼스트 라이더스 요약 칸: 아주 옅은 푸른 바탕 (사용자 요청) */
.stats[data-biz="riders"] .stat { background: color-mix(in srgb, #2f7fd0 7%, var(--surface)); border-color: color-mix(in srgb, #2f7fd0 22%, var(--line)); }
.admin-view { padding: 24px 16px 64px; display: grid; gap: 16px; min-width: 0; }

@media (min-width: 900px) {
  .admin-shell { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 8px; }
  .admin-nav {
    flex-direction: column; align-self: start; height: auto;
    padding: 24px 0 24px 16px; border-bottom: 0; background: transparent;
  }
  .admin-nav a { justify-content: space-between; }
  .admin-nav .nav-group { height: auto; margin: 14px 12px 4px 0; padding: 14px 14px 0; border-left: 0; border-top: 1px solid var(--line-strong); }
  .admin-view { padding: 24px 16px 64px 8px; }
}

.view-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.view-head .page-title { margin: 0; }
.back-link { font-size: 14px; color: var(--text-2); text-decoration: none; }
.back-link:hover { color: var(--text); }

.stats { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; container-type: inline-size; }
.stat .label { font-size: 13px; color: var(--text-3); }
.stat .value { font-size: 24px; font-size: clamp(16px, 15cqi, 24px); font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .value small { font-size: 14px; font-weight: 600; color: var(--text-2); margin-left: 2px; }
/* 메뉴줄 바로 아래 대기자 줄: '대기자 N명 · 약 N분' + 순서별 작업·시간 (옆으로 밀어서 보기). 로고 크기를 건드리지 않게 메뉴줄과 따로 둠 */
.queue-strip { display: grid; gap: 6px; padding: 8px max(16px, calc((100% - 1080px) / 2 + 16px)) 10px; border-top: 1px solid var(--line); color: var(--text-2); font-size: 14px; }
.app-header .queue-strip { padding-inline: max(16px, calc((100% - 960px) / 2 + 16px)); }
.queue-strip[hidden] { display: none; }
.queue-strip .q-head { margin: 0; display: flex; align-items: baseline; gap: 8px; }
.queue-strip .q-count b { font-size: 18px; font-weight: 800; color: var(--text); margin: 0 1px; font-variant-numeric: tabular-nums; }
.queue-strip .q-time { font-weight: 700; color: var(--text); }
.queue-strip .q-time::before { content: '·'; margin-right: 8px; color: var(--text-3); font-weight: 400; }
.queue-strip .q-items { list-style: none; margin: 0; padding: 0 0 2px; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.queue-strip .q-items:empty { display: none; }
.queue-strip .q-items::-webkit-scrollbar { display: none; }
.queue-strip .q-items li { flex: none; display: flex; align-items: center; gap: 6px; padding: 5px 10px 5px 5px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; white-space: nowrap; scroll-snap-align: start; }
.queue-strip .q-items .q-no { width: 20px; height: 20px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.queue-strip .q-items b { color: var(--text); font-weight: 700; }
.queue-strip .q-items li span:last-child { color: var(--text-3); }
.queue-strip .q-items li.on { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.queue-strip .q-items li.on span:last-child { color: var(--accent); font-weight: 700; }
.site-header .queue-strip { border-top-color: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .78); }
.site-header .queue-strip .q-count b, .site-header .queue-strip .q-time, .site-header .queue-strip .q-items b { color: #fff; }
.site-header .queue-strip .q-time::before, .site-header .queue-strip .q-items li span:last-child { color: rgba(255, 255, 255, .55); }
.site-header .queue-strip .q-items li { border-color: rgba(255, 255, 255, .14); }
.site-header .queue-strip .q-items .q-no { background: rgba(255, 255, 255, .1); color: #fff; }
.site-header .queue-strip .q-items li.on { border-color: rgba(0, 161, 255, .6); }
.site-header .queue-strip .q-items li.on span:last-child { color: #6cc4ff; }
/* 대기 현황 창·관리자 대기 줄 목록 */
.queue-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; max-height: 52vh; overflow: auto; }
.queue-list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.queue-list li:first-child { border-top: 0; }
.queue-list li.empty { justify-content: center; color: var(--text-3); }
.queue-list .q-no { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: 13px; font-weight: 800; flex: none; }
.queue-list .q-what { display: grid; min-width: 0; }
.queue-list .q-what b { overflow-wrap: anywhere; }
.queue-list small { font-size: 12px; color: var(--text-3); }
.queue-list .q-when { margin-left: auto; display: grid; justify-items: end; gap: 2px; text-align: right; flex: none; }
.queue-list .q-min { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; }
.queue-list .q-min b { min-width: 56px; text-align: center; font-variant-numeric: tabular-nums; }
.queue-list .q-min .btn { min-width: 40px; padding: 0 8px; }
.queue-list .q-acts { margin-left: auto; display: flex; gap: 6px; flex: none; }
.wait-card { margin-bottom: 4px; }
.wait-card .card-head { margin-bottom: 10px; flex-wrap: wrap; }
.wait-card .sub { font-size: 13px; color: var(--text-3); }
.q-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.q-presets small { color: var(--text-3); font-weight: 600; margin-left: 2px; }
.q-custom { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.q-custom input[name="svc"] { flex: 1 1 180px; }
.q-custom input[name="min"] { width: 90px; }

.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { font-size: 16px; min-width: 0; }
.card-head .actions { flex-wrap: nowrap; align-items: center; flex: none; }
.card-head a { font-size: 13px; color: var(--text-2); }

/* 툴바: 검색 + 필터 */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.search {
  flex: 1 1 220px; height: 42px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface);
  font: inherit; font-size: 15px; color: var(--text);
}
.search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filter {
  height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.filter[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--surface); }

/* 회원 목록: 휴대폰은 카드, PC는 표 */
.mlist { list-style: none; margin: 0; padding: 0; }
.mlist li + li { border-top: 1px solid var(--line); }
.mrow {
  display: grid; gap: 4px 12px; align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "who bal" "sub sub";
  padding: 14px 4px; color: inherit; text-decoration: none; border-radius: 8px;
}
a.mrow:hover { background: var(--surface-2); }
.mrow .who { grid-area: who; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.mrow .who strong { font-size: 15px; }
.mrow > .sub { grid-area: sub; font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.mrow .who .sub { font-size: 13px; color: var(--text-3); width: 100%; }
.mrow .bal { grid-area: bal; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.mrow .actions { grid-area: bal; }
.mrow .go, .mrow .col-date { display: none; }
.mlist-head { display: none; }
@media (min-width: 760px) {
  .mrow {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, 1fr) 110px 16px;
    grid-template-areas: "who sub date bal go";
    padding: 12px 8px;
  }
  .mrow .col-date { display: block; grid-area: date; }
  .mrow .go { display: block; grid-area: go; color: var(--text-3); }
  .mlist-head {
    display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, 1fr) 110px 16px; gap: 12px;
    padding: 0 8px 8px; font-size: 12px; color: var(--text-3); border-bottom: 1px solid var(--line);
  }
  .mlist-head span:nth-child(4) { text-align: right; }
}

.prow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; padding: 12px 4px; }
.prow .who { display: grid; gap: 2px; }
.prow .who a { color: inherit; text-decoration: none; }
.prow .who a:hover { text-decoration: underline; }
.prow .sub { font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }

.chip.muted { background: var(--surface-2); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line); }
.chip.dark { background: #363b41; color: #fff; }

/* 회원 상세 */
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn-solid { background: var(--accent); color: var(--accent-ink); }
.btn-solid:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn-danger { background: transparent; border-color: color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: var(--danger-soft); }
.select {
  height: 40px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); font: inherit; font-size: 15px; color: var(--text);
}

/* =========================================================
   공용 선택 목록 (assets/js/picker.js) — 휴대폰 기본 선택 창 대신
   ========================================================= */
.pick-native { position: absolute !important; width: 1px !important; min-width: 0 !important; height: 1px !important; padding: 0 !important; border: 0 !important; opacity: 0; pointer-events: none; }
.pick-btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 10px;
  height: 40px; min-width: 160px; max-width: 100%; padding: 0 12px 0 14px;
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface);
  font: inherit; font-size: 15px; color: var(--text); cursor: pointer; text-align: left;
  transition: border-color .15s, box-shadow .15s;
}
.pick-btn:hover { border-color: var(--text-3); }
.pick-btn:focus-visible, .pick-btn[aria-expanded="true"] { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.pick-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-chev { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--text-3); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s; }
.pick-btn[aria-expanded="true"] .pick-chev { transform: rotate(180deg); }

.pick-backdrop { position: fixed; inset: 0; z-index: 100; background: transparent; }
.pick-backdrop.is-sheet { background: rgba(5, 10, 16, 0); transition: background .18s; }
.pick-backdrop.is-sheet.is-open { background: rgba(5, 10, 16, .45); }
.pick-panel {
  position: fixed; z-index: 101; max-height: min(320px, 60vh); overflow: hidden; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(-4px); transition: opacity .15s, transform .15s;
}
.pick-panel.is-open { opacity: 1; transform: none; }
/* 휴대폰: 화면 가운데 팝업 */
.pick-panel.is-sheet {
  left: 50%; top: 50%; width: min(400px, calc(100vw - 32px)); max-height: 70vh; border-radius: 20px;
  padding: 16px 8px 8px; transform: translate(-50%, -50%) scale(.96); transition: opacity .18s, transform .18s cubic-bezier(.2, .8, .2, 1);
}
.pick-panel.is-sheet.is-open { transform: translate(-50%, -50%); }
.pick-title { font-size: 13px; font-weight: 600; color: var(--text-3); padding: 0 12px 8px; flex: none; }
.pick-close {
  flex: none; margin: 8px 4px 0; height: 48px; border: 1px solid var(--line); border-radius: 12px;
  background: transparent; color: var(--text-2); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
.pick-close:hover { background: var(--surface-2); color: var(--text); }
.pick-list { list-style: none; margin: 0; padding: 4px; overflow-y: auto; outline: none; }
.pick-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 42px; padding: 0 12px; border-radius: 8px; font-size: 15px; color: var(--text); cursor: pointer;
}
.is-sheet .pick-opt { min-height: 52px; font-size: 16px; border-radius: 12px; }
.pick-opt:hover, .pick-opt.is-active { background: var(--accent-soft); }
.pick-opt[aria-selected="true"] { font-weight: 700; }
.pick-opt[aria-disabled="true"] { color: var(--text-3); cursor: default; }
.pick-check { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; visibility: hidden; }
.pick-opt[aria-selected="true"] .pick-check { visibility: visible; }
@media (prefers-reduced-motion: reduce) { .pick-panel, .pick-panel.is-sheet, .pick-backdrop.is-sheet, .pick-chev { transition: none; } }
.help { font-size: 13px; color: var(--text-3); margin-top: 8px; }

/* 적립금 입력 */
.seg-tabs { display: inline-flex; padding: 3px; gap: 3px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.seg-tabs label { position: relative; }
.seg-tabs input { position: absolute; opacity: 0; pointer-events: none; }
.seg-tabs span {
  display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 8px;
  font-size: 14px; font-weight: 600; color: var(--text-2); cursor: pointer;
}
.seg-tabs input:checked + span { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.seg-tabs input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.amount-wrap { position: relative; }
.amount-wrap input { padding-right: 40px; text-align: right; font-variant-numeric: tabular-nums; }
.amount-wrap .unit { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.field-row { display: grid; gap: 12px; }
@media (min-width: 560px) { .field-row { grid-template-columns: 180px 1fr; } }
/* 적립금 일괄 지급: 체크 목록 */
.check-all { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.bulk-list { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; }
.bulk-list li + li { border-top: 1px solid var(--line); }
.bulk-list label { display: flex; align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer; }
.bulk-list label:hover { background: var(--surface-2, var(--bg)); }
.bulk-list .who { display: grid; gap: 2px; flex: 1; min-width: 0; }
.bulk-list .sub { font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.bulk-list .bal { font-variant-numeric: tabular-nums; font-size: 14px; color: var(--text-2); }
.bulk-list input, .check-all input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.bulk-fields .field { margin-bottom: 0; }
.ledger .fix {
  grid-column: 1 / -1; justify-self: start; margin-top: 4px;
  border: 0; background: none; padding: 0; font: inherit; font-size: 13px; color: var(--text-2);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.ledger .who-link { color: var(--text-2); }

/* 확인 창 */
dialog.confirm {
  width: min(400px, calc(100% - 32px)); padding: 0; border: 0; border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,.2); color: var(--text); background: var(--surface);
}
dialog.confirm::backdrop { background: var(--backdrop); }
dialog.confirm .body { padding: 24px 24px 8px; display: grid; gap: 8px; }
dialog.confirm h3 { font-size: 17px; }
dialog.confirm p { font-size: 14px; color: var(--text-2); white-space: pre-line; }
dialog.confirm .foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px 20px; }
dialog.confirm .foot .btn { height: 40px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50;
  padding: 12px 18px; border-radius: 10px; background: #23272b; color: #fff; font-size: 14px; white-space: pre-line; text-align: center;
  box-shadow: var(--shadow); max-width: calc(100% - 32px);
}

/* =========================================================
   홈 홍보 섹션 (네이비, 탭 전환)
   ========================================================= */
.promo {
  --brand: #00a1ff;          /* 로고 블루 */
  --navy: #13202f;
  --navy-2: #1b2b3d;
  position: relative; overflow: hidden;
}
.promo-inner {
  max-width: 1080px; margin: 0 auto; padding: 48px 16px 40px;
  display: grid; gap: 32px; align-items: center;
}
.promo h1 { font-size: 30px; line-height: 1.3; margin-top: 20px; letter-spacing: -0.03em; }
.promo-lead { margin-top: 12px; font-size: 15px; line-height: 1.7; max-width: 30em; }
.promo-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.promo-cta .btn { height: 50px; padding: 0 22px; font-size: 15px; }
.promo-btn-primary { background: var(--brand); color: #fff; }
.promo-btn-primary:hover { background: color-mix(in srgb, var(--brand) 88%, #000); }
.promo-visual { display: flex; justify-content: center; }
.promo-visual .disc {
  width: min(320px, 78vw); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
}
.promo-visual img { width: 82%; height: auto; display: block; }
/* A안: 네이비 바탕, 글 왼쪽 · 심볼 오른쪽 */
body[data-hero="a"] .promo { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; }
body[data-hero="a"] .promo-lead { color: rgba(255, 255, 255, .72); }
body[data-hero="a"] .promo-btn-ghost { border-color: rgba(255, 255, 255, .35); color: #fff; background: transparent; }
body[data-hero="a"] .promo-btn-ghost:hover { background: rgba(255, 255, 255, .08); }
/* A안: 원 배경 없이 심볼만 */
body[data-hero="a"] .promo-visual .disc { width: min(260px, 66vw); aspect-ratio: auto; border-radius: 0; background: none; }
body[data-hero="a"] .promo-visual img { width: 100%; }
@media (min-width: 860px) {
  body[data-hero="a"] .promo-inner { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); padding: 72px 24px 56px; }
  body[data-hero="a"] .promo h1 { font-size: 42px; }
  body[data-hero="a"] .promo-visual { justify-content: flex-end; }
  body[data-hero="a"] .promo-visual .disc { width: 360px; }
}

/* =========================================================
   홈: 상단 머리말 · 적립 쿠폰 · 정비 주기 가이드
   ========================================================= */
.site-header { position: sticky; top: 0; z-index: 20; background: #13202f; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.site-header-inner {
  max-width: 1080px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.site-logo { flex: 0 1 auto; min-width: 0; }
.site-logo img { display: block; width: clamp(104px, 34vw, 167px); max-width: 100%; height: auto; }
.site-header-actions { flex: none; }
.header-login {
  display: inline-flex; align-items: center; flex: none; height: 40px; padding: 0 16px; border-radius: 10px;
  background: #fff; color: #13202f; font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.header-login:hover { background: #e9edf2; }
.header-login:focus-visible { outline: 2px solid #00a1ff; outline-offset: 2px; }
.promo .eyebrow-light { font-size: 14px; font-weight: 700; color: #7fd0ff; }

/* 적립 쿠폰 (네이비 위 흰 쿠폰 카드) */
.coupon-wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px 48px; }
.coupon {
  position: relative; background: var(--surface); color: var(--text); border-radius: 20px; overflow: hidden;
  display: grid; box-shadow: 0 20px 48px rgba(0, 0, 0, .25);
}
.coupon-main {
  position: relative; padding: 26px 24px 24px;
  background: linear-gradient(135deg, #00a1ff 0%, #0a6fb0 100%); color: #fff;
}
/* 쿠폰 절취선 느낌의 반원 홈 */
.coupon-main::before, .coupon-main::after {
  content: ""; position: absolute; width: 22px; height: 22px; border-radius: 50%; background: #1b2b3d; bottom: -11px;
}
.coupon-main::before { left: -11px; }
.coupon-main::after { right: -11px; }
.coupon-label { font-size: 13px; font-weight: 700; opacity: .85; }
.coupon-amount { font-size: 22px; font-weight: 700; margin-top: 6px; letter-spacing: -0.02em; }
.coupon-amount strong { font-size: 46px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin: 0 2px; }
.coupon-name { font-size: 18px; font-weight: 700; margin-top: 2px; }
.coupon-terms { list-style: none; margin: 0; padding: 22px 24px 24px; display: grid; gap: 14px; border-top: 2px dashed var(--dashed); }
.coupon-terms li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; align-items: center; }
.coupon-terms .ico {
  width: 40px; height: 40px; padding: 9px; border-radius: 10px; background: var(--brand-soft);
  fill: none; stroke: var(--brand-ink); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
.coupon-terms span { display: grid; gap: 2px; font-size: 13.5px; color: var(--text-2); }
.coupon-terms strong { font-size: 16px; color: var(--text); }
@media (min-width: 760px) {
  .coupon { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .coupon-main { padding: 34px 32px; display: flex; flex-direction: column; justify-content: center; }
  .coupon-main::before { left: auto; right: -11px; top: -11px; bottom: auto; }
  .coupon-main::after { right: -11px; bottom: -11px; }
  .coupon-main::before, .coupon-main::after { background: #1b2b3d; }
  .coupon-amount strong { font-size: 56px; }
  .coupon-terms { border-top: 0; border-left: 2px dashed var(--dashed); padding: 30px 32px; align-content: center; }
}
@media (min-width: 860px) {
  .coupon-wrap { padding: 0 24px 72px; }
}

/* 정비 주기 가이드 (밝은 바탕) */
.guide { background: var(--surface); border-bottom: 1px solid var(--line); }
.guide-inner { max-width: 1080px; margin: 0 auto; padding: 48px 16px 56px; display: grid; gap: 28px; }
.guide-head .eyebrow { color: var(--brand-ink); }
.guide-head h2 { font-size: 26px; margin-top: 8px; letter-spacing: -0.03em; }
.guide-lead { margin-top: 10px; color: var(--text-2); font-size: 15px; max-width: 32em; }
.guide-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: none; }
.guide-list li {
  display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: 16px;
  padding: 16px 18px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line);
}
.guide-list .km { font-size: 14px; font-weight: 600; color: var(--brand-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.guide-list .km strong { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin-right: 1px; }
.guide-list .what { display: grid; gap: 2px; }
.guide-list .what strong { font-size: 15.5px; line-height: 1.45; }
.guide-list .what span { font-size: 13px; color: var(--text-3); }
.guide-list li:first-child { background: var(--brand-soft); border-color: var(--brand-soft-line); }
.guide-cta { display: flex; }
.guide-btn { height: 50px; padding: 0 24px; background: #0a6fb0; color: #fff; }
.guide-btn:hover { background: #085c93; }
@media (max-width: 420px) {
  .guide-list li { grid-template-columns: 1fr; gap: 4px; }
}
@media (min-width: 860px) {
  .guide-inner { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 48px; padding: 72px 24px; align-items: start; }
  .guide-head { position: sticky; top: 88px; }
  .guide-head h2 { font-size: 32px; }
  .guide-cta { grid-column: 2; }
}

.site-footer { text-align: center; padding: 24px 16px 40px; font-size: 13px; color: var(--text-3); }

/* 다크 모드 전환 버튼 (달/해) */
.theme-toggle {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
  border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-2); cursor: pointer;
}
.theme-toggle:hover { background: var(--surface-2); color: var(--text); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .sun { display: none; }
.theme-dark .theme-toggle .sun { display: block; }
.theme-dark .theme-toggle .moon { display: none; }
.app-header .theme-toggle { width: 36px; height: 36px; }
.site-header .theme-toggle { background: transparent; border-color: rgba(255, 255, 255, .25); color: rgba(255, 255, 255, .85); }
.site-header .theme-toggle:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.site-header-actions { display: flex; align-items: center; gap: 8px; }
@media (max-width: 420px) {
  .app-header .theme-toggle { width: 34px; height: 34px; }
}
/* 아주 좁은 휴대폰: 역할 표시는 숨기고 이름을 우선 (역할은 화면 제목에도 나옴) */
@media (max-width: 360px) {
  .app-user .chip { display: none; }
}

/* =========================================================
   주행거리·정비 (2단계)
   ========================================================= */
.maint { list-style: none; margin: 16px 0 0; padding: 0; }
.maint li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 12px;
  padding: 14px 0; border-top: 1px solid var(--line); font-size: 14px;
}
.maint .name { font-weight: 600; }
.maint .remain { grid-column: 1 / -1; color: var(--text-2); font-variant-numeric: tabular-nums; }
.maint .remain strong { color: var(--text); font-weight: 600; }
.maint li[data-level="due"] .remain strong { color: var(--danger); }
.maint li[data-level="soon"] .remain strong { color: var(--warn); }
.maint .bar {
  grid-column: 1 / -1; height: 6px; border-radius: 999px; overflow: hidden;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line);
}
.maint .bar span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.maint li[data-level="soon"] .bar span { background: var(--warn); }
.maint li[data-level="due"] .bar span { background: var(--danger); }
.maint .meta { grid-column: 1 / -1; color: var(--text-3); font-size: 13px; }
.km-form { margin-top: 18px; }
.km-form .field-row { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .km-form .field-row { grid-template-columns: 200px minmax(0, 1fr); } }
.optional { font-weight: 400; color: var(--text-3); }

/* 관리자: 정비 알림 줄 */
.due-what { display: grid; gap: 2px; justify-items: end; text-align: right; }
.due-item { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.due-what .sub strong { font-weight: 600; color: var(--text); }
@media (max-width: 520px) {
  .due-what { justify-items: start; text-align: left; }
}

/* 기사님: 알림 */
.alerts { list-style: none; margin: 0; padding: 0; }
.alerts li { display: grid; gap: 4px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; }
.alerts li:first-child { border-top: 0; }
.alerts .msg { line-height: 1.5; }
.alerts .meta { color: var(--text-3); font-size: 13px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.alerts li.unread .msg { font-weight: 600; }
.alerts li.resolved .msg { color: var(--text-3); }

/* 휴대폰 알림(웹 푸시) */
.push-text { font-size: 14px; color: var(--text-2); margin-bottom: 12px; }
.push-guide { display: grid; gap: 8px; font-size: 14px; }
.push-steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; color: var(--text-2); }

/* 앱 설치 안내 (화면 아래에서 올라오는 창) */
.install-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  padding: 0 12px calc(12px + env(safe-area-inset-bottom));
  transform: translateY(110%); transition: transform .25s ease;
}
.install-sheet.show { transform: translateY(0); }
.install-sheet-inner {
  max-width: 480px; margin: 0 auto; padding: 16px;
  display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px 14px;
  background: var(--surface); color: var(--text); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
}
.install-icon { width: 48px; height: 48px; border-radius: 12px; }
.install-copy { display: grid; gap: 4px; font-size: 14px; }
.install-copy strong { font-size: 15px; }
.install-copy p { color: var(--text-2); line-height: 1.5; }
.install-copy ol { margin: 4px 0 0; padding-left: 18px; color: var(--text-2); display: grid; gap: 2px; }
.install-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }
.install-primary { background: #0a6fb0; color: #fff; }
.install-primary:hover { background: #085c93; }
@media (prefers-reduced-motion: reduce) { .install-sheet { transition: none; } }

/* 임시 비밀번호·회원 탈퇴 */
.temp-pw { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.temp-pw strong { margin-left: 8px; font-size: 20px; letter-spacing: .08em; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; user-select: all; }
.fold summary { cursor: pointer; color: var(--text); font-size: 16px; font-weight: 700; }
.fold[open] > summary { margin-bottom: 4px; }
.pw-help { margin-top: 10px; font-size: 13px; color: var(--text-3); text-align: center; }

/* 개인정보처리방침 */
.policy { max-width: 760px; margin: 0 auto; padding: 32px 16px 48px; font-size: 15px; line-height: 1.7; }
.policy h1 { font-size: 26px; margin: 0 0 8px; }
.policy h2 { font-size: 17px; margin: 32px 0 8px; }
.policy-lead { color: var(--text-2); }
.policy table { width: 100%; border-collapse: collapse; font-size: 14px; }
.policy th, .policy td { text-align: left; vertical-align: top; padding: 10px 8px; border-top: 1px solid var(--line); }
.policy th { color: var(--text-2); font-weight: 600; background: var(--surface-2); }
.site-footer a { color: inherit; }
.view-head .btn { margin-left: auto; }

/* 운영 설명서 */
.guide .ui { display: inline-block; padding: 0 7px; border-radius: 6px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: .92em; font-weight: 600; white-space: nowrap; }
.guide-toc { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 20px 0 8px; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); font-size: 14px; }
.guide-toc a { color: var(--text-2); }
.guide-steps { padding-left: 22px; display: grid; gap: 8px; }
.guide h2 { scroll-margin-top: 80px; }
.guide-faq dt { font-weight: 600; margin-top: 16px; }
.guide-faq dd { margin: 4px 0 0; color: var(--text-2); }
@media print {
  .site-header, .site-footer, .guide-toc { display: none; }
  .guide { padding: 0; max-width: none; }
  .guide h2 { break-after: avoid; }
}

/* 정비 알림 팝업 · 기사님 화면 '정비가 필요한 항목' 버튼 */
dialog.maint-pop { width: min(440px, calc(100% - 32px)); }
.maint-pop .pop-group { margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--text-3); }
.pop-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pop-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.pop-list li[data-level="due"] { background: var(--danger-soft); box-shadow: none; }
.pop-list li[data-level="soon"] { background: var(--warn-soft); box-shadow: none; }
.pop-list .name { font-size: 15px; font-weight: 600; color: var(--text); }
.pop-list .remain { grid-column: 1 / -1; font-size: 13px; color: var(--text-2); }
.pop-list .remain strong { color: var(--text); font-weight: 600; }
.need-banner {
  width: 100%; margin: 4px 0 14px; padding: 14px 16px; border: 0; border-radius: 12px; cursor: pointer; text-align: left;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; font: inherit;
  background: var(--warn-soft); color: var(--warn);
}
.need-banner[data-level="due"] { background: var(--danger-soft); color: var(--danger); }
.need-banner span:first-child { display: grid; gap: 2px; }
.need-banner strong { font-size: 15px; }
.need-banner small { font-size: 13px; opacity: .85; }
.need-banner > span:last-child { font-size: 22px; line-height: 1; }
.need-banner:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 공지사항 */
.textarea {
  width: 100%; min-height: 160px; padding: 12px 14px; resize: vertical;
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--text);
  font: inherit; font-size: 16px; line-height: 1.6;
}
.textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.notice-list { list-style: none; margin: 0; padding: 0; }
.notice-list li { display: grid; gap: 6px; padding: 14px 0; border-top: 1px solid var(--line); }
.notice-list li:first-child { border-top: 0; padding-top: 0; }
.notice-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.notice-top strong { font-size: 15px; min-width: 0; }
.notice-top .actions { display: flex; gap: 6px; }
.notice-body { margin: 0; font-size: 14px; line-height: 1.65; color: var(--text-2); white-space: pre-line; overflow-wrap: anywhere; }
.notice-list .notice-body { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.notice-list .meta { font-size: 13px; color: var(--text-3); }
.notice-chat-row { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .notice-chat-row { grid-template-columns: minmax(0, 1fr) 140px; } }

.rider-notices { list-style: none; margin: 0; padding: 0; }
.rider-notices li { border-top: 1px solid var(--line); }
.rider-notices li:first-child { border-top: 0; }
.rider-notices summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 12px 0; }
.rider-notices summary::-webkit-details-marker { display: none; }
.rider-notices summary .t { font-size: 15px; font-weight: 600; min-width: 0; }
.rider-notices summary .meta { font-size: 13px; color: var(--text-3); flex: none; }
.rider-notices summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.rider-notices .notice-body { padding: 0 0 14px; }
.openchat { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.openchat-btn { background: #fee500; color: #191919; font-weight: 700; }
.openchat-btn:hover { background: #f5dc00; }
.openchat-code { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); }
.openchat-code strong { font-size: 17px; color: var(--text); letter-spacing: .08em; font-variant-numeric: tabular-nums; }

/* =========================================================
   소개 페이지 (about.html)
   홈 화면 아래 소개·함께하는 방법·오시는 길·문의 (예전 about.html 을 홈으로 합침, 2026-11-12)
   ========================================================= */
.about-body { max-width: 1080px; margin: 0 auto; padding: 8px 16px 56px; display: grid; }
.about-sec { padding: 44px 0; border-top: 1px solid var(--line); display: grid; gap: 12px; align-content: start; }
.about-sec:first-child { border-top: 0; }
.about-sec h2 { font-size: clamp(22px, 5vw, 28px); line-height: 1.35; letter-spacing: -0.02em; text-wrap: balance; }
.about-p { font-size: 15px; line-height: 1.7; color: var(--text-2); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.about-p a { color: var(--brand-ink); font-weight: 600; }

.about-cards { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .about-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.about-cards li { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: grid; gap: 8px; align-content: start; }
.about-cards h3 { font-size: 17px; }
.about-cards p { font-size: 14px; line-height: 1.65; color: var(--text-2); }
.about-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); }
.about-ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.about-steps { list-style: none; margin: 8px 0 4px; padding: 0; display: grid; gap: 10px; counter-reset: s; }
.about-steps li { counter-increment: s; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 2px 14px; align-items: center; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.about-steps li::before { content: counter(s); grid-row: span 2; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #0a6fb0; color: #fff; font-weight: 800; }
.about-steps strong { font-size: 16px; }
.about-steps span { font-size: 14px; color: var(--text-2); }
.about-join { justify-self: start; height: 48px; padding: 0 22px; margin-top: 6px; background: #0a6fb0; color: #fff; }
.about-join:hover { background: #085c93; }

.loc-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: grid; gap: 18px; }
.loc-info { display: grid; gap: 14px; margin: 0; }
.loc-info div { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px; }
.loc-info dt { font-size: 14px; color: var(--text-3); }
.loc-info dd { margin: 0; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.loc-info .pre { white-space: pre-line; font-weight: 500; line-height: 1.6; }
.loc-detail { display: block; font-weight: 500; color: var(--text-2); font-size: 15px; }
.loc-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.loc-actions .btn { height: 48px; padding: 0 18px; }
.naver-btn { background: #03c75a; color: #fff; gap: 8px; font-weight: 700; }
.naver-btn:hover { background: #02b351; }
.naver-n { width: 22px; height: 22px; border-radius: 5px; background: #fff; color: #03c75a; display: grid; place-items: center; font-weight: 900; font-size: 14px; }


/* 소개 페이지 '문의' — 누르면 바로 연결 */
.contact-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 10px; }
.contact-list li { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.contact-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); }
.contact-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; }
.contact-ico.kakao { background: #fee500; color: #191919; }
.contact-ico.kakao svg { fill: none; stroke: currentColor; }
.contact-text { display: grid; gap: 2px; min-width: 0; }
.contact-text strong { font-size: 15px; }
.contact-text span { font-size: 15px; color: var(--text-2); overflow-wrap: anywhere; }
.contact-btn { height: 44px; padding: 0 16px; background: #0a6fb0; color: #fff; white-space: nowrap; }
.contact-btn:hover { background: #085c93; }
.kakao-btn { background: #fee500; color: #191919; }
.kakao-btn:hover { background: #f5dc00; }
@media (max-width: 420px) {
  .contact-list li { grid-template-columns: 44px minmax(0, 1fr); }
  .contact-btn { grid-column: 1 / -1; width: 100%; }
}

/* =========================================================
   아이콘 통일: 둥근 단선(24 격자, 1.75 선, 둥근 끝) — 2026-11-26
   ========================================================= */
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }
.back-link { display: inline-flex; align-items: center; gap: 2px; }
.mrow .go .i { width: 20px; height: 20px; }
.need-banner > span:last-child .i { width: 22px; height: 22px; }

/* 접었다 펴는 제목: 기본 삼각형 대신 둥근 꺾쇠 */
.fold > summary, details.consent-detail > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fold > summary::-webkit-details-marker, details.consent-detail > summary::-webkit-details-marker { display: none; }
.fold > summary::after, details.consent-detail > summary::after {
  content: ''; width: 20px; height: 20px; flex: none; background: var(--text-3); transition: transform .18s;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.fold[open] > summary::after, details.consent-detail[open] > summary::after { transform: rotate(180deg); }
details.consent-detail > summary { justify-content: flex-start; }
details.consent-detail > summary::after { width: 16px; height: 16px; }

/* 체크박스: 둥근 네모 + 둥근 체크 */
input[type="checkbox"] {
  -webkit-appearance: none; appearance: none; width: 18px; height: 18px; margin: 0; flex: none; cursor: pointer;
  border: 1.75px solid var(--line-strong); border-radius: 5px; background: var(--surface);
  display: inline-grid; place-content: center; transition: background-color .15s, border-color .15s;
}
input[type="checkbox"]::before {
  content: ''; width: 14px; height: 14px; background: #fff; transform: scale(0); transition: transform .12s;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
input[type="checkbox"]:checked::before { transform: scale(1); }
input[type="checkbox"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type="checkbox"]:disabled { opacity: .5; cursor: not-allowed; }
#related-note { white-space: pre-line; } /* 글자로 넣는 안내도 문장마다 줄 바꿈 */
/* 관리자 대기 줄: 작업 메뉴 편집 */
.q-edit { display: grid; gap: 10px; margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.q-edit-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.q-edit-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.q-edit-list input[name="name"] { flex: 1 1 160px; }
.q-edit-list input[name="minutes"] { width: 72px; text-align: center; }
.q-edit-list .q-price { display: inline-flex; align-items: center; gap: 6px; }
.q-edit-list input[name="price"] { width: 104px; text-align: right; font-variant-numeric: tabular-nums; }
.q-edit-foot { display: flex; align-items: center; gap: 6px; }
/* 관리자 대기 줄: 정비사 수 고르기 */
/* 정비사 수: 한 덩어리 선택 버튼(세그먼트). 고른 쪽은 글자·바탕 색을 뒤집어 어느 테마에서도 보이게 */
.q-mech { display: inline-flex; align-items: center; gap: 6px; }
.q-mech .seg { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line-strong); border-radius: 999px; }
.q-mech .seg .btn { border: 0; border-radius: 999px; background: transparent; min-width: 52px; }
.q-mech .seg .btn[aria-pressed="true"] { background: var(--text); color: var(--surface); font-weight: 700; }

/* 바이크샵 장부: 달 고르기 · 이름 찾기 · 정비사 목록 · 막대 */
.month-nav { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.month-nav b { font-size: 14px; font-variant-numeric: tabular-nums; min-width: 92px; text-align: center; }
.month-nav .btn { width: 34px; padding: 0; justify-content: center; }
.name-suggest { list-style: none; margin: 6px 0 0; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.name-suggest button { display: flex; width: 100%; gap: 8px; align-items: baseline; min-height: 40px; padding: 0 10px; border: 0; border-radius: 8px; background: none; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.name-suggest button:hover, .name-suggest button:focus-visible { background: var(--accent-soft); }
.name-suggest span { font-size: 13px; color: var(--text-3); }
.mech-list { list-style: none; margin: 0; padding: 0; }
.mech-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.mech-list li:first-child { border-top: 0; }
.mech-list .off { color: var(--text-3); }
.mech-list .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.bars li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 14px; }
.bars .b-name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars .b-val { color: var(--text-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.bars .b-track { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bars .b-track i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.dash-grid { display: grid; gap: 16px; }
.dash-grid .card { margin: 0; }
@media (min-width: 900px) { .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.daychart { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding-bottom: 18px; }
.daychart a { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; min-width: 0; }
.daychart i { display: block; width: 100%; border-radius: 3px 3px 0 0; background: var(--accent); }
.daychart small { position: absolute; left: 50%; bottom: -18px; transform: translateX(-50%); font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* 공용 달력 (picker.js — 기본 날짜 달력 대신) */
.field .pick-btn { width: 100%; height: 48px; font-size: 16px; }
.pick-date .pick-chev { transform: none !important; }
.pick-panel.pick-cal { width: 300px; max-height: none; padding: 12px; }
.pick-panel.pick-cal.is-sheet { width: min(340px, calc(100vw - 32px)); padding: 16px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head b { font-size: 15px; font-variant-numeric: tabular-nums; }
.cal-nav { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 0; border-radius: 10px; background: none; color: var(--text-2); cursor: pointer; }
.cal-nav:hover { background: var(--surface-2); color: var(--text); }
.cal-nav:disabled { opacity: .3; cursor: default; background: none; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-week { text-align: center; font-size: 12px; font-weight: 600; color: var(--text-3); padding: 4px 0 6px; }
.cal-day {
  aspect-ratio: 1; min-height: 36px; border: 0; border-radius: 10px; background: none;
  font: inherit; font-size: 14px; font-variant-numeric: tabular-nums; color: var(--text); cursor: pointer;
}
.cal-day:hover { background: var(--accent-soft); }
.cal-day:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.cal-day[aria-current="date"] { font-weight: 700; box-shadow: inset 0 0 0 1px var(--line-strong); }
.cal-day[aria-pressed="true"] { background: var(--accent); color: #fff; font-weight: 700; box-shadow: none; }
.cal-day:disabled { color: var(--text-3); opacity: .45; cursor: default; background: none; }
.cal-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; }
.cal-foot .btn { flex: 1; }

/* 숫자 칸 위아래 화살표·검색 칸 기본 X 버튼 숨김 (−5/+5 버튼과 앱 디자인을 씀) */
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }
/* 대시보드: 누르면 관련 장부로 */
a.stat-link { display: block; color: inherit; text-decoration: none; transition: border-color .15s; }
a.stat-link:hover { border-color: var(--text-3); }
a.stat-link:focus-visible, .bar-link:focus-visible, .daychart a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bars li:has(.bar-link) { display: block; }
.bar-link { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; margin: -6px -8px; padding: 6px 8px; border-radius: 10px; color: inherit; text-decoration: none; }
.bar-link:hover { background: var(--surface-2); }
.daychart a { text-decoration: none; }
.daychart a:hover i { opacity: .75; }
/* 정비 장부: 적립금 결제 칸 */
.points-row { display: flex; gap: 8px; align-items: center; }
.points-row .amount-wrap { flex: 1; min-width: 0; }
.points-row .btn { flex: none; height: 48px; }
/* 정비 장부: 정비 알림 항목 완료 고르기 */
.maint-pick { border: 0; padding: 0; min-width: 0; }
.maint-pick legend { padding: 0; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--text); }
.maint-pick .toggle-row { align-items: center; }
.field .maint-pick input[type="checkbox"], .maint-pick input[type="checkbox"] { width: 18px; height: 18px; padding: 0; margin: 0; }
/* 대기 표시 (시안 B): 왼쪽 큰 숫자(대기자·약 N분) + 오른쪽 순서 선. 대기자가 많으면 오른쪽만 옆으로 밀어 봄 */
.queue-strip { grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 20px; padding-top: 12px; padding-bottom: 14px; }
.queue-strip .q-head { flex-direction: column; align-items: center; gap: 2px; padding-right: 20px; border-right: 1px solid var(--line-strong); text-align: center; }
.queue-strip:has(.q-items:empty) .q-head { flex-direction: row; align-items: baseline; gap: 10px; padding-right: 0; border-right: 0; }
.queue-strip .q-count { display: block; font-size: 13px; line-height: 1.1; }
.queue-strip .q-count .k { display: block; }
.queue-strip .q-count b { font-size: 36px; margin: 2px 0 0; line-height: 1.05; }
.queue-strip .q-count small { font-size: 15px; font-weight: 700; }
.queue-strip:has(.q-items:empty) .q-count { font-size: 15px; }
.queue-strip:has(.q-items:empty) .q-count .k { display: inline; }
.queue-strip:has(.q-items:empty) .q-count b { font-size: 24px; }
.queue-strip .q-time { font-size: 15px; font-weight: 800; color: var(--accent); }
.queue-strip .q-time::before { content: none; }
.queue-strip .q-items { gap: 0; padding: 0; }
.queue-strip .q-items li { position: relative; display: block; flex: 1 0 150px; min-width: 150px; padding: 30px 12px 0 0; border: 0; border-radius: 0; background: none; font-size: 15px; white-space: nowrap; }
.queue-strip .q-items li::before { content: ''; position: absolute; top: 11px; left: 0; right: 0; height: 2px; background: var(--line-strong); }
.queue-strip .q-items li:first-child::before { left: 11px; }
.queue-strip .q-items li:last-child::before { right: auto; width: 11px; }
.queue-strip .q-items li:only-child::before { display: none; }
.queue-strip .q-items .q-no { position: absolute; top: 0; left: 0; z-index: 1; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--surface); color: var(--text-2); box-shadow: inset 0 0 0 2px var(--line-strong); }
.queue-strip .q-items li.on .q-no { background: var(--accent); color: #fff; box-shadow: none; }
.queue-strip .q-items b { display: block; font-weight: 800; color: var(--text); overflow: hidden; text-overflow: ellipsis; }
.queue-strip .q-items li span:last-child { display: block; margin-top: 2px; font-size: 13px; color: var(--text-2); }
.queue-strip .q-items li.on span:last-child { color: var(--accent); font-weight: 700; }
.site-header .queue-strip .q-head { border-right-color: rgba(255, 255, 255, .14); }
.site-header .queue-strip .q-count { color: rgba(255, 255, 255, .6); }
.site-header .queue-strip .q-time { color: #8fd3ff; }
.site-header .queue-strip .q-items li::before { background: rgba(255, 255, 255, .18); }
.site-header .queue-strip .q-items .q-no { background: #0b1118; color: rgba(255, 255, 255, .8); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .4); }
.site-header .queue-strip .q-items li.on .q-no { background: #0a8cff; color: #fff; box-shadow: none; }
.site-header .queue-strip .q-items li span:last-child { color: rgba(255, 255, 255, .6); }
.site-header .queue-strip .q-items li.on span:last-child { color: #8fd3ff; }
@media (max-width: 559px) {
  .queue-strip { column-gap: 14px; }
  .queue-strip .q-head { padding-right: 14px; }
  .queue-strip .q-count b { font-size: 30px; }
  .queue-strip .q-items li { flex-basis: 130px; min-width: 130px; }
}
/* 대기 순서 번호: 테두리 없이 은은한 바탕 + DIN Pro Medium (설치된 기기에서만 보임, 없으면 기본 글꼴) */
.queue-strip .q-items .q-no {
  box-shadow: none; line-height: 1; font-size: 13px;
  font-family: "DIN Pro", "DINPro", "DINPro-Medium", "D-DIN", system-ui, sans-serif; font-weight: 500; font-variant-numeric: tabular-nums;
  background: color-mix(in srgb, var(--text) 10%, var(--surface)); color: var(--text-2);
}
.queue-strip .q-items li.on .q-no { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); color: var(--accent); }
.site-header .queue-strip .q-items .q-no { box-shadow: none; background: #263344; color: rgba(255, 255, 255, .85); }
.site-header .queue-strip .q-items li.on .q-no { background: #1d3f63; color: #8fd3ff; }
/* 좁은 휴대폰: 대기 줄 버튼(시작·빼기·완료)이 넘치면 아랫줄 오른쪽으로 내려서 가로 스크롤이 생기지 않게 */
.queue-list li { flex-wrap: wrap; row-gap: 8px; }
.queue-list .q-what { flex: 1 1 140px; }
.biz-group > * { min-width: 0; }
/* 메뉴 편집 줄: 이름·시간·금액·삭제를 정돈된 칸으로 */
.q-edit-list .q-min { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 559px) {
  .q-edit { padding: 12px; }
  .q-edit-list { gap: 0; }
  .q-edit-list li:has(input[name="name"]) {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; align-items: center;
    padding: 12px 0; border-top: 1px solid var(--line);
  }
  .q-edit-list li:has(input[name="name"]):first-child { border-top: 0; padding-top: 0; }
  .q-edit-list li input[name="name"] { grid-column: 1; grid-row: 1; width: 100%; min-width: 0; }
  .q-edit-list li [data-del] { grid-column: 2; grid-row: 1; justify-self: end; }
  .q-edit-list li .q-min { grid-column: 1; grid-row: 2; gap: 4px; }
  .q-edit-list li .q-price { grid-column: 2; grid-row: 2; gap: 4px; }
  .q-edit-list .q-min .btn { min-width: 36px; padding: 0 6px; }
  .q-edit-list input[name="minutes"] { width: 48px; padding-inline: 4px; }
  .q-edit-list input[name="price"] { width: 84px; padding-inline: 8px; }
  .q-edit-foot { flex-wrap: wrap; }
  /* 대기 줄: 번호는 첫 줄에 맞추고 시간 버튼은 조금 작게 */
  .queue-list li { align-items: flex-start; gap: 10px; }
  .queue-list .q-no { margin-top: 2px; }
  .queue-list .q-min .btn { min-width: 36px; height: 34px; padding: 0 6px; }
  .queue-list .q-min b { min-width: 44px; }
  .queue-list .q-acts { align-self: center; }
  .queue-list { padding-right: 8px; }
}
/* 좁은 휴대폰 대기 줄: 이름 / 상태 / [−5 시간 +5] [시작 빼기·완료] 세 줄로 붙여서 */
@media (max-width: 559px) {
  .queue-list li:not(.empty) { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; column-gap: 8px; row-gap: 4px; align-items: center; }
  .queue-list li:not(.empty) .q-what { display: contents; }
  .queue-list li .q-no { grid-column: 1; grid-row: 1; margin-top: 0; }
  .queue-list li .q-what > b { grid-column: 2 / 4; grid-row: 1; }
  .queue-list li .q-what > small { grid-column: 2 / 4; grid-row: 2; }
  .queue-list li .q-min { grid-column: 2; grid-row: 3; margin-top: 4px; gap: 4px; }
  .queue-list li .q-acts { grid-column: 3; grid-row: 3; margin: 4px 0 0; align-self: center; gap: 4px; }
  .queue-list .q-min .btn { min-width: 34px; }
  .queue-list .q-min b { min-width: 40px; }
  .queue-list .q-acts .btn { padding-inline: 10px; }
}
/* 머리말 이름 메뉴: 이름을 누르면 비밀번호 변경·로그아웃 */
.user-menu { position: relative; min-width: 0; }
.user-menu summary { list-style: none; display: flex; align-items: center; gap: 4px; min-width: 0; min-height: 40px; padding: 0 6px; border-radius: 10px; cursor: pointer; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { background: var(--surface-2); }
.user-menu summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.user-menu .chev { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; color: var(--text-3); transition: transform .15s; }
.user-menu[open] .chev { transform: rotate(180deg); }
.user-menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 150px; display: grid; padding: 6px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.user-menu-pop button { all: unset; box-sizing: border-box; padding: 10px 12px; border-radius: 8px; font-size: 15px; font-weight: 600; color: var(--text); cursor: pointer; white-space: nowrap; }
.user-menu-pop button:hover, .user-menu-pop button:focus-visible { background: var(--surface-2); }
#pw-card { scroll-margin-top: 150px; }
/* 대기 표시: 번호 대신 스패너(바탕 없음). 정비 중이면 라쳇처럼 툭툭 끊어 돌며 파랗게 빛나고, 기다리면 멈춤 */
.queue-strip .q-items .q-no, .site-header .queue-strip .q-items .q-no,
.queue-strip .q-items li.on .q-no, .site-header .queue-strip .q-items li.on .q-no { background: none; box-shadow: none; width: 22px; height: 22px; top: 0; }
.queue-strip .q-items .q-no .wrench { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.queue-strip .q-items li .q-no { color: var(--text-3); }
.queue-strip .q-items li.on .q-no { color: var(--accent); }
.site-header .queue-strip .q-items li .q-no { color: rgba(255, 255, 255, .45); }
.site-header .queue-strip .q-items li.on .q-no { color: #4db2ff; }
.queue-strip .q-items li.on .q-no .wrench { animation: wrench-ratchet 4s cubic-bezier(.3, 1.4, .5, 1) infinite; filter: drop-shadow(0 0 4px color-mix(in srgb, currentColor 70%, transparent)); }
/* 선이 아이콘을 지나가지 않게 아이콘 뒤에서 시작해 다음 아이콘 앞에서 끝남 */
.queue-strip .q-items li::before, .queue-strip .q-items li:first-child::before { left: 30px; right: 8px; width: auto; }
.queue-strip .q-items li:last-child::before { display: none; }
@keyframes wrench-ratchet {
  0% { transform: rotate(0); }
  20%, 25% { transform: rotate(90deg); }
  45%, 50% { transform: rotate(180deg); }
  70%, 75% { transform: rotate(270deg); }
  95%, 100% { transform: rotate(360deg); }
}
/* 스패너마다 박자를 달리해서 각자 따로 도는 느낌 */
.queue-strip .q-items li.on:nth-child(3n+2) .q-no .wrench { animation-duration: 3.4s; animation-delay: -1.2s; }
.queue-strip .q-items li.on:nth-child(3n+3) .q-no .wrench { animation-duration: 4.8s; animation-delay: -2.6s; }
/* 대기 표시 줄만 머리말과 다른 바탕으로 눈에 띄게 (사용자 요청) */
.queue-strip { background: color-mix(in srgb, var(--accent) 7%, var(--surface-2)); border-top-color: color-mix(in srgb, var(--accent) 20%, var(--line)); }
.site-header .queue-strip { background: #1b2e44; border-top-color: rgba(77, 178, 255, .25); }
.site-header .queue-strip .q-head { border-right-color: rgba(255, 255, 255, .18); }
.site-header .queue-strip .q-items li::before { background: rgba(255, 255, 255, .22); }
