:root {
  --accent: #ffffff;
  --glass: rgba(24, 24, 27, 0.6);
  --glass-border: rgba(255, 255, 255, 0.12);
  --text: #fff;
  --muted: rgba(255, 255, 255, 0.68);
  --radius: 14px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #18181b; color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

#pano { position: fixed; inset: 0; }
.glass { background: var(--glass); border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); }

/* Pannellum'un kendi arayüzünü sadeleştir */
.pnlm-about-msg, .pnlm-panorama-info { display: none !important; }
.pnlm-load-box { background: var(--glass); border-radius: var(--radius); font-family: inherit; }
.pnlm-load-box p { font-size: 13px; }
.pnlm-lbar { border-color: rgba(255,255,255,.4); }
.pnlm-lbar-fill { background: var(--accent); }
.pnlm-container { background: #18181b; font-family: inherit; }

/* ─── Yükleme ekranı ─── */
#loader { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; background: radial-gradient(ellipse at center, #27272a 0%, #18181b 70%); transition: opacity .6s ease; }
#loader.done { opacity: 0; pointer-events: none; }
.loader-logo { width: min(280px, 64vw); height: auto; }
.loader-dev { position: absolute; bottom: calc(28px + var(--safe-b)); width: 96px; opacity: .7; }
.loader-text { color: var(--muted); font-size: 14px; text-align: center; max-width: 320px; line-height: 1.5; padding: 0 20px; }
.spinner { width: 42px; height: 42px; border-radius: 50%; border: 3px solid rgba(255,255,255,.12); border-top-color: var(--accent); animation: spin .9s linear infinite; }
#loader.error .spinner { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Üst bilgi ─── */
.top { position: fixed; top: calc(14px + var(--safe-t)); left: 14px; z-index: 10; display: flex; align-items: center; gap: 12px;
  padding: 8px 18px 8px 12px; border-radius: 16px; max-width: calc(100vw - 90px); }
.brand { height: 42px; width: auto; flex: none; }
.titles { min-width: 0; padding-left: 12px; border-left: 1px solid var(--glass-border); }
.tour-title { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scene-title { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; margin-top: 2px; white-space: nowrap; overflow: hidden; }
.scene-title .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }

/* ─── Sağ üst butonlar ─── */
.actions { position: fixed; top: calc(14px + var(--safe-t)); right: 14px; z-index: 10; display: flex; flex-direction: column; gap: 8px; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; cursor: pointer; transition: background .2s, transform .15s; }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { background: rgba(30, 34, 44, .8); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.on { background: #fff; border-color: transparent; color: #18181b; }

/* ─── Alt bar ─── */
.bottom { position: fixed; left: 14px; right: 14px; bottom: calc(14px + var(--safe-b)); z-index: 10; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.bottom > * { pointer-events: auto; }
.bottom-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; pointer-events: none; }
.bottom-row > * { pointer-events: auto; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 12px; cursor: pointer; font-size: 14px; font-weight: 500; }
.chip svg { width: 18px; height: 18px; }
.chip b { background: rgba(255,255,255,.14); border-radius: 20px; padding: 1px 8px; font-size: 12px; }
.chip.on { background: rgba(255,255,255,.92); color: #111; }
.chip.on b { background: rgba(0,0,0,.08); }
.cta { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 999px; background: #25D366; color: #fff;
  font-weight: 600; font-size: 15px; text-decoration: none; box-shadow: 0 6px 24px rgba(0,0,0,.35); margin-left: auto; }
.cta.phone { background: #fff; color: #18181b; }
.cta svg { width: 20px; height: 20px; }

.gallery { display: flex; gap: 10px; padding: 10px; border-radius: 16px; overflow-x: auto; scrollbar-width: thin; max-width: 100%; align-self: flex-start;
  animation: up .25s ease; }
@keyframes up { from { opacity: 0; transform: translateY(10px); } }
.thumb { flex: none; width: 128px; padding: 0; border: 2px solid transparent; border-radius: 10px; background: none; cursor: pointer; text-align: left; overflow: hidden; transition: border-color .2s; }
.thumb img { width: 100%; height: 72px; object-fit: cover; display: block; border-radius: 8px; background: #222; }
.thumb span { display: block; font-size: 12px; padding: 5px 2px 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.thumb.active { border-color: var(--accent); }
.thumb.active span { color: #fff; font-weight: 600; }

/* ─── Bilgi çekmecesi ─── */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(400px, 100vw); z-index: 30; background: rgba(16, 18, 24, .94);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border-left: 1px solid var(--glass-border);
  transform: translateX(105%); transition: transform .35s cubic-bezier(.2,.8,.2,1); overflow-y: auto; padding: calc(28px + var(--safe-t)) 26px calc(28px + var(--safe-b)); }
.drawer.open { transform: none; }
.close { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border: 0; border-radius: 10px; background: rgba(255,255,255,.08); font-size: 24px; line-height: 1; cursor: pointer; }
.close:hover { background: rgba(255,255,255,.16); }
.drawer .client { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.drawer h2 { font-size: 22px; margin: 6px 0 12px; line-height: 1.25; padding-right: 30px; }
.drawer p { color: var(--muted); line-height: 1.6; font-size: 14.5px; white-space: pre-line; margin: 0 0 14px; }
.drawer .sec { border-top: 1px solid var(--glass-border); padding-top: 18px; margin-top: 18px; }
.drawer .sec-title { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; font-weight: 600; }
.drawer .sec h3 { margin: 0 0 6px; font-size: 16px; }
.btn-list { display: grid; gap: 8px; }
.btn { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.07); color: #fff;
  text-decoration: none; font-size: 14.5px; font-weight: 500; border: 0; cursor: pointer; width: 100%; text-align: left; }
.btn:hover { background: rgba(255,255,255,.13); }
.btn svg { width: 20px; height: 20px; flex: none; color: var(--accent); }
.btn small { display: block; color: var(--muted); font-weight: 400; font-size: 12.5px; margin-top: 1px; }
.btn.primary { background: #fff; color: #18181b; justify-content: center; font-weight: 600; }
.btn.primary svg { color: #18181b; }
.credit { display: block; margin: 30px auto 0; width: 104px; opacity: .55; }

/* ─── Modallar ─── */
.modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.5);
  opacity: 0; pointer-events: none; transition: opacity .25s; }
.modal.open { opacity: 1; pointer-events: auto; }
.modal-card { position: relative; background: rgba(18, 20, 27, .96); border: 1px solid var(--glass-border); border-radius: 18px; width: min(560px, 100%);
  box-shadow: 0 20px 60px rgba(0,0,0,.5); transform: translateY(8px); transition: transform .25s; overflow: hidden; }
.modal.open .modal-card { transform: none; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 14px 20px; }
.modal-head .close { position: static; }
.map-card { width: min(900px, 100%); }
#map { height: min(60vh, 520px); background: #ddd; }
.modal-foot { padding: 12px 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.modal-foot .btn { width: auto; }
.hs-card { padding: 26px 24px 22px; }
.hs-card h3 { margin: 0 34px 10px 0; font-size: 20px; }
.hs-card p { color: var(--muted); line-height: 1.6; white-space: pre-line; margin: 0 0 16px; }
.hs-card .btn { justify-content: center; }

.leaflet-container { font-family: inherit; }
.map-pin { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; background: #27272a; transform: rotate(-45deg); border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.4); }
.map-num { width: 28px; height: 28px; border-radius: 50%; background: #111; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.4); }
.map-num.active { background: #fff; color: #18181b; border-color: #18181b; }

#toasts { position: fixed; left: 50%; top: 20px; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; }
.toast { background: rgba(20,22,28,.95); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 14px; border: 1px solid var(--glass-border); transition: opacity .3s, transform .3s; }
.toast.out { opacity: 0; transform: translateY(-6px); }
.toast-err { border-color: #ef4444; }

@media (max-width: 640px) {
  .top { top: calc(10px + var(--safe-t)); left: 10px; padding: 6px 12px 6px 8px; gap: 8px; max-width: calc(100vw - 76px); }
  .brand { height: 34px; }
  .titles { padding-left: 8px; }
  .tour-title { font-size: 14px; }
  .scene-title { font-size: 12px; }
  .actions { top: calc(10px + var(--safe-t)); right: 10px; gap: 6px; }
  .icon-btn { width: 42px; height: 42px; }
  .bottom { left: 10px; right: 10px; bottom: calc(10px + var(--safe-b)); }
  .thumb { width: 104px; }
  .thumb img { height: 60px; }
  .cta { height: 44px; padding: 0 16px; font-size: 14px; }
  .drawer { top: auto; left: 0; width: 100%; max-height: 80vh; border-left: 0; border-top: 1px solid var(--glass-border); border-radius: 20px 20px 0 0;
    transform: translateY(105%); padding-top: 26px; }
  .drawer.open { transform: none; }
  .modal { align-items: end; padding: 0; }
  .modal-card { border-radius: 20px 20px 0 0; width: 100%; }
  #map { height: 62vh; }
}
