/* ==========================================================================
   Rookies Cup Selection Game (rookies-cup.php, rookies-schedine.php)
   Tema "evento": blu notte (#0b1638 / #10204d / #1a2f6b), rosso #db0a40 per accenti
   (fondi con testo: #c8003a, contrasto con il bianco ≥ 5.9:1), oro #ffc906 per piccoli dettagli.
   Riga testuale che nomina la competizione + logo tipografico in CSS (nessun marchio
   o logo ufficiale imitato). Font: Saira Condensed (logo), Titillium Web (titoli/numeri). Caricato solo da queste due pagine
   (variabile $ATD_STYLES in inc/header.php). Header e footer restano quelli del sito.
   Mobile first: 360–420 px senza scroll orizzontale, target tocco ≥ 44 px.
   ========================================================================== */
.rk {
  --rk-red: #db0a40;        /* accenti grafici, bordi, barre */
  --rk-red-dark: #c8003a;   /* fondi con testo bianco (5.9:1) */
  --rk-red-deep: #9e002e;   /* hover / ombre */
  --rk-gold: #ffc906;       /* stelle, anno, numeri, filetti */
  --rk-ink: #070f29;        /* blu quasi nero: estrusioni, ombre */
  --rk-bg: #0b1638;
  --rk-bg-2: #10204d;
  --rk-blue: #1a2f6b;
  --rk-card: #12245a;
  --rk-line: rgba(255, 255, 255, 0.13);
  --rk-muted: rgba(255, 255, 255, 0.72);
  --rk-hit: #4ade80;
  --rk-radius: 10px;
  --rk-num: "Titillium Web", var(--font-display), sans-serif;
  display: block;
  overflow-x: clip;
  background: var(--rk-bg);
  color: #fff;
}

.rk .rk-ico {
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
}

.rk a {
  -webkit-tap-highlight-color: transparent;
}

/* ---------- Hero: logo tipografico, scie di velocità, scritta su banda rossa ---------- */
.rk-hero {
  position: relative;
  padding-top: 2rem;
  overflow: hidden;
  color: #fff;
  text-align: center;
  background:
    radial-gradient(520px 300px at 50% 46%, rgba(219, 10, 64, 0.34), transparent 70%),
    radial-gradient(1000px 520px at 50% -10%, rgba(42, 74, 160, 0.55), transparent 70%),
    radial-gradient(900px 420px at 50% 115%, rgba(219, 10, 64, 0.2), transparent 70%),
    linear-gradient(180deg, #081132 0%, #0b1638 55%, #10204d 100%);
}

/* scie di velocità come nell'illustrazione originale */
.rk-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(-12deg, transparent 46%, rgba(255, 255, 255, 0.22) 46.3%, transparent 46.8%),
    linear-gradient(-9deg, transparent 58%, rgba(255, 255, 255, 0.16) 58.2%, transparent 58.6%),
    linear-gradient(-15deg, transparent 70%, rgba(255, 201, 6, 0.16) 70.2%, transparent 70.5%),
    linear-gradient(168deg, transparent 38%, rgba(255, 255, 255, 0.16) 38.3%, transparent 38.8%),
    linear-gradient(171deg, transparent 62%, rgba(255, 201, 6, 0.12) 62.2%, transparent 62.6%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0 2px, transparent 2px 14px);
}

.rk-hero-caption {
  position: relative;
  padding: 0.5rem 0 2.25rem;
}

/* --- Riga testuale con il nome della competizione (uso descrittivo, non un logo) --- */
.rk-event {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  margin: 0 auto 1.35rem;
  max-width: 40rem;
  font-family: var(--rk-num);
  line-height: 1.15;
}

.rk-event-fan {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem 0.55rem;
  margin-bottom: 0.45rem;
  font-family: var(--font-sans, sans-serif);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.85);
}

.rk-event-tag {
  padding: 0.18rem 0.55rem 0.2rem;
  border-radius: 3px;
  background: var(--rk-gold);
  color: var(--rk-ink);
  font-family: var(--rk-num);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.rk-event-pre {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  padding-left: 0.3em;
  text-transform: uppercase;
}

.rk-event-name {
  position: relative;
  padding: 0 0.15em 0.4rem;
  color: #fff;
  font-size: clamp(1.15rem, 5.4vw, 1.9rem);
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-wrap: balance;
}

/* filetto rosso + oro sotto il nome */
.rk-event-name::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 4.5rem;
  height: 3px;
  transform: translateX(-50%) skewX(-30deg);
  background: linear-gradient(90deg, var(--rk-red) 0 62%, transparent 62% 70%, var(--rk-gold) 70%);
}

