:root {
  color-scheme: dark;
  --frame-width: min(100%, 1180px);
  --promo-rail-width: 216px;
  --bg: #030713;
  --panel: rgba(8, 15, 31, 0.76);
  --panel-strong: rgba(13, 24, 48, 0.88);
  --line: rgba(129, 231, 255, 0.24);
  --text: #f2fbff;
  --muted: #9eb0c5;
  --cyan: #55e6ff;
  --mint: #74ffc2;
  --emerald: #0f6f58;
  --emerald-strong: #074737;
  --amber: #ffd36f;
  --pink: #ff6fae;
  --danger: #ff6577;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  touch-action: manipulation;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  background:
    radial-gradient(circle at 78% 12%, rgba(255, 111, 174, 0.16), transparent 28%),
    radial-gradient(circle at 16% 82%, rgba(85, 230, 255, 0.18), transparent 34%),
    linear-gradient(145deg, #030713 0%, #081126 48%, #120d24 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button {
  min-width: 112px;
  height: 44px;
  border: 1px solid rgba(129, 231, 255, 0.32);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(38, 61, 96, 0.94), rgba(16, 31, 57, 0.94));
  color: var(--text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 10px 26px rgba(0, 0, 0, 0.24);
}

button:hover {
  border-color: rgba(116, 255, 194, 0.46);
}

button:active {
  transform: translateY(1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
  transform: none;
}

.play-cta:disabled,
.primary-cta:disabled {
  border-color: rgba(129, 231, 255, 0.22);
  background: linear-gradient(180deg, rgba(38, 61, 96, 0.72), rgba(16, 31, 57, 0.72));
  color: rgba(242, 251, 255, 0.62);
  box-shadow: none;
}

.site-layout {
  width: 100vw;
  height: 100dvh;
  display: grid;
  grid-template-columns: var(--promo-rail-width) minmax(0, 1fr) var(--promo-rail-width);
  gap: 12px;
  padding: 12px;
  overflow: hidden;
}

.shell {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 10px;
  justify-items: center;
  overflow: hidden;
}

.promoRail {
  min-height: 0;
  display: grid;
  grid-template-rows: repeat(5, minmax(132px, 1fr));
  align-content: start;
  gap: 10px;
  padding-top: 2px;
  touch-action: pan-y;
  user-select: none;
  transition: opacity 220ms ease, transform 220ms ease;
}

.promoRail.isSwitching {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.hud,
.panel,
.leaderboard {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.hud {
  width: var(--frame-width);
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr)) 46px 46px;
  gap: 8px;
  padding: 10px;
  align-items: stretch;
}

.hud div {
  min-width: 0;
  height: 54px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.045);
}

.label {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hud strong {
  font-size: 22px;
  line-height: 1;
}

.icon-button {
  min-width: 46px;
  width: 46px;
  height: 54px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
  color: var(--mint);
}

#game {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  max-height: 100%;
  display: block;
  min-height: 0;
  border: 1px solid rgba(115, 206, 255, 0.26);
  border-radius: 8px;
  background: #030713;
  box-shadow: inset 0 0 70px rgba(85, 230, 255, 0.08);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.game-stage {
  position: relative;
  width: var(--frame-width);
  height: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.game-play-button {
  position: absolute;
  left: 50%;
  top: calc(50% + 66px);
  z-index: 2;
  width: min(260px, 58%);
  height: 58px;
  min-width: 180px;
  transform: translateX(-50%);
  border-radius: 12px;
  border-color: rgba(255, 211, 111, 0.82);
  background:
    linear-gradient(180deg, rgba(255, 238, 152, 0.98), rgba(255, 174, 55, 0.98)),
    radial-gradient(circle at 28% 0%, rgba(255, 255, 255, 0.5), transparent 42%);
  color: #201305;
  font-size: 18px;
  font-weight: 950;
  box-shadow:
    0 0 38px rgba(255, 211, 111, 0.34),
    0 16px 36px rgba(242, 169, 59, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.52);
}

.game-play-button:hover {
  border-color: rgba(255, 244, 191, 0.95);
  background:
    linear-gradient(180deg, rgba(255, 246, 188, 1), rgba(255, 191, 73, 1)),
    radial-gradient(circle at 28% 0%, rgba(255, 255, 255, 0.56), transparent 42%);
}

.shell:fullscreen {
  padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 78% 12%, rgba(255, 111, 174, 0.16), transparent 28%),
    radial-gradient(circle at 16% 82%, rgba(85, 230, 255, 0.18), transparent 34%),
    linear-gradient(145deg, #030713 0%, #081126 48%, #120d24 100%);
  grid-template-rows: auto 1fr;
}

.shell:fullscreen .panel,
.shell:fullscreen .site-footer {
  display: none;
}

.shell:fullscreen #game {
  width: 100%;
}

.panel {
  width: var(--frame-width);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.status {
  min-width: 0;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(20px, 4vw, 32px);
  line-height: 1.05;
}

h2 {
  font-size: 18px;
}

p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.panel .actions button {
  min-width: 112px;
}

.site-footer {
  width: var(--frame-width);
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 9px 12px;
  border: 1px solid rgba(129, 231, 255, 0.16);
  border-radius: 8px;
  background: rgba(5, 13, 28, 0.52);
  color: #9eb0c5;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.footer-link {
  width: auto;
  min-width: 0;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--mint);
  font: inherit;
  font-weight: 900;
  text-decoration: none;
}

.footer-link:hover {
  color: #f2fbff;
  text-decoration: underline;
}

.leaderboard {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 50%;
  right: auto;
  bottom: auto;
  transform: translate(-50%, -50%);
  width: min(720px, calc(100% - 28px));
  max-height: min(78vh, 620px);
  overflow: auto;
  padding: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(116, 255, 194, 0.1), transparent 36%),
    var(--panel-strong);
}

.share-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.share-actions button {
  width: 100%;
  min-width: 0;
  padding: 0 10px;
  font-size: 13px;
}

.play-cta {
  grid-column: span 2;
  border-color: rgba(255, 211, 111, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 242, 184, 0.98), rgba(245, 178, 69, 0.98)),
    radial-gradient(circle at 30% 0%, rgba(255, 255, 255, 0.5), transparent 42%);
  color: #1e1203;
  box-shadow: 0 0 28px rgba(255, 211, 111, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.social-button {
  min-width: 0;
  font-size: 18px;
  font-weight: 950;
}

#telegramShareButton { color: #8fd8ff; }
#xShareButton { color: #ffffff; }
#whatsappShareButton { color: #85ffc4; }
#facebookShareButton { color: #9fc3ff; }
#redditShareButton { color: #ffb18a; }
#linkedinShareButton { color: #9ad8ff; }
#vkShareButton { color: #b8cfff; }
#copyShareButton { color: #ffd36f; }

.leaderboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

#closeLeaderboard {
  min-width: 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 20px;
}

ol {
  margin: 0;
  padding-left: 28px;
}

li {
  padding: 10px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.leaderboard-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
}

.leaderboard-copy {
  min-width: 0;
}

.row-main {
  display: block;
  font-weight: 800;
}

.row-main span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-sub {
  color: var(--muted);
  font-size: 12px;
}

.leaderboard-score {
  min-width: 92px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: #f2fbff;
  font-size: 30px;
  line-height: 1;
  font-weight: 950;
}

.leaderboard-replay {
  min-width: 112px;
  height: 36px;
  padding: 0 10px;
  font-size: 12px;
  color: #06111c;
  border-color: rgba(116, 255, 194, 0.72);
  background: linear-gradient(180deg, #78ffd2, #21c995);
}

.leaderboard-replay:disabled {
  color: var(--muted);
  border-color: rgba(129, 231, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  cursor: default;
  box-shadow: none;
}

.profile-modal,
.replay-modal,
.shop-modal,
.collection-modal,
.confirm-modal,
.case-modal,
.promo-submit-modal,
.privacy-modal {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(3, 7, 19, 0.62);
  backdrop-filter: blur(8px);
  z-index: 4;
}

.replay-modal {
  background:
    radial-gradient(circle at 50% 20%, rgba(116, 255, 194, 0.12), transparent 32%),
    rgba(3, 7, 19, 0.72);
  z-index: 5;
}

.shop-modal {
  background:
    radial-gradient(circle at 24% 22%, rgba(255, 211, 111, 0.12), transparent 30%),
    radial-gradient(circle at 78% 76%, rgba(85, 230, 255, 0.12), transparent 30%),
    rgba(3, 7, 19, 0.72);
  z-index: 5;
}

.confirm-modal,
.case-modal,
.promo-submit-modal,
.privacy-modal {
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 211, 111, 0.16), transparent 32%),
    radial-gradient(circle at 76% 76%, rgba(185, 133, 255, 0.16), transparent 34%),
    rgba(3, 7, 19, 0.74);
  z-index: 7;
}

.promo-submit-modal {
  position: fixed;
  z-index: 40;
}

.privacy-modal {
  position: fixed;
  z-index: 42;
}

.modalCloseButton {
  min-width: 52px;
  width: 52px;
  height: 52px;
  font-size: 30px;
  line-height: 1;
}

.result-modal {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    radial-gradient(circle at 50% 34%, rgba(85, 230, 255, 0.18), transparent 30%),
    radial-gradient(circle at 70% 72%, rgba(255, 111, 174, 0.18), transparent 28%),
    rgba(3, 7, 19, 0.66);
  backdrop-filter: blur(12px);
  z-index: 3;
}

.profile-card,
.replay-card,
.shop-card,
.collection-card,
.confirm-card,
.case-card,
.result-card,
.privacy-card {
  width: min(560px, 100%);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(28, 50, 89, 0.96), rgba(7, 14, 31, 0.97)),
    var(--panel-strong);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.52), 0 0 80px rgba(85, 230, 255, 0.12);
}

