/* =========================================================
   PACEHELPER — FINAL style.css
   (consistent card sizing + page-specific overrides)
========================================================= */

/* ---------- HARDEN BACKGROUND (prevents white pages) ---------- */
html {
  min-height: 100%;
  background: linear-gradient(135deg, #001b38, #800000);
  scroll-behavior: smooth;
}

body {
  font-family: Arial, sans-serif;
  background: linear-gradient(135deg, #001b38, #800000);
  color: white;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* ---------- Container (navbar safe area) ---------- */
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  padding-top: 120px; /* navbar spacing */
  width: 100%;
  box-sizing: border-box;
}

/* =========================================================
   NAVBAR
========================================================= */
.navbar {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background-color: #cde7ff;
  padding: 12px;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  border-bottom: 2px solid #4da3ff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
}

.navbar a {
  margin: 0;
  text-decoration: none;
  color: #0a2540;
  font-weight: bold;
  font-size: 18px;
  padding: 8px 20px;
  border-radius: 25px;
  background-color: #e3f2ff;
  transition: 0.3s;
  white-space: nowrap;
}

.navbar a:hover {
  background-color: #4da3ff;
  color: white;
}

.navbar a.active {
  background-color: #4da3ff;
  color: white;
}

@media (max-width: 520px) {
  .navbar a {
    font-size: 15px;
    padding: 7px 14px;
  }
}

/* =========================================================
   BASE CARDS (consistent sizing)
========================================================= */
.card {
  background: #ffffff15;
  border: 2px solid #4da3ff;
  border-radius: 20px;
  padding: 24px 28px 30px;
  width: 100%;
  max-width: 420px; /* main “standard card” size */
  box-sizing: border-box;
  backdrop-filter: blur(10px);
  box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.3);
  margin: 40px auto;
  text-align: center;
}

.results-card {
  background: #ffffff15;
  border: 2px solid #4da3ff;
  border-radius: 18px;
  padding: 18px;
  width: 100%;
  max-width: 420px; /* matches .card */
  box-sizing: border-box;
  backdrop-filter: blur(10px);
  box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.3);
  margin: 16px auto 0;
  text-align: left;
}

/* If you ever have <div id="results" class="results-card"> */
#results.results-card {
  max-width: 420px;
  margin: 16px auto 0;
}

/* Titles */
.card h1 {
  margin-bottom: 20px;
  color: #ffffff;
}

.results-card h2 {
  color: #cce7ff;
  margin-bottom: 10px;
}

.results-card p {
  color: #cce7ff;
  margin: 5px 0;
}

/* =========================================================
   FORMS + INPUTS
========================================================= */
label {
  font-size: 16px;
  color: #ffffff;
}

input,
select,
textarea {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #4da3ff;
  margin-top: 5px;
  margin-bottom: 15px;
  background: #ffffff20;
  color: white !important;
  font-size: 16px;
  box-sizing: border-box;
}

input::placeholder,
textarea::placeholder {
  color: #ffffff88;
}

/* Autofill fix (Chrome/Edge) */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-text-fill-color: white !important;
  transition: background-color 9999s ease-in-out 0s;
}

/* Keep dropdown menu readable */
select option {
  color: black;
  background: #ffffff;
}

/* =========================================================
   BUTTONS
========================================================= */
button {
  width: 100%;
  padding: 12px;
  background: #4da3ff;
  border: none;
  border-radius: 12px;
  font-size: 18px;
  cursor: pointer;
  color: #0c1a2a;
  font-weight: bold;
  transition: 0.2s;
  margin-top: 15px;
}

button:hover {
  background: #73baff;
  transform: translateY(-2px);
}

button:focus {
  outline: none;
}

button:focus-visible {
  box-shadow: 0 0 0 3px rgba(77, 163, 255, 0.35);
}

/* =========================================================
   SHARE BUTTONS (bulletproof)
========================================================= */
.share-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

button.share-btn {
  width: auto;
  flex: 1 1 160px;
  padding: 10px 12px;
  margin-top: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(77, 163, 255, 0.35);
  border-radius: 12px;
  color: #ffffff;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button.share-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
}

button.share-btn.secondary {
  background: transparent;
}

@media (max-width: 520px) {
  button.share-btn {
    flex: 1 1 100%;
  }
}

/* tiny helper for share mount spacing */
#predictor_share_mount {
  margin-top: 12px;
}

/* =========================================================
   PERCENTILE CARD (match style + readable dropdown)
========================================================= */
#percentileCard.result-card,
#percentileCard.results-card {
  background: #ffffff15;
  border: 2px solid #4da3ff;
  border-radius: 20px;
  padding: 18px;
  width: 100%;
  box-sizing: border-box;
  backdrop-filter: blur(10px);
  box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.3);
  margin: 12px 0 0;
  text-align: center;
}

#percentileCard .result-title {
  margin: 0 0 10px;
  color: #ffffff;
  font-weight: 900;
  letter-spacing: 0.2px;
}

#percentileText {
  color: #cce7ff;
}

#percentileCard .row {
  justify-content: center;
}

#percentileCard select {
  width: auto;
  min-width: 190px;
  margin: 0;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #4da3ff;
  background: #ffffff20;
  color: white !important;
  font-size: 16px;
  box-sizing: border-box;
}

#percentileCard select option {
  color: black;
  background: #ffffff;
}

/* =========================================================
   OPTIONAL: “TIGHT FORM” (ONLY if you add class="tight-form" to body)
   (prevents breaking grid-based forms like negative split)
========================================================= */
body.tight-form .card label {
  display: block;
  max-width: 640px;
  margin: 10px auto 4px;
}

