/* ─────────────────────────────────────────────────────────────
   DESIGN TOKENS
───────────────────────────────────────────────────────────── */
:root {
  /* Background layers */
  --bg:          #0d1117;
  --surface:     #161b22;
  --surface2:    #21262d;
  --border:      #30363d;

  /* Felt table */
  --felt:        #14532d;
  --felt-mid:    #166534;
  --felt-light:  #15803d;

  /* Text */
  --txt:         #e6edf3;
  --txt-muted:   #8b949e;
  --txt-dim:     #484f58;

  /* Accent / action */
  --gold:        #f0b429;
  --gold-light:  #fde68a;
  --gold-dim:    #92400e;
  --green-btn:   #238636;
  --green-hover: #2ea043;
  --red-btn:     #b91c1c;
  --blue-chip:   #1f6feb;

  /* Cards */
  --card-bg:     #fafafa;
  --card-red:    #c62828;
  --card-black:  #1a1a1a;
  --card-border: #d1d5db;

  /* Radii & spacing */
  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  16px;
  --r-xl:  22px;
}

/* ─────────────────────────────────────────────────────────────
   RESET & BASE
───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--txt);
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  overflow-x: hidden;
}

a { color: var(--gold); }
a:hover { color: var(--gold-light); }

details summary { cursor: pointer; user-select: none; }

/* ─────────────────────────────────────────────────────────────
   LOGIN SCREEN
───────────────────────────────────────────────────────────── */
.login-screen {
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(22,101,52,.35) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(15,30,60,.5) 0%, transparent 50%),
    var(--bg);
}

.launch-portal {
  width: min(1180px, 100%);
}

.launch-stage {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 3vw, 32px);
  border-radius: 32px;
  border: 1px solid rgba(255,255,255,.08);
  background:
    radial-gradient(circle at top left, rgba(240,180,41,.14), transparent 36%),
    linear-gradient(145deg, rgba(10, 31, 22, .96), rgba(9, 18, 34, .94));
  box-shadow: 0 24px 70px rgba(0,0,0,.45);
}

.launch-stage::after {
  content: '';
  position: absolute;
  inset: auto -8% -28% auto;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(255,255,255,.08), transparent 68%);
  pointer-events: none;
}

.launch-header {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 20px;
}

.launch-header-spacer {
  min-height: 1px;
}

.launch-brand-lockup {
  display: flex;
  align-items: center;
  justify-self: center;
  text-align: center;
}

.launch-auth-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
}

.launch-public-nav {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 16px;
  margin: 20px auto 0;
  max-width: 860px;
  color: rgba(247,243,232,.72);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.launch-public-nav a {
  color: inherit;
  text-decoration: none;
  transition: color .16s ease, transform .16s ease;
}

.launch-public-nav a:hover {
  color: #f2d28a;
  transform: translateY(-1px);
}

.launch-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 152px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: #f7f3e8;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .02em;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease, color .16s ease;
}

.launch-action-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(240,180,41,.45);
  background: rgba(255,255,255,.08);
  box-shadow: 0 14px 28px rgba(0,0,0,.24);
}

.launch-action-btn-primary {
  background: linear-gradient(180deg, rgba(240,180,41,.94), rgba(214,149,22,.92));
  border-color: rgba(255,255,255,.18);
  color: #0f1114;
}

.launch-action-btn-primary:hover {
  background: linear-gradient(180deg, rgba(247,194,78,.98), rgba(222,159,31,.96));
  color: #0f1114;
}

.launch-main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  margin-top: 24px;
  align-items: start;
}

.login-screen.has-auth-dock .launch-main {
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 430px);
}

.launch-hero {
  min-height: 100%;
  padding: clamp(10px, 2vw, 24px) clamp(8px, 1vw, 12px) clamp(18px, 2vw, 30px) 0;
}

.launch-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.03));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 16px 36px rgba(0,0,0,.22);
  color: #f7f0dc;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .04em;
}

.launch-kicker-suits {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 18px;
}

.launch-kicker-name {
  display: inline-flex;
  align-items: center;
}

.launch-logo {
  width: fit-content;
  margin: 22px auto 8px;
  font-size: clamp(42px, 7vw, 64px);
}

.launch-hero-slogan {
  margin: 8px 0 14px;
  color: #f2d28a;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-align: center;
}

.launch-title {
  font-size: clamp(40px, 7vw, 72px);
  line-height: .95;
  margin: 0;
  text-align: left;
}

.launch-sub {
  max-width: 640px;
  margin: 14px 0 0;
  font-size: 18px;
  line-height: 1.45;
  text-align: left;
}

.launch-hero-copy {
  max-width: 560px;
  margin-top: 18px;
  color: var(--txt-dim);
  font-size: 15px;
  line-height: 1.6;
}

.launch-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 26px;
}

.launch-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.launch-guest-note {
  max-width: 560px;
  margin-top: 14px;
  color: var(--txt-muted);
  font-size: 14px;
  line-height: 1.55;
}

.launch-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  color: var(--txt);
  font-size: 13px;
  font-weight: 700;
}

.launch-proof {
  display: grid;
  grid-template-columns: minmax(260px, .82fr) minmax(260px, 1fr);
  gap: clamp(18px, 3vw, 34px);
  align-items: center;
  max-width: 980px;
  margin: clamp(30px, 5vw, 52px) 0 0;
  padding: clamp(18px, 3vw, 26px);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.07), rgba(255,255,255,.02)),
    rgba(5,12,22,.32);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 22px 50px rgba(0,0,0,.28);
}

.launch-proof-table {
  position: relative;
  min-height: 270px;
  border-radius: 30px;
  background:
    radial-gradient(ellipse at center, rgba(34,197,94,.26), transparent 58%),
    linear-gradient(145deg, #0b2c1c, #061a14);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: inset 0 0 0 12px rgba(255,255,255,.035), inset 0 0 48px rgba(0,0,0,.5);
  overflow: hidden;
}

.launch-proof-table::after {
  content: '';
  position: absolute;
  inset: 22px;
  border-radius: 999px;
  border: 1px dashed rgba(242,210,138,.24);
}

.launch-proof-seat {
  position: absolute;
  z-index: 2;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(3,8,15,.78);
  border: 1px solid rgba(255,255,255,.1);
  color: rgba(247,243,232,.9);
  font-size: 12px;
  font-weight: 800;
}

.launch-proof-seat-n { top: 18px; left: 50%; transform: translateX(-50%); }
.launch-proof-seat-w { top: 50%; left: 16px; transform: translateY(-50%); }
.launch-proof-seat-e { top: 50%; right: 16px; transform: translateY(-50%); }
.launch-proof-seat-s { left: 50%; bottom: 18px; transform: translateX(-50%); color: #0f1114; background: #f2d28a; }

.launch-proof-felt {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: flex;
  gap: 8px;
  transform: translate(-50%, -50%) rotate(-5deg);
}

.launch-proof-card {
  display: grid;
  place-items: center;
  width: 42px;
  height: 58px;
  border-radius: 8px;
  background: #f7f3e8;
  color: #101419;
  font-size: 17px;
  font-weight: 900;
  box-shadow: 0 12px 20px rgba(0,0,0,.35);
}

.launch-proof-card-open {
  background: rgba(255,255,255,.035);
  border: 1px dashed rgba(242,210,138,.34);
  box-shadow: inset 0 0 18px rgba(0,0,0,.22);
}

.launch-proof-copy h2 {
  margin: 8px 0 10px;
  color: #fff7dd;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
  letter-spacing: -.03em;
}

.launch-proof-copy p {
  max-width: 520px;
  color: rgba(230,237,243,.72);
  font-size: 15px;
  line-height: 1.6;
}

.launch-proof-kicker {
  color: #f2d28a;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.launch-proof-insight {
  display: grid;
  gap: 4px;
  max-width: 440px;
  margin-top: 18px;
  padding: 14px 16px;
  border-left: 3px solid #f0b429;
  border-radius: 14px;
  background: rgba(240,180,41,.1);
}

.launch-proof-insight span {
  color: rgba(247,243,232,.64);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.launch-proof-insight strong {
  color: #fff7dd;
  font-size: 20px;
}

.launch-proof-insight small {
  color: rgba(230,237,243,.7);
  line-height: 1.5;
}

.launch-retention-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  max-width: 980px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  background: rgba(255,255,255,.08);
}

.launch-retention-strip div {
  display: grid;
  gap: 4px;
  padding: 16px;
  background: rgba(5,12,22,.48);
}

.launch-retention-strip strong {
  color: #f7f3e8;
  font-size: 14px;
}

.launch-retention-strip span {
  color: rgba(230,237,243,.64);
  font-size: 13px;
  line-height: 1.45;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: clamp(28px, 6vw, 48px);
  max-width: 420px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(0,0,0,.6);
}

.launch-account-card {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}

.launch-account-dock {
  background: rgba(7, 14, 28, .82);
  border-color: rgba(255,255,255,.1);
  box-shadow: 0 18px 48px rgba(0,0,0,.4);
  max-width: none;
}

.launch-account-top {
  margin-bottom: 16px;
}

.launch-account-copy {
  margin: 8px 0 0;
  color: var(--txt-muted);
  font-size: 14px;
  line-height: 1.5;
}

.portal-form-card {
  position: relative;
  z-index: 1;
  padding: 20px;
  border-radius: 22px;
  background: rgba(5,12,22,.36);
  border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(8px);
}

.portal-card-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #f2d28a;
}

.portal-card-copy {
  margin: 10px 0 16px;
  color: var(--txt-muted);
  font-size: 14px;
  line-height: 1.55;
}

.portal-form-grid {
  display: grid;
  gap: 10px;
}

.portal-note-input {
  min-height: 96px;
  resize: vertical;
  font-family: inherit;
}

.portal-submit-btn {
  margin-top: 12px;
}

.portal-status {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--txt-muted);
}

.portal-status.is-success { color: #8fe7a7; }
.portal-status.is-error { color: #ff8f84; }

@media (max-width: 980px) {
  .launch-portal {
    max-width: 920px;
  }
  .launch-main {
    grid-template-columns: 1fr;
  }
  .launch-proof {
    grid-template-columns: 1fr;
  }
  .launch-account-card {
    max-width: none;
  }
}

.login-logo {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 12px;
  letter-spacing: 4px;
}

.logo-suit { color: var(--txt-dim); }
.rd { color: var(--card-red) !important; }

.login-title { font-size: 32px; font-weight: 800; letter-spacing: .5px; }
.login-sub { color: var(--txt-muted); font-size: 14px; margin: 6px 0 28px; }
.login-highlights {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: -10px 0 20px;
}
.login-highlight {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  color: var(--txt-dim);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .03em;
}

.google-btn-container { min-height: 44px; display: flex; justify-content: center; }

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--txt-dim);
  font-size: 13px;
  margin: 18px 0;
}
.login-divider::before,
.login-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.auth-tab {
  padding: 10px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--txt-muted);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.auth-tab:hover { color: var(--txt); border-color: var(--txt-muted); }
.auth-tab.is-active {
  background: rgba(31,111,235,.16);
  border-color: var(--blue-chip);
  color: var(--txt);
}

.auth-panel {
  width: 100%;
}

.btn-guest {
  width: 100%;
  padding: 11px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--txt);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.btn-guest:hover { background: var(--surface); border-color: var(--txt-muted); }

.email-step { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.email-step.hidden { display: none; }
.email-input {
  width: 100%; padding: 10px 12px; border-radius: var(--r-md);
  border: 1px solid var(--border); background: var(--surface2);
  color: var(--txt); font-size: 15px; box-sizing: border-box;
}
.email-input:focus { outline: none; border-color: var(--accent); }
.email-hint { color: var(--txt-muted); font-size: 13px; margin: 0; }
.email-hint.is-success,
.dash-meta.is-success { color: #3fb950; }
.email-hint.is-error,
.dash-meta.is-error { color: #f85149; }
.btn-email {
  width: 100%; padding: 11px; border-radius: var(--r-md);
  border: none; background: var(--accent); color: #fff;
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: opacity .15s;
}
.btn-email:hover:not(:disabled) { opacity: .85; }
.btn-email:disabled { opacity: .5; cursor: default; }
.btn-link {
  background: none; border: none; color: var(--txt-muted);
  font-size: 13px; cursor: pointer; padding: 0; text-decoration: underline;
  align-self: flex-start;
}
.btn-link:hover { color: var(--txt); }
.auth-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  justify-content: space-between;
}

.oauth-settings {
  margin-top: 24px;
  text-align: left;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px;
  font-size: 13px;
}
.oauth-settings summary { font-weight: 600; color: var(--txt-muted); }
.oauth-hint { color: var(--txt-muted); margin: 10px 0; line-height: 1.6; }
.oauth-hint code { background: var(--surface2); padding: 1px 5px; border-radius: 4px; font-size: 12px; }

.field-row { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.field-row label { font-size: 12px; font-weight: 600; color: var(--txt-muted); }
.field-row input {
  width: 100%;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--txt);
  font-size: 13px;
}
.field-row input:focus { outline: none; border-color: var(--blue-chip); }

.btn-secondary {
  padding: 8px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--txt);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.btn-secondary:hover { background: var(--surface); }

/* ─────────────────────────────────────────────────────────────
   GAME SCREEN WRAPPER
───────────────────────────────────────────────────────────── */
.game-screen {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
}
.hidden { display: none !important; }

/* ─────────────────────────────────────────────────────────────
   PRIMARY NAV + VIEW SHELL
───────────────────────────────────────────────────────────── */
.app-nav {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.app-nav-btn {
  flex: 1;
  padding: 7px 4px 8px;
  border-radius: 0;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--txt-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}

.app-nav-btn:hover:not(:disabled) {
  background: var(--surface2);
  color: var(--txt);
}

.app-nav-btn.is-active {
  background: rgba(255,255,255,.02);
  border-bottom-color: var(--gold);
  color: var(--txt);
}

.app-nav-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.app-nav-btn { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 64px; }
.nav-icon { font-size: 15px; line-height: 1; }
.nav-label { font-size: 11px; font-weight: 700; letter-spacing: .03em; }
@media (max-width: 640px) {
  body.app-shell-active {
    height: 100%;
    overflow: hidden;
  }
  body.app-shell-active .game-screen {
    height: 100svh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    background: var(--bg);
  }
  .app-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 150;
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: none;
    padding: 6px 8px calc(10px + env(safe-area-inset-bottom, 0px));
    justify-content: space-around;
  }
  .app-nav-btn { min-width: 0; flex: 1; padding: 6px 4px; border: none; background: transparent; border-radius: 0; }
  .app-nav-btn.is-active { background: transparent; border: none; }
  .app-nav-btn.is-active .nav-label, .app-nav-btn.is-active .nav-icon { color: var(--gold); }
  .view-screen {
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }
  body.app-shell-active #topbar {
    order: 0;
    flex: 0 0 auto;
  }
  body.app-shell-active #tournamentBanner {
    order: 1;
    flex: 0 0 auto;
  }
  body.app-shell-active .view-screen {
    order: 2;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    background: var(--bg);
  }
  body.app-shell-active .app-nav {
    order: 3;
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    z-index: auto;
    flex: 0 0 auto;
  }
}

