@import url('https://fonts.googleapis.com/css2?family=Pretendard:wght@300;400;500;600;700;800&family=Cormorant+Garamond:ital,wght@1,500;1,700&display=swap');

/* =========================================================================
   ADDPICK Mini App — Design System
   다크(기본) + 라이트(@media prefers-color-scheme: light)
   Private Boutique (Dark) / Editorial Magazine (Light)
   ========================================================================= */

:root {
  /* 배경 단계 */
  --bg: #0E1220;
  --surface: #141A2D;
  --elevated: #1A2138;

  /* 텍스트 — 3단계만 */
  --ink-1: #F8F9FA;
  --ink-2: #C7CBD1;
  --ink-3: #8B8F98;
  /* 호환 alias */
  --text: var(--ink-1);
  --muted: var(--ink-3);

  /* 액센트 (다크: 로즈골드 + 와인) */
  --accent-1: #D4A574;   /* 로즈골드 primary */
  --accent-1-soft: #EAC9A8;
  --accent-1-deep: #B9945A;
  --accent-2: #6B1E2C;   /* 와인 */
  /* 호환 alias — 기존 코드에서 쓰던 --accent 는 로즈골드로 매핑 */
  --accent: var(--accent-1);

  /* 상태 */
  --success-color: #4FB38A;
  --error-color: #E57373;
  --info-color: #C7A273;
  --win: var(--success-color);
  --lose: var(--error-color);

  /* 라인 / 보더 */
  --line-1: rgba(255,255,255,0.08);
  --line-2: rgba(255,255,255,0.14);
  --line-accent: rgba(212,165,116,0.32);
  --border: var(--line-1);

  /* Radius */
  --r: 4px;

  /* Shadow */
  --shadow-card: 0 18px 40px -22px rgba(0,0,0,0.8), 0 2px 6px rgba(0,0,0,0.4);
}

html[data-theme="light"] {
  /* 배경 */
  --bg: #F8F6F2;
  --surface: #F1EDE4;
  --elevated: #EBE5D7;

  /* 텍스트 */
  --ink-1: #0A0908;
  --ink-2: #2C2A26;
  --ink-3: #6E6A63;
  --text: var(--ink-1);
  --muted: var(--ink-3);

  /* 액센트 (라이트: 딥 에디토리얼 레드) */
  --accent-1: #8A1F27;
  --accent-1-soft: #B03138;
  --accent-1-deep: #6B141A;
  --accent-2: #8A1F27;
  --accent: var(--accent-1);

  /* 상태 */
  --success-color: #2E5339;
  --error-color: #8A1F27;
  --info-color: #6E6A63;
  --win: var(--success-color);
  --lose: var(--error-color);

  /* 라인 */
  --line-1: rgba(0,0,0,0.08);
  --line-2: rgba(0,0,0,0.16);
  --line-accent: rgba(138,31,39,0.35);
  --border: var(--line-1);

  --shadow-card: 0 1px 0 rgba(26,24,21,.04), 0 12px 32px -18px rgba(26,24,21,.2);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg);
  color: var(--ink-2);
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 15px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* =========================================================================
   HEADER
   ========================================================================= */
.app-header {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line-1);
  background: var(--bg);
}
.brand {
  font-family: 'Pretendard', sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.04em;
  color: var(--ink-1);
  cursor: pointer;
}
.me-chip {
  padding: 6px 12px;
  background: var(--elevated);
  border: 1px solid var(--line-1);
  border-radius: var(--r);
  font-size: 12px;
  color: var(--ink-2);
  font-weight: 500;
}
.me-chip .ticket {
  color: var(--ink-1);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.me-chip svg,
.me-chip i {
  width: 12px;
  height: 12px;
  vertical-align: -2px;
  color: var(--accent-1);
}
.header-right { display: flex; align-items: center; gap: 8px; }

.refresh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line-1);
  border-radius: var(--r);
  color: var(--ink-2);
  cursor: pointer;
}
.refresh-btn:active { opacity: 0.7; }
.refresh-btn i, .refresh-btn svg { width: 16px; height: 16px; }

/* =========================================================================
   상단 버튼 (충전 + 광고)
   ========================================================================= */
.topup-sponsor-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 14px;
}
.topup-open-btn,
.sponsor-open-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 13px 10px;
  background: var(--elevated);
  color: var(--ink-1);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
}
.topup-open-btn { border-color: var(--line-accent); }
.sponsor-open-btn { border-color: var(--line-accent); }
.topup-open-btn:active,
.sponsor-open-btn:active { opacity: 0.8; }
.topup-open-btn svg,
.sponsor-open-btn svg,
.topup-open-btn i,
.sponsor-open-btn i { width: 15px; height: 15px; flex-shrink: 0; color: var(--accent-1); }

/* =========================================================================
   티켓 충전 모달
   ========================================================================= */
