@font-face {
  font-family: "Spectral";
  src: url("assets_v2/font/Spectral-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Spectral";
  src: url("assets_v2/font/Spectral-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("assets_v2/font/SourceSans3-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("assets_v2/font/SourceSans3-MediumItalic.ttf") format("truetype");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("assets_v2/font/SourceSans3-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Alegreya SC";
  src: url("assets_v2/font/AlegreyaSC-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --text: #e6d3b3;
  --text-dim: #b89a78;
  --accent: #c45a2d;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-tap-highlight-color: transparent;
}

button,
a,
.inv-slot,
.float,
.big-btn,
.info__tabs button,
.audio-dock__btn {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

html,
body {
  margin: 0;
  height: 100%;
  background: #050403;
  color: var(--text);
  font-family: "Spectral", Georgia, serif;
  overflow: hidden;
}

img,
video {
  display: block;
  max-width: none;
  user-select: none;
  -webkit-user-drag: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

/* Первый экран: ждём базу + персонажа, потом тайпврайтер */
.boot {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: #050403;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.boot.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.boot__inner {
  font-family: "Alegreya SC", Georgia, serif;
  font-weight: 700;
  color: #b89a78;
  letter-spacing: 0.06em;
  font-size: clamp(0.95rem, 2.5vmin, 1.25rem);
  text-transform: none;
  max-width: 18em;
  text-align: center;
  line-height: 1.35;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: url("assets_v2/background/background2.png") center / cover no-repeat;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, 0.45) 100%);
}

.viewport {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100dvh;
  display: grid;
  place-items: center;
  padding: 1vmin;
  overflow: auto;
}

.stage-fit {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.stage {
  position: absolute;
  left: 0;
  top: 0;
  width: 1256px;
  height: 1638px;
  transform-origin: top left;
}

.stage__base {
  position: absolute;
  inset: 0;
  width: 1256px;
  height: 1638px;
  pointer-events: none;
  z-index: 1;
}

.stage__darken {
  position: absolute;
  left: 0;
  top: 0;
  width: auto;
  height: auto;
  pointer-events: none;
  z-index: 6;
  image-rendering: auto;
}

.stage__mid-webm {
  position: absolute;
  left: 0;
  top: 0;
  width: auto;
  height: auto;
  pointer-events: none;
  z-index: 3;
  background: transparent;
  object-fit: contain;
}

.stage__char-shadow {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 2;
  object-fit: contain;
}

.stage__char-level {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 4;
  object-fit: contain;
  will-change: transform;
}

.stage__head-hit {
  position: absolute;
  z-index: 5;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* ===== Floating icons ===== */
.floats {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.float {
  position: absolute;
  width: 86px;
  height: 86px;
  margin-left: -43px;
  margin-top: -43px;
  pointer-events: auto;
  transform: translate3d(var(--fx, 0px), var(--fy, 0px), 0) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  will-change: transform;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45));
  transition: filter 0.2s ease;
}

.float img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.float:hover {
  filter: drop-shadow(0 0 12px rgba(224, 138, 79, 0.45)) drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45));
}

.float:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* ===== Big buttons ===== */
.big-btns {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.big-btn {
  position: absolute;
  pointer-events: auto;
  border-radius: 50%;
  overflow: visible;
  transform: translate(-50%, -50%);
  transition: filter 0.15s ease, transform 0.15s ease;
}

.big-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  position: relative;
  z-index: 1;
}

.big-btn::before {
  content: "";
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow, rgba(224, 138, 79, 0.55)) 0%, transparent 72%);
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 0;
  pointer-events: none;
  filter: blur(1px);
}

.big-btn:hover::before {
  opacity: 1;
}

.big-btn:hover {
  filter: brightness(1.08);
}

.big-btn:active {
  transform: translate(-50%, -50%) scale(0.97);
}

/* ===== Inventory ===== */
.inv {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.inv__title-plate {
  position: absolute;
  pointer-events: none;
  display: grid;
  place-items: center;
}

.inv__title-plate img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.inv__title {
  position: relative;
  z-index: 1;
  font-family: "Alegreya SC", Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #a8885e;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.inv__grid {
  position: absolute;
  display: grid;
  pointer-events: none;
}

.inv-slot {
  position: relative;
  pointer-events: none;
  display: grid;
  place-items: end center;
  overflow: visible;
  border-radius: 8px;
}

.inv-slot.is-filled {
  pointer-events: auto;
  cursor: pointer;
}

.inv-slot video {
  /* Одна ширина на всех, высота по кадру — без подгона под слот.
     Низ кадра = общая линия (place-items: end у слота). */
  width: var(--vid, 92%);
  height: auto;
  object-fit: fill;
  background: transparent;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  transform: translate(var(--ox, 0px), var(--oy, 0px)) scale(var(--sc, 1));
  transform-origin: center bottom;
  pointer-events: none;
  transition: filter 0.2s ease;
}

.inv-slot.is-filled:hover {
  box-shadow: none;
  background: transparent;
}

.inv-slot.is-filled:hover video,
.inv-slot.is-hint video {
  filter: drop-shadow(0 0 12px rgba(224, 138, 79, 0.75))
    drop-shadow(0 0 22px rgba(196, 90, 45, 0.5));
}

.inv-slot__spin {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  margin: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.inv-slot.is-media-ready .inv-slot__spin {
  display: none;
}

.media-load {
  position: absolute;
  display: grid;
  place-items: center;
  overflow: hidden;
  /* прозрачный: иначе letterbox у contain даёт чёрные/серые полосы поверх фона попапа */
  background: transparent;
  transform-origin: center center;
}

.media-load__spin {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(184, 154, 120, 0.25);
  border-top-color: #c4a57a;
  border-radius: 50%;
  animation: media-spin 0.7s linear infinite;
  z-index: 2;
  pointer-events: none;
}

.media-load > .modal__media-el {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.media-load.is-ready > .modal__media-el {
  opacity: 1;
}

.media-load.is-ready > .media-load__spin {
  display: none;
}

@keyframes media-spin {
  to {
    transform: rotate(360deg);
  }
}

.inv__title-plate.is-hint {
  filter: drop-shadow(0 0 10px rgba(224, 138, 79, 0.7))
    drop-shadow(0 0 22px rgba(196, 90, 45, 0.45));
  transition: filter 0.2s ease;
}

.arrow.is-hint {
  filter: brightness(1.2) drop-shadow(0 0 8px rgba(224, 138, 79, 0.75));
  animation: hint-pulse 1.15s ease-in-out infinite;
}

.arrow.is-nudge {
  animation: hint-nudge 1.35s ease-in-out 1;
}

@keyframes hint-pulse {
  0%,
  100% {
    filter: brightness(1.08) drop-shadow(0 0 6px rgba(224, 138, 79, 0.45));
  }
  50% {
    filter: brightness(1.28) drop-shadow(0 0 14px rgba(224, 138, 79, 0.9));
  }
}

@keyframes hint-nudge {
  0%,
  100% {
    filter: none;
  }
  15%,
  30% {
    filter: brightness(1.25) drop-shadow(0 0 12px rgba(224, 138, 79, 0.85));
  }
  42% {
    filter: none;
  }
  55%,
  70% {
    filter: brightness(1.25) drop-shadow(0 0 12px rgba(224, 138, 79, 0.85));
  }
  82% {
    filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .arrow.is-hint {
    animation: none;
  }
  .arrow.is-nudge {
    animation: none;
  }
}

/* ===== Info panel ===== */
.info {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
}

.info__tabs {
  position: absolute;
  display: flex;
  gap: 14px;
  pointer-events: none;
}

.info__tab {
  pointer-events: auto;
  width: 120px;
  height: 70px;
  transition: filter 0.15s ease;
}

.info__tab img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.info__tab.is-active {
  filter: brightness(0.72) saturate(0.55);
}

.info__tab:not(.is-active):hover {
  filter: brightness(1.08);
}

.info__text {
  position: absolute;
  pointer-events: auto;
  overflow: hidden;
  padding: 16px 16px 14px 22px;
  color: #b39a78;
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Лёгкое затемнение низа поля — не на буквах, чтобы скролл не ломался */
.info__text::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 48px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(8, 6, 4, 0.72) 100%);
  z-index: 2;
}

.info__heading {
  flex: 0 0 auto;
  font-family: "Alegreya SC", Georgia, serif;
  font-size: 1.55em;
  font-weight: 700;
  color: #a8885e;
  letter-spacing: 0.02em;
  padding-bottom: 10px;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.85),
    0 2px 8px rgba(0, 0, 0, 0.65),
    0 0 14px rgba(0, 0, 0, 0.4);
}

.info__rule {
  flex: 0 0 auto;
  height: 1px;
  margin: 0 0 12px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(180, 140, 90, 0.55) 15%,
    rgba(200, 160, 100, 0.75) 50%,
    rgba(180, 140, 90, 0.55) 85%,
    transparent 100%
  );
}

.info__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  scrollbar-width: thin;
  scrollbar-color: #7a5a3a transparent;
  font-weight: 500;
  color: #b39a78;
  position: relative;
  z-index: 1;
  padding-right: 6px;
  box-sizing: border-box;
}

.info__body p {
  margin: 0 0 0.75em;
  color: inherit;
}

.info__body p:last-child {
  margin-bottom: 0;
}

/* Без заголовка панели и линии (Обо мне / Hard Skills) */
.info__text.is-bare .info__heading,
.info__text.is-bare .info__rule {
  display: none;
}

.info__text.is-reveal .info__body {
  cursor: pointer;
}

.info__line {
  margin: 0 0 0.35em;
}

.info__line--gap {
  min-height: 0.35em;
  margin: 0 0 0.15em;
}

.info__line:last-child {
  margin-bottom: 0;
}

.info__line--tight {
  margin: 0 0 0.08em;
  line-height: 1.15;
}

.info__cursor {
  display: inline;
  margin-left: 1px;
  color: #a8885e;
  animation: info-cursor-blink 0.72s step-end infinite;
}

.info__em {
  font-weight: 700;
  color: inherit;
}

@keyframes info-cursor-blink {
  50% {
    opacity: 0;
  }
}

/* Заголовок внутри скролла (Hard Skills и т.п.) */
.info__scroll-head {
  margin: 0 0 1.1em;
}

.info__scroll-title {
  font-family: "Alegreya SC", Georgia, serif;
  font-size: 1.55em;
  font-weight: 700;
  color: #a8885e;
  letter-spacing: 0.02em;
  padding-bottom: 10px;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.85),
    0 2px 8px rgba(0, 0, 0, 0.65),
    0 0 14px rgba(0, 0, 0, 0.4);
}

