/* ==========================================================================
   GARDEN STATE STRIKERS PWA — UI COMPONENTS & RESPONSIVE SHELL
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. App Shell & Frosted Glass Chrome
   -------------------------------------------------------------------------- */
.app-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--header-height) + var(--safe-top));
  padding-bottom: calc(var(--tabbar-height) + var(--safe-bottom) + var(--space-6));
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
}

/* Sticky Top Frosted Header */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  height: calc(var(--header-height) + var(--safe-top));
  padding-top: var(--safe-top);
  padding-left: calc(var(--space-4) + var(--safe-left));
  padding-right: calc(var(--space-4) + var(--safe-right));
  background: var(--bg-glass-chrome);
  backdrop-filter: var(--blur-chrome);
  -webkit-backdrop-filter: var(--blur-chrome);
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-inner {
  width: 100%;
  max-width: var(--max-content-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.brand-crest {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--gss-navy-800);
  border: 1px solid var(--border-strong);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

.brand-titles {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-name {
  font-size: var(--text-base);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-subtitle {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--gss-emerald-400);
  box-shadow: 0 0 8px var(--gss-emerald-400);
  display: inline-block;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Live iOS Segmented Theme Switcher Bar (Light / Dark) */
.theme-switcher-bar {
  display: inline-flex;
  align-items: center;
  background: var(--bg-pill);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
}

.theme-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-secondary);
  transition: all var(--duration-fast) var(--ease-ios);
  white-space: nowrap;
}

.theme-switch-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.theme-switch-btn[aria-pressed="true"] {
  background: var(--gss-orange-500);
  color: var(--text-on-accent);
  box-shadow: 0 2px 8px rgba(238, 107, 59, 0.35);
}

@media (max-width: 1120px) {
  .header-season-pill {
    display: none;
  }
}

@media (max-width: 900px) {
  .header-info-label {
    display: none;
  }
  .header-info-btn {
    padding: 6px;
  }
}

.header-season-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: rgba(238, 107, 59, 0.15);
  border: 1px solid var(--border-accent);
  color: var(--gss-orange-400);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Top-Header Info (ⓘ) Pill Button (Option 3) */
.header-info-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  background: var(--bg-pill);
  border: 1px solid var(--border-hairline);
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: 700;
  transition: all var(--duration-fast) var(--ease-ios);
  white-space: nowrap;
}

.header-info-btn svg {
  width: 15px;
  height: 15px;
  color: var(--gss-orange-400);
  flex-shrink: 0;
}

.header-info-btn:hover,
.header-info-btn:focus-visible {
  background: rgba(238, 107, 59, 0.18);
  border-color: var(--gss-orange-500);
  color: var(--text-primary);
}

.header-info-btn:active {
  transform: scale(0.95);
}

@media (max-width: 560px) {
  .header-info-label {
    display: none;
  }
  .header-info-btn {
    padding: 6px;
  }
}

/* Primary Navigation Bar (Bottom Tab Bar on Mobile Portrait) */
.app-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 45;
  height: calc(var(--tabbar-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
  background: var(--bg-glass-chrome);
  backdrop-filter: var(--blur-chrome);
  -webkit-backdrop-filter: var(--blur-chrome);
  border-top: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.nav-list {
  list-style: none;
  display: flex;
  width: 100%;
  max-width: 460px;
  height: 100%;
  align-items: center;
  justify-content: space-around;
}

.nav-item {
  flex: 1;
  height: 100%;
}

.nav-btn {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-tertiary);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color var(--duration-fast) var(--ease-ios), transform var(--duration-fast) var(--ease-ios);
  position: relative;
}

.nav-btn svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
  transition: transform var(--duration-fast) var(--ease-ios);
}

.nav-btn[aria-current="page"] {
  color: var(--gss-orange-500);
}

.nav-btn[aria-current="page"] svg {
  transform: translateY(-1px) scale(1.06);
}

.nav-btn:active {
  transform: scale(0.94);
}

/* Main View Containers */
.app-main {
  width: 100%;
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: var(--space-4);
  flex: 1;
}

.view-section {
  display: none;
  animation: viewFadeIn var(--duration-normal) var(--ease-ios);
}

.view-section.is-active {
  display: block;
}

@keyframes viewFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   2. Responsive Breakpoints & Orientation Adaptation
   -------------------------------------------------------------------------- */

/* Mobile Landscape: Compact top header & slim left navigation rail */
@media (orientation: landscape) and (max-height: 500px) {
  :root {
    --header-height: 46px;
  }

  .app-shell {
    padding-top: calc(var(--header-height) + var(--safe-top));
    padding-bottom: calc(var(--safe-bottom) + var(--space-4));
    padding-left: calc(var(--rail-width) + var(--safe-left));
  }

  .app-header {
    left: calc(var(--rail-width) + var(--safe-left));
  }

  .brand-crest {
    width: 30px;
    height: 30px;
  }

  .app-nav {
    top: 0;
    bottom: 0;
    left: 0;
    right: auto;
    width: calc(var(--rail-width) + var(--safe-left));
    height: 100dvh;
    padding-top: var(--safe-top);
    padding-bottom: var(--safe-bottom);
    padding-left: var(--safe-left);
    padding-right: 0;
    border-top: none;
    border-right: 1px solid var(--border-hairline);
    flex-direction: column;
    justify-content: center;
  }

  .nav-list {
    flex-direction: column;
    height: auto;
    gap: var(--space-4);
  }

  .nav-item {
    width: 100%;
    height: 56px;
  }
}

/* Tablet & Desktop (>=768px): Morph navigation into top bar inside frosted header */
@media (min-width: 768px) {
  :root {
    --header-height: 70px;
  }

  .app-shell {
    padding-bottom: var(--space-10);
  }

  .app-nav {
    position: fixed;
    top: var(--safe-top);
    bottom: auto;
    left: 47%;
    right: auto;
    transform: translateX(-50%);
    height: var(--header-height);
    width: auto;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-top: none;
    z-index: 46;
  }

  .nav-list {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-pill);
    padding: 4px;
    height: 40px;
    width: auto;
    gap: 2px;
  }

  .nav-item {
    flex: initial;
    height: 100%;
  }

  .nav-btn {
    flex-direction: row;
    gap: 6px;
    padding: 0 13px;
    border-radius: var(--radius-pill);
    font-size: var(--text-xs);
    color: var(--text-secondary);
  }

  .nav-btn svg {
    width: 18px;
    height: 18px;
  }

  .nav-btn[aria-current="page"] {
    background: var(--gss-orange-500);
    color: var(--text-on-accent);
    box-shadow: var(--shadow-orange);
  }

  .nav-btn[aria-current="page"] svg {
    transform: none;
  }

  .app-main {
    padding: var(--space-6);
  }
}

