@font-face {
  font-family: Onest;
  src: url("/assets/fonts/onest-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #07090b;
  --panel: rgba(12, 14, 17, .86);
  --panel-strong: rgba(10, 12, 15, .97);
  --line: rgba(201, 232, 70, .15);
  --line-bright: rgba(230, 174, 71, .42);
  --gold: #e6ae47;
  --gold-soft: #f2d18b;
  --acid: #c9e846;
  --red: #e34b34;
  --forest: #1d3c2c;
  --pink: #ad376f;
  --violet: #563078;
  --muted: #92959b;
  --text: #f3efe7;
  --safe-top: max(env(safe-area-inset-top, 0px), var(--arara-safe-top, 0px));
  --safe-right: max(env(safe-area-inset-right, 0px), var(--arara-safe-right, 0px));
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--arara-safe-bottom, 0px));
  --safe-left: max(env(safe-area-inset-left, 0px), var(--arara-safe-left, 0px));
  --app-height: var(--arara-viewport-stable-height, 100svh);
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Onest, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

button, a { font: inherit; }
button { color: inherit; }
button, [href] { touch-action: manipulation; }
img { max-width: 100%; }

.world {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(2, 5, 7, .34), rgba(4, 7, 8, .82)),
    url("/assets/game/runtime/background.webp") center / cover no-repeat;
}

.world::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(circle at 50% 24%, rgba(201, 232, 70, .045), transparent 24%),
    radial-gradient(circle at 50% 20%, transparent 0 14%, rgba(3, 7, 9, .38) 54%, rgba(2, 4, 5, .9) 100%);
}

.world::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background: url("/assets/game/runtime/foreground.webp") center / cover no-repeat;
  opacity: .16;
  filter: saturate(.68) contrast(1.06) brightness(.82);
}

.world__veil {
  position: absolute;
  inset: 0;
  z-index: 4;
  background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.014) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
  opacity: .18;
}

.world__moon {
  position: absolute;
  z-index: 1;
  width: 280px;
  height: 280px;
  left: 50%;
  top: -180px;
  translate: -50% 0;
  border-radius: 50%;
  background: rgba(244, 192, 108, .12);
  filter: blur(42px);
}

.petal {
  position: absolute;
  z-index: 5;
  width: 27px;
  height: 27px;
  top: -20px;
  background-image: url("/assets/game/runtime/particles-petals.webp");
  background-position: var(--petal-x, 0%) var(--petal-y, 0%);
  background-repeat: no-repeat;
  background-size: 300% 200%;
  opacity: .34;
  animation: petal-fall var(--fall, 11s) linear var(--delay, 0s) infinite;
}

@keyframes petal-fall {
  0% { transform: translate3d(0, -5vh, 0) rotate(0); }
  50% { transform: translate3d(var(--drift, 24px), 50vh, 0) rotate(260deg); }
  100% { transform: translate3d(calc(var(--drift, 24px) * -.6), 105vh, 0) rotate(540deg); }
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  min-height: var(--app-height);
  margin: 0 auto;
  padding-block: calc(var(--safe-top) + 12px) calc(112px + var(--safe-bottom));
  padding-inline: max(16px, var(--safe-left)) max(16px, var(--safe-right));
  background: linear-gradient(180deg, rgba(5, 8, 10, .1), rgba(5, 8, 9, .64));
}

.topbar {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  margin-bottom: 14px;
}

.brand-lockup { display: flex; align-items: center; justify-content: center; gap: 9px; }
.brand-lockup img { width: 31px; height: 31px; object-fit: contain; filter: drop-shadow(0 0 8px rgba(249, 205, 89, .3)); }
.brand-lockup div { display: flex; flex-direction: column; line-height: 1; }
.brand-lockup strong { font-size: 16px; letter-spacing: .16em; }
.brand-lockup span { margin-top: 5px; color: var(--muted); font-size: 8px; letter-spacing: .22em; text-transform: uppercase; }

.icon-button, .refresh-button {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(8, 11, 13, .82);
  box-shadow: inset 0 1px rgba(255,255,255,.04);
  cursor: pointer;
}

