/* ============================================================
   FedTracker — Core Styles
   All colors are CSS custom properties (tokens) set by PHP.
   Edit tokens in Admin → Settings → Theme.
   ============================================================ */

/* ── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  /* ── Brand ── */
  --primary: #E57200;
  --primary-rgb: 229,114,0;
  /* ── Backgrounds ── */
  --bg: #0d0d0d;
  --bg-rgb: 13,13,13;
  --bg-card: #161616;
  --bg-card-rgb: 22,22,22;
  --bg-alt: #111111;
  --bg-alt-rgb: 17,17,17;
  --bg-surface: #111111;
  --bg-surface-rgb: 17,17,17;
  --bg-input: #0f0f0f;
  --bg-input-rgb: 15,15,15;
  --bg-elevated: #1e1e1e;
  --bg-elevated-rgb: 30,30,30;
  /* ── Borders ── */
  --border: #222222;
  --border-rgb: 34,34,34;
  --border-light: #2e2e2e;
  --border-light-rgb: 46,46,46;
  /* ── Text ── */
  --text: #e8e8e8;
  --text-rgb: 232,232,232;
  --text-muted: #808080;
  --text-muted-rgb: 128,128,128;
  --text-dim: #505050;
  --text-dim-rgb: 80,80,80;
  /* ── Semantic ── */
  --success: #4a9968;
  --success-rgb: 74,153,104;
  --danger: #cc4444;
  --danger-rgb: 204,68,68;
  --warning: #e6a817;
  --warning-rgb: 230,168,23;
  --info: #5ba3d9;
  --info-rgb: 91,163,217;
  /* ── Nav & Layout ── */
  --nav-bg: #0d0d0d;
  --nav-bg-rgb: 13,13,13;
  --nav-border: #1a1a1a;
  --nav-border-rgb: 26,26,26;
  --sidebar-bg: #0d0d0d;
  --sidebar-bg-rgb: 13,13,13;
  --footer-bg: #0a0a0a;
  --footer-bg-rgb: 10,10,10;
  /* ── Radius ── */
  --radius: 10px;
  --radius-lg: 14px;
  /* ── Motion ── */
  --card-hover-translate: -3px;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.muted { color: var(--text-muted); font-size: 14px; }

/* ── Navigation ────────────────────────────────────────── */
.main-nav {
  background: rgba(var(--nav-bg-rgb),.92);
  border-bottom: 1px solid var(--nav-border);
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; height: 72px; gap: 10px;
}
.nav-logo {
  display: flex; align-items: center; font-weight: 700; font-size: 20px;
  color: var(--text); text-decoration: none; gap: 10px; margin-right: 20px; flex-shrink: 0;
}
.nav-logo:hover { text-decoration: none; }
.nav-logo img { height: 51px; }
.nav-logo-text { color: var(--primary); font-size: 28px; letter-spacing: -1px; font-weight: 900; }
.nav-links { display: flex; gap: 2px; flex: 1; align-items: center; }
.nav-icon { width: 17px; height: 17px; vertical-align: -2px; margin-right: 5px; flex-shrink: 0; }
.nav-chevron { width: 15px; height: 15px; vertical-align: -2px; margin-left: 2px; opacity: .5; }
.nav-links > a {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 10px 16px; border-radius: var(--radius); font-size: 15px;
  color: var(--text-muted); font-weight: 600; text-decoration: none; transition: all .15s;
  white-space: nowrap;
}
.nav-links > a:hover { color: var(--text); background: rgba(var(--text-rgb),.06); text-decoration: none; }
.nav-more { position: relative; }
.nav-more-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: none; border: none; color: var(--text-muted); font-size: 15px;
  font-weight: 600; cursor: pointer; padding: 10px 16px; border-radius: var(--radius);
  transition: all .15s; white-space: nowrap;
}
.nav-more-btn:hover { color: var(--text); background: rgba(var(--text-rgb),.06); }
.nav-more.open .nav-more-btn { color: var(--text); background: rgba(var(--text-rgb),.06); }
.nav-dropdown {
  display: none; position: absolute; top: calc(100% + 8px); left: 0;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 6px; min-width: 200px;
  box-shadow: 0 12px 40px rgba(0,0,0,.6), 0 0 0 1px rgba(var(--primary-rgb),.08);
  animation: navDropIn .15s ease;
}
@keyframes navDropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.nav-more.open .nav-dropdown { display: block; }
.nav-dropdown a {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; font-size: 14px; color: var(--text-muted);
  border-radius: calc(var(--radius) - 2px); transition: all .15s; text-decoration: none;
}
.nav-dropdown a:hover { background: rgba(var(--primary-rgb),.08); color: var(--text); text-decoration: none; }
.nav-dropdown a .nav-icon { width: 16px; height: 16px; color: var(--primary); opacity: .7; }
.nav-auth { display: flex; gap: 10px; margin-left: auto; flex-shrink: 0; }
.nav-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: var(--radius); font-size: 15px; font-weight: 600;
  color: var(--text); background: rgba(var(--text-rgb),.06); text-decoration: none;
  transition: all .15s; border: 1px solid transparent; white-space: nowrap;
}
.nav-btn .nav-icon { width: 16px; height: 16px; }
.nav-btn:hover { background: rgba(var(--text-rgb),.1); text-decoration: none; }
.nav-btn-admin { background: var(--primary); color: #fff; border-color: var(--primary); }
.nav-btn-admin:hover { opacity: .9; color: #fff; }
.nav-btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── Mobile Nav Toggle ────────────────────────────────── */
.nav-mobile-toggle {
  display: none; background: none; border: none; color: var(--text);
  cursor: pointer; padding: 8px; border-radius: var(--radius); margin-left: auto;
  transition: background .15s;
}
.nav-mobile-toggle:hover { background: rgba(var(--text-rgb),.06); }
.nav-hamburger-icon, .nav-close-icon { width: 22px; height: 22px; }
.nav-close-icon { display: none; }
.drawer-open .nav-hamburger-icon { display: none; }
.drawer-open .nav-close-icon { display: block; }

/* ── Mobile Drawer ────────────────────────────────────── */
.nav-mobile-backdrop {
  display: none; position: fixed; inset: 0; z-index: 199;
  background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.nav-mobile-backdrop.open { display: block; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Mobile Drawer */
.nav-mobile-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 200;
  width: 340px; max-width: 88vw; background: var(--bg-card);
  border-left: 1px solid rgba(var(--primary-rgb),.15);
  transform: translateX(100%); transition: transform .25s ease;
  display: flex; flex-direction: column;
  overscroll-behavior: contain;
  box-shadow: -8px 0 40px rgba(0,0,0,.6);
}
.nav-mobile-drawer.open { transform: translateX(0); }
.nav-mobile-header {
  display: flex; align-items: center; justify-content: center;
  padding: 1.25rem 1.25rem .75rem; flex-shrink: 0; position: relative;
}
.nav-logo--drawer img { max-height: 48px; }
.nav-mobile-close {
  position: absolute; right: 1rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  padding: 6px; border-radius: var(--radius); transition: all .15s;
}
.nav-mobile-close:hover { color: var(--text); background: rgba(var(--text-rgb),.06); }
.nav-mobile-close svg { width: 20px; height: 20px; }

/* Single scrollable area for user + nav */
.nav-mobile-scroll { flex: 1; overflow-y: auto; min-height: 0; }

/* User section */
.nav-mobile-user-section {
  padding: .5rem 1rem .5rem;
  border-bottom: 1px solid rgba(var(--text-rgb),.08);
  display: flex; flex-direction: column; gap: 6px;
}
.nav-mobile-user-header {
  display: flex; align-items: center; gap: .75rem;
  padding: .25rem .25rem .5rem;
}
.nav-mobile-user-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.nav-mobile-user-avatar--letter { display: flex; align-items: center; justify-content: center; background: var(--primary); color: #fff; font-weight: 700; font-size: 16px; }
.nav-mobile-user-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.nav-mobile-user-name { font-weight: 700; font-size: 16px; color: var(--text); }
.nav-mobile-user-role {
  display: inline-block; width: fit-content;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  color: var(--primary); background: rgba(var(--primary-rgb),.15);
  padding: 2px 8px; border-radius: 4px;
}
.nav-mobile-notif-btn {
  position: relative; background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 8px; border-radius: var(--radius); transition: all .15s;
}
.nav-mobile-notif-btn:hover { background: rgba(var(--text-rgb),.06); color: var(--text); }
.nav-mobile-notif-btn svg { width: 20px; height: 20px; }
.nav-mobile-user-section .nav-mobile-item { border-bottom: none; }
.nav-mobile-booking-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border: 1px solid rgba(var(--primary-rgb),.4);
  border-radius: var(--radius); color: var(--primary); font-size: 15px; font-weight: 700;
  text-decoration: none; transition: all .15s; background: rgba(var(--primary-rgb),.06);
}
.nav-mobile-booking-btn:hover { background: rgba(var(--primary-rgb),.12); text-decoration: none; border-color: rgba(var(--primary-rgb),.6); }
.nav-mobile-booking-btn svg { width: 18px; height: 18px; }

/* Nav items */
.nav-mobile-links { padding: .5rem 0; }
.nav-mobile-item { border-bottom: 1px solid rgba(var(--text-rgb),.06); }
.nav-mobile-item-btn {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 14px 20px; background: none; border: none; cursor: pointer;
  color: var(--text); font-size: 17px; font-weight: 700; transition: background .15s;
}
.nav-mobile-item-btn:hover { background: rgba(var(--primary-rgb),.06); }
.nav-mobile-item--link {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; color: var(--text-muted); font-size: 17px; font-weight: 600;
  text-decoration: none; transition: background .15s;
}
.nav-mobile-item--link:hover { background: rgba(var(--primary-rgb),.06); color: var(--text); text-decoration: none; }
.nav-mobile-item-icon { width: 22px; height: 22px; color: var(--primary); flex-shrink: 0; opacity: .8; }
.nav-mobile-item-label { flex: 1; text-align: left; }
.nav-mobile-item-chevron { width: 18px; height: 18px; color: var(--text-dim); opacity: .4; transition: transform .25s ease; flex-shrink: 0; }
.nav-mobile-item.open .nav-mobile-item-chevron { transform: rotate(90deg); opacity: .7; }

/* Accent bar for expandable items */
.nav-mobile-accent {
  width: 3px; height: 24px; border-radius: 2px;
  background: var(--primary); opacity: .6; flex-shrink: 0;
}
.nav-mobile-item.open .nav-mobile-accent { opacity: 1; }

/* Accordion body */
.nav-accordion-body {
  max-height: 0; overflow: hidden; transition: max-height .25s ease;
}
.nav-mobile-item.open .nav-accordion-body { max-height: 500px; }
.nav-accordion-body a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px 10px 58px; font-size: 15px; color: var(--text-muted);
  text-decoration: none; transition: all .15s;
}
.nav-accordion-body a:hover { background: rgba(var(--primary-rgb),.08); color: var(--text); text-decoration: none; }
.nav-accordion-body a svg { width: 16px; height: 16px; color: var(--primary); opacity: .5; flex-shrink: 0; }

/* Pinned bottom (Sign Out / Sign In) */
.nav-mobile-bottom {
  flex-shrink: 0; padding: .5rem 1rem .75rem;
  border-top: 1px solid rgba(var(--text-rgb),.08);
}
.nav-mobile-signout {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 8px; color: var(--text-dim); font-size: 15px;
  text-decoration: none; transition: all .15s;
}
.nav-mobile-signout:hover { color: var(--text); text-decoration: none; }
.nav-mobile-signout svg { width: 18px; height: 18px; }

/* ── Hero Section ──────────────────────────────────────── */
.hero {
  padding: 5rem 0 4rem; text-align: center;
  background: linear-gradient(180deg, rgba(var(--primary-rgb),.1) 0%, rgba(var(--primary-rgb),.03) 50%, transparent 100%);
  border-bottom: 1px solid var(--border);
}
.hero h1 { font-size: 40px; font-weight: 800; letter-spacing: -1px; line-height: 1.15; }
.hero-sub { color: var(--text-muted); font-size: 18px; margin-top: .75rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.hero-stats { display: flex; justify-content: center; gap: 3.5rem; margin-top: 2.5rem; }
.stat-box { text-align: center; }
.stat-num { display: block; font-size: 32px; font-weight: 800; color: var(--primary); letter-spacing: -0.5px; }
.stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 500; }

/* ── Page Header Images ────────────────────────────────── */
/* Legacy standalone — hidden, image now used as section background */
.page-header-image { display: none; }

/* ── Page Hero — integrated header image for sub-pages ── */
[data-has-header-bg] .page-head {
  position: relative; overflow: hidden;
  padding: 4rem 0 2rem;
  /* Break out of .container to go full-width */
  width: 100vw; margin-left: calc(-50vw + 50%);
  padding-left: calc(50vw - 50%); padding-right: calc(50vw - 50%);
  margin-bottom: 2rem;
}
[data-has-header-bg] .page-head::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background-image: var(--page-bg-image);
  background-size: cover; background-repeat: no-repeat;
  background-position: var(--page-bg-pos, center center);
  opacity: .2;
}
[data-has-header-bg] .page-head::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(var(--bg-rgb),0.3) 0%, rgba(var(--bg-rgb),0.85) 100%);
}
[data-has-header-bg] .page-head > * { position: relative; z-index: 2; }
[data-has-header-bg] .page-head h1 { text-shadow: 0 2px 12px rgba(0,0,0,.4); }
[data-has-header-bg] .page-head { border-bottom: 1px solid var(--border); }

