/* ============================================================================
   SumoNerd Design System v3
   Dark sports theme — Navy + Orange from the logo
   Inspired by DraftKings/FanDuel energy with sumo tradition
   ============================================================================ */

/* -- Design Tokens -- */
:root {
    /* Logo palette */
    --navy: #1e3a5f;
    --navy-deep: #152d4a;
    --navy-dark: #0f2035;
    --navy-darkest: #0a1628;
    --orange: #f0a030;
    --orange-bright: #ffb840;
    --orange-dim: #c88020;
    --orange-glow: rgba(240, 160, 48, 0.15);

    /* Page backgrounds — dark sports app feel */
    --bg-page: #111827;
    --bg-sidebar: #0f172a;
    --bg-topbar: #0a1628;
    --bg-card: #1e293b;
    --bg-card-alt: #1a2332;
    --bg-card-hover: #263548;
    --bg-table-stripe: #1a2332;
    --bg-table-hover: #263548;
    --bg-highlight: rgba(240, 160, 48, 0.08);
    --bg-input: #1a2332;

    /* Borders */
    --border: #2d3f55;
    --border-light: #253345;
    --border-dark: #3a5068;
    --border-orange: rgba(240, 160, 48, 0.3);

    /* Text */
    --text: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-link: #60a5fa;
    --text-link-hover: #93c5fd;
    --text-on-dark: #e2e8f0;
    --text-on-dark-muted: #94a3b8;

    /* Accent colors */
    --vermillion: #ef4444;
    --vermillion-bg: rgba(239, 68, 68, 0.12);
    --indigo: #3b82f6;
    --indigo-bg: rgba(59, 130, 246, 0.12);
    --gold: #f0a030;
    --gold-bg: rgba(240, 160, 48, 0.12);
    --teal: #10b981;
    --teal-bg: rgba(16, 185, 129, 0.12);
    --plum: #a855f7;

    /* Rank tier colors — enhanced for dark bg */
    --rank-yokozuna: #fbbf24;
    --rank-yokozuna-bg: rgba(251, 191, 36, 0.15);
    --rank-ozeki: #f0a030;
    --rank-ozeki-bg: rgba(240, 160, 48, 0.15);
    --rank-sekiwake: #60a5fa;
    --rank-sekiwake-bg: rgba(96, 165, 250, 0.15);
    --rank-komusubi: #818cf8;
    --rank-komusubi-bg: rgba(129, 140, 248, 0.15);
    --rank-maegashira: #94a3b8;
    --rank-maegashira-bg: rgba(148, 163, 184, 0.1);
    --rank-juryo: #64748b;
    --rank-juryo-bg: rgba(100, 116, 139, 0.1);

    /* Functional */
    --win: #10b981;
    --win-bg: rgba(16, 185, 129, 0.12);
    --loss: #ef4444;
    --loss-bg: rgba(239, 68, 68, 0.12);
    --absent: #64748b;
    --live: #ef4444;

    /* Typography — Google Fonts */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Bebas Neue', 'Impact', 'Arial Black', sans-serif;
    --font-brand: 'Russo One', 'Impact', sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 0.75rem;
    --space-lg: 1rem;
    --space-xl: 1.5rem;
    --space-2xl: 2rem;
    --space-3xl: 3rem;

    /* Sizing */
    --sidebar-width: 200px;
    --topbar-height: 52px;
    --radius: 6px;
    --radius-lg: 10px;
}

/* -- Reset -- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg-page);
    line-height: 1.5;
    min-height: 100vh;
}

a { color: var(--text-link); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--text-link-hover); text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.15; color: var(--text); letter-spacing: 0.04em; text-transform: uppercase; }
h1 { font-size: 2.2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }

table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 4px 8px; }

/* ============================================================================
   LAYOUT — Sidebar + Main Content
   ============================================================================ */

/* Top bar */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-height);
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy-darkest) 100%);
    color: var(--text-on-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-xl);
    z-index: 100;
    border-bottom: 3px solid var(--orange);
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
    overflow: hidden;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
}

.topbar-brand {
    text-decoration: none;
    color: var(--text-on-dark);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.topbar-brand:hover { text-decoration: none; color: var(--text-on-dark); }

.topbar-logo {
    height: 42px;
    width: 42px;
    max-width: 42px;
    max-height: 42px;
    object-fit: contain;
    border-radius: 50%;
    flex-shrink: 0;
    background: #ffffff;
    padding: 2px;
    box-shadow: 0 0 0 2px var(--orange), 0 0 12px rgba(240, 160, 48, 0.3);
}

.brand-text {
    font-family: var(--font-brand);
    font-size: 1.4rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.brand-accent { color: var(--orange); }

.topbar-meta {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    font-size: 0.85rem;
}

.topbar-link {
    color: var(--text-on-dark-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.15s;
}

.topbar-link:hover { color: #fff; text-decoration: none; }

.topbar-signin {
    background: var(--orange);
    color: var(--navy-darkest);
    padding: 6px 16px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    transition: background 0.15s;
}

.topbar-signin:hover { background: var(--orange-bright); color: var(--navy-darkest); text-decoration: none; }

.topbar-search-link {
    display: flex;
    align-items: center;
    gap: 4px;
}
.topbar-search-link svg { opacity: 0.7; }

.topbar-user {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-on-dark);
    text-decoration: none;
    font-weight: 600;
}

.topbar-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--orange-dim);
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    margin-left: var(--space-sm);
}

.sidebar-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--orange);
    margin: 4px 0;
    border-radius: 1px;
}

/* App layout */
.app-layout {
    display: flex;
    margin-top: var(--topbar-height);
    min-height: calc(100vh - var(--topbar-height));
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background:
        url('/static/images/seigaiha.svg') repeat,
        var(--bg-sidebar);
    color: var(--text-on-dark);
    overflow-y: auto;
    padding: var(--space-lg) 0;
    z-index: 90;
    border-right: 1px solid var(--border-light);
    border-right: 1px solid var(--border-light);
}

.sidebar-section {
    margin-bottom: var(--space-xl);
}

