.roulette-layout {
  display: grid;
  gap: 14px;
}
.roulette-main,
.roulette-panel {
  padding: 20px;
  border-radius: 20px !important;
  background: var(--cab-panel, var(--card-glass)) !important;
  box-shadow: none !important;
  border: 0 !important;
}
.roulette-main {
  overflow: hidden;
}
.roulette-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}
.roulette-top h3 {
  margin: 6px 0 3px;
  font-size: clamp(21px, 2vw, 25px);
  line-height: 1.12;
  letter-spacing: -0.045em;
}
.roulette-top p,
.roulette-panel p,
.roulette-action p {
  margin: 0;
  color: var(--fg-2);
  font-size: 13px;
  line-height: 1.55;
}
.roulette-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--fg-3);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.roulette-eyebrow i {
  font-size: 15px;
  color: var(--fg-2);
}
.roulette-wallet {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 3px 0;
  flex: none;
}
.roulette-wallet-stat {
  display: grid;
  gap: 5px;
}
.roulette-wallet-stat span {
  white-space: nowrap;
  color: var(--fg-3);
  font-size: 12px;
}
.roulette-wallet-stat strong {
  color: var(--fg);
  font-size: 19px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.roulette-wallet-stat small {
  color: var(--fg-3);
  font-size: 11px;
}
.roulette-wallet-stat small[hidden] {
  display: none;
}
.roulette-stage {
  position: relative;
  overflow: hidden;
  margin: 12px -20px 0;
  padding: 10px 0;
}
.roulette-viewport {
  width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 0, 0, 0.2) 4%,
    #000 15%,
    #000 85%,
    rgba(0, 0, 0, 0.2) 96%,
    transparent 100%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 0, 0, 0.2) 4%,
    #000 15%,
    #000 85%,
    rgba(0, 0, 0, 0.2) 96%,
    transparent 100%
  );
}
@supports not (mask-image: linear-gradient(90deg, transparent, #000)) {
  .roulette-stage::before,
  .roulette-stage::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 2;
    width: 15%;
    pointer-events: none;
  }
  .roulette-stage::before {
    left: 0;
    background: linear-gradient(90deg, var(--cab-panel, var(--card-glass)), transparent);
  }
  .roulette-stage::after {
    right: 0;
    background: linear-gradient(270deg, var(--cab-panel, var(--card-glass)), transparent);
  }
}
.roulette-track {
  position: relative;
  display: flex;
  gap: 10px;
  width: max-content;
  padding: 0 0 0 20px;
  will-change: transform;
}
.roulette-marker {
  position: absolute;
  z-index: 4;
  inset: 0 auto 0 50%;
  width: 1px;
  background: linear-gradient(transparent, var(--fg) 14%, var(--fg) 86%, transparent);
  opacity: 0.8;
  pointer-events: none;
}
.roulette-marker::before,
.roulette-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
}
.roulette-marker::before {
  top: 0;
  border-top: 8px solid var(--fg);
}
.roulette-marker::after {
  bottom: 0;
  border-bottom: 8px solid var(--fg);
}

