*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Outfit: self-hosted so we do not hit fonts.googleapis.com in production. */
@font-face {
    font-family: Outfit;
    src: url("/static/fonts/outfit-latin-ext-400.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: Outfit;
    src: url("/static/fonts/outfit-latin-400.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: Outfit;
    src: url("/static/fonts/outfit-latin-ext-500.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: Outfit;
    src: url("/static/fonts/outfit-latin-500.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: Outfit;
    src: url("/static/fonts/outfit-latin-ext-600.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: Outfit;
    src: url("/static/fonts/outfit-latin-600.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: Outfit;
    src: url("/static/fonts/outfit-latin-ext-700.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: Outfit;
    src: url("/static/fonts/outfit-latin-700.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    /* Night-pitch scoreboard. One emerald accent. Surfaces 12px, controls 8px, status pills full. */
    --bg-primary: #0c1210;
    --bg-secondary: #151c18;
    --text-primary: #eef3ef;
    --text-muted: #8b978f;
    --accent: #2fae74;
    --accent-rgb: 47, 174, 116;
    --accent-strong: #127a4a;
    --accent-soft: #7fe0ac;
    --accent-soft-rgb: 127, 224, 172;
    --panel-bg: rgba(18, 24, 21, 0.92);
    --card-bg: rgba(255, 255, 255, 0.04);
    --border-soft: rgba(210, 230, 218, 0.1);
    --shadow-soft: 0 16px 40px rgba(6, 14, 10, 0.45);
    --radius-lg: 12px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --gold: #d4b45a;
    --silver: #c7c9cf;
    --red: #e05656;
    --muted: var(--text-muted);
    --text: var(--text-primary);
    --card: var(--panel-bg);
    font-family: Outfit, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-variant-numeric: tabular-nums;
}

@media (prefers-color-scheme: light) {
    :root {
        --bg-primary: #f3f6f4;
        --bg-secondary: #e7eee9;
        --text-primary: #121816;
        --text-muted: #5b675f;
        --panel-bg: rgba(255, 255, 255, 0.86);
        --card-bg: rgba(12, 18, 16, 0.04);
        --border-soft: rgba(18, 24, 21, 0.1);
        --shadow-soft: 0 16px 40px rgba(18, 24, 21, 0.08);
        --accent-strong: #0f6b42;
    }
}

/* Welcome stays night-pitch even when the OS is in light mode. */
html.welcome-root {
    color-scheme: dark;
    --bg-primary: #0c1210;
    --bg-secondary: #151c18;
    --text-primary: #eef3ef;
    --text-muted: #8b978f;
    --panel-bg: rgba(12, 18, 16, 0.72);
    --card-bg: rgba(255, 255, 255, 0.07);
    --border-soft: rgba(210, 230, 218, 0.16);
    --shadow-soft: 0 18px 48px rgba(4, 10, 8, 0.55);
    --accent-strong: #127a4a;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    min-height: 100dvh;
    background: var(--bg-primary);
    color: var(--text-primary);
    scroll-behavior: smooth;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 200;
    padding: 0.55rem 0.9rem;
    background: var(--accent-strong);
    color: #f4fff8;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
}
.skip-link:focus {
    top: 0.75rem;
    outline: 2px solid var(--accent-soft);
    outline-offset: 2px;
}

body {
    background-image:
        radial-gradient(ellipse 900px 500px at 12% -10%, rgba(var(--accent-rgb), 0.14), transparent 58%),
        radial-gradient(circle at 88% 8%, rgba(var(--accent-rgb), 0.08), transparent 34%);
    background-repeat: no-repeat;
    overflow-x: hidden;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

body.menu-open {
    overflow: hidden;
}


a,
button {
    font: inherit;
    color: inherit;
}

.layout {
    position: relative;
    min-height: 100dvh;
    padding: 0 3vw 4rem;
    display: flex;
    justify-content: center;
    z-index: 1;
}

.main {
    width: min(1200px, 100%);
    padding: 7rem 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.page-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 2rem;
    background: var(--panel-bg);
    backdrop-filter: blur(18px);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.page-header.overlay {
    position: sticky;
    top: clamp(4.5rem, 8vw, 6rem);
    z-index: 10;
    margin-bottom: 2rem;
}

.page-header .left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-header h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
}

.page-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Nav strip: prev | label | next – matches page header (panel, border, radius) */
.gw-nav {
    display: inline-flex;
    align-items: center;
    gap: 0;
    background: var(--panel-bg);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 0.2rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Fill animation keyframes */
@keyframes fill-expand {
    0% { width: 0; }
    100% { width: 100%; }
}

/* Arrow buttons inside nav strip – normal state (no gradient) */
.gw-nav .tab {
    position: relative;
    overflow: hidden;
    padding: 0.45rem 0.6rem;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    z-index: 0;
}
.gw-nav .tab:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* Fill overlay (hidden by default) */
.gw-nav .tab::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 0;
    background: var(--accent);
    border-radius: 8px;
    z-index: -1;
}

/* Back button: fill from right to left */
.gw-nav .tab.arrow-left::before {
    right: 0;
    left: auto;
}
.gw-nav .tab.arrow-left.animating::before {
    animation: fill-expand 0.4s ease-out forwards;
}

/* Next button: fill from left to right */
.gw-nav .tab.arrow-right::before {
    left: 0;
    right: auto;
}
.gw-nav .tab.arrow-right.animating::before {
    animation: fill-expand 0.4s ease-out forwards;
}
.gw-nav .tab:hover,
.gw-nav .tab:focus-visible {
    opacity: 0.95;
    box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.4);
}
.gw-nav .tab:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.gw-nav .tab:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    animation: none;
}
.gw-nav .tab:disabled:hover {
    opacity: 0.35;
    box-shadow: none;
}

/* Current value label in the middle of nav strip */
.gw-nav .month-select {
    padding: 0.45rem 0.75rem;
    margin: 0 0.1rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 90px;
    text-align: center;
}

/* General action buttons (toggles, etc.) – match panel style with fill effect */
.tab {
    position: relative;
    overflow: hidden;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border-soft);
    background: var(--panel-bg);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    z-index: 0;
}
.tab::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 0;
    background: var(--accent);
    border-radius: 10px;
    z-index: -1;
}
.tab.animating::before {
    animation: fill-expand 0.4s ease-out forwards;
}
.tab:hover,
.tab:focus-visible {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
}
.tab:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.tab:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.tab:disabled:hover {
    background: var(--panel-bg);
    border-color: var(--border-soft);
}

/* Refresh button */
.refresh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border-radius: 12px;
    border: 1px solid var(--border-soft);
    background: var(--panel-bg);
    color: var(--text-muted);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.refresh-btn:hover,
.refresh-btn:focus-visible {
    background: rgba(255, 255, 255, 0.06);
    color: var(--accent-soft);
    border-color: rgba(255, 255, 255, 0.12);
}
.refresh-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
/* Loading state - pulsing glow effect */
.refresh-btn.loading {
    pointer-events: none;
    color: var(--accent-soft);
    border-color: var(--accent);
    box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.5);
    animation: refresh-pulse 1s ease-in-out infinite;
}
@keyframes refresh-pulse {
    0%, 100% { 
        box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.4);
        border-color: var(--accent);
    }
    50% { 
        box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.7);
        border-color: var(--accent-soft);
    }
}

.month-select {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  background: var(--panel-bg);
  color: var(--text-primary);
}

/* Search input - base styles */
.search-input {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  background: var(--panel-bg);
  color: var(--text-primary);
  font-size: 0.9rem;
  min-width: 200px;
}
.search-input::placeholder {
  color: var(--text-muted);
}
.search-input:focus {
  outline: none;
  border-color: var(--accent);
}

/* H2H select container and dropdowns */
.h2h-select-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.h2h-select {
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  background: var(--panel-bg);
  color: var(--text-primary);
  font-size: 0.9rem;
  min-width: 140px;
  cursor: pointer;
}
.h2h-select:focus {
  outline: none;
  border-color: var(--accent);
}
.h2h-vs {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
}

/* Last updated timestamp at bottom of content */
.last-updated {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 1.5rem;
  padding: 0.5rem 0;
}

/* Bottom nav: hidden on desktop, shown only on mobile */
.bottom-nav {
  display: none;
}

.dark-toggle {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--muted);
  background: transparent;
  cursor: pointer;
}

#feedback {
  margin: 12px 0;
  color: var(--red);
}

