:root {
  --bg: #181818;
  --bg-card: #1c1c1f;
  --bg-card-2: #141416;
  --tour-frame: #000000;
  --red: #e10600;
  --red-dark: #b80400;
  --text: #ffffff;
  --text-muted: #8e8e93;
  --border: #2a2a2a;
  --success: #4ade80;
  --danger: #ff453a;
  --radius: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

.hidden { display: none !important; }

body { background: var(--bg); min-height: 100vh; }

#root { min-height: 100vh; padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }

.app { max-width: 480px; margin: 0 auto; padding: 12px 16px 0; }

.loading, .error {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.loading-hint {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
  opacity: 0.85;
}

.error { color: var(--danger); }

.data-error-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 80, 80, 0.12);
  border: 1px solid rgba(255, 80, 80, 0.35);
  font-size: 13px;
  color: var(--danger);
}
.data-error-banner p { margin: 0; flex: 1; line-height: 1.35; }

.empty { text-align: center; padding: 24px; color: var(--text-muted); font-size: 14px; }

/* ── Top bar ── */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.user-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  background: var(--bg-card);
}

.user-avatar-fallback {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), #ff6b6b);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
}

.user-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.user-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.35;
}

.user-meta .club-mark {
  color: var(--text);
  font-weight: 600;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
}

.section-label {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}
.section-label-upper {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 6px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.page-header-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

/* ── Tournament card ── */
.tournament-hero {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 14px;
  overflow: hidden;
  min-height: 140px;
  border: 1px solid var(--border);
}

.tournament-hero + .tournament-hero { margin-top: -6px; }

.tournament-title {
  font-size: 28px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.05;
  max-width: 65%;
}

.tournament-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0a0a0a;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.pill svg { opacity: 0.7; }

.chip-deco {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 100px;
  height: 100px;
  pointer-events: none;
}

.chip-deco:has(.tour-chip-stack) {
  width: auto;
  height: auto;
  background: none;
  border: none;
  box-shadow: none;
}

.chip-deco:has(.tour-chip-stack)::after { display: none; }

/* ── Rating hero ── */
.rating-hero {
  position: relative;
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  border-radius: var(--radius);
  padding: 22px 20px;
  margin-bottom: 14px;
  overflow: hidden;
  min-height: 130px;
  cursor: pointer;
  border: none;
  width: 100%;
  text-align: left;
  color: var(--text);
}

.rating-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 20%, rgba(255,255,255,0.08) 0%, transparent 40%),
    repeating-linear-gradient(45deg, rgba(0,0,0,0.04) 0 12px, transparent 12px 24px);
  pointer-events: none;
}

.rating-hero-title {
  font-size: 26px;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  line-height: 1.05;
  position: relative;
  z-index: 1;
}

.rating-hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.trophy-deco {
  position: absolute;
  right: 10px;
  bottom: 8px;
  font-size: 72px;
  opacity: 0.9;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
  z-index: 0;
}

/* ── Mini cards row ── */
.mini-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.mini-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  min-height: 120px;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  font: inherit;
}
button.mini-card {
  width: 100%;
  display: block;
}

.mini-card-title {
  font-size: 18px;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
}

.mini-card-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  background: #0a0a0a;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  color: var(--text-muted);
}
.mini-card-wide {
  width: 100%;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
  min-height: 120px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  background: var(--bg-card);
  cursor: pointer;
  text-align: left;
  color: var(--text);
}
.mini-card-static {
  cursor: default;
  pointer-events: none;
}
.mini-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.mini-badge-new {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.mini-chip-deco {
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 100px;
  height: 100px;
  background: none;
  border: none;
  box-shadow: none;
}
.mini-chip-deco .tour-logo-wrap {
  background: transparent;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
}
.mini-chip-deco .tour-logo-img,
.mini-chip-deco .tour-logo-sprite {
  background-color: transparent;
}
.mini-card-history { margin-bottom: 14px; }

/* ── Profile (CHECK style) ── */
.profile-head-card {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  text-align: left;
}
.profile-account-card {
  margin-bottom: 14px;
}
.profile-account-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  margin-bottom: 8px;
}
.profile-account-row span {
  color: var(--text-muted);
}
.profile-account-hint {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
  margin: 10px 0;
}
.profile-account-hint.warn {
  color: #ffb347;
}
.profile-account-hint.ok {
  color: #7dcea0;
}
#profile-link-tg-widget {
  margin: 12px 0;
  min-height: 44px;
}
.profile-sync-tg-card {
  margin-bottom: 14px;
  border: 1px solid rgba(42, 171, 238, 0.35);
  background: linear-gradient(180deg, rgba(42, 171, 238, 0.12) 0%, rgba(24, 24, 24, 0.95) 100%);
}
.profile-sync-tg-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: #fff;
}
.profile-sync-tg-hint {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
}
.profile-sync-tg-widget {
  display: flex;
  justify-content: center;
  min-height: 44px;
  width: 100%;
}
.profile-sync-tg-caption {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}
.profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.profile-avatar-btn {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  position: relative;
  display: block;
}
.profile-avatar-lg,
.profile-avatar-wrap .user-avatar,
.profile-avatar-wrap .user-avatar-fallback {
  width: 72px;
  height: 72px;
  font-size: 28px;
}
.profile-avatar-edit {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #000;
  border: 1px solid var(--border);
  color: #fff;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-streak-pill {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -8px;
  background: #1c1c1f;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  white-space: nowrap;
}
.profile-head-info { flex: 1; min-width: 0; }
.profile-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.profile-name-lg {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.profile-name-edit {
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
}
.profile-submeta {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-muted);
}
.profile-stats-card { padding: 18px 16px; margin-bottom: 14px; }
.profile-stats-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}
.profile-stats-title {
  font-size: 22px;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.profile-stats-toggle {
  display: flex;
  background: #0a0a0a;
  border-radius: 999px;
  padding: 3px;
  border: 1px solid var(--border);
}
.profile-stats-mode {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.profile-stats-mode.active {
  background: #3a3a40;
  color: #fff;
}
.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  text-align: center;
}
.profile-stat {
  padding: 0 4px;
  border-right: 1px solid var(--border);
}
.profile-stat:last-child { border-right: none; }
.profile-stat-val {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
}
.profile-stat-label {
  margin-top: 6px;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: lowercase;
}

/* ── Bottom nav ── */
.nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: none;
  margin: 0 auto;
  background: #000000;
  backdrop-filter: blur(16px);
  border: none;
  border-top: 1px solid var(--border);
  border-radius: 16px 16px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom, 0px));
  z-index: 100;
}

