/* =============================================================
   GRAND VICTORY · Lucky Spin H5
   1:1 layout system ported from the reference activity template.
   Every size is expressed in design units: 1u = 1% of viewport width
   (--s keeps the phone stage at max 480px on desktop).
   ============================================================= */

/* ---------- 0. tokens ---------- */
:root {
  --s: 1;
  --u: calc(1vw * var(--s));

  --red-0: #7a1408;
  --red-1: #c8281a;
  --red-2: #ed4b2f;
  --red-3: #ff6a3d;
  --gold-0: #fff8d4;
  --gold-1: #ffe07a;
  --gold-2: #ffc233;
  --gold-3: #e08a00;
  --gold-4: #8a4a00;
  --ink: #3d0c04;
  --cream: #fff3cf;
  --win: #fff100;

  --font-display: "Arial Black", "Arial Bold", Impact, "Helvetica Neue", Arial,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans KR",
    "Noto Sans JP", sans-serif;
  --font-body: Arial, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans KR", "Noto Sans JP", sans-serif;

  --ease-out: cubic-bezier(0.16, 0.84, 0.24, 1);
  --shadow-card: 0 calc(1.2 * var(--u)) calc(4 * var(--u)) rgba(40, 5, 0, 0.55);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background: #1b0703;
  color: #fff;
  font-family: var(--font-body);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

button {
  font-family: inherit;
  border: 0;
  background: none;
  cursor: pointer;
  color: inherit;
  padding: 0;
}

img {
  display: block;
  max-width: 100%;
  -webkit-user-drag: none;
  user-select: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------- 1. stage ---------- */
.phone {
  position: relative;
  width: calc(100vw * var(--s));
  margin: 0 auto;
  overflow: hidden;
  background: var(--red-2);
  isolation: isolate;
}

@media (min-width: 481px) {
  body {
    background:
      radial-gradient(120% 80% at 50% 0%, #57200f 0%, #1b0703 62%, #0d0301 100%);
  }
  .phone {
    box-shadow:
      0 0 calc(6 * var(--u)) rgba(0, 0, 0, 0.7),
      0 0 0 calc(0.2 * var(--u)) rgba(255, 200, 110, 0.22);
  }
}

/* ---------- 2. home / background ---------- */
.home {
  position: relative;
  width: 100%;
  height: calc(216.5333 * var(--u));
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background-color: var(--red-2);
  background-image: url("../assets/img/home-bg.webp");
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 100% calc(216.5333 * var(--u));
}

/* warm breathing light behind the wheel */
.home::after {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(74 * var(--u));
  width: calc(120 * var(--u));
  height: calc(120 * var(--u));
  transform: translate(-50%, 0);
  background: radial-gradient(
    circle,
    rgba(255, 214, 92, 0.34) 0%,
    rgba(255, 176, 40, 0.14) 38%,
    rgba(255, 140, 20, 0) 70%
  );
  pointer-events: none;
  z-index: 1;
  animation: glowBreath 4.6s ease-in-out infinite;
}

@keyframes glowBreath {
  0%,
  100% {
    opacity: 0.65;
    transform: translate(-50%, 0) scale(0.94);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1.06);
  }
}

/* ---------- 3. title ---------- */
.title {
  position: absolute;
  left: 0;
  top: calc(3.2 * var(--u));
  width: 100%;
  height: calc(18.1333 * var(--u));
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 calc(15.5 * var(--u));
  pointer-events: none;
}

.title-main {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: calc(8 * var(--u));
  line-height: calc(10.6 * var(--u));
  max-width: calc(62 * var(--u));
  letter-spacing: calc(0.1 * var(--u));
  text-align: center;
  white-space: nowrap;
  color: #ffe9a0;
  -webkit-text-stroke: calc(1.05 * var(--u)) #6d1503;
  paint-order: stroke fill;
  text-shadow:
    0 calc(0.9 * var(--u)) 0 #8a2a08,
    0 calc(1.1 * var(--u)) calc(0.3 * var(--u)) #571303,
    0 0 calc(3 * var(--u)) rgba(255, 196, 70, 0.55);
  animation: titleFloat 4.2s ease-in-out infinite;
  transform-origin: 50% 60%;
}

.title-sub {
  margin: calc(0.4 * var(--u)) 0 0;
  font-family: var(--font-display);
  font-size: calc(3.9 * var(--u));
  letter-spacing: calc(0.55 * var(--u));
  color: #fff4c8;
  -webkit-text-stroke: calc(0.55 * var(--u)) #8a2205;
  paint-order: stroke fill;
  text-shadow: 0 calc(0.35 * var(--u)) 0 #5d1503;
  text-transform: uppercase;
  white-space: nowrap;
  max-width: 100%;
}

/* CJK titles are short: give them more presence */
html[data-lang="ko"] .title-main,
html[data-lang="ja"] .title-main {
  font-size: calc(12.4 * var(--u));
  letter-spacing: calc(0.4 * var(--u));
}

html[data-lang="ko"] .title-sub,
html[data-lang="ja"] .title-sub {
  font-size: calc(4.4 * var(--u));
  letter-spacing: calc(0.3 * var(--u));
}

/* CJK glyphs are dense: a heavy stroke swallows the light fill */
html[data-lang="ja"] .spin-text,
html[data-lang="ko"] .spin-text {
  -webkit-text-stroke-width: calc(0.2 * var(--u));
}

html[data-lang="ja"] .spin-count,
html[data-lang="ko"] .spin-count {
  -webkit-text-stroke-width: calc(0.12 * var(--u));
  text-shadow: 0 calc(0.3 * var(--u)) calc(0.3 * var(--u)) rgba(0, 0, 0, 0.6);
}

@keyframes titleFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-0.6deg) scale(1);
  }
  50% {
    transform: translateY(calc(-0.7 * var(--u))) rotate(0.4deg) scale(1.012);
  }
}