body.tight-form .card input[type="number"],
body.tight-form .card input[type="text"],
body.tight-form .card select {
  display: block;
  width: 80%;
  max-width: 640px;
  margin: 0 auto 12px;
}

body.tight-form .card > button[type="button"] {
  display: block;
  width: 80%;
  max-width: 640px;
  margin: 16px auto 0;
}

/* =========================================================
   QUOTES PAGE
========================================================= */
body.quotes-page #quoteResult {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 80px;
}

body.quotes-page #quoteResult h2 {
  margin: 0;
}

/* =========================================================
   RACE PACE FEATURES CARD
========================================================= */
.features-card {
  text-align: center;
}

.features-card .features-title {
  font-size: 1.55rem;
  margin: 0 0 12px;
}

.features-lines p {
  margin: 10px 0;
  line-height: 1.35;
}

.features-signoff {
  margin-top: 16px;
  font-size: 1.55rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.2px;
}

/* Fancy variant */
.features-card.fancy{
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(77,163,255,.35);
  background: rgba(255,255,255,0.06);
  box-shadow:
    0 10px 30px rgba(0,0,0,0.28),
    0 0 0 1px rgba(77,163,255,0.15) inset;
}

.features-card.fancy::before{
  content:"";
  position:absolute;
  inset:-2px;
  background: linear-gradient(135deg,
    rgba(77,163,255,0.85),
    rgba(128,0,0,0.55),
    rgba(77,163,255,0.6)
  );
  filter: blur(14px);
  opacity: 0.55;
  z-index: 0;
}

.features-card.fancy::after{
  content:"";
  position:absolute;
  top:-40%;
  left:-60%;
  width: 120%;
  height: 120%;
  background: linear-gradient(135deg,
    rgba(255,255,255,0.18),
    rgba(255,255,255,0.00) 55%
  );
  transform: rotate(18deg);
  opacity: 0.45;
  z-index: 0;
  pointer-events:none;
}

.features-card.fancy > *{ position: relative; z-index: 1; }

.features-header{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  margin-bottom: 12px;
}

.features-badge{
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(77,163,255,.55);
  background: rgba(0,27,56,0.55);
  box-shadow: 0 0 18px rgba(77,163,255,0.25);
}

.features-card .features-ol{
  display: inline-block;
  text-align: left;
  margin: 12px auto 0;
  padding-left: 1.25rem;
}

.features-card.fancy:hover{
  transform: translateY(-1px);
  transition: 140ms ease;
  box-shadow:
    0 14px 38px rgba(0,0,0,0.33),
    0 0 0 1px rgba(77,163,255,0.18) inset;
}

/* =========================================================
   RACE PACE CHART CARD
========================================================= */
.pace-chart-sub {
  margin: 6px 0 14px;
  opacity: 0.95;
}

.pace-chart-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
}

.pace-chart {
  width: 100%;
  min-width: 780px;
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.pace-chart thead th {
  position: sticky;
  top: 0;
  background: rgba(0, 27, 56, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 2px solid rgba(77, 163, 255, 0.6);
  padding: 12px 10px;
  text-align: center;
  font-weight: 800;
}

.pace-chart th,
.pace-chart td {
  padding: 10px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  text-align: center;
  white-space: nowrap;
}

.pace-chart th:first-child,
.pace-chart td:first-child {
  position: sticky;
  left: 0;
  background: rgba(0, 27, 56, 0.92);
  z-index: 2;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
  font-weight: 800;
}

.pace-chart tbody tr:nth-child(odd) td { background: rgba(255, 255, 255, 0.04); }
.pace-chart tbody tr:nth-child(even) td { background: rgba(255, 255, 255, 0.02); }

.pace-chart tbody tr:nth-child(odd) td:first-child,
.pace-chart tbody tr:nth-child(even) td:first-child {
  background: rgba(0, 27, 56, 0.92);
}

/* =========================================================
   RACING PAGE (jump cards + tips + checklist)
========================================================= */
.jump-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  max-width: 980px;
  margin: 0 auto 16px;
}

.jump-card{
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 14px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(77,163,255,.28);
  box-shadow: 0 10px 28px rgba(0,0,0,.25);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.jump-card:hover{
  transform: translateY(-2px);
  border-color: rgba(77,163,255,.55);
  box-shadow: 0 14px 34px rgba(0,0,0,.30);
}

.jump-kicker{
  font-size: 0.82rem;
  opacity: .85;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.jump-title{
  font-size: 1.15rem;
  font-weight: 900;
  margin-top: 6px;
}

.jump-sub{
  margin-top: 6px;
  opacity: .92;
  line-height: 1.25;
}

@media (max-width: 900px){
  .jump-grid{ grid-template-columns: 1fr; }
}

.racing-page .card{
  max-width: 980px;
  margin: 0 auto 16px;
}

.section-lede{
  opacity: .95;
  margin-top: 6px;
  line-height: 1.35;
}

.tip-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
@media (max-width: 900px){
  .tip-grid{ grid-template-columns: 1fr; }
}

.mini-card{
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.12);
  padding: 12px;
}

.mini-card h3{
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.checklist{
  margin: 0;
  padding-left: 18px;
  line-height: 1.35;
}

.anchor-spacer{
  scroll-margin-top: 110px;
}

.inline-link{
  color: #4da3ff;
  font-weight: 700;
  text-decoration: none;
}
.inline-link:hover{ text-decoration: underline; }

/* checklist card (screen) */
.checklist-card{
  max-width: 980px;
  margin: 0 auto 16px;
}

.checklist-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.checklist-actions{
  display:flex;
  gap:10px;
  flex-wrap: wrap;
}

.action-btn{
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 800;
  border: 1px solid rgba(77,163,255,.45);
  background: rgba(0,27,56,0.55);
  color: white;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(77,163,255,0.18);
  width: auto;
  margin-top: 0;
}

.action-btn.secondary{
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,0.06);
  box-shadow: none;
}

.action-btn:hover{ transform: translateY(-1px); }

.checklist-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

@media (max-width: 900px){
  .checklist-grid{ grid-template-columns: 1fr; }
}

.checklist-list{
  list-style: none;
  padding: 0;
  margin: 0;
}

.checklist-list li{
  position: relative;
  padding-left: 28px;
  margin: 10px 0;
  line-height: 1.35;
}

.checklist-list li::before{
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 2px solid rgba(77,163,255,.55);
  background: rgba(77,163,255,0.10);
  box-shadow: 0 0 10px rgba(77,163,255,0.12);
}

.checklist-footer{
  margin-top: 14px;
  opacity: .95;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.10);
}

/* print ONLY checklist */
@media print{
  body.print-checklist *{ visibility: hidden !important; }
  body.print-checklist #race-checklist,
  body.print-checklist #race-checklist *{
    visibility: visible !important;
  }

  body.print-checklist{
    background: white !important;
    color: black !important;
  }

  body.print-checklist #race-checklist{
    box-shadow: none !important;
    border: 1px solid #000 !important;
    background: white !important;
    margin: 0 !important;
  }

  body.print-checklist .action-btn,
  body.print-checklist .checklist-actions{
    display: none !important;
  }

  body.print-checklist .mini-card{
    border: 1px solid #000 !important;
    background: white !important;
  }

  body.print-checklist a{ color: black !important; text-decoration: none !important; }

  body.print-checklist .checklist-list li::before{
    border: 2px solid #000 !important;
    background: white !important;
    box-shadow: none !important;
  }
}