.sidebar-heading {
    font-family: var(--font-brand);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--orange);
    padding: 0 var(--space-lg);
    margin-bottom: var(--space-xs);
    font-weight: 800;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 7px var(--space-lg);
    color: var(--text-on-dark-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.15s;
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    background: rgba(240, 160, 48, 0.06);
    text-decoration: none;
    color: #fff;
}

.sidebar-link.active {
    border-left-color: var(--orange);
    background: rgba(240, 160, 48, 0.1);
    color: #fff;
    font-weight: 600;
}

.sidebar-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* SVG sidebar icons */
.sidebar-svg {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    max-width: 18px;
    max-height: 18px;
    flex-shrink: 0;
    opacity: 0.6;
    transition: opacity 0.15s;
    display: inline-block;
}
.sidebar-link:hover .sidebar-svg,
.sidebar-link.active .sidebar-svg {
    opacity: 1;
    stroke: var(--orange);
}
.external-arrow {
    margin-left: auto;
    font-size: 0.7rem;
    opacity: 0.4;
}

.sidebar-external::after {
    content: " \2197";
    font-size: 0.7em;
    opacity: 0.5;
}

.sidebar-footer {
    padding: var(--space-lg);
    margin-top: auto;
    font-size: 0.7rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-light);
}

.sidebar-footer a {
    color: var(--text-muted);
    text-decoration: none;
}

.sidebar-footer a:hover { color: var(--text-on-dark); }
.sidebar-footer p { margin-top: var(--space-xs); }

/* Main content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: var(--space-xl) var(--space-2xl);
    max-width: 1100px;
    min-height: calc(100vh - var(--topbar-height));
}

/* ============================================================================
   COMPONENTS
   ============================================================================ */

/* -- Section headings -- */
.page-title {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: var(--space-xs);
    padding-bottom: var(--space-xs);
    border-bottom: 3px solid var(--orange);
    display: inline-block;
    letter-spacing: 0.06em;
    font-weight: 800;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--space-xl);
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    margin: var(--space-xl) 0 var(--space-md);
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid var(--border);
    color: var(--text);
    letter-spacing: 0.05em;
    font-weight: 700;
}

.section-title:first-child { margin-top: 0; }

/* -- Cards / Boxes -- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.card-header {
    font-weight: 700;
    padding-bottom: var(--space-sm);
    margin-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-light);
    font-size: 1rem;
    color: var(--orange);
}

.card-alt { background: var(--bg-card-alt); }

/* -- Buttons -- */
.btn {
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid var(--border-dark);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1.6;
}

.btn:hover { background: var(--bg-card-hover); text-decoration: none; border-color: var(--orange-dim); }

.btn-primary {
    background: var(--orange);
    color: var(--navy-darkest);
    border-color: var(--orange);
    font-weight: 700;
}

.btn-primary:hover { background: var(--orange-bright); color: var(--navy-darkest); }

.btn-secondary {
    background: transparent;
    border-color: var(--border);
    color: var(--text-secondary);
}

.btn-sm { font-size: 0.75rem; padding: 3px 12px; }

/* -- Tables (core data display) -- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.data-table th {
    background: var(--navy);
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--orange);
    padding: 8px 10px;
    border-bottom: 2px solid var(--orange-dim);
    white-space: nowrap;
}

.data-table td {
    padding: 6px 10px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.data-table tbody tr:nth-child(even) { background: var(--bg-card-alt); }
.data-table tbody tr:hover { background: var(--bg-table-hover); }

.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .center { text-align: center; }

/* -- Rank badges -- */
.rank-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius);
    white-space: nowrap;
}

.rank-yokozuna { background: var(--rank-yokozuna-bg); color: var(--rank-yokozuna); border: 1px solid rgba(251,191,36,0.3); }
.rank-ozeki { background: var(--rank-ozeki-bg); color: var(--rank-ozeki); border: 1px solid rgba(240,160,48,0.3); }
.rank-sekiwake { background: var(--rank-sekiwake-bg); color: var(--rank-sekiwake); border: 1px solid rgba(96,165,250,0.3); }
.rank-komusubi { background: var(--rank-komusubi-bg); color: var(--rank-komusubi); border: 1px solid rgba(129,140,248,0.3); }
.rank-maegashira { background: var(--rank-maegashira-bg); color: var(--rank-maegashira); }
.rank-juryo { background: var(--rank-juryo-bg); color: var(--rank-juryo); }

.rank-badge.large { font-size: 0.85rem; padding: 3px 12px; }

/* -- Results (win/loss) -- */
.result-win { color: var(--win); font-weight: 700; }
.result-loss { color: var(--loss); font-weight: 700; }
.result-absent { color: var(--absent); }

/* -- Live badge -- */
.live-badge {
    display: inline-block;
    background: var(--live);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: var(--radius);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    animation: live-pulse 1.5s ease-in-out infinite;
    vertical-align: middle;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

@keyframes live-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(239, 68, 68, 0.4); }
    50% { opacity: 0.7; box-shadow: 0 0 16px rgba(239, 68, 68, 0.6); }
}

.live-indicator {
    font-size: 0.75rem;
    color: var(--live);
    font-weight: 600;
}

.live-indicator::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--live);
    border-radius: 50%;
    margin-right: 4px;
    animation: live-dot 1.5s ease-in-out infinite;
}

@keyframes live-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* -- Wrestler photo -- */
.wrestler-thumb {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
    border: 2px solid var(--border);
}

.wrestler-thumb-lg {
    width: 100px;
    height: 120px;
    border-radius: var(--radius);
    object-fit: cover;
    background: var(--bg-card-alt);
}

.wrestler-thumb-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card-alt);
    color: var(--text-muted);
    font-weight: 700;
    border-radius: 50%;
}

/* -- Grid layouts -- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-md); }

/* -- Day navigation -- */
.day-nav {
    display: flex;
    gap: 3px;
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.day-btn {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text-secondary);
    text-decoration: none;
    text-align: center;
    min-width: 32px;
    transition: all 0.15s;
}

.day-btn:hover { background: var(--bg-card-hover); text-decoration: none; border-color: var(--orange-dim); color: var(--text); }
.day-btn.active { background: var(--orange); color: var(--navy-darkest); border-color: var(--orange); }
.day-btn.future { opacity: 0.3; pointer-events: none; }

/* -- Division tabs -- */
.division-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: var(--space-lg);
}