.roulette-item {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 158px;
  height: 128px;
  flex: 0 0 158px;
  overflow: hidden;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--fg);
}
.roulette-item-texture {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: grayscale(1);
  opacity: 0.1;
  -webkit-mask-image: linear-gradient(90deg, transparent 20%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 20%, #000 100%);
  pointer-events: none;
}
.roulette-item-head {
  display: flex;
  align-items: center;
  gap: 7px;
}
.roulette-item-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--fg-2);
  font-size: 15px;
}
.roulette-item-tag {
  color: var(--fg-3);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.04em;
}
.roulette-item-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.roulette-item-copy strong {
  overflow: hidden;
  color: var(--fg);
  font-size: 16px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.roulette-item-copy > span {
  overflow: hidden;
  color: var(--fg-3);
  font-size: 11px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.roulette-action {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 10px 0 0;
  text-align: left;
}
.roulette-action button {
  min-width: 172px;
  min-height: 40px;
  border-radius: 10px;
}
.roulette-action p {
  margin: 0;
}
.roulette-reward-code {
  display: inline-block;
  margin-top: 10px;
  padding: 9px 13px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--field);
  font: 14px var(--font-mono, monospace);
  user-select: all;
}
.roulette-reward-code[hidden] {
  display: none;
}
.roulette-aside {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  align-items: start;
  gap: 14px;
}
.roulette-panel h3 {
  margin: 0 0 7px;
  font-size: 16px;
  letter-spacing: -0.025em;
}
.roulette-panel p {
  color: var(--fg-3);
}
.roulette-panel a,
.roulette-keys-link {
  color: var(--accent-text);
}
.roulette-prizes {
  margin-top: 10px;
}
.roulette-prizes > div {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.roulette-prizes > div:last-child {
  border-bottom: 0;
}
.roulette-prizes > div > span {
  display: flex;
  align-items: center;
  gap: 9px;
}
.roulette-prizes i {
  font-size: 16px;
  color: var(--fg-3);
}
.roulette-prizes b {
  font-size: 12px;
  color: var(--fg-2);
}
#roulette-keys-panel[hidden] {
  display: none;
}
.roulette-keys {
  display: grid;
  gap: 6px;
  margin: 12px 0;
}
.roulette-keys div {
  color: var(--accent-text);
  font: 13px var(--font-mono, monospace);
  user-select: all;
}
.roulette-keys-link {
  border: 0;
  padding: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
@media (max-width: 1100px) {
  .roulette-aside {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .roulette-main,
  .roulette-panel {
    padding: 16px;
  }
  .roulette-top {
    gap: 12px;
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .roulette-top h3 {
    font-size: 21px;
  }
  .roulette-top p {
    max-width: 220px;
  }
  .roulette-wallet {
    gap: 20px;
    padding: 0;
  }
  .roulette-wallet-stat strong {
    font-size: 18px;
  }
  .roulette-stage {
    margin: 10px -16px 0;
  }
  .roulette-track {
    padding-left: 16px;
  }
  .roulette-item {
    width: 142px;
    height: 120px;
    flex-basis: 142px;
    padding: 11px;
  }
  .roulette-action {
    justify-content: flex-start;
  }
  .roulette-aside {
    grid-template-columns: 1fr;
  }
}

.roulette-buy-heading {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.roulette-buy-heading > i {
  color: var(--fg-2);
  font-size: 17px;
  line-height: 1.2;
}
.roulette-buy-heading h3 {
  margin: 0 0 4px;
}
.roulette-buy-heading p {
  font-size: 12px;
  line-height: 1.4;
}
.roulette-buy-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--fg-3);
  font-size: 12px;
}
.roulette-buy-info strong {
  color: var(--fg);
  font-size: 13px;
}
.roulette-packages {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.roulette-packages button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  min-height: 66px;
  padding: 10px 12px;
  border: 0;
  border-radius: 11px;
  background: var(--neutral-button-bg);
  color: var(--neutral-button-text);
  font: inherit;
  cursor: pointer;
  text-align: left;
  transition:
    background 0.18s,
    color 0.18s;
}
.roulette-packages button:hover:not(:disabled):not([aria-pressed="true"]) {
  background: var(--neutral-button-hover);
}
.roulette-packages button:focus-visible {
  outline: none;
}
.roulette-packages button:focus-visible .roulette-package-count {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.roulette-package-count {
  color: var(--fg);
  font-size: 25px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.05em;
}
.roulette-package-detail {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.roulette-package-detail .roulette-package-unit {
  color: var(--fg-3);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
}
.roulette-package-detail strong {
  color: var(--fg-2);
  font-size: 12px;
  font-weight: 550;
  line-height: 1;
}
.roulette-package-check {
  position: absolute;
  top: 9px;
  right: 9px;
  color: var(--accent-text);
  font-size: 15px;
  line-height: 1;
  opacity: 0;
}
.roulette-packages button[aria-pressed="true"] {
  background: #38393f;
  color: var(--fg);
}
.roulette-packages button[aria-pressed="true"] .roulette-package-check {
  color: var(--fg);
  opacity: 1;
}
:root[data-theme="light"] .roulette-packages button {
  background: #e6e6e9;
}
:root[data-theme="light"]
  .roulette-packages
  button:hover:not(:disabled):not([aria-pressed="true"]) {
  background: #dedee3;
}
:root[data-theme="light"] .roulette-packages button[aria-pressed="true"] {
  background: #d6d6dd;
}
.roulette-packages button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.roulette-buy-actions {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.roulette-buy-actions button {
  min-height: 38px;
  width: 100%;
}
.roulette-buy-actions p {
  margin: 0;
  color: var(--fg-3);
  font-size: 11px;
  line-height: 1.4;
}

.roulette-checkout {
  position: fixed;
  inset: 0;
  width: min(710px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  color: var(--fg);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
}
.roulette-checkout::backdrop {
  background: rgba(0, 0, 0, 0.72);
}
.roulette-checkout-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr);
  min-height: 380px;
}
.roulette-checkout-product {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  background: #121315;
}
.roulette-checkout-product::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(8, 9, 13, 0.9), rgba(8, 9, 13, 0.12) 75%);
}
.roulette-checkout-product img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.roulette-checkout-caption {
  position: absolute;
  z-index: 1;
  right: 20px;
  bottom: 20px;
  left: 20px;
  display: grid;
  gap: 5px;
  color: #fff;
}
.roulette-checkout-caption span {
  color: rgba(255, 255, 255, 0.65);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
}
.roulette-checkout-caption strong {
  font-size: 36px;
  line-height: 1.05;
  letter-spacing: -0.045em;
}
.roulette-checkout-caption b {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  font-weight: 500;
}
.roulette-checkout-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 26px 28px 24px;
}
.roulette-checkout-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}
.roulette-checkout-head h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.03em;
}
.roulette-checkout-close {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--fg-2);
  font-size: 20px;
  cursor: pointer;
}
.roulette-checkout-close svg {
  display: block;
  width: 18px;
  height: 18px;
}
.roulette-checkout-close:hover {
  background: var(--glass-hover);
}
.roulette-checkout-label {
  margin-bottom: 7px;
  color: var(--fg-3);
  font-size: 12px;
}
.roulette-checkout-method {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 12px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--fg-2);
  font-size: 13px;
}
.roulette-checkout-method i {
  font-size: 18px;
}
.roulette-checkout-method span {
  flex: 1;
}
.roulette-checkout-method strong {
  color: var(--fg);
  font-size: 13px;
}
.roulette-checkout-help {
  margin: 11px 0 0;
  color: var(--fg-3);
  font-size: 12px;
  line-height: 1.5;
}
.roulette-checkout-topup {
  align-self: flex-start;
  margin-top: 10px;
  color: var(--accent-text);
  font-size: 12px;
}
.roulette-checkout-footer {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 25px;
}
.roulette-checkout-footer p {
  margin: 0;
  color: var(--fg-3);
  font-size: 12px;
  line-height: 1.5;
}
.roulette-checkout-submit.ax-btn--primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: var(--fg);
  color: var(--bg);
  box-shadow: none;
}
.roulette-checkout-submit.ax-btn--primary:hover:not(:disabled) {
  background: var(--fg);
  color: var(--bg);
  filter: brightness(0.86);
}
.roulette-checkout-submit strong {
  margin-left: auto;
  font-size: 13px;
}
.roulette-checkout-submit:disabled {
  cursor: not-allowed;
}
@media (max-width: 560px) {
  .roulette-checkout-grid {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .roulette-checkout-product {
    min-height: 150px;
  }
  .roulette-checkout-caption {
    right: 16px;
    bottom: 15px;
    left: 16px;
  }
  .roulette-checkout-caption strong {
    font-size: 28px;
  }
  .roulette-checkout-main {
    padding: 20px;
  }
  .roulette-checkout-head {
    margin-bottom: 18px;
  }
  .roulette-checkout-footer {
    padding-top: 20px;
  }
}
.roulette-inventory-heading {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.roulette-inventory-heading > i {
  color: var(--fg-2);
  font-size: 17px;
  line-height: 1.2;
}
.roulette-inventory-heading h3 {
  margin: 0 0 4px;
}
.roulette-inventory-heading p {
  font-size: 12px;
  line-height: 1.4;
}
.roulette-inventory-keys > span,
.roulette-inventory-list-head {
  color: var(--fg-3);
  font-size: 12px;
}
.roulette-inventory-keys {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.roulette-inventory-keys[hidden] {
  display: none;
}
.roulette-inventory-keys .roulette-keys {
  margin: 8px 0;
}
.roulette-inventory-list-head {
  margin-top: 14px;
}
.roulette-inventory-list {
  max-height: 210px;
  overflow: auto;
  margin-top: 6px;
}
.roulette-inventory-list > p {
  padding: 8px 0;
  color: var(--fg-3);
  font-size: 12px;
}
.roulette-inventory-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.roulette-inventory-item:last-child {
  border-bottom: 0;
}
.roulette-inventory-item > i {
  flex: none;
  color: var(--fg-2);
  font-size: 15px;
  line-height: 1.2;
}
.roulette-inventory-item > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.roulette-inventory-item strong {
  color: var(--fg);
  font-size: 12px;
  line-height: 1.25;
}
.roulette-inventory-item span {
  color: var(--fg-3);
  font-size: 11px;
  line-height: 1.3;
}

#roulette-spin.ax-btn,
#roulette-buy-open.ax-btn,
#roulette-buy-confirm.ax-btn {
  border-radius: 16px !important;
}
.roulette-checkout-submit.ax-btn--primary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding-inline: 18px;
}
#roulette-confirm-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.roulette-checkout-submit-end {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  white-space: nowrap;
}
.roulette-checkout-submit-end strong {
  margin: 0;
  font-size: 13px;
  line-height: 1;
}
.roulette-checkout-submit-end svg {
  display: block;
  width: 18px;
  height: 18px;
  flex: none;
}
.roulette-fair-note {
  margin-top: 12px !important;
  color: var(--fg-3) !important;
  font-size: 11px !important;
  line-height: 1.45;
}

.roulette-section-heading {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.roulette-section-heading > i {
  color: var(--fg-2);
  font-size: 17px;
  line-height: 1.2;
}
.roulette-section-heading h3 {
  margin: 0 0 4px;
}
.roulette-section-heading p {
  font-size: 12px;
  line-height: 1.4;
}
