/* M06-UX-01: ziyaretçi görüntüleyicisi — panorama tam ekran, üstte yarı saydam başlık,
   altta sahne listesi + iletişim. Masaüstü ve mobil için duyarlı. Yalnız sistem yazı tipleri (CSP: harici kaynak yok). */
:root {
  --ink: #f5f7fa;
  --muted: rgba(245, 247, 250, 0.72);
  --glass: rgba(14, 17, 22, 0.58);
  --glass-strong: rgba(14, 17, 22, 0.86);
  --line: rgba(255, 255, 255, 0.14);
  --primary: #e8b04b;
  --primary-ink: #1a1408;
  --wa: #25d366;
  --focus: #8ec5ff;
  --radius: 14px;
  --gap: 16px;
  --top-h: 60px;
  /* M06-UX-03: alt sahne adı şeridi; panorama bunun üstünde biter. */
  --bar-h: calc(48px + env(safe-area-inset-bottom));
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
/* M06-UX-03: display tanımlı öğelerde (logo kutusu, kapak) hidden özniteliği her zaman geçerli. */
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: #0e1116; color: var(--ink); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }
.app { position: relative; height: 100vh; height: 100dvh; overflow: hidden; }
.pano { position: absolute; inset: 0 0 var(--bar-h) 0; }
.pano:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.scrim { position: absolute; left: 0; right: 0; pointer-events: none; z-index: 2; }
.scrim-top { top: 0; height: 120px; background: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent); }
.scrim-bottom { bottom: var(--bar-h); height: 180px; background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent); }

/* ---- Başlık ---- */
.top {
  position: absolute; z-index: 5; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: var(--top-h);
  padding: 10px max(var(--gap), env(safe-area-inset-right)) 10px max(var(--gap), env(safe-area-inset-left));
  padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(14, 17, 22, 0.42);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
  /* Başlıkta etkileşimli öğe yok: altında kalan işarete tıklama geçer (M06-UX-02). */
  pointer-events: none;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo-chip { flex: none; display: grid; place-items: center; height: 40px; max-width: 112px; padding: 4px 8px; border-radius: 10px; background: rgba(255, 255, 255, 0.92); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); }