.icon-button svg, .refresh-button svg { width: 20px; fill: none; stroke: var(--acid); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-button:active, .refresh-button:active { transform: scale(.95); }
.sound-off { display: none; }
#sound-toggle[aria-pressed="false"] .sound-on { display: none; }
#sound-toggle[aria-pressed="false"] .sound-off { display: block; }

.preview-ribbon {
  margin: -2px 0 12px;
  padding: 7px 10px;
  border: 1px solid rgba(245, 201, 92, .22);
  border-radius: 8px;
  background: rgba(201, 232, 70, .07);
  color: #dce99c;
  font-size: 10px;
  text-align: center;
  letter-spacing: .04em;
}

.screen { animation: screen-in .28s ease both; }
.screen[hidden] { display: none; }

@keyframes screen-in {
  from { opacity: 0; transform: translateY(6px); }
}

.prize-card {
  position: relative;
  overflow: hidden;
  padding: 14px 16px 12px;
  border: 1px solid var(--line-bright);
  border-radius: 16px;
  background:
    radial-gradient(circle at 82% 18%, rgba(227, 75, 52, .2), transparent 30%),
    linear-gradient(135deg, rgba(31, 16, 20, .96), rgba(8, 13, 14, .96) 62%);
  box-shadow: 0 18px 60px rgba(0,0,0,.24), inset 0 1px rgba(255,255,255,.06);
}

.prize-card__art {
  position: absolute;
  z-index: 0;
  width: 176px;
  max-width: none;
  right: -34px;
  top: -21px;
  rotate: 7deg;
  opacity: .25;
  pointer-events: none;
  filter: saturate(.9) drop-shadow(0 8px 22px rgba(0,0,0,.3));
}

.prize-card::after {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  right: -42px;
  top: -55px;
  border: 1px solid rgba(245, 201, 92, .18);
  border-radius: 50%;
  box-shadow: 0 0 0 18px rgba(245, 201, 92, .035), 0 0 0 40px rgba(245, 201, 92, .02);
}

.prize-card__eyebrow { position: relative; z-index: 2; display: flex; align-items: center; gap: 7px; color: #d8cbb6; font-size: 9px; font-weight: 700; letter-spacing: .2em; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 0 4px rgba(201, 232, 70, .1), 0 0 12px rgba(201, 232, 70, .64); animation: live-pulse 2.8s ease-in-out infinite; }
@keyframes live-pulse { 50% { opacity: .55; transform: scale(.8); } }
.prize-card__main { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-top: 4px; }
.prize-card__main > div { display: flex; align-items: flex-start; color: var(--gold-soft); line-height: 1; text-shadow: 0 0 24px rgba(245, 201, 92, .25); }
.prize-card__main strong { font-size: clamp(40px, 13vw, 60px); font-weight: 850; letter-spacing: -.055em; }
.prize-card__currency { margin: 7px 3px 0 0; color: var(--gold); font-size: 19px; font-weight: 800; }
.prize-card__main p { max-width: 145px; margin: 0 0 7px; color: var(--muted); font-size: 10px; line-height: 1.45; text-align: right; }
.prize-card__stats { display: flex; flex-wrap: wrap; gap: 7px 18px; margin-top: 7px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.06); color: var(--muted); font-size: 9px; }
.prize-card__stats i, .score-lockup i, .rules-card li i { font-style: normal; }
.prize-card__stats b { margin-right: 3px; color: var(--text); font-size: 11px; }

.player-strip {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  margin: 10px 0 4px;
  padding: 9px 11px;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 12px;
  background: rgba(8, 12, 14, .76);
  backdrop-filter: blur(14px);
}
.avatar { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: #101416; }
.avatar img { width: 28px; height: 28px; border-radius: 9px; object-fit: cover; }
.player-strip__name, .player-stat { display: flex; min-width: 0; flex-direction: column; }
.player-strip__name span, .player-stat span { color: #81758f; font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
.player-strip__name strong { overflow: hidden; margin-top: 3px; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.player-stat { min-width: 50px; padding-left: 9px; border-left: 1px solid rgba(255,255,255,.06); text-align: right; }
.player-stat strong { margin-top: 3px; color: var(--gold-soft); font-size: 12px; }
.player-stat--ticket strong { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.player-stat--ticket img { width: 20px; height: 13px; object-fit: contain; filter: drop-shadow(0 0 5px rgba(245, 201, 92, .3)); }

.tap-zone { position: relative; display: flex; align-items: center; flex-direction: column; padding: 7px 0 3px; }
.score-lockup { display: flex; align-items: center; flex-direction: column; min-height: 62px; }
.score-lockup span { display: flex; align-items: center; gap: 6px; color: #aeb5a7; font-size: 9px; font-weight: 750; letter-spacing: .18em; }
.score-lockup span img { width: 18px; height: 22px; object-fit: contain; filter: drop-shadow(0 0 7px rgba(212,90,156,.42)); }
.score-lockup strong { margin-top: 2px; color: var(--gold-soft); font-size: clamp(35px, 11vw, 50px); font-weight: 850; line-height: 1; letter-spacing: -.05em; text-shadow: 0 0 24px rgba(245, 201, 92, .2); }
.tap-orbit { position: relative; display: grid; width: min(82vw, 43svh, 372px); max-width: 372px; aspect-ratio: 1; margin: -8px 0 -1px; place-items: center; isolation: isolate; contain: layout paint; }
.tap-orbit__ring { position: absolute; z-index: 1; width: 100%; height: 100%; object-fit: contain; pointer-events: none; filter: saturate(.82) contrast(1.06) drop-shadow(0 14px 28px rgba(0,0,0,.42)); animation: ring-breathe 6.8s ease-in-out infinite; }
.tap-orbit__pedestal { position: absolute; z-index: 2; width: 88%; max-width: none; left: 6%; bottom: 1%; pointer-events: none; filter: drop-shadow(0 15px 18px rgba(0,0,0,.5)); }
@keyframes ring-breathe { 50% { transform: scale(1.006); filter: saturate(.82) brightness(1.04) drop-shadow(0 14px 28px rgba(0,0,0,.42)); } }

.tap-button {
  position: absolute;
  z-index: 3;
  inset: 4% 10% 8%;
  display: grid;
  overflow: visible;
  padding: 0;
  place-items: end center;
  border: 0;
  border-radius: 46% 46% 38% 38%;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  user-select: none;
  transition: transform .18s cubic-bezier(.2,.72,.2,1), filter .22s ease;
  -webkit-user-select: none;
}
.tap-button::before { content: ""; position: absolute; inset: 5% 13% 15%; z-index: 0; border-radius: 50%; background: radial-gradient(circle, rgba(245,201,92,.13), rgba(109,59,209,.08) 44%, transparent 70%); filter: blur(8px); }
.tap-button:active, .tap-button.is-tapping { transform: scale(.972); filter: brightness(1.08) saturate(1.06); }
.tap-button:disabled { cursor: not-allowed; filter: grayscale(.4) brightness(.7); }
.tap-button__aura { position: absolute; z-index: 0; width: 62%; aspect-ratio: 1; left: 19%; top: 17%; border-radius: 50%; background: radial-gradient(circle, rgba(201,232,70,.12), rgba(227,75,52,.07) 46%, transparent 72%); filter: blur(24px); animation: aura 5.2s ease-in-out infinite; }
@keyframes aura { 50% { transform: scale(1.1); opacity: .6; } }
.tap-button__character { position: absolute; z-index: 2; width: auto; max-width: none; height: 103%; left: 50%; bottom: 2%; object-fit: contain; object-position: 50% 100%; translate: -50% 0; pointer-events: none; image-rendering: auto; filter: drop-shadow(0 12px 15px rgba(0,0,0,.52)); transition: opacity .16s ease, transform .2s cubic-bezier(.2,.72,.2,1); }
.tap-button__character--tap { opacity: 0; }
.tap-button.is-tapping .tap-button__character--idle { opacity: 0; }
.tap-button.is-tapping .tap-button__character--tap { opacity: 1; }
.tap-button__shockwave { position: absolute; z-index: 4; width: 112%; height: 112%; left: -6%; top: -7%; object-fit: contain; opacity: 0; pointer-events: none; }
.tap-button__shine { position: absolute; z-index: 3; inset: 0; border-radius: 50%; background: linear-gradient(108deg, transparent 38%, rgba(201,232,70,.08) 49%, transparent 60%); background-position: 170% 0; background-size: 240% 100%; background-repeat: no-repeat; animation: tap-shine 7.5s ease-in-out infinite; pointer-events: none; }
@keyframes tap-shine { 0%, 64% { background-position: 170% 0; } 88%, 100% { background-position: -130% 0; } }
.tap-hint { margin: 1px 0 3px; color: #a796b4; font-size: 8px; font-weight: 700; letter-spacing: .24em; text-shadow: 0 1px 5px #080312; }

.tap-cry { position: absolute; z-index: 8; translate: -50% -50%; color: var(--acid); font-size: clamp(12px, 3.7vw, 18px); font-weight: 900; letter-spacing: .08em; white-space: nowrap; pointer-events: none; text-shadow: 0 2px 0 #16110b, 0 0 12px rgba(201,232,70,.36), 1px 1px 0 var(--red); animation: tap-cry 1.35s cubic-bezier(.16,.72,.22,1) both; }
@keyframes tap-cry { 0% { opacity: 0; transform: rotate(var(--cry-tilt)) scale(.72) translateY(10px); } 18% { opacity: 1; } 72% { opacity: .92; } 100% { opacity: 0; transform: rotate(var(--cry-tilt)) scale(1.08) translateY(-34px); } }

.tap-pop { position: fixed; z-index: 20; color: var(--gold-soft); font-size: 18px; font-weight: 850; pointer-events: none; text-shadow: 0 0 10px rgba(230, 174, 71, .55); animation: tap-pop 1.08s cubic-bezier(.16,.72,.22,1) both; }
@keyframes tap-pop { to { opacity: 0; transform: translate(var(--pop-x), -64px) scale(1.15); } }

.tap-spark { position: fixed; z-index: 19; width: 32px; height: 32px; margin: -16px 0 0 -16px; background-image: url("/assets/game/runtime/particles-sparks.webp"); background-position: var(--spark-x, 0%) var(--spark-y, 0%); background-repeat: no-repeat; background-size: 400% 200%; pointer-events: none; filter: hue-rotate(28deg) saturate(1.15); animation: tap-spark .7s cubic-bezier(.16,.72,.22,1) both; }
@keyframes tap-spark { to { opacity: 0; transform: translate(var(--spark-dx), var(--spark-dy)) scale(.45) rotate(45deg); } }

.reward-confetti { position: fixed; z-index: 190; width: 36px; height: 36px; left: 50%; top: 48%; margin: -18px; background-image: url("/assets/game/runtime/particles-confetti.webp"); background-position: var(--confetti-x, 0%) var(--confetti-y, 0%); background-repeat: no-repeat; background-size: 400% 300%; pointer-events: none; animation: reward-confetti .95s cubic-bezier(.2,.7,.2,1) both; }
@keyframes reward-confetti { to { opacity: 0; transform: translate(var(--confetti-dx), var(--confetti-dy)) rotate(var(--confetti-r)) scale(.7); } }

.energy-row { display: grid; grid-template-columns: 20% minmax(0, 1fr) 19%; align-items: center; width: min(100%, 430px); aspect-ratio: 680 / 143; gap: 4px; margin: -4px auto -2px; padding: 0 4.5% 0 2.8%; background: linear-gradient(rgba(7,12,12,.18), rgba(7,12,12,.18)), url("/assets/game/runtime/ui-energy-bar.webp") center / 100% 100% no-repeat; background-blend-mode: multiply, normal; }
.energy-icon { display: grid; width: 100%; height: 62%; place-items: center; }
.energy-icon img { width: 44%; height: 82%; object-fit: contain; filter: drop-shadow(0 0 8px rgba(245,201,92,.34)); }
.energy-track, .ticket-progress__track { height: 9px; overflow: hidden; border-radius: 20px; background: rgba(4,1,10,.72); box-shadow: inset 0 1px 4px rgba(0,0,0,.65), 0 0 0 1px rgba(255,224,135,.08); }
.energy-track i, .ticket-progress__track i { display: block; width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #9f2e27, var(--red) 42%, var(--acid)); box-shadow: 0 0 10px rgba(201, 232, 70, .28); transform: scaleX(0); transform-origin: left center; transition: transform .2s ease; }
.energy-row strong { min-width: 0; color: #f4e5c4; font-size: clamp(8px, 2.4vw, 11px); text-align: center; font-variant-numeric: tabular-nums; text-shadow: 0 1px 4px #080312; }
.ticket-progress { width: 100%; margin-top: 11px; padding: 11px 13px; border: 1px solid rgba(201,232,70,.09); border-radius: 10px; background: rgba(8, 12, 14, .76); }
.ticket-progress > div:first-child { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.ticket-progress span, .ticket-progress small { color: #8d8299; font-size: 9px; }
.ticket-progress strong { color: var(--gold-soft); font-size: 9px; }
.ticket-progress__track { height: 5px; }
.ticket-progress__track i { background: linear-gradient(90deg, #1f4a35, var(--acid) 68%, var(--gold)); }
.ticket-progress small { display: block; margin-top: 6px; text-align: right; }

.daily-card { display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 10px; margin-top: 10px; padding: 9px 12px 9px 7px; border: 1px solid var(--line); border-radius: 13px; background: linear-gradient(110deg, rgba(34, 18, 18, .95), rgba(8, 15, 14, .95)); box-shadow: inset 0 1px rgba(255,255,255,.04), 0 15px 34px rgba(0,0,0,.2); }
.daily-card__icon { display: grid; width: 58px; height: 58px; place-items: center; }
.daily-card__icon img { width: 52px; height: 56px; object-fit: contain; filter: drop-shadow(0 7px 8px rgba(0,0,0,.4)); }
.daily-card__copy { display: flex; min-width: 0; flex-direction: column; }
.daily-card__copy > span { color: #a9929d; font-size: 8px; font-weight: 700; letter-spacing: .12em; }
.daily-card__copy strong { margin-top: 3px; font-size: 12px; }
.daily-card__copy strong b { color: var(--gold-soft); }
.daily-card__copy small { margin-top: 3px; color: #85798d; font-size: 8px; }

.gold-button { display: inline-grid; min-height: 42px; padding: 0 18px; place-items: center; border: 1px solid #e9da70; border-radius: 10px; background: linear-gradient(180deg, #dcec68, #d89b37); box-shadow: 0 7px 20px rgba(201,232,70,.13), inset 0 1px rgba(255,255,255,.42); color: #161608; font-weight: 850; text-decoration: none; cursor: pointer; }
.gold-button:active { transform: translateY(1px) scale(.98); }
.gold-button:disabled { opacity: .5; cursor: not-allowed; filter: grayscale(.5); }
.gold-button--small { min-height: 34px; padding: 0 12px; border-radius: 11px; font-size: 9px; text-transform: uppercase; }
.gold-button--wide { width: 100%; margin-top: 14px; }

.section-heading { display: flex; align-items: center; justify-content: space-between; min-height: 66px; padding: 5px 2px 8px; }
.section-heading > div:first-child { display: flex; flex-direction: column; }
.section-heading span, .card-kicker { color: var(--acid); font-size: 8px; font-weight: 750; letter-spacing: .18em; }
.section-heading h1 { margin: 4px 0 0; font-size: 29px; letter-spacing: -.035em; }
.section-heading__reward { display: grid; width: 128px; min-height: 46px; grid-template-columns: 36px auto; align-items: center; column-gap: 2px; padding: 7px 12px 7px 13px; border: 0; background: url("/assets/game/runtime/ui-counter.webp") center / 100% 100% no-repeat; }
.section-heading__reward img { width: 35px; height: 24px; object-fit: contain; }
.section-heading__reward b { color: var(--gold-soft); font-size: 13px; }
.section-heading__reward span { grid-column: 1 / -1; margin-top: 2px; color: #85798e; font-size: 7px; text-align: center; letter-spacing: .05em; }
.section-lead { margin: -3px 2px 16px; color: #9b8fa8; font-size: 11px; line-height: 1.5; }

.task-list { display: flex; flex-direction: column; gap: 9px; }
.task-card { display: grid; min-height: 88px; grid-template-columns: 51px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 14px 17px; border: 0; border-radius: 0; background: linear-gradient(rgba(5,10,10,.28), rgba(5,10,10,.28)), url("/assets/game/runtime/ui-task-card.webp") center / 100% 100% no-repeat; background-blend-mode: multiply, normal; box-shadow: 0 13px 28px rgba(0,0,0,.2); }
.task-card__icon { display: grid; width: 48px; height: 48px; place-items: center; border: 0; border-radius: 14px; background: rgba(7,2,15,.4); color: var(--gold-soft); font-size: 15px; font-weight: 850; }
.task-card__copy { min-width: 0; }
.task-card__copy span { color: #81758c; font-size: 8px; letter-spacing: .13em; text-transform: uppercase; }
.task-card__copy strong { display: -webkit-box; overflow: hidden; margin-top: 4px; font-size: 11px; line-height: 1.25; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.task-card__copy small { display: flex; align-items: center; gap: 5px; margin-top: 5px; color: var(--gold); font-size: 9px; }
.task-card__action { min-width: 82px; min-height: 37px; padding: 0 9px; border: 1px solid rgba(201, 232, 70, .3); border-radius: 9px; background: rgba(7,12,12,.72); color: #dce99c; font-size: 9px; font-weight: 800; cursor: pointer; }
.task-card__action.is-claimed { border-color: rgba(91, 204, 140, .2); background: rgba(91, 204, 140, .08); color: #84dca9; cursor: default; }
.fairness-note, .rank-explainer { display: flex; gap: 11px; margin-top: 14px; padding: 13px; border: 1px solid rgba(201,232,70,.13); border-radius: 11px; background: rgba(12, 23, 19, .58); }
.fairness-note svg { flex: 0 0 auto; width: 23px; fill: none; stroke: var(--acid); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fairness-note strong, .rank-explainer strong { font-size: 10px; }
.fairness-note p, .rank-explainer p { margin: 4px 0 0; color: #9488a3; font-size: 9px; line-height: 1.45; }
.rank-explainer { display: block; margin: 0 0 13px; border-color: var(--line); background: rgba(58, 32, 55, .4); }

.rank-stage { position: relative; height: 152px; margin: -2px 0 10px; overflow: hidden; border: 1px solid rgba(201,232,70,.12); border-radius: 14px; background: radial-gradient(circle at 50% 25%, rgba(201,232,70,.07), transparent 42%), linear-gradient(180deg, rgba(26,26,28,.82), rgba(7,11,12,.94)); }
.rank-stage__medals { position: absolute; z-index: 2; width: min(84%, 390px); height: 92px; left: 50%; top: 5px; object-fit: contain; translate: -50% 0; filter: drop-shadow(0 8px 14px rgba(0,0,0,.34)); }
.rank-stage__podium { position: absolute; z-index: 1; width: min(94%, 445px); height: 92px; left: 50%; bottom: -7px; object-fit: contain; translate: -50% 0; filter: drop-shadow(0 10px 17px rgba(0,0,0,.42)); }

.leaderboard { display: flex; flex-direction: column; gap: 8px; }
.leader-row { display: grid; grid-template-columns: 35px 37px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 10px 11px; border: 1px solid rgba(255,255,255,.055); border-radius: 11px; background: rgba(8, 12, 14, .88); }
.leader-row.is-user { border-color: rgba(201, 232, 70, .32); background: linear-gradient(100deg, rgba(40, 28, 22, .88), rgba(9, 20, 16, .9)); }
.leader-row__rank { color: #8b7d97; font-size: 12px; font-weight: 800; text-align: center; }
.leader-row:nth-child(1) .leader-row__rank { color: #ffd76b; font-size: 17px; }
.leader-row:nth-child(2) .leader-row__rank { color: #d8d5de; font-size: 15px; }
.leader-row:nth-child(3) .leader-row__rank { color: #d18c62; font-size: 14px; }
.leader-row__avatar { display: grid; width: 37px; height: 37px; place-items: center; border-radius: 9px; background: linear-gradient(145deg, #342019, #111a16); color: var(--acid); font-size: 11px; font-weight: 850; }
.leader-row__name { min-width: 0; }
.leader-row__name strong, .leader-row__name span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leader-row__name strong { font-size: 10px; }
.leader-row__name span { margin-top: 3px; color: #776b84; font-size: 8px; }
.leader-row__score { text-align: right; }
.leader-row__score strong { display: block; color: var(--gold-soft); font-size: 11px; }
.leader-row__score span { color: #776b84; font-size: 7px; }
.skeleton-card { height: 60px; border-radius: 15px; background: linear-gradient(100deg, rgba(255,255,255,.035), rgba(255,255,255,.075), rgba(255,255,255,.035)); background-size: 200% 100%; animation: skeleton 1.4s linear infinite; }
@keyframes skeleton { to { background-position: -200% 0; } }

.leaderboard-state { display: grid; justify-items: center; padding: 8px 18px 18px; text-align: center; }
.leaderboard-state img { width: min(100%, 310px); height: 154px; object-fit: contain; filter: drop-shadow(0 14px 22px rgba(0,0,0,.4)); }
.leaderboard-state strong { margin-top: 3px; color: var(--text); font-size: 14px; }
.leaderboard-state p { max-width: 310px; margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.leaderboard-state button { min-height: 38px; margin-top: 13px; padding: 0 17px; border: 1px solid rgba(201,232,70,.32); border-radius: 9px; background: rgba(201,232,70,.08); color: var(--acid); font-weight: 800; cursor: pointer; }

.profile-card, .referral-card, .rules-card { padding: 17px; border: 1px solid rgba(255,255,255,.065); border-radius: 14px; background: rgba(8, 12, 14, .9); box-shadow: inset 0 1px rgba(255,255,255,.035); }
.profile-card { text-align: center; background: radial-gradient(circle at 50% 0, rgba(201,232,70,.09), transparent 43%), rgba(8, 12, 14, .92); }
.profile-card__avatar { display: grid; width: 82px; height: 82px; margin: -1px auto 9px; padding: 4px; place-items: center; border: 1px solid var(--line-bright); border-radius: 50%; background: #170b26; box-shadow: 0 0 32px rgba(138, 62, 151, .3); }
.profile-card__avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.profile-card h2 { margin: 0; font-size: 19px; }
.profile-card > p { margin: 4px 0 14px; color: #897d95; font-size: 9px; }
.profile-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255,255,255,.06); }
.profile-grid div { display: flex; flex-direction: column; padding-top: 12px; }
.profile-grid div + div { border-left: 1px solid rgba(255,255,255,.06); }
.profile-grid span { color: #82768e; font-size: 8px; }
.profile-grid strong { margin-top: 4px; color: var(--gold-soft); font-size: 16px; }
.ton-card { position: relative; margin-top: 11px; overflow: hidden; padding: 17px; border: 1px solid rgba(0,152,234,.28); border-radius: 14px; background: radial-gradient(circle at 92% 0, rgba(0,152,234,.16), transparent 42%), linear-gradient(145deg, rgba(12,22,35,.96), rgba(7,11,14,.96)); box-shadow: inset 0 1px rgba(255,255,255,.04), 0 16px 38px rgba(0,0,0,.2); }
.ton-card::after { content: ""; position: absolute; width: 150px; height: 150px; right: -80px; bottom: -90px; border: 1px solid rgba(0,152,234,.18); border-radius: 50%; box-shadow: 0 0 0 22px rgba(0,152,234,.035), 0 0 0 48px rgba(0,152,234,.02); pointer-events: none; }
.ton-card > * { position: relative; z-index: 1; }
.ton-card__heading { display: grid; grid-template-columns: 43px minmax(0,1fr) auto; align-items: center; gap: 10px; }
.ton-card__logo { display: grid; width: 43px; height: 43px; place-items: center; border-radius: 14px; background: linear-gradient(145deg, #18b6ff, #0875d1); box-shadow: 0 8px 22px rgba(0,152,234,.24); }
.ton-card__logo svg { width: 27px; height: 27px; fill: #fff; }
.ton-card__heading h2 { margin: 4px 0 0; font-size: 18px; }
.ton-card__state { padding: 6px 8px; border: 1px solid rgba(255,255,255,.08); border-radius: 999px; background: rgba(255,255,255,.04); color: #8e839b; font-size: 7px; font-weight: 800; text-transform: uppercase; white-space: nowrap; }
.ton-card__state.is-connected { border-color: rgba(69,213,143,.25); background: rgba(69,213,143,.08); color: #7ce3ae; }
.ton-card > p { margin: 13px 0; color: #9b91a7; font-size: 10px; line-height: 1.55; }
.ton-wallet { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 9px; margin-bottom: 10px; padding: 10px 11px; border: 1px solid rgba(255,255,255,.07); border-radius: 13px; background: rgba(5,12,27,.46); }
.ton-wallet[hidden], .ton-connect-button[hidden], .ton-disconnect-button[hidden] { display: none; }
.ton-wallet div { min-width: 0; }
.ton-wallet span, .ton-card > small { display: block; color: #746b82; font-size: 8px; }
.ton-wallet strong { display: block; overflow: hidden; margin-top: 4px; color: #dff6ff; font: 700 11px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.ton-wallet button, .ton-disconnect-button { min-height: 34px; padding: 0 10px; border: 1px solid rgba(0,152,234,.22); border-radius: 10px; background: rgba(0,152,234,.08); color: #a9e3ff; font-size: 8px; font-weight: 800; cursor: pointer; }
.ton-connect-button { width: 100%; min-height: 46px; border: 1px solid rgba(126,221,255,.45); border-radius: 13px; background: linear-gradient(180deg, #25b8f6, #0787d7); box-shadow: 0 10px 25px rgba(0,152,234,.2), inset 0 1px rgba(255,255,255,.28); color: #fff; font-size: 11px; font-weight: 850; cursor: pointer; }
.ton-connect-button:disabled { cursor: wait; filter: saturate(.5); opacity: .68; }
.ton-disconnect-button { width: 100%; margin-top: 8px; border-color: rgba(232,91,84,.2); background: rgba(232,91,84,.07); color: #eaa29d; }
.ton-card > small { margin-top: 9px; text-align: center; line-height: 1.4; }
.referral-card, .rules-card { margin-top: 11px; }
.referral-card { position: relative; overflow: hidden; isolation: isolate; }
.referral-card > :not(.referral-card__art) { position: relative; z-index: 2; }
.referral-card__art { position: absolute; z-index: 0; width: 48%; max-width: 210px; right: -30px; top: -18px; rotate: 6deg; opacity: .13; pointer-events: none; filter: saturate(.58) drop-shadow(0 10px 18px rgba(0,0,0,.38)); }
.referral-card h2 { margin: 6px 0 7px; font-size: 20px; }
.referral-card p { margin: 0; color: #96899f; font-size: 10px; line-height: 1.5; }
.referral-code { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 13px; }
.referral-code code { display: flex; align-items: center; min-width: 0; padding: 0 12px; border: 1px dashed rgba(245,201,92,.3); border-radius: 12px; background: rgba(245,201,92,.05); color: var(--gold-soft); font-size: 14px; font-weight: 800; letter-spacing: .14em; }
.referral-code button { min-height: 40px; padding: 0 11px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.04); color: #dbcfae; font-size: 8px; font-weight: 800; text-transform: uppercase; cursor: pointer; }
.referral-card > small { display: block; margin-top: 10px; color: #84788f; font-size: 9px; text-align: center; }
.referral-card > small b { color: var(--text); }
.rules-card ol { display: flex; flex-direction: column; gap: 12px; margin: 13px 0 16px; padding: 0; list-style: none; }
.rules-card li { display: grid; grid-template-columns: 30px 1fr; align-items: start; gap: 10px; }
.rules-card li > b { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: rgba(245,201,92,.07); color: var(--gold); }
.rules-card li span { color: #94999c; font-size: 9px; line-height: 1.45; }
.rules-card li strong { display: block; margin-bottom: 2px; color: var(--text); font-size: 10px; }
.rules-card li i { display: block; }
.rules-card > a { display: block; padding-top: 13px; border-top: 1px solid rgba(255,255,255,.06); color: var(--gold-soft); font-size: 10px; text-align: center; text-decoration: none; }

.bottom-nav {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 0;
  display: grid;
  width: min(100%, 520px);
  min-height: calc(88px + var(--safe-bottom));
  padding-block: 12px calc(10px + var(--safe-bottom));
  padding-inline: max(22px, var(--safe-left)) max(22px, var(--safe-right));
  grid-template-columns: repeat(4, 1fr);
  border: 0;
  background: linear-gradient(rgba(5,10,10,.32), rgba(5,10,10,.32)), url("/assets/game/runtime/ui-bottom-nav.webp") center top / 100% calc(88px + var(--safe-bottom)) no-repeat;
  background-blend-mode: multiply, normal;
  box-shadow: 0 -18px 42px rgba(0,0,0,.18);
  translate: -50% 0;
}
.bottom-nav button { display: flex; align-items: center; flex-direction: column; justify-content: center; gap: 3px; min-height: 60px; min-width: 0; padding: 3px 2px 0; border: 0; border-radius: 11px; background: transparent; color: #777b7e; cursor: pointer; }
.bottom-nav svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.bottom-nav span { overflow: hidden; max-width: 100%; font-size: 8px; font-weight: 700; line-height: 1.15; text-align: center; text-overflow: ellipsis; }
.bottom-nav button.is-active { background: radial-gradient(circle at 50% 35%, rgba(201,232,70,.12), transparent 58%); color: var(--acid); }
.bottom-nav button.is-active svg { filter: drop-shadow(0 0 8px rgba(201,232,70,.28)); }

.loading-screen, .auth-gate { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; flex-direction: column; justify-content: center; background: #07090b url("/assets/game/runtime/background.webp") center / cover no-repeat; }
.loading-screen::before, .auth-gate::before { content: ""; position: absolute; inset: 0; background: rgba(6, 2, 14, .83); backdrop-filter: blur(7px); }
.loading-screen > * { position: relative; }
.loading-screen img { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; filter: drop-shadow(0 0 24px rgba(245,201,92,.38)); animation: loader-float 1.5s ease-in-out infinite; }
@keyframes loader-float { 50% { transform: translateY(-7px); } }
.loading-screen strong { margin-top: 14px; font-size: 25px; letter-spacing: .23em; }
.loading-screen span { margin-top: 8px; color: #93879e; font-size: 9px; letter-spacing: .1em; }
.loading-screen.is-hidden { opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility 0s linear .35s; }
.auth-gate[hidden] { display: none; }
.auth-gate__card { position: relative; width: min(calc(100% - 36px), 390px); padding: 31px 27px 28px; border: 0; border-radius: 25px; background: rgba(17, 8, 29, .93) url("/assets/game/runtime/ui-reward-sheet.webp") center / 100% 100% no-repeat; box-shadow: 0 30px 90px rgba(0,0,0,.5); text-align: center; }
.auth-gate__card img { width: 118px; height: 118px; margin-bottom: 6px; border-radius: 50%; object-fit: cover; }
.auth-gate__card h1 { margin: 7px 0 9px; font-size: 25px; }
.auth-gate__card p { margin: 0; color: #a194ad; font-size: 11px; line-height: 1.55; }
.auth-gate__card small { display: block; margin-top: 13px; color: #7f7389; font-size: 8px; }

.toast-region { position: fixed; z-index: 200; left: 50%; top: calc(var(--safe-top) + 14px); display: flex; width: min(calc(100% - 32px), 420px); flex-direction: column; gap: 8px; translate: -50% 0; pointer-events: none; }
.toast { padding: 11px 14px; border: 1px solid var(--line-bright); border-radius: 14px; background: rgba(15, 7, 26, .95); box-shadow: 0 15px 40px rgba(0,0,0,.36); color: var(--text); font-size: 10px; text-align: center; animation: toast-in .25s ease both; backdrop-filter: blur(16px); }
.toast.is-success { border-color: rgba(111, 220, 158, .32); }
.toast.is-error { border-color: rgba(239, 91, 83, .38); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

@media (min-width: 700px) and (min-height: 600px) {
  body { padding: 22px 0; }
  .app-shell { min-height: calc(var(--app-height) - 44px); border: 1px solid rgba(201,232,70,.09); border-radius: 20px 20px 0 0; box-shadow: 0 30px 100px rgba(0,0,0,.44); }
  .bottom-nav { bottom: 22px; border: 1px solid rgba(245, 201, 92, .13); border-radius: 0 0 25px 25px; }
}

@media (max-width: 370px) {
  .app-shell { padding-inline: max(12px, var(--safe-left)) max(12px, var(--safe-right)); }
  .prize-card__main strong { font-size: 38px; }
  .prize-card__main p { max-width: 120px; font-size: 9px; }
  .tap-orbit { width: min(76vw, 278px); }
  .daily-card { grid-template-columns: 49px 1fr auto; gap: 7px; padding: 8px 9px 8px 5px; }
  .daily-card__icon { width: 49px; height: 51px; }
  .daily-card__icon img { width: 46px; height: 50px; }
  .daily-card__copy small { display: none; }
  .task-card { min-height: 82px; grid-template-columns: 43px minmax(0, 1fr) auto; gap: 7px; padding: 12px 13px; }
  .task-card__icon { width: 41px; height: 41px; }
  .task-card__action { min-width: 72px; padding-inline: 7px; }
  .bottom-nav { padding-inline: max(14px, var(--safe-left)) max(14px, var(--safe-right)); }
}

html:lang(ru) body {
  font-family: "SF Pro Text", "Segoe UI", system-ui, sans-serif;
}

html:lang(ar) body {
  font-family: Tahoma, "Segoe UI", Arial, sans-serif;
}

html:lang(hi) body {
  font-family: "Nirmala UI", "Noto Sans Devanagari", "Segoe UI", sans-serif;
}

html:lang(ar) :is(.brand-lockup span, .score-lockup span, .tap-hint, .section-heading span, .card-kicker, .daily-card__copy > span),
html:lang(hi) :is(.brand-lockup span, .score-lockup span, .tap-hint, .section-heading span, .card-kicker, .daily-card__copy > span) {
  letter-spacing: 0;
}

html[dir="rtl"] .icon-button--back svg { transform: scaleX(-1); }
html[dir="rtl"] .prize-card__main p,
html[dir="rtl"] .ticket-progress small { text-align: left; }
html[dir="rtl"] .energy-track i, html[dir="rtl"] .ticket-progress__track i { transform-origin: right center; }
html[dir="rtl"] .player-stat { padding-right: 9px; padding-left: 0; border-right: 1px solid rgba(255,255,255,.06); border-left: 0; text-align: left; }
html[dir="rtl"] .player-stat--ticket strong { justify-content: flex-start; }
html[dir="rtl"] .referral-card__art { right: auto; left: -30px; rotate: -6deg; }

@media (max-height: 700px) {
  .app-shell { padding-bottom: calc(96px + var(--safe-bottom)); }
  .topbar { margin-bottom: 8px; }
  .tap-orbit { width: min(72vw, 278px); }
  .bottom-nav { min-height: calc(78px + var(--safe-bottom)); padding-top: 7px; background-size: 100% calc(78px + var(--safe-bottom)); }
  .bottom-nav button { min-height: 54px; }
}

@media (orientation: landscape) and (max-height: 520px) {
  .app-shell { width: min(100%, 760px); }
  .tap-orbit { width: min(43vw, 236px); }
  .prize-card__main strong { font-size: 38px; }
  .daily-card__copy small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .petals { display: none; }
}
