/* ==========================================================================
   HAS DIGITAL MEDAL VAULT — ARYA DINAR (2026–2027 SEASON)
   Pure Static Aquatic Stylesheet (Landing + Personal Digital Medal Vault)
   Approved Aquatic Colour System:
   - Ice Water:    #EAF8FD
   - Sky Water:    #BDEAF7
   - Pool Blue:    #72C8E6
   - Deep Aquatic: #167CA6
   - Ocean Navy:   #12334D
   - Medal Gold:   #C9A227
   - White:        #FFFFFF
   ========================================================================== */

:root {
  --ice-water: #EAF8FD;
  --sky-water: #BDEAF7;
  --pool-blue: #72C8E6;
  --deep-aquatic: #167CA6;
  --ocean-navy: #12334D;
  --ocean-navy-soft: rgba(18, 51, 77, 0.72);
  --ocean-navy-muted: rgba(18, 51, 77, 0.56);
  --medal-gold: #C9A227;
  --medal-gold-text: #9A7410;
  --white: #FFFFFF;

  --aq-sky: #8CCFF0;
  --aq-water: #DDF4FC;
  --aq-aqua: #B8E8F2;
  --aq-gold-label: #9C7812;

  --border-water: rgba(22, 124, 166, 0.14);
  --border-water-strong: rgba(22, 124, 166, 0.24);
  --shadow-soft: 0 10px 28px rgba(18, 51, 77, 0.07);
  --shadow-card: 0 14px 34px rgba(18, 51, 77, 0.08), 0 2px 8px rgba(22, 124, 166, 0.06);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Fraunces', 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-mono: 'Roboto Mono', 'SF Mono', Menlo, Consolas, monospace;

  --ease-aquatic: cubic-bezier(0.16, 1, 0.3, 1);
  --header-height: 54px;
  --nav-height: 60px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  background-color: var(--ice-water);
  color: var(--ocean-navy);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  height: 100%;
}

body.app-body {
  min-height: 100%;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
  color: var(--ocean-navy);
  background-color: var(--ice-water);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.app-body.is-landing {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: linear-gradient(175deg, var(--white) 0%, var(--aq-water) 26%, var(--aq-aqua) 64%, var(--aq-sky) 100%);
}

body.app-body.is-vault {
  display: flex;
  flex-direction: column;
  background-color: #DFF0F7;
}

/* Mode Visibility */
body.is-landing .vault-shell,
body.is-landing .vault-bottom-nav,
body.is-landing .vault-ambient {
  display: none;
}

body.is-vault .landing-screen,
body.is-vault .aquatic-stage {
  display: none;
}

/* ==========================================================================
   PART 1: BRIGHT AQUATIC LANDING EXPERIENCE
   ========================================================================== */
.aquatic-stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.aquatic-sunlight-wash {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 55% at 50% 24%, rgba(255, 255, 255, 0.92) 0%, rgba(221, 244, 252, 0.45) 45%, transparent 78%),
    radial-gradient(circle at 80% 15%, rgba(255, 255, 255, 0.55) 0%, transparent 45%),
    radial-gradient(circle at 20% 82%, rgba(140, 207, 240, 0.38) 0%, transparent 55%);
}

.water-caustics-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.72;
}

.aquatic-surface-shimmer {
  position: absolute;
  top: -15%;
  left: -25%;
  width: 150%;
  height: 70%;
  background: linear-gradient(
    115deg,
    transparent 20%,
    rgba(255, 255, 255, 0.26) 44%,
    rgba(255, 255, 255, 0.42) 50%,
    rgba(221, 244, 252, 0.18) 56%,
    transparent 76%
  );
  filter: blur(28px);
  transform: translateX(-6%) translateY(0);
  animation: surfaceDrift 14s ease-in-out infinite alternate;
}

@keyframes surfaceDrift {
  0% {
    transform: translateX(-6%) translateY(0) scale(1);
    opacity: 0.65;
  }
  100% {
    transform: translateX(6%) translateY(2%) scale(1.04);
    opacity: 0.95;
  }
}

.landing-screen {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 460px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(22px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: clamp(14px, 2.5dvh, 22px);
}

/* 1. Physical Gold Medal Presentation */
.medal-hero-stage {
  position: relative;
  height: clamp(220px, 37dvh, 340px);
  width: auto;
  aspect-ratio: 5 / 6;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  margin-bottom: clamp(2px, 0.8dvh, 8px);
}

.medal-hero-stage::before {
  content: '';
  position: absolute;
  top: 54%;
  left: 50%;
  width: 82%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.88) 0%,
    rgba(221, 244, 252, 0.45) 48%,
    rgba(201, 162, 39, 0.08) 68%,
    transparent 82%
  );
  filter: blur(14px);
  z-index: 0;
  opacity: 0;
  transition: opacity 1.4s var(--ease-aquatic);
}

.anim-medal-in .medal-hero-stage::before {
  opacity: 1;
}