/* H2H layout */
.h2h-wrapper {
    background: var(--panel-bg);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.h2h-summary {
    display: flex;
    align-items: stretch;
    gap: 1rem;
    justify-content: center;
}

.h2h-player {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    transition: border-color 0.2s ease;
}

.h2h-player.h2h-winner {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.05);
}

.h2h-player-name {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
}

.h2h-player-team {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.h2h-player-total {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.h2h-player-wins {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-soft);
}

.h2h-vs-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0 0.5rem;
}

.h2h-vs-badge {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
}

.h2h-draws {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.h2h-diff {
    text-align: center;
    padding: 0.75rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.h2h-instruction,
.h2h-loading {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.h2h-error {
    text-align: center;
    padding: 2rem;
    color: var(--red);
}

.h2h-diff.h2h-diff-1 {
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--accent-soft);
}

.h2h-diff.h2h-diff-2 {
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--accent-soft);
}

.h2h-diff-arrow {
    font-size: 1.2rem;
}

.h2h-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.h2h-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.h2h-table th,
.h2h-table td {
    padding: 0.6rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid var(--border-soft);
}

.h2h-table th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.h2h-col-pts {
    text-align: center !important;
    min-width: 60px;
}

.h2h-winner-col {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.h2h-winner-cell {
    color: #22c55e;
    font-weight: 600;
}

.h2h-row-win-1 {
    background: rgba(var(--accent-rgb), 0.05);
}

.h2h-row-win-2 {
    background: rgba(var(--accent-soft-rgb), 0.05);
}

/* Transfers styles */
/* Transfers page styles */
.transfers-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.25rem;
}

.transfers-empty {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-size: 1rem;
    background: var(--panel-bg);
    border-radius: 16px;
    border: 1px solid var(--border-soft);
}

.transfer-card {
    background: var(--panel-bg);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.transfer-card-header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-soft);
}

.transfer-card-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

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

.transfer-card-count {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-soft);
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.transfer-chip-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    background: var(--accent);
    color: white;
    letter-spacing: 0.5px;
}

.transfer-hit-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    background: var(--red);
    color: white;
}

.transfer-card-chip {
    border-color: var(--accent);
}

