/* Mood Game Space — обвязка страницы игры (макет v2).
   Поверх mood-play.css / mood-play-hub.css. Iframe и сессия не масштабируются transform. */

#pagePlay.page-play {
  --play-safe-top: env(safe-area-inset-top, 0px);
  --play-safe-bottom: env(safe-area-inset-bottom, 0px);
  --play-safe-left: env(safe-area-inset-left, 0px);
  --play-safe-right: env(safe-area-inset-right, 0px);
  --play-chrome: var(--bg-elevated, #12171e);
  --play-surface: var(--surface, #1b222d);
  --play-hover: var(--surface-2, #242e3a);
  --play-line: var(--border, #ffffff12);
  --play-muted: var(--text-muted, #a5afbd);
  --play-primary: linear-gradient(105deg, #44ebd5 0%, #80bdc2 56%, #c888a6 100%);
  --play-primary-text: #142329;
  --play-toolbar-h: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "header"
    "stage"
    "toolbar";
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  isolation: isolate;
  background: var(--bg-deep, #0c0f13);
}
#pagePlay.page-play.hidden {
  display: none !important;
}

html[data-theme="light"] #pagePlay.page-play {
  --play-primary: linear-gradient(105deg, #ffa325, #f3536b);
  --play-primary-text: #301a14;
}

#pagePlay.page-play:fullscreen,
#pagePlay.page-play:-webkit-full-screen {
  width: 100vw;
  height: 100dvh;
}

/* ------------------------------------------------------------
   Шапка
   ------------------------------------------------------------ */
#pagePlay > .play-page-header {
  grid-area: header;
  position: relative;
  z-index: 3;
}

#pagePlay > .play-page-body {
  grid-area: stage;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

#pagePlay > .play-page-toolbar {
  grid-area: toolbar;
  position: relative;
  z-index: 3;
}

#pagePlay > .play-page-bg {
  grid-area: stage;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  clip-path: inset(0);
}

#pagePlay > .play-page-game-tools-backdrop,
#pagePlay > .play-page-game-tools-popover,
#pagePlay > .play-page-toast,
#pagePlay > .play-page-hub-backdrop,
#pagePlay > .play-page-hub,
#pagePlay > .play-page-winners,
#pagePlay > .play-page-stats-modal {
  grid-area: stage;
}

#pagePlay .play-page-header {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  min-height: 76px;
  padding: calc(12px + var(--play-safe-top)) max(24px, var(--play-safe-right)) 12px max(24px, var(--play-safe-left));
  background: var(--play-chrome);
  border-bottom: 1px solid var(--play-line);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

#pagePlay .play-page-icon-btn,
#pagePlay .play-page-menu-btn,
#pagePlay .play-page-hub-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 13px;
  background: var(--play-surface);
  color: var(--play-muted);
  border: 0;
}

#pagePlay .play-page-back-btn {
  background: none;
}

#pagePlay .play-page-brand {
  display: none !important;
}

#pagePlay .play-page-header-title-block {
  flex: 1;
  min-width: 0;
  padding-right: 8px;
}

#pagePlay .play-page-frame-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  font-weight: 720;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

#pagePlay .play-page-slot-info {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: var(--play-muted);
}

#pagePlay .play-page-restore {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-left: auto;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  color: var(--text);
}

#pagePlay .play-page-header-dock {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
  margin-left: 0;
}

#pagePlay .play-page-balance-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 2px 10px;
  border: 0;
  border-radius: 12px;
  background: none;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

#pagePlay .play-page-balance-btn img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

#pagePlay .play-page-balance-btn small,
#pagePlay .play-page-bonus-summary small {
  display: block;
  font-size: 11px;
  color: var(--play-muted);
  line-height: 1.4;
}

#pagePlay .play-page-balance-btn strong {
  font-size: 18px;
  font-weight: 720;
  letter-spacing: -0.02em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

#pagePlay .play-page-balance-btn em {
  font-size: 13px;
  color: var(--play-muted);
  font-style: normal;
  font-weight: 550;
}

#pagePlay .play-page-deposit-btn.btn,
#pagePlay .play-page-deposit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 44px;
  height: auto;
  padding: 10px 22px;
  border: 0;
  border-radius: 24px;
  background: var(--play-primary);
  color: var(--play-primary-text);
  font-weight: 720;
  white-space: nowrap;
  box-shadow: none;
}

#pagePlay .play-page-deposit-btn:hover {
  filter: brightness(1.07);
}

