:root {
  --author-font-size: 7.8px;
  --reply-font-size: 10.8px;
  --same-speaker-gap: 4px;
  --different-speaker-gap: 62px;
  /* Keep the authored game palette intact when a browser offers forced dark mode. */
  color-scheme: only dark;
  forced-color-adjust: none;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #101114;
  color: #f4efe8;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  overscroll-behavior: none;
  touch-action: pan-y;
}

/* Game UI is procedural rather than document content: do not let user-agent
   color substitution invert its backgrounds, text, or controls. */
body,
.game-viewport,
button,
input,
textarea,
select {
  forced-color-adjust: none;
}

body {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: #000;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

[hidden] {
  display: none !important;
}

.game-viewport {
  position: relative;
  width: min(100vw, 75dvh);
  height: 100vh;
  height: 100dvh;
  margin-inline: auto;
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.main-menu,
.pano-screen,
.game-screen,
.dialogue-overlay,
.level-layer {
  position: absolute;
  inset: 0;
}

.main-menu {
  z-index: 5;
  overflow: hidden;
  background: #000;
}

.main-menu__background {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #000;
}

.main-menu__background > img,
.main-menu__background > video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}

.main-menu__controls {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 58%;
  transform: translate(-50%, -50%);
  display: grid;
  gap: 12px;
}

.main-menu__controls button {
  min-width: 150px;
  min-height: 44px;
}

.pano-screen {
  z-index: 6;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  background: #000;
}

/* Isolated fullscreen mechanic: Dice. */
.dice-overlay {
  position: absolute;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0.2);
}

.dice-popup {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(60%, 45dvh);
  max-height: 60dvh;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  container-type: inline-size;
  border: 1px solid rgba(255, 248, 236, 0.2);
  border-radius: 16px;
  background: radial-gradient(circle at 50% 30%, #2a2d34, #0a0b0e 72%);
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.58);
}

.dice-popup__header,
.dice-popup__footer {
  display: flex;
  align-items: center;
  gap: clamp(4px, 4cqw, 10px);
  padding: clamp(6px, 5cqw, 12px);
  background: rgba(8, 9, 11, 0.76);
}

.dice-popup__header {
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 248, 236, 0.1);
}

.dice-popup__header h2 {
  margin: 0;
  color: #fff6e6;
  font-size: clamp(11px, 6cqw, 16px);
}

.dice-popup .dice-popup__close {
  min-height: clamp(28px, 15cqw, 34px);
  padding-inline: clamp(5px, 4cqw, 10px);
  font-size: clamp(10px, 4cqw, 12px);
}

.dice-stage {
  display: grid;
  place-items: center;
  min-height: 0;
  padding: clamp(5px, 7cqw, 18px);
  gap: clamp(2px, 3cqw, 8px);
  overflow: hidden;
  perspective: clamp(280px, 300cqw, 700px);
  container-type: size;
}

.dice-stage[data-count="1"] { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.dice-stage[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: 1fr; }
.dice-stage[data-count="3"] { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); grid-template-areas: "top top" "left right"; }
.dice-stage[data-count="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); }
.dice-stage[data-count="5"] { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); grid-template-areas: "top-left . top-right" "bottom-left bottom-center bottom-right"; }
.dice-stage[data-count="6"] {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  grid-template-areas:
    ". . top top . ."
    ". mid-left mid-left mid-right mid-right ."
    "bottom-left bottom-left bottom-center bottom-center bottom-right bottom-right";
}

.die {
  --die-size: clamp(18px, min(18cqw, 26cqh), 64px);
  position: relative;
  place-self: center;
  width: var(--die-size);
  height: var(--die-size);
  opacity: 0;
  transform: scale(0.72);
  transform-style: preserve-3d;
  transition: opacity 150ms ease, transform 150ms ease;
}