.privacy-card {
  width: min(720px, 100%);
  display: grid;
  gap: 16px;
}

.privacy-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.privacy-head h2 {
  font-size: clamp(28px, 6vw, 48px);
  line-height: 1;
}

.privacy-copy {
  display: grid;
  gap: 10px;
}

.privacy-copy p {
  color: #c4d2e3;
  line-height: 1.55;
}

.privacy-support {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(260px, 100%);
  height: 48px;
  color: #06111c;
  text-decoration: none;
}

.shop-card {
  width: min(980px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
}

.collection-card {
  width: min(1040px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
}

.shop-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 16px;
}

.shop-head h2 {
  font-size: clamp(26px, 5vw, 40px);
}

.modal-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

#closeShopButton,
#closeCollectionButton {
  min-width: 48px;
  width: 48px;
  height: 48px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
}

.shop-balance {
  width: 118px;
  height: 48px;
  border: 1px solid rgba(255, 211, 111, 0.32);
  border-radius: 10px;
  padding: 7px 12px;
  background: rgba(255, 211, 111, 0.08);
  text-align: center;
}

.shop-balance span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.shop-balance strong {
  display: block;
  color: #ffd36f;
  font-size: 22px;
  line-height: 1;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.case-store {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.promo-strip {
  width: var(--frame-width);
  margin: 10px auto 0;
  display: none;
  grid-template-columns: 1fr;
  gap: 10px;
}

.promo-strip[hidden] {
  display: none;
}

@media (min-width: 721px) {
  #promoStrip,
  .promo-strip {
    display: none !important;
  }
}

.promoCard,
[data-promo-card] {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 132px;
  display: grid;
  grid-template-rows: 42px minmax(0, 1fr) 28px;
  gap: 8px;
  place-items: center;
  padding: 12px;
  border: 1px solid rgba(129, 231, 255, 0.24);
  border-radius: 8px;
  overflow: hidden;
  color: #f2fbff;
  text-align: center;
  text-decoration: none;
  background:
    radial-gradient(circle at 50% 0%, rgba(85, 230, 255, 0.18), transparent 44%),
    linear-gradient(145deg, rgba(24, 43, 78, 0.86), rgba(8, 16, 34, 0.94));
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

button.promoCard,
button[data-promo-card] {
  height: auto;
  cursor: pointer;
  font: inherit;
}

.promoCard::before,
[data-promo-card]::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(15, 111, 88, 0.18), transparent 42%),
    linear-gradient(315deg, rgba(255, 111, 174, 0.1), transparent 42%);
  opacity: 0.72;
}

.promoCard:hover,
[data-promo-card]:hover {
  transform: translateY(-2px);
  border-color: rgba(116, 255, 194, 0.56);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28), 0 0 24px rgba(85, 230, 255, 0.14);
}

