:root {
  --stage-width: 1882;
  --stage-height: 3344;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --viewport-w: calc(100vw - var(--safe-left) - var(--safe-right));
  --viewport-h: calc(100dvh - var(--safe-top) - var(--safe-bottom));
  --stage-w: min(var(--viewport-w), calc(var(--viewport-h) * 1882 / 3344));
  --stage-h: min(var(--viewport-h), calc(var(--stage-w) * 3344 / 1882));
  --purple: #0d5aa7;
  --purple-dark: #18314b;
  --cream: #fff4df;
  --white: #ffffff;
  --gold: #ffc21d;
  --shadow-purple: rgba(7, 65, 105, 0.24);
  --menu-sky-background:
    radial-gradient(ellipse at 18% 12%, rgba(9, 92, 213, 0.32) 0%, transparent 42%),
    radial-gradient(ellipse at 78% 55%, rgba(16, 188, 238, 0.24) 0%, transparent 48%),
    radial-gradient(ellipse at 50% 100%, rgba(223, 251, 255, 0.8) 0%, transparent 58%),
    linear-gradient(180deg, #0874df 0%, #11a8eb 48%, #bdeff7 100%);
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  margin: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding:
    var(--safe-top)
    var(--safe-right)
    var(--safe-bottom)
    var(--safe-left);
  overscroll-behavior: none;
  position: fixed;
  inset: 0;
  background-color: #0b4a73;
  background-image: url("https://s3.ru-msk.k2.cloud/spar-online/assets/Find%20a%20pair/background_sky_clouds.png");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  color: var(--white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Continue the active scene beneath iPhone safe areas. The stage keeps all
   controls clear of the Dynamic Island and home indicator, while the artwork
   reaches every physical edge of the display. */
body:has(.menu-screen:not(.is-hidden)) {
  background-color: #0a8fe5;
  background-image: var(--menu-sky-background);
}

body:has(.game-screen:not(.is-hidden)) {
  background-color: #0a8fe5;
  background-image: url("https://s3.ru-msk.k2.cloud/spar-online/assets/Find%20a%20pair/background_sky_clouds.png");
}

body:has(.loading-screen:not(.is-hidden)) {
  background-image: url("https://s3.ru-msk.k2.cloud/spar-online/assets/Find%20a%20pair/background_sky_clouds.png");
}

body:has(.daily-screen:not(.is-hidden)) {
  background-image: url("https://s3.ru-msk.k2.cloud/spar-online/assets/SPAR%20Online%20%20Mondel%C4%93z%20Danone/background_loading_screen.png");
}

button {
  border: 0;
  color: inherit;
  font: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

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

.phone-stage {
  position: relative;
  width: var(--stage-w);
  height: var(--stage-h);
  max-width: var(--viewport-w);
  max-height: var(--viewport-h);
  aspect-ratio: 1882 / 3344;
  overflow: hidden;
  background: #78b8ff;
  isolation: isolate;
  container-type: size;
}

/* Real phones are taller than the original artwork ratio. In portrait mode the
   stage must fill the visual viewport so screen backgrounds can crop with
   object-fit: cover instead of exposing the body's fallback color. Component
   sizing remains width-driven, so cards and controls keep their proportions. */
@media (orientation: portrait) and (max-width: 768px) {
  .phone-stage {
    --stage-w: var(--viewport-w);
    --stage-h: var(--viewport-h);
    width: var(--viewport-w);
    height: var(--viewport-h);
    max-width: none;
    max-height: none;
    aspect-ratio: auto;
  }
}

.is-hidden {
  display: none !important;
}

.game-curtain {
  position: absolute;
  inset: 0;
  z-index: 120;
  overflow: hidden;
  pointer-events: none;
}

.game-curtain.is-running {
  pointer-events: auto;
}

.game-curtain__side {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.game-curtain__side::before {
  content: "";
  position: absolute;
  inset-block: 0;
  width: 62%;
  background: linear-gradient(90deg, rgba(236, 249, 255, 0.98), rgba(218, 240, 255, 0.9));
}

.game-curtain__side--left::before {
  left: 0;
}

.game-curtain__side--right::before {
  right: 0;
  transform: scaleX(-1);
}

.game-curtain__cloud {
  position: absolute;
  display: block;
  width: auto;
  height: auto;
  max-width: none;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(40, 112, 167, 0.2));
  will-change: transform;
}

.game-curtain__cloud--top {
  top: -6%;
  width: 125%;
  opacity: 0.96;
}

.game-curtain__cloud--middle {
  top: 22%;
  width: 140%;
  opacity: 1;
}

.game-curtain__cloud--bottom {
  top: 55%;
  width: 135%;
  opacity: 0.98;
}

.game-curtain__side--left .game-curtain__cloud {
  left: -25%;
}

.game-curtain__side--right .game-curtain__cloud {
  right: -25%;
  transform: scaleX(-1);
}

.game-curtain__side--left {
  transform: translate3d(-138%, 0, 0);
}

.game-curtain__side--right {
  transform: translate3d(138%, 0, 0);
}

.game-curtain.is-running .game-curtain__side--left {
  animation: gameCurtainLeft 1.35s cubic-bezier(0.62, 0, 0.28, 1) both;
}

.game-curtain.is-running .game-curtain__side--right {
  animation: gameCurtainRight 1.35s cubic-bezier(0.62, 0, 0.28, 1) both;
}

@keyframes gameCurtainLeft {
  0%,
  100% {
    transform: translate3d(-138%, 0, 0);
  }
  42%,
  58% {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes gameCurtainRight {
  0%,
  100% {
    transform: translate3d(138%, 0, 0);
  }
  42%,
  58% {
    transform: translate3d(0, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .game-curtain.is-running .game-curtain__side {
    animation: none;
  }
}

.loading-screen,
.daily-screen,
.menu-screen,
.game-screen {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.menu-screen {
  background: #48b5ed;
}

.loading-screen {
  z-index: 100;
}

.loading-screen__bg,
.daily-screen__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(5px);
  transform: scale(1.025);
  transform-origin: center;
}

.loading-screen__bg {
  object-position: center;
  filter: none;
  transform: none;
}

.menu-screen__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  background: var(--menu-sky-background);
  transform: none;
}

.menu-sky-static {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.menu-sky-static__cloud {
  position: absolute;
  display: block;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0.56;
  filter: blur(0.3px) drop-shadow(0 8px 12px rgba(48, 107, 145, 0.1));
}

.menu-sky-static__cloud--left {
  left: -5%;
  top: 10.5%;
  width: 25%;
}

.menu-sky-static__cloud--right {
  right: -6%;
  top: 13.5%;
  width: 27%;
  opacity: 0.62;
}

.menu-sky-motion {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.menu-sky-motion__cloud {
  position: absolute;
  display: block;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0.42;
  filter: blur(0.35px) drop-shadow(0 7px 10px rgba(59, 120, 157, 0.08));
  will-change: transform;
}

.menu-sky-motion__cloud--upper {
  top: 18%;
  left: -24%;
  width: 18%;
  animation: menuCloudSailRight 34s linear infinite -8s;
}

.menu-sky-motion__cloud--high {
  top: 29%;
  right: -18%;
  width: 12%;
  opacity: 0.25;
  filter: blur(0.8px);
  animation: menuCloudWaveLeft 31s linear infinite -17s;
}

.menu-sky-motion__cloud--middle {
  top: 48%;
  right: -34%;
  width: 27%;
  opacity: 0.34;
  animation: menuCloudSailLeft 46s linear infinite -29s;
}

.menu-sky-motion__cloud--mid-low {
  top: 61%;
  left: -27%;
  width: 21%;
  opacity: 0.31;
  filter: blur(0.6px) drop-shadow(0 7px 10px rgba(59, 120, 157, 0.07));
  animation: menuCloudWaveRight 43s linear infinite -32s;
}

.menu-sky-motion__cloud--lower {
  top: 72%;
  left: -22%;
  width: 15%;
  opacity: 0.3;
  animation: menuCloudSailRight 40s linear infinite -24s;
}

.menu-sky-motion__cloud--horizon {
  top: 82%;
  right: -17%;
  width: 10%;
  opacity: 0.2;
  filter: blur(1px);
  animation: menuCloudWaveLeft 37s linear infinite -6s;
}

@keyframes menuCloudSailRight {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(900%, -8%, 0);
  }
}

@keyframes menuCloudSailLeft {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-520%, 7%, 0);
  }
}

@keyframes menuCloudWaveRight {
  0% {
    transform: translate3d(0, 3%, 0) scale(0.96);
  }
  28% {
    transform: translate3d(220%, -8%, 0) scale(1.01);
  }
  62% {
    transform: translate3d(470%, 6%, 0) scale(1.04);
  }
  100% {
    transform: translate3d(700%, -2%, 0) scale(0.98);
  }
}

@keyframes menuCloudWaveLeft {
  0% {
    transform: translate3d(0, -4%, 0) scale(0.98);
  }
  34% {
    transform: translate3d(-430%, 8%, 0) scale(1.03);
  }
  68% {
    transform: translate3d(-870%, -6%, 0) scale(1);
  }
  100% {
    transform: translate3d(-1300%, 3%, 0) scale(0.96);
  }
}

.menu-sky-foreground {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
}

.menu-sky-foreground__cloud {
  position: absolute;
  display: block;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: blur(0.18px) drop-shadow(0 14px 18px rgba(47, 103, 137, 0.16));
  will-change: transform;
}

.menu-sky-foreground__cloud--left {
  left: -8%;
  top: 56%;
  width: 35%;
  opacity: 0.74;
  animation: menuCloudFloatLeft 10.5s ease-in-out infinite alternate -3s;
}

.menu-sky-foreground__cloud--right {
  right: -2%;
  top: 47%;
  width: 26%;
  opacity: 0.66;
  animation: menuCloudFloatRight 8.8s ease-in-out infinite alternate-reverse -5s;
}

@keyframes menuCloudFloatLeft {
  from {
    transform: translate3d(-7%, 3%, 0) scale(1.02);
  }
  to {
    transform: translate3d(13%, -3%, 0) scale(1.07);
  }
}

@keyframes menuCloudFloatRight {
  from {
    transform: translate3d(9%, -3%, 0) scale(1);
  }
  to {
    transform: translate3d(-15%, 4%, 0) scale(1.06);
  }
}

.menu-balloon-stage {
  position: absolute;
  inset: 14% 0 24%;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
  isolation: isolate;
}

.menu-balloon-drag {
  --balloon-drag-x: 0px;
  --balloon-drag-y: 0px;
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  transform: translate3d(var(--balloon-drag-x), var(--balloon-drag-y), 0);
  transition: transform 720ms cubic-bezier(0.18, 0.89, 0.32, 1.24);
  will-change: transform;
}

.menu-balloon-drag.is-dragging {
  transition: none;
}

.menu-balloon-float {
  position: absolute;
  left: 50%;
  top: 55%;
  z-index: 2;
  width: 61%;
  max-width: 520px;
  height: 96%;
  display: grid;
  place-items: center;
  transform: translate3d(-50%, -50%, 0);
  animation: menuBalloonLift 6.7s cubic-bezier(0.42, 0, 0.58, 1) infinite;
  will-change: transform, opacity;
}

.menu-balloon-float.is-flying-out {
  animation: menuBalloonFlyOut 1250ms cubic-bezier(0.44, 0.08, 0.62, 0.92) both;
}

.menu-balloon-float.is-flying-in {
  animation: menuBalloonFlyIn 1450ms cubic-bezier(0.2, 0.72, 0.28, 1) both;
}

.menu-balloon {
  display: block;
  width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: 50% 82%;
  filter: drop-shadow(0 18px 20px rgba(30, 74, 106, 0.2));
  opacity: 1;
  transition: opacity 180ms ease, filter 180ms ease;
  animation: menuBalloonSway 8.9s cubic-bezier(0.45, 0.03, 0.55, 0.97) infinite;
  will-change: transform, opacity;
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
}

.menu-balloon-drag.is-dragging .menu-balloon {
  cursor: grabbing;
}

.menu-balloon-drag.is-dragging .menu-balloon-float,
.menu-balloon-drag.is-dragging .menu-balloon {
  animation-play-state: paused;
}

.menu-balloon-cloud-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.menu-balloon-cloud-layer--back {
  z-index: 1;
}

.menu-balloon-cloud-layer--front {
  z-index: 3;
}

.menu-balloon-cloud {
  position: absolute;
  display: block;
  width: auto;
  height: auto;
  object-fit: contain;
  will-change: transform;
}

.menu-balloon-cloud--back-left {
  left: -6%;
  top: 18%;
  width: 34%;
  opacity: 0.58;
  filter: blur(0.5px) drop-shadow(0 7px 10px rgba(70, 132, 165, 0.1));
  animation: menuCloudDriftBack 14s ease-in-out infinite alternate -5s;
}

.menu-balloon-cloud--back-right {
  right: -5%;
  top: 6%;
  width: 31%;
  opacity: 0.66;
  filter: blur(0.35px) drop-shadow(0 8px 11px rgba(70, 132, 165, 0.12));
  animation: menuCloudDriftBack 11.5s ease-in-out infinite alternate-reverse -7s;
}

.menu-balloon-cloud--back-small {
  left: 12%;
  top: 4%;
  width: 18%;
  opacity: 0.42;
  filter: blur(0.8px);
  animation: menuCloudDriftBack 17s ease-in-out infinite alternate -10s;
}

.menu-balloon-cloud--front-left {
  left: -12%;
  top: 60%;
  width: 32%;
  opacity: 0.78;
  filter: blur(0.2px) drop-shadow(0 10px 14px rgba(62, 119, 151, 0.13));
  animation: menuCloudDriftFront 9.6s ease-in-out infinite alternate -4s;
}

.menu-balloon-cloud--front-right {
  right: -7%;
  top: 50%;
  width: 22%;
  opacity: 0.68;
  filter: blur(0.3px) drop-shadow(0 8px 12px rgba(62, 119, 151, 0.12));
  animation: menuCloudDriftFront 8.4s ease-in-out infinite alternate-reverse -2s;
}

.menu-balloon-cloud--front-sail-large {
  left: -38%;
  top: 57%;
  width: 35%;
  opacity: 0.8;
  filter: blur(0.15px) drop-shadow(0 11px 15px rgba(62, 119, 151, 0.14));
  animation: menuCloudSailFront 24s linear infinite -9s;
}

.menu-balloon-cloud--front-sail-small {
  left: -26%;
  top: 45%;
  width: 22%;
  opacity: 0.64;
  filter: blur(0.35px) drop-shadow(0 8px 12px rgba(62, 119, 151, 0.1));
  animation: menuCloudSailFrontSmall 19s linear infinite -2s;
}

@keyframes menuBalloonLift {
  0%,
  100% {
    transform: translate3d(-50%, -48.8%, 0);
  }
  23% {
    transform: translate3d(-50%, -52.2%, 0);
  }
  47% {
    transform: translate3d(-50%, -53.4%, 0);
  }
  72% {
    transform: translate3d(-50%, -50.1%, 0);
  }
  88% {
    transform: translate3d(-50%, -47.8%, 0);
  }
}

@keyframes menuBalloonSway {
  0%,
  100% {
    transform: translate3d(-1.8%, 0, 0) rotate(-1.25deg) scale(0.995);
  }
  19% {
    transform: translate3d(-0.4%, -0.4%, 0) rotate(-0.35deg) scale(1.002);
  }
  43% {
    transform: translate3d(1.6%, 0.25%, 0) rotate(0.85deg) scale(1.008);
  }
  61% {
    transform: translate3d(2.3%, 0, 0) rotate(1.4deg) scale(1.012);
  }
  81% {
    transform: translate3d(-0.7%, 0.35%, 0) rotate(-0.5deg) scale(1);
  }
}

@keyframes menuBalloonFlyOut {
  0% {
    transform: translate3d(-50%, -50%, 0) rotate(0deg) scale(1);
  }
  28% {
    transform: translate3d(-43%, -52%, 0) rotate(0.45deg) scale(1.006);
  }
  100% {
    transform: translate3d(112%, -55%, 0) rotate(3deg) scale(0.975);
  }
}

@keyframes menuBalloonFlyIn {
  0% {
    transform: translate3d(-212%, -54%, 0) rotate(-3.4deg) scale(0.975);
  }
  72% {
    transform: translate3d(-45%, -51.5%, 0) rotate(0.45deg) scale(1.006);
  }
  100% {
    transform: translate3d(-50%, -50%, 0) rotate(0deg) scale(1);
  }
}

@keyframes menuCloudDriftBack {
  0% {
    transform: translate3d(-10%, 2%, 0) scale(0.96);
  }
  100% {
    transform: translate3d(14%, -2%, 0) scale(1.03);
  }
}

@keyframes menuCloudDriftFront {
  0% {
    transform: translate3d(-14%, 3%, 0) scale(0.95);
  }
  100% {
    transform: translate3d(16%, -3%, 0) scale(1.05);
  }
}

@keyframes menuCloudSailFront {
  0% {
    transform: translate3d(-12%, 2%, 0) scale(0.96);
  }
  45% {
    transform: translate3d(195%, -3%, 0) scale(1.02);
  }
  100% {
    transform: translate3d(420%, 1%, 0) scale(0.98);
  }
}

@keyframes menuCloudSailFrontSmall {
  0% {
    transform: translate3d(-18%, -2%, 0) scale(0.92);
  }
  52% {
    transform: translate3d(245%, 3%, 0) scale(1.03);
  }
  100% {
    transform: translate3d(565%, -1%, 0) scale(0.96);
  }
}

@media (prefers-reduced-motion: reduce) {
  .menu-balloon-drag {
    transition-duration: 160ms;
  }

  .menu-balloon,
  .menu-balloon-cloud,
  .menu-sky-motion__cloud,
  .menu-sky-foreground__cloud {
    animation-play-state: paused;
  }

  .menu-balloon-float,
  .menu-balloon-float.is-flying-out,
  .menu-balloon-float.is-flying-in {
    animation: none;
    transform: translate3d(-50%, -50%, 0);
  }
}

.game-screen__bg {
  position: absolute;
  inset: -2px;
  z-index: 0;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  object-fit: cover;
}

.menu-screen__logo {
  position: absolute;
  left: 50%;
  top: 8%;
  z-index: 5;
  width: 47%;
  max-width: 390px;
  height: auto;
  transform: translateX(-50%);
  filter: drop-shadow(0 12px 18px rgba(38, 22, 12, 0.22));
  pointer-events: none;
}

.menu-partner-progress {
  position: absolute;
  left: 5%;
  right: 5%;
  top: 42.5%;
  z-index: 2;
  height: 25.5%;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  align-items: center;
  pointer-events: none;
}

.menu-partner-house {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 78%;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) scale(0.9) translateY(5%);
  transform-origin: center 78%;
  transition: opacity 260ms ease, filter 420ms ease, transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.menu-partner-house::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3.5%;
  z-index: 0;
  width: 72%;
  height: 7%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(48, 35, 17, 0.52) 0 24%, rgba(58, 42, 19, 0.28) 48%, rgba(58, 42, 19, 0) 76%);
  filter: blur(3px);
  transform: translateX(-50%) scaleY(0.72);
  transform-origin: center;
}

.menu-partner-house::after {
  content: "";
  position: absolute;
  left: 46%;
  bottom: 5%;
  z-index: 0;
  width: 88%;
  height: 13%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 40% 50%, rgba(58, 42, 16, 0.34) 0 22%, rgba(74, 53, 20, 0.2) 46%, rgba(74, 53, 20, 0) 78%);
  filter: blur(7px);
  transform: translateX(-43%) skewX(-18deg) rotate(-2deg) scaleY(0.7);
  transform-origin: 38% center;
}

.menu-partner-house img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(var(--stage-h) * 0.32);
  object-fit: contain;
  object-position: center bottom;
  filter:
    drop-shadow(0 3px 2px rgba(38, 22, 12, 0.16))
    drop-shadow(7px 11px 9px rgba(50, 37, 18, 0.14));
}

.menu-partner-house img.menu-partner-cow {
  position: absolute;
  right: -9%;
  bottom: 0;
  z-index: 2;
  width: 36%;
  max-height: none;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(8%, 3%, 0) scale(0.9);
  transform-origin: center bottom;
  filter:
    drop-shadow(0 3px 2px rgba(38, 22, 12, 0.16))
    drop-shadow(8px 12px 10px rgba(50, 37, 18, 0.2));
  transition: opacity 360ms ease, visibility 360ms ease, transform 480ms cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}

.menu-partner-house img.menu-partner-cow.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0) scale(1);
}

.menu-partner-house img.menu-partner-barni {
  position: absolute;
  right: -10%;
  top: 5%;
  z-index: 2;
  width: 33%;
  max-height: none;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(8%, 8%, 0) rotate(2deg) scale(0.9);
  transform-origin: center 72%;
  filter:
    drop-shadow(0 4px 3px rgba(69, 43, 13, 0.14))
    drop-shadow(8px 13px 12px rgba(50, 37, 18, 0.2));
  transition: opacity 360ms ease, visibility 360ms ease;
  pointer-events: none;
}

.menu-partner-house img.menu-partner-barni.is-visible {
  opacity: 1;
  visibility: visible;
  animation: barniGentleHover 4.6s ease-in-out infinite alternate;
}

@keyframes barniGentleHover {
  0% {
    transform: translate3d(0, 4%, 0) rotate(-1.5deg) scale(0.98);
  }
  50% {
    transform: translate3d(0, -2%, 0) rotate(0.8deg) scale(1);
  }
  100% {
    transform: translate3d(0, 1%, 0) rotate(1.6deg) scale(0.99);
  }
}

@media (prefers-reduced-motion: reduce) {
  .menu-partner-house img.menu-partner-barni.is-visible {
    animation-play-state: paused;
  }
}

.menu-partner-house.is-max-upgraded::before {
  width: 94%;
  height: 8.5%;
}

.menu-partner-house.is-max-upgraded::after {
  width: 104%;
  height: 15%;
}

.menu-partner-house figcaption {
  position: relative;
  z-index: 3;
  width: max-content;
  max-width: 96%;
  min-height: 26px;
  margin: -2px auto 0;
  padding: 5px 12px 6px;
  border: 2px solid rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(82, 48, 151, 0.96), rgba(57, 29, 118, 0.98));
  color: #ffffff;
  font-size: clamp(11px, calc(var(--stage-w) * 0.032), 14px);
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  text-shadow: 0 1px 1px rgba(28, 10, 62, 0.48);
  box-shadow: 0 4px 9px rgba(42, 24, 73, 0.22), inset 0 -2px 0 rgba(35, 16, 79, 0.32);
  white-space: nowrap;
}

.menu-partner-house.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) scale(1) translateY(0);
}

.menu-partner-house.is-active:not(.is-unlocked) img {
  opacity: 0.3;
  filter: grayscale(0.72) saturate(0.46) brightness(0.82);
}

.menu-partner-house.is-active.is-unlocked {
  opacity: 1;
  filter: none;
}

.menu-partner-house.is-unlocked figcaption {
  display: none;
}

.menu-partner-clouds {
  position: absolute;
  left: -10%;
  right: -10%;
  top: -45%;
  height: 105%;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 420ms ease;
}

.menu-partner-progress.has-unlocked-house .menu-partner-clouds {
  opacity: 1;
  visibility: visible;
}

.menu-partner-cloud {
  position: absolute;
  display: block;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 7px 9px rgba(65, 124, 158, 0.16));
  will-change: transform, opacity;
}

.menu-partner-cloud--back-wide {
  left: 63%;
  top: 0;
  z-index: 0;
  width: 31%;
  opacity: 0.7;
  animation: partnerCloudFloat 10.5s ease-in-out infinite alternate -5.5s;
}

.menu-partner-cloud--back-large {
  left: 4%;
  top: 25%;
  z-index: 0;
  width: 24%;
  opacity: 0.82;
  animation: partnerCloudFloat 8.8s ease-in-out infinite alternate-reverse -2.5s;
}

.menu-partner-cloud--front-small {
  left: 40%;
  top: 20%;
  z-index: 3;
  width: 20%;
  opacity: 0.68;
  filter: blur(0.35px) drop-shadow(0 8px 10px rgba(55, 111, 145, 0.14));
  animation: partnerCloudFloatFront 7.2s ease-in-out infinite alternate -4s;
}

.menu-partner-cloud--front-tiny {
  left: 77%;
  top: 35%;
  z-index: 3;
  width: 14%;
  opacity: 0.48;
  filter: blur(0.5px) drop-shadow(0 6px 8px rgba(55, 111, 145, 0.12));
  animation: partnerCloudFloatFront 6.4s ease-in-out infinite alternate-reverse -1.8s;
}

.menu-partner-cloud--back-left-tiny {
  left: 20%;
  top: 8%;
  z-index: 0;
  width: 13%;
  opacity: 0.46;
  filter: blur(0.6px) drop-shadow(0 5px 7px rgba(65, 124, 158, 0.1));
  animation: partnerCloudFloat 12.2s ease-in-out infinite alternate -8.4s;
}

.menu-partner-cloud--back-center {
  left: 46%;
  top: -7%;
  z-index: 0;
  width: 18%;
  opacity: 0.4;
  filter: blur(0.7px) drop-shadow(0 5px 7px rgba(65, 124, 158, 0.1));
  animation: partnerCloudFloat 14.6s ease-in-out infinite alternate-reverse -4.2s;
}

.menu-partner-balloon {
  position: absolute;
  left: 60%;
  top: 9%;
  z-index: 2;
  display: block;
  width: 17%;
  height: auto;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 8%, 0) rotate(-1deg) scale(0.94);
  transform-origin: center 72%;
  filter: drop-shadow(0 10px 12px rgba(61, 50, 102, 0.24));
  transition: opacity 420ms ease, visibility 420ms ease;
  will-change: transform;
}

.menu-partner-balloon.is-visible {
  opacity: 0.96;
  visibility: visible;
  animation: milkaBalloonHover 4.8s ease-in-out infinite alternate;
}

.menu-partner-cloud--front-left {
  left: 18%;
  top: 38%;
  z-index: 3;
  width: 16%;
  opacity: 0.5;
  filter: blur(0.45px) drop-shadow(0 7px 9px rgba(55, 111, 145, 0.12));
  animation: partnerCloudFloatFront 7.8s ease-in-out infinite alternate -5.6s;
}

@keyframes partnerCloudFloat {
  0% {
    transform: translate3d(-11%, 3%, 0) scale(0.96);
  }
  100% {
    transform: translate3d(12%, -4%, 0) scale(1.03);
  }
}

@keyframes partnerCloudFloatFront {
  0% {
    transform: translate3d(-14%, 4%, 0) scale(0.92);
  }
  100% {
    transform: translate3d(15%, -5%, 0) scale(1.06);
  }
}

@keyframes milkaBalloonHover {
  0% {
    transform: translate3d(0, 3%, 0) rotate(-1.4deg) scale(0.97);
  }
  50% {
    transform: translate3d(0, -2%, 0) rotate(0.6deg) scale(1);
  }
  100% {
    transform: translate3d(0, 1%, 0) rotate(1.2deg) scale(0.985);
  }
}

@media (prefers-reduced-motion: reduce) {
  .menu-partner-cloud {
    animation-play-state: paused;
  }

  .menu-partner-balloon {
    animation-play-state: paused;
  }
}

.menu-partner-progress__arrow {
  position: relative;
  z-index: 4;
  width: 46px;
  height: 54px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: transparent;
  background: url("https://s3.ru-msk.k2.cloud/spar-online/assets/SPAR%20Online%20%20Mondel%C4%93z%20Danone/button_partner_arrow.svg") center / contain no-repeat;
  filter: none;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 160ms ease, filter 160ms ease;
}

.menu-partner-progress__arrow > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.menu-partner-progress__arrow--prev {
  grid-column: 1;
  justify-self: start;
}

.menu-partner-progress__arrow--next {
  grid-column: 3;
  justify-self: end;
  transform: scaleX(-1);
}

.menu-partner-progress__arrow:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
}

.menu-partner-progress__arrow--next:hover {
  transform: scaleX(-1) translateY(-2px);
}

.menu-partner-progress__arrow:active {
  transform: translateY(1px) scale(0.94);
}

.menu-partner-progress__arrow--next:active {
  transform: scaleX(-1) translateY(1px) scale(0.94);
}

.menu-partner-progress__arrow:focus {
  outline: none;
}

body.is-keyboard-navigation .menu-partner-progress__arrow:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.88);
  outline-offset: 3px;
  border-radius: 12px;
}

.loading-screen__logo {
  position: absolute;
  left: 50%;
  top: 47%;
  z-index: 3;
  width: 70%;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 18px 26px rgba(32, 28, 18, 0.28));
}

.loading-screen__spar-logo {
  position: absolute;
  left: 50%;
  top: 7.5%;
  z-index: 3;
  width: 34%;
  height: auto;
  transform: translateX(-50%);
  filter: drop-shadow(0 5px 10px rgba(22, 64, 35, 0.2));
}

.daily-screen__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(13, 90, 167, 0.2);
  backdrop-filter: blur(2px);
}

.daily-bonus {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: min(94%, calc(var(--stage-h) * 0.6));
  aspect-ratio: 4428 / 7757;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 22px 34px rgba(14, 65, 96, 0.36));
}

.daily-bonus__panel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}

.daily-bonus__days {
  position: absolute;
  left: 13.2%;
  top: 25.9%;
  width: 73.6%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: clamp(7px, calc(var(--stage-w) * 0.022), 18px);
  row-gap: clamp(8px, calc(var(--stage-w) * 0.025), 20px);
}

.daily-day {
  position: relative;
  display: grid;
  justify-items: center;
  align-items: start;
  aspect-ratio: 1086 / 1315;
  padding: 0;
  border-radius: 15%;
  color: #fff9ef;
  filter: drop-shadow(0 7px 10px rgba(92, 45, 16, 0.22));
  transition: opacity 160ms ease, filter 160ms ease, transform 160ms ease;
}

.daily-day img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}

