/* Visual language aligned with codillin' / wiciędze.
   Rugby keeps its own layout: full-bleed hero, sections, timeline, archive. */

/* ── Loader ──────────────────────────────────────────────────────────────── */
#loader {
  position: fixed;
  inset: 0;
  background: var(--dark);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.25s ease;
}
html.loader-active { overflow: hidden; }
#loader-text { color: var(--muted); font-size: 0.95rem; }

.spinner-border {
  border-color: var(--primary) transparent var(--primary) transparent !important;
}

/* ── Design tokens (shared with codillin' / wiciędze) ─────────────────────── */
:root {
  --ink:          #060606;
  --gold:         #c4922a;
  --gold-2:       #a0522d;
  --gold-hover:   #d4a535;
  --muted:        #c4c4c4;
  --panel:        rgba(10, 10, 10, 0.95);
  --card:         #0d0d0d;
  --border:       rgba(255, 255, 255, 0.08);
  --border-quiet: rgba(255, 255, 255, 0.14);
  /* Aliases used through the rest of this sheet */
  --primary:      var(--gold);
  --primary-dim:  rgba(196, 146, 42, 0.18);
  --primary-glow: rgba(196, 146, 42, 0.25);
  --dark:         var(--ink);
  --surface:      #111111;
  --surface2:     var(--card);
  --surface3:     #151515;
  --light:        #e0e0e0;
  --border-hover: var(--border-quiet);
  /* Hub Poppins scale — clear steps, never collapse title into body */
  --fs-nav: clamp(1.2rem, 2.9vw, 1.55rem);
  --fs-page: clamp(1.8rem, 5vw, 2.8rem);
  --fs-section: clamp(1.25rem, 2.8vw, 1.5rem);
  --fs-subhead: clamp(1.15rem, 2.4vw, 1.28rem); /* card / account / block titles */
  --fs-body: 1.05rem;
  --fs-caption: 0.875rem;
  --fs-muted: clamp(1rem, 2.2vw, 1.15rem);
  --fs-lead: var(--fs-body);
  --measure: 920px;
  /* Kaushan: under-brand quote (×1.2 vs prior) */
  --fs-script-quote: clamp(1.44rem, 3vw, 1.68rem);
}

/* ── Base reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  overflow-x: hidden;
  scroll-behavior: smooth;
  background-color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

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

.skip-link.visually-hidden-focusable:not(:focus):not(:focus-within) {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link:focus {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  padding: 0.7rem 1.1rem;
  background: var(--gold);
  color: #fff;
  font-weight: 400;
  border: none;
  border-radius: 0 0 12px 0;
  clip: auto;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  text-decoration: none;
}

[id^="account-"], #afc-farewell { scroll-margin-top: 5.5rem; }

body {
  font-family: "Poppins", sans-serif;
  font-weight: 300;
  background: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #2d2d2d 100%);
  background-color: var(--ink);
  color: #e0e0e0;
  margin: 0;
  padding: 0;
  font-size: var(--fs-body);
  line-height: 1.65;
}

/* ── Back-to-top ────────────────────────────────────────────────────────────── */
#topBtn {
  display: none;
  flex-direction: row;
  position: fixed;
  bottom: 24px;
  right: 28px;
  z-index: 999;
  font-size: 16.5px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-quiet);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  border-radius: 8px;
  padding: 11px 14px;
  border-radius: 4px;
  font-family: inherit;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}
#topBtn:hover {
  color: #fff;
  background: rgba(196, 146, 42, 0.18);
  border-color: var(--gold);
  transform: translateY(-2px);
}

/* NAVBAR */

.navbar {
  background: transparent !important;
  box-shadow: none;
  border-bottom: none;
  backdrop-filter: none;
  transition: background 0.35s ease, box-shadow 0.35s ease;
  z-index: 1030;
  padding-top: 0;
  padding-bottom: 0;
  min-height: 56px;
}

.navbar .container-fluid,
.rugby-navbar-inner {
  align-items: center;
  min-height: 56px;
}

.rugby-navbar-inner {
  display: flex;
  flex-wrap: nowrap;
}

.navbar.scrolled {
  background: var(--panel) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--border), 0 4px 20px rgba(0,0,0,0.5);
}

.navbar-brand,
.rugby-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.35rem 0;
  line-height: 1;
  text-decoration: none;
}

.rugby-brand-mark {
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.45));
}

.rugby-brand-word {
  font-family: "Poppins", sans-serif;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: #fff;
  line-height: 1.1;
}

.navbar:not(.scrolled) .rugby-brand-mark {
  filter: drop-shadow(0 1px 10px rgba(0, 0, 0, 0.75));
}

.navbar:not(.scrolled) .rugby-brand-word {
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.75);
}

.rugby-lang-toolbar .lang-btn {
  text-shadow: none;
}

.navbar:not(.scrolled) .rugby-lang-toolbar .lang-btn {
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.75);
}

/* HERO */

.hero {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: #060606;
}

.hero-bg {
  position: absolute;
  left: 0;
  right: 0;
  top: -8vh;
  bottom: -8vh;
  background-image:
    linear-gradient(rgba(0,0,0,0.82), rgba(6,6,6,0.58)),
    url("../img/header.729c01565cdf.jpg");
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: 0;
  will-change: transform;
}

