/* ==========================================================================
   Trafix — Tangerine Signal
   Flat, bright, cute. Tangerine primary always accompanied by sky + butter.
   No gradients, blur, glow, or glassmorphism. Light mode only.
   ========================================================================== */

:root {
  /* ---- Color: base ---- */
  --bg: #FFF6EE;
  --surface: #FFFFFF;
  --surface-alt: #FFEEDF;
  --text: #2A1A10;
  --text-muted: #8A6C57;
  --text-on-dark: #FFFFFF;
  --text-on-dark-muted: rgba(255, 255, 255, 0.82);
  --border: #F0DEC9;
  --border-strong: #EBDDCF;

  /* ---- Color: brand (tangerine + sky + butter) ---- */
  --primary: #F76122;
  --primary-deep: #B23F0C;
  --primary-tint: #FFEEDF;
  --secondary: #178FE0;
  --secondary-tint: #E3F1FC;
  --support: #FFC53D;
  --support-tint: #FFF0C9;
  --live-red: #DE3A26;
  --money-green: #149E57;
  --money-green-bg: #ECFDF5;
  --warn: #E39400;

  /* ---- Color: tier metals ---- */
  --tier-copper: #B87333;
  --tier-copper-bg: #FBEEE3;
  --tier-silver: #94A3B8;
  --tier-silver-bg: #EEF1F5;
  --tier-gold: #F59E0B;
  --tier-gold-bg: #FEF3E0;
  --tier-platinum: #64748B;
  --tier-platinum-bg: #EBEEF2;
  --tier-diamond-a: #22D3EE;
  --tier-diamond-b: #818CF8;
  --tier-diamond-bg: #E9FBFF;

  /* ---- Color: rank row tints (top 3, flat) ---- */
  --rank-gold-bg: #FEF6E4;
  --rank-gold-border: #F1D48B;
  --rank-silver-bg: #F4F6F9;
  --rank-silver-border: #D6DBE5;
  --rank-bronze-bg: #FBEFE6;
  --rank-bronze-border: #E7C7A6;

  /* ---- Shadows (flat sticker, single family) ---- */
  --shadow-primary: 5px 6px 0 rgba(216, 104, 40, 0.18);
  --shadow-card: 5px 6px 0 rgba(216, 104, 40, 0.18);
  --shadow-soft: 3px 4px 0 rgba(216, 104, 40, 0.20);

  /* ---- Radius ---- */
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-xl: 34px;
  --radius-pill: 999px;

  /* ---- Spacing ---- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;

  /* ---- Type scale ---- */
  --text-xs: 11px;
  --text-sm: 13px;
  --text-base: 15px;
  --text-lg: 17px;
  --text-xl: 20px;
  --text-2xl: 28px;
  --text-3xl: 36px;

  --font-family: 'Pretendard', -apple-system, 'Apple SD Gothic Neo', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #F3E4D3;
  font-family: var(--font-family);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  justify-content: center;
  padding: 48px 16px;
}

/* ---- Phone canvas ---- */
.phone {
  width: 390px;
  min-height: 844px;
  background: var(--bg);
  border-radius: 44px;
  box-shadow: 0 30px 60px -20px rgba(42, 26, 16, 0.35), 0 0 0 10px #2A1A10;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px 4px;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text);
}

.statusbar__notch {
  width: 120px;
  height: 28px;
  background: #2A1A10;
  border-radius: var(--radius-pill);
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
}

.statusbar__icons {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text);
}

.screen {
  flex: 1;
  overflow-y: auto;
  padding: 20px 20px 12px;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

/* ---- Type helpers ---- */
h1, h2, h3, h4, p { margin: 0; }

.h-page {
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.label {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-muted);
}

.value-amount {
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.value-amount--lg {
  font-size: var(--text-3xl);
}

.text-muted { color: var(--text-muted); }
.text-money { color: var(--money-green); }
.text-spark { color: var(--secondary); }

/* ---- Top bar ---- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.brand__mark {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-primary);
  flex-shrink: 0;
}
/* 실제 Trafix 로고(X 마크)를 마스크로 렌더 — 홈 상단바·인덱스 헤더 등 .brand__mark 공용 */
.brand__mark > svg { display: none; }
.brand__mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--text-on-dark);
  -webkit-mask: url("../assets/trafix-x.svg") center / 58% 58% no-repeat;
  mask: url("../assets/trafix-x.svg") center / 58% 58% no-repeat;
}