.nav-btn {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 8px;
  font-weight: 600;
  padding: 6px 1px;
  min-width: 0;
}

.nav-btn span {
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.1;
  text-align: center;
}

.nav-btn.active { color: #FFD60A; }

.nav-icon-svg { width: 20px; height: 20px; }

/* ── Rating page ── */
.rating-page-hero {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  border-radius: var(--radius);
  padding: 24px 20px;
  margin-bottom: 16px;
  text-align: center;
}

.rating-page-rp {
  font-size: 42px;
  font-weight: 900;
  font-style: italic;
}

.rating-page-tier {
  font-size: 16px;
  font-weight: 600;
  margin-top: 4px;
  opacity: 0.9;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.card-title { font-size: 16px; font-weight: 700; margin-bottom: 12px; }

.tier-list { display: flex; flex-direction: column; gap: 8px; }

.tier-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: var(--bg-card-2);
  border: 1px solid transparent;
}

.tier-item.current { border-color: var(--red); background: rgba(225, 6, 0, 0.08); }
.tier-item.locked { opacity: 0.5; }

.tier-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--bg); display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}

.tier-name { font-weight: 600; font-size: 15px; }
.tier-rp { font-size: 13px; color: var(--text-muted); }
.tier-badge { font-size: 11px; font-weight: 700; color: var(--red); text-transform: uppercase; }

/* ── Profile ── */
.profile-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  margin-bottom: 14px;
}

.profile-hero-card .user-avatar,
.profile-hero-card .user-avatar-fallback {
  width: 72px; height: 72px; margin: 0 auto 12px; font-size: 28px;
}

.profile-rp-big {
  font-size: 36px;
  font-weight: 900;
  font-style: italic;
  color: var(--red);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px 20px; border: none; border-radius: 14px;
  font-size: 15px; font-weight: 600; cursor: pointer;
}

.btn-primary { background: var(--red); color: #fff; }
.btn-secondary { background: var(--bg-card-2); color: var(--text); border: 1px solid var(--border); }
.btn:active { transform: scale(0.98); }
.section-gap { margin-top: 10px; }

.referral-link-box {
  background: var(--bg-card-2); border: 1px dashed var(--border);
  border-radius: 12px; padding: 12px; font-size: 13px; word-break: break-all;
  color: var(--red); margin-bottom: 12px;
}

.leader-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.leader-row:last-child { border-bottom: none; }
.leader-row.me { background: rgba(225, 6, 0, 0.06); margin: 0 -16px; padding: 10px 16px; border-radius: 8px; }
.leader-rank { width: 28px; font-weight: 700; color: var(--text-muted); text-align: center; }
.leader-rank.top { color: var(--red); }
.leader-name { flex: 1; font-weight: 500; }
.leader-rp { font-weight: 700; color: var(--red); font-size: 14px; }

.schedule-card { line-height: 1.55; }
.schedule-hero { font-size: 18px; font-weight: 800; text-align: center; margin-bottom: 12px; }
.schedule-days { display: flex; flex-wrap: wrap; gap: 8px; }
.day-chip {
  background: rgba(225, 6, 0, 0.12); color: var(--red);
  padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
}

/* ── Consent ── */
.onboarding-backdrop {
  min-height: 100vh;
  background: var(--bg);
}

.onboarding-nickname-overlay {
  z-index: 1200;
}

.onboarding-nickname-sheet {
  max-width: 400px;
}

.onboarding-nickname-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.onboarding-nickname-field {
  margin-bottom: 16px;
}

.onboarding-nickname-field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 16px;
}

.onboarding-nickname-field input:focus {
  outline: none;
  border-color: rgba(225, 6, 0, 0.45);
}