/* --------------------------------------------------------------------------
   3. Club View (#club) — Hero, Bento Cards & Grounds
   -------------------------------------------------------------------------- */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 768px) {
  .bento-grid {
    grid-template-columns: repeat(12, 1fr);
    gap: var(--space-5);
  }

  .bento-span-7 {
    grid-column: span 7;
  }

  .bento-span-5 {
    grid-column: span 5;
  }

  .bento-span-6 {
    grid-column: span 6;
  }

  .bento-span-12 {
    grid-column: span 12;
  }
}

.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.bento-card--hero {
  background: var(--bg-hero-gradient);
  border-color: rgba(238, 107, 59, 0.32);
}

.hero-top {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.hero-crest-wrap {
  width: 76px;
  height: 76px;
  border-radius: var(--radius-lg);
  padding: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-strong);
  flex-shrink: 0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
}

.hero-crest-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 14px;
  background: #ffffff;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gss-orange-400);
  margin-bottom: 4px;
}

.hero-title {
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.hero-motto {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin-top: 2px;
}

.season-stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-hairline);
}

.season-stat-box {
  background: var(--bg-inset-box);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  text-align: center;
}

.season-stat-val {
  display: block;
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}

.season-stat-val--accent {
  color: var(--gss-orange-400);
}

.season-stat-lbl {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

/* Next Fixture Banner inside Bento */
.fixture-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-3);
}

.card-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--gss-orange-400);
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.badge-pill--orange {
  background: rgba(238, 107, 59, 0.18);
  color: var(--gss-orange-400);
  border: 1px solid var(--border-accent);
}

.fixture-opponent {
  font-size: var(--text-lg);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.fixture-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.fixture-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fixture-meta-row svg {
  width: 16px;
  height: 16px;
  color: var(--gss-orange-400);
  flex-shrink: 0;
}

/* Section Headers */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin: var(--space-6) 0 var(--space-3);
}

.section-title {
  font-size: var(--text-lg);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  font-weight: 600;
}

/* Home Grounds Cards */
.ground-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-4);
}