.daily-day strong {
  position: relative;
  z-index: 1;
  margin-top: 7.5%;
  color: #fffaf3;
  font-size: clamp(13px, calc(var(--stage-w) * 0.038), 34px);
  font-weight: 950;
  line-height: 1;
  text-shadow:
    0 2px 0 rgba(6, 57, 102, 0.75),
    0 4px 7px rgba(5, 60, 100, 0.32);
}

.daily-day.is-current {
  opacity: 1;
  transform: translateY(-2%);
  filter:
    drop-shadow(0 7px 10px rgba(92, 45, 16, 0.22))
    drop-shadow(0 0 10px rgba(255, 214, 61, 0.78))
    drop-shadow(0 0 20px rgba(255, 186, 18, 0.6));
}

.daily-day.is-muted {
  opacity: 0.36;
  filter:
    grayscale(0.62)
    saturate(0.55)
    brightness(0.82)
    drop-shadow(0 4px 6px rgba(20, 87, 128, 0.1));
}

.daily-day.is-completed {
  opacity: 0.32;
}

.daily-bonus__grand {
  position: absolute;
  left: 11.4%;
  top: 60.8%;
  width: 77.2%;
  aspect-ratio: 3708 / 1702;
  filter: drop-shadow(0 10px 14px rgba(13, 90, 167, 0.22));
  transition: opacity 160ms ease, filter 160ms ease;
}

.daily-bonus__grand img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.daily-bonus__grand strong {
  position: absolute;
  left: 50%;
  top: 4.6%;
  z-index: 1;
  width: 31%;
  transform: translateX(-50%);
  color: #fffaf3;
  font-size: clamp(14px, calc(var(--stage-w) * 0.043), 36px);
  font-weight: 950;
  line-height: 1;
  text-align: center;
  text-shadow:
    0 2px 0 rgba(6, 57, 102, 0.75),
    0 4px 7px rgba(5, 60, 100, 0.32);
}

.daily-bonus__grand.is-current {
  opacity: 1;
  filter:
    drop-shadow(0 10px 14px rgba(13, 90, 167, 0.22))
    drop-shadow(0 0 12px rgba(255, 214, 61, 0.8))
    drop-shadow(0 0 26px rgba(255, 186, 18, 0.58));
}

.daily-bonus__grand.is-muted {
  opacity: 0.38;
  filter:
    grayscale(0.58)
    saturate(0.58)
    brightness(0.86)
    drop-shadow(0 5px 8px rgba(20, 87, 128, 0.12));
}

.daily-bonus__grand.is-completed {
  opacity: 0.34;
}

.daily-bonus__today {
  position: absolute;
  left: 10%;
  right: 10%;
  top: 81.7%;
  margin: 0;
  color: #0d5aa7;
  font-size: clamp(12px, calc(var(--stage-w) * 0.034), 28px);
  font-weight: 400;
  line-height: 1.05;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 250, 240, 0.72);
}

.daily-bonus__today strong {
  color: #0d5aa7;
  font-weight: 400;
}

.daily-bonus__claim {
  position: absolute;
  left: 18.4%;
  top: 85.2%;
  width: 63.2%;
  padding: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 10px 14px rgba(7, 65, 105, 0.28));
}

.daily-bonus__claim img {
  display: block;
  width: 100%;
}

.daily-bonus__claim:disabled {
  opacity: 0.62;
  cursor: default;
  filter: grayscale(0.2) drop-shadow(0 8px 10px rgba(7, 65, 105, 0.18));
}

.daily-bonus__note {
  position: absolute;
  left: 12%;
  right: 12%;
  top: 92.5%;
  margin: 0;
  color: rgba(13, 90, 167, 0.78);
  font-size: clamp(10px, calc(var(--stage-w) * 0.027), 22px);
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  display: none;
}

.icon-button {
  position: absolute;
  z-index: 5;
  padding: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 12px 18px var(--shadow-purple));
}

.icon-button img,
.hud-button img {
  display: block;
  width: 100%;
}

.icon-button--settings {
  left: 3.45%;
  top: 1.35%;
  width: 14.15%;
}

.life-status {
  position: absolute;
  left: 18.6%;
  top: 2.75%;
  z-index: 5;
  width: 18%;
  height: clamp(30px, calc(var(--stage-w) * 0.07), 52px);
  pointer-events: auto;
  filter: drop-shadow(0 9px 12px rgba(7, 65, 105, 0.2));
  border-radius: 999px;
  background:
    linear-gradient(180deg, #fffaf0 0%, #fff1dc 64%, #f0d0a6 100%);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.78),
    inset 0 -3px 0 rgba(183, 126, 76, 0.2),
    0 8px 14px rgba(7, 65, 105, 0.12);
}

.life-status__panel {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.life-status__heart {
  position: absolute;
  left: 17%;
  top: 50%;
  width: 27%;
  transform: translate(-50%, -50%);
  transition:
    opacity 180ms ease,
    filter 180ms ease,
    transform 180ms ease;
}

.life-status strong {
  position: absolute;
  left: 49%;
  top: 50%;
  width: 38%;
  transform: translate(-50%, -50%);
  color: #09040c;
  font-size: clamp(12px, calc(var(--stage-w) * 0.034), 24px);
  font-weight: 950;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.life-status span {
  position: absolute;
  left: 50%;
  width: max-content;
  max-width: 150%;
  top: calc(100% + 5px);
  transform: translateX(-50%);
  min-height: 1em;
  color: rgba(255, 255, 255, 0.96);
  font-size: clamp(7px, calc(var(--stage-w) * 0.013), 10px);
  font-weight: 900;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 4px rgba(11, 68, 111, 0.5);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.life-status.has-restore-timer span {
  opacity: 1;
  visibility: visible;
}

.life-status__buy {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  padding: 0;
  background: transparent;
  border-radius: inherit;
  cursor: pointer;
}

.life-status__buy img {
  position: absolute;
  right: 5%;
  top: 50%;
  display: block;
  width: 20%;
  height: 58%;
  object-fit: contain;
  transform: translateY(-50%);
  filter: drop-shadow(0 2px 3px rgba(34, 105, 12, 0.28));
}

.life-status.is-empty .life-status__heart {
  opacity: 0.42;
  filter: grayscale(0.72) saturate(0.7);
  transform: translate(-50%, -50%) scale(0.92);
}

.life-status.is-empty strong {
  opacity: 0.52;
}

.life-status.is-empty span {
  color: rgba(255, 255, 255, 0.78);
}

.loader {
  position: absolute;
  left: 15.7%;
  top: 81.75%;
  width: 68.6%;
  z-index: 4;
}

.loader__track {
  width: 100%;
  height: calc(var(--stage-w) * 0.0455);
  max-height: 86px;
  min-height: 28px;
  overflow: hidden;
  padding: clamp(3px, calc(var(--stage-w) * 0.006), 6px);
  border-radius: 999px;
  background: var(--white);
  box-shadow: 0 8px 20px rgba(20, 87, 128, 0.12);
}

.loader__fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: #78be3a;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.38),
    0 2px 5px rgba(52, 115, 21, 0.24);
  transition: width 140ms linear;
}

.loader__percent {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin-top: 5.1%;
  color: #78be3a;
  font-size: clamp(16px, calc(var(--stage-w) * 0.037), 54px);
  font-weight: 950;
  line-height: 1;
  text-align: center;
  letter-spacing: 0;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.98);
  paint-order: stroke fill;
  text-shadow:
    -1.5px -1.5px 0 rgba(255, 255, 255, 0.98),
    0 -1.5px 0 rgba(255, 255, 255, 0.98),
    1.5px -1.5px 0 rgba(255, 255, 255, 0.98),
    -1.5px 0 0 rgba(255, 255, 255, 0.98),
    1.5px 0 0 rgba(255, 255, 255, 0.98),
    -1.5px 1.5px 0 rgba(255, 255, 255, 0.98),
    0 1.5px 0 rgba(255, 255, 255, 0.98),
    1.5px 1.5px 0 rgba(255, 255, 255, 0.98),
    0 2px 0 rgba(36, 88, 17, 0.3),
    0 4px 8px rgba(24, 61, 12, 0.42);
}

.loader__dots {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 0.2em;
  width: 1.42em;
  margin-left: 0.24em;
}

.loader__dot {
  display: inline-block;
  opacity: 0.32;
  animation: loaderDot 1.05s ease-in-out infinite;
  will-change: opacity, transform;
}

.loader__dot:nth-child(2) {
  animation-delay: 140ms;
}

.loader__dot:nth-child(3) {
  animation-delay: 280ms;
}

.loading-screen.is-complete {
  animation: loadingExit 520ms ease forwards;
}

.menu-screen.is-entering,
.game-screen.is-entering {
  animation: gameEnter 580ms ease both;
}

.menu-balance {
  position: absolute;
  left: 38%;
  right: 4.4%;
  top: 2.75%;
  z-index: 4;
  height: 6%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3.4%;
  align-items: start;
  pointer-events: auto;
  min-width: 0;
}

.menu-balance__item {
  position: relative;
  width: 100%;
  height: clamp(30px, calc(var(--stage-w) * 0.07), 52px);
  container-type: inline-size;
  filter: drop-shadow(0 10px 16px rgba(7, 65, 105, 0.14));
  min-width: 0;
  border-radius: 999px;
  background:
    linear-gradient(180deg, #fffaf0 0%, #fff1dc 64%, #f0d0a6 100%);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.78),
    inset 0 -3px 0 rgba(183, 126, 76, 0.2),
    0 8px 14px rgba(7, 65, 105, 0.12);
}

.life-status[data-balance-action],
.menu-balance__item[data-balance-action] {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.life-status[data-balance-action]:focus-visible,
.menu-balance__item[data-balance-action]:focus-visible {
  outline: 3px solid rgba(88, 199, 15, 0.72);
  outline-offset: 3px;
}

.menu-balance__panel {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.menu-balance__icon,
.menu-balance__add {
  position: absolute;
  top: 50%;
  display: block;
  transform: translateY(-50%);
  object-fit: contain;
}

.menu-balance__icon {
  left: 5%;
  width: 23%;
  height: 72%;
  filter: drop-shadow(0 3px 3px rgba(111, 58, 8, 0.22));
}

.menu-balance__item--tickets .menu-balance__icon {
  left: 5.4%;
  width: 22%;
  height: 62%;
}

.menu-balance__add {
  right: 4.3%;
  width: 18.5%;
  height: 58%;
  filter: drop-shadow(0 2px 3px rgba(34, 105, 12, 0.28));
}

.menu-balance__buy {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  padding: 0;
  background: transparent;
  border-radius: inherit;
  cursor: pointer;
  pointer-events: auto;
}

.menu-balance__buy .menu-balance__add {
  position: absolute;
  right: 4.3%;
  top: 50%;
  width: 18%;
  height: 58%;
  transform: translateY(-50%);
}

.life-status__buy:focus-visible,
.menu-balance__buy:focus-visible {
  outline: 3px solid rgba(88, 199, 15, 0.72);
  outline-offset: 3px;
}

.menu-balance__item strong {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #060308;
  font-size: clamp(12px, calc(var(--stage-w) * 0.034), 24px);
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: clip;
}

.menu-balance__item--coins strong {
  left: 29%;
  width: 64%;
}

.menu-balance__item--coins {
  width: 100%;
}

.menu-balance__item--tickets strong {
  left: 29%;
  width: 48%;
}

.menu-balance__item--tickets {
  width: 100%;
}

.menu-play {
  position: absolute;
  left: 20.7%;
  top: 70.25%;
  width: 58.6%;
  z-index: 4;
  padding: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 18px 22px rgba(7, 65, 105, 0.18));
}

.menu-play img,
.menu-action img {
  display: block;
  width: 100%;
}

.menu-actions {
  position: absolute;
  left: 6.8%;
  right: 6.8%;
  bottom: 6.2%;
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4.5%;
  align-items: end;
  min-width: 0;
}

.menu-action {
  position: relative;
  min-width: 0;
  height: clamp(54px, calc(var(--stage-w) * 0.15), 108px);
  padding: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 14px 18px rgba(70, 36, 15, 0.18));
  overflow: visible;
}

.menu-action img {
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
}

.menu-play:active,
.menu-action:active,
.icon-button:active {
  transform: scale(0.985);
}

.game-screen__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(13, 90, 167, 0.08) 58%, rgba(5, 60, 100, 0.14));
  backdrop-filter: blur(3px);
}

.game-hud {
  position: absolute;
  left: 3.6%;
  right: 4.1%;
  top: 1.55%;
  z-index: 4;
  --game-hud-balance-top: clamp(8px, calc(var(--stage-w) * 0.025), 20px);
  height: clamp(50px, calc(var(--stage-w) * 0.153), 120px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.game-screen.is-win-visible .game-hud {
  z-index: 14;
}

.game-screen.is-win-visible .game-hud button {
  pointer-events: none;
}

.game-screen.is-win-visible .hud-button {
  visibility: hidden;
}

.game-screen.is-win-visible .game-life,
.game-screen.is-win-visible .menu-balance__item--tickets {
  opacity: 0.42;
  filter: blur(clamp(2px, calc(var(--stage-w) * 0.006), 5px));
  transform: scale(0.98);
  transform-origin: center;
}

.game-screen.is-win-visible .menu-balance__item--coins {
  opacity: 1;
  filter: none;
  transform: none;
}

.game-hud .game-balance {
  left: 38%;
  right: 1.2%;
  top: var(--game-hud-balance-top);
  height: clamp(30px, calc(var(--stage-w) * 0.07), 52px);
  pointer-events: auto;
}

.game-hud .game-life {
  position: absolute;
  left: 16.8%;
  top: var(--game-hud-balance-top);
  width: 18%;
}

.hud-button {
  width: 15.3%;
  padding: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 12px 18px rgba(7, 65, 105, 0.24));
  pointer-events: auto;
}

.game-coin-pill {
  position: relative;
  width: 29.1%;
  height: clamp(42px, calc(var(--stage-w) * 0.116), 82px);
  display: grid;
  grid-template-columns: 25% 1fr 19%;
  align-items: center;
  gap: 4%;
  padding: 0.6% 2.5% 0.7% 2%;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  background: #fff3dc;
  box-shadow:
    inset 0 -4px 0 rgba(162, 105, 34, 0.12),
    0 10px 18px rgba(41, 18, 80, 0.16);
}

.game-coin-pill img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 3px 3px rgba(95, 49, 10, 0.22));
}

.game-coin-pill strong {
  color: #070309;
  font-size: clamp(20px, calc(var(--stage-w) * 0.058), 48px);
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.game-coin-pill span {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #58c821;
  color: var(--white);
  font-size: clamp(19px, calc(var(--stage-w) * 0.054), 44px);
  font-weight: 950;
  line-height: 0.8;
  box-shadow:
    inset 0 -4px 0 rgba(35, 117, 14, 0.42),
    0 4px 6px rgba(42, 91, 10, 0.2);
}

.game-title {
  position: absolute;
  left: 12.7%;
  top: 12.85%;
  width: 74.2%;
  z-index: 3;
  filter: drop-shadow(0 14px 18px rgba(7, 65, 105, 0.2));
}

.game-title-board {
  position: absolute;
  left: 12%;
  top: 7%;
  z-index: 2;
  width: 76%;
  aspect-ratio: 830 / 352;
  overflow: hidden;
  pointer-events: none;
  filter: drop-shadow(0 12px 18px rgba(70, 36, 15, 0.24));
}

.game-title-board img {
  position: absolute;
  left: -12.05%;
  top: -216%;
  width: 123.38%;
  max-width: none;
  height: auto;
}

.game-title--text {
  margin: 0;
  color: #ffffff;
  font-size: clamp(24px, calc(var(--stage-w) * 0.065), 56px);
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.025em;
  text-align: center;
  text-shadow:
    0 2px 0 rgba(122, 62, 24, 0.96),
    0 4px 0 rgba(70, 30, 10, 0.68),
    0 7px 10px rgba(38, 14, 4, 0.38);
}

.game-level {
  position: absolute;
  left: 0;
  right: 0;
  top: 18.55%;
  z-index: 3;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.45em;
  color: #ffe05c;
  font-size: clamp(13px, calc(var(--stage-w) * 0.033), 28px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.055em;
  text-align: center;
  text-transform: uppercase;
  text-shadow:
    0 2px 0 rgba(112, 52, 18, 0.94),
    0 4px 7px rgba(43, 17, 5, 0.4);
}

.game-level strong {
  color: #ffffff;
  font-size: 1.24em;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.card-grid {
  position: absolute;
  left: 9.8%;
  right: 9.8%;
  top: 23.7%;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 3.1%;
  row-gap: 1.8%;
}

.memory-card {
  position: relative;
  aspect-ratio: 0.704;
  padding: 0;
  border-radius: 10%;
  background: transparent;
  cursor: pointer;
  perspective: 900px;
  filter: drop-shadow(0 8px 10px rgba(7, 65, 105, 0.18));
  opacity: 1;
  transition:
    opacity 420ms ease,
    transform 420ms ease,
    filter 420ms ease;
  -webkit-tap-highlight-color: transparent;
}

.memory-card__inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 300ms ease;
}

.memory-card.is-open .memory-card__inner,
.memory-card.is-matched .memory-card__inner {
  transform: rotateY(180deg);
}

.memory-card__face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 10%;
  backface-visibility: hidden;
}

.memory-card__face img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.memory-card__front {
  transform: rotateY(180deg);
}

.memory-card.is-matched {
  pointer-events: none;
  animation: matchedPop 360ms ease;
}

.memory-card.is-removing {
  opacity: 0;
  transform: translateY(-3%) scale(0.92);
  filter: drop-shadow(0 4px 6px rgba(7, 65, 105, 0));
}

.memory-card.is-empty {
  cursor: default;
  opacity: 0;
  pointer-events: none;
}

.game-progress {
  position: absolute;
  left: 17%;
  bottom: 3.5%;
  width: 66%;
  min-height: clamp(64px, calc(var(--stage-w) * 0.175), 126px);
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(6px, calc(var(--stage-w) * 0.018), 14px);
  padding: 3.2% 6%;
  border: 2px solid rgba(255, 255, 255, 0.36);
  border-radius: clamp(18px, calc(var(--stage-w) * 0.052), 40px);
  background: linear-gradient(135deg, #55b4e8, #1681c5);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.28),
    inset 0 -4px 0 rgba(6, 74, 119, 0.28),
    0 14px 24px rgba(6, 57, 102, 0.28);
}

.game-progress__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8%;
}

.game-progress__row span,
.game-progress__row strong {
  color: var(--white);
  line-height: 1;
  text-shadow: 0 2px 4px rgba(14, 65, 96, 0.22);
}

.game-progress__row span {
  font-size: clamp(12px, calc(var(--stage-w) * 0.03), 26px);
  font-weight: 600;
}

.game-progress__row strong {
  font-size: clamp(16px, calc(var(--stage-w) * 0.043), 36px);
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.game-progress__track {
  height: clamp(8px, calc(var(--stage-w) * 0.024), 18px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(6, 57, 102, 0.38);
  box-shadow: inset 0 2px 3px rgba(4, 47, 83, 0.24);
}

.game-progress__track span {
  --time-hue: 125;
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    hsl(var(--time-hue) 78% 38%),
    hsl(calc(var(--time-hue) + 10) 88% 55%)
  );
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.45),
    0 0 10px hsl(var(--time-hue) 78% 44% / 0.36);
  transition: width 120ms linear, box-shadow 240ms ease;
}

.game-progress__track.is-critical span {
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.42),
    0 0 12px rgba(239, 79, 95, 0.48);
  animation: gameTimeCritical 820ms ease-in-out infinite alternate;
}

.game-progress__gain {
  position: absolute;
  right: 6%;
  top: -40%;
  color: #ffe26d;
  font-size: clamp(16px, calc(var(--stage-w) * 0.045), 38px);
  font-weight: 950;
  opacity: 0;
  pointer-events: none;
  text-shadow:
    0 2px 0 #0d5aa7,
    0 5px 9px rgba(6, 57, 102, 0.3);
}

.game-progress__gain.is-visible {
  animation: scoreGain 760ms ease both;
}

@keyframes gameTimeCritical {
  from { filter: brightness(0.94); }
  to { filter: brightness(1.18); }
}

.game-actions {
  display: none;
}

.pause-dialog {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: grid;
  place-items: center;
  padding: 12px 20px;
  background: rgba(248, 252, 247, 0.28);
  backdrop-filter: blur(12px) brightness(1.08) saturate(0.86);
}

.timeout-dialog {
  position: absolute;
  inset: 0;
  z-index: 15;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(13, 62, 100, 0.28);
  backdrop-filter: blur(14px) brightness(0.92);
}