#pagePlay .play-page-header-close-mobile {
  display: none;
}

#pagePlay .play-page-header-hub-mobile {
  display: flex;
  flex-shrink: 0;
}

#pagePlay .play-page-header-right {
  display: none;
}

body.play-page-active.is-play-fullscreen .play-page-header {
  display: flex;
}

/* ------------------------------------------------------------
   Workspace / iframe
   ------------------------------------------------------------ */
#pagePlay .play-page-body,
#pagePlay .mood-play-stage,
#pagePlay .play-page-center {
  min-width: 0;
  min-height: 0;
}

#pagePlay .play-page-body {
  display: flex;
  padding: 8px max(20px, var(--play-safe-right)) 8px max(20px, var(--play-safe-left));
  background: var(--bg-deep, #090c10);
}

#pagePlay .mood-play-stage {
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
}

#pagePlay .play-page-frame-wrap.mood-play-frame,
#pagePlay .play-page-iframe-wrap {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border-radius: 10px;
  aspect-ratio: auto;
  max-width: none;
  max-height: none;
  flex: 1 1 auto;
}

#pagePlay:has(#playPageWinners:not(.hidden)) .mood-play-stage {
  padding-right: 0;
}

#pagePlay .play-page-iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: unset;
}

#pagePlay .play-page-frame-wrap[data-fit="fixed"] {
  flex: 0 0 auto;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
}

#pagePlay .play-page-iframe-loading {
  gap: 14px;
  background: var(--bg-deep, #090c10);
  text-align: center;
  padding: 20px;
}

#pagePlay .play-page-iframe-loading img {
  width: 84px;
  height: 84px;
  object-fit: contain;
}

#pagePlay .play-page-iframe-loading h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.03em;
}

#pagePlay .play-page-iframe-loading p,
#pagePlay .play-page-iframe-loading span {
  max-width: 380px;
  color: var(--play-muted);
  font-size: 13px;
}

#pagePlay .play-page-loading-line {
  height: 4px;
  width: 150px;
  border-radius: 4px;
  background: var(--play-hover);
  overflow: hidden;
}

#pagePlay .play-page-loading-line::after {
  content: "";
  display: block;
  height: 100%;
  width: 40%;
  background: var(--play-primary);
  animation: mood-play-space-loading 1.5s ease-in-out infinite alternate;
}

@keyframes mood-play-space-loading {
  to { transform: translateX(150%); }
}

#pagePlay .play-page-geo-block,
#pagePlay .play-page-launch-error {
  background: var(--bg-deep, #090c10);
}

#pagePlay .play-page-launch-error {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  padding: 24px;
}

#pagePlay .play-page-launch-error.hidden {
  display: none !important;
}

/* ------------------------------------------------------------
   Нижняя сервисная строка (только компьютер)
   ------------------------------------------------------------ */
body.play-page-active #pagePlay > .play-page-toolbar,
#pagePlay .play-page-toolbar {
  display: flex !important;
  align-items: center;
  gap: 16px;
  min-height: var(--play-toolbar-h, 64px);
  padding: 8px max(24px, var(--play-safe-right)) calc(8px + var(--play-safe-bottom)) max(24px, var(--play-safe-left));
  background: var(--play-chrome);
  border-top: 1px solid var(--play-line);
  border-bottom: 0;
  position: relative;
  z-index: 3;
}

#pagePlay .play-page-toolbar-left,
#pagePlay .play-page-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

#pagePlay .play-page-toolbar-actions {
  justify-content: flex-end;
}

#pagePlay .play-page-quiet-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: inherit;
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
  cursor: pointer;
}

#pagePlay .play-page-quiet-btn img {
  width: 27px;
  height: 27px;
  object-fit: contain;
}

#pagePlay .play-page-bonus-summary.hidden {
  display: none !important;
}

#pagePlay .play-page-bonus-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 5px 12px;
  border: 0;
  border-radius: 13px;
  background: var(--play-surface);
  text-align: left;
  color: inherit;
  cursor: pointer;
}

#pagePlay .play-page-bonus-summary > img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

#pagePlay .play-page-bonus-summary strong {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

#pagePlay .play-page-progress-summary {
  width: 104px;
  margin-left: 12px;
  display: grid;
  gap: 6px;
  font-size: 10px;
  color: var(--play-muted);
}

#pagePlay .play-page-progress-summary > span:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