/* language pill (top-right of the title band) */
.lang-btn {
  position: absolute;
  right: calc(2.4 * var(--u));
  top: calc(2.6 * var(--u));
  display: flex;
  align-items: center;
  gap: calc(1 * var(--u));
  height: calc(6.8 * var(--u));
  padding: 0 calc(1.9 * var(--u)) 0 calc(2.1 * var(--u));
  border-radius: calc(4 * var(--u));
  background: linear-gradient(180deg, rgba(255, 246, 214, 0.96), rgba(255, 206, 108, 0.94));
  border: calc(0.35 * var(--u)) solid rgba(120, 42, 6, 0.75);
  box-shadow:
    0 calc(0.6 * var(--u)) calc(1.6 * var(--u)) rgba(80, 20, 0, 0.45),
    inset 0 calc(0.35 * var(--u)) 0 rgba(255, 255, 255, 0.75);
  color: #7a2205;
  font-family: var(--font-display);
  font-size: calc(3.1 * var(--u));
  letter-spacing: calc(0.08 * var(--u));
  pointer-events: auto;
  z-index: 12;
  transition: transform 0.16s var(--ease-out);
}

.lang-btn:active {
  transform: scale(0.94);
}

.lang-btn svg {
  width: calc(3.6 * var(--u));
  height: calc(3.6 * var(--u));
}

.lang-btn .flag {
  font-size: calc(3.4 * var(--u));
  line-height: 1;
}

/* ---------- 4. amount panel ---------- */
.amount-ctx {
  position: absolute;
  left: calc(0.2667 * var(--u));
  top: calc(20 * var(--u));
  width: calc(99.4667 * var(--u));
  height: calc(33.6 * var(--u));
  z-index: 6;
  background-image: url("../assets/img/amount-bg.webp");
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 100% 100%;
  filter: drop-shadow(0 calc(0.8 * var(--u)) calc(1.4 * var(--u)) rgba(70, 15, 0, 0.35));
}

.amount-ctx .total-text {
  position: absolute;
  left: calc(11.7333 * var(--u));
  top: calc(7.0667 * var(--u));
  font-family: var(--font-display);
  font-weight: 700;
  font-size: calc(3.6 * var(--u));
  line-height: 1.15;
  max-width: calc(20 * var(--u));
  color: #fff;
  text-shadow: 0 calc(0.3 * var(--u)) calc(0.4 * var(--u)) rgba(90, 20, 0, 0.6);
  white-space: nowrap;
  overflow: hidden;
}

.amount-ctx .cur-amount {
  position: absolute;
  right: calc(15.7333 * var(--u));
  top: calc(4.5333 * var(--u));
  width: calc(56 * var(--u));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: calc(9.3333 * var(--u));
  line-height: calc(10.9333 * var(--u));
  color: var(--win);
  text-shadow:
    0 calc(0.5 * var(--u)) 0 #a04800,
    0 0 calc(1.6 * var(--u)) rgba(255, 220, 90, 0.6);
  font-variant-numeric: tabular-nums;
}

.amount-ctx .cur-amount img {
  width: calc(8.9333 * var(--u));
  height: calc(7.7333 * var(--u));
  margin-right: calc(1.3333 * var(--u));
  animation: coinTilt 2.4s ease-in-out infinite;
}

@keyframes coinTilt {
  0%,
  100% {
    transform: rotate(-6deg) scale(1);
  }
  50% {
    transform: rotate(6deg) scale(1.05);
  }
}

.amount-ctx .cur-amount.bump {
  animation: amountBump 0.55s var(--ease-out);
}

@keyframes amountBump {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.18);
    filter: brightness(1.35);
  }
  100% {
    transform: scale(1);
  }
}

.amount-ctx .withdraw-tip {
  position: absolute;
  left: 0;
  top: calc(16.8 * var(--u));
  width: 100%;
  margin: 0;
  text-align: center;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: calc(3.6 * var(--u));
  color: #fff;
  text-shadow: 0 calc(0.25 * var(--u)) calc(0.3 * var(--u)) rgba(80, 18, 0, 0.55);
  padding: 0 calc(4 * var(--u));
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
}

.amount-ctx .withdraw-tip b {
  color: var(--win);
  font-family: var(--font-display);
  font-size: calc(3.4 * var(--u));
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.amount-ctx .progress-ctx {
  position: absolute;
  left: calc(11.2 * var(--u));
  bottom: calc(4.5333 * var(--u));
  width: calc(77.6 * var(--u));
  height: calc(7.3333 * var(--u));
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: calc(1.0667 * var(--u));
}

.progress {
  position: relative;
  width: calc(54 * var(--u));
  height: calc(4.1333 * var(--u));
  background-image: url("../assets/img/progress-bg.webp");
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 100% 100%;
  overflow: hidden;
  border-radius: calc(2.1 * var(--u));
}

.progress .bar {
  position: relative;
  width: 0;
  height: calc(3.2 * var(--u));
  margin: calc(0.3333 * var(--u)) 0 0 calc(0.2667 * var(--u));
  border-radius: calc(5.3333 * var(--u));
  background-image: url("../assets/img/bar.webp");
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 100% 100%;
  transition: width 1s 0.25s var(--ease-out);
  box-shadow: 0 0 calc(1.6 * var(--u)) rgba(198, 255, 60, 0.65);
  overflow: hidden;
}

.progress .bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0) 30%,
    rgba(255, 255, 255, 0.75) 50%,
    rgba(255, 255, 255, 0) 70%
  );
  transform: translateX(-120%);
  animation: barShine 2.2s linear infinite;
}