/* Grain overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.3;
  z-index: 1;
}

@media (max-width: 480px) {
  .hero-bg {
    background-image:
      linear-gradient(rgba(0,0,0,0.65), rgba(6,6,6,0.45)),
      url("../img/header_mob.729c01565cdf.jpg");
  }
  .hero {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }

  /* On mobile the scroll-hint sits absolute at 5% from bottom —
     nudge content up slightly so it reads centred visually */
  .hero-content {
    margin-bottom: 10vh;
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 1.1rem;
}

.hero-eyebrow {
  font-family: "Poppins", sans-serif;
  font-size: clamp(1.5rem, 3.12vw, 1.89rem);
  letter-spacing: 4.9px;
  text-transform: none;
  color: var(--gold);
  font-weight: 300;
  margin: 0 auto;
  opacity: 0;
  animation: fadeSlideUp 0.8s 0.7s ease forwards;
}

.hero h1 {
  font-family: "Poppins", sans-serif;
  font-size: clamp(2.05rem, 5vw, 3.4rem);
  font-weight: 300;
  letter-spacing: 1px;
  color: var(--gold);
  line-height: 1.22;
  margin-bottom: 1.2rem;
  opacity: 0;
  animation: fadeSlideUp 0.8s 0.45s ease forwards;
}

.hero-subtitle {
  font-family: "Kaushan Script", cursive;
  font-size: var(--fs-script-quote);
  font-weight: 400;
  font-style: normal;
  color: var(--muted);
  letter-spacing: 0.02em;
  max-width: 58.5rem;
  margin: 0 auto 1.79rem;
  opacity: 0;
  animation: fadeSlideUp 0.7s 0.2s ease forwards;
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 5%;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: fit-content;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  opacity: 0;
  animation: fadeSlideUp 0.8s 1.1s ease forwards;
}

.hero-scroll-hint span {
  font-size: 0.715rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.scroll-arrow {
  display: block;
  width: 22px;
  height: 22px;
  color: var(--primary);
  animation: bounceArrow 1.4s ease infinite;
}

@media (prefers-reduced-motion: reduce) {
  .hero-name,
  .hero-eyebrow,
  .hero h1,
  .hero-subtitle,
  .hero-scroll-hint,
  .scroll-arrow {
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
  }
  .hero-bg { transform: none !important; }
  .timeline::before { animation: none !important; }
}

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

@keyframes bounceArrow {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

/* SECTIONS — shared */

.page-section {
  padding: 5.5rem 0;
  background: transparent;
}

.page-section.bg-light {
  background: transparent !important;
}

main .page-section {
  padding: clamp(1.25rem, 4vw, 2.75rem) clamp(0.65rem, 3vw, 1.25rem);
}

main .page-section > .container {
  max-width: var(--measure);
  margin-left: auto;
  margin-right: auto;
  padding: clamp(1.75rem, 4vw, 2.75rem) clamp(1.25rem, 4vw, 1.85rem);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.page-section .container {
  padding-left: 1.65rem;
  padding-right: 1.65rem;
}

/* Section heading */
.page-section h2 {
  font-family: "Poppins", sans-serif;
  font-weight: 300;
  font-size: var(--fs-section);
  color: var(--gold);
  text-align: center;
  margin-bottom: 0;
  text-transform: none !important;
  letter-spacing: 2px;
}

.page-section h3,
.page-section h4,
.page-section h5,
.page-section .h5,
.page-section .h6 {
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  font-size: var(--fs-subhead);
  line-height: 1.35;
  letter-spacing: 0.5px;
  color: #fff;
}

/* Gold rule under section title — equal gap above/below the bar */
.page-section h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(45deg, var(--gold), var(--gold-2));
  margin: 14px auto 14px;
  border-radius: 2px;
}

.page-section .text-center.info > p,
.page-section .text-center.info > .rugby-lead {
  margin-top: 0;
}

.page-section h5.text-muted,
.page-section .text-muted {
  color: var(--muted) !important;
}

/* No italic anywhere — <em> tags render as normal weight */
em, i, .text-muted em, h5 em, p em {
  font-style: normal;
}

.info {
  margin-top: 1.65rem !important;
  margin-bottom: 2.2rem !important;
}

/* Sections stay visible if the animation library does not load. */

/* INFO SECTION  (#info) */

#info h3,
#info h4,
#info .h5 {
  color: #fff;
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  font-size: var(--fs-subhead);
  letter-spacing: 0.5px;
}
#info .text-muted { color: var(--muted) !important; font-weight: 300; }
#info .rugby-card { text-align: center; }
#info .rugby-card .text-muted { font-size: var(--fs-body); line-height: 1.65; }
#info strong { color: var(--gold); }

/* AFC glance cards — independent of legacy Bootstrap column overrides */
.glance-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 0;
}

@media (min-width: 768px) {
  .glance-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }
}

.glance-grid__item {
  min-width: 0;
}

#info .glance-grid .rugby-card {
  border-radius: 16px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

#info .glance-grid .rugby-card p {
  max-width: 65ch;
}

#info .glance-grid .rugby-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 0 0 1px rgba(196, 146, 42, 0.35),
    0 12px 28px rgba(0, 0, 0, 0.45);
  border-color: rgba(196, 146, 42, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  .card,
  #info .glance-grid .rugby-card {
    transition: none;
  }
  .card:hover,
  #info .glance-grid .rugby-card:hover {
    transform: none;
  }
}