.rk-event-year {
  color: var(--rk-gold);
}

.rk-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 0 1rem;
  font-family: "Titillium Web", var(--font-display), sans-serif;
  font-weight: 900;
  line-height: 0.95;
  color: #fff;
}

/* --- Logo tipografico: kicker anno, ROOKIES a strati (adesivo/livrea), CUP con scie --- */
.rk-logo-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  margin-bottom: 0.15rem;
  font-family: "Saira Condensed", "Titillium Web", sans-serif;
  font-weight: 800;
  font-size: clamp(0.8rem, 3.4vw, 1.05rem);
  letter-spacing: 0.42em;
  padding-left: 0.42em; /* compensa la spaziatura finale */
  color: var(--rk-gold);
}

.rk-logo-star {
  color: var(--rk-gold);
  letter-spacing: 0;
  font-size: 0.9em;
}

.rk-logo-chk {
  width: 2.2em;
  height: 0.9em;
  background: repeating-conic-gradient(#fff 0 25%, transparent 0 50%) 0 0 / 0.45em 0.45em;
  transform: skewX(-18deg);
  opacity: 0.9;
}

.rk-logo-main {
  position: relative;
  display: block;
  font-family: "Saira Condensed", "Titillium Web", sans-serif;
  font-weight: 900;
  font-size: clamp(4rem, 24vw, 10rem);
  line-height: 0.92;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  padding: 0 0.12em;
  transform: skewX(-11deg);
  color: #fff;
  isolation: isolate;
}

/* strati dietro: bordo rosso + bordo bianco "adesivo" + estrusione scura */
.rk-logo-main::before,
.rk-logo-main::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  padding: inherit;
  pointer-events: none;
}

.rk-logo-main::before {
  z-index: -1;
  color: var(--rk-red);
  -webkit-text-stroke: 0.075em var(--rk-red);
}

.rk-logo-main::after {
  z-index: -2;
  color: #fff;
  -webkit-text-stroke: 0.15em #fff;
  text-shadow:
    0.04em 0.05em 0 var(--rk-ink),
    0.07em 0.09em 0 var(--rk-ink),
    0.1em 0.13em 0 var(--rk-red-deep),
    0 0.2em 0.5em rgba(3, 8, 26, 0.7);
  filter: drop-shadow(0 0 28px rgba(219, 10, 64, 0.4));
}

.rk-logo-cup {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
  width: min(100%, 34rem);
  margin-top: 0.32em;
  font-family: "Saira Condensed", "Titillium Web", sans-serif;
  font-weight: 900;
  font-size: clamp(1.6rem, 8vw, 3.6rem);
  line-height: 1;
}