.info__scroll-rule {
  height: 1px;
  margin: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(180, 140, 90, 0.55) 15%,
    rgba(200, 160, 100, 0.75) 50%,
    rgba(180, 140, 90, 0.55) 85%,
    transparent 100%
  );
}

/* Hard Skills — блоки со скроллом */
.info__block {
  margin: 0 0 1.35em;
}

.info__block:last-child {
  margin-bottom: 0;
}

.info__block--call {
  margin-top: 2.4em;
  padding-top: 0.35em;
}

.info__block--call .info__block-desc {
  font-weight: 500;
  font-style: italic;
  color: #a8885e;
  line-height: 1.45;
}

.info__block-title {
  font-family: "Alegreya SC", Georgia, serif;
  font-size: 1em;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.25;
  margin: 0 0 0.42em;
  color: #a8885e;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

/* Цифры 01/02 в Alegreya SC визуально мельче — чуть крупнее */
.info__block-num {
  font-size: 1.22em;
  letter-spacing: 0.02em;
  vertical-align: -0.02em;
}

/* & из рабочего шрифта, не из Alegreya SC */
.info__block-amp {
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.05em;
  letter-spacing: 0;
}

.info__block-skills {
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 1em;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 0.42em;
  color: #b39a78;
}

.info__block-skills:not(:last-child) {
  margin-bottom: 0.95em;
}

.info__block-skills--row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35em 0.55em;
}