.division-tab {
    padding: 8px 18px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.division-tab:hover { color: var(--text); text-decoration: none; }
.division-tab.active { color: var(--orange); border-bottom-color: var(--orange); }

/* -- Stat boxes (inline) -- */
.stat-row {
    display: flex;
    gap: var(--space-lg);
    flex-wrap: wrap;
    margin-bottom: var(--space-lg);
}

.stat-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
    text-align: center;
    min-width: 100px;
}

.stat-box-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.stat-box-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--orange);
}

/* ============================================================================
   BOUT CARDS (compact)
   ============================================================================ */

.bout-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.bout-table th {
    background: var(--navy);
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--orange);
    padding: 6px 8px;
    border-bottom: 2px solid var(--orange-dim);
    font-weight: 700;
}

.bout-table td {
    padding: 5px 8px;
    border-bottom: 1px solid var(--border-light);
}

.bout-table tbody tr:hover { background: var(--bg-table-hover); }

.bout-table .bout-winner { font-weight: 700; color: var(--win); }
.bout-table .bout-loser { color: var(--text-muted); }

.bout-table .bout-kimarite {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-style: italic;
}

.bout-table .bout-east { text-align: right; }
.bout-table .bout-west { text-align: left; }
.bout-table .bout-center { text-align: center; width: 120px; }

/* Bout card (grid style) */
.bout-card {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-light);
    align-items: center;
    background: var(--bg-card);
    font-size: 0.85rem;
    transition: background 0.15s;
}

.bout-card:hover { background: var(--bg-card-hover); }
.bout-card:last-child { border-bottom: none; }
.bout-card.completed .bout-winner { font-weight: 700; color: var(--win); }
.bout-card.completed .bout-loser { color: var(--text-muted); }

.bout-list {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.bout-east { text-align: right; }
.bout-west { text-align: left; }

.bout-rank {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: block;
}

.bout-name {
    color: var(--text-link);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
}

.bout-name:hover { text-decoration: underline; }

.bout-vs { text-align: center; min-width: 80px; }
.bout-kimarite { font-size: 0.8rem; color: var(--orange-dim); font-style: italic; }
.bout-pending { color: var(--text-muted); font-size: 0.8rem; }

.bout-meta {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* -- Prediction bar (bout) -- */
.bout-prediction { width: 100%; }

.prediction-bar {
    display: flex;
    width: 100%;
    height: 18px;
    border-radius: 9px;
    overflow: hidden;
    font-size: 0.6rem;
    font-weight: 700;
}

.prediction-bar-east {
    background: linear-gradient(90deg, var(--indigo), #2563eb);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
}

.prediction-bar-west {
    background: linear-gradient(90deg, #dc2626, var(--vermillion));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
}

/* ============================================================================
   HOME PAGE
   ============================================================================ */

/* Hero section — shared base for home + tournament + pages */
.hero-section {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    padding: var(--space-2xl) var(--space-2xl);
    margin-bottom: var(--space-xl);
    background:
        url('/static/images/seigaiha.svg') repeat,
        linear-gradient(135deg, var(--navy) 0%, var(--navy-darkest) 100%);
    border: 1px solid var(--border-orange);
    border-left: 4px solid var(--orange);
}

/* Darkened overlay for background imagery — 15% opacity */
.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(10, 22, 40, 0.85);
    pointer-events: none;
    z-index: 0;
}

.hero-section > * {
    position: relative;
    z-index: 1;
}

/* Dohyo ring decoration in hero */
.hero-dohyo {
    position: absolute;
    top: 50%;
    right: -40px;
    width: 280px;
    height: 280px;
    transform: translateY(-50%);
    background: url('/static/images/dohyo-ring.svg') no-repeat center;
    background-size: contain;
    opacity: 0.25;
    z-index: 0 !important;
    pointer-events: none;
}

.hero-tournament {
    background:
        url('/static/images/seigaiha.svg') repeat,
        linear-gradient(135deg, var(--navy-dark) 0%, var(--navy-darkest) 100%);
}

.home-hero {
    /* inherits from hero-section */
}

.home-hero h1,
.hero-section h1 {
    font-family: var(--font-display);
    font-size: 2.4rem;
    margin-bottom: var(--space-xs);
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.home-hero .hero-meta,
.hero-section .page-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: var(--space-md);
    font-family: var(--font-body);
    text-transform: none;
    letter-spacing: 0;
}

.home-hero .hero-actions {
    display: flex;
    gap: var(--space-sm);
}

.home-columns {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--space-xl);
}

/* -- Leaderboard (sidebar box) -- */
.leaderboard-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.leaderboard-box .card-header {
    padding: var(--space-md) var(--space-lg);
    background: var(--navy);
    margin: 0;
    border-bottom: 2px solid var(--orange-dim);
    color: var(--orange);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.leader-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 6px var(--space-md);
    border-bottom: 1px solid var(--border-light);
    text-decoration: none;
    color: var(--text);
    font-size: 0.85rem;
    transition: background 0.15s;
}

.leader-row:hover { background: var(--bg-table-hover); text-decoration: none; }
.leader-row:last-child { border-bottom: none; }

.leader-pos {
    width: 22px;
    font-weight: 800;
    color: var(--orange);
    text-align: center;
    font-size: 0.85rem;
}

.leader-photo img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.leader-initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-card-alt);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
}

.leader-info { flex: 1; }
.leader-name { font-weight: 600; }

.leader-record { font-weight: 700; white-space: nowrap; }

/* ============================================================================
   WRESTLER PROFILE
   ============================================================================ */

.profile-layout {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.profile-photo-box {
    text-align: center;
}

.profile-photo-box img {
    width: 135px;
    height: 237px;
    object-fit: cover;
    object-position: top;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border);
}

.profile-photo-box .wrestler-photo-placeholder {
    width: 220px;
    height: 386px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card-alt);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: 2.5rem;
    color: var(--text-muted);
    font-weight: 700;
}

.profile-name {
    font-size: 1.6rem;
    margin-bottom: 0;
    font-weight: 800;
}

