.design-page-stack--slot {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

.page__content--slot .design-main,
.page__content--slot .design-page-stack {
  flex: 1 1 auto;
  min-height: 0;
}

.slot-page {
  container-type: inline-size;
  container-name: slot;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: calc(100cqw * var(--slot-figma-gap) / var(--slot-figma-width));
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
}

.slot-toolbar {
  display: flex;
  align-items: center;
  gap: calc(100cqw * 20 / var(--slot-figma-width));
  width: 100%;
  flex-wrap: nowrap;
}

.slot-toolbar__actions {
  display: flex;
  align-items: center;
  gap: calc(100cqw * 10 / var(--slot-figma-width));
  flex-shrink: 0;
}

/* Legacy game controls from style.css must not override the design toolbar */
.game-content .slot-toolbar.game__controls {
  padding: 0;
  z-index: auto;
}

.game-content .slot-toolbar .game__control-btn {
  width: calc(100cqw * 40 / var(--slot-figma-width));
  height: calc(100cqw * 40 / var(--slot-figma-width));
  padding: calc(100cqw * 10 / var(--slot-figma-width));
  fill: unset;
  opacity: 1;
}

.game-content .slot-toolbar .game__control-btn:hover {
  opacity: 1;
}

.game-content .slot-toolbar .game-title {
  display: block;
  padding-left: 0;
  color: var(--color-text);
  text-transform: none;
}

.game-content .slot-toolbar .game__controls-right {
  z-index: auto;
}

.game-content .slot-toolbar #demo-toggle.slot-toggle {
  position: relative;
  top: auto;
  left: auto;
  width: calc(100cqw * 50 / var(--slot-figma-width));
  height: calc(100cqw * 23 / var(--slot-figma-width));
  background: var(--color-surface-6);
  border-radius: calc(100cqw * 25 / var(--slot-figma-width));
}

.game-content .slot-toolbar #demo-toggle .slot-toggle__thumb {
  position: static;
  top: auto;
  left: auto;
  transform: none;
  pointer-events: none;
  background: var(--color-text-muted);
}

.game-content .slot-toolbar #demo-toggle.slot-toggle--on {
  background: var(--color-accent);
}

.game-content .slot-toolbar #demo-toggle.slot-toggle--on .slot-toggle__thumb {
  background: var(--color-text-dark);
  transform: none;
}

.slot-toolbar__left {
  display: flex;
  align-items: center;
  gap: calc(100cqw * 20 / var(--slot-figma-width));
  min-width: 0;
  flex: 1 1 auto;
}

.slot-toolbar__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: calc(100cqw * 40 / var(--slot-figma-width));
  height: calc(100cqw * 40 / var(--slot-figma-width));
  padding: calc(100cqw * 10 / var(--slot-figma-width));
  background: var(--color-surface-6);
  border: 0;
  border-radius: calc(100cqw * 10 / var(--slot-figma-width));
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-base);
}

.slot-toolbar__btn:hover {
  background: #2a2933;
}

.slot-toolbar__btn:focus-visible {
  outline: calc(100cqw * 2 / var(--slot-figma-width)) solid var(--color-accent);
  outline-offset: calc(100cqw * 4 / var(--slot-figma-width));
}

.slot-toolbar__btn:active {
  background: #32313c;
  transform: scale(0.97);
}

.slot-toolbar__btn-icon {
  display: block;
  flex-shrink: 0;
}

.slot-toolbar__btn-icon--back {
  width: calc(100cqw * 6 / var(--slot-figma-width));
  height: calc(100cqw * 12 / var(--slot-figma-width));
}

.slot-toolbar__btn-icon--fullscreen {
  width: calc(100cqw * 18 / var(--slot-figma-width));
  height: calc(100cqw * 18 / var(--slot-figma-width));
}

.slot-toolbar__title-group {
  display: flex;
  align-items: center;
  gap: calc(100cqw * 20 / var(--slot-figma-width));
  min-width: 0;
}

.slot-toolbar__game-icon {
  flex-shrink: 0;
  width: calc(100cqw * 40 / var(--slot-figma-width));
  height: calc(100cqw * 40 / var(--slot-figma-width));
  object-fit: contain;
}