.info__block-skills-text {
  min-width: 0;
}

.info__contact-icon {
  width: 1.05em;
  height: 1.05em;
  flex: 0 0 auto;
  color: #a8885e;
  opacity: 0.92;
}

.info__copy {
  flex: 0 0 auto;
  margin-left: 0.15em;
  padding: 0.12em 0.45em;
  border: 1px solid rgba(168, 136, 94, 0.45);
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.22);
  color: #c4ae8c;
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 0.72em;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.info__copy:hover {
  border-color: rgba(200, 168, 120, 0.7);
  color: #e0cba8;
  background: rgba(0, 0, 0, 0.35);
}

.info__copy.is-copied {
  border-color: rgba(120, 170, 110, 0.65);
  color: #b8d4a8;
}

.info__copy.is-copied::after {
  content: " ✓";
}

.info__block-desc {
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 1em;
  font-weight: 500;
  line-height: 1.4;
  margin: 0;
  color: #9a8164;
}

.info__pager {
  display: none;
}

.info__counter {
  display: none;
}

/* ===== Arrows ===== */
.arrow {
  position: absolute;
  width: 45px;
  height: 44px;
  pointer-events: auto;
  z-index: 7;
  transition: filter 0.15s ease, opacity 0.15s ease;
}

.arrow img {
  width: 100%;
  height: 100%;
}