.fa-stack .fa-circle { color: var(--primary) !important; }

/* MEDIA / CARDS  (#media) */

.card {
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  color: #e0e0e0 !important;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 0 0 1px rgba(196, 146, 42, 0.35),
    0 12px 28px rgba(0, 0, 0, 0.45);
  border-color: rgba(196, 146, 42, 0.35) !important;
}
.card .text-muted,
.card p.text-muted { color: var(--muted) !important; font-size: 0.95rem; font-weight: 300; }
.card .card-body {
  text-align: center;
}
.card .card-body > p:first-child {
  font-weight: 400;
  margin-bottom: 0.22rem;
  font-size: 1.05rem;
  letter-spacing: 0.4px;
  color: #fff;
}

/* Image zoom on card hover */
.card > img,
.card .img-fluid:not(.ratio *) {
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform-origin: center;
  display: block;
  width: 100%;
}
.card:hover > img,
.card:hover .img-fluid:not(.ratio *) {
  transform: scale(1.06);
}

.trace-card:hover .trace-open img {
  transform: none;
}

/* ── YouTube thumbnail card ─────────────────────────────────────────────────── */
.yt-thumb-link {
  display: block;
  text-decoration: none;
}

.yt-thumb-wrap {
  position: relative;
  overflow: hidden;
  background: #000;
}

.yt-thumb-img {
  display: block;
  width: 100%;
  transition: transform 0.4s ease, opacity 0.3s ease;
  opacity: 0.9;
}

.yt-thumb-link:hover .yt-thumb-img {
  transform: scale(1.05);
  opacity: 0.75;
}

.yt-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
  transition: transform 0.25s ease;
}

.yt-thumb-link:hover .yt-play-btn {
  transform: translate(-50%, -50%) scale(1.12);
}