.topup-body { padding: 16px; }
.topup-note { font-size: 12px; color: var(--ink-3); margin-bottom: 12px; line-height: 1.5; }
.topup-packs { display: flex; flex-direction: column; gap: 8px; }
.topup-pack {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 14px;
  background: var(--elevated);
  border: 1px solid var(--line-1);
  border-radius: var(--r);
  color: var(--ink-1);
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}
.topup-pack:active { opacity: 0.8; }
.topup-pack:disabled { opacity: 0.5; cursor: not-allowed; }
.topup-pack .tp-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-1);
  letter-spacing: -0.005em;
}
.topup-pack .tp-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-1);
  font-variant-numeric: tabular-nums;
}
.topup-pack .tp-per {
  font-size: 10px;
  color: var(--ink-3);
  grid-column: 1 / -1;
  margin-top: 2px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.topup-foot {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 14px;
  line-height: 1.5;
}

/* =========================================================================
   모달
   ========================================================================= */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modal {
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  width: 100%; max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-card);
}
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-1);
}
.modal-title {
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-1);
  letter-spacing: 0.04em;
}
.modal-title svg,
.modal-title i { width: 15px; height: 15px; color: var(--accent-1); }
.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--ink-3);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.sponsor-sub-tabs {
  display: flex;
  border-bottom: 1px solid var(--line-1);
}
.sponsor-sub-tabs .sub-tab {
  flex: 1;
  padding: 12px;
  background: none;
  border: none;
  color: var(--ink-3);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.sponsor-sub-tabs .sub-tab.active {
  color: var(--ink-1);
  border-bottom-color: var(--accent-1);
  font-weight: 600;
}

.sponsor-body { padding: 16px; }
.sp-form label {
  display: block;
  font-size: 11px;
  color: var(--ink-2);
  margin: 10px 0 4px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}
.sp-form input[type="text"],
.sp-form input[type="url"],
.sp-form select {
  width: 100%;
  padding: 10px 12px;
  background: var(--elevated);
  border: 1px solid var(--line-1);
  color: var(--ink-1);
  font-family: inherit;
  font-size: 14px;
  border-radius: var(--r);
}
.sp-form input:focus,
.sp-form select:focus {
  outline: none;
  border-color: var(--accent-1);
}
.sp-form .radio-row { display: flex; gap: 12px; margin-top: 4px; }
.sp-form .radio-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  color: var(--ink-2);
  text-transform: none;
  letter-spacing: 0;
}
.sp-price {
  margin: 14px 0;
  padding: 10px 12px;
  background: var(--elevated);
  border: 1px solid var(--line-1);
  border-left: 3px solid var(--accent-1);
  border-radius: var(--r);
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.5;
}
.sp-price b { color: var(--ink-1); font-weight: 700; }
.sp-char-count {
  font-size: 10px;
  color: var(--ink-3);
  text-align: right;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

/* 시간광고 기간 선택 */
.hour-opts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 4px;
}
.hour-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 6px;
  background: var(--elevated);
  border: 1px solid var(--line-1);
  border-radius: var(--r);
  cursor: pointer;
  text-align: center;
  position: relative;
}
.hour-opt input { position: absolute; opacity: 0; pointer-events: none; }
.hour-opt.active {
  background: var(--surface);
  border-color: var(--accent-1);
  color: var(--ink-1);
}
.hour-opt.active .hour-label { color: var(--ink-1); }
.hour-opt.active .hour-price { color: var(--accent-1); font-weight: 700; }
.hour-opt.disabled { opacity: 0.5; cursor: not-allowed; }
.hour-opt .hour-label {
  display: block;
  width: 100%;
  text-align: center;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-1);
  line-height: 1.2;
}
.hour-opt .hour-price {
  display: block;
  width: 100%;
  text-align: center;
  white-space: nowrap;
  font-size: 12px;
  color: var(--accent-1);
  font-weight: 600;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  margin-top: 3px;
}

.sp-submit {
  display: block;
  width: 100%;
  padding: 13px;
  margin-top: 16px;
  background: var(--accent-1);
  color: #0E1220;
  border: none;
  border-radius: var(--r);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}