.brand__name {
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.topbar__pills {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 800;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.pill--xp { color: var(--primary); }
.pill--streak { color: var(--secondary); }

/* ---- Cards, generic ---- */
.card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  padding: var(--space-5);
}

/* ---- Hero card ---- */
.hero {
  position: relative;
  border-radius: var(--radius-xl);
  padding: var(--space-6) var(--space-5) var(--space-5);
  background: var(--primary);
  color: var(--text-on-dark);
  box-shadow: var(--shadow-primary);
  overflow: hidden;
  isolation: isolate;
}

.hero::after {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 197, 61, 0.35);
  z-index: -1;
}

.hero__label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-on-dark-muted);
}

.hero__amount {
  margin-top: var(--space-2);
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.hero__meta {
  margin-top: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.hero__meta-pill {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.16);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-on-dark);
}

/* ---- Withdrawable split row ---- */
.split-row {
  display: flex;
  align-items: stretch;
}

.split-row__item {
  flex: 1;
  padding: var(--space-4) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.split-row__divider {
  width: 1px;
  background: var(--border);
  margin: var(--space-3) 0;
}

.split-row__amount {
  font-size: var(--text-xl);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.split-row__amount--ready { color: var(--money-green); }
.split-row__amount--pending { color: var(--text-muted); }

.split-row__cta {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-primary);
}

/* ---- Tier badges ---- */
.badge-tier {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 800;
}

.badge-tier__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge-tier--copper { background: var(--tier-copper-bg); color: #8A4E22; }
.badge-tier--copper .badge-tier__dot { background: var(--tier-copper); }

.badge-tier--silver { background: var(--tier-silver-bg); color: #4B5768; }
.badge-tier--silver .badge-tier__dot { background: var(--tier-silver); }

.badge-tier--gold { background: var(--tier-gold-bg); color: #92610A; }
.badge-tier--gold .badge-tier__dot { background: var(--tier-gold); }

.badge-tier--platinum { background: var(--tier-platinum-bg); color: #3F4959; }
.badge-tier--platinum .badge-tier__dot {
  background: var(--tier-platinum);
}

.badge-tier--diamond { background: var(--tier-diamond-bg); color: #375EC7; }
.badge-tier--diamond .badge-tier__dot {
  background: var(--tier-diamond-a);
}

/* on dark hero background */
.badge-tier--on-dark {
  background: rgba(255, 255, 255, 0.92);
}

/* ---- XP / tier progress ---- */
.progress-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.progress-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.progress-block__title {
  font-size: var(--text-base);
  font-weight: 800;
}

.progress-bar {
  position: relative;
  width: 100%;
  height: 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-alt);
  overflow: hidden;
}

.progress-bar__fill {
  position: absolute;
  inset: 0 auto 0 0;
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--primary);
}

.progress-block__labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-muted);
}

/* ---- Live ticker ---- */
.ticker-panel {
  background: var(--money-green-bg);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.ticker-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ticker-panel__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-base);
  font-weight: 800;
  color: #0B4D2C;
}

.ticker-panel__title-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--money-green);
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px 5px 8px;
  border-radius: var(--radius-pill);
  background: var(--live-red);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.live-pill__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: live-pulse 1.6s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.ticker-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  box-shadow: var(--shadow-soft);
}

.ticker-row__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: var(--text-sm);
  color: #fff;
  flex-shrink: 0;
}

.ticker-row__body {
  flex: 1;
  min-width: 0;
}

.ticker-row__name {
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--text);
}

.ticker-row__sub {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 600;
}

.ticker-row__amount {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--money-green);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---- Recommended campaign card ---- */
.reco {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.reco__info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.reco__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-muted);
}

.reco__rate {
  font-size: var(--text-xl);
  font-weight: 800;
}

.reco__thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background: var(--primary);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-primary);
}

/* ---- Section heading row ---- */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-head__title {
  font-size: var(--text-lg);
  font-weight: 800;
}

.section-head__link {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--primary);
}

/* ---- Tabbar ---- */
.tabbar {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 10px 8px calc(10px + env(safe-area-inset-bottom, 10px));
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.tabbar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--text-muted);
  min-width: 60px;
}

.tabbar__item span {
  font-size: var(--text-xs);
  font-weight: 700;
}

.tabbar__item--active { color: var(--primary); }
.tabbar__item--active svg { stroke: var(--primary); }

/* ---- Ranking page: header + tabs ---- */
.page-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: var(--text-xl);
  font-weight: 800;
  padding-top: 4px;
}

.seg-tabs {
  display: flex;
  padding: 4px;
  background: var(--surface-alt);
  border-radius: var(--radius-pill);
  gap: 4px;
}

.seg-tabs__item {
  flex: 1;
  text-align: center;
  padding: 9px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-muted);
}

.seg-tabs__item--active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