.view-screen {
  display: block;
}

.home-view {
  padding: 18px 16px 22px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 14px;
}

.dash-card {
  background: linear-gradient(160deg, rgba(22,27,34,.96), rgba(13,17,23,.96));
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 18px;
  box-shadow: 0 16px 36px rgba(0,0,0,.28);
}

.dash-hero {
  grid-column: span 2;
  background:
    radial-gradient(circle at top left, rgba(240,180,41,.12), transparent 35%),
    radial-gradient(circle at bottom right, rgba(31,111,235,.12), transparent 40%),
    linear-gradient(160deg, rgba(22,27,34,.98), rgba(13,17,23,.98));
}

.dash-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .9px;
  color: var(--gold-light);
  font-weight: 800;
  margin-bottom: 10px;
}

.dash-title {
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.1;
  font-weight: 800;
  margin-bottom: 10px;
}

.dash-copy {
  color: var(--txt-muted);
  max-width: 62ch;
  margin-bottom: 18px;
}

.dash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-primary {
  padding: 11px 16px;
  border-radius: var(--r-md);
  border: 1px solid #b58116;
  background: linear-gradient(135deg, #f0b429, #d97706);
  color: #1f1300;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: filter .15s, transform .12s;
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

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

.dash-card-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .9px;
  color: var(--txt-muted);
  margin-bottom: 12px;
}

.dash-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dash-metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.05);
}

.dash-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--txt-dim);
}

.dash-metric strong {
  font-size: 15px;
  color: var(--txt);
  overflow-wrap: anywhere;
}

.dash-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-list li {
  position: relative;
  padding-left: 16px;
  color: var(--txt-muted);
}

.dash-list-hands li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-left: 16px;
}

.dash-list-hands li span {
  color: var(--txt-dim);
  font-size: 13px;
  white-space: nowrap;
}

.dash-link-btn {
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.dash-link-btn span {
  color: var(--txt-dim);
  font-size: 13px;
  white-space: nowrap;
}

.dash-meta {
  font-size: 12px;
  color: var(--txt-dim);
}

.friend-dash-card {
  grid-column: span 2;
}

.friend-dash-controls,
.friend-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.friend-inline-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 170px;
  color: var(--txt-dim);
  font-size: 12px;
  font-weight: 700;
}

.friend-inline-field span {
  text-transform: uppercase;
  letter-spacing: .7px;
}

.friend-seat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.friend-seat-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
}

.friend-seat-card.is-you {
  border-color: rgba(31,111,235,.45);
  background: rgba(31,111,235,.09);
}

.friend-seat-card.is-bot {
  border-color: rgba(240,180,41,.24);
}

.friend-seat-card.is-open {
  border-style: dashed;
}

.friend-seat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.friend-seat-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .7px;
  text-transform: uppercase;
  color: var(--txt-dim);
}

.friend-seat-meta {
  font-size: 11px;
  color: var(--gold-light);
}

.friend-seat-name {
  font-size: 15px;
  color: var(--txt);
}

.friend-seat-btn {
  align-self: flex-start;
  padding: 8px 12px;
}

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

.shell-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: var(--txt);
  font-size: 14px;
}

.shell-input:focus {
  outline: none;
  border-color: var(--blue-chip);
}

.replay-grid {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  background: var(--bg);
}

.replay-toolbar,
.replay-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.replay-toolbar-actions,
.replay-watch-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.replay-watch-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: var(--r-md);
  border: 1px solid rgba(31,111,235,.22);
  background: rgba(31,111,235,.08);
}

.replay-speed-btn.is-active {
  border-color: rgba(240,180,41,.55);
  color: var(--txt);
}

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

.replay-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  text-align: left;
  padding: 12px;
  border-radius: var(--r-md);
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.03);
  color: var(--txt);
  cursor: pointer;
}

.replay-row span {
  color: var(--txt-dim);
  font-size: 12px;
}

.replay-row.is-selected {
  border-color: rgba(240,180,41,.55);
  box-shadow: 0 0 0 1px rgba(240,180,41,.25) inset;
}

.replay-metric-grid {
  margin-bottom: 14px;
}

.replay-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.replay-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.replay-panel-wide {
  grid-column: 1 / -1;
}

.replay-pre {
  min-height: 260px;
  margin: 0;
  padding: 12px;
  border-radius: var(--r-md);
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(0,0,0,.22);
  color: var(--txt-muted);
  font-size: 12px;
  line-height: 1.45;
  overflow: auto;
  white-space: pre-wrap;
}

.replay-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 180px;
}

.replay-event {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.05);
  color: var(--txt-muted);
}

.replay-event span {
  flex: 1;
  color: var(--txt);
}

.replay-copy-row {
  margin-bottom: 0;
}

.replay-copy-btn {
  min-width: 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.replay-copy-icon {
  position: relative;
  width: 18px;
  height: 18px;
  display: inline-block;
}

.replay-copy-sheet {
  position: absolute;
  width: 12px;
  height: 14px;
  border-radius: 3px;
  border: 1.5px solid currentColor;
  background: transparent;
}

.replay-copy-sheet-back {
  top: 1px;
  left: 1px;
  opacity: .7;
}

.replay-copy-sheet-front {
  top: 4px;
  left: 5px;
  background: rgba(255,255,255,.02);
}

.clubs-grid {
  align-items: start;
}

.entity-list,
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.entity-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.05);
}

.entity-row,
.leaderboard-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.05);
  color: var(--txt-muted);
}

.entity-row strong,
.leaderboard-row strong {
  color: var(--txt);
}

.leaderboard-row span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.leaderboard-row small {
  color: var(--txt-dim);
  font-size: 11px;
}

.entity-empty {
  padding: 10px 0;
  color: var(--txt-dim);
}

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

.clubs-subtitle {
  color: var(--txt-dim);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .6px;
}

.member-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.member-row,
.inline-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.entity-action {
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  color: var(--txt);
  border-radius: 999px;
  padding: 5px 10px;
  cursor: pointer;
}

.entity-action.danger {
  color: #ffbeb1;
  border-color: rgba(255,128,102,.35);
}

.dash-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(240,180,41,.45);
}

.play-view {
  display: block;
}

#playChrome {
  display: none;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 8px 12px 6px;
  background: var(--bg);
}

.trust-tile {
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: var(--r-lg);
  padding: 10px 12px;
}

.trust-label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--txt-dim);
  margin-bottom: 4px;
}

.trust-tile strong {
  display: block;
  font-size: 13px;
  margin-bottom: 3px;
}

.trust-copy {
  font-size: 11px;
  color: var(--txt-muted);
}

#playView.is-bidding-phase .trust-strip,
#playView.is-play-phase .trust-strip {
  gap: 8px;
  padding-bottom: 4px;
}

#playView.is-bidding-phase .trust-copy,
#playView.is-play-phase .trust-copy {
  display: none;
}

.model-insights-panel {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--r-lg);
  border: 1px solid rgba(240,180,41,.18);
  background:
    radial-gradient(circle at top right, rgba(240,180,41,.09), transparent 42%),
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
}

.panel-box-insights {
  gap: 0;
}

.model-insights-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.panel-title-inline {
  margin-bottom: 2px;
}

.model-insights-badge {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(240,180,41,.28);
  background: rgba(240,180,41,.1);
  color: var(--gold-light);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.model-insights-body,
.model-insight-summary,
.model-insight-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.model-insights-foot {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.06);
}

.model-insights-page-link {
  color: var(--txt-muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.model-insights-page-link:hover {
  color: var(--gold);
}

.model-insight-hero {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: var(--r-md);
  background: rgba(13,17,23,.55);
  border: 1px solid rgba(255,255,255,.05);
}

.model-insight-hero-value {
  min-width: 52px;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}

.model-insight-hero-kicker,
.model-insight-section-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--txt-dim);
}

.model-insight-bar {
  padding: 7px 9px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.05);
}

.model-insight-bar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.model-insight-label {
  display: flex;
  align-items: center;
  min-width: 0;
}

.model-insight-label-text {
  color: var(--txt);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.model-insight-bar-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  overflow: hidden;
}

.model-insight-bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(240,180,41,.92), rgba(31,111,235,.85));
}

.model-insight-bar-meta {
  margin-top: 5px;
  font-size: 10px;
  color: var(--txt-dim);
}

.model-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 6px;
}

.model-mini-stat {
  padding: 7px 9px;
  border-radius: var(--r-md);
  background: rgba(13,17,23,.48);
  border: 1px solid rgba(255,255,255,.05);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.model-mini-stat strong {
  color: var(--txt);
  font-size: 12px;
}

.model-mini-stat span {
  color: var(--txt-dim);
  font-size: 11px;
}

.model-suit-stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 7px;
  border-radius: 10px;
  background: rgba(13,17,23,.42);
  border: 1px solid rgba(255,255,255,.05);
}

.model-suit-stat strong {
  color: var(--txt);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.model-suit-stat span {
  color: var(--txt-dim);
  font-size: 10px;
  white-space: nowrap;
}

.model-suit-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  border: 1px solid rgba(255,255,255,.08);
}

.model-suit-badge-red {
  color: #fecaca;
  background: rgba(185,28,28,.22);
  border-color: rgba(248,113,113,.3);
}

.model-suit-badge-black {
  color: #f8fafc;
  background: rgba(148,163,184,.18);
  border-color: rgba(226,232,240,.18);
}

.model-suit-code {
  color: var(--txt);
}

.model-card-token {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(13,17,23,.72);
  font-weight: 800;
  letter-spacing: .01em;
}

.model-card-token-red {
  color: #ffb4a2;
  border-color: rgba(248,81,73,.28);
}

.model-card-token-black {
  color: var(--txt);
  border-color: rgba(255,255,255,.08);
}

.model-card-token-rank {
  line-height: 1;
}

.model-card-token-suit {
  font-size: 12px;
  line-height: 1;
}

.model-insight-teaser {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--r-md);
  background: rgba(13,17,23,.48);
  border: 1px solid rgba(255,255,255,.05);
}

.model-insight-teaser-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.model-insight-teaser-copy p {
  margin: 0;
  color: var(--txt-dim);
  font-size: 12px;
  line-height: 1.45;
}

.model-insight-teaser-link {
  align-self: flex-start;
  color: var(--gold-light);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
}

.model-insight-teaser-link:hover {
  text-decoration: underline;
}

.model-insight-teaser-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.model-insight-teaser-link.is-secondary {
  color: var(--txt-muted);
}

.model-insight-teaser-graphic {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 82px;
  padding: 10px 9px;
  border-radius: var(--r-md);
  background:
    radial-gradient(circle at top right, rgba(240,180,41,.18), transparent 45%),
    rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.05);
  overflow: hidden;
}

.model-insight-teaser-graphic::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13,17,23,.12), rgba(13,17,23,.34));
  backdrop-filter: blur(5px);
}

.model-insight-teaser-row,
.model-insight-teaser-mini-grid span {
  position: relative;
  z-index: 1;
}

.model-insight-teaser-row {
  height: 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}

.model-insight-teaser-row span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(240,180,41,.9), rgba(31,111,235,.8));
}

.model-insight-teaser-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-top: auto;
}

.model-insight-teaser-mini-grid span {
  height: 16px;
  border-radius: 8px;
  background: rgba(255,255,255,.1);
}

.model-insight-raw {
  margin-top: 6px;
}

.model-insight-raw summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--txt);
}

.model-insight-pre {
  margin: 8px 0 0;
  padding: 12px;
  border-radius: var(--r-md);
  background: rgba(0,0,0,.26);
  border: 1px solid rgba(255,255,255,.05);
  color: var(--txt-muted);
  font-size: 12px;
  line-height: 1.45;
  overflow: auto;
  white-space: pre-wrap;
}

/* ─────────────────────────────────────────────────────────────
   TOP BAR
───────────────────────────────────────────────────────────── */
#topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 100;
}

@media (max-width: 640px) {
  #topbar {
    position: relative;
    top: auto;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.brand:hover .brand-name,
.brand:focus-visible .brand-name {
  color: var(--gold);
}
.brand-suits { font-size: 16px; letter-spacing: 1px; }
.brand-name { font-size: 16px; font-weight: 800; letter-spacing: .3px; }

.topbar-center {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: var(--txt-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 4px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.topbar-signout {
  white-space: nowrap;
}

.api-field {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--txt-muted);
}
.api-field input {
  width: 180px;
  padding: 5px 8px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--txt);
  font-size: 12px;
}
.api-field input:focus { outline: none; border-color: var(--blue-chip); }

.seat-label {
  font-size: 12px;
  color: var(--txt-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}
.seat-label select {
  padding: 5px 8px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--txt);
  font-size: 12px;
  cursor: pointer;
}

.btn-new, .btn-next {
  padding: 7px 14px;
  border-radius: var(--r-sm);
  border: none;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: filter .15s;
  white-space: nowrap;
}
.btn-new { background: var(--surface2); color: var(--txt); border: 1px solid var(--border); }
.btn-new:hover { background: var(--surface); }
.btn-next { background: var(--green-btn); color: #fff; }
.btn-next:hover:not(:disabled) { background: var(--green-hover); }
.btn-next:disabled { opacity: .4; cursor: not-allowed; }

.user-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 13px;
  font-weight: 600;
  transition: border-color .15s;
}
.user-badge:hover { border-color: var(--txt-muted); }
.user-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; background: var(--surface2); }
.user-name { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.clubs-directory-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 10px 0 14px;
}