@keyframes barShine {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(120%);
  }
}

.progress .percent {
  position: absolute;
  right: calc(1.2 * var(--u));
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: calc(2.4 * var(--u));
  color: #fff;
  text-shadow: 0 calc(0.2 * var(--u)) 0 rgba(0, 0, 0, 0.55);
  z-index: 2;
  font-variant-numeric: tabular-nums;
}

.right-btn {
  width: calc(19.8667 * var(--u));
  height: calc(7.3333 * var(--u));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 calc(0.6667 * var(--u));
  font-family: var(--font-display);
  font-weight: 700;
  font-size: calc(3.6 * var(--u));
  color: #fff;
  text-shadow: 0 calc(0.2667 * var(--u)) calc(0.2667 * var(--u)) #3a3a3a;
  background-image: url("../assets/img/right-btn.webp");
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 100% 100%;
  white-space: nowrap;
  transition: transform 0.14s var(--ease-out);
}

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

/* ---------- 5. wheel ---------- */
.game {
  position: absolute;
  left: calc(6 * var(--u));
  top: calc(74.6667 * var(--u));
  width: calc(88 * var(--u));
  height: calc(88 * var(--u));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

.wheel-idle {
  width: calc(74.6667 * var(--u));
  height: calc(74.6667 * var(--u));
  flex-shrink: 0;
  animation: wheelIdle 7.5s ease-in-out infinite;
  will-change: transform;
}

.wheel-idle.paused {
  animation-play-state: paused;
}

@keyframes wheelIdle {
  0% {
    transform: rotate(-4.5deg);
  }
  50% {
    transform: rotate(4.5deg);
  }
  100% {
    transform: rotate(-4.5deg);
  }
}

.rotate-bg {
  position: relative;
  width: calc(74.6667 * var(--u));
  height: calc(74.6667 * var(--u));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background-image: url("../assets/img/wheel.webp");
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 100% 100%;
  border-radius: 50%;
  filter: drop-shadow(0 calc(0.8 * var(--u)) calc(2.2 * var(--u)) rgba(60, 10, 0, 0.45));
  will-change: transform;
}

.rotate-bg.spinning {
  transition: transform 4.6s cubic-bezier(0.14, 0.86, 0.16, 1);
}

.rotate-item {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(19 * var(--u));
  height: calc(14.4 * var(--u));
  margin-left: calc(-9.5 * var(--u));
  margin-top: calc(-7.2 * var(--u));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  z-index: 2;
  pointer-events: none;
  /* polar placement: rotate out -> translate along radius -> rotate back.
     Net rotation is 0, so labels stay upright and the box never grows. */
  transform: rotate(var(--a, 0deg)) translateY(calc(-25 * var(--u))) rotate(calc(-1 * var(--a, 0deg)));
}

.rotate-item .prize-icon {
  width: calc(9.2 * var(--u));
  height: calc(9.2 * var(--u));
  flex: 0 0 auto;
  filter: drop-shadow(0 calc(0.5 * var(--u)) calc(0.5 * var(--u)) rgba(80, 20, 0, 0.35));
}

.rotate-item .prize-amount {
  display: block;
  margin-top: calc(1.2 * var(--u));
  font-family: var(--font-display);
  font-weight: 900;
  font-size: calc(4 * var(--u));
  line-height: 1;
  letter-spacing: calc(-0.06 * var(--u));
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* the bottom sector is flipped 180deg, so reverse its stack to keep icons on the outside */
.rotate-item[data-index="3"] {
  flex-direction: column-reverse;
}

.rotate-item[data-index="3"] .prize-amount {
  margin-top: 0;
  margin-bottom: calc(1.2 * var(--u));
}

/* even sectors (0,120,240) are cream -> dark ink text; odd are red -> cream text */
.rotate-item.is-cream .prize-amount {
  color: #96200a;
  text-shadow: 0 calc(0.28 * var(--u)) 0 rgba(255, 248, 220, 0.95), 0 0 calc(0.6 * var(--u)) rgba(255, 250, 230, 0.7);
}

.rotate-item.is-red .prize-amount {
  color: #fff8dc;
  -webkit-text-stroke: calc(0.18 * var(--u)) #7a1605;
  paint-order: stroke fill;
  text-shadow: 0 calc(0.32 * var(--u)) calc(0.5 * var(--u)) rgba(84, 12, 0, 0.9);
}

/* rim highlight ring */
.wheel-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(75.6 * var(--u));
  height: calc(75.6 * var(--u));
  margin: calc(-37.8 * var(--u)) 0 0 calc(-37.8 * var(--u));
  border-radius: 50%;
  border: calc(0.45 * var(--u)) solid rgba(255, 226, 150, 0.5);
  box-shadow:
    inset 0 0 calc(3 * var(--u)) rgba(255, 200, 90, 0.55),
    0 0 calc(2.4 * var(--u)) rgba(255, 190, 70, 0.35);
  pointer-events: none;
  z-index: 4;
}

/* pointer at 12 o'clock */
.pointer {
  position: absolute;
  left: 50%;
  top: calc(1.6 * var(--u));
  width: calc(9.2 * var(--u));
  height: calc(12 * var(--u));
  margin-left: calc(-4.6 * var(--u));
  z-index: 6;
  pointer-events: none;
  transform-origin: 50% 12%;
  animation: pointerIdle 1.5s ease-in-out infinite;
  filter: drop-shadow(0 calc(0.6 * var(--u)) calc(0.8 * var(--u)) rgba(70, 12, 0, 0.5));
}

.pointer svg {
  width: 100%;
  height: 100%;
}

@keyframes wheelSettle {
  0% { transform: rotate(-1.8deg); }
  38% { transform: rotate(1.1deg); }
  68% { transform: rotate(-0.45deg); }
  100% { transform: rotate(0deg); }
}

@keyframes pointerIdle {
  0%,
  100% {
    transform: rotate(-5deg);
  }
  50% {
    transform: rotate(5deg);
  }
}

.pointer.tick {
  animation: pointerTick 0.09s linear 8;
}

@keyframes pointerTick {
  0%,
  100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(-16deg);
  }
}