.promoRail > [data-promo-card] {
  min-height: 132px;
}

.promoIconWrap,
.emptyPromoIcon {
  position: relative;
  z-index: 1;
  width: 42px;
  height: 42px;
  border-radius: 8px;
}

.promoIconWrap {
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(116, 255, 194, 0.16), transparent 42%),
    linear-gradient(145deg, rgba(10, 71, 56, 0.96), rgba(11, 21, 42, 0.96));
  box-shadow: inset 0 0 0 1px rgba(116, 255, 194, 0.22);
}

.promoIconWrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.promoIconWrap.is-broken img {
  display: none;
}

.promoFallbackIcon {
  display: none;
  width: 100%;
  height: 100%;
  place-items: center;
  color: #eafff7;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.promoIconWrap.is-broken .promoFallbackIcon {
  display: grid;
}

.emptyPromoIcon {
  display: grid;
  place-items: center;
  color: #eafff7;
  font-size: 26px;
  font-weight: 950;
  line-height: 1;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.22), transparent 38%),
    linear-gradient(180deg, #16866a, var(--emerald-strong));
  box-shadow: 0 10px 22px rgba(7, 71, 55, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.promoText,
[data-promo-copy] {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 4px;
}

.promoText b,
.promoText small,
[data-promo-copy] b,
[data-promo-copy] small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.promoText b,
[data-promo-copy] b {
  color: #f8fdff;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.18;
  white-space: nowrap;
}

.promoText small,
[data-promo-copy] small {
  display: -webkit-box;
  min-height: 2.5em;
  color: #b8c9de;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.promoTimer,
[data-promo-timer] {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(116, 255, 194, 0.22);
  border-radius: 999px;
  color: var(--mint);
  background: rgba(5, 14, 30, 0.52);
  font-size: 11px;
  font-weight: 950;
}

.emptyPromoCard {
  grid-template-rows: 42px auto;
  align-content: center;
  justify-items: center;
  gap: 10px;
  border-style: dashed;
  border-color: rgba(15, 111, 88, 0.6);
}

.emptyPromoCard .promoText {
  justify-items: center;
}

.emptyPromoCard .emptyPromoIcon {
  align-self: end;
  justify-self: center;
}

.reservedPromoCard {
  cursor: default;
  border-color: rgba(255, 211, 111, 0.36);
  background:
    linear-gradient(145deg, rgba(255, 211, 111, 0.1), transparent 58%),
    rgba(15, 23, 42, 0.78);
}

.reservedPromoCard:hover {
  transform: none;
}

.reservedPromoCard .emptyPromoIcon {
  color: #1d1604;
  background: linear-gradient(180deg, #ffe89a, #d6a738);
}

.reservedPromoCard .promoTimer,
.reservedPromoCard .promoText small {
  color: var(--amber);
}

.promoForm {
  width: min(700px, 100%);
  max-height: min(90dvh, 760px);
  overflow: auto;
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(129, 231, 255, 0.28);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 0%, rgba(85, 230, 255, 0.15), transparent 36%),
    radial-gradient(circle at 84% 20%, rgba(255, 111, 174, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(20, 39, 74, 0.98), rgba(6, 15, 32, 0.98));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
}

.promoFormHeader {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
}

.promoFormHeader h3 {
  margin: 2px 0 0;
  font-size: clamp(30px, 4.2vw, 48px);
  line-height: 1;
}

.promoFormStep,
.promoPaymentCard span,
.promoFields span {
  color: var(--mint);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.promoPaymentCard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(116, 255, 194, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(116, 255, 194, 0.1), transparent 56%),
    rgba(255, 255, 255, 0.045);
}

.promoRateBadge {
  width: 100%;
  min-height: 70px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 10px;
  padding: 10px;
  border: 1px solid rgba(15, 111, 88, 0.5);
  border-radius: 8px;
  background:
    radial-gradient(circle at 14% 50%, rgba(116, 255, 194, 0.16), transparent 48%),
    linear-gradient(135deg, rgba(15, 111, 88, 0.22), rgba(7, 71, 55, 0.08));
}

.promoRateIcon {
  grid-row: 1 / 3;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.24), transparent 40%),
    linear-gradient(180deg, #16866a, #063c2f);
  box-shadow: 0 12px 28px rgba(7, 71, 55, 0.34);
}

.promoRateIcon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.promoRateBadge strong {
  color: #f2fbff;
  font-size: 21px;
  line-height: 1.05;
}

.promoRateBadge small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.promoPaymentTop {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.promoPaymentTop strong {
  display: block;
  margin-top: 2px;
  font-size: 17px;
}

.promoPaymentRow {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.promoPaymentRow code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 10px;
  border: 1px solid rgba(129, 231, 255, 0.18);
  border-radius: 8px;
  color: #d9f7ff;
  background: rgba(3, 7, 19, 0.48);
}

.copyButton {
  min-width: 78px;
}

.promoPaymentCard p,
.promoFormActions p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.promoHelpText a {
  color: var(--mint);
  font-weight: 950;
}

.promoFields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.promoFields label {
  display: grid;
  gap: 6px;
}

.promoFields .wideField {
  grid-column: 1 / -1;
}

.promoFields input,
.promoFields textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(129, 231, 255, 0.32);
  border-radius: 8px;
  padding: 0 13px;
  background: rgba(3, 7, 19, 0.56);
  color: #f2fbff;
  font: inherit;
  font-weight: 800;
  outline: none;
}

.promoFields textarea {
  min-height: 74px;
  padding-top: 10px;
  resize: vertical;
}

.promoFields input:focus,
.promoFields textarea:focus {
  border-color: rgba(116, 255, 194, 0.78);
  box-shadow: 0 0 0 3px rgba(116, 255, 194, 0.12);
}

.promoFormActions {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  gap: 12px;
  align-items: center;
}

.promoFormActions .primary-cta {
  width: 100%;
}

.copyStatus {
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.copyStatus.success {
  color: var(--mint);
}

.copyStatus.error {
  color: var(--danger);
}

.case-product {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  gap: 16px;
  align-items: start;
  border: 1px solid rgba(255, 211, 111, 0.28);
  border-radius: 14px;
  padding: 14px;
  background:
    radial-gradient(circle at 12% 36%, rgba(255, 211, 111, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(255, 211, 111, 0.08), rgba(85, 230, 255, 0.05));
}

.case-product .case-buy-panel {
  grid-column: 1 / -1;
  align-self: end;
}

.case-product-stellar {
  border-color: rgba(255, 157, 240, 0.38);
  background:
    radial-gradient(circle at 14% 24%, rgba(255, 157, 240, 0.2), transparent 34%),
    radial-gradient(circle at 86% 70%, rgba(116, 255, 194, 0.12), transparent 35%),
    linear-gradient(135deg, rgba(185, 133, 255, 0.12), rgba(255, 211, 111, 0.05));
}

.case-art,
.case-mini {
  position: relative;
  height: 96px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 211, 111, 0.7);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 211, 111, 0.32), rgba(255, 111, 174, 0.12)),
    rgba(255, 255, 255, 0.05);
  color: #fff4bf;
  box-shadow: 0 0 34px rgba(255, 211, 111, 0.24);
  overflow: hidden;
}

.stellar-art {
  border-color: rgba(255, 157, 240, 0.78);
  color: #ffe3fb;
  background:
    radial-gradient(circle at 50% 38%, rgba(116, 255, 194, 0.22), transparent 38%),
    linear-gradient(135deg, rgba(185, 133, 255, 0.34), rgba(255, 157, 240, 0.18));
  box-shadow: 0 0 38px rgba(255, 157, 240, 0.28);
}

.case-art span,
.case-mini span {
  position: absolute;
  inset: 20px;
  border: 2px solid rgba(255, 244, 191, 0.28);
  border-radius: 12px;
}

.case-art strong,
.case-mini strong {
  position: relative;
  font-size: 20px;
  letter-spacing: 0;
}

.case-product h3,
.collection-title {
  margin: 0 0 6px;
}

.case-product p {
  margin: 0;
}

.case-odds {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.case-odds span {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 5px 8px;
  color: #d9f7ff;
  background: rgba(255, 255, 255, 0.06);
  font-size: 11px;
  font-weight: 900;
}

.case-buy-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: center;
  text-align: left;
  margin-top: auto;
}

.case-buy-panel span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.case-buy-panel strong {
  color: var(--amber);
  font-size: 22px;
}

.case-buy-panel button {
  width: 100%;
  min-width: 0;
}

.case-product-stellar .case-buy-panel {
  grid-template-columns: 1fr 1fr;
}

.ape-payment-box,
.case-tx-input {
  grid-column: 1 / -1;
}

.ape-payment-box {
  display: grid;
  grid-template-columns: minmax(82px, auto) 1fr;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 6px;
  border: 1px solid rgba(116, 255, 194, 0.22);
  border-radius: 12px;
  background:
    radial-gradient(circle at 82% 50%, rgba(116, 255, 194, 0.15), transparent 46%),
    rgba(5, 14, 30, 0.34);
}

.ape-payment-box span {
  justify-content: center;
  color: #74ffc2;
}

.ape-payment-box button {
  min-height: 34px;
  font-size: 13px;
  color: #d9f7ff;
}

.case-tx-input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid rgba(129, 231, 255, 0.35);
  border-radius: 12px;
  padding: 0 12px;
  background: rgba(7, 17, 35, 0.72);
  color: #f1fbff;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  outline: none;
}

.case-tx-input:focus {
  border-color: rgba(116, 255, 194, 0.78);
  box-shadow: 0 0 0 3px rgba(116, 255, 194, 0.12);
}

.case-tx-input::placeholder {
  color: rgba(217, 247, 255, 0.48);
}

.collection-title {
  color: #d9f7ff;
  font-size: 18px;
}

.robot-card {
  min-width: 0;
  height: auto;
  min-height: 240px;
  padding: 14px;
  display: grid;
  grid-template-rows: 98px auto auto auto auto auto;
  gap: 8px;
  text-align: left;
  border-color: rgba(129, 231, 255, 0.22);
  background:
    radial-gradient(circle at 50% 28%, color-mix(in srgb, var(--grade-color, #55e6ff) 18%, transparent), transparent 42%),
    linear-gradient(180deg, rgba(24, 43, 78, 0.92), rgba(8, 16, 34, 0.96));
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.robot-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28), 0 0 28px color-mix(in srgb, var(--grade-color, #55e6ff) 18%, transparent);
}

.robot-card.is-selected {
  border-color: rgba(116, 255, 194, 0.78);
  box-shadow: 0 0 34px rgba(116, 255, 194, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.robot-card.is-locked {
  cursor: not-allowed;
  opacity: 0.45;
  filter: grayscale(0.75) saturate(0.55);
  border-color: rgba(129, 231, 255, 0.12);
  background:
    radial-gradient(circle at 50% 28%, rgba(129, 231, 255, 0.07), transparent 42%),
    linear-gradient(180deg, rgba(18, 29, 52, 0.72), rgba(5, 11, 24, 0.88));
  box-shadow: none;
}

.robot-card.is-locked:hover {
  transform: none;
  box-shadow: none;
}

.robot-card.is-locked .robot-preview,
.robot-card.is-locked h3,
.robot-card.is-locked p,
.robot-card.is-locked .robot-price,
.robot-card.is-locked em {
  opacity: 0.72;
}

.robot-card.is-locked .robot-sprite {
  animation: none;
}

.robot-card.is-locked .robot-sprite::before {
  background: linear-gradient(135deg, rgba(217, 247, 255, 0.2), rgba(129, 231, 255, 0.08));
  border-color: rgba(217, 247, 255, 0.26);
  box-shadow: none;
}

.robot-card.is-locked .robot-sprite::after {
  background: rgba(3, 7, 19, 0.72);
  box-shadow: inset 0 0 0 2px rgba(217, 247, 255, 0.14);
}

.robot-card em {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 26px;
  border: 1px solid color-mix(in srgb, var(--grade-color) 55%, transparent);
  border-radius: 999px;
  color: var(--grade-color);
  background: color-mix(in srgb, var(--grade-color) 12%, transparent);
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
  text-transform: uppercase;
}

.robot-preview {
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
}

.robot-sprite {
  width: 76px;
  height: 56px;
  position: relative;
  animation: ship-float 2.8s ease-in-out infinite;
}

@keyframes ship-float {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-5px) rotate(1deg); }
}

.robot-sprite::before {
  content: "";
  position: absolute;
  inset: 7px 9px;
  border: 4px solid var(--bot-stroke, #14324a);
  border-radius: var(--bot-radius, 12px);
  background: linear-gradient(135deg, var(--bot-a, #ffffff), var(--bot-b, #7db5d6));
  box-shadow: 0 0 16px color-mix(in srgb, var(--bot-glow, #55e6ff) 42%, transparent);
}

.robot-sprite::after {
  content: "";
  position: absolute;
  left: 24px;
  top: 18px;
  width: 28px;
  height: 18px;
  border-radius: 5px;
  background: #0d2035;
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--bot-glow, #74ffc2) 32%, transparent);
}

.robot-nova .robot-sprite::before {
  border-radius: 999px;
  inset: 12px 5px;
}

.robot-tank .robot-sprite::before {
  inset: 9px 2px 8px;
  border-radius: 7px;
  clip-path: polygon(0 18%, 36% 18%, 45% 0, 74% 18%, 100% 18%, 100% 84%, 0 84%);
}

.robot-tank .robot-sprite {
  border-bottom: 8px solid rgba(0, 0, 0, 0.22);
  border-radius: 0 0 14px 14px;
}

.robot-stealth .robot-sprite::before {
  inset: 8px 3px;
  border-radius: 0;
  clip-path: polygon(0 50%, 28% 0, 100% 20%, 82% 100%, 24% 82%);
}

.robot-courier .robot-sprite::before {
  inset: 14px 1px 8px;
  border-radius: 999px 22px 22px 999px;
  clip-path: polygon(0 38%, 18% 0, 72% 0, 100% 45%, 82% 100%, 12% 100%);
}

.robot-retro .robot-sprite::before {
  inset: 4px 13px 5px;
  border-radius: 5px;
}

.robot-retro .robot-sprite {
  border-top: 13px solid transparent;
}

.robot-retro .robot-sprite::after {
  top: 20px;
}

.robot-aurora .robot-sprite::before {
  inset: 14px 0 9px;
  border-radius: 999px 42px 999px 42px;
  clip-path: polygon(0 50%, 28% 0, 74% 10%, 100% 50%, 74% 90%, 28% 100%);
}

.robot-aurora .robot-sprite::after {
  left: 28px;
  top: 21px;
  width: 22px;
  height: 14px;
  border-radius: 999px;
}

.robot-prism .robot-sprite::before {
  inset: 4px 7px;
  border-radius: 12px;
  clip-path: polygon(50% 0, 100% 34%, 82% 100%, 18% 100%, 0 34%);
}

.robot-prism .robot-sprite::after {
  left: 27px;
  top: 17px;
  width: 22px;
  height: 22px;
  transform: rotate(45deg);
}

.robot-solar .robot-sprite::before {
  inset: 8px 3px;
  border-radius: 16px;
  clip-path: polygon(0 50%, 16% 10%, 36% 26%, 50% 0, 64% 26%, 84% 10%, 100% 50%, 84% 90%, 16% 90%);
}

.robot-solar .robot-sprite::after {
  left: 26px;
  top: 18px;
  width: 24px;
  height: 18px;
  border-radius: 999px;
}

.robot-void .robot-sprite::before {
  inset: 10px 0;
  border-radius: 999px;
  clip-path: polygon(0 50%, 24% 4%, 50% 22%, 76% 4%, 100% 50%, 76% 96%, 50% 78%, 24% 96%);
}

.robot-void .robot-sprite::after {
  left: 30px;
  top: 19px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  box-shadow: 0 0 18px var(--bot-glow), inset 0 0 0 2px color-mix(in srgb, var(--bot-glow) 45%, transparent);
}

.robot-card h3 {
  margin: 0;
  font-size: 18px;
}

.robot-card p {
  min-height: 38px;
  font-size: 12px;
  line-height: 1.25;
}

.robot-card .robot-perk {
  min-height: 34px;
  margin: 0;
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--grade-color, #55e6ff) 26%, transparent);
  border-radius: 8px;
  color: #d9f7ff;
  background: color-mix(in srgb, var(--grade-color, #55e6ff) 10%, transparent);
  font-size: 11px;
  font-weight: 850;
}

.robot-card span {
  color: var(--mint);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.robot-card .robot-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 32px;
  border-radius: 8px;
  padding: 0 10px;
  background: rgba(255, 211, 111, 0.08);
  color: #ffd36f;
  font-size: 13px;
  font-weight: 900;
}

.confirm-card {
  width: min(520px, calc(100vw - 28px));
  padding: 22px;
  text-align: center;
  justify-items: center;
}

.confirm-card h2 {
  margin: 0 0 8px;
  font-size: clamp(32px, 7vw, 48px);
  line-height: 1.02;
}

.confirm-card p {
  max-width: 420px;
  margin: 0 auto 12px;
}

.case-purchase-summary {
  width: min(380px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 auto 14px;
}

.case-purchase-summary div {
  min-height: 64px;
  display: grid;
  place-items: center;
  gap: 2px;
  border: 1px solid rgba(255, 211, 111, 0.24);
  border-radius: 10px;
  background: rgba(255, 211, 111, 0.07);
}

.case-purchase-summary span,
.case-quantity-control span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.case-purchase-summary strong {
  color: var(--amber);
  font-size: 28px;
  line-height: 1;
}

.case-mini {
  width: min(320px, 100%);
  height: 108px;
  margin: 0 auto 14px;
}

.case-quantity-control {
  width: min(380px, 100%);
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  gap: 8px;
  align-items: stretch;
  margin: 0 auto 12px;
}

.case-quantity-control button {
  width: 56px;
  min-width: 56px;
  min-height: 52px;
  padding: 0;
  font-size: 26px;
}

.case-quantity-control label {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  padding: 7px 12px;
  border: 1px solid rgba(129, 231, 255, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
}

.case-quantity-control input {
  width: 100%;
  border: 0;
  background: transparent;
  color: #f2fbff;
  font: inherit;
  font-size: 24px;
  font-weight: 950;
  text-align: center;
  outline: none;
}

.case-card {
  width: min(1080px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 18px;
  overflow: auto;
}

.case-open-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.case-open-head h2 {
  margin: 0;
  font-size: clamp(30px, 5vw, 56px);
  line-height: 1;
}

#closeCaseOpenButton {
  min-width: 48px;
  width: 48px;
  height: 48px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
}

.roulette-window {
  position: relative;
  overflow: hidden;
  height: 190px;
  border: 1px solid rgba(129, 231, 255, 0.24);
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(3, 7, 19, 0.92), transparent 16%, transparent 84%, rgba(3, 7, 19, 0.92)),
    rgba(255, 255, 255, 0.04);
}

.roulette-marker {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, #ffd36f 20%, #ffd36f 80%, transparent);
  box-shadow: 0 0 22px rgba(255, 211, 111, 0.8);
}

.roulette-track {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 330px;
  will-change: transform;
}

.roulette-item {
  flex: 0 0 146px;
  height: 154px;
  display: grid;
  grid-template-rows: 84px auto auto;
  gap: 6px;
  border: 1px solid color-mix(in srgb, var(--grade-color) 64%, transparent);
  border-bottom-width: 5px;
  border-radius: 12px;
  padding: 10px;
  background:
    radial-gradient(circle at 50% 20%, color-mix(in srgb, var(--grade-color) 18%, transparent), transparent 62%),
    rgba(7, 14, 31, 0.95);
  text-align: center;
}

.roulette-item .robot-preview {
  min-height: 0;
}

.roulette-item span {
  color: var(--grade-color);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.roulette-item strong {
  font-size: 13px;
  line-height: 1.1;
}

.case-result {
  margin-top: 14px;
  border: 1px solid rgba(116, 255, 194, 0.22);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.06);
  text-align: center;
}

.case-result p {
  margin: 0;
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
}

.case-result h3 {
  margin: 4px 0;
  font-size: 34px;
}

.case-result span {
  color: #d9f7ff;
  font-weight: 800;
}

.case-open-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 12px;
}

.case-open-actions button {
  width: 100%;
  height: 56px;
}

.toast {
  position: fixed;
  z-index: 30;
  left: 50%;
  top: max(96px, calc(env(safe-area-inset-top) + 96px));
  transform: translate(-50%, -10px);
  max-width: min(560px, calc(100vw - 32px));
  border: 1px solid rgba(116, 255, 194, 0.42);
  border-radius: 12px;
  padding: 12px 16px;
  background:
    linear-gradient(180deg, rgba(24, 43, 78, 0.98), rgba(8, 16, 34, 0.98)),
    var(--panel-strong);
  color: #f2fbff;
  font-size: 15px;
  font-weight: 900;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.36), 0 0 30px rgba(116, 255, 194, 0.16);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.robot-card .robot-price strong {
  color: #fff4bf;
}

.replay-card {
  width: min(980px, calc(100vw - 28px));
  padding: 14px;
}

.replay-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.replay-head h2 {
  font-size: clamp(20px, 4vw, 30px);
  overflow-wrap: anywhere;
}

#closeReplayButton {
  min-width: 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  font-size: 22px;
}

#replayCanvas {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  display: block;
  border: 1px solid rgba(129, 231, 255, 0.28);
  border-radius: 10px;
  background: #030713;
}

.replay-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.replay-controls button {
  width: 100%;
}

.result-card {
  position: relative;
  text-align: center;
}

.result-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--mint);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.result-card h2 {
  font-size: clamp(32px, 7vw, 54px);
  line-height: 0.95;
  text-shadow: 0 0 28px rgba(85, 230, 255, 0.28);
}

.viral-card {
  position: relative;
  overflow: hidden;
  margin: 16px 0;
  border: 1px solid rgba(116, 255, 194, 0.24);
  border-radius: 14px;
  padding: 16px;
  background:
    radial-gradient(circle at 18% 22%, rgba(116, 255, 194, 0.24), transparent 28%),
    radial-gradient(circle at 84% 70%, rgba(255, 111, 174, 0.22), transparent 30%),
    linear-gradient(135deg, rgba(5, 14, 32, 0.95), rgba(18, 35, 72, 0.96));
  box-shadow: inset 0 0 70px rgba(85, 230, 255, 0.08);
}

.viral-card::before {
  content: "";
  position: absolute;
  inset: -35%;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.12), transparent 56%);
  transform: rotate(10deg);
}

.viral-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.viral-top strong {
  color: var(--mint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viral-score {
  position: relative;
  margin: 10px 0 6px;
  color: #ffffff;
  font-size: clamp(54px, 15vw, 108px);
  font-weight: 950;
  line-height: 0.88;
  text-shadow: 0 0 34px rgba(85, 230, 255, 0.44), 0 10px 34px rgba(0, 0, 0, 0.42);
}

.viral-card p {
  position: relative;
  margin: 0;
  color: #d9f7ff;
  font-size: 15px;
  font-weight: 800;
}

.box-reward {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  align-items: center;
  margin: 14px 0;
  border: 1px solid rgba(255, 211, 111, 0.28);
  border-radius: 14px;
  padding: 12px;
  background:
    radial-gradient(circle at 12% 45%, rgba(255, 211, 111, 0.2), transparent 45%),
    rgba(255, 255, 255, 0.05);
  text-align: left;
}

.box-reward span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.box-reward strong {
  display: block;
  color: #ffd36f;
  font-size: 34px;
  line-height: 1;
}

.box-reward p {
  margin: 4px 0 0;
  color: #d9f7ff;
  font-size: 13px;
  font-weight: 800;
}

.reward-box {
  width: 72px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 4px solid #ffd36f;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 211, 111, 0.3), rgba(255, 143, 111, 0.16));
  color: #fff4bf;
  font: 900 16px monospace;
  box-shadow: 0 0 26px rgba(255, 211, 111, 0.38);
  animation: reward-bob 1.1s ease-in-out infinite;
}

@keyframes reward-bob {
  0%, 100% { transform: translateY(0) rotate(-5deg) scale(1); }
  50% { transform: translateY(-9px) rotate(4deg) scale(1.06); }
}

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

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0;
}

.result-grid div {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.result-grid strong {
  display: block;
  margin-top: 2px;
  font-size: 24px;
}

.register-cta {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  margin: 16px 0 8px;
  padding: 14px;
  border: 1px solid rgba(116, 255, 194, 0.42);
  border-radius: 12px;
  background:
    radial-gradient(circle at 12% 50%, rgba(116, 255, 194, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(23, 86, 85, 0.74), rgba(24, 45, 88, 0.78));
  text-align: left;
  box-shadow: 0 0 36px rgba(116, 255, 194, 0.14);
}

.register-cta strong {
  display: block;
  color: #ffffff;
  font-size: 18px;
}

.register-cta span {
  display: block;
  margin-top: 2px;
  color: #c9e8ef;
  font-size: 13px;
  font-weight: 700;
}

.primary-cta {
  min-width: 160px;
  border-color: rgba(116, 255, 194, 0.46);
  background:
    linear-gradient(180deg, rgba(125, 255, 213, 0.95), rgba(38, 207, 158, 0.95)),
    radial-gradient(circle at 24% 0%, rgba(255, 255, 255, 0.38), transparent 42%);
  color: #031b17;
  box-shadow:
    0 14px 34px rgba(27, 208, 156, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 -1px 0 rgba(0, 74, 57, 0.22);
}

.primary-cta:hover {
  border-color: rgba(181, 255, 229, 0.64);
  background:
    linear-gradient(180deg, rgba(153, 255, 226, 0.96), rgba(45, 218, 169, 0.96)),
    radial-gradient(circle at 24% 0%, rgba(255, 255, 255, 0.42), transparent 42%);
}

.profile-card label {
  display: block;
  margin: 14px 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-card input {
  width: 100%;
  height: 44px;
  border: 1px solid rgba(129, 231, 255, 0.34);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font: inherit;
  font-weight: 800;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.auth-tabs button {
  width: 100%;
  min-width: 0;
  height: 38px;
  color: var(--muted);
}

.auth-tabs button.is-active {
  border-color: rgba(116, 255, 194, 0.62);
  color: #06111c;
  background: linear-gradient(180deg, rgba(125, 255, 213, 0.95), rgba(38, 207, 158, 0.95));
}

.profile-actions {
  margin-top: 16px;
  gap: 10px;
}

.account-card {
  text-align: left;
}

.account-card h2 {
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1;
  overflow-wrap: anywhere;
}

.account-copy {
  margin-top: 8px;
  color: #c6d8e8;
  font-weight: 700;
}

.account-meter {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(116, 255, 194, 0.28);
  border-radius: 10px;
  background:
    radial-gradient(circle at 18% 50%, rgba(116, 255, 194, 0.18), transparent 36%),
    rgba(255, 255, 255, 0.06);
}

.account-meter span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.account-meter strong {
  color: var(--mint);
}

.account-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.account-actions button {
  width: 100%;
  min-width: 0;
}

@media (max-width: 720px) {
  .toast {
    top: auto;
    bottom: max(14px, env(safe-area-inset-bottom));
    max-width: calc(100vw - 24px);
    transform: translate(-50%, 12px);
  }

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

  .site-layout {
    height: 100dvh;
    display: block;
    padding: 8px;
    overflow: auto;
  }

  .promoRail {
    display: none;
  }

  .shell {
    height: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
    overflow: visible;
  }

  .hud {
    order: 1;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) 44px 44px;
    gap: 6px;
    padding: 8px;
    align-items: stretch;
  }

  .hud div {
    height: 52px;
    padding: 7px;
  }

  .label {
    font-size: 10px;
  }

  .hud strong {
    font-size: 18px;
  }

  .icon-button {
    min-width: 0;
    width: 100%;
    height: 52px;
  }

  .game-stage {
    order: 2;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    min-height: 0;
  }

  #game {
    width: 100%;
    height: auto;
    max-height: none;
  }

  .panel {
    order: 3;
    width: 100%;
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .site-footer {
    order: 5;
    width: 100%;
    margin-bottom: 8px;
    padding: 12px;
    flex-direction: column;
    gap: 8px;
  }

  .footer-link {
    width: 100%;
    min-height: 34px;
    display: grid;
    place-items: center;
  }

  .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .promo-strip {
    order: 0;
    width: 100vw;
    margin: 0 calc(50% - 50vw) 8px;
    display: flex;
    gap: 10px;
    overflow: hidden;
    padding: 2px 8px 6px;
    animation: promo-marquee 42s linear infinite;
    will-change: transform;
    flex-shrink: 0;
    max-height: 74px;
  }

  .promo-strip:active {
    animation-play-state: paused;
  }

  .promo-strip .promoCard,
  .promo-strip [data-promo-card] {
    flex: 0 0 214px;
  }

  .promoCard,
  [data-promo-card] {
    min-height: 66px;
    grid-template-columns: 42px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    justify-items: start;
    gap: 4px 10px;
    padding: 8px 10px;
    text-align: left;
  }

  .promoText b,
  [data-promo-copy] b {
    font-size: 14px;
  }

  .promoText small,
  [data-promo-copy] small {
    min-height: 1.2em;
    max-height: 1.2em;
    font-size: 11px;
    -webkit-line-clamp: 1;
  }

  .promoIconWrap,
  .emptyPromoIcon {
    width: 38px;
    height: 38px;
  }

  .emptyPromoCard .promoText {
    justify-items: start;
  }

  .emptyPromoCard .emptyPromoIcon {
    align-self: center;
    justify-self: center;
  }

  .promoIconWrap,
  .emptyPromoIcon {
    grid-row: 1 / 3;
  }

  .promoTimer {
    display: none;
  }

  .promoFields,
  .promoFormActions {
    grid-template-columns: 1fr;
  }

  .promo-submit-modal {
    padding: 10px;
    align-items: start;
    overflow: auto;
  }

  .privacy-modal {
    padding: 10px;
    align-items: start;
    overflow: auto;
  }

  .privacy-card {
    padding: 16px;
  }

  .privacy-head {
    align-items: center;
  }

  .promoForm {
    width: 100%;
    max-height: none;
    margin: 0;
    gap: 10px;
    padding: 12px;
  }

  .promoFormHeader {
    align-items: center;
  }

  .promoFormHeader h3 {
    font-size: clamp(28px, 9vw, 38px);
  }

  .promoPaymentCard {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
  }

  .promoRateBadge {
    min-height: 58px;
    grid-template-columns: 40px minmax(0, 1fr);
    padding: 8px;
  }

  .promoRateIcon {
    width: 40px;
    height: 40px;
  }

  .promoPaymentRow {
    grid-template-columns: minmax(0, 1fr) 64px;
  }

  .copyButton {
    min-width: 0;
    padding-inline: 8px;
  }

  .promoFields input,
  .promoFields textarea {
    min-height: 42px;
  }

  .promoFields textarea {
    min-height: 66px;
  }

  .account-actions {
    grid-template-columns: 1fr;
  }

  .share-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .shop-grid {
    grid-template-columns: 1fr;
  }

  .case-store {
    grid-template-columns: 1fr;
  }

  .case-product {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .case-buy-panel {
    text-align: center;
  }

  .case-open-actions {
    grid-template-columns: 1fr;
  }

  .shop-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .modal-tools {
    justify-content: stretch;
  }

  .shop-balance {
    flex: 1 1 auto;
    width: auto;
  }

  .register-cta {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .result-card {
    max-height: calc(100vh - 32px);
    overflow: auto;
  }

  .leaderboard-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .leaderboard-copy {
    grid-column: 1 / -1;
  }

  .leaderboard-score {
    min-width: 0;
    justify-content: flex-start;
  }

  .leaderboard-replay {
    width: 100%;
  }

  button {
    width: 100%;
    min-width: 0;
  }

  .promoFormHeader .modalCloseButton {
    width: 48px;
    min-width: 48px;
    height: 48px;
  }
}

@media (max-width: 920px) and (max-height: 520px) and (orientation: landscape) {
  html,
  body {
    width: 100vw;
    height: 100dvh;
    overflow: hidden;
  }

  body {
    overscroll-behavior: none;
  }

  .site-layout {
    width: 100vw;
    height: 100dvh;
    display: block;
    padding:
      max(6px, env(safe-area-inset-top))
      max(8px, env(safe-area-inset-right))
      max(6px, env(safe-area-inset-bottom))
      max(8px, env(safe-area-inset-left));
    overflow: hidden;
  }

  .promoRail,
  .promo-strip,
  .panel,
  .site-footer {
    display: none !important;
  }

  .shell {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: 44px minmax(0, 1fr);
    gap: 6px;
    overflow: hidden;
  }

  .hud {
    width: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(54px, 1fr)) 40px 40px;
    gap: 6px;
    padding: 5px;
  }

  .hud div {
    height: 32px;
    padding: 4px 6px;
    border-radius: 5px;
  }

  .label {
    margin-bottom: 0;
    font-size: 8px;
    line-height: 1;
  }

  .hud strong {
    font-size: 15px;
    line-height: 1;
  }

  .icon-button {
    width: 100%;
    min-width: 0;
    height: 32px;
    border-radius: 7px;
    font-size: 16px;
  }

  .game-stage {
    width: 100%;
    height: 100%;
    min-height: 0;
    aspect-ratio: auto;
    display: grid;
    place-items: center;
    overflow: hidden;
  }

  #game {
    width: auto;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 7px;
  }

  .game-play-button {
    top: 50%;
    width: min(220px, 44vw);
    min-width: 150px;
    height: 44px;
    border-radius: 10px;
    font-size: 16px;
  }

  .toast {
    top: max(54px, env(safe-area-inset-top));
    bottom: auto;
    max-width: min(360px, calc(100vw - 24px));
  }
}