/* =========================================================
   AUTO PLAN (pace calculator)
========================================================= */
.auto-plan{
  margin-top: 12px;
  border-radius: 16px;
  border: 1px solid rgba(77,163,255,.30);
  background: rgba(0,0,0,0.10);
  padding: 12px;
}

.auto-plan-top{
  display:flex;
  flex-wrap:wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.auto-plan-title{ font-weight: 900; letter-spacing: .2px; }
.auto-plan-sub{ opacity: .9; }

.auto-plan-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 900px){
  .auto-plan-grid{ grid-template-columns: 1fr; }
}

.auto-pill{
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,0.06);
  padding: 10px 12px;
}

.auto-pill-label{
  font-size: .82rem;
  opacity: .85;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.auto-pill-value{
  font-size: 1.1rem;
  font-weight: 900;
  margin-top: 4px;
}

.auto-pill-sub{
  margin-top: 4px;
  font-size: .92rem;
  opacity: .9;
}

.auto-splits-wrap{
  margin-top: 10px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.10);
}

.auto-splits{
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.auto-splits th,
.auto-splits td{
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.auto-splits thead th{
  background: rgba(0,27,56,0.55);
  border-bottom: 1px solid rgba(77,163,255,.25);
  font-weight: 900;
}

.auto-splits tbody tr:nth-child(odd) td{
  background: rgba(255,255,255,0.03);
}

.auto-splits-note{
  padding: 8px 10px;
  font-size: .9rem;
  opacity: .85;
  background: rgba(0,0,0,0.08);
}

/* =========================================================
   RELATED TOOLS MINI-SECTION (shared)
========================================================= */
.related-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:14px;
  margin-top: 10px;
}

.related-link{
  display:block;
  text-decoration:none;
  color:inherit;
  padding:14px 14px;
  border-radius:16px;
  border:1px solid rgba(77,163,255,0.45);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  transition: transform .15s ease, border-color .15s ease;
}

.related-link:hover{
  transform: translateY(-2px);
  border-color: rgba(77,163,255,0.85);
}

.related-kicker{
  font-size: .82rem;
  opacity: .88;
  letter-spacing: .2px;
  margin: 0 0 6px;
}

.related-title{
  font-weight: 900;
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.related-desc{
  margin: 0;
  opacity: .92;
  line-height: 1.3;
  font-size: .93rem;
}

@media (max-width: 820px){
  .related-grid{ grid-template-columns: 1fr; }
}

/* =========================================================
   RACE PREDICTOR: widen those specific sections
   (won’t affect racing.html because body has .racing-page)
========================================================= */
body:not(.racing-page) #predictorForm,
body:not(.racing-page) #resultsCard,
body:not(.racing-page) #how-it-works,
body:not(.racing-page) #faq {
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
}

/* =========================================================
   BEST GEAR (page-specific)
========================================================= */
.best-gear .best-gear-container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding-left: 18px;
  padding-right: 18px;
  box-sizing: border-box;
}

.best-gear .results-card.best-gear-wide {
  width: 100%;
  max-width: 1050px;
  margin-left: auto;
  margin-right: auto;
}

.best-gear details.gear-accordion {
  width: 100%;
  max-width: 1050px;
}

/* Remove default triangle marker */
.best-gear summary.gear-summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.best-gear summary.gear-summary::-webkit-details-marker { display: none; }