.ground-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.ground-title {
  font-size: var(--text-md);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.ground-address {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.4;
}

.ground-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.spec-chip {
  font-size: var(--text-xs);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-hairline);
  color: var(--text-secondary);
}

.ground-note {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  background: var(--bg-inset-box);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--gss-orange-500);
}

.ground-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-top: auto;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 700;
  transition: transform var(--duration-fast) var(--ease-ios), background-color var(--duration-fast) var(--ease-ios);
  text-align: center;
}

.btn-action svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.btn-action:active {
  transform: scale(0.96);
}

.btn-action--primary {
  background: var(--gss-orange-500);
  color: var(--text-on-accent);
  box-shadow: var(--shadow-orange);
}

.btn-action--primary:hover {
  background: var(--gss-orange-600);
}

.btn-action--secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
}

.btn-action--secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* Chronological Club History Timeline */
.welcome-story-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  background: var(--bg-welcome-gradient);
  border-color: rgba(238, 107, 59, 0.34);
}

.welcome-prose {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.62;
}

.welcome-prose p strong {
  color: var(--text-primary);
}

.welcome-inline-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gss-orange-400);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.welcome-inline-link:hover {
  color: var(--text-primary);
}

/* Direct Contact & Connect Bar inside Landing Welcome Card */
.welcome-contact-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--bg-inset-box);
  border: 1px solid var(--border-accent);
}

.welcome-contact-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.welcome-contact-kicker {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gss-orange-400);
}

.welcome-contact-email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--text-primary);
  word-break: break-all;
}

.welcome-contact-email svg {
  width: 17px;
  height: 17px;
  color: var(--gss-orange-400);
  flex-shrink: 0;
}

.welcome-contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

/* Slim App Footer Bar & Legal Bottom Sheet Content */
.app-footer {
  width: 100%;
  max-width: var(--max-content-width);
  margin: auto auto 0 auto;
  padding: var(--space-4) var(--space-6);
}

.app-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.footer-brand-row,
.footer-legal-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.footer-copyright {
  font-weight: 700;
  color: var(--text-primary);
}

.footer-sep {
  color: var(--text-tertiary);
}

.footer-email-link {
  font-weight: 700;
  color: var(--gss-orange-400);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-copy-pill {
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--bg-pill);
  border: 1px solid var(--border-hairline);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.footer-copy-pill:hover {
  border-color: var(--gss-orange-500);
  color: var(--text-primary);
}

.footer-legal-btn {
  font-weight: 700;
  color: var(--text-secondary);
  transition: color var(--duration-fast) var(--ease-ios);
}

.footer-legal-btn:hover {
  color: var(--gss-orange-400);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border-hairline);
}

.legal-section-title {
  font-size: var(--text-md);
  font-weight: 800;
}

.legal-section-updated {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  font-weight: 600;
}

.legal-clauses-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.legal-clause-card {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--bg-inset-box);
  border: 1px solid var(--border-hairline);
}

.legal-clause-heading {
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--gss-orange-400);
  margin-bottom: 4px;
}

.legal-clause-body {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.55;
}

.welcome-pillars-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-hairline);
}

@media (min-width: 680px) {
  .welcome-pillars-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.welcome-pillar-box {
  background: rgba(9, 8, 27, 0.48);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
}

.welcome-pillar-title {
  display: block;
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--gss-orange-400);
  margin-bottom: 2px;
}

.welcome-pillar-detail {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

/* History Chapters & Story Cards (#history) */
.history-hero-card {
  background: var(--bg-hero-gradient);
  border-color: rgba(238, 107, 59, 0.35);
  margin-bottom: var(--space-5);
}

.history-chapters-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

@media (min-width: 768px) {
  .history-chapters-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-5);
  }
}

.history-chapter-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  border-top: 3px solid var(--gss-orange-500);
}

.history-chapter-era {
  font-size: var(--text-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gss-orange-400);
}

.history-chapter-title {
  font-size: var(--text-lg);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.22;
}

.history-chapter-prose {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.62;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* Multi-Tabbed Timeline Header & Segmented Controls */
.timeline-tabbed-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.timeline-tabs-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-hairline);
}

.timeline-segmented-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: var(--bg-inset-box);
  padding: 5px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-hairline);
  max-width: 540px;
}

.timeline-tab-btn {
  padding: 9px 12px;
  border-radius: calc(var(--radius-md) - 4px);
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--text-secondary);
  text-align: center;
  transition: all var(--duration-fast) var(--ease-ios);
}

