/* ==========================================================
   Védia – virtuális kiállítótér
   A tér fehér, a kezelőfelület a galéria éjlila tónusát viszi tovább.
   ========================================================== */

html, body.kt { height: 100%; overflow: hidden; }
body.kt { background: #ecebe7; overscroll-behavior: none; }

.kt-stage { position: fixed; inset: 0; touch-action: none; }
.kt-stage canvas { display: block; width: 100%; height: 100%; outline: none; }
.kt-stage.is-floor { cursor: pointer; }
.kt-stage.is-art { cursor: zoom-in; }
.kt-stage.is-drag { cursor: grabbing; }

/* ---------- üveges felületek ---------- */
.kt-top, .kt-bar, .kt-panel, .kt-drawer, .kt-hint {
  background: rgba(24, 18, 47, .86);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  color: var(--mist);
}

/* ---------- felső sáv ---------- */
.kt-top {
  position: fixed; z-index: 5;
  top: max(12px, env(safe-area-inset-top)); left: 12px; right: 12px;
  display: flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 6px 6px 6px 8px;
  border-radius: 18px;
}
.kt-back {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 14px 0 10px; border-radius: 12px;
  font: 600 15px/1 var(--text); text-decoration: none; color: var(--mist);
}
.kt-back:hover { background: rgba(220, 216, 232, .1); }
.kt-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; text-align: center; }
.kt-title strong { font: 500 16px/1.2 var(--display); letter-spacing: .02em; }
.kt-title span { font-size: 13px; color: var(--mist-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kt-icon, .kt-nav, .kt-close {
  flex: none; display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 12px;
  border: 0; background: transparent; color: var(--mist); cursor: pointer;
}
.kt-icon:hover, .kt-nav:hover, .kt-close:hover { background: rgba(220, 216, 232, .12); }

/* ---------- alsó sáv ---------- */
.kt-bar {
  position: fixed; z-index: 5;
  bottom: max(14px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 4px;
  padding: 6px; border-radius: 999px;
}
.kt-nav { border-radius: 999px; width: 48px; height: 48px; }
.kt-nav:active { transform: scale(.94); }
.kt-count { min-width: 150px; text-align: center; font: 500 14px/1.2 var(--text); font-variant-numeric: tabular-nums; }

/* ---------- tipp ---------- */
.kt-hint {
  position: fixed; z-index: 4; left: 50%; transform: translateX(-50%);
  bottom: calc(max(14px, env(safe-area-inset-bottom)) + 74px);
  margin: 0; padding: 10px 16px; border-radius: 999px;
  font-size: 14px; text-align: center; width: max-content; max-width: calc(100vw - 32px);
  transition: opacity .5s ease;
}
.kt-hint.is-gone { opacity: 0; pointer-events: none; }

/* ---------- adatlap ---------- */
.kt-panel {
  position: fixed; z-index: 6;
  top: 84px; right: 12px; width: min(360px, calc(100vw - 24px));
  max-height: calc(100dvh - 180px); overflow: auto;
  padding: 22px 22px 20px; border-radius: 20px;
  border-top: 4px solid var(--coral);
  animation: kt-in .25s ease;
}
.kt-panel .kt-close { position: absolute; top: 10px; right: 10px; }
.kt-phead { display: flex; align-items: center; gap: 4px; margin: -8px 0 8px -10px; }
.kt-pnav { width: 40px; height: 40px; }
.kt-eyebrow { font: 600 12px/1 var(--text); letter-spacing: .12em; text-transform: uppercase; color: var(--amber); font-variant-numeric: tabular-nums; min-width: 64px; text-align: center; }
.kt-panel h2 { font-size: 22px; padding-right: 36px; margin-bottom: 16px; }
.kt-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin: 0 0 16px; }
.kt-meta dt { font-size: 12px; color: var(--mist-dim); }
.kt-meta dd { margin: 2px 0 0; font-weight: 600; font-size: 15px; }
.kt-desc { font-size: 15px; color: var(--mist); margin-bottom: 18px; }
.kt-actions { display: grid; gap: 10px; }
.kt-tag { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 99px; background: rgba(240, 154, 59, .18); color: var(--amber); font-size: 11px; letter-spacing: .04em; vertical-align: 2px; }

@keyframes kt-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- lista ---------- */
.kt-drawer {
  position: fixed; z-index: 7; top: 0; right: 0; bottom: 0;
  width: min(380px, 100vw);
  display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top);
  animation: kt-slide .25s ease;
}
@keyframes kt-slide { from { transform: translateX(24px); opacity: 0; } }
.kt-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 10px 10px 20px; }
.kt-drawer-head h2 { font-size: 18px; }
.kt-list { list-style: none; margin: 0; padding: 0 10px 24px; overflow: auto; flex: 1; }
.kt-list button {
  width: 100%; display: flex; align-items: center; gap: 14px;
  padding: 8px 10px; border: 0; border-radius: 12px; background: transparent;
  color: var(--mist); font: inherit; text-align: left; cursor: pointer;
}
.kt-list button:hover, .kt-list button[aria-current="true"] { background: rgba(220, 216, 232, .1); }
.kt-list img, .kt-list canvas { flex: none; width: 52px; height: 52px; object-fit: cover; border-radius: 6px; background: #2a2250; }
.kt-list b { display: block; font-weight: 600; font-size: 15px; line-height: 1.3; }
.kt-list small { color: var(--mist-dim); font-size: 13px; }
.kt-list .n { flex: none; width: 22px; color: var(--mist-dim); font-size: 13px; font-variant-numeric: tabular-nums; }

/* ---------- betöltés ---------- */
.kt-loader {
  position: fixed; inset: 0; z-index: 10;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  padding: 24px; text-align: center;
  background: radial-gradient(circle at 70% 30%, var(--violet) 0, var(--night) 60%);
  transition: opacity .6s ease;
}
.kt-loader .dots { width: 170px; }
.kt-loader h1 { font-size: clamp(26px, 6vw, 44px); }
.kt-loader p { color: var(--mist-dim); max-width: 34ch; }
.kt-loader.is-done { opacity: 0; pointer-events: none; }
.kt-progress { width: min(260px, 70vw); height: 4px; border-radius: 4px; background: rgba(220, 216, 232, .16); overflow: hidden; }
.kt-progress span { display: block; height: 100%; width: 0; background: var(--amber); transition: width .2s ease; }
.kt-loader .btn[disabled] { opacity: .45; cursor: progress; }
.kt-nogl a { color: var(--amber); }

/* ---------- telefon ---------- */
@media (max-width: 640px) {
  .kt-title span { font-size: 12px; }
  .kt-back span { display: none; }
  .kt-back { padding: 0 10px; }
  .kt-panel {
    top: auto; right: 0; left: 0; bottom: 0; width: auto;
    max-height: 62dvh; border-radius: 22px 22px 0 0;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }
  .kt-panel { padding: 18px 18px max(16px, env(safe-area-inset-bottom)); }
  .kt-panel h2 { font-size: 20px; margin-bottom: 12px; }
  .kt-meta { grid-template-columns: 1fr 1fr; gap: 8px 14px; margin-bottom: 12px; }
  .kt-meta dd { font-size: 14px; }
  .kt-desc { font-size: 14px; margin-bottom: 14px; }
  .kt-actions { gap: 8px; }
  body.has-panel .kt-bar, body.has-panel .kt-hint { display: none; }
  .kt-hint { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .kt-panel, .kt-drawer { animation: none; }
  .kt-loader, .kt-hint { transition: none; }
}