/* Arrow button on the right */
.best-gear summary.gear-summary {
  position: relative;
  padding-right: 62px;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.best-gear summary.gear-summary::after {
  content: "▾";
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: #0a2540;
  background: #e3f2ff;
  border: 1px solid rgba(77, 163, 255, 0.55);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  transition: transform 0.2s ease, background 0.12s ease, border-color 0.12s ease;
}
.best-gear details[open] summary.gear-summary::after {
  transform: translateY(-50%) rotate(180deg);
}

/* “press” feel */
.best-gear summary.gear-summary:hover {
  transform: translateY(-1px);
  border-color: #73baff;
  box-shadow: 0px 12px 26px rgba(0, 0, 0, 0.34);
}
.best-gear summary.gear-summary:active {
  transform: translateY(1px) scale(0.995);
  box-shadow: 0px 6px 16px rgba(0, 0, 0, 0.28);
}
.best-gear summary.gear-summary:focus-visible {
  box-shadow: 0 0 0 4px rgba(77, 163, 255, 0.28), 0px 10px 22px rgba(0, 0, 0, 0.3);
  border-color: #73baff;
}
.best-gear summary.gear-summary:hover::after {
  background: #4da3ff;
  color: white;
  border-color: rgba(77, 163, 255, 0.95);
}

/* Panel open animation */
.best-gear .gear-panel { overflow: hidden; transform-origin: top; }
.best-gear details.gear-accordion .gear-panel {
  max-height: 0;
  opacity: 0;
  transform: scaleY(0.98);
  transition: max-height 0.25s ease, opacity 0.2s ease, transform 0.2s ease;
}
.best-gear details.gear-accordion[open] .gear-panel {
  max-height: 2000px;
  opacity: 1;
  transform: scaleY(1);
}

/* Page header */
.best-gear .gear-page-header {
  width: 100%;
  max-width: 1050px;
  margin: 0 auto 12px;
  text-align: center;
}
.best-gear .gear-page-header h1 {
  margin: 0;
  color: #ffffff;
  font-size: 38px;
  font-weight: 900;
  letter-spacing: 0.3px;
}
.best-gear .gear-page-header p {
  margin: 8px 0 0;
  color: #cce7ff;
  font-size: 16px;
  line-height: 1.45;
  opacity: 0.95;
}

/* Grid + cards */
.best-gear .best-gear-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
  text-align: left;
}
@media (max-width: 900px) {
  .best-gear .best-gear-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .best-gear .best-gear-grid { grid-template-columns: 1fr; }
}

.best-gear .gear-card {
  background: #ffffff15;
  border: 2px solid #4da3ff;
  border-radius: 20px;
  padding: 16px;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
  backdrop-filter: blur(10px);
  box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.3);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: 0.2s;
}

.best-gear .gear-card:hover {
  transform: translateY(-2px);
  border-color: #73baff;
  box-shadow: 0px 14px 28px rgba(0, 0, 0, 0.34);
}

.best-gear .gear-title {
  margin: 0 0 6px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
}

.best-gear .gear-why {
  margin: 0 0 10px;
  color: #cce7ff;
  line-height: 1.35;
}

.best-gear .gear-actions {
  margin-top: auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.best-gear .gear-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.best-gear .badge {
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(77, 163, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* Buttons inside gear cards (override global full-width button) */
.best-gear button.overview-btn,
.best-gear a.buy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(77, 163, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 16px;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
  transition: 0.2s;
  width: auto;
  margin-top: 0;
}
.best-gear button.overview-btn:hover,
.best-gear a.buy-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
  text-decoration: none;
}
.best-gear button.overview-btn:focus-visible,
.best-gear a.buy-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(77, 163, 255, 0.28);
}

.best-gear a.buy-btn {
  background: rgba(77, 163, 255, 0.22);
  border-color: rgba(77, 163, 255, 0.65);
}
.best-gear a.buy-btn:hover {
  background: rgba(77, 163, 255, 0.34);
}

/* Expandable details */
.best-gear .gear-details {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px);
  margin-top: 0;
  padding-top: 0;
  border-top: 1px solid transparent;

  transition:
    max-height 0.3s ease,
    opacity 0.2s ease,
    transform 0.2s ease,
    margin-top 0.2s ease,
    padding-top 0.2s ease,
    border-top-color 0.2s ease;
  will-change: max-height, opacity, transform;
}

.best-gear .gear-details.is-open {
  opacity: 1;
  transform: translateY(0);
  margin-top: 10px;
  padding-top: 10px;
  border-top-color: rgba(255, 255, 255, 0.12);
}

.best-gear .gear-overview {
  margin: 0 0 10px;
  color: #cce7ff;
  line-height: 1.45;
}

.best-gear .gear-bullets {
  margin: 0;
  padding-left: 18px;
  color: #cce7ff;
}

.best-gear .gear-bullets li { margin: 6px 0; }

.best-gear .gear-details[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .best-gear .gear-details { transition: none !important; }
}

/* Gear images */
.best-gear .gear-img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 10px;
  border: 1px solid rgba(77, 163, 255, 0.25);
  box-sizing: border-box;
}

/* =========================================================
   MYTH OF THE DAY (page-specific)
========================================================= */
.myth-page .myth-footer { display: none !important; }

.myth-page .results-card.myth-card {
  max-width: 760px;
  text-align: left;
  position: relative;
  overflow: hidden;

  background:
    radial-gradient(1200px 420px at 10% 0%, rgba(77,163,255,.18), transparent 60%),
    radial-gradient(900px 520px at 90% 12%, rgba(255,255,255,.10), transparent 55%),
    rgba(255,255,255,.08);

  border: 1px solid rgba(77,163,255,.55);
  box-shadow:
    0 12px 38px rgba(0,0,0,.40),
    0 0 0 1px rgba(255,255,255,.06) inset,
    0 0 28px rgba(77,163,255,.18);

  border-radius: 26px;
}

