/* 게게겜 — unslop 기반 보드게임·내전 라운지 테마 (라이트·다크·고대비) */
:root {
  --bg: #f6f6f4;
  --surface: #ffffff;
  --surface-sub: #f0f0ec;
  --row-bg: #fafaf8;
  --input-bg: #ffffff;
  --text: #1a1b19;
  --secondary: #52544f;
  --muted: #7c7e78;
  --line: rgba(26, 27, 25, 0.1);
  --line-strong: rgba(26, 27, 25, 0.2);
  --accent: #2b4ea2;
  --accent-hover: #213e84;
  --accent-soft: rgba(43, 78, 162, 0.1);
  --accent-ink: #ffffff;
  --win: #1f6b47;
  --win-soft: rgba(31, 107, 71, 0.1);
  --loss: #b83b3b;
  --loss-soft: rgba(184, 59, 59, 0.1);
  --danger: #b83b3b;
  --danger-bg: rgba(184, 59, 59, 0.08);
  --star: #d48914;
  --font-display: 'Jua', 'Pretendard Variable', -apple-system, sans-serif;
  --font-ui: 'Pretendard Variable', 'Pretendard', -apple-system, 'Apple SD Gothic Neo', sans-serif;
  --r-card: 16px;
  --r-row: 12px;
  --r-ctl: 10px;
  --r-sm: 6px;
  --bw: 1px;
  --fs-xs: 12px;
  --fs-sm: 14px;
  --fs-md: 16px;
  --fs-lg: 18px;
  --fs-xl: 20px;
  --fs-2xl: 24px;
}

:root[data-theme="dark"] {
  --bg: #141415;
  --surface: #1c1d1f;
  --surface-sub: #242629;
  --row-bg: #202225;
  --input-bg: #18191b;
  --text: #f3f3f1;
  --secondary: #b0b2ac;
  --muted: #7d807a;
  --line: rgba(243, 243, 241, 0.1);
  --line-strong: rgba(243, 243, 241, 0.22);
  --accent: #6b8fe6;
  --accent-hover: #80a0ec;
  --accent-soft: rgba(107, 143, 230, 0.16);
  --accent-ink: #101420;
  --win: #4db07f;
  --win-soft: rgba(77, 176, 127, 0.14);
  --loss: #e06b6b;
  --loss-soft: rgba(224, 107, 107, 0.14);
  --danger: #e06b6b;
  --danger-bg: rgba(224, 107, 107, 0.14);
  --star: #ebb043;
}

:root[data-contrast="high"] {
  --bw: 2px;
  --line: rgba(26, 27, 25, 0.45);
  --line-strong: #1a1b19;
}

:root[data-theme="dark"][data-contrast="high"] {
  --line: rgba(243, 243, 241, 0.5);
  --line-strong: #f3f3f1;
}