/* ── Links inside about text ────────────────────────────────────────────────── */
.link-warning {
  color: var(--primary) !important;
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.link-warning:hover { color: var(--gold-hover) !important; }

/* TIMELINE  (#about) */

.timeline {
  position: relative;
  padding: 0;
  list-style: none;
}

.timeline::before {
  position: absolute;
  top: 0; bottom: 0;
  left: 40px;
  width: 2px;
  margin-left: -1px;
  content: '';
  background: linear-gradient(to bottom, var(--primary) 60%, transparent);
  opacity: 0;
  transform: scaleY(0);
  transform-origin: top center;
}

.timeline.line-visible::before {
  opacity: 0.4;
  transform: scaleY(1);
  transition: transform 1.6s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.5s ease;
}

.timeline > li {
  position: relative;
  min-height: 50px;
  margin-bottom: 50px;
}
.timeline > li::after,
.timeline > li::before { display: table; content: ' '; }
.timeline > li::after   { clear: both; }

.timeline > li .timeline-panel {
  position: relative;
  float: right;
  width: 100%;
  padding: 0 20px 0 100px;
  text-align: left;
}

/* ── Timeline circle ──────────────────────────────────────────────────────── */
.timeline > li .timeline-image {
  position: absolute;
  z-index: 100;
  left: 0;
  width: 80px;
  height: 80px;
  text-align: center;
  border: 3px solid var(--primary);
  border-radius: 50%;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 0 4px var(--primary-dim);
}

/* Final "Klub został rozwiązany" circle — white bg, dark text */
.timeline > li:last-child .timeline-image {
  background: #ffffff;
}

.timeline > li .timeline-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* "Klub został rozwiązany" text — Bootstrap .text-muted adds color !important so we must too */
.timeline > li .timeline-image h4,
.timeline > li .timeline-image .h4,
.timeline > li .timeline-image h4.text-muted,
.timeline > li .timeline-image h4.text-uppercase {
  font-family: "Poppins", sans-serif;
  font-size: 9.4px;
  line-height: 1.3;
  margin: 0;
  padding: 4px 5px;
  color: #000 !important;     /* !important beats Bootstrap's .text-muted */
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-align: center;
  word-break: break-word;
  hyphens: auto;
}

.timeline > li.timeline-inverted > .timeline-panel {
  float: right;
  padding: 0 20px 0 100px;
  text-align: left;
}

.timeline-heading h4 {
  color: var(--gold) !important;
  font-family: "Poppins", sans-serif;
  font-size: var(--fs-subhead);
  font-weight: 400;
  letter-spacing: 0.5px;
  margin-bottom: 0.44rem;
  text-transform: none !important;
}

.timeline-body p {
  color: var(--muted) !important;
  line-height: 1.65;
  font-size: 1.02rem;
  font-weight: 300;
  margin-bottom: 0;
}

/* Desktop timeline */
@media (min-width: 768px) {
  .timeline::before { left: 50%; }
  .timeline > li { min-height: 100px; margin-bottom: 100px; }
  .timeline > li .timeline-panel {
    float: left;
    width: 41%;
    padding: 0 20px 20px 30px;
    text-align: right;
  }
  .timeline > li .timeline-image {
    left: 50%;
    width: 100px;
    height: 100px;
    margin-left: -50px;
  }
  .timeline > li .timeline-image h4,
  .timeline > li .timeline-image .h4 { font-size: 10.5px; }
  .timeline > li.timeline-inverted > .timeline-panel {
    float: right;
    padding: 0 30px 20px 20px;
    text-align: left;
  }
}

@media (min-width: 992px) {
  .timeline > li { min-height: 150px; }
  .timeline > li .timeline-panel { padding: 0 20px 20px; }
  .timeline > li .timeline-image {
    width: 150px; height: 150px; margin-left: -75px;
  }
  .timeline > li .timeline-image h4,
  .timeline > li .timeline-image .h4 { font-size: 12.1px; }
  .timeline > li.timeline-inverted > .timeline-panel { padding: 0 20px 20px; }
}

@media (min-width: 1200px) {
  .timeline > li { min-height: 170px; }
  .timeline > li .timeline-panel { padding: 0 20px 20px 100px; }
  .timeline > li .timeline-image {
    width: 170px; height: 170px; margin-left: -85px;
  }
  .timeline > li .timeline-image h4,
  .timeline > li .timeline-image .h4 { font-size: 13.2px; }
  .timeline > li.timeline-inverted > .timeline-panel { padding: 0 100px 20px 20px; }
}

/* ACCORDION — archive  (#archive) */
.accordion {
  --bs-accordion-color:               var(--light);
  --bs-accordion-bg:                  var(--card);
  --bs-accordion-border-color:        var(--border);
  --bs-accordion-border-radius:       12px;
  --bs-accordion-inner-border-radius: 11px;
  --bs-accordion-btn-color:           #e0e0e0;
  --bs-accordion-btn-bg:              var(--card);
  --bs-accordion-btn-icon:            url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23e8e8e8'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
  --bs-accordion-btn-icon-transform:  rotate(-180deg);
  --bs-accordion-btn-active-icon:     url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23e8e8e8'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
  --bs-accordion-btn-focus-border-color: transparent;
  --bs-accordion-btn-focus-box-shadow:   none;
  --bs-accordion-active-color:        var(--gold);
  --bs-accordion-active-bg:           var(--card);
  --bs-accordion-body-padding-x:      1.65rem;
  --bs-accordion-body-padding-y:      1.21rem;
}

.accordion-item {
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  margin-bottom: 8px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

/* Subtle hover — no gold */
.accordion-item:hover {
  border-color: var(--border-hover) !important;
}

/* Hard-reset ALL pseudo-elements — kills gold bars from old style-g.css */
.accordion-item::before,
.accordion-item::after,
.accordion-button::before,
.accordion-button.btn-archive::before,
.accordion-button.btn-archive::after {
  display: none !important;
  content: none !important;
  background: none !important;
  border: none !important;
  height: 0 !important;
}

body .accordion-button,
body .accordion-button:not(.collapsed),
body .accordion-button:focus,
body .accordion-button:active {
  box-shadow: none !important;
  border-bottom: none !important;
  outline: none !important;
}

/* Also kill BS5's --bs-accordion-border-color bleed */
body .accordion-item .accordion-header .accordion-button:not(.collapsed) {
  box-shadow: none !important;
}

.accordion-button {
  background: var(--card) !important;
  color: #e0e0e0 !important;
  font-family: "Poppins", sans-serif !important;
  font-size: 1.02rem !important;
  font-weight: 400 !important;
  letter-spacing: 0.01em;
  padding: 1.1rem 1.375rem;
  border-radius: 12px !important;
  box-shadow: none !important;
  border: none !important;
}

.accordion-button:not(.collapsed) {
  background: var(--card) !important;
  color: var(--gold) !important;
  box-shadow: none !important;
}

.accordion-item:has(.accordion-button:not(.collapsed)) {
  border-color: rgba(196, 146, 42, 0.45) !important;
}

.accordion-button:focus {
  box-shadow: none !important;
  outline: none;
}

.accordion-button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: -3px;
}

.accordion-button::after {
  background-image: var(--bs-accordion-btn-icon) !important;
  flex-shrink: 0;
}
.accordion-button:not(.collapsed)::after {
  background-image: var(--bs-accordion-btn-active-icon) !important;
  transform: rotate(-180deg);
}

/* Strong tag inside accordion — kill any serif inheritance */
.accordion-button strong {
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  color: inherit;
}

.accordion-body {
  background: var(--card) !important;
  color: var(--muted);
  font-family: "Poppins", sans-serif;
  font-weight: 300;
  font-size: 1.02rem;
  line-height: 1.65;
  border-top: 1px solid var(--border);
}

/* Collapsed content panel background */
.accordion-collapse,
.accordion-collapse.collapse,
.accordion-collapse.collapsing {
  background: var(--dark) !important;
}

#archive .info h5 {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  color: var(--muted) !important;
}

/* FOOTER */

footer.footer {
  background: var(--panel) !important;
  color: var(--muted);
  text-align: center;
  padding: 36px 20px;
  border-top: 1px solid var(--border);
  font-weight: 300;
}

footer.footer.footer-photo {
  padding: 1.5rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--panel) !important;
}

footer.footer img {
  max-height: 128px;
  opacity: 0.65;
  margin-bottom: 1.1rem;
  filter: grayscale(20%);
}

footer.footer p {
  font-size: 0.957rem;
  margin-bottom: 0;
  color: var(--muted);
}

/* LANG SWITCHER */

.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 44px;
  min-height: 44px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 1px;
  padding: 0.22rem 0.55rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  line-height: 1;
}

.lang-btn:hover,
.lang-btn.active {
  color: #fff;
  border-color: var(--gold);
  background: rgba(196, 146, 42, 0.18);
}