/* spin button */
.spin {
  position: absolute;
  left: calc(30.8 * var(--u));
  top: calc(25.3333 * var(--u));
  width: calc(26.4 * var(--u));
  height: calc(34.5333 * var(--u));
  padding-top: calc(8.8 * var(--u));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-image: url("../assets/img/spin.webp");
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 100% 100%;
  z-index: 5;
  transform: rotate(0);
  transition: transform 0.16s var(--ease-out), filter 0.2s linear;
  animation: spinPulse 1.9s ease-in-out infinite;
}

.spin:active {
  transform: scale(0.94);
}

.spin-text {
  position: relative;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: calc(4.3 * var(--u));
  line-height: 1;
  letter-spacing: calc(0.02 * var(--u));
  color: #fffbe0;
  -webkit-text-stroke: calc(0.42 * var(--u)) #173a15;
  paint-order: stroke fill;
  text-shadow: 0 calc(0.4 * var(--u)) 0 #0e2a0c;
  white-space: nowrap;
  max-width: calc(21 * var(--u));
}

.spin-count {
  position: relative;
  margin: calc(0.9 * var(--u)) 0 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: calc(3 * var(--u));
  color: #fff;
  -webkit-text-stroke: calc(0.24 * var(--u)) #173a15;
  paint-order: stroke fill;
  white-space: nowrap;
  max-width: calc(24 * var(--u));
  overflow: hidden;
}

.spin .hand {
  position: absolute;
  right: calc(-5.8667 * var(--u));
  top: calc(21.6 * var(--u));
  width: calc(15.2 * var(--u));
  height: calc(12.5333 * var(--u));
  z-index: 1;
  animation: handMove 1s linear infinite;
  pointer-events: none;
}

.spin.disabled {
  filter: grayscale(0.85) brightness(0.9);
  animation: none;
}

.spin.spinning {
  animation: spinShake 0.5s ease-in-out infinite;
}

@keyframes spinPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.045);
  }
}

@keyframes spinShake {
  0%,
  100% {
    transform: scale(1) rotate(-1.5deg);
  }
  50% {
    transform: scale(0.97) rotate(1.5deg);
  }
}

@keyframes handMove {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(calc(1 * var(--u)), calc(-0.8 * var(--u))) rotate(-8deg);
  }
  50% {
    transform: translate(0, 0) rotate(0deg);
  }
  75% {
    transform: translate(calc(-0.6 * var(--u)), calc(-0.5 * var(--u))) rotate(6deg);
  }
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

/* ---------- 6. right side icons ---------- */
.right-icon {
  position: absolute;
  right: calc(1.6 * var(--u));
  top: calc(148 * var(--u));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 4;
}

.right-icon .icon-img {
  position: relative;
  width: calc(15.7333 * var(--u));
  height: calc(10.1333 * var(--u));
  background-image: url("../assets/img/right-icon.webp");
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 100% auto;
  animation: purse 1.2s linear infinite;
}

.right-icon .icon-img .text {
  position: absolute;
  right: calc(1.3333 * var(--u));
  top: calc(-1.3333 * var(--u));
  display: inline-block;
  min-width: calc(4 * var(--u));
  height: calc(4 * var(--u));
  padding: 0 calc(0.5 * var(--u));
  border-radius: calc(2 * var(--u));
  background: #fff;
  color: red;
  font-family: var(--font-display);
  font-size: calc(3.2 * var(--u));
  line-height: calc(4 * var(--u));
  text-align: center;
}

.right-icon .count-down {
  position: relative;
  margin: calc(-1.3333 * var(--u)) auto 0;
  width: calc(14.6667 * var(--u));
  height: calc(4 * var(--u));
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: calc(2.1333 * var(--u));
  background: #ff9000;
  box-shadow: 0 calc(0.3 * var(--u)) calc(0.8 * var(--u)) rgba(90, 30, 0, 0.4);
}