.transfer-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.transfer-item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.transfer-out,
.transfer-in {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.transfer-arrow {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    flex-shrink: 0;
}

.transfer-arrow-out {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.transfer-arrow-in {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.transfer-player-name {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.transfer-out .transfer-player-name {
    color: var(--text-muted);
    text-decoration: line-through;
    text-decoration-color: rgba(248, 113, 113, 0.5);
}

.transfer-in .transfer-player-name {
    font-weight: 500;
}

.transfer-hit {
    align-self: flex-start;
    margin-left: 34px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #f87171;
    background: rgba(239, 68, 68, 0.15);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

/* Transfers view toggle */
.transfers-view-toggle {
    display: flex;
    gap: 0;
    background: var(--panel-bg);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.transfers-toggle-btn {
    padding: 0.3rem 0.9rem !important;
    border: none !important;
    border-radius: 0 !important;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    cursor: pointer;
    transition: all 0.15s ease;
}

.transfers-toggle-btn.active {
    background: var(--accent);
    color: #fff;
}

/* Transfer Trends */
.cards.trends-view {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.trends-hint {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.82rem;
    padding: 0.5rem 0 0.75rem;
}

.trends-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.trend-section {
    background: var(--panel-bg);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    overflow: hidden;
}

.trend-section-title {
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.85rem 1rem 0.6rem;
    color: var(--text-primary);
}

.trend-table {
    width: 100%;
    border-collapse: collapse;
}

.trend-table thead {
    border-top: 1px solid var(--border-soft);
}

.trend-table th {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    padding: 0.5rem 0.6rem;
    text-align: left;
    white-space: nowrap;
}

.trend-th-rank { width: 28px; text-align: center; }
.trend-th-count,
.trend-th-net,
.trend-th-own { text-align: right; }

.trend-row td {
    padding: 0.55rem 0.6rem;
    border-top: 1px solid var(--border-soft);
    font-size: 0.85rem;
    vertical-align: middle;
}

.trend-rank {
    text-align: center;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.78rem;
}

.trend-player {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

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

.trend-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.trend-number {
    text-align: right;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.trend-in { color: #4ade80; }
.trend-out { color: #f87171; }

.trend-net {
    text-align: right;
    font-weight: 500;
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.trend-net-pos { color: #4ade80; }
.trend-net-neg { color: #f87171; }

.trend-ownership {
    text-align: right;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
}

.details-row td { background: rgba(0,0,0,0.035); padding: 0 0 10px 0; }
.details-content { padding: 10px 12px; }
.details-content h4 { margin: 6px 0 8px; font-size: 14px; color: var(--muted); }
.gw-list { width: 100%; border-collapse: collapse; }
.gw-list th, .gw-list td { padding: 6px 8px; border-bottom: 1px solid rgba(100,100,100,0.15); font-size: 14px; }
.toggle-btn { padding: 4px 8px; border-radius: 6px; border: 1px solid var(--muted); background: transparent; cursor: pointer; font-size: 12px; margin-left: 6px; }


/* Toggle button colors */
.toggle-btn {
  color: var(--text-primary);
}

/* Podium + bottom two colors */
.gold {
  background-color: var(--gold) !important;
  font-weight: bold;
  color: black !important;   /* NEW: ensures text is readable */
}
.silver {
  background-color: var(--silver) !important;
  color: black !important;
}

/* Chart wrapper and title */
.chart-wrapper {
    background: var(--panel-bg);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 1.5rem;
}

.chart-title {
    margin: 0 0 0.25rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.chart-subtitle {
    margin: 0 0 1rem 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Pagination info */
.pagination-info {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    min-width: 60px;
    text-align: center;
}

.chart-metric-toggle {
    width: fit-content;
    margin-bottom: 1rem;
}

.chart-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ranking-chart {
    width: 100%;
    min-width: 600px;
    height: auto;
}

.chart-line {
    transition: opacity 0.2s ease, stroke-width 0.2s ease;
    cursor: pointer;
}

.chart-dot {
    transition: opacity 0.2s ease, r 0.2s ease;
    cursor: pointer;
}

.legend-item {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.legend-item text {
    font-family: inherit;
}

.chart-loading,
.chart-error {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-size: 1rem;
}

@media (max-width: 768px) {
    .chart-wrapper {
        padding: 1rem;
    }
    
    .chart-title {
        font-size: 1.1rem;
    }
    
    .chart-subtitle {
        font-size: 0.75rem;
    }
    
    .ranking-chart {
        min-width: 500px;
    }
}

/* Live badge */
.live-badge {
    display: inline-block;
    background: var(--accent-strong);
    color: #f4fff8;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    margin-left: 0.5rem;
    vertical-align: middle;
    letter-spacing: 0.04em;
}

@media (prefers-reduced-motion: no-preference) {
    .live-badge {
        animation: pulse-live 2s ease-in-out infinite;
    }
}

@keyframes pulse-live {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Error toast */
/* Season not started yet placeholder */
.season-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.85rem;
    max-width: 420px;
    margin: 3rem auto;
    padding: 2.5rem 2rem;
    background: var(--panel-bg);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}
.season-placeholder.hidden { display: none; }
.season-placeholder-icon {
    width: 3rem;
    height: 3rem;
    color: var(--accent);
}
.season-placeholder-icon svg { width: 100%; height: 100%; display: block; }
.season-placeholder-title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    margin: 0;
}
.season-placeholder-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}
.season-placeholder-deadline {
    display: inline-flex;
    margin-top: 0.25rem;
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-soft);
    background: rgba(var(--accent-rgb), 0.14);
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    border-radius: 999px;
}

.error-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #dc2626;
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 10px 40px rgba(220, 38, 38, 0.4);
}

.error-toast.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    width: 100%;
}

@media (min-width: 768px) {
    .cards.chip-cards {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 1.5rem;
    }
}

.chip-card {
    background: var(--panel-bg);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-width: 0;
}

@media (min-width: 768px) {
    .chip-card {
        padding: 2rem;
        gap: 1.5rem;
    }
}

.chip-card-header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.chip-card-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.chip-card-team {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.chip-tiles {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .chip-tiles {
        gap: 1rem;
    }
}

.chip-tile {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    padding: 0.75rem;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    min-width: 0;
}

@media (min-width: 768px) {
    .chip-tile {
        padding: 1rem;
        border-radius: 16px;
    }
}

.chip-tile.chip-available {
    background: rgba(var(--accent-rgb), 0.2);
    border-color: rgba(var(--accent-rgb), 0.4);
    color: var(--accent-soft);
}

.chip-tile.chip-used {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.4);
    opacity: 0.6;
}

/* Used in previous half but available again this half */
.chip-tile.chip-used-previous {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.4);
    color: #86efac;
}

.chip-tile.chip-used-previous .chip-gw {
    color: rgba(134, 239, 172, 0.7);
}

.chip-label {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

@media (min-width: 768px) {
    .chip-label {
        font-size: 1.5rem;
    }
}

.chip-gw {
    font-size: 0.65rem;
    margin-top: 0.25rem;
    opacity: 0.7;
    font-weight: 500;
}

@media (min-width: 768px) {
    .chip-gw {
        font-size: 0.75rem;
        margin-top: 0.35rem;
    }
}

.cards.hidden,
#rankingTable.hidden,
#spinner.hidden,
#chartContainer.hidden,
#h2hContainer.hidden,
#defconHint.hidden {
    display: none;
}

#rankingTable {
    width: 100%;
    border-collapse: collapse;
    background: var(--panel-bg);
    border-radius: 18px;
    overflow: hidden;
    font-size: 0.85rem;
    table-layout: auto;
}

#rankingTable th,
#rankingTable td {
    padding: 0.6rem 0.4rem;
    text-align: left;
    border-bottom: 1px solid var(--border-soft);
    white-space: nowrap;
}

#rankingTable th:first-child,
#rankingTable td:first-child {
    padding-left: 1rem;
    width: 3rem;
    text-align: center;
}

#rankingTable th:last-child,
#rankingTable td:last-child {
    padding-right: 1rem;
}

#output {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

#rankingTable tr:last-child td {
    border-bottom: none;
}

/* Monthly Stats Banner */
.stats-banner {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding: 1rem 1.5rem;
    background: var(--panel-bg);
    backdrop-filter: blur(18px);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    margin-bottom: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    min-width: 60px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
}

.stat-item.stat-high .stat-value {
    color: #22c55e;
}

.stat-item.stat-low .stat-value {
    color: #ef4444;
}

@media (max-width: 640px) {
    .stats-banner {
        gap: 0.75rem;
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
    }
    
    .stat-item {
        min-width: 50px;
    }
    
    .stat-value {
        font-size: 1.2rem;
    }
    
    .stat-label {
        font-size: 0.65rem;
    }
}

.monthly-details-row {
    background: rgba(255, 255, 255, 0.02);
}

.monthly-details-row.hidden,
.owned-details-row.hidden {
    display: none;
}

.monthly-details-row td {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-soft);
}

.details-content {
    padding: 0.5rem 0;
}

.details-content h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.details-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.details-table th,
.details-table td {
    padding: 0.6rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.details-table th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.details-table tr:last-child td {
    border-bottom: none;
}

.gw-team-cell {
    text-align: right;
    width: 1%;
    white-space: nowrap;
}
.gw-team-btn {
    background: rgba(var(--accent-rgb), 0.12);
    border: 1px solid rgba(var(--accent-rgb), 0.35);
    color: var(--accent-soft, #c4b5fd);
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    line-height: 1;
}
.gw-team-btn:hover {
    background: rgba(var(--accent-rgb), 0.25);
    border-color: rgba(var(--accent-rgb), 0.6);
    color: #fff;
}
.gw-team-btn:active { transform: scale(0.97); }

/* GW cell base styling */
.gw-cell {
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.gw-header {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* GW score color coding (season table) */
.gw-very-bad {
    background-color: rgba(239, 68, 68, 0.3) !important;
    color: #fca5a5 !important;
}
.gw-bad {
    background-color: rgba(249, 115, 22, 0.25) !important;
    color: #fdba74 !important;
}
.gw-good {
    background-color: rgba(74, 222, 128, 0.2) !important;
    color: #86efac !important;
}
.gw-very-good {
    background-color: rgba(34, 197, 94, 0.35) !important;
    color: #4ade80 !important;
    font-weight: 600;
}

/* Sortable table headers */
.sortable {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.sortable:hover {
    color: var(--accent-soft);
}

/* Clickable rows */
.clickable-row {
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

.clickable-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

.clickable-row:active {
    transform: scale(0.995);
}

/* Owned details / owner tags */
.owned-details-row td {
    padding: 0.5rem 1rem !important;
    background: rgba(255, 255, 255, 0.02);
}

.owners-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.owner-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 16px;
    font-size: 0.78rem;
    font-weight: 500;
    background: var(--accent);
    color: white;
    white-space: nowrap;
}

/* Data refresh highlight animation */
@keyframes data-refresh {
    0% { background-color: rgba(var(--accent-rgb), 0.15); }
    100% { background-color: transparent; }
}
.data-refreshed {
    animation: data-refresh 1s ease-out;
}

/* Row chevron icon */
.row-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 0.7rem;
    color: var(--accent-soft);
    transition: transform 0.25s ease, color 0.2s ease;
    cursor: pointer;
    border-radius: 4px;
}

.row-chevron:hover {
    color: var(--text-primary);
    background: rgba(var(--accent-rgb), 0.2);
}

.row-chevron.expanded {
    transform: rotate(90deg);
    color: var(--accent);
}

/* Expand all button */
.expand-all-btn {
    background: rgba(var(--accent-rgb), 0.15);
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    color: var(--accent-soft);
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.expand-all-btn:hover,
.expand-all-btn:focus-visible {
    background: rgba(var(--accent-rgb), 0.25);
    border-color: var(--accent);
    color: var(--text-primary);
    outline: none;
}

.expand-all-btn .chevron-icon {
    transition: transform 0.25s ease;
}

.details-btn {
    background: rgba(var(--accent-rgb), 0.2);
    border: 1px solid rgba(var(--accent-rgb), 0.4);
    color: var(--accent-soft);
    padding: 0.4rem 0.9rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.details-btn:hover,
.details-btn:focus-visible {
    background: rgba(var(--accent-rgb), 0.3);
    border-color: var(--accent);
    color: var(--text-primary);
    outline: none;
}

.details-btn[aria-expanded="true"] {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

#spinner {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent);
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

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

.hamburger {
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: transparent;
    color: var(--text-primary);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
    cursor: pointer;
    display: none;
}

.hamburger.mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-item {
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
}


/* ===== Staggered Menu ===== */
.staggered-menu-wrapper {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1000;
}

.staggered-menu-wrapper.fixed-wrapper {
    width: 100%;
    height: 100%;
}

.staggered-menu-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    padding: clamp(1rem, 4vw, 2.5rem) clamp(1rem, 6vw, 4rem) 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
    z-index: 101;
    background: transparent;
    backdrop-filter: blur(8px);
    isolation: isolate;
}

.staggered-menu-header > * {
    pointer-events: auto;
}

.sm-logo {
    position: relative;
    z-index: 98;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sm-toggle {
    position: relative;
    z-index: 103;
    isolation: isolate;
}

.sm-logo-icon {
    display: inline-flex;
    color: var(--accent-soft);
}
.sm-logo-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    display: block;
}

.season-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    margin-left: 0.5rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--accent-soft);
    background: rgba(var(--accent-rgb), 0.14);
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    border-radius: 999px;
    text-transform: none;
}

.sm-toggle {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    padding: 0.65rem 1.25rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.3s ease, border 0.3s ease;
}

.sm-toggle:hover,
.sm-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--accent);
}

.sm-icon {
    position: relative;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform-origin: center;
    transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.sm-icon-line {
    position: absolute;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transform-origin: center;
    transition: transform 0.35s ease;
}

.sm-icon-line-v {
    transform: rotate(90deg);
}

.staggered-menu-wrapper[data-open='true'] .sm-icon {
    transform: rotate(225deg);
}

.sm-toggle-textWrap {
    position: relative;
    display: inline-block;
    height: 1em;
    overflow: hidden;
    white-space: nowrap;
    min-width: 3.5em;
    transform: translateY(2px);
}

.sm-toggle-textInner {
    display: flex;
    flex-direction: column;
    line-height: 1;
    gap: 0.5em;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    transform: translateY(0);
    will-change: transform;
    padding-top: 0;
}

.sm-toggle-line {
    display: block;
    height: 1em;
    line-height: 1;
    flex-shrink: 0;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.staggered-menu-wrapper[data-open='true'] .sm-toggle-textInner {
    transform: translateY(calc(-1em - 0.5em + 0.1em));
}

.sm-prelayers {
    position: absolute;
    top: 0;
    bottom: 0;
    width: clamp(260px, 32vw, 420px);
    right: 0;
    left: auto;
    display: flex;
    flex-direction: column;
    pointer-events: none;
    gap: 0.35rem;
    padding: clamp(1rem, 4vw, 2.5rem);
    z-index: 98;
}

.sm-prelayer {
    flex: 1;
    border-radius: 18px;
    transform: translateX(115%);
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    opacity: 0;
    pointer-events: none;
}

.staggered-menu-wrapper[data-open='true'] .sm-prelayer {
    transform: translateX(0);
    opacity: 1;
}

.sm-prelayer-one {
    background: #1c1e22;
}

.sm-prelayer-two {
    background: #14171a;
}

.sm-prelayer-three {
    background: var(--accent);
}

.sm-scrim {
    position: absolute;
    inset: 0;
    background: rgba(5, 6, 7, 0.55);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 99;
}

.staggered-menu-wrapper[data-open='true'] .sm-scrim {
    opacity: 1;
    pointer-events: auto;
}

.staggered-menu-panel {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    left: auto;
    width: clamp(280px, 34vw, 460px);
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: clamp(2rem, 5vw, 4.5rem) clamp(1.5rem, 4vw, 3rem) clamp(1.5rem, 3vw, 2.5rem);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    transform: translateX(110%);
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: auto;
    z-index: 100;
    padding-top: clamp(7rem, 12vh, 10rem);
}

.staggered-menu-wrapper[data-open='true'] .staggered-menu-panel {
    transform: translateX(0);
}

.sm-panel-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
}

.sm-panel-nav {
    flex: 1;
}

.league-selector {
    padding: 0.75rem 1rem 1rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.league-selector-back {
    display: block;
    font-size: 0.8rem;
    color: var(--accent-soft);
    margin-bottom: 0.5rem;
    text-decoration: none;
}
.league-selector-back:hover { text-decoration: underline; }
.league-selector-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}
.league-selector-row {
    display: flex;
    gap: 0.5rem;
}
.league-selector input {
    flex: 1;
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    color: var(--text-primary);
}
.league-selector input::placeholder {
    color: var(--text-muted);
}
.league-go-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
.league-go-btn:hover {
    opacity: 0.9;
}
.league-feedback {
    font-size: 0.75rem;
    margin-top: 0.35rem;
    min-height: 1.2em;
}
.league-feedback.error { color: var(--red); }
.league-feedback.success { color: #22c55e; }

.recent-section {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.recent-section-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: none;
  background: transparent;
  color: inherit;
  padding: 0;
  margin: 0 0 0.4rem;
  cursor: pointer;
}
.recent-section-title {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0;
}
.recent-section-caret {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform 0.15s ease;
}
.recent-section-toggle[aria-expanded="false"] .recent-section-caret {
  transform: rotate(-90deg);
}
.recent-section-content.collapsed {
  display: none;
}
.recent-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.recent-item {
  padding: 0.3rem 0.5rem;
  font-size: 0.8rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.recent-item:hover {
  background: rgba(255,255,255,0.1);
}
.recent-item.current {
  border-color: var(--accent);
  color: var(--accent-soft);
}
.recent-teams { margin-top: 0.5rem; }
.recent-team-row { margin-bottom: 0.5rem; }
.recent-team-row:last-child { margin-bottom: 0; }
.recent-team-label { font-size: 0.7rem; color: var(--text-muted); margin-bottom: 0.25rem; display: block; }
.recent-team-leagues { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.25rem; }

.api-status-banner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin: -0.75rem 0 0.5rem;
  padding: 0.65rem 0.85rem;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 12px;
  color: #fca5a5;
  font-size: 0.82rem;
}
.api-status-banner.hidden {
  display: none;
}
.api-retry-btn {
  border: 1px solid rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.2);
  color: #ffe4e6;
  border-radius: 8px;
  padding: 0.25rem 0.6rem;
  font-size: 0.78rem;
  cursor: pointer;
}
.api-retry-btn:hover {
  background: rgba(239, 68, 68, 0.28);
}
.api-retry-countdown {
  color: var(--text-muted);
  font-size: 0.75rem;
}
.api-retry-countdown.hidden {
  display: none;
}

.sm-panel-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.sm-panel-itemWrap {
    overflow: hidden;
}

.sm-panel-item {
    width: 100%;
    border: none;
    background: transparent;
    color: inherit;
    text-align: left;
    font-size: clamp(1.5rem, 4.5vh, 3rem);
    font-weight: 600;
    letter-spacing: -1px;
    text-transform: uppercase;
    padding: 0.35rem 0;
    cursor: pointer;
    position: relative;
    transition: color 0.25s ease, transform 0.25s ease;
}


.sm-panel-item:hover,
.sm-panel-item:focus-visible,
.sm-panel-item.active {
    color: var(--accent-soft);
    transform: translateX(6px);
}


@media (max-width: 900px) {
    .layout {
        padding: 0 1rem 2rem;
    }

    .main {
        padding-top: 5rem;
        gap: 1.5rem;
    }

    .page-header {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .page-header h1 {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }

    .page-controls {
        width: 100%;
        flex-wrap: wrap;
        gap: 1rem;
    }

    #rankingTable {
        border-radius: 16px;
        font-size: 0.85rem;
    }

    #rankingTable th,
    #rankingTable td {
        padding: 0.6rem 0.4rem;
        font-size: 0.8rem;
    }

    #rankingTable th:first-child,
    #rankingTable td:first-child {
        padding-left: 0.75rem;
        width: 2.5rem;
    }

    #rankingTable th:last-child,
    #rankingTable td:last-child {
        padding-right: 0.75rem;
    }

    .sm-panel-item {
        font-size: clamp(1.5rem, 4vh, 2.6rem);
    }
}

@media (max-width: 640px) {
    .layout {
        padding: 0 0.75rem 1.5rem;
    }

    .main {
        padding-top: 4.5rem;
        gap: 1rem;
    }

    .page-header {
        padding: 0.75rem;
        border-radius: 16px;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .page-controls {
        width: 100%;
        gap: 0.75rem;
    }

    .gw-nav {
        width: 100%;
        justify-content: space-between;
        padding: 0.25rem;
    }

    .gw-nav .tab {
        min-width: 44px;
        min-height: 44px;
        padding: 0.5rem;
        font-size: 1rem;
    }

    .gw-nav .month-select {
        min-width: 80px;
        padding: 0.5rem 0.5rem;
        font-size: 0.85rem;
    }

    .tab {
        min-height: 44px;
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    .refresh-btn {
        min-width: 44px;
        min-height: 44px;
        width: 2.75rem;
        height: 2.75rem;
        font-size: 1.2rem;
    }

    .search-input {
        width: 100%;
        min-width: unset;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    #rankingTable {
        border-radius: 16px;
        font-size: 0.75rem;
        min-width: 100%;
    }

    #rankingTable th,
    #rankingTable td {
        padding: 0.6rem 0.4rem;
        font-size: 0.8rem;
    }

    #rankingTable th:first-child,
    #rankingTable td:first-child {
        padding-left: 0.75rem;
    }

    #rankingTable th:last-child,
    #rankingTable td:last-child {
        padding-right: 0.75rem;
    }

    .details-btn {
        padding: 0.3rem 0.7rem;
        font-size: 0.75rem;
    }

    .row-chevron {
        width: 24px;
        height: 24px;
        font-size: 0.6rem;
    }

    .expand-all-btn {
        padding: 0.25rem 0.4rem;
        font-size: 0.6rem;
    }
    
    .sortable {
        font-size: 0.75rem;
    }

    .refresh-countdown {
        width: 32px;
        height: 32px;
    }

    .refresh-seconds {
        font-size: 0.55rem;
    }

    .gw-header {
        font-size: 0.6rem;
        min-width: 32px;
    }

    .gw-cell {
        font-size: 0.7rem;
        min-width: 32px;
    }

    .details-content {
        padding: 0.25rem 0;
    }

    .details-content h3 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .details-table {
        font-size: 0.75rem;
    }

    .details-table th,
    .details-table td {
        padding: 0.4rem 0.5rem;
    }

    .staggered-menu-header {
        padding: 1rem 1rem 1rem;
    }

    .page-header.overlay {
        top: 3.5rem;
    }

    .sm-logo {
        font-size: 0.9rem;
    }

    .sm-toggle {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .staggered-menu-panel {
        width: calc(100% - 1.5rem);
        margin-right: 0.75rem;
        margin-left: auto;
        border-radius: 18px;
        padding: 3rem 1.25rem 1.5rem;
        padding-top: clamp(6rem, 14vh, 8rem);
    }

    .sm-prelayers {
        width: 100%;
        padding-left: 0.75rem;
    }

    .sm-panel-item {
        font-size: clamp(1.25rem, 3.5vh, 2.2rem);
    }
    
    .error-toast {
        left: 1rem;
        right: 1rem;
        transform: translateY(100px);
        text-align: center;
    }
    
    .error-toast.visible {
        transform: translateY(0);
    }
    
    .live-badge {
        font-size: 0.55rem;
        padding: 0.15rem 0.4rem;
    }
    
    /* H2H mobile styles */
    .h2h-select-container {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        gap: 0.5rem;
    }
    
    .h2h-select {
        min-width: 100px;
        font-size: 0.75rem;
        padding: 0.4rem 0.5rem;
    }
    
    .h2h-summary {
        flex-direction: column;
        gap: 1rem;
    }
    
    .h2h-player {
        width: 100%;
        padding: 1rem;
    }
    
    .h2h-player-name {
        font-size: 1.1rem;
    }
    
    .h2h-player-total {
        font-size: 1.25rem;
    }
    
    .h2h-vs-section {
        flex-direction: row;
        gap: 1rem;
    }
    
    .h2h-vs-badge {
        width: 40px;
        height: 40px;
        font-size: 0.75rem;
    }
    
    .h2h-table th,
    .h2h-table td {
        padding: 0.5rem 0.5rem;
        font-size: 0.75rem;
    }
    
    /* Transfers mobile styles */
    .transfers-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .transfer-card {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .transfer-card-name {
        font-size: 1rem;
    }
    
    .transfer-item {
        padding: 0.6rem 0.75rem;
    }
    
    .transfer-player-name {
        font-size: 0.85rem;
    }
    
    .transfer-arrow {
        width: 22px;
        height: 22px;
        font-size: 0.8rem;
    }
    
    .transfer-hit {
        margin-left: 30px;
    }

    .trends-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .trend-section {
        border-radius: 12px;
    }

    .trend-table th,
    .trend-table td {
        font-size: 0.78rem;
    }

    .trend-table th { padding: 0.4rem 0.45rem; }
    .trend-row td { padding: 0.5rem 0.45rem; }
    .trend-meta { font-size: 0.68rem; }
    .trend-number { font-size: 0.8rem; }

    .transfers-view-toggle {
        border-radius: 6px;
    }

    .transfers-toggle-btn {
        padding: 0.25rem 0.7rem !important;
        font-size: 0.75rem;
    }

    /* Bottom nav: visible only on mobile */
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 100;
        justify-content: space-around;
        align-items: center;
        padding: 0.5rem 0.5rem calc(0.5rem + env(safe-area-inset-bottom, 0));
        background: var(--panel-bg);
        border-top: 1px solid var(--border-soft);
        backdrop-filter: blur(18px);
    }
    .bottom-nav-item {
        position: relative;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.2rem;
        padding: 0.4rem 0.75rem;
        border: none;
        background: transparent;
        color: var(--text-muted);
        font-size: 0.7rem;
        cursor: pointer;
        border-radius: 8px;
        transition: color 0.2s ease, background 0.2s ease;
        z-index: 0;
    }
    .bottom-nav-item::before {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        width: 0;
        background: var(--accent);
        border-radius: 8px;
        z-index: -1;
    }
    .bottom-nav-item.animating::before {
        animation: fill-expand 0.4s ease-out forwards;
    }
    .bottom-nav-item:hover,
    .bottom-nav-item:focus-visible {
        color: var(--text-primary);
        background: rgba(255, 255, 255, 0.06);
        outline: none;
    }
    .bottom-nav-item.active {
        color: var(--accent-soft);
        background: rgba(var(--accent-rgb), 0.2);
    }
    .bottom-nav-icon {
        display: inline-flex;
    }
    .bottom-nav-icon svg {
        width: 1.3rem;
        height: 1.3rem;
        display: block;
    }
    .bottom-nav-label {
        white-space: nowrap;
    }

    /* Adjust main padding for bottom nav */
    .main {
        padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0)) !important;
    }
}

/* ==== Profile Banner ==== */
.profile-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    background: linear-gradient(135deg, #1a1040, #0e1119);
    border-bottom: 1px solid var(--border-soft);
    padding: 0.6rem 1rem;
}
.profile-banner.hidden { display: none; }
.profile-banner-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.profile-banner-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-shrink: 0;
}
.profile-banner-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.team-id-input {
    width: 120px;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border-soft);
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
    font-size: 0.85rem;
}
.team-id-input:focus {
    outline: none;
    border-color: var(--accent);
}
.team-id-submit {
    padding: 0.4rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.team-id-submit:hover { opacity: 0.9; }
.team-id-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.profile-banner-dismiss {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0 0.4rem;
    line-height: 1;
    margin-left: auto;
}
.team-id-feedback {
    font-size: 0.8rem;
    color: var(--red);
    padding: 0 1rem 0.25rem;
    max-width: 900px;
    margin: 0 auto;
}

/* ==== Header Actions (bell + profile) ==== */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.notif-bell {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3rem;
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: color 0.2s ease;
}
.notif-bell:hover { color: var(--text-primary); }
.notif-bell-icon { pointer-events: none; display: inline-flex; }
.notif-bell-icon svg { width: 1.3rem; height: 1.3rem; display: block; }
.notif-badge {
    position: absolute;
    top: -2px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    background: var(--red);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    pointer-events: none;
}
.notif-badge.hidden { display: none; }

.profile-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    background: rgba(var(--accent-rgb), 0.2);
    color: var(--accent-soft);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.profile-btn.hidden { display: none; }
.profile-btn:hover {
    background: rgba(var(--accent-rgb), 0.4);
    border-color: var(--accent-soft);
}

/* ==== Notification Panel ==== */
.notif-panel {
    position: fixed;
    top: clamp(4rem, 8vw, 5.5rem);
    right: clamp(1rem, 6vw, 4rem);
    width: min(360px, calc(100vw - 2rem));
    max-height: 70vh;
    background: #1a1a1f;
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    z-index: 1002;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.notif-panel.hidden { display: none; }
.notif-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-soft);
    font-weight: 600;
    font-size: 0.9rem;
}
.notif-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.notif-content {
    overflow-y: auto;
    padding: 0.5rem;
}
.notif-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    transition: background 0.15s ease;
}
.notif-item:hover { background: rgba(255,255,255,0.04); }
.notif-item-icon { display: inline-flex; flex-shrink: 0; margin-top: 1px; color: var(--text-muted); }
.notif-item-icon svg { width: 1.1rem; height: 1.1rem; display: block; }
.notif-item-text { font-size: 0.85rem; color: var(--text-primary); }
.notif-item-sub { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.notif-deadline .notif-item-sub { color: #f59e0b; }
.notif-deadline .notif-item-icon { color: #f59e0b; }
.notif-price-up .notif-item-text { color: #4ade80; }
.notif-price-up .notif-item-icon { color: #4ade80; }
.notif-price-down .notif-item-text { color: #f87171; }
.notif-price-down .notif-item-icon { color: #f87171; }

/* ==== Profile Modal ==== */
.profile-modal {
    position: fixed;
    inset: 0;
    z-index: 1003;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(5,6,7,0.7);
    backdrop-filter: blur(4px);
}
.profile-modal.hidden { display: none; }
.profile-modal-content {
    background: #1a1a1f;
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    width: min(420px, calc(100vw - 2rem));
    max-height: 85vh;
    overflow-y: auto;
}
.profile-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-soft);
}
.profile-modal-header h3 { margin: 0; font-size: 1.15rem; }
.profile-modal-body { padding: 1.5rem; }
.profile-modal-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-soft);
    margin-bottom: 1.25rem;
}
.profile-modal-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.25rem;
}
.profile-modal-name { font-size: 1.1rem; font-weight: 600; }
.profile-modal-team { font-size: 0.85rem; color: var(--text-muted); }
.profile-modal-id { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }
.profile-modal-section { margin-bottom: 1.25rem; }
.profile-modal-section h4 { margin: 0 0 0.75rem; font-size: 0.9rem; color: var(--text-muted); }
.profile-rival-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    font-size: 0.85rem;
    background: rgba(255,255,255,0.03);
    margin-bottom: 0.4rem;
}
.rival-remove-btn {
    background: none;
    border: none;
    color: var(--red);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0 0.3rem;
}
.disconnect-btn {
    width: 100%;
    padding: 0.6rem;
    border-radius: 10px;
    border: 1px solid var(--red);
    background: rgba(239,68,68,0.1);
    color: var(--red);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}
.disconnect-btn:hover { background: rgba(239,68,68,0.2); }

/* ==== Pitch / My Team Formation View ==== */
.my-team-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.mth-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.9rem 1.1rem;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(6, 14, 10, 0.18);
}
.mth-val {
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}
.mth-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.72;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.mth-points {
    background: #f4f7f5;
    color: #121816;
}
.mth-rank,
.mth-bench {
    background: linear-gradient(135deg, #c6f547 0%, #7fe0ac 100%);
    color: #121816;
}

.my-team-summary {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    padding: 0.7rem 1rem;
    background: var(--panel-bg);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
}
.mts-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
}
.mts-val {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}
.mts-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.mts-hit .mts-val { color: var(--red); }
.chip-active-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    background: #121816;
    color: #c6f547;
}