/* 10색 멤버·팀 팔레트 */
.mc-0 { --chip: #2b4ea2; }
.mc-1 { --chip: #1f6b47; }
.mc-2 { --chip: #c04a3b; }
.mc-3 { --chip: #9a6b1e; }
.mc-4 { --chip: #6a42a8; }
.mc-5 { --chip: #1f7a8c; }
.mc-6 { --chip: #b85c24; }
.mc-7 { --chip: #4a6b2e; }
.mc-8 { --chip: #9c3d6a; }
.mc-9 { --chip: #4a5568; }

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: var(--fs-md);
  font-variant-numeric: tabular-nums;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

input[type="text"],
input[type="number"],
input[type="search"],
select {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: var(--bw) solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--input-bg);
  color: var(--text);
  font-size: var(--fs-md);
}

input:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.phone-shell {
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.view {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.view-landing,
.view-login {
  padding: 20px 16px 32px;
  gap: 16px;
}

/* 세로 화면 안내 */
.landscape-notice {
  display: none;
}

@media (orientation: landscape) and (max-height: 500px) {
  .landscape-notice {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
  }
  .landscape-card {
    text-align: center;
    padding: 24px;
    border-radius: var(--r-card);
    background: var(--surface);
    border: var(--bw) solid var(--line);
  }
  .billiard-emoji {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--accent);
  }
}

/* 헤더 */
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: var(--bw) solid var(--line);
  padding: 12px 16px;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  min-width: 0;
}

.brand-ball,
.ball-badge {
  display: inline-block;
  flex-shrink: 0;
  border-radius: 8px;
  background: url('/icons/logo.svg?v=2') center / contain no-repeat;
}

.brand-ball {
  width: 28px;
  height: 28px;
}

.ball-badge {
  width: 56px;
  height: 56px;
  border-radius: 14px;
}

.brand-inline h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-icon-pill {
  height: 34px;
  min-width: 34px;
  padding: 0 10px;
  border-radius: var(--r-ctl);
  border: var(--bw) solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.btn-icon-pill:hover {
  background: var(--surface-sub);
}

.btn-icon-pill.active,
.btn-contrast-icon.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.btn-favorite.active {
  color: var(--star);
  border-color: var(--star);
}

.btn-favorite.active .icon {
  fill: currentColor;
}

/* 당겨서 새로고침 */
.ptr-indicator {
  height: 0;
  opacity: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  color: var(--muted);
  transition: height 160ms ease, opacity 160ms ease;
}

.ptr-indicator.dragging {
  transition: none;
}

.ptr-indicator.ready {
  color: var(--accent);
  font-weight: 600;
}

/* 메인 */
.app-main {
  flex: 1;
  padding: 16px 16px 88px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tab-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tab-panel[hidden] {
  display: none;
}

.card {
  background: var(--surface);
  border: var(--bw) solid var(--line);
  border-radius: var(--r-card);
  padding: 16px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.card-head h3 {
  margin: 0;
  font-size: var(--fs-xl);
  font-weight: 600;
  line-height: 1.25;
}

.card-head-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cute-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cute-form[hidden] {
  display: none;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field > span {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--secondary);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.submit-row {
  display: flex;
  gap: 8px;
}

.submit-row input {
  flex: 1;
  min-width: 0;
}

.submit-row button {
  flex-shrink: 0;
  white-space: nowrap;
}

.inline-select {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inline-select > span {
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--secondary);
  white-space: nowrap;
}

.inline-select select {
  flex: 1;
}

.filter-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 버튼 */
.btn {
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--r-ctl);
  border: var(--bw) solid transparent;
  font-size: var(--fs-md);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background-color 140ms ease, border-color 140ms ease, transform 100ms ease;
}

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

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-mint {
  background: var(--surface-sub);
  color: var(--text);
  border-color: var(--line);
}

.btn-mint:hover {
  background: var(--row-bg);
  border-color: var(--line-strong);
}

.handicap-save,
.delete-btn {
  height: 34px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  border: var(--bw) solid var(--line);
  background: var(--surface);
  color: var(--secondary);
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.handicap-save {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.invite-copy-btn {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* 세그먼트·칩 */
.segment-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: var(--r-row);
  background: var(--row-bg);
}

.segment {
  min-height: 36px;
  border-radius: 8px;
  border: var(--bw) solid transparent;
  background: transparent;
  color: var(--secondary);
  font-size: var(--fs-md);
  font-weight: 500;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}

.segment.active {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

:root[data-contrast="high"] .segment.active {
  background: var(--text);
  color: var(--bg);
}

.chip-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: var(--r-row);
  background: var(--row-bg);
}

.chip {
  min-height: 36px;
  border-radius: 8px;
  border: var(--bw) solid transparent;
  background: transparent;
  color: var(--secondary);
  font-size: var(--fs-md);
  font-weight: 500;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}

.chip.active {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

:root[data-contrast="high"] .chip.active {
  background: var(--text);
  color: var(--bg);
}

.option-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-sm);
  color: var(--secondary);
  cursor: pointer;
}

.option-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* 배지·알약 */
.pill-soft,
.pill-count {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: 500;
  white-space: nowrap;
}

.pill-soft {
  background: var(--accent-soft);
  color: var(--accent);
}

.pill-count {
  background: var(--surface-sub);
  color: var(--secondary);
}

.pill-xs {
  height: 20px;
  padding: 0 6px;
  font-size: 11px;
}

.mode-pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  border-radius: var(--r-sm);
  font-size: var(--fs-xs);
  font-weight: 600;
}

.mode-pill.is-team {
  background: var(--accent-soft);
  color: var(--accent);
}

.mode-pill.is-solo {
  background: var(--surface-sub);
  color: var(--secondary);
}

/* 플레이어·팀 칩 */
.uid-chip,
.member-avatar,
.r-hero-id,
.member-chip {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--chip, var(--accent));
  color: #ffffff;
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1;
  border: 0;
  flex-shrink: 0;
}

.uid-chip.sm {
  width: 26px;
  height: 26px;
  font-size: var(--fs-xs);
}

.r-hero-id {
  width: 38px;
  height: 38px;
  font-size: var(--fs-lg);
}

.member-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.member-chip {
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.member-chip.selected {
  opacity: 1;
  transform: scale(1.06);
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text);
}

.team-chip {
  height: 34px;
  padding: 0 12px;
  border-radius: var(--r-ctl);
  border: var(--bw) solid var(--line);
  background: var(--row-bg);
  color: var(--text);
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.team-chip::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--chip, var(--accent));
}

.team-chip.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.team-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--chip, var(--accent));
  flex-shrink: 0;
}

.team-badge,
.r-team-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-sm);
  background: var(--surface-sub);
  color: var(--text);
  font-size: var(--fs-xs);
  font-weight: 600;
  border: var(--bw) solid var(--line);
}

.team-badge::before,
.r-team-pill::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--chip, var(--accent));
}

/* 순위표 */
.standings-list,
.members-list,
.tournaments-list,
.games-list,
.public-clubs-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.standing-row,
.member-row,
.tournament-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-row);
  background: var(--row-bg);
  border: var(--bw) solid var(--line);
}

.standing-row.top-1 {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.standing-left,
.member-info,
.standing-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.standing-team-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.standing-name {
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.standing-sub {
  font-size: var(--fs-xs);
  color: var(--muted);
}

.rank-badge {
  width: 24px;
  text-align: center;
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--secondary);
  flex-shrink: 0;
}

.standing-stats-line {
  font-size: var(--fs-sm);
  color: var(--secondary);
  gap: 6px;
  flex-shrink: 0;
}

.st-focus {
  color: var(--text);
  font-weight: 600;
}

.st-sep {
  color: var(--muted);
}

/* 천라수 */
.rivalry-head {
  gap: 8px;
}

.rivalry-controls select {
  height: 36px;
  min-width: 120px;
  font-size: var(--fs-sm);
}

.rivalry-detail {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rivalry-box {
  padding: 12px;
  border-radius: var(--r-row);
  background: var(--row-bg);
  border: var(--bw) solid var(--line);
}

.r-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-md);
  font-weight: 600;
  margin-bottom: 8px;
}

.r-title-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.rivalry-box.nemesis .r-title-icon {
  color: var(--loss);
}

.rivalry-box.rival .r-title-icon {
  color: var(--star);
}

.rivalry-box.guardian .r-title-icon {
  color: var(--win);
}

.r-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.r-slot {
  padding: 8px 10px;
  border-radius: var(--r-ctl);
  background: var(--surface);
  border: var(--bw) solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.r-slot-tag {
  font-size: var(--fs-xs);
  color: var(--muted);
}

.r-slot-none {
  font-size: var(--fs-sm);
  color: var(--muted);
}

.r-slot-body {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.r-slot-meta {
  display: flex;
  flex-direction: column;
  font-size: var(--fs-sm);
}

.r-primary {
  font-weight: 600;
  color: var(--text);
}

.r-secondary {
  color: var(--muted);
}

/* 경기 기록 */
.game-item {
  padding: 12px;
  border-radius: var(--r-row);
  background: var(--row-bg);
  border: var(--bw) solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.game-item.pending {
  border-color: var(--accent);
}

.game-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.game-meta-left,
.game-meta-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.game-t-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text);
}

.game-t-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--chip, var(--accent));
}

.game-date {
  font-size: var(--fs-sm);
  color: var(--muted);
}

.game-pending-tag {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--accent);
}