/* ─────────────────────────────────────────────────────────────
   CHIPS BAR
───────────────────────────────────────────────────────────── */
.chips-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.chip {
  padding: 3px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  background: var(--surface);
  white-space: nowrap;
}
.chip-tournament {
  background: rgba(240,180,41,.12);
  border-color: rgba(240,180,41,.35);
  color: var(--gold);
}
.chip-hint { color: var(--txt-muted); }
.play-tournament-banner {
  margin: 10px 14px 0;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(240,180,41,.28);
  background:
    linear-gradient(135deg, rgba(240,180,41,.14), rgba(31,111,235,.08)),
    rgba(255,255,255,.02);
  box-shadow: 0 10px 28px rgba(0,0,0,.18);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.play-tourn-shell {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.play-tourn-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.play-tourn-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
}
.play-tourn-title {
  font-size: 1.03rem;
  font-weight: 800;
  color: var(--txt);
}
.play-tourn-subline {
  font-size: 0.88rem;
  font-weight: 700;
  color: #f4f7fb;
}
.play-tourn-detail {
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--txt-muted);
  max-width: 72ch;
}
.play-takeover-notice {
  margin: 10px 14px 0;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(240, 180, 41, 0.34);
  background:
    linear-gradient(135deg, rgba(240, 180, 41, 0.16), rgba(163, 89, 28, 0.18)),
    rgba(255, 255, 255, 0.03);
  box-shadow: 0 10px 28px rgba(0,0,0,.18);
}
.play-takeover-notice.is-tournament {
  border-color: rgba(240, 180, 41, 0.44);
}
.play-takeover-shell {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.play-takeover-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
}
.play-takeover-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--txt);
}
.play-takeover-copy {
  font-size: 0.89rem;
  line-height: 1.5;
  color: #f4f7fb;
}
.play-tourn-actions {
  display: flex;
  align-items: center;
}
.play-tourn-btn {
  border: none;
  border-radius: 999px;
  padding: 9px 14px;
  background: var(--gold);
  color: #121212;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.play-tourn-btn:hover { filter: brightness(1.03); }
.tourn-progress-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.tourn-progress-list-compact {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}
.tourn-progress-card {
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(6, 12, 20, .42);
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.tourn-progress-card.is-user {
  border-color: rgba(31,111,235,.35);
  background: rgba(31,111,235,.08);
}
.tourn-progress-head,
.tourn-progress-meta,
.tourn-bracket-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.tourn-progress-label {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--txt);
}
.tourn-progress-status {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--gold);
}
.tourn-progress-meta {
  font-size: 0.77rem;
  color: var(--txt-muted);
}
.tourn-progress-seats {
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--txt);
}
.tourn-progress-note,
.tourn-bracket-note {
  font-size: 0.76rem;
  color: #ffb86b;
  line-height: 1.4;
}

/* ─────────────────────────────────────────────────────────────
   GAME GRID
───────────────────────────────────────────────────────────── */
.game-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 248px;
  grid-template-areas:
    "table right";
  gap: 14px 16px;
  padding: 10px 12px 12px;
  flex: 1;
  min-height: 0;
  align-items: start;
}

.game-grid.game-grid-no-right-panel {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "table";
}

.game-grid.game-grid-landing {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "right";
}

/* ─────────────────────────────────────────────────────────────
   SIDE PANELS
───────────────────────────────────────────────────────────── */
.side-panel { display: flex; flex-direction: column; gap: 10px; }
.left-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  padding: 0 14px 14px;
}
.right-panel {
  grid-area: right;
  padding-top: 0;
}

.table-command-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.table-command-bar .btn-new,
.table-command-bar .btn-next,
.table-command-bar .focus-exit-btn {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
}

.table-control-btn {
  border-radius: var(--r-sm);
}

.focus-exit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--txt-muted);
  border-radius: var(--r-sm);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.focus-exit-btn:hover {
  color: var(--txt);
  background: rgba(255,255,255,.03);
}

.panel-box {
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: var(--r-lg);
  padding: 12px 14px;
}

.panel-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--txt-muted);
  margin-bottom: 10px;
}

/* Running score */
.match-info-txt { font-size: 11px; color: var(--txt-dim); margin-bottom: 8px; line-height: 1.5; }