/* ---- Medal rows (top 3) ---- */
.medal-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-xl);
  border: 1px solid transparent;
}

.medal-row--gold {
  background: var(--rank-gold-bg);
  border-color: var(--rank-gold-border);
}
.medal-row--silver {
  background: var(--rank-silver-bg);
  border-color: var(--rank-silver-border);
}
.medal-row--bronze {
  background: var(--rank-bronze-bg);
  border-color: var(--rank-bronze-border);
}

.medal-row__rank {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: var(--text-sm);
  color: #fff;
  flex-shrink: 0;
}

.medal-row--gold .medal-row__rank { background: #E4A62A; }
.medal-row--silver .medal-row__rank { background: #99A4B3; }
.medal-row--bronze .medal-row__rank { background: #B87333; }

.medal-row__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: var(--text-base);
  color: #fff;
  flex-shrink: 0;
}

.medal-row__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.medal-row__name {
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--text);
}

.medal-row__amount {
  font-size: var(--text-lg);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---- Plain rank rows (4-6) ---- */
.rank-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}

.rank-row__num {
  width: 24px;
  text-align: center;
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--text-muted);
  flex-shrink: 0;
}

.rank-row__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: var(--text-sm);
  color: #fff;
  flex-shrink: 0;
}

.rank-row__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.rank-row__name {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text);
}

.rank-row__amount {
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---- Sticky self-rank card ---- */
.self-rank {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-xl);
  background: var(--primary);
  color: var(--text-on-dark);
  box-shadow: var(--shadow-primary);
}

.self-rank__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.self-rank__body { flex: 1; min-width: 0; }

.self-rank__label {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-on-dark-muted);
}

.self-rank__hint {
  font-size: var(--text-sm);
  font-weight: 800;
  margin-top: 2px;
}

.self-rank__value {
  font-size: var(--text-2xl);
  font-weight: 800;
  white-space: nowrap;
}

/* ---- Avatars: color set ---- */
.avatar--1 { background: var(--primary); }
.avatar--2 { background: var(--support); }
.avatar--3 { background: var(--money-green); }
.avatar--4 { background: var(--live-red); }
.avatar--5 { background: var(--tier-platinum); }
.avatar--6 { background: var(--secondary); }

/* ==========================================================================
   Stage 1 extension — shared components for the full app
   ========================================================================== */

/* ---- Buttons ---- */
.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-family);
  font-size: var(--text-base);
  font-weight: 800;
  letter-spacing: -0.01em;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  transition: transform 0.05s ease;
}

.btn:active { transform: scale(0.98); }

.btn--block { width: 100%; }

.btn--sm {
  padding: 9px 14px;
  font-size: var(--text-sm);
  border-radius: var(--radius-sm);
}

.btn--primary {
  background: var(--primary);
  color: var(--text-on-dark);
  box-shadow: var(--shadow-primary);
}

.btn--secondary {
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--border-strong);
}

.btn--ghost {
  background: transparent;
  color: var(--primary);
}

.btn--danger {
  background: #FEF2F2;
  color: #DC2626;
  border: 1.5px solid #FCA5A5;
}

.btn--danger-solid {
  background: #DC2626;
  color: #fff;
}

.btn:disabled,
.btn--disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none !important;
}

/* ---- Top app bar (with back) ---- */
.appbar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-bottom: 2px;
}

.appbar__back {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.appbar__title {
  flex: 1;
  font-size: var(--text-lg);
  font-weight: 800;
  text-align: center;
  margin-right: 36px; /* balances back button so title stays centered */
}

.appbar__action {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  flex-shrink: 0;
}

/* ---- Form controls ---- */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.field__label {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text);
}

.field__hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 600;
}

.field__error {
  font-size: var(--text-xs);
  color: #DC2626;
  font-weight: 700;
}

.input {
  width: 100%;
  font-family: var(--font-family);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.input::placeholder { color: var(--text-muted); font-weight: 500; }

.input:focus {
  outline: none;
  border-color: var(--primary);
}

.input--error { border-color: #DC2626; }

/* amount input with ₩ prefix */
.input-amount {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.input-amount:focus-within { border-color: var(--primary); }

.input-amount__prefix {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--text-muted);
}

.input-amount__field {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-family);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  min-width: 0;
}

.input-amount__field::placeholder { color: var(--border-strong); }

.select {
  width: 100%;
  font-family: var(--font-family);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

/* radio/checkbox chip group */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 700;
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  color: var(--text-muted);
}

.chip--selected {
  background: #FFEEDF;
  border-color: var(--primary);
  color: var(--primary);
}

/* ---- List rows ---- */
.list-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-1);
  border-bottom: 1px solid var(--border);
}