#pagePlay .play-page-progress-summary b {
  font-weight: 650;
  color: var(--accent, #77dfd0);
}

#pagePlay .play-page-progress-track {
  display: block;
  height: 4px;
  border-radius: 3px;
  background: var(--play-hover);
  overflow: hidden;
}

#pagePlay .play-page-progress-track i,
#pagePlay .play-hd-wager__fill,
#pagePlay .play-page-hub-wagering-fill {
  display: block;
  height: 100%;
  background: var(--accent, #77dfd0);
}

#pagePlay .play-page-toolbar .play-page-icon-btn {
  background: none;
}

#pagePlay .play-page-favorite-btn[aria-pressed="true"],
#pagePlay .play-page-favorite-btn.active {
  color: var(--danger, #f291a0);
}

#pagePlay .play-page-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  z-index: calc(var(--z-play) + 8);
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border: 1px solid var(--play-line);
  border-radius: 12px;
  background: var(--play-surface);
  font-size: 12px;
}

/* ------------------------------------------------------------
   Меню справа — компьютер и телефон
   ------------------------------------------------------------ */
#pagePlay .play-page-hub-backdrop {
  position: absolute;
  inset: 0;
  z-index: calc(var(--z-play) + 4);
  display: block;
  background: rgba(3, 6, 10, 0.52);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

#pagePlay .play-page-header-hub-mobile,
#pagePlay .play-page-hub:not(.hidden) {
  display: flex !important;
}

#pagePlay .play-page-hub-backdrop:not(.hidden) {
  display: block !important;
}

#pagePlay .play-page-hub {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: calc(var(--z-play) + 5);
  display: flex;
  flex-direction: column;
  width: 420px;
  max-width: 100%;
  height: 100%;
  padding: calc(26px + var(--play-safe-top)) 24px calc(24px + var(--play-safe-bottom));
  background: var(--play-chrome);
  border-left: 1px solid var(--play-line);
  box-shadow: none;
  overflow: hidden;
}

#pagePlay .play-page-hub-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

#pagePlay .play-page-hub svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

#pagePlay .play-page-hub.hidden,
#pagePlay .play-page-hub-backdrop.hidden {
  display: none !important;
}

#pagePlay .play-page-hub-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex: none;
  margin-bottom: 18px;
  padding: 0;
  border: 0;
}

#pagePlay .play-page-hub-eyebrow {
  margin: 0 0 8px;
  font-size: 9px;
  letter-spacing: 0.1em;
  font-weight: 650;
  color: var(--play-muted);
}

#pagePlay .play-page-hub-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

#pagePlay .play-page-hub-head .play-page-winners-context {
  margin: 4px 0 0;
}

#pagePlay .play-page-hub-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 13px;
  background: var(--play-surface);
  color: var(--play-muted);
  cursor: pointer;
}

#pagePlay .play-page-hub-close svg {
  width: 20px;
  height: 20px;
}

#pagePlay .play-page-hub-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  overflow: auto;
  flex: 1;
  min-height: 0;
}

#pagePlay .play-page-hub-section-title {
  margin: 20px 10px 6px;
  font-size: 10px;
  letter-spacing: 0.08em;
  font-weight: 650;
  text-transform: uppercase;
  color: var(--play-muted);
}

#pagePlay .play-page-hub-section--account {
  position: relative;
}

#pagePlay .play-page-hub-section--account > .play-page-hub-section-title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#pagePlay .play-page-hub-account-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#pagePlay .play-page-hub-balance-card {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  gap: 12px;
  min-height: 83px;
  padding: 14px 18px;
  border-radius: 15px;
  border: 0;
  background: var(--play-surface);
}

#pagePlay .play-page-hub-balance-card img,
#pagePlay .play-page-hub-wagering img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
}

#pagePlay .play-page-hub-balance-label {
  display: block;
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--play-muted);
  margin-bottom: 5px;
}

#pagePlay .play-page-hub-balance-value {
  display: block;
  font-family: inherit;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

#pagePlay .play-page-hub-balance-card--bonus {
  background: color-mix(in srgb, var(--accent) 12%, var(--play-surface));
}

#pagePlay .play-page-hub-balance-card--bonus .play-page-hub-balance-value {
  color: var(--accent, #77dfd0);
}

#pagePlay .play-page-hub-wagering {
  display: grid;
  gap: 10px;
  min-height: 0;
  padding: 14px 18px;
  border-radius: 15px;
  border: 0;
  background: var(--play-surface);
}