.score-rows { display: flex; flex-direction: column; gap: 6px; }
.score-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  border-radius: var(--r-sm);
  background: var(--bg);
  font-size: 13px;
}
.score-row .sr-label { font-weight: 600; }
.score-row .sr-val { font-weight: 700; }
.score-pos { color: #3fb950; }
.score-neg { color: #f85149; }
.score-sub { font-size: 11px; color: var(--txt-dim); font-weight: 500; margin-left: 4px; }

/* Last trick mini */
.mini-trick-area { display: flex; flex-wrap: wrap; gap: 5px; min-height: 28px; }
.mini-trick-winner { font-size: 12px; color: var(--txt-muted); margin-top: 6px; }

/* Auction */
.auction-meta-txt { font-size: 11px; color: var(--txt-dim); margin-bottom: 8px; line-height: 1.5; }
.auction-log { display: flex; flex-direction: column; gap: 4px; max-height: 200px; overflow-y: auto; }
.auction-entry {
  font-size: 12px;
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--bg);
}
.auction-entry strong { color: var(--txt-muted); }

/* ─────────────────────────────────────────────────────────────
   FELT TABLE
───────────────────────────────────────────────────────────── */
.table-section {
  grid-area: table;
  display: flex;
  align-items: stretch;
  min-height: 0;
}

.felt-table {
  flex: 1;
  display: grid;
  grid-template-areas:
    ". north ."
    "west  trick east"
    ". south .";
  grid-template-columns: 188px 1fr 188px;
  grid-template-rows: 118px 1fr 118px;
  background: linear-gradient(180deg, #0f3426 0%, #0c2c20 100%);
  border: 1px solid rgba(146,196,164,.28);
  border-radius: var(--r-xl);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
  padding: 14px;
  gap: 10px;
  min-height: 440px;
}

/* Seat panels */
.seat-panel {
  background: rgba(4,12,9,.3);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--r-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.seat-north { grid-area: north; }
.seat-west  { grid-area: west; align-self: center; }
.seat-east  { grid-area: east; align-self: center; }
.seat-south { grid-area: south; }

.seat-name {
  font-size: 13px;
  font-weight: 700;
  color: rgba(230,237,243,.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.seat-stats {
  font-size: 12px;
  color: rgba(200,208,216,.76);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seat-panel-side {
  background: rgba(4,12,9,.42);
  gap: 7px;
}

.seat-panel-side .seat-name,
.seat-panel-side .seat-stats {
  white-space: pre-line;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.25;
}

.seat-panel-side .seat-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .08em;
}

.seat-panel-side .seat-stats {
  font-size: 13px;
  font-weight: 700;
  color: rgba(233,239,244,.92);
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}

.seat-panel.is-you .seat-name::before {
  content: '★ ';
  color: var(--gold);
}
.seat-panel.is-turn { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(240,180,41,.3); }
.seat-panel.is-dealer .seat-name::after { content: ' (D)'; color: var(--txt-dim); font-weight: 500; }
.seat-panel.is-out { opacity: .5; }

/* Trick zone */
.trick-zone {
  grid-area: trick;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.trick-compass {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.tc-middle { display: flex; align-items: center; gap: 5px; }
.tc-center {
  font-size: 10px;
  font-weight: 700;
  color: rgba(230,237,243,.45);
  letter-spacing: .5px;
  text-transform: uppercase;
  min-width: 42px;
  text-align: center;
}

/* Trick slots */
.trick-slot {
  width: 64px;
  height: 88px;
  border-radius: var(--r-sm);
  border: 1px dashed rgba(230,237,243,.2);
  background: rgba(0,0,0,.14);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .25s ease;
  position: relative;
}
.trick-slot.has-card { border-style: solid; border-color: transparent; background: transparent; }

/* Contract badge */
.contract-badge {
  font-size: 12px;
  font-weight: 700;
  color: rgba(230,237,243,.8);
  background: rgba(0,0,0,.5);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  padding: 4px 12px;
  max-width: 90%;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hand-winner badge */
.hw-badge {
  font-size: 14px;
  font-weight: 800;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #1c0a00;
  border-radius: 999px;
  padding: 5px 16px;
  box-shadow: 0 4px 12px rgba(245,158,11,.4);
}

/* ─────────────────────────────────────────────────────────────
   PLAYING CARDS
───────────────────────────────────────────────────────────── */
.card {
  width: 64px;
  height: 88px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--r-sm);
  box-shadow: 0 2px 6px rgba(0,0,0,.28);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4px 5px;
  position: relative;
  user-select: none;
  overflow: hidden;
  transition: transform .12s ease, box-shadow .12s ease;
}

.card-red  { color: var(--card-red); }
.card-black { color: var(--card-black); }

.card-corner {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.card-tl { align-items: flex-start; }
.card-br { align-items: flex-end; transform: rotate(180deg); }

.card-rank    { font-size: 15px; font-weight: 800; }
.card-suit-sm { font-size: 12px; }

.card-center-sym {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  pointer-events: none;
}

/* States */
.card.card-winner { box-shadow: 0 0 0 2px var(--gold) inset, 0 4px 14px rgba(0,0,0,.5); }
.card.card-side-contract { background: linear-gradient(160deg,#f0fff4,#d1fae5); border-color: #86efac; }
.card.card-side-defend   { background: linear-gradient(160deg,#eff6ff,#dbeafe); border-color: #93c5fd; }
.card.card-side-misere   { background: linear-gradient(160deg,#fff7ed,#fed7aa); border-color: #fca76b; }

/* Small card variant (last trick) */
.card.card-sm {
  width: 42px;
  height: 58px;
}
.card.card-sm .card-rank { font-size: 12px; }
.card.card-sm .card-suit-sm { font-size: 9px; }
.card.card-sm .card-center-sym { font-size: 18px; }
.card.card-sm.card-winner { box-shadow: 0 0 0 2px var(--gold) inset; }

/* ─────────────────────────────────────────────────────────────
   PLAYER'S HAND
───────────────────────────────────────────────────────────── */
.hand-section {
  padding: 10px 14px 6px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.hand-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--txt-muted);
  margin-bottom: 8px;
}

.player-hand {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 78px;
  align-items: flex-end;
}

/* Hand cards: larger + interactive */
.player-hand .card {
  width: 64px;
  height: 90px;
  cursor: default;
}
.player-hand .card .card-rank { font-size: 16px; }
.player-hand .card .card-suit-sm { font-size: 12px; }
.player-hand .card .card-center-sym { font-size: 28px; }

.player-hand .card.card-playable {
  cursor: pointer;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(240,180,41,.5), 0 4px 12px rgba(0,0,0,.5);
  transform: translateY(-6px);
}
.player-hand .card.card-playable:hover {
  transform: translateY(-14px);
  box-shadow: 0 0 0 2px var(--gold), 0 10px 24px rgba(0,0,0,.6);
}

/* ─────────────────────────────────────────────────────────────
   ACTION / BID SECTION
───────────────────────────────────────────────────────────── */
.action-section {
  padding: 8px 14px 14px;
  background: var(--bg);
}

.action-inner { display: flex; flex-direction: column; gap: 10px; }

.action-hint {
  font-size: 13px;
  color: var(--txt-muted);
  font-style: italic;
}

.bid-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bid-group-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--txt-dim);
}
.bid-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.suit-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.auction-turn-note {
  margin: -2px 2px 2px;
  font-size: 12px;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: rgba(253, 230, 138, 0.9);
}

.suit-action-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: var(--r-md);
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}

.suit-action-card-red {
  border: 1px solid rgba(185,28,28,.22);
  background: linear-gradient(180deg, #fff7f7 0%, #ffe4e6 100%);
}

.suit-action-card-black {
  border: 1px solid rgba(17,24,39,.18);
  background: linear-gradient(180deg, #f8fafc 0%, #e5e7eb 100%);
}

.suit-action-card-focus {
  border-color: rgba(240,180,41,.75);
  box-shadow: 0 0 0 2px rgba(240,180,41,.22), 0 10px 24px rgba(240,180,41,.14);
  animation: suit-card-focus-pulse 1.3s ease-in-out infinite alternate;
}

.suit-action-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.suit-action-mark {
  font-size: 1.2rem;
  line-height: 1;
}

.suit-action-mark-red { color: var(--card-red); }
.suit-action-mark-black { color: var(--card-black); }

.suit-action-name {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .7px;
}

.suit-action-card-red .suit-action-name {
  color: #7f1d1d;
}

.suit-action-card-black .suit-action-name {
  color: #111827;
}

.suit-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

@keyframes suit-card-focus-pulse {
  from {
    transform: translateY(0);
    box-shadow: 0 0 0 2px rgba(240,180,41,.18), 0 10px 20px rgba(240,180,41,.10);
  }
  to {
    transform: translateY(-1px);
    box-shadow: 0 0 0 2px rgba(240,180,41,.34), 0 14px 28px rgba(240,180,41,.18);
  }
}

@media (max-width: 720px) {
  .suit-action-grid {
    grid-template-columns: 1fr;
  }
}

.bid-btn {
  min-height: 42px;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: filter .12s, transform .1s;
  white-space: nowrap;
}
.bid-btn:hover:not(:disabled) { filter: brightness(0.93); transform: translateY(-1px); }
.bid-btn:disabled { opacity: .4; cursor: not-allowed; }

.bid-btn-subtle {
  background: rgba(255,255,255,.75);
  border-style: dashed;
  color: #374151;
  font-weight: 600;
}

.bid-btn-suit-mark {
  display: inline-block;
  font-size: 1.34em;
  line-height: 0.9;
  font-weight: 900;
  vertical-align: -0.08em;
  margin: 0 0.04em;
}

/* Tone variants — white background, colored text/border */
.bid-tone-neutral { background: #fff; color: #374151; border-color: #9ca3af; }
.bid-tone-red     { background: #fff; color: #b91c1c; border-color: #dc2626; }
.bid-tone-black   { background: #fff; color: #111827; border-color: #374151; }
.bid-tone-pass    { background: #fff; color: #6b7280; border-color: #d1d5db; font-weight: 600; }
.bid-tone-misery  { background: #fff; color: #5b21b6; border-color: #7c3aed; }
.bid-tone-special { background: #fff; color: #b45309; border-color: #d97706; }

/* Illegal-but-visible proposal buttons */
.bid-btn.bid-unavail {
  opacity: .45;
  cursor: not-allowed;
}

/* ─────────────────────────────────────────────────────────────
   AUCTION ROW (shared: strip + sidebar)
───────────────────────────────────────────────────────────── */
.ac-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: var(--r-sm);
  font-size: 13px;
}

.ac-row-highlight {
  background: rgba(240,180,41,.12);
  border: 1px solid rgba(240,180,41,.3);
}

.ac-row-you {
  background: rgba(31,111,235,.08);
  border: 1px solid rgba(31,111,235,.2);
}

.ac-row-dim {
  opacity: .55;
}

.ac-row-you-turn {
  background: rgba(58,191,86,.12);
  border: 1px dashed rgba(58,191,86,.4);
  font-size: 12px;
  font-weight: 700;
  color: #3fb950;
  padding: 5px 8px;
  border-radius: var(--r-sm);
}

.ac-seat {
  font-size: 12px;
  font-weight: 700;
  color: var(--txt-muted);
  min-width: 90px;
  white-space: nowrap;
}

.ac-arrow {
  color: var(--txt-dim);
  font-size: 11px;
}

.ac-action {
  font-weight: 700;
  font-size: 13px;
}

.ac-action.ac-tone-pass    { color: var(--txt-dim); }
.ac-action.ac-tone-red     { color: #f87171; }
.ac-action.ac-tone-black   { color: #cbd5e1; }
.ac-action.ac-tone-misery  { color: #a78bfa; }
.ac-action.ac-tone-special { color: #fbbf24; }
.ac-action.ac-tone-neutral { color: var(--txt); }

.ac-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  background: var(--gold);
  color: #1c0a00;
  border-radius: 999px;
  padding: 1px 7px;
}

.ac-separator {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--gold);
  padding: 4px 8px 2px;
  border-top: 1px solid rgba(240,180,41,.25);
  margin-top: 4px;
}

/* ─────────────────────────────────────────────────────────────
   AUCTION SIDEBAR META
───────────────────────────────────────────────────────────── */
.auc-suit-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.auc-suit-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: default;
  white-space: nowrap;
}

.auc-suit-free {
  background: rgba(58,191,86,.12);
  border-color: rgba(58,191,86,.3);
  color: #3fb950;
}

.auc-suit-blocked {
  background: rgba(248,81,73,.1);
  border-color: rgba(248,81,73,.3);
  color: #f85149;
  text-decoration: line-through;
}

/* Bidding-round chip in the top chips bar */
.chip-round   { font-weight: 700; letter-spacing: .03em; }
.chip-round-1 { background: #1f3a5f; border-color: #2d6ac0; color: #90c8ff; }
.chip-round-2 { background: #4a2c00; border-color: #c47800; color: #ffd27a; }
.chip-round-3 { background: #4a0d0d; border-color: #c23b22; color: #ffaaaa; }

/* Round badge inside the auction panel */
.auc-round-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.auc-round-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  border: 1px solid transparent;
}
.auc-round-1 { background: #1f3a5f; border-color: #2d6ac0; color: #90c8ff; }
.auc-round-2 { background: #4a2c00; border-color: #c47800; color: #ffd27a; }
.auc-round-3 { background: #4a0d0d; border-color: #c23b22; color: #ffaaaa; }

/* Progress pips */
.auc-round-pips { display: flex; gap: 5px; }
.auc-pip {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
}
.auc-pip-active { background: var(--gold); border-color: var(--gold-light); }

.auc-info-line {
  font-size: 11px;
  color: var(--txt-dim);
  line-height: 1.5;
  margin-bottom: 10px;
}

.auction-log {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 260px;
  overflow-y: auto;
}

/* ─────────────────────────────────────────────────────────────
   CARD SLIDE-IN ANIMATIONS
───────────────────────────────────────────────────────────── */
@keyframes card-in-north {
  from { opacity:0; transform:translateY(-18px) scale(.9); }
  to   { opacity:1; transform:none; }
}
@keyframes card-in-south {
  from { opacity:0; transform:translateY(18px) scale(.9); }
  to   { opacity:1; transform:none; }
}
@keyframes card-in-west {
  from { opacity:0; transform:translateX(-18px) scale(.9); }
  to   { opacity:1; transform:none; }
}
@keyframes card-in-east {
  from { opacity:0; transform:translateX(18px) scale(.9); }
  to   { opacity:1; transform:none; }
}
.anim-north { animation: card-in-north .32s ease-out both; }
.anim-south { animation: card-in-south .32s ease-out both; }
.anim-west  { animation: card-in-west  .32s ease-out both; }
.anim-east  { animation: card-in-east  .32s ease-out both; }

/* ─────────────────────────────────────────────────────────────
   GAME LOG
───────────────────────────────────────────────────────────── */
.dev-only { display: none; }
body.dev-mode .dev-only { display: revert; }

.log-details {
  border-top: 1px solid var(--border);
  padding: 8px 14px;
  background: var(--bg);
}
.log-details summary {
  font-size: 12px;
  color: var(--txt-muted);
  font-weight: 600;
}
.game-log {
  margin-top: 8px;
  font-size: 11px;
  color: var(--txt-dim);
  white-space: pre-wrap;
  max-height: 200px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 8px;
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE — TABLET (≤ 1024px)
───────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }
  .replay-grid {
    grid-template-columns: 1fr;
  }
  .replay-watch-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .replay-panels {
    grid-template-columns: 1fr;
  }
  .dash-hero {
    grid-column: 1 / -1;
  }
  .trust-strip {
    grid-template-columns: 1fr;
  }
  .game-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "table"
      "left"
      "right";
  }
  .left-panel  { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .right-panel { padding-top: 0; }

  .api-field input { width: 130px; }

  .felt-table {
    grid-template-columns: 148px 1fr 148px;
    grid-template-rows: 104px 1fr 104px;
  }
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE — TABLET PORTRAIT PLAY (≤ 1024px)
───────────────────────────────────────────────────────────── */
@media (max-width: 1024px) and (orientation: portrait) {
  #playView.is-play-phase {
    display: flex;
    flex-direction: column;
  }

  #playView.is-play-phase .game-grid {
    display: contents;
  }

  #playView.is-play-phase .table-section {
    order: 1;
    width: 100%;
    padding: 4px 10px 0;
  }

  #playView.is-play-phase .hand-section {
    order: 2;
    padding: 10px 12px 4px;
  }

  #playView.is-play-phase .action-section {
    order: 3;
    padding: 8px 12px 12px;
  }

  #playView.is-play-phase .left-panel,
  #playView.is-play-phase .right-panel {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0 12px;
  }

  #playView.is-play-phase .right-panel { order: 5; }
  #playView.is-play-phase .left-panel { order: 6; }
  #playView.is-play-phase .right-panel {
    padding-bottom: 14px;
  }

  #playView.is-play-phase .left-panel > .panel-box,
  #playView.is-play-phase .right-panel > .panel-box {
    flex: 1 1 280px;
    padding: 11px 12px;
  }

  #playView.is-play-phase .right-panel > .table-command-bar {
    flex: 1 1 100%;
  }

  #playView.is-play-phase .panel-title {
    margin-bottom: 8px;
  }

  #playView.is-play-phase .model-insights-panel {
    min-width: min(100%, 340px);
  }
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE — MOBILE (≤ 640px)
───────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  #topbar { padding: 6px 10px; gap: 8px; }
  .brand-name { font-size: 16px; }
  .topbar-center { display: none; }
  .topbar-right { gap: 8px; }
  .topbar-signout { order: 2; }
  .user-badge { order: 3; }
  .api-field { display: none; }
  .app-nav {
    padding: 4px 10px 7px;
    overflow-x: auto;
  }
  .app-nav-btn {
    padding: 5px 8px;
    font-size: 12px;
  }
  .home-view { padding: 12px 10px 16px; }
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .replay-grid {
    padding: 10px;
    gap: 10px;
  }
  .dash-metric-grid {
    grid-template-columns: 1fr;
  }
  .trust-strip {
    padding: 6px 10px 4px;
  }
  .model-insights-panel { padding: 10px; }
  .model-insight-teaser { grid-template-columns: 1fr; }
  .model-insight-teaser-graphic { min-height: 72px; }
  .clubs-directory-toolbar {
    margin: 10px 0 12px;
  }
  .seat-label { font-size: 11px; }
  .seat-label select { padding: 4px 6px; }
  .btn-new, .btn-next { padding: 6px 10px; font-size: 12px; }
  .table-command-bar {
    justify-content: flex-start;
    gap: 6px;
  }
  .table-command-bar .btn-new,
  .table-command-bar .btn-next,
  .table-command-bar .focus-exit-btn {
    flex: 1 1 120px;
  }

  .chips-bar { padding: 6px 10px; }
  .chip { font-size: 11px; padding: 3px 9px; }
  .play-tournament-banner { margin: 8px 10px 0; padding: 12px; }
  .play-takeover-notice { margin: 8px 10px 0; padding: 12px; }
  .play-tourn-shell { flex-direction: column; }
  .play-tourn-actions { width: 100%; }
  .play-tourn-btn { width: 100%; justify-content: center; }
  .guest-signup-card {
    padding: 28px 18px 20px;
  }
  .guest-signup-suits {
    display: none;
  }
  .guest-badge-popup {
    display: none !important;
  }

  /* ── Mobile play layout: table → hand → action → scores ── */
  #playView { display: flex; flex-direction: column; }
  #playChrome { order: 0; }
  #playView.is-play-phase .game-grid,
  #playView .game-grid {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 8px;
    min-height: auto;
    overflow: visible;
    padding: 0;
  }
  #playView.is-play-phase .table-section,
  #playView .table-section {
    order: 1;
    display: block;
    flex: 0 0 auto;
    width: 100%;
    min-height: calc(340px + 16px);
    padding: 4px 10px 12px;
  }
  #playView.is-play-phase .hand-section,
  #playView .hand-section {
    order: 2;
    padding: 8px 10px 4px;
    position: relative;
    z-index: 1;
  }
  #playView.is-play-phase .action-section,
  #playView .action-section {
    order: 3;
    padding: 8px 10px 10px;
  }
  .log-details { order: 7; }
  #postHandOverlay { order: 8; }

  #playView.is-play-phase .right-panel,
  #playView.is-play-phase .left-panel,
  #playView .right-panel,
  #playView .left-panel {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 10px;
    width: 100%;
  }
  #playView.is-play-phase .right-panel,
  #playView .right-panel {
    order: 5;
    padding: 8px 10px 0;
  }
  #playView.is-play-phase .left-panel,
  #playView .left-panel {
    order: 6;
    padding: 10px 10px 4px;
  }
  #playView.is-play-phase .right-panel > .table-command-bar,
  #playView.is-play-phase .right-panel > .panel-box,
  #playView.is-play-phase .left-panel > .panel-box,
  #playView .right-panel > .table-command-bar,
  #playView .right-panel > .panel-box,
  #playView .left-panel > .panel-box {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
  }
  #playView .table-command-bar {
    align-items: stretch;
  }

  .felt-table {
    grid-template-areas:
      "north north north"
      "west trick east"
      "south south south";
    grid-template-columns: minmax(78px, 1fr) minmax(96px, 124px) minmax(78px, 1fr);
    grid-template-rows: auto minmax(132px, 1fr) auto;
    height: auto;
    min-height: 340px;
    width: 100%;
    padding: 10px;
    gap: 8px;
  }

  .seat-panel {
    min-width: 0;
    padding: 7px 8px;
  }
  .seat-north,
  .seat-south {
    width: min(100%, 148px);
  }
  .seat-north {
    justify-self: start;
    align-self: start;
  }
  .seat-south {
    justify-self: end;
    align-self: end;
  }
  .seat-west {
    justify-self: start;
    width: 96px;
  }
  .seat-east {
    justify-self: end;
    width: 96px;
  }
  .seat-name { font-size: 11px; }
  .seat-stats { font-size: 10px; }

  .trick-zone {
    justify-content: center;
    min-width: 0;
    padding-top: 0;
    gap: 6px;
  }
  .trick-compass {
    margin-top: 0;
  }
  .contract-badge {
    order: -1;
    position: static;
    max-width: 100%;
    padding: 3px 8px;
    font-size: 11px;
    white-space: normal;
    line-height: 1.15;
    transform: none;
  }

  .trick-slot { width: 46px; height: 64px; }
  .card { width: 46px; height: 64px; }
  .card .card-rank { font-size: 12px; }
  .card .card-suit-sm { font-size: 9px; }
  .card .card-center-sym { font-size: 19px; }

  .player-hand {
    flex-wrap: nowrap;
    gap: 8px;
    min-height: 0;
    overflow-x: auto;
    overflow-y: visible;
    padding-top: 4px;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 10px;
  }
  .player-hand .card {
    flex: 0 0 auto;
    width: 50px;
    height: 72px;
    scroll-snap-align: start;
  }
  .player-hand .card .card-rank { font-size: 13px; }
  .player-hand .card .card-suit-sm { font-size: 10px; }
  .player-hand .card .card-center-sym { font-size: 22px; }
  .player-hand .card.card-playable {
    transform: none;
  }
  .player-hand .card.card-playable:hover {
    transform: none;
  }

  .replay-pre { min-height: 180px; }

  .bid-btn { min-height: 40px; padding: 10px 13px; font-size: 13px; }
  .bid-btn-suit-mark { font-size: 1.26em; }

  .panel-box {
    padding: 10px 12px;
  }
  .score-row {
    align-items: flex-start;
    gap: 8px;
  }
  .score-row .sr-label {
    flex: 1;
    min-width: 0;
  }
  .score-row .sr-val {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    text-align: right;
  }
  .score-sub {
    display: block;
    margin-left: 0;
  }
  .mini-trick-area {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .ac-seat {
    min-width: 0;
  }

  .user-name { display: none; }
}

@media (max-height: 500px) and (orientation: landscape) {
  #playView .right-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    padding: 8px 10px 0;
  }

  #playView .right-panel > .table-command-bar,
  #playView .right-panel > .panel-box {
    width: 100%;
    min-width: 0;
  }
}

/* ─────────────────────────────────────────────────────────────
   SCROLLBAR STYLE (Webkit)
───────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--txt-dim); }

/* ── Badge Toast ─────────────────────────────────────────────── */
.badge-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--surface2);
  border: 1px solid var(--gold);
  border-radius: var(--r-lg);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 9999;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  animation: toastIn 0.3s ease;
  max-width: 280px;
}
.badge-toast-hide { animation: toastOut 0.4s ease forwards; }
@keyframes toastIn  { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastOut { to   { transform: translateY(20px); opacity: 0; } }
.badge-toast-icon  { font-size: 2rem; line-height: 1; }
.badge-toast-title { font-size: 0.7rem; color: var(--gold); text-transform: uppercase; letter-spacing: 0.06em; }
.badge-toast-name  { font-size: 0.95rem; font-weight: 600; color: var(--txt); }
.badge-toast-copy  { font-size: 0.78rem; color: var(--txt-muted); margin-top: 4px; line-height: 1.35; }

/* ── Post-Hand Modal ─────────────────────────────────────────── */
.post-hand-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center; z-index: 8000;
}
.post-hand-modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 28px 32px; min-width: 280px; max-width: 380px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.phm-title    { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; color: var(--txt); }
.phm-contract { font-size: 0.85rem; color: var(--txt-muted); margin-bottom: 16px; }
.phm-scores { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.phm-score-row { display: flex; justify-content: space-between; font-size: 0.9rem; color: var(--txt-muted); }
.phm-me     { color: var(--txt); font-weight: 600; }
.phm-pos    { color: #4caf50; }
.phm-neg    { color: #e05c5c; }
.phm-actions { display: flex; gap: 10px; justify-content: flex-end; }
.phm-btn-primary   { background: var(--green-btn); color: #fff; border: none; border-radius: var(--r-md); padding: 8px 18px; cursor: pointer; font-weight: 600; }
.phm-btn-secondary { background: transparent; color: var(--txt-muted); border: 1px solid var(--border); border-radius: var(--r-md); padding: 8px 14px; cursor: pointer; }
.phm-btn-primary:hover   { background: var(--green-hover); }
.phm-btn-secondary:hover { border-color: var(--txt-muted); color: var(--txt); }

/* ── Badge Gallery Card ──────────────────────────────────────── */
.badge-card       { }
.badge-gallery    { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.badge-icon       { font-size: 1.5rem; cursor: default; }
.badge-more       { font-size: 0.85rem; color: var(--txt-muted); align-self: center; }
.badge-count      { background: var(--gold); color: #000; border-radius: 99px; padding: 1px 7px; font-size: 0.75rem; font-weight: 700; margin-left: 6px; }
.badge-see-all-btn { background: none; border: none; color: var(--gold); cursor: pointer; font-size: 0.85rem; padding: 2px 0; }

/* ── Badge Gallery Modal ─────────────────────────────────────── */
.badge-gallery-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.65);
  display: flex; align-items: center; justify-content: center; z-index: 8500;
}
.badge-gallery-modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 0; width: min(90vw, 560px); max-height: 80vh;
  display: flex; flex-direction: column; overflow: hidden;
}
.bgm-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid var(--border); font-weight: 700;
}
.bgm-header button { background: none; border: none; color: var(--txt-muted); cursor: pointer; font-size: 1.1rem; }
.bgm-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 12px; padding: 20px; overflow-y: auto;
}
.bgm-badge  { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.bgm-icon   { font-size: 2rem; line-height: 1; }
.bgm-name   { font-size: 0.7rem; color: var(--txt-muted); line-height: 1.2; }
.bgm-prog   { font-size: 0.65rem; color: var(--txt-dim); }
.bgm-earned .bgm-icon { filter: none; }
.bgm-locked .bgm-icon { filter: grayscale(1) opacity(0.4); }
.bgm-secret .bgm-icon { font-size: 1.8rem; color: var(--txt-dim); }
.bgm-secret .bgm-name { color: var(--txt-dim); }

/* ── Tournament Lobby ────────────────────────────────────────── */
#tournamentLobbyCard { }
.tourn-tile {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 12px 14px; margin-bottom: 10px;
}
.tourn-tile-header { display: flex; justify-content: space-between; margin-bottom: 6px; }
.tourn-kind   { font-weight: 600; font-size: 0.9rem; }
.tourn-status { font-size: 0.78rem; color: var(--txt-muted); }
.tourn-tile-body { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.tourn-players   { font-size: 0.82rem; color: var(--txt-muted); }
.tourn-countdown { font-size: 0.85rem; color: var(--gold); font-variant-numeric: tabular-nums; }
.tourn-tile-footer { display: flex; justify-content: flex-end; gap: 8px; }
.tourn-tile-tagline { font-size: 0.8rem; color: var(--txt-muted); margin-bottom: 10px; line-height: 1.4; }
.tourn-btn { border: none; border-radius: var(--r-sm); padding: 5px 14px; font-size: 0.82rem; cursor: pointer; font-weight: 600; }
.tourn-join  { background: var(--green-btn); color: #fff; }
.tourn-join:hover { background: var(--green-hover); }
.tourn-join:disabled { opacity: 0.45; cursor: not-allowed; }
.tourn-leave { background: transparent; color: var(--txt-muted); border: 1px solid var(--border); }
.tourn-active-label { font-size: 0.8rem; color: #4caf50; font-weight: 600; }
.tourn-player-status {
  margin-top: 8px;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.03);
  color: var(--txt-muted);
  font-size: 0.82rem;
  line-height: 1.4;
}
.tourn-player-status.is-success {
  border-color: rgba(63,185,80,.32);
  background: rgba(63,185,80,.1);
  color: #9be9a8;
}
.tourn-player-status.is-warning {
  border-color: rgba(240,180,41,.35);
  background: rgba(240,180,41,.09);
  color: var(--gold);
}
.tourn-player-status.is-info {
  border-color: rgba(31,111,235,.34);
  background: rgba(31,111,235,.1);
  color: #a9c8ff;
}

/* ── Tournament Banner (in-game) ─────────────────────────────── */
.tournament-banner {
  background: rgba(0,0,0,0.35); border-bottom: 1px solid var(--gold);
  padding: 6px 16px; font-size: 0.85rem; color: var(--gold); text-align: center;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
}

/* ── Action Timer ────────────────────────────────────────────── */
.action-timer {
  font-size: 0.85rem; color: var(--txt-muted);
  text-align: right; padding: 2px 6px; font-variant-numeric: tabular-nums;
}
.action-timer-urgent { color: #e05c5c; font-weight: 700; }

/* ── Tournament View (dedicated tab) ─────────────────────────── */
.tournament-view { padding: 16px; }
.tourn-view-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}
@media (max-width: 640px) { .tourn-view-grid { grid-template-columns: 1fr; } }
.tourn-result-item {
  width: 100%;
  padding: 14px 0 16px;
  border-bottom: 1px solid var(--border);
  background: transparent;
  border-left: none;
  border-right: none;
  border-top: none;
  text-align: left;
  transition: transform .12s ease, background .12s ease;
}
.tourn-result-item:hover { background: rgba(255,255,255,.02); transform: translateY(-1px); }
.tourn-result-item.is-participated { background: rgba(31,111,235,.06); }
.tourn-result-item:last-child { border-bottom: none; }
.tourn-result-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--txt);
  line-height: 1.3;
}
.tourn-result-meta {
  margin-top: 8px;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tourn-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  padding-left: 18px;
}
.tourn-result-action {
  min-width: 120px;
}
.tourn-result-pill {
  display: inline-flex;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(31,111,235,.18);
  border: 1px solid rgba(31,111,235,.28);
  color: var(--txt);
  font-size: 0.76rem;
  font-weight: 700;
}
.tourn-result-line {
  font-size: 0.88rem;
  color: var(--txt-muted);
}
.tourn-result-label {
  display: inline-block;
  min-width: 88px;
  color: var(--txt-dim);
}
.tourn-result-value {
  color: var(--txt);
}
.tourn-winner { color: var(--gold); font-weight: 600; }
.tourn-result-link {
  margin-top: 4px;
  color: var(--gold);
  font-size: 0.84rem;
  font-weight: 700;
}
.tourn-share-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tourn-share-copy {
  color: var(--txt-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ── Replay access button (in Home recent hands card) ─────────── */
.replay-access-btn {
  float: right;
  background: none;
  border: none;
  color: var(--gold);
  cursor: pointer;
  font-size: 0.82rem;
  padding: 0;
  font-weight: 500;
}
.replay-access-btn:hover { text-decoration: underline; }

/* ─── PROFILE VIEW ─── */
.profile-view { padding: 20px 16px; display: flex; flex-direction: column; gap: 16px; max-width: 900px; margin: 0 auto; width: 100%; }
.prof-header { background: linear-gradient(160deg, rgba(22,27,34,.98), rgba(13,17,23,.98)); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.prof-avatar-block { display: flex; align-items: center; gap: 16px; }
.prof-avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--surface2); object-fit: cover; }
.prof-name { font-size: 1.3rem; font-weight: 800; }
.prof-plan { font-size: 12px; color: var(--gold); text-transform: uppercase; letter-spacing: .7px; font-weight: 700; margin-top: 2px; }
.prof-stats-row { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 16px; }
.prof-stat { display: flex; flex-direction: column; gap: 4px; }
.prof-stat-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; color: var(--txt-dim); }
.prof-stat strong { font-size: 1.2rem; }
.prof-sparkline-wrap { margin-left: auto; }
.prof-sparkline { display: block; }
.prof-badge-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 12px; padding: 8px 0; }
.prof-badge-cell { display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; padding: 10px 6px; border-radius: var(--r-md); background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.04); cursor: default; transition: border-color .15s; }
.prof-badge-cell.is-earned { border-color: rgba(240,180,41,.3); background: rgba(240,180,41,.05); }
.prof-badge-cell.is-locked .prof-badge-icon { filter: grayscale(1) opacity(.3); }
.prof-badge-icon { font-size: 2rem; line-height: 1; }
.prof-badge-name { font-size: 0.62rem; color: var(--txt-muted); line-height: 1.2; }
.prof-badge-cell.is-earned .prof-badge-name { color: var(--txt); }
.prof-history-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }
.prof-filter-row { display: flex; gap: 6px; }
.prof-filter-btn { padding: 5px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--txt-muted); font-size: 12px; font-weight: 700; cursor: pointer; }
.prof-filter-btn.is-active { background: rgba(240,180,41,.15); border-color: rgba(240,180,41,.5); color: var(--txt); }
.prof-timeline { display: flex; flex-direction: column; gap: 8px; }
.prof-timeline-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.05); cursor: pointer; transition: border-color .15s; }
.prof-timeline-row:hover { border-color: rgba(240,180,41,.3); }
.prof-tl-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.prof-tl-dot.won { background: #3fb950; }
.prof-tl-dot.lost { background: #f85149; }
.prof-tl-dot.neutral { background: var(--txt-dim); }
.prof-tl-contract { flex: 1; font-weight: 600; font-size: 0.9rem; }
.prof-tl-meta { font-size: 12px; color: var(--txt-dim); white-space: nowrap; }
.prof-tl-score { font-weight: 700; font-size: 0.95rem; white-space: nowrap; margin-left: 8px; }

/* ─── ADMIN VIEW ─── */
.admin-view { padding: 20px 16px 36px; display: flex; flex-direction: column; gap: 16px; max-width: 1240px; margin: 0 auto; width: 100%; }
.admin-header,
.admin-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.admin-title,
.admin-detail-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.02em;
}
.admin-toolbar,
.admin-window-toggle,
.admin-search-row,
.admin-pager {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.admin-window-btn.is-active {
  border-color: rgba(240,180,41,.55);
  background: rgba(240,180,41,.12);
  color: var(--txt);
}
.admin-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.admin-overview-card,
.admin-metric-card {
  padding: 14px;
  border-radius: var(--r-lg);
  border: 1px solid rgba(255,255,255,.06);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
}
.admin-overview-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--txt-dim);
}
.admin-overview-value {
  margin-top: 8px;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  color: var(--txt);
}
.admin-overview-meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--txt-dim);
}
.admin-elo-card {
  padding: 14px;
  border-radius: var(--r-lg);
  border: 1px solid rgba(240,180,41,.14);
  background:
    radial-gradient(circle at top right, rgba(240,180,41,.10), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.02));
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.admin-elo-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.admin-elo-chart {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.admin-elo-chart-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.admin-elo-legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.admin-elo-legend-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: var(--r-md);
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.03);
  min-width: 0;
}
.admin-elo-legend-item.is-empty {
  opacity: .72;
}
.admin-elo-legend-swatch {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 999px;
  flex: 0 0 auto;
  background: var(--admin-elo-series-color);
  box-shadow: 0 0 0 3px rgba(255,255,255,.04);
}
.admin-elo-legend-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.admin-elo-legend-text strong {
  color: var(--txt);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .03em;
}
.admin-elo-legend-text span {
  color: var(--txt-dim);
  font-size: 12px;
  line-height: 1.35;
}
.admin-elo-chart-frame {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}
.admin-elo-axis {
  height: 208px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px 0 28px;
  color: var(--txt-dim);
  font-size: 11px;
  font-weight: 700;
  text-align: right;
}
.admin-elo-bars-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
}
.admin-elo-bars {
  display: grid;
  grid-auto-flow: column;
  gap: 8px;
  align-items: end;
  min-width: max-content;
}
.admin-elo-bin {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: 48px;
  flex: 0 0 auto;
  text-align: center;
  color: var(--txt-dim);
}
.admin-elo-bin-stack {
  height: 180px;
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-start;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.06);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.admin-elo-segment {
  display: block;
  width: 100%;
  min-height: 2px;
  background: var(--admin-elo-series-color);
}
.admin-elo-segment.is-empty {
  background: transparent;
  min-height: 0;
}
.admin-elo-bin-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--txt-dim);
  font-variant-numeric: tabular-nums;
}
.admin-elo-note {
  font-size: 12px;
  color: var(--txt-dim);
  line-height: 1.45;
}
.admin-main-grid {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 14px;
}
.admin-subsection {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}
.admin-subtitle {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--txt-dim);
}
.admin-disclosure {
  border-top: 1px solid rgba(255,255,255,.06);
  padding-top: 12px;
}
.admin-disclosure summary {
  list-style: none;
}
.admin-disclosure summary::-webkit-details-marker {
  display: none;
}
.admin-disclosure-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}
.admin-disclosure-summary::before {
  content: ">";
  color: var(--txt-dim);
  font-weight: 800;
  margin-right: 8px;
}
.admin-disclosure[open] .admin-disclosure-summary::before {
  content: "v";
}
.admin-disclosure-summary .admin-subtitle {
  flex: 1;
}
.admin-disclosure-meta {
  font-size: 12px;
  color: var(--txt-dim);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}
