/* Ziyaretçi arayüzü */
body { overflow: hidden; }
#pano { position: fixed; inset: 0; }

.v-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20; pointer-events: none;
  display: flex; align-items: flex-start; gap: 16px; padding: 16px 16px 0;
  padding-top: max(16px, env(safe-area-inset-top));
}
.v-top > * { pointer-events: auto; }
.v-brand {
  background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; min-width: 0; max-width: 300px;
}
.v-title { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-loc { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-loc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(59,130,246,.3); flex: none; }

.v-search { position: relative; flex: 1; max-width: 520px; margin: 0 auto; }
.v-search-ico { position: absolute; z-index: 2; left: 16px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.v-search input {
  width: 100%; height: 50px; border-radius: 999px; border: 1px solid var(--line); outline: none;
  padding: 0 18px 0 46px; font-size: 16px; color: var(--text);
  background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 30px rgba(0,0,0,.25); transition: border-color .2s, background .2s;
}
.v-search input:focus { border-color: var(--accent); background: var(--glass-strong); }
.v-search input::placeholder { color: #8a93a2; }
.v-results {
  position: absolute; top: 58px; left: 0; right: 0; max-height: min(60vh, 520px); overflow: auto;
  background: var(--glass-strong); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; box-shadow: 0 16px 40px rgba(0,0,0,.45);
}
.v-res-group { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px 10px 4px; }
.v-res {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; background: none;
  padding: 9px 10px; border-radius: 10px; cursor: pointer;
}
.v-res:hover, .v-res.active { background: rgba(255,255,255,.08); }
.v-res-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: rgba(249,115,22,.18); color: var(--tag); }
.v-res-ico svg { width: 18px; height: 18px; }
.v-res-ico.scene { background: rgba(59,130,246,.18); color: var(--accent-2); }
.v-res-ico.scene img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.v-res-t { font-weight: 600; font-size: 15px; }
.v-res-s { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.v-res-floor { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; flex: none; }
.v-res-empty { padding: 18px; color: var(--muted); text-align: center; font-size: 14px; }
mark { background: rgba(249,115,22,.35); color: inherit; border-radius: 3px; padding: 0 1px; }

/* Katlar */
.v-floors {
  position: fixed; right: 16px; top: 50%; transform: translateY(-50%); z-index: 15;
  display: flex; flex-direction: column; gap: 6px; padding: 6px;
  background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: 18px;
}
.v-floor {
  width: 46px; height: 46px; border-radius: 12px; border: 1px solid transparent; background: rgba(255,255,255,.06);
  font-weight: 700; font-size: 16px; cursor: pointer; position: relative; transition: .2s;
}
.v-floor:hover { background: rgba(255,255,255,.14); }
.v-floor.active { background: var(--accent); border-color: rgba(255,255,255,.6); box-shadow: 0 0 0 4px rgba(59,130,246,.25); }
.v-floor.here::after { content: ""; position: absolute; left: -9px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: #fff; }
.v-floor.flash { animation: floorFlash .5s ease-in-out 3; }
@keyframes floorFlash { 50% { transform: scale(1.15); background: var(--tag); } }

.v-places {
  position: fixed; right: 84px; top: 50%; transform: translateY(-50%); z-index: 16; width: 300px; max-height: 70vh; overflow: auto;
  background: var(--glass-strong); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 8px;
}
.v-places h3 { margin: 6px 10px 8px; font-size: 15px; }

/* Harita */
.v-map {
  position: fixed; left: 16px; bottom: 16px; z-index: 15; width: 300px; height: 230px;
  margin-bottom: env(safe-area-inset-bottom);
  background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
  transition: width .3s, height .3s;
}
.v-map.big { width: min(640px, calc(100vw - 32px)); height: min(460px, calc(100vh - 140px)); }
.v-map.empty { display: none; }
.v-map-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 6px 12px; font-size: 13px; font-weight: 700; border-bottom: 1px solid var(--line); }
.v-map-body { flex: 1; min-height: 0; }
.v-icon-btn { width: 30px; height: 30px; border-radius: 8px; border: 0; background: rgba(255,255,255,.08); cursor: pointer; display: grid; place-items: center; }
.v-icon-btn svg { width: 16px; height: 16px; }
.v-icon-btn:hover { background: rgba(255,255,255,.16); }

/* Rehber */
.v-guide {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 25; width: min(520px, calc(100vw - 32px));
  display: flex; align-items: center; gap: 14px; padding: 14px 14px 14px 18px;
  background: var(--glass-strong); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 16px 40px rgba(0,0,0,.45);
  margin-bottom: env(safe-area-inset-bottom);
}
.v-guide-main { flex: 1; min-width: 0; }
.v-guide-title { font-weight: 700; font-size: 15px; }
.v-guide-step { color: var(--muted); font-size: 13px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-guide-bar { height: 4px; background: rgba(255,255,255,.12); border-radius: 4px; margin-top: 10px; overflow: hidden; }
.v-guide-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .6s ease; }

.v-btn { border: 0; border-radius: 10px; padding: 10px 14px; background: var(--accent); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; }
.v-btn:hover { filter: brightness(1.1); }
.v-btn.ghost { background: rgba(255,255,255,.1); }

/* Bilgi kartı */
.v-card {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 24; width: min(460px, calc(100vw - 32px));
  display: flex; gap: 14px; padding: 16px; animation: cardIn .35s ease;
  background: var(--glass-strong); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 16px 40px rgba(0,0,0,.45);
  margin-bottom: env(safe-area-inset-bottom);
}
@keyframes cardIn { from { opacity: 0; transform: translate(-50%, 20px); } }
.v-card-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--tag); display: grid; place-items: center; flex: none; }
.v-card-ico svg { width: 24px; height: 24px; color: #fff; }
.v-card-body { flex: 1; min-width: 0; }
.v-card-title { font-weight: 700; font-size: 17px; padding-right: 24px; }
.v-card-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.v-card-desc { font-size: 14px; line-height: 1.5; margin-top: 8px; white-space: pre-line; }
.v-card-desc:empty { display: none; }
.v-card-actions { margin-top: 12px; display: flex; gap: 8px; }
.v-card-x { position: absolute; top: 8px; right: 10px; border: 0; background: none; font-size: 24px; color: var(--muted); cursor: pointer; line-height: 1; }

.v-loading { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 30; pointer-events: none; }
.v-toast {
  position: fixed; top: 84px; left: 50%; transform: translateX(-50%); z-index: 40; padding: 10px 16px; border-radius: 999px;
  background: var(--glass-strong); border: 1px solid var(--line); font-size: 14px; box-shadow: 0 8px 30px rgba(0,0,0,.4);
}
.v-empty-state { position: fixed; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 24px; z-index: 5; }

/* Mobil */
@media (max-width: 720px) {
  .v-top { flex-direction: column; gap: 10px; padding-left: 12px; padding-right: 12px; }
  .v-brand { max-width: none; align-self: flex-start; padding: 8px 12px; }
  .v-search { width: 100%; max-width: none; }
  .v-search input { height: 46px; }
  .v-floors { right: 10px; top: auto; bottom: 16px; transform: none; }
  .v-floor { width: 42px; height: 42px; }
  .v-places { right: 12px; left: 12px; width: auto; top: auto; bottom: 16px; transform: none; max-height: 55vh; margin-right: 64px; }
  .v-map { left: 12px; bottom: 16px; width: calc(100vw - 92px); height: 170px; }
  .v-map.big { width: calc(100vw - 24px); height: 60vh; z-index: 18; }
  .v-guide, .v-card { bottom: 200px; }
  .v-toast { top: 140px; }
}

/* Yerleşke ve bina düğmeleri */
.v-floor svg { width: 21px; height: 21px; fill: currentColor; vertical-align: middle; }
.v-floor.campus { background: rgba(20,184,166,.22); }
.v-floor.campus.active { background: #0d9488; }
.v-floor.bld { font-size: 13px; background: rgba(255,255,255,.14); border: 1px dashed rgba(255,255,255,.35); }