#pagePlay .play-page-hub-deposit-btn.btn,
#pagePlay .play-page-hub-deposit-btn {
  width: 100%;
  min-height: 44px;
  margin-top: 3px;
  border: 0;
  border-radius: 24px;
  background: var(--play-primary);
  color: var(--play-primary-text);
  box-shadow: none;
}

#pagePlay .play-page-hub-actions {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0;
}

#pagePlay .play-page-hub-action {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 49px;
  padding: 6px 10px;
  border: 0;
  border-radius: 14px;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

#pagePlay .play-page-hub-action:hover,
#pagePlay .play-page-hub-action:active {
  background: var(--play-hover);
}

#pagePlay .play-page-hub-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: inherit;
}

#pagePlay .play-page-hub-action-icon svg,
#pagePlay .play-page-hub-action > svg {
  width: 23px;
  height: 23px;
}

#pagePlay .play-page-hub-action-icon img,
#pagePlay .play-page-hub-action img {
  width: 29px;
  height: 29px;
  object-fit: contain;
}

#pagePlay .play-page-hub-action > span:not(.play-page-hub-action-icon) {
  flex: 1;
  min-width: 0;
}

#pagePlay .play-page-hub-action::after {
  content: "";
  width: 16px;
  height: 16px;
  margin-left: auto;
  flex-shrink: 0;
  opacity: 0.4;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round' d='m9 6 6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round' d='m9 6 6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}

#pagePlay .play-page-hub-action--danger {
  color: var(--danger, #f291a0);
}

#pagePlay .play-page-hub-action--danger .play-page-hub-action-icon {
  background: none;
  border: 0;
  color: inherit;
}

#pagePlay .play-page-hub-divider {
  height: 1px;
  margin: 15px 0;
  background: var(--play-line);
}

/* ------------------------------------------------------------
   Победители и статистика — правые панели
   ------------------------------------------------------------ */
#pagePlay .play-page-winners {
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: auto !important;
  width: 420px !important;
  max-width: 100%;
  max-height: none !important;
  border-radius: 0 !important;
  border: 0 !important;
  border-left: 1px solid var(--play-line) !important;
  background: var(--play-chrome);
  z-index: calc(var(--z-play) + 6);
  padding: calc(26px + var(--play-safe-top)) 24px calc(24px + var(--play-safe-bottom));
}

#pagePlay .play-page-winners-header::before {
  display: none;
}

#pagePlay .play-page-winners-context {
  margin: 0 0 12px;
  font-size: 11px;
  color: var(--play-muted);
}

#pagePlay .play-page-winner-item {
  gap: 10px;
  padding: 13px 11px;
  border-radius: 13px;
  background: var(--play-surface);
  border: 0;
}

#pagePlay .play-page-winner-avatar {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 12px;
  background: var(--play-hover);
  font-size: 12px;
  font-weight: 700;
  color: var(--play-muted);
  flex-shrink: 0;
}

#pagePlay .play-page-stats-modal {
  z-index: calc(var(--z-play) + 6);
}

#pagePlay .play-page-stats-dialog {
  width: min(720px, calc(100% - 40px));
  max-height: min(830px, calc(100% - 40px));
  border-radius: 24px;
}

#pagePlay .play-page-stats-card {
  border-radius: 14px;
}

#pagePlay .play-page-stats-empty {
  text-align: center;
  padding: 35px 18px;
  color: var(--play-muted);
}

/* ------------------------------------------------------------
   Только игра
   ------------------------------------------------------------ */
body.play-page-focus #pagePlay {
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas:
    "header"
    "stage";
}

body.play-page-focus #pagePlay .play-page-toolbar,
body.play-page-focus #pagePlay > .play-page-toolbar,
body.play-page-focus #pagePlay .play-page-header-dock,
#pagePlay.play-page--focus .play-page-brand,
body.play-page-focus #pagePlay .play-page-brand,
body.play-page-focus #pagePlay .play-page-slot-info {
  display: none !important;
}

body.play-page-focus #pagePlay .play-page-header {
  min-height: 48px;
  padding-top: var(--play-safe-top);
  padding-bottom: 0;
  gap: 8px;
}

body.play-page-focus #pagePlay .play-page-restore {
  display: inline-flex;
}

body.play-page-focus #pagePlay .play-page-body {
  padding: 0 max(0px, var(--play-safe-right)) var(--play-safe-bottom) max(0px, var(--play-safe-left));
}