.timeline-tab-btn[aria-selected="true"] {
  background: var(--gss-orange-500);
  color: var(--text-on-accent);
  box-shadow: 0 4px 14px rgba(238, 107, 59, 0.38);
}

.timeline-tab-subtitle {
  font-size: var(--text-sm);
  color: var(--gss-orange-400);
  font-weight: 700;
}

.timeline-year-filter-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
}

.timeline-season-highlight-banner {
  background: rgba(238, 107, 59, 0.11);
  border: 1px solid var(--border-accent);
  border-left: 4px solid var(--gss-orange-500);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

.timeline-tag--win {
  background: rgba(52, 211, 153, 0.18);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.4);
}

.timeline-tag--loss {
  background: rgba(248, 113, 113, 0.16);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.35);
}

.timeline-tag--nr {
  background: rgba(251, 191, 36, 0.16);
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.timeline-dot--win {
  border-color: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.16);
}

.timeline-dot--loss {
  border-color: #f87171;
  box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.15);
}

.timeline-scorecard-link {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gss-orange-400);
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  background: rgba(238, 107, 59, 0.14);
  border: 1px solid var(--border-accent);
  transition: background-color var(--duration-fast) var(--ease-ios);
}

.timeline-scorecard-link:hover {
  background: var(--gss-orange-500);
  color: var(--text-on-accent);
}

.timeline-list {
  list-style: none;
  position: relative;
  padding-left: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.timeline-list::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 7px;
  width: 2px;
  background: linear-gradient(180deg, var(--gss-orange-500) 0%, rgba(255, 255, 255, 0.12) 100%);
}

.timeline-item {
  position: relative;
}

.timeline-dot {
  position: absolute;
  left: calc(-1 * var(--space-6) + 1px);
  top: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gss-navy-900);
  border: 3px solid var(--gss-orange-500);
  box-shadow: 0 0 0 4px rgba(238, 107, 59, 0.15);
}

.timeline-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: 4px;
}

.timeline-year {
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--gss-orange-400);
}

.timeline-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-secondary);
}

.timeline-title {
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: 4px;
}

.timeline-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.48;
}

/* --------------------------------------------------------------------------
   4. Squad View (#squad) — Dual-Layer Filters & SportyBlocks Player Cards
   -------------------------------------------------------------------------- */
.squad-controls {
  position: sticky;
  top: calc(var(--header-height) + var(--safe-top));
  z-index: 30;
  margin: calc(-1 * var(--space-4)) calc(-1 * var(--space-4)) var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-sticky-subbar);
  backdrop-filter: var(--blur-chrome);
  -webkit-backdrop-filter: var(--blur-chrome);
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

@media (min-width: 768px) {
  .squad-controls {
    margin: 0 0 var(--space-5);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-hairline);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* Primary iOS Segmented Control (Current | Former) */
.segmented-control {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(255, 255, 255, 0.07);
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-hairline);
  width: 100%;
  max-width: 320px;
}

.segment-btn {
  padding: 7px 14px;
  border-radius: calc(var(--radius-md) - 3px);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-secondary);
  transition: all var(--duration-fast) var(--ease-ios);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.segment-btn[aria-pressed="true"] {
  background: var(--gss-orange-500);
  color: var(--text-on-accent);
  box-shadow: 0 2px 10px rgba(238, 107, 59, 0.35);
}

.segment-count {
  font-size: var(--text-xs);
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.25);
}

/* Secondary Horizontal Scroll-Snap Role Strip */
.role-filter-strip {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
}

.role-filter-strip::-webkit-scrollbar {
  display: none;
}

.role-chip {
  scroll-snap-align: start;
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 700;
  background: var(--bg-pill);
  border: 1px solid var(--border-hairline);
  color: var(--text-secondary);
  transition: all var(--duration-fast) var(--ease-ios);
}

.role-chip[aria-pressed="true"] {
  background: rgba(238, 107, 59, 0.2);
  border-color: var(--gss-orange-500);
  color: var(--text-primary);
}

/* SportyBlocks Player Grid & Trading Cards */
.squad-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 600px) {
  .squad-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 980px) {
  .squad-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
  }
}

.player-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition: transform var(--duration-fast) var(--ease-ios), border-color var(--duration-fast) var(--ease-ios);
  position: relative;
  overflow: hidden;
}

