/* ============================================================
   Bay Area Sports — dark Bay Area design system
   Night-over-the-bay palette, glowing glass cards, vivid team colors.
   ============================================================ */

:root {
    --bay-fog:    #eef2f7;
    --bay-night:  #0b0913;   /* deepest background */
    --bay-deep:   #161126;   /* panel base */
    --gg-red:     #e0463b;   /* brightened for dark backdrops */
    --gg-orange:  #ff6b6f;
    --sun-orange: #ff9a4d;
    --sun-yellow: #ffc861;
    --ink:        #f1edf8;   /* light text */
    --ink-soft:   #a79fbb;   /* muted light text */
    --line:       rgba(255, 255, 255, 0.10);
    --card-bg:    rgba(24, 19, 40, 0.66);   /* dark glass */
    --input-ink:  #1c1726;   /* dark text for white inputs (theme-independent) */

    --content-max: 1440px;   /* roomy on the family's big screens; 5 team cards still fit one row */

    --radius:     18px;
    --radius-sm:  12px;
    --shadow:     0 10px 30px -12px rgba(0, 0, 0, 0.55);
    --shadow-lg:  0 24px 60px -18px rgba(0, 0, 0, 0.65);

    --font: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background:
        radial-gradient(1200px 600px at 80% -10%, rgba(255, 138, 61, 0.16), transparent 60%),
        radial-gradient(1000px 500px at 10% 0%, rgba(193, 53, 43, 0.16), transparent 55%),
        linear-gradient(180deg, #0c0a16 0%, #07060e 100%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ---------- Drifting fog accent ---------- */
.fog-layer {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(600px 220px at 20% 8%, rgba(255,154,77,0.10), transparent 70%),
        radial-gradient(700px 240px at 85% 16%, rgba(120,140,255,0.08), transparent 70%);
    animation: fogDrift 26s ease-in-out infinite alternate;
}

/* Subtle dark wash over the body's night-bay gradient.
   IMPORTANT: do NOT put a raster background-image on this fixed full-screen layer.
   A position:fixed element with a cover photo breaks the content paint on very long
   pages (a 162-game schedule went completely blank) — not just in headless, in real
   browsers too. A pure gradient composites fine. The hero sections carry the real
   photos; the site backdrop is the body gradient + this wash. */
.bg-photo {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background: linear-gradient(180deg, rgba(10,8,18,0.55), rgba(7,6,14,0) 70%);
}
@keyframes fogDrift {
    0%   { transform: translateX(-3%); opacity: 0.7; }
    100% { transform: translateX(3%);  opacity: 1; }
}

/* ============================================================
   Public header / nav
   ============================================================ */
.site { position: relative; z-index: 1; display: flex; flex-direction: column; min-height: 100vh; }

.site-header {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.85rem 1.5rem;
    background: rgba(11, 9, 19, 0.78);
    backdrop-filter: blur(14px);
    /* Accent line color. Neutral silver by default (homepage + general pages);
       team pages override --hdr-c1/--hdr-c2 inline to the team's colors. */
    --hdr-c1: #8b93a1;
    --hdr-c2: #d7dce4;
    border-bottom: 2px solid color-mix(in srgb, var(--hdr-c1) 75%, transparent);
    box-shadow: 0 3px 20px -6px color-mix(in srgb, var(--hdr-c1) 42%, transparent);
}
/* Crisp gradient sheen on the accent line (team-1 → team-2 → team-1). */
.site-header::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
    background: linear-gradient(90deg, var(--hdr-c1) 0%, var(--hdr-c2) 50%, var(--hdr-c1) 100%);
}
.brand { display: flex; align-items: center; gap: 0.55rem; font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; }
.brand-mark { font-size: 1.6rem; filter: drop-shadow(0 2px 6px rgba(193,53,43,0.4)); animation: bob 4s ease-in-out infinite; }
.brand-logo-img { height: 34px; width: auto; object-fit: contain; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5)); }
.admin-brand .brand-logo-img { height: 28px; }

/* ---- Site logo: resting lens flare + cool hover ---- */
.brand-logo { position: relative; display: inline-flex; align-items: center; }
.brand-logo .brand-logo-img,
.brand-logo .brand-mark {
    position: relative; z-index: 1;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.4s ease;
}
/* The flare itself: hot white core, cool-blue halo, a warm secondary orb, and a
   wide anamorphic streak — all screen-blended so it reads as light, not paint. */