html[data-theme="light"] .sp-submit { color: #F8F6F2; }
.sp-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.sp-note {
  font-size: 12px;
  color: var(--ink-2);
  margin-top: 8px;
  line-height: 1.55;
}
.sp-note svg,
.sp-note i { width: 12px; height: 12px; vertical-align: -2px; }

/* =========================================================================
   탭
   ========================================================================= */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--line-1);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 15;
}
.tab {
  flex: 1;
  padding: 12px 8px;
  background: transparent;
  border: none;
  color: var(--ink-3);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.tab.active {
  color: var(--ink-1);
  border-bottom-color: var(--accent-1);
  font-weight: 700;
}

main {
  padding: 12px;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* =========================================================================
   베팅 카드
   ========================================================================= */
.bet-card {
  background: var(--surface);
  border: 1px solid var(--line-1);
  border-radius: var(--r);
  padding: 16px 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-card);
}
.bet-card .q {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink-1);
  letter-spacing: -0.005em;
  margin-bottom: 8px;
}
.bet-card .meta {
  font-size: 11px;
  color: var(--ink-3);
  margin-bottom: 14px;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-1);
  width: 100%;
}
.bet-card .meta svg,
.bet-card .meta i {
  width: 12px;
  height: 12px;
  vertical-align: -2px;
  color: var(--accent-1);
}
.bet-card .choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.choice-btn {
  padding: 14px 8px;
  background: var(--elevated);
  border: 1px solid var(--line-1);
  border-radius: var(--r);
  color: var(--ink-1);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.choice-btn:hover:not(:disabled) { border-color: var(--accent-1); }
.choice-btn.picked {
  background: var(--accent-1);
  border-color: var(--accent-1);
  color: var(--bg);
  box-shadow: none;
  font-weight: 800;
}
.choice-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.choice-btn i,
.choice-btn svg {
  width: 16px;
  height: 16px;
  margin-right: 6px;
  vertical-align: -3px;
  color: var(--ink-2);
  flex-shrink: 0;
}
.choice-btn.dir-up i,
.choice-btn.dir-up svg { color: var(--success-color); }
.choice-btn.dir-down i,
.choice-btn.dir-down svg { color: #4A90E2; }
html[data-theme="light"] .choice-btn.dir-down i,
html[data-theme="light"] .choice-btn.dir-down svg { color: #1F5FB2; }
.choice-btn.picked i,
.choice-btn.picked svg { color: currentColor; }

.bet-card .stake-picker {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  grid-template-rows: 56px auto;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 10px;
}
.bet-card .stake-picker.locked {
  display: block;
  margin-bottom: 10px;
}
.bet-card .stake-picker.locked .stake-label {
  display: inline-block;
  padding: 6px 12px;
  font-size: 11px;
  color: var(--ink-2);
  background: var(--elevated);
  border: 1px solid var(--line-1);
  border-radius: var(--r);
  letter-spacing: 0.08em;
  font-weight: 600;
}
.stake-step {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  background: var(--elevated);
  border: 1px solid var(--line-1);
  border-radius: var(--r);
  color: var(--ink-1);
  font-family: inherit;
  font-size: 22px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition: background 0.1s, border-color 0.1s;
}
.stake-step:hover:not(:disabled) { border-color: var(--accent-1); }
.stake-step:active:not(:disabled) { background: var(--surface); }
.stake-step:disabled { opacity: 0.35; cursor: not-allowed; }
.stake-value {
  padding: 0;
  line-height: 1;
  background: var(--elevated);
  border: 1px solid var(--line-1);
  border-radius: var(--r);
  color: var(--ink-1);
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  touch-action: manipulation;
}
.stake-value:hover { border-color: var(--accent-1); }
.stake-value:active { background: var(--surface); }
.stake-value-num {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stake-value-unit {
  font-size: 12px;
  line-height: 1;
  color: var(--ink-2);
  font-weight: 500;
}
.stake-preview {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--ink-2);
  text-align: center;
}
.stake-preview b {
  color: var(--accent-1);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ---- 스테이크 직접입력 모달 ---- */
.modal.stake-modal {
  max-width: 320px;
}
.stake-modal-body { padding: 16px 20px 20px; }
.stake-modal-balance {
  font-size: 12px;
  color: var(--ink-2);
  text-align: center;
  margin-bottom: 10px;
}
.stake-modal-input {
  width: 100%;
  padding: 14px 12px;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  background: var(--elevated);
  border: 1px solid var(--line-1);
  border-radius: var(--r);
  color: var(--ink-1);
  font-family: inherit;
  font-variant-numeric: tabular-nums;
}
.stake-modal-input:focus {
  outline: none;
  border-color: var(--accent-1);
}
.stake-modal-preview {
  font-size: 13px;
  color: var(--ink-2);
  text-align: center;
  margin: 10px 0 16px;
}
.stake-modal-preview b {
  color: var(--accent-1);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.stake-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.stake-modal-cancel,
.stake-modal-ok {
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--r);
  border: 1px solid var(--line-1);
  cursor: pointer;
  font-family: inherit;
}
.stake-modal-cancel {
  background: var(--elevated);
  color: var(--ink-2);
}
.stake-modal-ok {
  background: var(--accent-1);
  color: #fff;
  border-color: var(--accent-1);
}

/* ---- A/B 참여 분포 바 (더미) ---- */
.bet-votes {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-1);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.bet-vote-a,
.bet-vote-b {
  color: var(--ink-2);
  white-space: nowrap;
}
.bet-vote-a b,
.bet-vote-b b {
  color: var(--ink-1);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0;
}
.bet-vote-track {
  flex: 1;
  height: 3px;
  background: var(--line-1);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.bet-vote-fill {
  height: 100%;
  background: var(--accent-1);
  border-radius: 2px;
}
.bet-vote-total {
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  font-weight: 500;
  text-transform: none;
  padding-left: 4px;
  border-left: 1px solid var(--line-1);
}
.bet-votes.empty {
  justify-content: center;
  padding: 10px 0;
}
.bet-votes.empty .bet-vote-empty {
  color: var(--ink-3);
  font-size: 11px;
  text-transform: none;
  letter-spacing: 0.02em;
  font-weight: 500;
}

/* ---- 자동발매 sparkline (더미) ---- */
.bet-sparkline {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--elevated);
  border: 1px solid var(--line-1);
  border-radius: var(--r);
  color: var(--ink-2);
}
.bet-sparkline.trend-up { color: var(--success-color); }
.bet-sparkline.trend-down { color: #4A90E2; }
html[data-theme="light"] .bet-sparkline.trend-down { color: #1F5FB2; }
.bet-sparkline.trend-flat { color: var(--ink-3); }
.bet-sparkline .sl-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.bet-sparkline .sl-lbl {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
}
.bet-sparkline .sl-val {
  font-size: 12px;
  color: currentColor;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
.bet-sparkline .sl-nums {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  margin-bottom: 6px;
}
.bet-sparkline .sl-nums .sl-num {
  font-weight: 500;
}
.bet-sparkline .sl-nums .sl-num.current {
  color: var(--ink-1);
  font-weight: 700;
}
.bet-sparkline .sl-nums .sl-arrow {
  color: var(--ink-3);
  font-size: 10px;
}
.bet-sparkline svg {
  width: 100%;
  height: 36px;
  display: block;
}

/* =========================================================================
   Empty / Skeleton
   ========================================================================= */
.empty {
  text-align: center;
  padding: 40px 16px;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: 0.02em;
}

.skeleton-card,
.skeleton-row {
  background: var(--surface);
  border: 1px solid var(--line-1);
  border-radius: var(--r);
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
}
.skeleton-card { height: 110px; }
.skeleton-row { height: 54px; }
.skeleton-card::after,
.skeleton-row::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
  animation: sk 1.2s infinite;
}
html[data-theme="light"] .skeleton-card::after,
html[data-theme="light"] .skeleton-row::after {
  background: linear-gradient(90deg, transparent, rgba(0,0,0,0.04), transparent);
}
@keyframes sk { 0%{transform:translateX(-100%)} 100%{transform:translateX(100%)} }

/* =========================================================================
   히스토리
   ========================================================================= */
.history-item {
  background: var(--surface);
  border: 1px solid var(--line-1);
  border-radius: var(--r);
  padding: 12px 14px;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.history-item .q {
  flex: 1;
  font-size: 13px;
  margin-right: 10px;
  color: var(--ink-1);
  line-height: 1.5;
}
.history-item .q b {
  color: var(--accent-1);
  font-weight: 700;
  margin-right: 4px;
}
.history-item .badge {
  padding: 0;
  border: none;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.badge.won { color: var(--success-color); }
.badge.lost { color: var(--error-color); }
.badge.pending {
  color: var(--ink-3);
}

/* =========================================================================
   랭킹
   ========================================================================= */
.rank-row {
  position: relative;
  display: flex;
  align-items: center;
  padding: 12px 14px 12px 18px;
  border-bottom: 1px solid var(--line-1);
  gap: 12px;
}
.rank-row:last-child { border-bottom: none; }
/* TOP 3 좌측 액센트 바 */
.rank-row[data-rank="1"]::before,
.rank-row[data-rank="2"]::before,
.rank-row[data-rank="3"]::before {
  content: "";
  position: absolute;
  left: 0; top: 10px; bottom: 10px;
  width: 3px;
  border-radius: 2px;
}
.rank-row[data-rank="1"]::before { background: #F5C542; box-shadow: 0 0 6px rgba(245,197,66,0.5); }
.rank-row[data-rank="2"]::before { background: #BFC3C9; }
.rank-row[data-rank="3"]::before { background: #C98B5B; }
/* 1위 행 배경 은은한 골드 틴트 */
.rank-row[data-rank="1"] {
  background: linear-gradient(90deg, rgba(245,197,66,0.06) 0%, transparent 70%);
}
html[data-theme="light"] .rank-row[data-rank="1"] {
  background: linear-gradient(90deg, rgba(245,197,66,0.14) 0%, transparent 70%);
}
.rank-row .pos {
  width: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.rank-row .pos-num {
  color: var(--ink-3);
  font-weight: 800;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.rank-row .rank-icon {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}
.rank-row .pos-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
  text-transform: uppercase;
}
.rank-row[data-rank="1"] .rank-icon { color: #F5C542; animation: rankGlow 2.6s ease-in-out infinite; }
.rank-row[data-rank="2"] .rank-icon { color: #BFC3C9; }
.rank-row[data-rank="3"] .rank-icon { color: #C98B5B; }
.rank-row[data-rank="1"] .pos-tag { color: #F5C542; }
.rank-row[data-rank="2"] .pos-tag { color: #BFC3C9; }
.rank-row[data-rank="3"] .pos-tag { color: #C98B5B; }
html[data-theme="light"] .rank-row[data-rank="2"] .rank-icon,
html[data-theme="light"] .rank-row[data-rank="2"] .pos-tag { color: #8E9199; }
@keyframes rankGlow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(245,197,66,0)); }
  50% { filter: drop-shadow(0 0 5px rgba(245,197,66,0.75)); }
}
.rank-row .name {
  flex: 1;
  font-size: 14px;
  color: var(--ink-1);
  font-weight: 600;
}
.rank-row .stat {
  font-size: 13px;
  color: var(--ink-1);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.rank-title {
  font-size: 10px;
  color: var(--ink-3);
  padding: 14px 14px 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* =========================================================================
   채널 디렉토리
   ========================================================================= */
.cat-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line-1);
}
.cat-btn {
  padding: 8px 6px;
  background: var(--elevated);
  border: 1px solid var(--line-1);
  border-radius: var(--r);
  color: var(--ink-3);
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
}
.cat-btn.active {
  background: var(--surface);
  color: var(--ink-1);
  border-color: var(--accent-1);
  font-weight: 700;
}
.cat-btn.invite-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--accent-1);
  border-color: var(--accent-1);
  font-weight: 700;
}
.cat-btn.invite-chip i,
.cat-btn.invite-chip svg { width: 12px; height: 12px; }
.cat-btn.invite-chip:active { opacity: 0.75; }

/* 친구 초대 카드 (전적 탭 내) */
.invite-card {
  margin: 10px 0 14px;
  padding: 14px 16px;
  background: var(--elevated);
  border: 1px solid var(--accent-1);
  border-radius: var(--r);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.invite-card-head {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-1);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
}
.invite-card-head i,
.invite-card-head svg { width: 15px; height: 15px; }
.invite-card-body {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.4;
}
.invite-card-body .invite-reward {
  color: var(--accent-1);
  font-weight: 700;
}
.invite-card-btn {
  padding: 12px 16px;
  background: var(--accent-1);
  color: #0E1220;
  border: 1px solid var(--accent-1);
  border-radius: var(--r);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  touch-action: manipulation;
}
html[data-theme="light"] .invite-card-btn { color: #F8F6F2; }
.invite-card-btn:active { opacity: 0.8; }
.invite-card-btn i,
.invite-card-btn svg { width: 15px; height: 15px; }

/* 친구 초대 모달 */
.modal.invite-modal { max-width: 380px; }
.invite-body { padding: 16px 20px 20px; }
.invite-hero {
  text-align: center;
  padding: 16px 0 18px;
  border-bottom: 1px dashed var(--line-1);
  margin-bottom: 14px;
}
.invite-hero-title {
  font-size: 13px;
  color: var(--ink-2);
  letter-spacing: 0.04em;
}
.invite-hero-reward {
  font-size: 42px;
  font-weight: 800;
  color: var(--accent-1);
  line-height: 1;
  margin: 4px 0;
  font-variant-numeric: tabular-nums;
}
.invite-hero-unit {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  margin-left: 4px;
}
.invite-hero-sub {
  font-size: 12px;
  color: var(--ink-3);
}
.invite-note {
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.7;
  background: var(--surface);
  padding: 10px 12px;
  border-radius: var(--r);
  margin-bottom: 14px;
}
.invite-link-box {
  margin-bottom: 10px;
}
.invite-link-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line-1);
  border-radius: var(--r);
  color: var(--ink-1);
  font-family: inherit;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.invite-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.invite-copy-btn,
.invite-share-btn {
  padding: 12px;
  border-radius: var(--r);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  touch-action: manipulation;
}
.invite-copy-btn {
  background: var(--elevated);
  color: var(--ink-1);
  border: 1px solid var(--line-1);
}
.invite-share-btn {
  background: var(--accent-1);
  color: #0E1220;
  border: 1px solid var(--accent-1);
}
html[data-theme="light"] .invite-share-btn { color: #F8F6F2; }
.invite-copy-btn i,
.invite-share-btn i,
.invite-copy-btn svg,
.invite-share-btn svg { width: 14px; height: 14px; }
.invite-copy-btn:active,
.invite-share-btn:active { opacity: 0.8; }

/* 프로필 카드 */
.profile-item-wrap {
  background: var(--surface);
  border: 1px solid var(--line-1);
  border-radius: var(--r);
  margin-bottom: 6px;
  overflow: hidden;
}
.profile-item-wrap .profile-item { background: transparent; border: 0; border-radius: 0; margin-bottom: 0; }
.profile-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line-1);
  border-radius: var(--r);
  margin-bottom: 6px;
  color: var(--ink-1);
  text-decoration: none;
}
.ch-premium-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  border-top: 1px solid var(--line-1);
  background: transparent;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.ch-premium-btn i,
.ch-premium-btn svg { width: 13px; height: 13px; color: var(--accent-1); }
.ch-premium-btn:active { opacity: 0.7; }
.ch-premium-btn.is-active { color: var(--accent-1); }
html[data-theme="light"] .ch-premium-btn:hover { background: var(--elevated); }
.profile-item .pf-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--r);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--elevated);
  border: 1px solid var(--line-1);
}
.profile-item .pf-avatar.fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--ink-1);
  font-size: 18px;
  background: var(--elevated);
  letter-spacing: -0.01em;
}
.profile-item .pf-main { flex: 1; min-width: 0; }
.profile-item .pf-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-1);
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: -0.005em;
}
.profile-item .pf-star { width: 13px; height: 13px; color: var(--accent-1); }
.profile-item .pf-handle {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 3px;
  letter-spacing: 0.04em;
}
.profile-item .pf-bio {
  font-size: 12px;
  color: var(--ink-2);
  margin-top: 4px;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.profile-item .pf-meta { font-size: 10px; color: var(--ink-3); margin-top: 5px; }
.profile-item .ch-ext { width: 15px; height: 15px; color: var(--ink-3); flex-shrink: 0; }
.profile-item .ch-cat {
  display: inline-block;
  padding: 2px 8px;
  background: transparent;
  border: 1px solid var(--line-accent);
  color: var(--accent-1);
  border-radius: 2px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.channel-list { display: block; }
.channel-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line-1);
  border-radius: var(--r);
  margin-bottom: 6px;
  color: var(--ink-1);
  text-decoration: none;
}
.channel-item .ch-main { flex: 1; min-width: 0; }
.channel-item .ch-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-1);
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: -0.005em;
}
.channel-item .ch-star { width: 13px; height: 13px; color: var(--accent-1); }
.channel-item .ch-desc {
  font-size: 12px;
  color: var(--ink-2);
  margin-top: 4px;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.channel-item .ch-meta { font-size: 10px; color: var(--ink-3); margin-top: 5px; }
.channel-item .ch-cat {
  display: inline-block;
  padding: 2px 8px;
  background: transparent;
  border: 1px solid var(--line-accent);
  color: var(--accent-1);
  border-radius: 2px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.channel-item .ch-ext { width: 15px; height: 15px; color: var(--ink-3); flex-shrink: 0; }

/* =========================================================================
   설정
   ========================================================================= */
.setting-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  background: var(--surface);
  border: 1px solid var(--line-1);
  border-radius: var(--r);
  margin-bottom: 6px;
}
.setting-row .set-main { flex: 1; }
.setting-row .set-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-1);
  margin-bottom: 4px;
  letter-spacing: -0.005em;
}
.setting-row .set-desc {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.5;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute;
  inset: 0;
  background: var(--elevated);
  border: 1px solid var(--line-1);
  border-radius: 12px;
  cursor: pointer;
  transition: background .15s;
}
.switch .slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: var(--ink-3);
  transition: transform .15s, background .15s;
}
.switch input:checked + .slider { background: var(--accent-1); border-color: var(--accent-1); }
.switch input:checked + .slider::before { transform: translateX(20px); background: #fff; }

/* =========================================================================
   검색 입력
   ========================================================================= */
.search-input {
  width: 100%;
  padding: 11px 14px;
  background: var(--elevated);
  border: 1px solid var(--line-1);
  border-radius: var(--r);
  color: var(--ink-1);
  font-family: inherit;
  font-size: 13px;
  margin-bottom: 10px;
}
.search-input::placeholder { color: var(--ink-3); }
.search-input:focus { outline: none; border-color: var(--accent-1); }

/* =========================================================================
   관리자 패널
   ========================================================================= */
.admin-panel { padding-bottom: 40px; }
.adm-sec {
  background: var(--surface);
  border: 1px solid var(--line-1);
  border-radius: var(--r);
  padding: 14px;
  margin-bottom: 10px;
}
.adm-sec-title {
  font-size: 10px;
  color: var(--ink-3);
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.adm-meta { font-size: 12px; color: var(--ink-3); }
.adm-meta code {
  background: var(--elevated);
  padding: 2px 6px;
  border-radius: 2px;
  color: var(--ink-1);
  font-variant-numeric: tabular-nums;
}

.adm-form { display: flex; gap: 6px; flex-wrap: wrap; }
.adm-form.col { flex-direction: column; }
.adm-form.col .row { display: flex; gap: 6px; }
.adm-form input,
.adm-form select {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  background: var(--elevated);
  border: 1px solid var(--line-1);
  border-radius: var(--r);
  color: var(--ink-1);
  font-family: inherit;
  font-size: 13px;
}
.adm-form input:focus,
.adm-form select:focus {
  outline: none;
  border-color: var(--accent-1);
}
.adm-form .chk {
  font-size: 12px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--accent-1);
  border: 1px solid var(--accent-1);
  border-radius: var(--r);
  color: #0E1220;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
}
.btn-primary svg, .btn-primary i { width: 16px; height: 16px; flex-shrink: 0; }
html[data-theme="light"] .btn-primary { color: #F8F6F2; }
.btn-sm {
  padding: 5px 10px;
  border: 1px solid var(--line-1);
  border-radius: var(--r);
  background: var(--elevated);
  color: var(--ink-2);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.btn-sm.btn-win {
  background: transparent;
  color: var(--success-color);
  border-color: color-mix(in srgb, var(--success-color) 45%, transparent);
}
.btn-sm.btn-lose {
  background: transparent;
  color: var(--error-color);
  border-color: color-mix(in srgb, var(--error-color) 45%, transparent);
}
.btn-sm.btn-ghost { color: var(--ink-3); }
.btn-sm.btn-on {
  background: var(--accent-1);
  color: #0E1220;
  border-color: var(--accent-1);
}

.adm-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-1);
}
.adm-row:last-child { border-bottom: none; }
.adm-row .adm-main { flex: 1; min-width: 0; }
.adm-row .adm-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.adm-row .adm-sub {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.adm-row .adm-sub svg,
.adm-row .adm-sub i { width: 11px; height: 11px; vertical-align: -1px; }
.adm-row .adm-actions { display: flex; gap: 4px; flex-shrink: 0; }
.empty-sm { font-size: 12px; color: var(--ink-3); padding: 8px 0; }

/* =========================================================================
   토스트 — 티켓 스터브 (상단 2px accent 라인)
   ========================================================================= */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  background: var(--surface);
  color: var(--ink-1);
  padding: 16px 20px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  z-index: 1000;
  opacity: 0;
  transition: opacity .18s ease, transform .18s ease;
  box-shadow: 0 18px 40px -22px rgba(0,0,0,0.8), 0 2px 8px rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
  max-width: calc(100vw - 48px);
  pointer-events: none;
  overflow: hidden;
}
.toast::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--info-color);
}
.toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.toast i {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  stroke-width: 2;
}
.toast span { flex: 1; word-break: keep-all; }

.toast-success::before { background: var(--success-color); }
.toast-success i { color: var(--success-color); }

.toast-error::before { background: var(--error-color); }
.toast-error i { color: var(--error-color); }

.toast-info::before { background: var(--accent-1); }
.toast-info i { color: var(--accent-1); }

/* =========================================================================
   전적 통계 카드
   ========================================================================= */
.stats-card {
  background: var(--surface);
  border: 1px solid var(--line-1);
  border-radius: var(--r);
  padding: 16px 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-card);
}
.stats-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 8px;
  flex-wrap: wrap;
}
.stats-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: -0.005em;
}
.stats-title svg,
.stats-title i { width: 14px; height: 14px; color: var(--accent-1); }
.stats-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.stats-btn {
  padding: 6px 10px;
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  color: var(--ink-2);
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.stats-btn i,
.stats-btn svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}
.stats-btn.primary {
  background: var(--accent-1);
  color: #0E1220;
  border-color: var(--accent-1);
  font-weight: 700;
}
html[data-theme="light"] .stats-btn.primary { color: #F8F6F2; }
.stats-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.stats-btn:not(:disabled):active { opacity: 0.75; }

.stats-row {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  font-size: 12px;
  border-top: 1px solid var(--line-1);
  align-items: baseline;
}
.stats-row:first-of-type { border-top: none; padding-top: 4px; }
.stats-label {
  color: var(--ink-3);
  min-width: 80px;
  flex-shrink: 0;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
}
.stats-val {
  color: var(--ink-2);
  flex: 1;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.stats-val b {
  color: var(--ink-1);
  font-weight: 700;
}

/* ---- 최근 7일 막대 (더미) ---- */
.stats-weekbar {
  margin: 6px 0 12px;
  padding: 12px 0 4px;
  border-top: 1px solid var(--line-1);
}
.stats-weekbar-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}
.stats-weekbar-head .wb-lbl {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
}
.stats-weekbar-head .wb-legend {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 9px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}
.stats-weekbar-head .wb-legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 1px;
  margin-right: 4px;
  vertical-align: -1px;
  font-style: normal;
}
.stats-weekbar-head .wb-legend i.hit { background: var(--accent-1); }
.stats-weekbar-head .wb-legend i.miss { background: var(--ink-3); opacity: 0.45; }