.profile-name-jp {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: var(--space-sm);
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.profile-stat {
    background: var(--bg-card-alt);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: var(--space-sm) var(--space-md);
}

.profile-stat .stat-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.profile-stat .stat-value {
    font-weight: 700;
    font-size: 0.95rem;
}

/* Career record inline */
.career-record {
    margin-top: var(--space-lg);
}

.career-record h3 {
    font-size: 0.95rem;
    margin-bottom: var(--space-xs);
}

.record-numbers {
    font-size: 1.4rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.record-separator { color: var(--text-muted); margin: 0 2px; }
.record-note { font-size: 0.8rem; color: var(--text-secondary); margin-top: 2px; }

/* Kimarite breakdown bars */
.kimarite-breakdown { margin-top: var(--space-lg); }
.kimarite-breakdown h3 { font-size: 0.95rem; margin-bottom: var(--space-sm); }

.kimarite-bar {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: 4px;
    font-size: 0.8rem;
}

.kimarite-bar-name {
    width: 90px;
    text-align: right;
    color: var(--text-link);
    text-decoration: none;
    flex-shrink: 0;
}

.kimarite-bar-track {
    flex: 1;
    height: 10px;
    background: var(--bg-card-alt);
    border-radius: 5px;
    overflow: hidden;
}

.kimarite-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--orange-dim), var(--orange));
    border-radius: 5px;
    min-width: 4px;
}

.kimarite-bar-pct {
    width: 40px;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

/* Basho record (15-day grid) */
.basho-record-grid {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
}

.record-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 30px;
    padding: 3px 0;
    font-size: 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    background: var(--bg-card);
}

.record-day { font-size: 0.6rem; color: var(--text-muted); }
.record-result { font-weight: 700; }
.result-pending { color: var(--text-muted); }

/* Rank history chart */
.rank-chart-container { margin-top: var(--space-md); }
.rank-chart { max-width: 100%; overflow-x: auto; }

/* Favorite button */
.fav-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-muted);
    vertical-align: middle;
    padding: 0 4px;
    transition: color 0.15s;
}

.fav-btn:hover { color: var(--orange); }
.fav-btn.fav-active { color: var(--orange); }

/* ============================================================================
   TOURNAMENT / STANDINGS
   ============================================================================ */

.standings-wrap { overflow-x: auto; }

.standings-grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.standings-grid th {
    background: var(--navy);
    font-size: 0.6rem;
    text-transform: uppercase;
    color: var(--orange);
    padding: 6px 6px;
    border-bottom: 2px solid var(--orange-dim);
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    letter-spacing: 0.03em;
}

.standings-grid td {
    padding: 4px 6px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.standings-grid tbody tr:nth-child(even) { background: var(--bg-card-alt); }
.standings-grid tbody tr:hover { background: var(--bg-table-hover); }

.sg-pos { width: 24px; text-align: center; color: var(--text-muted); font-weight: 700; }
.sg-name { text-align: left; font-weight: 600; }
.sg-name a { color: var(--text-link); text-decoration: none; }
.sg-name a:hover { text-decoration: underline; }
.sg-rank { text-align: center; }
.sg-record { text-align: center; font-weight: 700; }
.sg-day { width: 24px; text-align: center; font-size: 0.85rem; }
.sg-day-current { background: var(--bg-highlight); }

/* Win/loss dots — traditional sumo style */
.sg-result-w { color: var(--win); font-weight: 700; font-size: 1rem; }
.sg-result-l { color: var(--loss); font-weight: 700; font-size: 1rem; }
.sg-result-none { color: var(--text-muted); opacity: 0.2; }

/* ============================================================================
   Hoshitori — Traditional Banzuke-Style Grid
   East/West split, rank hierarchy, white/black circle dots
   ============================================================================ */

.hoshitori-wrap {
    margin: var(--space-lg) 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.hoshitori-grid {
    display: flex;
    gap: 0;
    min-width: 1100px;
}

.hoshitori-side {
    flex: 1;
    min-width: 0;
}

.hoshitori-side-label {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 10px 0;
    color: var(--orange);
    background: linear-gradient(135deg, var(--navy-dark), var(--navy));
    border-bottom: 2px solid var(--orange-dim);
}

.hoshitori-east .hoshitori-side-label {
    border-radius: var(--radius-lg) 0 0 0;
}
.hoshitori-west .hoshitori-side-label {
    border-radius: 0 var(--radius-lg) 0 0;
}

/* Center divider between east/west */
.hoshitori-divider {
    width: 3px;
    background: var(--orange);
    position: relative;
    flex-shrink: 0;
}
.hoshitori-divider-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to bottom, var(--orange), var(--orange-dim), var(--orange));
}

/* Hoshitori table */
.hoshitori-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    background: var(--bg-card);
    table-layout: fixed;
}

.hoshitori-table thead th {
    padding: 6px 2px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--navy-darkest);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    text-align: center;
}

.hoshitori-table tbody td {
    padding: 5px 2px;
    border-bottom: 1px solid var(--border-light);
    text-align: center;
    vertical-align: middle;
}

.hoshitori-table tbody tr:hover {
    background: var(--bg-table-hover);
}

/* Rank tier separator rows */
.ht-tier-row td {
    background: var(--navy) !important;
    color: var(--orange);
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 4px 8px !important;
    text-align: left !important;
    border-bottom: 2px solid var(--orange-dim) !important;
}

/* Rank-based row styling */
.ht-tier-yokozuna td.ht-name { font-weight: 800; font-size: 0.95rem; }
.ht-tier-ozeki td.ht-name { font-weight: 700; font-size: 0.9rem; }
.ht-tier-sekiwake td.ht-name,
.ht-tier-komusubi td.ht-name { font-weight: 600; }

/* Name & rank cells */
.ht-name {
    text-align: left !important;
    white-space: nowrap;
    padding-left: 6px !important;
    padding-right: 6px !important;
    width: 110px;
    min-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ht-name a {
    color: var(--text-link);
    text-decoration: none;
}
.ht-name a:hover {
    text-decoration: underline;
    color: var(--text-link-hover);
}

.ht-rank {
    white-space: nowrap;
    padding: 4px 4px !important;
    font-size: 0.7rem;
    width: 50px;
    min-width: 50px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* W-L record */
.ht-record {
    white-space: nowrap;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 4px 4px !important;
    width: 40px;
    min-width: 40px;
}

/* Day result cells — the boshi (dots) */
.ht-day {
    width: 20px;
    min-width: 20px;
    max-width: 20px;
    font-size: 0.75rem;
}

.ht-day-current {
    background: var(--bg-highlight) !important;
}

.boshi {
    display: inline-block;
    line-height: 1;
}
.boshi.shiro {
    color: #ffffff;
    font-size: 1.05rem;
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.4);
}
.boshi.kuro {
    color: #1a1a2e;
    font-size: 1.05rem;
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.8);
    -webkit-text-stroke: 1px #555;
}
.boshi.empty {
    color: var(--text-muted);
    opacity: 0.25;
    font-size: 0.8rem;
}

