/* סיור 360° — אותה שפה כמו האתר: נייר שנהב, דיו, ברונזה. הצבעים והגופנים מ-tokens.css. */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--paper); color: var(--ink); font: 400 15px/1.45 var(--sans); overflow: hidden; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
button, select { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
[hidden] { display: none !important; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; display: block; background: var(--paper-2); }
#c:active { cursor: grabbing; }

/* פס עליון */
.top { position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 5; display: flex; align-items: center; gap: 10px;
  padding: calc(env(safe-area-inset-top) + 8px) 12px 8px; background: var(--glass); border-block-end: 1px solid var(--line);
  backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); }
.back { display: grid; place-items: center; width: var(--tap); height: var(--tap); flex: none; border-radius: 50%; border: 1px solid var(--line-2); color: var(--ink); text-decoration: none; }
.ttl { flex: 1; display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.ttl b { font-family: var(--serif); font-weight: 500; font-size: 1.15rem; }
.ttl span { font-size: .75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#type { min-height: var(--tap); background: var(--card); color: var(--ink); border: 1px solid var(--line-2); border-radius: var(--r-s); padding: 6px 10px; max-width: 42vw; }

/* הנחיה ומצבים */
.hint { position: fixed; inset-block-start: 50%; inset-inline: 0; margin: auto; width: max-content; max-width: 84vw; text-align: center; padding: 10px 16px; border-radius: var(--r);
  background: var(--glass); border: 1px solid var(--line); font-size: .85rem; color: var(--ink-2); pointer-events: none; transition: opacity .5s var(--ease); }
.hint.off { opacity: 0; }
.load { position: fixed; inset-block-end: calc(env(safe-area-inset-bottom) + 84px); inset-inline: 0; margin: auto; width: max-content; padding: 8px 16px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--line); font-size: .82rem; color: var(--ink-2); }
.load.done { display: none; }
.state { position: fixed; inset: 0; z-index: 4; display: grid; place-content: center; gap: 14px; padding: 24px; text-align: center; background: var(--paper); }
.state h2 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 1.5rem; }
.state p { margin: 0; color: var(--ink-2); max-width: 34ch; }
.state .acts { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); padding: 8px 20px; border-radius: 999px; border: 1px solid var(--ink);
  background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 500; font-size: .92rem; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }

/* חדרים */
.rooms { position: fixed; inset-block-end: 0; inset-inline: 0; z-index: 3; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: 12px 12px calc(env(safe-area-inset-bottom) + 12px); background: linear-gradient(rgba(247,245,240,0), var(--glass) 45%); }
.rooms::-webkit-scrollbar { display: none; }
.rooms button { flex: none; min-height: var(--tap); border: 1px solid var(--line-2); background: var(--card); color: var(--ink); border-radius: 999px; padding: 6px 16px; font-weight: 500; font-size: .88rem; }
.rooms button[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* כלים */
.tools { position: fixed; z-index: 3; inset-inline-start: 12px; inset-block-end: calc(env(safe-area-inset-bottom) + 80px); display: flex; flex-direction: column; gap: 10px; }
.tools button { width: var(--tap); height: var(--tap); border-radius: 50%; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); display: grid; place-items: center; padding: 0; }
.tools button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* חצים לחדרים סמוכים — rtl-ok: מיקום לפי הקרנת התלת-ממד על המסך */
.hot { position: fixed; inset: 0 auto auto 0; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; background: none; color: var(--ink); padding: 0; }
.hot i { width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 254, 251, .92); border: 1px solid var(--line-2); display: grid; place-items: center; box-shadow: var(--shadow-float); }
/* rtl-ok: חץ "קדימה" מצויר כלפי מעלה, לא תלוי כיוון כתיבה */
.hot i::after { content: ''; width: 11px; height: 11px; border-top: 2.5px solid var(--ink); border-left: 2.5px solid var(--ink); transform: translateY(3px) rotate(45deg); }
.hot span { font-size: .75rem; padding: 2px 9px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); white-space: nowrap; }
.fade { position: fixed; inset: 0; z-index: 1; background: var(--paper); opacity: 0; pointer-events: none; transition: opacity .3s var(--ease); }
.fade.on { opacity: 1; }

/* תמונות וסרטון */
.gal { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: var(--paper); color: var(--ink); }
.gal::backdrop { background: var(--paper); }
.gal .x { position: fixed; inset-block-start: calc(env(safe-area-inset-top) + 8px); inset-inline-end: 12px; z-index: 2; width: var(--tap); height: var(--tap); border-radius: 50%;
  border: 1px solid var(--line-2); background: var(--glass); color: var(--ink); font-size: 1rem; padding: 0; }
.gal h2 { margin: 0; padding: calc(env(safe-area-inset-top) + 14px) 18px 10px; font-family: var(--serif); font-weight: 500; font-size: 1.3rem; }
#galIn { height: 100%; overflow-y: auto; display: grid; gap: 14px; align-content: start; padding: 0 14px calc(env(safe-area-inset-bottom) + 20px); }
#galIn figure { margin: 0; }
#galIn img { width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; display: block; border-radius: var(--r); background: var(--paper-2); }
#galIn figcaption { padding: 6px 2px 0; font-size: .82rem; color: var(--ink-2); }
#galIn .empty { padding: 40px 20px; text-align: center; color: var(--muted); }
@media (min-width: 860px) { #galIn { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); padding-inline: 24px; } }
#vid { background: #111; }
#vid::backdrop { background: #111; }
#vidEl { width: 100%; height: 100%; object-fit: contain; background: #111; }

/* מפה קטנה: התוכנית, איפה אני */
.map { position: fixed; z-index: 3; inset-block-start: calc(env(safe-area-inset-top) + 72px); inset-inline-end: 12px; width: min(300px, 64vw); padding: 8px; border-radius: var(--r);
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-float); }
.mapIn { position: relative; }
.mapIn img { display: block; width: 100%; height: auto; border-radius: var(--r-s); }
/* rtl-ok: נקודות על התוכנית לפי קואורדינטות התמונה */
.mdot { position: absolute; transform: translate(-50%, -50%); border: 0; background: none; padding: 0; min-width: 32px; min-height: 32px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.mdot i { width: 13px; height: 13px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 3px #fff; }
.mdot span { font-size: .62rem; line-height: 1.1; background: rgba(255,255,255,.92); padding: 1px 4px; border-radius: 5px; margin-top: 2px; white-space: nowrap; color: var(--ink); }
.mdot.on i { background: var(--accent); box-shadow: 0 0 0 3px #fff, 0 0 0 7px var(--accent-soft); }
.mdot.on span { font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .fade, .hint { transition: none; } }