.dice-stage[data-count="1"] .die { --die-size: clamp(44px, min(58cqw, 62cqh), 132px); }
.dice-stage[data-count="2"] .die { --die-size: clamp(28px, min(35cqw, 50cqh), 90px); }
.die.is-visible { opacity: 1; transform: scale(1); }
.dice-stage[data-count="3"] .die--0,
.dice-stage[data-count="6"] .die--0 { grid-area: top; }
.dice-stage[data-count="3"] .die--1,
.dice-stage[data-count="5"] .die--0 { grid-area: top-left; }
.dice-stage[data-count="3"] .die--2,
.dice-stage[data-count="5"] .die--1 { grid-area: top-right; }
.dice-stage[data-count="3"] .die--1 { grid-area: left; }
.dice-stage[data-count="3"] .die--2 { grid-area: right; }
.dice-stage[data-count="5"] .die--2 { grid-area: bottom-left; }
.dice-stage[data-count="5"] .die--3 { grid-area: bottom-center; }
.dice-stage[data-count="5"] .die--4 { grid-area: bottom-right; }
.dice-stage[data-count="6"] .die--0 { grid-area: top; }
.dice-stage[data-count="6"] .die--1 { grid-area: mid-left; }
.dice-stage[data-count="6"] .die--2 { grid-area: mid-right; }
.dice-stage[data-count="6"] .die--3 { grid-area: bottom-left; }
.dice-stage[data-count="6"] .die--4 { grid-area: bottom-center; }
.dice-stage[data-count="6"] .die--5 { grid-area: bottom-right; }

.dice-cube {
  position: absolute;
  inset: 0;
  transform: var(--dice-final-transform, rotateX(-18deg) rotateY(14deg));
  transform-style: preserve-3d;
  will-change: transform;
}

.die.is-rolling .dice-cube {
  animation: dice-tumble 714ms cubic-bezier(0.08, 0.72, 0.2, 1) both;
}

.die.is-rolling .dice-cube__face {
  animation: dice-face-motion-blur 714ms ease-out both;
}