/* Result cell backgrounds */
.ht-result-w {
    background: rgba(16, 185, 129, 0.08);
}
.ht-result-l {
    background: rgba(239, 68, 68, 0.08);
}

/* Classic table toggle */
.classic-standings-toggle {
    margin-top: var(--space-lg);
}
.classic-standings-toggle summary {
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 8px 0;
}
.classic-standings-toggle summary:hover {
    color: var(--text-secondary);
}

/* ============================================================================
   Fantasy Leaderboard
   ============================================================================ */

.lb-stats-bar {
    display: flex;
    gap: var(--space-lg);
    margin: var(--space-lg) 0;
    padding: var(--space-md) var(--space-lg);
    background: linear-gradient(135deg, var(--navy), var(--navy-deep));
    border: 1px solid var(--border-orange);
    border-radius: var(--radius-lg);
}
.lb-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.lb-stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--orange);
    line-height: 1.1;
}
.lb-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.lb-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}

.lb-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
}

/* Top 3 highlight */
.lb-top-3 td {
    background: var(--bg-highlight) !important;
}
.lb-rank {
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
    width: 40px;
}
.lb-player-name {
    font-weight: 700;
    color: var(--text);
}
.lb-points {
    font-weight: 800;
    color: var(--orange);
    font-size: 1.05rem;
    text-align: right;
}
.lb-league-link {
    color: var(--text-link);
    text-decoration: none;
    font-size: 0.85rem;
}
.lb-league-link:hover { text-decoration: underline; }

/* Most-picked list */
.lb-pick-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.lb-pick-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
}
.lb-pick-row:nth-child(odd) { background: var(--bg-card-alt); }
.lb-pick-rank {
    width: 22px;
    font-weight: 700;
    color: var(--text-muted);
    text-align: center;
    font-size: 0.8rem;
}
.lb-pick-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.lb-pick-name {
    color: var(--text-link);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}
.lb-pick-name:hover { text-decoration: underline; }
.lb-pick-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.lb-pick-count {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--orange);
    white-space: nowrap;
}

/* Kimarite bar chart */
.lb-kimarite-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.lb-kimarite-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.lb-kimarite-name {
    width: 90px;
    font-size: 0.85rem;
    color: var(--text-link);
    text-decoration: none;
    font-weight: 500;
    flex-shrink: 0;
}
.lb-kimarite-name:hover { text-decoration: underline; }
.lb-kimarite-bar-wrap {
    flex: 1;
    height: 14px;
    background: var(--bg-card-alt);
    border-radius: 7px;
    overflow: hidden;
}
.lb-kimarite-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--orange), var(--orange-bright));
    border-radius: 7px;
    min-width: 4px;
}
.lb-kimarite-count {
    width: 30px;
    text-align: right;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Responsive leaderboard */
@media (max-width: 900px) {
    .lb-grid { grid-template-columns: 1fr; }
    .lb-stats-bar { flex-wrap: wrap; justify-content: center; }
}

/* Legacy standings (non-table) */
.standings-table {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.standings-header {
    display: grid;
    grid-template-columns: 30px 1fr auto auto;
    gap: var(--space-sm);
    padding: 6px var(--space-md);
    background: var(--navy);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--orange);
    border-bottom: 2px solid var(--orange-dim);
}

.standings-row {
    display: grid;
    grid-template-columns: 30px 1fr auto auto;
    gap: var(--space-sm);
    padding: 4px var(--space-md);
    border-bottom: 1px solid var(--border-light);
    text-decoration: none;
    color: var(--text);
    font-size: 0.85rem;
    align-items: center;
}

a.standings-row:hover { background: var(--bg-table-hover); text-decoration: none; }
.standings-row:last-child { border-bottom: none; }
.standings-row-me { background: var(--bg-highlight); }

.standings-pos { text-align: center; color: var(--orange); font-weight: 800; }
.standings-name { font-weight: 600; }
.standings-name a { color: var(--text-link); text-decoration: none; }
.standings-record { font-weight: 700; }

/* ============================================================================
   BANZUKE
   ============================================================================ */

.banzuke-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    overflow: hidden;
}

.banzuke-side { border-right: 1px solid var(--border); }
.banzuke-side:last-child { border-right: none; }

.banzuke-side-header {
    background: var(--navy);
    padding: 6px var(--space-md);
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--orange);
    border-bottom: 2px solid var(--orange-dim);
}

.banzuke-entry {
    display: grid;
    grid-template-columns: minmax(90px, auto) 1fr auto;
    align-items: center;
    gap: var(--space-xs);
    padding: 4px var(--space-sm);
    border-bottom: 1px solid var(--border-light);
    font-size: 0.8rem;
    transition: background 0.1s;
}

.banzuke-entry:hover { background: var(--bg-table-hover); }

/* West side: record | name | rank (reversed order) */
.banzuke-west .banzuke-entry {
    grid-template-columns: auto 1fr minmax(90px, auto);
}
.banzuke-west .banzuke-name { text-align: right; }
.banzuke-west .banzuke-side-header { text-align: right; }

.banzuke-rank .rank-badge { font-size: 0.7rem; white-space: nowrap; }

.banzuke-name { min-width: 0; }
.banzuke-name a {
    color: var(--text-link);
    font-weight: 600;
    text-decoration: none;
}

.banzuke-name a:hover { text-decoration: underline; }

.banzuke-record {
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap;
    text-align: center;
}

/* ============================================================================
   KIMARITE
   ============================================================================ */

.kimarite-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-md);
}

.kimarite-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: border-color 0.15s;
}

.kimarite-card:hover { border-color: var(--orange-dim); }