.medal-card-3d {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  opacity: 0;
  transform: translateY(18px) scale(0.94);
  filter: brightness(1.06);
  transition:
    opacity 1.55s var(--ease-aquatic),
    transform 1.75s var(--ease-aquatic),
    filter 1.55s var(--ease-aquatic);
  will-change: opacity, transform;
}

.anim-medal-in .medal-card-3d {
  opacity: 1;
  transform: translateY(0) scale(1.04);
  filter: brightness(1);
}

.medal-pointer-layer {
  --pointer-rx: 0deg;
  --pointer-ry: 0deg;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateX(var(--pointer-rx)) rotateY(var(--pointer-ry));
  transition: transform 0.45s var(--ease-aquatic);
  will-change: transform;
}

.medal-face {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
  will-change: transform;
}

.anim-medal-float .medal-face {
  animation: medalSuspendFloat 7s ease-in-out infinite;
}

@keyframes medalSuspendFloat {
  0% {
    transform: translate3d(0, 0px, 0) rotateY(-3.2deg) rotateX(1.2deg);
  }
  25% {
    transform: translate3d(0, -5px, 0) rotateY(0.8deg) rotateX(-0.8deg);
  }
  50% {
    transform: translate3d(0, -7px, 0) rotateY(3.4deg) rotateX(-1.4deg);
  }
  75% {
    transform: translate3d(0, -2px, 0) rotateY(-0.6deg) rotateX(0.6deg);
  }
  100% {
    transform: translate3d(0, 0px, 0) rotateY(-3.2deg) rotateX(1.2deg);
  }
}

.medal-svg-graphic {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter:
    drop-shadow(0 18px 28px rgba(18, 51, 77, 0.20))
    drop-shadow(0 6px 12px rgba(18, 51, 77, 0.12))
    contrast(1.03)
    saturate(1.04);
  user-select: none;
  pointer-events: none;
}

.medal-reflective-sheen {
  position: absolute;
  inset: 22% 11% 5% 11%;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(
    circle at 34% 28%,
    rgba(255, 250, 224, 0.26) 0%,
    rgba(255, 255, 255, 0.08) 34%,
    transparent 66%
  );
  mix-blend-mode: soft-light;
  opacity: 0.75;
}

.anim-medal-float .medal-reflective-sheen {
  animation: reflectiveSheenPulse 7s ease-in-out infinite;
}

@keyframes reflectiveSheenPulse {
  0%, 100% {
    opacity: 0.6;
    transform: translate3d(-2%, -1%, 0);
  }
  50% {
    opacity: 0.95;
    transform: translate3d(3%, 2%, 0);
  }
}

.specular-glint-track {
  position: absolute;
  inset: 22% 11% 5% 11%;
  border-radius: 50%;
  overflow: hidden;
  pointer-events: none;
  z-index: 3;
}

.specular-light-sweep {
  position: absolute;
  top: -70%;
  left: -130%;
  width: 52%;
  height: 240%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0) 30%,
    rgba(255, 255, 255, 0.42) 48%,
    rgba(255, 246, 196, 0.68) 52%,
    rgba(255, 255, 255, 0.24) 56%,
    transparent 74%
  );
  transform: rotate(22deg);
  opacity: 0;
}

.anim-sweep-active .specular-light-sweep {
  animation: sweepGlanceLoop 8.5s var(--ease-aquatic) infinite;
}

@keyframes sweepGlanceLoop {
  0% {
    left: -130%;
    opacity: 0;
  }
  6% {
    opacity: 0.95;
  }
  26% {
    opacity: 0.9;
  }
  34% {
    left: 180%;
    opacity: 0;
  }
  100% {
    left: 180%;
    opacity: 0;
  }
}

.medal-water-shadow {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%) scale(0.95);
  width: 56%;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at 50% 50%,
    rgba(18, 51, 77, 0.22) 0%,
    rgba(18, 51, 77, 0.09) 46%,
    transparent 78%
  );
  filter: blur(7px);
  z-index: 1;
  opacity: 0;
  transition: opacity 1.5s var(--ease-aquatic), transform 1.5s var(--ease-aquatic);
}

.anim-medal-in .medal-water-shadow {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.anim-medal-float .medal-water-shadow {
  animation: shadowFloatResponse 7s ease-in-out infinite;
}

@keyframes shadowFloatResponse {
  0%, 100% {
    transform: translateX(-50%) scale(1.02);
    opacity: 0.95;
  }
  50% {
    transform: translateX(-50%) scale(0.88);
    opacity: 0.68;
  }
}

/* 2. Typography & Ownership Lockup */
.landing-identity {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.reveal-item {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.95s var(--ease-aquatic),
    transform 0.95s var(--ease-aquatic);
  will-change: opacity, transform;
}

.reveal-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.athlete-name {
  font-size: clamp(2.25rem, 9.2vw, 3.25rem);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.04;
  text-transform: uppercase;
  color: var(--ocean-navy);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
}

.gold-medal-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: clamp(8px, 1.4dvh, 12px);
}

.gold-label-rule {
  width: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--medal-gold));
}