.pitch-stage {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(6, 14, 10, 0.35);
}
.pitch-container {
    background:
        repeating-linear-gradient(
            180deg,
            #1c7a3c 0 56px,
            #176b34 56px 112px
        );
    border-radius: 0;
    padding: 1.15rem 0.45rem 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    position: relative;
    overflow: hidden;
}
.pitch-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 8%;
    right: 8%;
    height: 2px;
    background: rgba(255,255,255,0.18);
}
.pitch-container::after {
    content: '';
    position: absolute;
    top: calc(50% - 44px);
    left: 50%;
    width: 88px;
    height: 88px;
    border: 2px solid rgba(255,255,255,0.18);
    border-radius: 50%;
    transform: translateX(-50%);
}

.pitch-row {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: clamp(0.12rem, 1.2vw, 0.45rem);
    flex-wrap: nowrap;
    position: relative;
    z-index: 1;
}
.pitch-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.12rem;
    min-width: 44px;
    max-width: 76px;
    flex: 0 1 76px;
}
.pitch-kit-wrap {
    position: relative;
    display: flex;
    justify-content: center;
    width: 100%;
    min-height: 58px;
}
.pitch-kit {
    width: clamp(42px, 12vw, 58px);
    height: auto;
    display: block;
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.45));
    pointer-events: none;
}
.pitch-kit.is-missing {
    visibility: hidden;
}
.pitch-kit-fallback {
    width: 44px;
    height: 56px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.28);
}
.pitch-plate {
    width: 100%;
    max-width: 76px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
}
.pitch-player-name {
    font-size: 0.62rem;
    font-weight: 700;
    color: #121816;
    background: #fff;
    text-align: center;
    max-width: none;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: none;
    padding: 0.16rem 0.28rem 0.1rem;
    border-radius: 3px 3px 0 0;
    line-height: 1.2;
}
.pitch-player-pts {
    width: 100%;
    height: auto;
    min-height: 18px;
    border-radius: 0 0 3px 3px;
    background: #1c2430;
    border: none;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0.12rem 0.2rem;
    line-height: 1;
}
.pitch-player-pts.pts-live {
    background: linear-gradient(90deg, var(--accent) 0%, #d4f56a 100%);
    color: #121816;
}
.pitch-player-pts.pts-great { color: #86efac; }
.pitch-player-pts.pts-good { color: #d9f99d; }
.pitch-player-pts.pts-bad { color: #fca5a5; }
.pitch-player-fix {
    font-size: 0.55rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.78);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    letter-spacing: 0.02em;
}
.captain-badge, .vice-badge {
    position: absolute;
    top: 2px;
    left: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 0.62rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: #111;
    border: 1.5px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    z-index: 2;
}
.captain-badge { background: #111; }
.vice-badge { background: #3f3f46; }
.pitch-status-warn {
    position: absolute;
    top: 2px;
    right: -2px;
    width: 16px;
    height: 16px;
    display: flex;
    z-index: 2;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}
.pitch-status-warn svg {
    display: block;
}
.bonus-badge {
    position: absolute;
    top: -7px;
    left: 2px;
    min-width: 18px;
    height: 14px;
    padding: 0 4px;
    border-radius: 8px;
    font-size: 0.52rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f59e0b, #ef9b0f);
    color: #1a1a1f;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
    line-height: 1;
}
.pitch-bench {
    margin-top: 0;
    padding: 0.55rem 0.4rem 0.75rem;
    background: linear-gradient(180deg, #3d6d8a 0%, #2f5870 100%);
    border: none;
    border-radius: 0;
}
.pitch-bench-slot {
    font-size: 0.55rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.82);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1;
}
.pitch-bench .pitch-player-fix { color: rgba(255, 255, 255, 0.72); }

#pitchContainer.hidden { display: none; }

/* ==== Manager Team Modal (view another manager's team sheet) ==== */
.manager-team-modal { padding: 1rem; }
.manager-team-modal .manager-team-content {
    width: min(720px, calc(100vw - 1rem));
    max-height: 92vh;
    display: flex;
    flex-direction: column;
}
.manager-team-modal .manager-team-header {
    align-items: flex-start;
    gap: 0.75rem;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    background: #1a1a1f;
    z-index: 2;
    border-bottom: 1px solid var(--border-soft);
}
.manager-team-modal .mt-header-text { min-width: 0; flex: 1; }
.manager-team-modal .mt-header-text h3 {
    font-size: 1.1rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.manager-team-modal .mt-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.manager-team-modal .mt-header-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
.manager-team-modal .mt-gw-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.manager-team-modal .mt-gw-nav .tab {
    padding: 0.3rem 0.55rem;
    font-size: 0.85rem;
    min-width: auto;
    width: auto;
}
.manager-team-modal .mt-gw-label {
    min-width: 64px;
    text-align: center;
    font-size: 0.85rem;
}
.manager-team-modal .manager-team-body {
    padding: 1rem 1.25rem 1.25rem;
    overflow-y: auto;
    flex: 1;
}
.manager-team-modal .mt-loading,
.manager-team-modal .mt-error {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}
.manager-team-modal .mt-error { color: var(--red); }
.manager-team-modal .mt-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    margin: 0 auto 0.75rem;
    animation: mt-spin 0.8s linear infinite;
}
@keyframes mt-spin { to { transform: rotate(360deg); } }
.manager-team-modal .my-team-hero { margin-bottom: 0.6rem; }
.manager-team-modal .mth-val { font-size: 1.45rem; }
.manager-team-modal .my-team-summary {
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    margin-bottom: 0.65rem;
}
.manager-team-modal .mts-val { font-size: 0.95rem; }
.manager-team-modal .pitch-container {
    padding: 0.85rem 0.35rem 1rem;
    gap: 0.55rem;
}
.manager-team-modal .pitch-player { min-width: 52px; max-width: 68px; }
.manager-team-modal .pitch-kit { width: 52px; }
.manager-team-modal .pitch-player-name { font-size: 0.58rem; }
.manager-team-modal .pitch-plate { max-width: 68px; }
.mt-fpl-link-row {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}
.mt-fpl-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.15s ease;
}
.mt-fpl-link:hover {
    background: var(--accent-hover, #6b3cff);
    transform: translateY(-1px);
}
.mt-fpl-link:active { transform: translateY(0); }
.mt-fpl-icon { font-size: 0.85rem; }

/* Visual hint that ranking rows are clickable to open manager team */
tr.row-team-clickable td {
    position: relative;
}
tr.row-team-clickable.has-team-hover:hover {
    background: rgba(var(--accent-rgb), 0.06);
}

@media (max-width: 640px) {
    .manager-team-modal { padding: 0.5rem; }
    .manager-team-modal .manager-team-content {
        width: calc(100vw - 0.5rem);
        max-height: 96vh;
    }
    .manager-team-modal .manager-team-header {
        padding: 0.85rem 1rem;
    }
    .manager-team-modal .manager-team-body {
        padding: 0.75rem 0.85rem 1rem;
    }
    .manager-team-modal .mt-header-text h3 { font-size: 0.95rem; }
    .manager-team-modal .mt-subtitle { font-size: 0.72rem; }
    .manager-team-modal .mt-gw-nav .tab {
        padding: 0.25rem 0.45rem;
        font-size: 0.78rem;
    }
    .manager-team-modal .mt-gw-label {
        min-width: 56px;
        font-size: 0.78rem;
    }
    .manager-team-modal .pitch-player { min-width: 46px; max-width: 58px; }
    .manager-team-modal .pitch-kit { width: 46px; }
    .manager-team-modal .pitch-player-name { font-size: 0.52rem; }
    .manager-team-modal .pitch-plate { max-width: 58px; }
    .manager-team-modal .mth-val { font-size: 1.25rem; }
}

/* ==== My Stats Page ==== */
.my-stats-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.ms-header-card {
    background: var(--panel-bg);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 1.25rem;
    text-align: center;
}
.ms-player-name { font-size: 1.25rem; font-weight: 700; }
.ms-team-name { font-size: 0.9rem; color: var(--text-muted); margin-top: 0.2rem; }

.ms-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
}
.ms-stat-card {
    background: var(--panel-bg);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.ms-stat-val {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}
.ms-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.ms-stat-card.ms-good .ms-stat-val { color: #22c55e; }
.ms-stat-card.ms-bad .ms-stat-val { color: #ef4444; }

.ms-section {
    background: var(--panel-bg);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 1.25rem;
}
.ms-section h3 { margin: 0 0 0.75rem; font-size: 1rem; font-weight: 600; }
.ms-chart-wrap {
    position: relative;
}
.ms-chart {
    width: 100%;
    min-width: 400px;
    height: auto;
}
.ms-hover-col {
    cursor: crosshair;
}
.ms-chart-tooltip {
    position: absolute;
    top: 0;
    pointer-events: none;
    background: rgba(15, 17, 25, 0.95);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    font-size: 0.78rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    z-index: 10;
    min-width: 120px;
    backdrop-filter: blur(6px);
}
.ms-chart-tooltip.hidden { display: none; }
.ms-tt-gw {
    font-weight: 700;
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.3rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--border-soft);
}
.ms-tt-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.15rem 0;
    color: var(--text-primary);
}
.ms-tt-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.ms-tt-diff {
    margin-top: 0.25rem;
    padding-top: 0.25rem;
    border-top: 1px solid var(--border-soft);
    font-weight: 600;
    font-size: 0.8rem;
    text-align: center;
    color: var(--text-muted);
}
.ms-tt-diff.ms-tt-pos { color: #4ade80; }
.ms-tt-diff.ms-tt-neg { color: #f87171; }
.ms-chart-legend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}
.ms-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-left: 0.5rem;
}
.ms-rivals-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.ms-rival-tag {
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
    background: rgba(var(--accent-rgb), 0.2);
    color: var(--accent-soft);
    border: 1px solid rgba(var(--accent-rgb), 0.3);
}

/* ==== Rival Stars in Overall Table ==== */
.rival-star {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: rgba(255,255,255,0.15);
    padding: 0;
    transition: color 0.2s ease, transform 0.15s ease;
    line-height: 1;
}
.rival-star:hover { color: #ffd700; transform: scale(1.2); }
.rival-star.rivaled { color: #ffd700; }
.overall-me { background: rgba(var(--accent-rgb), 0.08) !important; }
.overall-me td:first-child { border-left: 3px solid var(--accent); }
.overall-rival { background: rgba(255, 215, 0, 0.04) !important; }
.you-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 700;
    background: var(--accent);
    color: #fff;
    vertical-align: middle;
    margin-left: 0.3rem;
    text-transform: uppercase;
}

/* ==== Sidebar Divider ==== */
.sm-panel-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 0.25rem 0;
}

/* ==== Mobile adjustments for new features ==== */
@media (max-width: 640px) {
    .profile-banner {
        padding: 0.5rem 0.75rem;
    }
    .profile-banner-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    .profile-banner-text {
        font-size: 0.8rem;
        text-align: center;
    }
    .profile-banner-form {
        justify-content: center;
    }
    .profile-banner-dismiss {
        position: absolute;
        top: 0.4rem;
        right: 0.6rem;
    }
    .my-team-summary {
        gap: 0.75rem;
        padding: 0.55rem 0.75rem;
    }
    .mts-val { font-size: 0.95rem; }
    .mth-val { font-size: 1.45rem; }
    .pitch-container {
        padding: 0.85rem 0.2rem 1rem;
        gap: 0.55rem;
        overflow-x: auto;
    }
    .pitch-player { min-width: 44px; max-width: 58px; }
    .pitch-kit { width: clamp(40px, 11vw, 50px); }
    .pitch-player-name { font-size: 0.52rem; }
    .pitch-plate { max-width: 58px; }
    .ms-stat-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 0.5rem;
    }
    .ms-stat-card { padding: 0.75rem; }
    .ms-stat-val { font-size: 1.2rem; }
    .notif-panel {
        right: 0.5rem;
        left: 0.5rem;
        width: auto;
        top: 3.5rem;
    }
}

/* ==== Welcome (landing): photo canvas, copy bottom-left, form overlapping right ==== */
.welcome-stage {
    position: relative;
    isolation: isolate;
    min-height: 100dvh;
    background: #0c1210;
}

.welcome-hero-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 48% 72%;
    z-index: 0;
}

.welcome-scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(12, 18, 16, 0.86) 0%, rgba(12, 18, 16, 0.38) 46%, rgba(12, 18, 16, 0.7) 100%),
        linear-gradient(180deg, rgba(12, 18, 16, 0.28) 0%, rgba(12, 18, 16, 0.08) 38%, rgba(12, 18, 16, 0.78) 100%);
}

.welcome-page {
    position: relative;
    z-index: 2;
    min-height: 100dvh;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 2rem 1.5rem 3rem;
}

.welcome-shell {
    width: min(1180px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.82fr);
    gap: 2rem 3.25rem;
    align-items: end;
}

.welcome-copy {
    text-align: left;
    padding-bottom: 0.35rem;
}

.welcome-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1.1rem;
}