.stats-weekbars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  align-items: end;
  height: 72px;
}
.stats-weekbars .wb {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}
.stats-weekbars .wb .stack {
  width: 100%;
  display: flex;
  flex-direction: column-reverse;
  border-radius: 2px;
  overflow: hidden;
}
.stats-weekbars .wb .hit { background: var(--accent-1); }
.stats-weekbars .wb .miss { background: var(--ink-3); opacity: 0.3; }
.stats-weekbars .wb.empty .stack::after {
  content: "";
  width: 4px;
  height: 4px;
  background: var(--line-2);
  border-radius: 50%;
  align-self: center;
  margin-bottom: 2px;
}
.stats-weekbars .wb.empty .stack {
  align-items: center;
  justify-content: flex-end;
}

.stats-weekbar-labels {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-top: 6px;
}
.stats-weekbar-labels span {
  text-align: center;
  font-size: 10px;
  color: var(--ink-3);
  font-weight: 500;
  letter-spacing: 0.06em;
}

/* =========================================================================
   BET PUBLISH PAGE (admin) — 2026-04-17
   ========================================================================= */
.bp-page { padding: 4px 4px 40px; }
.bp-page-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 4px 16px;
  border-bottom: 1px solid var(--line-1);
  margin-bottom: 4px;
}
.bp-page-head h2 {
  font-family: 'Pretendard', sans-serif;
  font-size: 20px; font-weight: 700; color: var(--ink-1); letter-spacing: -0.01em;
}
.bp-close {
  background: transparent; border: 1px solid var(--line-2);
  color: var(--ink-2); padding: 6px 10px; cursor: pointer;
  display: inline-flex; align-items: center;
}
.bp-close i { width: 18px; height: 18px; }