.list-row:last-child { border-bottom: none; }

.list-row__icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  flex-shrink: 0;
}

.list-row__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.list-row__title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text);
}

.list-row__sub {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 600;
}

.list-row__chevron { color: var(--text-muted); flex-shrink: 0; }

/* settings row: icon + label + chevron/switch */
.list-row--settings .list-row__title { font-weight: 700; }

.switch {
  width: 44px;
  height: 26px;
  border-radius: var(--radius-pill);
  background: var(--border-strong);
  position: relative;
  flex-shrink: 0;
}

.switch__knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

.switch--on { background: var(--primary); }
.switch--on .switch__knob { left: auto; right: 3px; }

/* notification row */
.list-row--notification .list-row__icon { background: #FFEEDF; color: var(--primary); }

.list-row--unread {
  background: #F8F8FE;
  border-radius: var(--radius-md);
}

.list-row__unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--secondary);
  flex-shrink: 0;
}

/* transaction row */
.list-row--transaction .list-row__icon { background: var(--money-green-bg); color: var(--money-green); }

.list-row__amount {
  font-size: var(--text-base);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.list-row__amount--positive { color: var(--money-green); }
.list-row__amount--negative { color: var(--text); }

/* ---- Overlay / Bottom sheet / Modal ---- */
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(42, 26, 16, 0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 40;
}

.overlay--center {
  align-items: center;
  padding: 0 var(--space-6);
}

.sheet {
  width: 100%;
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: var(--space-3) var(--space-5) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-height: 80%;
}

.sheet__handle {
  width: 40px;
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--border-strong);
  align-self: center;
}

.sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sheet__title {
  font-size: var(--text-lg);
  font-weight: 800;
}

.modal {
  width: 100%;
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: var(--space-7) var(--space-6) var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-3);
  box-shadow: 0 30px 60px -20px rgba(42, 26, 16, 0.4);
}

.modal__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--money-green-bg);
  color: var(--money-green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-2);
}

.modal__title {
  font-size: var(--text-xl);
  font-weight: 800;
}

.modal__body {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1.5;
}

/* ---- Toast ---- */
.toast {
  position: absolute;
  left: var(--space-5);
  right: var(--space-5);
  bottom: 90px;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: #2A1A10;
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 700;
  box-shadow: 0 12px 28px -8px rgba(42, 26, 16, 0.4);
  z-index: 50;
}

.toast--success { background: #0B4D2C; }
.toast--error { background: #7F1D1D; }

/* ---- Empty state ---- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-3);
  padding: var(--space-8) var(--space-5);
}

.empty-state__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--surface-alt);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-state__title {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--text);
}

.empty-state__body {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1.5;
}

/* ---- Step indicator ---- */
.steps {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.steps__item {
  flex: 1;
  height: 5px;
  border-radius: var(--radius-pill);
  background: var(--surface-alt);
}

.steps__item--done,
.steps__item--active { background: var(--primary); }

/* numbered variant */
.steps--numbered { gap: var(--space-3); }

.steps__dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface-alt);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 800;
  flex-shrink: 0;
}

.steps__dot--active {
  background: var(--primary);
  color: #fff;
}

.steps__dot--done {
  background: var(--money-green);
  color: #fff;
}

/* ---- Platform chips (YouTube / Instagram / TikTok) ---- */
.platform-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 800;
  border: 1.5px solid var(--border-strong);
  color: var(--text);
  background: var(--surface);
}

.platform-chip svg { stroke: currentColor; }

.platform-chip--youtube { color: #CC1F1F; border-color: #F3C6C6; background: #FEF2F2; }
.platform-chip--instagram { color: #C0197C; border-color: #F0C2DD; background: #FDF2F8; }
.platform-chip--tiktok { color: #2A1A10; border-color: var(--border-strong); background: var(--surface-alt); }

/* ---- Campaign detail hero ---- */
.campaign-hero {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--primary);
  color: var(--text-on-dark);
  padding: var(--space-6) var(--space-5) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  box-shadow: var(--shadow-primary);
}

.campaign-hero__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-on-dark-muted);
}

.campaign-hero__title {
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.campaign-hero__rate {
  font-size: var(--text-lg);
  font-weight: 800;
  color: #FFE8DA;
}

.campaign-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

/* ---- Guide / playbook accordion ---- */
.accordion {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.accordion__item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.accordion__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4);
  font-size: var(--text-base);
  font-weight: 700;
}

.accordion__head-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.accordion__chevron { color: var(--text-muted); flex-shrink: 0; transition: transform 0.15s ease; }
.accordion__item--open .accordion__chevron { transform: rotate(180deg); }