.admin-disclosure-status {
  margin-top: 10px;
}
.admin-disclosure .entity-list {
  margin-top: 10px;
}
.admin-user-row,
.admin-compact-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: var(--r-md);
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.03);
  color: var(--txt-muted);
  text-align: left;
  cursor: pointer;
}
.admin-user-row:hover,
.admin-compact-row:hover {
  border-color: rgba(240,180,41,.35);
}
.admin-user-row.is-selected {
  border-color: rgba(31,111,235,.45);
  background: rgba(31,111,235,.08);
}
.admin-user-row span,
.admin-compact-row span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.admin-user-row strong,
.admin-compact-row strong {
  color: var(--txt);
}
.admin-user-row small,
.admin-compact-row small {
  color: var(--txt-dim);
  font-size: 12px;
}
.admin-request-card {
  gap: 8px;
}
.admin-request-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.admin-request-topline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-request-time {
  font-size: 12px;
  color: var(--txt-dim);
  font-weight: 600;
  white-space: nowrap;
}
.admin-request-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(240,180,41,.25);
  background: rgba(240,180,41,.08);
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.admin-request-pill.is-success {
  border-color: rgba(63,185,80,.28);
  background: rgba(63,185,80,.10);
  color: #8fe7a7;
}
.admin-request-match {
  color: var(--txt);
  font-size: 13px;
  line-height: 1.45;
}
.admin-request-note {
  line-height: 1.45;
}
.admin-request-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.admin-request-btn {
  width: auto;
}
.admin-detail-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-bot-runtime-panel {
  padding: 14px;
  border-radius: var(--r-lg);
  border: 1px solid rgba(240,180,41,.16);
  background: rgba(240,180,41,.06);
}

.admin-membership-panel {
  padding: 14px;
  border-radius: var(--r-lg);
  border: 1px solid rgba(35,134,54,.18);
  background: rgba(35,134,54,.08);
}

.admin-bot-runtime-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.admin-membership-grid {
  grid-template-columns: minmax(0, 3fr) minmax(180px, 1fr);
}

.admin-membership-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.admin-membership-btn {
  width: auto;
}

.admin-bot-runtime-grid .btn-secondary {
  width: 100%;
}

.admin-detail-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.admin-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.admin-detail-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 160px;
}
.admin-badge-card .entity-row {
  padding: 0;
  background: transparent;
  border: none;
}

