:root {
  --scene-scale: 1;
  --world-width: 6000px;
  --floor-height: 90px;
  --wall-bottom-offset: var(--floor-height);
  --ceiling-zone-height: 18vh;
  --wall-top-offset: 0px;
  --ambient-dim: rgba(0, 0, 0, 0.22);
  --gallery-bg-top: #1f262d;
  --gallery-bg-bottom: #2a323b;
  --gallery-wall-top: #2c3440;
  --gallery-wall-bottom: #222a34;
  --gallery-floor-top: #3b3229;
  --gallery-floor-bottom: #2b241e;
  --ceiling-top: #181f27;
  --ceiling-bottom: #232c35;
  --ceiling-panel-line: rgba(255, 255, 255, 0.04);
  --ceiling-track-metal: #5e6771;
  --ceiling-track-shadow: rgba(0, 0, 0, 0.42);
  --ceiling-trim-line: rgba(255, 255, 255, 0.16);
  --gallery-panel-line: rgba(255, 255, 255, 0.06);
  --gallery-panel-spacing: 420px;
  --wall-texture-start-y: 0px;
  --wall-texture-size: 760px;
  --wall-texture-strength: 0.12;
  /* Spot Ä±ÅŸÄ±k ayarlarÄ±: gerÃ§ekÃ§i galeri hissi iÃ§in bu deÄŸiÅŸkenleri dÃ¼zenleyebilirsin. */
  --spotlight-source: rgba(255, 244, 214, 0.95);
  --spotlight-core: rgba(255, 242, 210, 0.42);
  --spotlight-mid: rgba(255, 241, 206, 0.2);
  --spotlight-falloff: rgba(255, 241, 206, 0.06);
  --spotlight-width: 300px;
  --spotlight-height: 350px;
  --spotlight-blur: 7px;
  --spotlight-feather: 0.9;
  --spotlight-cone-top: -304px;
  --spotlight-lamp-top: -296px;
  --spotlight-lamp-size: 22px;
  --spotlight-lamp-stem: 44px;
  --frame-shadow:
    0 10px 24px rgba(0, 0, 0, 0.26),
    0 20px 34px rgba(0, 0, 0, 0.22);
  --frame-top-highlight: rgba(255, 246, 224, 0.2);
  --frame-bottom-shade: rgba(0, 0, 0, 0.2);
  --frame-bevel-light: rgba(255, 239, 214, 0.28);
  --frame-bevel-dark: rgba(29, 22, 14, 0.26);
  --frame-mounted-shadow: rgba(0, 0, 0, 0.2);
  --art-warm-light: rgba(255, 241, 208, 0.15);
  --photo-view-overlay: rgba(10, 14, 22, 0.58);
  --photo-view-anim-ms: 260ms;
  --ticket-desk-width: 720px;
  --ticket-desk-height: 360px;
  --ticket-desk-left: 20px;
  --turnstile-left: 1120px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #f4ece7;
  font-family: "Avenir Next", "Segoe UI", "Trebuchet MS", Verdana, sans-serif;
  color: #241d25;
}

input::placeholder {
  color: #9a8691;
}

body.mobile-ui-active .viewport,
body.mobile-ui-active .mobile-controls,
body.mobile-ui-active .mobile-control-button {
  touch-action: none;
}

.startup-screen,
.welcome-screen,
.desktop-screen,
.museum-entry,
.desktop-window,
.hint-modal {
  position: fixed;
  inset: 0;
}

.startup-screen {
  z-index: 120;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 240, 235, 0.2), transparent 30%),
    radial-gradient(circle at 82% 14%, rgba(255, 221, 226, 0.16), transparent 28%),
    linear-gradient(180deg, #211823 0%, #14121b 100%);
}

.startup-card,
.museum-entry-card,
.hint-modal-panel,
.desktop-window-panel {
  position: relative;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 253, 250, 0.95), rgba(249, 240, 235, 0.9)),
    rgba(255, 250, 246, 0.92);
  box-shadow:
    0 28px 68px rgba(31, 18, 26, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
}