.timeout-dialog__panel {
  width: min(100%, 366px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 30px 28px 26px;
  border: 3px solid rgba(255, 255, 255, 0.92);
  border-radius: 30px;
  background: linear-gradient(180deg, #ffffff, #f4fbff);
  color: #176eac;
  text-align: center;
  box-shadow: 0 20px 48px rgba(5, 43, 76, 0.3);
}

.timeout-dialog__heart {
  width: 104px;
  height: 94px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 11px 12px rgba(173, 18, 55, 0.24));
  animation: timeoutHeartBreak 640ms cubic-bezier(0.22, 0.78, 0.28, 1) both;
}

.timeout-dialog__heart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.timeout-dialog__heart-shape {
  fill: url(#broken-heart-fill);
  stroke: #ae1236;
  stroke-width: 3;
  stroke-linejoin: round;
}

.timeout-dialog__heart-shine {
  fill: none;
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 5;
  stroke-linecap: round;
}

.timeout-dialog__heart-crack {
  fill: none;
  stroke: #fff4ee;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: bevel;
  filter: drop-shadow(2px 1px 0 rgba(109, 8, 34, 0.5));
}

@keyframes timeoutHeartBreak {
  0% {
    opacity: 0;
    transform: translateY(-10px) scale(1.16) rotate(-5deg);
  }
  46% {
    opacity: 1;
    transform: translateY(3px) scale(0.94) rotate(3deg);
  }
  68% {
    transform: translateY(-1px) scale(1.03) rotate(-2deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0);
  }
}

.timeout-dialog__panel h2,
.timeout-dialog__panel p {
  margin: 0;
}

.timeout-dialog__panel h2 {
  font-size: clamp(26px, 7vw, 38px);
  font-weight: 950;
}

.timeout-dialog__panel p {
  max-width: 280px;
  color: #5f7180;
  font-size: 16px;
  line-height: 1.35;
}

.timeout-dialog__panel .text-button {
  width: 100%;
  margin-top: 6px;
}

.fatal-error-dialog {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 29, 55, 0.7);
  backdrop-filter: blur(12px) brightness(0.72) saturate(0.76);
  animation: fatalErrorBackdropIn 220ms ease both;
}

.fatal-error-dialog__panel {
  width: min(100%, 360px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 30px 26px 26px;
  border: 3px solid rgba(255, 255, 255, 0.96);
  border-radius: 30px;
  background: linear-gradient(180deg, #ffffff 0%, #f2f9ff 100%);
  color: #17375a;
  text-align: center;
  box-shadow:
    inset 0 0 0 4px rgba(78, 174, 225, 0.14),
    0 22px 52px rgba(4, 21, 43, 0.36);
  animation: fatalErrorPanelIn 320ms cubic-bezier(0.22, 0.78, 0.28, 1) both;
}

.fatal-error-dialog__eyebrow,
.fatal-error-dialog__panel h2,
.fatal-error-dialog__panel > p {
  margin: 0;
}

.fatal-error-dialog__eyebrow {
  color: #48a9dc;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fatal-error-dialog__panel h2 {
  color: #187cc1;
  font-size: clamp(27px, calc(var(--stage-w) * 0.074), 36px);
  font-weight: 950;
  line-height: 1.05;
}

.fatal-error-dialog__panel > p:not(.fatal-error-dialog__eyebrow) {
  max-width: 290px;
  color: #5f7180;
  font-size: clamp(15px, calc(var(--stage-w) * 0.039), 17px);
  font-weight: 550;
  line-height: 1.35;
}

.fatal-error-dialog__reload.text-button {
  width: 100%;
  min-height: 58px;
  margin-top: 8px;
  padding-inline: 16px;
  font-size: clamp(14px, calc(var(--stage-w) * 0.038), 17px);
  white-space: normal;
}

@keyframes fatalErrorBackdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fatalErrorPanelIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fatal-error-dialog,
  .fatal-error-dialog__panel {
    animation: none;
  }
}

.pause-dialog__panel {
  width: min(100%, 366px);
  height: auto;
  max-height: calc(100% - 24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 33px 24px;
  border: 0;
  border-radius: 28px;
  background: #ffffff;
  color: #0a335c;
  text-align: center;
  box-shadow: 0 10px 24px rgba(5, 31, 51, 0.28);
  overflow: hidden;
}

.pause-dialog__panel img {
  width: 190px;
  height: 170px;
  flex: 0 0 auto;
  display: block;
  margin: 0;
  border-radius: 20px;
  object-fit: contain;
  filter: none;
}

.pause-dialog__panel h2 {
  width: 100%;
  min-height: 44px;
  display: grid;
  place-items: center;
  margin: 8px 0 0;
  color: #0a7ac9;
  font-size: 27px;
  font-weight: 850;
  line-height: normal;
}

.pause-dialog__panel p {
  width: 100%;
  min-height: 48px;
  display: grid;
  place-items: center;
  margin: 0;
  color: #4d637a;
  font-size: 16px;
  font-weight: 400;
  line-height: normal;
}

.pause-dialog__sound {
  width: 300px;
  min-height: 64px;
  flex: 0 0 auto;
  margin: 24px 0 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 18px;
  border: 0;
  border-radius: 16px;
  background: #f0f7ff;
  color: #0a335c;
  text-align: left;
  box-shadow: none;
  cursor: pointer;
}

.pause-dialog__sound-copy {
  min-width: 0;
}

.pause-dialog__sound-copy strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  line-height: normal;
  white-space: nowrap;
}

.pause-dialog__sound input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.pause-dialog__sound .account-modal__switch {
  width: 54px;
  height: 30px;
  border: 0;
  background: #bdc9d3;
  box-shadow: none;
}

.pause-dialog__sound .account-modal__switch::after {
  left: 3px;
  width: 24px;
  height: 24px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(18, 50, 79, 0.2);
}

.pause-dialog__resume.text-button {
  width: 180px;
  min-height: 56px;
  flex: 0 0 auto;
  margin: 40px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  background: #ffc21d;
  color: #18314b;
  font-size: 16px;
  font-weight: 850;
  line-height: 20px;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 4px 5px rgba(7, 65, 105, 0.12);
}

.pause-dialog__menu {
  width: 180px;
  min-height: 56px;
  flex: 0 0 auto;
  margin: 24px 0 0;
  padding: 12px 16px;
  border: 0;
  border-radius: 999px;
  background: #0d5aa7;
  color: #ffffff;
  font-size: 16px;
  font-weight: 850;
  line-height: 20px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 4px 5px rgba(7, 65, 105, 0.12);
  cursor: pointer;
}

.pause-dialog__menu:focus-visible {
  outline: 3px solid rgba(13, 90, 167, 0.32);
  outline-offset: 2px;
}

.pause-exit-dialog {
  position: absolute;
  inset: 0;
  z-index: 13;
  display: grid;
  place-items: center;
  padding: 12px 20px;
  background: rgba(248, 252, 247, 0.28);
  backdrop-filter: blur(12px) brightness(1.08) saturate(0.86);
}

.pause-exit-dialog__panel {
  position: relative;
  width: min(100%, 366px);
  height: min(calc(100% - 24px), 390px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 42px 38px 22px;
  border: 0;
  border-radius: 28px;
  background: #ffffff;
  color: #0a335c;
  text-align: center;
  box-shadow: 0 10px 24px rgba(5, 31, 51, 0.28);
  overflow: hidden;
}

.pause-exit-dialog__close {
  display: none;
}

.pause-exit-dialog__close img {
  display: none;
}

.pause-exit-dialog__panel h2 {
  width: 100%;
  min-height: 46px;
  display: grid;
  place-items: center;
  margin: 0;
  color: #0a7ac9;
  font-size: 28px;
  font-weight: 850;
  line-height: normal;
}

.pause-exit-dialog__panel > p:not(.pause-exit-dialog__status) {
  width: 100%;
  min-height: 64px;
  display: grid;
  place-items: center;
  margin: 16px 0 0;
  color: #4d637a;
  font-size: 16px;
  font-weight: 400;
  line-height: normal;
}

.pause-exit-dialog__stay.text-button,
.pause-exit-dialog__confirm.text-button {
  width: 180px;
  min-height: 56px;
  flex: 0 0 auto;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 850;
  line-height: 20px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 4px 5px rgba(7, 65, 105, 0.12);
}

.pause-exit-dialog__stay.text-button {
  margin: 22px 0 0;
  background: #ffc21d;
  color: #18314b;
}

.pause-exit-dialog__confirm.text-button {
  margin: 24px 0 0;
  background: #0d5aa7;
  color: #ffffff;
}

.pause-exit-dialog__status {
  min-height: 18px;
  margin: 8px 0 0;
  color: #9a2f2f;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.account-exit-dialog {
  z-index: 60;
}

.account-exit-dialog .account-exit-dialog__panel {
  width: min(100%, 340px);
  height: auto;
  min-height: 280px;
  justify-content: center;
  gap: 22px;
  padding: 36px 28px;
  border: 4px solid rgba(255, 255, 255, 0.96);
  background: linear-gradient(180deg, #fffdf7 0%, #fff1d9 100%);
  box-shadow:
    inset 0 0 0 5px rgba(78, 174, 225, 0.14),
    0 22px 48px rgba(8, 56, 98, 0.34);
}

.account-exit-dialog .account-exit-dialog__panel h2 {
  min-height: 0;
  margin: 0 0 6px;
  color: #0a7ac9;
}

.account-exit-dialog .pause-exit-dialog__stay.text-button,
.account-exit-dialog .pause-exit-dialog__confirm.text-button {
  width: min(100%, 250px);
  min-height: 56px;
  margin: 0;
}

@media (max-height: 640px) {
  .pause-dialog__panel {
    height: auto;
    max-height: calc(100% - 20px);
    padding: 18px 28px;
  }

  .pause-dialog__panel img {
    width: 142px;
    height: 126px;
  }

  .pause-dialog__panel h2 {
    min-height: 38px;
    margin-top: 6px;
    font-size: 23px;
  }

  .pause-dialog__panel p {
    min-height: 42px;
    font-size: 14px;
  }

  .pause-dialog__sound {
    margin-top: 12px;
  }

  .pause-dialog__resume.text-button {
    min-height: 50px;
    margin-top: 18px;
  }

  .pause-dialog__menu {
    min-height: 50px;
    margin-top: 12px;
  }
}

.text-button {
  min-height: 54px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--purple-dark);
  font-size: clamp(12px, calc(var(--stage-w) * 0.04), 44px);
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow:
    inset 0 -6px 0 rgba(186, 119, 0, 0.28),
    0 12px 22px rgba(21, 94, 136, 0.2);
  cursor: pointer;
}

.text-button--secondary {
  background: var(--purple);
  color: var(--white);
  box-shadow:
    inset 0 -6px 0 rgba(5, 60, 100, 0.35),
    0 12px 22px rgba(21, 94, 136, 0.2);
}

.text-button:disabled,
.text-button[aria-busy="true"] {
  cursor: progress;
  opacity: 0.64;
  filter: grayscale(0.18);
}

button[data-pending="true"] {
  cursor: progress;
}

.win-dialog {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 6%;
  background: rgba(13, 66, 96, 0.34);
  backdrop-filter: blur(7px);
}

.win-dialog__panel {
  position: relative;
  width: 100%;
  max-height: 92%;
  overflow-y: auto;
  padding: clamp(34px, calc(var(--stage-w) * 0.095), 72px) 8% clamp(28px, calc(var(--stage-w) * 0.07), 56px);
  border: 0;
  border-radius: clamp(26px, calc(var(--stage-w) * 0.07), 48px);
  background: #ffffff;
  color: #17375a;
  text-align: center;
  box-shadow: 0 26px 60px rgba(10, 66, 106, 0.35);
  scrollbar-width: none;
}

.win-dialog__panel::-webkit-scrollbar {
  display: none;
}

.win-dialog__close {
  position: absolute;
  right: -6%;
  top: -8%;
  width: clamp(58px, calc(var(--stage-w) * 0.16), 104px);
  padding: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 8px 12px rgba(7, 65, 105, 0.24));
  z-index: 2;
}

.win-dialog__close img {
  display: block;
  width: 100%;
}

.win-dialog__panel h2 {
  margin: 0 0 clamp(24px, calc(var(--stage-w) * 0.06), 48px);
  color: #0f7dca;
  font-size: clamp(30px, calc(var(--stage-w) * 0.076), 62px);
  font-weight: 900;
  line-height: 1;
}

.win-dialog__panel p {
  margin: 0;
}

.win-dialog__status {
  flex: 1;
  color: #536d86;
  font-size: clamp(16px, calc(var(--stage-w) * 0.043), 34px);
  font-weight: 500;
  line-height: 1.15;
  text-align: left;
}

.win-dialog__weekly-prize {
  width: 100%;
  margin: 0 auto clamp(24px, calc(var(--stage-w) * 0.065), 48px);
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.win-dialog__weekly-prize .rewards-prize-card {
  padding: clamp(12px, calc(var(--stage-w) * 0.032), 20px);
  border: 2px solid rgba(78, 154, 201, 0.34);
  border-radius: clamp(16px, calc(var(--stage-w) * 0.042), 24px);
  background: linear-gradient(180deg, #ffffff 0%, #f5faff 100%);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.82);
}

.win-dialog__daily-progress {
  width: 100%;
  margin: 0 auto clamp(20px, calc(var(--stage-w) * 0.052), 40px);
  display: grid;
  justify-items: center;
  gap: clamp(8px, calc(var(--stage-w) * 0.022), 18px);
  padding: clamp(14px, calc(var(--stage-w) * 0.034), 26px) 7% clamp(18px, calc(var(--stage-w) * 0.046), 34px);
  border-radius: clamp(22px, calc(var(--stage-w) * 0.056), 42px);
  background: linear-gradient(180deg, #fff9e6 0%, #fff1c9 100%);
  overflow: hidden;
}

.win-dialog__gift-glow {
  position: relative;
  width: min(58%, 250px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.win-dialog__gift-glow::before {
  content: "";
  position: absolute;
  inset: -13%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 238, 116, 0.95) 0%, rgba(255, 193, 30, 0.46) 38%, rgba(255, 193, 30, 0) 72%);
  filter: blur(3px);
  animation: dailyPrizeGlow 1.9s ease-in-out infinite;
}

.win-dialog__gift-glow img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 14px 16px rgba(144, 67, 7, 0.22));
  animation: dailyPrizeGiftFloat 3.2s ease-in-out infinite;
}

.win-dialog__daily-progress > p {
  display: grid;
  gap: 4px;
  color: #536d86;
  text-align: center;
  line-height: 1.18;
}

.win-dialog__daily-progress > p strong {
  color: #17375a;
  font-size: clamp(18px, calc(var(--stage-w) * 0.047), 36px);
  font-weight: 900;
}

.win-dialog__daily-progress > p span {
  font-size: clamp(14px, calc(var(--stage-w) * 0.036), 28px);
  font-weight: 650;
}

@keyframes dailyPrizeGlow {
  0%,
  100% {
    opacity: 0.58;
    transform: scale(0.88);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@keyframes dailyPrizeGiftFloat {
  0%,
  100% {
    transform: translate3d(0, 2%, 0) rotate(-1deg);
  }
  50% {
    transform: translate3d(0, -3%, 0) rotate(1deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .win-dialog__gift-glow::before,
  .win-dialog__gift-glow img {
    animation: none;
  }
}

.win-dialog__coin-reward {
  width: 100%;
  min-height: clamp(84px, calc(var(--stage-w) * 0.2), 156px);
  margin: 0 auto clamp(22px, calc(var(--stage-w) * 0.055), 42px);
  display: flex;
  align-items: center;
  gap: 5%;
  padding: 4% 6% 4% 11%;
  border-radius: clamp(20px, calc(var(--stage-w) * 0.05), 38px);
  background: #eef6ff;
}

.win-dialog__coin-reward > img {
  display: block;
  flex: 0 0 auto;
  width: clamp(48px, calc(var(--stage-w) * 0.125), 100px);
  filter: drop-shadow(0 8px 8px rgba(112, 72, 8, 0.18));
}

.win-dialog__status strong {
  font: inherit;
  white-space: nowrap;
}

.win-dialog__panel [data-play-again] {
  width: min(92%, 390px);
  min-height: clamp(52px, calc(var(--stage-w) * 0.14), 82px);
  padding-inline: clamp(26px, calc(var(--stage-w) * 0.09), 56px);
  font-size: clamp(16px, calc(var(--stage-w) * 0.043), 34px);
  line-height: 1;
}

.win-dialog__panel [data-play-again]:disabled {
  cursor: default;
  opacity: 0.82;
  filter: saturate(0.82);
}

.win-dialog__close:disabled {
  cursor: progress;
  opacity: 0.58;
  filter: grayscale(0.18);
}

.reward-flight-layer {
  position: absolute;
  inset: 0;
  z-index: 65;
  overflow: hidden;
  pointer-events: none;
}

.reward-coin-flight {
  position: absolute;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 8px 8px rgba(71, 32, 7, 0.3));
  will-change: transform, opacity;
}

.menu-balance__item--coins.is-reward-pulsing {
  animation: rewardBalancePulse 260ms ease-out;
}

.ticket-shop,
.heart-shop {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 9%;
  background: rgba(13, 66, 96, 0.32);
  backdrop-filter: blur(7px);
}

.no-lives-modal {
  position: absolute;
  inset: 0;
  z-index: 32;
  display: grid;
  place-items: center;
  padding: 8%;
  background: rgba(20, 48, 86, 0.58);
  backdrop-filter: blur(8px);
}

.no-lives-modal__panel {
  position: relative;
  width: min(92%, 400px);
  padding: 15% 8% 8%;
  border: 4px solid rgba(255, 255, 255, 0.92);
  border-radius: clamp(28px, calc(var(--stage-w) * 0.08), 38px);
  background: linear-gradient(180deg, #fffdf7 0%, #fff1d9 100%);
  color: #17375a;
  text-align: center;
  box-shadow:
    inset 0 0 0 5px rgba(78, 174, 225, 0.16),
    0 28px 64px rgba(8, 39, 75, 0.4);
}

.no-lives-modal__close {
  position: absolute;
  top: 11px;
  right: 11px;
  width: 33px;
  height: 33px;
  padding: 0;
  background: transparent;
  filter: drop-shadow(0 7px 9px rgba(19, 44, 74, 0.24));
}

.no-lives-modal__close img {
  display: block;
  width: 100%;
}

.no-lives-modal__heart {
  position: absolute;
  left: 50%;
  top: 0;
  width: clamp(76px, calc(var(--stage-w) * 0.23), 110px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 4px solid #ffffff;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff8e7, #ffe7bd);
  box-shadow: 0 10px 24px rgba(52, 75, 98, 0.2);
  transform: translate(-50%, -52%);
}

.no-lives-modal__heart img {
  width: 72%;
  filter: drop-shadow(0 5px 5px rgba(91, 32, 48, 0.2));
}

.no-lives-modal__panel h2 {
  margin: 0 0 5%;
  color: #0d5aa7;
  font-size: clamp(24px, calc(var(--stage-w) * 0.071), 36px);
  font-weight: 950;
  line-height: 1;
}

.no-lives-modal__panel p {
  margin: 0 0 7%;
  color: #405e7b;
  font-size: clamp(15px, calc(var(--stage-w) * 0.042), 21px);
  font-weight: 750;
  line-height: 1.25;
}

.no-lives-modal__timer {
  width: 86%;
  margin: 0 auto 5%;
  display: grid;
  gap: 2px;
  padding: 4% 5%;
  border: 2px solid rgba(50, 137, 190, 0.16);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 -3px 0 rgba(37, 119, 171, 0.08);
}

.no-lives-modal__code-form {
  width: 92%;
  margin: 0 auto;
  display: grid;
  gap: 8px;
}

.no-lives-modal__code-form label {
  color: #405e7b;
  font-size: clamp(12px, calc(var(--stage-w) * 0.033), 16px);
  font-weight: 850;
  text-align: left;
}

.no-lives-modal__code-form input {
  width: 100%;
  min-height: 48px;
  padding: 9px 14px;
  border: 2px solid rgba(50, 137, 190, 0.24);
  border-radius: 14px;
  outline: 0;
  background: rgba(255, 255, 255, 0.82);
  color: #17375a;
  font-size: 16px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
  box-shadow: inset 0 -3px 0 rgba(37, 119, 171, 0.08);
}

.no-lives-modal__input-shell {
  position: relative;
  width: 100%;
}

.no-lives-modal__input-error {
  position: absolute;
  right: 12px;
  bottom: 4px;
  left: 12px;
  overflow: hidden;
  color: #c63d35;
  font-size: 10px;
  font-weight: 800;
  line-height: 12px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.no-lives-modal__input-error[hidden] {
  display: none;
}

.no-lives-modal__code-form input:focus {
  border-color: #4b91c3;
  box-shadow: 0 0 0 3px rgba(76, 148, 196, 0.15);
}

.no-lives-modal__code-form.has-input-error input {
  padding-bottom: 18px;
  color: #17375a;
}

.no-lives-modal__code-form.has-input-error input::placeholder {
  color: #17375a;
  opacity: 1;
}

.no-lives-modal__status {
  min-height: 18px;
  margin: 0 !important;
  color: #2d8d2d !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  line-height: 18px !important;
}

.no-lives-modal__status.is-warning {
  color: #b54832 !important;
}

.no-lives-modal__timer span {
  color: #668098;
  font-size: clamp(11px, calc(var(--stage-w) * 0.031), 16px);
  font-weight: 800;
}

.no-lives-modal__timer strong {
  color: #5b27bd;
  font-size: clamp(24px, calc(var(--stage-w) * 0.065), 32px);
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.no-lives-modal__friend {
  width: 100%;
  min-height: clamp(54px, calc(var(--stage-w) * 0.145), 72px);
  margin: 0 auto;
  background: linear-gradient(180deg, #66db14, #35b800);
  color: #ffffff;
  font-size: clamp(15px, calc(var(--stage-w) * 0.042), 20px);
  box-shadow: inset 0 -5px 0 rgba(31, 126, 0, 0.28), 0 8px 16px rgba(46, 135, 10, 0.22);
}

.ticket-shop__panel,
.heart-shop__panel {
  position: relative;
  width: 82%;
  padding: 8% 7% 7%;
  border: 3px solid rgba(255, 247, 230, 0.92);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 249, 236, 0.98), rgba(255, 232, 196, 0.97));
  color: var(--purple-dark);
  text-align: center;
  box-shadow:
    inset 0 0 0 5px rgba(67, 164, 220, 0.24),
    0 24px 48px rgba(14, 65, 96, 0.38);
}

.ticket-shop__close,
.heart-shop__close {
  position: absolute;
  right: -5%;
  top: -8%;
  width: 18%;
  padding: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 8px 10px rgba(7, 65, 105, 0.22));
}

.ticket-shop__close img,
.heart-shop__close img {
  display: block;
  width: 100%;
}

.ticket-shop__panel h2,
.heart-shop__panel h2 {
  margin: 0 0 2%;
  color: #0d5aa7;
  font-size: clamp(22px, calc(var(--stage-w) * 0.07), 62px);
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
}

.ticket-shop__panel p,
.heart-shop__panel p {
  margin: 0;
  color: #3479ad;
  font-size: clamp(13px, calc(var(--stage-w) * 0.04), 36px);
  font-weight: 850;
  line-height: 1.2;
}

.ticket-shop__offer,
.heart-shop__offer {
  width: 82%;
  margin: 8% auto 4%;
  display: grid;
  grid-template-columns: 24% 1fr;
  grid-template-rows: auto auto;
  column-gap: 6%;
  align-items: center;
  padding: 5% 6%;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow:
    inset 0 -4px 0 rgba(154, 96, 38, 0.1),
    0 10px 18px rgba(21, 94, 136, 0.14);
}

.ticket-shop__offer img,
.heart-shop__offer img {
  grid-row: 1 / 3;
  width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 5px rgba(105, 55, 10, 0.18));
}

.ticket-shop__offer strong,
.heart-shop__offer strong {
  color: #18314b;
  font-size: clamp(14px, calc(var(--stage-w) * 0.041), 36px);
  font-weight: 950;
  line-height: 1;
  text-align: left;
  white-space: nowrap;
  min-width: 0;
}

.ticket-shop__offer span,
.heart-shop__offer span {
  color: #0d5aa7;
  font-size: clamp(11px, calc(var(--stage-w) * 0.034), 30px);
  font-weight: 900;
  line-height: 1;
  text-align: left;
  white-space: nowrap;
  min-width: 0;
}

.ticket-shop__counter {
  width: 72%;
  min-height: clamp(46px, calc(var(--stage-w) * 0.13), 76px);
  margin: 0 auto 4%;
  display: grid;
  grid-template-columns: 30% 1fr 30%;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 -4px 0 rgba(154, 96, 38, 0.1),
    0 8px 16px rgba(21, 94, 136, 0.12);
}

.ticket-shop__counter button {
  position: relative;
  width: clamp(38px, calc(var(--stage-w) * 0.105), 62px);
  aspect-ratio: 1;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #8eed1f 0%, #42b80f 100%);
  color: var(--white);
  text-shadow: 0 2px 2px rgba(23, 85, 7, 0.3);
  box-shadow:
    inset 0 -5px 0 rgba(21, 112, 6, 0.38),
    0 5px 10px rgba(39, 97, 10, 0.22);
  cursor: pointer;
}

.ticket-shop__counter button::before,
.ticket-shop__counter button::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 42%;
  height: 10%;
  border-radius: 999px;
  background: #fff7ee;
  box-shadow:
    0 2px 2px rgba(24, 80, 8, 0.22),
    inset 0 -1px 0 rgba(181, 158, 133, 0.34);
  transform: translate(-50%, -50%);
}

.ticket-shop__counter [data-ticket-increase]::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.ticket-shop__counter button:disabled {
  opacity: 0.45;
  cursor: default;
  filter: grayscale(0.2);
}

.ticket-shop__counter strong {
  color: #18314b;
  font-size: clamp(21px, calc(var(--stage-w) * 0.062), 48px);
  font-weight: 950;
  line-height: 1;
}

.ticket-shop__status,
.heart-shop__status {
  min-height: 1.2em;
  margin-bottom: 5% !important;
  font-size: clamp(12px, calc(var(--stage-w) * 0.034), 30px) !important;
}

.ticket-shop__status.is-warning,
.heart-shop__status.is-warning {
  color: #a94c09;
  animation: shopWarningPulse 0.28s ease-out;
}

.ticket-shop__buy,
.heart-shop__buy {
  width: min(84%, 360px);
  font-size: clamp(15px, calc(var(--stage-w) * 0.041), 34px);
}

.ticket-shop__buy:disabled,
.heart-shop__buy:disabled {
  opacity: 0.55;
  cursor: default;
  filter: grayscale(0.2);
}

.auth-modal,
.account-modal,
.referral-modal,
.receipt-modal {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 8%;
  background: rgba(13, 66, 96, 0.34);
  backdrop-filter: blur(7px);
}

.auth-modal__panel,
.account-modal__panel,
.referral-modal__panel,
.receipt-modal__panel {
  position: relative;
  width: min(86%, 440px);
  padding: 8% 7% 6%;
  border: 3px solid rgba(255, 247, 230, 0.94);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 249, 236, 0.98), rgba(255, 232, 196, 0.97));
  color: var(--purple-dark);
  text-align: center;
  box-shadow:
    inset 0 0 0 5px rgba(67, 164, 220, 0.22),
    0 24px 52px rgba(14, 65, 96, 0.4);
}

.auth-modal__panel h2,
.account-modal__panel h2,
.referral-modal__panel h2,
.receipt-modal__panel h2 {
  margin: 0 0 4%;
  color: #0d5aa7;
  font-size: clamp(22px, calc(var(--stage-w) * 0.068), 58px);
  font-weight: 950;
  line-height: 1;
}

.auth-modal__panel p,
.referral-modal__panel p,
.receipt-modal__panel p {
  margin: 0 0 7%;
  color: #3479ad;
  font-size: clamp(13px, calc(var(--stage-w) * 0.036), 30px);
  font-weight: 800;
  line-height: 1.22;
}

.auth-modal__panel label,
.referral-modal__panel label {
  display: grid;
  gap: 7px;
  margin-bottom: 4.5%;
  color: #0d5aa7;
  font-size: clamp(12px, calc(var(--stage-w) * 0.032), 26px);
  font-weight: 900;
  text-align: left;
}

.auth-modal__panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: 88%;
  overflow: hidden;
  overscroll-behavior: contain;
}

.auth-modal__panel > h2,
.auth-modal__tabs {
  flex: 0 0 auto;
}

/* Only the active form scrolls; the title and tabs stay outside this area.
   Inset gutters keep input focus rings and button outlines inside the clip. */
.auth-modal__body {
  flex: 0 1 auto;
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  padding: 6px 8px 24px;
  margin: -6px -8px -12px;
  scroll-padding-block: 12px 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(49, 111, 179, 0.34) transparent;
}

.auth-modal__panel.is-registering {
  max-height: 92%;
}

.auth-modal__panel.is-resetting {
  max-height: 88%;
}

.receipt-modal__panel {
  width: min(84%, 430px);
  min-height: auto;
  display: grid;
  align-items: center;
  padding: 8% 6.5% 6.5%;
}

.receipt-modal__slides,
.receipt-modal__scanner {
  display: grid;
  justify-items: center;
  gap: clamp(8px, calc(var(--stage-w) * 0.024), 16px);
}

.receipt-modal__slides p,
.receipt-modal__scanner p {
  max-width: 92%;
  margin: 0;
  text-align: center;
}

.receipt-modal__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 2% 0 3%;
}

.receipt-modal__dots span {
  width: clamp(8px, calc(var(--stage-w) * 0.024), 14px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(13, 90, 167, 0.22);
  box-shadow: inset 0 -2px 0 rgba(6, 57, 102, 0.12);
}

.receipt-modal__dots span.is-active {
  background: linear-gradient(180deg, #ffcf46 0%, #ffad12 100%);
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.72),
    0 6px 12px rgba(52, 121, 173, 0.18);
}

.receipt-modal__next,
.receipt-modal__submit,
.receipt-modal__file {
  min-width: 0;
  min-height: clamp(44px, calc(var(--stage-w) * 0.118), 68px);
  padding-inline: clamp(10px, calc(var(--stage-w) * 0.026), 22px);
  font-size: clamp(12px, calc(var(--stage-w) * 0.032), 25px);
  line-height: 1;
  white-space: nowrap;
  box-sizing: border-box;
}

.receipt-modal__next,
.receipt-modal__submit {
  width: min(88%, 360px);
}

.receipt-modal__camera {
  position: relative;
  width: min(78%, 286px);
  aspect-ratio: 1;
  border: 3px solid rgba(255, 247, 230, 0.94);
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.86), rgba(255, 232, 196, 0.76)),
    rgba(13, 90, 167, 0.12);
  box-shadow:
    inset 0 0 0 5px rgba(67, 164, 220, 0.2),
    0 12px 22px rgba(20, 87, 128, 0.18);
}

.receipt-modal__camera video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.receipt-modal__scan-frame {
  position: absolute;
  inset: 16%;
  border: 4px solid rgba(255, 204, 50, 0.94);
  border-radius: 18px;
  box-shadow:
    0 0 0 999px rgba(13, 66, 96, 0.16),
    0 0 24px rgba(255, 204, 50, 0.48);
}

.receipt-modal__status {
  width: min(90%, 340px);
  min-height: 2.15em;
  font-size: clamp(12px, calc(var(--stage-w) * 0.031), 24px) !important;
  line-height: 1.08 !important;
  color: #3479ad !important;
}

.receipt-modal__status.is-warning {
  color: #a94c09 !important;
  animation: shopWarningPulse 0.28s ease-out;
}

.receipt-modal__status.is-success {
  color: #2f8a12 !important;
}

.receipt-modal__manual {
  width: min(76%, 344px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(18px, calc(var(--stage-w) * 0.052), 30px);
  row-gap: clamp(8px, calc(var(--stage-w) * 0.022), 14px);
  margin: 0;
}

.receipt-modal__manual label {
  min-width: 0;
  display: grid;
  gap: 4px;
  color: #fff7ee;
  font-size: clamp(10px, calc(var(--stage-w) * 0.027), 18px);
  font-weight: 950;
  line-height: 1;
  text-align: left;
  text-shadow: 0 2px 0 rgba(10, 73, 116, 0.58);
}

.receipt-modal__manual input {
  width: 100%;
  min-height: clamp(40px, calc(var(--stage-w) * 0.105), 58px);
  padding: 10px 14px;
  border: 2px solid rgba(13, 90, 167, 0.2);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  color: #1c1028;
  font-family: inherit;
  font-size: 16px;
  font-weight: 750;
  line-height: 1;
  outline: none;
  box-sizing: border-box;
}

.receipt-modal__manual label:last-child {
  grid-column: 1 / -1;
}

.receipt-modal__manual input[data-receipt-date],
.receipt-modal__manual input[data-receipt-time] {
  letter-spacing: 0;
  text-align: left;
}

.receipt-modal__manual input {
  user-select: text;
  -webkit-user-select: text;
  -webkit-touch-callout: default;
}

.receipt-modal__manual input:focus {
  border-color: rgba(13, 90, 167, 0.75);
  box-shadow: 0 0 0 4px rgba(13, 90, 167, 0.14);
}

.receipt-modal__manual input::placeholder {
  color: rgba(13, 90, 167, 0.58);
  font-weight: 850;
}

.receipt-modal__actions {
  width: min(88%, 340px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(8px, calc(var(--stage-w) * 0.022), 12px);
}

.receipt-modal__file-input {
  display: none;
}

.receipt-modal__moderate-button {
  width: min(82%, 360px);
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff7ee;
  font-size: clamp(12px, calc(var(--stage-w) * 0.032), 24px);
  font-weight: 950;
  line-height: 1.08;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-shadow:
    0 3px 0 rgba(10, 73, 116, 0.7),
    0 8px 20px rgba(22, 9, 54, 0.28);
  cursor: pointer;
}

.receipt-modal__moderation {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: clamp(10px, calc(var(--stage-h) * 0.013), 18px);
  padding: calc(var(--stage-h) * 0.105) 8% calc(var(--stage-h) * 0.045);
}

.receipt-modal__moderation h2 {
  width: 82%;
  margin: 0;
  color: #fff7ee;
  font-size: clamp(24px, calc(var(--stage-w) * 0.066), 50px);
  line-height: 0.96;
  text-align: center;
  text-shadow:
    0 4px 0 rgba(10, 73, 116, 0.72),
    0 10px 24px rgba(22, 9, 54, 0.34);
}

.receipt-modal__moderation-status {
  width: min(86%, 390px);
  min-height: 2.25em;
  margin: 0 !important;
  color: #fff7ee !important;
  font-size: clamp(11px, calc(var(--stage-w) * 0.031), 22px) !important;
  font-weight: 900 !important;
  line-height: 1.13 !important;
  text-align: center;
  text-shadow:
    0 2px 0 rgba(10, 73, 116, 0.65),
    0 8px 20px rgba(22, 9, 54, 0.28);
}

.receipt-modal__moderation-status.is-warning {
  color: #ffe2bd !important;
}

.receipt-modal__moderation-status.is-success {
  color: #c9ff92 !important;
}

.receipt-modal__moderation-form {
  width: min(86%, 390px);
  display: grid;
  gap: clamp(8px, calc(var(--stage-h) * 0.011), 12px);
}

.receipt-modal__moderation-form label:not(.receipt-modal__consent) {
  display: grid;
  gap: 4px;
  color: #fff7ee;
  font-size: clamp(10px, calc(var(--stage-w) * 0.027), 18px);
  font-weight: 950;
  line-height: 1;
  text-align: left;
  text-shadow: 0 2px 0 rgba(10, 73, 116, 0.58);
}

.receipt-modal__moderation-form input[type="text"],
.receipt-modal__moderation-form input[type="tel"],
.receipt-modal__moderation-form input[type="email"] {
  width: 100%;
  min-height: clamp(38px, calc(var(--stage-h) * 0.055), 54px);
  padding: 10px 12px;
  border: 2px solid rgba(255, 247, 230, 0.84);
  border-radius: 18px;
  background: rgba(255, 249, 236, 0.94);
  color: #1c1028;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  outline: none;
  box-shadow:
    inset 0 -4px 0 rgba(154, 96, 38, 0.1),
    0 12px 22px rgba(22, 9, 54, 0.22);
  box-sizing: border-box;
  user-select: text;
  -webkit-user-select: text;
  -webkit-touch-callout: default;
}

.receipt-modal__moderation-form input.is-invalid {
  border-color: rgba(255, 82, 82, 0.95);
  background: rgba(255, 238, 232, 0.96);
  box-shadow:
    inset 0 -4px 0 rgba(184, 43, 35, 0.13),
    0 0 0 4px rgba(255, 82, 82, 0.2),
    0 12px 22px rgba(22, 9, 54, 0.22);
}

.receipt-modal__upload,
.receipt-modal__send {
  width: 100%;
  min-height: clamp(44px, calc(var(--stage-h) * 0.064), 66px);
  font-size: clamp(12px, calc(var(--stage-w) * 0.032), 24px);
  white-space: nowrap;
}

.receipt-modal__upload.is-invalid {
  outline: 4px solid rgba(255, 82, 82, 0.42);
  outline-offset: 3px;
  filter: saturate(1.12);
}

.receipt-modal__file-name {
  margin-top: -4px;
  color: #fff7ee;
  font-size: clamp(10px, calc(var(--stage-w) * 0.027), 18px);
  font-weight: 850;
  line-height: 1.1;
  text-align: center;
  text-shadow: 0 2px 0 rgba(10, 73, 116, 0.58);
  overflow-wrap: anywhere;
}

.receipt-modal__consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: start;
  color: #fff7ee;
  font-size: clamp(9px, calc(var(--stage-w) * 0.025), 17px);
  font-weight: 850;
  line-height: 1.12;
  text-align: left;
  text-shadow: 0 2px 0 rgba(10, 73, 116, 0.58);
}

.receipt-modal__consent input {
  width: clamp(18px, calc(var(--stage-w) * 0.047), 28px);
  aspect-ratio: 1;
  margin: 0;
  accent-color: #7edb14;
}

.receipt-modal__consent.is-invalid {
  color: #ffd2c9;
}

.receipt-modal__consent.is-invalid input {
  outline: 3px solid rgba(255, 82, 82, 0.75);
  outline-offset: 2px;
}

.receipt-modal.is-scanning {
  place-items: stretch;
  padding: 0;
}

.receipt-modal.is-moderating {
  place-items: stretch;
  padding: 0;
}

.receipt-modal.is-scanning .receipt-modal__panel {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: block;
  text-align: center;
}

.receipt-modal.is-moderating .receipt-modal__panel {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: block;
  text-align: center;
}

.receipt-modal.is-moderating .receipt-modal__close {
  top: calc(var(--stage-h) * 0.028);
  right: calc(var(--stage-w) * 0.045);
}

.receipt-modal.is-scanning .receipt-modal__close {
  top: calc(var(--stage-h) * 0.028);
  right: calc(var(--stage-w) * 0.045);
}

.receipt-modal.is-scanning .receipt-modal__scanner {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto auto auto auto auto;
  align-content: start;
  justify-items: center;
  gap: clamp(8px, calc(var(--stage-h) * 0.011), 14px);
  padding: calc(var(--stage-h) * 0.085) 8% calc(var(--stage-h) * 0.045);
}

.receipt-modal.is-scanning .receipt-modal__scanner h2 {
  width: 72%;
  margin: 0;
  color: #fff7ee;
  font-size: clamp(26px, calc(var(--stage-w) * 0.073), 54px);
  line-height: 0.95;
  text-shadow:
    0 4px 0 rgba(10, 73, 116, 0.72),
    0 10px 24px rgba(22, 9, 54, 0.34);
}

.receipt-modal.is-scanning .receipt-modal__camera {
  width: min(70%, calc(var(--stage-h) * 0.245));
  border: 4px solid rgba(255, 247, 230, 0.94);
  border-radius: clamp(22px, calc(var(--stage-w) * 0.062), 34px);
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.9), rgba(255, 232, 196, 0.86)),
    rgba(13, 90, 167, 0.18);
  box-shadow:
    inset 0 0 0 5px rgba(67, 164, 220, 0.24),
    0 18px 34px rgba(22, 9, 54, 0.38);
}