.kimarite-card-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
}

.kimarite-card-jp {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.kimarite-card-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: var(--space-xs);
}

.kimarite-card-stats {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-sm);
    font-size: 0.8rem;
}

.kimarite-card-count { font-weight: 700; color: var(--orange); }
.kimarite-card-pct { color: var(--text-muted); }

.kimarite-users { margin-top: var(--space-sm); font-size: 0.8rem; }
.kimarite-users ul { list-style: none; padding: 0; }
.kimarite-users li { display: flex; justify-content: space-between; padding: 2px 0; }
.kimarite-users a { color: var(--text-link); }
.kimarite-user-count { color: var(--text-muted); }

/* ============================================================================
   WRESTLER GRID (search results, featured, etc.)
   ============================================================================ */

.wrestler-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--space-md);
}

.wrestler-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 0.15s;
}

.wrestler-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    text-decoration: none;
    border-color: var(--orange-dim);
}

.wrestler-photo {
    height: 100px;
    background: var(--bg-card-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.wrestler-photo img { width: 100%; height: 100%; object-fit: cover; }

.wrestler-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--bg-card-alt);
}

.wrestler-info {
    padding: var(--space-sm);
}

.wrestler-name {
    font-size: 0.85rem;
    font-weight: 700;
    margin: 0;
}

.wrestler-name-jp {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}

.wrestler-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 2px 0 0;
}

/* ============================================================================
   SEARCH
   ============================================================================ */

.search-form {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
}

.search-input {
    flex: 1;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    background: var(--bg-input);
    color: var(--text);
}

.search-input:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 2px var(--orange-glow);
}

/* ============================================================================
   PREDICTIONS
   ============================================================================ */

.prediction-summary {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}

.prediction-stat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
    text-align: center;
    min-width: 100px;
}

.prediction-stat-num { font-size: 1.5rem; font-weight: 800; }
.prediction-stat-label { font-size: 0.65rem; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.05em; }

.prediction-stat-promote .prediction-stat-num { color: var(--teal); }
.prediction-stat-demote .prediction-stat-num { color: var(--vermillion); }
.prediction-stat-hold .prediction-stat-num { color: var(--gold); }
.prediction-stat-uncertain .prediction-stat-num { color: var(--text-muted); }

.prediction-group-title {
    font-size: 1.1rem;
    margin: var(--space-xl) 0 var(--space-md);
    padding-left: var(--space-sm);
    border-left: 3px solid;
}

.prediction-group-promote { border-color: var(--teal); color: var(--teal); }
.prediction-group-demote { border-color: var(--vermillion); color: var(--vermillion); }
.prediction-group-hold { border-color: var(--gold); color: var(--gold); }
.prediction-group-uncertain { border-color: var(--text-muted); color: var(--text-muted); }

.prediction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-md);
}

.prediction-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    border-left: 3px solid transparent;
}

.prediction-card-promote { border-left-color: var(--teal); }
.prediction-card-demote { border-left-color: var(--vermillion); }
.prediction-card-hold { border-left-color: var(--gold); }
.prediction-card-uncertain { border-left-color: var(--text-muted); }

.prediction-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xs);
}

.prediction-name { font-weight: 700; color: var(--text-link); }
.prediction-name:hover { text-decoration: underline; }

.prediction-confidence {
    font-size: 0.65rem;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 8px;
    font-weight: 700;
}

.prediction-conf-high { background: var(--teal-bg); color: var(--teal); }
.prediction-conf-medium { background: var(--gold-bg); color: var(--gold); }
.prediction-conf-low { background: rgba(100,116,139,0.15); color: var(--text-muted); }

.prediction-ranks {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.85rem;
    margin-bottom: var(--space-xs);
}

.prediction-current { color: var(--text-muted); }

.prediction-arrow { font-weight: 700; font-size: 1rem; }
.prediction-card-promote .prediction-arrow { color: var(--teal); }
.prediction-card-demote .prediction-arrow { color: var(--vermillion); }
.prediction-card-hold .prediction-arrow { color: var(--gold); }

.prediction-predicted { font-weight: 600; }
.prediction-record { font-weight: 600; margin-bottom: var(--space-xs); }
.prediction-note { font-size: 0.8rem; color: var(--text-secondary); margin: 0; font-style: italic; }
.predictions-subtitle { color: var(--text-secondary); margin-bottom: var(--space-lg); }

.predictions-disclaimer {
    margin-top: var(--space-xl);
    padding: var(--space-md);
    background: var(--bg-card-alt);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
}

.predictions-disclaimer p { color: var(--text-muted); font-size: 0.8rem; margin: 0; text-align: center; }

/* ============================================================================
   WIKI
   ============================================================================ */

.wiki-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-md);
}

.wiki-card-grid-sm { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

.wiki-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    text-decoration: none;
    color: var(--text);
    transition: all 0.15s;
}

.wiki-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.2); text-decoration: none; border-color: var(--orange-dim); }

.wiki-card-badge {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: var(--radius);
}

.wiki-badge-technique { background: var(--indigo-bg); color: var(--indigo); }
.wiki-badge-rank { background: var(--gold-bg); color: var(--gold); }
.wiki-badge-rule { background: var(--teal-bg); color: var(--teal); }
.wiki-badge-history { background: var(--vermillion-bg); color: var(--vermillion); }
.wiki-badge-culture { background: rgba(168,85,247,0.12); color: var(--plum); }

.wiki-card-title { font-size: 0.95rem; font-weight: 700; margin-top: var(--space-xs); }

/* Wiki article page */
.wiki-breadcrumb {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
}

.wiki-breadcrumb a { color: var(--text-link); }
.wiki-breadcrumb-sep { margin: 0 var(--space-xs); }

.wiki-article {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
}

.wiki-article-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
    font-weight: 800;
}

.wiki-article-body {
    line-height: 1.7;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.wiki-article-body h2 { font-size: 1.2rem; margin: var(--space-xl) 0 var(--space-md); color: var(--text); }
.wiki-article-body h3 { font-size: 1rem; margin: var(--space-lg) 0 var(--space-sm); color: var(--text); }
.wiki-article-body p { margin-bottom: var(--space-md); }
.wiki-article-body ul, .wiki-article-body ol { margin-bottom: var(--space-md); padding-left: var(--space-xl); }
.wiki-article-body li { margin-bottom: var(--space-xs); }

.wiki-article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-xl);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-light);
}