.startup-card {
  width: min(92vw, 540px);
  padding: 38px 34px;
  border-radius: 30px;
  text-align: center;
  box-shadow:
    0 34px 86px rgba(18, 12, 17, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.startup-kicker,
.museum-entry-kicker,
.desktop-kicker,
.welcome-kicker,
.desktop-window-kicker {
  margin: 0 0 8px;
  font-size: 0.82rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #8f6570;
}

.startup-title,
.desktop-title,
.welcome-text {
  margin: 0;
  line-height: 1.1;
  color: #2b2430;
}

.startup-title {
  font-size: clamp(2rem, 5vw, 3.15rem);
  letter-spacing: -0.04em;
}

.startup-copy {
  margin: 16px auto 0;
  max-width: 30rem;
  line-height: 1.7;
  color: #6c5760;
  font-size: 1.02rem;
}

.startup-form {
  margin-top: 26px;
}

.startup-input,
.museum-entry-input {
  width: 100%;
  height: 56px;
  padding: 0 18px;
  border-radius: 18px;
  border: 1px solid rgba(118, 89, 95, 0.2);
  background: rgba(255, 255, 255, 0.9);
  color: #2f2430;
  font: inherit;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.8);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.startup-input:focus,
.museum-entry-input:focus,
.access-input:focus {
  outline: none;
  border-color: rgba(125, 78, 93, 0.42);
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    0 0 0 4px rgba(125, 78, 93, 0.1),
    inset 0 1px 1px rgba(255, 255, 255, 0.88);
}

.startup-actions {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}

.startup-submit,
.startup-hint-button,
.museum-entry-submit,
.document-download,
.music-play-button,
.music-download-button {
  height: 50px;
  border: 0;
  border-radius: 16px;
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.startup-submit,
.museum-entry-submit,
.music-play-button {
  flex: 1;
  color: #fffaf5;
  background: linear-gradient(180deg, #7d4e5d 0%, #5a3744 100%);
  box-shadow: 0 12px 24px rgba(102, 59, 73, 0.26);
}

.startup-hint-button,
.music-download-button,
.document-download {
  padding: 0 18px;
  color: #4f313a;
  background: rgba(255, 247, 243, 0.98);
  border: 1px solid rgba(111, 68, 79, 0.14);
  text-decoration: none;
}

.startup-submit,
.startup-hint-button,
.museum-entry-submit,
.document-download,
.music-play-button,
.music-download-button,
.access-submit {
  position: relative;
  overflow: hidden;
}

.startup-submit::after,
.startup-hint-button::after,
.museum-entry-submit::after,
.document-download::after,
.music-play-button::after,
.music-download-button::after,
.access-submit::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.24) 50%, transparent 80%);
  transform: translateX(-120%);
  transition: transform 260ms ease;
}

.startup-submit:hover,
.startup-hint-button:hover,
.museum-entry-submit:hover,
.document-download:hover,
.music-play-button:hover,
.music-download-button:hover,
.access-submit:hover,
.desktop-icon:hover,
.museum-entry-close:hover,
.desktop-window-close:hover,
.hint-modal-close:hover {
  transform: translateY(-1px);
}

.startup-submit:hover::after,
.startup-hint-button:hover::after,
.museum-entry-submit:hover::after,
.document-download:hover::after,
.music-play-button:hover::after,
.music-download-button:hover::after,
.access-submit:hover::after {
  transform: translateX(120%);
}

.startup-submit:hover,
.museum-entry-submit:hover,
.music-play-button:hover {
  box-shadow: 0 16px 28px rgba(102, 59, 73, 0.3);
}

.startup-error,
.museum-entry-error {
  margin: 12px 0 0;
  color: #9f3040;
}

.welcome-screen {
  z-index: 121;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(255, 231, 224, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(21, 16, 25, 0.96), rgba(13, 11, 17, 0.98));
}

.welcome-panel {
  min-width: min(92vw, 720px);
  padding: 42px 34px;
  border-radius: 34px;
  text-align: center;
  background: rgba(255, 247, 241, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(10px);
  animation: fade-up 420ms ease;
}

.welcome-kicker {
  color: #d2a6b2;
}

.welcome-text {
  font-size: clamp(1.9rem, 4.8vw, 4rem);
  line-height: 1.22;
  color: #fff8f3;
  text-align: center;
  letter-spacing: -0.04em;
}

.desktop-screen {
  z-index: 110;
  overflow: hidden;
  background:
    linear-gradient(140deg, rgba(28, 17, 25, 0.36), rgba(22, 22, 30, 0.12)),
    url("assets/desktop/wallpaper.jpg") center center / cover no-repeat,
    linear-gradient(180deg, #f0d8d7 0%, #dac2c7 42%, #b89ba3 100%);
}

.desktop-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 20%),
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.12), transparent 30%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 160px);
  pointer-events: none;
}