.right-icon .count-down .cd-text {
  color: #fff;
  font-family: var(--font-display);
  font-size: calc(2.9 * var(--u));
  font-weight: 700;
  margin-top: calc(0.26 * var(--u));
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@keyframes purse {
  10% {
    transform: rotate(15deg);
  }
  20% {
    transform: rotate(-10deg);
  }
  30% {
    transform: rotate(5deg);
  }
  40%,
  100% {
    transform: rotate(0deg);
  }
}

/* ---------- 7. winner ticker ---------- */
.tan {
  position: absolute;
  left: 0;
  bottom: calc(1.3333 * var(--u));
  width: 100%;
  height: calc(13.3333 * var(--u));
  overflow: hidden;
  pointer-events: none;
  z-index: 5;
  display: flex;
  align-items: center;
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: calc(2.6 * var(--u));
  padding-left: calc(4 * var(--u));
  animation: tickerScroll 34s linear infinite;
  will-change: transform;
}

.tan:hover .ticker-track {
  animation-play-state: paused;
}

.ticker-item {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: calc(1 * var(--u));
  height: calc(4.5333 * var(--u));
  padding: 0 calc(1.6 * var(--u));
  border-radius: calc(2.1333 * var(--u));
  background: rgba(0, 0, 0, 0.5);
  border: calc(0.15 * var(--u)) solid rgba(255, 220, 130, 0.28);
  color: #fff;
  font-family: var(--font-body);
  font-size: calc(2.6667 * var(--u));
  white-space: nowrap;
  backdrop-filter: blur(2px);
}

.ticker-item b {
  color: var(--win);
  font-family: var(--font-display);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

@keyframes tickerScroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ---------- 8. bottom block ---------- */
.desc-tip {
  position: absolute;
  left: calc(4 * var(--u));
  top: calc(168.6667 * var(--u));
  width: calc(92 * var(--u));
  margin: 0;
  text-align: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: calc(3 * var(--u));
  line-height: calc(4.2667 * var(--u));
  color: rgba(255, 240, 214, 0.92);
  text-shadow: 0 calc(0.25 * var(--u)) calc(0.4 * var(--u)) rgba(70, 15, 0, 0.6);
  z-index: 2;
}

.bottom-actions {
  position: absolute;
  left: 0;
  top: calc(181 * var(--u));
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(3 * var(--u));
  z-index: 6;
  padding: 0 calc(6 * var(--u));
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: calc(1.1 * var(--u));
  height: calc(9 * var(--u));
  padding: 0 calc(3.2 * var(--u));
  border-radius: calc(4.5 * var(--u));
  background: linear-gradient(180deg, rgba(120, 24, 8, 0.72), rgba(70, 10, 2, 0.82));
  border: calc(0.3 * var(--u)) solid rgba(255, 208, 120, 0.55);
  color: #ffe9b0;
  font-family: var(--font-display);
  font-size: calc(3.2 * var(--u));
  letter-spacing: calc(0.05 * var(--u));
  box-shadow: 0 calc(0.5 * var(--u)) calc(1.4 * var(--u)) rgba(0, 0, 0, 0.35);
  transition: transform 0.14s var(--ease-out), border-color 0.2s;
}

.ghost-btn:active {
  transform: scale(0.95);
  border-color: rgba(255, 232, 170, 0.95);
}

.ghost-btn svg {
  width: calc(3.4 * var(--u));
  height: calc(3.4 * var(--u));
}

.brand-foot {
  position: absolute;
  left: 0;
  top: calc(196 * var(--u));
  width: 100%;
  margin: 0;
  text-align: center;
  font-family: var(--font-body);
  font-size: calc(2.6 * var(--u));
  letter-spacing: calc(0.06 * var(--u));
  color: rgba(255, 226, 190, 0.6);
  z-index: 2;
}

/* ---------- 9. coin burst ---------- */
.coin-burst {
  position: fixed;
  left: 50%;
  top: 0;
  width: calc(96 * var(--u));
  height: calc(177.8667 * var(--u));
  transform: translateX(-50%);
  overflow: hidden;
  pointer-events: none;
  z-index: 45;
}

.coin-burst .particle {
  position: absolute;
  left: 50%;
  top: 62%;
  width: var(--size);
  height: var(--size);
  background-image: url("../assets/img/coin-sprite.webp");
  background-repeat: no-repeat;
  background-size: 700% 100%;
  opacity: 0;
  will-change: transform, opacity;
  animation: coinFlight var(--dur) var(--delay) cubic-bezier(0.2, 0.62, 0.32, 1) both;
}

@keyframes coinFlight {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) translate(0, 0) scale(0.3) rotate(0deg);
  }
  12% {
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translate(var(--tx), var(--ty)) scale(1) rotate(var(--rot));
  }
}

/* ---------- 10. modal base ---------- */
.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(2px);
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s;
}

.overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.overlay[hidden] {
  display: none;
}

.overlay .popup-glow {
  position: absolute;
  left: 50%;
  top: calc(30 * var(--u));
  width: calc(142.1333 * var(--u));
  height: calc(104.4 * var(--u));
  transform: translateX(-50%);
  background-image: url("../assets/img/popup-glow.webp");
  background-repeat: no-repeat;
  background-position: 50%;
  background-size: 100% 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.42s ease-out;
  animation: glowSpin 18s linear infinite;
}

.overlay.is-open .popup-glow {
  opacity: 1;
}

@keyframes glowSpin {
  from {
    transform: translateX(-50%) rotate(0deg);
  }
  to {
    transform: translateX(-50%) rotate(360deg);
  }
}

/* ---------- 11. win modal (1:1 with reference tip-modal) ---------- */
.win-content {
  position: relative;
  width: 100%;
  height: calc(216.5333 * var(--u));
  text-align: center;
  z-index: 2;
  opacity: 0;
  transform: translateY(calc(9.6 * var(--u))) scale(0.72);
  transition: opacity 0.46s ease-out, transform 0.46s var(--ease-out);
}