/* FOCUS / ACCESSIBILITY */

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) { outline: none; }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 3px;
}

/* --- AFC Rugby refresh --- */

.hero-name {
  font-family: "Poppins", sans-serif;
  font-size: clamp(3rem, 8.4vw, 4.6rem);
  font-weight: 300;
  letter-spacing: 4.9px;
  text-transform: none;
  color: var(--gold);
  margin-bottom: 1.38rem;
  opacity: 0;
  animation: fadeSlideUp 0.7s 0.1s ease forwards;
}

@media (max-width: 767.98px) {
  .hero-content {
    width: 100%;
    max-width: 100%;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }

  .hero-name,
  .hero-eyebrow,
  .hero-subtitle {
    white-space: nowrap;
    max-width: 100%;
  }

  .hero-name,
  .hero-eyebrow {
    letter-spacing: clamp(1px, 0.35vw, 3.9px);
  }

  .hero-eyebrow {
    font-size: clamp(0.5rem, 2.52vw, 0.8rem);
  }

  .hero-name {
    font-size: clamp(1rem, 5.04vw, 1.6rem);
    margin-bottom: 0.85rem;
  }

  .hero-subtitle {
    font-size: clamp(0.792rem, 3.36vw, 1.14rem);
    max-width: none;
    margin-bottom: 0.75rem;
  }
}

.hero h1::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  margin: 14px auto 0;
  border-radius: 2px;
  background: linear-gradient(45deg, var(--gold), var(--gold-2));
}

a.hero-scroll-hint {
  text-decoration: none;
  color: inherit;
}

.rugby-scroll-section,
#rugby-basics,
#places,
#info,
#media,
#archive,
#site-origin {
  scroll-margin-top: 5.5rem;
}

.rugby-lead { max-width: 65ch; margin-left: auto; margin-right: auto; }

/* Narrative copy = body/lead. Captions stay on --fs-caption (meta, sources, media credits). */
.page-section .rugby-lead,
.page-section .rugby-lead > p,
.page-section .map-data-scope,
.page-section .text-center.info > p,
.account-body,
.farewell-quote,
#site-origin .container,
#site-origin .container p,
.map-card .map-card-body {
  font-size: var(--fs-lead);
  line-height: 1.65;
}

.page-section .rugby-lead > p {
  margin: 0 0 1.35rem;
}

.page-section .rugby-lead > p:last-child {
  margin-bottom: 0;
}

.page-section p.small,
.page-section .small.text-muted,
.page-section .text-muted.small,
.page-section ul.small,
.page-section .map-legend,
.account-dek-line,
.account-meta,
.map-card .map-card-city {
  font-size: var(--fs-caption);
  line-height: 1.55;
}

.page-section .map-data-scope {
  max-width: 65ch;
}

.account-card .account-title,
.account-title {
  font-size: var(--fs-subhead);
  line-height: 1.35;
  font-weight: 400;
  letter-spacing: 0.5px;
  color: #fff;
}

.rugby-links-label {
  color: var(--gold);
  letter-spacing: 1px;
  font-weight: 400;
}

.rugby-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
}

.rugby-links li {
  margin: 0;
}

.rugby-ext-btn {
  display: inline-block;
  min-height: 44px;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--gold);
  border-radius: 12px;
  color: var(--gold);
  font-weight: 500;
  text-decoration: none;
  background: rgba(10, 10, 10, 0.35);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.rugby-ext-btn:hover,
.rugby-ext-btn:focus-visible {
  color: var(--gold-hover);
  border-color: var(--gold-hover);
  background: rgba(196, 146, 42, 0.08);
  box-shadow: 0 0 0 1px rgba(196, 146, 42, 0.25);
}


.rugby-pitch-block {
  padding: 1.25rem 1.15rem 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.rugby-pitch-block > h3 {
  color: #fff;
  font-size: var(--fs-subhead);
  font-weight: 400;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
  text-align: center;
}

.rugby-pitch-block > p {
  text-align: center;
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
}

#rugby-pitch {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(196, 146, 42, 0.25);
  background: #0a0a0a;
  touch-action: manipulation;
}

#phase-heading {
  margin: 1.35rem 0 0.4rem;
  text-align: center;
  font-size: var(--fs-subhead);
  font-weight: 400;
  color: #fff;
}

#site-origin .container {
  text-align: center;
  max-width: 42rem;
}
#site-origin .container ul {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}
#site-origin .container li { margin: 0.35rem 0; }

.farewell-quote {
  border-left: 3px solid var(--gold);
  padding-left: 1rem;
  margin: 0;
  text-align: left;
}

.farewell-block {
  border-color: rgba(196, 146, 42, 0.5);
  box-shadow: 0 0 0 1px rgba(196, 146, 42, 0.22);
}

.rugby-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
}

.pitch-svg { width: 100%; height: auto; display: block; }
.pitch-hit,
.pitch-player { cursor: pointer; outline: none; }
.pitch-hit:focus-visible,
.pitch-player:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.pitch-player-hit { pointer-events: auto; }

.scoring-list .scoring-btn {
  width: 100%;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  color: #e8e8e8;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.5rem;
  border-radius: 12px;
  font-size: var(--fs-body);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.scoring-list .scoring-head {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.75rem;
  font-weight: 400;
  color: #fff;
}

.scoring-list .scoring-pts {
  flex-shrink: 0;
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--gold);
  line-height: 1;
}

