:root {
  color-scheme: dark;
  --ink: #f7f1e7;
  --muted: #cdbfae;
  --panel: rgba(24, 19, 15, 0.88);
  --line: rgba(255, 232, 190, 0.24);
  --accent: #f0b35b;
  --cyan: #75ddcd;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  background: #120d09;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
a {
  font: inherit;
}

.room-page {
  width: 100vw;
  height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 50%, rgba(240, 179, 91, 0.11), transparent 48%),
    #120d09;
}

.room-canvas {
  position: relative;
  width: min(100vw, calc(100vh * 16 / 9));
  aspect-ratio: 16 / 9;
  overflow: hidden;
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.56);
}

.room-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
}

.hotspot {
  position: absolute;
  z-index: 4;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.broad-hotspot {
  z-index: 2;
}

.hotspot::after {
  content: attr(aria-label);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  width: max-content;
  max-width: 230px;
  transform: translateX(-50%) translateY(6px);
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 13, 9, 0.86);
  color: var(--ink);
  font-size: 0.78rem;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.hotspot:hover,
.hotspot:focus-visible {
  border-color: rgba(117, 221, 205, 0.75);
  background: rgba(117, 221, 205, 0.08);
  box-shadow: 0 0 0 6px rgba(117, 221, 205, 0.11), 0 0 34px rgba(240, 179, 91, 0.22);
  outline: none;
}

.hotspot:hover::after,
.hotspot:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.map-hotspot {
  left: 21%;
  top: 2%;
  width: 64%;
  height: 60%;
}

.note-hotspot {
  left: 87%;
  top: 25%;
  width: 8%;
  height: 13%;
}

.desk-hotspot {
  left: 0;
  top: 72%;
  width: 100%;
  height: 18%;
}

.helmet-hotspot {
  left: 84%;
  top: 69%;
  width: 15%;
  height: 23%;
}

.wallpaper-hotspot {
  left: 86%;
  top: 4%;
  width: 13%;
  height: 42%;
}

.bust-hotspot {
  left: 28%;
  top: 62%;
  width: 7%;
  height: 18%;
}

.glasses-hotspot {
  left: 10%;
  top: 86%;
  width: 14%;
  height: 9%;
}

.curtain-hotspot {
  left: 0;
  top: 0;
  width: 18%;
  height: 56%;
  z-index: 6;
}

.lamp-hotspot {
  left: 5%;
  top: 43%;
  width: 17%;
  height: 25%;
}

.print-hotspot {
  left: 6%;
  top: 67%;
  width: 11%;
  height: 18%;
}

.squishy-hotspot {
  left: 24%;
  top: 84%;
  width: 9%;
  height: 10%;
}

.monitor-hotspot {
  left: 34%;
  top: 47%;
  width: 35%;
  height: 26%;
}

.trophy-hotspot {
  left: 70%;
  top: 61%;
  width: 10%;
  height: 25%;
}

.frame-hotspot {
  left: 17%;
  top: 63%;
  width: 10%;
  height: 20%;
}

.figure-hotspot {
  left: 77%;
  top: 62%;
  width: 11%;
  height: 24%;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 44px);
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 7, 5, 0.58);
  backdrop-filter: blur(12px);
}

.modal-card {
  position: relative;
  width: min(760px, 100%);
  max-height: min(78vh, 760px);
  overflow: auto;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 34px 120px rgba(0, 0, 0, 0.6);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.45rem;
}

.kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.modal-card h1 {
  margin: 0 44px 18px 0;
  font-size: clamp(1.7rem, 4vw, 3.2rem);
  line-height: 1.02;
}

.modal-body {
  color: #eadfd0;
  line-height: 1.65;
}

.modal-body p {
  margin: 0 0 16px;
}

.paper-meta {
  color: var(--muted);
  font-size: 0.96rem;
}

.modal-body ul,
.modal-body ol {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
  padding-left: 22px;
}

.modal-body li::marker {
  color: var(--accent);
}

.paper-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.paper-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.paper-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}

.paper-card span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.link-row a {
  min-height: 38px;
  display: inline-grid;
  place-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
}

.link-row a:hover {
  border-color: rgba(117, 221, 205, 0.8);
}

@media (max-aspect-ratio: 16 / 9) {
  .room-canvas {
    width: calc(100vh * 16 / 9);
    max-width: none;
  }
}

@media (max-width: 720px) {
  body {
    overflow: auto;
  }

  .room-page {
    min-height: 100vh;
    height: auto;
    overflow: hidden;
  }

  .room-canvas {
    width: 142vh;
    min-width: 920px;
    transform: translateX(-20%);
  }

  .modal {
    position: fixed;
  }
}