.desktop-hero {
  position: absolute;
  left: 34px;
  top: 34px;
  z-index: 2;
  width: min(52vw, 560px);
  padding: 20px 22px;
  border-radius: 26px;
  background: rgba(255, 248, 244, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow: 0 18px 42px rgba(58, 40, 50, 0.16);
  backdrop-filter: blur(12px);
}

.desktop-hero-kicker {
  margin: 0 0 10px;
  font-size: 0.82rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #8e6470;
}

.desktop-hero-title {
  margin: 0;
  font-size: clamp(1.3rem, 2.7vw, 2.45rem);
  line-height: 1.18;
  letter-spacing: -0.04em;
  color: #2b2330;
  text-wrap: balance;
}

.desktop-header {
  position: absolute;
  left: 0;
  top: 30px;
  right: 34px;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  gap: 24px;
  align-items: flex-start;
}

.relationship-counter {
  position: absolute;
  left: 50%;
  top: 52%;
  z-index: 2;
  width: min(56vw, 760px);
  padding: 26px 28px 24px;
  border-radius: 32px;
  transform: translate(-50%, -50%);
  background: rgba(255, 248, 244, 0.64);
  border: 1px solid rgba(255, 255, 255, 0.38);
  box-shadow:
    0 26px 54px rgba(54, 37, 45, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
}

.relationship-counter-kicker {
  margin: 0 0 8px;
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #8e6470;
}

.relationship-counter-title {
  margin: 0;
  font-size: clamp(1.4rem, 2.4vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
  color: #2b2330;
}

.relationship-counter-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.relationship-counter-item {
  grid-column: span 3;
  display: grid;
  gap: 6px;
  padding: 16px 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.46);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
  text-align: center;
}

.relationship-counter-item:nth-child(n + 5) {
  grid-column: span 4;
}

.relationship-counter-value {
  font-size: clamp(1.45rem, 2.4vw, 2.35rem);
  line-height: 1;
  letter-spacing: -0.05em;
  color: #2b2330;
  font-variant-numeric: tabular-nums;
}

.relationship-counter-label {
  font-size: 0.9rem;
  color: #735966;
}

.desktop-clock-wrap {
  display: grid;
  justify-items: end;
  gap: 6px;
  color: #fff8f3;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.desktop-date {
  font-size: 0.95rem;
}

.desktop-clock {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  font-weight: 700;
}

.desktop-poem {
  position: absolute;
  left: 34px;
  bottom: 34px;
  z-index: 2;
  max-width: min(56vw, 520px);
  padding: 20px 22px;
  border-radius: 24px;
  background: rgba(255, 249, 246, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow: 0 18px 38px rgba(75, 54, 63, 0.14);
  color: #58404b;
  line-height: 1.72;
  backdrop-filter: blur(12px);
}

.desktop-poem p {
  margin: 0;
}

.desktop-icons {
  position: absolute;
  top: 120px;
  right: 34px;
  bottom: 34px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.desktop-icon {
  width: 110px;
  padding: 14px 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 24px;
  background: rgba(255, 249, 246, 0.44);
  color: #45323b;
  cursor: pointer;
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 32px rgba(65, 48, 57, 0.14);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.desktop-icon:hover {
  background: rgba(255, 251, 248, 0.62);
  border-color: rgba(255, 255, 255, 0.42);
  box-shadow: 0 22px 38px rgba(65, 48, 57, 0.18);
}

.desktop-icon-art {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 10px;
  border-radius: 18px;
  color: #fffaf5;
  font-weight: 700;
  font-size: 1.2rem;
}

.desktop-icon-image {
  width: 78%;
  height: 78%;
  object-fit: contain;
  display: block;
}

.museum-logo-icon {
  width: 86%;
  height: 86%;
}

.icon-museum { background: linear-gradient(180deg, #7e5360 0%, #5f3d48 100%); }
.icon-magazine { background: linear-gradient(180deg, #be9076 0%, #9b6852 100%); }
.icon-newspaper { background: linear-gradient(180deg, #7e8f9d 0%, #5d6b77 100%); }
.icon-music { background: linear-gradient(180deg, #8870a4 0%, #634f7a 100%); }

.desktop-icon-label {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
}

.museum-entry,
.desktop-window,
.hint-modal {
  z-index: 130;
  display: grid;
  place-items: center;
}

.museum-entry-backdrop,
.desktop-window-backdrop,
.hint-modal-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 10%, rgba(255, 241, 235, 0.12), transparent 36%),
    rgba(11, 10, 15, 0.58);
}

.museum-entry-card {
  width: min(92vw, 480px);
  padding: 34px 30px;
  border-radius: 28px;
}

.museum-entry-close,
.desktop-window-close,
.hint-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #4d3943;
  font-size: 1.8rem;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(61, 43, 53, 0.12);
}

.museum-entry-title,
.desktop-window-title {
  margin: 0;
  color: #2a2430;
  letter-spacing: -0.03em;
}

.museum-entry-input {
  margin-top: 22px;
}

.museum-entry-submit {
  margin-top: 14px;
  width: 100%;
}

.desktop-window-panel {
  width: min(94vw, 1180px);
  min-height: min(82vh, 760px);
  max-height: 86vh;
  padding: 30px 30px 28px;
  border-radius: 34px;
  overflow: hidden;
  box-shadow:
    0 38px 90px rgba(24, 18, 22, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.desktop-window-header {
  margin-bottom: 22px;
}

.desktop-window-body {
  height: calc(86vh - 126px);
  max-height: 680px;
  overflow: auto;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(122, 94, 103, 0.42) transparent;
}

.document-view {
  height: 100%;
  display: grid;
  gap: 16px;
}

.document-actions {
  display: flex;
  justify-content: flex-end;
}

.document-frame-wrap {
  height: calc(100% - 54px);
  overflow: auto;
  border-radius: 26px;
  background: linear-gradient(180deg, #2f2d2f 0%, #232224 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 14px 28px rgba(55, 40, 47, 0.1);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 18px;
}

.document-frame {
  display: block;
  border: 0;
  background: #f4efea;
}

.document-frame-wrap-portrait .document-frame {
  width: min(34vw, 430px);
  height: min(72vh, 980px);
}

.document-frame-wrap-landscape .document-frame {
  width: min(78vw, 1180px);
  height: min(72vh, 760px);
}

.music-window-layout {
  display: grid;
  gap: 26px;
}

.music-library {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.music-card {
  display: grid;
  gap: 14px;
  padding: 20px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 253, 251, 0.96), rgba(249, 241, 236, 0.9)),
    rgba(255, 248, 244, 0.9);
  box-shadow: 0 16px 30px rgba(70, 54, 62, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.44);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.music-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 38px rgba(70, 54, 62, 0.12);
}

.music-card-active {
  border-color: rgba(125, 78, 93, 0.28);
  box-shadow: 0 20px 34px rgba(90, 55, 68, 0.14);
}

.music-cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  object-fit: cover;
}

.music-meta h3,
.music-meta p {
  margin: 0;
}

.music-meta h3 {
  color: #2d2430;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.music-card-actions {
  display: flex;
  gap: 12px;
}

.music-card-actions .music-play-button,
.music-card-actions .music-download-button {
  flex: 1;
}

.music-player-bar {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(320px, 1fr) minmax(180px, 240px);
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border-radius: 28px;
  background: linear-gradient(180deg, #141316 0%, #0d0d10 100%);
  box-shadow:
    0 18px 38px rgba(19, 14, 18, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: #f8f3f0;
}

.music-player-bar.is-active {
  box-shadow:
    0 24px 44px rgba(19, 14, 18, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.music-player-now {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.music-player-cover-wrap {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.music-player-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.music-player-text {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.music-player-title,
.music-player-subtitle,
.music-player-elapsed,
.music-player-duration {
  font-variant-numeric: tabular-nums;
}

.music-player-title {
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-player-subtitle {
  color: rgba(248, 243, 240, 0.68);
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-player-main {
  display: grid;
  gap: 12px;
}

.music-player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.music-player-toggle,
.music-player-secondary,
.music-player-mute {
  border: 0;
  cursor: pointer;
}

.music-player-toggle {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: #fff7f2;
  color: #111014;
  font-size: 1.3rem;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.24);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.music-player-secondary,
.music-player-mute {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff7f2;
  font-size: 1rem;
  transition: transform 180ms ease, background 180ms ease, opacity 180ms ease;
}

.music-player-toggle:hover:not(:disabled),
.music-player-secondary:hover:not(:disabled),
.music-player-mute:hover:not(:disabled) {
  transform: translateY(-1px);
}

.music-player-secondary:hover:not(:disabled),
.music-player-mute:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.14);
}

.music-player-toggle:disabled,
.music-player-secondary:disabled,
.music-player-mute:disabled {
  opacity: 0.42;
  cursor: default;
}

.music-player-timeline {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.music-player-elapsed,
.music-player-duration {
  font-size: 0.92rem;
  color: rgba(248, 243, 240, 0.84);
}

.music-player-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.music-player-progress,
.music-player-volume {
  width: 100%;
  accent-color: #ffffff;
}

.music-player-volume {
  max-width: 120px;
}

.hint-modal-panel {
  width: min(90vw, 420px);
  padding: 30px 26px 24px;
  border-radius: 28px;
  box-shadow:
    0 28px 74px rgba(24, 18, 22, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.hint-modal-panel h2,
.hint-modal-panel p {
  margin: 0;
}

.hint-modal-panel p {
  margin-top: 14px;
  line-height: 1.6;
  color: #5a4952;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .desktop-header {
    left: 0;
    top: 20px;
    right: 22px;
  }

  .desktop-hero {
    left: 22px;
    top: 22px;
    width: min(58vw, 500px);
  }

  .relationship-counter {
    width: min(62vw, 700px);
  }

  .desktop-poem {
    left: 22px;
    bottom: 22px;
    max-width: min(62vw, 460px);
  }

  .desktop-icons {
    top: 108px;
    right: 20px;
    bottom: 20px;
  }

  .desktop-icon {
    width: 96px;
  }

  .desktop-window-panel {
    width: min(96vw, 1080px);
    padding: 24px 20px 20px;
  }

  .music-library {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .music-player-bar {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .music-player-side {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .startup-card,
  .museum-entry-card,
  .hint-modal-panel {
    width: min(94vw, 480px);
    padding: 24px 18px;
    border-radius: 22px;
  }

  .startup-actions {
    flex-direction: column;
  }

  .desktop-header {
    position: relative;
    left: auto;
    top: auto;
    right: auto;
    padding: 20px 18px 0;
    justify-content: flex-end;
    gap: 12px;
  }

  .desktop-hero {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    margin: 18px 18px 0;
  }

  .relationship-counter {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    margin: 18px;
    transform: none;
  }

  .relationship-counter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .relationship-counter-item,
  .relationship-counter-item:nth-child(n + 5) {
    grid-column: auto;
  }

  .desktop-clock-wrap {
    justify-items: start;
  }

  .desktop-poem {
    left: 18px;
    right: 18px;
    bottom: 150px;
    max-width: none;
  }

  .desktop-icons {
    left: 18px;
    right: 18px;
    top: auto;
    bottom: 24px;
    flex-direction: row;
    justify-content: space-between;
    gap: 10px;
  }

  .desktop-icon {
    width: calc(25% - 8px);
    min-width: 74px;
  }

  .desktop-window-panel {
    min-height: 82vh;
    max-height: 88vh;
    border-radius: 24px;
  }

  .desktop-window-body {
    height: calc(88vh - 126px);
  }

  .document-frame-wrap-portrait .document-frame {
    width: min(54vw, 360px);
    height: min(60vh, 780px);
  }

  .document-frame-wrap-landscape .document-frame {
    width: min(86vw, 920px);
    height: min(58vh, 620px);
  }

  .music-library {
    grid-template-columns: 1fr;
  }

  .music-player-now,
  .music-player-side {
    justify-content: center;
  }

  .music-player-timeline {
    grid-template-columns: 1fr;
  }

  .music-player-elapsed,
  .music-player-duration {
    display: none;
  }
}

.access-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 22% 16%, rgba(255, 255, 255, 0.08), transparent 38%),
    radial-gradient(circle at 78% 10%, rgba(255, 255, 255, 0.06), transparent 34%),
    linear-gradient(180deg, #111824 0%, #0c121c 100%);
}

.access-float-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.access-floating-memory {
  position: absolute;
  width: 92px;
  height: 92px;
  left: var(--x, 50%);
  top: var(--y, 50%);
  transform: translate(-50%, -50%) rotate(var(--rotate, 0deg));
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  object-fit: cover;
  object-position: center;
  opacity: 0.3;
  filter: saturate(1.05) contrast(1.05) drop-shadow(0 6px 10px rgba(0, 0, 0, 0.2));
  animation: access-float var(--duration, 12s) ease-in-out var(--delay, 0s) infinite;
}

.access-panel {
  position: relative;
  z-index: 2;
  width: min(92vw, 460px);
  padding: 24px;
  border-radius: 16px;
  background: rgba(248, 242, 231, 0.96);
  border: 2px solid rgba(214, 193, 165, 0.86);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.access-logo {
  display: block;
  width: min(240px, 62%);
  height: auto;
  margin: 0 auto 12px;
  object-fit: contain;
}

.access-title {
  margin: 0 0 14px;
  font-size: 1.2rem;
  line-height: 1.35;
  color: #2c261f;
}

.access-input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #bfae96;
  background: #fffdfa;
  color: #29231c;
  font: inherit;
}

.access-submit {
  margin-top: 10px;
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: #2f3b46;
  color: #fff8ec;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.access-error {
  margin: 10px 0 0;
  color: #91242f;
  font-size: 0.9rem;
}

@keyframes access-float {
  0% {
    transform: translate(-50%, -50%) rotate(calc(var(--rotate, 0deg) - 1deg));
  }
  25% {
    transform: translate(
      calc(-50% + var(--dx1, 8px)),
      calc(-50% + var(--dy1, -6px))
    ) rotate(calc(var(--rotate, 0deg) + 0.5deg));
  }
  50% {
    transform: translate(
      calc(-50% + var(--dx2, -10px)),
      calc(-50% + var(--dy2, 7px))
    ) rotate(calc(var(--rotate, 0deg) - 0.6deg));
  }
  75% {
    transform: translate(
      calc(-50% + var(--dx3, 6px)),
      calc(-50% + var(--dy3, 10px))
    ) rotate(calc(var(--rotate, 0deg) + 0.8deg));
  }
  100% {
    transform: translate(
      calc(-50% + var(--dx4, -7px)),
      calc(-50% + var(--dy4, -9px))
    ) rotate(calc(var(--rotate, 0deg) + 1deg));
  }
}

.game-root {
  position: relative;
  width: 100%;
  height: 100%;
}

.back-to-desktop {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 46;
  height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 250, 247, 0.9);
  color: #46343d;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.viewport {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(180deg, var(--gallery-bg-top) 0%, var(--gallery-bg-bottom) 100%);
}

.world {
  position: relative;
  width: var(--world-width);
  height: 100%;
  transform-origin: top left;
  will-change: transform;
}

.background-layer {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 14% 4%, rgba(255, 255, 255, 0.08), transparent 34%),
    radial-gradient(circle at 84% 8%, rgba(255, 255, 255, 0.06), transparent 30%),
    linear-gradient(180deg, var(--gallery-bg-top) 0%, var(--gallery-bg-bottom) 100%);
}

.ambient-layer {
  position: absolute;
  inset: 0;
  background: var(--ambient-dim);
  z-index: 1;
  pointer-events: none;
}

.ceiling-layer {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: var(--ceiling-zone-height);
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.028) 0px,
      rgba(255, 255, 255, 0.028) 2px,
      transparent 2px,
      transparent 340px
    ),
    linear-gradient(180deg, rgba(10, 14, 20, 0.24) 0%, rgba(10, 14, 20, 0.12) 34%, rgba(10, 14, 20, 0) 82%);
  box-shadow:
    inset 0 -10px 24px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  z-index: 2;
  pointer-events: none;
}

.ceiling-layer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 24%),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.015) 0px,
      rgba(255, 255, 255, 0.015) 2px,
      transparent 2px,
      transparent 240px
    );
  opacity: 0.3;
}

.ceiling-layer::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 18%,
    rgba(255, 255, 255, 0.08) 82%,
    transparent 100%
  );
}

.wall-layer {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--wall-top-offset);
  bottom: var(--wall-bottom-offset);
  z-index: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  background:
    repeating-linear-gradient(
      90deg,
      var(--gallery-panel-line) 0px,
      var(--gallery-panel-line) 2px,
      transparent 2px,
      transparent var(--gallery-panel-spacing)
    ),
    url("assets/objects/wall_texture.png")
      repeat left var(--wall-texture-start-y) / var(--wall-texture-size) var(--wall-texture-size),
    linear-gradient(180deg, rgba(255, 255, 255, 0.11) 0%, rgba(255, 255, 255, 0) 26%),
    linear-gradient(180deg, var(--gallery-wall-top) 0%, var(--gallery-wall-bottom) 100%);
  background-blend-mode: normal, soft-light, normal, normal;
  box-shadow:
    inset 0 10px 16px rgba(255, 255, 255, 0.08),
    inset 0 -24px 26px rgba(0, 0, 0, 0.22);
}

.wall-layer::before {
  content: "";
  position: absolute;
  left: 4%;
  right: 4%;
  top: 20px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(180deg, #7f8893 0%, var(--ceiling-track-metal) 100%);
  box-shadow:
    0 7px 12px var(--ceiling-track-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.wall-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, calc(var(--wall-texture-strength) * 0.36)) 0px,
      rgba(255, 255, 255, calc(var(--wall-texture-strength) * 0.36)) 1px,
      transparent 1px,
      transparent 3px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(0, 0, 0, calc(var(--wall-texture-strength) * 0.28)) 0px,
      rgba(0, 0, 0, calc(var(--wall-texture-strength) * 0.28)) 1px,
      transparent 1px,
      transparent 4px
    ),
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, calc(var(--wall-texture-strength) * 0.55)), transparent 34%),
    radial-gradient(circle at 78% 70%, rgba(0, 0, 0, calc(var(--wall-texture-strength) * 0.48)), transparent 38%);
  background-blend-mode: normal, normal, normal, normal;
  mix-blend-mode: soft-light;
  opacity: 0.82;
  pointer-events: none;
}

.memory-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

.entrance-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 11;
}

.entrance-zone {
  position: absolute;
  left: 0;
  width: calc(1500px * var(--scene-scale));
  bottom: calc(90px * var(--scene-scale));
  height: calc(430px * var(--scene-scale));
}

.ticket-desk {
  position: absolute;
  left: calc(var(--ticket-desk-left) * var(--scene-scale));
  bottom: 0;
  width: calc(var(--ticket-desk-width) * var(--scene-scale));
  height: calc(var(--ticket-desk-height) * var(--scene-scale));
  z-index: 4;
  background: url("assets/objects/entrance/ticket_desk.png") no-repeat center bottom / contain;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.22));
  pointer-events: none;
}

.yusuf-npc {
  position: absolute;
  z-index: 2;
  width: var(--yusuf-size, 192px);
  height: var(--yusuf-size, 192px);
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: calc(var(--yusuf-size, 192px) * 7) var(--yusuf-size, 192px);
  background-image: url("assets/character/character_idle.png");
}

.yusuf-label {
  position: absolute;
  z-index: 5;
  padding: 3px 8px;
  font-size: 0.68rem;
  border-radius: 999px;
  color: #fff;
  background: rgba(30, 30, 30, 0.75);
}

.yusuf-bubble {
  position: absolute;
  z-index: 6;
  max-width: calc(240px * var(--scene-scale));
  padding: calc(10px * var(--scene-scale)) calc(12px * var(--scene-scale));
  line-height: 1.35;
  font-size: calc(0.79rem * var(--scene-scale));
  color: #2e2a24;
  background: #fff9ef;
  border: 2px solid #d6c1a5;
  border-radius: 12px;
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.14);
}

.yusuf-bubble::before {
  content: "";
  position: absolute;
  left: calc(18px * var(--scene-scale));
  bottom: calc(-11px * var(--scene-scale));
  width: calc(16px * var(--scene-scale));
  height: calc(16px * var(--scene-scale));
  background: #fff9ef;
  border-right: 2px solid #d6c1a5;
  border-bottom: 2px solid #d6c1a5;
  transform: rotate(45deg);
}

.turnstile {
  position: absolute;
  left: calc(var(--turnstile-left) * var(--scene-scale));
  bottom: 0;
  width: calc(88px * var(--scene-scale));
  height: calc(96px * var(--scene-scale));
}

.turnstile .gate-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(58px * var(--scene-scale));
  border-radius: 6px;
  background: linear-gradient(180deg, #8f979f 0%, #6d757e 100%);
}

.turnstile .gate-arm {
  position: absolute;
  left: calc(44px * var(--scene-scale));
  bottom: calc(28px * var(--scene-scale));
  width: calc(40px * var(--scene-scale));
  height: calc(4px * var(--scene-scale));
  background: #5e666e;
  transform-origin: left center;
}

.turnstile .gate-arm.a {
  transform: rotate(-22deg);
}

.turnstile .gate-arm.b {
  transform: rotate(98deg);
}

.turnstile .gate-arm.c {
  transform: rotate(218deg);
}

.entrance-zone.ticket-ready .turnstile .gate-body {
  background: linear-gradient(180deg, #7d9b86 0%, #5f7a67 100%);
}

.entrance-zone.ticket-ready .turnstile .gate-arm.a {
  transform: rotate(-6deg);
}

.entrance-zone.ticket-ready .turnstile .gate-arm.b {
  transform: rotate(114deg);
}

.entrance-zone.ticket-ready .turnstile .gate-arm.c {
  transform: rotate(234deg);
}

.frame {
  position: absolute;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow:
    0 8px 18px var(--frame-mounted-shadow),
    var(--frame-shadow);
  transform-origin: center center;
  transform: rotate(var(--frame-rotate, 0deg));
}

.frame::before {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(var(--spotlight-cone-top) * var(--scene-scale));
  width: calc(var(--spotlight-width) * var(--scene-scale));
  height: calc(var(--spotlight-height) * var(--scene-scale));
  transform: translateX(-50%);
  background:
    radial-gradient(
      circle at 50% 9%,
      var(--spotlight-source) 0%,
      rgba(255, 241, 206, 0.5) 9%,
      transparent 21%
    ),
    radial-gradient(
      ellipse at 49% 22%,
      var(--spotlight-core) 0%,
      var(--spotlight-mid) 32%,
      transparent 73%
    ),
    radial-gradient(
      ellipse at 51% 76%,
      rgba(255, 240, 200, 0.2) 0%,
      var(--spotlight-falloff) 36%,
      transparent 100%
    ),
    linear-gradient(
      180deg,
      rgba(255, 241, 206, 0.24) 0%,
      rgba(255, 241, 206, 0.14) 34%,
      rgba(255, 241, 206, 0.06) 60%,
      transparent 100%
    );
  border-radius: 50% 50% 48% 48% / 12% 12% 88% 88%;
  -webkit-mask-image: radial-gradient(ellipse at 50% 68%, #000 0%, #000 62%, transparent 100%);
  mask-image: radial-gradient(ellipse at 50% 68%, #000 0%, #000 62%, transparent 100%);
  filter: blur(var(--spotlight-blur));
  mix-blend-mode: screen;
  opacity: calc(0.9 * var(--spotlight-feather));
  z-index: 3;
  pointer-events: none;
}

.frame::after {
  content: "";
  position: absolute;
  left: 50%;
  top: calc((var(--spotlight-lamp-top) - var(--spotlight-lamp-stem)) * var(--scene-scale));
  width: calc((var(--spotlight-lamp-size) + 4px) * var(--scene-scale));
  height: calc((var(--spotlight-lamp-stem) + var(--spotlight-lamp-size)) * var(--scene-scale));
  transform: translateX(-50%);
  background:
    linear-gradient(180deg, #727b86 0%, #4f5863 100%) center top /
      calc(2px * var(--scene-scale))
      calc(var(--spotlight-lamp-stem) * var(--scene-scale))
      no-repeat,
    radial-gradient(
      circle at 50% 84%,
      #d2d8df 0%,
      #9ca5af 46%,
      #57606b 100%
    );
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.35),
    0 0 10px rgba(255, 240, 205, 0.35);
  border-radius: 999px;
  z-index: 4;
  pointer-events: none;
}

.frame-art {
  display: none;
}

.frame-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #ddd4c4;
  pointer-events: none;
}

.frame-photo-window {
  position: absolute;
  left: calc(var(--photo-window-left, 6.2%) + var(--frame-photo-inset, 0%));
  top: calc(var(--photo-window-top, 6.4%) + var(--frame-photo-inset, 0%));
  width: calc(var(--photo-window-width, 87.6%) - (var(--frame-photo-inset, 0%) * 2));
  height: calc(var(--photo-window-height, 87.2%) - (var(--frame-photo-inset, 0%) * 2));
  overflow: hidden;
  border-radius: 1px;
  border: 1px solid rgba(24, 20, 16, 0.28);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    inset 0 0 12px var(--art-warm-light);
  z-index: 1;
  pointer-events: none;
}

.frame-shell {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  image-rendering: auto;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.22));
  z-index: 2;
  pointer-events: none;
}

.frame-label {
  position: absolute;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: calc(90px * var(--scene-scale));
  padding: calc(4px * var(--scene-scale)) calc(8px * var(--scene-scale));
  border-radius: 4px;
  color: #e8e2d7;
  background: rgba(20, 24, 30, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.frame-label-title {
  font-size: calc(0.72rem * var(--scene-scale));
  letter-spacing: 0.02em;
}

.frame-label-subtitle {
  font-size: calc(0.68rem * var(--scene-scale));
  opacity: 0.9;
}

.frame.format-portrait {
  border-color: #76583a;
}

.frame.format-square {
  border-color: #815f3f;
}

.frame.format-landscape {
  border-color: #705338;
}

.frame.format-wide {
  border-color: #846042;
}

.display-case {
  position: absolute;
  width: calc(146px * var(--scene-scale));
  height: calc(220px * var(--scene-scale));
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.display-case .case-glass {
  position: absolute;
  left: calc(8px * var(--scene-scale));
  right: calc(8px * var(--scene-scale));
  top: 0;
  height: calc(164px * var(--scene-scale));
  border: 2px solid rgba(174, 191, 203, 0.85);
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.08) 30%),
    linear-gradient(180deg, rgba(245, 251, 255, 0.22), rgba(212, 228, 238, 0.08));
  border-radius: 8px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.35),
    0 8px 16px rgba(0, 0, 0, 0.15);
}

.display-case .case-base {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(44px * var(--scene-scale));
  border-radius: 6px;
  background: linear-gradient(180deg, #6f655b 0%, #514941 100%);
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.22);
}

.display-case .case-plinth {
  position: absolute;
  left: calc(22px * var(--scene-scale));
  right: calc(22px * var(--scene-scale));
  bottom: calc(44px * var(--scene-scale));
  height: calc(16px * var(--scene-scale));
  border-radius: 3px;
  background: linear-gradient(180deg, #cabdae 0%, #b4a594 100%);
}

.case-object {
  position: absolute;
  bottom: calc(62px * var(--scene-scale));
  background: linear-gradient(180deg, #f2ede3 0%, #c7bcad 100%);
  border: 1px solid rgba(87, 78, 66, 0.62);
}

.case-object.object-bust {
  width: calc(36px * var(--scene-scale));
  height: calc(54px * var(--scene-scale));
  border-radius: 40% 40% 32% 32%;
}

.case-object.object-artifact {
  width: calc(34px * var(--scene-scale));
  height: calc(44px * var(--scene-scale));
  border-radius: 8px;
}

.case-object.object-vase {
  width: calc(28px * var(--scene-scale));
  height: calc(52px * var(--scene-scale));
  border-radius: 12px 12px 14px 14px;
}

.case-object-image {
  position: absolute;
  left: 50%;
  bottom: calc(60px * var(--scene-scale));
  transform: translateX(-50%);
  height: auto;
  max-height: calc(132px * var(--scene-scale));
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.24));
  pointer-events: none;
}

.shelf-exhibit {
  position: absolute;
  width: calc(220px * var(--scene-scale));
  height: calc(130px * var(--scene-scale));
}

.shelf-board {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(26px * var(--scene-scale));
  height: calc(16px * var(--scene-scale));
  background: linear-gradient(180deg, #86694c 0%, #6f563e 100%);
  border-radius: 4px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.shelf-bracket {
  position: absolute;
  bottom: 0;
  width: calc(22px * var(--scene-scale));
  height: calc(26px * var(--scene-scale));
  background: linear-gradient(180deg, #75614d 0%, #5e4e3d 100%);
  border-radius: 0 0 4px 4px;
}

.shelf-bracket.left {
  left: calc(34px * var(--scene-scale));
}

.shelf-bracket.right {
  right: calc(34px * var(--scene-scale));
}

.shelf-memory-object {
  position: absolute;
  bottom: calc(42px * var(--scene-scale));
  border-radius: 999px;
  background: linear-gradient(180deg, #ddd7ca 0%, #bdb4a4 100%);
  border: 1px solid rgba(86, 76, 62, 0.65);
}

.shelf-memory-object.vase {
  width: calc(24px * var(--scene-scale));
  height: calc(34px * var(--scene-scale));
  border-radius: 10px 10px 12px 12px;
}

.shelf-memory-object.cube {
  width: calc(20px * var(--scene-scale));
  height: calc(20px * var(--scene-scale));
  border-radius: 4px;
}

.shelf-memory-object.sphere {
  width: calc(22px * var(--scene-scale));
  height: calc(22px * var(--scene-scale));
}

.shelf-memory-image {
  position: absolute;
  bottom: calc(36px * var(--scene-scale));
  transform: translateX(-50%);
  height: auto;
  max-height: calc(96px * var(--scene-scale));
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
  pointer-events: none;
}

.tape-exhibit {
  position: absolute;
  width: calc(160px * var(--scene-scale));
  height: calc(92px * var(--scene-scale));
  pointer-events: none;
  filter: drop-shadow(0 5px 7px rgba(0, 0, 0, 0.26));
}

.tape-exhibit-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.tape-exhibit.fallback {
  border-radius: 8px;
  background: linear-gradient(180deg, #7d6d59 0%, #5f5243 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--floor-height);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(0, 0, 0, 0.12) 100%),
    url("assets/textures/floor_wood.png") repeat-x left bottom / auto 100%,
    linear-gradient(180deg, var(--gallery-floor-top) 0%, var(--gallery-floor-bottom) 100%);
  border-top: 3px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 12px 16px rgba(255, 255, 255, 0.06);
}

.floor::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -10px;
  height: 12px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.26) 0%, transparent 100%);
  pointer-events: none;
}

.floor::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -7px;
  height: 7px;
  background: linear-gradient(180deg, #4d5660 0%, #424b54 100%);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  pointer-events: none;
}

.character {
  position: absolute;
  bottom: calc(var(--floor-height) - 6px);
  width: var(--player-size, 192px);
  height: var(--player-size, 192px);
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: calc(var(--player-size, 192px) * 7) var(--player-size, 192px);
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background-image: url("assets/character/character_idle.png");
  transform-origin: center bottom;
  --dir: 1;
  transform: scaleX(var(--dir));
  transition: transform 0.06s linear;
  z-index: 20;
}

.character.facing-left {
  --dir: -1;
}

.help {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  margin: 0;
  padding: 8px 12px;
  font-size: 0.95rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.75);
  z-index: 40;
}

.interact-hint {
  position: fixed;
  left: 50%;
  bottom: 54px;
  transform: translateX(-50%);
  margin: 0;
  padding: 6px 11px;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(35, 35, 35, 0.85);
}

.turnstile-warning {
  position: fixed;
  left: 50%;
  bottom: 86px;
  transform: translateX(-50%);
  margin: 0;
  padding: 6px 10px;
  font-size: 0.8rem;
  border-radius: 8px;
  color: #fff;
  background: rgba(160, 56, 48, 0.9);
  z-index: 42;
}

.mobile-controls {
  position: fixed;
  inset: auto 0 0;
  z-index: 45;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
}

.mobile-controls-left,
.mobile-controls-right {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.mobile-controls-right {
  flex-direction: column-reverse;
}

.mobile-control-button[hidden] {
  display: none !important;
}

.mobile-control-button {
  pointer-events: auto;
  border: 0;
  color: #fffdf8;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.mobile-control-button:active,
.mobile-control-button.is-pressed {
  transform: scale(0.96);
}

.mobile-control-move {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(40, 47, 55, 0.94) 0%, rgba(24, 30, 36, 0.96) 100%);
  font-size: 1.7rem;
  font-weight: 700;
}

.mobile-control-action,
.mobile-control-close {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  font-size: 1.8rem;
  font-weight: 700;
}

.mobile-control-action {
  background: linear-gradient(180deg, rgba(174, 126, 76, 0.98) 0%, rgba(128, 87, 44, 0.98) 100%);
}

.mobile-control-close {
  width: 68px;
  height: 68px;
  background: linear-gradient(180deg, rgba(221, 244, 251, 0.96) 0%, rgba(180, 212, 224, 0.98) 100%);
  color: #27333c;
  font-size: 2.1rem;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.45);
  z-index: 50;
}

.modal-panel {
  width: min(90vw, 440px);
  background: #fffdf8;
  border: 2px solid #bba988;
  border-radius: 10px;
  padding: 20px 18px;
  position: relative;
}

.modal-panel h2 {
  margin: 0 0 12px;
}

.modal-panel p {
  margin: 8px 0;
  line-height: 1.4;
}

.return-confirm-panel {
  width: min(90vw, 380px);
  text-align: center;
}

.return-confirm-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

.return-confirm-button {
  min-width: 110px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  font: inherit;
  cursor: pointer;
}

.return-confirm-primary {
  color: #fffaf5;
  background: linear-gradient(180deg, #6e4350 0%, #4f313a 100%);
}

.return-confirm-secondary {
  color: #4f313a;
  background: rgba(255, 242, 237, 0.92);
  border: 1px solid rgba(111, 68, 79, 0.18);
}

.modal-close {
  position: absolute;
  top: 6px;
  right: 8px;
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  cursor: pointer;
  color: #56442f;
}

.photo-view {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.photo-view-overlay {
  position: absolute;
  inset: 0;
  background: var(--photo-view-overlay);
}

.photo-view-content {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(260px, 360px);
  align-items: center;
  gap: 28px;
  padding: 8vh 7vw;
  opacity: 0;
  transform: scale(0.94);
  transition:
    opacity var(--photo-view-anim-ms) ease,
    transform var(--photo-view-anim-ms) ease;
}

.photo-view.open .photo-view-content {
  opacity: 1;
  transform: scale(1);
}

.photo-view-image-wrap {
  justify-self: center;
  width: min(64vw, 920px);
  max-height: 76vh;
  padding: 14px;
  border-radius: 10px;
  background: linear-gradient(180deg, #8f6b46 0%, #755434 100%);
  box-shadow: 0 18px 28px rgba(0, 0, 0, 0.35);
}

.photo-view-image {
  display: block;
  width: 100%;
  max-height: calc(76vh - 28px);
  object-fit: contain;
  background: #ddd7cc;
}

.photo-view-panel {
  align-self: center;
  padding: 20px 18px;
  border-radius: 10px;
  border: 2px solid #b9a78f;
  background: rgba(255, 252, 246, 0.94);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.2);
}

.photo-view-panel h2 {
  margin: 0 0 12px;
}

.photo-view-panel p {
  margin: 7px 0;
  line-height: 1.45;
}

.photo-view-close {
  position: absolute;
  top: 24px;
  right: 28px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #4b3a29;
}

@media (max-width: 900px) {
  .photo-view-content {
    grid-template-columns: 1fr;
    align-content: center;
    padding: 6vh 5vw;
    gap: 14px;
  }

  .photo-view-image-wrap {
    width: min(90vw, 620px);
    max-height: 56vh;
  }

  .photo-view-image {
    max-height: calc(56vh - 28px);
  }

  .photo-view-panel {
    justify-self: center;
    width: min(90vw, 620px);
  }
}

@media (max-width: 1180px) and (orientation: landscape), (pointer: coarse) and (orientation: landscape) {
  .photo-view-content {
    grid-template-columns: minmax(300px, 1.05fr) minmax(260px, 0.95fr);
    align-items: center;
    gap: 18px;
    padding: 4vh 4vw 8vh;
  }

  .photo-view-image-wrap {
    width: min(52vw, 760px);
    max-height: 72vh;
    padding: 10px;
  }

  .photo-view-image {
    max-height: calc(72vh - 20px);
  }

  .photo-view-panel {
    width: min(38vw, 420px);
    max-height: 72vh;
    overflow: auto;
  }

  .photo-view-close {
    top: 12px;
    right: 12px;
    width: 58px;
    height: 58px;
    font-size: 2rem;
  }

  .mobile-controls {
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .mobile-control-close {
    width: 72px;
    height: 72px;
  }
}

@media (max-width: 1024px), (pointer: coarse) {
  :root {
    --spotlight-blur: 4px;
    --wall-texture-strength: 0.08;
    --frame-shadow:
      0 7px 16px rgba(0, 0, 0, 0.2),
      0 14px 20px rgba(0, 0, 0, 0.18);
    --photo-view-overlay: rgba(10, 14, 22, 0.72);
  }

  .access-floating-memory {
    filter: saturate(1.02) contrast(1.02) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.16));
  }

  .ticket-desk,
  .frame-shell,
  .display-case .case-glass,
  .shelf-memory-image,
  .case-object-image,
  .tape-exhibit {
    filter: none;
  }

  .yusuf-bubble,
  .frame-label,
  .help,
  .interact-hint,
  .turnstile-warning,
  .photo-view-panel,
  .modal-panel,
  .access-panel,
  .photo-view-image-wrap {
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
  }

  .help {
    bottom: 124px;
    max-width: min(86vw, 440px);
    text-align: center;
    font-size: 0.88rem;
  }

  .interact-hint {
    bottom: 166px;
    font-size: 0.92rem;
  }

  .turnstile-warning {
    bottom: 204px;
    max-width: min(84vw, 360px);
    text-align: center;
  }

  .modal-panel {
    width: min(92vw, 520px);
    padding: 22px 18px 20px;
  }

  .modal-close,
  .photo-view-close {
    top: 14px;
    right: 14px;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    font-size: 2rem;
    line-height: 1;
  }

}

@media (max-width: 820px), (pointer: coarse) {
  .access-panel {
    width: min(92vw, 420px);
    padding: 20px 18px;
    border-radius: 14px;
  }

  .access-title {
    font-size: 1.04rem;
    text-align: center;
  }

  .access-input,
  .access-submit {
    height: 48px;
  }

  .modal-panel {
    border-radius: 14px;
  }

  .photo-view-content {
    padding: 7vh 4vw 14vh;
    gap: 12px;
  }

  .photo-view-image-wrap {
    width: min(92vw, 620px);
    max-height: 52vh;
    padding: 10px;
  }

  .photo-view-image {
    max-height: calc(52vh - 20px);
  }

  .photo-view-panel {
    width: min(92vw, 620px);
    padding: 16px 14px;
  }

  .help {
    bottom: 116px;
    font-size: 0.84rem;
  }

  .interact-hint {
    bottom: 154px;
  }

  .turnstile-warning {
    bottom: 190px;
  }
}

@media (max-width: 1024px), (pointer: coarse) {
  .mobile-controls {
    display: flex;
  }
}

@media (min-width: 1025px) and (pointer: fine) {
  .mobile-controls {
    display: none !important;
  }
}