/* ── Sections ──────────────────────────────────────────── */
.section { padding: 3.5rem 0; }
.section-alt { background: var(--bg-alt); }
.section-title { font-size: 22px; font-weight: 700; margin-bottom: 1.5rem; letter-spacing: -0.3px; }
.section-more { text-align: center; margin-top: 2rem; }
.page-head { margin-bottom: 2rem; padding: 2.5rem 0 1.25rem; border-bottom: 2px solid var(--border); }
.page-head h1 { font-size: 30px; font-weight: 900; letter-spacing: -0.5px; text-transform: uppercase; }
.page-head p { color: var(--text-muted); margin-top: 6px; }

/* ── Cards ─────────────────────────────────────────────── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.card {
  display: block; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem;
  transition: all .25s ease; text-decoration: none; color: var(--text);
  position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--primary); transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease;
}
.card:hover::before { transform: scaleX(1); }
.card:hover {
  border-color: rgba(var(--primary-rgb),.4); transform: translateY(var(--card-hover-translate));
  box-shadow: 0 12px 32px rgba(0,0,0,.3), 0 0 0 1px rgba(var(--primary-rgb),.1);
  text-decoration: none;
}
.card h3 { font-size: 16px; margin-bottom: .25rem; font-weight: 700; }
.card-header { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--primary); font-weight: 700; margin-bottom: .5rem; }
.card-meta { color: var(--text-muted); font-size: 13px; }
.card-tag {
  display: inline-block; font-size: 11px; padding: 3px 10px; border-radius: 6px;
  background: rgba(var(--primary-rgb),.12); color: var(--primary); font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: .5rem;
}
.card-image {
  height: 180px; background-size: cover; background-position: var(--img-pos, top);
  border-radius: calc(var(--radius-lg) - 1px) calc(var(--radius-lg) - 1px) 0 0;
  margin: -1.25rem -1.25rem 1rem; transition: filter .3s;
}
.card:hover .card-image { filter: brightness(1.05); }
.empty-state {
  text-align: center; padding: 4rem 2rem; color: var(--text-muted);
  background: var(--bg-card); border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}

/* ── Championship Cards ────────────────────────────────── */
.champ-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.champ-card {
  display: flex; align-items: center; gap: 1rem; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem;
  transition: all .25s ease; position: relative; overflow: hidden;
}
.champ-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--primary); transform: scaleY(0); transition: transform .3s;
}
.champ-card:hover::before { transform: scaleY(1); }
.champ-card:hover { border-color: rgba(var(--primary-rgb),.4); box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.champ-img { width: 64px; height: 64px; object-fit: contain; flex-shrink: 0; }
.champ-info h3 { font-size: 15px; font-weight: 700; }
.champ-holder { color: var(--primary); font-weight: 600; font-size: 14px; }

/* ── Roster Grid ───────────────────────────────────────── */
.roster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.25rem; }
.roster-card {
  display: block; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: all .25s ease; text-decoration: none; color: var(--text);
  position: relative;
}
.roster-card::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), transparent);
  opacity: 0; transition: opacity .3s;
}
.roster-card:hover::after { opacity: 1; }
.roster-card:hover {
  border-color: rgba(var(--primary-rgb),.5); transform: translateY(var(--card-hover-translate));
  box-shadow: 0 12px 32px rgba(0,0,0,.35);
  text-decoration: none;
}
.roster-card-img {
  height: 240px; background: var(--bg-elevated); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.roster-card-img::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 60px;
  background: linear-gradient(0deg, var(--bg-card), transparent);
  pointer-events: none;
}
.roster-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.roster-card:hover .roster-card-img img { transform: scale(1.08); }
.roster-card-placeholder {
  font-size: 42px; font-weight: 900; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: -1px;
}
.roster-card-info { padding: 1rem 1rem .85rem; }
.roster-card-info h3 { font-size: 16px; margin-bottom: .35rem; font-weight: 700; }
.roster-record { color: var(--text-muted); font-size: 13px; margin: .35rem 0; }

/* ── Momentum Bar ──────────────────────────────────────── */
.momentum-bar {
  height: 6px; background: transparent; border-radius: 3px;
  position: relative; margin-top: .5rem;
}
.momentum-fill {
  height: 100%; border-radius: 3px; transition: width .6s ease;
  background: var(--info); box-shadow: 0 0 6px rgba(var(--info-rgb),.25);
  min-width: 2px;
}
.momentum-bar span { position: absolute; right: 4px; top: -14px; font-size: 11px; color: var(--text-muted); font-weight: 600; }

/* ── Badges ────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 6px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .4px;
}
.bg-blue-100 { background: rgba(var(--info-rgb),.15); }
.text-blue-800 { color: var(--info); }
.bg-red-100 { background: rgba(var(--danger-rgb),.15); }
.text-red-800 { color: var(--danger); }
.bg-gray-100 { background: rgba(var(--text-muted-rgb),.15); }
.text-gray-800 { color: var(--text-muted); }
.badge-alignment { background: #fff; color: #111; border: 1px solid #ddd; }
.badge-count { background: var(--primary); color: #fff; font-size: 11px; padding: 1px 7px; border-radius: 10px; margin-left: 4px; }

/* ── Filter Bar ────────────────────────────────────────── */
.filter-bar { margin-bottom: 1.5rem; }
.filter-form { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.filter-form select, .filter-form input {
  padding: 9px 14px; background: var(--bg-input); border: 1px solid var(--border-light);
  border-radius: var(--radius); color: var(--text); font-size: 14px;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23808080' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 32px;
}
.filter-form input { background-image: none; padding-right: 14px; }
.filter-form select:focus, .filter-form input:focus {
  border-color: var(--primary); outline: none;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb),.1);
}

/* ── Forms ─────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 10px 14px; background: var(--bg-input); border: 1px solid var(--border-light);
  border-radius: var(--radius); color: var(--text); font-size: 15px; outline: none;
  transition: border-color .2s, box-shadow .2s; font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb),.12);
}
.form-group input[type="color"] { width: 80px; height: 44px; padding: 4px; cursor: pointer; -webkit-appearance: none; appearance: none; }
.form-group input[type="color"]::-webkit-color-swatch-wrapper { padding: 2px; }
.form-group input[type="color"]::-webkit-color-swatch { border: none; border-radius: 6px; }
.form-group input[type="color"]::-moz-color-swatch { border: none; border-radius: 6px; }
.form-group input[type="file"] { width: 100%; padding: 8px; font-size: 14px; }
.form-group input[type="checkbox"] { width: auto; margin-right: 6px; }
.form-group textarea { min-height: 100px; resize: vertical; }
.form-group .hint { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
.form-row { display: flex; gap: 1rem; }
.form-row .form-group { flex: 1; }

/* ── Combo Multi-Select ────────────────────────────────── */
.combo-multiselect { position: relative; }
.combo-trigger {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px; min-height: 44px;
  padding: 6px 10px; background: var(--bg-input); border: 1px solid var(--border-light);
  border-radius: var(--radius); cursor: pointer; transition: border-color .2s, box-shadow .2s;
}
.combo-trigger:hover { border-color: rgba(var(--primary-rgb),.4); }
.combo-trigger.open { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb),.12); }
.combo-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; background: rgba(var(--primary-rgb),.15); color: var(--primary);
  border-radius: 6px; font-size: 12px; font-weight: 600; line-height: 1.4; white-space: nowrap;
}
.combo-tag-remove {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; border: none; background: rgba(var(--primary-rgb),.2);
  color: var(--primary); border-radius: 50%; cursor: pointer; font-size: 10px;
  line-height: 1; padding: 0; transition: background .15s;
}
.combo-tag-remove:hover { background: rgba(var(--danger-rgb),.3); color: var(--danger); }
.combo-placeholder { color: var(--text-dim); font-size: 14px; user-select: none; }
.combo-chevron {
  margin-left: auto; flex-shrink: 0; color: var(--text-dim);
  transition: transform .2s; font-size: 11px; padding-left: 8px;
}
.combo-trigger.open .combo-chevron { transform: rotate(180deg); }
.combo-dropdown {
  display: none; position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--bg-elevated); border: 1px solid var(--border-light);
  border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.4); z-index: 50;
  max-height: 260px; overflow: hidden; flex-direction: column;
}
.combo-dropdown.open { display: flex; }
.combo-search {
  padding: 8px 10px; border: none; border-bottom: 1px solid var(--border);
  background: transparent; color: var(--text); font-size: 13px; outline: none;
  font-family: inherit; width: 100%;
}
.combo-search::placeholder { color: var(--text-dim); }
.combo-options { overflow-y: auto; flex: 1; padding: 4px; }
.combo-group-label {
  padding: 6px 10px 4px; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; color: var(--text-dim); user-select: none;
}
.combo-option {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  border-radius: calc(var(--radius) - 4px); cursor: pointer; font-size: 13px;
  color: var(--text); transition: background .1s; user-select: none;
}
.combo-option:hover { background: rgba(var(--text-rgb),.05); }
.combo-option.highlighted { background: rgba(var(--primary-rgb),.08); }
.combo-option.hidden { display: none; }
.combo-check {
  display: flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; flex-shrink: 0; border: 2px solid var(--border-light);
  border-radius: 4px; transition: all .15s; font-size: 11px; color: transparent;
}
.combo-option.selected .combo-check {
  background: var(--primary); border-color: var(--primary); color: #fff;
}
.combo-empty { padding: 12px; text-align: center; font-size: 13px; color: var(--text-dim); }

/* ── Color Picker ──────────────────────────────────────── */
.color-picker { display: flex; align-items: center; gap: 8px; }
.color-picker input[type="color"] {
  -webkit-appearance: none; appearance: none; width: 48px; height: 42px; padding: 2px;
  border: 2px solid var(--border-light); border-radius: var(--radius); background: var(--bg-input); cursor: pointer;
}
.color-picker input[type="color"]::-webkit-color-swatch-wrapper { padding: 2px; }
.color-picker input[type="color"]::-webkit-color-swatch { border: none; border-radius: 6px; }
.color-picker input[type="color"]::-moz-color-swatch { border: none; border-radius: 6px; }
.color-picker input[type="text"] { flex: 1; font-family: var(--font-mono, monospace); }

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-block; padding: 10px 22px; border: none; border-radius: var(--radius);
  font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: all .15s; font-family: inherit;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { opacity: .9; text-decoration: none; box-shadow: 0 4px 12px rgba(var(--primary-rgb),.3); }
.btn-outline { background: transparent; border: 1px solid var(--border-light); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { box-shadow: 0 4px 12px rgba(var(--danger-rgb),.3); }
.btn-small { padding: 6px 14px; font-size: 13px; }
.btn-full { width: 100%; text-align: center; }
.btn-group { display: flex; gap: .75rem; flex-wrap: wrap; }

/* ── Alerts ────────────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 1rem; font-size: 14px; }
.alert-error { background: rgba(var(--danger-rgb),.1); border: 1px solid rgba(var(--danger-rgb),.25); color: var(--danger); }
.alert-success { background: rgba(var(--success-rgb),.1); border: 1px solid rgba(var(--success-rgb),.25); color: var(--success); }
.alert-info { background: rgba(var(--info-rgb),.1); border: 1px solid rgba(var(--info-rgb),.25); color: var(--info); }

/* ── Auth Page ─────────────────────────────────────────── */
.auth-container { display: flex; justify-content: center; padding: 3rem 1rem; }
.auth-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 2rem; width: 100%; max-width: 420px;
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
}
.auth-card h2 { font-size: 22px; margin-bottom: 1.5rem; }
.auth-switch { text-align: center; margin-top: 1rem; font-size: 14px; color: var(--text-muted); }

/* ── Admin Layout ──────────────────────────────────────── */
.admin-body { display: flex; min-height: 100vh; }

/* Admin Top Nav (mobile only) */
.admin-topnav {
  display: none; background: rgba(var(--nav-bg-rgb),.92);
  border-bottom: 1px solid var(--nav-border);
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}
.admin-topnav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1rem; height: 64px;
}
.admin-topnav .nav-logo img { height: 40px; }
.admin-topnav .nav-logo-text { color: var(--primary); font-size: 24px; letter-spacing: -1px; font-weight: 900; }
.admin-topnav-actions { display: flex; align-items: center; gap: 8px; }
.admin-mobile-toggle {
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; color: var(--text);
  cursor: pointer; padding: 8px; border-radius: var(--radius);
  transition: background .15s;
}
.admin-mobile-toggle:hover { background: rgba(var(--text-rgb),.06); }
.admin-hamburger-icon, .admin-close-icon { width: 22px; height: 22px; }
.admin-close-icon { display: none; }
.admin-drawer-open .admin-hamburger-icon { display: none; }
.admin-drawer-open .admin-close-icon { display: block; }