.wiki-updated { font-size: 0.75rem; color: var(--text-muted); }
.wiki-related { margin-top: var(--space-2xl); }
.wiki-related-title { font-size: 1.1rem; margin-bottom: var(--space-md); }
.wiki-related-kimarite { font-size: 0.85rem; color: var(--text-secondary); }
.wiki-article-header { margin-bottom: var(--space-lg); }

/* ============================================================================
   HEAD-TO-HEAD
   ============================================================================ */

.h2h-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: var(--space-lg);
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
    text-align: center;
}

.h2h-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--orange-dim);
}

.h2h-photo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card-alt);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-muted);
    margin: 0 auto;
    border: 3px solid var(--border);
}

.h2h-name { font-size: 1.1rem; margin-top: var(--space-sm); }
.h2h-name a { color: var(--text-link); }

.h2h-vs-block { font-size: 0.9rem; color: var(--text-muted); }
.h2h-vs-text { font-size: 1.4rem; font-weight: 800; color: var(--orange); display: block; }
.h2h-total-bouts { font-size: 0.8rem; }

.h2h-win-count { font-size: 1.2rem; font-weight: 700; margin-top: var(--space-sm); }

/* ============================================================================
   AUTH
   ============================================================================ */

.auth-subtitle { color: var(--text-secondary); margin-bottom: var(--space-xl); text-align: center; }

.auth-providers { display: flex; flex-direction: column; gap: var(--space-md); margin-bottom: var(--space-xl); }

.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.15s;
}

.auth-btn:hover { opacity: 0.9; text-decoration: none; }
.auth-btn-discord { background: #5865F2; color: #fff; }
.auth-btn-twitch { background: #9146FF; color: #fff; }
.auth-btn-google { background: #fff; color: #333; border: 1px solid var(--border); }

.auth-error {
    background: var(--loss-bg);
    color: var(--loss);
    padding: var(--space-md);
    border-radius: var(--radius);
    border: 1px solid rgba(239,68,68,0.3);
    margin-bottom: var(--space-lg);
    text-align: center;
    font-size: 0.85rem;
}

.auth-note { text-align: center; font-size: 0.8rem; color: var(--text-muted); }
.auth-note a { color: var(--text-link); }

/* User profile */
.user-profile-header {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
}

.user-avatar-lg {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid var(--orange-dim);
}

.user-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card-alt);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-muted);
}

.user-profile-name { font-size: 1.3rem; margin-bottom: 0; font-weight: 800; }
.user-profile-username { color: var(--text-muted); font-size: 0.85rem; }
.user-profile-joined { font-size: 0.8rem; color: var(--text-muted); }

.provider-badge {
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: var(--radius);
    font-weight: 700;
    text-transform: uppercase;
}

.provider-twitch { background: rgba(145,70,255,0.15); color: #a78bfa; }
.provider-discord { background: rgba(88,101,242,0.15); color: #818cf8; }
.provider-google { background: rgba(100,116,139,0.15); color: var(--text-muted); }

.user-providers { display: flex; gap: var(--space-xs); margin-top: var(--space-sm); }

/* ============================================================================
   COMMENTS
   ============================================================================ */

.comments-section { margin-top: var(--space-2xl); }

.comment-input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-md);
    font-family: inherit;
    font-size: 0.85rem;
    resize: vertical;
    background: var(--bg-input);
    color: var(--text);
}

.comment-input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 2px var(--orange-glow); }

.comment-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-sm);
}

.comment-chars { font-size: 0.7rem; color: var(--text-muted); }
.comment-login-prompt { text-align: center; color: var(--text-muted); }
.comment-login-prompt a { color: var(--text-link); }

.comment {
    padding: var(--space-md);
    margin-bottom: var(--space-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
}

.comment-reply { margin-left: var(--space-xl); background: var(--bg-card-alt); }

.comment-header { display: flex; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-xs); }

.comment-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-avatar-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--bg-card-alt);
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--text-muted);
    border-radius: 50%;
}

.comment-author { font-weight: 600; font-size: 0.8rem; color: var(--text-link); }
.comment-time { font-size: 0.7rem; color: var(--text-muted); }
.comment-body { font-size: 0.85rem; margin: 0; }
.comment-actions { display: flex; gap: var(--space-md); margin-top: var(--space-xs); }

.comment-action {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    cursor: pointer;
}

.comment-action:hover { color: var(--orange); }
.comment-empty, .comment-loading { text-align: center; color: var(--text-muted); padding: var(--space-lg) 0; }

.reply-form { margin-top: var(--space-sm); display: flex; gap: var(--space-sm); }
.reply-input { flex: 1; }

/* ============================================================================
   FORMS
   ============================================================================ */

.form-group { margin-bottom: var(--space-lg); }

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: var(--space-xs);
}

.form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    background: var(--bg-input);
    color: var(--text);
}

.form-input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 2px var(--orange-glow); }

.form-checkbox label { display: flex; align-items: center; gap: var(--space-sm); font-size: 0.85rem; }

/* ============================================================================
   FANTASY
   ============================================================================ */

.fantasy-subtitle { color: var(--text-secondary); margin-bottom: var(--space-lg); }
.fantasy-actions { margin-bottom: var(--space-xl); }

.league-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-md);
}

.league-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-decoration: none;
    color: var(--text);
    transition: all 0.15s;
}

.league-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.2); text-decoration: none; border-color: var(--orange-dim); }
.league-name { font-size: 1rem; font-weight: 700; margin: 0 0 var(--space-xs); }
.league-meta { font-size: 0.8rem; color: var(--text-muted); display: flex; gap: var(--space-md); }
.league-private-badge { font-size: 0.65rem; background: rgba(100,116,139,0.15); padding: 2px 8px; border-radius: var(--radius); font-weight: 600; color: var(--text-muted); }

.fantasy-join-box { margin-bottom: var(--space-xl); }

.pick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--space-sm);
}

.pick-card {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
    font-family: inherit;
    font-size: inherit;
    color: var(--text);
}