.consent-screen { min-height: 100vh; padding: 16px; background: var(--bg); }
.consent-card { max-width: 480px; margin: 0 auto; }
.consent-title { font-size: 24px; font-weight: 800; text-align: center; margin-bottom: 8px; color: var(--text); }
.consent-desc { font-size: 14px; color: var(--text-muted); text-align: center; line-height: 1.5; margin-bottom: 20px; }
.consent-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }

.consent-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.consent-item.checked { border-color: rgba(74, 222, 128, 0.45); }
.consent-item.expanded { border-color: rgba(225, 6, 0, 0.35); }

.consent-box-label {
  grid-row: 1;
  grid-column: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 0 14px 12px;
  cursor: pointer;
}

.consent-box-label.disabled { opacity: 0.4; cursor: not-allowed; }

.consent-box-label input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.consent-box {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: var(--bg-card-2);
  display: block;
  position: relative;
}

.consent-box-label input:checked + .consent-box {
  background: var(--red);
  border-color: var(--red);
}

.consent-box-label input:checked + .consent-box::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.consent-row-main {
  grid-row: 1;
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  text-align: left;
  padding: 14px 14px 14px 4px;
  cursor: pointer;
}

.consent-doc-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  flex: 1;
}

.consent-chevron {
  font-size: 22px;
  line-height: 1;
  color: var(--text-muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.consent-chevron.open {
  transform: rotate(90deg);
  color: var(--red);
}

.consent-inline-doc {
  grid-column: 1 / -1;
  border-top: 1px solid var(--border);
  background: #fff;
}

.consent-inline-frame {
  width: 100%;
  height: 280px;
  border: none;
  display: block;
}

.consent-check { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; cursor: pointer; }
.consent-check.disabled { opacity: 0.45; cursor: not-allowed; }
.consent-submit:disabled { opacity: 0.45; cursor: not-allowed; }

.club-mark { color: var(--red); font-weight: 700; }

.doc-viewer {
  position: fixed; inset: 0; background: var(--bg);
  display: flex; flex-direction: column; z-index: 200;
}
.doc-viewer-header {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  border-bottom: 1px solid var(--border); background: var(--bg-card);
}
.doc-back { background: none; border: none; color: var(--red); font-size: 15px; font-weight: 600; cursor: pointer; }
.doc-frame { flex: 1; width: 100%; border: none; background: #fff; }
.doc-viewer-footer { padding: 12px 16px; border-top: 1px solid var(--border); background: var(--bg-card); }

.progress-bar { height: 6px; background: rgba(0,0,0,0.25); border-radius: 999px; overflow: hidden; margin-top: 12px; }
.progress-fill { height: 100%; background: #fff; border-radius: 999px; }
.progress-label { font-size: 12px; margin-top: 8px; opacity: 0.85; text-align: center; }

.section-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.tournament-hero.clickable { cursor: pointer; }
.tournament-hero.clickable:active { transform: scale(0.99); }

/* ── About club ── */
.about-hero {
  background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}

.about-hero::after {
  content: "♠";
  position: absolute;
  right: -8px;
  bottom: -20px;
  font-size: 120px;
  opacity: 0.06;
}

.about-hero-title {
  font-size: 28px;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  line-height: 1.05;
}

.about-hero-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 6px;
}

.about-badge {
  display: inline-block;
  margin-top: 12px;
  background: rgba(225, 6, 0, 0.15);
  color: var(--red);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.about-desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.about-point {
  font-size: 14px;
  line-height: 1.5;
  padding: 8px 0;
  border-top: 1px solid var(--border);
}

.about-point:first-of-type { border-top: none; padding-top: 0; }

.about-address { font-size: 15px; font-weight: 600; }
.about-address-short { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.about-times { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.about-footer { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

.special-item { padding: 10px 0; border-bottom: 1px solid var(--border); }
.special-item:last-child { border-bottom: none; }
.special-title { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.special-text { font-size: 13px; color: var(--text-muted); line-height: 1.45; }

.schedule-important {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  background: rgba(225, 6, 0, 0.08);
  border-radius: 12px;
  padding: 12px;
}

/* ── Tournament list ── */
.tour-list-title {
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  font-style: italic;
}

.tour-list-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
}

.booking-rule {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.booking-rule:last-child { margin-bottom: 0; }

.booking-info-card { border-color: rgba(225, 6, 0, 0.25); }

/* ── Booking modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  z-index: 300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.modal-sheet {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px 24px 0 0;
  padding: 12px 20px 28px;
  max-height: 88vh;
  overflow-y: auto;
}

.modal-handle {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 999px;
  margin: 0 auto 16px;
}

.modal-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 8px;
}

.modal-event {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  font-style: italic;
}

.modal-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin: 6px 0 16px;
}

.booking-rules-block {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 16px;
}

.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.referral-desc { font-size: 14px; color: var(--text-muted); line-height: 1.5; margin-bottom: 12px; }

/* ── Admin panel ── */
.admin-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-back-profile {
  background: none;
  border: none;
  color: var(--red);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.admin-title {
  font-size: 18px;
  font-weight: 800;
  font-style: italic;
  text-transform: uppercase;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
}

.admin-tab {
  flex: 1;
  min-width: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 10px 8px;
  cursor: pointer;
}

.admin-tab.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.admin-msg {
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.35);
  color: var(--success);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 12px;
}

.admin-input {
  width: 100%;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 15px;
  padding: 12px;
}

.admin-textarea { resize: vertical; min-height: 64px; }

.admin-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-search-block {
  display: flex;
  gap: 8px;
}

.admin-search-block .admin-input { flex: 1; }

.admin-search-btn {
  width: auto;
  padding: 12px 16px;
  white-space: nowrap;
}

.admin-user-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.admin-hall-picker-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.admin-hall-picker-chevron {
  color: var(--red);
  font-weight: 800;
}

.admin-hall-picker-body {
  margin-top: 12px;
}

.admin-hall-add-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.admin-user-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  color: var(--text);
  text-align: left;
}

.admin-user-row.selected {
  border-color: var(--red);
  background: rgba(225, 6, 0, 0.08);
}

.admin-user-name { font-weight: 600; font-size: 15px; }
.admin-user-meta { font-size: 12px; color: var(--text-muted); }

.admin-session-row {
  display: block;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 8px;
  cursor: pointer;
  color: var(--text);
  text-align: left;
}

.admin-session-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 4px;
}

.admin-meta { font-size: 12px; color: var(--text-muted); line-height: 1.4; }

.admin-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

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

.admin-rp-plus { color: var(--success); font-weight: 700; }
.admin-rp-minus { color: var(--danger); font-weight: 700; }

.admin-history-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

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

.admin-history-top {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

.admin-check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  cursor: pointer;
}

/* ── Live today (зал) ── */
.live-today-card { margin-bottom: 12px; }
.live-today-title { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.live-checkin-btn { margin-bottom: 10px; }
.live-status {
  background: rgba(225, 6, 0, 0.08);
  border: 1px solid rgba(225, 6, 0, 0.25);
  border-radius: 12px;
  padding: 12px;
  font-size: 14px;
  margin-bottom: 12px;
  line-height: 1.5;
}
.live-code { margin-top: 6px; color: var(--text-muted); }
.live-code strong { color: var(--text); font-size: 18px; letter-spacing: 0.08em; }
.live-table { margin-top: 4px; color: var(--text-muted); font-size: 13px; }
.live-players-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.live-players-list { display: flex; flex-direction: column; gap: 6px; }
.live-player-row {
  font-size: 14px;
  padding: 8px 10px;
  background: var(--bg-card-2);
  border-radius: 10px;
}
.live-empty, .live-more { font-size: 13px; color: var(--text-muted); }
.live-hint { font-size: 12px; color: var(--text-muted); line-height: 1.45; margin-top: 8px; }
.live-code-inline { color: var(--text-muted); font-size: 12px; }
.admin-live-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.tag-new {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(33, 150, 243, 0.2);
  color: #64b5f6;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  vertical-align: middle;
}
.admin-live-btns { display: flex; gap: 6px; }
.admin-live-btns button {
  min-width: 32px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card-2);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}
.admin-live-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.admin-live-actions .btn { flex: 1; min-width: 120px; }

.admin-check-row.played { opacity: 0.55; }
.admin-check-row:last-child { border-bottom: none; }

.admin-entry-btn { margin-top: 12px; }

/* ── Dictionary ── */
.dict-page-title,
.dict-toc-card,
.dict-section,
.dict-faq-title,
.dict-footer { text-align: left; }
.dict-faq-title { margin-top: 8px; }
.dict-toc-card { margin-bottom: 16px; }
.dict-toc { display: flex; flex-direction: column; gap: 2px; }
.dict-toc-link {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 0;
  color: var(--red);
  font-weight: 700;
  text-decoration: none;
  font-size: 14px;
  border: none;
  background: none;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-family: inherit;
}
.dict-toc-link:last-child { border-bottom: none; }
.dict-toc-divider {
  padding: 14px 0 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: left;
}
.dict-section { margin-bottom: 12px; padding: 0; overflow: hidden; }
.dict-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: none;
  border: none;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.dict-chevron { color: var(--red); font-size: 18px; font-weight: 700; }
.dict-h2 {
  font-size: 17px;
  font-weight: 800;
  color: var(--red);
  margin-bottom: 12px;
  text-align: left;
}
.dict-h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  margin: 16px 0 10px;
  text-align: left;
}
.dict-intro-card { margin-bottom: 16px; }
.dict-intro-card .dict-body { padding: 16px 18px; }
.dict-body {
  padding: 4px 18px 16px;
  text-align: left;
}
.dict-entry {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.dict-entry:last-child { border-bottom: none; padding-bottom: 4px; }
.dict-entry:first-child { padding-top: 4px; }
.dict-term {
  font-size: 14px;
  font-weight: 800;
  color: var(--red);
  margin-bottom: 4px;
  line-height: 1.35;
}
.dict-def {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}
.dict-body p {
  margin-bottom: 10px;
  line-height: 1.55;
  font-size: 14px;
  color: #c8c8cc;
  text-align: left;
}
.dict-body p strong { color: var(--red); font-weight: 800; }
.club-bar-desc { margin-bottom: 8px; }
.club-bar-tuesday { margin-bottom: 0; color: var(--text); }

.menu-section { margin-bottom: 12px; }
.menu-section-title {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.menu-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.menu-row:last-child { border-bottom: none; }
.menu-name { font-size: 14px; font-weight: 500; line-height: 1.35; }
.menu-size { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.menu-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}
.menu-rules-card { margin-bottom: 12px; }
.menu-rule, .menu-damage {
  font-size: 13px;
  line-height: 1.5;
  color: #c8c8cc;
  margin-bottom: 8px;
}
.menu-rules-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin: 12px 0 8px;
}
.menu-damage strong { color: var(--red); font-weight: 700; }
.mini-row-single .mini-card { flex: 1; }

.home-tournament-card { margin-bottom: 16px; }
.home-tournament-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.home-tournament-title { font-size: 22px; margin-bottom: 10px; }
.home-register-btn { width: 100%; margin-top: 12px; }

.legal-doc-list { display: flex; flex-direction: column; gap: 0; }
.legal-doc-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 0;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.legal-doc-link:last-child { border-bottom: none; }
.legal-doc-arrow { color: var(--text-muted); font-size: 18px; }

.badge-section-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.profile-badges-back {
  margin-bottom: 12px;
}
.profile-badges-card {
  margin-bottom: 14px;
}
.badge-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.badge-item {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  min-height: 120px;
}
.badge-item.unlocked { border-color: var(--red); }
.badge-item.locked { opacity: 0.55; }
.badge-emoji { font-size: 22px; margin-bottom: 6px; }
.badge-title { font-size: 13px; font-weight: 700; margin-bottom: 4px; line-height: 1.3; }
.badge-desc { font-size: 11px; color: var(--text-muted); line-height: 1.35; }
.badge-status { font-size: 10px; margin-top: 8px; font-weight: 600; color: var(--success); }
.badge-status.muted { color: var(--text-muted); font-weight: 500; }
.rating-games-note {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  margin-top: 8px;
}

.timer-widget { margin-bottom: 16px; background: linear-gradient(135deg, #2a1018, #12080c); border: 1px solid rgba(123, 30, 58, 0.45); }
.timer-widget-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.timer-widget-name { font-size: 15px; font-weight: 800; letter-spacing: 0.04em; line-height: 1.25; }
.timer-widget-status { font-size: 11px; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }
.timer-widget-status.live { color: #ff6b6b; font-weight: 700; }
.timer-widget-status.reg-open { color: var(--gold); font-weight: 700; }
.timer-widget-time { font-size: 42px; font-weight: 800; letter-spacing: 0.04em; line-height: 1; margin: 8px 0; font-variant-numeric: tabular-nums; }
.timer-widget-time--idle { font-size: 28px; opacity: 0.35; }
.timer-widget-meta { font-size: 13px; color: var(--gold); font-weight: 600; line-height: 1.35; margin-bottom: 6px; }
.timer-widget-mode, .timer-widget-reg { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.timer-widget-reg { color: var(--gold); font-weight: 600; }
.timer-widget-level, .timer-widget-stats { font-size: 12px; color: var(--text-muted); }
.admin-user-list { max-height: 280px; overflow-y: auto; margin-top: 8px; }
.admin-hint { font-size: 12px; color: var(--text-muted); margin-top: 8px; line-height: 1.4; }
.dict-sub { margin-top: 14px; font-weight: 600; color: var(--text-muted); }
.dict-footer {
  text-align: left;
  color: var(--text-muted);
  font-size: 13px;
  padding: 8px 0 24px;
  line-height: 1.5;
}

/* ── Live waitlist ── */
.live-seats-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.live-waitlist-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
  margin-bottom: 6px;
}
.live-waitlist .live-player-row { opacity: 0.75; }
.live-waitlist-status { color: #FFD60A; }

.club-logo-top {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border);
}
.club-page {
  text-align: left;
}

.club-page .card,
.club-page .about-desc,
.club-page .about-address,
.club-page .about-times,
.club-page .about-footer,
.club-page .club-rules-list,
.club-page .club-rules-intro,
.club-page .special-item,
.club-page .schedule-important {
  text-align: left;
}

.club-page .schedule-days {
  justify-content: flex-start;
}

.club-page-title {
  font-size: 28px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 4px 0 14px;
  line-height: 1.05;
}

.club-carousel {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  margin-top: 12px;
  touch-action: pan-x;
}

.club-carousel::-webkit-scrollbar { display: none; }

.club-carousel-track {
  display: flex;
  gap: 12px;
  width: max-content;
  padding: 0 2px 4px;
}

.club-carousel-slide {
  flex: 0 0 min(92vw, 420px);
  scroll-snap-align: center;
}

.club-carousel-slide img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  border-radius: 16px;
  display: block;
}

.profile-panel-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.profile-panel-tab {
  flex: 1;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.profile-panel-tab.active {
  background: #2a2a2e;
  color: var(--text);
  border-color: #3a3a40;
}

.profile-bonuses-hint { margin-bottom: 14px; }

.profile-bonus-rows { display: flex; flex-direction: column; gap: 10px; }

.profile-bonus-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
}

.profile-bonus-kind { font-size: 15px; font-weight: 700; }

.profile-bonus-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--red);
}

.profile-invited-pill {
  font-size: 14px;
  margin-bottom: 10px;
  color: var(--text-muted);
}

.profile-invited-pill strong { color: var(--text); }

.club-gallery-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  margin-top: 12px;
  touch-action: pan-x;
}

.club-gallery-scroll::-webkit-scrollbar { display: none; }

.club-gallery-track {
  display: flex;
  gap: 8px;
  width: max-content;
  padding-right: 2px;
}

.club-gallery-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 40vw;
  max-width: 172px;
  flex-shrink: 0;
  scroll-snap-align: start;
}

.club-gallery-col img {
  width: 100%;
  height: 92px;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}

.club-rules-intro {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.club-rules-list {
  margin: 0;
  padding-left: 18px;
}

.club-rules-list li {
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 14px;
  color: var(--text);
}

.club-rules-list li:last-child { margin-bottom: 0; }

.club-training-card .about-desc { margin-bottom: 0; }

.club-welcome-photo {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
}
.club-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.club-gallery img {
  width: 100%;
  height: 88px;
  object-fit: cover;
  border-radius: 10px;
}
.faq-item { padding: 0; overflow: hidden; }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.faq-chevron { color: var(--red); font-size: 20px; flex-shrink: 0; }
.faq-a {
  padding: 0 16px 16px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
  text-align: left;
}
.tour-status {
  font-size: 14px;
  color: var(--red);
  margin-bottom: 8px;
  font-weight: 700;
}
.reg-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.reg-row:last-child { border-bottom: none; }
.reg-title { font-weight: 700; font-size: 14px; }
.reg-meta { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.btn-sm { padding: 8px 12px; font-size: 13px; }
.profile-rank, .profile-games {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
}
.empty-schedule-img {
  width: 100%;
  max-height: 160px;
  object-fit: contain;
  margin-bottom: 12px;
  opacity: 0.85;
}
.nav-btn span { font-size: 10px; }

/* Home tournaments, chips, rating tabs, profile edit */
.home-games-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.home-games-tab {
  flex: 1;
  padding: 12px 10px;
  border-radius: 999px;
  border: none;
  background: #1c1c1f;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.home-games-tab.active { background: #3a3a40; }
.tour-card-wrap { margin-bottom: 12px; }
.tour-card-wrap--featured { margin-bottom: 8px; }

.tour-card-frame {
  background: var(--tour-frame);
  border-radius: var(--radius);
  border: 1px solid #111;
  overflow: hidden;
}

.tour-card-body {
  display: flex;
  align-items: stretch;
  gap: 10px;
  padding: 18px 16px 16px;
  min-height: 128px;
}

.tour-card-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  z-index: 1;
}

.tour-card-logo {
  flex-shrink: 0;
  width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
}

.tour-card-logo .tour-logo-wrap {
  width: 80px;
  height: 80px;
  transform: none;
}

.tour-card-title {
  max-width: 100%;
  font-size: 22px;
  line-height: 1.08;
}

.tour-card-inner-actions {
  margin-top: auto;
  padding-top: 10px;
}

.tour-card-btns .btn {
  width: 100%;
}

.tour-register-btn.is-loading,
.tour-cancel-btn.is-loading {
  opacity: 1;
  cursor: wait;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
  flex-shrink: 0;
}

.btn-spinner--muted {
  border-color: rgba(255, 255, 255, 0.2);
  border-top-color: var(--text);
}

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

.tour-reg-block {
  margin: 6px 0 10px;
}

.tour-reg-header {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.tour-reg-list--open {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
}

.tour-reg-chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: var(--text);
  line-height: 1.3;
}

.waitlist-notice {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.22);
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
}

.referral-friends {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.referral-friend-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

.tour-reg-compact {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0 6px;
  margin: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  text-align: left;
}

.tour-reg-list--compact {
  margin: 0 0 8px;
  padding: 6px 0;
  background: transparent;
}

.tour-reg-more {
  padding-top: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.tour-recap-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0 0;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.tour-recap-chevron { color: var(--red); font-weight: 700; }

.tour-recap-placeholder {
  padding-top: 8px;
  font-size: 12px;
}

.tour-recap-inline {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #222;
  text-align: left;
  font-size: 13px;
  line-height: 1.45;
  max-height: 220px;
  overflow-y: auto;
}

.tour-recap-inline .tour-recap-p { margin-bottom: 8px; }

.tour-past-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tour-past-results {
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
  max-height: 240px;
  overflow-y: auto;
}

.tour-past-result-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.82rem;
}

.tour-past-result-row:last-child { border-bottom: 0; }

.tour-past-place {
  font-weight: 800;
  color: var(--gold-active, #f0c92e);
}

.tour-past-name {
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tour-past-rp {
  font-weight: 700;
  color: #7dffb0;
  font-size: 0.75rem;
  white-space: nowrap;
}

.tour-card-actions {
  padding: 0 4px 4px;
}
.tour-cancel-btn { margin-top: 0; }
.tour-status {
  font-size: 14px;
  font-weight: 600;
  color: var(--success);
  margin-bottom: 8px;
  text-align: left;
}
.tour-card-actions--simple { padding-top: 4px; }

/* legacy hero — widgets still use chip-deco */
.chip-deco .tour-chip-stack {
  width: 96px;
  height: 96px;
  transform: scale(1.2);
  transform-origin: center right;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.55));
}
.chip-deco .tour-chip { width: 76px; height: 76px; }
.chip-deco .tour-chip-mark { font-size: 11px; }
.chip-deco .tour-chip-stack--gold .tour-chip-mark { font-size: 20px; }
.tour-recap-sheet { max-height: 90vh; }
.tour-recap-body {
  text-align: left;
  margin: 12px 0 16px;
  max-height: 55vh;
  overflow-y: auto;
}
.tour-recap-p {
  font-size: 14px;
  line-height: 1.6;
  color: #d0d0d4;
  margin-bottom: 14px;
  text-align: left;
}
.tour-recap-p:last-child { margin-bottom: 0; }
.home-footer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 20px 0 8px;
}
.tour-list-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 10px;
}
.tour-list-info { flex: 1; min-width: 0; }
.tour-chip-stack {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.45));
}

.tour-chip {
  position: absolute;
  width: 50px;
  height: 50px;
  border-radius: 50%;
}

.tour-chip-edge {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 0deg,
    var(--chip-stripe-a) 0deg 7deg,
    var(--chip-stripe-b) 7deg 14deg
  );
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.35),
    inset 0 -2px 4px rgba(0, 0, 0, 0.45);
}