.gold-label-rule.rule-right {
  background: linear-gradient(90deg, var(--medal-gold), transparent);
}

.gold-label-text {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--aq-gold-label);
}

.org-lockup {
  margin-top: clamp(14px, 2.2dvh, 20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.org-name {
  font-size: clamp(0.75rem, 3.2vw, 0.875rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ocean-navy);
}

.org-season {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ocean-navy-soft);
}

/* 3. Primary CTA: ENTER MY MEDAL */
.cta-action-wrap {
  width: 100%;
  max-width: 320px;
  margin-top: clamp(8px, 1.4dvh, 14px);
}

.btn-enter-medal {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  width: 100%;
  min-height: 56px;
  padding: 15px 28px;
  border-radius: 999px;
  background: linear-gradient(145deg, #1B4D78 0%, #12334D 54%, #0B2236 100%);
  border: 1px solid rgba(201, 162, 39, 0.45);
  color: var(--white);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  box-shadow:
    0 14px 28px rgba(18, 51, 77, 0.26),
    0 4px 10px rgba(18, 51, 77, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  cursor: pointer;
  overflow: hidden;
  user-select: none;
  transition:
    transform 0.32s var(--ease-aquatic),
    box-shadow 0.32s var(--ease-aquatic),
    background 0.32s ease,
    border-color 0.32s ease;
}

.btn-enter-medal:hover {
  transform: translateY(-2.5px);
  background: linear-gradient(145deg, #215A8C 0%, #153D5C 54%, #0D2940 100%);
  border-color: rgba(232, 198, 91, 0.72);
  box-shadow:
    0 18px 34px rgba(18, 51, 77, 0.32),
    0 6px 14px rgba(18, 51, 77, 0.18),
    0 0 0 3px rgba(255, 255, 255, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.30);
}

.btn-enter-medal:active,
.btn-enter-medal.is-tapped {
  transform: translateY(1px) scale(0.975);
  background: linear-gradient(145deg, #153B5C 0%, #0E293E 54%, #091B2B 100%);
  border-color: rgba(232, 198, 91, 0.85);
  box-shadow:
    0 6px 14px rgba(18, 51, 77, 0.28),
    0 2px 5px rgba(18, 51, 77, 0.18),
    inset 0 1px 2px rgba(0, 0, 0, 0.22);
}

.btn-enter-medal:focus-visible {
  outline: 2px solid var(--ocean-navy);
  outline-offset: 3px;
}

.btn-sheen {
  position: absolute;
  top: 0;
  left: -120%;
  width: 56%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(247, 229, 157, 0.14) 35%,
    rgba(255, 244, 204, 0.40) 50%,
    rgba(247, 229, 157, 0.14) 65%,
    transparent 100%
  );
  transform: skewX(-22deg);
  animation: btnSheenLoop 6.5s ease-in-out infinite;
  pointer-events: none;
}

.btn-enter-medal:hover .btn-sheen,
.btn-enter-medal.is-tapped .btn-sheen {
  animation: btnSheenTrigger 0.85s var(--ease-aquatic) forwards;
}

@keyframes btnSheenLoop {
  0%, 74% { left: -120%; }
  100% { left: 200%; }
}

@keyframes btnSheenTrigger {
  0% { left: -120%; }
  100% { left: 200%; }
}

.btn-arrow {
  display: inline-block;
  font-size: 16px;
  line-height: 1;
  color: #E7C456;
  transition: transform 0.32s var(--ease-aquatic), color 0.3s ease;
}

.btn-enter-medal:hover .btn-arrow,
.btn-enter-medal.is-tapped .btn-arrow {
  transform: translateX(5px);
  color: #F6DC84;
}

body.is-entering-vault {
  pointer-events: none;
}

body.is-entering-vault .landing-screen {
  opacity: 0;
  transform: translateY(-10px) scale(1.02);
  transition: opacity 0.38s var(--ease-aquatic), transform 0.38s var(--ease-aquatic);
}

body.is-entering-vault .aquatic-sunlight-wash {
  opacity: 1;
  background: radial-gradient(circle at 50% 50%, #FFFFFF 0%, var(--aq-water) 55%, var(--aq-aqua) 100%);
  transition: all 0.4s ease;
}

@media (min-width: 768px) {
  .landing-screen {
    max-width: 540px;
    gap: 24px;
  }

  .medal-hero-stage {
    height: clamp(290px, 42dvh, 368px);
  }
}

/* ==========================================================================
   PART 2: PERSONAL DIGITAL MEDAL VAULT (HOME · RACE · MOMENTS · MY MEDAL)
   ========================================================================== */
.vault-ambient {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background: linear-gradient(180deg, var(--white) 0%, var(--ice-water) 44%, #DFF0F7 100%);
}

.vault-water-caustics {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.48;
}

.vault-water-horizon {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 24vh;
  background: linear-gradient(180deg, transparent 0%, #DFF0F7 85%);
}

body.app-body.is-view-medal .vault-ambient {
  background: linear-gradient(180deg, var(--white) 0%, var(--ice-water) 52%, #DFF0F7 100%);
}

.vault-shell {
  position: relative;
  z-index: 10;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Sticky Minimal Header */
.vault-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: calc(var(--header-height) + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(114, 200, 230, 0.24);
}

.vault-header-inner {
  width: 100%;
  max-width: 760px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vault-header-athlete {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #14344E;
  text-align: center;
}

/* Main Viewport Container */
.vault-main {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  flex: 1 0 auto;
  padding: 20px 20px calc(var(--nav-height) + 28px + env(safe-area-inset-bottom));
}

.vault-view {
  display: none;
  opacity: 0;
  transform: translateY(10px);
}

.vault-view.is-active {
  display: block;
  animation: viewEnter 0.48s var(--ease-aquatic) forwards;
}

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

/* --------------------------------------------------------------------------
   DESTINATION 1: HOME
   -------------------------------------------------------------------------- */
.home-stage {
  min-height: calc(100dvh - var(--header-height) - var(--nav-height) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 48px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4px 0 14px;
  gap: clamp(14px, 2.3dvh, 22px);
}

.home-org-lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.home-org-name {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--deep-aquatic);
}

.home-org-season {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--ocean-navy-muted);
}

.home-visual-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(10px, 1.8dvh, 16px);
}

.home-medal-visual {
  position: relative;
  height: clamp(104px, 15.5dvh, 144px);
  width: auto;
  aspect-ratio: 5 / 6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-medal-halo {
  position: absolute;
  top: 52%;
  left: 50%;
  width: 92%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.96) 0%,
    rgba(189, 234, 247, 0.56) 55%,
    transparent 80%
  );
  z-index: 0;
}

.home-medal-img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 20px rgba(18, 51, 77, 0.15));
  animation: homeMedalFloat 7s ease-in-out infinite;
}

@keyframes homeMedalFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Arya's Portrait — Clean, Natural Proportions, Prominent Presence */
.home-portrait-frame {
  width: clamp(166px, 45vw, 204px);
  padding: 4px;
  border-radius: 18px;
  background: linear-gradient(165deg, var(--white) 0%, var(--ice-water) 100%);
  border: 1px solid rgba(22, 124, 166, 0.18);
  box-shadow: 0 10px 24px rgba(18, 51, 77, 0.09);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-portrait-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  background-color: var(--ice-water);
}

.home-portrait-frame.is-unavailable {
  display: none;
}

.home-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  margin-top: 2px;
}

.home-athlete-name {
  font-size: clamp(2.05rem, 8.4vw, 2.85rem);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.03;
  text-transform: uppercase;
  color: var(--ocean-navy);
}

.home-gold-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.home-gold-rule {
  width: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--medal-gold));
  opacity: 0.85;
}

.home-gold-badge .home-gold-rule:last-child {
  background: linear-gradient(90deg, var(--medal-gold), transparent);
}

.home-gold-text {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--medal-gold-text);
}

.home-headline {
  max-width: 340px;
  font-size: clamp(1rem, 3.6vw, 1.15rem);
  font-weight: 600;
  line-height: 1.46;
  color: rgba(18, 51, 77, 0.82);
  letter-spacing: -0.01em;
}

/* Lighter Achievement Highlights — Complements Portrait Without Competing */
.home-summary-strip {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(114, 200, 230, 0.30);
  border-radius: 14px;
  padding: 11px 14px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 12px;
}

@media (min-width: 520px) {
  .home-summary-strip {
    max-width: 520px;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 12px 16px;
  }
}

.summary-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.summary-value {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ocean-navy);
}