.overlay.is-open .win-content {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.win-content .tip-title-img {
  position: absolute;
  left: calc(8 * var(--u));
  top: calc(20 * var(--u));
  width: calc(84 * var(--u));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: calc(6.8 * var(--u));
  line-height: 1.1;
  white-space: nowrap;
  max-width: 100%;
  color: #ffe15c;
  /* No text-stroke here on purpose: the fitted size can drop to ~20px for long
     translations (de/ru), where a stroke eats the golden fill and the title
     turns solid rust. A stacked em-based shadow keeps the 3D gold look and
     scales with the font size. */
  text-shadow:
    0 0.035em 0 #f07d00,
    0 0.075em 0 #c23c00,
    0 0.115em 0 #8a2100,
    0 0.15em 0.05em rgba(74, 16, 0, 0.85),
    0 0 0.5em rgba(255, 214, 92, 0.7);
  transform: rotate(-2.5deg);
  animation: congratsPop 0.7s var(--ease-out) both;
}

@keyframes congratsPop {
  0% {
    transform: rotate(-2.5deg) scale(0.5);
    opacity: 0;
  }
  60% {
    transform: rotate(-2.5deg) scale(1.08);
    opacity: 1;
  }
  100% {
    transform: rotate(-2.5deg) scale(1);
    opacity: 1;
  }
}

.win-content .tip-desc {
  position: absolute;
  left: calc(1.3333 * var(--u));
  top: calc(40 * var(--u));
  width: calc(97.3333 * var(--u));
  margin: 0;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: calc(4.8 * var(--u));
  line-height: calc(5.8667 * var(--u));
  color: #fff8d9;
  text-shadow: 0 calc(0.4 * var(--u)) calc(0.2667 * var(--u)) rgba(61, 24, 8, 0.75);
}

.win-content .tip-main-img {
  position: absolute;
  left: calc(3.6 * var(--u));
  top: calc(60 * var(--u));
  width: calc(92.6667 * var(--u));
  height: calc(59.4667 * var(--u));
  object-fit: contain;
  animation: potFloat 3.4s ease-in-out infinite;
  filter: drop-shadow(0 calc(1.6 * var(--u)) calc(2.4 * var(--u)) rgba(50, 8, 0, 0.55));
}

@keyframes potFloat {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(calc(-1.2 * var(--u))) scale(1.015);
  }
}

.win-content .tip-amount {
  position: absolute;
  left: calc(4.2667 * var(--u));
  top: calc(93.3333 * var(--u));
  width: calc(91.4667 * var(--u));
  height: calc(18.2667 * var(--u));
  padding-top: calc(5.8667 * var(--u));
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background-image: url("../assets/img/popup-amount-bg.webp");
  background-repeat: no-repeat;
  background-position: 50%;
  background-size: 100% 100%;
  z-index: 3;
}

.win-content .tip-amount .tip-amount-text {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: calc(9.6 * var(--u));
  line-height: 1;
  color: #fff1b0;
  text-shadow:
    0 calc(0.55 * var(--u)) 0 #a34800,
    0 0 calc(2.2 * var(--u)) rgba(255, 214, 90, 0.7);
  font-variant-numeric: tabular-nums;
  animation: amountPop 0.55s 0.25s var(--ease-out) both;
}

@keyframes amountPop {
  0% {
    transform: scale(0.4);
    opacity: 0;
  }
  70% {
    transform: scale(1.14);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}

.win-content .claim-btn {
  position: absolute;
  left: calc(20.1333 * var(--u));
  top: calc(140 * var(--u));
  width: calc(59.7333 * var(--u));
  height: calc(13.3333 * var(--u));
  padding: 0 calc(2.4 * var(--u)) calc(0.6667 * var(--u));
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url("../assets/img/claim-btn.webp");
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 100% 100%;
  color: #fff;
  font-family: var(--font-display);
  font-size: calc(5.3333 * var(--u));
  font-weight: 900;
  white-space: nowrap;
  animation: claimPulse 0.9s ease-in-out infinite;
  text-shadow: 0 calc(0.4 * var(--u)) 0 rgba(150, 70, 0, 0.85);
}

.win-content .claim-btn:active {
  transform: scale(0.96);
}

.win-content .claim-btn .hand {
  position: absolute;
  right: calc(-2.4 * var(--u));
  top: calc(6.4 * var(--u));
  width: calc(15.2 * var(--u));
  height: calc(12 * var(--u));
  animation: handMove 0.8s linear infinite;
  pointer-events: none;
}

@keyframes claimPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.045);
  }
}

.win-content .win-close {
  position: absolute;
  left: 50%;
  top: calc(158 * var(--u));
  transform: translateX(-50%);
  width: calc(10 * var(--u));
  height: calc(10 * var(--u));
  border-radius: 50%;
  border: calc(0.35 * var(--u)) solid rgba(255, 226, 170, 0.6);
  color: #ffe9b8;
  font-size: calc(4.6 * var(--u));
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
}

/* ---------- 12. sheets ---------- */
.sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: calc(100vw * var(--s));
  max-height: 86vh;
  transform: translate(-50%, 100%);
  background:
    linear-gradient(180deg, #a52310 0%, #7d1507 42%, #4d0a02 100%);
  border-top: calc(0.5 * var(--u)) solid rgba(255, 210, 120, 0.65);
  border-radius: calc(6 * var(--u)) calc(6 * var(--u)) 0 0;
  box-shadow: 0 calc(-2 * var(--u)) calc(6 * var(--u)) rgba(0, 0, 0, 0.55);
  z-index: 44;
  display: flex;
  flex-direction: column;
  transition: transform 0.36s var(--ease-out);
  visibility: hidden;
}