body.play-page-focus #pagePlay .play-page-frame-wrap.mood-play-frame,
body.play-page-focus #pagePlay .play-page-iframe-wrap {
  border-radius: 0;
}

/* ------------------------------------------------------------
   Телефон
   ------------------------------------------------------------ */
@media (max-width: 767px), (orientation: landscape) and (max-height: 550px) {
  #pagePlay.page-play {
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas:
      "header"
      "stage";
  }

  #pagePlay .play-page-header {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    grid-template-rows: auto;
    min-height: 56px;
    gap: 6px;
    padding: calc(6px + var(--play-safe-top)) max(8px, var(--play-safe-right)) 6px max(8px, var(--play-safe-left));
  }

  #pagePlay .play-page-header-close-mobile {
    display: flex !important;
    grid-column: 1;
    grid-row: 1;
  }

  #pagePlay .play-page-header-left {
    grid-column: 2;
    grid-row: 1;
    justify-content: center;
    text-align: center;
  }

  #pagePlay .play-page-header-title-block {
    align-items: center;
    padding: 0;
  }

  #pagePlay .play-page-frame-title {
    font-size: 14px;
  }

  #pagePlay .play-page-brand,
  #pagePlay .play-page-slot-info,
  #pagePlay .play-page-header-dock,
  #pagePlay .play-page-header-right,
  #pagePlay .play-page-desktop-back,
  body.play-page-active #pagePlay > .play-page-toolbar,
  #pagePlay .play-page-toolbar {
    display: none !important;
  }

  #pagePlay .play-page-header-hub-mobile {
    grid-column: 3;
    grid-row: 1;
    justify-content: flex-end;
  }

  #pagePlay .play-page-body {
    padding: 0 max(0px, var(--play-safe-right)) var(--play-safe-bottom) max(0px, var(--play-safe-left));
  }

  #pagePlay .play-page-frame-wrap.mood-play-frame,
  #pagePlay .play-page-iframe-wrap {
    border-radius: 0;
  }

  #pagePlay .play-page-hub {
    width: min(380px, calc(100% - 24px));
    padding: calc(18px + var(--play-safe-top)) max(16px, var(--play-safe-right)) calc(12px + var(--play-safe-bottom)) 16px;
  }

  #pagePlay .play-page-winners {
    width: min(380px, calc(100% - 16px)) !important;
    padding: calc(16px + var(--play-safe-top)) max(16px, var(--play-safe-right)) calc(12px + var(--play-safe-bottom)) 16px;
  }

  #pagePlay .play-page-stats-dialog {
    inset: 0 0 0 auto;
    margin: 0;
    width: calc(100% - 16px);
    max-width: 620px;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    border-left: 1px solid var(--play-line);
  }

  body.play-page-focus #pagePlay .play-page-header {
    display: flex;
  }

  body.play-page-focus #pagePlay .play-page-header-left {
    text-align: left;
    justify-content: flex-start;
  }

  body.play-page-focus #pagePlay .play-page-restore {
    font-size: 10px;
    padding: 0 5px;
  }

  #pagePlay .play-page-toast {
    bottom: calc(16px + var(--play-safe-bottom));
  }
}

@media (orientation: landscape) and (max-height: 550px) {
  #pagePlay .play-page-header {
    min-height: 52px;
    padding-top: var(--play-safe-top);
    padding-bottom: 0;
  }

  #pagePlay .play-page-frame-title {
    font-size: 13px;
  }
}

@media (max-width: 1100px) {
  #pagePlay .play-page-brand {
    display: none;
  }

  #pagePlay .play-page-header {
    gap: 10px;
    padding-left: max(12px, var(--play-safe-left));
    padding-right: max(12px, var(--play-safe-right));
  }

  #pagePlay .play-page-header-dock {
    gap: 8px;
  }

  #pagePlay .play-page-toolbar-actions .play-page-quiet-btn span {
    display: none;
  }

  #pagePlay .play-page-toolbar-actions .play-page-quiet-btn {
    width: 44px;
    padding: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #pagePlay .play-page-loading-line::after {
    animation: none;
  }
}

#pagePlay .play-page-landscape-note {
  position: absolute;
  top: 10px;
  left: 50%;
  z-index: 3;
  transform: translateX(-50%);
  max-width: min(420px, calc(100% - 24px));
  margin: 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--play-surface);
  color: var(--play-muted);
  font-size: 12px;
  text-align: center;
  pointer-events: none;
}