@media (max-width: 920px) {
  .admin-overview-grid,
  .admin-detail-metrics,
  .admin-detail-grid,
  .admin-main-grid,
  .admin-bot-runtime-grid,
  .admin-membership-grid {
    grid-template-columns: 1fr;
  }
  .admin-elo-legend {
    grid-template-columns: 1fr;
  }
  .admin-elo-chart-frame {
    grid-template-columns: 1fr;
  }
  .admin-elo-axis {
    height: auto;
    flex-direction: row;
    justify-content: space-between;
    padding: 0 4px;
    text-align: left;
  }
  .admin-request-head {
    flex-direction: column;
  }
  .admin-request-time {
    white-space: normal;
  }
}

/* ─── LEADERBOARD IMPROVEMENTS ─── */
.lb-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.lb-controls { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.lb-scope-row, .lb-period-row { display: flex; gap: 4px; }
.lb-scope-btn, .lb-period-btn { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--txt-muted); font-size: 11px; font-weight: 700; cursor: pointer; }
.lb-scope-btn.is-active, .lb-period-btn.is-active { background: rgba(240,180,41,.15); border-color: rgba(240,180,41,.5); color: var(--txt); }
.lb-podium { display: flex; gap: 10px; justify-content: center; align-items: flex-end; margin-bottom: 16px; padding: 12px 0; flex-wrap: wrap; }
.lb-podium-place { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 14px; border-radius: var(--r-lg); background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.05); min-width: 80px; }
.lb-podium-place.rank-1 { border-color: rgba(240,180,41,.5); background: rgba(240,180,41,.08); order: 2; padding: 20px 18px; }
.lb-podium-place.rank-2 { order: 1; }
.lb-podium-place.rank-3 { order: 3; }
.lb-podium-medal { font-size: 1.6rem; }
.lb-podium-name { font-size: 0.8rem; font-weight: 700; text-align: center; }
.lb-podium-score { font-size: 0.75rem; color: var(--txt-muted); }
.lb-your-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r-md); background: rgba(31,111,235,.08); border: 2px solid rgba(31,111,235,.3); margin-bottom: 10px; }
.lb-your-row .lb-rank { font-weight: 800; color: var(--gold); min-width: 28px; }
.lb-your-row .lb-name { flex: 1; font-weight: 700; }
.lb-your-row .lb-score { font-weight: 700; }
.lb-delta { font-size: 11px; font-weight: 700; margin-left: 4px; }
.lb-delta.up { color: #3fb950; }
.lb-delta.down { color: #f85149; }
.lb-delta.flat { color: var(--txt-dim); }

/* ─── CLUB DETAIL ─── */
.clubs-view { position: relative; }
.club-detail-panel { padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.club-detail-header { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; flex-wrap: wrap; }
.club-detail-name { font-size: 1.2rem; font-weight: 800; }
.club-detail-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 0; }
.club-tab-btn { padding: 9px 16px; background: transparent; border: none; border-bottom: 2px solid transparent; color: var(--txt-muted); font-size: 13px; font-weight: 700; cursor: pointer; margin-bottom: -1px; }
.club-tab-btn.is-active { color: var(--txt); border-bottom-color: var(--gold); }
.club-tab-btn:hover:not(.is-active) { color: var(--txt); }
.club-detail-content { display: flex; flex-direction: column; gap: 12px; padding-top: 16px; }
.club-activity-feed { display: flex; flex-direction: column; gap: 8px; }
.club-activity-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 14px; border-radius: var(--r-md); background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.05); }
.club-activity-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); margin-top: 5px; flex-shrink: 0; }
.club-activity-text { flex: 1; font-size: 0.88rem; color: var(--txt-muted); }
.club-activity-time { font-size: 11px; color: var(--txt-dim); white-space: nowrap; }
.club-member-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.05);
}
.club-member-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}
.club-member-name {
  width: 100%;
  font-weight: 700;
  line-height: 1.35;
  min-width: 0;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.club-member-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.club-member-role { font-size: 11px; color: var(--txt-dim); background: rgba(255,255,255,.06); padding: 2px 8px; border-radius: 999px; }
.club-member-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.club-member-actions .btn-primary,
.club-member-actions .btn-secondary {
  min-width: 98px;
}
.club-access-panel,
.club-request-panel,
.club-block-panel {
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.05);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.club-access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}
.club-request-meta {
  font-size: 0.82rem;
  color: var(--txt-dim);
}
.club-request-message {
  font-size: 0.88rem;
  color: var(--txt-muted);
  line-height: 1.45;
}
.club-request-row {
  align-items: start;
}
.club-request-actions {
  padding-top: 2px;
}
@media (max-width: 760px) {
  .club-member-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .club-member-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

/* ─── TOURNAMENT DETAIL ─── */
.tourn-detail-panel { padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.tourn-detail-header { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; flex-wrap: wrap; }
.tourn-detail-title { font-size: 1.1rem; font-weight: 800; }
.tourn-fate-note { margin-top: 10px; font-size: 0.82rem; color: var(--txt-muted); line-height: 1.5; }
.tourn-bracket { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; min-height: 80px; }
.tourn-bracket-round { display: flex; flex-direction: column; gap: 12px; min-width: 140px; flex-shrink: 0; }
.tourn-bracket-round-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; color: var(--txt-dim); margin-bottom: 4px; }
.tourn-bracket-match { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.tourn-bracket-player { display: flex; justify-content: space-between; font-size: 0.85rem; padding: 4px 6px; border-radius: var(--r-sm); }
.tourn-bracket-player.is-winner { background: rgba(240,180,41,.12); color: var(--txt); font-weight: 700; }
.tourn-bracket-player.is-loser { color: var(--txt-dim); }
.tourn-bracket-meta { margin-top: 2px; font-size: 0.75rem; color: var(--txt-muted); }
.tourn-standings { display: flex; flex-direction: column; gap: 6px; }
.tourn-standing-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--r-md); background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.05); font-size: 0.9rem; }
.tourn-standing-row.is-me { border-color: rgba(31,111,235,.3); background: rgba(31,111,235,.06); }
.tourn-standing-rank { font-size: 1rem; font-weight: 800; color: var(--gold); min-width: 28px; }
.tourn-standing-name { flex: 1; font-weight: 600; }
.tourn-standing-score { font-weight: 700; }
.tourn-summary-card { border-color: rgba(240,180,41,.4) !important; }
.tourn-summary-podium { display: flex; gap: 16px; justify-content: center; align-items: flex-end; margin: 20px 0; flex-wrap: wrap; }
.tourn-podium-place { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 20px; border-radius: var(--r-lg); background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); }
.tourn-podium-place.p1 { border-color: rgba(240,180,41,.5); padding: 24px; background: rgba(240,180,41,.08); }
.tourn-podium-place.p2 { border-color: rgba(148,163,184,.3); }
.tourn-podium-place.p3 { border-color: rgba(180,120,70,.3); }
.tourn-podium-medal { font-size: 2rem; }
.tourn-podium-name { font-weight: 700; font-size: 0.9rem; }
.tourn-podium-score { font-size: 0.8rem; color: var(--txt-muted); }

/* ─── FOCUS MODE ─── */
/* Keep the in-game chrome visible so chips, model metadata, and premium
   insights remain accessible during active play. */
#playView.is-focus-mode #topbar { display: none; }
#playView.is-focus-mode .app-nav { display: none; }

/* ─── ACTION TIMER ARC ─── */
.action-timer-arc { position: fixed; bottom: 100px; right: 20px; z-index: 150; }
.action-timer-arc.is-urgent circle.arc-track { stroke: #e05c5c !important; }

/* ─── POST-HAND OVERLAY ─── */
.post-hand-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(13,17,23,.92);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  animation: overlayFadeIn .25s ease;
}
@keyframes overlayFadeIn { from { opacity:0; transform:scale(.97); } to { opacity:1; transform:none; } }
.pho-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 40px 48px;
  min-width: 320px;
  max-width: 460px;
  width: 90vw;
  max-height: calc(100dvh - 48px);
  margin: auto 0;
  overflow-y: auto;
  text-align: center;
  box-shadow: 0 32px 80px rgba(0,0,0,.7);
}
.pho-outcome { font-size: 48px; margin-bottom: 8px; }
.pho-contract { font-size: 1.2rem; font-weight: 800; margin-bottom: 6px; }
.pho-result-line { font-size: 0.9rem; color: var(--txt-muted); margin-bottom: 24px; }
.pho-scores { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.pho-score-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-radius: var(--r-md); background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.05); font-size: 0.95rem; color: var(--txt-muted); }
.pho-score-row.pho-me { background: rgba(31,111,235,.08); border-color: rgba(31,111,235,.25); color: var(--txt); font-weight: 700; }
.pho-pos { color: #3fb950; font-weight: 700; }
.pho-neg { color: #f85149; font-weight: 700; }
.pho-timer-bar { height: 4px; background: var(--border); border-radius: 2px; margin-bottom: 20px; overflow: hidden; }
.pho-timer-fill { height: 100%; background: var(--gold); border-radius: 2px; transition: width 1s linear; }
.pho-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.pho-actions-stack { margin-top: 10px; }
.pho-btn-primary { background: var(--green-btn); color:#fff; border:none; border-radius: var(--r-md); padding:10px 24px; cursor:pointer; font-weight:700; font-size:0.95rem; }
.pho-btn-primary:hover { background: var(--green-hover); }
.pho-btn-secondary { background: transparent; color:var(--txt-muted); border: 1px solid var(--border); border-radius: var(--r-md); padding:10px 16px; cursor:pointer; }
.pho-btn-secondary:hover { color:var(--txt); border-color: var(--txt-muted); }
.pho-btn-secondary:disabled { opacity: .45; cursor: default; }
.pho-card-tournament { max-width: 620px; }
.pho-tourn-kicker {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.pho-tourn-message {
  margin: 12px 0 10px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--txt);
}
.pho-tourn-status {
  min-height: 20px;
  margin-bottom: 14px;
  color: var(--txt-muted);
  font-size: 0.88rem;
}
.pho-tourn-status.is-note { color: #f0b429; }
.pho-tourn-next {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(240,180,41,.22);
  background: rgba(240,180,41,.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pho-tourn-next-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--txt);
}
.pho-tourn-next-copy {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--txt-muted);
}
.pho-tourn-standings {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 18px 0 8px;
}
.pho-share-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}
.pho-share-preview-block {
  margin: 18px 0 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}
.pho-share-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.pho-share-preview-title {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--txt-dim);
}
.pho-share-site-link {
  color: var(--gold);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}
.pho-share-site-link:hover {
  color: #f6cf69;
}
.pho-share-preview-frame {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pho-share-preview-image {
  display: block;
  width: 100%;
  height: auto;
}
.pho-share-preview-loading {
  padding: 24px;
  font-size: 0.88rem;
  color: var(--txt-muted);
  text-align: center;
}
.pho-share-preview-loading.is-error {
  color: #f6c58a;
}

@media (max-width: 640px) {
  .post-hand-overlay {
    padding: 12px;
  }
  .pho-card {
    max-height: calc(100dvh - 24px);
    padding: 28px 20px;
  }
}

/* ═══ PLAY LANDING ═══════════════════════════════════════════════════════════ */
.play-landing {
  padding: 28px 18px 34px;
  display: flex; flex-direction: column; align-items: center; gap: 24px;
  max-width: 1040px; margin: 0 auto; width: 100%;
}
.play-landing-hero {
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding-top: 8px;
}
.landing-profile-box {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 52px;
  min-height: 52px;
  padding: 8px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.02);
  color: var(--txt);
  font-size: 0.98rem;
  font-weight: 900;
  letter-spacing: .04em;
  cursor: pointer;
  transition: transform .12s, border-color .12s, background .12s;
}
.landing-profile-box:hover {
  transform: translateY(-1px);
  border-color: rgba(240,180,41,.28);
  background: rgba(255,255,255,.04);
}
.landing-profile-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
}
.play-landing-title {
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: -1px;
  color: var(--txt);
}
.play-landing-slogan {
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
}
.play-landing-sub { font-size: 1rem; color: var(--txt-muted); max-width: 620px; margin: 0 auto; line-height: 1.55; }
.landing-owner-alert {
  margin: 18px auto 0;
  max-width: 760px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 18px;
  border: 1px solid rgba(240,180,41,.22);
  background: rgba(240,180,41,.06);
  color: var(--txt);
  flex-wrap: wrap;
}
.landing-owner-alert.hidden { display: none; }
.landing-owner-alert-copy {
  font-size: 0.95rem;
  color: var(--txt-muted);
}
.play-landing-links {
  display: flex;
  justify-content: center;
  margin-top: 6px;
}
.play-landing-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(240,180,41,.18);
  background: rgba(240,180,41,.08);
  color: var(--gold);
  font-size: .94rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.play-landing-link:hover {
  border-color: rgba(240,180,41,.34);
  background: rgba(240,180,41,.13);
}
.landing-tab-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.landing-tab-banner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  min-height: 170px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.02);
  color: var(--txt);
  cursor: pointer;
  transition: transform .12s, border-color .12s, background .12s;
}
.landing-tab-banner:hover {
  transform: translateY(-1px);
  border-color: rgba(240,180,41,.22);
  background: rgba(255,255,255,.03);
}
.landing-tab-banner[data-landing-action="play"] .landing-tab-icon {
  background: rgba(240,180,41,.12);
}
.landing-tab-banner[data-landing-action="tournaments"] .landing-tab-icon {
  background: rgba(255,108,55,.12);
}
.landing-tab-banner[data-landing-action="leaderboard"] .landing-tab-icon {
  background: rgba(31,111,235,.12);
}
.landing-tab-banner[data-landing-action="clubs"] .landing-tab-icon {
  background: rgba(63,185,80,.12);
}
.landing-tab-icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  font-size: 1.2rem;
}
.landing-tab-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.landing-tab-title {
  font-size: 1.24rem;
  font-weight: 900;
}
.landing-tab-arrow {
  color: var(--gold);
  font-size: 1rem;
  font-weight: 800;
}
.landing-tab-copy {
  color: var(--txt-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}
.landing-practice-panel {
  width: min(980px, 100%);
  margin: 14px auto 0;
  padding: 22px 24px;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.02);
  transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease;
}
.landing-practice-panel.is-highlight {
  border-color: rgba(240,180,41,.42);
  transform: translateY(-1px);
}
.landing-practice-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.landing-practice-copyblock {
  max-width: 620px;
}
.landing-practice-kicker {
  color: var(--gold);
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.landing-practice-title {
  margin: 0;
  font-size: 1.42rem;
  font-weight: 900;
  line-height: 1.12;
}
.landing-practice-copy {
  margin: 8px 0 0;
  color: var(--txt-muted);
  font-size: 0.96rem;
  line-height: 1.6;
}
.landing-practice-start {
  flex: 0 0 auto;
  white-space: nowrap;
}
.landing-practice-rows {
  display: grid;
  gap: 12px;
}
.practice-bot-row {
  display: grid;
  grid-template-columns: minmax(120px, 152px) minmax(0, 1fr);
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.025);
}
.practice-bot-seat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
.practice-bot-seat-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--txt);
}
.practice-bot-seat-role {
  color: var(--txt-dim);
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.practice-bot-control {
  min-width: 0;
}
.practice-bot-select {
  width: 100%;
  max-width: 280px;
}
.practice-bot-description {
  margin-top: 8px;
  color: var(--txt-muted);
  font-size: .88rem;
  line-height: 1.45;
}
.landing-practice-foot {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}
.practice-locked-head {
  font-size: .76rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 900;
  margin-bottom: 2px;
}
.practice-locked-grid {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}
.practice-locked-chip {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(240,180,41,.2);
  background: rgba(240,180,41,.06);
}
.practice-locked-name {
  font-size: .92rem;
  font-weight: 800;
  color: var(--txt);
}
.practice-locked-meta {
  font-size: .82rem;
  color: var(--txt-muted);
  line-height: 1.4;
}
.practice-locked-note {
  margin-top: 4px;
}
.landing-practice-foot a {
  color: var(--gold);
  font-weight: 700;
}
.landing-practice-foot a:hover {
  color: #f6cf63;
}
.landing-tutorial-panel {
  width: min(980px, 100%);
  margin: 10px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 22px 24px;
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,.10);
  background:
    radial-gradient(circle at top left, rgba(240,180,41,.14), transparent 42%),
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  box-shadow: 0 16px 38px rgba(0,0,0,.16);
}
.landing-tutorial-copy {
  display: grid;
  gap: 10px;
}
.landing-tutorial-kicker {
  color: var(--gold);
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.landing-tutorial-title {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 900;
  line-height: 1.15;
}
.landing-tutorial-text {
  margin: 0;
  max-width: 620px;
  color: var(--txt-muted);
  line-height: 1.65;
}
.landing-tutorial-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.landing-tutorial-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.05);
  color: var(--txt);
  font-size: .78rem;
  font-weight: 800;
}
.landing-tutorial-btn {
  flex: 0 0 auto;
}
.play-landing-cta {
  background: linear-gradient(135deg, var(--gold), #e09000);
  color: #000; border: none; border-radius: var(--r-md);
  padding: 14px 36px; font-size: 1.05rem; font-weight: 800;
  cursor: pointer; letter-spacing: .03em;
  box-shadow: 0 4px 20px rgba(240,180,41,.35);
  transition: transform .1s, box-shadow .1s;
}
.play-landing-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 28px rgba(240,180,41,.45); }
.play-landing-resume {
  margin-left: 12px; background: transparent; border: 1px solid var(--border);
  color: var(--txt-muted); border-radius: var(--r-md);
  padding: 14px 24px; font-size: 1rem; font-weight: 700; cursor: pointer;
}
.play-landing-resume:hover { color: var(--txt); border-color: var(--txt-muted); }
.play-landing-features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; width: 100%;
}
.play-feature-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 24px 20px; text-align: center;
}
.play-feature-icon { font-size: 2rem; margin-bottom: 10px; }
.play-feature-title { font-weight: 800; font-size: 1rem; margin-bottom: 6px; }
.play-feature-desc { font-size: 0.85rem; color: var(--txt-muted); line-height: 1.5; }