.myth-page .results-card.myth-card::before{
  content: none !important;
  display: none !important;
  animation: none !important;
}

.myth-page .myth-header {
  position: relative;
  text-align: center;
  margin-bottom: 6px;
  padding-top: 6px;
}

.myth-page .myth-header h1 {
  margin: 0;
  color: #ffffff;
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 0.3px;
}

.myth-page .myth-header p {
  margin: 8px 0 0;
  color: #cce7ff;
  opacity: 0.95;
}

/* Fact check button */
.myth-page .myth-card { position: relative; }

.myth-page .myth-fact-btn {
  position: absolute;
  top: 14px;
  left: 14px;
  width: auto;
  margin: 0;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(77,163,255,.35);
  background: rgba(255,255,255,.10);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s;
}

.myth-page .myth-fact-btn:hover {
  background: rgba(255,255,255,.16);
  transform: translateY(-1px);
}

.myth-page .myth-fact-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(77,163,255,.28);
}

/* Countdown pill */
.myth-page .myth-countdown {
  margin-top: 8px;
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(77,163,255,.30);
  background: rgba(255,255,255,.06);
  font-size: 13px;
  opacity: .95;
}

/* Myth text box */
.myth-page .myth-box {
  margin-top: 18px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(77,163,255,.30);
  background: rgba(0,0,0,.12);
  box-shadow: 0 0 0 1px rgba(255,255,255,.04) inset;
}

.myth-page .myth-box p {
  margin: 0;
  font-size: 20px;
  line-height: 1.55;
  font-weight: 800;
  color: #ffffff;
}

/* True/False buttons */
.myth-page .myth-actions {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 520px) {
  .myth-page .myth-actions { grid-template-columns: 1fr; }
}

.myth-page .myth-btn {
  width: 100%;
  margin-top: 0;
  padding: 16px 16px;
  font-size: 18px;
  border-radius: 18px;
  border: 1px solid rgba(77,163,255,.40);
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.07));
  color: #ffffff;
  font-weight: 900;
  letter-spacing: 0.3px;
  box-shadow: 0 10px 22px rgba(0,0,0,.25);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
}

.myth-page .myth-btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.10));
  border-color: rgba(115,186,255,.75);
  box-shadow: 0 14px 26px rgba(0,0,0,.30);
}

.myth-page .myth-btn:active {
  transform: translateY(1px) scale(0.995);
  box-shadow: 0 8px 16px rgba(0,0,0,.26);
}

.myth-page .myth-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(77,163,255,.30), 0 14px 26px rgba(0,0,0,.30);
}

.myth-page .myth-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Reveal panel */
.myth-page .myth-reveal {
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(0,0,0,.16);
  border: 1px solid rgba(77,163,255,.26);
  box-shadow: 0 0 0 1px rgba(255,255,255,.04) inset;
  color: #cce7ff;
}

.myth-page .myth-result {
  margin: 0 0 10px;
  color: #ffffff;
  font-weight: 900;
  font-size: 20px;
}

.myth-page .myth-answer,
.myth-page .myth-explain,
.myth-page .myth-tip {
  margin: 0 0 10px;
  line-height: 1.55;
  font-size: 15px;
}
.myth-page .myth-tip { margin-bottom: 0; }

.myth-page .myth-status {
  margin: 14px 0 0;
  color: #cce7ff;
  opacity: 0.85;
}

/* TRUE/FALSE accent glows */
.myth-page #btnTrue.myth-btn { border-color: rgba(90, 220, 140, .35); }
.myth-page #btnTrue.myth-btn:hover {
  border-color: rgba(90, 220, 140, .80);
  box-shadow:
    0 14px 26px rgba(0,0,0,.30),
    0 0 0 1px rgba(255,255,255,.05) inset,
    0 0 26px rgba(90, 220, 140, .22);
}
.myth-page #btnTrue.myth-btn:focus-visible {
  box-shadow:
    0 0 0 4px rgba(90, 220, 140, .22),
    0 14px 26px rgba(0,0,0,.30);
}

.myth-page #btnFalse.myth-btn { border-color: rgba(255, 110, 110, .35); }
.myth-page #btnFalse.myth-btn:hover {
  border-color: rgba(255, 110, 110, .80);
  box-shadow:
    0 14px 26px rgba(0,0,0,.30),
    0 0 0 1px rgba(255,255,255,.05) inset,
    0 0 26px rgba(255, 110, 110, .22);
}
.myth-page #btnFalse.myth-btn:focus-visible {
  box-shadow:
    0 0 0 4px rgba(255, 110, 110, .20),
    0 14px 26px rgba(0,0,0,.30);
}

/* Result colors */
.myth-page .myth-reveal.is-right {
  border-color: rgba(90,220,140,.55);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.04) inset,
    0 0 26px rgba(90,220,140,.18);
}
.myth-page .myth-reveal.is-right .myth-result { color: rgba(90,220,140,1); }

.myth-page .myth-reveal.is-wrong {
  border-color: rgba(255,110,110,.55);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.04) inset,
    0 0 26px rgba(255,110,110,.16);
}
.myth-page .myth-reveal.is-wrong .myth-result { color: rgba(255,110,110,1); }

/* Fact-check box */
.myth-page .myth-actions-secondary { margin-top: 10px; }