.summary-value.is-gold {
  color: var(--medal-gold-text);
  font-weight: 800;
}

.summary-value.is-mono {
  font-family: var(--font-mono);
}

.summary-item.is-featured-time .summary-value.is-mono {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--ocean-navy);
  padding-bottom: 2px;
  border-bottom: 2px solid var(--pool-blue);
}

.summary-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--deep-aquatic);
  opacity: 0.9;
}

/* Main Actions — Clear Visual Priority on WATCH MY RACE */
.home-actions {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 2px;
}

@media (min-width: 500px) {
  .home-actions {
    max-width: 440px;
    flex-direction: row;
    gap: 12px;
  }
}

.btn-aquatic-primary {
  flex: 1.15;
  min-height: 52px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid rgba(18, 51, 77, 0.10);
  background: linear-gradient(145deg, #198AC0 0%, var(--deep-aquatic) 55%, #116287 100%);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-shadow: 0 12px 24px rgba(22, 124, 166, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform 0.25s var(--ease-aquatic), background 0.25s ease, box-shadow 0.25s ease;
}

.btn-aquatic-primary:hover {
  background: linear-gradient(145deg, #167CA6 0%, var(--ocean-navy) 100%);
  transform: translateY(-1.5px);
  box-shadow: 0 15px 28px rgba(18, 51, 77, 0.28);
}

.btn-aquatic-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-aquatic-secondary {
  flex: 1;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(22, 124, 166, 0.24);
  background-color: rgba(255, 255, 255, 0.72);
  color: var(--ocean-navy);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.25s var(--ease-aquatic), border-color 0.25s ease, background-color 0.25s ease;
}

.btn-aquatic-secondary:hover {
  background-color: var(--white);
  border-color: var(--deep-aquatic);
  transform: translateY(-1px);
}

.btn-aquatic-secondary:active {
  transform: translateY(0) scale(0.98);
}

/* --------------------------------------------------------------------------
   DESTINATION 2: RACE (DIRECT VIDEO EXPERIENCE)
   -------------------------------------------------------------------------- */
.race-stage {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.race-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding-top: 2px;
}

.race-athlete {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--deep-aquatic);
}

.race-title {
  font-size: clamp(1.35rem, 5vw, 1.75rem);
  font-weight: 900;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  color: var(--ocean-navy);
  line-height: 1.12;
  margin-top: 2px;
}

.race-org {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ocean-navy-soft);
  margin-top: 2px;
}