.brand-flare {
    position: absolute; z-index: 2; inset: -35% -90%; pointer-events: none;
    mix-blend-mode: screen; opacity: 0; transform: scale(0.92);
    background:
        radial-gradient(circle at 64% 36%, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0) 8%),
        radial-gradient(circle at 64% 36%, rgba(150,196,255,0.5) 0%, transparent 20%),
        radial-gradient(circle at 33% 60%, rgba(255,184,120,0.4) 0%, transparent 9%),
        linear-gradient(2deg, transparent 45%, rgba(255,255,255,0.45) 50%, transparent 55%);
    background-repeat: no-repeat;
    animation: flareIdle 6s ease-in-out infinite;
}
/* Twinkling 4-point sparkle sitting on the flare's hot core. */
.brand-star {
    position: absolute; z-index: 3; top: 26%; left: 64%; width: 16px; height: 16px;
    transform: translate(-50%, -50%) scale(0.4) rotate(0deg); pointer-events: none; opacity: 0;
    background:
        linear-gradient(0deg, transparent 47%, #fff 50%, transparent 53%),
        linear-gradient(90deg, transparent 47%, #fff 50%, transparent 53%);
    filter: drop-shadow(0 0 3px rgba(255,255,255,0.9));
    animation: brandSparkle 6s ease-in-out infinite;
}
@keyframes flareIdle  { 0%, 100% { opacity: 0.35; transform: scale(0.92); } 50% { opacity: 0.62; transform: scale(1.04); } }
@keyframes brandSparkle {
    0%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.4) rotate(0deg); }
    50%      { opacity: 0.9; transform: translate(-50%, -50%) scale(1) rotate(45deg); }
}
/* Hover: logo pops + tilts, flare blooms and the streak sweeps across, star pops. */
.brand:hover .brand-logo-img { transform: scale(1.14) rotate(-4deg); filter: drop-shadow(0 3px 12px rgba(255,255,255,0.5)) brightness(1.1); }
.brand:hover .brand-mark    { transform: scale(1.18) rotate(-6deg); }
.brand:hover .brand-flare   { animation: flareSweep 0.85s ease-out forwards; }
.brand:hover .brand-star    { animation: brandSparkle 0.85s ease-out; }
@keyframes flareSweep {
    0%   { opacity: 0.5; transform: scale(1) translateX(-22%); }
    55%  { opacity: 1;   transform: scale(1.22) translateX(8%); }
    100% { opacity: 0.7; transform: scale(1.1) translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
    .brand-flare { animation: none; opacity: 0.4; }
    .brand-star  { animation: none; opacity: 0; }
    .brand:hover .brand-flare, .brand:hover .brand-star { animation: none; opacity: 0.85; }
}
.auth-logo-img { height: 64px; width: auto; object-fit: contain; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4)); }
/* Neutral cool gray so it never clashes with whatever team logo is set as the brand. */
.brand-text strong { color: #9aa1ad; font-weight: 800; }
@keyframes bob { 50% { transform: translateY(-3px); } }

/* Team logo links — the navbar is now a quick team switcher. */
.site-nav { display: flex; gap: 0.25rem; align-items: center; }
.nav-team {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 12px;
    transition: background 0.15s ease, transform 0.15s ease;
}
.nav-team img { width: 30px; height: 30px; object-fit: contain; transition: transform 0.18s ease; filter: drop-shadow(0 2px 5px rgba(0,0,0,0.5)); }
.nav-team-emoji { font-size: 1.5rem; }
.nav-team:hover { background: color-mix(in srgb, var(--team-1, #888) 26%, transparent); transform: translateY(-1px); }
.nav-team:hover img { transform: scale(1.18); }
@media (max-width: 560px) {
    .nav-team { width: 34px; height: 34px; }
    .nav-team img { width: 24px; height: 24px; }
}

.site-main { flex: 1; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
    position: relative; overflow: hidden;
    margin: 1rem; border-radius: 28px;
    box-shadow: var(--shadow-lg);
    isolation: isolate;
}
.hero-photo { background-size: cover; background-position: center 38%; }
.hero-overlay {
    position: absolute; inset: 0; z-index: 0;
    background: linear-gradient(115deg,
        rgba(26,21,48,0.82) 0%,
        rgba(168,42,34,0.55) 42%,
        rgba(255,138,61,0.28) 75%,
        rgba(255,194,75,0.18) 100%);
}
.hero-content {
    position: relative; z-index: 1;
    display: flex; flex-direction: column;
    padding: clamp(2.5rem, 6vw, 5.5rem) clamp(1.5rem, 5vw, 4rem);
    color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,0.45);
    max-width: 760px;
}
.hero-title {
    font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.02; margin: 0 0 1rem;
    font-weight: 900; letter-spacing: -0.03em;
}
.shimmer {
    /* STATIC gold→white gradient. Do NOT animate (no background-position anim, no
       will-change): animating a -webkit-background-clip:text element makes the gradient
       fill detach from its glyphs on some GPUs, leaving a ghost/flicker over the text
       below. A still gradient is well-supported and renders cleanly everywhere. */
    background: linear-gradient(100deg, #ffe9b0 0%, var(--sun-yellow) 45%, #fff 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: var(--sun-yellow);
    text-shadow: none;
}
.hero-sub { font-size: clamp(1.05rem, 2.2vw, 1.3rem); max-width: 36ch; margin: 0 0 1rem; opacity: 0.96; }
/* Random fan rallying cry — different on every page load. Base text is bright white
   for readability (a core value); a team-colored "spotlight" sweeps across it
   right→left, briefly lighting the words in the team's hue. Left bar = team accent. */
.hero-motto {
    align-self: flex-start;
    display: inline-flex; align-items: center;
    margin: 0 0 1.8rem; padding: 0.32rem 0 0.32rem 0.85rem;
    border-left: 4px solid var(--team-1, var(--sun-yellow));
    font-size: clamp(1rem, 2vw, 1.25rem); font-style: italic; font-weight: 800;
    letter-spacing: 0.005em; color: #fff;
    /* Stronger than the inherited hero shadow so the quote stays readable even over
       the bright sky in the lower half of the photo (readability is a core value). */
    text-shadow: 0 2px 10px rgba(0,0,0,0.65), 0 1px 2px rgba(0,0,0,0.55);
    animation: mottoIn 0.6s ease both;
}
.hero-motto::before { content: '“'; opacity: 0.7; margin-right: 0.06em; }
.hero-motto::after  { content: '”'; opacity: 0.7; margin-left: 0.06em; }
/* The sweeping team-color overlay: a copy of the words, revealed only inside a
   moving mask band (same shine-through trick as the BEAT LA glint). */
.motto-text { position: relative; display: inline-block; }
.motto-text::after {
    content: attr(data-text);
    position: absolute; inset: 0;
    color: var(--team-1, var(--sun-yellow));
    text-shadow: 0 0 18px color-mix(in srgb, var(--team-1, #fff) 70%, transparent);
    -webkit-mask: linear-gradient(100deg, transparent 38%, #000 50%, transparent 62%) 0 0 / 260% 100% no-repeat;
            mask: linear-gradient(100deg, transparent 38%, #000 50%, transparent 62%) 0 0 / 260% 100% no-repeat;
    animation: mottoSpot 6s ease-in-out infinite;
    pointer-events: none;
}
@keyframes mottoIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
/* Sweep right → left, then rest off-screen until the next pass. */
@keyframes mottoSpot {
    0%        { -webkit-mask-position: 140% 0; mask-position: 140% 0; }
    33%, 100% { -webkit-mask-position: -40% 0; mask-position: -40% 0; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-motto { animation: none; }
    .motto-text::after { animation: none; -webkit-mask-position: 140% 0; mask-position: 140% 0; }
}
.hero-actions { align-self: flex-start; display: flex; gap: 0.8rem; flex-wrap: wrap; }

/* Desktop: the CTAs aren't needed (the page scrolls straight into the squad), so
   hide them but KEEP their footprint, and drop the motto into that spot — the hero
   image stays exactly the same size. On mobile the buttons remain (handy there). */
@media (min-width: 561px) {
    .hero-actions { visibility: hidden; pointer-events: none; order: 2; }
    .hero-motto   { order: 3; }
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.8rem 1.5rem; border-radius: 999px; border: none; cursor: pointer;
    font-family: inherit; font-weight: 700; font-size: 1rem; line-height: 1;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.9rem; }
.btn-block { width: 100%; justify-content: center; }
.btn-primary { background: linear-gradient(135deg, var(--gg-red), var(--gg-orange)); color: #fff; box-shadow: 0 10px 24px -10px rgba(193,53,43,0.7); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -10px rgba(193,53,43,0.8); }
.btn-ghost { background: rgba(255,255,255,0.18); color: #fff; border: 1.5px solid rgba(255,255,255,0.6); backdrop-filter: blur(4px); }
.btn-ghost:hover { background: rgba(255,255,255,0.3); }
/* Ghost buttons live on the dark public hero by default; on the light admin panels
   that white-on-white styling is invisible, so make them legible there. */
.admin-content .btn-ghost { background: #fff; color: var(--gg-red); border-color: rgba(193,53,43,0.45); backdrop-filter: none; }
.admin-content .btn-ghost:hover { background: #fff5f4; border-color: var(--gg-red); }
.btn-light { background: #fff; color: var(--gg-red); box-shadow: var(--shadow); }
.btn-light:hover { transform: translateY(-2px); }
.btn-glow { position: relative; }
.btn-glow::after {
    content: ''; position: absolute; inset: -2px; border-radius: 999px; z-index: -1;
    background: linear-gradient(135deg, var(--sun-orange), var(--gg-orange));
    filter: blur(14px); opacity: 0.55; animation: pulseGlow 2.6s ease-in-out infinite;
}
@keyframes pulseGlow { 50% { opacity: 0.9; } }

/* ============================================================
   Section headings
   ============================================================ */
.section-title { text-align: center; margin: 3rem 0 1.6rem; font-size: 1.9rem; font-weight: 900; letter-spacing: -0.02em; }
.section-title span { position: relative; padding-bottom: 0.4rem; }
.section-title span::after {
    content: ''; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
    width: 64px; height: 4px; border-radius: 4px;
    background: linear-gradient(90deg, var(--gg-red), var(--sun-orange));
}
.section-title-left { text-align: left; }
.section-title-left span::after { left: 0; transform: none; }
/* "Latest News" headline + "← All Teams" back link on one row. */
.team-news-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.team-news-head .section-title { margin-bottom: 1rem; }
.team-back-link { flex: none; }

/* On a team page, the section accent line wears the team's colors. */
.team-body .section-title span::after {
    width: 84px; height: 5px;
    background: linear-gradient(90deg, var(--team-1), var(--team-2));
}

.page-head { text-align: center; padding: 3rem 1.5rem 1rem; }
.page-title { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 900; margin: 0; letter-spacing: -0.03em; }
.page-sub { color: var(--ink-soft); font-size: 1.15rem; margin-top: 0.5rem; }

/* ============================================================
   Team cards
   ============================================================ */
.teams-strip { max-width: var(--content-max); margin: 0 auto; padding: 0 1.5rem 1rem; }
.team-grid {
    display: grid; gap: 1.1rem;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
/* Five teams, one row on desktop; wraps gracefully on smaller screens. */
.team-grid-lg { grid-template-columns: repeat(5, 1fr); gap: 1.25rem; }
@media (max-width: 1180px) { .team-grid-lg { grid-template-columns: repeat(3, 1fr); } }
/* Phones keep TWO compact cards per row (not one giant full-width card). */
@media (max-width: 760px)  { .team-grid-lg { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; } }
@media (max-width: 460px)  { .team-grid-lg { grid-template-columns: repeat(2, 1fr); gap: 0.65rem; } }

.team-card {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; align-items: center; gap: 0.45rem;
    padding: 1.8rem 1rem 1.4rem; border-radius: var(--radius);
    /* Big, vivid brand-color background: secondary-color burst over a deep team-color base. */
    background:
        radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--team-2) 82%, transparent) 0%, transparent 62%),
        linear-gradient(150deg, var(--team-1) 0%, color-mix(in srgb, var(--team-1) 70%, #000) 100%);
    color: #fff; text-align: center; box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid rgba(255,255,255,0.16);
}
.team-card:hover { transform: translateY(-6px) scale(1.02); box-shadow: var(--shadow-lg); }
.team-card-lg { padding: 2.4rem 1.2rem 1.9rem; }

/* Oversized faint logo watermark behind everything for flair. */
.team-logo-wm {
    position: absolute; right: -24%; bottom: -30%; width: 92%; height: 92%; z-index: 0;
    background-image: var(--logo, none); background-size: contain;
    background-repeat: no-repeat; background-position: center;
    opacity: 0.13; transform: rotate(-12deg); pointer-events: none;
    transition: transform 0.45s ease, opacity 0.3s ease;
}
.team-card:hover .team-logo-wm { transform: rotate(-6deg) scale(1.1); opacity: 0.2; }

/* Crisp foreground logo. */
.team-logo { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; height: 92px; }
.team-logo img { max-height: 92px; max-width: 82%; object-fit: contain;
    filter: drop-shadow(0 6px 14px rgba(0,0,0,0.45)); transition: transform 0.3s ease; }
.team-card:hover .team-logo img { transform: scale(1.1) translateY(-2px); }
.team-card-lg .team-logo { height: 120px; }
.team-card-lg .team-logo img { max-height: 120px; }

/* Compact team cards on phones: smaller padding / logo / type so two sit comfortably
   side by side. The full team name is dropped on the narrowest screens to stay tidy. */
@media (max-width: 760px) {
    .team-card-lg { padding: 1.3rem 0.7rem 1.05rem; gap: 0.3rem; }
    .team-card-lg .team-logo { height: 72px; }
    .team-card-lg .team-logo img { max-height: 72px; }
    .team-card-lg .team-name { font-size: 1.08rem; }
    .team-card-lg .team-full { font-size: 0.7rem; }
    .team-card-lg .team-league { font-size: 0.62rem; padding: 0.16rem 0.5rem; letter-spacing: 0.06em; }
}
@media (max-width: 460px) {
    .team-card-lg { padding: 1.05rem 0.55rem 0.9rem; }
    .team-card-lg .team-logo { height: 60px; }
    .team-card-lg .team-logo img { max-height: 60px; }
    .team-card-lg .team-full { display: none; }
}

.team-emoji { position: relative; z-index: 1; font-size: 2.9rem; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.35)); transition: transform 0.3s ease; }
.team-card:hover .team-emoji { transform: scale(1.15) rotate(-6deg); }
.team-name { position: relative; z-index: 1; font-size: 1.4rem; font-weight: 900; letter-spacing: -0.01em; text-shadow: 0 2px 10px rgba(0,0,0,0.35); }
.team-full { position: relative; z-index: 1; font-size: 0.85rem; opacity: 0.92; text-shadow: 0 1px 6px rgba(0,0,0,0.3); }
.team-league { position: relative; z-index: 1; font-size: 0.74rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.95; background: rgba(0,0,0,0.28); padding: 0.22rem 0.7rem; border-radius: 999px; margin-top: 0.2rem; }
/* Subtle per-league rival jab — fades in under the league·city badge on hover.
   Mini + understated on purpose (the BEAT LA hero glint is the loud one). */
.team-jab {
    position: relative; z-index: 1; margin-top: 0.1rem;
    font-size: 0.6rem; font-weight: 900; letter-spacing: 0.13em; text-transform: uppercase;
    color: color-mix(in srgb, var(--gg-red) 65%, #fff);
    text-shadow: 0 1px 6px rgba(0,0,0,0.55);
    opacity: 0; transform: translateY(-3px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.team-card:hover .team-jab { opacity: 0.9; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .team-jab { transition: opacity 0.3s ease; transform: none; } }

.team-shine {
    position: absolute; top: -60%; left: -30%; width: 60%; height: 220%; z-index: 2;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    transform: rotate(18deg); transition: left 0.5s ease;
}
.team-card:hover .team-shine { left: 130%; }

/* ============================================================
   News
   ============================================================ */
.news-section { max-width: var(--content-max); margin: 0 auto; padding: 0 1.5rem 4rem; }

/* ---------- Featured flagship cards (Niners + Giants) ---------- */
.featured-grid {
    display: grid; gap: 1.4rem; margin: 0 0 2.4rem;
    grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 760px) { .featured-grid { grid-template-columns: 1fr; } }

.featured-card {
    position: relative; overflow: hidden; isolation: isolate;
    min-height: clamp(300px, 30vw, 420px);
    border-radius: var(--radius); color: #fff;
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: clamp(1.4rem, 2.6vw, 2.2rem);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    transition: transform 0.22s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
/* Team-colored bloom + inner ring that lights up on hover. */
.featured-card::after {
    content: ''; position: absolute; inset: 0; z-index: 2; border-radius: inherit;
    pointer-events: none; opacity: 0; transition: opacity 0.25s ease;
    background: radial-gradient(120% 75% at 50% 100%,
        color-mix(in srgb, var(--team-1) 40%, transparent), transparent 62%);
    box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--team-1) 60%, transparent);
}
.featured-card:hover {
    transform: translateY(-5px);
    border-color: color-mix(in srgb, var(--team-1) 55%, var(--line));
    box-shadow: 0 26px 60px -18px color-mix(in srgb, var(--team-1) 62%, transparent), var(--shadow-lg);
}
.featured-card:hover::after { opacity: 1; }

/* Background photo on its own layer so hover-zoom never scales the text. */
.featured-bg {
    position: absolute; inset: 0; z-index: 0;
    background-size: cover; background-position: center 32%;
    transform: scale(1.02); transition: transform 0.6s ease;
}
.featured-card:hover .featured-bg { transform: scale(1.08); }

/* Team-tinted dark gradient so any photo keeps the text readable. */
.featured-scrim {
    position: absolute; inset: 0; z-index: 1;
    background:
        linear-gradient(0deg, rgba(7,6,14,0.92) 0%, rgba(7,6,14,0.55) 38%, rgba(7,6,14,0.05) 70%),
        linear-gradient(120deg, color-mix(in srgb, var(--team-1) 55%, transparent) 0%, transparent 55%);
}

/* Rivalry taunt watermark (e.g. "FUCK LA") — a faint always-there base layer,
   with a brighter copy that a diagonal light glint sweeps across now and then. */
.featured-beat {
    position: absolute; inset: 0; z-index: 2; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    font-weight: 900; text-transform: uppercase; letter-spacing: 0.16em;
    font-size: clamp(2.8rem, 9vw, 6rem); line-height: 1; white-space: nowrap;
    color: transparent; /* no static watermark — the taunt only shows as the glint sweeps */
    pointer-events: none; user-select: none;
}
.featured-beat::after {
    content: attr(data-text);
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: #fff; /* the bright bit the glint reveals */
    text-shadow: 0 2px 12px rgba(0,0,0,0.5); /* stay legible over busy photos */
    -webkit-mask: linear-gradient(100deg, transparent 34%, #000 50%, transparent 66%) 0 0 / 200% 100% no-repeat;
            mask: linear-gradient(100deg, transparent 34%, #000 50%, transparent 66%) 0 0 / 200% 100% no-repeat;
    animation: beatGlint 8s ease-in-out infinite;
}
/* Bigger, more prominent on the team hero pages. Still no static fill — sweep only. */
.team-beat { z-index: 1; letter-spacing: 0.2em; font-size: clamp(3.6rem, 16vw, 11rem); color: transparent; }
/* Phones: the hero is crowded (logo + name + venue stack at the bottom), so float the
   BEAT LA watermark up near the top of the photo instead of dead-center. Both the base
   span and its glint copy (::after) center via flexbox, so retarget both to the top. */
@media (max-width: 560px) {
    .team-beat,
    .team-beat::after { align-items: flex-start; padding-top: 0.6rem; }
}

.featured-body { position: relative; z-index: 3; text-shadow: 0 2px 14px rgba(0,0,0,0.55); }
/* Team + Featured pill, parked at the bottom-right where "Read more" used to live. */
.featured-tag {
    margin-left: auto; /* push to the right edge of the meta row */
    display: inline-flex; align-items: center; gap: 0.45rem;
    font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em;
    padding: 0.3rem 0.7rem; border-radius: 999px;
    background: var(--team-1); color: #fff; text-shadow: none;
    box-shadow: 0 6px 16px -8px rgba(0,0,0,0.6);
}
.featured-flag {
    font-size: 0.66rem; letter-spacing: 0.12em; padding: 0.1rem 0.45rem;
    border-radius: 999px; background: rgba(255,255,255,0.22);
}
.featured-title {
    font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 900; line-height: 1.12;
    letter-spacing: -0.02em; margin: 0 0 0.55rem;
}
.featured-summary {
    font-size: 0.98rem; line-height: 1.5; margin: 0 0 1rem; opacity: 0.94;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.featured-meta { display: flex; align-items: center; gap: 0.65rem 0.8rem; flex-wrap: wrap; font-size: 0.82rem; }
.featured-meta > span:not(.featured-tag) { opacity: 0.85; }
/* Invisible whole-card link — the card itself is the click target. */
.featured-link { position: absolute; z-index: 4; inset: 0; }

/* Occasional JS-triggered glow so a card lights up now and then (see app.js). */
.featured-card.flash { animation: featuredFlash 1.7s ease-in-out; }
@keyframes featuredFlash {
    0%, 100% { box-shadow: var(--shadow); }
    45%      { box-shadow: 0 0 0 2px var(--team-1), 0 18px 48px -10px color-mix(in srgb, var(--team-1) 70%, transparent); }
}
/* Glint rests off-screen between sweeps, then glides the taunt left→right. */
@keyframes beatGlint {
    0%, 35% { -webkit-mask-position: 135% 0; mask-position: 135% 0; }
    100%    { -webkit-mask-position: -35% 0; mask-position: -35% 0; }
}
@media (prefers-reduced-motion: reduce) {
    /* No sweep — fall back to a barely-there static taunt instead of a moving one. */
    .featured-beat { color: rgba(255,255,255,0.05); }
    .featured-beat::after { animation: none; opacity: 0; }
    .featured-card.flash { animation: none; }
    .featured-bg, .featured-card:hover .featured-bg { transition: none; transform: scale(1.02); }
}

.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.news-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* News team filters (logo chips) */
.news-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin: -0.4rem 0 1.5rem; }
.newschip { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.9rem; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card-bg); color: var(--ink-soft); font-family: inherit; font-weight: 800; font-size: 0.85rem; cursor: pointer; transition: transform 0.12s ease, color 0.15s ease, background 0.15s ease, border-color 0.15s ease; }
.newschip:hover { color: var(--ink); transform: translateY(-1px); border-color: color-mix(in srgb, var(--team-1, #888) 55%, var(--line)); }
.newschip.active { background: var(--team-1, var(--gg-red)); border-color: var(--team-1, var(--gg-red)); color: #fff; box-shadow: 0 6px 16px -8px rgba(0,0,0,0.6); }
.newschip-logo { width: 20px; height: 20px; object-fit: contain; }
.newschip-emoji { font-size: 1rem; line-height: 1; }
[hidden] { display: none !important; }
.news-card {
    position: relative; background: var(--card-bg); backdrop-filter: blur(8px);
    border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--team-1);
    transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
/* Team-colored aura that washes down from the top edge on hover. */
.news-card::before {
    content: ''; position: absolute; inset: 0; z-index: 0; border-radius: inherit;
    pointer-events: none; opacity: 0; transition: opacity 0.25s ease;
    background: radial-gradient(125% 85% at 50% 0%,
        color-mix(in srgb, var(--team-1) 28%, transparent), transparent 62%);
}
.news-card > * { position: relative; z-index: 1; } /* keep content above the aura */
.news-card:hover {
    transform: translateY(-5px);
    border-color: color-mix(in srgb, var(--team-1) 55%, var(--line));
    box-shadow: 0 20px 44px -16px color-mix(in srgb, var(--team-1) 65%, transparent), var(--shadow);
}
.news-card:hover::before { opacity: 1; }
.news-card:hover .news-readmore { color: color-mix(in srgb, var(--team-1) 55%, #fff); }
.news-team-tag {
    display: inline-block; font-size: 0.75rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.05em; padding: 0.25rem 0.65rem; border-radius: 999px;
    color: #fff; background: var(--team-1); margin-bottom: 0.7rem;
}
.news-title { font-size: 1.15rem; font-weight: 800; margin: 0 0 0.5rem; line-height: 1.25; }
.news-summary { color: var(--ink-soft); font-size: 0.95rem; margin: 0 0 0.9rem; line-height: 1.5; }
.news-meta { display: flex; gap: 0.8rem; flex-wrap: wrap; font-size: 0.8rem; color: var(--ink-soft); }
.news-meta span { display: inline-flex; align-items: center; }
.news-readmore { display: inline-block; margin-top: 0.7rem; font-weight: 700; color: var(--gg-red); }

/* ---------- Team page: featured story splash ---------- */
.news-feature {
    position: relative; display: block; overflow: hidden;
    border-radius: var(--radius); padding: clamp(1.6rem, 3vw, 2.4rem);
    color: #fff; text-decoration: none;
    /* A self-hosted team action photo is set inline; this gradient is the fallback. */
    background: linear-gradient(135deg,
        var(--team-1),
        color-mix(in srgb, var(--team-2) 62%, var(--team-1)) 92%);
    background-size: cover; background-position: center;
    min-height: 220px; display: flex; align-items: flex-end;
    box-shadow: 0 20px 48px -18px color-mix(in srgb, var(--team-1) 70%, transparent), var(--shadow);
    transition: transform 0.22s ease, box-shadow 0.28s ease;
    margin-bottom: 1.4rem;
}
.news-feature:hover { transform: translateY(-4px);
    box-shadow: 0 30px 64px -18px color-mix(in srgb, var(--team-1) 80%, transparent), var(--shadow-lg); }
/* Strong dark floor + team wash so the headline stays legible over any photo. */
.news-feature-bg {
    position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background:
        linear-gradient(0deg, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.38) 50%, rgba(0,0,0,0.06) 85%),
        linear-gradient(120deg, color-mix(in srgb, var(--team-1) 78%, transparent) 0%, color-mix(in srgb, var(--team-1) 22%, transparent) 46%, transparent 72%),
        radial-gradient(120% 90% at 88% 0%, color-mix(in srgb, var(--team-2) 42%, transparent), transparent 60%);
}
.news-feature-glow {
    position: absolute; top: -50%; right: -8%; width: 360px; height: 360px; border-radius: 50%;
    z-index: 0; pointer-events: none;
    background: radial-gradient(circle, var(--team-2), transparent 65%);
    opacity: 0.45; filter: blur(8px);
    transition: opacity 0.3s ease, transform 0.5s ease;
}
.news-feature:hover .news-feature-glow { opacity: 0.7; transform: scale(1.12) translate(-14px, 10px); }
.news-feature-inner { position: relative; z-index: 1; }
.news-feature-tag {
    display: inline-block; font-size: 0.78rem; font-weight: 900; text-transform: uppercase;
    letter-spacing: 0.08em; padding: 0.32rem 0.8rem; border-radius: 999px;
    background: rgba(0,0,0,0.32); color: #fff; margin-bottom: 0.9rem;
    border: 1px solid color-mix(in srgb, var(--team-2) 60%, transparent);
}
.news-feature-title { margin: 0 0 0.6rem; font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 900;
    line-height: 1.15; letter-spacing: -0.02em; text-shadow: 0 2px 12px rgba(0,0,0,0.45); }
.news-feature-summary { margin: 0 0 1.1rem; font-size: 1.02rem; line-height: 1.55; max-width: 60ch;
    color: rgba(255,255,255,0.94); text-shadow: 0 1px 8px rgba(0,0,0,0.4); }
.news-feature-meta { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center;
    font-size: 0.85rem; font-weight: 700; color: rgba(255,255,255,0.88); }
.news-feature-cta { margin-left: auto; font-weight: 900;
    padding: 0.4rem 0.9rem; border-radius: 999px; background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.3); transition: background 0.2s ease; }
.news-feature:hover .news-feature-cta { background: rgba(255,255,255,0.28); }

/* ---------- Team page: bold news cards ---------- */
.news-cards { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
/* news-card-team beefs up the shared .news-card with thicker team accents + bigger type. */
.news-card-team {
    display: flex; flex-direction: column;
    border-top-width: 5px; padding: 1.4rem;
    border-left: 1px solid color-mix(in srgb, var(--team-1) 22%, var(--line));
    border-right: 1px solid color-mix(in srgb, var(--team-1) 22%, var(--line));
}
.news-card-team .news-title { font-size: 1.18rem; }
.news-card-team .news-meta { margin-top: auto; padding-top: 0.6rem; }
.news-card-team .news-readmore {
    color: color-mix(in srgb, var(--team-1) 55%, var(--ink));
    align-self: flex-start;
}
.news-card-team:hover .news-readmore { color: color-mix(in srgb, var(--team-2) 70%, #fff); }

/* Team-page news pagination (client-side; hidden until JS wires it up). */
.news-pagination { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; margin-top: 1.3rem; }
.news-page-btn {
    min-width: 2.2rem; padding: 0.4rem 0.7rem; border-radius: 999px;
    border: 1.5px solid var(--line); background: var(--card-bg); color: var(--ink-soft);
    font-family: inherit; font-weight: 800; font-size: 0.85rem; cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
.news-page-btn:hover { color: var(--ink); transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--team-1) 55%, var(--line)); }
.news-page-btn.active {
    background: var(--team-1); border-color: var(--team-1); color: #fff;
    box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--team-1) 70%, transparent);
}
.news-page-btn:disabled { opacity: 0.4; cursor: default; transform: none; }
.news-page-nav { color: var(--ink); }

.empty-note { text-align: center; color: var(--ink-soft); padding: 2rem; font-size: 1.05rem; }
.empty-note a { color: var(--gg-red); font-weight: 700; }

/* ============================================================
   Team detail
   ============================================================ */
.team-hero {
    position: relative; overflow: hidden; margin: 1rem; border-radius: 24px;
    /* Tall hero so the photo is zoomed OUT — you see the whole player + scene,
       not a tight cropped band. Content sits at the bottom over a dark gradient. */
    min-height: clamp(440px, 46vw, 660px);
    display: flex; align-items: flex-end;
    padding: clamp(1.5rem, 3.5vw, 2.8rem); color: #fff;
    background: linear-gradient(135deg, var(--team-1), color-mix(in srgb, var(--team-2) 55%, var(--team-1)));
    box-shadow: var(--shadow-lg);
}
.team-hero-photo { background-size: cover; background-position: center 35%; }
/* Mostly the photo, with a strong dark floor for the title + a light team tint. */
.team-hero-overlay {
    position: absolute; inset: 0; z-index: 0;
    background:
        linear-gradient(0deg, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.40) 26%, rgba(0,0,0,0.05) 50%, transparent 70%),
        linear-gradient(115deg, color-mix(in srgb, var(--team-1) 55%, transparent) 0%, color-mix(in srgb, var(--team-1) 14%, transparent) 45%, transparent 70%);
}
.team-hero-glow {
    position: absolute; top: -40%; right: -10%; width: 420px; height: 420px; border-radius: 50%; z-index: 1;
    background: radial-gradient(circle, var(--team-2), transparent 65%); opacity: 0.5; filter: blur(10px);
    animation: floaty 8s ease-in-out infinite alternate;
}
@keyframes floaty { to { transform: translate(-20px, 20px) scale(1.1); } }
.team-hero-inner { position: relative; z-index: 2; display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.team-hero-emoji { font-size: clamp(3.5rem, 10vw, 6rem); filter: drop-shadow(0 6px 16px rgba(0,0,0,0.35)); }
.team-hero-logo { height: clamp(76px, 16vw, 128px); width: auto; object-fit: contain;
    filter: drop-shadow(0 8px 20px rgba(0,0,0,0.5)); }
.team-hero-league { text-transform: uppercase; letter-spacing: 0.12em; font-weight: 800; font-size: 0.85rem; opacity: 0.9; margin: 0; }
.team-hero-name { font-size: clamp(1.8rem, 5vw, 3rem); font-weight: 900; margin: 0.2rem 0 0.6rem; letter-spacing: -0.02em; }
.team-hero-meta { font-size: 1rem; opacity: 0.95; margin: 0 0 1rem; }

.team-body { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; max-width: var(--content-max); margin: 1.5rem auto; padding: 0 1.5rem; }
.team-col-main { min-width: 0; }
.side-card { background: var(--card-bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.side-card h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.side-card p { margin: 0; color: var(--ink-soft); font-size: 0.9rem; }
/* Team-page side cards carry a team-colored left edge + accents. */
.team-body .side-card { position: relative; border-left: 4px solid var(--team-1); }
.team-body .side-card h3 { color: color-mix(in srgb, var(--team-2) 38%, var(--ink)); }
/* Right-panel widget links lean on the SECONDARY team color (mixed toward the light
   text so even a near-black secondary like the Giants' stays readable on the dark glass). */
.team-body .link-list a { color: color-mix(in srgb, var(--team-2) 62%, var(--ink)); }
.team-body .link-list a:hover { color: color-mix(in srgb, var(--team-2) 70%, #fff); }
/* Section header BANDS: a solid team-colored bar with inverted (white) text that bleeds to
   the card edges, so each panel title reads as a real header — with a clear gap before the
   body — instead of every section running together. Covers both the title+badge rows
   (.sched-head: Schedule / Standings / Roster) and standalone <h3> titles (News / Official). */
.team-body .side-card > h3,
.team-body .side-card > .sched-head {
    margin: -1.2rem -1.2rem 1.1rem;
    padding: 0.7rem 1.1rem;
    background: linear-gradient(135deg, var(--team-1), color-mix(in srgb, var(--team-2) 58%, var(--team-1)));
    border-radius: calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0 0;
    box-shadow: inset 0 -2px 0 rgba(0,0,0,0.18);
}
/* White title text on the bar — overrides the dark mixed color set just above. */
.team-body .side-card > h3,
.team-body .side-card .sched-head > h3 {
    color: #fff; font-weight: 800; letter-spacing: 0.01em;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
/* The badge (division / player count / record) now sits on the colored bar — make it a
   glassy white pill so it stays legible instead of its own solid team color clashing. */
.team-body .side-card .sched-head .record-pill {
    background: rgba(255,255,255,0.22); color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.4);
}
.coming-soon { position: relative; opacity: 0.92; }
.soon-badge { display: inline-block; margin-top: 0.7rem; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gg-red); background: rgba(193,53,43,0.1); padding: 0.25rem 0.6rem; border-radius: 999px; }
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list a { color: var(--gg-red); font-weight: 600; }

/* ============================================================
   Featured game spotlight (live / recent / next-up) — the big card
   ============================================================ */
.game-spotlight {
    position: relative; display: block; overflow: hidden; text-decoration: none; color: #fff;
    border-radius: var(--radius); margin: 0.4rem 0 1.1rem; padding: 1.1rem 1.2rem;
    background: linear-gradient(135deg, var(--team-1), color-mix(in srgb, var(--team-2) 60%, var(--team-1)));
    /* No border — the orange glow shadow defines the edge (per request). */
    box-shadow: 0 16px 40px -16px color-mix(in srgb, var(--team-1) 70%, transparent), var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.25s ease;
}
.game-spotlight:hover { transform: translateY(-3px);
    box-shadow: 0 26px 56px -16px color-mix(in srgb, var(--team-1) 80%, transparent), var(--shadow-lg); }
/* Photo-backed (live / finished-today): the actual venue under a vibrant team scrim. */
.game-spotlight.gs-photo { background-size: cover; background-position: center; min-height: 230px; }
.gs-scrim { position: absolute; inset: 0; z-index: 0; }
.gs-photo .gs-scrim {
    background:
        linear-gradient(0deg, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.45) 45%, rgba(0,0,0,0.12) 80%),
        linear-gradient(125deg, color-mix(in srgb, var(--team-1) 80%, transparent) 0%, color-mix(in srgb, var(--team-1) 25%, transparent) 45%, transparent 72%),
        radial-gradient(120% 80% at 88% 4%, color-mix(in srgb, var(--team-2) 50%, transparent), transparent 60%);
}
.gs-content { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 0.55rem; }

.gs-top { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.gs-badge { font-size: 0.7rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.07em;
    padding: 0.22rem 0.6rem; border-radius: 999px; }
.gs-badge-live { background: #e8002d; color: #fff; box-shadow: 0 0 0 0 rgba(232,0,45,0.6); animation: livePulse 1.6s ease-out infinite; }
.gs-badge-final { background: rgba(0,0,0,0.45); color: #fff; border: 1px solid rgba(255,255,255,0.35); }
.gs-badge-next { background: rgba(255,255,255,0.2); color: #fff; border: 1px solid rgba(255,255,255,0.4); }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(232,0,45,0.55); } 70% { box-shadow: 0 0 0 9px rgba(232,0,45,0); } 100% { box-shadow: 0 0 0 0 rgba(232,0,45,0); } }
.gs-detail { font-weight: 800; font-size: 0.9rem; }
.gs-venue { margin-left: auto; font-size: 0.78rem; font-weight: 700; opacity: 0.9; }

/* Big bold impact scoreboard. */
.gs-score { display: flex; flex-direction: column; gap: 0.15rem; margin: 0.2rem 0; }
.gs-team { display: flex; align-items: center; gap: 0.6rem; }
.gs-vs { width: 1.4em; flex: none; font-weight: 800; font-size: 0.9rem; opacity: 0.75; text-align: center; }
.gs-logo { width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(0,0,0,0.5)); }
.gs-abbr { font-size: 1.15rem; font-weight: 900; letter-spacing: -0.01em; text-shadow: 0 1px 8px rgba(0,0,0,0.5); }
.gs-pts { margin-left: auto; font-size: 2.6rem; line-height: 1; font-weight: 900; letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums; text-shadow: 0 2px 12px rgba(0,0,0,0.55); }
.gs-team.gs-win .gs-pts, .gs-team.gs-win .gs-abbr { color: var(--sun-yellow); }
.gs-next .gs-pts { font-size: 1.5rem; opacity: 0.92; }

/* Live baseball graphic: diamond + outs + count. */
.gs-live-graphic { display: flex; align-items: center; gap: 1rem; margin-top: 0.2rem; }
.gs-diamond { width: 58px; height: 48px; flex: none; }
.gs-base { fill: rgba(255,255,255,0.14); stroke: rgba(255,255,255,0.7); stroke-width: 2.5; }
.gs-base.on { fill: var(--sun-yellow); stroke: var(--sun-yellow);
    filter: drop-shadow(0 0 5px color-mix(in srgb, var(--sun-yellow) 70%, transparent)); }
.gs-live-meta { display: flex; flex-direction: column; gap: 0.3rem; }
.gs-inning { font-weight: 900; font-size: 1.05rem; }
.gs-outs { display: inline-flex; align-items: center; gap: 0.32rem; }
.gs-out { width: 13px; height: 13px; border-radius: 50%; background: rgba(255,255,255,0.22); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.55); }
.gs-out.on { background: #e8002d; box-shadow: 0 0 6px rgba(232,0,45,0.7); }
.gs-outs-lbl { font-size: 0.8rem; font-weight: 700; opacity: 0.92; margin-left: 0.2rem; }
.gs-count { font-weight: 900; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.gs-count-lbl { font-size: 0.66rem; font-weight: 800; opacity: 0.8; letter-spacing: 0.03em; }
.gs-live-simple { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
.gs-dd { font-weight: 700; font-size: 0.9rem; opacity: 0.95; }

.gs-matchup { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; font-size: 0.82rem; opacity: 0.95; }
.gs-matchup strong { font-weight: 800; }
.gs-lastplay { font-size: 0.82rem; font-style: italic; opacity: 0.88;
    background: rgba(0,0,0,0.28); padding: 0.35rem 0.6rem; border-radius: 8px; }
.gs-cta { font-weight: 900; font-size: 0.82rem; margin-top: 0.15rem;
    color: color-mix(in srgb, var(--team-2) 45%, #fff); }
.gs-photo .gs-cta { color: #fff; }
@media (prefers-reduced-motion: reduce) { .gs-badge-live { animation: none; } }

/* Schedule & Results card */
.sched-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.sched-head h3 { margin: 0; }
.record-pill { font-size: 0.78rem; font-weight: 800; color: #fff; background: color-mix(in srgb, var(--team-1, #444) 70%, #000); padding: 0.2rem 0.6rem; border-radius: 999px; white-space: nowrap; }
.sched-sub { margin: 0.9rem 0 0.4rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); }
.game-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
/* Opponent first (left-aligned across Up Next + Recent), then W/L, score, date. */
.game-row { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 0.5rem; padding: 0.4rem 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.game-row:last-child { border-bottom: none; }
.game-res { width: 20px; height: 20px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 900; color: #fff; }
.game-W { background: #1f9e57; }
.game-L { background: #d9483b; }
.game-T { background: #8a8594; }
.game-opp { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; align-items: center; gap: 0.25rem; }
.opp-logo-sm { height: 18px; width: 18px; object-fit: contain; vertical-align: middle; }
.opp-logo { height: 22px; width: 22px; object-fit: contain; vertical-align: middle; margin: 0 0.4rem 0 0.15rem; }
.game-opp strong { font-weight: 800; }
.game-score { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 3.5em; text-align: right; }
.game-when { min-width: 3.6em; text-align: right; }
.game-when { color: var(--ink-soft); font-size: 0.8rem; white-space: nowrap; }
/* Upcoming rows have no result/score cells — keep opponent left, date right. */
.game-list .game-row:not(:has(.game-res)) { grid-template-columns: 1fr auto; }

/* Full schedule page */
.sched-page-head {
    position: relative; overflow: hidden;
    margin: 1rem; border-radius: 22px; padding: clamp(1.5rem, 4vw, 2.6rem);
    background: linear-gradient(120deg, var(--team-1), color-mix(in srgb, var(--team-2) 55%, var(--team-1)));
    color: #fff; box-shadow: var(--shadow-lg);
}
/* Photo-backed schedule hero: real team action shot under a team-tinted scrim. */
.sched-head-photo { background-size: cover; background-repeat: no-repeat;
    min-height: clamp(200px, 26vw, 300px); display: flex; align-items: flex-end; }
.sched-head-overlay {
    position: absolute; inset: 0; z-index: 0;
    background:
        linear-gradient(0deg, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.40) 45%, rgba(0,0,0,0.08) 75%, transparent 100%),
        linear-gradient(110deg, color-mix(in srgb, var(--team-1) 72%, transparent) 0%, color-mix(in srgb, var(--team-1) 22%, transparent) 42%, transparent 68%),
        radial-gradient(120% 90% at 92% 0%, color-mix(in srgb, var(--team-2) 40%, transparent), transparent 60%);
}
.sched-head-inner { position: relative; z-index: 1; display: flex; align-items: center; gap: 1.2rem; }
.sched-head-logo { height: clamp(56px, 9vw, 84px); width: auto; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(0,0,0,0.6)); }
.sched-head-kicker { text-transform: uppercase; letter-spacing: 0.12em; font-weight: 800; font-size: 0.8rem; opacity: 0.92; margin: 0; }
.sched-head-title { font-size: clamp(1.6rem, 4.5vw, 2.6rem); font-weight: 900; margin: 0.2rem 0 0; letter-spacing: -0.02em; text-shadow: 0 2px 14px rgba(0,0,0,0.5); }
.sched-head-season { margin: 0.35rem 0 0; font-weight: 800; font-size: 0.9rem;
    color: color-mix(in srgb, var(--team-2) 55%, #fff); text-shadow: 0 1px 8px rgba(0,0,0,0.5); }

.sched-wrap { max-width: 880px; margin: 1.5rem auto; padding: 0 1.5rem; }

/* ---------- Season stat strip ---------- */
.sched-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0.7rem; margin-bottom: 1.2rem; }
.stat-tile {
    display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
    padding: 0.9rem 0.7rem; border-radius: var(--radius-sm);
    background: var(--card-bg); border: 1px solid var(--line);
    border-top: 3px solid color-mix(in srgb, var(--team-1) 75%, var(--line));
    box-shadow: var(--shadow);
}
.stat-val { font-size: 1.45rem; font-weight: 900; letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
    color: color-mix(in srgb, var(--team-2) 30%, var(--ink)); }
.stat-lbl { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-soft); }
.stat-tile-form .form-dots { display: inline-flex; gap: 0.28rem; align-items: center; min-height: 1.45rem; }
.form-dot { width: 1.45rem; height: 1.45rem; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.72rem; font-weight: 900; color: #fff; }
.form-W { background: #1f9e57; }
.form-L { background: #d9483b; }
.form-T { background: #8a8594; }

/* Season tabs + filters */
.sched-controls { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.season-tabs { display: inline-flex; gap: 0.35rem; background: var(--card-bg); border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem; }
.season-tab { padding: 0.4rem 1rem; border-radius: 999px; font-weight: 800; font-size: 0.92rem; color: var(--ink-soft); transition: all 0.15s ease; }
.season-tab:hover { color: var(--ink); }
.season-tab.active { background: linear-gradient(135deg, var(--team-1), color-mix(in srgb, var(--team-2) 55%, var(--team-1))); color: #fff; box-shadow: 0 6px 16px -8px rgba(0,0,0,0.6); }
.sched-filters { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1rem; }
.chip { padding: 0.4rem 0.9rem; border-radius: 999px; border: 1.5px solid var(--line); background: transparent; color: var(--ink-soft); font-family: inherit; font-weight: 700; font-size: 0.85rem; cursor: pointer; transition: all 0.15s ease; }
.chip:hover { color: var(--ink); border-color: color-mix(in srgb, var(--team-1) 50%, var(--line)); }
.chip.active { background: var(--team-1); border-color: var(--team-1); color: #fff; }
.sched-empty-filter { text-align: center; color: var(--ink-soft); padding: 1.5rem; }
.season-block { margin-bottom: 2rem; }
.season-head { display: flex; align-items: center; gap: 0.8rem; margin: 0 0 0.6rem; }
.season-head h2 { margin: 0; font-size: 1.4rem; font-weight: 900; }

.sched-table { width: 100%; border-collapse: collapse; background: var(--card-bg); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.sched-table tr { border-bottom: 1px solid var(--line); transition: background 0.15s ease, box-shadow 0.15s ease; }
.sched-table tr:last-child { border-bottom: none; }
.sched-table td { padding: 0.7rem 0.9rem; vertical-align: middle; }
/* Home / away color-coding. Home = the team's own color (their building, easier to
   attend) with a left rail + faint tint; away = a cool neutral rail, no tint. */
.sched-table tr.is-home { box-shadow: inset 4px 0 0 0 var(--team-1); background: color-mix(in srgb, var(--team-1) 8%, transparent); }
.sched-table tr.is-away { box-shadow: inset 4px 0 0 0 color-mix(in srgb, var(--ink-soft) 55%, transparent); }
.sched-table tr.is-home .sched-loc { color: color-mix(in srgb, var(--team-1) 45%, var(--ink)); }
.sched-table tr.is-away .sched-loc { color: var(--ink-soft); }
.sched-table tbody tr:hover { background: color-mix(in srgb, var(--team-1) 16%, transparent); }
.sched-table tr.is-upcoming { opacity: 0.85; }
/* Series clustering: a little breathing room above the first game of each new series. */
.sched-table tr.series-start td { padding-top: 1.5rem; }
.sched-table tr.series-start { border-top: 1px solid var(--line); }
/* Spotlight the next game: stronger team rail + wash, beats the venue styling. */
.sched-table tr.is-next {
    opacity: 1;
    box-shadow: inset 5px 0 0 0 var(--team-1);
    background: color-mix(in srgb, var(--team-1) 18%, transparent);
}
.sched-next-tag {
    display: inline-block; margin-bottom: 0.3rem;
    font-size: 0.62rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em;
    color: #fff; background: var(--team-1); padding: 0.12rem 0.45rem; border-radius: 999px;
}
.sched-date { white-space: nowrap; width: 1%; line-height: 1.18; }
.sched-dow { display: block; font-weight: 900; font-size: 1.02rem; letter-spacing: -0.01em; }
.sched-dow.is-weekend { color: var(--sun-yellow); } /* weekend games pop — easier to attend */
.sched-md { display: block; font-weight: 700; font-size: 0.9rem; }
.sched-time { display: block; color: var(--ink-soft); font-weight: 600; font-size: 0.74rem; }
.sched-match { width: 60%; }
.sched-loc { font-weight: 800; margin-right: 0.35rem; }
.sched-match strong { font-weight: 800; }
.sched-outcome { text-align: right; white-space: nowrap; }
.sched-score { font-weight: 900; font-variant-numeric: tabular-nums; margin-left: 0.4rem; }
.sched-when { color: var(--ink-soft); font-size: 0.85rem; }
.sched-live { color: #d9483b; font-weight: 800; font-size: 0.85rem; }
/* "Full … →" widget links use the team's SECONDARY color (mixed toward light text for
   readability across every team); fall back to the site orange if no team color is set. */
.sched-full-link { display: inline-block; margin-top: 0.9rem; font-weight: 800; font-size: 0.85rem; color: color-mix(in srgb, var(--team-2, var(--gg-orange)) 62%, var(--ink)); }
.sched-full-link:hover { color: #fff; }
.team-back { max-width: var(--content-max); margin: 0 auto 3rem; padding: 0 1.5rem; }

/* ============================================================
   Standings — team-page mini table + full league page
   ============================================================ */
/* Side-card mini table (the team's own division, on the team page). */
.mini-standings { width: 100%; border-collapse: collapse; font-size: 0.85rem; margin-top: 0.2rem; }
.mini-standings th {
    text-align: right; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.04em;
    color: var(--ink-soft); font-weight: 800; padding: 0 0.35rem 0.4rem; border-bottom: 1px solid var(--line);
}
.mini-standings th.ms-pos { text-align: center; }
.mini-standings th.ms-team { text-align: left; }
.mini-standings td { padding: 0.34rem 0.35rem; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.mini-standings tr:last-child td { border-bottom: none; }
.mini-standings .ms-pos { text-align: center; color: var(--ink-soft); font-weight: 700; width: 1.4rem; }
.mini-standings .ms-team { display: flex; align-items: center; gap: 0.4rem; font-weight: 700; }
.mini-standings .ms-rec, .mini-standings .ms-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mini-standings .ms-num { color: var(--ink-soft); }
.mini-standings tr.is-mine { background: color-mix(in srgb, var(--team-1) 16%, transparent); }
.mini-standings tr.is-mine td { font-weight: 800; box-shadow: inset 3px 0 0 0 var(--team-1); }
.standings-card .sched-full-link { margin-top: 0.7rem; }

/* Full standings page — conference sections, division blocks side by side. */
.standings-conf { margin: 2.2rem 0 1rem; }
.standings-conf:first-of-type { margin-top: 0.5rem; }
.standings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1.4rem; }
.standings-block { background: var(--card-bg); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.standings-div {
    margin: 0; padding: 0.75rem 1rem; font-size: 0.95rem; color: #fff;
    background: linear-gradient(90deg, var(--team-1), color-mix(in srgb, var(--team-2) 55%, var(--team-1)));
}
.standings-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.standings-table th {
    text-align: right; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.04em;
    color: var(--ink-soft); font-weight: 800; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--line);
}
.standings-table th.st-pos { text-align: center; }
.standings-table th.st-team { text-align: left; }
.standings-table td { padding: 0.5rem 0.7rem; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); vertical-align: middle; }
.standings-table tr:last-child td { border-bottom: none; }
.standings-table .st-pos { text-align: center; color: var(--ink-soft); font-weight: 700; width: 1.6rem; }
.standings-table .st-team { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; }
.standings-table .st-abbr { display: none; color: var(--ink-soft); font-weight: 700; }
.standings-table .st-rec, .standings-table .st-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.standings-table .st-num { color: var(--ink-soft); }
.standings-table tbody tr:hover { background: color-mix(in srgb, var(--team-1) 10%, transparent); }
.standings-table tr.is-mine { background: color-mix(in srgb, var(--team-1) 16%, transparent); }
.standings-table tr.is-mine td { font-weight: 800; }
.standings-table tr.is-mine .st-pos { box-shadow: inset 4px 0 0 0 var(--team-1); }
@media (max-width: 520px) {
    .standings-grid { grid-template-columns: 1fr; }
    .standings-table .st-name { display: none; }
    .standings-table .st-abbr { display: inline; }
    .standings-table .st-hide-sm { display: none; }
}

/* ============================================================
   Roster page + team-page teaser
   ============================================================ */
.roster-wrap { max-width: var(--content-max); margin: 1.5rem auto; padding: 0 1.5rem; }
/* Offense / Defense / Special Teams banner (NFL only) — bold, filled, padded. */
.roster-side {
    display: flex; align-items: center; gap: 1rem;
    margin: 3.2rem 0 1.4rem; padding: 0.85rem 1.3rem;
    border-radius: var(--radius-sm);
    border-left: 7px solid var(--team-2);
    background: linear-gradient(90deg,
        color-mix(in srgb, var(--team-1) 88%, #000),
        color-mix(in srgb, var(--team-1) 32%, transparent) 85%);
    color: #fff; box-shadow: var(--shadow);
    font-size: clamp(1.5rem, 3.4vw, 2.15rem); font-weight: 900; letter-spacing: 0.05em; text-transform: uppercase;
    text-shadow: 0 1px 8px rgba(0,0,0,0.45);
}
.roster-side::after { content: ''; flex: 1; height: 3px; border-radius: 3px;
    background: linear-gradient(90deg, color-mix(in srgb, var(--team-2) 75%, transparent), transparent); }
.roster-side:first-of-type { margin-top: 1.4rem; }          /* don't over-pad the first banner */
.roster-side + .roster-group-title { margin-top: 1.1rem; }  /* breathing room under a banner */
.roster-group-title { display: flex; align-items: center; gap: 0.6rem; margin: 1.6rem 0 1rem; font-size: 1.25rem; font-weight: 900; letter-spacing: -0.01em; }
.roster-group-title > span:first-child { position: relative; padding-bottom: 0.35rem; }
.roster-group-title > span:first-child::after {
    content: ''; position: absolute; left: 0; bottom: 0; width: 52px; height: 4px; border-radius: 4px;
    background: linear-gradient(90deg, var(--team-1), var(--team-2));
}
.roster-group-count { font-size: 0.75rem; font-weight: 800; color: #fff;
    background: color-mix(in srgb, var(--team-1) 70%, #000); padding: 0.12rem 0.55rem; border-radius: 999px; }

.roster-grid { display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); }
.player-card {
    position: relative; text-align: center; background: var(--card-bg);
    border: 1px solid var(--line); border-top: 4px solid var(--team-1); border-radius: var(--radius);
    padding: 1.1rem 0.7rem 0.95rem; box-shadow: var(--shadow);
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.player-card:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--team-1) 55%, var(--line));
    box-shadow: 0 16px 36px -14px color-mix(in srgb, var(--team-1) 60%, transparent), var(--shadow);
}
.player-head { position: relative; width: 92px; height: 92px; margin: 0 auto 0.7rem; }
/* ESPN headshots are transparent cut-outs — the team gradient behind makes them pop. */
.player-shot {
    display: block; width: 92px; height: 92px; border-radius: 50%; object-fit: cover; object-position: center top;
    background: radial-gradient(circle at 50% 32%, color-mix(in srgb, var(--team-2) 45%, transparent), color-mix(in srgb, var(--team-1) 80%, #000));
    border: 3px solid color-mix(in srgb, var(--team-1) 70%, var(--line));
    box-shadow: 0 6px 16px -6px rgba(0,0,0,0.6);
}
.player-shot-missing { position: relative; font-size: 0; }
.player-shot-missing::after { content: '👤'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 2.4rem; opacity: 0.85; }
.player-num {
    position: absolute; top: -3px; right: -3px; min-width: 1.55rem; height: 1.55rem; padding: 0 0.3rem;
    display: inline-flex; align-items: center; justify-content: center; border-radius: 999px;
    background: var(--team-1); color: #fff; font-size: 0.72rem; font-weight: 900; font-variant-numeric: tabular-nums;
    border: 2px solid var(--bay-deep); box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}
.player-pos {
    position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%);
    background: color-mix(in srgb, var(--team-2) 28%, #000); color: #fff;
    font-size: 0.62rem; font-weight: 900; letter-spacing: 0.05em; white-space: nowrap;
    padding: 0.12rem 0.5rem; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--team-2) 50%, transparent);
}
.player-name { display: block; font-weight: 800; font-size: 0.92rem; line-height: 1.2; }
.player-meta { display: block; color: var(--ink-soft); font-size: 0.72rem; margin-top: 0.2rem; }
.player-status { display: inline-block; margin-top: 0.35rem; font-size: 0.6rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.04em; color: var(--gg-red); background: rgba(193,53,43,0.12); padding: 0.1rem 0.45rem; border-radius: 999px; }
.player-injured .player-shot { filter: grayscale(0.45) opacity(0.85); }

/* Hover/focus stat card — this season vs career key stats. */
.player-card.has-stats { cursor: pointer; }
.player-card.has-stats:hover, .player-card.has-stats:focus-within { z-index: 40; }   /* lift above neighbors so the popover isn't covered */
.player-stats {
    position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%) translateY(6px);
    z-index: 40; width: 200px; padding: 0.6rem 0.7rem; text-align: left;
    background: rgba(14,11,24,0.98); border: 1px solid color-mix(in srgb, var(--team-1) 55%, var(--line));
    border-radius: 12px; box-shadow: var(--shadow-lg);
    opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.15s ease, transform 0.15s ease;
}
.player-card.has-stats:hover .player-stats,
.player-card.has-stats:focus-within .player-stats { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.ps-grid { display: grid; grid-template-columns: 1fr auto auto; gap: 0.22rem 0.7rem; align-items: baseline; }
.ps-corner, .ps-col-head { border-bottom: 1px solid var(--line); padding-bottom: 0.25rem; margin-bottom: 0.1rem; }
.ps-col-head { font-size: 0.6rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); text-align: right; }
.ps-k { font-size: 0.72rem; font-weight: 800; color: color-mix(in srgb, var(--team-2) 42%, var(--ink)); }
.ps-s { font-size: 0.78rem; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }
.ps-c { font-size: 0.78rem; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
@media (prefers-reduced-motion: reduce) { .player-stats { transition: opacity 0.15s ease; } }

/* Team-page side-panel teaser: overlapping headshot row that links to the full roster. */
.roster-teaser { display: block; }
.roster-teaser-shots { display: flex; margin: 0.7rem 0; }
.rt-shot {
    width: 46px; height: 46px; border-radius: 50%; margin-left: -12px; overflow: hidden; flex: none;
    border: 2px solid var(--bay-deep);
    background: linear-gradient(135deg, var(--team-1), color-mix(in srgb, var(--team-2) 55%, var(--team-1)));
    box-shadow: 0 3px 8px -3px rgba(0,0,0,0.6); transition: transform 0.15s ease;
}
.rt-shot:first-child { margin-left: 0; }
.rt-shot img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.roster-teaser:hover .rt-shot { transform: translateY(-2px); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { margin-top: auto; background: var(--bay-night); color: #d8d2e8; }
.footer-inner { max-width: 800px; margin: 0 auto; padding: 2.5rem 1.5rem; text-align: center; }
.footer-inner p { margin: 0.4rem 0; line-height: 1.6; }
.footer-inner strong { color: #fff; }
.footer-meta { font-size: 0.85rem; opacity: 0.6; }

/* ============================================================
   Error pages
   ============================================================ */
.error-page { text-align: center; padding: 6rem 1.5rem; }
.error-emoji { font-size: 4rem; margin-bottom: 1rem; }
.error-page h1 { font-size: 2rem; margin: 0 0 0.5rem; }
.error-page p { color: var(--ink-soft); margin-bottom: 1.5rem; }

/* ============================================================
   Alerts
   ============================================================ */
.alert { padding: 0.85rem 1.1rem; border-radius: var(--radius-sm); margin-bottom: 1.2rem; font-weight: 600; border: 1px solid transparent; }
.alert-error { background: #fde8e6; color: #9a1b13; border-color: #f5c2bd; }
.alert-success { background: #e6f7ec; color: #14633a; border-color: #b6e6c9; }

/* ============================================================
   Auth (login)
   ============================================================ */
.auth-body { margin: 0; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; font-family: var(--font); position: relative; overflow: hidden; }
.auth-bg {
    position: fixed; inset: 0; z-index: 0;
    background-image:
        linear-gradient(160deg, rgba(42,26,74,0.78), rgba(26,21,48,0.86)),
        radial-gradient(900px 500px at 75% 10%, rgba(255,138,61,0.35), transparent 55%),
        url('/assets/img/photos/login-bay.jpg');
    background-size: cover; background-position: center;
}
.auth-wrap { position: relative; z-index: 1; width: 100%; max-width: 410px; }
.auth-card {
    background: rgba(255,255,255,0.96); border-radius: 24px; padding: 2.5rem 2rem;
    box-shadow: var(--shadow-lg); text-align: center; border: 1px solid rgba(255,255,255,0.6);
    /* Light card on the dark login backdrop — keep its inner text dark. */
    --ink: #1c1726; --ink-soft: #6b6480; color: var(--ink);
}
.auth-logo { font-size: 3rem; animation: bob 4s ease-in-out infinite; }
.auth-title { font-size: 1.7rem; font-weight: 900; margin: 0.3rem 0 0.2rem; letter-spacing: -0.02em; }
.auth-subtitle { color: var(--ink-soft); margin: 0 0 1.5rem; font-size: 0.95rem; }
.auth-form { display: flex; flex-direction: column; gap: 1rem; text-align: left; }
.auth-form label { display: flex; flex-direction: column; gap: 0.35rem; font-weight: 600; font-size: 0.9rem; }
.auth-back { display: inline-block; margin-top: 1.3rem; color: var(--ink-soft); font-size: 0.9rem; }
.auth-back:hover { color: var(--gg-red); }

/* Shared form inputs */
input[type="text"], input[type="email"], input[type="password"], input[type="url"],
input[type="number"], input[type="datetime-local"], select, textarea {
    width: 100%; padding: 0.7rem 0.85rem; border: 1.5px solid rgba(20,16,40,0.18); border-radius: 10px;
    font-family: inherit; font-size: 1rem; background: #fff; color: var(--input-ink); transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gg-orange); box-shadow: 0 0 0 3px rgba(255,94,98,0.18); }
textarea { resize: vertical; }

/* ============================================================
   Admin shell
   ============================================================ */
/* Admin stays a light "app" UI — re-assert light tokens so the shared dark
   theme doesn't bleed into the white panels/tables. (Public site is dark.) */
.admin-body {
    margin: 0; display: grid; grid-template-columns: 248px 1fr; min-height: 100vh;
    font-family: var(--font); background: #f3f5fa;
    --ink: #1c1726; --ink-soft: #4a4458; --line: rgba(20,16,40,0.10);
    --shadow: 0 10px 30px -12px rgba(30,18,60,0.25);
    color: var(--ink);
}
.admin-sidebar {
    background: linear-gradient(180deg, var(--bay-deep), var(--bay-night));
    color: #d8d2e8; padding: 1.4rem 1rem; display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh;
}
.admin-brand { display: flex; align-items: center; gap: 0.5rem; font-size: 1.25rem; font-weight: 800; color: #fff; padding: 0 0.5rem 1.2rem; }
.admin-brand strong { color: var(--sun-yellow); }
.admin-nav { display: flex; flex-direction: column; gap: 0.25rem; }
.admin-nav a { padding: 0.7rem 0.9rem; border-radius: 12px; color: #cfc8e2; font-weight: 600; transition: all 0.15s ease; }
.admin-nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.admin-nav a.active { background: linear-gradient(135deg, var(--gg-red), var(--gg-orange)); color: #fff; box-shadow: 0 8px 18px -8px rgba(193,53,43,0.7); }
.admin-sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 0.6rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.1); }
.admin-viewsite { color: #cfc8e2; font-size: 0.9rem; padding: 0.4rem 0.5rem; }
.admin-viewsite:hover { color: #fff; }
.admin-logout { width: 100%; background: rgba(255,255,255,0.06); color: #f0d5d2; border: 1px solid rgba(255,255,255,0.12); padding: 0.55rem; border-radius: 10px; cursor: pointer; font-family: inherit; font-weight: 600; transition: background 0.15s ease; }
.admin-logout:hover { background: rgba(193,53,43,0.4); color: #fff; }

.admin-main { display: flex; flex-direction: column; min-width: 0; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.8rem; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.admin-page-title { font-size: 1.4rem; font-weight: 800; margin: 0; }
.admin-user { color: var(--ink-soft); font-weight: 600; }
.admin-content { padding: 1.8rem; max-width: 1100px; width: 100%; }

/* Stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.1rem; margin-bottom: 1.8rem; }
.stat-card { display: flex; flex-direction: column; gap: 0.25rem; padding: 1.4rem; border-radius: var(--radius); color: #fff; box-shadow: var(--shadow); transition: transform 0.18s ease, box-shadow 0.18s ease; }
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.stat-1 { background: linear-gradient(135deg, #AA0000, #ff5e62); }
.stat-2 { background: linear-gradient(135deg, #FD5A1E, #ff8a3d); }
.stat-3 { background: linear-gradient(135deg, #1D428A, #4f7fd6); }
.stat-4 { background: linear-gradient(135deg, #5A2D81, #9b5fc7); }
.stat-icon { font-size: 1.8rem; }
.stat-num { font-size: 2.1rem; font-weight: 900; line-height: 1; }
.stat-label { font-size: 0.9rem; opacity: 0.95; }
.stat-label small { opacity: 0.85; }

/* Panels & tables */
.admin-panel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.4rem 1.6rem; margin-bottom: 1.5rem; border: 1px solid var(--line); }
.admin-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.admin-panel-head h2 { margin: 0; font-size: 1.25rem; font-weight: 800; }
.admin-panel-form { max-width: 820px; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); padding: 0.6rem 0.7rem; border-bottom: 2px solid var(--line); }
.data-table td { padding: 0.75rem 0.7rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tr:hover td { background: #fafbff; }
.data-table .muted { color: var(--ink-soft); font-size: 0.9rem; }
.cell-emoji { font-size: 1.2rem; margin-right: 0.3rem; }
.cell-logo { height: 24px; width: auto; max-width: 36px; object-fit: contain; vertical-align: middle; margin-right: 0.4rem; }
.data-table td strong { margin-right: 0.4rem; }

.row-actions { display: flex; gap: 0.7rem; align-items: center; white-space: nowrap; }
.row-actions a { color: var(--gg-red); font-weight: 600; font-size: 0.9rem; }
.row-actions form { display: inline; }
.link-danger { background: none; border: none; color: #b00; font-weight: 600; cursor: pointer; font-family: inherit; font-size: 0.9rem; padding: 0; }
.link-danger:hover { text-decoration: underline; }

.pill { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 999px; background: #eef0f7; font-size: 0.78rem; font-weight: 700; }
.pill-you { background: #e6f7ec; color: #14633a; margin-left: 0.3rem; }
.badge { display: inline-block; padding: 0.22rem 0.65rem; border-radius: 999px; font-size: 0.78rem; font-weight: 800; background: #eef0f7; color: var(--ink-soft); }
.badge-on { background: #e6f7ec; color: #14633a; }
.badge-off { background: #fdeee6; color: #9a4b13; }
.badge-admin { background: linear-gradient(135deg, var(--gg-red), var(--gg-orange)); color: #fff; }
.swatch { display: inline-block; width: 18px; height: 18px; border-radius: 5px; border: 1px solid rgba(0,0,0,0.15); vertical-align: middle; margin-right: 2px; }

/* Forms */
.admin-form { display: flex; flex-direction: column; gap: 1.1rem; }
.admin-form > label { display: flex; flex-direction: column; gap: 0.35rem; font-weight: 600; font-size: 0.9rem; }
.admin-form label span small { font-weight: 400; color: var(--ink-soft); }
.form-row { display: grid; gap: 1.1rem; }
.form-row label { display: flex; flex-direction: column; gap: 0.35rem; font-weight: 600; font-size: 0.9rem; }
.form-row-2 { grid-template-columns: 1fr 1fr; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-row-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
.color-label input[type="color"] { width: 100%; height: 44px; padding: 4px; border-radius: 10px; cursor: pointer; }
.emoji-input { font-size: 1.3rem; text-align: center; }
.hero-preview-wrap { display: flex; flex-direction: column; gap: 0.35rem; font-weight: 600; font-size: 0.9rem; }
.hero-preview { width: 100%; height: 80px; object-fit: cover; border-radius: 10px; border: 1.5px solid var(--line); }
.logo-preview-box { display: flex; align-items: center; justify-content: center; height: 80px; border-radius: 10px; border: 1.5px solid var(--line); background: #eef0f7; padding: 8px; }
.logo-preview { max-height: 64px; max-width: 100%; object-fit: contain; }
.brand-preview-emoji { font-size: 2.4rem; }
.check-label { flex-direction: row !important; align-items: center; gap: 0.6rem; }
.check-label input { width: auto; }
.form-actions { display: flex; gap: 0.8rem; margin-top: 0.5rem; }

.admin-tips { background: #fff; border-radius: var(--radius); border: 1px dashed rgba(193,53,43,0.3); padding: 1.2rem 1.4rem; color: var(--ink-soft); line-height: 1.6; }
.admin-tips strong { color: var(--ink); }
.admin-tips code { background: #f3f0fa; color: #6b3fa0; padding: 0.1rem 0.35rem; border-radius: 5px; font-size: 0.85em; word-break: break-all; }

/* Feeds admin */
.head-actions { display: flex; gap: 0.6rem; align-items: center; }
.panel-note { color: var(--ink-soft); font-size: 0.92rem; line-height: 1.55; margin: -0.3rem 0 1rem; }
.filter-bar { display: flex; align-items: center; gap: 0.6rem; margin: 0 0 1rem; }
.filter-bar label { display: flex; align-items: center; gap: 0.5rem; }
.filter-bar label .muted { font-size: 0.85rem; }
.filter-bar select { padding: 0.4rem 0.6rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; }

/* Logo dropdown — custom select that shows team logos; the native <select> stays
   hidden underneath for form submission + no-JS fallback. */
.cselect { position: relative; }
.cselect-native { display: none; }
.filter-bar .cselect { flex: 1; }
.cselect-button {
    width: 100%; display: flex; align-items: center; gap: 0.5rem;
    padding: 0.7rem 0.85rem; border: 1.5px solid rgba(20,16,40,0.18); border-radius: 10px;
    background: #fff; color: var(--input-ink); font: inherit; font-size: 1rem; text-align: left; cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.cselect-button:focus-visible { outline: none; border-color: var(--gg-orange); box-shadow: 0 0 0 3px rgba(255,94,98,0.18); }
.cselect-caret { margin-left: auto; padding-left: 0.4rem; color: var(--ink-soft); font-size: 0.8rem; }
.cselect-logo { height: 20px; width: auto; max-width: 28px; object-fit: contain; flex: none; }
.cselect-list {
    position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0;
    max-height: 340px; overflow-y: auto; padding: 4px; background: #fff;
    border: 1.5px solid rgba(20,16,40,0.14); border-radius: 10px;
    box-shadow: 0 14px 34px rgba(20,16,40,0.18);
}
.cselect-option {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 0.6rem; border-radius: 7px; cursor: pointer; font-size: 0.95rem; color: var(--input-ink);
}
.cselect-option:hover { background: #fef0ee; }
.feed-url { display: block; font-size: 0.78rem; max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge-err { background: #fdeae8; color: #b3261e; }

/* ============================================================
   Boom toggle — discreet admin ↔ site switch (same tab, no new window)
   ============================================================ */
.boom-toggle {
    position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 200;
    width: 50px; height: 50px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(11, 9, 19, 0.72); backdrop-filter: blur(8px);
    border: 1.5px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.6);
    opacity: 0.6; transition: opacity 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.boom-toggle:hover { opacity: 1; transform: translateY(-3px) scale(1.06); box-shadow: 0 12px 30px -8px rgba(193, 53, 43, 0.6); }
.boom-toggle img { width: 28px; height: 28px; object-fit: contain; transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1); }
.boom-toggle:hover img { transform: rotate(360deg); }
.boom-tip {
    position: absolute; right: 60px; top: 50%; transform: translateY(-50%) translateX(6px);
    background: rgba(11, 9, 19, 0.92); color: #fff; font-size: 0.78rem; font-weight: 700;
    padding: 0.3rem 0.6rem; border-radius: 8px; white-space: nowrap;
    opacity: 0; pointer-events: none; transition: opacity 0.18s ease, transform 0.18s ease;
}
.boom-toggle:hover .boom-tip { opacity: 1; transform: translateY(-50%) translateX(0); }
@media (max-width: 720px) { .boom-toggle { width: 44px; height: 44px; right: 0.8rem; bottom: 0.8rem; } .boom-toggle img { width: 24px; height: 24px; } }

/* ============================================================
   Reveal-on-scroll (progressive enhancement; safe if JS off)
   ============================================================ */
/* Entrance animation — pure CSS, no JS. The element's NATURAL state is fully
   visible (opacity 1); the keyframes only animate it IN on load and always end
   visible. So if animations are disabled/unsupported, content still shows. */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.team-card, .news-card, .news-feature, .side-card, .section-title { animation: rise 0.5s ease both; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 860px) {
    .team-body { grid-template-columns: 1fr; }
    .form-row-3, .form-row-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
    .admin-body { grid-template-columns: 1fr; }
    .admin-sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
    .admin-brand { padding: 0 0.5rem; }
    .admin-nav { flex-direction: row; flex-wrap: wrap; }
    .admin-sidebar-foot { margin: 0 0 0 auto; flex-direction: row; border: none; padding: 0; }
    .form-row-2, .form-row-3, .form-row-4 { grid-template-columns: 1fr; }
    .data-table { font-size: 0.9rem; }
    .row-actions { flex-direction: column; gap: 0.3rem; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
    /* Disable all motion. Content defaults to visible (no opacity:0 anywhere), so
       turning animations off can never hide anything. */
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ============================================================
   Secret San Diego region — sun, sand, ocean & Padres gold.
   The whole site re-skins when body.region-sandiego is set; the
   region is toggled by 5 quick taps on the brand logo (see app.js
   + site_brand()). Only color vars and the backdrop change — every
   component keeps its existing layout and the per-team colors still
   win on team pages.
   ============================================================ */
.region-sandiego {
    --gg-red:     #ffb32b;   /* Padres gold takes over the Golden-Gate-red accent */
    --gg-orange:  #ffd166;
    --sun-orange: #2bb3c0;   /* Pacific teal pop */
    --sun-yellow: #ffe08a;
    --bay-deep:   #0e1b2a;   /* panel base → deep ocean */
    --bay-night:  #040b14;
    --card-bg:    rgba(12, 24, 38, 0.62);   /* dark ocean glass */
}
/* Body backdrop: warm gold sun top-right, teal surf top-left, deep-ocean base. */
body.region-sandiego {
    background:
        radial-gradient(1200px 600px at 80% -10%, rgba(43, 179, 192, 0.18), transparent 60%),
        radial-gradient(1000px 500px at 10% 0%, rgba(255, 179, 43, 0.16), transparent 55%),
        linear-gradient(180deg, #07151f 0%, #03090f 100%);
}
.region-sandiego .bg-photo {
    background: linear-gradient(180deg, rgba(6, 18, 28, 0.55), rgba(3, 9, 15, 0) 70%);
}
.region-sandiego .fog-layer {
    background:
        radial-gradient(600px 220px at 20% 8%, rgba(255, 179, 43, 0.10), transparent 70%),
        radial-gradient(700px 240px at 85% 16%, rgba(43, 179, 192, 0.12), transparent 70%);
}
/* Header default accent line: silver → gold→teal when no team page overrides it. */
.region-sandiego .site-header { --hdr-c1: #d9a441; --hdr-c2: #6fd0d9; }
.region-sandiego .brand-text strong { color: #ffc425; }

/* Taller home hero so the open San Diego Bay photo has room to breathe; text stays
   vertically centered over it. */
.region-sandiego .hero {
    min-height: clamp(440px, 62vh, 680px);
    display: flex; flex-direction: column; justify-content: center;
}
/* Ocean-toned hero wash (navy → teal → gold) so it complements the bay photo instead
   of the Bay site's warm red/orange sunset gradient. */
.region-sandiego .hero-overlay {
    background: linear-gradient(115deg,
        rgba(8,18,30,0.84) 0%,
        rgba(13,70,90,0.52) 42%,
        rgba(43,179,192,0.22) 75%,
        rgba(255,196,37,0.16) 100%);
}

/* The brand logo briefly pulses while the secret 5-tap gesture is in progress. */
.brand-logo[data-region-tap] { cursor: pointer; }
.brand-logo.region-arming { animation: regionArm 0.45s ease-out; }
@keyframes regionArm {
    0%   { transform: scale(1); }
    45%  { transform: scale(1.22) rotate(-6deg); filter: drop-shadow(0 0 10px rgba(255,196,37,0.85)); }
    100% { transform: scale(1); }
}

/* Brief full-screen flash + label when the region flips, so the switch feels intentional. */
.region-splash {
    position: fixed; inset: 0; z-index: 9999; pointer-events: none;
    display: flex; align-items: center; justify-content: center;
    font-weight: 900; font-size: clamp(1.6rem, 6vw, 3.2rem); letter-spacing: -0.02em;
    color: #fff; text-shadow: 0 4px 24px rgba(0,0,0,0.6);
    background: radial-gradient(circle at center, rgba(43,179,192,0.30), rgba(3,9,15,0.85));
    opacity: 0; animation: regionSplash 1.1s ease-out forwards;
}
.region-splash.to-bay {
    background: radial-gradient(circle at center, rgba(224,70,59,0.28), rgba(7,6,14,0.85));
}
@keyframes regionSplash {
    0%   { opacity: 0; transform: scale(1.08); }
    18%  { opacity: 1; transform: scale(1); }
    72%  { opacity: 1; }
    100% { opacity: 0; transform: scale(1.02); }
}
@media (prefers-reduced-motion: reduce) {
    .region-splash { animation: none; opacity: 0; }
}