/* Admin Mobile Drawer */
.admin-mobile-backdrop {
  display: none; position: fixed; inset: 0; z-index: 199;
  background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.admin-mobile-backdrop.open { display: block; animation: fadeIn .2s ease; }
.admin-mobile-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 200;
  width: 300px; max-width: 85vw; background: var(--bg-card);
  border-left: 1px solid var(--border);
  transform: translateX(100%); transition: transform .25s ease;
  display: none; flex-direction: column;
  overflow-y: auto; overscroll-behavior: contain;
  box-shadow: -8px 0 40px rgba(0,0,0,.5);
}
.admin-mobile-drawer.open { display: flex; transform: translateX(0); }
.admin-mobile-drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.admin-mobile-drawer-header .nav-logo img { height: 36px; }
.admin-mobile-drawer-links { flex: 1; padding: 1rem; overflow-y: auto; }
.admin-mobile-drawer-links a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; font-size: 15px; color: var(--text-muted);
  text-decoration: none; border-radius: var(--radius); transition: all .15s;
  min-height: 44px;
}
.admin-mobile-drawer-links a:hover { background: rgba(var(--primary-rgb),.08); color: var(--text); text-decoration: none; }
.admin-mobile-drawer-links a.active { background: rgba(var(--primary-rgb),.1); color: var(--primary); font-weight: 600; }
.admin-mobile-drawer-links a svg { width: 18px; height: 18px; color: var(--primary); opacity: .6; flex-shrink: 0; }
.admin-mobile-drawer-links a.active svg { opacity: 1; }
.admin-mobile-drawer-links a .badge-count { margin-left: auto; }
.admin-mobile-drawer-footer {
  padding: 1rem 1.25rem; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 8px; flex-shrink: 0;
}
.admin-mobile-drawer-footer .nav-btn { justify-content: center; width: 100%; text-align: center; }
.admin-mobile-drawer-footer .nav-btn svg { width: 16px; height: 16px; }

/* Desktop Admin Sidebar */
.admin-sidebar {
  width: 240px; background: var(--sidebar-bg); border-right: 1px solid var(--border);
  position: fixed; top: 0; left: 0; bottom: 0; overflow-y: auto; z-index: 100;
}
.admin-sidebar-header {
  padding: 1.25rem 1rem; border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
}
.admin-sidebar-logo { text-decoration: none; display: flex; align-items: center; }
.admin-sidebar-header small { display: block; color: var(--text-muted); font-size: 12px; }
.admin-nav { padding: .5rem; }
.admin-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: calc(var(--radius) - 2px); font-size: 14px;
  color: var(--text-muted); text-decoration: none; margin-bottom: 2px; transition: all .15s;
}
.admin-nav a svg { width: 16px; height: 16px; flex-shrink: 0; opacity: .6; }
.admin-nav a .badge-count { margin-left: auto; }
.admin-nav a:hover { background: rgba(var(--text-rgb),.05); color: var(--text); text-decoration: none; }
.admin-nav a:hover svg { opacity: 1; color: var(--primary); }
.admin-nav a.active { background: rgba(var(--primary-rgb),.1); color: var(--primary); font-weight: 600; }
.admin-nav a.active svg { opacity: 1; color: var(--primary); }
.admin-nav-divider { height: 1px; background: var(--border); margin: .75rem .5rem; }
.admin-content { margin-left: 240px; flex: 1; min-width: 0; }
.admin-header {
  padding: 1.25rem 2rem; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg);
}
.admin-header h1 { font-size: 20px; font-weight: 700; }
.admin-user { font-size: 14px; color: var(--text-muted); }
.admin-main { padding: 2rem; }

/* ── Admin Dashboard ───────────────────────────────────── */
.dash-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.dash-stat {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.25rem; text-align: center; transition: border-color .2s;
}
.dash-stat:hover { border-color: rgba(var(--primary-rgb),.3); }
.dash-stat-num { display: block; font-size: 28px; font-weight: 800; color: var(--primary); letter-spacing: -0.5px; }
.dash-stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 500; }
.dash-alerts { margin-bottom: 1.5rem; }
.dash-alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: .5rem; font-size: 14px; }
.dash-alert.warn { background: rgba(var(--warning-rgb),.1); border: 1px solid rgba(var(--warning-rgb),.25); color: var(--warning); }
.dash-alert.info { background: rgba(var(--info-rgb),.1); border: 1px solid rgba(var(--info-rgb),.25); color: var(--info); }
.dash-alert a { color: inherit; text-decoration: underline; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }
.dash-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; }
.dash-panel h3 { font-size: 16px; margin-bottom: 1rem; font-weight: 600; }
.dash-list { list-style: none; }
.dash-list li { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; display: flex; justify-content: space-between; align-items: center; }
.dash-list li:last-child { border: none; }
.dash-quick { margin-top: 1.5rem; }
.dash-quick h3 { margin-bottom: .75rem; }

/* ── Admin Table ───────────────────────────────────────── */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
.admin-table th {
  color: var(--text-muted); font-size: 11px; text-transform: uppercase;
  letter-spacing: .8px; font-weight: 700; background: rgba(var(--bg-card-rgb),.5);
  position: sticky; top: 0;
}
.admin-table tr { transition: background .15s; }
.admin-table tr:hover { background: rgba(var(--primary-rgb),.03); }
.admin-table .actions { display: flex; gap: 6px; }

/* ── Footer ────────────────────────────────────────────── */
.site-footer { margin-top: 3rem; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* Social Bar */
.footer-social-bar {
  background: linear-gradient(135deg, rgba(var(--primary-rgb),.35) 0%, rgba(var(--primary-rgb),.15) 100%);
  border-top: 1px solid rgba(var(--primary-rgb),.25);
  padding: .75rem 0;
}
.footer-social-bar .footer-inner {
  display: flex; align-items: center; justify-content: space-between;
}
.footer-social-text {
  font-size: 14px; color: var(--text-muted); font-weight: 500;
}
.footer-social-icons { display: flex; gap: 1rem; }
.footer-social-icons a {
  color: var(--text-muted); transition: all .2s; display: flex;
  align-items: center; justify-content: center; text-decoration: none;
}
.footer-social-icons a:hover { color: var(--text); transform: scale(1.15); }
.footer-social-icons a svg { width: 18px; height: 18px; }

/* Main Footer */
.footer-main {
  background: var(--footer-bg); padding: 3rem 0;
  border-top: 1px solid var(--border);
}
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 3rem;
}
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col--brand p {
  color: var(--text-muted); font-size: 14px; line-height: 1.7; margin: 0;
}
.footer-col h4 {
  font-size: 14px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .5px; color: var(--text); margin: 0 0 2px;
}
.footer-col-accent {
  width: 42px; height: 3px; border-radius: 2px;
  background: var(--primary); margin-bottom: 8px;
}
.footer-col a {
  color: var(--text-muted); font-size: 14px; text-decoration: none;
  transition: color .15s; line-height: 1.8;
}
.footer-col a:hover { color: var(--primary); text-decoration: none; }

/* Copyright Bar */
.footer-copyright {
  background: rgba(0,0,0,.35); padding: 1rem 0; text-align: center;
  font-size: 13px; color: var(--text-dim);
  border-top: 1px solid var(--border);
}
.footer-copyright a {
  color: var(--primary); text-decoration: none; font-weight: 600;
}
.footer-copyright a:hover { text-decoration: underline; }

/* ── TipTap Editor ─────────────────────────────────────── */
.tiptap-editor { background: var(--bg-input); border: 1px solid var(--border-light); border-radius: var(--radius); min-height: 200px; padding: 1rem; color: var(--text); transition: border-color .2s; }
.tiptap-editor:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb),.1); }
.tiptap-toolbar { display: flex; gap: 4px; padding: 8px; background: var(--bg-card); border: 1px solid var(--border-light); border-bottom: none; border-radius: var(--radius) var(--radius) 0 0; flex-wrap: wrap; }
.tiptap-toolbar button { padding: 4px 8px; background: none; border: 1px solid transparent; border-radius: 6px; color: var(--text-muted); cursor: pointer; font-size: 14px; transition: all .15s; }
.tiptap-toolbar button:hover { background: rgba(var(--text-rgb),.06); color: var(--text); }
.tiptap-toolbar button.active { background: rgba(var(--primary-rgb),.12); color: var(--primary); border-color: rgba(var(--primary-rgb),.25); }

/* ── Theme Settings Grid ──────────────────────────────── */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.theme-token { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.theme-token label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .3px; margin-bottom: 6px; display: block; }
.theme-token .color-picker { margin-top: 4px; }
.theme-token-preview { width: 100%; height: 8px; border-radius: 4px; margin-top: 8px; }
.theme-section-title { font-size: 14px; font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: .5px; margin: 1.5rem 0 1rem; padding-bottom: .5rem; border-bottom: 1px solid var(--border); }
.theme-section-title:first-child { margin-top: 0; }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-auth { display: none; }
  .nav-mobile-toggle { display: flex; align-items: center; }
  .hero h1 { font-size: 26px; }
  .hero-stats { gap: 1.5rem; flex-wrap: wrap; justify-content: center; }
  .hero { padding: 3rem 0 2.5rem; }
  .hero-sub { font-size: 15px; }
  .dash-grid { grid-template-columns: 1fr; }
  .admin-header h1 { cursor: default; }
  .form-row { flex-direction: column; }
  .filter-form { flex-direction: column; }
  .theme-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-social-text { display: none; }
  .footer-social-icons { margin: 0 auto; }

  /* Phase 1: Global spacing & typography */
  .container { padding: 0 1rem; }
  .section { padding: 2rem 0; }
  .page-head { padding: 1.5rem 0 1rem; }
  .page-head h1 { font-size: 26px; }
  [data-has-header-bg] .page-head { padding: 2.5rem 1rem 1.5rem; }

  /* Phase 1: Touch targets */
  .btn { min-height: 44px; padding: 12px 20px; }
  .btn-small { min-height: 40px; padding: 8px 16px; }
  .filter-form select, .filter-form input { min-height: 44px; font-size: 16px; }
  .form-group input, .form-group select, .form-group textarea { font-size: 16px; }
  .nav-accordion-body a { min-height: 44px; }
  .badge { padding: 4px 10px; }

  /* Phase 4: Admin layout — mobile topnav + drawer */
  .admin-body { flex-direction: column; }
  .admin-topnav { display: block; }
  .admin-sidebar { display: none; }
  .admin-content { margin-left: 0; }
  .admin-main { padding: 1rem; }
  .admin-header { padding: 1rem; }
  .admin-header h1 { font-size: 18px; }
  .dash-stats { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .dash-stat-num { font-size: 22px; }

  /* Phase 4: Admin table card view */
  .admin-table { border: none; }
  .admin-table thead { display: none; }
  .admin-table tbody { display: block; }
  .admin-table tr { display: block; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin-bottom: .75rem; }
  .admin-table tr:hover { background: var(--bg-card); }
  .admin-table td { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 14px; text-align: right; }
  .admin-table td:last-child { border-bottom: none; }
  .admin-table td::before { content: attr(data-label); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-right: 1rem; text-align: left; white-space: nowrap; }
  .admin-table .actions { justify-content: flex-end; }

  /* Phase 4: Editor & form touch targets */
  .tiptap-toolbar button { min-width: 36px; min-height: 36px; }
  .combo-trigger { min-height: 48px; }
  .theme-grid { grid-template-columns: 1fr; }
}

/* ── Admin sidebar toggle (hidden on desktop) ──────────── */
.admin-sidebar-toggle { display: none; }
.admin-sidebar-backdrop { display: none; }

/* ── Character Profile V2 — Screenshot-matched layout ──── */
.char-hero-v2 {
  position: relative; overflow: hidden; min-height: 420px;
  border-bottom: 1px solid var(--border);
}
.char-hero-banner {
  position: absolute; inset: 0; width: 100%; height: 100%;
  background-size: cover; background-position: center top;
}
.char-hero-banner--empty {
  background: linear-gradient(135deg, rgba(var(--primary-rgb),.15) 0%, transparent 60%);
}
.char-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, var(--bg) 0%, rgba(var(--bg-rgb),.85) 35%, rgba(var(--bg-rgb),.5) 60%, rgba(var(--bg-rgb),.3) 100%);
}
.char-hero-render {
  position: absolute; right: 5%; bottom: 0; z-index: 2;
  height: 100%; display: flex; align-items: flex-end;
}
.char-hero-render img {
  max-height: 95%; width: auto; max-width: 400px; object-fit: contain;
  filter: drop-shadow(0 4px 24px rgba(0,0,0,.6));
}
.char-hero-content {
  position: relative; z-index: 3; display: flex; flex-direction: column;
  justify-content: space-between; min-height: 420px; padding-top: 1rem; padding-bottom: 2rem;
}
.char-hero-nav {
  display: flex; justify-content: space-between; align-items: center;
}
.char-breadcrumb {
  color: var(--text-muted); font-size: 14px; font-weight: 500;
  text-decoration: none; transition: color .15s;
}
.char-breadcrumb:hover { color: var(--text); text-decoration: none; }
.char-edit-btn {
  background: rgba(var(--text-rgb),.08);
  display: inline-flex; align-items: center; gap: 6px;
}
.char-edit-btn svg { width: 14px; height: 14px; }
.char-hero-info { margin-top: auto; max-width: 55%; }
.char-hero-badges { display: flex; gap: 6px; margin-bottom: .75rem; flex-wrap: wrap; }
.char-status-badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px;
  border-radius: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  background: rgba(var(--success-rgb),.12); color: var(--success);
}
.char-hero-name {
  font-size: 48px; font-weight: 900; letter-spacing: -1px; line-height: 1.1;
  text-transform: uppercase; color: var(--text);
  text-shadow: 0 2px 16px rgba(0,0,0,.5);
}
.char-hero-handle {
  display: inline-block; color: var(--info); font-size: 15px; font-weight: 600;
  margin-top: .25rem; letter-spacing: .5px;
}
.char-hero-nicknames {
  color: var(--primary); font-size: 13px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; margin-top: .5rem;
}
.char-hero-bio {
  color: var(--text-muted); font-size: 15px; margin-top: .75rem; line-height: 1.5;
  max-width: 500px;
}

/* ── Character Content Grid V2 ──────────────────────── */
.char-content { padding: 2.5rem 0; }
.char-grid-v2 { display: grid; grid-template-columns: 1fr 320px; gap: 2.5rem; }
.char-main { min-width: 0; }