.race-season {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ocean-navy-muted);
}

.race-player-card {
  width: 100%;
  background: var(--white);
  border: 1px solid var(--border-water-strong);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.race-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(155deg, var(--ice-water) 0%, var(--sky-water) 55%, var(--pool-blue) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.race-video-element {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background-color: var(--ocean-navy);
}

.race-empty-state {
  padding: 24px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.race-empty-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--border-water-strong);
  color: var(--deep-aquatic);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(18, 51, 77, 0.10);
}

.race-empty-title {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ocean-navy);
}

.race-empty-sub {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ocean-navy-soft);
  max-width: 320px;
}

.race-retry-btn {
  margin-top: 4px;
  border: none;
  border-radius: 999px;
  padding: 9px 18px;
  background-color: var(--deep-aquatic);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.2s ease, transform 0.2s var(--ease-aquatic);
}

.race-retry-btn:hover {
  background-color: var(--ocean-navy);
}

.race-retry-btn:active {
  transform: scale(0.97);
}

.race-result-compact {
  background: var(--white);
  border: 1px solid var(--border-water);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-shadow: var(--shadow-soft);
  text-align: center;
}

@media (min-width: 480px) {
  .race-result-compact {
    flex-direction: row;
    text-align: left;
    padding: 14px 20px;
  }
}

.race-result-award {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--medal-gold-text);
}

.race-result-timing {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.race-result-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ocean-navy-muted);
}

.race-result-time {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--ocean-navy);
  line-height: 1.1;
}

/* --------------------------------------------------------------------------
   DESTINATION 3: MOMENTS — WINNER-FIRST VISUAL ACHIEVEMENT STORY
   -------------------------------------------------------------------------- */
.moments-story {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.story-chapter {
  animation: mediaReveal 0.48s var(--ease-aquatic) both;
}

.story-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--deep-aquatic);
}

.story-kicker.is-gold {
  color: var(--medal-gold-text);
}

.story-kicker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--medal-gold);
  flex-shrink: 0;
}

/* 1. THE WINNER — Opening Hero Chapter */
.story-winner-hero {
  position: relative;
  background: var(--white);
  border: 1px solid rgba(201, 162, 39, 0.38);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.story-winner-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(201, 162, 39, 0.8) 0%, #F5D67B 50%, rgba(201, 162, 39, 0.8) 100%);
  z-index: 2;
}

.story-winner-header {
  padding: 22px 22px 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: linear-gradient(180deg, rgba(234, 248, 253, 0.55) 0%, var(--white) 100%);
}

.story-winner-name {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 6vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--ocean-navy);
  line-height: 1.08;
}

.story-winner-meta {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.story-winner-title {
  color: var(--medal-gold-text);
}

.story-winner-sep {
  color: var(--pool-blue);
}

.story-winner-season {
  color: var(--deep-aquatic);
}

.story-hero-photo-btn {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  padding: 0;
  border: none;
  background: var(--ice-water);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.story-hero-photo-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 26%;
  display: block;
  transition: transform 0.5s var(--ease-aquatic);
}

.story-hero-photo-btn:hover img {
  transform: scale(1.025);
}

.story-hero-photo-btn:focus-visible {
  outline: 2px solid var(--deep-aquatic);
  outline-offset: -3px;
}

/* 2. THE MEDAL PRESENTATION */
.story-presentation-card {
  background: var(--white);
  border: 1px solid var(--border-water);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 560px) {
  .story-presentation-card {
    grid-template-columns: 0.95fr 1.05fr;
    align-items: stretch;
  }
}

.story-presentation-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  padding: 0;
  border: none;
  background: var(--ice-water);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

@media (min-width: 560px) {
  .story-presentation-media {
    aspect-ratio: 3 / 4;
  }
}

.story-presentation-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  transition: transform 0.45s var(--ease-aquatic);
}