.dice-cube__face {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 13%;
  border: 1px solid rgba(51, 56, 65, 0.28);
  border-radius: 12%;
  background: linear-gradient(145deg, #fff, #dbdde2 78%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), inset -7px -7px 12px rgba(105, 111, 122, 0.12);
  backface-visibility: hidden;
}

.dice-cube__face--front { transform: translateZ(calc(var(--die-size) / 2)); }
.dice-cube__face--back { transform: rotateY(180deg) translateZ(calc(var(--die-size) / 2)); }
.dice-cube__face--right { transform: rotateY(90deg) translateZ(calc(var(--die-size) / 2)); }
.dice-cube__face--left { transform: rotateY(-90deg) translateZ(calc(var(--die-size) / 2)); }
.dice-cube__face--top { transform: rotateX(90deg) translateZ(calc(var(--die-size) / 2)); }
.dice-cube__face--bottom { transform: rotateX(-90deg) translateZ(calc(var(--die-size) / 2)); }

.dice-pip {
  width: 48%;
  aspect-ratio: 1;
  place-self: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #59606b, #171a1f 72%);
  box-shadow: inset 1px 1px 2px rgba(255, 255, 255, 0.2);
}

.dice-popup__footer { justify-content: stretch; border-top: 1px solid rgba(255, 248, 236, 0.1); }
.dice-count { display: flex; align-items: center; justify-content: space-between; min-width: 0; gap: clamp(2px, 3cqw, 8px); }
.dice-popup .dice-count__button { flex: 0 0 auto; width: clamp(28px, 18cqw, 42px); min-height: clamp(30px, 19cqw, 44px); padding: 0; font-size: clamp(16px, 9cqw, 22px); }
.dice-count__value { min-width: 0; color: #fff6e6; font-size: clamp(11px, 6cqw, 16px); font-weight: 800; text-align: center; }
.dice-popup .dice-roll-button { min-width: 0; flex: 1 1 0; min-height: clamp(30px, 19cqw, 44px); padding-inline: clamp(5px, 5cqw, 16px); font-size: clamp(11px, 6cqw, 16px); }

@keyframes dice-tumble {
  0% { transform: rotateX(40deg) rotateY(-30deg) rotateZ(14deg) scale(0.82); }
  14% { transform: rotateX(255deg) rotateY(190deg) rotateZ(-76deg) scale(1); }
  76% { transform: rotateX(605deg) rotateY(548deg) rotateZ(48deg) scale(1); }
  100% { transform: var(--dice-final-transform); }
}

@keyframes dice-face-motion-blur {
  0% { filter: blur(0.3px); }
  14% { filter: blur(2.6px); }
  76% { filter: blur(1.3px); }
  100% { filter: none; }
}

.pano-view {
  position: relative;
  min-height: 0;
  background-color: #000;
  background-image: var(--aquest-pano-image, none);
  background-repeat: repeat-x;
  background-position: center;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}

.pano-view:active {
  cursor: grabbing;
}

.pano-view__canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.pano-view__hint {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.4);
  color: rgba(255, 255, 255, 0.84);
  font-size: 12px;
  pointer-events: none;
  z-index: 1;
  transition: opacity 220ms ease;
}

.pano-view__hint--fixed {
  opacity: 0.72;
}

.pano-screen__controls {
  display: grid;
  padding: 12px max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: #000;
}

.pano-screen__controls button {
  min-height: 48px;
}

.game-screen {
  z-index: 4;
  overflow: hidden;
  background: #000;
}

.level-layer {
  z-index: 0;
  background: #000;
}

.dialogue-overlay {
  z-index: 10;
  overflow: hidden;
  background: #08090b;
}

input,
textarea,
[contenteditable="true"],
[contenteditable="plaintext-only"] {
  user-select: text;
  -webkit-user-select: text;
  -webkit-touch-callout: default;
}

.loading-screen {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 32px;
  background: #000;
  opacity: 1;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.loading-screen__bar {
  width: min(280px, 72vw);
  height: 5px;
  overflow: hidden;
  background: #303030;
}

.loading-screen__content {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: min(280px, 72vw);
}

.loading-screen__content .loading-screen__bar {
  width: 100%;
}

.loading-screen__amount {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.loading-screen__amount--error {
  color: #ffb4a9;
  font-size: 13px;
  line-height: 1.45;
}

.loading-screen__progress {
  width: 0;
  height: 100%;
  background: #b5b5b5;
  transition: width 150ms ease-out;
}

.is-loading .app-shell {
  opacity: 0;
  pointer-events: none;
}

.is-ready .loading-screen {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

button,
input {
  font: inherit;
}

.app-shell {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(360px, 38vw, 620px);
  height: 100%;
  min-height: 0;
  transition: opacity 180ms ease;
}

.app-shell::before {
  content: none;
}

.scene {
  position: relative;
  overflow: hidden;
  min-width: 0;
  display: grid;
  place-items: center;
  background: #000 var(--aquest-location-image, none) center / contain no-repeat;
}

.scene__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

.scene::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.32), transparent 28%, rgba(0, 0, 0, 0.22));
  pointer-events: none;
}

.scene::after {
  content: none;
}

.scene__label {
  position: absolute;
  z-index: 2;
  left: 24px;
  top: 24px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  max-width: calc(100% - 130px);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.72);
}

.restart-button-overlay {
  position: static;
  z-index: 3;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255, 248, 236, 0.22);
  background: rgba(12, 13, 15, 0.46);
  color: rgba(255, 248, 236, 0.78);
  font-size: 12px;
}

.dialogue-window-controls {
  position: absolute;
  z-index: 3;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
}

.back-button-overlay {
  position: static;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255, 248, 236, 0.22);
  background: rgba(12, 13, 15, 0.46);
  color: rgba(255, 248, 236, 0.78);
  font-size: 12px;
}

.dice-button-overlay {
  position: static;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255, 248, 236, 0.22);
  background: rgba(12, 13, 15, 0.46);
  color: rgba(255, 248, 236, 0.78);
  font-size: 12px;
}

.restart-button-overlay:not(:disabled):hover,
.dice-button-overlay:not(:disabled):hover {
  border-color: rgba(255, 248, 236, 0.4);
  background: rgba(12, 13, 15, 0.68);
  color: #fffaf0;
}

.dialogue-panel {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  height: 100%;
  min-width: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(17, 19, 23, 0.98);
  box-shadow: -24px 0 70px rgba(0, 0, 0, 0.4);
  overflow: visible;
}

.dialogue-portrait-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: visible;
  pointer-events: none;
}