.sheet.is-open {
  transform: translate(-50%, 0);
  visibility: visible;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(4.4 * var(--u)) calc(5 * var(--u)) calc(2.4 * var(--u));
  flex-shrink: 0;
}

.sheet-head h2 {
  margin: 0;
  /* As a flex item with min-width:auto the h2 would be sized by its own text,
     so clientWidth never reports the real available space and the fit loop
     cannot shrink long translations (e.g. "Teilnahmebedingungen"). */
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-align: left;
  padding-right: calc(2 * var(--u));
  font-family: var(--font-display);
  font-size: calc(5 * var(--u));
  font-weight: 900;
  color: #ffe15c;
  text-shadow:
    0 0.03em 0 #f07d00,
    0 0.07em 0 #c23c00,
    0 0.11em 0.04em rgba(74, 16, 0, 0.85),
    0 0 0.4em rgba(255, 214, 92, 0.55);
  letter-spacing: calc(0.05 * var(--u));
}

.sheet-close {
  width: calc(8.4 * var(--u));
  height: calc(8.4 * var(--u));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 232, 190, 0.16);
  border: calc(0.25 * var(--u)) solid rgba(255, 220, 150, 0.4);
  color: #ffe9b8;
  font-size: calc(4.2 * var(--u));
  line-height: 1;
  flex-shrink: 0;
}

.sheet-body {
  padding: 0 calc(5 * var(--u)) calc(6 * var(--u));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* rules */
.rule-list {
  display: flex;
  flex-direction: column;
  gap: calc(2.6 * var(--u));
}

.rule-list li {
  position: relative;
  padding-left: calc(5.4 * var(--u));
  font-size: calc(3.5 * var(--u));
  line-height: calc(5.2 * var(--u));
  color: #fff3dc;
  text-shadow: 0 calc(0.2 * var(--u)) 0 rgba(60, 10, 0, 0.5);
}

.rule-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: calc(0.9 * var(--u));
  width: calc(3.2 * var(--u));
  height: calc(3.2 * var(--u));
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6c8, #ffbe2e 55%, #c17600 100%);
  box-shadow: 0 0 calc(1.2 * var(--u)) rgba(255, 200, 80, 0.6);
}

/* language grid */
.lang-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(2.6 * var(--u));
}

.lang-item {
  display: flex;
  align-items: center;
  gap: calc(2 * var(--u));
  padding: calc(2.8 * var(--u)) calc(3 * var(--u));
  border-radius: calc(3.2 * var(--u));
  background: rgba(255, 240, 210, 0.08);
  border: calc(0.28 * var(--u)) solid rgba(255, 214, 140, 0.28);
  color: #ffeccb;
  text-align: left;
  transition: background 0.2s, border-color 0.2s, transform 0.14s;
}

.lang-item:active {
  transform: scale(0.97);
}

.lang-item .flag {
  font-size: calc(5 * var(--u));
  line-height: 1;
}

.lang-item .name {
  font-family: var(--font-display);
  font-size: calc(3.5 * var(--u));
  line-height: 1.15;
}

.lang-item .en-name {
  display: block;
  font-family: var(--font-body);
  font-size: calc(2.5 * var(--u));
  color: rgba(255, 226, 190, 0.62);
  margin-top: calc(0.3 * var(--u));
}

.lang-item.is-active {
  background: linear-gradient(180deg, rgba(255, 214, 110, 0.95), rgba(226, 150, 20, 0.95));
  border-color: #ffe9b0;
  color: #5d1503;
  box-shadow: 0 calc(0.5 * var(--u)) calc(1.6 * var(--u)) rgba(0, 0, 0, 0.35);
}

.lang-item.is-active .en-name {
  color: rgba(90, 25, 0, 0.68);
}

/* ---------- 13. exchange card ---------- */
.exchange-card {
  position: relative;
  width: calc(88 * var(--u));
  padding: calc(27 * var(--u)) calc(5 * var(--u)) calc(5 * var(--u));
  background-image: url("../assets/img/intercept-bg.webp");
  background-repeat: no-repeat;
  background-position: 50%;
  background-size: 100% 100%;
  color: #fff2d3;
  text-align: center;
  opacity: 0;
  transform: scale(0.72) translateY(calc(6 * var(--u)));
  transition: opacity 0.36s ease-out, transform 0.42s var(--ease-out);
}

.overlay.is-open .exchange-card {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.exchange-card h2 {
  margin: 0 0 calc(3.2 * var(--u));
  font-family: var(--font-display);
  font-size: calc(5.2 * var(--u));
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  color: #ffe15c;
  text-shadow:
    0 0.03em 0 #f07d00,
    0 0.07em 0 #c23c00,
    0 0.11em 0.04em rgba(74, 16, 0, 0.85),
    0 0 0.4em rgba(255, 214, 92, 0.55);
}

.exchange-rows {
  display: flex;
  flex-direction: column;
  gap: calc(2.2 * var(--u));
  margin-bottom: calc(3 * var(--u));
}

.exchange-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(2 * var(--u));
  padding: calc(2.2 * var(--u)) calc(3 * var(--u));
  border-radius: calc(2.4 * var(--u));
  background: rgba(0, 0, 0, 0.22);
  border: calc(0.2 * var(--u)) solid rgba(255, 214, 150, 0.2);
}

.exchange-row .k {
  font-size: calc(3.1 * var(--u));
  color: rgba(255, 236, 205, 0.8);
}