.welcome-crest {
    width: 2.4rem;
    height: 2.4rem;
    color: var(--accent);
    flex-shrink: 0;
}
.welcome-crest svg { width: 100%; height: 100%; display: block; }

.welcome-brand-name {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.welcome-season {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
}

.welcome-title {
    font-size: clamp(2.5rem, 5.4vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1.05;
    margin: 0 0 0.75rem;
    color: var(--text-primary);
    text-wrap: balance;
}

.welcome-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.45;
    max-width: 34ch;
    margin: 0;
}

.welcome-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(22px) saturate(140%);
    -webkit-backdrop-filter: blur(22px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-lg);
    padding: 1.6rem 1.5rem 1.4rem;
    width: 100%;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        var(--shadow-soft);
    margin-top: -1.75rem;
}

@media (prefers-reduced-transparency: reduce) {
    .welcome-panel {
        background: #151c18;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

.welcome-section {
    margin-bottom: 1.35rem;
    text-align: left;
}
.welcome-section:last-of-type { margin-bottom: 0; }

.welcome-section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.45rem;
}

.welcome-section-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0 0 0.55rem;
    max-width: 46ch;
}

.welcome-form-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}
.welcome-form-row input {
    flex: 1;
    min-width: 0;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
}
.welcome-form-row input::placeholder {
    color: var(--text-muted);
}
.welcome-form-row input:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-color: var(--accent);
}