.scoring-list .scoring-desc {
  display: block;
  margin-top: 0.4rem;
  font-size: var(--fs-body);
  font-weight: 300;
  color: var(--muted);
  line-height: 1.65;
}

.scoring-list .scoring-btn:hover,
.scoring-list .scoring-btn:focus-visible,
.scoring-list .scoring-btn.is-on {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(196, 146, 42, 0.25);
}
.scoring-list .scoring-btn.is-on {
  font-weight: 600;
}

#rugby-pitch .pitch-hit.is-on rect,
#rugby-pitch .pitch-hit.is-scoring rect {
  stroke: #e8d7a2;
  stroke-width: 3;
}

#rugby-pitch .pitch-hit.is-on.pitch-player circle {
  stroke: #fff;
  stroke-width: 2;
}

#rugby-pitch .pitch-hit.is-on[data-pitch-key="posts"] line,
#rugby-pitch .pitch-hit.is-scoring[data-pitch-key="posts"] line {
  stroke: #fff;
  stroke-width: 4;
}

@media (prefers-reduced-motion: reduce) {
  .scoring-list .scoring-btn {
    transition: none;
  }
}

.pitch-explainer {
  min-height: 3rem;
  color: var(--muted);
  font-size: var(--fs-body);
  line-height: 1.65;
  text-align: center;
}

.rugby-map-viewport {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #101114;
  touch-action: pan-y;
  height: min(62dvh, 560px);
  height: min(62vh, 560px);
}

.rugby-map-wrap .rugby-map-viewport {
  max-width: min(100%, 720px);
  margin-left: auto;
  margin-right: auto;
}
.rugby-map-viewport.is-zoomed {
  touch-action: none;
}

.rugby-map-stage {
  position: relative;
  width: 100%;
  transform-origin: 0 0;
  overflow: visible;
}

.rugby-map-base { width: 100%; height: auto; display: block; pointer-events: none; }

.map-marker {
  position: absolute;
  width: 44px;
  height: 44px;
  margin-left: -22px;
  margin-top: -22px;
  padding: 0;
  border: 0;
  background: transparent;
  z-index: 2;
  translate: 0 0;
  scale: 1;
  transform-origin: center center;
  overflow: visible;
  display: grid;
  place-items: center;
}

.map-marker-dot {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  pointer-events: none;
}

.map-marker-dot svg {
  display: block;
  overflow: visible;
  color: var(--gold);
}