.dialogue-portrait {
  position: absolute;
  top: 0;
  right: calc(100% + 2px);
  width: 40px;
  height: 60px;
  border: 1px solid rgba(255, 255, 255, 0.196);
  background-position: center;
  background-size: cover;
  opacity: 0;
  pointer-events: none;
  will-change: transform;
  transition:
    width 800ms cubic-bezier(0.45, 0, 0.25, 1),
    height 800ms cubic-bezier(0.45, 0, 0.25, 1),
    opacity 600ms cubic-bezier(0.45, 0, 0.25, 1);
}

.dialogue-portrait--active {
  width: 80px;
  height: 120px;
}

.dialogue-portrait--visible {
  opacity: 1;
}

.dialogue-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dialogue-title {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #fff7e9;
  font-size: 17px;
  font-weight: 800;
}

.step-counter {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.74);
  font-size: 11px;
  font-weight: 700;
}

.dialogue-log {
  min-height: 0;
  overflow-y: auto;
  padding: 18px;
}

.dialogue-log::-webkit-scrollbar {
  width: 10px;
}

.dialogue-log::-webkit-scrollbar-thumb {
  border: 3px solid rgba(17, 19, 23, 0.98);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.empty-state {
  color: rgba(255, 255, 255, 0.58);
  font-size: 16px;
  line-height: 1.5;
}

.reply {
  position: relative;
  margin: 0;
  padding: 10px 12px;
  border-radius: 6px;
}

.reply + .reply {
  margin-top: var(--same-speaker-gap);
}

.reply.reply--speaker-change {
  margin-top: var(--different-speaker-gap);
}

.video-message + .reply:not(.reply--speaker-change) {
  margin-top: var(--same-speaker-gap);
}

.video-message + .reply.reply--speaker-change {
  margin-top: var(--different-speaker-gap);
}

.reply--same-speaker {
  padding-top: 9px;
}

.reply--active .reply__text {
  color: #fffaf0;
}

.reply__author {
  display: block;
  margin-bottom: 6px;
  font-size: var(--author-font-size);
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.reply__text {
  min-height: 27px;
  margin: 0;
  color: rgba(255, 248, 236, 0.82);
  font-size: var(--reply-font-size);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.reply--same-speaker .reply__author {
  display: none;
}

.reply[data-speaker="narrator"] {
  background: rgba(243, 210, 122, 0.06);
}

.reply[data-speaker="narrator"] .reply__author {
  color: #f3d27a;
}

.dialogue-portrait[data-speaker="narrator"] {
  background-image: var(--aquest-portrait-narrator, none);
}

.reply[data-speaker="detective"] {
  background: rgba(121, 211, 255, 0.055);
}

.reply[data-speaker="detective"] .reply__author {
  color: #79d3ff;
}

.dialogue-portrait[data-speaker="detective"] {
  background-image: var(--aquest-portrait-detective, none);
}

.reply[data-speaker="assistant"] {
  background: rgba(150, 224, 141, 0.055);
}

.reply[data-speaker="assistant"] .reply__author {
  color: #96e08d;
}

.dialogue-portrait[data-speaker="assistant"] {
  background-image: var(--aquest-portrait-assistant, none);
}

.video-message {
  width: calc(100% + 36px);
  margin: var(--same-speaker-gap) -18px 0;
  opacity: 0;
  transition: opacity 800ms ease;
}

.video-message--visible {
  opacity: 1;
}

.video-message__media {
  display: block;
  width: 100%;
  height: auto;
  background: #000;
  pointer-events: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

.dialogue-controls {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-top: 12px;
  padding-bottom: 50px;
}

.restart-footer {
  display: flex;
  justify-content: flex-start;
  padding: 14px 18px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(17, 19, 23, 0.88), #111317);
}

.button {
  min-height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
}

.button:disabled {
  cursor: default;
  opacity: 0.42;
}

.button[hidden] {
  display: none;
}

.button--primary {
  background: #f0b85a;
  color: #1d1710;
}

.button--primary:not(:disabled):hover {
  background: #ffd17d;
}

.button--secondary {
  background: rgba(255, 255, 255, 0.11);
  color: #fff6e6;
}

.button--secondary:not(:disabled):hover {
  background: rgba(255, 255, 255, 0.18);
}

.button--inline {
  border: 1px solid rgba(255, 248, 236, 0.24);
  background: rgba(255, 248, 236, 0.035);
  color: rgba(255, 248, 236, 0.82);
}

.button--inline:not(:disabled):hover {
  border-color: rgba(255, 248, 236, 0.38);
  background: rgba(255, 248, 236, 0.075);
  color: #fffaf0;
}

@media (max-width: 820px) {
  body {
    overflow: hidden;
  }

  .app-shell {
    --portrait-rail-width: clamp(86px, 23.4vw, 101px);
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 100vh;
    min-height: 100dvh;
    background: #08090b;
  }

  .app-shell::before {
    content: "";
    position: absolute;
    inset: -12px;
    z-index: 0;
    background-image: var(--aquest-location-image, none);
    background-position: center;
    background-repeat: no-repeat;
    background-size: auto 100%;
    filter: blur(8px);
    opacity: 0.46;
    transform: scale(1.04);
    pointer-events: none;
  }

  .scene {
    z-index: 2;
    aspect-ratio: 3 / 2;
    width: 100%;
    min-height: 0;
  }

  .dialogue-panel {
    z-index: 1;
    width: calc(100% - var(--portrait-rail-width));
    margin-left: var(--portrait-rail-width);
    height: auto;
    min-height: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .dialogue-portrait--active {
    width: 86px;
    height: 129px;
  }

  .dialogue-portrait {
    right: calc(100% + 2px);
  }

  .dialogue-header,
  .dialogue-log,
  .restart-footer {
    padding-right: 14px;
  }

  .dialogue-log {
    padding-left: 14px;
  }

  .video-message {
    width: calc(100% + 28px);
    margin-inline: -14px;
  }

  .button--inline {
    width: 100%;
    min-height: 56px;
  }

  .restart-footer .button {
    width: 100%;
  }

  .restart-button-overlay {
    top: 10px;
    right: 10px;
    min-height: 28px;
    padding-inline: 9px;
    font-size: 11px;
  }

  .scene__label {
    left: 12px;
    top: 10px;
    max-width: calc(100% - 92px);
    gap: 8px;
    font-size: 12px;
  }

  .scene__label .step-counter {
    font-size: 10px;
  }

}

@media (max-width: 430px) {
  .dialogue-log {
    padding-top: 14px;
  }

  .restart-footer {
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }
}

/* AQUEST всегда использует вертикальную игровую композицию, даже в широком браузере. */
.game-viewport .app-shell {
  --portrait-rail-width: clamp(86px, 23.4vw, 101px);
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  background: #08090b;
}

.game-viewport .app-shell::before {
  content: "";
  position: absolute;
  inset: -12px;
  z-index: 0;
  background-image: var(--aquest-location-image, none);
  background-position: center;
  background-repeat: no-repeat;
  background-size: auto 100%;
  filter: blur(8px);
  opacity: 0.46;
  transform: scale(1.04);
  pointer-events: none;
}

.game-viewport .scene {
  z-index: 2;
  aspect-ratio: 3 / 2;
  width: 100%;
  min-height: 0;
}

.game-viewport .dialogue-panel {
  z-index: 1;
  width: calc(100% - var(--portrait-rail-width));
  margin-left: var(--portrait-rail-width);
  height: auto;
  min-height: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.game-viewport .dialogue-portrait--active {
  width: 86px;
  height: 129px;
}

.game-viewport .dialogue-header,
.game-viewport .dialogue-log,
.game-viewport .restart-footer {
  padding-right: 14px;
}

.game-viewport .dialogue-log {
  padding-right: 3px;
  padding-left: 3px;
}

.game-viewport .video-message {
  width: calc(100% + 6px);
  margin-inline: -3px;
}

.game-viewport .button--inline {
  width: 100%;
  min-height: 56px;
}

.game-viewport .scene__label {
  left: 12px;
  top: 10px;
  max-width: calc(100% - 176px);
  gap: 8px;
  font-size: 12px;
}

.game-viewport .scene__label .step-counter {
  font-size: 10px;
}

@media (orientation: landscape) {
  .game-viewport {
    width: 75dvh;
  }
}