.bp-section {
  padding: 16px 4px;
  border-top: 1px solid var(--line-1);
}
.bp-section:first-of-type { border-top: none; }
.bp-submit { border-top: 1px solid var(--line-1); padding-top: 20px; }

.bp-label {
  font-size: 10px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 10px;
}

.bp-row { display: flex; gap: 6px; flex-wrap: wrap; }
.bp-hint { font-size: 11px; color: var(--ink-3); margin-top: 8px; }

.bp-radio {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 16px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  min-width: 84px;
}
.bp-radio input { display: none; }
.bp-radio.active {
  background: var(--accent-1);
  color: var(--bg);
  border-color: var(--accent-1);
}

.bp-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  color: var(--ink-1);
  font-family: inherit;
  font-size: 14px;
  outline: none;
}
.bp-input:focus { border-color: var(--accent-1); }
textarea.bp-input { resize: vertical; min-height: 60px; }

.bp-dl-big {
  font-size: 22px; font-weight: 600; color: var(--ink-1);
  padding: 14px 16px;
  border: 1px solid var(--accent-1);
  background: var(--surface);
  margin-bottom: 12px;
  line-height: 1.35;
}
.bp-dl-big .bp-dl-rel {
  display: block;
  font-size: 12px; font-weight: 400;
  color: var(--ink-3);
  margin-top: 4px;
  letter-spacing: 0;
}

