body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #000000;
    color: #ffffff;
  }
  
  header {
    background-color: #000000;
    color: #ffffff;
    padding: 1em;
    text-align: center;
  }
  .logo {
    display: block;
  margin: 1em auto 0 auto;
  width: clamp(140px, 18vw, 260px);
  height: auto;
}
  
  nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1em;
    background-color: #f2f2f2;
    padding: 0.3em 0.5em;
    font-size: 0.9em;
    position: sticky;
    top: 0;
    z-index: 1000;
    flex-wrap: nowrap;
  }

  .nav-links {
    display: flex;
    justify-content: center;
    gap: 1em;
    flex: 1;
    min-width: 0;
    flex-wrap: nowrap;
  }

  .nav-links a {
    white-space: nowrap;
  }

  .nav-burger {
    appearance: none;
    border: 0;
    background: transparent;
    width: 44px;
    height: 38px;
    padding: 0;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    border-radius: 10px;
    flex: 0 0 auto;
  }

  .nav-burger span {
    width: 22px;
    height: 2px;
    background: #000000;
    border-radius: 999px;
    transition: transform 0.18s ease, opacity 0.18s ease;
  }

  .nav-burger:hover {
    background: rgba(0, 0, 0, 0.06);
  }

  .nav-burger:focus-visible {
    outline: 3px solid rgba(30, 107, 255, 0.8);
    outline-offset: 2px;
  }

  /* Off-canvas drawer (right slide-in) */
  .nav-drawer {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .nav-drawer.open {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-drawer-inner {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: min(360px, 86vw);
    padding: 1.1em 1em;
    background: rgba(0, 0, 0, 0.92);
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    transform: translateX(100%);
    transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  .nav-drawer.open .nav-drawer-inner {
    transform: translateX(0);
  }

  .nav-drawer-title {
    margin: 0;
    font-weight: 800;
  }

  .nav-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8em;
  }

  .nav-drawer-close {
    appearance: none;
    border: 0;
    background: transparent;
    color: #ffffff;
    width: 38px;
    height: 38px;
    cursor: pointer;
    font-size: 30px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
  }

  .nav-drawer-close:hover {
    opacity: 1;
  }

  .nav-drawer-close:focus-visible {
    outline: 3px solid rgba(30, 107, 255, 0.9);
    outline-offset: 2px;
  }

  .nav-drawer-links {
    margin-top: 1em;
    display: grid;
    gap: 0.4em;
  }

  .nav-drawer-links a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    padding: 0.7em 0.75em;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.04);
  }

  .nav-drawer-links a.nav-sub-link {
    margin-left: 0.6em;
    padding-left: 1.15em;
    opacity: 0.92;
  }

  .nav-drawer-links .nav-dropdown {
    display: grid;
    gap: 0.4em;
  }

  .nav-drawer-links .nav-dropdown-row {
    display: flex;
    align-items: center;
    gap: 0.4em;
  }

  .nav-drawer-links .nav-dropdown-row a {
    flex: 1;
  }

  .nav-drawer-links .nav-dropdown-toggle {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
    width: 44px;
    min-height: 44px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 900;
    font-size: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
  }

  .nav-drawer-links .nav-dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
  }

  .nav-drawer-links .nav-dropdown-toggle[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
  }

  .nav-drawer-links .nav-dropdown-toggle:focus-visible {
    outline: 3px solid rgba(30, 107, 255, 0.9);
    outline-offset: 2px;
  }

  .nav-drawer-links .nav-dropdown-menu {
    display: grid;
    gap: 0.4em;
    margin-left: 0.6em;
  }

  .nav-drawer-links .nav-dropdown-menu[hidden] {
    display: none;
  }

  .nav-drawer-links .nav-dropdown-menu a.nav-sub-link {
    margin-left: 0;
  }

  .nav-drawer-links a:hover {
    background: rgba(255, 255, 255, 0.08);
  }

  .nav-drawer-links a.support-link {
    margin-top: 0.9em;
    border-color: rgba(0, 255, 128, 0.55);
    background: rgba(0, 255, 128, 0.12);
    position: relative;
  }

  .nav-drawer-links a.support-link::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -0.55em;
    height: 1px;
    background: rgba(0, 255, 128, 0.22);
    pointer-events: none;
  }

  .nav-drawer-links a.support-link:hover {
    background: rgba(0, 255, 128, 0.18);
    box-shadow: 0 0 0 1px rgba(0, 255, 128, 0.35), 0 0 22px rgba(0, 255, 128, 0.30);
    animation: supportGlow 0.9s ease-in-out infinite alternate;
  }

  @keyframes supportGlow {
    from {
      box-shadow: 0 0 0 1px rgba(0, 255, 128, 0.25), 0 0 14px rgba(0, 255, 128, 0.22);
    }
    to {
      box-shadow: 0 0 0 1px rgba(0, 255, 128, 0.45), 0 0 26px rgba(0, 255, 128, 0.38);
    }
  }

  .nav-drawer-links a:focus-visible {
    outline: 3px solid rgba(30, 107, 255, 0.9);
    outline-offset: 2px;
  }

  body.nav-drawer-open {
    overflow: hidden;
  }

  body.nav-drawer-open .nav-burger span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  body.nav-drawer-open .nav-burger span:nth-child(2) {
    opacity: 0;
  }

  body.nav-drawer-open .nav-burger span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* Keep links visible on phones (single row) by tightening spacing */
  @media (max-width: 640px) {
    .nav-links {
      gap: 0.75em;
    }

    .nav-burger {
      width: 32px;
      height: 28px;
      border-radius: 8px;
    }

    .nav-burger span {
      width: 17px;
    }
  }

  /* Ultra-small screens: tighten further (no hiding/shortening text) */
  @media (max-width: 420px) {
    .nav-burger {
      width: 30px;
      height: 26px;
    }

    .nav-burger span {
      width: 17px;
    }
  }
  
  nav a {
    color: #000000;
    text-decoration: none;
    font-weight: bold;
  }

  nav a:hover {
    text-decoration: underline;
  }
  
  .section {
    max-width: 900px;
    margin: 2em auto;
    padding: 0 1em;
    scroll-margin-top: 70px;
  }

  .about-intro {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 0.75em;
  }

  .read-more-btn {
    appearance: none;
    border: none;
    background: transparent;
    color: #ffffff;
    padding: 0;
    cursor: pointer;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    text-decoration: underline;
  }

  .read-more-btn:hover {
    opacity: 0.9;
  }

  .read-more-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.75);
    outline-offset: 3px;
    border-radius: 6px;
  }

  .about-more {
    margin-top: 1em;
    line-height: 1.6;
  }

  .rules-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
    counter-reset: rules;
  }

  .rules-list li {
    margin: 0.6em 0;
    counter-increment: rules;
    position: relative;
    padding-left: 1.85em;
    line-height: 1.5;
  }

  .rules-list li::before {
    content: counter(rules);
    position: absolute;
    left: 0;
    top: 0.1em;
    width: 1.25em;
    height: 1.25em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1e6bff;
    color: #ffffff;
    border-radius: 4px;
    font-weight: 800;
    font-size: 0.85em;
  }

  .rules-list a {
    color: #1DB954;
    text-decoration: underline;
    font-weight: bold;
  }

  .rules-list a:hover {
    color: #14833b;
  }

  .pace-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1em;
    margin-bottom: 0.5em;
  }

  .pace-table th,
  .pace-table td {
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0.6em 0.75em;
    text-align: left;
  }

  .pace-table th {
    background: rgba(255, 255, 255, 0.08);
  }

  .pace-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.04);
  }

  .pace-calc {
    margin-top: 1em;
    padding: 1em;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
  }

  .pace-calc-note {
    margin-top: 0;
    opacity: 0.9;
  }

  .pace-calc-form {
    display: grid;
    gap: 0.9em;
  }

  .pace-calc-row {
    display: grid;
    gap: 0.4em;
  }

  .pace-calc-row label {
    font-weight: bold;
  }

  .pace-calc-row select,
  .pace-calc-row input {
    background: rgba(0, 0, 0, 0.35);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    padding: 0.55em 0.65em;
  }

  .pace-calc-time {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    flex-wrap: wrap;
  }

  .pace-calc-time input {
    width: 6.5em;
    max-width: 100%;
    text-align: center;
  }

  .time-sep {
    opacity: 0.8;
    font-weight: bold;
  }

  .pace-calc-actions {
    display: flex;
    gap: 0.6em;
    flex-wrap: wrap;
  }

  .pace-calc-btn {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    padding: 0.55em 0.9em;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
  }

  .pace-calc-btn.secondary {
    background: transparent;
  }

  .pace-calc-btn:hover {
    background: rgba(255, 255, 255, 0.12);
  }

  .pace-calc-result {
    margin-top: 0.2em;
    padding-top: 0.6em;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    min-height: 1.2em;
  }

  .pace-calc-sub {
    opacity: 0.85;
    font-size: 0.95em;
  }
  
  .events-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    justify-content: center;
  }

  /* Training cards: box that groups image + text */
  #training .events-container {
    gap: 1.4em;
  }

  /* Desktop layout for training: fit 3+ (often 4+) cards per row */
  @media (min-width: 900px) {
    #training.section {
      max-width: 1400px;
    }

    #training .events-container {
      display: grid;
      width: 100%;
      grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
      align-items: stretch;
    }

    #training .event {
      width: 100%;
    }
  }

  #training .event {
    --accent-1: rgba(255, 255, 255, 0.18);
    --accent-2: rgba(255, 255, 255, 0.08);
    --aura: rgba(255, 255, 255, 0.16);
    --tilt: -0.35deg;
    box-sizing: border-box;
    width: min(320px, 100%);
    padding: 1em;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45em;
    transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.22s ease, background 0.22s ease, border-color 0.22s ease;
    will-change: transform;
  }

  #training .event::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: radial-gradient(120% 120% at 18% 10%, var(--accent-1), var(--accent-2), transparent 62%);
    opacity: 0;
    transition: opacity 0.18s ease;
    z-index: 0;
    pointer-events: none;
  }

  /* Softer, themed colors by training type */
  #training .event.training-social {
    --accent-1: rgba(120, 170, 255, 0.42);
    --accent-2: rgba(120, 210, 255, 0.18);
    --aura: rgba(120, 170, 255, 0.22);
    --tilt: -0.35deg;
  }

  #training .event.training-tempo {
    --accent-1: rgba(255, 210, 120, 0.42);
    --accent-2: rgba(255, 240, 180, 0.16);
    --aura: rgba(255, 210, 120, 0.22);
    --tilt: 0.35deg;
  }

  #training .event.training-long {
    --accent-1: rgba(110, 240, 170, 0.38);
    --accent-2: rgba(40, 200, 120, 0.16);
    --aura: rgba(110, 240, 170, 0.20);
    --tilt: -0.25deg;
  }

  /* Full-card clickable overlay (keeps inner links clickable via z-index) */
  #training .event .event-overlay-link {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    z-index: 3;
  }

  #training .event > :not(.event-overlay-link) {
    position: relative;
    z-index: auto;
  }

  /* Keep real links (e.g., location) clickable above the overlay */
  #training .event a:not(.event-overlay-link) {
    position: relative;
    z-index: 4;
  }

  #training .event .event-overlay-link:focus-visible {
    outline: 3px solid rgba(30, 107, 255, 0.95);
    outline-offset: 4px;
  }

  #training .event img {
    transition: transform 0.18s ease, filter 0.18s ease;
    filter: saturate(1.05) contrast(1.05);
  }

  #training .event:hover {
    transform: rotate(var(--tilt));
    box-shadow:
      0 14px 34px rgba(0, 0, 0, 0.48),
      0 0 26px var(--aura);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.18);
  }

  #training .event:hover::before {
    opacity: 1;
  }

  #training .event:hover img {
    transform: scale(1.04);
  }

  #training .event p {
    margin: 0.25em 0;
  }
  
  .event {
    width: 260px;
    text-align: center;
  }
  
  .event img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s;
  }
  
  .event img:hover {
    transform: scale(1.03);
  }

  .event h3 a {
    color: inherit;
    text-decoration: none;
  }

  .event h3 a:hover {
    text-decoration: underline;
  }

  .event h3 a:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.75);
    outline-offset: 3px;
    border-radius: 6px;
  }
  

  .training-content p {
    flex: 1;
    margin: 0;
    display: flex;
    align-items: center;
    height: 100%;
  }

  #training .event img {
    border-radius: 50%;
    object-fit: cover;
    width: 200px;
    height: 200px;
  }

  footer {
    background-color: #000000;
    color: #ffffff;
    text-align: center;
    padding: 1em;
    margin-top: 3em;
  }

  .footer-links {
    margin-top: 0.5em;
    font-size: 0.95em;
  }

  .footer-links a {
    color: inherit;
    opacity: 0.9;
    text-decoration: none;
  }

  .footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
  }

  /* User data / export-import page */
  .data-page {
    max-width: 920px;
    margin: 0 auto;
  }

  .data-title {
    text-align: center;
    margin-bottom: 0.4em;
  }

  .data-lead {
    max-width: 760px;
    margin: 0 auto 1.25em auto;
    text-align: center;
    opacity: 0.92;
    line-height: 1.6;
  }

  body.support-page .data-lead {
    margin: 0.2em auto;
    line-height: 1.25;
    max-width: 860px;
    text-wrap: balance;
  }

  body.support-page .morpheus-stage {
    margin-top: 0.55em;
  }

  .data-card {
    max-width: 860px;
    margin: 0 auto 1em auto;
    padding: 1em;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
  }

  .data-card-danger {
    border-color: rgba(255, 107, 107, 0.35);
    background: rgba(255, 107, 107, 0.06);
  }

  .data-card-title {
    margin: 0 0 0.35em 0;
    font-weight: 900;
  }

  .data-card-hint {
    margin: 0 0 0.75em 0;
    opacity: 0.92;
    line-height: 1.55;
  }

  .data-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6em;
    margin: 0.6em 0 0.8em 0;
  }

  .data-btn {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    text-decoration: none;
    padding: 0.6em 0.8em;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  }

  .data-btn:hover {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.24);
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.34);
    filter: saturate(1.02) brightness(1.02);
  }

  .data-btn:active {
    transform: translateY(0);
    box-shadow: 0 9px 18px rgba(0, 0, 0, 0.26);
    filter: none;
  }

  .data-btn[aria-disabled="true"] {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
  }

  .data-btn:focus-visible {
    outline: 3px solid rgba(30, 107, 255, 0.85);
    outline-offset: 3px;
  }

  .data-btn-secondary {
    position: relative;
    overflow: hidden;
  }

  .data-btn-danger {
    border-color: rgba(255, 107, 107, 0.42);
    background: rgba(255, 107, 107, 0.12);
  }

  .data-btn-danger:hover {
    background: rgba(255, 107, 107, 0.18);
  }

  /* Membership plans */
  .plan-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    gap: 1em;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    align-items: stretch;
  }

  .plan-item {
    display: flex;
    flex-direction: column;
    gap: 0.85em;
    height: 100%;
  }

  .plan-details {
    text-align: center;
    display: flex;
    flex-direction: column;
    flex: 1;
  }

  .plan-card {
    --accent-1: rgba(255, 255, 255, 0.18);
    --accent-2: rgba(255, 255, 255, 0.08);
    --aura: rgba(255, 255, 255, 0.16);
    --tilt: -0.25deg;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-hover-bg: rgba(255, 255, 255, 0.06);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.45em;
    text-align: center;
    position: relative;
    padding: 1em;
    border-radius: 14px;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.12);
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.22s ease, background 0.22s ease, border-color 0.22s ease;
    will-change: transform;
  }

  .plan-card::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: radial-gradient(120% 120% at 18% 10%, var(--accent-1), var(--accent-2), transparent 62%);
    opacity: 0;
    transition: opacity 0.18s ease;
    pointer-events: none;
  }

  .plan-card > * {
    position: relative;
    z-index: 1;
  }

  .plan-card:hover {
    transform: rotate(var(--tilt));
    box-shadow:
      0 14px 34px rgba(0, 0, 0, 0.48),
      0 0 26px var(--aura);
    background: var(--card-hover-bg);
    border-color: rgba(255, 255, 255, 0.18);
  }

  .plan-card:hover::before {
    opacity: 1;
  }

  .plan-card:focus-visible {
    outline: 3px solid rgba(30, 107, 255, 0.85);
    outline-offset: 4px;
  }

  .plan-card[aria-disabled="true"] {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
  }

  .plan-image {
    width: calc(100% + 2em);
    height: 220px;
    margin: -1em -1em 0.85em -1em;
    display: block;
    object-fit: cover;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    filter: saturate(1.05) contrast(1.05);
    transition: transform 0.18s ease, filter 0.18s ease;
  }

  .plan-card-image {
    padding: 0;
    gap: 0;
    text-align: left;
    display: block;
  }

  /* Image-only card variant: show the whole image (no crop) */
  .plan-card-image .plan-image {
    width: 100%;
    height: auto;
    max-height: 420px;
    margin: 0;
    object-fit: contain;
    border-bottom: 0;
    background: var(--card-bg);
    border-radius: inherit;
  }

  .plan-card-image:hover .plan-image {
    background: var(--card-hover-bg);
  }

  .plan-card:hover .plan-image {
    transform: scale(1.04);
  }

  .plan-card-image:hover .plan-image {
    transform: none;
  }

  .plan-card-walker {
    /* Sofia Runner (blue) — extracted from image: #0050E0 */
    --accent-1: rgba(0, 80, 224, 0.55);
    --accent-2: rgba(0, 64, 176, 0.22);
    --aura: rgba(0, 80, 224, 0.24);
    --tilt: -0.35deg;
    --card-bg: rgba(0, 80, 224, 0.06);
    --card-hover-bg: rgba(0, 80, 224, 0.13);
    box-shadow: 0 0 0 1px rgba(0, 80, 224, 0.20) inset;
  }

  .plan-card-runner {
    /* Syndicate Member (green) */
    /* extracted from image: #80B010 */
    --accent-1: rgba(128, 176, 16, 0.50);
    --accent-2: rgba(112, 160, 0, 0.20);
    --aura: rgba(128, 176, 16, 0.22);
    --tilt: -0.25deg;
    --card-bg: rgba(128, 176, 16, 0.055);
    --card-hover-bg: rgba(128, 176, 16, 0.12);
    box-shadow: 0 0 0 1px rgba(128, 176, 16, 0.20) inset;
  }

  .plan-card-legend {
    /* Cult Leader (orange) */
    /* extracted from image: #E06010 */
    --accent-1: rgba(224, 96, 16, 0.52);
    --accent-2: rgba(240, 96, 16, 0.19);
    --aura: rgba(224, 96, 16, 0.22);
    --tilt: 0.35deg;
    --card-bg: rgba(224, 96, 16, 0.055);
    --card-hover-bg: rgba(224, 96, 16, 0.12);
    box-shadow: 0 0 0 1px rgba(224, 96, 16, 0.20) inset;
  }

  .plan-kicker {
    margin: 0 0 0.35em 0;
    font-weight: 900;
    letter-spacing: 0.2px;
    opacity: 0.92;
  }

  .plan-title {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 1000;
  }

  .plan-hint {
    margin: 0.45em 0 0.75em 0;
    opacity: 0.9;
    line-height: 1.55;
  }

  .plan-features {
    margin: 0.1em 0 0.9em 1.1em;
    padding: 0;
    line-height: 1.55;
    opacity: 0.95;
    align-self: stretch;
    text-align: left;
  }

  .plan-features-solid {
    opacity: 1;
    color: rgba(255, 255, 255, 0.95);
  }

  .plan-cta {
    margin: 0.2em 0 0 0;
    font-weight: 900;
    opacity: 0.92;
  }

  .plan-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 12px;
    transition: transform 0.18s ease, filter 0.18s ease, opacity 0.18s ease;
    position: relative;
  }

  .plan-cta-wrap {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  .plan-cta-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 45px;
    font-weight: 1000;
    letter-spacing: 0.3px;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
    pointer-events: none;
    user-select: none;
  }

  .plan-cta-image {
    width: min(320px, 100%);
    height: auto;
    display: block;
  }

  .plan-cta-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.02) saturate(1.02);
  }

  .plan-cta-btn:focus-visible {
    outline: 3px solid rgba(30, 107, 255, 0.85);
    outline-offset: 4px;
  }

  .plan-cta-btn[aria-disabled="true"] {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
    filter: none;
  }

  .plan-card-featured {
    /* Featured plan currently used on Syndicate Member */
    border-color: rgba(128, 176, 16, 0.35);
    --card-bg: rgba(128, 176, 16, 0.055);
    --card-hover-bg: rgba(128, 176, 16, 0.13);
  }

  /* Support (Morpheus) page */
  .morpheus-stage {
    max-width: 1100px;
    margin: 0.85em auto 0 auto;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 0;
    background: transparent;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.48);
  }

  .morpheus-image {
    width: 100%;
    height: auto;
    display: block;
  }

  .pill-hit {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    padding: 0;
    position: absolute;
    display: block;
    border-radius: 999px;
    cursor: pointer;
    z-index: 3;
    background: rgba(255, 255, 255, 0);
    transition: background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
    touch-action: manipulation;
  }

  .pill-hit:hover {
    background: transparent;
    box-shadow: none;
    transform: none;
  }

  .comic-bubble {
    position: absolute;
    z-index: 4;
    max-width: min(320px, calc(100% - 2.2em));
    padding: 0.55em 0.75em;
    border-radius: 18px;
    border: 2px solid rgba(0, 0, 0, 0.92);
    background: rgba(255, 255, 255, 0.92);
    color: rgba(0, 0, 0, 0.95);
    font-weight: 900;
    letter-spacing: 0.1px;
    line-height: 1.25;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.40);
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    transition: opacity 0.16s ease, transform 0.16s ease;
    pointer-events: none;
    user-select: none;
  }

  /* Bubble positions (relative to image) */
  .bubble-red {
    left: 32%;
    top: 41.5%;
    transform: translate(-50%, 10px) scale(0.98);
  }

  .bubble-blue {
    left: 68%;
    top: 41.5%;
    transform: translate(-50%, 10px) scale(0.98);
  }

  /* Bubble tails (border + fill) */
  .comic-bubble::before,
  .comic-bubble::after {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
    pointer-events: none;
  }

  .bubble-red::before {
    left: 38px;
    bottom: -18px;
    border-width: 18px 14px 0 14px;
    border-color: rgba(0, 0, 0, 0.92) transparent transparent transparent;
    transform: rotate(-26deg);
  }

  .bubble-red::after {
    left: 40px;
    bottom: -14px;
    border-width: 14px 12px 0 12px;
    border-color: rgba(255, 255, 255, 0.92) transparent transparent transparent;
    transform: rotate(-26deg);
  }

  .bubble-red {
    max-width: min(240px, calc(100% - 2.2em));
    padding: 0.45em 0.6em;
    border-radius: 16px;
    font-size: 0.92em;
  }

  .bubble-blue::before {
    right: 38px;
    bottom: -18px;
    border-width: 18px 14px 0 14px;
    border-color: rgba(0, 0, 0, 0.92) transparent transparent transparent;
    transform: rotate(26deg);
  }

  .bubble-blue::after {
    right: 40px;
    bottom: -14px;
    border-width: 14px 12px 0 12px;
    border-color: rgba(255, 255, 255, 0.92) transparent transparent transparent;
    transform: rotate(26deg);
  }

  .bubble-blue {
    max-width: min(300px, calc(100% - 2.2em));
    padding: 0.4em 0.55em;
    border-radius: 14px;
    font-size: 0.86em;
    line-height: 1.18;
  }

  /* Show bubble on hover/focus of the corresponding pill */
  .pill-red:hover + .bubble-red,
  .pill-red:focus-visible + .bubble-red,
  .bubble-red.is-open {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }

  .pill-blue:hover + .bubble-blue,
  .pill-blue:focus-visible + .bubble-blue,
  .bubble-blue.is-open {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }

  @media (max-width: 520px) {
    body.support-page .section {
      padding: 0 0.75em;
    }

    body.support-page .data-lead {
      font-size: 0.98em;
      line-height: 1.3;
    }

    body.support-page .morpheus-stage {
      overflow: visible;
      margin-bottom: 8.5em;
    }

    body.support-page .comic-bubble {
      max-width: calc(100% - 1.2em);
    }

    /* On mobile, show bubbles below the image so they don't cover Morpheus */
    body.support-page .bubble-red {
      left: 0.6em;
      top: calc(100% + 0.55em);
      transform: translateY(10px) scale(0.98);
    }

    body.support-page .bubble-blue {
      left: auto;
      right: 0.6em;
      top: calc(100% + 0.55em);
      transform: translateY(10px) scale(0.98);
    }

    body.support-page .pill-red:hover + .bubble-red,
    body.support-page .pill-red:focus-visible + .bubble-red,
    body.support-page .bubble-red.is-open {
      transform: translateY(0) scale(1);
    }

    body.support-page .pill-blue:hover + .bubble-blue,
    body.support-page .pill-blue:focus-visible + .bubble-blue,
    body.support-page .bubble-blue.is-open {
      transform: translateY(0) scale(1);
    }

    /* Flip tails upward (toward the pills) */
    body.support-page .bubble-red::before {
      bottom: auto;
      top: -18px;
      left: 42px;
      border-width: 0 14px 18px 14px;
      border-color: transparent transparent rgba(0, 0, 0, 0.92) transparent;
      transform: rotate(18deg);
    }

    body.support-page .bubble-red::after {
      bottom: auto;
      top: -14px;
      left: 44px;
      border-width: 0 12px 14px 12px;
      border-color: transparent transparent rgba(255, 255, 255, 0.92) transparent;
      transform: rotate(18deg);
    }

    body.support-page .bubble-blue::before {
      bottom: auto;
      top: -18px;
      right: 42px;
      border-width: 0 14px 18px 14px;
      border-color: transparent transparent rgba(0, 0, 0, 0.92) transparent;
      transform: rotate(-18deg);
    }

    body.support-page .bubble-blue::after {
      bottom: auto;
      top: -14px;
      right: 44px;
      border-width: 0 12px 14px 12px;
      border-color: transparent transparent rgba(255, 255, 255, 0.92) transparent;
      transform: rotate(-18deg);
    }
  }

  .pill-hit:focus-visible {
    outline: 3px solid rgba(30, 107, 255, 0.85);
    outline-offset: 4px;
  }

  /* Positioned as percentages so it scales with the image */
  .pill-red {
    left: 13.5%;
    top: 60.5%;
    width: 19%;
    height: 12%;
    transform: rotate(-10deg);
  }

  .pill-blue {
    left: 67.5%;
    top: 60.5%;
    width: 19%;
    height: 12%;
    transform: rotate(10deg);
  }

  /* Shop pages: keep cards compact (closer to homepage card sizing) */
  body.shop-page .plan-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 280px));
    justify-content: center;
  }

  body.shop-page .product-variants {
    min-height: 3.9em;
    align-content: center;
  }

  body.shop-page .sizes-wrap-center {
    min-height: 2.8em;
    align-content: center;
  }

  body.shop-page .shop-category-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 280px));
    justify-content: center;
  }

  body.shop-page .shop-category-link {
    max-width: 280px;
  }

  /* Shop: product variant picker (colors) */
  .shop-image-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
  }

  .shop-image-card {
    width: 100%;
    height: 100%;
    max-height: none;
    margin: 0;
    object-fit: cover;
    display: block;
    border-radius: 14px;
    border: 0;
    background: rgba(var(--selected-variant-rgb, 255, 255, 255), 0.16);
    transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.22s ease, background 0.22s ease;
    will-change: transform;
  }

  .shop-image-card-link:hover .shop-image-card {
    transform: translateY(-1px);
    background: rgba(var(--selected-variant-rgb, 255, 255, 255), 0.20);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.48);
  }

  .shop-image-card-link:focus-visible {
    outline: none;
  }

  .shop-image-card-link:focus-visible .shop-image-card {
    outline: 3px solid rgba(30, 107, 255, 0.85);
    outline-offset: 4px;
  }

  .shop-image-card-link[aria-disabled="true"] {
    cursor: not-allowed;
  }

  .shop-image-card-link[aria-disabled="true"] .shop-image-card {
    opacity: 0.85;
    transform: none;
    box-shadow: none;
  }

  .shop-product-visual {
    aspect-ratio: 4 / 5;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .shop-product-visual .shop-image-card-link {
    height: 100%;
  }

  .shop-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1em;
    margin-top: 0.75em;
  }

  .shop-category-link {
    max-width: 520px;
    margin: 0 auto;
    position: relative;
    border-radius: 16px;
    padding: 0.6em;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.40);
    cursor: pointer;
    transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.22s ease, background 0.22s ease, border-color 0.22s ease;
  }

  .shop-category-link:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.20);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.52);
  }

  .shop-category-link:focus-visible {
    outline: 3px solid rgba(30, 107, 255, 0.85);
    outline-offset: 4px;
  }

  .shop-category-image {
    max-height: 420px;
  }

  .shop-category-title {
    display: block;
    margin-top: 0.55em;
    text-align: center;
    font-weight: 900;
    letter-spacing: 0.2px;
    opacity: 0.95;
  }

  body.image-viewer-open {
    overflow: hidden;
  }

  .image-viewer {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: grid;
    place-items: center;
    padding: 1.1em;
    background: rgba(0, 0, 0, 0.82);
    box-sizing: border-box;
  }

  .image-viewer[hidden] {
    display: none;
  }

  .image-viewer-img {
    width: min(1100px, 100%);
    max-height: 86vh;
    height: auto;
    display: block;
    margin: 0 auto;
    object-fit: contain;
    border-radius: 14px;
    border: 0;
    background: rgba(0, 0, 0, 0.35);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.62);
  }

  .image-viewer-close {
    position: fixed;
    top: 0.9em;
    left: 0.9em;
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 1000;
    line-height: 1;
    display: inline-grid;
    place-items: center;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
    z-index: 5001;
  }

  .image-viewer-close:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.30);
    transform: translateY(-1px);
  }

  .image-viewer-close:focus-visible {
    outline: 3px solid rgba(30, 107, 255, 0.85);
    outline-offset: 3px;
  }

  .product-variants {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35em;
    justify-content: center;
    margin: 0.4em 0 0.15em 0;
  }

  .sizes-wrap {
    position: relative;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.4em;
    align-items: center;
    min-height: 2.2em;
  }

  .sizes-wrap-center {
    width: 100%;
    justify-content: center;
    margin: 0.25em 0 0.55em 0;
  }

  .sizes-label {
    font-weight: 900;
    opacity: 0.95;
    margin-right: 0.15em;
  }

  .size-btn {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    padding: 0.26em 0.55em;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 900;
    font-size: 0.8em;
    line-height: 1.1;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  }

  .size-btn:hover {
    background: rgba(255, 255, 255, 0.10);
  }

  .size-btn[aria-pressed="true"] {
    border-color: rgba(255, 255, 255, 0.48);
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35) inset, 0 10px 20px rgba(0, 0, 0, 0.28);
    transform: translateY(-1px);
  }

  .size-btn:focus-visible {
    outline: 3px solid rgba(30, 107, 255, 0.85);
    outline-offset: 3px;
  }

  .size-chart {
    position: absolute;
    left: 50%;
    top: calc(100% + 0.55em);
    transform: translateX(-50%) translateY(-6px);
    width: min(520px, calc(100vw - 1.8em));
    padding: 0.45em;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(0, 0, 0, 0.88);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
    z-index: 40;
  }

  .sizes-wrap:hover .size-chart,
  .sizes-wrap:focus-within .size-chart,
  .sizes-wrap.is-open .size-chart {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
  }

  .size-chart-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    background: #ffffff;
  }

  @media (max-width: 420px) {
    .size-chart {
      position: fixed;
      left: 50%;
      top: 50%;
      width: calc(100vw - 1.2em);
      max-height: 80vh;
      overflow: auto;
      padding: 0.4em;
      transform: translate(-50%, -50%);
    }

    .sizes-wrap:hover .size-chart,
    .sizes-wrap:focus-within .size-chart,
    .sizes-wrap.is-open .size-chart {
      transform: translate(-50%, -50%);
    }
  }

  .variant-btn {
    --variant-color: rgba(255, 255, 255, 0.55);
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    padding: 0.26em 0.5em;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
    font-size: 0.78em;
    letter-spacing: 0.15px;
    line-height: 1.1;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  }

  .variant-btn::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--variant-color);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35) inset, 0 0 0 1px rgba(255, 255, 255, 0.18);
  }

  .variant-btn:hover {
    background: rgba(255, 255, 255, 0.10);
  }

  .variant-btn[aria-pressed="true"] {
    border-color: rgba(255, 255, 255, 0.50);
    background: rgba(255, 255, 255, 0.18);
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.35) inset,
      0 0 0 3px rgba(var(--selected-variant-rgb, 255, 255, 255), 0.35),
      0 10px 20px rgba(0, 0, 0, 0.28);
    transform: translateY(-1px);
  }

  @media (max-width: 420px) {
    .variant-btn {
      font-size: 0.74em;
      padding: 0.24em 0.45em;
      gap: 0.35em;
    }

    .variant-btn::before {
      width: 9px;
      height: 9px;
    }
  }

  .variant-btn:focus-visible {
    outline: 3px solid rgba(30, 107, 255, 0.85);
    outline-offset: 3px;
  }

  .data-file {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
  }

  .data-textarea {
    width: 100%;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(0, 0, 0, 0.35);
    color: #ffffff;
    padding: 0.85em;
    line-height: 1.45;
    resize: vertical;
  }

  .data-textarea:focus-visible {
    outline: 3px solid rgba(30, 107, 255, 0.85);
    outline-offset: 3px;
  }

  .data-import-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9em;
    margin-top: 0.2em;
  }

  .data-radio {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    opacity: 0.95;
    font-weight: 700;
  }

  .data-status {
    margin: 0.6em 0 0 0;
    min-height: 1.25em;
    opacity: 0.95;
  }

  .data-status.is-ok {
    color: rgba(110, 240, 170, 0.95);
  }

  .data-status.is-bad {
    color: rgba(255, 107, 107, 0.95);
  }

  .data-summary {
    display: grid;
    gap: 0.55em;
  }

  .data-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 1em;
    padding: 0.6em 0.7em;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.03);
  }

  .data-summary-row code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.92em;
  }

  .social-links {
    margin-top: 1em;
    margin-bottom: 2em;
    display: flex;
    gap: 1em;
  }
  
  .social-icon {
    width: 40px;
    height: 40px;
    background-color: #000;
    color: #fff;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    transition: background-color 0.3s;
    text-decoration: none;
  }


  .social-icon img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
  }

  .social-links a img {
    width: 40px;
    height: 40px;
  }
  
  .social-icon.instagram {
    background-color: #E1306C;
  }
  
  .social-icon.facebook {
    background-color: #3b5998;
  }

  .social-icon.spotify {
    background-color: #1DB954; /* Зелен фон за Spotify */
  }

  .social-links a[href*="discord.gg"]:hover {
    background-color: #5865F2; /* официално лилаво-синьо на Discord */
  }
  
  .social-icon:hover {
    filter: brightness(1.2);
  }

  p a {
    color: #1DB954; /* например зелено като Spotify */
    text-decoration: none; /* или none за без подчертаване */
    font-weight: bold;
  }
  
  p a:hover {
    color: #14833b; /* по-тъмен зелен при hover */
    text-decoration: none;
  }

  .map-container iframe {
    width: 100%;
    height: 300px;
    border: none;
    border-radius: 8px;
  }

  /* Coach to 5k program page */
  .program-page {
    max-width: 1100px;
  }

  .program-title {
    margin-top: 0.2em;
    margin-bottom: 0.35em;
    text-align: center;
    font-size: clamp(1.8em, 4vw, 2.4em);
    letter-spacing: 0.02em;
  }

  .program-notes {
    max-width: 760px;
    margin: 0 auto 1.2em auto;
    text-align: left;
  }

  .program-notes-list {
    margin: 0;
    padding-left: 1.25em;
    line-height: 1.6;
    opacity: 0.95;
  }

  .program-notes-text {
    margin: 0;
    line-height: 1.6;
    opacity: 0.95;
  }

  .program-notes-list li {
    margin: 0.4em 0;
  }

  .program-finish {
    max-width: 760px;
    margin: 0 auto 1.1em auto;
    padding: 1.05em 1.1em;
    border-radius: 18px;
    border: 1px solid rgba(110, 240, 170, 0.40);
    background:
      radial-gradient(1200px 220px at 10% 0%, rgba(110, 240, 170, 0.22), transparent 55%),
      radial-gradient(900px 240px at 90% 0%, rgba(30, 107, 255, 0.16), transparent 55%),
      rgba(255, 255, 255, 0.04);
    position: relative;
    overflow: hidden;
    box-shadow:
      0 22px 60px rgba(0, 0, 0, 0.32),
      0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  }

  .program-finish::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(90deg, rgba(110, 240, 170, 0.75), rgba(30, 107, 255, 0.55), rgba(255, 210, 74, 0.55));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.65;
  }

  .program-finish::after {
    content: "";
    position: absolute;
    top: -35%;
    left: -30%;
    width: 55%;
    height: 180%;
    background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.18) 45%, transparent 80%);
    transform: rotate(12deg);
    animation: program-finish-shine 2.4s ease-in-out infinite;
    pointer-events: none;
    opacity: 0.35;
  }

  @keyframes program-finish-shine {
    0% { transform: translateX(-20%) rotate(12deg); }
    50% { transform: translateX(140%) rotate(12deg); }
    100% { transform: translateX(140%) rotate(12deg); }
  }

  .program-finish-kicker {
    margin: 0;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    opacity: 0.92;
  }

  .program-finish-title {
    margin: 0.25em 0 0 0;
    font-weight: 950;
    font-size: clamp(1.3em, 2.3vw, 1.9em);
    line-height: 1.15;
    text-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  }

  .program-finish-subtitle {
    margin: 0.35em 0 0 0;
    opacity: 0.95;
  }

  .program-celebrate {
    position: fixed;
    inset: 0;
    z-index: 2500;
    pointer-events: none;
  }

  .program-celebrate-message {
    position: absolute;
    left: 50%;
    top: 18%;
    transform: translateX(-50%);
    max-width: min(820px, 92vw);
    padding: 1.15em 1.3em;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background:
      radial-gradient(900px 220px at 50% 0%, rgba(110, 240, 170, 0.14), transparent 60%),
      rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-align: center;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
    animation: celebrate-pop 0.42s cubic-bezier(0.2, 0.9, 0.2, 1) both;
  }

  .program-celebrate-message::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(90deg, rgba(110, 240, 170, 0.75), rgba(30, 107, 255, 0.55), rgba(255, 210, 74, 0.55));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.65;
  }

  @keyframes celebrate-pop {
    0% { opacity: 0; transform: translateX(-50%) translateY(-10px) scale(0.98); }
    100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
  }

  .program-celebrate-kicker {
    margin: 0;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    opacity: 0.92;
  }

  .program-celebrate-title {
    margin: 0.25em 0 0 0;
    font-weight: 950;
    font-size: clamp(1.35em, 3vw, 2.2em);
    line-height: 1.1;
    text-shadow: 0 18px 40px rgba(0, 0, 0, 0.42);
  }

  .program-celebrate-fireworks,
  .program-celebrate-confetti {
    position: absolute;
    inset: 0;
    overflow: hidden;
  }

  .program-celebrate-confetti .confetti-piece {
    position: absolute;
    top: -16px;
    width: var(--size, 10px);
    height: calc(var(--size, 10px) * 0.55);
    border-radius: 2px;
    background: var(--color, #6ef0aa);
    opacity: 0;
    transform: translate3d(0, -20px, 0) rotate(0deg);
    animation: confetti-fall var(--dur, 2.6s) ease-in var(--delay, 0s) forwards;
  }

  @keyframes confetti-fall {
    0% {
      opacity: 0;
      transform: translate3d(0, -30px, 0) rotate(0deg);
    }
    8% {
      opacity: 1;
    }
    100% {
      opacity: 0;
      transform: translate3d(0, 110vh, 0) rotate(var(--spin, 360deg));
    }
  }

  .program-celebrate-fireworks .firework-burst {
    position: absolute;
    width: 0;
    height: 0;
    transform: translate(-50%, -50%);
    animation: firework-pop 1.15s ease-out var(--delay, 0s) both;
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.35));
  }

  .program-celebrate-fireworks .firework-particle {
    position: absolute;
    left: 0;
    top: 0;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: hsl(var(--hue, 140deg) 90% 65%);
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(1);
    animation: firework-particle 1.15s ease-out var(--delay, 0s) both;
  }

  @keyframes firework-pop {
    0% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.6);
    }
    10% {
      opacity: 1;
    }
    100% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(1.05);
    }
  }

  @keyframes firework-particle {
    0% {
      opacity: 0;
      transform: translate3d(0, 0, 0) scale(0.8);
    }
    18% {
      opacity: 1;
    }
    100% {
      opacity: 0;
      transform: translate3d(var(--dx, 60px), var(--dy, -40px), 0) scale(0.2);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .program-celebrate {
      display: none;
    }

    .program-finish::after {
      animation: none;
    }

    .program-celebrate-message {
      animation: none;
    }
  }

  .program-progress {
    max-width: 760px;
    margin: 0 auto 1.25em auto;
    padding: 0.9em 1em;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    position: sticky;
    top: 68px;
    z-index: 900;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
  }

  @media (max-width: 640px) {
    .program-progress {
      top: 56px;
    }
  }

  .program-progress-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.8em;
    margin-bottom: 0.65em;
  }

  .program-progress-label {
    margin: 0;
    font-weight: 900;
  }

  .program-progress-value {
    margin: 0;
    opacity: 0.9;
    font-weight: 700;
  }

  .program-progress-bar {
    height: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.12);
    overflow: hidden;
  }

  .program-progress-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(110, 240, 170, 0.85), rgba(110, 240, 170, 0.55));
    box-shadow: 0 10px 24px rgba(110, 240, 170, 0.20);
    transition: width 0.22s ease;
  }

  .program-table-wrap {
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
  }

  .program-table {
    width: 100%;
    border-collapse: collapse;
  }

  .program-cards {
    display: none;
    gap: 1em;
  }

  .program-card {
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    padding: 1em;
  }

  .program-card.is-week-done {
    border-color: rgba(110, 240, 170, 0.35);
    background: rgba(110, 240, 170, 0.07);
  }

  .program-card-title {
    margin: 0 0 0.75em 0;
    font-size: 1.2em;
    font-weight: 900;
  }

  .program-card-workout {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.85em 0.9em;
    margin-top: 0.75em;
    cursor: pointer;
    position: relative;
    transition: background 0.18s ease, border-color 0.18s ease;
  }

  .program-card-workout:hover {
    background: rgba(255, 255, 255, 0.06);
  }

  .program-card-workout:focus-visible {
    outline: 3px solid rgba(30, 107, 255, 0.85);
    outline-offset: 3px;
  }

  .program-card-workout.is-done {
    border-color: rgba(110, 240, 170, 0.40);
    background: rgba(110, 240, 170, 0.12);
  }

  .program-card-workout.is-done::after {
    content: "✓";
    position: absolute;
    top: 10px;
    right: 10px;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 14px;
    line-height: 1;
    color: rgba(15, 25, 20, 0.95);
    background: rgba(110, 240, 170, 0.95);
    box-shadow: 0 10px 24px rgba(110, 240, 170, 0.28);
  }

  .program-card-workout-title {
    margin: 0 0 0.5em 0;
    font-size: 1em;
    font-weight: 800;
    opacity: 0.95;
  }

  .program-card-workout-body {
    line-height: 1.65;
    opacity: 0.95;
  }

  .program-table th,
  .program-table td {
    border: 1px solid rgba(255, 255, 255, 0.10);
    padding: 0.85em 0.9em;
    vertical-align: top;
    line-height: 1.6;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .program-table-workout {
    cursor: pointer;
    position: relative;
    padding-right: 2.2em;
    transition: background 0.18s ease, border-color 0.18s ease;
  }

  .program-table-workout:hover {
    background: rgba(255, 255, 255, 0.05);
  }

  .program-table-workout:focus-visible {
    outline: 3px solid rgba(30, 107, 255, 0.85);
    outline-offset: -3px;
  }

  .program-table-workout.is-done {
    background: rgba(110, 240, 170, 0.12);
    border-color: rgba(110, 240, 170, 0.28);
  }

  .program-table-workout.is-done::after {
    content: "✓";
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 13px;
    line-height: 1;
    color: rgba(15, 25, 20, 0.95);
    background: rgba(110, 240, 170, 0.95);
    box-shadow: 0 10px 20px rgba(110, 240, 170, 0.22);
    pointer-events: none;
  }

  .program-table thead th {
    background: rgba(255, 255, 255, 0.08);
  }

  .program-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.03);
  }

  .program-table tbody th {
    white-space: nowrap;
    text-align: center;
    font-weight: 900;
    width: 5.5em;
    background: rgba(255, 255, 255, 0.02);
  }

  .program-table tbody tr.is-week-done th[scope="row"] {
    background: rgba(110, 240, 170, 0.12);
    border-color: rgba(110, 240, 170, 0.28);
  }

  .program-back {
    margin-top: 1em;
  }

  .program-back a {
    color: #1DB954;
    font-weight: bold;
    text-decoration: none;
  }

  .program-back a:hover {
    color: #14833b;
  }

  @media (max-width: 820px) {
    .program-table-wrap {
      display: none;
    }

    .program-cards {
      display: grid;
    }
  }

  /* Attendance (weekly check-in) */
  .attendance-inline {
    margin-top: 1em;
  }

  .attendance-btn {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(29, 185, 84, 0.16);
    color: #ffffff;
    font-weight: 800;
    padding: 0.65em 0.9em;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
  }

  .attendance-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
  }

  .attendance-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
  }

  .attendance-status {
    display: none;
    margin-top: 0.65em;
    padding: 0.75em 0.85em;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(0, 0, 0, 0.20);
  }

  .attendance-status.is-ok,
  .attendance-status.is-warn,
  .attendance-status.is-bad {
    display: block;
  }

  .attendance-status.is-ok {
    border-color: rgba(110, 240, 170, 0.35);
    background: rgba(110, 240, 170, 0.10);
  }

  .attendance-status.is-warn {
    border-color: rgba(255, 215, 0, 0.35);
    background: rgba(255, 215, 0, 0.10);
  }

  .attendance-status.is-bad {
    border-color: rgba(255, 80, 80, 0.35);
    background: rgba(255, 80, 80, 0.10);
  }