.play-launchpad {
  width: 100%;
  padding: 20px 22px;
  border-radius: var(--r-xl);
  border: 1px solid rgba(31,111,235,.18);
  background:
    radial-gradient(circle at top left, rgba(31,111,235,.14), transparent 40%),
    radial-gradient(circle at bottom right, rgba(240,180,41,.10), transparent 45%),
    linear-gradient(160deg, rgba(22,27,34,.96), rgba(13,17,23,.96));
  box-shadow: 0 18px 40px rgba(0,0,0,.22);
}

.play-launchpad-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.play-launchpad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.launch-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  text-align: left;
  padding: 16px;
  border-radius: var(--r-lg);
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  color: var(--txt);
  cursor: pointer;
  transition: transform .12s, border-color .12s, background .12s;
}

.launch-card:hover {
  transform: translateY(-1px);
  border-color: rgba(240,180,41,.38);
  background: rgba(255,255,255,.05);
}
.launch-card.is-disabled,
.launch-card:disabled {
  cursor: not-allowed;
  opacity: .65;
  transform: none;
}
.launch-card.is-disabled:hover,
.launch-card:disabled:hover {
  transform: none;
  border-color: rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
}

.launch-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.launch-card-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(240,180,41,.12);
  font-size: 18px;
}

.launch-card-label {
  font-size: 15px;
  font-weight: 800;
}

.launch-card-copy {
  min-height: 54px;
  color: var(--txt-muted);
  font-size: 13px;
  line-height: 1.5;
}

.launch-card-cta {
  margin-top: auto;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--gold);
}

.friend-table-hub {
  width: 100%;
  padding: 20px 22px;
  border-radius: var(--r-xl);
  border: 1px solid rgba(240,180,41,.22);
  background:
    radial-gradient(circle at top right, rgba(31,111,235,.14), transparent 38%),
    radial-gradient(circle at bottom left, rgba(240,180,41,.10), transparent 40%),
    linear-gradient(160deg, rgba(22,27,34,.96), rgba(13,17,23,.96));
  box-shadow: 0 18px 40px rgba(0,0,0,.22);
}

.friend-table-hub-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.friend-table-summary {
  color: var(--txt-muted);
  font-size: 0.96rem;
  line-height: 1.5;
}

.profile-social-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: start;
  gap: 18px;
}

.profile-club-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.profile-club-hub {
  width: 100%;
}

.profile-club-join-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-club-create-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.profile-club-create-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.club-create-shell {
  position: relative;
}

.club-create-shell.is-locked {
  min-height: 76px;
}

.club-create-shell-body {
  position: relative;
  z-index: 1;
}

.club-create-shell.is-locked .club-create-shell-body {
  filter: blur(7px);
  opacity: .52;
  pointer-events: none;
  user-select: none;
}

.profile-club-current-wrap {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-club-current,
.profile-club-card {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  background: rgba(255,255,255,.03);
  padding: 16px 18px;
}

.profile-club-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.profile-club-directory-head {
  margin-top: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.profile-club-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.profile-club-name {
  font-size: 1rem;
  font-weight: 900;
}

.profile-club-copy {
  margin-top: 10px;
  color: var(--txt-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.profile-club-actions {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-club-role-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(240,180,41,.12);
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.friend-invite-panel {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.hosted-tournament-panel {
  position: relative;
}

.hosted-tournament-panel.is-locked {
  min-height: 320px;
}

.hosted-tournament-panel-body {
  position: relative;
  z-index: 1;
}

.hosted-tournament-panel.is-locked .hosted-tournament-panel-body {
  filter: blur(7px);
  opacity: .52;
  pointer-events: none;
  user-select: none;
}

.premium-lock-panel {
  position: relative;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  overflow: hidden;
}

.premium-lock-panel .hosted-tournament-panel-body {
  padding: 18px;
}

.profile-club-hub .premium-lock-panel,
.profile-club-hub .hosted-tournament-panel {
  margin-top: 0;
}

.hosted-premium-teaser {
  position: absolute;
  inset: 10px 0 0;
  z-index: 2;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 10px;
  padding: 24px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(10,12,16,.18), rgba(10,12,16,.78) 18%, rgba(10,12,16,.92)),
    radial-gradient(circle at top left, rgba(240,180,41,.16), transparent 44%);
}

.hosted-premium-teaser-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(240,180,41,.28);
  background: rgba(240,180,41,.10);
  color: var(--gold);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.hosted-premium-teaser-title {
  max-width: 420px;
  font-size: 1.18rem;
  line-height: 1.18;
  font-weight: 900;
  color: var(--txt);
}

.hosted-premium-teaser-copy {
  max-width: 520px;
  color: var(--txt-muted);
  font-size: .92rem;
  line-height: 1.55;
}

.hosted-premium-teaser-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.club-premium-panel.is-locked {
  min-height: 240px;
}

.club-premium-panel.is-locked .hosted-premium-teaser {
  inset: 0;
  padding: 22px 24px;
  border-radius: 22px;
}

.club-owner-lock-shell {
  margin-top: 18px;
}

.club-owner-lock-shell.is-locked {
  min-height: 372px;
}

.club-owner-lock-shell.is-locked .hosted-premium-teaser {
  inset: 0;
  padding: 24px;
  border-radius: 22px;
}

.club-owner-preview-stack {
  display: grid;
  gap: 12px;
}

.is-premium-note {
  color: var(--gold);
}

.club-premium-teaser {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 8px;
  padding: 14px 18px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(10,12,16,.56), rgba(10,12,16,.90)),
    radial-gradient(circle at top left, rgba(240,180,41,.14), transparent 44%);
}

.premium-feature-inline {
  margin-top: 18px;
  display: grid;
  gap: 10px;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(240,180,41,.18);
  background:
    radial-gradient(circle at top left, rgba(240,180,41,.12), transparent 40%),
    linear-gradient(160deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
}

.premium-feature-inline-title {
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 900;
  color: var(--txt);
}

.premium-feature-inline-copy {
  color: var(--txt-muted);
  font-size: .9rem;
  line-height: 1.55;
}

.friend-form-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 10px;
}

.friend-form-grid > .friend-inline-field {
  min-width: 0;
}

.friend-form-grid .shell-input {
  min-width: 0;
}

.friend-form-grid input[type="datetime-local"] {
  max-width: 100%;
  min-width: 0;
}

@media (max-width: 900px) {
  .friend-form-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══ LEADERBOARD VIEW ═══════════════════════════════════════════════════════ */
.leaderboard-view {
  padding: 20px 16px; display: flex; flex-direction: column; gap: 16px;
  max-width: 780px; margin: 0 auto; width: 100%;
}
.lb-view-controls {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.lb-view-scope, .lb-view-period { display: flex; gap: 4px; }
.lb-view-btn, .lb-period-btn {
  padding: 6px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--txt-muted); font-size: 12px;
  font-weight: 700; cursor: pointer; transition: all .15s;
}
.lb-view-btn.is-active, .lb-period-btn.is-active {
  background: rgba(240,180,41,.15); border-color: rgba(240,180,41,.5); color: var(--txt);
}
.lb-season-select {
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--txt); border-radius: var(--r-md); padding: 6px 10px; font-size: 12px;
}
.lb-view-podium {
  display: flex; gap: 10px; justify-content: center; align-items: flex-end;
  padding: 16px 0; flex-wrap: wrap;
}
.lb-podium-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 20px; border-radius: var(--r-lg); min-width: 100px;
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06);
}
.lb-podium-card.rank-1 {
  border-color: rgba(240,180,41,.5); background: rgba(240,180,41,.08);
  padding: 24px 24px; order: 2;
}
.lb-podium-card.rank-2 { order: 1; }
.lb-podium-card.rank-3 { order: 3; }
.lb-podium-card.is-inactive { opacity: 0.82; }
.lb-podium-medal { font-size: 2rem; }
.lb-podium-name { font-weight: 700; font-size: 0.85rem; text-align: center; }
.lb-your-row.is-inactive { opacity: 0.82; }
.lb-podium-name-line,
.lb-name-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.founder-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(240,180,41,.35);
  background: rgba(240,180,41,.10);
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  vertical-align: middle;
}
.lb-podium-elo { font-size: 0.75rem; color: var(--txt-muted); }

.lb-view-list { display: flex; flex-direction: column; gap: 6px; }
.lb-list-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border-radius: var(--r-md); background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.05);
}
.lb-list-row.is-me { background: rgba(31,111,235,.07); border-color: rgba(31,111,235,.3); }
.lb-list-row.is-inactive { opacity: 0.82; }
.lb-list-rank { font-size: 1rem; font-weight: 800; color: var(--gold); min-width: 32px; }
.lb-list-name { flex: 1; font-weight: 600; }
.lb-list-elo { font-weight: 700; font-size: 0.95rem; }
.lb-list-hands { font-size: 12px; color: var(--txt-dim); margin-left: 8px; }
.lb-list-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 2px;
  color: var(--txt-dim);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.lb-list-divider::before,
.lb-list-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,.08);
}
.lb-status-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid rgba(240,180,41,.25);
  background: rgba(240,180,41,.08);
  color: #f0c86d;
}
.lb-status-chip.is-inactive {
  border-color: rgba(240,180,41,.28);
  background: rgba(240,180,41,.09);
  color: #f0c86d;
}

.lb-challenges-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px;
  padding: 8px 0;
}
.lb-challenge-card {
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.05);
  border-radius: var(--r-md); padding: 16px;
}
.lb-challenge-card.is-complete { border-color: rgba(63,185,80,.3); background: rgba(63,185,80,.05); }
.lb-challenge-name { font-weight: 700; font-size: 0.9rem; margin-bottom: 4px; }
.lb-challenge-desc { font-size: 0.78rem; color: var(--txt-muted); margin-bottom: 10px; line-height: 1.4; }
.lb-challenge-progress-bar { height: 4px; background: var(--border); border-radius: 2px; margin-bottom: 6px; overflow: hidden; }
.lb-challenge-fill { height: 100%; background: var(--gold); border-radius: 2px; }
.lb-challenge-card.is-complete .lb-challenge-fill { background: #3fb950; }
.lb-challenge-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--txt-dim); }
.lb-challenge-pts { color: var(--gold); font-weight: 700; }