.bp-preset {
  padding: 8px 14px;
  background: var(--elevated);
  border: 1px solid var(--line-1);
  color: var(--ink-2);
  font-size: 12px; font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}
.bp-preset:hover { border-color: var(--accent-1); color: var(--ink-1); }

.bp-manual {
  display: flex; gap: 8px; margin-top: 12px;
}
.bp-manual .bp-input { flex: 1; }

/* 다크모드 date/time picker 아이콘 (기본 검정 → 흰색 반전) */
html { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(0.85);
  opacity: 1;
  cursor: pointer;
}
html[data-theme="light"] input[type="date"]::-webkit-calendar-picker-indicator,
html[data-theme="light"] input[type="time"]::-webkit-calendar-picker-indicator,
html[data-theme="light"] input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  filter: none;
}

/* === 커스텀 date/time 아이콘 (native indicator 숨기고 lucide 대체) === */
.bp-manual { align-items: stretch; }
.bp-dt-wrap { position: relative; flex: 1; display: flex; }
.bp-dt-wrap .bp-input { width: 100%; padding-right: 40px; }
.bp-dt-wrap .bp-input::-webkit-calendar-picker-indicator {
  opacity: 0;
  position: absolute;
  right: 0; left: 0; top: 0; bottom: 0;
  width: 100%; height: 100%;
  cursor: pointer;
  background: transparent;
}
.bp-dt-btn {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 40px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-2);
  pointer-events: none;
}
.bp-dt-btn i { width: 16px; height: 16px; }