.arrow:hover:not(:disabled) {
  filter: brightness(1.15);
}

.arrow:disabled {
  opacity: 0.35;
  cursor: default;
  filter: grayscale(0.4);
}

/* ===== Modal ===== */
.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 2vmin;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(3px);
  cursor: pointer;
}

.modal__dialog {
  position: relative;
  z-index: 1;
  width: min(640px, 94vw);
  max-height: 96dvh;
}

.modal__stack {
  position: relative;
  width: 100%;
  aspect-ratio: 993 / 1136;
  max-height: 92dvh;
  margin: 0 auto;
  transition: transform 0.15s ease;
}

.modal__stack.is-company-frame {
  aspect-ratio: 993 / 1231;
  max-height: 94dvh;
}

.modal__shadow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 145%;
  height: auto;
  transform: translate(-50%, -50%);
  z-index: 1;
  pointer-events: none;
  opacity: 0.95;
}

.modal__content-window {
  position: absolute;
  /* цифры из data.js → modal.image, дефолт = вырез рамки */
  left: 4.8%;
  top: 9%;
  width: 90.2%;
  height: 46.7%;
  z-index: 2;
  overflow: hidden;
  background: #140f0c;
}

.modal__inside {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  z-index: 1;
}

.modal__inside.is-empty {
  display: none;
}

.modal__media {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.modal__media-el {
  position: absolute;
  display: block;
  transform-origin: center center;
  will-change: transform;
}

.modal__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  z-index: 3;
  pointer-events: none;
}

/* Листание слайдов попапа — над верхней планкой рамки (крути в data.js → modal.pager) */
.modal__pager {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 6;
  pointer-events: none;
  height: 5%;
}

.modal__pager .arrow {
  pointer-events: auto;
}

.modal__counter {
  position: absolute;
  display: grid;
  place-items: center;
  font-size: clamp(14px, 2.4vw, 20px);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #e8d2b0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
  pointer-events: none;
  white-space: nowrap;
}

/* 01/02 — чуть тише яркого текста снизу */
.modal__counter.is-multi {
  color: #c4a882;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.45);
}

/* 01/01 — почти в цвет верхней планки */
.modal__counter.is-single {
  color: #6e5540;
  text-shadow: none;
  opacity: 0.72;
}

.modal__content-window.is-clickable {
  cursor: pointer;
}

.arrow--modal img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal__close {
  position: absolute;
  /* красный X на pop_up.png: ~95–98% left, ~3.7–5.8% top */
  top: 2.5%;
  left: 92.5%;
  width: 7%;
  aspect-ratio: 1;
  z-index: 20;
  border-radius: 4px;
  cursor: pointer;
  pointer-events: auto;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}

.modal__body-text {
  position: absolute;
  /* цифры из data.js → modal.text */
  left: 8%;
  top: 58%;
  width: 84%;
  height: 35%;
  z-index: 4;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  min-height: 0;
  padding: 0.85rem 0.85rem 1.25rem;
  box-sizing: border-box;
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.4;
  color: #b39a78;
  pointer-events: auto;
  scrollbar-width: thin;
  scrollbar-color: #7a5a3a transparent;
  box-shadow: inset 0 -32px 28px -16px rgba(8, 6, 4, 0.78);
}

/* Company popups: как панель Hard/Soft (22px на stage), в попапе чуть компактнее */
.modal__body-text.is-company {
  font-size: clamp(13px, 1.45vw, 17px);
  line-height: 1.38;
  padding: 1rem 0.95rem 1.55rem;
}

.modal__co-brand {
  font-family: "Alegreya SC", Georgia, serif;
  font-size: 1.35em;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.2;
  color: #a8885e;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.85),
    0 2px 8px rgba(0, 0, 0, 0.55);
  margin: 0 0 0.3em;
}