.pick-card:hover { border-color: var(--orange-dim); }
.pick-card.pick-selected { border-color: var(--teal); background: var(--teal-bg); }
.pick-card.pick-locked { opacity: 0.5; cursor: default; }

.pick-photo img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.pick-initial {
    display: inline-flex;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-card-alt);
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.pick-info { flex: 1; }
.pick-name { font-weight: 600; display: block; font-size: 0.85rem; }
.pick-record { font-size: 0.75rem; color: var(--text-muted); }

.pick-check {
    color: var(--teal);
    font-size: 1rem;
    visibility: hidden;
}

.pick-selected .pick-check { visibility: visible; }

.pick-counter { font-weight: 700; color: var(--orange); }
.pick-locked-badge { font-size: 0.65rem; background: rgba(100,116,139,0.15); padding: 2px 6px; border-radius: var(--radius); color: var(--text-muted); }

.invite-code {
    display: block;
    background: var(--bg-card-alt);
    border: 1px solid var(--border);
    padding: var(--space-md);
    font-family: var(--font-mono);
    font-size: 1.1rem;
    text-align: center;
    border-radius: var(--radius);
    margin: var(--space-sm) 0;
    user-select: all;
    color: var(--orange);
}

/* ============================================================================
   COMPARE
   ============================================================================ */

.compare-form { margin-bottom: var(--space-xl); }

.compare-tool {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: var(--space-xl);
    align-items: start;
    margin: var(--space-xl) 0;
}

.compare-picker { display: flex; flex-direction: column; gap: var(--space-sm); }

.compare-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--orange);
    letter-spacing: 0.05em;
}

.compare-search-wrap { position: relative; }

.compare-input {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    background: var(--bg-input);
    color: var(--text);
}
.compare-input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 2px var(--orange-glow); }

.compare-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,.4);
    z-index: 100;
    display: none;
    max-height: 300px;
    overflow-y: auto;
}
.compare-dropdown.open { display: block; }

.compare-dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    cursor: pointer;
    transition: background 0.1s;
}
.compare-dropdown-item:hover,
.compare-dropdown-item.active { background: var(--bg-table-hover); }

.cdi-photo { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: var(--bg-card-alt); display: flex; align-items: center; justify-content: center; }
.cdi-photo img { width: 100%; height: 100%; object-fit: cover; }
.cdi-initial { font-weight: 700; color: var(--text-muted); font-size: 0.8rem; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.cdi-info { display: flex; flex-direction: column; gap: 2px; }
.cdi-name { font-weight: 600; font-size: 0.9rem; }
.cdi-rank { font-size: 0.7rem; color: var(--text-muted); }

.compare-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    min-height: 100px;
}

.compare-card-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    color: var(--text-muted);
    height: 100%;
    min-height: 80px;
}
.compare-card-icon { font-size: 1.5rem; }

.compare-card-inner {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    position: relative;
}

.compare-card-photo-wrap {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-card-alt);
}
.compare-card-photo-wrap img { width: 100%; height: 100%; object-fit: cover; }
.compare-card-initial { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; font-weight: 700; color: var(--text-muted); }

.compare-card-info { flex: 1; }
.compare-card-name { font-weight: 700; font-size: 1rem; margin-bottom: 4px; }
.compare-card-clear {
    position: absolute;
    top: -4px;
    right: -4px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
}
.compare-card-clear:hover { color: var(--vermillion); }

.compare-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--orange);
    padding-top: 60px;
}

.compare-actions {
    display: flex;
    justify-content: center;
    margin-top: var(--space-lg);
}

.compare-btn {
    background: var(--orange);
    color: var(--navy-darkest);
    border: none;
    padding: var(--space-sm) var(--space-xl);
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.15s;
}
.compare-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.compare-btn:not(:disabled):hover { background: var(--orange-bright); }

/* ============================================================================
   LEGAL PAGES
   ============================================================================ */

.legal-page {
    max-width: 700px;
}
.legal-page h1 {
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
    font-weight: 800;
}
.legal-page h2 {
    font-size: 1.05rem;
    margin-top: var(--space-xl);
    margin-bottom: var(--space-sm);
    color: var(--text);
}
.legal-page p {
    margin-bottom: var(--space-md);
    line-height: 1.7;
    color: var(--text-secondary);
}
.legal-page ul {
    padding-left: 1.5rem;
    margin-bottom: var(--space-md);
}
.legal-page li {
    margin-bottom: var(--space-xs);
    color: var(--text-secondary);
    line-height: 1.6;
}
.legal-updated {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: var(--space-xl);
}

/* ============================================================================
   SECTION WRAPPERS (generic page containers)
   ============================================================================ */

.section { }
.section-inner { }

/* ============================================================================
   MISC
   ============================================================================ */

.empty-state { text-align: center; color: var(--text-muted); padding: var(--space-2xl) 0; }

.bout-day-nav-bottom {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

/* Scrollbar styling for dark theme */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-page); }
::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

/* Hoshitori mobile: stack east/west vertically */
@media (max-width: 1100px) {
    .hoshitori-grid {
        flex-direction: column;
        min-width: 0;
    }
    .hoshitori-divider {
        width: 100%;
        height: 3px;
    }
    .hoshitori-divider-line {
        background: linear-gradient(to right, var(--orange), var(--orange-dim), var(--orange));
    }
    .hoshitori-east .hoshitori-side-label {
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }
    .hoshitori-west .hoshitori-side-label {
        border-radius: 0;
    }
}

@media (max-width: 900px) {
    .sidebar-toggle { display: block; }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.2s ease;
    }

    .sidebar.open { transform: translateX(0); }

    .main-content {
        margin-left: 0;
        padding: var(--space-lg);
    }

    .home-columns {
        grid-template-columns: 1fr;
    }

    .profile-layout {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .profile-photo-box { margin: 0 auto; }

    .h2h-header {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    html { font-size: 13px; }

    .topbar { padding: 0 var(--space-md); }

    .wrestler-grid { grid-template-columns: repeat(2, 1fr); }
    .kimarite-grid { grid-template-columns: 1fr; }
    .prediction-grid { grid-template-columns: 1fr; }
    .league-grid { grid-template-columns: 1fr; }

    .standings-grid { font-size: 0.7rem; }
}