/* ========================================
   등록안내 버튼 (전체 버튼 우측 고정)
   2026-04-18 추가
   ======================================== */
.guide-btn {
  padding: 8px 10px;
  background: var(--elevated);
  border: 1px solid var(--line-accent);
  border-radius: var(--r);
  color: var(--accent-1);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.guide-btn:hover { border-color: var(--accent-1); color: var(--ink-1); }
.guide-btn i,
.guide-btn svg { width: 13px; height: 13px; }

/* 등록안내 모달 */
.guide-body {
  padding: 16px;
  overflow-y: auto;
  max-height: calc(85vh - 60px);
}
.guide-sec {
  padding: 12px;
  margin-bottom: 10px;
  background: var(--elevated);
  border: 1px solid var(--line-1);
  border-radius: var(--r);
}
.guide-sec:last-child { margin-bottom: 0; }
.guide-sec-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink-1);
  margin-bottom: 8px;
}
.guide-sec-title i,
.guide-sec-title svg { width: 15px; height: 15px; color: var(--accent-1); }
.guide-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.guide-list li {
  position: relative;
  padding: 4px 0 4px 14px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-2);
}
.guide-list li::before {
  content: "·";
  position: absolute;
  left: 3px;
  top: 4px;
  color: var(--accent-1);
  font-weight: 700;
}
.guide-list b { color: var(--ink-1); font-weight: 700; }
.guide-contact {
  text-align: center;
  font-size: 13px;
  color: var(--ink-2);
  background: transparent;
  border-style: dashed;
}
.guide-contact b { color: var(--accent-1); font-weight: 700; }

/* ========================================
   스폰서 모달 효과 강조 박스 (시간권/게임권 공통)
   2026-04-18 추가
   ======================================== */
.sp-effect {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  margin-bottom: 14px;
  background: var(--elevated);
  border: 1px solid var(--line-accent);
  border-left: 3px solid var(--accent-1);
  border-radius: var(--r);
}
.sp-effect-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--accent-1);
  margin-top: 1px;
}
.sp-effect-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-1);
  line-height: 1.45;
  margin-bottom: 3px;
}
.sp-effect-title u {
  text-decoration-color: var(--accent-1);
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}
.sp-effect-body {
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.5;
}
.sp-tag {
  display: inline-block;
  padding: 1px 6px;
  background: var(--surface);
  border: 1px solid var(--line-accent);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-1);
  margin: 0 2px;
}