.welcome-btn {
    padding: 0.75rem 1.15rem;
    font-size: 1rem;
    font-weight: 600;
    background: var(--accent-strong);
    color: #f4fff8;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.15s ease, filter 0.15s ease;
}
.welcome-btn:hover { filter: brightness(1.08); }
.welcome-btn:active { transform: scale(0.98); }
.welcome-btn:focus-visible {
    outline: 2px solid var(--accent-soft);
    outline-offset: 2px;
}
.welcome-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.welcome-feedback {
    font-size: 0.85rem;
    min-height: 1.4em;
    margin-top: 0.25rem;
}
.welcome-feedback.error { color: var(--red); }
.welcome-feedback.success { color: var(--accent); }

.welcome-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.15rem 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}
.welcome-divider::before,
.welcome-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-soft);
}

.leagues-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    margin-top: 0.5rem;
}
.leagues-list:empty { display: none; }
.league-item {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    text-align: left;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-soft);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.15s, transform 0.15s;
}
.league-item:last-child { border-bottom: none; }
.league-item:hover { background: var(--card-bg); }
.league-item:active { transform: scale(0.99); }
.league-item-name { font-weight: 500; }
.league-item-id { font-size: 0.8em; color: var(--text-muted); margin-left: 0.5rem; }

.welcome-recent {
    margin-top: 1.15rem;
}
.welcome-recent-teams {
    margin-top: 0.5rem;
}