.myth-page .myth-btn.myth-btn-secondary {
  background: rgba(255,255,255,.06);
  border-color: rgba(77,163,255,.25);
}

.myth-page .myth-btn.myth-btn-secondary:hover { background: rgba(255,255,255,.12); }

.myth-page .myth-factcheck,
.myth-page .myth-fact-box {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(77,163,255,.25);
  background: rgba(255,255,255,.05);
}

.myth-page .myth-facttext,
.myth-page .myth-fact-text {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: #cce7ff;
  font-size: 13px;
  line-height: 1.45;
  user-select: text;
}

.myth-page .myth-fact-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.myth-page .myth-fact-mini {
  width: auto;
  margin: 0;
  padding: 8px 10px;
  font-size: 13px;
  border-radius: 12px;
  border: 1px solid rgba(77,163,255,.35);
  background: rgba(255,255,255,.10);
  color: #ffffff;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

.myth-page .myth-fact-mini:hover {
  background: rgba(255,255,255,.16);
  transform: translateY(-1px);
}
/* =========================================================
   RUNNING PLAN BUILDER (page-specific)
========================================================= */
.plan-page .card.plan-hero{
  max-width: 780px; /* big first card */
}

.plan-steps{
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 10px 0 16px;
  flex-wrap: wrap;
}
.plan-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.25);
  border: 1px solid rgba(77,163,255,0.45);
}
.plan-dot.is-active{
  background: rgba(77,163,255,0.9);
}

.plan-step{ display: none; text-align: left; }
.plan-step.is-active{ display: block; }

.plan-row{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 700px){
  .plan-row{ grid-template-columns: 1fr; }
}

.day-grid{
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin: 6px 0 10px;
}
@media (max-width: 700px){
  .day-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.day-pill{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(77,163,255,.30);
  background: rgba(255,255,255,0.06);
}

.plan-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.plan-actions button{
  width: auto; /* override global 100% */
  flex: 1 1 180px;
}

#planResults.results-card{
  max-width: 780px; /* wide results */
}

/* Week cards inside results */
.plan-weeks{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
@media (max-width: 900px){
  .plan-weeks{ grid-template-columns: 1fr; }
}

.plan-week-title{
  margin: 0 0 6px;
  font-weight: 900;
}

.plan-dayline{
  margin: 8px 0;
  line-height: 1.35;
}

.plan-muted{ opacity: .9; }

/* =========================================================
   RUNNING PLAN BUILDER — FANCY UI (page-specific)
========================================================= */

.plan-page .card.plan-hero{
  max-width: 820px;
  margin-top: 10px;
  border-radius: 28px;
  border: 1px solid rgba(77,163,255,.55);
  background:
    radial-gradient(1200px 520px at 12% 0%, rgba(77,163,255,.22), transparent 60%),
    radial-gradient(900px 420px at 88% 12%, rgba(255,255,255,.12), transparent 55%),
    rgba(255,255,255,.08);
  box-shadow:
    0 16px 48px rgba(0,0,0,.42),
    0 0 0 1px rgba(255,255,255,.06) inset,
    0 0 34px rgba(77,163,255,.18);
  position: relative;
  overflow: hidden;
}

.plan-page .card.plan-hero::after{
  content:"";
  position:absolute;
  top:-45%;
  left:-60%;
  width: 130%;
  height: 130%;
  background: linear-gradient(135deg,
    rgba(255,255,255,0.18),
    rgba(255,255,255,0.00) 60%
  );
  transform: rotate(18deg);
  opacity: .45;
  pointer-events:none;
}

.plan-page .plan-hero > *{ position: relative; z-index: 1; }

.plan-page .plan-head{
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.plan-page .plan-badge{
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(77,163,255,.55);
  background: rgba(0,27,56,0.55);
  box-shadow: 0 0 18px rgba(77,163,255,0.18);
  text-transform: uppercase;
}

.plan-page .plan-sub{
  color:#cce7ff;
  opacity: .95;
  margin: 0 0 12px;
  line-height: 1.45;
}

/* Progress bar */
.plan-page .plan-progress{
  margin: 10px auto 14px;
  width: 100%;
  max-width: 620px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(77,163,255,.35);
  background: rgba(0,0,0,.14);
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,.03) inset;
}
.plan-page .plan-progress-fill{
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(77,163,255,0.95), rgba(115,186,255,0.55));
  box-shadow: 0 0 22px rgba(77,163,255,.25);
  transition: width 220ms ease;
}

/* Stepper */
.plan-page .plan-steps{
  display:flex;
  justify-content:center;
  gap: 12px;
  flex-wrap:wrap;
  margin: 0 auto 10px;
}
.plan-page .plan-stepchip{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(77,163,255,.25);
  background: rgba(255,255,255,.06);
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
  user-select:none;
}
.plan-page .plan-stepchip:hover{
  transform: translateY(-1px);
  border-color: rgba(77,163,255,.50);
  background: rgba(255,255,255,.08);
}

.plan-page .plan-dot{
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(77,163,255,0.40);
  box-shadow: 0 0 0 1px rgba(0,0,0,.10) inset;
}
.plan-page .plan-dot.is-active{
  background: rgba(77,163,255,0.95);
  box-shadow: 0 0 22px rgba(77,163,255,0.35);
}

.plan-page .plan-chiptext{
  font-weight: 900;
  letter-spacing: .2px;
  opacity: .95;
}

/* Step panels */
.plan-page .plan-step{
  display:none;
  text-align:left;
  margin-top: 6px;
}
.plan-page .plan-step.is-active{ display:block; }

.plan-page .plan-panel{
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.10);
  padding: 14px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.03) inset;
}