.exchange-row .v {
  font-family: var(--font-display);
  font-size: calc(3.6 * var(--u));
  color: var(--win);
  font-variant-numeric: tabular-nums;
}

.exchange-note {
  margin: 0 0 calc(3.4 * var(--u));
  font-size: calc(2.9 * var(--u));
  line-height: calc(4.2 * var(--u));
  color: rgba(255, 232, 200, 0.82);
}

.exchange-state {
  margin: 0 0 calc(3 * var(--u));
  font-family: var(--font-display);
  font-size: calc(3.8 * var(--u));
  color: #fff1a8;
  line-height: 1.3;
}

.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: calc(56 * var(--u));
  height: calc(12.8 * var(--u));
  padding: 0 calc(6 * var(--u)) calc(0.8 * var(--u));
  max-width: 100%;
  box-sizing: border-box;
  background-image: url("../assets/img/intercept-btn.webp");
  background-repeat: no-repeat;
  background-position: 50%;
  background-size: 100% 100%;
  color: #fff;
  font-family: var(--font-display);
  font-size: calc(3.5 * var(--u));
  font-weight: 900;
  text-shadow: 0 calc(0.35 * var(--u)) 0 rgba(140, 60, 0, 0.9);
  white-space: nowrap;
  transition: transform 0.14s var(--ease-out);
}

.btn-gold:active {
  transform: scale(0.96);
}

.btn-gold[disabled] {
  filter: grayscale(0.8) brightness(0.85);
}

/* ---------- 14. thanks modal ---------- */
.thanks-body {
  position: relative;
  width: calc(70.4 * var(--u));
  height: calc(51.3333 * var(--u));
  padding-top: calc(18.6667 * var(--u));
  text-align: center;
  color: #fff;
  background-image: url("../assets/img/thanks-bg.png");
  background-repeat: no-repeat;
  background-position: 50%;
  background-size: 100%;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.4s ease, transform 0.4s var(--ease-out);
}

.overlay.is-open .thanks-body {
  opacity: 1;
  transform: scale(1);
}

.thanks-body .t-title {
  margin: 0 0 calc(1.2 * var(--u));
  font-family: var(--font-display);
  font-size: calc(5.4 * var(--u));
  color: #ffe89a;
  -webkit-text-stroke: calc(0.5 * var(--u)) #8a2205;
  paint-order: stroke fill;
}

.thanks-body .t-desc {
  margin: 0 0 calc(4 * var(--u));
  font-size: calc(3.2 * var(--u));
  line-height: calc(4.4 * var(--u));
  color: #fff3d8;
  padding: 0 calc(3 * var(--u));
}

.thanks-body .thanks-btn {
  width: calc(50.1333 * var(--u));
  height: calc(11.6 * var(--u));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url("../assets/img/thanks-btn.png");
  background-repeat: no-repeat;
  background-position: 50%;
  background-size: 100%;
  color: #fff;
  font-family: var(--font-display);
  font-size: calc(4 * var(--u));
  font-weight: 900;
  text-shadow: 0 calc(0.3 * var(--u)) 0 rgba(140, 60, 0, 0.85);
}

/* ---------- 15. toasts ---------- */
.toast-container {
  position: fixed;
  left: 50%;
  bottom: calc(31 * var(--u));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(1.6 * var(--u));
  z-index: 60;
  pointer-events: none;
  width: calc(90 * var(--u));
}

.toast {
  max-width: 100%;
  padding: calc(2 * var(--u)) calc(3.2 * var(--u));
  border-radius: calc(3 * var(--u));
  background: rgba(20, 6, 2, 0.86);
  border: calc(0.2 * var(--u)) solid rgba(255, 214, 140, 0.45);
  color: #fff4d8;
  font-size: calc(3.1 * var(--u));
  line-height: 1.3;
  text-align: center;
  box-shadow: 0 calc(0.8 * var(--u)) calc(2 * var(--u)) rgba(0, 0, 0, 0.45);
  animation: toastIn 0.28s var(--ease-out) both;
  word-break: break-word;
}

.toast.out {
  animation: toastOut 0.26s ease-in both;
}

.toast b {
  color: var(--win);
  font-family: var(--font-display);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(calc(-2 * var(--u))) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(calc(-2 * var(--u))) scale(0.96);
  }
}

/* ---------- 16. loader ---------- */
.boot {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ed4b2f;
  z-index: 90;
  transition: opacity 0.4s ease, visibility 0.4s;
}

.boot.done {
  opacity: 0;
  visibility: hidden;
}

.boot .spinner {
  width: calc(8 * var(--u));
  height: calc(8 * var(--u));
  border: calc(0.8 * var(--u)) solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: rotate 0.9s linear infinite;
}

@keyframes rotate {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- 17. entrance ---------- */
.reveal {
  opacity: 0;
  transform: translateY(calc(2.4 * var(--u)));
  animation: revealIn 0.62s var(--ease-out) forwards;
}

.reveal.d1 {
  animation-delay: 0.08s;
}
.reveal.d2 {
  animation-delay: 0.16s;
}
.reveal.d3 {
  animation-delay: 0.26s;
}
.reveal.d4 {
  animation-delay: 0.36s;
}

@keyframes revealIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- 18. text fitting / long languages ---------- */
.fit-shrink {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: clip;
}

/* ---------- 19. reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .wheel-idle {
    animation: none;
  }
}


/* keyboard focus only, no blue ring after touch taps */
button:focus {
  outline: none;
}
button:focus-visible {
  outline: none;
}