.welcome-help {
    margin-top: 1.15rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-soft);
    text-align: left;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.welcome-help summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
}
.welcome-help summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}
.welcome-help p { margin: 0.7rem 0 0.4rem; }
.welcome-help a { color: var(--accent-soft); }
.welcome-help code {
    font-size: 0.8em;
    word-break: break-all;
}

@media (prefers-reduced-motion: no-preference) {
    .welcome-hero-photo {
        animation: welcome-photo-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
    }
    .welcome-copy {
        animation: welcome-in 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
    }
    .welcome-panel {
        animation: welcome-in 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.07s both;
    }
}
@keyframes welcome-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}
@keyframes welcome-photo-in {
    from { opacity: 0; transform: scale(1.04); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .welcome-btn,
    .league-item,
    .recent-item {
        transition: none;
    }
}

@media (max-width: 767px) {
    .welcome-page {
        align-items: stretch;
        padding: 1.1rem 1rem 1.75rem;
    }
    .welcome-shell {
        grid-template-columns: 1fr;
        gap: 1.1rem;
        padding: 0;
        align-items: stretch;
    }
    .welcome-panel {
        margin-top: 0;
    }
    .welcome-title {
        font-size: 2rem;
    }
    .welcome-subtitle {
        max-width: none;
        font-size: 0.98rem;
    }
    .welcome-hero-photo {
        object-position: 50% 84%;
    }
}