.logo { display: block; max-height: 32px; max-width: 96px; object-fit: contain; }
.titles { min-width: 0; }
h1 { margin: 0; font-size: 16px; font-weight: 650; letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.desc { margin: 1px 0 0; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60ch; }
.badge { flex: none; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }

/* ---- Alt bölge: sahneler + iletişim ---- */
.dock {
  position: absolute; z-index: 5; left: 0; right: 0; bottom: var(--bar-h);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  padding: 0 max(var(--gap), env(safe-area-inset-right)) 12px max(var(--gap), env(safe-area-inset-left));
  pointer-events: none;
}
.dock > * { pointer-events: auto; }
/* Sahne şeridinin boş kalan sağ kısmı panoramaya tıklama geçirir; yalnız şeridin kendisi yakalar. */
.dock > .scenes { min-width: 0; flex: 1 1 auto; pointer-events: none; }
.scene-list { pointer-events: auto; width: max-content; max-width: 100%; display: flex; gap: 8px; overflow-x: auto; padding: 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
.scene-list::-webkit-scrollbar { display: none; }
.scene-pill {
  flex: none; display: inline-flex; align-items: center; gap: 8px; max-width: 220px; min-height: 44px;
  padding: 6px 14px 6px 6px; border-radius: 999px; cursor: pointer; scroll-snap-align: start;
  border: 1px solid var(--line); background: var(--glass);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: background-color 0.15s, border-color 0.15s;
}
.scene-pill:hover { background: rgba(30, 35, 44, 0.8); }
.scene-pill[aria-current="true"] { background: var(--ink); color: #111; border-color: var(--ink); }
.scene-num { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-size: 12px; font-weight: 700; background: rgba(255, 255, 255, 0.14); }
.scene-pill[aria-current="true"] .scene-num { background: #111; color: var(--ink); }
.scene-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; font-weight: 550; }

.cta { flex: none; display: flex; gap: 8px; padding: 4px; }
.cta-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px;
  border-radius: 12px; font-weight: 650; font-size: 15px; text-decoration: none; white-space: nowrap;
  transition: transform 0.12s, filter 0.12s, background-color 0.12s;
}
.cta-btn svg { width: 18px; height: 18px; flex: none; }
.cta-btn:hover { filter: brightness(1.08); }
.cta-btn:active { transform: translateY(1px); }
.cta-primary { background: var(--primary); color: var(--primary-ink); box-shadow: 0 6px 20px rgba(232, 176, 75, 0.35); }
.cta-secondary { background: rgba(37, 211, 102, 0.16); color: #c9f7dc; border: 1px solid rgba(37, 211, 102, 0.55); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.cta-secondary svg { color: var(--wa); }
.cta-tertiary { background: var(--glass); color: var(--ink); border: 1px solid var(--line); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.cta-btn:focus-visible, .scene-pill:focus-visible, .info-close:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---- Bilgi kartı ---- */
.info {
  position: absolute; z-index: 8; top: calc(var(--top-h) + var(--gap)); right: var(--gap);
  width: min(380px, calc(100% - 2 * var(--gap))); max-height: calc(100% - var(--top-h) - var(--bar-h) - 140px); overflow: auto;
  padding: 16px 18px 18px; border-radius: 18px; border: 1px solid var(--line);
  background: var(--glass-strong); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  animation: card-in 0.18s ease-out;
}
.info-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.info-kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--primary); }
.info-close { display: grid; place-items: center; width: 36px; height: 36px; margin: -6px -8px -6px 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.08); font-size: 22px; line-height: 1; cursor: pointer; }
.info-close:hover { background: rgba(255, 255, 255, 0.16); }
.info h2 { margin: 0 0 8px; font-size: 19px; font-weight: 650; line-height: 1.3; overflow-wrap: anywhere; }
.info p { margin: 0; font-size: 15px; line-height: 1.6; color: rgba(245, 247, 250, 0.86); white-space: pre-line; overflow-wrap: anywhere; }
@keyframes card-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.error { position: absolute; z-index: 9; left: var(--gap); right: var(--gap); top: calc(var(--top-h) + var(--gap)); margin: 0; padding: 12px 14px; border-radius: 12px; background: rgba(160, 32, 32, 0.92); color: #fff; }

/* ---- Pannellum teması ---- */
.pnlm-container { background: #0e1116; font-family: var(--font); }
.pnlm-about-msg { display: none !important; } /* noopener'sız dış bağlantı gösterilmez */
.pnlm-controls-container { top: calc(var(--top-h) + 12px); left: max(var(--gap), env(safe-area-inset-left)); transform: scale(1.35); transform-origin: top left; }
.pnlm-controls { background-color: rgba(14, 17, 22, 0.6); border: 1px solid var(--line); border-radius: 8px; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); overflow: hidden; }
.pnlm-control { filter: invert(1); }
.pnlm-control:hover { background-color: rgba(0, 0, 0, 0.12); }
.pnlm-zoom-out { border-top-color: rgba(0, 0, 0, 0.25); }
/* Tam ekran düğmesi hem kap hem düğmedir: açık zemin ters çevrilince koyu cam görünür. */
.pnlm-controls.pnlm-control { background-color: rgba(241, 238, 233, 0.75); border-color: rgba(0, 0, 0, 0.14); -webkit-backdrop-filter: none; backdrop-filter: none; }
.pnlm-controls.pnlm-control:hover { background-color: rgba(225, 220, 212, 0.75); }
.pnlm-load-box { background: var(--glass-strong); border-radius: 14px; }
/* ---- M06-UX-02: gezinme işaretleri ----
   Kök (.hs) Pannellum'un konumladığı 52×52 px dokunma hedefidir; transform'u Pannellum yazar,
   bu yüzden ölçek/animasyon yalnız iç öğelerde. Görünmezlik Pannellum'un visibility'sinden gelir:
   iç öğeler visibility'yi geçersiz kılmaz (arkada kalan işaretin etiketi sızmasın), opaklıkla gizlenir. */
.pnlm-hotspot-base.hs { width: 52px; height: 52px; padding: 0; border-radius: 50%; outline: none; -webkit-tap-highlight-color: transparent; }
.hs-mark { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; border-radius: 50%; transform: translate(-50%, -50%); transition: transform 0.18s ease-out, background-color 0.18s, border-color 0.18s, box-shadow 0.18s; }
/* Sahne geçişi: yarı saydam cam disk + parlak çekirdek + yavaş nefes halkası. */
.hs-scene .hs-mark {
  width: 40px; height: 40px;
  background: rgba(255, 255, 255, 0.16); border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  -webkit-backdrop-filter: blur(6px) saturate(130%); backdrop-filter: blur(6px) saturate(130%);
}
.hs-dot { width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px rgba(0, 0, 0, 0.35); transition: transform 0.18s ease-out; }
.hs-pulse { position: absolute; inset: -2px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.7); opacity: 0; animation: hs-breathe 2.8s ease-out infinite; pointer-events: none; }
@keyframes hs-breathe { 0% { transform: scale(1); opacity: 0.55; } 70%, 100% { transform: scale(1.55); opacity: 0; } }
.hs-scene:hover .hs-mark, .hs-scene:focus-visible .hs-mark { transform: translate(-50%, -50%) scale(1.12); background: rgba(255, 255, 255, 0.3); }
.hs-scene:hover .hs-dot, .hs-scene:focus-visible .hs-dot { transform: scale(1.25); }
.hs-scene:active .hs-mark { transform: translate(-50%, -50%) scale(0.94); }
/* Bilgi noktası: dolu kehribar disk + "i"; nefes halkası yok — gezinmeden ayrışır. */
.hs-info .hs-mark {
  width: 32px; height: 32px; background: var(--primary); color: var(--primary-ink);
  border: 2px solid rgba(255, 255, 255, 0.85); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}
.hs-glyph { font: 700 italic 17px/1 Georgia, "Times New Roman", serif; }
.hs-info:hover .hs-mark, .hs-info:focus-visible .hs-mark { transform: translate(-50%, -50%) scale(1.12); box-shadow: 0 0 0 4px rgba(232, 176, 75, 0.35), 0 2px 10px rgba(0, 0, 0, 0.4); }
.hs:focus-visible .hs-mark { box-shadow: 0 0 0 3px var(--focus), 0 2px 10px rgba(0, 0, 0, 0.4); }
/* Etiket: işaretin üstünde; fareyle üzerine gelince veya klavye odağında görünür. Tıklamayı yakalamaz. */
.hs-label {
  position: absolute; left: 50%; bottom: calc(100% + 2px); transform: translate(-50%, 4px);
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  width: max-content; max-width: 220px; padding: 6px 12px; border-radius: 10px;
  background: var(--glass-strong); border: 1px solid var(--line); color: var(--ink);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); text-align: center; pointer-events: none;
  opacity: 0; transition: opacity 0.15s, transform 0.15s ease-out;
}
.hs-kicker { font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.hs-name { font-size: 13.5px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.hs:hover .hs-label, .hs:focus-visible .hs-label { opacity: 1; transform: translate(-50%, 0); }

/* ---- Mobil ---- */
@media (max-width: 767px) {
  :root { --gap: 12px; --top-h: 56px; }
  .badge { display: none; }
  .logo-chip { height: 36px; max-width: 88px; }
  .logo { max-height: 28px; max-width: 72px; }
  .dock { flex-direction: column; align-items: stretch; gap: 6px; }
  .cta { width: 100%; }
  .cta-btn { flex: 1 1 auto; min-width: 0; padding: 0 12px; gap: 6px; }
  .cta-primary { flex-grow: 1.6; }
  .cta-btn span { overflow: hidden; text-overflow: ellipsis; }
  .scene-pill { max-width: 70vw; }
  .info { top: auto; left: var(--gap); right: var(--gap); bottom: calc(var(--bar-h) + var(--gap)); width: auto; max-height: 55%; border-radius: 20px; }
}
@media (max-width: 360px) {
  .cta-tertiary span, .cta-secondary span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
@media (prefers-reduced-motion: reduce) {
  .info { animation: none; }
  .scene-pill, .cta-btn { transition: none; }
  .hs-pulse { display: none; animation: none; }
  .hs-mark, .hs-dot, .hs-label { transition: none; }
}

/* ---- M06-UX-03: alt sahne adı şeridi ----
   Panoramanın altında ayrı koyu bant; panorama alanı bu bandın üstünde biter, bu yüzden işaretleri
   ve CTA'ları örtmez. Ad tour.json'dan textContent ile gelir. */
.scene-bar {
  position: absolute; z-index: 6; left: 0; right: 0; bottom: 0; height: var(--bar-h);
  display: flex; align-items: center; justify-content: center;
  padding: 0 max(var(--gap), env(safe-area-inset-right)) env(safe-area-inset-bottom) max(var(--gap), env(safe-area-inset-left));
  background: rgba(8, 10, 13, 0.86); border-top: 1px solid rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.scene-title {
  margin: 0; max-width: 100%; color: #fff; font-size: 15px; font-weight: 600; letter-spacing: 0.06em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center;
}

/* ---- M06-UX-03: kapak ----
   Görsel yoksa (veya yüklenemezse) yalnız koyu degrade: kaynak panorama/döşeme kullanılmaz. */
.cover {
  position: absolute; z-index: 30; inset: 0; display: grid; place-items: center; overflow: hidden;
  padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  background:
    radial-gradient(120% 90% at 50% 35%, rgba(232, 176, 75, 0.16), transparent 60%),
    radial-gradient(80% 60% at 80% 100%, rgba(80, 120, 170, 0.18), transparent 70%),
    linear-gradient(160deg, #1a1d24 0%, #0b0d11 100%);
}
.cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.6)); pointer-events: none; }
.cover-inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 640px; min-width: 0; }
.cover-logo { display: grid; place-items: center; height: 52px; max-width: 160px; padding: 6px 12px; margin-bottom: 18px; border-radius: 12px; background: rgba(255, 255, 255, 0.94); }
.cover-logo img { display: block; max-height: 40px; max-width: 136px; object-fit: contain; }
.cover-kicker { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--primary); }
.cover-title { margin: 0; font-size: clamp(26px, 4.2vw, 44px); font-weight: 650; line-height: 1.15; letter-spacing: 0.005em; overflow-wrap: anywhere; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45); }
.cover-desc { margin: 10px 0 0; font-size: 16px; color: var(--muted); overflow-wrap: anywhere; }
.cover-play {
  margin-top: 34px; display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 8px; border: 0; background: none; cursor: pointer; border-radius: 20px;
}
.cover-play-disc {
  position: relative; display: grid; place-items: center; width: 104px; height: 104px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.16); border: 2px solid rgba(255, 255, 255, 0.92); color: #fff;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45); transition: transform 0.18s ease-out, background-color 0.18s;
}
.cover-play-disc svg { width: 44px; height: 44px; margin-left: 6px; }
.cover-play-disc::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.6); animation: hs-breathe 2.8s ease-out infinite; pointer-events: none; }
.cover-play:hover .cover-play-disc, .cover-play:focus-visible .cover-play-disc { transform: scale(1.06); background: rgba(255, 255, 255, 0.28); }
.cover-play:active .cover-play-disc { transform: scale(0.97); }
.cover-play:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.cover-play-label { font-size: 17px; font-weight: 650; letter-spacing: 0.02em; }
.cover-meta { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.cover-meta:empty { display: none; }
@media (max-width: 767px) {
  :root { --bar-h: calc(42px + env(safe-area-inset-bottom)); }
  .scene-title { font-size: 14px; }
  .cover-play-disc { width: 88px; height: 88px; }
  .cover-play-disc svg { width: 38px; height: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  .cover-play-disc::after { display: none; animation: none; }
  .cover-play-disc { transition: none; }
}