/* ── Character Panels V2 ────────────────────────────── */
.char-panel-v2 {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.75rem; margin-bottom: 1.5rem;
  transition: border-color .2s;
}
.char-panel-v2:hover { border-color: rgba(var(--primary-rgb),.2); }
.char-panel-accent {
  border-color: rgba(var(--primary-rgb),.3);
  background: linear-gradient(180deg, rgba(var(--primary-rgb),.06) 0%, var(--bg-card) 100%);
}
.char-panel-header { margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.char-panel-title-v2 {
  display: flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px;
  color: var(--text);
}
.panel-icon { width: 18px; height: 18px; color: var(--primary); flex-shrink: 0; }
.char-panel-subtitle {
  display: block; font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--primary); margin-top: .25rem;
}
.char-gimmick {
  font-size: 17px; color: var(--text-muted); font-style: italic; line-height: 1.6;
  border-left: 3px solid var(--primary); padding-left: 1rem; margin-bottom: 1.5rem;
}
.char-bio { line-height: 1.8; font-size: 15px; }
.char-bio p { margin-bottom: 1rem; }
.char-bio h2, .char-bio h3 {
  font-weight: 800; text-transform: uppercase; margin: 2rem 0 .75rem;
  letter-spacing: .3px;
}
.char-bio h2 { font-size: 18px; }
.char-bio h3 { font-size: 16px; color: var(--text-muted); }
.char-bio h2::before, .char-bio h3::before { content: "\2022 "; color: var(--primary); }

/* ── Sidebar ────────────────────────────────────────── */
.char-sidebar-image {
  border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 1rem;
  border: 1px solid var(--border); background: var(--bg-card);
}
.char-sidebar-image img { width: 100%; height: auto; display: block; object-fit: cover; }
.char-sidebar-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem; margin-bottom: 1rem;
}
.char-sidebar-label {
  display: block; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; color: var(--text-muted); margin-bottom: .75rem;
}
.char-sidebar-value {
  display: flex; align-items: center; gap: .5rem;
  font-size: 14px; font-weight: 500;
}
.char-sidebar-avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--bg-elevated);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--text-muted); flex-shrink: 0;
}

/* ── Stats Table (shared) ───────────────────────────── */
.char-stats-table { width: 100%; font-size: 14px; }
.char-stats-table tr { border-bottom: 1px solid var(--border); }
.char-stats-table tr:last-child { border: none; }
.char-stats-table td { padding: 8px 0; }
.char-stats-table td:first-child { color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .3px; font-weight: 600; width: 110px; }
.char-stats-table td:last-child { font-weight: 500; text-align: right; }
.char-stat-record { font-weight: 800; letter-spacing: -0.3px; }
.char-stat-winrate { color: var(--primary); font-weight: 700; }

/* ── Signature Moves V2 ─────────────────────────────── */
.char-moves-section { margin-bottom: .75rem; }
.char-moves-section:last-child { margin-bottom: 0; }
.char-moves-type {
  display: block; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--primary); margin-bottom: .35rem;
}
.char-moves-list { list-style: none; font-size: 14px; }
.char-moves-list li {
  display: flex; align-items: center; gap: .5rem; padding: 5px 0;
  border-bottom: 1px solid var(--border);
}
.char-moves-list li:last-child { border: none; }
.char-move-icon { font-size: 12px; flex-shrink: 0; }
.char-move-finisher { color: var(--primary); }
.char-move-signature { color: var(--text-muted); }
.char-move-name { font-weight: 500; }
.char-move-type { color: var(--text-dim); font-size: 12px; }

/* ── Character Page Tabs ─────────────────────────────── */
.char-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; }
.char-tab { background: none; border: none; padding: .75rem 1.5rem; font-size: 14px; font-weight: 600; color: var(--text-muted); cursor: pointer; position: relative; display: flex; align-items: center; gap: .4rem; font-family: inherit; transition: color .15s; }
.char-tab:hover { color: var(--text); }
.char-tab.active { color: var(--primary); }
.char-tab.active::after { content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 2px; background: var(--primary); border-radius: 2px 2px 0 0; }
.char-tab-content { display: none; }
.char-tab-content.active { display: block; }

/* ── Shoots Sub-tabs ─────────────────────────────────── */
.shoot-subtabs { display: flex; gap: 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 1rem; }
.shoot-subtab { flex: 1; background: none; border: none; padding: .65rem .75rem; font-size: 13px; font-weight: 600; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: .35rem; font-family: inherit; transition: background .15s, color .15s; border-right: 1px solid var(--border); }
.shoot-subtab:last-child { border-right: none; }
.shoot-subtab:hover { background: rgba(255,255,255,.03); color: var(--text); }
.shoot-subtab.active { background: rgba(var(--primary-rgb),.08); color: var(--primary); }

/* ── Shoot Feed (Character Posts) ──────────────────── */
.shoot-compose { margin-bottom: 1.25rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
.shoot-compose-row { display: flex; gap: .75rem; align-items: flex-start; }
.shoot-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid var(--border); }
.shoot-avatar--letter { display: flex; align-items: center; justify-content: center; background: var(--bg-elevated); color: var(--text-muted); font-weight: 700; font-size: 16px; }
.shoot-input-wrap { flex: 1; }
.shoot-input-wrap textarea {
  width: 100%; padding: .75rem; background: var(--bg-input); border: 1px solid var(--border-light);
  border-radius: var(--radius); color: var(--text); font-size: 14px; resize: none; font-family: inherit;
}
.shoot-input-wrap textarea:focus { outline: none; border-color: rgba(var(--primary-rgb),.5); }
.shoot-compose-footer { display: flex; justify-content: space-between; align-items: center; margin-top: .5rem; }
.shoot-char-count { font-size: 12px; color: var(--text-muted); }
.shoot-feed { display: flex; flex-direction: column; gap: 0; }
.shoot-item { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.shoot-item:last-child { border-bottom: none; }
.shoot-item-header { display: flex; align-items: center; gap: .65rem; margin-bottom: .5rem; }
.shoot-item-meta { display: flex; flex-direction: column; }
.shoot-name { font-weight: 700; font-size: 14px; color: var(--text); text-decoration: none; }
.shoot-name:hover { color: var(--primary); }
.shoot-time { font-size: 12px; color: var(--text-dim); }
.shoot-content { font-size: 14px; line-height: 1.55; padding-left: calc(40px + .65rem); }
.shoot-mention { color: var(--info); font-weight: 600; text-decoration: none; }
.shoot-mention:hover { text-decoration: underline; }
.shoot-delete { background: none; border: none; color: var(--text-dim); cursor: pointer; padding: 4px; border-radius: 4px; }
.shoot-delete:hover { color: var(--danger); background: rgba(var(--danger-rgb),.1); }

/* Reshoot label */
.shoot-reshoot-label { font-size: 12px; color: var(--text-dim); display: flex; align-items: center; gap: .35rem; padding-left: calc(40px + .65rem); margin-bottom: .35rem; }

/* Shoot actions (reshoot / quote buttons) */
.shoot-actions { display: flex; gap: 1rem; padding-left: calc(40px + .65rem); margin-top: .5rem; }
.shoot-action-btn { background: none; border: none; color: var(--text-dim); cursor: pointer; padding: 4px 8px; border-radius: 4px; display: flex; align-items: center; gap: .3rem; font-size: 12px; }
.shoot-action-btn:hover { color: var(--primary); background: rgba(var(--primary-rgb),.08); }

/* Quoted shoot embed */
.shoot-quoted { margin-left: calc(40px + .65rem); margin-top: .5rem; padding: .75rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elevated); }
.shoot-quoted-header { display: flex; align-items: center; gap: .5rem; margin-bottom: .35rem; }
.shoot-quoted-content { font-size: 13px; line-height: 1.5; color: var(--text-muted); }

/* Reshoot / Quote modal */
.shoot-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.shoot-modal { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg, 12px); width: 380px; max-width: 90vw; padding: 1.25rem; }
.shoot-modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.shoot-modal-header h3 { margin: 0; font-size: 16px; }
.shoot-modal-close { background: none; border: none; color: var(--text-dim); cursor: pointer; padding: 4px; border-radius: 4px; }
.shoot-modal-close:hover { color: var(--text); }
.shoot-char-picker { display: flex; flex-direction: column; gap: .5rem; }
.shoot-char-option { display: flex; align-items: center; gap: .65rem; padding: .5rem .75rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-input); cursor: pointer; font-size: 14px; font-weight: 600; color: var(--text); }
.shoot-char-option:hover { border-color: var(--primary); }
.shoot-char-option.active { border-color: var(--primary); background: rgba(var(--primary-rgb),.08); }
#quote-compose-wrap, #modal-compose-wrap { margin-top: 1rem; }
#quote-compose-wrap textarea, #modal-compose-wrap textarea {
  width: 100%; padding: .75rem; background: var(--bg-input); border: 1px solid var(--border-light);
  border-radius: var(--radius); color: var(--text); font-size: 14px; resize: none; font-family: inherit;
}

/* ── Thread View ─────────────────────────────────────── */
.shoot-thread-back { background: none; border: none; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; gap: .4rem; font-size: 14px; font-weight: 600; padding: .5rem 0; margin-bottom: .75rem; font-family: inherit; }
.shoot-thread-back:hover { color: var(--primary); }
.shoot-thread-parent { position: relative; }
.shoot-thread-line { position: absolute; left: 20px; top: 0; bottom: -4px; width: 2px; background: var(--border); z-index: 0; }
.shoot-thread-parent .shoot-item { position: relative; z-index: 1; }
.shoot-item--main { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem !important; margin-bottom: .75rem; }
.shoot-item--main .shoot-content { font-size: 16px; line-height: 1.6; }
.shoot-thread-divider { display: flex; align-items: center; gap: .75rem; padding: .5rem 0; color: var(--text-dim); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.shoot-thread-divider::before, .shoot-thread-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.shoot-thread-replies .shoot-item { padding-left: .5rem; border-left: 2px solid var(--border); margin-left: 20px; }

/* Reply label */
.shoot-reply-label { font-size: 12px; color: var(--text-dim); display: flex; align-items: center; gap: .35rem; padding-left: calc(40px + .65rem); margin-bottom: .35rem; }

/* Reply context (parent in replies feed) */
.shoot-reply-context { position: relative; }
.shoot-reply-context .shoot-item { opacity: .65; padding-bottom: .25rem; }
.shoot-reply-context .shoot-actions { display: none; }
.shoot-reply-connector { width: 2px; height: 12px; background: var(--border); margin-left: 20px; }

/* Action count */
.shoot-action-count { font-size: 12px; font-weight: 600; }

/* Empty state */
.shoot-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem 1rem; color: var(--text-dim); gap: .75rem; }
.shoot-empty p { margin: 0; font-size: 14px; }

/* Loading */
.shoot-loading { text-align: center; padding: 2rem; color: var(--text-dim); font-size: 14px; }

/* Load more */
.shoot-load-more { text-align: center; padding: 1rem 0; }

/* Public shoots page */
.shoots-page-header { margin-bottom: 1.5rem; }
.shoots-page-header h1 { display: flex; align-items: center; gap: .5rem; font-size: 1.5rem; font-weight: 700; }
.shoots-page-desc { color: var(--text-muted); font-size: 14px; margin-top: .25rem; }
.shoot-public-tabs { margin-bottom: 1.25rem; }
@media (max-width: 600px) {
  .shoot-public-tabs { flex-wrap: wrap; }
  .shoot-public-tabs .shoot-subtab { flex: none; min-width: 0; padding: .55rem .5rem; font-size: 12px; }
}

/* Shoot media (images & YouTube embeds) */
.shoot-media { margin-top: .5rem; }
.shoot-media-img { max-width: 100%; max-height: 400px; border-radius: var(--radius); object-fit: contain; display: block; border: 1px solid var(--border); }
.shoot-yt-embed { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--border); }
.shoot-yt-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.shoot-quoted .shoot-media { padding-left: 0; }
.shoot-quoted .shoot-media-img { max-height: 200px; }

/* Shoot compose media buttons */
.shoot-media-btns { display: flex; align-items: center; gap: .5rem; }
.shoot-media-btn { background: none; border: none; color: var(--text-dim); cursor: pointer; padding: 4px; border-radius: 4px; display: flex; align-items: center; }
.shoot-media-btn:hover { color: var(--primary); background: rgba(var(--primary-rgb),.08); }
.shoot-media-preview { display: flex; align-items: center; gap: .5rem; margin-top: .5rem; padding: .5rem; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); }
.shoot-media-preview img { max-height: 80px; max-width: 120px; border-radius: 4px; object-fit: cover; }
.shoot-media-remove { background: none; border: none; color: var(--text-dim); cursor: pointer; padding: 4px; border-radius: 4px; flex-shrink: 0; }
.shoot-media-remove:hover { color: var(--danger); background: rgba(var(--danger-rgb),.1); }
.shoot-youtube-preview { display: flex; align-items: center; gap: .5rem; margin-top: .5rem; padding: .5rem .75rem; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); }
.shoot-yt-label { display: flex; align-items: center; gap: .35rem; font-size: 13px; color: var(--text-muted); flex: 1; }