.receipt-modal.is-scanning .receipt-modal__status {
  width: min(82%, 360px);
  min-height: 1.9em;
  margin: 0;
  color: #fff7ee !important;
  font-size: clamp(12px, calc(var(--stage-w) * 0.033), 24px) !important;
  line-height: 1.12 !important;
  text-shadow:
    0 3px 0 rgba(10, 73, 116, 0.65),
    0 8px 20px rgba(22, 9, 54, 0.28);
}

.receipt-modal.is-scanning .receipt-modal__status.is-warning {
  color: #ffe2bd !important;
}

.receipt-modal.is-scanning .receipt-modal__status.is-success {
  color: #c9ff92 !important;
}

.receipt-modal.is-scanning .receipt-modal__manual {
  width: min(76%, 344px);
}

.receipt-modal.is-scanning .receipt-modal__manual input,
.receipt-modal.is-scanning .receipt-modal__manual select {
  width: 100%;
  min-height: clamp(38px, calc(var(--stage-h) * 0.055), 54px);
  border-color: rgba(255, 247, 230, 0.84);
  background: rgba(255, 249, 236, 0.94);
  box-shadow:
    inset 0 -4px 0 rgba(154, 96, 38, 0.1),
    0 12px 22px rgba(22, 9, 54, 0.26);
}

@media (max-width: 390px) {
  .receipt-modal__manual,
  .receipt-modal.is-scanning .receipt-modal__manual {
    width: min(76%, 316px);
    column-gap: 16px;
  }

  .receipt-modal__manual input,
  .receipt-modal.is-scanning .receipt-modal__manual input {
    padding-left: 10px;
    padding-right: 10px;
  }
}

.receipt-modal.is-scanning .receipt-modal__actions {
  width: min(82%, 360px);
  gap: clamp(8px, calc(var(--stage-w) * 0.024), 14px);
}

.receipt-modal.is-scanning .receipt-modal__file,
.receipt-modal.is-scanning .receipt-modal__submit {
  width: 100%;
  min-height: clamp(46px, calc(var(--stage-h) * 0.072), 72px);
  font-size: clamp(12px, calc(var(--stage-w) * 0.034), 25px);
}

.auth-modal__panel input,
.referral-modal__panel input {
  width: 100%;
  min-height: clamp(48px, calc(var(--stage-w) * 0.13), 76px);
  padding: 0 6%;
  border: 2px solid rgba(67, 164, 220, 0.18);
  border-radius: 18px;
  outline: none;
  background: rgba(255, 255, 255, 0.78);
  color: #160b22;
  font-size: clamp(16px, calc(var(--stage-w) * 0.04), 34px);
  font-weight: 850;
  touch-action: auto;
  user-select: text;
  -webkit-user-select: text;
  -webkit-touch-callout: default;
  box-shadow: inset 0 -3px 0 rgba(154, 96, 38, 0.08);
}

.auth-modal__input-wrap {
  position: relative;
  width: 100%;
}

.auth-modal__input-wrap > input {
  padding-right: clamp(48px, calc(var(--stage-w) * 0.13), 76px);
}

.auth-modal__clear-input {
  position: absolute;
  top: 50%;
  right: clamp(10px, calc(var(--stage-w) * 0.03), 18px);
  width: clamp(26px, calc(var(--stage-w) * 0.07), 36px);
  height: clamp(26px, calc(var(--stage-w) * 0.07), 36px);
  display: grid;
  place-items: center;
  padding: 0 0 2px;
  border: 1.5px solid rgba(13, 90, 167, 0.34);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  color: #0d5aa7;
  font-size: clamp(18px, calc(var(--stage-w) * 0.046), 28px);
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.auth-modal__clear-input[hidden] {
  display: none;
}

.auth-modal__clear-input:focus-visible {
  outline: 3px solid rgba(13, 90, 167, 0.24);
  outline-offset: 2px;
}

.referral-modal__panel label,
.referral-modal__panel input {
  pointer-events: auto;
}

.auth-modal__panel input:focus,
.referral-modal__panel input:focus {
  border-color: rgba(13, 90, 167, 0.58);
  box-shadow:
    inset 0 -3px 0 rgba(154, 96, 38, 0.08),
    0 0 0 4px rgba(13, 90, 167, 0.12);
}

.auth-modal__panel.has-error {
  border-color: rgba(220, 61, 61, 0.72);
  box-shadow:
    inset 0 0 0 5px rgba(220, 61, 61, 0.08),
    0 24px 52px rgba(14, 65, 96, 0.4),
    0 0 0 4px rgba(220, 61, 61, 0.14);
}

.auth-modal__panel input.is-invalid {
  border-color: rgba(220, 61, 61, 0.78);
  background: rgba(255, 245, 245, 0.92);
  box-shadow:
    inset 0 -3px 0 rgba(220, 61, 61, 0.1),
    0 0 0 4px rgba(220, 61, 61, 0.12);
}

.auth-modal__panel .auth-modal__check {
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 3%;
  font-size: clamp(10px, calc(var(--stage-w) * 0.028), 22px);
  line-height: 1.15;
}

.auth-modal__check input {
  width: clamp(18px, calc(var(--stage-w) * 0.05), 30px);
  min-height: 0;
  aspect-ratio: 1;
  padding: 0;
  accent-color: #58c70f;
}

.auth-modal__check.is-invalid {
  padding: 2.5% 3%;
  border: 2px solid rgba(220, 61, 61, 0.62);
  border-radius: 14px;
  background: rgba(255, 245, 245, 0.72);
  color: #8f2626;
}

.auth-modal__field-title--regular,
.auth-modal__panel .auth-modal__check > span {
  font-weight: 400;
}

.auth-modal__panel .auth-modal__error {
  min-height: 1.2em;
  margin: 0 0 5% !important;
  color: #b52d2d !important;
  font-size: clamp(12px, calc(var(--stage-w) * 0.032), 28px) !important;
  font-weight: 400;
}

.auth-modal__panel .auth-modal__error.is-success {
  color: #258a3c !important;
}

.auth-modal__forgot,
.auth-modal__secondary {
  display: block;
  margin: 0 auto 12px;
  padding: 2px 6px;
  border: 0;
  background: transparent;
  color: #3775ad;
  font: inherit;
  font-size: clamp(11px, calc(var(--stage-w) * 0.028), 13px);
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-modal__forgot:hover,
.auth-modal__secondary:hover {
  color: #235b8c;
}

.auth-modal__forgot:focus-visible,
.auth-modal__secondary:focus-visible {
  outline: 3px solid rgba(88, 199, 15, 0.28);
  outline-offset: 2px;
  border-radius: 6px;
}

.auth-modal__reset-copy {
  margin: 0 0 14px !important;
  color: #5f7289 !important;
  font-size: clamp(11px, calc(var(--stage-w) * 0.029), 13px) !important;
  line-height: 1.4 !important;
  text-align: center;
}

.auth-modal__reset .auth-modal__submit {
  width: min(78%, 250px);
}

.auth-modal__secondary {
  margin-top: 12px;
  margin-bottom: 0;
}

.auth-modal__submit,
.account-modal__receipts,
.account-modal__faq,
.account-modal__logout {
  width: min(86%, 360px);
  min-height: clamp(50px, calc(var(--stage-w) * 0.13), 78px);
  font-size: clamp(15px, calc(var(--stage-w) * 0.04), 34px);
}

.account-modal__close,
.referral-modal__close {
  position: absolute;
  right: -6%;
  top: -8%;
  width: clamp(58px, calc(var(--stage-w) * 0.16), 104px);
  padding: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 8px 12px rgba(7, 65, 105, 0.24));
}

.account-modal__close img,
.referral-modal__close img {
  display: block;
  width: 100%;
}

.referral-modal__description {
  font-weight: 400 !important;
}

.referral-modal__field-title {
  font-weight: 400;
}

.referral-modal__code-row {
  width: 88%;
  min-height: clamp(52px, calc(var(--stage-w) * 0.14), 82px);
  margin: 0 auto 6%;
  display: grid;
  grid-template-columns: 1fr clamp(26px, calc(var(--stage-w) * 0.072), 42px);
  gap: 4%;
  align-items: center;
  padding: 2% 5% 2% 6%;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 -4px 0 rgba(154, 96, 38, 0.1),
    0 8px 16px rgba(21, 94, 136, 0.12);
}

.referral-modal__code-row strong {
  color: #160b22;
  font-size: clamp(18px, calc(var(--stage-w) * 0.052), 42px);
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0.04em;
  text-align: left;
}

.referral-modal__code-row button {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 8%;
  border-radius: 0;
  background: transparent;
  color: #0d5aa7;
  cursor: pointer;
  box-shadow: none;
}

.referral-modal__code-row svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 1px rgba(20, 87, 128, 0.18));
}

.referral-modal__status {
  min-height: 1.2em;
  margin: 0 0 5% !important;
  color: #279d31 !important;
  font-size: clamp(12px, calc(var(--stage-w) * 0.032), 28px) !important;
  font-weight: 400 !important;
}

.referral-modal__status:empty {
  min-height: 0;
  margin-bottom: 0 !important;
}

.referral-modal__status.is-warning {
  color: #a94c09 !important;
  animation: shopWarningPulse 0.28s ease-out;
}

.referral-modal__apply {
  width: min(86%, 360px);
  min-height: clamp(50px, calc(var(--stage-w) * 0.13), 78px);
  font-size: clamp(14px, calc(var(--stage-w) * 0.038), 32px);
}

.account-modal__profile {
  position: relative;
  width: 88%;
  margin: 4% auto 4%;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 5.5% 6%;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow:
    inset 0 -4px 0 rgba(154, 96, 38, 0.1),
    0 10px 18px rgba(21, 94, 136, 0.14);
}