.game-result-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.g-side {
  padding: 8px 10px;
  border-radius: var(--r-ctl);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.g-win {
  background: var(--win-soft);
}

.g-loss {
  background: var(--loss-soft);
}

.g-side-tag {
  font-size: var(--fs-xs);
  font-weight: 600;
}

.g-win .g-side-tag {
  color: var(--win);
}

.g-loss .g-side-tag {
  color: var(--loss);
}

.g-side-players {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.game-pending-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.game-memo-note {
  font-size: var(--fs-xs);
  color: var(--secondary);
}

.entry-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.entry-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--r-ctl);
  background: var(--surface);
  border: var(--bw) solid var(--line);
}

.entry-controls {
  display: flex;
  gap: 6px;
}

.mini-btn {
  height: 32px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  border: var(--bw) solid var(--line);
  background: var(--surface-sub);
  color: var(--secondary);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
}

.mini-btn.win.active {
  background: var(--win);
  border-color: var(--win);
  color: #ffffff;
}

.mini-btn.loss.active {
  background: var(--loss);
  border-color: var(--loss);
  color: #ffffff;
}

.rank-select {
  width: 84px;
  height: 32px;
  font-size: var(--fs-xs);
}

.game-edit-footer {
  display: flex;
  gap: 6px;
}

.game-memo-input {
  flex: 1;
  height: 32px;
  font-size: var(--fs-xs);
}