/* Inline reply */
.shoot-inline-reply { padding-left: calc(40px + .65rem); margin-top: .5rem; }
.shoot-inline-reply-inner { border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem; background: var(--bg-card); }
.shoot-inline-char-picker { display: flex; gap: .35rem; margin-bottom: .5rem; flex-wrap: wrap; }
.shoot-inline-char-opt { background: none; border: 2px solid var(--border); border-radius: 50%; cursor: pointer; padding: 0; display: flex; overflow: hidden; transition: border-color .15s; }
.shoot-inline-char-opt:hover { border-color: var(--primary); }
.shoot-inline-char-opt.active { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(var(--primary-rgb),.25); }
.shoot-inline-compose { display: flex; gap: .5rem; align-items: flex-start; }
.shoot-inline-avatar { flex-shrink: 0; }
.shoot-inline-input-wrap { flex: 1; }
.shoot-inline-ta {
  width: 100%; padding: .5rem .75rem; background: var(--bg-input); border: 1px solid var(--border-light);
  border-radius: var(--radius); color: var(--text); font-size: 13px; resize: none; font-family: inherit;
}
.shoot-inline-ta:focus { outline: none; border-color: rgba(var(--primary-rgb),.5); }

/* Clickable shoots */
.shoot-item { cursor: pointer; transition: background .12s; }
.shoot-item:hover { background: rgba(255,255,255,.015); }
.shoot-item--main:hover { background: var(--bg-card); }

/* ── User Avatar Dropdown ──────────────────────────── */
.user-menu-wrap { position: relative; display: flex; align-items: center; }
.user-menu-btn { display: flex; align-items: center; gap: .4rem; background: none; border: 1px solid transparent; color: var(--text); cursor: pointer; padding: 4px 10px 4px 4px; border-radius: 999px; font-size: 13px; font-weight: 600; font-family: inherit; transition: background .15s, border-color .15s; }
.user-menu-btn:hover { background: rgba(255,255,255,.06); border-color: var(--border); }
.user-menu-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.user-menu-avatar--letter { display: flex; align-items: center; justify-content: center; background: var(--primary); color: #fff; font-weight: 700; font-size: 13px; }
.user-menu-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-chevron { width: 14px; height: 14px; opacity: .5; }

.user-menu-dropdown { display: none; position: absolute; top: calc(100% + 8px); right: 0; width: 240px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 32px rgba(0,0,0,.35); z-index: 200; overflow: hidden; }
.user-menu-dropdown.active { display: block; }
.user-menu-section { padding: .4rem 0; border-bottom: 1px solid var(--border); }
.user-menu-section:last-child { border-bottom: none; }
.user-menu-section--bottom { padding: .3rem 0; }
.user-menu-section-label { display: block; padding: .35rem .85rem .15rem; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--text-dim); }
.user-menu-item { display: flex; align-items: center; gap: .55rem; padding: .45rem .85rem; font-size: 13px; color: var(--text); text-decoration: none; transition: background .12s; cursor: pointer; }
.user-menu-item:hover { background: rgba(255,255,255,.05); }
.user-menu-item i, .user-menu-item svg { width: 15px; height: 15px; color: var(--text-muted); flex-shrink: 0; }
.user-menu-item--danger { color: var(--danger, #e53e3e); }
.user-menu-item--danger i, .user-menu-item--danger svg { color: var(--danger, #e53e3e); }
.user-menu-char { font-weight: 600; }
.user-menu-char-img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.user-menu-char-letter { width: 22px; height: 22px; border-radius: 50%; background: var(--bg-elevated); color: var(--text-muted); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 10px; flex-shrink: 0; }
.user-menu-more { color: var(--text-dim); font-size: 12px; }


@media (max-width: 768px) {
  .user-menu-name { display: none; }
  .user-menu-chevron { display: none; }
  .user-menu-btn { padding: 4px; }
  .user-menu-dropdown { right: -20px; }
}

/* ── Notification Bell & Panel ─────────────────────── */
.notif-bell-wrap { position: relative; display: flex; align-items: center; }
.notif-bell-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 6px; border-radius: var(--radius); position: relative; display: flex; align-items: center; }
.notif-bell-btn:hover { color: var(--text); background: rgba(255,255,255,.06); }
.notif-badge { position: absolute; top: 0; right: -2px; background: var(--danger, #e53e3e); color: #fff; font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 99px; display: flex; align-items: center; justify-content: center; padding: 0 4px; line-height: 1; pointer-events: none; }
.notif-badge-mobile { position: absolute; top: 4px; right: 8px; }
.notif-bell-mobile { justify-content: flex-start; gap: .5rem; }

.notif-panel { display: none; position: absolute; top: calc(100% + 8px); right: 0; width: 360px; max-height: 480px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 32px rgba(0,0,0,.35); z-index: 200; overflow: hidden; flex-direction: column; }
.notif-panel.active { display: flex; }
.notif-panel-header { display: flex; justify-content: space-between; align-items: center; padding: .75rem 1rem; border-bottom: 1px solid var(--border); }
.notif-panel-title { font-weight: 700; font-size: 14px; color: var(--text); }
.notif-mark-read { background: none; border: none; color: var(--primary); cursor: pointer; font-size: 12px; font-weight: 600; padding: 2px 6px; border-radius: 4px; }
.notif-mark-read:hover { background: rgba(var(--primary-rgb),.1); }
.notif-panel-body { overflow-y: auto; max-height: 400px; }
.notif-empty { text-align: center; padding: 2rem 1rem; color: var(--text-dim); font-size: 13px; }

.notif-item { display: flex; gap: .65rem; padding: .75rem 1rem; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text); transition: background .15s; }
.notif-item:hover { background: rgba(255,255,255,.03); }
.notif-item:last-child { border-bottom: none; }
.notif-unread { background: rgba(var(--primary-rgb),.06); }
.notif-unread:hover { background: rgba(var(--primary-rgb),.1); }
.notif-icon { flex-shrink: 0; width: 20px; height: 20px; margin-top: 2px; }
.notif-icon--approval { color: #48bb78; }
.notif-icon--mention { color: var(--primary); }
.notif-icon--reshoot { color: #4299e1; }
.notif-icon--quote { color: #9f7aea; }
.notif-icon--admin { color: #ed8936; }
.notif-icon--default { color: var(--text-dim); }
.notif-item-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-msg { font-size: 13px; line-height: 1.4; }
.notif-time { font-size: 11px; color: var(--text-dim); }
.notif-admin-tag { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #ed8936; margin-bottom: 2px; }

@media (max-width: 768px) {
  .notif-panel { width: calc(100vw - 2rem); right: -60px; }
}

/* ── @Mention Autocomplete ─────────────────────────── */
.mention-dropdown { position: absolute; z-index: 100; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 4px 16px rgba(0,0,0,.25); max-height: 200px; overflow-y: auto; width: 260px; display: none; }
.mention-dropdown.active { display: block; }
.mention-option { display: flex; align-items: center; gap: .6rem; padding: .5rem .75rem; cursor: pointer; font-size: 13px; color: var(--text); border-bottom: 1px solid var(--border); }
.mention-option:last-child { border-bottom: none; }
.mention-option:hover, .mention-option.focused { background: rgba(var(--primary-rgb),.1); }
.mention-option img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.mention-option .mention-letter { width: 28px; height: 28px; border-radius: 50%; background: var(--bg-elevated); color: var(--text-muted); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; flex-shrink: 0; }
.mention-option-info { display: flex; flex-direction: column; min-width: 0; }
.mention-option-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mention-option-handle { font-size: 11px; color: var(--text-dim); }

/* ── Momentum V2 ────────────────────────────────────── */
.char-momentum-v2 { display: flex; align-items: center; gap: .75rem; }
.char-momentum-v2 .momentum-bar { flex: 1; height: 8px; }
.char-momentum-num { font-size: 18px; font-weight: 800; color: var(--primary); min-width: 28px; text-align: right; }

/* ── Divisions V2 ───────────────────────────────────── */
.char-divisions { display: flex; gap: 6px; flex-wrap: wrap; }
.char-division-badge {
  display: inline-block; padding: 5px 14px; border-radius: var(--radius);
  background: rgba(var(--text-rgb),.06); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 13px; font-weight: 500;
  text-decoration: none; transition: all .15s;
}
.char-division-badge:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }

/* ── Championships V2 ───────────────────────────────── */
.char-titles-grid { display: flex; flex-wrap: wrap; gap: .75rem; }
.char-title-card-v2 {
  display: flex; align-items: center; gap: 1rem; padding: 1rem;
  background: rgba(var(--primary-rgb),.06); border: 1px solid rgba(var(--primary-rgb),.2);
  border-radius: var(--radius); transition: all .15s;
}
.char-title-card-v2:hover { border-color: var(--primary); }
.char-title-belt { width: 48px; height: 48px; object-fit: contain; }
.char-title-name { font-weight: 600; font-size: 14px; }
.char-title-status { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; font-weight: 700; }
.char-title-status.current { color: var(--success); }
.char-title-status.former { color: var(--text-muted); }

/* ── Match History Cards ─────────────────────────────── */
.match-card {
  display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem;
  border: 1px solid var(--border); background: var(--bg-card);
  border-radius: var(--radius); margin-bottom: .5rem; transition: all .2s;
  text-decoration: none; color: var(--text);
}
.match-card:hover {
  border-color: rgba(var(--primary-rgb),.3); text-decoration: none;
  transform: translateX(4px);
}
.match-card.win { border-left: 3px solid var(--success); }
.match-card.loss { border-left: 3px solid var(--danger); }
.match-card.draw { border-left: 3px solid var(--text-muted); }
.match-result-badge {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 13px; color: #fff; flex-shrink: 0;
}
.match-card.win .match-result-badge { background: var(--success); }
.match-card.loss .match-result-badge { background: var(--danger); }
.match-card.draw .match-result-badge { background: var(--text-muted); }
.match-card-info { flex: 1; min-width: 0; }
.match-card-info strong { font-size: 14px; display: block; font-weight: 600; }
.match-card-meta { font-size: 12px; color: var(--text-muted); margin-top: 3px; display: flex; gap: .75rem; }
.match-card-meta span { white-space: nowrap; }

/* ── Legacy match-row (used in episode pages) ────────── */
.match-row { display: flex; align-items: center; gap: .75rem; padding: .75rem; border-bottom: 1px solid var(--border); font-size: 14px; }
.match-row .match-result-badge { width: 28px; height: 28px; font-size: 12px; }
.match-row.win .match-result-badge { background: var(--success); }
.match-row.loss .match-result-badge { background: var(--danger); }
.match-type { color: var(--primary); font-weight: 600; min-width: 100px; }
.match-detail { flex: 1; }

/* ── Media Links ─────────────────────────────────────── */
.char-media-links { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ── Character Submission Form ────────────────────────── */
.char-form-section {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1.5rem;
}
.char-form-section-title {
  font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  color: var(--primary); margin-bottom: 1.25rem; padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
}
.char-form-preview {
  background: var(--bg-alt); border: 2px dashed var(--border-light);
  border-radius: var(--radius); padding: 2rem; text-align: center;
  color: var(--text-dim); font-size: 14px; cursor: pointer;
  transition: all .2s;
}
.char-form-preview:hover { border-color: var(--primary); color: var(--text-muted); }
.char-form-preview img {
  max-height: 120px; border-radius: var(--radius); margin-bottom: .5rem;
}
.char-form-hint {
  font-size: 12px; color: var(--text-dim); margin-top: 4px; line-height: 1.4;
}

/* ── Wizard Progress ──────────────────────────────────── */
.wizard-progress {
  display: flex; gap: 4px; margin-bottom: 1.5rem;
}
.wizard-step {
  flex: 1; display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--border);
  cursor: default; transition: all .2s; user-select: none;
}
.wizard-step.done { cursor: pointer; border-color: rgba(var(--success-rgb),.3); }
.wizard-step.active { border-color: var(--primary); background: rgba(var(--primary-rgb),.06); }
.wizard-step-num {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  font-size: 13px; font-weight: 700;
  background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border);
  transition: all .2s;
}
.wizard-step.active .wizard-step-num { background: var(--primary); color: #fff; border-color: var(--primary); }
.wizard-step.done .wizard-step-num { background: var(--success); color: #fff; border-color: var(--success); }
.wizard-step-label { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.wizard-step.active .wizard-step-label { color: var(--text); }
.wizard-step.done .wizard-step-label { color: var(--success); }
.wizard-nav {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; margin-top: 1rem;
}
@media (max-width: 480px) {
  .wizard-step { padding: 10px; gap: 6px; }
  .wizard-step-label { font-size: 11px; }
  .wizard-step-num { width: 24px; height: 24px; font-size: 11px; }
}

/* ── Rundown Items (episode page) ──────────────────────── */
.rundown-item {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1.5rem; margin-bottom: .75rem;
  background: var(--bg-card); border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: all .2s;
}
.rundown-item:hover {
  border-color: rgba(var(--primary-rgb),.3);
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
  transform: translateX(4px);
}
.rundown-type {
  font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--show-color, var(--primary)); font-weight: 800; margin-bottom: .35rem;
}
.rundown-participants { margin: .5rem 0; font-size: 16px; font-weight: 600; }
.rundown-result { color: var(--text-muted); font-size: 14px; }

/* ── Article Body ──────────────────────────────────────── */
.article-body { line-height: 1.8; font-size: 16px; }
.article-body p { margin-bottom: 1rem; }
.article-body h2 { font-size: 22px; margin: 2rem 0 .75rem; }
.article-body h3 { font-size: 18px; margin: 1.5rem 0 .5rem; }
.article-body img { border-radius: var(--radius); margin: 1rem 0; }
.article-body blockquote { border-left: 3px solid var(--primary); padding-left: 1rem; color: var(--text-muted); margin: 1rem 0; }

/* ══════════════════════════════════════════════════════════
   Homepage — Bento Grid
   ══════════════════════════════════════════════════════════ */

/* ── Hero Banner ──────────────────────────────────────── */
.home-hero {
  position: relative; overflow: hidden;
  padding: 6rem 0 4.5rem;
  border-bottom: 1px solid var(--border);
}
.home-hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 80%, rgba(var(--primary-rgb),.2) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(var(--primary-rgb),.1) 0%, transparent 50%),
    linear-gradient(180deg, rgba(var(--primary-rgb),.08) 0%, transparent 100%);
}
/* Page header image as hero background */
[data-has-header-bg] .home-hero-bg::before {
  content: ''; position: absolute; inset: 0;
  background-image: var(--page-bg-image);
  background-size: cover; background-repeat: no-repeat;
  background-position: var(--page-bg-pos, center center);
  opacity: .25;
}
.home-hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(var(--bg-rgb),0.4) 0%, rgba(var(--bg-rgb),0.7) 100%);
  pointer-events: none;
}
.home-hero-inner {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 3rem;
}
.home-hero-text { max-width: 600px; }
.home-hero-tag {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 3px;
  text-transform: uppercase; color: var(--primary); margin-bottom: 1rem;
  padding: 5px 14px; border: 1px solid rgba(var(--primary-rgb),.3);
  border-radius: 4px; background: rgba(var(--primary-rgb),.08);
}
.home-hero h1 {
  font-size: 48px; font-weight: 900; letter-spacing: -2px; line-height: 1.05;
  text-transform: uppercase;
  background: linear-gradient(180deg, var(--text) 40%, var(--text-muted) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.home-hero-sub {
  color: var(--text-muted); font-size: 17px; margin-top: 1rem; line-height: 1.6;
}
.home-hero-stats {
  display: flex; gap: 1rem;
}
.home-stat {
  text-align: center; padding: 1.25rem 1.5rem;
  background: rgba(var(--bg-card-rgb),.85); border: 1px solid var(--border);
  border-radius: var(--radius-lg); min-width: 100px;
  backdrop-filter: blur(12px);
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.home-stat:hover {
  border-color: rgba(var(--primary-rgb),.4);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.3);
}
.home-stat-num {
  display: block; font-size: 32px; font-weight: 900; color: var(--primary);
  letter-spacing: -0.5px; line-height: 1;
}
.home-stat-label {
  font-size: 11px; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 1px; font-weight: 600; margin-top: 6px;
}

/* ── Bento Container ─────────────────────────────────── */
.home-bento { padding: 2.5rem 0 1rem; }

/* ── Bento Section Headers ───────────────────────────── */
.bento-section { margin-bottom: 2.5rem; }
.bento-section-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1.5rem; padding-bottom: .75rem;
  border-bottom: 2px solid var(--border);
}
.bento-section-head h2 {
  font-size: 20px; font-weight: 900; letter-spacing: -0.3px; text-transform: uppercase;
  position: relative; padding-left: 12px;
}
.bento-section-head h2::before {
  content: ''; position: absolute; left: 0; top: 2px; bottom: 2px;
  width: 3px; background: var(--primary); border-radius: 2px;
}
.bento-more {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; color: var(--text-muted); font-weight: 600;
  text-decoration: none; transition: all .15s;
  padding: 4px 10px; border-radius: var(--radius);
}
.bento-more:hover { color: var(--primary); background: rgba(var(--primary-rgb),.06); text-decoration: none; }

/* ── Bento Card (generic panel) ──────────────────────── */
.bento-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 2rem;
  transition: border-color .2s;
}
.bento-card:hover { border-color: rgba(var(--primary-rgb),.2); }
.bento-card-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border);
}
.bento-card-head h2 { font-size: 16px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
.bento-card-head h2::after {
  content: ''; display: inline-block; width: 6px; height: 6px;
  background: var(--primary); border-radius: 50%; margin-left: 8px;
  vertical-align: middle;
}

/* ── Tags ─────────────────────────────────────────────── */
.bento-tag {
  display: inline-block; padding: 3px 10px; border-radius: 4px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  background: var(--primary); color: #fff;
}
.bento-tag--sm { font-size: 10px; padding: 2px 7px; }

/* ── News Grid ────────────────────────────────────────── */
.bento-news-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem;
}
.bento-news-grid--single { grid-template-columns: 1fr; }
.bento-news-grid--single .bento-news-hero { min-height: 420px; }
.bento-news-hero {
  display: block; position: relative; border-radius: var(--radius-lg);
  overflow: hidden; min-height: 380px; text-decoration: none; color: var(--text);
  border: 1px solid var(--border); transition: all .25s;
}
.bento-news-hero:hover { border-color: var(--primary); text-decoration: none; transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,.4); }
.bento-news-hero-img {
  position: absolute; inset: 0; background-size: cover; background-position: var(--img-pos, top);
  transition: transform .4s;
}
.bento-news-hero:hover .bento-news-hero-img { transform: scale(1.03); }
.bento-news-hero-img--empty {
  background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-card) 100%);
}
.bento-news-hero-overlay {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 2rem;
  background: linear-gradient(0deg, rgba(0,0,0,.9) 0%, rgba(0,0,0,.6) 50%, transparent 100%);
  z-index: 2;
}
.bento-news-hero-overlay h3 { font-size: 22px; font-weight: 800; margin-top: .5rem; line-height: 1.25; }
.bento-news-hero-overlay p { color: var(--text-muted); font-size: 14px; margin-top: .5rem; line-height: 1.5; }
.bento-news-date { font-size: 12px; color: var(--text-dim); margin-top: .5rem; display: block; }