.story-presentation-media:hover img {
  transform: scale(1.025);
}

.story-presentation-media:focus-visible {
  outline: 2px solid var(--deep-aquatic);
  outline-offset: -3px;
}

.story-chapter-body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

@media (min-width: 560px) {
  .story-presentation-card .story-chapter-body {
    padding: 28px 30px;
  }
}

.story-chapter-rule {
  width: 32px;
  height: 2px;
  border-radius: 999px;
  background-color: var(--medal-gold);
}

.story-chapter-caption {
  font-family: var(--font-serif);
  font-size: clamp(1.125rem, 3.6vw, 1.35rem);
  font-weight: 700;
  line-height: 1.42;
  color: var(--ocean-navy);
}

/* 3. THE CELEBRATION */
.story-celebration-card {
  background: var(--white);
  border: 1px solid var(--border-water);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.story-celebration-media {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  padding: 0;
  border: none;
  background: var(--ice-water);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.story-celebration-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 24%;
  display: block;
  transition: transform 0.45s var(--ease-aquatic);
}

.story-celebration-media:hover img {
  transform: scale(1.025);
}

.story-celebration-media:focus-visible {
  outline: 2px solid var(--deep-aquatic);
  outline-offset: -3px;
}

.story-celebration-card .story-chapter-body {
  padding: 20px 22px 22px;
}

.story-photo-error {
  cursor: default;
  background: rgba(234, 248, 253, 0.92);
}

/* 4. RACE DAY — Supporting Chronological Chapter (01–08) */
.story-raceday-section {
  padding-top: 6px;
}

.story-raceday-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-water);
}

.story-raceday-heading {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.story-raceday-title {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ocean-navy);
  line-height: 1.15;
}

.story-raceday-desc {
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ocean-navy-soft);
}

.moments-group-count {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ocean-navy-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.moments-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 580px) {
  .moments-photo-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }
}

.moment-photo-item {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-water);
  background: var(--ice-water);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s var(--ease-aquatic);
  animation: mediaReveal 0.45s var(--ease-aquatic) both;
}

.moment-photo-item:hover {
  border-color: var(--pool-blue);
  box-shadow: 0 12px 26px rgba(18, 51, 77, 0.11);
}

.moment-photo-item:focus-visible {
  outline: 2px solid var(--deep-aquatic);
  outline-offset: 2px;
}

.moment-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.4s var(--ease-aquatic);
}

.moment-photo-item:hover img {
  transform: scale(1.03);
}

.moment-photo-item.is-error {
  cursor: default;
  background: rgba(234, 248, 253, 0.92);
  border-style: dashed;
  border-color: rgba(22, 124, 166, 0.28);
}

.moment-photo-item.is-error:hover {
  border-color: rgba(22, 124, 166, 0.28);
  box-shadow: var(--shadow-soft);
}

.moment-photo-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  text-align: center;
  color: var(--ocean-navy-muted);
  font-size: 11px;
  font-weight: 600;
}

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

/* --------------------------------------------------------------------------
   DESTINATION 4: MY MEDAL — FORMAL DIGITAL CERTIFICATE OF ACHIEVEMENT
   -------------------------------------------------------------------------- */
.cert-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding-top: 4px;
}

.formal-certificate {
  width: 100%;
  background: linear-gradient(180deg, #FFFFFF 0%, #FDFCF8 100%);
  border: 1px solid rgba(201, 162, 39, 0.52);
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 18px 42px rgba(18, 51, 77, 0.08), 0 4px 12px rgba(22, 124, 166, 0.05);
}

.cert-inner-frame {
  position: relative;
  border: 1px solid rgba(201, 162, 39, 0.26);
  border-radius: 6px;
  padding: 32px 20px 26px;
  background: radial-gradient(circle at 50% 0%, rgba(234, 248, 253, 0.55) 0%, rgba(255, 255, 255, 0) 42%);
}

@media (min-width: 560px) {
  .formal-certificate {
    padding: 14px;
  }

  .cert-inner-frame {
    padding: 44px 40px 34px;
  }
}

.cert-corner {
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: var(--medal-gold);
  border-style: solid;
  pointer-events: none;
}

.cert-corner.corner-tl {
  top: 6px;
  left: 6px;
  border-width: 1.5px 0 0 1.5px;
}

.cert-corner.corner-tr {
  top: 6px;
  right: 6px;
  border-width: 1.5px 1.5px 0 0;
}

.cert-corner.corner-bl {
  bottom: 6px;
  left: 6px;
  border-width: 0 0 1.5px 1.5px;
}

.cert-corner.corner-br {
  bottom: 6px;
  right: 6px;
  border-width: 0 1.5px 1.5px 0;
}

.cert-masthead {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cert-crest-emblem {
  width: 86px;
  height: 104px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cert-crest-emblem img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(18, 51, 77, 0.14));
}

.cert-org-name {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--deep-aquatic);
  margin-bottom: 8px;
}

