.view-mode[hidden], .room-shell[hidden], .room-status[hidden], .room-brand[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"] a.brand,
[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 { padding-inline: 12px; gap: 6px; }
  .site-header .header-right { gap: 6px; }
  .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-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;
}
.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;
  background: #1f1b2d;
  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;
  background: #242033;
}
.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-panel-section { padding: 0; min-height: auto; }
.room-panel .home-series { padding: 1rem 0 0; }
[data-room-action="series"] .room-panel-head { justify-content: flex-end; }
.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-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; }
}

[data-room-loading] .room-brand[hidden] { display: flex; }

.room-lighting {
  min-height: 34px;
  padding: 0 8px;
  max-width: 6.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #1c1929;
  color: #f1e8ff;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.room-frame { position: relative; overflow: clip; }
.room-tablet, .room-tablet-light {
  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 {
  z-index: 2;
  pointer-events: none;
  mix-blend-mode: screen;
}
.room-tablet.show-works, .room-tablet.show-works + .room-tablet-light { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .room-tablet, .room-tablet-light { transition: none; }
}
.room-tablet[hidden], .room-tablet-light[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: 1000px) {
  [data-view-mode="room"] .room-brand span { display: none; }
}
@media (max-width: 860px) {
  .room-tablet-expand:not([hidden]) { display: block; }
  .tablet-expanded .room-tablet-light { display: none; }
  .tablet-expanded .room-tablet {
    inset: 88px 12px 56px;
    width: auto;
    height: auto;
    transform: none !important;
    box-shadow: 0 12px 42px #080610a8;
  }
}
@media (max-width: 680px) {
  .room-lighting { padding-inline: 4px; max-width: 4.5rem; font-size: 11px; min-height: 30px; }
  .tablet-expanded .room-tablet { inset-block-start: 72px; }
}