/* 월 셀렉터 (랭킹 탭 monthly 서브) */
.month-bar {
  display: flex;
  gap: 6px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line-1);
  overflow-x: auto;
  scrollbar-width: none;
}
.month-bar::-webkit-scrollbar { display: none; }
.month-btn {
  padding: 6px 12px;
  background: var(--elevated);
  border: 1px solid var(--line-1);
  border-radius: var(--r);
  color: var(--ink-3);
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.month-btn.active {
  background: var(--surface);
  color: var(--ink-1);
  border-color: var(--accent-1);
  font-weight: 700;
}

/* 내 채널 등록 버튼 */
.ch-register-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 14px;
  margin: 0 0 8px;
  border: 1px solid var(--line-accent);
  border-radius: 4px;
  background: transparent;
  color: var(--accent-1);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.ch-register-btn i,
.ch-register-btn svg { width: 14px; height: 14px; }
.ch-register-btn:active { opacity: 0.75; }

/* 채널 등록 모달 */
.ch-register-body { padding: 14px 16px 18px; max-height: 70vh; overflow-y: auto; }
.chr-status {
  padding: 8px 12px;
  border: 1px solid var(--line-1);
  background: var(--elevated);
  border-radius: 3px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.6;
}
.chr-status b { color: var(--ink-1); font-weight: 700; }
.chr-warn {
  padding: 8px 12px;
  border: 1px solid #d32f2f;
  background: rgba(211, 47, 47, 0.08);
  border-radius: 3px;
  margin-bottom: 10px;
  font-size: 12px;
  color: #d32f2f;
  font-weight: 600;
  line-height: 1.5;
}
.chr-label {
  display: block;
  margin: 8px 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: 0.02em;
}
.chr-required { color: #d32f2f; }
.chr-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line-1);
  border-radius: 3px;
  background: var(--surface);
  color: var(--ink-1);
  font-size: 13px;
  font-family: inherit;
  outline: none;
}
.chr-input:focus { border-color: var(--accent-1); }
.chr-row-flex { display: flex; gap: 6px; align-items: stretch; }
.chr-row-flex .chr-input { flex: 1; }
.chr-lookup-btn {
  padding: 0 14px;
  border: 1px solid var(--line-1);
  border-radius: 3px;
  background: var(--elevated);
  color: var(--ink-1);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.chr-lookup-btn:active { opacity: 0.7; }
.chr-lookup-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.chr-msg { font-size: 11px; margin-top: 4px; min-height: 14px; color: var(--ink-3); line-height: 1.4; }
.chr-msg.ok { color: #2e7d32; }
.chr-msg.err { color: #d32f2f; }

.chr-terms {
  margin: 14px 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line-1);
  border-radius: 3px;
  background: var(--elevated);
}
.chr-terms-title { font-size: 11px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; letter-spacing: 0.02em; }
.chr-terms-list { margin: 0; padding-left: 16px; font-size: 11px; color: var(--ink-3); line-height: 1.6; }
.chr-terms-list li { margin: 1px 0; }
.chr-terms-list b { color: var(--ink-2); font-weight: 700; }

.chr-submit {
  width: 100%;
  padding: 12px;
  margin-top: 4px;
  border: 0;
  border-radius: 3px;
  background: var(--accent-1);
  color: var(--surface);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.chr-submit:active { opacity: 0.85; }
.chr-submit:disabled { opacity: 0.4; cursor: not-allowed; }
html[data-theme="light"] .chr-submit { color: #F8F6F2; }

/* 채널 탭 상단 안내문 */
.ch-notice {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 8px 12px;
  margin-bottom: 8px;
  border: 1px solid var(--line-1);
  border-radius: 3px;
  background: var(--elevated);
  color: var(--ink-3);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.01em;
}
.ch-notice i,
.ch-notice svg { width: 13px; height: 13px; color: var(--ink-3); flex-shrink: 0; margin-top: 2px; }

/* 채널 프리미엄 결제 모달 */
.ch-premium-body { padding: 14px 16px 18px; }
.chp-target {
  padding: 10px 12px;
  border: 1px solid var(--line-1);
  border-radius: 4px;
  margin-bottom: 14px;
  background: var(--elevated);
}
.chp-channel { font-size: 14px; font-weight: 700; color: var(--ink-1); letter-spacing: 0.02em; }
.chp-display { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.chp-period { font-size: 12px; color: var(--ink-2); margin-top: 6px; }
.chp-status { font-size: 11px; color: var(--accent-1); margin-top: 6px; font-weight: 600; }
.chp-options { display: flex; flex-direction: column; gap: 8px; }
.chp-option {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line-1);
  border-radius: 4px;
  color: var(--ink-1);
  cursor: pointer;
  text-align: left;
}
.chp-option:active { opacity: 0.85; }
.chp-option:disabled { opacity: 0.5; cursor: not-allowed; }
.chp-opt-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--ink-1);
}
.chp-opt-title i,
.chp-opt-title svg { width: 14px; height: 14px; color: var(--accent-1); }
.chp-opt-price { font-size: 18px; font-weight: 800; color: var(--accent-1); letter-spacing: 0.01em; }
.chp-opt-note { font-size: 11px; color: var(--ink-3); }
.chp-foot { font-size: 11px; color: var(--ink-3); margin-top: 12px; line-height: 1.5; }
.chp-terms {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line-1);
  border-radius: 3px;
  background: var(--elevated);
}
.chp-terms-title { font-size: 11px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; letter-spacing: 0.02em; }
.chp-terms-list { margin: 0; padding-left: 16px; font-size: 11px; color: var(--ink-3); line-height: 1.6; }
.chp-terms-list li { margin: 1px 0; }
.chp-terms-list b { color: var(--ink-2); font-weight: 700; }