/* scie di velocità ai lati di CUP */
.rk-logo-cup::before,
.rk-logo-cup::after {
  content: "";
  flex: 1 1 0;
  height: 0.62em;
  transform: skewX(-20deg);
  background:
    linear-gradient(#fff, #fff) 0 0 / 100% 0.1em no-repeat,
    linear-gradient(var(--rk-red), var(--rk-red)) 0 50% / 100% 0.14em no-repeat,
    linear-gradient(#fff, #fff) 0 100% / 100% 0.1em no-repeat;
}

.rk-logo-cup::before {
  -webkit-mask: linear-gradient(90deg, transparent, #000 70%);
  mask: linear-gradient(90deg, transparent, #000 70%);
}

.rk-logo-cup::after {
  -webkit-mask: linear-gradient(270deg, transparent, #000 70%);
  mask: linear-gradient(270deg, transparent, #000 70%);
}

.rk-logo-cup-t {
  padding: 0.02em 0.32em 0.06em 0.36em;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #fff;
  background: var(--rk-red);
  transform: skewX(-14deg);
  box-shadow: 0.12em 0.12em 0 var(--rk-ink), 0 0 24px rgba(219, 10, 64, 0.5);
  outline: 2px solid #fff;
  outline-offset: -0.14em;
}

/* entrata sobria */
@media (prefers-reduced-motion: no-preference) {
  .rk-logo-kicker { animation: rk-in-fade 0.6s ease-out both; }
  .rk-logo-main { animation: rk-in-slide 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.05s both; }
  .rk-logo-cup { animation: rk-in-fade 0.6s ease-out 0.35s both; }
  .rk-logo-l2 { animation: rk-in-band 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.5s both; }
}

@keyframes rk-in-slide {
  from { opacity: 0; transform: translateX(-12%) skewX(-24deg); filter: blur(4px); }
  to { opacity: 1; transform: skewX(-11deg); filter: none; }
}

@keyframes rk-in-fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@keyframes rk-in-band {
  from { opacity: 0; clip-path: inset(0 100% 0 0); }
  to { opacity: 1; clip-path: inset(0 0 0 0); }
}

.rk-logo-l2 {
  position: relative;
  display: inline-block;
  max-width: calc(100% - 1.5rem);
  margin-top: 0.75rem;
  padding: 0.14em 0.55em 0.2em;
  font-size: clamp(1.75rem, 8.5vw, 5.25rem);
  line-height: 1;
  font-style: italic;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  -webkit-text-stroke: 0.04em var(--rk-ink);
  paint-order: stroke fill;
  text-shadow: 0 4px 0 rgba(3, 8, 26, 0.55);
  isolation: isolate;
  overflow-wrap: anywhere;
}

/* fascia rossa inclinata dietro la scritta */
.rk-logo-l2::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, var(--rk-red-deep), var(--rk-red) 50%, var(--rk-red-deep));
  transform: skewX(-14deg);
  box-shadow: 0 12px 30px rgba(3, 8, 26, 0.55), 0 0 40px rgba(219, 10, 64, 0.45);
  border-left: 6px solid var(--rk-gold);
  border-right: 6px solid var(--rk-gold);
  border-bottom: 3px solid var(--rk-gold);
}

.rk-hero-sub {
  max-width: 36rem;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
  line-height: 1.55;
}

.rk-lang-hint {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.25rem 0.4rem;
  margin: 1.25rem 0 0;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.rk-lang {
  display: inline-flex;
  max-width: 100%;
  gap: 0.3rem;
  margin-top: 0.6rem;
  padding: 0.3rem;
  background: rgba(7, 15, 41, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.rk-lang a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0 0.7rem;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.rk-lang a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.rk-lang a.is-on {
  background: var(--rk-red-dark);
  box-shadow: inset 0 -2px 0 var(--rk-gold);
  color: #fff;
}

.rk-lang img {
  width: 20px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
}

/* striscia a scacchi */
.rk-hero-flag {
  position: relative;
  height: 14px;
  background: repeating-conic-gradient(#fff 0 25%, var(--rk-ink) 0 50%) 0 0 / 14px 14px;
  box-shadow: 0 -4px 0 var(--rk-red), 0 -6px 0 var(--rk-gold);
}

/* ---------- Corpo pagina scuro con texture e alone rosso ---------- */
.rk-section {
  padding: 2.5rem 0 3.5rem;
  color: #fff;
  background:
    radial-gradient(900px 400px at 85% 0%, rgba(219, 10, 64, 0.16), transparent 70%),
    radial-gradient(800px 600px at 0% 45%, rgba(26, 47, 107, 0.7), transparent 70%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.018) 0 2px, transparent 2px 14px),
    linear-gradient(180deg, var(--rk-bg) 0%, #0d1a42 100%);
}

.rk-intro {
  max-width: 760px;
  margin: 0 auto 2.25rem;
  text-align: center;
}

.rk-label {
  display: inline-block;
  margin-bottom: 0.25rem;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid var(--rk-red);
  color: var(--rk-gold);
  font-family: var(--rk-num);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.rk-title {
  margin: 0.25rem 0 1rem;
  color: #fff;
  font-family: var(--rk-num);
  font-size: clamp(1.9rem, 7vw, 3.25rem);
  font-weight: 900;
  font-style: italic;
  line-height: 1.05;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.rk-lead {
  margin: 0 0 1.75rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
  line-height: 1.6;
}

.rk-lead strong {
  color: #fff;
}

.rk-steps {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem 1.75rem;
  max-width: 22rem;
  margin: 0 auto 2rem;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
}

.rk-steps li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rk-steps span {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  background: var(--rk-red-dark);
  box-shadow: 3px 3px 0 var(--rk-gold);
  font-family: var(--rk-num);
  font-weight: 900;
  transform: skewX(-12deg);
}

.rk-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 480px;
  margin: 0 auto 1.5rem;
  border: 1px solid var(--rk-line);
  border-top: 3px solid var(--rk-red);
  border-radius: var(--rk-radius);
  background: linear-gradient(180deg, rgba(26, 47, 107, 0.75), rgba(16, 32, 77, 0.75));
}

.rk-stats div {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0.9rem 0.4rem;
}

.rk-stats div + div {
  border-left: 1px solid var(--rk-line);
}

.rk-stats strong {
  color: var(--rk-gold);
  font-family: var(--rk-num);
  font-size: 2rem;
  font-weight: 900;
  font-style: italic;
  line-height: 1;
}

.rk-stats span {
  margin-top: 0.35rem;
  color: var(--rk-muted);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

/* Pulsante "Guarda tutte le schedine" */
.rk-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 100%;
  margin-top: 0.5rem;
  padding: 0.8rem 0.8rem 0.8rem 0.8rem;
  text-align: left;
  text-decoration: none;
  color: var(--rk-bg);
  background: #fff;
  border-radius: var(--rk-radius);
  box-shadow: 0 0 0 0 rgba(219, 10, 64, 0.6), 0 14px 34px rgba(3, 8, 26, 0.5);
  animation: rk-pulse 2.4s ease-out infinite;
  transition: transform 0.2s ease;
}

.rk-cta:hover {
  color: var(--rk-bg);
  transform: translateY(-3px);
}

.rk-cta-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: var(--rk-red-dark);
  color: #fff;
  transform: skewX(-10deg);
}

.rk-cta-icon .rk-ico {
  transform: skewX(10deg);
}

.rk-cta-txt {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.rk-cta-txt strong {
  font-family: var(--rk-num);
  font-size: 1.05rem;
  font-weight: 900;
  font-style: italic;
  line-height: 1.1;
  text-transform: uppercase;
}

.rk-cta-txt small {
  margin-top: 0.2rem;
  color: #45507a;
  font-size: 0.78rem;
}

.rk-cta-arrow {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  margin-left: 0.25rem;
  border-radius: 50%;
  background: var(--rk-bg);
  color: #fff;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rk-cta:hover .rk-cta-arrow {
  background: var(--rk-red-dark);
  transform: translateX(4px);
}

@keyframes rk-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(219, 10, 64, 0.6), 0 14px 34px rgba(3, 8, 26, 0.5); }
  70%  { box-shadow: 0 0 0 16px rgba(219, 10, 64, 0), 0 14px 34px rgba(3, 8, 26, 0.5); }
  100% { box-shadow: 0 0 0 0 rgba(219, 10, 64, 0), 0 14px 34px rgba(3, 8, 26, 0.5); }
}

@media (prefers-reduced-motion: reduce) {
  .rk-cta {
    animation: none;
  }
}

.rk-bottom-cta {
  margin-top: 2.5rem;
  text-align: center;
}

/* Pulsanti principali: rosso scuro (testo bianco 5.9:1) con filetto oro */
.rk .rk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 52px;
  padding: 0.75rem 1.5rem;
  border: 0;
  border-radius: var(--rk-radius);
  background: linear-gradient(180deg, var(--rk-red) 0%, var(--rk-red-dark) 55%);
  background-color: var(--rk-red-dark);
  color: #fff;
  font-family: var(--rk-num);
  font-size: 1.05rem;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.04em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: inset 0 -3px 0 var(--rk-gold), 0 10px 24px rgba(219, 10, 64, 0.3);
}

.rk .rk-btn:hover {
  background: var(--rk-red-deep);
  color: #fff;
}

.rk .rk-btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.rk-btn-play {
  max-width: 100%;
  margin-top: 0.5rem;
}

/* Layout due colonne (desktop) / una colonna (mobile) */
.rk-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}

.rk-main,
.rk-side {
  min-width: 0;
}

/* ---------- Toolbar ---------- */
.rk-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.rk-search {
  flex: 1 1 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  padding: 0 1rem;
  background: var(--rk-card);
  border: 1px solid var(--rk-line);
  border-radius: var(--rk-radius);
  color: var(--rk-muted);
  transition: border-color 0.2s ease;
}

.rk-search:focus-within {
  border-color: var(--rk-red);
}

.rk-search input,
.rk-search input:focus {
  flex: 1;
  min-width: 0;
  height: 50px;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 1rem;
}

.rk-search input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.rk-search--find {
  margin-bottom: 1rem;
}

.rk-select {
  flex: 1 1 100%;
  min-width: 0;
  height: 50px;
  padding: 0 1rem;
  background: var(--rk-card);
  border: 1px solid var(--rk-line);
  border-radius: var(--rk-radius);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  color-scheme: dark;
  outline: none;
}

.rk-select:focus {
  border-color: var(--rk-red);
}

.rk-mine {
  flex: 1 1 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  height: 50px;
  padding: 0 1rem;
  background: var(--rk-card);
  border: 1px solid var(--rk-line);
  border-radius: var(--rk-radius);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.rk-mine span {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.8rem;
}

.rk-mine[aria-pressed="true"] {
  background: var(--rk-red-dark);
  border-color: var(--rk-red-dark);
}

.rk-mine[aria-pressed="true"] span {
  background: #fff;
  color: var(--rk-red-dark);
}

.rk-count {
  margin: 0 0 1rem;
  color: var(--rk-muted);
  font-size: 0.85rem;
}

.rk-empty {
  padding: 2rem 0;
  color: var(--rk-muted);
  text-align: center;
}

/* ---------- Card pilota (100+ piloti: 2 per riga su mobile) ---------- */
.rk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.rk-card {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0.65rem 0.7rem;
  text-align: left;
  color: #fff;
  font: inherit;
  background: linear-gradient(160deg, #162b68 0%, var(--rk-card) 60%, #0f1f4e 100%);
  border: 1px solid var(--rk-line);
  border-radius: var(--rk-radius);
  overflow: hidden;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.rk-card[hidden] {
  display: none;
}

.rk-card:focus-visible {
  outline: 2px solid var(--rk-gold);
  outline-offset: 2px;
}

.rk-card.is-on {
  background: linear-gradient(110deg, #8a0a3a 0%, #4a1250 45%, #1a2a66 100%);
  border-color: var(--rk-red);
  box-shadow: inset 0 -3px 0 var(--rk-gold), 0 8px 22px rgba(219, 10, 64, 0.25);
}

.rk-card.is-full {
  opacity: 0.45;
}

.rk-card.is-dt::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--rk-gold);
}

.rk-flag {
  flex-shrink: 0;
  width: 28px;
  height: 21px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.rk-card-txt {
  order: 3;
  display: flex;
  flex-direction: column;
  flex: 1 1 100%;
  min-width: 0;
  line-height: 1.2;
}

.rk-card-nome {
  color: var(--rk-muted);
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rk-card-cognome {
  font-family: var(--rk-num);
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rk-card-naz {
  margin-top: 0.15rem;
  color: var(--rk-muted);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.rk-card-naz em {
  color: var(--rk-gold);
  font-style: normal;
  font-weight: 700;
}

.rk-card-check {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin-left: auto;
  border: 1px solid var(--rk-line);
  border-radius: 50%;
  color: var(--rk-muted);
  font-family: var(--rk-num);
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.rk-card-check .rk-ico {
  width: 14px;
  height: 14px;
}

.rk-card.is-on .rk-card-check {
  background: var(--rk-gold);
  border-color: var(--rk-gold);
  color: var(--rk-ink);
  font-weight: 900;
  font-size: 1rem;
}

@media (hover: hover) and (pointer: fine) {
  .rk-card:hover {
    border-color: rgba(219, 10, 64, 0.7);
    transform: translateY(-2px);
  }
}

/* ---------- Schedina ---------- */
.rk-ticket {
  scroll-margin-top: calc(var(--nav-height) + 1rem);
  background: #fff;
  color: #111;
  border-radius: var(--rk-radius);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.rk-ticket-head {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 1.1rem 1.25rem 1.5rem;
  background: linear-gradient(100deg, var(--rk-red-dark) 0%, var(--rk-red-deep) 100%);
  color: #fff;
  font-family: var(--rk-num);
  font-size: 1.35rem;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
}

.rk-ticket-head::after,
.rk-sheet-head::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 10px;
  background: repeating-conic-gradient(var(--rk-ink) 0 25%, #fff 0 50%) 0 0 / 10px 10px;
}

.rk-ticket-body {
  padding: 1.25rem;
}

.rk-ticket-body[hidden] {
  display: none;
}

.rk-slots {
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
}

.rk-slots li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0.2rem 0;
  border-bottom: 1px dashed #d6d6d6;
  font-size: 0.95rem;
}

.rk-slots .n {
  width: 22px;
  flex-shrink: 0;
  color: #aaa;
  font-family: var(--rk-num);
  font-weight: 800;
}

.rk-slots .t {
  flex: 1;
  min-width: 0;
  color: #bbb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rk-slots li.is-on .n {
  color: var(--rk-red);
}

.rk-slots li.is-on .t {
  color: #111;
  font-weight: 700;
}

.rk-slots img {
  flex-shrink: 0;
  width: 24px;
  height: 18px;
  object-fit: cover;
  border-radius: 2px;
}

.rk-slots button {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  margin-right: -0.6rem;
  padding: 0;
  border: 0;
  background: none;
  color: #999;
  cursor: pointer;
}

.rk-slots button:hover {
  color: var(--rk-red);
}

.rk-field-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.rk-ticket .rk-input,
.rk-ticket .rk-input:focus {
  display: block;
  width: 100%;
  height: 52px;
  padding: 0 1rem;
  background: #fff;
  color: #111;
  -webkit-text-fill-color: #111;
  caret-color: var(--rk-red);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid #111;
  border-radius: var(--rk-radius);
  box-shadow: none;
  outline: none;
}

.rk-ticket .rk-input:focus {
  border-color: var(--rk-red);
  box-shadow: 0 0 0 3px rgba(255, 201, 6, 0.25);
}

.rk-ticket .rk-input::placeholder {
  color: #999;
  -webkit-text-fill-color: #999;
  font-weight: 400;
}

.rk-ticket .rk-input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 100px #fff inset;
  -webkit-text-fill-color: #111;
}

.rk-ticket .rk-btn {
  display: flex;
  width: 100%;
}

.rk-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.rk-msg {
  min-height: 1.4em;
  margin: 0.6rem 0;
  color: #555;
  font-size: 0.85rem;
}

.rk-msg.is-error {
  color: #c0151b;
  font-weight: 600;
}

.rk-note {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0.9rem 0 0;
  color: #777;
  font-size: 0.75rem;
  line-height: 1.45;
  text-align: left;
}

.rk-note .rk-ico {
  margin-top: 0.1rem;
}

.rk-note a {
  color: #111;
  font-weight: 600;
  text-decoration: underline;
}

.rk-note a:hover {
  color: var(--rk-red);
}

.rk-note--page {
  justify-content: center;
  max-width: 640px;
  margin: 2.5rem auto 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.85rem;
}

.rk-note--page a {
  color: #fff;
}

.rk-done {
  padding: 2rem 1.25rem;
  text-align: center;
}

.rk-done > .rk-ico {
  margin-bottom: 0.75rem;
  color: var(--rk-red);
}

.rk-done-title {
  margin: 0 0 0.25rem;
  font-family: var(--rk-num);
  font-size: 1.6rem;
  font-weight: 900;
  font-style: italic;
  line-height: 1.1;
  text-transform: uppercase;
}

.rk-done-sub {
  margin: 0 0 1.25rem;
  color: #555;
}

.rk-again {
  min-height: 44px;
  margin-top: 0.5rem;
  padding: 0 1rem;
  border: 0;
  background: none;
  color: #111;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

/* ---------- Barra fissa mobile (sopra la tabbar del sito) ---------- */
.rk-mobilebar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 70;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  min-height: 52px;
  padding: 0.75rem 1rem;
  background: linear-gradient(100deg, var(--rk-red-dark) 0%, var(--rk-red-deep) 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: var(--rk-radius);
  box-shadow: inset 0 -3px 0 var(--rk-gold), 0 10px 30px rgba(3, 8, 26, 0.6);
}

.rk-mobilebar:hover {
  color: #fff;
}

.rk-mobilebar strong {
  font-family: var(--rk-num);
  font-size: 1.15rem;
  font-weight: 900;
}

.rk-mobilebar[hidden] {
  display: none;
}

.rk-mobilebar-go {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  font-family: var(--rk-num);
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
}

@media (max-width: 899px) {
  .rk-mobilebar {
    bottom: calc(64px + env(safe-area-inset-bottom) + 10px);
  }
}

/* spazio per la barra mobile sotto i contenuti */
.rk-section:has(.rk-mobilebar) {
  padding-bottom: 7rem;
}

/* ---------- Gioco chiuso / disclaimer ---------- */
.rk-closed {
  padding: 3rem 1rem;
  border: 1px dashed var(--rk-line);
  border-radius: var(--rk-radius);
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
}

.rk-closed > .rk-ico {
  display: block;
  margin: 0 auto 1rem;
  color: var(--rk-red);
}

.rk-disclaimer {
  margin: 3rem 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.75rem;
  text-align: center;
}

/* ---------- Pagina schedine ---------- */
.rk-panel {
  padding: 1.25rem;
  background: linear-gradient(180deg, #162b68 0%, var(--rk-card) 100%);
  border-top: 3px solid var(--rk-red);
  border: 1px solid var(--rk-line);
  border-radius: var(--rk-radius);
}

.rk-panel-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rk-bars {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rk-bars li {
  margin-bottom: 0.9rem;
}

.rk-bar-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.rk-bar-row img {
  flex-shrink: 0;
  width: 22px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
}

.rk-bar-row .t {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rk-bar-row .v {
  color: var(--rk-gold);
  font-family: var(--rk-num);
  font-weight: 800;
}

.rk-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
}

.rk-bar span {
  display: block;
  height: 100%;
  background: var(--rk-red);
  transform: skewX(-20deg);
  transform-origin: left;
}

.rk-bars li.is-hit .t {
  color: var(--rk-hit);
  font-weight: 700;
}

.rk-results {
  margin-bottom: 1.5rem;
  border-color: rgba(74, 222, 128, 0.4);
}

.rk-results .rk-panel-title .rk-ico {
  color: var(--rk-hit);
}

.rk-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rk-chips li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  background: rgba(74, 222, 128, 0.12);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
}

.rk-chips img {
  width: 20px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
}

.rk-tickets {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.rk-sheet {
  scroll-margin-top: calc(var(--nav-height) + 1rem);
  background: #fff;
  color: #111;
  border-radius: var(--rk-radius);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rk-sheet[hidden] {
  display: none;
}

.rk-sheet:target {
  box-shadow: 0 0 0 3px var(--rk-gold), 0 14px 30px rgba(219, 10, 64, 0.35);
}

@media (hover: hover) and (pointer: fine) {
  .rk-sheet:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(3, 8, 26, 0.55);
  }
}

.rk-sheet-head {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.85rem 1rem 1.25rem;
  background: linear-gradient(100deg, var(--rk-bg) 0%, var(--rk-blue) 100%);
  color: #fff;
}

.rk-sheet-head::after {
  height: 8px;
  background: repeating-conic-gradient(var(--rk-red) 0 25%, var(--rk-ink) 0 50%) 0 0 / 8px 8px;
}

/* nomi lunghi vanno a capo invece di essere tagliati */
.rk-sheet-nome {
  flex: 1;
  min-width: 0;
  font-family: var(--rk-num);
  font-size: 1.2rem;
  font-weight: 900;
  font-style: italic;
  line-height: 1.1;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.rk-sheet-data {
  flex-shrink: 0;
  margin-top: 0.25rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.75rem;
}

.rk-sheet-pos {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  min-width: 28px;
  height: 28px;
  background: var(--rk-red-dark);
  font-family: var(--rk-num);
  font-weight: 800;
  transform: skewX(-12deg);
}

.rk-sheet-punti {
  flex-shrink: 0;
  color: var(--rk-hit);
  font-family: var(--rk-num);
  font-size: 1.3rem;
  font-weight: 900;
}

.rk-sheet-punti small {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.7rem;
}

.rk-sheet-list {
  margin: 0;
  padding: 0.5rem 1rem 0.75rem;
  list-style: none;
}

.rk-sheet-list li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0;
  border-bottom: 1px dashed #e2e2e2;
  font-size: 0.9rem;
}

.rk-sheet-list li:last-child {
  border-bottom: 0;
}

.rk-sheet-list .n {
  width: 18px;
  flex-shrink: 0;
  color: var(--rk-red-dark);
  font-family: var(--rk-num);
  font-weight: 800;
}

.rk-sheet-list img {
  flex-shrink: 0;
  width: 22px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
}

.rk-sheet-list .t {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rk-sheet-list li.is-hit {
  background: rgba(74, 222, 128, 0.15);
}

.rk-sheet-list li .rk-ico {
  color: #16a34a;
}

/* ---------- Breakpoint ---------- */
@media (max-width: 359px) {
  .rk-lang a {
    padding: 0 0.5rem;
    font-size: 0.75rem;
  }
}

@media (min-width: 576px) {
  .rk-hero {
    padding-top: 2.5rem;
  }

  .rk-hero-sub {
    font-size: 1.05rem;
  }

  .rk-steps {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    max-width: none;
  }

  .rk-stats span {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
  }

  .rk-cta {
    gap: 1rem;
    padding: 0.9rem 1rem 0.9rem 0.9rem;
  }

  .rk-cta-icon {
    width: 52px;
    height: 52px;
  }

  .rk-cta-txt strong {
    font-size: 1.25rem;
  }

  .rk-cta-txt small {
    font-size: 0.85rem;
  }

  .rk-grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 0.75rem;
  }

  .rk-card {
    flex-wrap: nowrap;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
  }

  .rk-flag {
    width: 40px;
    height: 30px;
  }

  .rk-card-txt {
    order: 0;
    flex: 1 1 auto;
  }

  .rk-card-nome {
    font-size: 0.8rem;
  }

  .rk-card-cognome {
    font-size: 1.1rem;
  }

  .rk-card-naz {
    font-size: 0.72rem;
  }

  .rk-card-check {
    width: 34px;
    height: 34px;
  }

  .rk-search {
    flex: 1 1 240px;
  }

  .rk-select {
    flex: 0 1 220px;
  }

  .rk-mine {
    flex: 0 0 auto;
  }

  .rk-tickets {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }

  .rk-panel {
    padding: 1.5rem;
  }
}

@media (min-width: 992px) {
  .rk-hero {
    padding-top: 3rem;
  }

  .rk-section,
  .rk-section:has(.rk-mobilebar) {
    padding: 4rem 0 5rem;
  }

  .rk-layout {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    align-items: start;
  }

  .rk-layout--list .rk-side {
    order: 2;
  }

  .rk-layout--list .rk-main {
    order: 1;
  }

  .rk-ticket,
  .rk-top {
    position: sticky;
    top: calc(var(--nav-height) + 1.25rem);
  }

  .rk-ticket {
    max-height: calc(100vh - var(--nav-height) - 2.5rem);
    overflow-y: auto;
  }

  .rk-mobilebar {
    display: none !important;
  }
}

/* =====================================================================
   Tema blu notte integrale per le pagine del gioco (body.theme-rk):
   intestazione, schedina e barra in basso coordinate con le sezioni.
   ===================================================================== */
body.theme-rk {
  background: #0b1638;
}

body.theme-rk .site-nav {
  background: rgba(8, 17, 50, 0.9);
  border-bottom-color: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 -2px 0 #db0a40;
}

body.theme-rk .site-nav .logo-img {
  content: url("../image/whereride-logo-white.svg");
}

body.theme-rk .nav-links a:not(.btn) {
  color: rgba(255, 255, 255, 0.8);
}

body.theme-rk .nav-links a:not(.btn):hover,
body.theme-rk .nav-links a[aria-current="page"]:not(.btn) {
  color: #fff;
}

body.theme-rk .nav-links a[aria-current="page"]:not(.btn) {
  box-shadow: inset 0 -2px 0 #ffc906;
}

body.theme-rk .tabbar {
  background: rgba(8, 17, 50, 0.94);
  border-top-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 -8px 24px rgba(3, 8, 26, 0.5);
}

body.theme-rk .tabbar a,
body.theme-rk .tabbar button {
  color: rgba(255, 255, 255, 0.72);
}

body.theme-rk .tabbar a[aria-current="page"] {
  color: #ffc906;
}

body.theme-rk .tabbar a[aria-current="page"]::before {
  background: #ffc906;
}

/* schedina blu notte con texture */
.rk-ticket {
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.022) 0 2px, transparent 2px 12px),
    linear-gradient(180deg, #13275f 0%, var(--rk-bg-2) 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 20px 50px rgba(3, 8, 26, 0.6);
}

.rk-slots li {
  border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
}

.rk-slots .n {
  color: rgba(255, 255, 255, 0.5);
}

.rk-slots .t {
  color: rgba(255, 255, 255, 0.5);
}

.rk-slots li.is-on .n {
  color: var(--rk-gold);
}

.rk-slots li.is-on .t {
  color: #fff;
}

.rk-slots li.is-on {
  background: linear-gradient(90deg, rgba(219, 10, 64, 0.22), transparent 75%);
}

.rk-slots button {
  color: rgba(255, 255, 255, 0.45);
}

.rk-field-label {
  color: rgba(255, 255, 255, 0.8);
}

.rk-ticket .rk-input,
.rk-ticket .rk-input:focus {
  background: var(--rk-bg);
  color: #fff;
  -webkit-text-fill-color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.22);
}

.rk-ticket .rk-input:focus {
  border-color: var(--rk-gold);
}

.rk-ticket .rk-input::placeholder {
  color: rgba(255, 255, 255, 0.55);
  -webkit-text-fill-color: rgba(255, 255, 255, 0.55);
}

.rk-ticket .rk-input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 100px #0b1638 inset;
  -webkit-text-fill-color: #fff;
}

.rk .rk-ticket .rk-btn[disabled] {
  background: rgba(219, 10, 64, 0.22) !important;
  color: rgba(255, 255, 255, 0.6) !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.rk-msg {
  color: rgba(255, 255, 255, 0.75);
}

.rk-msg.is-error {
  color: #ff6b6f;
}

.rk-note {
  color: rgba(255, 255, 255, 0.72);
}

.rk-note a {
  color: #fff;
}

/* piè di pagina del sito in blu quasi nero, coerente con le sezioni */
body.theme-rk .site-footer {
  background: #070f29;
  border-top: 3px solid #db0a40;
}