.account-modal__avatar {
  width: clamp(72px, calc(var(--stage-w) * 0.2), 118px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  box-shadow:
    0 10px 18px rgba(20, 87, 128, 0.22);
  overflow: hidden;
}

.account-modal__avatar-edit {
  position: absolute;
  top: clamp(10px, calc(var(--stage-w) * 0.028), 18px);
  right: clamp(10px, calc(var(--stage-w) * 0.028), 18px);
  width: clamp(44px, calc(var(--stage-w) * 0.105), 62px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  opacity: 0.56;
  cursor: pointer;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.account-modal__avatar-edit img {
  width: clamp(17px, 42%, 22px);
  height: clamp(17px, 42%, 22px);
  object-fit: contain;
}

.account-modal__avatar-edit:hover {
  opacity: 0.82;
  transform: translateY(-1px);
}

.account-modal__avatar-edit[aria-expanded="true"] {
  opacity: 0.72;
}

.account-modal__avatar-edit:focus-visible {
  outline: none;
}

body.is-keyboard-navigation .account-modal__avatar-edit:focus-visible {
  outline: 2px solid rgba(13, 90, 167, 0.42);
  outline-offset: 2px;
}

.account-modal__avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.account-modal__profile strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: #160b22;
  font-size: clamp(17px, calc(var(--stage-w) * 0.048), 40px);
  font-weight: 950;
  line-height: 1.08;
}

.account-modal__profile span {
  color: #0d5aa7;
  font-size: clamp(13px, calc(var(--stage-w) * 0.036), 30px);
  font-weight: 850;
}

.account-modal__avatars {
  width: 100%;
  margin-top: 3%;
  padding-top: 4%;
  display: grid;
  grid-template-columns: repeat(3, clamp(44px, calc(var(--stage-w) * 0.12), 58px));
  justify-content: center;
  gap: clamp(8px, calc(var(--stage-w) * 0.022), 12px);
  border-top: 2px solid rgba(13, 90, 167, 0.14);
  animation: accountAvatarPickerEnter 180ms ease-out both;
}

.account-modal__avatars[hidden] {
  display: none;
}

.account-modal__avatar-option {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  border: 3px solid rgba(255, 247, 230, 0.88);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 6px 10px rgba(20, 87, 128, 0.16);
}

.account-modal__avatar-option img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.account-modal__avatar-option.is-selected {
  border-color: #ffcc32;
  box-shadow:
    0 0 0 3px rgba(13, 90, 167, 0.3),
    0 8px 14px rgba(20, 87, 128, 0.22);
}

@keyframes accountAvatarPickerEnter {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.account-modal__toggle {
  width: 88%;
  min-height: clamp(48px, calc(var(--stage-w) * 0.13), 76px);
  margin: 0 auto 5%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 2.5% 4%;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.66);
  color: #18314b;
  font-size: clamp(15px, calc(var(--stage-w) * 0.041), 34px);
  font-weight: 950;
  line-height: 1;
  text-align: left;
  box-shadow:
    inset 0 -4px 0 rgba(154, 96, 38, 0.1),
    0 8px 16px rgba(21, 94, 136, 0.12);
  cursor: pointer;
}

.account-modal__toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.account-modal__switch {
  position: relative;
  width: clamp(58px, calc(var(--stage-w) * 0.16), 92px);
  height: clamp(32px, calc(var(--stage-w) * 0.086), 52px);
  border: 2px solid rgba(255, 247, 230, 0.95);
  border-radius: 999px;
  background: linear-gradient(180deg, #ff8a8a 0%, #d33232 100%);
  box-shadow:
    inset 0 3px 4px rgba(255, 255, 255, 0.34),
    inset 0 -4px 8px rgba(124, 24, 24, 0.28),
    0 5px 10px rgba(122, 29, 29, 0.18);
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.account-modal__switch::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 5%;
  width: 43%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.9) 0 18%, transparent 19%),
    linear-gradient(180deg, #fff9ef 0%, #f4dcc0 100%);
  box-shadow:
    0 4px 8px rgba(20, 87, 128, 0.26),
    inset 0 -2px 3px rgba(154, 96, 38, 0.16);
  transform: translateY(-50%);
  transition: left 0.18s ease, transform 0.18s ease;
}

.account-modal__toggle input:checked + .account-modal__switch,
.pause-dialog__sound input:checked + .account-modal__switch {
  background: linear-gradient(180deg, #a9f018 0%, #43b90d 100%);
  box-shadow:
    inset 0 3px 4px rgba(255, 255, 255, 0.42),
    inset 0 -4px 8px rgba(22, 96, 8, 0.24),
    0 6px 12px rgba(48, 154, 16, 0.24);
}

.account-modal__toggle input:checked + .account-modal__switch::after,
.pause-dialog__sound input:checked + .account-modal__switch::after {
  left: 52%;
}

.pause-dialog__sound input:checked + .account-modal__switch {
  background: #33b83d;
  box-shadow: none;
}

.pause-dialog__sound input:checked + .account-modal__switch::after {
  left: 27px;
}

.account-modal__toggle input:focus-visible + .account-modal__switch,
.pause-dialog__sound input:focus-visible + .account-modal__switch {
  outline: 3px solid rgba(255, 204, 50, 0.82);
  outline-offset: 3px;
}

.account-modal__receipts,
.account-modal__faq {
  margin-bottom: 4%;
}

.account-modal__receipts {
  background: linear-gradient(180deg, #a9f018 0%, #58c70f 100%);
}

.account-modal__faq:disabled {
  opacity: 0.58;
  cursor: default;
  filter: grayscale(0.15);
}

.account-modal__logout {
  background: linear-gradient(180deg, #ffcf46 0%, #ffb21b 100%);
}

.account-modal__rules {
  margin: 4% auto 0;
  padding: 0;
  background: transparent;
  color: #0d5aa7;
  font-size: clamp(12px, calc(var(--stage-w) * 0.034), 28px);
  font-weight: 900;
  line-height: 1.1;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: default;
}

/* Account screen refresh: matches the blue-and-cream visual language of the game. */
.account-modal {
  padding: 7%;
  background: rgba(17, 47, 61, 0.18);
  backdrop-filter: blur(8px) saturate(0.9);
}

.account-modal__panel {
  width: min(90%, 440px);
  padding: 9% 6% 6%;
  border: 4px solid #ffe3ba;
  border-radius: 34px;
  background:
    linear-gradient(
      180deg,
      #49a8e1 0%,
      #3c9edb 16%,
      #fff5e5 16%,
      #ffe8c8 100%
    );
  color: #0d5aa7;
  box-shadow:
    inset 0 0 0 4px rgba(255, 255, 255, 0.28),
    0 24px 52px rgba(14, 65, 96, 0.3);
}

.account-modal__panel h2 {
  margin-bottom: 5%;
  color: #ffffff;
  text-shadow: 0 2px 0 rgba(13, 90, 167, 0.46);
}

.account-modal__profile {
  width: 90%;
  margin-bottom: 4.5%;
  border: 2px solid rgba(54, 157, 217, 0.2);
  background: linear-gradient(180deg, #fffdf8 0%, #fff3df 100%);
  box-shadow:
    inset 0 -4px 0 rgba(65, 151, 201, 0.08),
    0 10px 20px rgba(21, 94, 136, 0.14);
}

.account-modal__avatar {
  border: 0;
  box-shadow: none;
  overflow: visible;
}

.account-modal__avatar-edit {
  opacity: 0.72;
}

.account-modal__avatar-edit:hover,
.account-modal__avatar-edit[aria-expanded="true"] {
  opacity: 1;
}

body.is-keyboard-navigation .account-modal__avatar-edit:focus-visible {
  outline-color: rgba(13, 90, 167, 0.48);
}

.account-modal__profile strong {
  color: #18314b;
}

.account-modal__profile span {
  color: #0d5aa7;
}

.account-modal__avatars {
  border-top-color: rgba(13, 90, 167, 0.14);
}

.account-modal__avatar-option {
  border-color: rgba(255, 255, 255, 0.94);
  box-shadow: 0 6px 10px rgba(21, 94, 136, 0.16);
}

.account-modal__avatar-option.is-selected {
  border-color: #ffca3b;
  box-shadow:
    0 0 0 3px rgba(13, 90, 167, 0.28),
    0 8px 14px rgba(21, 94, 136, 0.2);
}

.account-modal__toggle {
  width: 90%;
  border: 2px solid rgba(54, 157, 217, 0.18);
  background: linear-gradient(180deg, #fffdf8 0%, #fff3df 100%);
  color: #0d5aa7;
  box-shadow:
    inset 0 -4px 0 rgba(65, 151, 201, 0.08),
    0 8px 16px rgba(21, 94, 136, 0.12);
}

.account-modal .account-modal__switch {
  box-shadow:
    inset 0 3px 4px rgba(255, 255, 255, 0.34),
    inset 0 -4px 8px rgba(124, 24, 24, 0.24),
    0 5px 10px rgba(21, 94, 136, 0.16);
}

.account-modal__receipts {
  background: linear-gradient(180deg, #98eb24 0%, #45b90c 100%);
  color: #ffffff;
  box-shadow:
    inset 0 -6px 0 rgba(31, 117, 6, 0.3),
    0 12px 22px rgba(21, 94, 136, 0.16);
}

.account-modal__faq {
  background: linear-gradient(180deg, #55b4e8 0%, #1681c5 100%);
  color: #ffffff;
  box-shadow:
    inset 0 -6px 0 rgba(7, 79, 139, 0.3),
    0 12px 22px rgba(21, 94, 136, 0.18);
}

.account-modal__logout {
  background: linear-gradient(180deg, #ffd65e 0%, #ffb51f 100%);
  color: #0d5aa7;
  box-shadow:
    inset 0 -6px 0 rgba(201, 123, 0, 0.24),
    0 12px 22px rgba(21, 94, 136, 0.16);
}

.account-modal__rules {
  color: #0d5aa7;
}

/* Login and registration refresh: blue, cream and green game palette. */
.auth-modal {
  padding: 7%;
  background: rgba(17, 47, 61, 0.18);
  backdrop-filter: blur(8px) saturate(0.9);
}

.auth-modal__panel {
  width: min(90%, 440px);
  padding: 7% 6% 6%;
  border: 4px solid #ffe3ba;
  border-radius: 34px;
  background: linear-gradient(180deg, #fff9ec 0%, #ffe8c8 100%);
  color: #0d5aa7;
  box-shadow:
    inset 0 0 0 5px rgba(67, 164, 220, 0.76),
    0 24px 52px rgba(14, 65, 96, 0.3);
}

.auth-modal__panel h2 {
  margin: 0 0 3%;
  padding: 3.5% 5%;
  border-radius: 18px;
  background: linear-gradient(180deg, #55b4e8 0%, #1681c5 100%);
  color: #ffffff;
  font-size: clamp(21px, calc(var(--stage-w) * 0.058), 48px);
  line-height: 1.08;
  text-shadow: 0 2px 0 rgba(13, 90, 167, 0.42);
  box-shadow: inset 0 -4px 0 rgba(7, 79, 139, 0.22);
}

.auth-modal__tabs {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.38fr);
  gap: 4px;
  margin: 0 0 6%;
  padding: 4px;
  border: 2px solid rgba(54, 157, 217, 0.2);
  border-radius: 16px;
  background: rgba(54, 157, 217, 0.1);
}

.auth-modal__tab {
  min-width: 0;
  min-height: clamp(40px, calc(var(--stage-w) * 0.105), 62px);
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #0d5aa7;
  font-size: clamp(12px, calc(var(--stage-w) * 0.032), 25px);
  font-weight: 800;
  line-height: 1.05;
  cursor: pointer;
  transition:
    background 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.auth-modal__tab.is-active {
  background: linear-gradient(180deg, #55b4e8 0%, #1681c5 100%);
  color: #ffffff;
  box-shadow:
    inset 0 -3px 0 rgba(7, 79, 139, 0.2),
    0 5px 10px rgba(13, 90, 167, 0.16);
}

.auth-modal__tab:focus-visible {
  outline: 3px solid rgba(69, 185, 12, 0.42);
  outline-offset: 2px;
}

.auth-modal__panel label {
  color: #0d5aa7;
}

.auth-modal__panel input {
  border-color: rgba(54, 157, 217, 0.34);
  background: rgba(255, 253, 248, 0.94);
  color: #18314b;
  box-shadow: inset 0 -3px 0 rgba(65, 151, 201, 0.08);
}

.auth-modal__panel input:focus {
  border-color: rgba(13, 90, 167, 0.72);
  box-shadow:
    inset 0 -3px 0 rgba(65, 151, 201, 0.08),
    0 0 0 4px rgba(67, 164, 220, 0.18);
}

.auth-modal__clear-input {
  border-color: rgba(13, 90, 167, 0.34);
  color: #0d5aa7;
}

.auth-modal__clear-input:focus-visible {
  outline-color: rgba(13, 90, 167, 0.3);
}

.auth-modal__check input {
  accent-color: #58c70f;
}

.auth-modal__submit {
  background: linear-gradient(180deg, #98eb24 0%, #45b90c 100%);
  color: #ffffff;
  box-shadow:
    inset 0 -6px 0 rgba(31, 117, 6, 0.3),
    0 12px 22px rgba(21, 94, 136, 0.16);
}

.auth-modal__panel.has-error {
  border-color: rgba(220, 61, 61, 0.74);
  box-shadow:
    inset 0 0 0 5px rgba(67, 164, 220, 0.56),
    0 24px 52px rgba(14, 65, 96, 0.3),
    0 0 0 4px rgba(220, 61, 61, 0.14);
}

.receipts-modal {
  position: absolute;
  inset: 0;
  z-index: 43;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 0;
  isolation: isolate;
  background: rgba(248, 252, 247, 0.26);
  color: #0a335c;
}

.receipts-modal::before,
.receipts-modal::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.receipts-modal::before {
  inset: -22px;
  z-index: 0;
  background: url("https://s3.ru-msk.k2.cloud/spar-online/assets/SPAR%20Online%20%20Mondel%C4%93z%20Danone/background_menu_screen_calm_v5.png") center / cover no-repeat;
  filter: blur(14px) brightness(1.22) saturate(0.82);
  transform: scale(1.07);
}

.receipts-modal::after {
  inset: 0;
  z-index: 0;
  background: rgba(250, 253, 247, 0.28);
}

.receipts-modal__panel {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 40px), 390px);
  height: min(calc(100% - 28px), 730px);
  display: flex;
  flex-direction: column;
  padding: 24px 34px;
  border-radius: 28px;
  background: #ffffff;
  color: #0a335c;
  box-shadow: 0 10px 24px rgba(5, 31, 51, 0.25);
  overflow: hidden;
  isolation: isolate;
}

.receipts-modal__panel > :not(.receipts-modal__close) {
  position: relative;
  z-index: 1;
}

.receipts-modal__close {
  position: absolute;
  right: 15px;
  top: 15px;
  z-index: 2;
  width: 33px;
  height: 33px;
  padding: 0;
  background: transparent;
  cursor: pointer;
  filter: none;
}

.receipts-modal__close img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.receipts-modal__panel h2 {
  width: 100%;
  min-height: 48px;
  display: grid;
  place-items: center;
  margin: 0 0 14px;
  color: #0a7ac9;
  font-size: 28px;
  font-weight: 850;
  line-height: normal;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
  text-shadow: none;
}

.receipts-modal__tabs {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  justify-content: center;
  gap: clamp(12px, calc(var(--stage-w) * 0.042), 18px);
  margin: 0 auto 26px;
  padding: 0 8px;
}

.receipts-modal__tabs button {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 8px 6px;
  border: 1.5px solid #55b4e8;
  border-radius: 999px;
  background: #ffffff;
  color: #18314b;
  font-size: clamp(11px, calc(var(--stage-w) * 0.029), 12.5px);
  font-weight: 650;
  line-height: 17px;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 4px 5px rgba(7, 65, 105, 0.12);
  appearance: none;
}

.receipts-modal__tabs button.is-active {
  border-color: transparent;
  outline: none;
  background: #58c70f;
  color: var(--white);
}

.receipts-modal__tabs button.is-active:focus-visible {
  outline: none;
}

.receipts-modal__list {
  width: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  gap: 10px;
  max-height: none;
  margin: 0 0 18px;
  overflow-y: auto;
  padding: 0;
  scrollbar-width: none;
}

.receipts-modal__list::-webkit-scrollbar {
  display: none;
}

.receipts-modal__list.is-empty {
  flex: 0 0 0;
  margin: 0;
  overflow: hidden;
}

.receipts-modal__row {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px;
  grid-template-rows: 42px;
  gap: 0;
  align-items: center;
  width: 100%;
  min-height: 58px;
  padding: 8px 16px;
  border: 0;
  border-radius: 14px;
  background: #f2f7fc;
  color: #0a335c;
  font-size: 14px;
  line-height: normal;
  text-align: left;
  box-shadow: none;
  cursor: pointer;
  overflow: hidden;
  transition: min-height 0.18s ease;
}

.receipts-modal__row.is-expanded {
  min-height: 144px;
  grid-template-rows: 42px auto;
  align-items: start;
}

.receipts-modal__number {
  min-width: 0;
  align-self: center;
  color: #0a335c;
  font-weight: 700;
}

.receipts-modal__status {
  align-self: center;
  color: #4d637a;
  font-weight: 400;
  text-align: right;
}

.receipts-modal__status--accepted {
  color: #279d31;
}

.receipts-modal__status--rejected {
  color: #dc3d3d;
}

.receipts-modal__details {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  margin-top: 14px;
  color: #0a335c;
  font-weight: 700;
  line-height: 17px;
  overflow-wrap: anywhere;
}

.receipts-modal__reason {
  display: grid;
  gap: 4px;
  margin-bottom: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff0f0;
  color: #b83030;
  font-size: 13px;
  font-weight: 500;
  line-height: 17px;
}

.receipts-modal__reason strong {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.receipts-modal__loading,
.receipts-modal__empty {
  align-self: center;
  margin: 0;
  color: #4d637a;
  font-size: 14px;
  font-weight: 500;
  line-height: normal;
  text-align: center;
  text-shadow: none;
}

.receipts-modal__empty {
  width: 100%;
  min-height: 0;
  flex: 1 1 0;
  display: grid;
  grid-template-rows: auto auto;
  place-items: center;
  align-content: center;
  gap: 10px;
  margin: 0 0 18px;
}

.receipts-modal__empty img {
  display: block;
  width: min(94%, 340px);
  height: auto;
  object-fit: contain;
  opacity: 0.52;
  filter: drop-shadow(0 16px 24px rgba(7, 65, 105, 0.22));
}

.receipts-modal__empty span {
  color: #ffffff;
  font-size: clamp(17px, calc(var(--stage-w) * 0.044), 21px);
  font-weight: 800;
  line-height: 1.15;
  text-shadow: 0 2px 5px rgba(8, 69, 135, 0.38);
}

.receipts-modal__upload {
  width: 180px;
  min-height: 56px;
  flex: 0 0 auto;
  margin: 0 auto;
  padding: 12px 16px;
  border-radius: 999px;
  background: #ffc21d;
  color: #18314b;
  font-size: 16px;
  font-weight: 850;
  line-height: 20px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 5px rgba(7, 65, 105, 0.12);
}

.faq-modal {
  position: absolute;
  inset: 0;
  z-index: 42;
  overflow: hidden;
  padding: clamp(26px, calc(var(--stage-w) * 0.07), 58px) clamp(24px, calc(var(--stage-w) * 0.065), 54px);
  background:
    radial-gradient(circle at 50% 34%, #6fc4ed 0%, #2d94ce 54%, #0d5aa7 100%);
  color: var(--white);
}

.faq-modal__close {
  position: absolute;
  right: clamp(18px, calc(var(--stage-w) * 0.055), 48px);
  top: clamp(18px, calc(var(--stage-w) * 0.052), 44px);
  z-index: 2;
  width: clamp(48px, calc(var(--stage-w) * 0.125), 86px);
  padding: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 10px 14px rgba(10, 66, 106, 0.28));
}

.faq-modal__close img {
  display: block;
  width: 100%;
}

.faq-modal__inner {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: clamp(12px, calc(var(--stage-w) * 0.032), 26px);
  padding-top: clamp(68px, calc(var(--stage-w) * 0.18), 120px);
}

.faq-modal__inner h2 {
  margin: 0;
  color: var(--white);
  font-size: clamp(30px, calc(var(--stage-w) * 0.074), 62px);
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 3px 8px rgba(8, 68, 109, 0.24);
}

.faq-modal__list {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(18px, calc(var(--stage-w) * 0.04), 34px);
  overflow-y: auto;
  padding: 0 0 clamp(32px, calc(var(--stage-w) * 0.09), 72px);
  scrollbar-width: none;
}

.faq-modal__list::-webkit-scrollbar {
  display: none;
}

.faq-modal__item {
  flex: 0 0 auto;
  border: 3px solid #43a4dc;
  border-radius: clamp(24px, calc(var(--stage-w) * 0.064), 48px);
  background: linear-gradient(180deg, #fffdf8 0%, #fff1dc 100%);
  color: #0d5aa7;
  box-shadow:
    inset 0 -3px 0 rgba(24, 129, 194, 0.08),
    0 8px 18px rgba(8, 68, 109, 0.16);
  overflow: hidden;
}

.faq-modal__question {
  width: 100%;
  min-height: clamp(58px, calc(var(--stage-w) * 0.135), 104px);
  display: grid;
  grid-template-columns: 1fr clamp(34px, calc(var(--stage-w) * 0.082), 62px);
  gap: clamp(14px, calc(var(--stage-w) * 0.038), 30px);
  align-items: center;
  padding: clamp(12px, calc(var(--stage-w) * 0.03), 24px) clamp(16px, calc(var(--stage-w) * 0.04), 34px);
  background: transparent;
  color: inherit;
  font-size: clamp(15px, calc(var(--stage-w) * 0.037), 30px);
  font-weight: 720;
  line-height: 1.14;
  letter-spacing: 0;
  text-align: left;
  cursor: pointer;
}

.faq-modal__question span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.faq-modal__plus {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #0d5aa7;
  box-shadow: inset 0 -2px 0 rgba(4, 54, 101, 0.24);
}

.faq-modal__plus::before,
.faq-modal__plus::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54%;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  transform: translate(-50%, -50%);
}

.faq-modal__plus::after {
  transform: translate(-50%, -50%) rotate(90deg);
  transition: opacity 0.16s ease;
}

.faq-modal__item.is-open .faq-modal__plus::after {
  opacity: 0;
}

.faq-modal__answer {
  padding: 0 clamp(18px, calc(var(--stage-w) * 0.05), 40px) clamp(18px, calc(var(--stage-w) * 0.05), 38px);
  color: #3f657e;
  font-size: clamp(13px, calc(var(--stage-w) * 0.032), 26px);
  font-weight: 700;
  line-height: 1.28;
}

.faq-modal__answer p {
  margin: 0;
}

.rewards-modal {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: clamp(18px, calc(var(--stage-w) * 0.045), 28px);
  isolation: isolate;
  background: rgba(248, 252, 247, 0.26);
  color: #17304f;
}

.rewards-modal::before,
.rewards-modal::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.rewards-modal::before {
  inset: -22px;
  z-index: 0;
  background: url("https://s3.ru-msk.k2.cloud/spar-online/assets/SPAR%20Online%20%20Mondel%C4%93z%20Danone/background_menu_screen_calm_v5.png") center / cover no-repeat;
  filter: blur(14px) brightness(1.22) saturate(0.82);
  transform: scale(1.07);
}

.rewards-modal::after {
  inset: 0;
  z-index: 0;
  background: rgba(250, 253, 247, 0.28);
}

.rewards-modal__panel {
  position: relative;
  z-index: 1;
  width: min(90%, 370px);
  height: auto;
  max-height: min(90%, 780px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 14px 16px 16px;
  border-radius: 24px;
  background: #ffffff;
  color: #17304f;
  box-shadow: 0 16px 34px rgba(7, 31, 61, 0.2);
  overflow: hidden;
}

.rewards-modal__close {
  position: absolute;
  right: 11px;
  top: 11px;
  z-index: 2;
  width: 33px;
  height: 33px;
  padding: 0;
  background: transparent;
  cursor: pointer;
  filter: none;
  box-shadow: none;
}

.rewards-modal__close img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.rewards-modal__panel h2 {
  min-height: 32px;
  display: grid;
  place-items: center;
  margin: 0 0 10px;
  padding: 0 34px;
  color: #2c78b9;
  font-size: clamp(23px, calc(var(--stage-w) * 0.061), 29px);
  font-weight: 850;
  line-height: 1.12;
  text-align: center;
  text-shadow: none;
}

.rewards-modal__banner {
  position: relative;
  width: 100%;
  min-height: 58px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  margin: 0 0 10px;
  overflow: hidden;
  border: 2px dashed rgba(44, 120, 185, 0.3);
  border-radius: 14px;
  background:
    radial-gradient(circle at 18% 25%, rgba(255, 255, 255, 0.72), transparent 30%),
    linear-gradient(135deg, #eaf7ff 0%, #edf9ef 55%, #fff2cf 100%);
  color: #64809a;
}

.rewards-modal__banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rewards-modal__banner img[hidden] {
  display: none;
}

.rewards-modal__banner span {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.rewards-modal__tabs {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 8px;
}

.rewards-modal__tabs button {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  display: grid;
  place-items: center;
  padding: 8px 6px;
  border: 0;
  border-radius: 999px;
  background: #eef3f7;
  color: #18314b;
  font-size: clamp(11px, calc(var(--stage-w) * 0.029), 12.5px);
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  cursor: pointer;
  box-shadow: none;
  appearance: none;
}

.rewards-modal__tabs button.is-active {
  background: #58c70f;
  color: var(--white);
  box-shadow: 0 4px 8px rgba(52, 145, 29, 0.2);
}

.rewards-modal__tabs button:focus {
  outline: none;
}

.rewards-modal__tabs button:focus-visible {
  filter: brightness(0.96);
  box-shadow: 0 5px 10px rgba(24, 49, 75, 0.18);
}

.rewards-modal__available-panel {
  flex: 0 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.rewards-modal__source-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 8px;
}

.rewards-modal__source-tabs button {
  min-width: 0;
  min-height: 36px;
  padding: 8px 6px;
  border: 1px solid #c6dae9;
  border-radius: 999px;
  background: #f4f7fb;
  color: #4d637a;
  font-size: clamp(10px, calc(var(--stage-w) * 0.027), 12px);
  font-weight: 700;
  line-height: 15px;
  cursor: pointer;
}

.rewards-modal__source-tabs button.is-active {
  border-color: #2f68b2;
  background: #2f68b2;
  color: #ffffff;
  box-shadow: 0 4px 7px rgba(35, 92, 159, 0.18);
}

.rewards-modal__empty {
  min-height: 160px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 22px 18px;
  border: 0;
  border-radius: 14px;
  background: #f2f7fc;
  color: #17304f;
  text-align: center;
  box-shadow: none;
}

.rewards-modal__empty strong {
  color: #17304f;
  font-size: clamp(14px, calc(var(--stage-w) * 0.036), 17px);
  font-weight: 800;
  line-height: 1.2;
}

.rewards-modal__empty p {
  max-width: 92%;
  margin: 0;
  color: #5f7083;
  font-size: clamp(11px, calc(var(--stage-w) * 0.028), 13px);
  font-weight: 500;
  line-height: 1.35;
}

.rewards-modal__empty--raffle img {
  width: 48px;
  height: auto;
  object-fit: contain;
}

.rewards-modal__list {
  width: 100%;
  flex: 0 1 auto;
  min-height: 0;
  max-height: 560px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 2px 2px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.rewards-modal__list::-webkit-scrollbar {
  display: none;
}

.rewards-prize-card {
  flex: 0 0 auto;
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 12px;
  border: 0;
  border-radius: 14px;
  background: #f2f7fc;
  color: #17304f;
  text-align: center;
  box-shadow: none;
}

.rewards-prize-card--social {
  position: relative;
  grid-template-columns: 52px minmax(0, 1fr);
  justify-items: stretch;
  align-items: center;
  gap: 13px;
  min-height: 88px;
  padding: 12px 14px;
  border: 2px solid #58c70f;
  background: linear-gradient(135deg, #f1fce9 0%, #eaf8f0 48%, #e8f5ff 100%);
  text-align: left;
  box-shadow: 0 7px 14px rgba(52, 145, 29, 0.16);
}

.rewards-prize-card__social-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 5px 10px rgba(44, 117, 25, 0.16);
}

.rewards-prize-card__social-icon img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.rewards-prize-card__social-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.rewards-prize-card__social-copy span {
  width: max-content;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  background: #58c70f;
  color: #ffffff;
  font-size: 9px;
  font-weight: 850;
  line-height: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rewards-prize-card__social-copy strong {
  color: #17304f;
  font-size: clamp(15px, calc(var(--stage-w) * 0.039), 18px);
  font-weight: 850;
  line-height: 1.15;
}

.rewards-prize-card__social-copy small {
  color: #2f8e27;
  font-size: clamp(12px, calc(var(--stage-w) * 0.031), 14px);
  font-weight: 800;
  line-height: 1.2;
}

.rewards-prize-card__header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.rewards-prize-card__header span,
.rewards-prize-card__eyebrow {
  color: #4d7397;
  font-size: clamp(10px, calc(var(--stage-w) * 0.026), 12px);
  font-weight: 800;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.rewards-prize-card__header small {
  padding: 5px 9px;
  border-radius: 999px;
  background: #e9f6df;
  color: #36822f;
  font-size: clamp(9px, calc(var(--stage-w) * 0.023), 11px);
  font-weight: 800;
}

.rewards-prize-card__image-placeholder {
  width: 100%;
  min-height: 114px;
  display: grid;
  place-content: center;
  gap: 5px;
  padding: 14px;
  border: 1.5px dashed #a9c5df;
  border-radius: 12px;
  background: #ffffff;
  color: #2f68b2;
}

.rewards-prize-card__image-placeholder span {
  font-size: clamp(12px, calc(var(--stage-w) * 0.031), 14px);
  font-weight: 800;
  line-height: 1.2;
}

.rewards-prize-card__image-placeholder small {
  color: #6d8093;
  font-size: clamp(9px, calc(var(--stage-w) * 0.023), 11px);
  font-weight: 500;
  line-height: 1.3;
}

.rewards-prize-card__image-frame {
  width: 100%;
  height: clamp(112px, calc(var(--stage-w) * 0.3), 136px);
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}

.rewards-prize-card__image-frame .rewards-prize-card__image {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  object-position: center;
}

.rewards-prize-card__image {
  width: min(78%, 240px);
  max-height: 180px;
  object-fit: contain;
}

.rewards-prize-card > strong {
  color: #17304f;
  font-size: clamp(18px, calc(var(--stage-w) * 0.046), 22px);
  font-weight: 850;
  line-height: 1.12;
}

.rewards-prize-card > p {
  max-width: 96%;
  margin: 0;
  color: #5f7083;
  font-size: clamp(11px, calc(var(--stage-w) * 0.029), 13px);
  font-weight: 500;
  line-height: 1.35;
  white-space: pre-line;
}

.rewards-prize-card > small,
.rewards-prize-card > time {
  color: #4d7397;
  font-size: clamp(10px, calc(var(--stage-w) * 0.026), 12px);
  font-weight: 650;
  line-height: 1.3;
}

.rewards-prize-card > time {
  min-width: 18ch;
  text-align: center;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.015em;
}

.rewards-prize-card__bonus {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid #dbe6ee;
  color: #2f68b2;
  font-size: clamp(11px, calc(var(--stage-w) * 0.028), 13px);
  font-weight: 650;
}

.rewards-prize-card__bonus img {
  width: 30px;
  aspect-ratio: 1;
  object-fit: contain;
}

.rewards-prize-card__bonus strong {
  color: #17304f;
  font-weight: 850;
}

.rewards-prize-card__code {
  width: 100%;
  min-height: 62px;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 8px 14px;
  border: 2px dashed #8eb7d8;
  border-radius: 12px;
  background: #ffffff;
  color: #17304f;
  cursor: pointer;
}

.rewards-prize-card__code > span {
  font-size: clamp(17px, calc(var(--stage-w) * 0.044), 20px);
  font-weight: 850;
  letter-spacing: 0.08em;
}

.rewards-prize-card__code > small {
  color: #5f7083;
  font-size: clamp(9px, calc(var(--stage-w) * 0.023), 11px);
  font-weight: 600;
}

.rewards-prize-card__code.is-copied {
  border-style: solid;
  border-color: #65a73e;
  background: #eef9e8;
}

.rewards-prize-card.is-expired {
  opacity: 0.66;
  filter: grayscale(0.26);
}

.rewards-prize-card.is-expired .rewards-prize-card__header small {
  background: #e7f1f7;
  color: #52758e;
}

.rewards-prize-card__code:disabled {
  cursor: default;
}

@media (max-height: 720px) {
  .rewards-modal__panel {
    height: auto;
    max-height: calc(100% - 24px);
    padding: 16px 18px;
  }

  .rewards-modal__panel h2 {
    min-height: 30px;
    margin-bottom: 9px;
    font-size: 22px;
  }

  .rewards-modal__tabs,
  .rewards-modal__source-tabs {
    margin-bottom: 8px;
  }

  .rewards-modal__tabs button {
    min-height: 38px;
  }

  .rewards-modal__source-tabs button {
    min-height: 34px;
  }

  .rewards-prize-card {
    padding: 12px;
    gap: 5px;
  }

  .rewards-prize-card--social {
    grid-template-columns: 46px minmax(0, 1fr);
    min-height: 80px;
    gap: 10px;
    padding: 12px 14px;
  }

  .rewards-prize-card__social-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .rewards-prize-card__social-icon img {
    width: 38px;
    height: 38px;
  }

  .rewards-prize-card__image-placeholder {
    min-height: 82px;
  }

  .rewards-prize-card__image-frame {
    height: 108px;
  }

  .rewards-prize-card__image {
    max-height: 120px;
  }
}

/* Unified prize catalog: game rewards first, raffle rewards second. */
.rewards-modal__section-heading {
  flex: 0 0 auto;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 4px 5px;
  color: #17304f;
}

.rewards-modal__section-heading:first-child {
  padding-top: 5px;
}

.rewards-modal__section-heading--raffle {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 4px;
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid #dce7ef;
}

.rewards-modal__section-heading--raffle small {
  max-width: none;
  padding-left: 0;
  text-align: left;
}

.rewards-modal__section-heading span {
  font-size: clamp(19px, calc(var(--stage-w) * 0.049), 23px);
  font-weight: 900;
  line-height: 1.1;
}

.rewards-modal__section-heading small {
  max-width: 48%;
  color: #61778b;
  font-size: clamp(9px, calc(var(--stage-w) * 0.023), 11px);
  font-weight: 650;
  line-height: 1.2;
  text-align: right;
}

.rewards-modal__panel .rewards-prize-card--compact {
  grid-template-columns: 66px minmax(0, 1fr);
  justify-items: stretch;
  align-items: center;
  gap: 12px;
  min-height: 98px;
  padding: 12px;
  border-width: 1.5px;
  border-radius: 18px;
  text-align: left;
}

.rewards-prize-card__discount,
.rewards-prize-card__raffle-mark {
  width: 66px;
  min-height: 66px;
  display: grid;
  place-items: center;
  padding: 5px;
  border-radius: 18px;
  background: linear-gradient(145deg, #ff3838, #df0707);
  color: #ffffff;
  font-size: 20px;
  font-weight: 950;
  line-height: 1;
  text-align: center;
  transform: rotate(-3deg);
  box-shadow: 0 6px 12px rgba(195, 25, 25, 0.2);
}

.rewards-prize-card__copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.rewards-prize-card__copy strong {
  color: #17304f;
  font-size: clamp(15px, calc(var(--stage-w) * 0.038), 18px);
  font-weight: 900;
  line-height: 1.12;
}

.rewards-prize-card__copy p,
.rewards-prize-card__copy small {
  margin: 0;
  font-size: clamp(10px, calc(var(--stage-w) * 0.025), 12px);
  line-height: 1.28;
}

.rewards-prize-card__copy p {
  color: #5f7083;
  font-weight: 550;
}

.rewards-prize-card__copy small {
  color: #2f8e27;
  font-weight: 800;
}

.rewards-modal__panel .rewards-prize-card--raffle.rewards-prize-card--compact {
  border-color: rgba(37, 111, 70, 0.26);
  background: linear-gradient(135deg, #f7fbff 0%, #edf8ef 100%);
}

.rewards-prize-card__raffle-mark {
  background: linear-gradient(145deg, #3aae58, #16833d);
  font-size: 20px;
  transform: none;
  box-shadow: 0 6px 12px rgba(20, 120, 55, 0.18);
}

.rewards-prize-card--grand .rewards-prize-card__raffle-mark {
  background: linear-gradient(145deg, #ffc82e, #ed9d05);
  color: #17304f;
  font-size: 11px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.rewards-prize-card--raffle .rewards-prize-card__copy small {
  color: #337153;
  font-size: 9px;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

@media (max-width: 380px) {
  .rewards-modal__panel .rewards-prize-card--compact {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
  }

  .rewards-prize-card__discount,
  .rewards-prize-card__raffle-mark {
    width: 58px;
    min-height: 58px;
    border-radius: 16px;
    font-size: 18px;
  }
}

@keyframes rewardBalancePulse {
  0%,
  100% {
    transform: scale(1);
  }
  55% {
    transform: scale(1.08);
  }
}

@media (max-height: 720px) {
  .game-title {
    top: 12.2%;
  }

  .card-grid {
    top: 23.3%;
    left: 9.8%;
    right: 9.8%;
  }

  .game-progress {
    bottom: 1%;
    width: 62%;
    left: 19%;
  }
}

@media (max-width: 380px) {
  .menu-balance {
    left: 35.2%;
    right: 4.4%;
    gap: 3.2%;
  }

  .menu-balance__item strong {
    font-size: clamp(12px, calc(var(--stage-w) * 0.034), 22px);
  }

  .game-hud .game-balance {
    left: 38%;
    right: 0;
  }

  .game-progress {
    left: 16%;
    width: 68%;
  }
}

@keyframes scoreGain {
  0% {
    opacity: 0;
    transform: translateY(22%) scale(0.86);
  }
  22% {
    opacity: 1;
    transform: translateY(0) scale(1.08);
  }
  72% {
    opacity: 1;
    transform: translateY(-18%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-48%) scale(0.96);
  }
}

@keyframes loadingExit {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(1.035);
  }
}

@keyframes loaderDot {
  0%,
  20%,
  100% {
    opacity: 0.32;
    transform: translateY(0);
  }
  42% {
    opacity: 1;
    transform: translateY(-0.13em);
  }
}

@keyframes gameEnter {
  from {
    opacity: 0;
    transform: scale(1.025);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

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

.win-dialog__close,
.ticket-shop__close,
.heart-shop__close,
.account-modal__close,
.referral-modal__close,
.receipt-modal__close {
  position: absolute;
  top: calc(var(--stage-w) * -0.045);
  right: calc(var(--stage-w) * -0.035);
  z-index: 10;
  width: clamp(50px, calc(var(--stage-w) * 0.14), 92px);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 8px 12px rgba(7, 65, 105, 0.24));
}

.win-dialog__close img,
.ticket-shop__close img,
.heart-shop__close img,
.account-modal__close img,
.referral-modal__close img,
.receipt-modal__close img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.win-dialog__close {
  top: 11px;
  right: 11px;
  width: 33px;
  height: 33px;
  filter: none;
  box-shadow: none;
}

.pause-dialog__resume.text-button {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-inline: auto;
  white-space: nowrap;
  text-align: center;
  line-height: 1;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }

  .loader__dot {
    opacity: 1;
    transform: none;
    animation: none !important;
  }
}

/* Page 5 design transfer: authentication and account. */
.auth-modal,
.account-modal {
  padding: clamp(18px, calc(var(--stage-w) * 0.045), 28px);
  background: #1d416d;
  backdrop-filter: none;
}

.account-modal {
  isolation: isolate;
  overflow: hidden;
  background: rgba(248, 252, 247, 0.26);
}

.account-modal::before,
.account-modal::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.account-modal::before {
  inset: -22px;
  z-index: 0;
  background: url("https://s3.ru-msk.k2.cloud/spar-online/assets/SPAR%20Online%20%20Mondel%C4%93z%20Danone/background_menu_screen_calm_v5.png") center / cover no-repeat;
  filter: blur(14px) brightness(1.22) saturate(0.82);
  transform: scale(1.07);
}

.account-modal::after {
  inset: 0;
  z-index: 0;
  background: rgba(250, 253, 247, 0.28);
}

.account-modal__panel {
  z-index: 1;
}

.auth-modal__panel,
.account-modal__panel {
  width: min(90%, 370px);
  border: 0;
  border-radius: 24px;
  background: #ffffff;
  color: #17304f;
  box-shadow: 0 16px 34px rgba(7, 31, 61, 0.2);
  scrollbar-width: thin;
  scrollbar-color: rgba(49, 111, 179, 0.34) transparent;
}

.auth-modal__panel {
  max-height: 88%;
  padding: clamp(24px, calc(var(--stage-w) * 0.064), 32px)
    clamp(20px, calc(var(--stage-w) * 0.055), 28px)
    clamp(20px, calc(var(--stage-w) * 0.052), 26px);
}

.auth-modal__panel h2,
.account-modal__panel h2 {
  margin: 0 0 14px;
  padding: 0;
  background: transparent;
  color: #2c78b9;
  font-size: clamp(23px, calc(var(--stage-w) * 0.061), 29px);
  font-weight: 850;
  line-height: 1.12;
  text-shadow: none;
  box-shadow: none;
}

.auth-modal__tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.auth-modal__tab {
  min-height: 42px;
  padding: 8px 12px;
  border: 1.5px solid #65add7;
  border-radius: 999px;
  background: #ffffff;
  color: #17304f;
  font-size: clamp(11px, calc(var(--stage-w) * 0.028), 13px);
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 4px 9px rgba(33, 91, 143, 0.1);
}

.auth-modal__tab.is-active {
  border-color: #2f68b2;
  background: #2f68b2;
  color: #ffffff;
  box-shadow: 0 5px 10px rgba(35, 92, 159, 0.22);
}

.auth-modal__tab:focus-visible {
  outline: 3px solid rgba(255, 196, 60, 0.48);
  outline-offset: 2px;
}

.auth-modal__panel label {
  gap: 5px;
  margin-bottom: 10px;
  color: #253c59;
  font-size: clamp(10px, calc(var(--stage-w) * 0.025), 12px);
  font-weight: 600;
  line-height: 1.15;
}

.auth-modal__field-title--regular,
.auth-modal__panel .auth-modal__check > span {
  font-weight: 400;
}

.auth-modal__panel input {
  min-height: 42px;
  padding: 0 12px;
  border: 1.5px solid #a4c9dc;
  border-radius: 6px;
  background: #ffffff;
  color: #17304f;
  font-size: 16px;
  font-weight: 500;
  box-shadow: none;
}

/* Mobile Safari zooms the page when a text control smaller than 16px receives
   focus. Keep editable controls at the native-safe size without disabling the
   user's ability to zoom the page. */
@media (max-width: 768px) {
  input[type="text"],
  input[type="tel"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="search"],
  input[type="date"],
  input[type="time"],
  textarea,
  select {
    font-size: 16px;
  }
}

.auth-modal__panel input::placeholder {
  color: #71849b;
  opacity: 1;
}

.auth-modal__input-wrap > input {
  padding-right: 40px;
}

.auth-modal__panel input:focus {
  border-color: #4b91c3;
  box-shadow: 0 0 0 3px rgba(76, 148, 196, 0.15);
}

.auth-modal__clear-input {
  right: 9px;
  width: 24px;
  height: 24px;
  border: 0;
  background: #eaf4fa;
  color: #4b91c3;
  font-size: 17px;
}

.auth-modal__panel .auth-modal__check {
  grid-template-columns: 17px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  font-size: clamp(9px, calc(var(--stage-w) * 0.023), 11px);
  line-height: 1.28;
}

.auth-modal__panel .auth-modal__check > span {
  display: flex;
  align-items: center;
  min-height: 17px;
}

.auth-modal__check input {
  width: 17px;
  min-height: 17px;
  border-radius: 4px;
  accent-color: #58c70f;
}

.auth-modal__panel .auth-modal__error {
  min-height: 16px;
  margin: 2px 0 8px !important;
  color: #bb3c3c !important;
  font-size: clamp(10px, calc(var(--stage-w) * 0.025), 12px) !important;
  font-weight: 500;
  line-height: 1.25;
}

.auth-modal__submit {
  width: min(68%, 230px);
  min-height: 44px;
  padding: 9px 16px;
  border-radius: 999px;
  background: #ffc443;
  color: #17304f;
  font-size: clamp(13px, calc(var(--stage-w) * 0.033), 15px);
  font-weight: 850;
  box-shadow: 0 5px 10px rgba(218, 151, 21, 0.2);
}

.auth-modal__submit:hover {
  transform: translateY(-1px);
}

.auth-modal__panel.has-error {
  border: 2px solid rgba(190, 55, 55, 0.72);
  box-shadow: 0 16px 34px rgba(7, 31, 61, 0.2), 0 0 0 4px rgba(190, 55, 55, 0.1);
}

.auth-modal__panel input.is-invalid {
  border-color: #ca5656;
  background: #fffafa;
  box-shadow: 0 0 0 3px rgba(202, 86, 86, 0.12);
}

.account-modal__panel {
  max-height: 90%;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: clamp(22px, calc(var(--stage-w) * 0.058), 28px)
    clamp(18px, calc(var(--stage-w) * 0.048), 24px)
    clamp(18px, calc(var(--stage-w) * 0.048), 24px);
}

.account-modal__panel::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.account-modal__panel h2 {
  margin-bottom: 12px;
}

.account-modal__close {
  top: 11px;
  right: 11px;
  width: 33px;
  height: 33px;
  border-radius: 50%;
  background: transparent;
  filter: none;
  box-shadow: none;
}

.account-modal__help {
  position: absolute;
  top: 11px;
  left: 11px;
  z-index: 3;
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #45a9df;
  color: #ffffff;
  font-size: 22px;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
  box-shadow: inset 0 -2px 0 rgba(13, 90, 167, 0.22), 0 4px 9px rgba(35, 78, 118, 0.18);
}

.account-modal__help:hover {
  filter: brightness(1.04);
}

.account-modal__help:focus-visible {
  outline: 3px solid rgba(69, 169, 223, 0.3);
  outline-offset: 3px;
}

.account-modal__close::before {
  content: none;
}

.account-modal__close img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.account-modal__profile {
  width: 100%;
  margin: 0 0 12px;
  column-gap: 12px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.account-modal__avatar {
  width: 72px;
  border: 0;
  background: #dff2fc;
  box-shadow: none;
  overflow: hidden;
}

.account-modal__avatar img {
  object-fit: contain;
}

.account-modal__avatar-edit {
  top: 44px;
  right: calc(50% - 45px);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  opacity: 1;
  box-shadow: 0 3px 9px rgba(35, 78, 118, 0.18);
}

.account-modal__avatar-edit img {
  width: 14px;
  height: 14px;
}

.account-modal__avatar-edit:hover,
.account-modal__avatar-edit[aria-expanded="true"] {
  opacity: 1;
  transform: translateY(-1px);
}

.account-modal__profile strong {
  color: #17304f;
  font-size: clamp(16px, calc(var(--stage-w) * 0.041), 19px);
  font-weight: 850;
}

.account-modal__avatars {
  margin-top: 6px;
  padding-top: 10px;
  border-top-color: #e4edf4;
}

.account-modal__stats {
  width: 100%;
  display: grid;
  gap: 7px;
  margin-bottom: 7px;
}

.account-modal__stat,
.account-modal__toggle {
  width: 100%;
  min-height: 42px;
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 9px 13px;
  border: 0;
  border-radius: 10px;
  background: #f4f7fb;
  color: #17304f;
  font-size: clamp(11px, calc(var(--stage-w) * 0.028), 13px);
  font-weight: 700;
  line-height: 1.15;
  text-align: left;
  box-shadow: none;
}

.account-modal__stat strong {
  max-width: 185px;
  overflow: hidden;
  color: #6a7788;
  font-size: inherit;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-modal__stat--email {
  align-items: start;
}

.account-modal__stat--email strong {
  max-width: 210px;
  overflow: visible;
  overflow-wrap: anywhere;
  line-height: 1.2;
  text-align: right;
  text-overflow: clip;
  white-space: normal;
}

.account-modal__stat--referral {
  cursor: pointer;
  transition: background-color 180ms ease, box-shadow 180ms ease;
}

.account-modal__referral-value {
  display: grid;
  justify-items: end;
  gap: 2px;
  text-align: right;
}

.account-modal__stat--referral .account-modal__referral-value strong {
  max-width: 210px;
  color: #6a7788;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.account-modal__referral-value small {
  color: #7b8795;
  font-size: 9px;
  font-weight: 500;
  line-height: 1.1;
}

@media (max-width: 380px) {
  .account-modal__stat--referral {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 6px;
  }

  .account-modal__referral-value,
  .account-modal__stat--referral .account-modal__referral-value strong {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }

  .account-modal__referral-value small {
    font-size: 8px;
    white-space: nowrap;
  }
}

.account-modal__stat--referral.is-copied {
  background: #eff9eb;
  box-shadow: inset 0 0 0 2px #58a43c;
}

.account-modal__stat--referral.is-copied .account-modal__referral-value strong,
.account-modal__stat--referral.is-copied .account-modal__referral-value small {
  color: #58a43c;
}

.account-modal__stat--referral.has-copy-error {
  background: #fff0f0;
  box-shadow: inset 0 0 0 2px #c54b4b;
}

.account-modal__stat--referral.has-copy-error .account-modal__referral-value small {
  color: #b83030;
}

.account-modal__stat--referral:focus-visible {
  outline: 3px solid rgba(13, 90, 167, 0.24);
  outline-offset: 2px;
}

.account-modal__toggle {
  margin-bottom: 14px;
  cursor: pointer;
}

.account-modal .account-modal__switch {
  width: 42px;
  height: 22px;
  border: 0;
  background: #bdc9d3;
  box-shadow: none;
}

.account-modal .account-modal__switch::after {
  left: 3px;
  width: 16px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(18, 50, 79, 0.2);
}

.account-modal__toggle input:checked + .account-modal__switch {
  background: #57bd55;
  box-shadow: none;
}

.account-modal__toggle input:checked + .account-modal__switch::after {
  left: 23px;
}

.account-modal__operations,
.account-modal__receipts,
.account-modal__logout {
  width: min(78%, 280px);
  min-height: 44px;
  margin: 0 auto 10px;
  padding: 9px 12px;
  border-radius: 999px;
  font-size: clamp(11px, calc(var(--stage-w) * 0.029), 14px);
  font-weight: 850;
  line-height: 1.08;
  white-space: normal;
  overflow-wrap: anywhere;
}

.account-modal__operations {
  background: #58c70f;
  color: #ffffff;
  box-shadow: 0 5px 10px rgba(65, 153, 12, 0.2);
}

.account-modal__receipts {
  background: #ffc443;
  color: #17304f;
  box-shadow: 0 5px 10px rgba(218, 151, 21, 0.18);
}

/* Player balance operations: full-screen account history. */
.operations-modal {
  position: absolute;
  inset: 0;
  z-index: 36;
  display: grid;
  place-items: stretch;
  background: #ffffff;
  color: #17304f;
}

.operations-modal__panel {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 58px 20px 24px;
  overflow: hidden;
  background: #ffffff;
}

.operations-modal__close {
  position: absolute;
  top: 11px;
  right: 11px;
  width: 33px;
  height: 33px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.operations-modal__close img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.operations-modal__panel h2 {
  margin: 0 42px 8px;
  color: #2c78b9;
  font-size: clamp(25px, calc(var(--stage-w) * 0.066), 31px);
  font-weight: 850;
  line-height: 1.08;
  text-align: center;
}

.operations-modal__retention {
  margin: 0 12px 16px;
  color: #718096;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.25;
  text-align: center;
}

.operations-modal__tabs {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 18px;
}

.operations-modal__tabs button {
  min-width: 0;
  min-height: 44px;
  padding: 8px 5px;
  border: 2px solid #55b4e8;
  border-radius: 999px;
  background: #ffffff;
  color: #17304f;
  font-size: clamp(9px, calc(var(--stage-w) * 0.025), 12px);
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.operations-modal__tabs button.is-active {
  border-color: transparent;
  outline: none;
  background: #58c70f;
  color: #ffffff;
  box-shadow: 0 4px 9px rgba(65, 153, 12, 0.18);
}

.operations-modal__tabs button:focus-visible {
  outline: 3px solid rgba(88, 199, 15, 0.35);
  outline-offset: 2px;
}

.operations-modal__tabs button.is-active:focus-visible {
  outline: none;
}

.operations-modal__list {
  min-height: 0;
  flex: 1 1 auto;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 2px 0 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.operations-modal__list::-webkit-scrollbar {
  display: none;
}

.operations-modal__list.is-empty {
  display: none;
}

.operations-modal__row {
  display: grid;
  gap: 7px;
  padding: 14px 15px;
  border-left: 4px solid transparent;
  border-radius: 14px;
  background: #f4f7fb;
  text-align: left;
}

.operations-modal__row--add {
  border-left-color: #58c70f;
}

.operations-modal__row--subtract {
  border-left-color: #ef4c4c;
}

.operations-modal__row--mixed {
  border-left-color: #55b4e8;
}

.operations-modal__row-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.operations-modal__row-header strong {
  color: #17304f;
  font-size: 15px;
  font-weight: 850;
}

.operations-modal__row--add .operations-modal__row-header strong {
  color: #2d9d2d;
}

.operations-modal__row--subtract .operations-modal__row-header strong {
  color: #e13f3f;
}

.operations-modal__row--mixed .operations-modal__row-header strong {
  color: #2c78b9;
}

.operations-modal__row--receipt-accepted {
  border-left-color: #58c70f;
}

.operations-modal__row--receipt-accepted .operations-modal__row-header strong {
  color: #279d31;
}

.operations-modal__row--receipt-rejected {
  border-left-color: #ef4c4c;
}

.operations-modal__row--receipt-rejected .operations-modal__row-header strong {
  color: #e13f3f;
}

.operations-modal__row-header time {
  flex: 0 0 auto;
  color: #718096;
  font-size: 9px;
  font-weight: 600;
}

.operations-modal__source {
  color: #718096;
  font-size: 10px;
  font-weight: 600;
}

.operations-modal__values {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.operations-modal__values span {
  padding: 6px 9px;
  border-radius: 999px;
  background: #ffffff;
  color: #17304f;
  font-size: 11px;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px #dce6ee;
}

.operations-modal__values .operations-modal__value--positive {
  color: #2d8d2d;
}

.operations-modal__values .operations-modal__value--negative {
  color: #d43c3c;
}

.operations-modal__empty,
.operations-modal__loading {
  margin: auto;
  color: #718096;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.operations-modal__empty {
  flex: 1 1 auto;
  display: grid;
  place-items: center;
}

.account-modal__logout {
  background: #2f68b2;
  color: #ffffff;
  box-shadow: 0 5px 10px rgba(35, 92, 159, 0.2);
}

.account-modal__links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 2px;
}

.account-modal__faq,
.account-modal__rules {
  width: auto;
  min-height: 28px;
  margin: 0;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: #4d7397;
  font-size: clamp(10px, calc(var(--stage-w) * 0.025), 12px);
  font-weight: 500;
  line-height: 1.1;
  text-decoration: underline;
  text-underline-offset: 3px;
  box-shadow: none;
  cursor: pointer;
}

.account-modal__faq:disabled {
  opacity: 0.5;
}

.account-modal__signout {
  width: auto;
  min-height: 28px;
  margin: 2px auto 0;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: #8a5261;
  font-size: clamp(10px, calc(var(--stage-w) * 0.025), 12px);
  font-weight: 600;
  line-height: 1.1;
  text-decoration: underline;
  text-underline-offset: 3px;
  box-shadow: none;
  cursor: pointer;
}

.account-modal__signout:hover {
  color: #683946;
}

.account-modal__signout:focus-visible {
  outline: 3px solid rgba(13, 90, 167, 0.22);
  outline-offset: 2px;
  border-radius: 6px;
}

/* FAQ refresh: follows the Page 5 account modal styling. */
.faq-modal {
  display: grid;
  place-items: center;
  padding: clamp(18px, calc(var(--stage-w) * 0.045), 28px);
  isolation: isolate;
  background: rgba(248, 252, 247, 0.26);
  color: #17304f;
}

.faq-modal::before,
.faq-modal::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.faq-modal::before {
  inset: -22px;
  z-index: 0;
  background: url("https://s3.ru-msk.k2.cloud/spar-online/assets/SPAR%20Online%20%20Mondel%C4%93z%20Danone/background_menu_screen_calm_v5.png") center / cover no-repeat;
  filter: blur(14px) brightness(1.22) saturate(0.82);
  transform: scale(1.07);
}

.faq-modal::after {
  inset: 0;
  z-index: 0;
  background: rgba(250, 253, 247, 0.28);
}

.faq-modal__inner {
  position: relative;
  z-index: 1;
  width: min(90%, 370px);
  height: min(90%, 730px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: clamp(22px, calc(var(--stage-w) * 0.058), 28px)
    clamp(18px, calc(var(--stage-w) * 0.048), 24px)
    clamp(18px, calc(var(--stage-w) * 0.048), 24px);
  border: 0;
  border-radius: 24px;
  background: #ffffff;
  color: #17304f;
  box-shadow: 0 16px 34px rgba(7, 31, 61, 0.2);
  overflow: hidden;
}

.faq-modal__close {
  right: 11px;
  top: 11px;
  width: 33px;
  height: 33px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  filter: none;
  box-shadow: none;
}

.faq-modal__close img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.faq-modal__inner h2 {
  flex: 0 0 auto;
  min-height: 33px;
  margin: 0 0 14px;
  padding: 0 30px;
  display: grid;
  place-items: center;
  color: #2c78b9;
  font-size: clamp(20px, calc(var(--stage-w) * 0.054), 26px);
  font-weight: 850;
  line-height: 1.12;
  text-align: center;
  white-space: nowrap;
  text-shadow: none;
}

.faq-modal__list {
  min-height: 0;
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 2px 2px;
  scrollbar-width: none;
}

.faq-modal__rules {
  width: min(240px, 100%);
  min-height: 56px;
  flex: 0 0 auto;
  margin: 14px auto 0;
  padding: 12px 20px;
  font-size: 15px;
  white-space: nowrap;
}

.faq-modal__rules-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: promotion-rule;
}

.faq-modal__rules-list li {
  position: relative;
  min-height: 56px;
  padding: 13px 14px 13px 48px;
  border-radius: 12px;
  background: #f4f7fb;
  color: #465f78;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  counter-increment: promotion-rule;
}

.faq-modal__rules-list li::before {
  content: counter(promotion-rule);
  position: absolute;
  top: 12px;
  left: 13px;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #45a9df;
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
}

.faq-modal__item {
  flex: 0 0 auto;
  border: 0;
  border-radius: 10px;
  background: #f4f7fb;
  color: #17304f;
  box-shadow: none;
  overflow: hidden;
}

.faq-modal__item.is-open {
  background: #eef5fb;
}

.faq-modal__question {
  min-height: 48px;
  grid-template-columns: minmax(0, 1fr) 28px;
  gap: 10px;
  padding: 11px 13px;
  color: #17304f;
  font-size: clamp(11px, calc(var(--stage-w) * 0.029), 14px);
  font-weight: 700;
  line-height: 1.2;
}

.faq-modal__plus {
  width: 28px;
  background: #dcebf5;
  box-shadow: none;
}

.faq-modal__plus::before,
.faq-modal__plus::after {
  width: 48%;
  height: 2px;
  background: #2f68b2;
}

.faq-modal__answer {
  margin: 0 13px;
  padding: 11px 0 13px;
  border-top: 1px solid #dbe6ee;
  color: #5f7083;
  font-size: clamp(10px, calc(var(--stage-w) * 0.026), 12px);
  font-weight: 500;
  line-height: 1.35;
}

/* Full-screen content sections inside the game stage. */
.receipts-modal,
.faq-modal,
.rewards-modal {
  place-items: stretch;
  padding: 0;
}

.receipts-modal__panel,
.faq-modal__inner,
.rewards-modal__panel {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  border-radius: 0;
  box-shadow: none;
}

.rewards-modal__available-panel,
.rewards-modal__list {
  flex: 1 1 0;
  max-height: none;
}

/* Receipt upload refresh: full-screen light UI shared with account content sections. */
.receipt-modal,
.receipt-modal.is-scanning,
.receipt-modal.is-moderating {
  place-items: stretch;
  padding: 0;
  background: #ffffff;
  backdrop-filter: none;
  color: #17304f;
}

.receipt-modal__panel,
.receipt-modal.is-scanning .receipt-modal__panel,
.receipt-modal.is-moderating .receipt-modal__panel {
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 0;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  color: #17304f;
  text-align: center;
  box-shadow: none;
  overflow: hidden;
}

.receipt-modal__close,
.receipt-modal.is-scanning .receipt-modal__close,
.receipt-modal.is-moderating .receipt-modal__close {
  top: 11px;
  right: 11px;
  width: 33px;
  height: 33px;
  filter: none;
}

.receipt-modal__slides,
.receipt-modal.is-scanning .receipt-modal__scanner,
.receipt-modal__moderation {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.receipt-modal__slides::-webkit-scrollbar,
.receipt-modal.is-scanning .receipt-modal__scanner::-webkit-scrollbar,
.receipt-modal__moderation::-webkit-scrollbar {
  display: none;
}

.receipt-modal__slides {
  align-content: center;
  justify-items: center;
  gap: 18px;
  padding: 72px 28px 34px;
}

.receipt-modal__panel h2,
.receipt-modal.is-scanning .receipt-modal__scanner h2,
.receipt-modal__moderation h2 {
  width: 100%;
  margin: 0;
  color: #2c78b9;
  font-size: clamp(24px, calc(var(--stage-w) * 0.064), 30px);
  font-weight: 850;
  line-height: 1.12;
  text-align: center;
  text-shadow: none;
}

.receipt-modal__slides p,
.receipt-modal__scanner p,
.receipt-modal__moderation-status {
  width: min(100%, 340px);
  max-width: none;
  margin: 0 !important;
  color: #5f7083 !important;
  font-size: clamp(13px, calc(var(--stage-w) * 0.033), 15px) !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  text-align: center;
  text-shadow: none;
}

.receipt-modal__dots {
  gap: 9px;
  margin: 4px 0 8px;
}

.receipt-modal__dots span {
  width: 9px;
  background: #d5e1ea;
  box-shadow: none;
}

.receipt-modal__dots span.is-active {
  background: #58c70f;
  box-shadow: none;
}

.receipt-modal__next,
.receipt-modal__submit,
.receipt-modal__send {
  min-height: 52px;
  border-radius: 999px;
  background: #ffc443;
  color: #17304f;
  font-size: 15px;
  font-weight: 850;
  box-shadow: 0 5px 10px rgba(218, 151, 21, 0.18);
}

.receipt-modal__next {
  width: min(100%, 260px);
}

.receipt-modal.is-scanning .receipt-modal__scanner {
  position: relative;
  inset: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 62px 24px 28px;
}

.receipt-modal.is-scanning .receipt-modal__camera {
  width: min(68vw, 250px);
  flex: 0 0 auto;
  border: 2px solid #55b4e8;
  border-radius: 18px;
  background: #eef5fa;
  box-shadow: none;
}

.receipt-modal__scan-frame {
  inset: 14%;
  border: 3px solid #58c70f;
  border-radius: 14px;
  box-shadow: 0 0 0 999px rgba(23, 48, 79, 0.12);
}

.receipt-modal.is-scanning .receipt-modal__status,
.receipt-modal.is-scanning .receipt-modal__status.is-warning,
.receipt-modal.is-scanning .receipt-modal__status.is-success {
  width: min(100%, 350px);
  min-height: 2.8em;
  margin: 0;
  color: #5f7083 !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  text-shadow: none;
}

.receipt-modal.is-scanning .receipt-modal__status.is-warning {
  color: #b35a20 !important;
}

.receipt-modal.is-scanning .receipt-modal__status.is-success {
  color: #279d31 !important;
}

.receipt-modal__manual,
.receipt-modal.is-scanning .receipt-modal__manual {
  width: min(100%, 350px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 10px;
  row-gap: 9px;
}

.receipt-modal__manual label,
.receipt-modal__moderation-form label:not(.receipt-modal__consent) {
  gap: 6px;
  color: #17304f;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.15;
  text-shadow: none;
}

.receipt-modal__manual input,
.receipt-modal.is-scanning .receipt-modal__manual input,
.receipt-modal__moderation-form input[type="text"],
.receipt-modal__moderation-form input[type="tel"],
.receipt-modal__moderation-form input[type="email"] {
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #d6e2eb;
  border-radius: 12px;
  background: #f4f7fb;
  color: #17304f;
  font-size: 16px;
  font-weight: 600;
  box-shadow: none;
}

.receipt-modal__manual input:focus,
.receipt-modal__moderation-form input[type="text"]:focus,
.receipt-modal__moderation-form input[type="tel"]:focus,
.receipt-modal__moderation-form input[type="email"]:focus {
  border-color: #55b4e8;
  box-shadow: 0 0 0 4px rgba(85, 180, 232, 0.16);
}

.receipt-modal.is-scanning .receipt-modal__actions {
  width: min(100%, 350px);
  gap: 10px;
}

.receipt-modal.is-scanning .receipt-modal__file,
.receipt-modal.is-scanning .receipt-modal__submit,
.receipt-modal__upload,
.receipt-modal__send {
  width: 100%;
  min-height: 50px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 850;
  box-shadow: none;
}

.receipt-modal.is-scanning .receipt-modal__file,
.receipt-modal__upload {
  border: 1.5px solid #55b4e8;
  background: #ffffff;
  color: #2f68b2;
}

.receipt-modal__moderate-button {
  width: min(100%, 350px);
  min-height: 36px;
  padding: 6px 12px;
  color: #4d7397;
  font-size: 12px;
  font-weight: 600;
  text-shadow: none;
}

.receipt-modal__moderation {
  position: relative;
  inset: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 62px 24px 28px;
}

.receipt-modal__moderation-form {
  width: min(100%, 350px);
  gap: 11px;
}

.receipt-modal__file-name {
  margin: -2px 0 0;
  color: #6d8093;
  font-size: 11px;
  font-weight: 500;
  text-shadow: none;
}

.receipt-modal__consent {
  gap: 10px;
  color: #5f7083;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.35;
  text-shadow: none;
}

.receipt-modal__consent input {
  width: 20px;
  accent-color: #58c70f;
}

.receipt-modal__moderation-status.is-warning {
  color: #b35a20 !important;
}

.receipt-modal__moderation-status.is-success {
  color: #279d31 !important;
}

.receipt-modal__moderation-form input.is-invalid {
  border-color: #dc3d3d;
  background: #fff0f0;
  box-shadow: 0 0 0 4px rgba(220, 61, 61, 0.12);
}

.receipt-modal__upload.is-invalid {
  outline: 3px solid rgba(220, 61, 61, 0.34);
  outline-offset: 2px;
}

.receipt-modal__consent.is-invalid {
  color: #b83030;
}

.receipt-modal__consent.is-invalid input {
  outline: 2px solid rgba(220, 61, 61, 0.7);
  outline-offset: 2px;
}

/* Unified game buttons: carry the main-menu purple/gold language through
   dialogs and full-screen utility views without changing icon-only controls. */
:root {
  --game-button-purple-top: #8d55e5;
  --game-button-purple-mid: #6132c4;
  --game-button-purple-bottom: #431b9f;
  --game-button-gold-top: #ffd85c;
  --game-button-gold-mid: #f7a918;
  --game-button-gold-bottom: #d77b08;
  --game-button-ink: #ffffff;
  --game-button-dark-ink: #59310d;
  --game-button-ring: rgba(255, 255, 255, 0.94);
}

.text-button,
.auth-modal__submit,
.account-modal__operations,
.account-modal__receipts,
.account-modal__logout,
.receipts-modal__upload,
.pause-dialog__menu,
.receipt-modal__send,
.receipt-modal__submit,
.receipt-modal__upload {
  min-height: 52px;
  padding: 10px 22px;
  border: 3px solid var(--game-button-ring);
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    var(--game-button-purple-top) 0%,
    var(--game-button-purple-mid) 48%,
    var(--game-button-purple-bottom) 100%
  );
  color: var(--game-button-ink);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0.015em;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 2px 1px rgba(42, 13, 102, 0.42);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.46),
    inset 0 -5px 0 rgba(42, 13, 102, 0.3),
    0 0 0 2px rgba(91, 42, 170, 0.78),
    0 8px 14px rgba(28, 63, 92, 0.22);
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease, box-shadow 140ms ease;
}

.text-button--secondary,
.account-modal__receipts,
.pause-dialog__resume.text-button,
.pause-exit-dialog__stay.text-button,
.ticket-shop__cancel.text-button,
.receipt-modal__file.text-button,
.receipt-modal__upload.text-button {
  background: linear-gradient(
    180deg,
    var(--game-button-gold-top) 0%,
    var(--game-button-gold-mid) 52%,
    var(--game-button-gold-bottom) 100%
  );
  color: var(--game-button-dark-ink);
  text-shadow: 0 1px 0 rgba(255, 244, 184, 0.72);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.58),
    inset 0 -5px 0 rgba(152, 75, 0, 0.25),
    0 0 0 2px rgba(213, 126, 9, 0.74),
    0 8px 14px rgba(91, 56, 16, 0.2);
}

.text-button:hover:not(:disabled),
.auth-modal__submit:hover:not(:disabled),
.account-modal__operations:hover:not(:disabled),
.account-modal__receipts:hover:not(:disabled),
.account-modal__logout:hover:not(:disabled),
.receipts-modal__upload:hover:not(:disabled),
.pause-dialog__menu:hover:not(:disabled),
.receipt-modal__send:hover:not(:disabled),
.receipt-modal__submit:hover:not(:disabled),
.receipt-modal__upload:hover:not(:disabled) {
  filter: brightness(1.06) saturate(1.04);
  transform: translateY(-1px);
}

.text-button:active:not(:disabled),
.auth-modal__submit:active:not(:disabled),
.account-modal__operations:active:not(:disabled),
.account-modal__receipts:active:not(:disabled),
.account-modal__logout:active:not(:disabled),
.receipts-modal__upload:active:not(:disabled),
.pause-dialog__menu:active:not(:disabled),
.receipt-modal__send:active:not(:disabled),
.receipt-modal__submit:active:not(:disabled),
.receipt-modal__upload:active:not(:disabled) {
  filter: brightness(0.98);
  transform: translateY(2px) scale(0.99);
}

.text-button:focus-visible,
.auth-modal__submit:focus-visible,
.account-modal__operations:focus-visible,
.account-modal__receipts:focus-visible,
.account-modal__logout:focus-visible,
.receipts-modal__upload:focus-visible,
.pause-dialog__menu:focus-visible,
.receipt-modal__send:focus-visible,
.receipt-modal__submit:focus-visible,
.receipt-modal__upload:focus-visible {
  outline: 3px solid rgba(73, 183, 236, 0.72);
  outline-offset: 4px;
}


/* The scanner is a single-screen tool: scale its camera and controls to the
   available stage height instead of turning the whole view into a scroller. */
.receipt-modal.is-scanning .receipt-modal__scanner {
  height: 100%;
  max-height: 100%;
  gap: clamp(5px, 0.9cqh, 10px);
  padding:
    clamp(44px, 7cqh, 62px)
    clamp(16px, 5cqw, 24px)
    clamp(12px, 2cqh, 20px);
  overflow: hidden;
  overscroll-behavior: none;
}

.receipt-modal.is-scanning .receipt-modal__scanner h2 {
  flex: 0 0 auto;
  font-size: clamp(22px, 3.8cqh, 30px);
}

.receipt-modal.is-scanning .receipt-modal__camera {
  width: min(66cqw, 23cqh, 220px);
  flex: 0 0 auto;
}

.receipt-modal.is-scanning .receipt-modal__status,
.receipt-modal.is-scanning .receipt-modal__status.is-warning,
.receipt-modal.is-scanning .receipt-modal__status.is-success {
  min-height: 0;
  flex: 0 0 auto;
  font-size: clamp(10px, 1.65cqh, 12px) !important;
  line-height: 1.25 !important;
}

.receipt-modal.is-scanning .receipt-modal__manual {
  flex: 0 0 auto;
  column-gap: clamp(7px, 2.5cqw, 10px);
  row-gap: clamp(4px, 0.8cqh, 7px);
}

.receipt-modal.is-scanning .receipt-modal__manual label {
  gap: 3px;
  font-size: clamp(9px, 1.45cqh, 11px);
}

.receipt-modal.is-scanning .receipt-modal__manual input {
  min-height: clamp(34px, 5cqh, 44px);
  padding: clamp(6px, 1.1cqh, 10px) 10px;
}

.receipt-modal.is-scanning .receipt-modal__actions {
  flex: 0 0 auto;
  gap: clamp(7px, 2.5cqw, 10px);
}

.receipt-modal.is-scanning .receipt-modal__file,
.receipt-modal.is-scanning .receipt-modal__submit {
  min-height: clamp(38px, 5.5cqh, 48px);
  font-size: clamp(12px, 1.8cqh, 14px);
}

.receipt-modal.is-scanning .receipt-modal__moderate-button {
  min-height: clamp(28px, 4cqh, 34px);
  padding: 2px 10px;
  font-size: clamp(10px, 1.55cqh, 12px);
}

/* Ticket purchase: Figma node 4391:104 with quantity control below balance. */
.ticket-shop {
  z-index: 44;
  padding: 18px 20px;
  background: rgba(248, 252, 247, 0.3);
  backdrop-filter: blur(10px) brightness(1.12) saturate(0.86);
}

.ticket-shop__panel {
  width: min(100%, 390px);
  height: min(calc(100% - 36px), 580px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 24px 56px;
  border: 0;
  border-radius: 28px;
  background: #ffffff;
  color: #0a335c;
  box-shadow: 0 10px 24px rgba(5, 31, 51, 0.25);
  overflow: hidden;
}

.ticket-shop__panel h2 {
  width: 100%;
  min-height: 48px;
  display: grid;
  place-items: center;
  margin: 0 0 24px;
  color: #0a7ac9;
  font-size: 28px;
  font-weight: 850;
  line-height: normal;
  text-align: center;
}

.ticket-shop__offer {
  width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.ticket-shop__offer img {
  width: 220px;
  height: 110px;
  object-fit: cover;
  object-position: center;
  filter: none;
}

.ticket-shop__panel .ticket-shop__balance {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 10px 0 0;
  color: #4d637a;
  font-size: 14px;
  font-weight: 400;
  line-height: normal;
}

.ticket-shop__balance img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.ticket-shop__balance strong {
  color: #0a335c;
  font-size: 15px;
  font-weight: 800;
}

.ticket-shop__counter {
  width: 180px;
  min-height: 44px;
  margin: 12px auto 0;
  grid-template-columns: 44px 1fr 44px;
  padding: 0 4px;
  border-radius: 999px;
  background: #f2f7fc;
  box-shadow: none;
}

.ticket-shop__counter button {
  width: 36px;
  height: 36px;
  margin: 0 auto;
  border-radius: 50%;
  background: #58c70f;
  color: #ffffff;
  text-shadow: none;
  box-shadow: none;
}

.ticket-shop__counter button::before,
.ticket-shop__counter button::after {
  width: 12px;
  height: 2px;
  background: #ffffff;
  box-shadow: none;
}

.ticket-shop__counter strong {
  color: #0a335c;
  font-size: 20px;
  font-weight: 850;
}

.ticket-shop__status {
  width: 100%;
  min-height: 18px;
  margin: 4px 0 0 !important;
  color: #4d637a !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 18px !important;
  text-align: center;
}

.ticket-shop__status.is-warning {
  color: #c54b26 !important;
}

.ticket-shop__buy,
.ticket-shop__cancel {
  width: 180px;
  min-height: 56px;
  flex: 0 0 auto;
  padding: 12px 16px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 850;
  line-height: 20px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  box-shadow: 0 4px 5px rgba(7, 65, 105, 0.12);
}

.ticket-shop__buy {
  margin: 18px auto 0;
  background: #ffc21d;
  color: #18314b;
}

.ticket-shop__cancel {
  margin: 24px auto 0;
  background: #0d5aa7;
  color: #ffffff;
}

/* Referral rewards: Figma nodes 4396:52 and 4396:436. */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.referral-modal {
  padding: 12px 20px;
  background: rgba(13, 66, 96, 0.34);
  backdrop-filter: blur(7px);
}

.referral-modal__panel {
  --referral-gutter: clamp(18px, 8.72%, 34px);
  position: relative;
  width: min(100%, 390px);
  height: min(720px, 100%);
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 28px;
  background: #ffffff;
  color: #0a335c;
  box-shadow: 0 18px 42px rgba(7, 65, 105, 0.24);
  container-type: size;
}

.referral-modal__panel h2 {
  position: absolute;
  top: 3.333%;
  left: var(--referral-gutter);
  width: calc(100% - 2 * var(--referral-gutter));
  height: 48px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0a7ac9;
  font-size: 28px;
  font-weight: 850;
  line-height: normal;
}

.referral-modal__description {
  position: absolute;
  top: 11.389%;
  left: var(--referral-gutter);
  width: calc(100% - 2 * var(--referral-gutter));
  height: 76px;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #4d637a !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  line-height: normal !important;
  text-align: center;
}

.referral-modal__description strong {
  font-weight: 400;
}

.referral-modal__code-card,
.referral-modal__friend-code {
  position: absolute;
  left: var(--referral-gutter);
  width: calc(100% - 2 * var(--referral-gutter));
  height: clamp(72px, 12.778cqh, 92px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: #f0f7ff;
  box-shadow: none;
  transition: background-color 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.referral-modal__code-card {
  top: 25.556%;
  cursor: pointer;
}

.referral-modal__friend-code {
  top: 40.694%;
  margin: 0;
}

.referral-modal__code-card > span,
.referral-modal__friend-code > label {
  position: absolute;
  top: 10.87%;
  left: 8%;
  width: 84%;
  height: 26.09%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4d637a;
  font-size: 12px;
  font-weight: 700;
  line-height: normal;
  text-align: center;
}

.referral-modal__code-card > strong {
  position: absolute;
  top: 39.13%;
  left: 8%;
  width: 84%;
  height: 45.65%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0a335c;
  font-size: 26px;
  font-weight: 850;
  line-height: normal;
  letter-spacing: 0;
}

.referral-modal__friend-code > input {
  position: absolute;
  top: 36.96%;
  left: 8%;
  width: 84%;
  height: 45.65%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: #0a335c;
  font-size: 24px;
  font-weight: 850;
  line-height: 42px;
  letter-spacing: 0.025em;
  text-align: center;
  text-transform: uppercase;
  box-shadow: none;
}

.referral-modal__friend-code > input:focus {
  border: 0;
  box-shadow: none;
}

.referral-modal__friend-code > input::placeholder {
  color: #0a335c;
  opacity: 0.5;
  letter-spacing: 0.025em;
}

.referral-modal__friend-code.has-input-error {
  background: #fff2f0;
  box-shadow: inset 0 0 0 2px rgba(198, 61, 53, 0.18);
}

.referral-modal__input-error {
  position: absolute;
  top: 72%;
  left: 8%;
  width: 84%;
  height: 16%;
  overflow: hidden;
  color: #c63d35;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.referral-modal__input-error[hidden] {
  display: none;
}

.referral-modal__friend-code.has-input-error > input {
  top: 34%;
  height: 34%;
  color: #0a335c;
  font-size: 20px;
  line-height: 30px;
}

.referral-modal__friend-code.has-input-error > input::placeholder {
  color: #0a335c;
  letter-spacing: 0.025em;
}

.referral-modal__restore-card {
  position: absolute;
  top: 55.972%;
  left: var(--referral-gutter);
  width: calc(100% - 2 * var(--referral-gutter));
  height: clamp(72px, 12.222cqh, 88px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(225, 245, 255, 0.96), rgba(242, 248, 255, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 18px rgba(7, 65, 105, 0.12);
}

.referral-modal__restore-card[hidden] {
  display: none;
}

.referral-modal__restore-icon {
  position: relative;
  width: clamp(50px, 8cqh, 56px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  justify-self: start;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 5px 12px rgba(7, 65, 105, 0.12);
}

.referral-modal__restore-icon img {
  width: 72%;
  height: 72%;
  object-fit: contain;
  filter: drop-shadow(0 3px 4px rgba(118, 28, 65, 0.18));
}

.referral-modal__restore-icon strong {
  position: absolute;
  right: -7px;
  bottom: -5px;
  min-width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  padding-inline: 5px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #ffffff;
  color: #0a335c;
  font-size: 16px;
  font-weight: 850;
  line-height: 1;
  box-shadow: 0 3px 8px rgba(7, 65, 105, 0.16);
}

.referral-modal__restore-card > span {
  min-width: 0;
  justify-self: center;
  color: #0a335c;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.15;
  text-align: center;
}

.referral-modal__restore-card > time {
  min-width: 78px;
  justify-self: end;
  padding: 10px 6px;
  border-radius: 14px;
  background: #ffffff;
  color: #0a7ac9;
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 4px 10px rgba(7, 65, 105, 0.1);
}

.referral-modal__status {
  position: absolute;
  top: 68.611%;
  left: var(--referral-gutter);
  width: calc(100% - 2 * var(--referral-gutter));
  min-height: 30px;
  margin: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #279d31 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 15px !important;
  text-align: center;
}

.referral-modal__status:empty {
  min-height: 30px;
  margin: 0 !important;
}

.referral-modal__status.is-warning {
  color: #c54b26 !important;
}

.referral-modal__apply,
.referral-modal__copy {
  position: absolute;
  left: 50%;
  width: min(220px, calc(100% - 2 * var(--referral-gutter)));
  min-height: clamp(48px, 7.778cqh, 56px);
  margin: 0;
  padding: 12px 16px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 850;
  line-height: 20px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  box-shadow: 0 4px 5px rgba(7, 65, 105, 0.12);
  transform: translateX(-50%);
}

.referral-modal__apply {
  top: 74.444%;
  background: #ffc21d;
  color: #18314b;
}

.referral-modal__copy {
  top: 85.833%;
  background: #0d5aa7;
  color: #ffffff;
}

.referral-modal__apply:disabled,
.referral-modal__copy:disabled {
  opacity: 0.64;
}

.referral-modal__close {
  top: 11px;
  right: 11px;
  width: 33px;
  height: 33px;
  filter: none;
  box-shadow: none;
}

.referral-modal__code-card:focus-visible {
  outline: 3px solid rgba(13, 90, 167, 0.28);
  outline-offset: 3px;
}

.referral-modal.is-code-copied .referral-modal__code-card {
  background: #eff9eb;
  box-shadow: inset 0 0 0 2px #58a43c;
}

.referral-modal.is-code-copied .referral-modal__code-card > span {
  color: #58a43c;
}

@container (max-height: 640px) {
  .referral-modal__panel h2 {
    height: 40px;
    font-size: 24px;
  }

  .referral-modal__description {
    height: 64px;
    font-size: 13px !important;
  }

  .referral-modal__restore-card > span,
  .referral-modal__restore-card > time,
  .referral-modal__status {
    font-size: 12px !important;
  }

  .referral-modal__apply,
  .referral-modal__copy {
    font-size: 14px;
  }
}

/* On wide screens, keep the game artwork inside the portrait stage only.
   The surrounding website canvas is intentionally a solid brand blue. */
@media (min-width: 769px), (hover: hover) and (pointer: fine) {
  body,
  body:has(.menu-screen:not(.is-hidden)),
  body:has(.game-screen:not(.is-hidden)),
  body:has(.loading-screen:not(.is-hidden)),
  body:has(.daily-screen:not(.is-hidden)) {
    background-color: #43a4dc;
    background-image: none;
  }
}

/* Final cascade: keep every full-size action aligned with the menu buttons. */
:where(
  .text-button,
  .auth-modal__submit,
  .account-modal__operations,
  .account-modal__receipts,
  .account-modal__logout,
  .receipts-modal__upload,
  .pause-dialog__menu,
  .receipt-modal__send,
  .receipt-modal__submit,
  .receipt-modal__upload,
  .referral-modal__apply,
  .referral-modal__copy
) {
  border: 3px solid var(--game-button-ring);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--game-button-purple-top), var(--game-button-purple-mid) 48%, var(--game-button-purple-bottom));
  color: var(--game-button-ink);
  font-weight: 900;
  letter-spacing: 0.015em;
  text-transform: uppercase;
  text-shadow: 0 2px 1px rgba(42, 13, 102, 0.42);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.46), inset 0 -5px 0 rgba(42, 13, 102, 0.3), 0 0 0 2px rgba(91, 42, 170, 0.78), 0 8px 14px rgba(28, 63, 92, 0.22);
}

/* Balance dialogs use consistent primary / secondary action pairs. */
.referral-modal__apply.text-button,
.referral-modal__copy.text-button,
.ticket-shop__buy.text-button,
.ticket-shop__cancel.text-button {
  width: min(240px, calc(100% - 48px));
  min-height: 56px;
  border: 3px solid var(--game-button-ring);
  border-radius: 999px;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.015em;
  text-transform: uppercase;
}

.ticket-shop__buy.text-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ticket-shop__buy.text-button img {
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  object-fit: contain;
}

.referral-modal__apply.text-button,
.ticket-shop__buy.text-button {
  background: linear-gradient(180deg, var(--game-button-purple-top), var(--game-button-purple-mid) 48%, var(--game-button-purple-bottom));
  color: var(--game-button-ink);
  text-shadow: 0 2px 1px rgba(42, 13, 102, 0.42);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.46), inset 0 -5px 0 rgba(42, 13, 102, 0.3), 0 0 0 2px rgba(91, 42, 170, 0.78), 0 8px 14px rgba(28, 63, 92, 0.22);
}

.ticket-shop__buy.text-button,
.ticket-shop__cancel.text-button {
  width: min(280px, calc(100% - 40px));
}

.referral-modal__copy.text-button,
.ticket-shop__cancel.text-button {
  background: linear-gradient(180deg, var(--game-button-gold-top), var(--game-button-gold-mid) 52%, var(--game-button-gold-bottom));
  color: var(--game-button-dark-ink);
  text-shadow: 0 1px 0 rgba(255, 244, 184, 0.72);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.58), inset 0 -5px 0 rgba(152, 75, 0, 0.25), 0 0 0 2px rgba(213, 126, 9, 0.74), 0 8px 14px rgba(91, 56, 16, 0.2);
}

.ticket-shop__cancel.text-button {
  margin-top: 18px;
}

.referral-modal__apply.text-button:hover:not(:disabled),
.referral-modal__copy.text-button:hover:not(:disabled) {
  transform: translateX(-50%) translateY(-1px);
}

.referral-modal__apply.text-button:active:not(:disabled),
.referral-modal__copy.text-button:active:not(:disabled) {
  transform: translateX(-50%) translateY(2px) scale(0.99);
}

.ticket-shop__buy.text-button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
  filter: grayscale(0.2) saturate(0.72);
  padding-inline: 10px;
  font-size: 13px;
  letter-spacing: 0;
  white-space: nowrap;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.34),
    inset 0 -4px 0 rgba(42, 13, 102, 0.2),
    0 0 0 2px rgba(91, 42, 170, 0.46),
    0 5px 10px rgba(28, 63, 92, 0.12);
}

.auth-modal__input-wrap:has([data-login-password]) > input {
  padding-right: 72px;
}

.auth-modal__password-toggle {
  position: absolute;
  right: 39px;
  top: 50%;
  width: 27px;
  height: 27px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #4b91c3;
  cursor: pointer;
  transform: translateY(-50%);
}

.auth-modal__eye {
  position: absolute;
  inset: 4px;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-modal__eye--hide,
.auth-modal__password-toggle.is-visible .auth-modal__eye--show {
  display: none;
}

.auth-modal__password-toggle.is-visible .auth-modal__eye--hide {
  display: block;
}

.auth-modal__password-toggle:hover {
  background: #eaf4fa;
}

.auth-modal__password-toggle:focus-visible {
  outline: 3px solid rgba(75, 145, 195, 0.24);
  outline-offset: 1px;
}


/* Unified flat tabs across authentication, history and rewards screens. */
:is(
  .auth-modal__tab,
  .operations-modal__tabs button,
  .receipts-modal__tabs button,
  .rewards-modal__tabs button,
  .rewards-modal__source-tabs button
) {
  border: 0;
  border-radius: 999px;
  outline: 0;
  background: #eef3f7;
  color: #425a70;
  font-weight: 750;
  text-shadow: none;
  box-shadow: none;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

:is(
  .auth-modal__tab,
  .operations-modal__tabs button,
  .receipts-modal__tabs button,
  .rewards-modal__tabs button,
  .rewards-modal__source-tabs button
).is-active {
  border: 0;
  outline: 0;
  background: #58c70f;
  color: #ffffff;
  text-shadow: none;
  box-shadow: none;
}

:is(
  .auth-modal__tab,
  .operations-modal__tabs button,
  .receipts-modal__tabs button,
  .rewards-modal__tabs button,
  .rewards-modal__source-tabs button
):focus-visible {
  outline: 0;
  box-shadow: inset 0 0 0 3px rgba(13, 90, 167, 0.2);
}

:where(
  .text-button--secondary,
  .account-modal__receipts,
  .pause-dialog__resume,
  .pause-exit-dialog__stay,
  .ticket-shop__cancel,
  .receipt-modal__file,
  .receipt-modal__upload,
  .referral-modal__apply
) {
  background: linear-gradient(180deg, var(--game-button-gold-top), var(--game-button-gold-mid) 52%, var(--game-button-gold-bottom));
  color: var(--game-button-dark-ink);
  text-shadow: 0 1px 0 rgba(255, 244, 184, 0.72);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.58), inset 0 -5px 0 rgba(152, 75, 0, 0.25), 0 0 0 2px rgba(213, 126, 9, 0.74), 0 8px 14px rgba(91, 56, 16, 0.2);
}

.account-modal__operations {
  background: linear-gradient(180deg, #9aeb3c 0%, #58c70f 48%, #319407 100%);
  color: #ffffff;
  text-shadow: 0 2px 1px rgba(25, 91, 7, 0.42);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.52),
    inset 0 -5px 0 rgba(25, 104, 5, 0.28),
    0 0 0 2px rgba(48, 145, 9, 0.74),
    0 8px 14px rgba(35, 105, 14, 0.2);
}

.receipts-modal__upload {
  width: min(240px, calc(100% - 24px));
  padding-inline: 24px;
  white-space: nowrap;
}

.receipts-modal__panel:has(.receipts-modal__empty:not(.is-hidden)) .receipts-modal__upload {
  margin-bottom: clamp(48px, 9cqh, 76px);
}

/* Full-screen navigation behaves like a native mobile stack. */
:where(
  .account-modal,
  .operations-modal,
  .receipts-modal,
  .faq-modal,
  .rewards-modal,
  .receipt-modal,
  .referral-modal,
  .ticket-shop
):not(.is-hidden):not(.is-closing) {
  animation: screenSlideInFromRight 320ms cubic-bezier(0.22, 0.78, 0.24, 1) both;
}

:where(
  .account-modal,
  .operations-modal,
  .receipts-modal,
  .faq-modal,
  .rewards-modal,
  .receipt-modal,
  .referral-modal,
  .ticket-shop
).is-closing {
  pointer-events: none;
  animation: screenSlideOutToRight 320ms cubic-bezier(0.55, 0, 0.78, 0.35) both;
}

@keyframes screenSlideInFromRight {
  from {
    opacity: 0.96;
    transform: translate3d(100%, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes screenSlideOutToRight {
  from {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
  to {
    opacity: 0.96;
    transform: translate3d(100%, 0, 0);
  }
}

/* Account and balance actions enter from the bottom instead of using the
   full-screen navigation transition. The shared veil is defined below. */
:is(.account-modal, .referral-modal, .ticket-shop):not(.is-hidden):not(.is-closing) {
  animation: none;
}

:is(.account-modal, .referral-modal, .ticket-shop):not(.is-hidden):not(.is-closing)
  :is(.account-modal__panel, .referral-modal__panel, .ticket-shop__panel) {
  animation: accountPanelRise 560ms cubic-bezier(0.16, 0.78, 0.22, 1) both;
}

@keyframes accountPanelRise {
  from {
    opacity: 0;
    transform: translate3d(0, 104px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* Exit confirmation actions: a matched gold / purple pair. */
.pause-exit-dialog__stay.text-button,
.pause-exit-dialog__confirm.text-button {
  width: min(240px, 100%);
  min-height: 56px;
  margin-inline: auto;
  border: 3px solid var(--game-button-ring);
  border-radius: 999px;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.015em;
  text-transform: uppercase;
}

.pause-exit-dialog__stay.text-button {
  margin-top: 22px;
  background: linear-gradient(180deg, var(--game-button-gold-top), var(--game-button-gold-mid) 52%, var(--game-button-gold-bottom));
  color: var(--game-button-dark-ink);
  text-shadow: 0 1px 0 rgba(255, 244, 184, 0.72);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.58), inset 0 -5px 0 rgba(152, 75, 0, 0.25), 0 0 0 2px rgba(213, 126, 9, 0.74), 0 8px 14px rgba(91, 56, 16, 0.2);
}

.pause-exit-dialog__confirm.text-button {
  margin-top: 18px;
  background: linear-gradient(180deg, var(--game-button-purple-top), var(--game-button-purple-mid) 48%, var(--game-button-purple-bottom));
  color: var(--game-button-ink);
  text-shadow: 0 2px 1px rgba(42, 13, 102, 0.42);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.46), inset 0 -5px 0 rgba(42, 13, 102, 0.3), 0 0 0 2px rgba(91, 42, 170, 0.78), 0 8px 14px rgba(28, 63, 92, 0.22);
}

/* Shared secondary-screen surface, based on the no-lives dialog. */
:is(
  .account-modal__panel,
  .referral-modal__panel,
  .ticket-shop__panel,
  .rewards-modal__panel
) {
  border: 4px solid rgba(255, 255, 255, 0.94);
  background: linear-gradient(180deg, #fffdf7 0%, #fff1d9 100%);
  color: #17375a;
  box-shadow:
    inset 0 0 0 5px rgba(78, 174, 225, 0.16),
    0 22px 52px rgba(8, 39, 75, 0.3);
}

:is(
  .account-modal__panel,
  .referral-modal__panel,
  .ticket-shop__panel,
  .rewards-modal__panel
) :is(
  .account-modal__stat,
  .account-modal__toggle,
  .referral-modal__code-card,
  .referral-modal__friend-code,
  .referral-modal__restore-card,
  .ticket-shop__counter,
  .rewards-modal__available-panel,
  .rewards-prize-card
) {
  border-color: rgba(72, 151, 201, 0.16);
  background-color: rgba(255, 255, 255, 0.7);
}

/* One receipt-history surface for every full-screen utility section. */
:root {
  --full-screen-section-gutter: 5px;
  --full-screen-section-radius: 16px;
}

:is(
  .receipt-modal__panel,
  .receipt-modal.is-scanning .receipt-modal__panel,
  .receipt-modal.is-moderating .receipt-modal__panel,
  .operations-modal__panel,
  .receipts-modal__panel,
  .faq-modal__inner,
  .rewards-modal__panel
) {
  border: 0;
  border-radius: var(--full-screen-section-radius);
  background: linear-gradient(180deg, #fffdf7 0%, #fff4df 100%);
  box-shadow:
    inset 0 0 0 4px rgba(255, 255, 255, 0.96),
    inset 0 0 0 7px rgba(78, 174, 225, 0.18);
}

:is(
  .receipt-modal,
  .operations-modal,
  .receipts-modal,
  .faq-modal,
  .rewards-modal
) {
  padding: var(--full-screen-section-gutter);
  background-color: #dceef1;
}

:is(
  .receipt-modal__panel,
  .receipt-modal.is-scanning .receipt-modal__panel,
  .receipt-modal.is-moderating .receipt-modal__panel,
  .operations-modal__panel,
  .receipts-modal__panel,
  .faq-modal__inner,
  .rewards-modal__panel
) {
  overflow: hidden;
}

:is(
  .receipt-modal__slides,
  .receipt-modal.is-scanning .receipt-modal__scanner,
  .receipt-modal__moderation,
  .operations-modal__list,
  .receipts-modal__list,
  .faq-modal__list
) {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

:is(
  .receipt-modal__slides,
  .receipt-modal.is-scanning .receipt-modal__scanner,
  .receipt-modal__moderation,
  .operations-modal__list,
  .receipts-modal__list,
  .faq-modal__list
)::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.rewards-modal__panel .rewards-prize-card:not(.rewards-prize-card--social) {
  border: 2px solid rgba(78, 154, 201, 0.34);
  background: linear-gradient(180deg, #ffffff 0%, #f5faff 100%);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.82);
}

.rewards-modal__panel .rewards-modal__available-panel,
.rewards-modal__panel .rewards-modal__list {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.pause-dialog__resume.text-button,
.pause-dialog__menu {
  width: min(240px, 100%);
  min-height: 56px;
  padding-inline: 20px;
  white-space: nowrap;
}

/* SPAR partner-house progression prototype. */
.menu-partner-house.is-active.is-unlocked {
  pointer-events: auto;
  cursor: pointer;
}

.menu-partner-house.is-active.is-unlocked:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 5px;
  border-radius: 18px;
}

.menu-partner-house__upgrade {
  position: absolute;
  right: 8%;
  bottom: 8%;
  z-index: 5;
  min-width: 42px;
  padding: 5px 9px;
  border: 2px solid rgba(255, 255, 255, 0.96);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffd857, #ed9311);
  color: #62350a;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  text-align: center;
  box-shadow: 0 4px 9px rgba(86, 47, 5, 0.24);
}

.menu-partner-house:not(.is-unlocked) .menu-partner-house__upgrade,
.menu-partner-house:not(.is-active) .menu-partner-house__upgrade {
  display: none;
}

.menu-partner-house.is-max-upgraded .menu-partner-house__upgrade {
  display: none;
}

.spar-house-modal {
  position: absolute;
  inset: 0;
  z-index: 62;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(17, 62, 82, 0.48);
  backdrop-filter: blur(10px) saturate(0.86);
}

.spar-house-modal__panel {
  position: relative;
  width: min(100%, 390px);
  max-height: calc(100% - 20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 22px 24px;
  overflow: hidden auto;
  border: 4px solid rgba(255, 255, 255, 0.96);
  border-radius: 28px;
  background: linear-gradient(180deg, #fffdf7 0%, #fff0d4 100%);
  color: #17375a;
  box-shadow: inset 0 0 0 5px rgba(78, 174, 225, 0.14), 0 22px 52px rgba(8, 39, 75, 0.32);
  scrollbar-width: none;
}

.spar-house-modal__panel::-webkit-scrollbar {
  display: none;
}

.spar-house-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.spar-house-modal__close img {
  width: 100%;
  height: 100%;
}

.spar-house-modal__panel h2 {
  margin: 4px 0 10px;
  color: #0b67b2;
  font-size: 34px;
  line-height: 1;
}

.spar-house-modal__visual {
  width: 100%;
  min-height: 230px;
  display: grid;
  place-items: center;
  padding: 6px;
  border-radius: 22px;
  background: transparent;
}

.spar-house-modal__visual img {
  display: block;
  width: 100%;
  max-height: 255px;
  object-fit: contain;
  filter: drop-shadow(0 10px 10px rgba(61, 51, 24, 0.2));
}

.spar-house-modal__level {
  margin-top: 4px;
  font-size: 18px;
  text-align: center;
}

.spar-house-modal__progress {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.spar-house-modal__progress span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 3px solid #dce9ef;
  border-radius: 50%;
  background: #f6f8f8;
  color: #c4cdd2;
  font-size: 22px;
  box-shadow: inset 0 2px 4px rgba(32, 78, 102, 0.08);
}

.spar-house-modal__progress span.is-complete {
  border-color: #fff5b5;
  background: linear-gradient(180deg, #ffe56f, #f1a512);
  color: #ffffff;
  text-shadow: 0 1px 1px rgba(114, 67, 3, 0.35);
}

.spar-house-modal__status {
  min-height: 44px;
  margin: 14px 6px 0;
  color: #355c7d;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
  text-align: center;
}

.spar-house-modal__reward {
  margin: 10px 0 0;
  padding: 11px 13px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  color: #326a37;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.3;
  text-align: center;
}

.spar-house-modal__reward span {
  color: #f3a30d;
}

.spar-house-modal__play.text-button {
  width: min(300px, 100%);
  min-height: 58px;
  margin-top: 16px;
  padding: 10px 14px;
  font-size: clamp(13px, calc(var(--stage-w) * 0.039), 17px);
  line-height: 1.05;
  white-space: normal;
  overflow-wrap: anywhere;
}

.spar-house-modal__play:disabled {
  opacity: 0.56;
  cursor: default;
  filter: grayscale(0.35);
}

.win-dialog__house-progress {
  display: inline-block;
  margin-left: 2px;
  color: #2d8c29;
  font-weight: 850;
}

/* Keep unified catalog cards above earlier generic prize-card styling. */
.rewards-modal__panel .rewards-prize-card--compact {
  grid-template-columns: 66px minmax(0, 1fr);
  justify-items: stretch;
  align-items: center;
  border-width: 1.5px;
  border-radius: 18px;
  text-align: left;
}

.rewards-modal__panel .rewards-prize-card--raffle.rewards-prize-card--compact {
  border-color: rgba(37, 111, 70, 0.26);
  background: linear-gradient(135deg, #f7fbff 0%, #edf8ef 100%);
}

@media (max-width: 380px) {
  .rewards-modal__panel .rewards-prize-card--compact {
    grid-template-columns: 58px minmax(0, 1fr);
  }
}

@media (max-height: 720px) {
  .spar-house-modal {
    padding: 12px 18px;
  }

  .spar-house-modal__panel {
    padding-top: 22px;
  }

  .spar-house-modal__visual {
    min-height: 180px;
  }

  .spar-house-modal__visual img {
    max-height: 205px;
  }
}

/* Prize catalog refresh: compact game grid and premium raffle hierarchy. */
.rewards-modal__panel {
  background:
    radial-gradient(circle at 8% 12%, rgba(114, 209, 255, 0.2), transparent 28%),
    radial-gradient(circle at 92% 92%, rgba(255, 209, 80, 0.16), transparent 30%),
    linear-gradient(180deg, #f5fbff 0%, #fffaf0 100%);
}

#prizes-panel-available .rewards-modal__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  column-gap: 0;
  row-gap: 0;
  padding: 0 3px 12px;
}

#prizes-panel-available .rewards-modal__section-heading,
#prizes-panel-available .rewards-prize-card--raffle,
#prizes-panel-available .rewards-modal__empty {
  grid-column: 1 / -1;
}

#prizes-panel-available .rewards-modal__section-heading {
  padding: 13px 3px 7px;
}

#prizes-panel-available .rewards-modal__section-heading:first-child {
  padding-top: 7px;
}

#prizes-panel-available .rewards-modal__section-heading span {
  padding-left: 0;
}

.rewards-modal__panel .rewards-prize-card--available.rewards-prize-card--compact {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 13px;
  border: 1px solid rgba(94, 151, 191, 0.22);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: none;
  overflow: hidden;
}

.rewards-modal__panel .rewards-prize-card--available .rewards-prize-card__discount {
  width: auto;
  min-width: 62px;
  min-height: 44px;
  padding: 8px 11px;
  border-radius: 14px;
  font-size: clamp(18px, calc(var(--stage-w) * 0.048), 22px);
  transform: none;
  box-shadow: 0 6px 12px rgba(31, 70, 102, 0.15);
}

.rewards-modal__panel .rewards-prize-card--available .rewards-prize-card__copy strong {
  font-size: clamp(12px, calc(var(--stage-w) * 0.031), 15px);
  line-height: 1.2;
}

.rewards-prize-card--tone-0 .rewards-prize-card__discount {
  background: linear-gradient(145deg, #ff4b43, #df1616);
}

.rewards-prize-card--tone-1 .rewards-prize-card__discount {
  background: linear-gradient(145deg, #62cc43, #258f2b);
}

.rewards-prize-card--tone-2 .rewards-prize-card__discount {
  background: linear-gradient(145deg, #42a9e8, #246fc0);
}

.rewards-prize-card--tone-3 .rewards-prize-card__discount {
  background: linear-gradient(145deg, #9c67df, #6331ae);
}

.rewards-prize-card--tone-4 .rewards-prize-card__discount {
  background: linear-gradient(145deg, #ffbd31, #e38312);
}

.rewards-modal__panel .rewards-prize-card--raffle.rewards-prize-card--compact {
  min-height: 92px;
  border: 1px solid rgba(41, 126, 73, 0.22);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(230, 247, 233, 0.94));
  box-shadow: none;
}

.rewards-modal__panel .rewards-prize-card--grand.rewards-prize-card--compact {
  min-height: 108px;
  border-color: rgba(235, 166, 18, 0.34);
  background: linear-gradient(135deg, #173a5d 0%, #205980 100%);
}

.rewards-prize-card--grand .rewards-prize-card__copy strong,
.rewards-prize-card--grand .rewards-prize-card__copy p {
  color: #ffffff;
}

.rewards-prize-card--grand .rewards-prize-card__copy small {
  color: #ffd86a;
}

@media (max-width: 340px) {
  #prizes-panel-available .rewards-modal__list {
    grid-template-columns: 1fr;
  }

  #prizes-panel-available .rewards-modal__section-heading,
  #prizes-panel-available .rewards-prize-card--raffle,
  #prizes-panel-available .rewards-modal__empty {
    grid-column: 1;
  }
}

/* Receipt upload intro: all conditions live on one screen before scanning. */
.receipt-modal__slides {
  align-content: center;
  padding: clamp(56px, 9cqh, 76px) clamp(22px, 7cqw, 34px) clamp(24px, 5cqh, 42px);
}

.receipt-modal__intro {
  width: min(100%, 356px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: clamp(14px, 2.3cqh, 20px);
}

.receipt-modal__intro > h2 {
  margin: 0;
}

.receipt-modal__intro-lead {
  width: 100% !important;
  color: #5f7083 !important;
  font-size: clamp(14px, 2.15cqh, 17px) !important;
  font-weight: 650 !important;
  line-height: 1.35 !important;
}

.receipt-modal__intro-list {
  display: grid;
  gap: clamp(8px, 1.4cqh, 12px);
  text-align: left;
}

.receipt-modal__intro-list section {
  padding: clamp(12px, 1.9cqh, 16px) clamp(14px, 4cqw, 18px);
  border: 2px solid rgba(78, 154, 201, 0.28);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.72);
}

.receipt-modal__intro-list strong {
  display: block;
  margin-bottom: 4px;
  color: #17304f;
  font-size: clamp(14px, 2.05cqh, 17px);
  font-weight: 850;
  line-height: 1.15;
}

.receipt-modal__intro-list p {
  width: 100%;
  color: #687b8e !important;
  font-size: clamp(12px, 1.75cqh, 14px) !important;
  font-weight: 550 !important;
  line-height: 1.3 !important;
  text-align: left;
}

.receipt-modal__intro .receipt-modal__next {
  width: 100%;
  margin-top: clamp(2px, 0.8cqh, 8px);
}

@media (max-height: 690px) {
  .receipt-modal__intro {
    gap: 10px;
  }

  .receipt-modal__intro-list {
    gap: 7px;
  }

  .receipt-modal__intro-list section {
    padding-block: 9px;
  }
}

/* Every dismiss control matches the Account help button. */
.phone-stage .modal-close-button {
  position: absolute;
  top: 11px;
  right: 11px;
  z-index: 10;
  width: 33px;
  height: 33px;
  aspect-ratio: 1;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #45a9df;
  cursor: pointer;
  filter: none;
  box-shadow:
    inset 0 -2px 0 rgba(13, 90, 167, 0.22),
    0 4px 9px rgba(35, 78, 118, 0.18);
}

.phone-stage .modal-close-button img {
  display: none;
}

.phone-stage .modal-close-button::before,
.phone-stage .modal-close-button::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 3px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(13, 90, 167, 0.18);
}

.phone-stage .modal-close-button::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.phone-stage .modal-close-button::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.phone-stage .modal-close-button:hover {
  filter: brightness(1.04);
}

.phone-stage .modal-close-button:focus-visible {
  outline: 3px solid rgba(69, 169, 223, 0.3);
  outline-offset: 3px;
}

/* Prizes: one continuous, calm background without colored edge patches. */
.rewards-modal,
.rewards-modal::before,
.rewards-modal::after,
.rewards-modal__panel {
  background: var(--menu-sky-background);
}

.rewards-modal::before {
  inset: 0;
  filter: none;
  transform: none;
}

.rewards-modal::after {
  background: transparent;
}

.phone-stage .rewards-modal > .rewards-modal__panel {
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.rewards-modal__panel h2,
.rewards-modal__section-heading {
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(8, 69, 135, 0.34);
}

.rewards-modal__section-heading small {
  color: rgba(255, 255, 255, 0.88);
}

.rewards-modal__section-heading--raffle {
  border-top-color: rgba(255, 255, 255, 0.36);
}

.rewards-modal__tabs button:not(.is-active) {
  background: rgba(255, 255, 255, 0.86);
}

.rewards-modal__banner {
  min-height: 0;
  aspect-ratio: 1680 / 427;
  border: 0;
  background: transparent;
}

.rewards-modal__banner img {
  object-fit: contain;
}

/* Supplied prize windows sit directly on the rewards background. */
.rewards-modal__panel .rewards-prize-card--available.rewards-prize-card--image-window {
  min-height: auto;
  display: block;
  aspect-ratio: 889 / 896;
  align-self: start;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.rewards-prize-card__window-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.06);
  transform-origin: center;
}

#prizes-panel-available .rewards-prize-card--raffle.rewards-prize-card--image-window {
  grid-column: auto;
}

.rewards-modal__panel .rewards-prize-card--raffle.rewards-prize-card--image-window {
  min-height: auto;
  display: block;
  aspect-ratio: 889 / 811;
  align-self: start;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.phone-stage .account-modal::before,
.phone-stage .account-modal::after {
  content: none;
}

/* FAQ uses the same full-screen sky surface as the prizes catalog. */
.phone-stage .faq-modal {
  background: var(--menu-sky-background);
}

.phone-stage .faq-modal::before,
.phone-stage .faq-modal::after {
  content: none;
}

.phone-stage .faq-modal > .faq-modal__inner {
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.phone-stage .faq-modal__inner h2 {
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(8, 69, 135, 0.34);
}

/* Operations history uses the same full-screen sky surface as prizes. */
.phone-stage .operations-modal {
  background: var(--menu-sky-background);
}

.phone-stage .operations-modal::before,
.phone-stage .operations-modal::after {
  content: none;
}

.phone-stage .operations-modal > .operations-modal__panel {
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.phone-stage .operations-modal__panel h2 {
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(8, 69, 135, 0.34);
}

.phone-stage .operations-modal__retention {
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(8, 69, 135, 0.24);
}

/* Receipt history uses the same full-screen sky surface as prizes. */
.phone-stage .receipts-modal {
  background: var(--menu-sky-background);
}

.phone-stage .receipts-modal::before,
.phone-stage .receipts-modal::after {
  content: none;
}

.phone-stage .receipts-modal > .receipts-modal__panel {
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.phone-stage .receipts-modal__panel h2 {
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(8, 69, 135, 0.34);
}

/* Keep every card-style modal on the same dark blurred veil as My Account. */
.phone-stage :is(
  .account-modal,
  .auth-modal,
  .referral-modal,
  .ticket-shop,
  .heart-shop,
  .no-lives-modal,
  .pause-dialog,
  .pause-exit-dialog,
  .timeout-dialog,
  .win-dialog,
  .fatal-error-dialog,
  .spar-house-modal
) {
  background: rgba(13, 66, 96, 0.32);
  backdrop-filter: blur(7px);
}

/* Receipt upload uses the same full-screen sky surface as prizes. */
.phone-stage .receipt-modal {
  background: var(--menu-sky-background);
  backdrop-filter: none;
}

.phone-stage .receipt-modal::before,
.phone-stage .receipt-modal::after {
  content: none;
}

.phone-stage .receipt-modal > .receipt-modal__panel,
.phone-stage .receipt-modal.is-scanning > .receipt-modal__panel,
.phone-stage .receipt-modal.is-moderating > .receipt-modal__panel {
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.phone-stage .receipt-modal__panel h2,
.phone-stage .receipt-modal.is-scanning .receipt-modal__scanner h2,
.phone-stage .receipt-modal.is-moderating .receipt-modal__moderation h2 {
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(8, 69, 135, 0.34);
}

.phone-stage :is(
  .receipt-modal__intro > p,
  .receipt-modal__scanner > p,
  .receipt-modal__moderation > p
) {
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 2px rgba(8, 69, 135, 0.24);
}

.phone-stage .receipt-modal__intro-lead,
.phone-stage .receipt-modal.is-scanning .receipt-modal__status,
.phone-stage .receipt-modal__moderation-status {
  color: rgba(255, 255, 255, 0.94) !important;
  text-shadow: 0 1px 2px rgba(8, 69, 135, 0.3);
}

.phone-stage .receipt-modal.is-scanning .receipt-modal__moderate-button {
  width: min(100%, 350px);
  min-height: clamp(42px, 5.6cqh, 48px);
  padding: 9px 18px;
  border: 3px solid var(--game-button-ring);
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    var(--game-button-gold-top) 0%,
    var(--game-button-gold-mid) 52%,
    var(--game-button-gold-bottom) 100%
  );
  color: var(--game-button-dark-ink);
  font-size: clamp(12px, 1.8cqh, 14px);
  font-weight: 900;
  line-height: 1.05;
  text-decoration: none;
  text-shadow: 0 1px 0 rgba(255, 244, 184, 0.72);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.58),
    inset 0 -5px 0 rgba(152, 75, 0, 0.25),
    0 0 0 2px rgba(213, 126, 9, 0.74),
    0 8px 14px rgba(91, 56, 16, 0.2);
}

.phone-stage .receipt-modal.is-scanning .receipt-modal__moderate-button:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.5),
    inset 0 -3px 0 rgba(152, 75, 0, 0.24),
    0 0 0 2px rgba(213, 126, 9, 0.74),
    0 5px 9px rgba(91, 56, 16, 0.18);
}

.phone-stage .receipt-modal.is-scanning .receipt-modal__moderate-button:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.95);
  outline-offset: 3px;
}

/* Unified success result for automatic receipt checks and moderation requests. */
.receipt-result-dialog {
  position: absolute;
  inset: 0;
  z-index: 86;
  display: grid;
  place-items: center;
  padding: 7%;
  background: rgba(13, 66, 96, 0.32);
  backdrop-filter: blur(7px);
}

.receipt-result-dialog__panel {
  width: min(92%, 390px);
  max-height: min(84%, 620px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(16px, 3cqh, 24px);
  padding: clamp(30px, 5.5cqh, 44px) clamp(24px, 6cqw, 32px) clamp(26px, 4.5cqh, 36px);
  overflow: hidden auto;
  border: 4px solid rgba(255, 255, 255, 0.96);
  border-radius: 32px;
  background: linear-gradient(180deg, #fffdf7 0%, #fff1d9 100%);
  color: #17375a;
  text-align: center;
  box-shadow:
    inset 0 0 0 5px rgba(78, 174, 225, 0.16),
    0 24px 54px rgba(8, 39, 75, 0.42);
  animation: accountPanelRise 420ms cubic-bezier(0.16, 0.78, 0.22, 1) both;
}

.receipt-result-dialog__icon {
  width: clamp(82px, 22cqw, 104px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 4px solid rgba(255, 255, 255, 0.96);
  border-radius: 50%;
  background: linear-gradient(180deg, #6be52f 0%, #29ad2f 100%);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.34),
    inset 0 -7px 0 rgba(22, 124, 34, 0.24),
    0 10px 22px rgba(35, 145, 45, 0.26);
}

.receipt-result-dialog__icon svg {
  width: 58%;
  height: 58%;
  fill: none;
  stroke: #ffffff;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 0 rgba(15, 109, 29, 0.28));
}

.receipt-result-dialog__panel h2 {
  margin: 0;
  color: #2782c7;
  font-size: clamp(25px, 7cqw, 34px);
  font-weight: 950;
  line-height: 1.05;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.92);
}

.receipt-result-dialog__panel > p {
  max-width: 310px;
  margin: 0;
  color: #586f86;
  font-size: clamp(14px, 4cqw, 18px);
  font-weight: 650;
  line-height: 1.35;
  text-wrap: balance;
}

.receipt-result-dialog__status {
  width: 100%;
  display: grid;
  gap: 5px;
  padding: 16px 18px;
  border: 2px solid rgba(78, 154, 201, 0.2);
  border-radius: 20px;
  background: linear-gradient(180deg, #f4f9ff 0%, #e9f3fb 100%);
  text-align: left;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.78);
}

.receipt-result-dialog__status strong {
  color: #17375a;
  font-size: clamp(15px, 4.4cqw, 20px);
  font-weight: 900;
  line-height: 1.15;
}

.receipt-result-dialog__status span {
  color: #60758a;
  font-size: clamp(12px, 3.5cqw, 15px);
  font-weight: 600;
  line-height: 1.3;
}

.receipt-result-dialog__confirm.text-button {
  width: min(82%, 270px);
  margin-top: 2px;
  background: linear-gradient(
    180deg,
    var(--game-button-gold-top) 0%,
    var(--game-button-gold-mid) 52%,
    var(--game-button-gold-bottom) 100%
  );
  color: var(--game-button-dark-ink);
  text-shadow: 0 1px 0 rgba(255, 244, 184, 0.72);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.58),
    inset 0 -5px 0 rgba(152, 75, 0, 0.25),
    0 0 0 2px rgba(213, 126, 9, 0.74),
    0 8px 14px rgba(91, 56, 16, 0.2);
}

@media (max-height: 690px) {
  .receipt-result-dialog__panel {
    gap: 12px;
    padding-block: 24px;
  }

  .receipt-result-dialog__icon {
    width: 72px;
  }
}

.receipt-toast {
  position: fixed;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 140;
  width: min(406px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  min-height: 76px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  box-sizing: border-box;
  padding: 16px 20px;
  border: 4px solid rgba(255, 255, 255, 0.96);
  border-radius: 26px;
  background: linear-gradient(180deg, #ff665f 0%, #df2f32 100%);
  box-shadow:
    0 0 0 3px rgba(166, 25, 29, 0.74),
    0 18px 42px rgba(79, 12, 17, 0.34);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, calc(100% + 52px));
  transition: transform 0.28s ease, opacity 0.22s ease, visibility 0.28s;
}

.receipt-toast::before {
  content: "!";
  width: 38px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 3px solid rgba(255, 255, 255, 0.94);
  border-radius: 50%;
  background: #ffbd2e;
  color: #7b2600;
  font-size: 25px;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(92, 18, 14, 0.24);
}

.receipt-toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.receipt-toast p {
  margin: 0;
  color: #ffffff;
  font-size: clamp(15px, 3.8cqw, 21px);
  font-weight: 900;
  line-height: 1.25;
  text-align: left;
  text-shadow: 0 2px 2px rgba(92, 18, 14, 0.42);
}

@media (max-width: 520px) {
  .receipt-toast {
    bottom: max(14px, env(safe-area-inset-bottom));
    width: calc(100vw - 24px);
    min-height: 70px;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 22px;
  }

  .receipt-toast::before {
    width: 34px;
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .receipt-toast {
    transition: opacity 0.01ms linear;
  }
}

/* Unified game typography: calm hierarchy across every modal and dialog. */
.phone-stage {
  --game-type-title: clamp(25px, calc(var(--stage-w) * 0.067), 30px);
  --game-type-subtitle: clamp(15px, calc(var(--stage-w) * 0.041), 17px);
  --game-type-label: clamp(13px, calc(var(--stage-w) * 0.034), 15px);
  --game-type-button: clamp(15px, calc(var(--stage-w) * 0.043), 18px);
  --game-type-caption: clamp(11px, calc(var(--stage-w) * 0.03), 13px);
}

.phone-stage :is(
  .timeout-dialog__panel h2,
  .fatal-error-dialog__panel h2,
  .pause-dialog__panel h2,
  .pause-exit-dialog__panel h2,
  .win-dialog__panel h2,
  .no-lives-modal__panel h2,
  .heart-shop__panel h2,
  .ticket-shop__panel h2,
  .receipt-modal__panel h2,
  .receipt-modal__scanner h2,
  .receipt-modal__moderation h2,
  .account-modal__panel h2,
  .auth-modal__panel h2,
  .receipts-modal__panel h2,
  .faq-modal__inner h2,
  .rewards-modal__panel h2,
  .operations-modal__panel h2,
  .referral-modal__panel h2,
  .spar-house-modal__panel h2,
  .receipt-result-dialog__panel h2
) {
  font-size: var(--game-type-title);
  line-height: 1.08;
  letter-spacing: 0;
  text-wrap: balance;
}

.phone-stage :is(
  .timeout-dialog__panel > p,
  .fatal-error-dialog__panel > p:not(.fatal-error-dialog__eyebrow),
  .pause-dialog__panel > p,
  .pause-exit-dialog__panel > p:not(.pause-exit-dialog__status),
  .no-lives-modal__panel > p,
  .heart-shop__panel > p,
  .auth-modal__panel > p,
  .referral-modal__description,
  .receipt-modal__intro-lead,
  .receipt-result-dialog__panel > p
) {
  font-size: var(--game-type-subtitle) !important;
  line-height: 1.35 !important;
  letter-spacing: 0;
  text-wrap: balance;
}

.phone-stage :is(
  .no-lives-modal__timer span,
  .no-lives-modal__code-form label,
  .auth-modal__panel label,
  .referral-modal__friend-code > label,
  .receipt-modal__manual label,
  .receipt-modal__moderation-form label:not(.receipt-modal__consent)
) {
  font-size: var(--game-type-label);
  line-height: 1.2;
  letter-spacing: 0;
}

/* The referral screen uses fixed vertical zones, so its long explanatory
   copy needs a compact scale while the main heading keeps its standard size. */
.phone-stage .referral-modal .referral-modal__panel > p.referral-modal__description {
  top: 11.4%;
  height: 82px;
  padding-inline: 8px;
  font-size: 12px !important;
  line-height: 1.15 !important;
}

.phone-stage .referral-modal .referral-modal__panel > p.referral-modal__description strong {
  font-size: inherit !important;
  line-height: inherit !important;
}

.phone-stage :is(
  .timeout-dialog__panel,
  .fatal-error-dialog__panel,
  .pause-dialog__panel,
  .pause-exit-dialog__panel,
  .win-dialog__panel,
  .no-lives-modal__panel,
  .heart-shop__panel,
  .ticket-shop__panel,
  .receipt-modal__panel,
  .account-modal__panel,
  .auth-modal__panel,
  .receipts-modal__panel,
  .faq-modal__inner,
  .rewards-modal__panel,
  .operations-modal__panel,
  .referral-modal__panel,
  .spar-house-modal__panel,
  .receipt-result-dialog__panel
) .text-button {
  font-size: var(--game-type-button);
  line-height: 1.12;
  letter-spacing: 0;
}

.phone-stage .no-lives-modal__code-form input {
  font-size: var(--game-type-subtitle);
  letter-spacing: 0.025em;
}

.phone-stage :is(
  .no-lives-modal__status,
  .no-lives-modal__input-error,
  .referral-modal__status,
  .referral-modal__input-error
) {
  font-size: var(--game-type-caption) !important;
}

.phone-stage .account-modal__operations {
  font-size: clamp(14px, calc(var(--stage-w) * 0.038), 16px);
  white-space: nowrap;
  overflow-wrap: normal;
}

/* Receipt entry card: camera and gallery are equally clear starting points. */
.phone-stage .receipt-modal__slides {
  padding: 58px 18px 24px;
}

.phone-stage .receipt-modal__intro {
  width: min(100%, 366px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(14px, 2.1cqh, 18px);
  padding: clamp(26px, 4.5cqh, 36px) clamp(20px, 6cqw, 26px) clamp(24px, 4cqh, 32px);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.phone-stage .receipt-modal__intro > h2 {
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(8, 69, 135, 0.42);
}

.phone-stage .receipt-modal__intro-lead {
  max-width: 300px;
  color: #ffffff !important;
  font-weight: 600 !important;
  text-shadow: 0 2px 4px rgba(8, 69, 135, 0.56);
}

.phone-stage .receipt-modal__upload-zone {
  width: 100%;
  min-height: clamp(190px, 30cqh, 250px);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  padding: 24px 18px;
  border: 3px dashed #43a9df;
  border-radius: 26px;
  background: linear-gradient(180deg, #eff8ff 0%, #e8f3ff 100%);
  color: #0a335c;
  text-align: center;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.phone-stage .receipt-modal__upload-zone > span {
  color: #0a7ac9;
  font-size: clamp(48px, 12cqw, 64px);
  font-weight: 300;
  line-height: 0.8;
}

.phone-stage .receipt-modal__upload-zone > strong {
  font-size: clamp(16px, 4.2cqw, 19px);
  font-weight: 850;
  line-height: 1.18;
}

.phone-stage .receipt-modal__upload-zone:hover {
  border-color: #0a7ac9;
  background: #e4f3ff;
  transform: translateY(-1px);
}

.phone-stage .receipt-modal__upload-zone:focus-visible {
  outline: 4px solid rgba(69, 169, 223, 0.28);
  outline-offset: 4px;
}

.phone-stage .receipt-modal__intro-actions {
  width: min(100%, 280px);
  display: grid;
  gap: 14px;
}

.phone-stage .receipt-modal__intro-actions .text-button {
  width: 100%;
  min-height: 54px;
  margin: 0;
  font-size: var(--game-type-button);
}

.phone-stage .receipt-modal.is-scanning .receipt-modal__actions {
  grid-template-columns: minmax(0, 1fr);
}

.phone-stage .receipt-modal.is-scanning .receipt-modal__submit {
  width: 100%;
}

@media (max-height: 700px) {
  .phone-stage .receipt-modal__intro {
    gap: 11px;
    padding-block: 22px;
  }

  .phone-stage .receipt-modal__upload-zone {
    min-height: 170px;
    gap: 12px;
  }

  .phone-stage .receipt-modal__intro-actions {
    gap: 10px;
  }
}

/* First-session guided tutorial */
.tutorial-choice {
  position: absolute;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: clamp(20px, 6cqw, 52px);
  background: rgba(6, 34, 66, 0.76);
  backdrop-filter: blur(7px);
}

.tutorial-choice__panel {
  width: min(100%, 680px);
  padding: clamp(28px, 8cqw, 64px) clamp(22px, 7cqw, 54px);
  border: clamp(4px, 1.1cqw, 8px) solid rgba(255, 255, 255, 0.96);
  border-radius: clamp(28px, 8cqw, 62px);
  background: #fff5e1;
  color: #12375d;
  text-align: center;
  box-shadow:
    0 18px 0 rgba(31, 83, 111, 0.28),
    0 30px 56px rgba(3, 34, 67, 0.38),
    inset 0 0 0 5px rgba(198, 235, 247, 0.58);
}

.game-tutorial__counter {
  display: block;
  color: #0c83ce;
  font-size: clamp(12px, 3.4cqw, 24px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tutorial-choice__panel h2 {
  margin: clamp(8px, 2.4cqw, 18px) 0 0;
  color: #0877c9;
  font-size: clamp(34px, 9.5cqw, 70px);
  font-weight: 950;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-shadow: 0 3px 0 rgba(255, 255, 255, 0.95);
}

.tutorial-choice__panel > p:not(.tutorial-choice__status) {
  margin: clamp(18px, 5cqw, 38px) auto 0;
  max-width: 28em;
  color: #415f7e;
  font-size: clamp(17px, 4.6cqw, 32px);
  font-weight: 700;
  line-height: 1.35;
}

.tutorial-choice__start,
.tutorial-choice__skip,
.game-tutorial__next {
  width: 100%;
  min-height: clamp(58px, 15cqw, 104px);
  font-size: clamp(19px, 5.2cqw, 38px);
}

.tutorial-choice__start {
  margin-top: clamp(28px, 7cqw, 52px);
}

.tutorial-choice__skip {
  margin-top: clamp(14px, 3.8cqw, 28px);
}

.tutorial-choice__status {
  min-height: 1.4em;
  margin: 8px 0 0;
  color: #c93636;
  font-size: clamp(13px, 3.4cqw, 22px);
  font-weight: 800;
}

.game-screen.is-tutorial .game-hud button,
.game-screen.is-tutorial .game-hud [data-balance-action] {
  pointer-events: none;
}

.game-tutorial {
  position: absolute;
  inset: 0;
  z-index: auto;
  pointer-events: none;
}

.game-tutorial__spotlight {
  position: absolute;
  inset: 0;
  z-index: 40;
  border: 0;
  border-radius: 0;
  background: rgba(3, 18, 37, 0.78);
  opacity: 1;
  transition: opacity 180ms ease;
}

.game-tutorial__spotlight.has-target {
  opacity: 1;
}

.game-tutorial__spotlight.is-complete {
  opacity: 1;
}

.game-screen.is-tutorial .has-tutorial-highlighted-child {
  z-index: auto !important;
}

.game-screen.is-tutorial .is-tutorial-highlighted {
  z-index: 41 !important;
  opacity: 1;
  filter: none;
}

.game-tutorial__card {
  position: absolute;
  left: 9.8%;
  right: 9.8%;
  bottom: max(3.5%, calc(var(--safe-bottom) + 10px));
  z-index: 42;
  padding: clamp(20px, 5.8cqw, 44px);
  border: clamp(3px, 0.8cqw, 6px) solid rgba(255, 255, 255, 0.98);
  border-radius: clamp(24px, 7cqw, 52px);
  background: #fff5e1;
  color: #15395e;
  text-align: center;
  pointer-events: auto;
  box-shadow:
    0 10px 0 rgba(26, 89, 128, 0.28),
    0 22px 42px rgba(2, 26, 55, 0.34);
}

.game-tutorial__card.is-top {
  top: 12%;
  bottom: auto;
}

.game-tutorial__card h2 {
  margin: clamp(8px, 2.3cqw, 17px) 0 0;
  color: #0877c9;
  font-size: clamp(26px, 7.2cqw, 52px);
  font-weight: 950;
  line-height: 1.02;
  letter-spacing: -0.025em;
}

.game-tutorial__card p {
  margin: clamp(12px, 3.5cqw, 26px) auto 0;
  max-width: 30em;
  color: #405e7c;
  font-size: clamp(16px, 4.25cqw, 29px);
  font-weight: 750;
  line-height: 1.35;
}

.game-tutorial__next {
  margin-top: clamp(18px, 4.8cqw, 36px);
}

.game-tutorial__card.is-complete {
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
}

.game-tutorial__card.is-complete .game-tutorial__counter,
.game-tutorial__card.is-complete p {
  display: none;
}

.game-tutorial.is-waiting-for-card .game-tutorial__card {
  bottom: 2.4%;
  padding-block: clamp(15px, 4.2cqw, 30px);
}

.game-tutorial.is-waiting-for-card .game-tutorial__card p {
  margin-top: clamp(8px, 2.2cqw, 16px);
}

@media (max-height: 700px) {
  .tutorial-choice__panel {
    padding-block: 24px;
  }

  .game-tutorial__card {
    padding-block: 16px;
  }

  .game-tutorial__next {
    min-height: 52px;
    margin-top: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .game-tutorial__spotlight {
    transition: opacity 100ms linear;
  }
}

/* One checked-state color across every native checkbox in the game. */
.phone-stage input[type="checkbox"] {
  accent-color: #58c70f;
}

/* Responsive button labels: never clip or escape their parent panel. */
.phone-stage button {
  max-width: 100%;
  box-sizing: border-box;
}

.phone-stage :where(
  .text-button,
  .auth-modal__submit,
  .account-modal__operations,
  .account-modal__receipts,
  .account-modal__logout,
  .receipts-modal__upload,
  .pause-dialog__menu,
  .receipt-modal__send,
  .referral-modal__apply,
  .referral-modal__copy
) {
  min-width: 0;
  max-width: 100%;
  padding-inline: clamp(10px, 5cqw, 20px);
  font-size: clamp(12px, 3.8cqw, 16px);
  line-height: 1.08;
  letter-spacing: 0;
  white-space: nowrap;
  overflow-wrap: normal;
}

.phone-stage .auth-modal__submit {
  width: min(100%, 280px);
  padding-inline: clamp(10px, 4cqw, 16px);
  font-size: clamp(12px, 3.55cqw, 15px);
}

/* Modal typography has a deliberately strong selector earlier in the cascade.
   Match that specificity so long action labels can still shrink responsively. */
.phone-stage .auth-modal__panel .auth-modal__submit,
.phone-stage .account-modal__panel .account-modal__operations,
.phone-stage .account-modal__panel .account-modal__receipts,
.phone-stage .account-modal__panel .account-modal__logout,
.phone-stage .receipts-modal__panel .receipts-modal__upload,
.phone-stage .pause-dialog__panel .pause-dialog__menu,
.phone-stage .receipt-modal__panel .receipt-modal__send,
.phone-stage .referral-modal__panel .referral-modal__apply,
.phone-stage .referral-modal__panel .referral-modal__copy {
  font-size: clamp(11px, 3.45cqw, 14px);
}

.phone-stage .account-modal__panel .account-modal__stat--referral,
.phone-stage .account-modal__panel .account-modal__stat--referral > span {
  min-width: 0;
}

.phone-stage :is(
  [data-auth-submit],
  [data-password-reset-confirm],
  [data-reload-after-error],
  [data-moderation-submit],
  [data-open-operations],
  [data-receipt-next]
) {
  font-size: clamp(11px, 3.45cqw, 14px);
  padding-inline: clamp(8px, 3.5cqw, 14px);
}

@media (max-width: 360px) {
  .phone-stage :where(
    .text-button,
    .auth-modal__submit,
    .account-modal__operations,
    .account-modal__receipts,
    .account-modal__logout,
    .receipts-modal__upload,
    .pause-dialog__menu,
    .receipt-modal__send,
    .referral-modal__apply,
    .referral-modal__copy
  ) {
    padding-inline: 9px;
    font-size: 12px;
  }

  .phone-stage :is(
    [data-auth-submit],
    [data-password-reset-confirm],
    [data-reload-after-error],
    [data-moderation-submit],
    [data-open-operations],
    [data-receipt-next]
  ) {
    font-size: 11px;
  }

  .phone-stage .auth-modal__panel .auth-modal__submit,
  .phone-stage .account-modal__panel .account-modal__operations,
  .phone-stage .account-modal__panel .account-modal__receipts,
  .phone-stage .account-modal__panel .account-modal__logout,
  .phone-stage .receipts-modal__panel .receipts-modal__upload,
  .phone-stage .pause-dialog__panel .pause-dialog__menu,
  .phone-stage .receipt-modal__panel .receipt-modal__send,
  .phone-stage .referral-modal__panel .referral-modal__apply,
  .phone-stage .referral-modal__panel .referral-modal__copy {
    padding-inline: 8px;
    font-size: 11px;
  }
}

/* Dedicated receipt camera: scanning first, application form only after QR capture. */
.phone-stage .receipt-modal.is-scanning {
  background: linear-gradient(180deg, #061722 0%, #021019 100%);
}

.phone-stage .receipt-modal.is-scanning .receipt-modal__scanner {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(18px, 2.8cqh, 26px);
  padding: clamp(54px, 8cqh, 68px) clamp(24px, 7cqw, 32px) clamp(30px, 5cqh, 42px);
  overflow: hidden;
}

.phone-stage .receipt-modal.is-scanning .receipt-modal__scanner h2 {
  flex: 0 0 auto;
  color: #ffffff;
  font-size: var(--game-type-title);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.36);
}

.phone-stage .receipt-modal.is-scanning .receipt-modal__camera {
  position: relative;
  width: min(100%, 340px);
  height: min(65cqh, 560px);
  min-height: 360px;
  flex: 1 1 auto;
  aspect-ratio: auto;
  overflow: hidden;
  border: 4px solid #55c9f1;
  border-radius: 28px;
  background: #293b45;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.08),
    0 16px 34px rgba(0, 0, 0, 0.28);
}

.phone-stage .receipt-modal.is-scanning .receipt-modal__camera video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.phone-stage .receipt-modal.is-scanning .receipt-modal__scan-frame {
  inset: 0;
  border: 0;
  border-radius: 24px;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.18);
}

.phone-stage .receipt-modal.is-scanning .receipt-modal__camera .receipt-modal__status {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: auto;
  min-height: 0;
  display: grid;
  place-items: center;
  margin: 0 !important;
  padding: 28px;
  color: #ffffff !important;
  font-size: var(--game-type-subtitle) !important;
  font-weight: 850 !important;
  line-height: 1.28 !important;
  text-align: center;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.72);
  pointer-events: none;
}

.phone-stage .receipt-modal.is-scanning .receipt-modal__camera .receipt-modal__status.is-warning {
  color: #fff4d5 !important;
}

.phone-stage .receipt-modal__capture {
  width: clamp(68px, 18cqw, 82px);
  aspect-ratio: 1;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #2fa8e8;
  box-shadow:
    0 0 0 4px rgba(47, 168, 232, 0.24),
    0 10px 22px rgba(0, 0, 0, 0.28);
  cursor: pointer;
}

.phone-stage .receipt-modal__capture > span {
  width: 76%;
  aspect-ratio: 1;
  display: block;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: #ffffff;
  transition: transform 140ms ease, background-color 140ms ease;
}

.phone-stage .receipt-modal__capture:active > span {
  background: #eaf8ff;
  transform: scale(0.9);
}

.phone-stage .receipt-modal__capture:focus-visible {
  outline: 4px solid rgba(255, 255, 255, 0.9);
  outline-offset: 5px;
}

.phone-stage .receipt-modal.is-moderating .receipt-modal__moderation-form {
  margin-top: clamp(4px, 1cqh, 10px);
}

@media (max-height: 700px) {
  .phone-stage .receipt-modal.is-scanning .receipt-modal__scanner {
    gap: 14px;
    padding-block: 50px 22px;
  }

  .phone-stage .receipt-modal.is-scanning .receipt-modal__camera {
    min-height: 300px;
  }

  .phone-stage .receipt-modal__capture {
    width: 64px;
  }
}