.bento-news-side { display: flex; flex-direction: column; gap: 1rem; }
.bento-news-card {
  display: flex; gap: 1rem; text-decoration: none; color: var(--text);
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; transition: all .2s; flex: 1;
}
.bento-news-card:hover { border-color: rgba(var(--primary-rgb),.5); text-decoration: none; transform: translateX(4px); }
.bento-news-card-img {
  width: 140px; min-height: 100%; flex-shrink: 0;
  background-size: cover; background-position: var(--img-pos, top);
}
.bento-news-card-body { padding: 1rem; display: flex; flex-direction: column; justify-content: center; }
.bento-news-card-body h4 { font-size: 14px; font-weight: 700; line-height: 1.35; margin-top: .35rem; }

/* ── 2-Column Row ─────────────────────────────────────── */
.bento-row-2col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem;
  margin-bottom: 0;
}
.bento-row-2col--single { grid-template-columns: 1fr; }

/* ── Shows List ───────────────────────────────────────── */
.bento-shows-list { display: flex; flex-direction: column; gap: .5rem; }
.bento-show-item {
  display: flex; align-items: center; gap: 1rem; padding: .85rem;
  border-radius: var(--radius); transition: all .15s;
  text-decoration: none; color: var(--text);
  border: 1px solid transparent;
}
.bento-show-item:hover { background: rgba(var(--text-rgb),.03); border-color: var(--border); text-decoration: none; }
.bento-show-date {
  display: flex; flex-direction: column; align-items: center;
  min-width: 48px; padding: 6px 10px; border-radius: var(--radius);
  background: rgba(var(--primary-rgb),.1); border: 1px solid rgba(var(--primary-rgb),.2);
}
.bento-show-month { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--primary); letter-spacing: .5px; }
.bento-show-day { font-size: 20px; font-weight: 900; line-height: 1; color: var(--text); }
.bento-show-info { flex: 1; min-width: 0; }
.bento-show-brand { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--primary); }
.bento-show-info h4 { font-size: 14px; font-weight: 600; margin-top: 2px; }
.bento-show-meta { font-size: 12px; color: var(--text-dim); }
.bento-show-arrow { font-size: 24px; color: var(--text-dim); font-weight: 300; }

/* ── Championships List ───────────────────────────────── */
.bento-champs-list { display: flex; flex-direction: column; gap: .75rem; }
.bento-champ-item {
  display: flex; align-items: center; gap: 1rem; padding: .85rem 1rem;
  background: rgba(var(--primary-rgb),.04); border: 1px solid rgba(var(--primary-rgb),.15);
  border-radius: var(--radius); transition: all .2s; text-decoration: none; color: inherit; cursor: pointer;
}
.bento-champ-item:hover { border-color: rgba(var(--primary-rgb),.4); transform: translateX(4px); text-decoration: none; }
.bento-champ-belt { width: 44px; height: 44px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.bento-champ-belt img { width: 100%; height: 100%; object-fit: contain; }
.bento-champ-belt span { font-size: 28px; }
.bento-champ-info { flex: 1; min-width: 0; }
.bento-champ-info h4 { font-size: 14px; font-weight: 700; color: var(--text); }
.bento-champ-holder { font-size: 13px; color: var(--primary); font-weight: 600; }
.bento-champ-avatar-link { flex-shrink: 0; cursor: pointer; border-radius: 50%; transition: transform .15s; }
.bento-champ-avatar-link:hover { transform: scale(1.15); }
.bento-champ-avatar {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover; display: block;
  border: 2px solid rgba(var(--primary-rgb),.3); flex-shrink: 0; transition: border-color .15s;
}
.bento-champ-avatar-link:hover .bento-champ-avatar { border-color: var(--primary); }

/* ── Rankings List ────────────────────────────────────── */
.bento-rankings-list { display: flex; flex-direction: column; }
.bento-rank-item {
  display: flex; align-items: center; gap: .75rem; padding: .6rem .25rem;
  border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text);
  transition: all .15s;
}
.bento-rank-item:last-child { border: none; }
.bento-rank-item:hover { background: rgba(var(--text-rgb),.03); text-decoration: none; }
.bento-rank-pos {
  width: 28px; text-align: center; font-size: 14px; font-weight: 900;
  color: var(--text-dim); flex-shrink: 0;
}
.bento-rank-item:nth-child(1) .bento-rank-pos { color: var(--primary); font-size: 16px; }
.bento-rank-item:nth-child(1) { background: rgba(var(--primary-rgb),.04); }
.bento-rank-item:nth-child(2) .bento-rank-pos { color: var(--text-muted); }
.bento-rank-item:nth-child(3) .bento-rank-pos { color: var(--text-muted); }
.bento-rank-avatar {
  width: 36px; height: 36px; border-radius: 50%; overflow: hidden;
  background: var(--bg-elevated); flex-shrink: 0; display: flex; align-items: center; justify-content: center;
}
.bento-rank-avatar img { width: 100%; height: 100%; object-fit: cover; }
.bento-rank-avatar span { font-size: 14px; font-weight: 700; color: var(--text-dim); }
.bento-rank-info { flex: 1; min-width: 0; }
.bento-rank-info h4 { font-size: 14px; font-weight: 600; }
.bento-rank-record { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.bento-w { color: var(--success); }
.bento-l { color: var(--danger); margin-left: 4px; }
.bento-d { color: var(--text-muted); margin-left: 4px; }
.bento-rank-momentum { width: 80px; flex-shrink: 0; }
.bento-rank-momentum .momentum-bar { margin-top: 0; height: 8px; }

/* ── Sidebar Stack ────────────────────────────────────── */
.bento-sidebar-stack { display: flex; flex-direction: column; gap: 0; }
.bento-sidebar-stack .bento-card { margin-bottom: 1.25rem; }

/* ── Storylines List ──────────────────────────────────── */
.bento-storylines-list { display: flex; flex-direction: column; gap: .5rem; }
.bento-storyline-item {
  display: flex; align-items: center; gap: .75rem; padding: .75rem;
  border-radius: var(--radius); text-decoration: none; color: var(--text);
  border: 1px solid transparent; transition: all .15s;
}
.bento-storyline-item:hover { background: rgba(var(--text-rgb),.03); border-color: var(--border); text-decoration: none; }
.bento-storyline-phase {
  width: 4px; height: 36px; border-radius: 2px; flex-shrink: 0;
}
.bento-storyline-info { flex: 1; min-width: 0; }
.bento-storyline-info h4 { font-size: 14px; font-weight: 600; }
.bento-storyline-meta { font-size: 12px; color: var(--text-muted); }
.bento-storyline-badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  padding: 3px 8px; border-radius: 4px; background: rgba(var(--text-rgb),.06);
  color: var(--text-muted); flex-shrink: 0;
}

/* ── Rivalries List ───────────────────────────────────── */
.bento-rivalries-list { display: flex; flex-direction: column; gap: .5rem; }
.bento-rivalry-item {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .75rem; border-radius: var(--radius);
  text-decoration: none; color: var(--text);
  border: 1px solid transparent; transition: all .15s;
}
.bento-rivalry-item:hover { background: rgba(var(--text-rgb),.03); border-color: var(--border); text-decoration: none; }
.bento-rivalry-sides { display: flex; align-items: center; gap: .5rem; flex: 1; min-width: 0; }
.bento-rivalry-side { font-size: 13px; font-weight: 600; }
.bento-rivalry-vs {
  font-size: 10px; font-weight: 900; color: var(--primary);
  padding: 2px 6px; background: rgba(var(--primary-rgb),.12); border-radius: 3px;
  flex-shrink: 0;
}
.bento-rivalry-intensity { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; flex-shrink: 0; }

/* ── Recent Results ───────────────────────────────────── */
.bento-results-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .75rem;
}
.bento-result-item {
  padding: 1rem; padding-left: 1.25rem; border-radius: var(--radius);
  background: rgba(var(--text-rgb),.02); border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  transition: all .15s;
}
.bento-result-item:hover { border-color: rgba(var(--primary-rgb),.3); }
.bento-result-type {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--primary); margin-bottom: .35rem;
}
.bento-result-matchup { font-size: 14px; font-weight: 700; line-height: 1.35; }
.bento-result-winner { font-size: 12px; color: var(--success); margin-top: .35rem; }
.bento-result-winner span { color: var(--text-muted); }
.bento-result-finish { font-size: 12px; color: var(--text-dim); margin-top: .25rem; font-style: italic; }
.bento-result-date { font-size: 11px; color: var(--text-dim); margin-top: .5rem; display: block; }