.player-card:hover {
  border-color: rgba(238, 107, 59, 0.38);
}

.player-card-top {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

/* Avatar / Monogram Graceful Fallback */
.player-avatar-wrap {
  position: relative;
  width: 78px;
  height: 78px;
  border-radius: 18px;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--gss-navy-700) 0%, var(--gss-navy-900) 100%);
  border: 1px solid var(--border-strong);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
}

.player-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-monogram {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 80% 20%, rgba(238, 107, 59, 0.35), transparent 60%),
    linear-gradient(145deg, #211f54 0%, #121130 100%);
  color: var(--text-primary);
  text-align: center;
}

.monogram-initials {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
}

.monogram-badge {
  margin-top: 4px;
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--gss-orange-400);
  background: rgba(0, 0, 0, 0.35);
  padding: 1px 6px;
  border-radius: var(--radius-pill);
}

.player-jersey-pill {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(9, 8, 27, 0.86);
  border: 1px solid var(--border-accent);
  color: var(--gss-orange-400);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 7px;
  backdrop-filter: blur(6px);
}

.player-identity {
  flex: 1;
  min-width: 0;
}

.player-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.role-badge {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(238, 107, 59, 0.16);
  color: var(--gss-orange-400);
}

.tenure-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-tertiary);
}

.player-name {
  font-size: var(--text-md);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-subrole {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin-top: 2px;
}

.player-bio {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Enlarged SportyBlocks Trading-Card Showcase Layout */
.player-card--enlarged {
  padding: var(--space-5);
  gap: var(--space-4);
}

.player-card-showcase {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-3);
}

.player-avatar-wrap--showcase {
  width: 100%;
  max-width: 220px;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 22px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.5);
}

.player-avatar-wrap--showcase .monogram-initials {
  font-size: 3rem;
}

.player-avatar-wrap--showcase .monogram-badge {
  font-size: 0.85rem;
  padding: 4px 12px;
  margin-top: 8px;
}

.player-avatar-wrap--showcase .player-jersey-pill {
  bottom: 10px;
  right: 10px;
  font-size: 0.85rem;
  padding: 3px 10px;
  border-radius: 9px;
}

.player-identity--enlarged {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.player-identity--enlarged .player-badges {
  justify-content: center;
  margin-bottom: 6px;
}

.player-identity--enlarged .player-name {
  font-size: var(--text-lg);
}

/* Casual Career Stats Strip */
.player-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
  background: var(--bg-inset-box);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  margin-top: auto;
}

.player-stats--enlarged {
  padding: var(--space-4) var(--space-3);
  border-radius: var(--radius-lg);
  background: var(--bg-inset-box);
  border-color: var(--border-strong);
}

.player-stats--enlarged .stat-value {
  font-size: var(--text-xl);
  color: var(--gss-orange-400);
}

.player-stats--enlarged .stat-label {
  font-size: 0.74rem;
  margin-top: 2px;
}

.stat-cell {
  text-align: center;
}

.stat-cell:not(:last-child) {
  border-right: 1px solid var(--border-hairline);
}

.stat-value {
  display: block;
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--text-primary);
}

.stat-label {
  display: block;
  font-size: 0.68rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Player Footer: Spotlight Button & Conditional Social Pills */
.player-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--border-hairline);
}

.player-socials {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-hairline);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  transition: all var(--duration-fast) var(--ease-ios);
  white-space: nowrap;
}

.social-pill svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.social-pill:hover,
.social-pill:focus-visible {
  background: rgba(238, 107, 59, 0.2);
  border-color: var(--gss-orange-500);
  color: var(--text-primary);
}

.spotlight-trigger {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: rgba(238, 107, 59, 0.14);
  border: 1px solid var(--border-accent);
  color: var(--gss-orange-400);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   5. Matchday & Team Gallery (#gallery)
   -------------------------------------------------------------------------- */
.gallery-filter-bar {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  margin-bottom: var(--space-4);
}

.gallery-filter-bar::-webkit-scrollbar {
  display: none;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 600px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 980px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
  }
}

.gallery-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  text-align: left;
  transition: transform var(--duration-fast) var(--ease-ios), border-color var(--duration-fast) var(--ease-ios);
}

.gallery-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-accent);
}

.gallery-media {
  width: 100%;
  background: var(--gss-navy-800);
  position: relative;
  overflow: hidden;
}

.gallery-media[data-ratio="4 / 3"] {
  aspect-ratio: 4 / 3;
}

