/* All dimensions below are physical CSS pixels or a uniform percentage of the
   portrait cabinet. Native landscape styles and artwork are left intact. */
.portraitOnly, .portraitPanelShade { display: none; }
html[data-slot-orientation="portrait"] .portraitOnly { display: block; }
html[data-slot-orientation="portrait"] .portraitOnly[hidden] { display: none; }
html[data-slot-orientation="portrait"] .portraitPanelShade:not([hidden]) {
  position: fixed; z-index: 180; inset: 0; display: block;
  background: rgba(0, 6, 15, .78);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
}
html[data-slot-orientation="portrait"] :is(#gameMenu, #autoSpinPanel, #devPanel:not(.isCollapsed)) {
  position: fixed; z-index: 181; inset: auto; left: 50%; top: 50%;
  width: min(430px, calc(100vw - 24px)); max-height: calc(100dvh - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  height: auto; margin: 0; translate: -50% -50%;
  overflow: auto; overscroll-behavior: contain; scrollbar-width: thin;
  scrollbar-color: #b78631 #071725;
  border: 2px solid #d9a347; border-radius: 13px; clip-path: none;
  color: #f9edc5;
  background: radial-gradient(ellipse at 50% 0, #174762 0, transparent 68%), linear-gradient(135deg, #102b41, #041323 80%);
  box-shadow: inset 0 0 0 3px #633e13, inset 0 0 0 4px #b18734, 0 16px 70px #000;
}
html[data-slot-orientation="portrait"] :is(#gameMenu, #autoSpinPanel)[hidden],
html[data-slot-orientation="portrait"] #devPanel:is([hidden], .isCollapsed) { display: none; }
html[data-slot-orientation="portrait"] .templePanel > header {
  position: relative; min-height: 66px; padding: 14px 57px;
  gap: 0; border-bottom: 1px solid #a87933; flex-shrink: 0;
}
html[data-slot-orientation="portrait"] .templePanel > header > span { display: none; }
html[data-slot-orientation="portrait"] .templePanel h2 {
  font: 900 clamp(19px, 5vw, 25px)/1.15 Georgia, serif;
  letter-spacing: .025em; text-align: center; text-wrap: balance;
}
html[data-slot-orientation="portrait"] :is(.panelClose, #closePaytableButton, .portraitCross) {
  position: absolute; right: 9px; top: 11px; width: 44px; height: 44px; aspect-ratio: 1;
  display: grid; place-items: center; padding: 0; margin: 0;
  border: 1px solid #c5923f; border-radius: 50%; background: #082033;
  color: transparent; font-size: 0; line-height: 0; cursor: pointer;
}
/* The cross uses centered strokes; it has no font baseline or optical offset. */
html[data-slot-orientation="portrait"] :is(.panelClose, #closePaytableButton, .portraitCross)::before,
html[data-slot-orientation="portrait"] :is(.panelClose, #closePaytableButton, .portraitCross)::after {
  content: ""; position: absolute; inset: auto; left: 50%; top: 50%;
  width: 17px; height: 2px; border-radius: 1px; background: #ffe4a0;
  transform: translate(-50%, -50%) rotate(45deg); pointer-events: none;
}
html[data-slot-orientation="portrait"] :is(.panelClose, #closePaytableButton, .portraitCross)::after { transform: translate(-50%, -50%) rotate(-45deg); }
html[data-slot-orientation="portrait"] :is(.templePanel, #devPanel, #paytableDialog) :is(button, input, select):focus-visible {
  outline: 2px solid #6bedf1; outline-offset: 2px;
}
html[data-slot-orientation="portrait"] .menuGrid { padding: 12px 15px; gap: 7px; }
html[data-slot-orientation="portrait"] .menuGrid > button {
  min-height: 48px; grid-template-columns: 30px 1fr; gap: 10px; padding: 8px 12px;
  border-color: #7d724e; border-radius: 6px; transform: none;
}
html[data-slot-orientation="portrait"] .menuGrid i { font-size: 25px; }
html[data-slot-orientation="portrait"] .menuGrid strong { font-size: 14px; line-height: 1.15; }
html[data-slot-orientation="portrait"] .menuGrid small { font-size: 11px; line-height: 1.3; }
html[data-slot-orientation="portrait"] .volumeMixer { gap: 0; padding: 5px 20px 12px; }
html[data-slot-orientation="portrait"] .volumeMixer label { min-height: 38px; grid-template-columns: 70px 1fr; gap: 10px; font-size: 11px; }
html[data-slot-orientation="portrait"] .volumeMixer input { min-width: 0; min-height: 38px; margin: 0; }
html[data-slot-orientation="portrait"] .autoOptions { gap: 12px; padding: 20px; }
html[data-slot-orientation="portrait"] .autoOptions button { min-height: 78px; padding: 12px; font-size: 30px; }
html[data-slot-orientation="portrait"] .autoOptions button small { font-size: 11px; line-height: 1.2; }
html[data-slot-orientation="portrait"] .autoRule { min-height: 54px; padding: 0 20px 18px; font-size: 12px; line-height: 1.4; gap: 10px; }
html[data-slot-orientation="portrait"] .autoRule input { flex: 0 0 20px; width: 20px; height: 20px; margin: 0; }
html[data-slot-orientation="portrait"] #devPanel:not(.isCollapsed) { display: block; padding: 16px; }
html[data-slot-orientation="portrait"] #devToggle { width: calc(100% - 44px); min-height: 44px; padding: 0 12px; border: 0; clip-path: none; box-shadow: none; background: none; justify-content: flex-start; font-size: 19px; }
html[data-slot-orientation="portrait"] #devToggle > i { display: none; }
html[data-slot-orientation="portrait"] #devTools { width: 100%; padding: 12px 0 0; grid-template-columns: 1fr 1fr; gap: 10px; border: 0; box-shadow: none; clip-path: none; background: none; }
html[data-slot-orientation="portrait"] #devTools > strong { padding: 2px 0 10px; font-size: 12px; }
html[data-slot-orientation="portrait"] #devTools > button { min-height: 60px; font-size: 13px; gap: 5px; padding: 8px; }

/* Native dialog stays in the top layer; the body is the only scroll region. */
html[data-slot-orientation="portrait"] #paytableDialog {
  visibility: visible; width: min(600px, calc(100vw - 20px)); max-width: none;
  height: min(900px, calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
  max-height: none; margin: auto; padding: 0; overflow: visible;
}
html[data-slot-orientation="portrait"] #paytableDialog::backdrop { background: rgba(0, 4, 12, .86); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
html[data-slot-orientation="portrait"] .paytableFrame { grid-template-rows: 76px minmax(0, 1fr) 66px; border: 2px solid #dda844; border-radius: 13px; clip-path: none; box-shadow: inset 0 0 0 3px #65431b, 0 15px 60px #000; }
html[data-slot-orientation="portrait"] .paytableFrame > header { min-height: 0; padding: 8px 54px; gap: 0; }
html[data-slot-orientation="portrait"] .paytableFrame > header > span { display: none; }
html[data-slot-orientation="portrait"] .paytableFrame > header small { font-size: 8px; letter-spacing: .12em; margin-bottom: 5px; }
html[data-slot-orientation="portrait"] .paytableFrame > header h2 { font-size: clamp(21px, 5.6vw, 30px); line-height: 1; white-space: nowrap; }
html[data-slot-orientation="portrait"] #closePaytableButton { top: 15px; right: 8px; }
html[data-slot-orientation="portrait"] .paytableContent { padding: 17px 14px 22px; overscroll-behavior: contain; }
html[data-slot-orientation="portrait"] .paytablePage { min-height: 0; align-content: start; gap: 15px; }
html[data-slot-orientation="portrait"] .paytablePage > h3 { font-size: clamp(22px, 6vw, 32px); line-height: 1.05; }
html[data-slot-orientation="portrait"] .paytablePage > p { font-size: 12px; line-height: 1.55; }
html[data-slot-orientation="portrait"] .symbolPayGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
html[data-slot-orientation="portrait"] .symbolPayCard { min-height: 0; grid-template-columns: 1fr; padding: 10px 8px 12px; gap: 7px; text-align: center; }
html[data-slot-orientation="portrait"] .symbolPayCard img { width: min(100%, 108px); height: 95px; margin: auto; }
html[data-slot-orientation="portrait"] .symbolPayCard h4 { font-size: 13px; line-height: 1.2; }
html[data-slot-orientation="portrait"] .symbolPayCard p { font-size: 12px; line-height: 1.6; }
html[data-slot-orientation="portrait"] .featureRules, html[data-slot-orientation="portrait"] .infoGrid { grid-template-columns: 1fr; gap: 12px; }
html[data-slot-orientation="portrait"] .featureRule { padding: 15px; gap: 8px; }
html[data-slot-orientation="portrait"] .featureRule img { width: 100px; height: 100px; }
html[data-slot-orientation="portrait"] :is(.featureRule, .infoGrid) h4 { font-size: 18px; line-height: 1.15; }
html[data-slot-orientation="portrait"] :is(.featureRule, .infoGrid) p { font-size: 13px; line-height: 1.5; }
html[data-slot-orientation="portrait"] .infoGrid article { padding: 16px; }
html[data-slot-orientation="portrait"] .lineDiagram { grid-template-columns: 1fr; gap: 10px; }
html[data-slot-orientation="portrait"] .lineCard { padding: 10px; gap: 13px; }
html[data-slot-orientation="portrait"] .lineCard > strong { font-size: 15px; }
html[data-slot-orientation="portrait"] .miniLine { height: 56px; }
html[data-slot-orientation="portrait"] .miniLine i { width: 7px; }
html[data-slot-orientation="portrait"] #paytableTabs { display: none; }
html[data-slot-orientation="portrait"] .portraitPaytableNav { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 8px; align-items: center; padding: 9px 12px; border-top: 1px solid #a97b32; }
html[data-slot-orientation="portrait"] .portraitPaytableNav :is(button, select) { min-width: 0; height: 44px; padding: 0 7px; border: 1px solid #c69239; border-radius: 6px; background: #09263c; color: #ffe7a4; font: 700 12px/1.2 Arial, sans-serif; cursor: pointer; }
html[data-slot-orientation="portrait"] .portraitPaytableNav button { font: 400 32px/1 Georgia, serif; }

/* Full cabinet effects: only the artwork cards retain their native aspect. */
html[data-slot-orientation="portrait"] :is(.screenOverlay, .bookFeatureOverlay) { inset: 0; width: 100%; height: 100%; }
html[data-slot-orientation="portrait"] :is(.bigWinRays, .retriggerAwardRays, .bookRays) { width: 230%; aspect-ratio: 1; }
html[data-slot-orientation="portrait"] :is(.bigWinPopup, .bonusCompletePopup, .retriggerAwardPopup) { width: 96%; max-width: none; height: auto; flex: none; }
html[data-slot-orientation="portrait"] .bigWinReadout h2 { font-size: clamp(26px, 9cqw, 74px); line-height: .95; }
html[data-slot-orientation="portrait"] .bigWinDigits, html[data-slot-orientation="portrait"] .bonusCompleteDigits { font-size: 9cqw; }
html[data-slot-orientation="portrait"] :is(.bigWinAmount, .bonusCompleteAmount)[data-length="10"] > :is(.bigWinDigits, .bonusCompleteDigits) { font-size: 8cqw; }
html[data-slot-orientation="portrait"] :is(.bigWinAmount, .bonusCompleteAmount):is([data-length="11"], [data-length="12"]) > :is(.bigWinDigits, .bonusCompleteDigits) { font-size: 7.1cqw; }
html[data-slot-orientation="portrait"] .bonusCompleteReadout h2 { font-size: 8cqw; line-height: 1; }
html[data-slot-orientation="portrait"] .retriggerAwardDigits { font-size: 14cqw; }
html[data-slot-orientation="portrait"] .retriggerAwardReadout > strong { font-size: 6.2cqw; line-height: 1.1; }
html[data-slot-orientation="portrait"] .coinShower i { width: clamp(7px, calc(var(--coin-size) * .65), 18px); animation-name: portraitTempleCoinFall; }
html[data-slot-orientation="portrait"] .diamondBurst i { animation-name: portraitTempleDiamondLaunch; }
@keyframes portraitTempleCoinFall { from { transform: translate3d(0, -10%, 0) rotateY(0) rotateZ(0); } to { transform: translate3d(var(--coin-drift), calc(var(--slot-cabinet-height, 100dvh) * 1.3), 0) rotateY(1080deg) rotateZ(520deg); } }
@keyframes portraitTempleDiamondLaunch {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(45deg) scale(.15); }
  12%, 58% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--diamond-x)), calc(-50% + var(--diamond-y) * 2.7)) rotate(var(--diamond-rotate, 320deg)) scale(var(--diamond-scale, 1)); }
}
html[data-slot-orientation="portrait"] .messageCard { width: 90%; min-height: 0; max-height: 84%; gap: 15px; padding: 28px 20px; overflow: auto; border-radius: 12px; clip-path: none; }
html[data-slot-orientation="portrait"] .messageCard h2 { font-size: clamp(28px, 9cqw, 62px); }
html[data-slot-orientation="portrait"] .messageCard small { font-size: 11px; }
html[data-slot-orientation="portrait"] .messageCard p { font-size: 14px; line-height: 1.5; max-width: 100%; }
html[data-slot-orientation="portrait"] .messageCard > strong { font-size: 30px; }
html[data-slot-orientation="portrait"] .messageCard .goldAction { min-height: 44px; padding: 12px 22px; font-size: 15px; }
html[data-slot-orientation="portrait"] .bookFeatureOverlay .closedBook { width: 68%; height: auto; max-height: 58%; }
/* The 1664px source is asymmetrically padded: its visible Book is centered at
   x740, not x832. Move both registered layers by 112% * (832 - 740) / 1664. */
html[data-slot-orientation="portrait"] .openingBookSprite { width: 112%; left: 56.1923077%; top: 45%; }
/* Keep the symbol and Free Spins award on their original illustrated pages. */
html[data-slot-orientation="portrait"] .pageSelectionStage { width: 86.153846%; left: 56.1923077%; top: 45%; }
html[data-slot-orientation="portrait"] .pageFreeSpinsAward { gap: 4px; }
html[data-slot-orientation="portrait"] .pageFreeSpinsValue { font-size: 9cqw; }
html[data-slot-orientation="portrait"] .pageFreeSpinsAward span { font-size: max(9px, 2.6cqw); letter-spacing: .02em; }
html[data-slot-orientation="portrait"] .bookFeatureOverlay .bookInstruction { bottom: 23%; left: 8%; right: 8%; font-size: max(12px, 3.4cqw); line-height: 1.5; letter-spacing: .06em; }
html[data-slot-orientation="portrait"] .bookSkip { right: 50%; bottom: 10%; translate: 50% 0; min-height: 44px; min-width: 90px; font-size: 13px; padding: 10px 20px; }
html[data-slot-orientation="portrait"] .tombDoor { overflow: hidden; background-image: none; }
html[data-slot-orientation="portrait"] .tombDoor::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 200%; background: url("../assets/art/ui/bonus-transition-doors-v2.png") center / cover no-repeat; }
html[data-slot-orientation="portrait"] .tombDoorRight::before { left: -100%; }
html[data-slot-orientation="portrait"] .doorSeamSpark { width: 65%; }

/* Loading remains legible before any game controls become interactive. */
html[data-slot-orientation="portrait"] .preloader { background-position: 50% 35%; }
html[data-slot-orientation="portrait"] .preloader::before { width: 230%; }
html[data-slot-orientation="portrait"] .loaderCard { width: 88%; min-height: 0; padding: 38px 22px; gap: 19px; }
html[data-slot-orientation="portrait"] .loaderCard h1 { font-size: clamp(38px, 11cqw, 74px); line-height: .95; }
html[data-slot-orientation="portrait"] .loaderEyebrow { font-size: 11px; letter-spacing: .12em; }
html[data-slot-orientation="portrait"] .loaderStatus { font-size: 11px; line-height: 1.55; }
html[data-slot-orientation="portrait"] .loaderScarab { width: 94px; }
html[data-slot-orientation="portrait"] .loaderProgress { width: 100%; }
html[data-slot-orientation="portrait"] #preloaderPercent { font-size: 15px; }
html[data-slot-orientation="portrait"] #retryLoadButton { min-height: 44px; font-size: 15px; }
@media (prefers-reduced-motion: reduce) {
  html[data-slot-orientation="portrait"] :is(.portraitPanelShade, .portraitOnly) { animation: none; transition: none; }
}
html[data-slot-orientation="portrait"] .menuGrid > .portraitQaButton { display: grid; }
/* The loading screen is already portrait while modules/assets are in flight. */
@media (max-aspect-ratio: 1/1) {
  html:not([data-slot-orientation]) .preloader { position: fixed; inset: 0; width: 100vw; height: 100dvh; background-position: 50% 35%; }
  html:not([data-slot-orientation]) .preloader::before { width: 230%; }
  html:not([data-slot-orientation]) .loaderCard { width: min(88vw, 560px); min-height: 0; padding: 38px 22px; gap: 19px; }
  html:not([data-slot-orientation]) .loaderCard h1 { font-size: clamp(38px, 11vw, 74px); line-height: .95; }
  html:not([data-slot-orientation]) :is(.loaderEyebrow, .loaderStatus) { font-size: 11px; line-height: 1.55; letter-spacing: .12em; }
  html:not([data-slot-orientation]) .loaderScarab { width: 94px; }
  html:not([data-slot-orientation]) .loaderProgress { width: 100%; }
  html:not([data-slot-orientation]) #preloaderPercent { font-size: 15px; }
}
html[data-slot-orientation="portrait"] .preloader {
  background: radial-gradient(ellipse at 50% 43%, rgba(12, 90, 135, .14), transparent 44%), linear-gradient(rgba(3, 6, 18, .66), rgba(1, 3, 10, .91)), url("../assets/art/portrait/lower-cabinet-v1.webp") center top / auto 145% no-repeat;
}
@media (max-aspect-ratio: 1/1) {
  html:not([data-slot-orientation]) .preloader {
    background: radial-gradient(ellipse at 50% 43%, rgba(12, 90, 135, .14), transparent 44%), linear-gradient(rgba(3, 6, 18, .66), rgba(1, 3, 10, .91)), url("../assets/art/portrait/lower-cabinet-v1.webp") center top / auto 145% no-repeat;
  }
}

/* The sunrise grows in light, not in geometry. A landscape-sized square that
   scales out from the horizon exposes a moving hard edge on a tall cabinet. */
html[data-slot-orientation="portrait"] .sunriseRays {
  width: 420%;
  background:
    repeating-conic-gradient(from -3deg, transparent 0deg, rgba(255, 247, 190, .82) 1.05deg 1.8deg, rgba(255, 233, 155, .25) 2.6deg, transparent 4deg 8.5deg),
    repeating-conic-gradient(from 2deg, transparent 0deg, rgba(255, 166, 35, .54) .8deg 1.3deg, rgba(255, 153, 17, .14) 2deg, transparent 3.4deg 12deg);
  -webkit-mask-image: radial-gradient(circle closest-side, #000 0 30%, rgba(0, 0, 0, .94) 44%, rgba(0, 0, 0, .6) 62%, rgba(0, 0, 0, .16) 80%, transparent 96%);
  mask-image: radial-gradient(circle closest-side, #000 0 30%, rgba(0, 0, 0, .94) 44%, rgba(0, 0, 0, .6) 62%, rgba(0, 0, 0, .16) 80%, transparent 96%);
  filter: blur(clamp(2px, .6cqw, 5px)) saturate(1.25);
  transform: translate(-50%, -50%) rotate(-10deg);
}
html[data-slot-orientation="portrait"] .bonusCompleteOverlay.isSunrise .sunriseRays {
  animation-name: portraitTempleSunriseRays;
}
@keyframes portraitTempleSunriseRays {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(-10deg); }
  15% { opacity: .72; }
  38% { opacity: 1; transform: translate(-50%, -50%) rotate(4deg); }
  74% { opacity: .78; transform: translate(-50%, -50%) rotate(9deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) rotate(13deg); }
}
/* Cache the plaque glow independently of the live digits. Animating a large
   drop-shadow on their shared parent rerasterizes the artwork for every count. */
html[data-slot-orientation="portrait"] .bigWinPopup {
  background: none;
  filter: none;
  animation-name: portraitWinArrive, portraitWinFloat;
}
html[data-slot-orientation="portrait"] .bigWinPopup::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url("../assets/art/ui/big-win-popup.png") center / contain no-repeat;
  filter: drop-shadow(0 1.4cqh 1.2cqh #000c) drop-shadow(0 0 1.7cqh #ffc42fbd) drop-shadow(0 0 3.2cqh #24cce566);
}
html[data-slot-orientation="portrait"] .bigWinEnergy { animation-name: portraitWinEnergy; }
html[data-slot-orientation="portrait"] .bigWinOverlay.isExiting .bigWinPopup { animation-name: portraitWinDepart; }
@keyframes portraitWinArrive {
  0% { opacity: 0; transform: translateY(12%) scale(.28) rotate(-3deg); }
  62% { opacity: 1; transform: translateY(-2%) scale(1.045) rotate(.5deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}
@keyframes portraitWinFloat { to { transform: translateY(-1.25%) scale(1.012); } }
@keyframes portraitWinEnergy { from { opacity: .76; } to { opacity: 1; transform: scale(1.045); } }
@keyframes portraitWinDepart { to { opacity: 0; transform: translateY(-5%) scale(1.12); } }