.cert-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 4.6vw, 1.8rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ocean-navy);
  line-height: 1.18;
}

.cert-ornament {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 150px;
}

.cert-ornament-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 162, 39, 0.72), transparent);
}

.cert-ornament-diamond {
  width: 6px;
  height: 6px;
  background-color: var(--medal-gold);
  transform: rotate(45deg);
  flex-shrink: 0;
}

.cert-proclamation {
  text-align: center;
  padding: 24px 0 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cert-presented-to {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ocean-navy-soft);
  margin-bottom: 8px;
}

.cert-recipient {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 7vw, 2.75rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ocean-navy);
  line-height: 1.08;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(22, 124, 166, 0.22);
  min-width: min(100%, 300px);
}

.cert-distinction {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 22px;
}

.cert-award-tier {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--medal-gold-text);
}

.cert-event-line {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ocean-navy);
}

.cert-dot {
  color: var(--pool-blue);
}

.cert-time-callout {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 28px;
  border-top: 1px solid rgba(114, 200, 230, 0.45);
  border-bottom: 1px solid rgba(114, 200, 230, 0.45);
  background: rgba(234, 248, 253, 0.35);
}

.cert-time-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ocean-navy-muted);
}

.cert-time-value {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 700;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: 0.02em;
  color: var(--ocean-navy);
  line-height: 1.1;
}

.cert-season-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--deep-aquatic);
  margin-top: 2px;
}

.cert-section-rule {
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(201, 162, 39, 0.38) 50%, transparent 100%);
  margin-bottom: 24px;
}

.cert-details-section {
  padding-bottom: 24px;
}

.cert-details-heading {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--deep-aquatic);
  text-align: center;
  margin-bottom: 18px;
}

.cert-details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
}

@media (min-width: 560px) {
  .cert-details-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px 22px;
  }
}

.cert-detail-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cert-detail-item.is-wide {
  grid-column: span 2;
}

.cert-detail-item dt {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ocean-navy-muted);
}

.cert-detail-item dd {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.38;
  color: var(--ocean-navy);
}

.cert-footer {
  padding-top: 20px;
  border-top: 1px solid rgba(18, 51, 77, 0.10);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cert-footer-identity {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.cert-record-id {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  font-size: 11.5px;
}

.cert-record-label {
  font-weight: 600;
  color: var(--ocean-navy-soft);
}

.cert-record-code {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ocean-navy);
}

.cert-qr-caption {
  font-size: 11.5px;
  line-height: 1.48;
  color: var(--ocean-navy-muted);
  max-width: 420px;
}

.cert-reverse-seal {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  padding: 2px;
  border-radius: 50%;
  border: 1px solid rgba(201, 162, 39, 0.55);
  background: var(--white);
  box-shadow: 0 4px 12px rgba(18, 51, 77, 0.08);
  cursor: pointer;
  transition: transform 0.22s var(--ease-aquatic), border-color 0.22s ease;
}

.cert-reverse-seal:hover {
  transform: scale(1.04);
  border-color: var(--medal-gold);
}

.cert-reverse-seal-clip {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
}

.cert-reverse-seal-clip img {
  position: relative;
  width: 133.33%;
  height: 160%;
  max-width: none;
  left: -16.67%;
  top: -46.67%;
  display: block;
}

.cert-actions-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.btn-cert-discreet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(22, 124, 166, 0.28);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ocean-navy);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-cert-discreet:hover {
  background: var(--ice-water);
  border-color: var(--deep-aquatic);
}

.btn-cert-discreet.is-primary {
  background: var(--deep-aquatic);
  border-color: var(--deep-aquatic);
  color: var(--white);
}

.btn-cert-discreet.is-primary:hover {
  background: var(--ocean-navy);
  border-color: var(--ocean-navy);
}

/* Verify Record & Physical Medal Reference Modal */
.verify-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 115;
  background: rgba(18, 51, 77, 0.52);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.verify-dialog-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.verify-dialog-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border: 1px solid rgba(201, 162, 39, 0.42);
  border-radius: 16px;
  padding: 26px 22px 22px;
  box-shadow: 0 22px 48px rgba(18, 51, 77, 0.22);
  text-align: center;
}

.verify-dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-water);
  background: var(--ice-water);
  color: var(--ocean-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.verify-dialog-eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--deep-aquatic);
  margin-bottom: 4px;
}

.verify-dialog-title {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ocean-navy);
  margin-bottom: 16px;
}

.verify-medal-pair {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px 10px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--ice-water) 0%, #FFFFFF 100%);
  border: 1px solid var(--border-water);
}

.verify-medal-face {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.verify-medal-face img {
  width: 96px;
  height: 115px;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(18, 51, 77, 0.16));
}

.verify-medal-face span {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ocean-navy-muted);
}

.verify-dialog-note {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ocean-navy-soft);
  margin-bottom: 14px;
}

.verify-mono {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--ocean-navy);
}