.map-marker .mk-fill,
.map-marker .mk-ring,
.map-marker .mk-core,
.map-marker .mk-diamond { display: none; }
.map-marker .mk-fill,
.map-marker .mk-core { fill: currentColor; }
.map-marker .mk-ring { stroke: currentColor; fill: none; }
.map-marker .mk-diamond { fill: #e8d7a2; }

.map-marker--ekstraliga .mk-fill { display: inline; }
.map-marker--sevens .mk-ring { display: inline; }
.map-marker--both .mk-ring,
.map-marker--both .mk-core { display: inline; }
.map-marker--historic .mk-diamond,
.map-marker--archive .mk-diamond { display: inline; }

.map-marker:focus-visible .map-marker-dot svg,
.map-marker:hover .map-marker-dot svg,
.map-marker.is-active .map-marker-dot svg {
  color: #e8d7a2;
}

.map-marker-label {
  position: absolute;
  white-space: nowrap;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: #e6e6e6;
  text-shadow: 0 1px 2px #000;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease;
}

.map-marker:hover .map-marker-label,
.map-marker:focus-visible .map-marker-label,
.map-marker.is-active .map-marker-label {
  opacity: 1;
  visibility: visible;
}

.map-marker.is-clustered {
  z-index: 3;
}

.map-marker.is-filtered-out {
  opacity: 0.2;
  pointer-events: none;
}

.map-filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.map-btn.is-active {
  border-color: var(--gold);
  color: #fff;
  background: rgba(196, 146, 42, 0.15);
}

.map-club-section { margin-top: 1.25rem; }
.map-club-section h4 {
  font-size: 0.95rem;
  color: var(--gold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.65rem;
}


.map-marker-label--e { left: calc(50% + 10px); top: 50%; transform: translateY(-50%); }
.map-marker-label--w { right: calc(50% + 10px); left: auto; top: 50%; transform: translateY(-50%); }
.map-marker-label--s { left: 50%; top: calc(50% + 10px); transform: translateX(-50%); }
.map-marker-label--n { left: 50%; bottom: calc(50% + 10px); top: auto; transform: translateX(-50%); }

.map-tier {
  display: block;
  font-size: 0.75rem;
  color: var(--gold);
  font-weight: 400;
}

.rugby-map-wrap {
  position: relative;
  padding: 1rem 1rem 0.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.map-card {
  position: fixed;
  z-index: 1040;
  width: min(260px, calc(100vw - 24px));
  max-width: 260px;
  margin: 0;
  padding: 0.55rem 2rem 0.6rem 0.75rem;
  background: var(--card);
  border: 1px solid rgba(196, 146, 42, 0.45);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
}
.map-card .map-card-club {
  font-size: var(--fs-subhead);
  font-weight: 400;
  color: #fff;
  margin-bottom: 0.35rem !important;
}
.map-card .map-card-body { white-space: pre-line; line-height: 1.35; margin-bottom: 0.35rem; }
.map-card-close {
  position: absolute;
  top: 2px;
  right: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: none;
  background: none;
  color: var(--muted);
  font: inherit;
  line-height: 1;
  cursor: pointer;
}
.map-card-close:hover,
.map-card-close:focus-visible {
  color: var(--gold);
}
.map-card-close-icon {
  font-size: 1.75rem;
  font-weight: 300;
  line-height: 1;
}
.map-card-link-row { margin: 0; }
.map-data-note {
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.map-leaders {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 1;
}
.map-leaders line {
  stroke: rgba(232, 215, 162, 0.6);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}


.map-btn {
  font-size: 0.8rem;
  margin-right: 0.35rem;
  margin-bottom: 0.35rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
}

.map-btn:hover { border-color: var(--gold); color: #fff; }

.trace-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.trace-media {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #151515;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.trace-open {
  cursor: zoom-in;
  display: block;
  width: 100%;
  border-radius: 0;
  transition: box-shadow 0.2s ease;
}

.trace-open:hover,
.trace-open:focus-visible {
  box-shadow: inset 0 0 0 2px var(--gold);
}

.trace-open img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #151515;
}

.trace-card--video .yt-thumb-wrap {
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trace-card--video .yt-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.footer-photo-wrap {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 0;
  border-radius: 18px;
  overflow: hidden;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 10%, #000 90%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 18%, #000 82%, transparent 100%);
  mask-image:
    linear-gradient(to right, transparent 0%, #000 10%, #000 90%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 18%, #000 82%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

footer.footer.footer-photo .footer-photo-img {
  width: 100%;
  display: block;
  max-height: 128px;
  margin-bottom: 0;
  opacity: 0.42;
  filter: grayscale(0.65) contrast(0.95) brightness(0.92);
  border-radius: 18px;
  object-fit: cover;
}

.footer-photo-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  pointer-events: none;
  background: radial-gradient(
    ellipse 85% 90% at 50% 45%,
    rgba(6, 6, 6, 0.08) 0%,
    rgba(6, 6, 6, 0.28) 55%,
    rgba(6, 6, 6, 0.48) 100%
  );
}

.rugby-stage-note {
  width: 92%;
  max-width: var(--measure);
  margin: 1.15rem auto 0;
  padding: 0 1.25rem;
  text-align: center;
  box-sizing: border-box;
}

.rugby-stage-note p {
  font-family: "Poppins", sans-serif;
  font-size: var(--fs-caption);
  font-weight: 300;
  margin: 0 auto;
  max-width: min(52rem, 100%);
  line-height: 1.55;
  letter-spacing: 0.02em;
  color: rgba(196, 196, 196, 0.55);
  text-wrap: balance;
}
.account-card {
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.rugby-accounts .account-card:hover {
  transform: translateY(-3px);
  border-color: rgba(196, 146, 42, 0.35);
  box-shadow:
    0 0 0 1px rgba(196, 146, 42, 0.25),
    0 12px 28px rgba(0, 0, 0, 0.4);
}

.account-eyebrow {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.45rem;
}

.account-title {
  margin-bottom: 0.65rem;
}

/* Compact timeline — vertical axis, no legacy float/circle layout */
.timeline.timeline-compact {
  list-style: none;
  padding: 0;
  margin: 2rem auto 0;
  max-width: 44rem;
  position: relative;
}

.timeline.timeline-compact::before {
  left: 11px;
  width: 2px;
  margin-left: 0;
  opacity: 0.45;
  transform: none;
  background: linear-gradient(to bottom, var(--gold) 0%, rgba(196, 146, 42, 0.15) 100%);
}

.timeline.timeline-compact.line-visible::before {
  opacity: 0.45;
  transform: none;
}

.timeline.timeline-compact > li {
  position: relative;
  min-height: 0;
  margin-bottom: 1.35rem;
  padding-left: 2.15rem;
}

.timeline.timeline-compact > li::after {
  content: none;
  display: none;
}
.timeline.timeline-compact > li::before {
  display: block;
  content: '';
  clear: none;
}

.timeline.timeline-compact > li::before {
  position: absolute;
  left: 4px;
  top: 0.55rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--ink);
  box-shadow: 0 0 0 2px rgba(196, 146, 42, 0.28);
  z-index: 2;
}

.timeline.timeline-compact .timeline-panel {
  float: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: auto;
  padding: 1rem 1.15rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-align: left;
}
.timeline.timeline-compact .timeline-panel > * {
  flex: 0 0 auto;
  width: 100%;
  height: auto;
}

.timeline.timeline-compact .timeline-title {
  all: unset;
  display: block;
  color: var(--gold);
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
  margin: 0 0 0.35rem;
}

.timeline.timeline-compact #afc-farewell .timeline-panel {
  border-color: rgba(196, 146, 42, 0.5);
  box-shadow: 0 0 0 1px rgba(196, 146, 42, 0.22);
}

@media (min-width: 768px) {
  .timeline.timeline-compact::before { left: 11px; }
  .timeline.timeline-compact > li .timeline-panel,
  .timeline.timeline-compact > li.timeline-inverted > .timeline-panel {
    float: none;
    width: auto;
    padding: 1rem 1.15rem;
    text-align: left;
  }
}

#lb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.93);
  align-items: center;
  justify-content: center;
}

#lb-overlay.open { display: flex; }

#lb-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 92vw;
  max-height: 92vh;
}

#lb-img {
  max-width: 88vw;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 6px;
}

#lb-caption { margin-top: 0.75rem; color: rgba(232, 232, 232, 0.75); text-align: center; font-size: 0.9rem; }

#lb-close {
  position: fixed;
  top: 18px;
  right: 22px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}

#lb-prev, #lb-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  border-radius: 6px;
}