/* Field group */
.plan-page .field-kicker{
  font-size: 0.82rem;
  opacity: .85;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0 0 8px;
}
.plan-page .plan-row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 700px){
  .plan-page .plan-row{ grid-template-columns: 1fr; }
}

/* Fancy inputs focus */
.plan-page input,
.plan-page select,
.plan-page textarea{
  transition: box-shadow 160ms ease, transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
.plan-page input:focus,
.plan-page select:focus,
.plan-page textarea:focus{
  outline:none;
  border-color: rgba(115,186,255,.95);
  box-shadow: 0 0 0 4px rgba(77,163,255,.22), 0 12px 26px rgba(0,0,0,.20);
  background: rgba(255,255,255,0.10);
}

/* Day pills (super satisfying) */
.plan-page .day-grid{
  display:grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0 12px;
}
@media (max-width: 700px){
  .plan-page .day-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.plan-page .day-pill{
  display:flex;
  align-items:center;
  gap: 8px;
  padding: 10px 10px;
  border-radius: 16px;
  border: 1px solid rgba(77,163,255,.25);
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}
.plan-page .day-pill:hover{
  transform: translateY(-1px);
  border-color: rgba(77,163,255,.55);
  box-shadow: 0 12px 26px rgba(0,0,0,.18);
}
.plan-page .day-pill.is-checked{
  border-color: rgba(77,163,255,.85);
  background:
    radial-gradient(600px 220px at 20% 0%, rgba(77,163,255,.25), transparent 65%),
    rgba(255,255,255,0.08);
  box-shadow:
    0 14px 28px rgba(0,0,0,.22),
    0 0 24px rgba(77,163,255,.18);
}
.plan-page .day-pill input{ width:auto; margin:0; }

/* Buttons: make primary feel premium */
.plan-page .plan-actions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.plan-page .plan-actions button{
  width:auto;
  flex: 1 1 190px;
  border-radius: 999px;
  padding: 12px 14px;
}

.plan-page #btnNext,
.plan-page button[type="submit"]{
  background: linear-gradient(180deg, rgba(77,163,255,1), rgba(77,163,255,.72));
  border: 1px solid rgba(255,255,255,.12);
  color: #0c1a2a;
  box-shadow: 0 14px 30px rgba(0,0,0,.22), 0 0 22px rgba(77,163,255,.18);
}
.plan-page #btnNext:hover,
.plan-page button[type="submit"]:hover{
  transform: translateY(-2px);
  background: linear-gradient(180deg, rgba(115,186,255,1), rgba(77,163,255,.78));
}

.plan-page #btnBack{
  background: rgba(255,255,255,0.08);
  color: white;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: none;
}
.plan-page #btnBack:hover{
  background: rgba(255,255,255,0.12);
  transform: translateY(-1px);
}

.plan-page button:disabled{
  opacity: .55;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Error line: looks intentional */
.plan-page #stepError{
  margin: 10px auto 0;
  max-width: 620px;
  border-radius: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255,110,110,.45);
  background: rgba(255,110,110,.10);
  color: #ffd0d0;
}

/* Results wide + premium */
.plan-page #planResults.results-card,
.plan-page #how-it-works.results-card,
.plan-page #faq.results-card{
  max-width: 820px;
  border-radius: 24px;
  border: 1px solid rgba(77,163,255,.35);
  background: rgba(255,255,255,0.08);
  box-shadow: 0 14px 40px rgba(0,0,0,.30);
}

/* Accordions look like gear page */
.plan-page details{
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.10);
  padding: 10px 12px;
  margin-top: 10px;
}
.plan-page summary{
  list-style:none;
  cursor:pointer;
  user-select:none;
  font-weight: 900;
}
.plan-page summary::-webkit-details-marker{ display:none; }
.plan-page summary::after{
  content:"▾";
  float:right;
  opacity:.85;
  transition: transform 180ms ease;
}
.plan-page details[open] summary::after{ transform: rotate(180deg); }
/* Track Snake page tweaks */
.track-snake-container { padding-top: 120px; }
.track-snake-card { max-width: 1200px; width: min(1200px, 96vw); }

.ts-header h1 { margin: 0 0 6px 0; font-size: 2.0rem; }
.ts-sub { margin: 0 0 14px 0; opacity: 0.92; }

.ts-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 14px;
  align-items: start;
}

@media (max-width: 980px) {
  .ts-grid { grid-template-columns: 1fr; }
}

.ts-panel {
  background: #ffffff10;
  border: 2px solid #4da3ff;
  border-radius: 16px;
  padding: 12px;
}

.ts-topbar { display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
.ts-hud { display: grid; grid-template-columns: repeat(3, auto); gap: 6px 14px; align-items: center; }
.ts-label { opacity: 0.75; }

.ts-controls { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.ts-btn {
  background: #4da3ff;
  border: none;
  color: #001b38;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
}
.ts-btn:hover { filter: brightness(1.05); }
.ts-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.ts-btn-ghost {
  background: transparent;
  color: #ffffff;
  border: 2px solid #4da3ff;
}

.ts-canvas-wrap { margin-top: 12px; display: grid; gap: 8px; }
#gameCanvas {
  width: 100%;
  height: auto;
  background: rgba(0,0,0,0.25);
  border-radius: 14px;
  border: 2px solid rgba(255,255,255,0.15);
  touch-action: manipulation;
}
.ts-mobile-hint { opacity: 0.75; font-size: 0.9rem; text-align: center; }

.ts-status { margin-top: 10px; opacity: 0.95; }

.ts-level-select { margin-top: 14px; }
.ts-level-title { font-weight: 800; margin-bottom: 8px; }
.ts-level-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.ts-level-buttons button { min-width: 68px; }

.ts-muted { opacity: 0.85; }
.ts-muted.small { font-size: 0.9rem; }

.ts-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 2px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.20);
  color: white;
  outline: none;
}
.ts-auth-row { display: flex; gap: 8px; margin-top: 8px; }
.ts-divider { height: 1px; background: rgba(255,255,255,0.18); margin: 12px 0; }