/* 팀·멤버 행 */
.team-row {
  align-items: center;
}

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

.team-row-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.team-row-members {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.member-row.is-me {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.member-row.is-editable {
  cursor: pointer;
}

.member-row-chevron {
  color: var(--muted);
  font-size: var(--fs-lg);
}

.tournament-row::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--chip, var(--accent));
  flex-shrink: 0;
}

/* 접이식 / 인라인 행 */
.collapse-head-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: 0;
  padding: 0;
  font-size: var(--fs-xl);
  font-weight: 600;
  cursor: pointer;
}

.collapse-chevron {
  color: var(--muted);
}

.collapse-form-body {
  margin-top: 12px;
}

.compact-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inline-action-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 8px;
}

.row-label {
  font-size: var(--fs-xs);
  color: var(--secondary);
}

.rename-club-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rename-club-row input {
  flex: 1;
  min-width: 0;
}

/* 하단 네비게이션 */
.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 480px;
  padding: 4px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  border-top: var(--bw) solid var(--line);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  z-index: 30;
}

.nav-btn {
  background: transparent;
  border: 0;
  border-radius: var(--r-ctl);
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 52px;
  padding: 8px 0 4px;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}

.nav-btn .icon {
  width: 22px;
  height: 22px;
}

.nav-btn small {
  font-size: var(--fs-xs);
  font-weight: 500;
}

.nav-btn.active {
  color: var(--accent);
  background: var(--accent-soft);
}

.nav-btn.active small {
  font-weight: 600;
}

/* 랜딩 */
.login-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.landing-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 8px 0;
}

.landing-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 400;
}

.landing-sub {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--secondary);
}

.landing-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.feature-title {
  font-size: var(--fs-sm);
  font-weight: 600;
}

.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.account-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.account-name {
  font-size: var(--fs-sm);
  font-weight: 600;
}

.account-email {
  font-size: var(--fs-xs);
  color: var(--muted);
  overflow-wrap: anywhere;
}

.favorite-clubs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
  border-top: var(--bw) solid var(--line);
}

.favorite-clubs-label {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--secondary);
}

.favorite-clubs-label .icon {
  width: 14px;
  height: 14px;
  color: var(--star);
  fill: currentColor;
}

.logged-in-clubs-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.logged-in-club-btn,
.public-club-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-row);
  background: var(--row-bg);
  border: var(--bw) solid var(--line);
  color: var(--text);
  text-decoration: none;
}

.logged-in-club-btn:hover,
.public-club-row:hover {
  border-color: var(--accent);
}

.logged-in-club-name,
.public-club-name {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-sm);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logged-in-club-chevron {
  color: var(--muted);
}

.club-num-badge {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: var(--r-sm);
  background: var(--chip, var(--accent));
  color: #ffffff;
  font-size: var(--fs-xs);
  font-weight: 600;
  flex-shrink: 0;
}

.club-search-input {
  margin-bottom: 10px;
}

.landing-legal-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 0 12px;
  font-size: var(--fs-xs);
  color: var(--muted);
}

.landing-legal-footer a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* 초대 배너 / 모달 / 토스트 / 로딩 */
.invite-banner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-color: var(--accent);
  background: var(--accent-soft);
}

.invite-banner-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--accent);
}

.invite-banner-text small {
  font-size: var(--fs-xs);
  font-weight: 400;
  color: var(--text);
}

.hint {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--secondary);
}

.error-msg {
  margin: 0;
  padding: 8px 10px;
  border-radius: var(--r-ctl);
  background: var(--danger-bg);
  color: var(--danger);
  font-size: var(--fs-xs);
}

.empty-state {
  padding: 20px 12px;
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--muted);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 60;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.invite-preview {
  margin: 0;
  padding: 12px;
  border-radius: var(--r-row);
  background: var(--row-bg);
  border: var(--bw) solid var(--line);
  font-family: inherit;
  font-size: var(--fs-xs);
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  user-select: all;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 80;
}

.loading-overlay[hidden] {
  display: none;
}

.loading-pill {
  padding: 10px 16px;
  border-radius: var(--r-row);
  background: var(--surface);
  border: var(--bw) solid var(--line);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-sm);
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 80px;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  border-radius: var(--r-ctl);
  background: var(--text);
  color: var(--bg);
  font-size: var(--fs-xs);
  font-weight: 500;
  z-index: 90;
  text-align: center;
}

.toast[hidden] {
  display: none;
}