.tour-chip-face {
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.55) 0%, transparent 42%),
    radial-gradient(circle at 72% 78%, rgba(0, 0, 0, 0.28) 0%, transparent 48%),
    radial-gradient(circle at 50% 58%, var(--chip-face-mid) 0%, var(--chip-face-dark) 72%, var(--chip-face-deep) 100%);
  box-shadow:
    inset 0 2px 5px rgba(255, 255, 255, 0.22),
    inset 0 -4px 8px rgba(0, 0, 0, 0.38),
    0 2px 4px rgba(0, 0, 0, 0.25);
}

.tour-chip-ring {
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.42);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.12),
    inset 0 1px 3px rgba(255, 255, 255, 0.18);
  pointer-events: none;
}

.tour-chip-mark {
  position: relative;
  z-index: 1;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--chip-mark);
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35),
    0 -1px 2px rgba(0, 0, 0, 0.45);
  line-height: 1;
}

.tour-chip-stack--red {
  --chip-stripe-a: #ff8a80;
  --chip-stripe-b: #ffffff;
  --chip-face-mid: #ef5350;
  --chip-face-dark: #c62828;
  --chip-face-deep: #8e0000;
  --chip-mark: #fff8f8;
}
.tour-chip-stack--gold {
  --chip-stripe-a: #ffe082;
  --chip-stripe-b: #fff8e1;
  --chip-face-mid: #ffca28;
  --chip-face-dark: #f9a825;
  --chip-face-deep: #e65100;
  --chip-mark: #5d3a00;
}
.tour-chip-stack--gold .tour-chip-mark {
  font-size: 17px;
  letter-spacing: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.tour-chip-stack--pink {
  --chip-stripe-a: #ff80ab;
  --chip-stripe-b: #ffffff;
  --chip-face-mid: #ec407a;
  --chip-face-dark: #c2185b;
  --chip-face-deep: #880e4f;
  --chip-mark: #fff0f5;
}
.tour-chip-stack--purple {
  --chip-stripe-a: #b388ff;
  --chip-stripe-b: #ede7f6;
  --chip-face-mid: #7e57c2;
  --chip-face-dark: #512da8;
  --chip-face-deep: #311b92;
  --chip-mark: #f3e5f5;
}
.tour-chip-stack--blue {
  --chip-stripe-a: #64b5f6;
  --chip-stripe-b: #ffffff;
  --chip-face-mid: #42a5f5;
  --chip-face-dark: #1565c0;
  --chip-face-deep: #0d47a1;
  --chip-mark: #e3f2fd;
}
.tour-chip-stack--green {
  --chip-stripe-a: #81c784;
  --chip-stripe-b: #ffffff;
  --chip-face-mid: #66bb6a;
  --chip-face-dark: #2e7d32;
  --chip-face-deep: #1b5e20;
  --chip-mark: #e8f5e9;
}

.tour-chip.c1 {
  top: 0;
  left: 0;
  transform: rotate(-10deg);
  z-index: 3;
}
.tour-chip.c2 {
  top: 7px;
  left: 9px;
  transform: rotate(7deg);
  z-index: 2;
  opacity: 0.94;
}
.tour-chip.c3 {
  top: 14px;
  left: 3px;
  transform: rotate(-16deg);
  z-index: 1;
  opacity: 0.88;
}
.tour-chip.c2 .tour-chip-face { filter: brightness(0.96); }
.tour-chip.c3 .tour-chip-face { filter: brightness(0.9); }
.tour-reg-participant {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.tour-reg-participant:last-child { border-bottom: none; }
.tour-reg-participant-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.tour-reg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg-card);
}
.tour-reg-avatar-fallback {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--red), #ff6b6b);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
}
.tour-reg-pending {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: #d4af37;
  text-transform: lowercase;
}
.tour-reg-participant--pending .tour-reg-participant-name {
  color: rgba(255, 255, 255, 0.82);
}
.tour-reg-waitlist {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: #d4af37;
  text-transform: lowercase;
  flex-shrink: 0;
}
.tour-reg-participant--waitlist .tour-reg-participant-name {
  color: rgba(255, 255, 255, 0.78);
}
.tour-reg-waitlist-label {
  margin: 10px 0 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #d4af37;
}
.waitlist-modal-pos {
  font-size: 15px;
  margin-bottom: 12px;
  color: var(--text);
}
.waitlist-modal-body {
  text-align: left;
  margin-bottom: 8px;
}
.waitlist-modal-sheet {
  max-height: 90vh;
  overflow-y: auto;
}
.tour-reg-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  margin-bottom: 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.tour-reg-toggle:active {
  background: rgba(255, 255, 255, 0.09);
}
.tour-reg-toggle-text {
  flex: 1;
  min-width: 0;
}
.tour-reg-chevron {
  color: var(--red);
  font-weight: 800;
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}
.tour-reg-block .tour-reg-list {
  margin-top: 8px;
}
.tour-reg-list {
  margin: 0 0 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(0,0,0,0.25);
  text-align: left;
}
.tour-reg-name {
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.tour-reg-name:last-child { border-bottom: none; }
.faq-a strong { color: var(--red); font-weight: 800; }
.rating-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
.rating-tabs {
  display: flex;
  gap: 8px;
}
.rating-tab {
  flex: 1;
  padding: 12px 10px;
  border-radius: 999px;
  border: none;
  background: #1c1c1f;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}
.rating-tab.active {
  background: #3a3a40;
  color: #fff;
}
.rating-select-wrap,
.rating-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 48px;
  border-radius: 999px;
  background: #1c1c1f;
  padding: 0 16px;
  gap: 10px;
}
.rating-select-icon,
.rating-search-icon {
  flex-shrink: 0;
  color: #fff;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
}
.rating-select {
  flex: 1;
  appearance: none;
  border: none;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 24px 12px 0;
  cursor: pointer;
}
.rating-select-chevron {
  position: absolute;
  right: 16px;
  color: var(--text-muted);
  pointer-events: none;
  font-size: 12px;
}
.rating-search {
  flex: 1;
  border: none;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 14px;
  padding: 12px 0;
  outline: none;
}
.rating-search::placeholder { color: #6b6b73; }
.rating-hero-card {
  margin-bottom: 12px;
  text-align: center;
}
.rating-page-rp {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.1;
}
.rating-page-tier {
  margin-top: 4px;
  font-size: 15px;
  color: var(--text-muted);
}
.rating-my-rank {
  margin-top: 8px;
  font-size: 13px;
  color: var(--red);
  font-weight: 700;
}
.rating-board-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.rating-board-row:last-child { border-bottom: none; }
.rating-board-row.me {
  background: rgba(229, 57, 53, 0.08);
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
  border-radius: 10px;
}
.rating-board-rank {
  width: 28px;
  font-weight: 800;
  color: var(--text-muted);
  flex-shrink: 0;
}
.rating-board-rank.top { color: #f5c518; }
.rating-board-name { flex: 1; font-size: 14px; font-weight: 600; }
.rating-board-rp { font-size: 14px; font-weight: 700; color: var(--red); white-space: nowrap; }
.rating-empty { padding: 16px 0; }
.profile-edit-card .field label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-align: left;
}
.profile-edit-card .field input {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0f0f14;
  color: var(--text);
  font: inherit;
  margin-bottom: 10px;
  box-sizing: border-box;
}
.faq-item,
.faq-q { text-align: left; }

/* K52 logos on tournament posters */
.tour-logo-wrap {
  position: relative;
  width: 108px;
  height: 108px;
  flex-shrink: 0;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.55));
}
.tour-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}
.tour-logo-sprite {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-image: url("/assets/logos/logo-colors.png?v=1");
  background-size: 200% 200%;
  background-repeat: no-repeat;
}
.tour-logo-sprite.sprite-red { background-position: 0% 0%; }
.tour-logo-sprite.sprite-blue { background-position: 100% 0%; }
.tour-logo-sprite.sprite-purple { background-position: 0% 100%; }
.tour-logo-sprite.sprite-green { background-position: 100% 100%; }
.chip-deco .tour-logo-wrap {
  width: 100px;
  height: 100px;
  transform: scale(1.08);
  transform-origin: center right;
}
.mini-chip-deco .tour-logo-wrap { width: 88px; height: 88px; }

.top-bar--compact { margin-bottom: 8px; }
.user-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tier-badge-inline {
  font-size: 20px;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.4));
}
.profile-name-row .tier-badge-inline { font-size: 22px; }

.loading-splash {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  gap: 16px;
}
.loading-logo {
  width: min(220px, 72vw);
  height: auto;
  border-radius: 50%;
  filter: drop-shadow(0 12px 28px rgba(245, 200, 66, 0.25));
}
.loading-text { font-size: 16px; font-weight: 600; color: var(--text); margin: 0; }
.tour-card-actions--simple { padding-top: 4px; }
.dict-section .dict-a strong { color: var(--red); font-weight: 700; }