#pagePlay .play-page-landscape-note.hidden {
  display: none !important;
}

#pagePlay .play-page-hub-deposit-btn {
  min-height: 44px;
  border: 0;
  border-radius: 24px;
  background: var(--play-primary);
  color: var(--play-primary-text);
  font-weight: 720;
}

/* Депозит поверх игрового экрана, iframe остаётся */
body.play-page-active #depositPageModal {
  z-index: calc(var(--z-play) + 20);
}

/* Каталог методов с игры (макет v2): сначала список, сумма — после выбора */
body.play-page-active #depositPageModal.deposit-page-modal--overlay:not(.deposit-page-modal--wallet-method-sheet) {
  align-items: center;
  justify-content: center;
}

body.play-page-active #depositPageModal.deposit-page-modal--overlay:not(.deposit-page-modal--wallet-method-sheet) .deposit-page-modal-box {
  width: min(480px, calc(100% - 40px));
  max-width: 480px;
  max-height: min(750px, calc(100% - 40px));
  border-radius: 24px;
}

body.play-page-active #depositPageModal.deposit-page-modal--overlay:not(.deposit-page-modal--wallet-method-sheet) .deposit-wizard-footer--method,
body.play-page-active #depositPageModal.deposit-page-modal--overlay:not(.deposit-page-modal--wallet-method-sheet) .deposit-intro {
  display: none !important;
}

body.play-page-active #depositPageModal.deposit-page-modal--overlay #walletMethodsSearchWrap {
  display: block;
  flex: none;
  width: 100%;
  max-width: none;
  margin: 0 0 12px;
}

body.play-page-active #depositPageModal.deposit-page-modal--overlay #walletMethodsSearchWrap[hidden] {
  display: none !important;
}

body.play-page-active #depositPageModal.deposit-page-modal--overlay .mood-wallet__methods-search {
  width: 100%;
}

body.play-page-active #depositPageModal.deposit-page-modal--wallet-method-sheet #walletMethodsSearchWrap,
body.play-page-active #depositPageModal.deposit-page-modal--wallet-method-sheet .deposit-category-strip {
  display: none !important;
}

body.play-page-active #depositPageModal.deposit-page-modal--overlay:not(.deposit-page-modal--wallet-method-sheet) .deposit-method-cards-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body.play-page-active #depositPageModal.deposit-page-modal--overlay:not(.deposit-page-modal--wallet-method-sheet) .dmc {
  flex-direction: row;
  align-items: center;
  text-align: left;
  min-height: 91px;
  padding: 14px 12px;
}

body.play-page-active #depositPageModal.deposit-page-modal--overlay:not(.deposit-page-modal--wallet-method-sheet) .dmc-main {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

body.play-page-active #depositPageModal.deposit-page-modal--overlay:not(.deposit-page-modal--wallet-method-sheet) .dmc-icon {
  width: 42px;
  height: 42px;
  padding: 4px;
}

body.play-page-active #depositPageModal.deposit-page-modal--overlay:not(.deposit-page-modal--wallet-method-sheet) .dmc-text {
  text-align: left;
}

body.play-page-active #depositPageModal.deposit-page-modal--overlay.deposit-page-modal--wallet-method-sheet .deposit-wizard-back-row {
  display: flex !important;
  margin: 0 0 8px;
}

@media (max-width: 700px), (orientation: landscape) and (max-height: 550px) {
  body.play-page-active #depositPageModal.deposit-page-modal--overlay:not(.deposit-page-modal--wallet-method-sheet) {
    align-items: stretch;
    justify-content: flex-end;
    padding: 0;
  }

  body.play-page-active #depositPageModal.deposit-page-modal--overlay:not(.deposit-page-modal--wallet-method-sheet) .deposit-page-modal-box {
    width: calc(100% - 16px);
    max-width: 620px;
    max-height: 100%;
    height: 100%;
    margin: 0 0 0 auto;
    border-radius: 0;
    border: 0;
    border-left: 1px solid var(--border, #ffffff12);
  }

  body.play-page-active #depositPageModal.deposit-page-modal--overlay:not(.deposit-page-modal--wallet-method-sheet) .deposit-method-cards-grid {
    grid-template-columns: 1fr;
  }

  body.play-page-active #depositPageModal.deposit-page-modal--overlay:not(.deposit-page-modal--wallet-method-sheet) .dmc {
    min-height: 73px;
    padding: 11px 12px;
  }
}