.ts-leaderboard { margin-top: 14px; }
.ts-lb-header { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.ts-lb-title { font-weight: 900; font-size: 1.1rem; }
.ts-lb-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.ts-tab {
  background: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 800;
}
.ts-tab.active { border-color: #4da3ff; }

.ts-lb-actions { margin-top: 10px; display: flex; justify-content: flex-end; }
.ts-lb-list { margin: 10px 0 0 18px; padding: 0; }
.ts-lb-list li { margin: 8px 0; }

.ts-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.70);
  display: grid;
  place-items: center;
  z-index: 9999;
}
.ts-quiz {
  width: min(720px, 92vw);
  background: rgba(0,0,0,0.88);
  border: 2px solid #4da3ff;
  border-radius: 16px;
  padding: 14px;
}
.ts-quiz-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ts-quiz-title { font-weight: 1000; font-size: 1.1rem; }
.ts-quiz-timer { font-weight: 1000; font-size: 1.1rem; }
.ts-quiz-q { margin-top: 10px; font-size: 1.1rem; font-weight: 700; }
.ts-quiz-choices { margin-top: 10px; display: grid; gap: 8px; }
.ts-choice {
  text-align: left;
  background: rgba(255,255,255,0.10);
  border: 2px solid rgba(255,255,255,0.18);
  border-radius: 14px;
  padding: 10px 12px;
  color: white;
  cursor: pointer;
  font-weight: 800;
}
.ts-choice:hover { border-color: rgba(77,163,255,0.8); }
.ts-quiz-hint { margin-top: 10px; opacity: 0.8; }
[hidden] { display: none !important; }

/* =========================================
   RUNNING PLAN BUILDER V3 (Week Cards)
   Add this to the bottom of style.css
========================================= */

/* The Container for the whole week */
.week-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
}

/* Open state styling */
.week-card.open {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(77, 163, 255, 0.5);
}

/* The clickable header (Week 1... 25mi) */
.week-header {
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}
.week-header:hover {
  background: rgba(255, 255, 255, 0.03);
}

.week-title-group {
  display: flex;
  gap: 12px;
  align-items: center;
}

.week-num {
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
}

/* Colored tags for Build, Cutback, etc. */
.week-tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #000;
}
.week-tag.build { background: #4caf50; }        /* Green */
.week-tag.cutback { background: #ff9800; }      /* Orange */
.week-tag.taper { background: #2196f3; }        /* Blue */
.week-tag.race-week { background: #ff5252; }    /* Red */

.week-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0.9;
  font-size: 0.95rem;
}

.week-toggle {
  font-size: 0.8rem;
  transition: transform 0.2s ease;
  opacity: 0.5;
}
/* Rotate arrow when open */
.week-card.open .week-toggle {
  transform: rotate(180deg);
  opacity: 1;
}

/* The container for days (hidden by default) */
.week-days {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
}
.week-card.open .week-days {
  display: block;
}

/* Individual Day Row */
.day-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.day-row:last-child {
  border-bottom: none;
}

.day-header {
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}
.day-header:hover {
  background: rgba(255, 255, 255, 0.05);
}

.day-left {
  display: flex;
  gap: 12px;
  align-items: center;
}

.day-name {
  font-family: monospace;
  opacity: 0.6;
  width: 30px;
  font-size: 0.9rem;
}

/* Badges for run types */
.day-type-badge {
  font-size: 0.85rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}
.day-type-badge.Easy { color: #80deea; background: rgba(128, 222, 234, 0.15); }
.day-type-badge.Long { color: #ce93d8; background: rgba(206, 147, 216, 0.15); }
.day-type-badge.Workout { color: #ff80ab; background: rgba(255, 128, 171, 0.15); }

/* The detailed workout text (hidden until clicked) */
.workout-details {
  display: none;
  padding: 4px 16px 16px 58px; /* Indented to align with text */
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
}

.day-row.expanded {
  background: rgba(255, 255, 255, 0.03);
}
.day-row.expanded .workout-details {
  display: block;
}

.w-part { margin-bottom: 4px; }
.main-set { color: #fff; font-weight: 600; }
.w-pace { 
  margin-top: 8px; 
  color: #ffd180; 
  font-weight: 700; 
  font-size: 0.85rem;
  background: rgba(255, 209, 128, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}
/* RUNNING PLAN CARDS (Copy to bottom of style.css) */
.week-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}
.week-header {
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}
.week-header:hover { background: rgba(255, 255, 255, 0.05); }
.week-num { font-weight: 800; font-size: 1.1rem; color: #fff; }
.week-meta { opacity: 0.8; font-size: 0.9rem; }

.week-days { display: none; border-top: 1px solid rgba(255,255,255,0.1); }
.week-card.open .week-days { display: block; }

.day-row {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.day-header { display: flex; justify-content: space-between; font-weight: 600; color: rgba(255,255,255,0.9); }
.workout-details {
  margin-top: 6px;
  padding-left: 10px;
  border-left: 2px solid #4daaff;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
}