/* ── Roster Spotlight Grid ────────────────────────────── */
.bento-roster-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem;
}
.bento-roster-card {
  display: block; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  text-decoration: none; color: var(--text); transition: all .25s;
}
.bento-roster-card:hover {
  border-color: rgba(var(--primary-rgb),.5); transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.3); text-decoration: none;
}
.bento-roster-img {
  position: relative; height: 220px; overflow: hidden;
  background: var(--bg-elevated);
}
.bento-roster-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.bento-roster-card:hover .bento-roster-img img { transform: scale(1.05); }
.bento-roster-overlay {
  position: absolute; top: 8px; left: 8px;
}
.bento-roster-info { padding: .85rem 1rem; }
.bento-roster-info h4 { font-size: 14px; font-weight: 700; }
.bento-roster-record { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.bento-roster-card .momentum-bar { margin: .5rem 1rem .85rem; }

/* ── CTA Row ──────────────────────────────────────────── */
.bento-cta-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
  margin: 1.5rem 0 2.5rem;
}
.bento-cta {
  display: flex; align-items: center; gap: 1rem; padding: 1.25rem 1.5rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); text-decoration: none; color: var(--text);
  transition: all .25s;
}
.bento-cta:hover {
  border-color: rgba(var(--primary-rgb),.5); text-decoration: none;
  transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.bento-cta:hover .bento-cta-icon svg { color: var(--primary); }
.bento-cta-icon {
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 12px;
  background: rgba(var(--primary-rgb),.08); border: 1px solid rgba(var(--primary-rgb),.15);
  transition: background .25s, border-color .25s;
}
.bento-cta:hover .bento-cta-icon { background: rgba(var(--primary-rgb),.15); border-color: rgba(var(--primary-rgb),.3); }
.bento-cta-icon svg {
  width: 22px; height: 22px; color: var(--text-muted);
  transition: color .25s;
}
.bento-cta-text { font-size: 13px; line-height: 1.4; color: var(--text-muted); }
.bento-cta-text strong { display: block; font-size: 15px; color: var(--text); font-weight: 700; margin-bottom: 2px; }

/* ══════════════════════════════════════════════════════════
   Show Cards & Pages
   ══════════════════════════════════════════════════════════ */

/* ── Show Card Grid (shows.php) ──────────────────────── */
.show-card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem;
}
.show-card {
  display: block; position: relative; border-radius: var(--radius-lg);
  overflow: hidden; min-height: 220px; text-decoration: none; color: var(--text);
  border: 1px solid var(--border); transition: all .3s ease;
}
.show-card:hover {
  border-color: var(--show-color, var(--primary));
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,.4), 0 0 0 1px var(--show-color, var(--primary));
  text-decoration: none;
}
.show-card-banner {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  transition: transform .5s ease;
}
.show-card:hover .show-card-banner { transform: scale(1.05); }
.show-card-banner--empty {
  background: linear-gradient(135deg,
    rgba(var(--primary-rgb),.2) 0%,
    var(--bg-card) 60%,
    rgba(var(--primary-rgb),.08) 100%
  );
}
.show-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg,
    rgba(var(--bg-rgb),1) 0%,
    rgba(var(--bg-rgb),.85) 40%,
    rgba(var(--bg-rgb),.5) 70%,
    rgba(var(--bg-rgb),.3) 100%
  );
}
.show-card-content {
  position: relative; z-index: 2; padding: 1.5rem;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 220px;
}
.show-card-logo {
  max-height: 56px; max-width: 200px; width: auto; object-fit: contain;
  margin-bottom: .75rem; filter: drop-shadow(0 2px 8px rgba(0,0,0,.5));
}
.show-card-name {
  font-size: 24px; font-weight: 900; text-transform: uppercase;
  letter-spacing: -0.5px; margin-bottom: .5rem;
  text-shadow: 0 2px 8px rgba(0,0,0,.5);
}
.show-card-meta {
  display: flex; gap: 1rem; margin-bottom: .5rem;
}
.show-card-type, .show-card-episodes {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 600; color: var(--text-muted);
}
.show-card-type svg, .show-card-episodes svg { color: var(--show-color, var(--primary)); }
.show-card-schedule {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--text-dim);
}
.show-card-latest {
  font-size: 12px; color: var(--text-dim); margin-top: .25rem;
}
.show-card-accent {
  position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: var(--show-color, var(--primary));
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease;
}
.show-card:hover .show-card-accent { transform: scaleX(1); }

/* ── Show Hero (show.php) ────────────────────────────── */
.show-hero {
  position: relative; overflow: hidden; min-height: 280px;
  border-bottom: 1px solid var(--border);
}
.show-hero-banner {
  position: absolute; inset: 0; background-size: cover; background-position: center;
}
.show-hero-banner--empty {
  background: linear-gradient(135deg, rgba(var(--primary-rgb),.15) 0%, transparent 60%);
}
.show-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg,
    var(--bg) 0%, rgba(var(--bg-rgb),.9) 30%,
    rgba(var(--bg-rgb),.6) 60%, rgba(var(--bg-rgb),.4) 100%
  );
}
.show-hero-content {
  position: relative; z-index: 2; padding-top: 3rem; padding-bottom: 2.5rem;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 280px;
}
.show-hero-logo {
  max-height: 72px; max-width: 280px; width: auto; object-fit: contain;
  margin-bottom: 1rem; filter: drop-shadow(0 2px 12px rgba(0,0,0,.5));
}
.show-hero-name {
  font-size: 40px; font-weight: 900; text-transform: uppercase;
  letter-spacing: -1px; margin-bottom: .5rem;
  text-shadow: 0 2px 12px rgba(0,0,0,.5);
}
.show-hero-desc {
  color: var(--text-muted); font-size: 16px; max-width: 600px;
  line-height: 1.5; margin-bottom: 1rem;
}
.show-hero-stats {
  display: flex; gap: 1.25rem; flex-wrap: wrap;
}
.show-hero-stat {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; color: var(--text-muted); font-weight: 500;
}
.show-hero-stat svg {
  width: 16px; height: 16px; color: var(--show-color, var(--primary));
}

/* ── Episode List (show.php) ─────────────────────────── */
.episode-list { display: flex; flex-direction: column; gap: .75rem; }
.episode-card {
  display: flex; align-items: center; gap: 1.25rem; padding: 1.25rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); text-decoration: none; color: var(--text);
  transition: all .2s; border-left: 3px solid var(--show-color, var(--primary));
}
.episode-card:hover {
  border-color: var(--show-color, var(--primary));
  border-left-color: var(--show-color, var(--primary));
  transform: translateX(4px); text-decoration: none;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
}
.episode-card-date {
  display: flex; flex-direction: column; align-items: center;
  min-width: 56px; padding: 8px 12px; border-radius: var(--radius);
  background: rgba(var(--text-rgb),.04); text-align: center;
}
.episode-card-month {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  color: var(--show-color, var(--primary)); letter-spacing: .5px;
}
.episode-card-day { font-size: 22px; font-weight: 900; line-height: 1.1; }
.episode-card-year { font-size: 10px; color: var(--text-dim); }
.episode-card-info { flex: 1; min-width: 0; }
.episode-card-info h3 { font-size: 16px; font-weight: 700; margin-bottom: .35rem; }
.episode-card-meta {
  display: flex; gap: 1rem; font-size: 13px; color: var(--text-muted); flex-wrap: wrap;
}
.episode-card-meta span {
  display: inline-flex; align-items: center; gap: 4px;
}
.episode-card-meta svg { color: var(--show-color, var(--primary)); }
.episode-card-status {
  padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .3px;
  background: rgba(var(--success-rgb),.12); color: var(--success);
}
.episode-card-arrow {
  flex-shrink: 0; color: var(--text-dim); transition: color .2s;
}
.episode-card-arrow svg { width: 20px; height: 20px; }
.episode-card:hover .episode-card-arrow { color: var(--show-color, var(--primary)); }

/* ── Episode Hero (episode.php) ──────────────────────── */
.episode-hero {
  position: relative; overflow: hidden; min-height: 200px;
  border-bottom: 1px solid var(--border);
}
.episode-hero-bg {
  position: absolute; inset: 0; background-size: cover;
  background-position: center; opacity: .25; filter: blur(2px);
}
.episode-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg,
    var(--bg) 0%, rgba(var(--bg-rgb),.95) 40%,
    rgba(var(--bg-rgb),.8) 100%
  );
}
.episode-hero-content {
  position: relative; z-index: 2; padding-top: 2rem; padding-bottom: 2rem;
  min-height: 200px; display: flex; flex-direction: column; justify-content: flex-end;
}
.episode-hero-brand {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--show-color, var(--primary));
  text-decoration: none; margin-bottom: .75rem; transition: opacity .15s;
}
.episode-hero-brand:hover { opacity: .8; text-decoration: none; }
.episode-hero-brand-logo {
  height: 28px; width: auto; object-fit: contain;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,.3));
}
.episode-hero-content h1 {
  font-size: 32px; font-weight: 900; text-transform: uppercase;
  letter-spacing: -0.5px;
}
.episode-hero-meta {
  display: flex; gap: 1.25rem; margin-top: .75rem; flex-wrap: wrap;
}
.episode-hero-meta span {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; color: var(--text-muted);
}
.episode-hero-meta svg {
  width: 16px; height: 16px; color: var(--show-color, var(--primary));
}

/* ── Rundown with numbers ────────────────────────────── */
.rundown-list { display: flex; flex-direction: column; gap: .75rem; }
.rundown-number {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: var(--show-color, var(--primary));
  background: rgba(var(--primary-rgb),.08); border: 1px solid rgba(var(--primary-rgb),.2);
  margin-top: .25rem;
}
.rundown-body { flex: 1; min-width: 0; }
.rundown-winner {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--success); font-size: 14px; margin: .25rem 0;
}
.rundown-winner svg { color: var(--success); }

/* ── Homepage bento show logo ────────────────────────── */
.bento-show-logo {
  height: 24px; width: auto; object-fit: contain; flex-shrink: 0;
  opacity: .8; transition: opacity .2s;
}
.bento-show-item:hover .bento-show-logo { opacity: 1; }
.bento-show-date {
  border-color: var(--show-color, rgba(var(--primary-rgb),.2));
}
.bento-show-month { color: var(--show-color, var(--primary)); }

/* ══════════════════════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════════════════════ */

/* ── Character Profile Responsive ──────────────────────── */
@media (max-width: 768px) {
  .char-hero-v2 { min-height: 300px; }
  .char-hero-content { min-height: 300px; padding-bottom: 1.5rem; }
  .char-hero-name { font-size: 28px; letter-spacing: -0.5px; }
  .char-hero-info { max-width: 100%; }
  .char-hero-render { display: none; }
  .char-hero-nicknames { font-size: 11px; letter-spacing: 1px; }
  .char-grid-v2 { grid-template-columns: 1fr; gap: 1.5rem; }
  .char-sidebar { order: -1; }
  .char-panel-v2 { padding: 1.25rem; }
  .roster-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .75rem; }
  .roster-card-img { height: 180px; }
  .match-card { padding: .85rem 1rem; word-break: break-word; }
  .match-card:hover { transform: translateX(2px); }
  .rundown-item { padding: 1rem; gap: .75rem; }
  .rundown-item:hover { transform: translateX(2px); }
  .show-card-grid { grid-template-columns: 1fr; }
  .show-card-content { min-height: 180px; padding: 1rem; }
  .show-hero { min-height: 220px; }
  .show-hero-content { min-height: 220px; padding-top: 2rem; }
  .show-hero-name { font-size: 28px; }
  .show-hero-logo { max-height: 56px; }
  .episode-hero-content h1 { font-size: 24px; }
  .episode-card { flex-wrap: wrap; gap: 1rem; }
  .episode-card-date { flex-direction: row; gap: 6px; min-width: auto; }
  .episode-card-arrow { display: none; }
  .rundown-number { width: 28px; height: 28px; font-size: 12px; }

  /* Phase 2: Content page enhancements */
  .char-hero-bio { font-size: 14px; }
  .char-panel-header { margin-bottom: 1rem; padding-bottom: .75rem; }
  .roster-card-info { padding: .75rem .75rem .6rem; }
  .roster-card-info h3 { font-size: 14px; }
}

/* ── Homepage Responsive ──────────────────────────────── */
@media (max-width: 900px) {
  .home-hero-inner { flex-direction: column; text-align: center; }
  .home-hero h1 { font-size: 34px; letter-spacing: -1px; }
  .home-hero-stats { justify-content: center; flex-wrap: wrap; }
  .bento-news-grid { grid-template-columns: 1fr; }
  .bento-news-hero { min-height: 280px; }
  .bento-row-2col { grid-template-columns: 1fr; }
  .bento-cta-row { grid-template-columns: 1fr 1fr; }
  .bento-roster-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .bento-results-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

  /* Phase 3: Homepage section heads */
  .bento-section-head { flex-wrap: wrap; gap: .5rem; }
  .bento-section-head h2 { font-size: 18px; }
  .bento-roster-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}