/* ═══ PROFILE TABS ═══════════════════════════════════════════════════════════ */
.prof-header {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.06); border-radius: var(--r-xl);
  padding: 18px 20px; display: flex; flex-direction: column; gap: 14px;
  max-width: 900px; margin: 0 auto; width: 100%;
}
.prof-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.prof-avatar-block { display: flex; align-items: center; gap: 16px; flex: 1 1 320px; min-width: 0; }
.prof-avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--surface2); object-fit: cover; }
.prof-avatar-fallback {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 28% 28%, rgba(240,180,41,.22), transparent 32%),
    linear-gradient(160deg, rgba(30,36,44,.98), rgba(18,22,28,.98));
  border: 1px solid rgba(255,255,255,.08);
  color: #f4e2a4;
  font-size: 1.1rem;
  font-weight: 800;
  flex: 0 0 64px;
}
.prof-avatar-fallback.hidden { display: none; }
.prof-name-block { display: flex; flex-direction: column; gap: 6px; min-width: 0; align-items: flex-start; }
.prof-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.prof-name { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: 1.28rem; font-weight: 800; }
.prof-name-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prof-name-flag { font-size: 1.1em; }
.prof-header-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.prof-header-badges.is-empty { display: none; }
.prof-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(240,180,41,.22);
  background: rgba(240,180,41,.06);
  color: #f3d483;
  font-size: 11px;
  font-weight: 700;
}
.prof-plan-badge {
  display: inline-block;
  align-self: flex-start;
  width: fit-content;
  max-width: 100%;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px;
  padding: 2px 10px; border-radius: 999px;
  background: rgba(240,180,41,.15); border: 1px solid rgba(240,180,41,.4); color: var(--gold);
}
.prof-plan-badge.is-free { background: rgba(255,255,255,.06); border-color: var(--border); color: var(--txt-dim); }
.profile-signout-btn {
  padding: 8px 12px;
  border-radius: 999px;
  white-space: nowrap;
  flex: 0 0 auto;
}
.prof-elo-block { margin-left: auto; text-align: right; }
.prof-elo-val { font-size: 2rem; font-weight: 900; color: var(--gold); }
.prof-elo-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; color: var(--txt-dim); }
.prof-stats-row {
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,.06); padding-top: 14px;
}
.prof-stat { display: flex; flex-direction: column; gap: 4px; }
.prof-stat-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; color: var(--txt-dim); }
.prof-stat strong { font-size: 1.2rem; }
.prof-sparkline-wrap { margin-left: auto; }
.prof-sparkline { display: block; }

.prof-tabs {
  display: flex; gap: 8px; flex-wrap: wrap;
  max-width: 900px; margin: 0 auto; width: 100%; padding: 0;
}
.prof-tab-btn {
  padding: 9px 14px;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 999px;
  color: var(--txt-muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.prof-tab-btn.is-active { color: var(--txt); border-color: rgba(240,180,41,.34); background: rgba(240,180,41,.08); }
.prof-tab-btn:hover:not(.is-active) { color: var(--txt); border-color: rgba(255,255,255,.12); }
.prof-tab-content {
  max-width: 900px; margin: 0 auto; width: 100%;
  display: flex; flex-direction: column; gap: 16px; padding-top: 16px;
}

/* Profile tab: settings */
.settings-section { display: flex; flex-direction: column; gap: 10px; }
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.05); border-radius: var(--r-md);
}
.settings-label { font-size: 0.9rem; font-weight: 600; }
.settings-desc { font-size: 12px; color: var(--txt-dim); margin-top: 2px; }
.settings-row-col { flex-direction: column; align-items: flex-start; gap: 8px; }
.profile-name-editor { display: flex; gap: 8px; width: 100%; flex-wrap: wrap; }
.profile-name-editor .shell-input { flex: 1; min-width: 120px; }
.profile-flag-select { flex: 0 0 auto; width: auto; min-width: 160px; }
.profile-bot-textarea { min-height: 180px; resize: vertical; line-height: 1.5; }
.profile-custom-bot-select { max-width: 180px; }
.settings-toggle {
  width: 40px; height: 22px; border-radius: 999px; border: none; cursor: pointer;
  background: var(--surface2); position: relative; transition: background .2s;
}
.settings-toggle.is-on { background: #3fb950; }
.settings-toggle::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  transition: transform .2s;
}
.settings-toggle.is-on::after { transform: translateX(18px); }
.settings-divider { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--txt-dim); padding: 8px 0 4px; }
.subscription-card {
  background: rgba(240,180,41,.06); border: 1px solid rgba(240,180,41,.25);
  border-radius: var(--r-lg); padding: 20px;
}
.subscription-card.is-free { background: rgba(255,255,255,.03); border-color: var(--border); }
.subscription-plan { font-size: 1.1rem; font-weight: 800; margin-bottom: 4px; }
.subscription-desc { font-size: 0.85rem; color: var(--txt-muted); margin-bottom: 16px; }
.subscription-note { margin-top: 14px; font-size: 0.82rem; color: var(--txt-muted); line-height: 1.55; }
.subscription-coming-soon {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1px solid rgba(240,180,41,.22);
  background: linear-gradient(135deg, rgba(240,180,41,.12), rgba(255,255,255,.03));
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.subscription-coming-soon-badge {
  flex: none;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(240,180,41,.18);
  border: 1px solid rgba(240,180,41,.35);
  color: var(--gold);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.subscription-coming-soon-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.subscription-coming-soon-content strong {
  font-size: 0.92rem;
  color: var(--txt);
}
.subscription-coming-soon-content span {
  font-size: 0.82rem;
  color: var(--txt-muted);
  line-height: 1.5;
}
.subscription-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.subscription-status-item {
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: rgba(0,0,0,.14);
  border: 1px solid rgba(255,255,255,.06);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.subscription-status-item span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--txt-dim);
}
.subscription-status-item strong {
  font-size: 0.95rem;
  color: var(--txt);
}
.subscription-offer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.subscription-offer {
  border-radius: var(--r-md);
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.035);
  padding: 16px;
}
.subscription-offer.is-featured {
  border-color: rgba(240,180,41,.35);
  background: rgba(240,180,41,.08);
}
.subscription-offer-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.subscription-offer-name {
  font-size: 0.95rem;
  font-weight: 800;
}
.subscription-offer-price {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--txt);
}
.subscription-offer-meta {
  margin-top: 8px;
  margin-bottom: 14px;
  font-size: 0.82rem;
  color: var(--txt-muted);
  line-height: 1.45;
}
.subscription-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.subscription-btn {
  padding: 10px 24px; border-radius: var(--r-md); font-size: 0.9rem; font-weight: 700; cursor: pointer; border: none;
}
.subscription-btn.upgrade { background: var(--gold); color: #000; }
.subscription-btn.cancel { background: transparent; border: 1px solid var(--border); color: var(--txt-muted); }
.subscription-btn.cancel:hover { border-color: var(--red-btn); color: var(--red-btn); }
.subscription-btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ═══ AD BANNER ══════════════════════════════════════════════════════════════ */
.ad-banner {
  margin-top: 8px; padding: 12px 16px;
  background: rgba(255,255,255,.02); border: 1px dashed rgba(255,255,255,.1);
  border-radius: var(--r-md); text-align: center;
}
.ad-placeholder { font-size: 12px; color: var(--txt-dim); }
.ad-placeholder a { color: var(--gold); text-decoration: none; }
.ad-banner.hidden { display: none !important; }

/* ═══ TOURNAMENT BANNER ══════════════════════════════════════════════════════ */
.tournament-banner {
  background: linear-gradient(90deg, rgba(31,111,235,.15), rgba(240,180,41,.1));
  border-bottom: 1px solid rgba(240,180,41,.3);
  padding: 12px 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.tourn-banner-copy { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 4px; }
.tourn-banner-text { font-weight: 700; font-size: 0.95rem; }
.tourn-banner-note { font-size: 0.82rem; color: var(--txt-muted); line-height: 1.35; }
.tourn-banner-timer { font-size: 1.1rem; font-weight: 900; color: var(--gold); min-width: 40px; }
.tourn-banner-btn {
  background: var(--gold); color: #000; border: none;
  border-radius: var(--r-md); padding: 8px 20px; font-weight: 800; cursor: pointer;
}

/* Profile badge wall (used in overview tab) */
.prof-badge-wall { display: flex; flex-wrap: wrap; gap: 12px; padding: 8px 0; }
.prof-badge-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px; border-radius: var(--r-md); background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); min-width: 72px; cursor: default; transition: border-color .15s; }
.prof-badge-cell.is-earned { border-color: rgba(240,180,41,.4); background: rgba(240,180,41,.06); }
.prof-badge-cell.is-locked { opacity: .45; filter: grayscale(1); }
.prof-badge-icon { font-size: 1.5rem; }
.prof-badge-name { font-size: 10px; font-weight: 700; text-align: center; color: var(--txt-muted); }

/* Profile timeline (used in history tab) */
.prof-timeline { display: flex; flex-direction: column; gap: 6px; }
.prof-timeline-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--r-md); background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.05); cursor: pointer; transition: background .15s; }
.prof-timeline-row:hover { background: rgba(255,255,255,.06); }
.prof-tl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--txt-dim); flex-shrink: 0; }
.prof-tl-dot.won { background: #3fb950; }
.prof-tl-dot.lost { background: #f85149; }
.prof-tl-contract { flex: 1; font-size: 0.9rem; font-weight: 600; }
.prof-tl-meta { font-size: 12px; color: var(--txt-dim); }
.prof-tl-score { font-size: 0.9rem; font-weight: 700; min-width: 48px; text-align: right; }

@media (max-width: 640px) {
  .login-screen {
    align-items: flex-start;
    padding: 14px 12px 28px;
    overflow-y: auto;
  }
  .launch-stage {
    padding: 18px;
    border-radius: 24px;
  }
  .launch-header {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .launch-header-spacer {
    display: none;
  }
  .launch-brand-lockup {
    justify-self: center;
  }
  .launch-auth-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-self: stretch;
  }
  .launch-public-nav {
    justify-content: flex-start;
    font-size: 12px;
  }
  .launch-action-btn {
    width: 100%;
    min-width: 0;
  }
  .launch-main {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .launch-hero {
    padding: 8px 0 0;
  }
  .launch-cta-row {
    flex-direction: column;
    align-items: stretch;
  }
  .launch-action-btn,
  .launch-action-btn-primary {
    width: 100%;
  }
  .launch-title {
    font-size: 2.6rem;
  }
  .launch-sub {
    font-size: 1rem;
  }
  .launch-proof {
    padding: 14px;
    border-radius: 20px;
  }
  .launch-proof-table {
    min-height: 220px;
    border-radius: 22px;
  }
  .launch-proof-card {
    width: 36px;
    height: 50px;
    font-size: 15px;
  }
  .launch-retention-strip {
    grid-template-columns: 1fr;
  }
  .login-card {
    padding: 22px 16px;
    border-radius: 18px;
    box-shadow: 0 18px 48px rgba(0,0,0,.46);
  }
  .login-screen.is-signup-mode .login-divider:last-of-type,
  .login-screen.is-signup-mode .oauth-settings {
    display: none;
  }
  .auth-link-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .auth-link-row .btn-link {
    align-self: stretch;
    text-align: left;
  }
  .play-landing-features { grid-template-columns: 1fr; }
  .landing-tab-grid { grid-template-columns: 1fr; }
  .landing-practice-panel {
    padding: 20px 18px;
    border-radius: 24px;
  }
  .landing-practice-head {
    flex-direction: column;
    align-items: stretch;
  }
  .landing-practice-start {
    width: 100%;
  }
  .practice-bot-row {
    grid-template-columns: 1fr;
  }
  .practice-bot-select {
    max-width: none;
  }
  .landing-tutorial-panel {
    flex-direction: column;
    align-items: flex-start;
  }
  .play-landing-hero { padding-top: 74px; }
  .landing-profile-box {
    right: 50%;
    transform: translateX(50%);
  }
  .landing-profile-box:hover {
    transform: translateX(50%) translateY(-1px);
  }
  .friend-seat-grid { grid-template-columns: 1fr; }
  .friend-form-grid { grid-template-columns: 1fr; }
  .play-landing-title { font-size: 2rem; }
  .play-landing-slogan { font-size: .72rem; letter-spacing: .15em; }
  .prof-header { padding: 16px; }
  .prof-topline {
    flex-direction: column;
    align-items: flex-start;
  }
  .prof-avatar-block,
  .prof-stats-row,
  .prof-name-row {
    align-items: flex-start;
  }
  .prof-avatar-block { width: 100%; }
  .profile-signout-btn { align-self: flex-start; }
  .prof-header-badges { width: 100%; }
  .profile-social-grid { grid-template-columns: 1fr; }
  .profile-club-create-row { grid-template-columns: 1fr; }
  .profile-club-current,
  .profile-club-head,
  .profile-club-directory-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .lb-challenges-grid { grid-template-columns: 1fr; }
}

/* ═══ GUEST SIGN-UP MODAL ═══════════════════════════════════════════════════ */
.guest-signup-modal {
  position: fixed; inset: 0; z-index: 20000;
  background: rgba(13,17,23,.88);
  display: flex; align-items: center; justify-content: center;
  animation: overlayFadeIn .2s ease;
}
.guest-signup-modal.hidden { display: none; }
.guest-signup-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 40px 36px; max-width: 400px;
  width: 92vw; text-align: center; position: relative;
  box-shadow: 0 32px 80px rgba(0,0,0,.7);
}
.guest-signup-close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none; color: var(--txt-muted); font-size: 1.1rem;
  cursor: pointer; padding: 2px 6px; border-radius: var(--r-sm);
}
.guest-signup-close:hover { color: var(--txt); }
.guest-signup-suits { font-size: 1.8rem; letter-spacing: 6px; margin-bottom: 12px; }
.guest-signup-title { font-size: 1.4rem; font-weight: 800; margin-bottom: 10px; }
.guest-signup-body { font-size: 0.9rem; color: var(--txt-muted); margin-bottom: 24px; line-height: 1.5; }
.guest-signup-action { width: 100%; margin-top: 14px; }
.guest-signup-divider { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--txt-dim); font-size: 0.8rem; }
.guest-signup-divider::before, .guest-signup-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.guest-signup-hint { font-size: 0.85rem; color: var(--txt-muted); margin-bottom: 14px; }
.guest-signup-hint a { color: var(--gold); text-decoration: none; }
.btn-ghost { background: none; border: none; color: var(--txt-dim); font-size: 0.85rem; cursor: pointer; padding: 6px 12px; }
.btn-ghost:hover { color: var(--txt-muted); }

/* ── Guest badge popup ── */
.guest-badge-popup {
  position: fixed; top: 56px; right: 12px; z-index: 10000;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 16px 18px; width: 270px;
  box-shadow: 0 12px 40px rgba(0,0,0,.6);
}
.guest-badge-popup.hidden { display: none; }
.gbp-title { font-weight: 700; font-size: 0.9rem; margin-bottom: 6px; }
.gbp-sub { font-size: 0.8rem; color: var(--txt-muted); margin-bottom: 14px; line-height: 1.4; }
.gbp-dismiss { font-size: 0.8rem; margin-top: 10px; width: 100%; text-align: center; }

/* ── Guest sign-up CTA in profile ── */
.guest-signup-cta {
  background: linear-gradient(135deg, rgba(240,180,41,.12), rgba(31,111,235,.08));
  border: 1px solid rgba(240,180,41,.3); border-radius: var(--r-lg);
  padding: 24px; text-align: center; margin-bottom: 20px;
}
.gsuc-title { font-size: 1.1rem; font-weight: 800; margin-bottom: 8px; }
.gsuc-body { font-size: 0.85rem; color: var(--txt-muted); margin-bottom: 18px; line-height: 1.5; }
.gsuc-perks { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-direction: column; gap: 6px; }
.gsuc-perks li { font-size: 0.85rem; color: var(--txt-muted); }
.gsuc-perks li::before { content: '✓ '; color: #3fb950; font-weight: 700; }