.modal__co-brand.is-playrix {
  color: #2f6b3a;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.75),
    0 0 10px rgba(20, 70, 30, 0.35);
}

.modal__co-brand.is-shki {
  color: #c8c4bc;
  font-size: 1.15em;
  letter-spacing: 0.02em;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.85),
    0 0 10px rgba(200, 200, 210, 0.2);
}

.modal__co-brand.is-playkot {
  color: #7a4a9e;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.8),
    0 0 10px rgba(70, 25, 110, 0.4);
}

.modal__co-brand.is-own {
  color: #c49a3c;
  font-size: 1.2em;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.8),
    0 0 10px rgba(196, 150, 55, 0.35);
}

.modal__co-rule {
  height: 1px;
  margin: 0 0 0.85em;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(180, 140, 90, 0.55) 15%,
    rgba(200, 160, 100, 0.75) 50%,
    rgba(180, 140, 90, 0.55) 85%,
    transparent 100%
  );
}

.modal__co-meta {
  margin: 0 0 1em;
}

.modal__co-meta-row {
  margin: 0 0 0.4em;
  font-weight: 500;
  color: #9a8164;
  line-height: 1.4;
}

.modal__co-meta-row:last-child {
  margin-bottom: 0;
}

.modal__co-meta-row.is-sub {
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-weight: 500;
  font-style: italic;
  color: #7a6550;
  margin-bottom: 0.35em;
}

.modal__co-meta-label {
  font-weight: 700;
  color: #b39a78;
}

.modal__co-section {
  margin: 0 0 1.05em;
}

.modal__co-section:last-child {
  margin-bottom: 0.35em;
}

.modal__co-section-title {
  font-family: "Alegreya SC", Georgia, serif;
  font-size: 1.05em;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.25;
  color: #a8885e;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  margin: 0 0 0.4em;
}

.modal__co-p {
  margin: 0 0 0.55em;
  font-weight: 500;
  color: #9a8164;
  line-height: 1.4;
}

.modal__co-p:last-child {
  margin-bottom: 0;
}

.modal__co-link {
  color: #c4a57a;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
}

.modal__co-link:hover {
  color: #e0c49a;
}

/* ===== Audio dock (плейсхолдеры до иконок) ===== */
.audio-dock,
.zoom-dock {
  position: absolute;
  z-index: 8;
  display: flex;
  pointer-events: none;
}

.audio-dock__btn {
  pointer-events: auto;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: rgba(20, 14, 10, 0.72);
  border: 1px solid rgba(232, 210, 176, 0.35);
  color: #e8d2b0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: filter 0.15s ease, background 0.15s ease;
}

.audio-dock__btn:hover {
  filter: brightness(1.12);
}

.audio-dock__btn.is-muted {
  color: #8a7a68;
  border-color: rgba(138, 122, 104, 0.45);
}

.audio-dock__btn:disabled {
  opacity: 0.4;
  cursor: default;
  filter: none;
}

.zoom-dock__btn {
  display: grid;
  place-items: center;
  padding: 0;
}

.zoom-dock__icon {
  width: 60%;
  height: 60%;
  display: block;
}

@media (max-width: 700px) {
  body {
    overflow: auto;
  }
  .viewport {
    height: auto;
    min-height: 100dvh;
    padding: 0.2vmin;
  }
  .modal {
    padding: 1.5vmin;
  }
  .modal__dialog {
    width: min(400px, 78vw);
    max-height: 88dvh;
  }
  .modal__stack {
    max-height: 72dvh;
  }
  .modal__stack.is-company-frame {
    max-height: 78dvh;
  }
  /* попап вне scale сцены — иначе шрифт выглядит огромным рядом с панелью */
  .modal__body-text {
    font-size: 8px;
    line-height: 1.35;
    padding: 0.35rem 0.4rem 0.7rem;
  }
  .modal__body-text.is-company {
    font-size: 7px;
    line-height: 1.32;
    padding: 0.4rem 0.45rem 0.75rem;
  }
  .modal__co-brand {
    font-size: 1.15em;
    margin-bottom: 0.15em;
  }
  .modal__co-section-title {
    font-size: 1em;
  }
  .modal__counter {
    font-size: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .float {
    --fx: 0px !important;
    --fy: 0px !important;
  }
}
