.view-mode[hidden], .room-shell[hidden], .room-status[hidden] {
  display: none;
}
.view-mode {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #171522;
  white-space: nowrap;
}
.view-mode button {
  padding: 5px 9px;
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  font-size: 12px;
  color: #d9d3e6;
  background: transparent;
}
.view-mode button[aria-pressed="true"] {
  color: #231d37;
  background: #d7c8f2;
}
.view-mode button:focus-visible { outline-offset: 2px; }
.view-mode button:disabled { opacity: .48; }
.room-status {
  margin-block: 12px;
  color: var(--muted);
  font-size: 14px;
}
.room-shell {
  position: fixed;
  inset: 0;
  background: #302948;
}
.room-frame { width: 100%; height: 100%; }
.room-canvas { display: block; width: 100%; height: 100%; }
html[data-view-mode="room"],
html[data-view-mode="room"] body {
  overflow: hidden;
}
html[data-view-mode="room"] body { min-height: 100dvh; }
[data-view-mode="room"] main#main,
[data-view-mode="room"] .compact-footer {
  display: none;
}
[data-view-mode="room"] .site-header {
  background: #0e0e16bf;
}

@media (min-width: 681px) and (max-width: 1000px) {
  .site-header nav { gap: 14px; }
  .site-header .header-right { gap: 14px; }
}
@media (min-width: 681px) and (max-width: 860px) {
  .menu-toggle { display: block; }
  .header-right nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 82px;
    flex-direction: column;
    align-items: stretch;
    padding: 24px 30px;
    background: #171721;
    border-bottom: 1px solid var(--line);
  }
  .header-right nav.open { display: flex; }
}
@media (max-width: 680px) {
  .site-header .header-inner {
    height: auto;
    min-height: 68px;
    flex-wrap: wrap;
    padding: 6px 12px;
    gap: 6px;
  }
  .site-header .header-right { gap: 6px; margin-inline-start: auto; }
  .site-header .header-right nav { top: 100%; }
  .site-header .brand-mark { width: 32px; height: 32px; }
  .site-header .brand { gap: 5px; }
  .site-header .menu-toggle { padding: 3px 5px; }
  .view-mode button { padding: 4px 6px; font-size: 11px; }
}