@media (max-width: 480px) {
  .home-hero { padding: 3rem 0 2rem; }
  .home-hero h1 { font-size: 26px; letter-spacing: -0.5px; }
  .home-hero-stats { gap: .75rem; }
  .home-stat { min-width: 70px; padding: .75rem; }
  .home-stat-num { font-size: 22px; }
  .bento-cta-row { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 24px; }
  .bento-section-head h2 { font-size: 16px; }
  .card-grid { grid-template-columns: 1fr; }
  .filter-form select { width: 100%; }

  /* Phase 3: News cards stack image above text */
  .bento-news-card { flex-direction: column; }
  .bento-news-card-img { width: 100%; height: 140px; min-height: 140px; }
  .bento-news-hero { min-height: 200px; }
  .home-hero-sub { font-size: 14px; }
  .home-stat { min-width: 60px; padding: .5rem; }
  .home-stat-label { font-size: 10px; }

  /* Phase 1: Footer single column */
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-main { padding: 2rem 0; }
}

/* ── Phase 5: Touch device polish ─────────────────────── */
@media (hover: none) {
  :root { --card-hover-translate: 0px; }
  .card:hover { transform: none; box-shadow: none; }
  .roster-card:hover { transform: none; box-shadow: none; }
  .champ-card:hover { box-shadow: none; }
  .bento-news-card:hover { transform: none; }
  .match-card:hover { transform: none; }
  .rundown-item:hover { transform: none; }
}

/* ── Phase 5: Scroll padding for sticky nav ───────────── */
html { scroll-padding-top: 80px; }

/* ── Phase 5: Combo dropdown viewport safety ──────────── */
@media (max-width: 768px) {
  .combo-dropdown { position: fixed; left: 1rem; right: 1rem; top: auto; bottom: 0; max-height: 50vh; border-radius: var(--radius) var(--radius) 0 0; z-index: 200; }
}

/* ── Mobile Bottom Navigation Bar ─────────────────────── */
.mobile-bottom-nav { display: none; }

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
    background: rgba(var(--bg-rgb), .95);
    backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
    border-top: 1px solid var(--border);
    padding: 6px 0; padding-bottom: max(6px, env(safe-area-inset-bottom));
    justify-content: space-around; align-items: center;
  }
  .mobile-bottom-nav-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; text-decoration: none; color: var(--text-muted);
    font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px;
    padding: 4px 0; min-width: 56px; transition: color .15s;
  }
  .mobile-bottom-nav-item:hover { text-decoration: none; }
  .mobile-bottom-nav-item svg { width: 22px; height: 22px; }
  .mobile-bottom-nav-item.active { color: var(--primary); }
  .mobile-bottom-nav-item.active svg { color: var(--primary); }

  /* Center plus button */
  .mobile-bottom-nav-center { position: relative; }
  .mobile-bottom-nav-plus {
    display: flex; align-items: center; justify-content: center;
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--primary); color: #fff;
    box-shadow: 0 4px 16px rgba(var(--primary-rgb), .4);
    margin-top: -20px; transition: transform .15s, box-shadow .15s;
  }
  .mobile-bottom-nav-plus svg { width: 26px; height: 26px; stroke-width: 2.5; }
  .mobile-bottom-nav-center:active .mobile-bottom-nav-plus { transform: scale(.92); }

  /* Add bottom padding to body so content isn't hidden behind nav */
  body { padding-bottom: 72px; }
  .admin-body { padding-bottom: 0; }
}

/* ============================================================
   Tournament Bracket Styles
   ============================================================ */

/* ── Stat Cards ───────────────────────────────────────────── */
.tournament-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
  margin-bottom: 1.5rem;
}
.tournament-stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem; text-align: center;
}
.tournament-stat-number {
  font-size: 32px; font-weight: 900; color: var(--primary); line-height: 1;
}
.tournament-stat-label {
  font-size: 13px; color: var(--text-muted); margin-top: 4px; text-transform: uppercase;
  letter-spacing: .5px;
}

/* ── Filter Tabs ──────────────────────────────────────────── */
.tournament-filter-tabs {
  display: flex; gap: 4px; margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border); padding-bottom: 0;
}
.tournament-filter-tab {
  padding: 8px 16px; font-size: 14px; font-weight: 600;
  color: var(--text-muted); text-decoration: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.tournament-filter-tab:hover { color: var(--text); text-decoration: none; }
.tournament-filter-tab.active {
  color: var(--primary); border-bottom-color: var(--primary);
}

/* ── Progress Bar ─────────────────────────────────────────── */
.tournament-progress-bar {
  height: 6px; background: var(--bg-alt); border-radius: 3px;
  overflow: hidden; margin-bottom: 4px;
}
.tournament-progress-fill {
  height: 100%; background: var(--primary); border-radius: 3px;
  transition: width .3s ease;
}

/* ── Winner Banner ────────────────────────────────────────── */
.tournament-winner-banner {
  background: linear-gradient(135deg, rgba(var(--primary-rgb),.12) 0%, rgba(var(--warning-rgb),.08) 100%);
  border: 1px solid rgba(var(--primary-rgb),.25);
  border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1.5rem;
  text-align: center;
}
.tournament-winner-inner {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
}
.tournament-winner-avatar {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--primary);
}
.tournament-winner-avatar-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-alt); color: var(--text-muted);
}
.tournament-winner-label {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--primary);
  display: flex; align-items: center; gap: 6px;
}
.tournament-winner-name {
  font-size: 24px; font-weight: 900; color: var(--text); margin-top: 4px;
}

/* ── Create Page Tabs ─────────────────────────────────────── */
.tournament-create-tabs {
  display: flex; gap: 4px; margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.tournament-create-tab {
  padding: 10px 20px; font-size: 14px; font-weight: 600;
  color: var(--text-muted); background: none; border: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  cursor: pointer; transition: color .15s, border-color .15s;
}
.tournament-create-tab:hover { color: var(--text); }
.tournament-create-tab.active {
  color: var(--primary); border-bottom-color: var(--primary);
}
.tournament-tab-panel { display: none; }
.tournament-tab-panel.active { display: block; }

/* ── Competitor Selection Grid ────────────────────────────── */
.tournament-competitor-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem;
  max-height: 500px; overflow-y: auto; padding: 2px;
}
.tournament-competitor-option {
  cursor: pointer; display: block;
}
.tournament-competitor-option input { display: none; }
.tournament-competitor-card {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-card); transition: border-color .15s, background .15s;
}
.tournament-competitor-option:hover .tournament-competitor-card {
  border-color: var(--primary);
}
.tournament-competitor-option input:checked + .tournament-competitor-card {
  border-color: var(--primary); background: rgba(var(--primary-rgb),.08);
}
.tournament-competitor-avatar {
  width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.tournament-competitor-avatar-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-alt);
}
.tournament-competitor-name {
  font-weight: 600; font-size: 14px;
}

/* ── Ad-Hoc Pairing Builder ──────────────────────────────── */
.pairing-slot {
  border: 2px dashed var(--border); border-radius: var(--radius);
  min-height: 56px; transition: border-color .15s;
}
.pairing-slot-empty {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px; color: var(--text-muted); font-size: 13px;
}
.pairing-slot-filled {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; background: rgba(var(--primary-rgb),.06);
  border-radius: var(--radius); font-weight: 600; font-size: 14px;
}
.pairing-slot-avatar {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.pairing-slot-remove {
  margin-left: auto; background: none; border: none; color: var(--danger);
  font-size: 20px; cursor: pointer; padding: 0 4px; line-height: 1;
}
.pairing-char-grid {
  max-height: 280px;
}
.pairing-char-option {
  cursor: pointer; transition: opacity .15s;
}
.pairing-char-option:hover .tournament-competitor-card {
  border-color: var(--primary);
}
.pairing-char-selected .tournament-competitor-card {
  border-color: var(--primary); background: rgba(var(--primary-rgb),.08);
}
.pairing-entry {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .6rem .75rem; background: rgba(var(--success-rgb),.06);
  border: 1px solid rgba(var(--success-rgb),.2); border-radius: var(--radius);
  margin-bottom: .5rem;
}
.pairing-entry-members {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
}
.pairing-entry-member {
  display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px;
}

/* ── Team Config History Cards ───────────────────────────── */
.config-history-card {
  padding: .75rem 1rem; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--bg-card);
}
.config-history-active {
  border-color: var(--success); background: rgba(var(--success-rgb),.04);
}

/* ── Bracket Display ──────────────────────────────────────── */
.bracket-container {
  overflow-x: auto; padding: 1.5rem 0;
  -webkit-overflow-scrolling: touch;
}
.bracket {
  display: flex; gap: 0;
  min-width: calc(var(--rounds, 3) * 260px);
}
.bracket-round {
  flex: 1; min-width: 240px; display: flex; flex-direction: column;
}
.bracket-round-header {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-muted); padding: 0 1rem;
  margin-bottom: 1rem; text-align: center;
}
.bracket-round-matches {
  flex: 1; display: flex; flex-direction: column;
  justify-content: space-around; gap: 0;
}

/* ── Match Cards ──────────────────────────────────────────── */
.bracket-match-wrapper {
  display: flex; align-items: center;
  padding: 4px 8px; flex: 1;
  min-height: 0;
}
.bracket-match {
  flex: 1; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  max-width: 220px;
}
.bracket-match-finals {
  border-color: var(--primary);
  box-shadow: 0 0 12px rgba(var(--primary-rgb),.15);
  max-width: 240px;
}

/* ── Competitor Slots ─────────────────────────────────────── */
.bracket-slot {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.bracket-slot:last-of-type { border-bottom: none; }
.bracket-slot-winner {
  background: rgba(var(--success-rgb),.08);
  color: var(--success);
}
.bracket-slot-winner .bracket-name { font-weight: 700; }
.bracket-slot-loser { opacity: .45; }

.bracket-avatar {
  width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.bracket-avatar-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-alt);
}
.bracket-name-wrap { min-width: 0; flex: 1; }
.bracket-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.bracket-subtitle { font-size: 10px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.bracket-tbd { color: var(--text-dim); font-style: italic; }

.bracket-match-finish {
  font-size: 11px; color: var(--text-muted); padding: 4px 10px;
  border-top: 1px solid var(--border); background: var(--bg-alt);
}
.bracket-record-btn {
  display: block; width: 100%; border-radius: 0;
  border-top: 1px solid var(--border); font-size: 12px; padding: 6px;
}

/* ── Connector Lines ──────────────────────────────────────── */
.bracket-connector {
  width: 24px; position: relative; flex-shrink: 0;
}
.bracket-match-wrapper:nth-child(odd) .bracket-connector::before {
  content: ''; position: absolute; right: 0; top: 50%;
  width: 12px; height: calc(50% + 4px);
  border-right: 2px solid var(--border-light);
  border-top: 2px solid var(--border-light);
  border-top-right-radius: 4px;
}
.bracket-match-wrapper:nth-child(even) .bracket-connector::before {
  content: ''; position: absolute; right: 0; bottom: 50%;
  width: 12px; height: calc(50% + 4px);
  border-right: 2px solid var(--border-light);
  border-bottom: 2px solid var(--border-light);
  border-bottom-right-radius: 4px;
}
.bracket-connector::after {
  content: ''; position: absolute; right: -12px; top: 50%;
  width: 12px; height: 0;
  border-top: 2px solid var(--border-light);
}

/* ── Result Modal ─────────────────────────────────────────── */
.tournament-modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.tournament-modal {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem;
  max-width: 450px; width: 100%;
  box-shadow: 0 16px 48px rgba(0,0,0,.3);
}
.tournament-winner-radios {
  display: flex; flex-direction: column; gap: .5rem;
}
.tournament-winner-radio {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius);
  cursor: pointer; transition: border-color .15s, background .15s;
}
.tournament-winner-radio:hover {
  border-color: var(--primary); background: rgba(var(--primary-rgb),.05);
}
.tournament-winner-radio input:checked + span {
  color: var(--primary); font-weight: 700;
}

/* ── Round Robin Styles ────────────────────────────────────── */
.rr-standings-table {
  width: 100%; border-collapse: collapse; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.rr-standings-table thead { background: var(--bg-alt); }
.rr-standings-table th {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  color: var(--text-muted); padding: 10px 12px; text-align: left;
}
.rr-standings-table td {
  padding: 10px 12px; border-top: 1px solid var(--border); font-size: 14px;
}
.rr-standings-table tr.rr-leader td {
  background: rgba(var(--primary-rgb),.05);
}
.rr-match-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .75rem;
}
.rr-match-card {
  /* Wrapper for match card within round robin grid */
}
.rr-match-card .bracket-match {
  max-width: 100%;
}

/* ── Mobile Responsive ────────────────────────────────────── */
@media (max-width: 768px) {
  .tournament-stats { grid-template-columns: repeat(3, 1fr); gap: .5rem; }
  .tournament-stat-card { padding: .75rem; }
  .tournament-stat-number { font-size: 24px; }
  .tournament-filter-tabs { overflow-x: auto; }
  .tournament-competitor-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

  .bracket-container { padding: 1rem 0; }
  .bracket {
    flex-direction: column; min-width: auto; gap: 1.5rem;
  }
  .bracket-round { min-width: auto; }
  .bracket-round-matches {
    gap: .5rem; flex-direction: column;
  }
  .bracket-match-wrapper {
    padding: 0;
  }
  .bracket-match, .bracket-match-finals { max-width: 100%; }
  .bracket-connector { display: none; }

  .tournament-winner-inner { flex-direction: column; text-align: center; }
  .tournament-winner-avatar { width: 56px; height: 56px; }
  .tournament-winner-name { font-size: 20px; }

  .rr-standings-table { font-size: 13px; }
  .rr-standings-table th, .rr-standings-table td { padding: 8px; }
  .rr-match-grid { grid-template-columns: 1fr; }
}