#lb-prev { left: 14px; }
#lb-next { right: 14px; }

@media (prefers-reduced-motion: reduce) {
  .rugby-map-stage { transition: none; }
  .scroll-arrow { animation: none; }
  .hero-bg { transform: none !important; }
}

.page-section a,
#archive a,
.rugby-link {
  color: var(--gold);
  text-underline-offset: 0.18em;
}
.page-section a:visited,
#archive a:visited,
.rugby-link:visited { color: var(--gold); }
.page-section a:hover,
#archive a:hover,
.rugby-link:hover { color: var(--gold-hover); }
.page-section a:active,
#archive a:active,
.rugby-link:active { color: var(--gold-hover); }
.page-section a:focus-visible,
#archive a:focus-visible,
.rugby-link:focus-visible {
  color: var(--gold-hover);
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
#rugby-basics .phase-nav-btn { min-height: 44px; min-width: 44px; }
#rugby-pitch .pitch-player circle { transition: cx 0.35s ease, cy 0.35s ease; }
#rugby-pitch .phase-mark { opacity: 0; transition: opacity 0.2s ease; }
#rugby-pitch .phase-mark.is-on { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  #rugby-pitch .pitch-player circle { transition: none; }
}

.year-rail, .phase-row, .phase-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.8rem 0 1rem;
  justify-content: center;
}
.year-btn, .phase-btn {
  min-height: 44px;
  padding: 0.4rem 0.75rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card);
  color: #e8e8e8;
  font: inherit;
}
.year-btn.is-active, .phase-btn.is-on {
  border-color: var(--gold);
  color: var(--gold);
}
#phase-steps .phase-btn.is-on {
  font-weight: 600;
}
.year-rail { width: 100%; }
@media (max-width: 767.98px) {
  .year-btn { flex: 1 1 auto; }
}
[data-year].is-dimmed { opacity: 0.38; }
.account-card.is-linked { box-shadow: 0 0 0 2px var(--gold); }
.account-dek { margin-bottom: 0.35rem; }
.account-place, .account-dek-line { display: block; }
.account-dek-line { color: var(--muted); font-size: 0.92rem; }

.phase-now {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.75rem;
  margin: 0.75rem 0 0.25rem;
  color: #fff;
  font-size: 1.15rem;
  text-align: center;
}
.phase-score { color: var(--gold); letter-spacing: 0.06em; min-height: 0; }
.phase-explainer { margin: 0 0 0.75rem; color: var(--muted); }
.phase-aside-label { margin: 0.35rem 0 0.25rem; }
.phase-row-aside .phase-btn { flex-basis: auto; background: transparent; }
.phase-row {
  overflow: visible;
  flex-wrap: wrap;
  scroll-snap-type: none;
}
#phase-steps .phase-btn {
  flex: 1 1 30%;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  text-align: center;
  line-height: 1.25;
}
.phase-btn-num {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--gold);
}
.phase-btn-label {
  display: block;
}
.phase-nav .phase-btn {
  flex: 0 1 auto;
}
.phase-mark { opacity: 0; stroke: #e8d7a2; stroke-width: 3; fill: none; }
.phase-mark.is-on { opacity: 1; }
#phase-scrum.is-on circle, #phase-maul.is-on circle, #phase-ball.is-on {
  fill: #c4922a; stroke: #fff; opacity: 1;
}
.pitch-player.is-on circle:not(.pitch-player-hit) { stroke: #fff; stroke-width: 3; }

.map-legend-swatches { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem 1.2rem; list-style: none; padding: 0.8rem 0 0; margin: 0; }
.map-legend-swatches li { display: flex; align-items: center; gap: 0.45rem; color: var(--muted); font-size: var(--fs-caption); }
.map-legend { text-align: center; }
.map-filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.map-legend-swatches .swatch {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--gold);
  overflow: visible;
}
@media (max-width: 767.98px) {
  main .page-section { padding: 0.85rem 0.5rem; }
  main .page-section > .container {
    padding: 1.35rem 1rem !important;
    border-radius: 18px;
  }
  .info { margin-top: 0 !important; margin-bottom: 1rem !important; }
  .page-section h2 {
    letter-spacing: 0;
    line-height: 1.25;
    font-size: clamp(1.2rem, 5vw, 1.4rem);
  }
  .map-marker-dot,
  .map-marker-dot svg {
    width: 28px;
    height: 28px;
  }
  .page-section h2::after { margin: 10px auto 10px; }
  .rugby-pitch-block { margin-top: 1.25rem !important; }
  .trace-rail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.75rem;
    overflow: visible;
    margin-left: 0;
    margin-right: 0;
  }
  .trace-rail > .col {
    width: auto !important;
    max-width: none;
    min-width: 0;
    padding: 0;
  }
  .trace-rail .trace-open,
  .trace-rail .trace-media,
  .trace-rail img {
    min-width: 0;
    max-width: 100%;
  }
  .trace-media, .trace-card--video .yt-thumb-wrap { aspect-ratio: 3 / 4; }
}