.room-canvas { touch-action: none; }
.room-target-hover { cursor: pointer; }
.room-panning { cursor: grabbing; }
.room-tooltip {
  position: fixed;
  z-index: 3;
  margin: 0;
  width: max-content;
  max-width: min(90vw, 27rem);
  pointer-events: none;
  padding: .35rem .75rem;
  border: 1px solid #c1ad9170;
  border-radius: .45rem;
  background: #1d192af0;
  color: #f7e5ce;
}
.room-tooltip[hidden] { display: none; }
.room-object-controls {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
}
.room-object-controls :is(button, a):not(:focus-visible) {
  position: absolute;
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.room-object-controls :is(button, a):focus-visible {
  padding: .5rem .8rem;
  background: #242036;
  border: 1px solid #eac787;
}
:root { --room-popup-surface: rgb(31 27 45 / 75%); }
.room-panel, .art-dialog { background: var(--room-popup-surface); }
.room-panel {
  width: min(1050px, calc(100vw - 2rem));
  max-width: none;
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 0;
  border: 1px solid #a890b7;
  border-radius: 1rem;
  color: #f9edf2;
  overscroll-behavior: contain;
}
.room-panel::backdrop { background: #100e20b0; }
.room-panel-head {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .65rem 1.2rem;
  gap: 1.2rem;
  border-bottom: 1px solid #a890b75c;
}
.room-panel-head h2 { margin: 0; font-size: clamp(1rem, 3vw, 1.5rem); }
.room-panel-close, .room-art-links button {
  min-width: 2.35rem;
  min-height: 2.35rem;
  border-radius: 50%;
  border: 1px solid #ab8fbc;
  background: #342c45;
  color: inherit;
  padding: .1rem .6rem;
  font-size: 1.35rem;
}
.room-panel-content { min-height: 3.25rem; padding: .8rem 1.2rem 1.2rem; }
.room-art { margin: 0; }
.art-description {
  margin: .7rem auto 0;
  max-width: 65ch;
  color: var(--muted);
  white-space: pre-line;
}
.room-art img { margin: 0 auto; max-width: 100%; max-height: min(50dvh, 440px); object-fit: contain; }
.room-art-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  padding-top: .65rem;
  gap: .45rem;
}
.room-art-links span:last-child { display: flex; flex-wrap: wrap; gap: .6rem; margin-inline-start: .6rem; }
.room-art-links a { color: #f1cf91; }
@media (max-width: 500px) {
  .room-panel { width: calc(100vw - 1rem); max-height: calc(100dvh - 1rem); }
  .room-panel-head, .room-panel-content { padding-inline: .65rem; }
}

.room-detail {
  position: absolute;
  inset: 0 auto auto 0;
  z-index: 3;
  box-sizing: border-box;
  width: 660px;
  height: 360px;
  padding: 20px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  transform-origin: 0 0;
  border: 1px solid #b7a3d5b8;
  border-radius: 15px;
  background: var(--room-popup-surface);
  box-shadow: 0 10px 35px #0d091baa;
  color: #f6efff;
  font-family: var(--serif);
}
.room-detail[hidden] { display: none; }
.room-detail .section-head { align-items: center; gap: 16px; margin: 0; }
.room-detail .section-head h2 {
  margin: 5px 0 0;
  font: italic 700 39px/1.08 var(--display);
  letter-spacing: -.025em;
}
.room-mug:lang(ru) .section-head h2 {
  font-family: var(--heading);
  font-style: normal;
}
.room-series .eyebrow, .room-series .series-wordmark { font-size: 16px; }
.room-detail-back {
  flex: none;
  min-height: 52px;
  padding: 7px 17px;
  border: 1px solid #a890b7;
  border-radius: 999px;
  background: #352a49;
  color: inherit;
  font: inherit;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
}
.room-detail-back:hover { background: #493b60; }
.room-detail-back span { font-family: 'Lumo Serif Text', serif; }
.room-series .series-grid {
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 14px;
}
.room-series .series-film, .room-series .project-poster {
  min-height: 0;
  border-radius: 9px;
}
.room-series .series-film { aspect-ratio: auto; }
.room-series .series-film .film-caption { inset: auto 62px 13px 17px; }
.room-series .film-caption h3 { margin: 5px 0 0; font-size: 38px; }
.room-series .series-film .play-disc { inset: auto 15px 15px auto; }
.room-series .project-poster { padding: 15px 19px 45px; }
.room-series .project-poster h3 { margin: 13px 0; font-size: 34px; line-height: 1.05; }
.room-series .project-poster h3 span { display: block; }
.room-series .project-poster h3 span + span::before { content: none; }
.room-series .project-poster .chapter { inset: auto 19px 14px; }
.room-series :is(.film-caption small, .project-label, .status, .chapter) { font-size: 17px; }
@media (pointer: coarse), (max-width: 680px) {
  .room-detail-back { min-height: 94px; padding-inline: 19px; font-size: 25px; }
}

.room-mug { height: 420px; }
.room-mug-content {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  min-height: 0;
}
.room-mug-content img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  border-radius: 9px;
}
.room-mug-order { min-width: 0; font-size: 24px; line-height: 1.25; }
.room-mug .mug-prices { display: grid; gap: 8px; margin: 0; }
.room-mug .mug-prices div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #b7a3d545;
  padding-bottom: 5px;
}
.room-mug .mug-prices dd { margin: 0; color: #f8d89f; font-weight: 700; }
.room-mug-order p { margin: 12px 0 5px; color: #e3d9ef; font-size: 20px; }
.room-mug-order a {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  color: #f9daac;
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (pointer: coarse), (max-width: 680px) {
  .room-mug { gap: 12px; }
  .room-mug .mug-prices { gap: 4px; }
  .room-mug .mug-prices div { padding-bottom: 3px; }
  .room-mug-order p { margin: 8px 0 4px; }
  .room-mug-order a { min-height: 44px; }
}

.room-csbc { height: 470px; }
.room-csbc-content {
  display: grid;
  grid-template-columns: minmax(0, .78fr) minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  min-height: 0;
}
.room-csbc-content img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  object-position: center;
}
.room-csbc-content p { margin: 0 0 9px; font-size: 24px; line-height: 1.22; }
.room-csbc-content .csbc-name { font: 700 27px/1.12 var(--heading); }
.room-csbc-content .csbc-date { color: #f8d89f; font-weight: 700; }
.room-csbc-content a {
  display: inline-flex;
  align-items: center;
  min-height: 54px;
  color: #f9daac;
  font-size: 23px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.room-loader {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2;
  place-items: center;
  background: radial-gradient(ellipse at 50% 44%, #342c49 0%, #1b1727 67%);
  color: #f1e8ff;
}
[data-room-loading] .room-loader { display: grid; }
.room-loader-content {
  display: grid;
  gap: .95rem;
  width: min(17rem, calc(100vw - 3rem));
  text-align: center;
}
.room-loader label { font-size: .92rem; letter-spacing: .025em; }
.room-loader-detail {
  min-height: 1.3em;
  color: #ded2ee;
  font-size: .82rem;
  font-variant-numeric: tabular-nums;
}
.room-loader progress {
  width: 100%;
  height: .35rem;
  accent-color: #d7c8f2;
}
.room-frame { opacity: 1; transition: opacity .45s ease-out; }
[data-room-loading] .room-frame { opacity: 0; }
[data-room-loading] .room-object-controls { visibility: hidden; }
@media (prefers-reduced-motion: reduce) {
  .room-frame { transition: none; }
}

.room-lighting {
  position: absolute;
  z-index: 4;
  top: var(--room-lighting-top);
  right: max(12px, env(safe-area-inset-right));
  height: var(--room-lighting-height);
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--room-popup-surface);
  color: #f1e8ff;
  color-scheme: dark;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.room-frame {
  --room-lighting-top: calc(var(--room-header-height, 83px) + 12px);
  --room-lighting-height: 36px;
  position: relative;
  overflow: clip;
}
.room-tablet, .room-tablet-light, .room-tablet-glass {
  position: absolute;
  inset: 0 auto auto 0;
  width: 720px;
  height: 408px;
  transform-origin: 0 0;
  border-radius: 6px;
  opacity: 0;
  transition: opacity .65s ease-in-out;
}
.room-tablet {
  z-index: 1;
  overflow: auto;
  overscroll-behavior: contain;
  background: #151320;
  color: #f6efff;
  color-scheme: dark;
}
.room-tablet-light, .room-tablet-glass {
  z-index: 2;
  pointer-events: none;
}
.room-tablet-light {
  mix-blend-mode: screen;
}
.room-tablet.show-works, .room-tablet.show-works + .room-tablet-light { opacity: 1; transition: none; }
.room-tablet.show-works ~ .room-tablet-glass { opacity: .62; transition: none; }
.room-tablet-glass { --room-tablet-opacity: .62; }
.room-tablet-reveal { animation: room-tablet-reveal .65s ease-in-out; }
@keyframes room-tablet-reveal {
  from { opacity: 0; }
  to { opacity: var(--room-tablet-opacity, 1); }
}
.room-frame[data-camera-view="contact"] :is(.room-tablet, .room-tablet-light, .room-tablet-glass),
.room-frame[data-camera-view="mug"] .room-tablet.show-works,
.room-frame[data-camera-view="mug"] .room-tablet.show-works ~ :is(.room-tablet-light, .room-tablet-glass) {
  filter: blur(2.5px);
}

@media (prefers-reduced-motion: reduce) {
  .room-tablet, .room-tablet-light, .room-tablet-glass { transition: none; }
  .room-tablet-reveal { animation: none; }
}
.room-tablet[hidden], .room-tablet-light[hidden], .room-tablet-glass[hidden], .room-tablet-expand[hidden] { display: none; }
.room-credit {
  position: absolute;
  left: max(16px, env(safe-area-inset-left));
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 3;
  pointer-events: none;
  font-size: 11px;
  color: #e0d9ee;
  text-shadow: 0 1px 5px #0e0a18, 0 1px 2px #0e0a18;
}
.room-tablet[inert] { pointer-events: none; }
.room-tablet .page-section {
  min-height: 0;
  padding: 8px 16px 20px;
}
.room-tablet .filter-row {
  position: sticky;
  inset-block-start: -1px;
  z-index: 2;
  padding: 4px 0 7px;
  background: #151320;
}
.room-tablet .filter { padding: 7px 10px; font-size: 13px; }
.room-tablet .works-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 195px), 1fr));
  align-items: stretch;
  gap: 14px;
}
.room-tablet .work-cover { aspect-ratio: 2.25; }
.room-tablet .work-project-cover { padding: 10px; }
.room-tablet .work-content { padding: 9px 11px; gap: 5px; }
.room-tablet .work-card .work-title { font-size: 20px; }
.room-tablet .work-description { min-height: 0; font-size: 13px; line-height: 1.37; }
.room-tablet .work-year { inset: 8px auto auto 8px; padding: 3px 8px; }
.room-tablet .version-group { min-height: 0; padding-block: 3px; font-size: 11px; line-height: 1.35; }
.room-tablet .version-platforms .icon-link { height: 29px; }
.room-tablet .more-versions summary { padding-block: 5px; }
.room-tablet-expand {
  display: none;
  position: absolute;
  z-index: 3;
  inset-inline-end: 12px;
  inset-block-end: 12px;
  border: 1px solid #9d85bf;
  border-radius: 999px;
  padding: 8px 12px;
  background: #242033;
  color: #f9edf2;
  font: inherit;
  font-size: 12px;
}
@media (max-width: 860px) {
  .room-tablet-expand:not([hidden]) { display: block; }
  .tablet-expanded { --tablet-expanded-top: calc(var(--room-lighting-top) + var(--room-lighting-height) + 12px); }
  .tablet-expanded .room-tablet-light { display: none; }
  .tablet-expanded :is(.room-tablet, .room-tablet-glass) {
    inset: var(--tablet-expanded-top) 12px 56px;
    width: calc(100% - 24px);
    height: calc(100% - var(--tablet-expanded-top) - 56px);
    transform: none !important;
  }
  .tablet-expanded .room-tablet { box-shadow: 0 12px 42px #080610a8; }
}

@font-face {
  font-family: 'Lumo Note';
  src: url('/assets/fonts/lumo-note.woff2') format('woff2');
  font-display: swap;
}
.room-identity-card {
  position: absolute;
  inset: 0 auto auto 0;
  z-index: 3;
  width: 412px;
  height: 206px;
  transform-origin: 0 0;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 15px;
  border: 1px solid #b7a3d5b8;
  border-radius: 15px;
  background: var(--room-popup-surface);
  box-shadow: 0 10px 35px #0d091baa;
  color: #f6efff;
  font-family: var(--serif);
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  translate: 0 -18px;
  transition: opacity 195ms ease-in, translate 195ms ease-in, visibility 0s 195ms;
}
.room-identity-card[hidden] { display: none; }
.room-identity-card[aria-hidden="false"] {
  visibility: visible;
  opacity: 1;
  translate: 0 0;
  transition: opacity 245ms ease-out, translate 245ms ease-out;
}
.room-identity-card > img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  border: 1px solid #b7a3d56e;
  border-radius: 7px;
  background: #1a1828b3;
}
.room-identity-card .oc-id-details h2 {
  margin: 0 0 8px;
  font: 700 23px/1.14 var(--heading);
  overflow-wrap: anywhere;
}
.room-identity-card .oc-id-details { min-width: 0; }
.room-identity-card .oc-id-details dl { gap: 5px; }
.room-identity-card .oc-id-row {
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 8px;
}
.room-identity-card .oc-id-row dt { font-size: 14px; overflow-wrap: anywhere; }
.room-identity-card .oc-id-row dd { font-size: 17px; line-height: 1.2; overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) {
  .room-identity-card, .room-identity-card[aria-hidden="false"] {
    transition: none;
    translate: none;
  }
}

@media (max-width: 360px) {
  .site-header .header-inner { padding-inline: 8px; gap: 4px; }
  .site-header .header-right { gap: 4px; }
  .site-header .brand-mark { width: 26px; height: 26px; flex: none; }
  .site-header .lang summary { letter-spacing: 0; }
  .site-header .lang summary::after { margin-left: 3px; }
  .site-header .menu-toggle { padding-inline: 2px; font-size: 20px; }
  .view-mode { gap: 0; padding: 2px; }
  .view-mode button { padding-inline: 4px; font-size: 10px; }
}