.accordion__body {
  padding: 0 var(--space-4) var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1.6;
}

/* ---- Warning / info callout ---- */
.callout {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
}

.callout__icon { flex-shrink: 0; }

.callout__body {
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.5;
}

.callout__title {
  font-size: var(--text-sm);
  font-weight: 800;
  margin-bottom: 2px;
  display: block;
}

.callout--warning {
  background: #FFF7ED;
  border-color: #FDE0BC;
  color: #92400E;
}

.callout--info {
  background: #FFEEDF;
  border-color: #D9DEFB;
  color: #363A8C;
}

.callout--danger {
  background: #FEF2F2;
  border-color: #F8C6C6;
  color: #991B1B;
}

/* ---- Phone verification code boxes ---- */
.code-boxes {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
}

.code-box {
  width: 44px;
  height: 54px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--text);
}

.code-box--active { border-color: var(--primary); box-shadow: 0 0 0 3px #FFEEDF; }
.code-box--filled { border-color: var(--border-strong); background: var(--surface-alt); }

/* ---- Tier lock overlay (gated campaign cards) ---- */
.tier-lock {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(42, 26, 16, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #fff;
  text-align: center;
  padding: var(--space-3);
}

.tier-lock__icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tier-lock__label {
  font-size: var(--text-xs);
  font-weight: 800;
}

/* container for anything that needs a tier-lock child positioned absolutely */
.tier-lock-container { position: relative; }


/* ==========================================================================
   Tangerine 시그니처 primitives — signal-pip / sticker pick-tile / guide bubble
   검증 조회수가 '딸깍' 들어오는 신호 은유 + 스티커 리프트 인터랙션.
   (온보딩·선택형 화면 공용. 페이지에서 재정의하지 말고 이 클래스를 쓴다.)
   ========================================================================== */

/* signal-pip: 원 + 삼각 노치 (진행 인디케이터·선택 발화 공용) */
.sig-steps { display: flex; align-items: center; gap: var(--space-2); }
.sig-pip {
  position: relative;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--border-strong);
  flex-shrink: 0;
}
.sig-pip::after {
  content: "";
  position: absolute;
  right: 3px; bottom: 4px;
  width: 8px; height: 8px;
  background: var(--surface);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}
.sig-pip--on { background: var(--primary); }
.sig-pip--done { background: var(--money-green); }
.sig-pip__line { flex: 1; height: 3px; border-radius: 3px; background: var(--border-strong); }
.sig-pip__line--on { background: var(--primary); }
.sig-steps__label {
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-left: 6px;
}
.sig-steps__label b { color: var(--primary); }

/* 온보딩 헤드라인 (Pretendard 900 대형) */
.onb-title { font-size: var(--text-3xl); font-weight: 900; letter-spacing: -0.03em; line-height: 1.08; }
.onb-sub { margin-top: var(--space-3); font-size: var(--text-sm); font-weight: 600; color: var(--text-muted); line-height: 1.5; }

/* 탱글이 가이드 말풍선 (삼각 노치 tail + butter) */
.guide {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--support-tint);
  border: 2px solid #F5D97E;
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
}
.guide::after {
  content: "";
  position: absolute;
  left: 30px; bottom: -9px;
  width: 15px; height: 15px;
  background: var(--support-tint);
  border-right: 2px solid #F5D97E;
  border-bottom: 2px solid #F5D97E;
  transform: rotate(45deg);
}
.guide__mascot { width: 46px; height: 46px; flex-shrink: 0; }
.guide__text { font-size: var(--text-sm); font-weight: 700; color: #8A5A00; line-height: 1.45; }

/* tactile 스티커 선택 타일 — 선택 시 살짝 떠오름 + 신호 핍 발화 */
.pick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
.pick-tile {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-4);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.pick-tile--wide { grid-column: 1 / -1; }
.pick-tile--on {
  background: var(--primary-tint);
  border-color: var(--primary);
  color: var(--primary-deep);
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-card);
}
.pick-tile__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pick-tile__body small { font-size: var(--text-xs); font-weight: 600; color: var(--text-muted); }
.pick-tile--on .pick-tile__body small { color: var(--primary-deep); opacity: 0.75; }
.pick-tile__pip {
  position: relative;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--border-strong);
  flex-shrink: 0;
}
.pick-tile__pip::after {
  content: "";
  position: absolute;
  right: 2px; bottom: 3px;
  width: 6px; height: 6px;
  background: var(--surface);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}
.pick-tile--on .pick-tile__pip { background: var(--primary); }
.pick-tile--on .pick-tile__pip::after { background: var(--primary-tint); }
