* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

button:focus-visible {
  outline: 2px solid rgba(139, 124, 246, 0.6);
  outline-offset: 2px;
}

.sub-gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 5, 6, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.sub-gate[hidden] {
  display: none;
}

.sub-gate-card {
  width: 100%;
  max-width: 340px;
  background: #131318;
  border: 1px solid rgba(139, 124, 246, 0.3);
  border-radius: 20px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.icon-sm {
  width: 16px;
  height: 16px;
}

.sub-gate-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(139, 124, 246, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a78bfa;
}

.sub-gate-icon .icon {
  width: 26px;
  height: 26px;
}

.sub-gate-title {
  font-size: 18px;
  font-weight: 800;
  color: #fafafa;
}

.sub-gate-text {
  font-size: 13px;
  line-height: 1.5;
  color: #8b8b98;
  margin-bottom: 8px;
}

.sub-gate-link {
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.sub-gate-check {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

html, body {
  height: 100%;
  background: #050506;
  color: #f5f5f7;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(480px 320px at 85% 8%, rgba(139, 124, 246, 0.14), transparent 70%),
    radial-gradient(420px 300px at 8% 95%, rgba(139, 124, 246, 0.08), transparent 70%);
}

.app {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 16px 32px;
  gap: 16px;
  min-height: 100vh;
  min-height: 100dvh;
}

/* --- топбар с гамбургером --- */

.topbar {
  position: sticky;
  top: 8px;
  z-index: 20;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.hamburger {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #1a1a22;
  border: 1px solid rgba(139, 124, 246, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.hamburger:hover {
  border-color: rgba(139, 124, 246, 0.55);
  background: #201f29;
}

.hamburger-line {
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: #c4b5fd;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.hamburger.open .hamburger-line:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.hamburger.open .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger.open .hamburger-line:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

/* --- выезжающее меню --- */

.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(5, 5, 6, 0.65);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.drawer-overlay[hidden] {
  display: none;
}

.drawer-overlay.visible {
  opacity: 1;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(58vw, 240px);
  z-index: 41;
  background: #0c0c10;
  border-left: 1px solid rgba(139, 124, 246, 0.25);
  box-shadow: -24px 0 48px rgba(0, 0, 0, 0.5);
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.22, 0.8, 0.36, 1);
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 22px 16px;
}

.drawer.open {
  transform: translateX(0);
}

.drawer-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.drawer-close {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #131318;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #d4d4e0;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.drawer-close:hover {
  border-color: rgba(139, 124, 246, 0.4);
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 14px;
  background: #131318;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.drawer-item:hover {
  background: #17171d;
  border-color: rgba(139, 124, 246, 0.35);
}

.drawer-item:active {
  transform: scale(0.98);
}

.drawer-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(139, 124, 246, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c4b5fd;
  flex-shrink: 0;
}

.drawer-icon .icon {
  width: 17px;
  height: 17px;
}

.drawer-label {
  font-size: 14px;
  font-weight: 700;
  color: #fafafa;
}

/* --- главный экран: приветствие --- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 14px 12px 2px;
}

.hero-emoji {
  width: 30px;
  height: 30px;
  margin-bottom: 2px;
  color: #8b7cf6;
  filter: drop-shadow(0 0 10px rgba(139, 124, 246, 0.5));
}

.hero-title {
  font-size: 19px;
  font-weight: 800;
  color: #fafafa;
}

.hero-sub {
  font-size: 13px;
  color: #8b8b98;
  max-width: 280px;
  line-height: 1.4;
}

.screen {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.screen[hidden] {
  display: none;
}

#homeScreen {
  flex: 1;
  justify-content: space-evenly;
  gap: 20px;
}

.back-btn {
  align-self: flex-start;
  background: #131318;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: #d4d4e0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 16px;
  transition: border-color 0.15s, transform 0.1s;
}

.back-btn:hover {
  border-color: rgba(139, 124, 246, 0.4);
}

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

.panel {
  background: #131318;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.profile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-row:last-child {
  border-bottom: none;
}

.profile-row .label {
  color: #8b8b98;
}

.profile-row .value {
  font-weight: 700;
  color: #fafafa;
}

.keys-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.partners-box {
  text-align: center;
  padding: 14px;
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
}

.partners-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #6b6b78;
  margin-bottom: 4px;
}

.partners-names {
  font-size: 13px;
  font-weight: 600;
  color: #c4c4d4;
}

.social-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 2px;
}

.social-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #131318;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d4d4e0;
  transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.1s;
}

.social-btn:hover {
  border-color: rgba(139, 124, 246, 0.4);
  background: #17171d;
  color: #c4b5fd;
}

.social-btn:active {
  transform: scale(0.93);
}

.key-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(139, 124, 246, 0.1);
  border: 1px solid rgba(139, 124, 246, 0.3);
}

.key-item .key-value {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 14px;
  color: #c4b5fd;
  letter-spacing: 1px;
  word-break: break-all;
}

.key-item .key-date {
  font-size: 11px;
  color: #8b8b98;
}

.empty-state {
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
  color: #8b8b98;
  padding: 20px 0;
}

.info-text {
  font-size: 14px;
  line-height: 1.5;
  color: #dcdce3;
}

.info-muted {
  color: #8b8b98;
  font-size: 12px;
}

.games-teaser {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.teaser-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #6b6b78;
  padding-left: 2px;
}

.games-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.game-icon {
  position: relative;
  aspect-ratio: 1 / 1.1;
  border-radius: 16px;
  background: linear-gradient(160deg, #17171f, #0e0e12);
  border: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
  transition: border-color 0.15s, transform 0.1s, box-shadow 0.2s;
}

.game-emoji {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: #55555f;
  opacity: 0.75;
  transition: color 0.15s, opacity 0.15s;
}

.game-emoji .icon {
  width: 100%;
  height: 100%;
}

.game-name {
  font-size: 10.5px;
  font-weight: 700;
  color: #6b6b78;
  transition: color 0.15s;
}

.game-icon:hover {
  border-color: rgba(139, 124, 246, 0.3);
}

.game-icon:active {
  transform: scale(0.95);
}

.game-icon-active {
  border-color: rgba(139, 124, 246, 0.4);
}

.game-icon-active:hover {
  box-shadow: 0 0 16px rgba(139, 124, 246, 0.2);
}

.game-icon-active .game-emoji {
  color: #c4b5fd;
  opacity: 1;
}

.game-icon-active .game-name {
  color: #c4b5fd;
}

.game-soon {
  position: absolute;
  top: 7px;
  right: 7px;
  background: #8b7cf6;
  color: #0c0c10;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 2px 5px;
  border-radius: 6px;
  white-space: nowrap;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 12px);
  background: #131318;
  border: 1px solid rgba(139, 124, 246, 0.4);
  color: #fafafa;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 12px;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 10;
  pointer-events: none;
}

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

.btn-primary {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #8b7cf6, #7c6cf0);
  color: #0c0c10;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.2s, box-shadow 0.2s;
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 0 20px rgba(139, 124, 246, 0.35);
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.97);
}

.btn-primary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.dice-panel {
  align-items: center;
  text-align: center;
}

.dice-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 800;
  color: #c4b5fd;
}

.icon-title {
  width: 20px;
  height: 20px;
}

.dice-sub {
  font-size: 13px;
  color: #8b8b98;
}

.dice-scene {
  width: 60px;
  height: 60px;
  margin: 10px auto;
  perspective: 400px;
  transition: filter 0.3s;
}

.dice-scene.win {
  filter: drop-shadow(0 0 18px rgba(139, 124, 246, 0.75));
}

.dice-scene.lose {
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.08));
}

.dice-cube {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateX(-18deg) rotateY(-28deg);
  transition: transform 0.9s cubic-bezier(0.65, 0, 0.35, 1);
}

.dice-face {
  position: absolute;
  width: 60px;
  height: 60px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 9px;
  background: #1a1a22;
  border: 1px solid rgba(139, 124, 246, 0.35);
  border-radius: 12px;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.35);
}

.dice-face-1 { transform: rotateY(0deg) translateZ(30px); }
.dice-face-6 { transform: rotateY(180deg) translateZ(30px); }
.dice-face-2 { transform: rotateY(90deg) translateZ(30px); }
.dice-face-5 { transform: rotateY(-90deg) translateZ(30px); }
.dice-face-3 { transform: rotateX(90deg) translateZ(30px); }
.dice-face-4 { transform: rotateX(-90deg) translateZ(30px); }

.pip {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fafafa;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
  align-self: center;
  justify-self: center;
}

.dice-face-1 .pip { grid-column: 2; grid-row: 2; }

.dice-face-2 .pip:nth-child(1) { grid-column: 1; grid-row: 1; }
.dice-face-2 .pip:nth-child(2) { grid-column: 3; grid-row: 3; }

.dice-face-3 .pip:nth-child(1) { grid-column: 1; grid-row: 1; }
.dice-face-3 .pip:nth-child(2) { grid-column: 2; grid-row: 2; }
.dice-face-3 .pip:nth-child(3) { grid-column: 3; grid-row: 3; }

.dice-face-4 .pip:nth-child(1) { grid-column: 1; grid-row: 1; }
.dice-face-4 .pip:nth-child(2) { grid-column: 3; grid-row: 1; }
.dice-face-4 .pip:nth-child(3) { grid-column: 1; grid-row: 3; }
.dice-face-4 .pip:nth-child(4) { grid-column: 3; grid-row: 3; }

.dice-face-5 .pip:nth-child(1) { grid-column: 1; grid-row: 1; }
.dice-face-5 .pip:nth-child(2) { grid-column: 3; grid-row: 1; }
.dice-face-5 .pip:nth-child(3) { grid-column: 2; grid-row: 2; }
.dice-face-5 .pip:nth-child(4) { grid-column: 1; grid-row: 3; }
.dice-face-5 .pip:nth-child(5) { grid-column: 3; grid-row: 3; }

.dice-face-6 .pip:nth-child(1) { grid-column: 1; grid-row: 1; }
.dice-face-6 .pip:nth-child(2) { grid-column: 1; grid-row: 2; }
.dice-face-6 .pip:nth-child(3) { grid-column: 1; grid-row: 3; }
.dice-face-6 .pip:nth-child(4) { grid-column: 3; grid-row: 1; }
.dice-face-6 .pip:nth-child(5) { grid-column: 3; grid-row: 2; }
.dice-face-6 .pip:nth-child(6) { grid-column: 3; grid-row: 3; }

.dice-picker {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  width: 100%;
}

.dice-num {
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background: #1a1a22;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fafafa;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}

.dice-num:hover:not(:disabled) {
  border-color: rgba(139, 124, 246, 0.35);
}

.dice-num:active:not(:disabled) {
  transform: scale(0.93);
}

.dice-num.selected {
  background: rgba(139, 124, 246, 0.2);
  border-color: #8b7cf6;
  color: #c4b5fd;
}

.dice-num:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.dice-result {
  width: 100%;
  font-size: 14px;
  text-align: center;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.wheel-wrap {
  position: relative;
  width: 236px;
  height: 236px;
  margin: 12px auto 8px;
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.55));
}

/* Статичный корпус — не крутится, только диск с секторами внутри него. */
.wheel-housing {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    #3c3a4a, #17171d 12%, #55507a 25%, #17171d 38%,
    #3c3a4a 50%, #17171d 62%, #55507a 75%, #17171d 88%, #3c3a4a 100%
  );
  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.55),
    inset 0 0 0 2px rgba(255, 255, 255, 0.07),
    inset 0 2px 6px rgba(0, 0, 0, 0.5);
  animation: wheel-idle-glow 3.6s ease-in-out infinite alternate;
}

@keyframes wheel-idle-glow {
  from { box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.55), inset 0 0 0 2px rgba(255, 255, 255, 0.07), inset 0 2px 6px rgba(0, 0, 0, 0.5), 0 0 22px rgba(139, 124, 246, 0.18); }
  to   { box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.55), inset 0 0 0 2px rgba(255, 255, 255, 0.07), inset 0 2px 6px rgba(0, 0, 0, 0.5), 0 0 40px rgba(139, 124, 246, 0.4); }
}

.wheel-pegs {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
}

.wheel-peg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ece7ff, #a78bfa 55%, #5b4bb0);
  box-shadow: 0 0 6px rgba(167, 139, 250, 0.85);
  transform: rotate(var(--a)) translate(0, -112px);
}

.wheel-pointer {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 20px solid #d4c9ff;
  z-index: 4;
  filter: drop-shadow(0 0 8px rgba(167, 139, 250, 0.8)) drop-shadow(0 2px 2px rgba(0, 0, 0, 0.4));
}

.wheel-shine {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.14) 0%, transparent 32%, transparent 68%, rgba(255, 255, 255, 0.05) 100%);
  pointer-events: none;
  z-index: 5;
}