.verify-dialog-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--ice-water);
  text-align: left;
  margin-bottom: 16px;
}

.verify-dialog-meta div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.verify-dialog-meta dt {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ocean-navy-muted);
}

.verify-dialog-meta dd {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ocean-navy);
}

.verify-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

/* --------------------------------------------------------------------------
   FIXED BOTTOM NAVIGATION (HOME · RACE · MOMENTS · MY MEDAL)
   -------------------------------------------------------------------------- */
.vault-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(234, 248, 253, 0.90) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(114, 200, 230, 0.28);
  box-shadow: 0 -4px 18px rgba(18, 51, 77, 0.04);
  padding-bottom: env(safe-area-inset-bottom);
}

.vault-bottom-nav-inner {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 6px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}

.nav-active-indicator {
  position: absolute;
  top: 0;
  left: 6px;
  width: calc((100% - 12px) / 4);
  height: 3px;
  display: flex;
  justify-content: center;
  pointer-events: none;
  transform: translateX(calc(var(--active-index, 0) * 100%));
  transition: transform 0.28s var(--ease-aquatic);
}

.nav-active-indicator::after {
  content: '';
  width: 24px;
  height: 2.5px;
  border-radius: 999px;
  background-color: var(--medal-gold);
}

.nav-dest-btn {
  position: relative;
  border: none;
  background: transparent;
  color: #6B879B;
  font-family: var(--font-sans);
  min-height: var(--nav-height);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px 7px;
  cursor: pointer;
  touch-action: manipulation;
  border-radius: 12px;
  transition: color 0.22s ease, background-color 0.18s ease;
}

@media (hover: hover) {
  .nav-dest-btn:not(.is-active):hover {
    color: var(--ocean-navy);
  }
}

.nav-dest-btn.is-active {
  color: var(--deep-aquatic);
}

.nav-dest-btn:focus-visible {
  outline: 2px solid var(--deep-aquatic);
  outline-offset: -3px;
}

.nav-icon {
  width: 22px;
  height: 22px;
  display: block;
  flex-shrink: 0;
  transition: transform 0.2s var(--ease-aquatic);
}

.nav-label {
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  transition: font-weight 0.2s ease;
}

.nav-dest-btn.is-active .nav-label {
  font-weight: 700;
}

.nav-dest-btn:active {
  background-color: rgba(189, 234, 247, 0.36);
}

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

/* --------------------------------------------------------------------------
   FULL-SCREEN PHOTO LIGHTBOX & TOAST
   -------------------------------------------------------------------------- */
.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(18, 51, 77, 0.92);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.photo-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-close {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: 16px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 70dvh;
}

.lightbox-img {
  max-width: 100%;
  max-height: 70dvh;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.lightbox-caption {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  text-align: center;
  max-width: 480px;
}

.lightbox-controls {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.lightbox-controls[hidden] {
  display: none;
}

.lightbox-nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.2s ease, transform 0.18s var(--ease-aquatic);
}

.lightbox-nav-btn:hover {
  background: rgba(255, 255, 255, 0.24);
}

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

.lightbox-counter {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(234, 248, 253, 0.88);
  min-width: 48px;
  text-align: center;
}

.vault-toast {
  position: fixed;
  bottom: calc(var(--nav-height) + 16px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ocean-navy);
  color: var(--white);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 12px 28px rgba(18, 51, 77, 0.28);
  opacity: 0;
  pointer-events: none;
  z-index: 100;
  transition: opacity 0.28s ease, transform 0.28s var(--ease-aquatic);
}

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

/* --------------------------------------------------------------------------
   PRINT FORMATTING — DIGITAL CERTIFICATE ONLY
   -------------------------------------------------------------------------- */
@media print {
  .aquatic-stage,
  .landing-screen,
  .vault-ambient,
  .vault-header,
  .vault-bottom-nav,
  .cert-actions-bar,
  .verify-dialog-backdrop,
  .photo-lightbox,
  .vault-toast {
    display: none !important;
  }

  body.app-body,
  .vault-shell,
  .vault-main {
    display: block !important;
    background: #FFFFFF !important;
    padding: 0 !important;
    margin: 0 auto !important;
    max-width: 720px !important;
  }

  .vault-view {
    display: none !important;
  }

  #view-my-medal {
    display: block !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .formal-certificate {
    box-shadow: none !important;
    border-color: #C9A227 !important;
    break-inside: avoid;
  }
}

/* --------------------------------------------------------------------------
   ACCESSIBILITY: REDUCED MOTION
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .aquatic-surface-shimmer,
  .medal-face,
  .medal-reflective-sheen,
  .medal-water-shadow,
  .home-medal-img {
    animation: none !important;
    transform: none !important;
  }

  .medal-card-3d,
  .medal-pointer-layer,
  .medal-hero-stage::before,
  .medal-water-shadow,
  .reveal-item {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  .btn-sheen,
  .specular-light-sweep {
    display: none !important;
  }
}