.gallery-media[data-ratio="1 / 1"] {
  aspect-ratio: 1 / 1;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms var(--ease-ios);
}

.gallery-card:hover .gallery-img {
  transform: scale(1.03);
}

.gallery-season-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(9, 8, 27, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-hairline);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--gss-orange-400);
}

.gallery-video-play-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(238, 107, 59, 0.92);
  color: #ffffff;
  font-size: var(--text-xs);
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  transition: transform 400ms var(--ease-ios);
}

.gallery-body {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gallery-title {
  font-size: var(--text-base);
  font-weight: 800;
  line-height: 1.25;
}

.gallery-caption {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.55;
}

.gallery-meta {
  margin-top: 6px;
  font-size: 0.7rem;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* --------------------------------------------------------------------------
   6. Native <dialog> Bottom Sheet (Player Social Spotlight) & 100dvh Lightbox
   -------------------------------------------------------------------------- */
dialog {
  border: none;
  background: transparent;
  color: var(--text-primary);
  max-width: 100vw;
  max-height: 100dvh;
}

dialog::backdrop {
  background: rgba(4, 3, 14, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* iOS Slide-Up Bottom Sheet */
.ios-sheet {
  position: fixed;
  inset: auto 0 0 0;
  width: 100%;
  max-width: 620px;
  max-height: 90dvh;
  margin: auto auto 0 auto;
  background: var(--bg-sheet);
  backdrop-filter: var(--blur-sheet);
  -webkit-backdrop-filter: var(--blur-sheet);
  border-top: 1px solid var(--border-strong);
  border-left: 1px solid var(--border-hairline);
  border-right: 1px solid var(--border-hairline);
  border-radius: 26px 26px 0 0;
  box-shadow: var(--shadow-elevated);
  padding-bottom: calc(var(--safe-bottom) + var(--space-5));
  overflow-y: auto;
  animation: sheetSlideUp var(--duration-normal) var(--ease-ios);
}

@keyframes sheetSlideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.sheet-grabber-bar {
  display: flex;
  justify-content: center;
  padding: 10px 0 4px;
}

.sheet-grabber {
  width: 40px;
  height: 5px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.25);
}

.sheet-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-5);
  background: var(--bg-sheet);
  backdrop-filter: var(--blur-chrome);
  -webkit-backdrop-filter: var(--blur-chrome);
  border-bottom: 1px solid var(--border-hairline);
}

.sheet-title {
  font-size: var(--text-base);
  font-weight: 800;
}

.sheet-done-btn {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  color: var(--gss-orange-400);
  font-size: var(--text-sm);
  font-weight: 700;
}

.sheet-content {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.spotlight-banner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--bg-inset-box);
  border: 1px solid var(--border-hairline);
}

.spotlight-milestone {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: rgba(238, 107, 59, 0.12);
  border-left: 3px solid var(--gss-orange-500);
  font-size: var(--text-sm);
  color: var(--text-primary);
}

.spotlight-highlight-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-hairline);
}

.embed-frame-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border-hairline);
}

.embed-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.social-deeplink-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* Full-Screen 100dvh Gallery Lightbox Dialog */
.lightbox-dialog {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100dvh;
  margin: 0;
  padding: calc(var(--safe-top) + var(--space-3)) calc(var(--safe-right) + var(--space-4)) calc(var(--safe-bottom) + var(--space-4)) calc(var(--safe-left) + var(--space-4));
  background: rgba(6, 5, 18, 0.96);
  backdrop-filter: var(--blur-sheet);
  -webkit-backdrop-filter: var(--blur-sheet);
}

.lightbox-shell {
  width: 100%;
  height: 100%;
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-3);
}

.lightbox-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lightbox-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-elevated);
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(19, 18, 49, 0.8);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.lightbox-nav-btn--prev {
  left: 8px;
}

.lightbox-nav-btn--next {
  right: 8px;
}

.lightbox-caption-bar {
  background: rgba(19, 18, 49, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  color: #ffffff;
}

.lightbox-caption-bar p {
  color: rgba(235, 235, 245, 0.82) !important;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: calc(var(--tabbar-height) + var(--safe-bottom) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 90;
  background: rgba(23, 22, 60, 0.96);
  border: 1px solid var(--gss-orange-500);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 700;
  box-shadow: var(--shadow-elevated);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms var(--ease-ios), transform 200ms var(--ease-ios);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

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