/* The 3D world player (shared/js/world.js). The page gives the container a size; everything else is here. */
.world { position: relative; overflow: hidden; background: #05090c; isolation: isolate; --world-bar: 0px; }
.world-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; outline: none; }
.world-exploring .world-canvas { touch-action: none; cursor: grab; }
.world-exploring .world-canvas.dragging { cursor: grabbing; }
.world-ui { position: absolute; inset: 0; pointer-events: none; z-index: 2; }

/* Cinema bars: only in the guided tour, on wide screens */
.world-bars i { position: absolute; left: 0; right: 0; height: var(--world-bar); background: #020504; transition: transform 1.2s var(--ease, cubic-bezier(.16,1,.3,1)); }
.world-bars i:first-child { top: 0; }
.world-bars i:last-child { bottom: 0; }
.world-exploring .world-bars i:first-child { transform: translateY(-100%); }
.world-exploring .world-bars i:last-child { transform: translateY(100%); }

/* Room labels, placed every frame by world.js */
.world-labels { position: absolute; inset: 0; }
.world-label {
  position: absolute; left: 0; top: 0; pointer-events: auto; visibility: hidden; opacity: 0; will-change: transform, opacity;
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px 0 12px; border-radius: 999px;
  border: 1px solid rgba(231, 207, 147, .38); background: rgba(7, 15, 12, .46); color: var(--text, #f3efe4);
  backdrop-filter: blur(10px) saturate(1.2); -webkit-backdrop-filter: blur(10px) saturate(1.2);
  font: 400 1.02rem/1 var(--serif, "Frank Ruhl Libre", Georgia, serif); letter-spacing: .01em; white-space: nowrap; cursor: pointer;
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
  transition: border-color .3s, background-color .3s;
}
.world-label i { width: 8px; height: 8px; border-radius: 50%; background: var(--gold-hi, #e7cf93); box-shadow: 0 0 0 4px rgba(231, 207, 147, .18), 0 0 14px rgba(231, 207, 147, .8); flex: none; }
.world-label:hover, .world-label:focus-visible { border-color: var(--gold-hi, #e7cf93); background: rgba(7, 15, 12, .7); }
.world-label.near { font-size: 1.12rem; }
.world-label[dir="rtl"] { padding: 0 12px 0 16px; font-size: 1.08rem; }

/* Walking hint */
.world-hint {
  position: absolute; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translate(-50%, 10px); opacity: 0;
  padding: 10px 18px; border-radius: 999px; background: rgba(7, 15, 12, .6); border: 1px solid var(--line, rgba(255,255,255,.14));
  color: #dcd8cc; font: 500 .86rem/1.3 var(--sans, system-ui, sans-serif); letter-spacing: .02em; white-space: nowrap;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: opacity .6s, transform .6s var(--ease, ease);
}
.world-hint.show { opacity: 1; transform: translate(-50%, 0); }

/* Touch joystick (explore mode, touch screens) */
.world-joy {
  position: absolute; left: calc(24px + env(safe-area-inset-left)); bottom: calc(28px + env(safe-area-inset-bottom));
  width: 124px; height: 124px; border-radius: 50%; pointer-events: auto; touch-action: none;
  background: radial-gradient(circle, rgba(7,15,12,.15), rgba(7,15,12,.5)); border: 1px solid rgba(231, 207, 147, .35);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; place-items: center;
}
.world-joy[hidden] { display: none; }
.world-joy span { width: 50px; height: 50px; border-radius: 50%; background: linear-gradient(180deg, var(--gold-hi, #e7cf93), var(--gold, #cdae68)); box-shadow: 0 6px 20px rgba(0,0,0,.45); transition: transform .12s; }
.world-joy:active span { transition: none; }

@media (max-width: 560px) { .world-hint { font-size: .78rem; max-width: calc(100% - 32px); white-space: normal; text-align: center; } }
@media (prefers-reduced-motion: reduce) { .world-bars i, .world-hint, .world-label { transition: none; } }
