/* The game's own world on Morris's skin: neutral ink and dark glass over the course, white words,
   Cera for words and Inter for figures, coral only on the one action and on what is yours. */
.rey {
  --ink: #111111;
  --glass: rgba(17, 17, 17, 0.5);
  --glass-strong: rgba(17, 17, 17, 0.76);
  --hairline: rgba(255, 255, 255, 0.12);
  --paper: #ffffff;
  --muted: rgba(255, 255, 255, 0.68);
  --coral: #f26b3a;
  --coral-hi: #ff8a5c;
  --navy-deep: #0d1b33;
  --top: env(safe-area-inset-top, 0px);
  --bottom: env(safe-area-inset-bottom, 0px);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --out: cubic-bezier(0.16, 1, 0.3, 1);
  --words: var(--font-cera, cera), -apple-system, system-ui, sans-serif;
  --figures: var(--font-inter, Inter), -apple-system, system-ui, sans-serif;
  position: fixed;
  inset: 0;
  color: var(--paper);
  background: var(--ink);
  font-family: var(--words);
  font-weight: 500;
  touch-action: none;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
html:has(.rey),
body:has(.rey) {
  background: #111111;
  overflow: hidden;
  overscroll-behavior: none;
  height: 100%;
}
.rey *,
.rey *::before,
.rey *::after {
  box-sizing: border-box;
}
.rey-stage {
  position: absolute;
  inset: 0;
}
.rey-stage canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  touch-action: none;
}
.rey-ui {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.rey-ui button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  pointer-events: auto;
}
.rey-ui button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}
.rey .num {
  font-family: var(--figures);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

/* A warm late-afternoon grade and a soft vignette over the 3D view. */
.rey-grade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(130% 75% at 50% 40%, rgba(0, 0, 0, 0) 45%, rgba(18, 10, 4, 0.38) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.26) 0%, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 62%, rgba(0, 0, 0, 0.34) 100%);
}

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  backdrop-filter: blur(20px) saturate(1.6);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 0 1px rgba(0, 0, 0, 0.18),
    0 12px 32px rgba(0, 0, 0, 0.26);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass {
    background: var(--glass-strong);
  }
}
.rh-label {
  display: block;
  font-family: var(--words);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.fade {
  transition:
    opacity 0.45s var(--out),
    transform 0.55s var(--out);
}
.is-hidden {
  opacity: 0 !important;
  pointer-events: none !important;
}
.rey-top.is-hidden,
.rey-club.is-hidden,
.rey-actions.is-hidden,
.rey-flight.is-hidden {
  transform: translateY(8px) scale(0.98);
}
.rey-club.is-hidden,
.rey-flight.is-hidden {
  transform: translateX(-50%) translateY(8px) scale(0.98);
}

/* The cover: the course's own picture, the title, the progress, then the one action. */
.rey-loader {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--ink);
  pointer-events: auto;
  transition: opacity 0.8s var(--out);
}
.rey-loader.is-gone {
  opacity: 0;
  pointer-events: none;
}
.rl-photo {
  position: absolute;
  inset: -6%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  filter: saturate(1.08) brightness(0.62);
  transition: opacity 1.4s ease;
  animation: rl-drift 26s ease-in-out infinite alternate;
}
.rl-photo.is-ready {
  opacity: 1;
}
@keyframes rl-drift {
  from {
    transform: scale(1.04) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.18) translate3d(-2%, -3%, 0);
  }
}
.rey-loader::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(17, 17, 17, 0.72) 0%, rgba(17, 17, 17, 0.12) 30%, rgba(17, 17, 17, 0.3) 52%, rgba(17, 17, 17, 0.94) 82%);
}
.rl-brand {
  position: absolute;
  z-index: 2;
  top: calc(20px + var(--top));
  left: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.rl-brand > span:last-child {
  color: var(--muted);
}
.rl-medal {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rl-medal img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}
.rl-body {
  position: relative;
  z-index: 2;
  padding: 0 24px calc(28px + var(--bottom));
}
.rl-eyebrow {
  margin: 0 0 12px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.rl-title {
  margin: 0;
  font-family: var(--words);
  font-weight: 900;
  font-size: clamp(54px, 17vw, 76px);
  line-height: 0.88;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  text-wrap: balance;
}
.rl-title .rl-del {
  display: block;
  margin: 4px 0 2px;
  font-size: 0.36em;
  letter-spacing: 0.32em;
  line-height: 1;
  color: var(--muted);
}
.rl-course {
  margin: 18px 0 26px;
  font-size: 16px;
  font-weight: 500;
  color: var(--muted);
  min-height: 1.3em;
}
.rl-meter {
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}
.rl-meter i {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left center;
  transform: scaleX(0.02);
  background: #fff;
  border-radius: 4px;
  transition: transform 0.4s var(--out);
}
.rl-status {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--muted);
}
.rl-play {
  display: none;
  width: 100%;
  height: 60px;
  border-radius: 14px;
  font-family: var(--words) !important;
  font-weight: 700 !important;
  font-size: 18px !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy-deep) !important;
  background: linear-gradient(180deg, var(--coral-hi), var(--coral) 60%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 10px 28px rgba(242, 107, 58, 0.38);
  transition: transform 0.18s var(--out);
}
.rl-play:active {
  transform: scale(0.97);
}
.rl-credit {
  margin: 16px 0 0;
  font-size: 10px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.42);
}
.rey-loader[data-state="ready"] .rl-play,
.rey-loader[data-state="error"] .rl-play {
  display: block;
  animation: rl-in 0.6s var(--out) both;
}
.rey-loader[data-state="ready"] .rl-meter,
.rey-loader[data-state="ready"] .rl-status,
.rey-loader[data-state="error"] .rl-meter {
  display: none;
}
.rey-loader[data-state="error"] .rl-status {
  margin-bottom: 18px;
  color: #fff;
}
@keyframes rl-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* The opening title over the flight. */
.rey-intro {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 24px calc(52px + var(--bottom));
  transition: opacity 0.45s var(--out);
}
.rey-intro.is-out {
  opacity: 0;
}
.rey-intro::before {
  content: "";
  position: absolute;
  inset: -160px 0 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(17, 17, 17, 0), rgba(17, 17, 17, 0.7));
}
.ri-eyebrow {
  margin: 0;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.ri-name {
  margin: 10px 0 12px;
  font-weight: 900;
  font-size: 44px;
  line-height: 0.95;
  text-transform: uppercase;
  text-wrap: balance;
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.35);
}
.ri-line {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 17px;
  font-weight: 700;
}
.ri-line b {
  font-size: 19px;
}
.ri-dot {
  width: 4px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.5);
}
.ri-skip {
  margin: 26px 0 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.rey-intro > * {
  opacity: 0;
  transform: translateY(16px);
  animation: ri-in 0.9s var(--out) forwards;
}
.rey-intro > :nth-child(2) {
  animation-delay: 0.12s;
}
.rey-intro > :nth-child(3) {
  animation-delay: 0.24s;
}
.rey-intro > :nth-child(4) {
  animation-delay: 0.9s;
}
@keyframes ri-in {
  to {
    opacity: 1;
    transform: none;
  }
}