.wheel {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    #1c1c24 0deg 72deg,
    #131318 72deg 144deg,
    #1c1c24 144deg 216deg,
    #131318 216deg 288deg,
    #1c1c24 288deg 360deg
  );
  border: 3px solid rgba(139, 124, 246, 0.4);
  box-shadow:
    0 0 20px rgba(124, 58, 237, 0.2),
    inset 0 0 24px rgba(0, 0, 0, 0.5),
    inset 0 2px 0 rgba(255, 255, 255, 0.05);
  transition: transform 3.2s cubic-bezier(0.17, 0.67, 0.12, 0.99);
  z-index: 2;
}

.wheel-rim {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.06), transparent 55%);
  pointer-events: none;
  z-index: 1;
}

.wheel-dividers {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.wheel-divider {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 50%;
  background: linear-gradient(rgba(167, 139, 250, 0.5), transparent 85%);
  transform-origin: bottom center;
  transform: rotate(var(--a));
}

.wheel-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #38394a, #0c0c10 70%);
  border: 2px solid rgba(167, 139, 250, 0.6);
  box-shadow: 0 0 14px rgba(139, 124, 246, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  z-index: 3;
}

.wheel-seg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 52px;
  height: 52px;
  margin: -26px 0 0 -26px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wheel-seg img {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(167, 139, 250, 0.65);
  box-shadow: 0 0 6px rgba(139, 124, 246, 0.4);
}

.wheel-seg.is-nothing {
  border-radius: 50%;
  font-size: 17px;
  font-weight: 800;
  color: #55555f;
  background: #0c0c10;
  border: 2px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.wheel-seg-0 { transform: rotate(0deg) translate(0, -74px) rotate(0deg); }
.wheel-seg-1 { transform: rotate(72deg) translate(0, -74px) rotate(-72deg); }
.wheel-seg-2 { transform: rotate(144deg) translate(0, -74px) rotate(-144deg); }
.wheel-seg-3 { transform: rotate(216deg) translate(0, -74px) rotate(-216deg); }
.wheel-seg-4 { transform: rotate(288deg) translate(0, -74px) rotate(-288deg); }

/* --- капча при входе в мини-апп --- */

.captcha-gate {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 5, 6, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.captcha-gate[hidden] {
  display: none;
}

.captcha-card {
  width: 100%;
  max-width: 340px;
  background: #131318;
  border: 1px solid rgba(139, 124, 246, 0.3);
  border-radius: 20px;
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.captcha-card.shake {
  animation: captcha-shake 0.36s ease;
}

@keyframes captcha-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(3px); }
}

.captcha-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(139, 124, 246, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a78bfa;
}

.captcha-icon .icon {
  width: 26px;
  height: 26px;
}

.captcha-title {
  font-size: 18px;
  font-weight: 800;
  color: #fafafa;
}

.captcha-text {
  font-size: 13px;
  line-height: 1.5;
  color: #8b8b98;
}

.captcha-target {
  font-size: 15px;
  font-weight: 800;
  color: #c4b5fd;
  letter-spacing: 0.4px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(139, 124, 246, 0.14);
  border: 1px solid rgba(139, 124, 246, 0.28);
  margin-bottom: 4px;
}

.captcha-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
}

.captcha-tile {
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  background: #1a1a22;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #d4d4e0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}

.captcha-tile .icon {
  width: 30px;
  height: 30px;
}

.captcha-tile:hover:not(:disabled) {
  border-color: rgba(139, 124, 246, 0.35);
  color: #c4b5fd;
}

.captcha-tile:active:not(:disabled) {
  transform: scale(0.93);
}

.captcha-tile:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.captcha-tile.correct {
  background: rgba(139, 124, 246, 0.22);
  border-color: #8b7cf6;
  color: #c4b5fd;
}

.captcha-tile.wrong {
  background: rgba(248, 113, 113, 0.14);
  border-color: rgba(248, 113, 113, 0.6);
  color: #fca5a5;
}

.captcha-hint {
  font-size: 12px;
  line-height: 1.4;
  color: #6f6f7d;
  margin-top: 2px;
}

.captcha-hint.error {
  color: #fca5a5;
}