.slot-toolbar__title {
  margin: 0;
  font-size: calc(100cqw * 32 / var(--slot-figma-width));
  font-weight: 600;
  line-height: normal;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slot-toolbar__demo {
  display: flex;
  align-items: center;
  gap: calc(100cqw * 10 / var(--slot-figma-width));
  flex-shrink: 0;
  margin-left: auto;
}

.slot-toolbar__demo-label {
  font-size: calc(100cqw * 20 / var(--slot-figma-width));
  font-weight: 600;
  line-height: normal;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.slot-toolbar__demo-label-short {
  display: none;
}

.slot-toggle {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  width: calc(100cqw * 50 / var(--slot-figma-width));
  height: calc(100cqw * 23 / var(--slot-figma-width));
  padding-left: calc(100cqw * 5 / var(--slot-figma-width));
  padding-right: calc(100cqw * 5 / var(--slot-figma-width));
  background: var(--color-surface-6);
  border: 0;
  border-radius: calc(100cqw * 25 / var(--slot-figma-width));
  transition: var(--transition-base);
  cursor: pointer;
}

.slot-toggle:hover {
  background: #2a2933;
}

.slot-toggle:focus-visible {
  outline: calc(100cqw * 2 / var(--slot-figma-width)) solid var(--color-accent);
  outline-offset: calc(100cqw * 4 / var(--slot-figma-width));
}

.slot-toggle:active {
  transform: scale(0.98);
}

.slot-toggle--on {
  justify-content: flex-end;
  background: var(--color-accent);
}

.slot-toggle--on:hover {
  background: var(--color-accent-2);
}

.slot-toggle__thumb {
  display: block;
  flex-shrink: 0;
  width: calc(100cqw * 13 / var(--slot-figma-width));
  height: calc(100cqw * 13 / var(--slot-figma-width));
  background: var(--color-text-muted);
  border-radius: 50%;
  transition: var(--transition-base);
}

.slot-toggle--on .slot-toggle__thumb {
  background: var(--color-text-dark);
}

.slot-viewport {
  display: flex;
  align-items: stretch;
  width: 100%;
  aspect-ratio: 1545 / 700;
  background: var(--color-surface-5);
  border-radius: calc(100cqw * 25 / var(--slot-figma-width));
  overflow: hidden;
}

.slot-viewport__inner {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.slot-viewport:fullscreen {
  border-radius: 0;
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
}

.slot-viewport:fullscreen .slot-viewport__inner {
  min-height: 100%;
}

.game-content .frame {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.game-content .frame .slots-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.game-content .frame.is-game-ready .slots-loading {
  display: none;
}

.game-content .frame .slots-error {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 3;
  padding: 1.25rem;
  text-align: center;
}

.game-content .frame .slots-error .image img {
  width: 6.875rem;
  height: auto;
}

.game-content .frame .slots-error span {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--color-text);
}

.game-content .frame .slots-iframe {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.game-content .frame .slots-iframe iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.slot-toolbar__limits {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex: 0 1 auto;
  min-width: 0;
}

.game-bet-limits {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.game-bet-limits__approx {
  opacity: 0.75;
}

.slot-toolbar__mode-label {
  font-size: calc(100cqw * 20 / var(--slot-figma-width));
  font-weight: 600;
  line-height: normal;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.slots-loading .case-loader {
  width: 8.4375rem;
}

@keyframes slot-loading-pulse {
  0%,
  100% {
    transform: scale(0.92);
    opacity: 0.7;
  }

  50% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Figma node 4603:8561 — Open slot PAGE (Mobile) */
@media (max-width: 48rem) {
  .page__content--slot {
    --slot-page-gutter: max(0.9375rem, env(safe-area-inset-left, 0px));
    --slot-page-gutter-right: max(0.9375rem, env(safe-area-inset-right, 0px));
  }

  .page__content--slot > .header-auth,
  .page__content--slot > .header-auth--logged {
    padding-left: var(--slot-page-gutter);
    padding-right: var(--slot-page-gutter-right);
  }

  .design-page-stack--slot .site-footer {
    display: none;
  }

  body.design-nav-active .page__content--slot > .design-main,
  .page__content--slot .design-main {
    gap: 0.9375rem;
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 0.9375rem;
  }

  .page__content--slot .header-auth--logged .header-auth__balance {
    flex: 0 1 auto;
    margin-left: auto;
    min-width: 0;
    max-width: max-content;
    width: auto;
  }

  .page__content--slot .header-auth--logged .header-profile {
    flex: 0 0 auto;
  }

  .slot-page {
    gap: 0.9375rem;
    padding: 0 var(--slot-page-gutter-right) 0.9375rem var(--slot-page-gutter);
  }

  .slot-toolbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 5.75rem;
    grid-template-areas:
      "actions title demo"
      "limits limits limits";
    align-items: center;
    column-gap: 0.625rem;
    row-gap: 0.625rem;
    flex-wrap: nowrap;
  }

  .slot-toolbar__actions {
    grid-area: actions;
    gap: 0.3125rem;
  }

  .slot-toolbar__btn,
  .game-content .slot-toolbar .game__control-btn {
    width: 2rem;
    height: 2rem;
    padding: 0.4375rem;
    border-radius: 0.625rem;
  }

  .slot-toolbar__btn-icon--back {
    width: 0.375rem;
    height: 0.75rem;
  }

  .slot-toolbar__btn-icon--fullscreen {
    width: 1.125rem;
    height: 1.125rem;
  }

  .slot-toolbar__title-group {
    grid-area: title;
    justify-self: center;
    justify-content: center;
    gap: 0.625rem;
    min-width: 0;
    max-width: 100%;
  }

  .slot-toolbar__game-icon {
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
  }

  .slot-toolbar__title,
  .game-content .slot-toolbar .game-title {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    line-height: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 9.375rem;
  }

  .slot-toolbar__limits {
    grid-area: limits;
    justify-content: flex-start;
    margin-left: 0;
  }

  .game-bet-limits {
    font-size: 0.75rem;
    gap: 0.375rem 0.5rem;
  }

  .slot-toolbar__demo {
    grid-area: demo;
    justify-self: end;
    justify-content: space-between;
    width: 5.75rem;
    min-width: 5.75rem;
    max-width: 5.75rem;
    margin-left: 0;
    gap: 0.625rem;
  }

  .slot-toolbar__demo-label {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.4375rem;
    color: var(--color-text-muted);
  }

  .slot-toolbar__demo-label-short {
    display: inline;
  }

  .slot-toolbar__demo-label-full {
    display: none;
  }

  .slot-toolbar__mode-label {
    font-size: 0.75rem;
  }

  .slot-toggle,
  .game-content .slot-toolbar #demo-toggle.slot-toggle {
    flex: 0 0 3.125rem;
    width: 3.125rem;
    height: 1.4375rem;
    padding-left: 0.3125rem;
    padding-right: 0.3125rem;
    border-radius: 1.5625rem;
  }

  .slot-toggle__thumb,
  .game-content .slot-toolbar #demo-toggle .slot-toggle__thumb {
    width: 0.8125rem;
    height: 0.8125rem;
  }

  .slot-viewport {
    aspect-ratio: 345 / 453;
    border-radius: 1.5625rem;
    flex: 1 1 auto;
    min-height: 0;
  }
}
