:root {
  --bg: rgba(255,255,255,0.08);
  --stroke: rgba(255,255,255,0.14);
  --text: rgba(255,255,255,0.96);
  --muted: rgba(255,255,255,0.64);
  --shadow: 0 12px 36px rgba(0,0,0,0.22);
  --blur: 22px;
  --accent: #8dffb1;
  --accent2: #ffd36a;
  --danger: #ff8e8e;
}

* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: #000; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; color: var(--text); }
button { font: inherit; }
.no-js { min-height: 100vh; display: grid; place-items: center; background: #05060a; color: white; padding: 24px; text-align: center; }

.app-root {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(900px 500px at 50% 120%, rgba(255,255,255,0.08), rgba(255,255,255,0.00) 60%),
    radial-gradient(800px 600px at 10% 0%, rgba(82,120,255,0.22), rgba(82,120,255,0.00) 60%),
    radial-gradient(900px 600px at 90% 0%, rgba(255,120,200,0.20), rgba(255,120,200,0.00) 60%),
    linear-gradient(180deg, #05060a 0%, #020308 100%);
}
.app-root.light-scene {
  --text: rgba(10,16,32,0.96);
  --muted: rgba(10,16,32,0.62);
  --stroke: rgba(0,0,0,0.13);
  background: radial-gradient(900px 500px at 50% 120%, rgba(0,0,0,0.05), rgba(255,255,255,0) 60%), linear-gradient(180deg, #f5f7fb, #e8eef8);
}
.xr-root { position: absolute; inset: 0; z-index: 1; touch-action: none; }
.xr-root canvas { display: block; width: 100% !important; height: 100% !important; outline: none; }

.glass {
  backdrop-filter: blur(var(--blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(140%);
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.07));
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
}
.shell { position: fixed; inset: 0; z-index: 5; pointer-events: none; display: flex; flex-direction: column; justify-content: space-between; }
.topbar { position: relative; width: 100%; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; pointer-events: auto; flex-shrink: 0; border-bottom: 1px solid var(--stroke); }
.brand-block { flex: 1; min-width: 0; overflow: hidden; }
.brand-dot { width: 14px; height: 14px; border-radius: 999px; background: rgba(255,255,255,0.96); box-shadow: 0 0 0 6px rgba(255,255,255,0.08); display: inline-block; vertical-align: middle; margin-right: 8px; }
.brand-title { font-size: 15px; line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: 11px; line-height: 1.2; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0.75; }
.topbar-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.status-pill { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 999px; font-size: 12px; color: var(--muted); background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.10); }
.status-button { cursor: pointer; color: var(--text); pointer-events: auto; }
.status-indicator { width: 8px; height: 8px; border-radius: 999px; background: rgba(255,255,255,0.38); }
.status-indicator.ready { background: var(--accent); }
.status-indicator.busy  { background: var(--accent2); }
.status-indicator.error { background: var(--danger); }
.middle-zone { flex: 1; position: relative; overflow: hidden; pointer-events: none; }

.control-dock { position: relative; width: 100%; padding: 10px 12px; padding-bottom: max(env(safe-area-inset-bottom, 10px), 10px); display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 8px; pointer-events: auto; flex-shrink: 0; border-top: 1px solid var(--stroke); }
.btn { appearance: none; border: none; border-radius: 20px; min-height: 58px; padding: 12px 16px; color: var(--text); background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.08)); border: 1px solid rgba(255,255,255,0.12); box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 10px 30px rgba(0,0,0,0.18); cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; text-align: left; gap: 2px; transition: transform 0.18s ease, background 0.18s ease, opacity 0.18s ease; touch-action: manipulation; }
.btn:hover { transform: translateY(-1px); background: linear-gradient(180deg, rgba(255,255,255,0.17), rgba(255,255,255,0.10)); }
.btn:disabled { opacity: 0.42; cursor: not-allowed; transform: none; }
.btn-title { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; }
.btn-sub { font-size: 11px; line-height: 1.2; opacity: 0.72; }
.btn-more-toggle { display: none; }

.hint-card { position: absolute; right: 16px; bottom: 120px; width: 260px; padding: 14px 14px 13px; border-radius: 20px; pointer-events: auto; z-index: 12; }
.hint-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 8px; font-weight: 700; }
.hint-text { font-size: 13px; line-height: 1.45; color: var(--text); }
.round-close, .modal-close { position: absolute; top: 10px; right: 10px; background: rgba(255,255,255,0.12); border: none; color: var(--text); font-size: 16px; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; pointer-events: auto; }

.center-loader { position: absolute; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; pointer-events: none; transition: opacity 0.35s ease, visibility 0.35s ease; border: 0; }
.center-loader.hidden { opacity: 0; visibility: hidden; }
.loader-card { width: min(420px, calc(100vw - 40px)); border-radius: 28px; padding: 22px; text-align: center; }
.loader-orb, .splash-orb { width: 58px; height: 58px; margin: 0 auto 14px; border-radius: 999px; background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.95), rgba(255,255,255,0.10) 38%, rgba(255,255,255,0.06) 55%, rgba(255,255,255,0.00) 72%); box-shadow: 0 0 40px rgba(255,255,255,0.16), inset 0 1px 10px rgba(255,255,255,0.25); animation: pulse 2.2s infinite ease-in-out; }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 0.95; } 50% { transform: scale(1.08); opacity: 1; } }
.loader-title { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.loader-text { font-size: 13px; line-height: 1.5; color: var(--muted); margin-bottom: 10px; }
.loader-progress { width: 100%; height: 6px; border-radius: 999px; background: rgba(255,255,255,0.12); overflow: hidden; }
.loader-progress-inner { width: 0%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width 0.2s ease; }

.splash { position: absolute; inset: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(180deg, #05060a 0%, #0a0c18 100%); transition: opacity 0.7s ease, visibility 0.7s ease; text-align: center; padding: 24px; }
.splash.fade-out { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-orb { width: 72px; height: 72px; margin-bottom: 22px; }
.splash-title { font-size: clamp(24px, 4vw, 36px); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 8px; }
.splash-sub { font-size: 14px; color: var(--muted); line-height: 1.5; }

.progress-bar-wrap { position: absolute; top: 88px; left: 50%; transform: translateX(-50%); width: min(500px, calc(100vw - 40px)); z-index: 10; pointer-events: none; }
.progress-bar-label { font-size: 12px; color: rgba(255,255,255,0.65); text-align: center; margin-bottom: 5px; }
.progress-bar-track { height: 5px; border-radius: 999px; background: rgba(255,255,255,0.12); overflow: hidden; }
.progress-bar-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width 0.4s ease; width: 0%; }

.hotspot-card, .tour-overlay, .fav-panel { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); width: min(380px, calc(100vw - 40px)); padding: 18px; border-radius: 24px; pointer-events: auto; z-index: 30; display: none; }
.hotspot-card.open, .tour-overlay.active, .fav-panel.open { display: block; }
.hotspot-card-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 8px; font-weight: 700; }
.hotspot-card-img { width: 100%; border-radius: 14px; max-height: 180px; object-fit: cover; margin-bottom: 10px; display: none; }
.hotspot-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.hotspot-type-pill { flex: 0 0 auto; font-size: 11px; padding: 4px 8px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.22); color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.hotspot-card-title { font-size: 20px; line-height: 1.12; font-weight: 800; letter-spacing: -0.02em; }
.hotspot-card-text, .tour-text { font-size: 14px; line-height: 1.5; color: var(--text); opacity: 0.92; margin-bottom: 10px; }
.hotspot-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.hotspot-actions.secondary { margin-top: 8px; }
.small-action { appearance: none; border: 1px solid rgba(255,255,255,0.12); border-radius: 16px; padding: 10px 12px; background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.10)); color: var(--text); font-weight: 700; cursor: pointer; }
.small-action.primary { background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,255,255,0.88)); color: #0b0b0d; }
.small-action.favorite { background: rgba(255,200,50,0.22); color: #ffd36a; }
.small-action.danger { background: rgba(255,80,80,0.18); color: #ffaaaa; border-color: rgba(255,80,80,0.35); }
.small-action.wide { width: 100%; justify-content: center; }
.hotspot-deep-text { display: none; font-size: 13px; line-height: 1.5; color: var(--muted); margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.12); }

.exhibit-panel { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 10px; padding: 10px; border-radius: 24px; z-index: 20; pointer-events: auto; }
.exhibit-btn { width: 74px; height: 74px; border-radius: 20px; border: 2px solid transparent; background: rgba(255,255,255,0.07); color: var(--text); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; transition: border-color 0.25s ease, background 0.25s ease, transform 0.18s ease; }
.exhibit-btn:hover { transform: scale(1.05); background: rgba(255,255,255,0.14); }
.exhibit-btn.active { border-color: rgba(255,255,255,0.72); background: rgba(255,255,255,0.18); }
.exhibit-btn-icon { font-size: 24px; line-height: 1; }
.exhibit-btn-label { font-size: 10px; opacity: 0.85; text-align: center; line-height: 1.2; }

.help-fab { position: absolute; bottom: 110px; left: 16px; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--stroke); backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur)); background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.10)); box-shadow: var(--shadow); color: var(--text); font-size: 22px; cursor: pointer; z-index: 20; display: flex; align-items: center; justify-content: center; pointer-events: auto; }
.modal-bg { position: absolute; inset: 0; z-index: 100; background: rgba(0,0,0,0.65); display: none; align-items: center; justify-content: center; pointer-events: auto; padding: 20px; }
.modal-bg.open { display: flex; }
.help-modal { width: min(440px, 100%); padding: 28px 24px 24px; border-radius: 28px; position: relative; }
.help-modal h2 { font-size: 20px; font-weight: 800; margin: 0 0 14px; }
.help-modal p { font-size: 13px; line-height: 1.6; color: var(--muted); margin: 0 0 10px; }
.help-modal strong { color: var(--text); }
.help-modal code { color: var(--accent2); }
.qr-box { margin: 0 auto 16px; width: 168px; height: 168px; background: #fff; border-radius: 16px; display: grid; place-items: center; overflow: hidden; }
.qr-box img { width: 160px; height: 160px; }

.fav-panel { max-height: 70vh; overflow: auto; }
.panel-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.panel-actions { display: flex; gap: 8px; }
.fav-list { display: flex; flex-direction: column; gap: 8px; }
.fav-item { border: 1px solid rgba(255,255,255,0.12); border-radius: 14px; padding: 10px; background: rgba(255,255,255,0.07); }
.fav-item-title { font-weight: 800; margin-bottom: 4px; }
.fav-item-text { color: var(--muted); font-size: 12px; line-height: 1.4; }

.camera-overlay { position: fixed; inset: 0; z-index: 150; display: none; flex-direction: column; background: #000; pointer-events: auto; }
.camera-overlay.open { display: flex; }
.camera-video, .camera-canvas-over { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.camera-canvas-over { opacity: 0.88; pointer-events: none; }
.camera-controls { position: absolute; bottom: 32px; left: 0; right: 0; display: flex; justify-content: center; align-items: center; gap: 24px; }
.cam-shutter { width: 72px; height: 72px; border-radius: 50%; background: rgba(255,255,255,0.92); border: 4px solid #fff; cursor: pointer; box-shadow: 0 0 0 6px rgba(255,255,255,0.25); }
.cam-record { width: 52px; height: 52px; border-radius: 50%; background: rgba(255,60,60,0.85); border: 3px solid rgba(255,80,80,0.6); cursor: pointer; font-size: 22px; display: flex; align-items: center; justify-content: center; color: #fff; }
.cam-record.recording { background: rgba(200,0,0,0.95); animation: pulse 1s infinite; }
.cam-close { position: absolute; top: 20px; right: 20px; width: 44px; height: 44px; border-radius: 50%; background: rgba(0,0,0,0.55); border: 1px solid rgba(255,255,255,0.3); color: #fff; font-size: 20px; cursor: pointer; }
.ios-install-toast { position: absolute; bottom: 110px; left: 50%; transform: translateX(-50%); width: min(340px, calc(100vw - 40px)); background: rgba(20,20,30,0.92); border: 1px solid rgba(255,255,255,0.18); border-radius: 20px; padding: 16px 18px; font-size: 13px; line-height: 1.5; color: rgba(255,255,255,0.9); z-index: 50; display: none; pointer-events: auto; backdrop-filter: blur(20px); }
.ios-install-toast strong { color: var(--accent); }
.ios-install-toast-close { position: absolute; top: 10px; right: 12px; background: none; border: none; color: rgba(255,255,255,0.5); font-size: 18px; cursor: pointer; }
.tour-title { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.tour-counter { font-size: 12px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.1em; }
.model-spinner-overlay { position: absolute; inset: 0; z-index: 25; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.model-spinner-orb { width: 42px; height: 42px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.3); border-top-color: var(--accent2); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.ar-button { position: absolute !important; bottom: 120px !important; left: 50% !important; transform: translateX(-50%) !important; z-index: 40 !important; padding: 11px 26px !important; border-radius: 999px !important; border: 1px solid rgba(255,255,255,0.8) !important; background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.95), rgba(0,0,0,0.65)) !important; backdrop-filter: blur(22px) !important; box-shadow: 0 14px 40px rgba(0,0,0,0.45), 0 0 22px rgba(255,255,255,0.15) !important; color: #fff !important; font: 700 14px system-ui !important; letter-spacing: 0.03em; cursor: pointer !important; animation: arPulse 2s infinite ease-in-out; }
.ar-button[disabled] { opacity: .55; animation: none; cursor: not-allowed !important; }
@keyframes arPulse { 0%,100% { transform: translateX(-50%) scale(1); } 50% { transform: translateX(-50%) scale(1.06); } }

@media (max-width: 900px) {
  .control-dock { grid-template-columns: repeat(5, 1fr); }
  .btn { padding: 10px 9px; }
}
@media (max-width: 768px) {
  .topbar { padding: 8px 12px; }
  .brand-title { font-size: 13px; }
  .status-pill { display: none; }
  .topbar-right .status-button { display: inline-flex; }
  .exhibit-panel { top: 0; left: 50%; right: auto; transform: translateX(-50%); flex-direction: row; overflow-x: auto; max-width: calc(100vw - 24px); scrollbar-width: none; padding: 6px; gap: 6px; white-space: nowrap; }
  .exhibit-panel::-webkit-scrollbar { display: none; }
  .exhibit-btn { width: 58px; height: 58px; border-radius: 14px; flex-shrink: 0; }
  .exhibit-btn-icon { font-size: 20px; }
  .progress-bar-wrap { top: 76px; }
  .hint-card { right: 10px; left: auto; bottom: 78px; width: calc(100vw - 20px); max-height: 110px; overflow: hidden; }
  .hotspot-card, .tour-overlay, .fav-panel { left: 10px; width: calc(100vw - 20px); max-height: 58vh; top: 50%; transform: translateY(-50%); overflow: auto; }
  .control-dock { grid-template-columns: repeat(4, 1fr); gap: 5px; padding: 7px 8px; padding-bottom: max(env(safe-area-inset-bottom, 7px), 7px); }
  .btn { min-height: 50px; padding: 6px 5px; border-radius: 12px; }
  .btn-title { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .btn-sub { display: none; }
  #shareBtn, #lightBtn, #tourBtn, #installBtn, #cameraBtn, #favBtn, #soundBtn { display: none; }
  .dock-expanded #shareBtn, .dock-expanded #lightBtn, .dock-expanded #tourBtn, .dock-expanded #installBtn, .dock-expanded #cameraBtn, .dock-expanded #favBtn, .dock-expanded #soundBtn { display: flex; }
  .btn-more-toggle { display: flex; }
  .help-fab { bottom: 70px; }
  .ar-button { bottom: 82px !important; }
}
@media (max-width: 420px) {
  .control-dock { grid-template-columns: repeat(3, 1fr); }
  .splash-title { font-size: 22px; }
}


/* === 2027 visual/passability patch: readable light mode, grounded model, Meta Quest UI preservation === */
.app-root.light-scene {
  --text: rgba(9,15,29,0.98);
  --muted: rgba(36,49,72,0.74);
  --stroke: rgba(15,23,42,0.18);
  --shadow: 0 16px 48px rgba(15,23,42,0.13);
  color: var(--text);
  background:
    radial-gradient(900px 500px at 50% 120%, rgba(49,101,255,0.08), rgba(255,255,255,0) 60%),
    radial-gradient(700px 450px at 90% 0%, rgba(124,58,237,0.08), rgba(255,255,255,0) 60%),
    linear-gradient(180deg, #f8fbff 0%, #eaf1fb 100%) !important;
}
.app-root.light-scene .glass,
.app-root.light-scene .topbar,
.app-root.light-scene .control-dock,
.app-root.light-scene .hint-card,
.app-root.light-scene .hotspot-card,
.app-root.light-scene .tour-overlay,
.app-root.light-scene .fav-panel,
.app-root.light-scene .help-modal,
.app-root.light-scene .exhibit-panel {
  background: linear-gradient(180deg, rgba(255,255,255,.86), rgba(244,248,255,.72)) !important;
  border-color: rgba(15,23,42,.16) !important;
  color: #0f172a !important;
  box-shadow: 0 18px 54px rgba(15,23,42,.13) !important;
}
.app-root.light-scene .brand-title,
.app-root.light-scene .hotspot-card-title,
.app-root.light-scene .tour-title,
.app-root.light-scene .help-modal h2,
.app-root.light-scene .btn-title { color: #0f172a !important; }
.app-root.light-scene .brand-sub,
.app-root.light-scene .hint-label,
.app-root.light-scene .hotspot-card-label,
.app-root.light-scene .hotspot-card-text,
.app-root.light-scene .tour-text,
.app-root.light-scene .help-modal p,
.app-root.light-scene .btn-sub,
.app-root.light-scene .progress-bar-label,
.app-root.light-scene .status-pill { color: #334155 !important; }
.app-root.light-scene .btn,
.app-root.light-scene .small-action,
.app-root.light-scene .exhibit-btn,
.app-root.light-scene .status-pill,
.app-root.light-scene .round-close,
.app-root.light-scene .modal-close {
  background: rgba(255,255,255,.76) !important;
  border-color: rgba(15,23,42,.14) !important;
  color: #0f172a !important;
  box-shadow: 0 8px 22px rgba(15,23,42,.09) !important;
}
.app-root.light-scene .btn:hover,
.app-root.light-scene .exhibit-btn:hover,
.app-root.light-scene .small-action:hover { background: #ffffff !important; }
.app-root.light-scene .small-action.primary {
  background: linear-gradient(135deg, #2563eb, #7c3aed) !important;
  color: #fff !important;
}
.app-root.light-scene .small-action.favorite { background: rgba(245,158,11,.14) !important; color: #92400e !important; }
.app-root.light-scene .small-action.danger { background: rgba(239,68,68,.12) !important; color: #991b1b !important; }
.app-root.light-scene .hotspot-type-pill { color:#334155 !important; border-color:rgba(15,23,42,.16) !important; }
.app-root.light-scene .progress-bar-track { background: rgba(15,23,42,.13) !important; }
.app-root.light-scene .brand-dot { background:#2563eb; box-shadow:0 0 0 6px rgba(37,99,235,.10); }
.app-root.light-scene .ar-button {
  background: linear-gradient(135deg, #2563eb, #7c3aed) !important;
  color: #fff !important;
  border-color: rgba(255,255,255,.75) !important;
  box-shadow: 0 14px 38px rgba(37,99,235,.24) !important;
}
.hint-card { right: 18px; max-width: calc(100vw - 36px); }
@media (min-width: 769px) {
  .hint-card { width: min(300px, 22vw); }
}

/* === COMMERCIAL UPGRADE PACK: scenarios, completion, Quest mode, quality profiles === */
.scenario-panel {
  position: absolute;
  left: 20px;
  bottom: 110px;
  width: min(390px, calc(100vw - 40px));
  max-height: 70vh;
  overflow: auto;
  padding: 16px;
  border-radius: 24px;
  z-index: 32;
  pointer-events: auto;
  display: none;
}
.scenario-panel.open { display: block; }
.panel-subtitle { font-size: 12px; line-height: 1.35; color: var(--muted); margin-top: 4px; }
.scenario-options { display: grid; gap: 8px; margin-top: 12px; }
.scenario-option {
  width: 100%;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  background: rgba(255,255,255,.07);
  color: var(--text);
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
}
.scenario-option:hover { background: rgba(255,255,255,.13); }
.scenario-option.active {
  border-color: rgba(141,255,177,.62);
  background: linear-gradient(135deg, rgba(141,255,177,.20), rgba(255,211,106,.10));
}
.scenario-icon { font-size: 26px; display: grid; place-items: center; }
.scenario-option b { display: block; font-size: 14px; margin-bottom: 3px; }
.scenario-option small { display: block; color: var(--muted); font-size: 11px; line-height: 1.35; }
.complete-modal { text-align: center; }
.complete-badge {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  background: linear-gradient(135deg, #8dffb1, #ffd36a);
  color: #07120b;
  font-size: 30px;
  font-weight: 900;
  box-shadow: 0 18px 50px rgba(141,255,177,.22);
}
.complete-actions { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 16px; }
.app-root.light-scene .scenario-panel,
.app-root.light-scene .scenario-option,
.app-root.light-scene .complete-modal {
  background: rgba(255,255,255,.90) !important;
  color: #0f172a !important;
  border-color: rgba(15,23,42,.16) !important;
}
.app-root.light-scene .scenario-option small,
.app-root.light-scene .panel-subtitle { color: #475569 !important; }
.app-root.light-scene .scenario-option.active {
  border-color: rgba(37,99,235,.44) !important;
  background: linear-gradient(135deg, rgba(37,99,235,.12), rgba(124,58,237,.08)) !important;
}
/* Meta Quest / headset-friendly mode */
.quest-mode .btn { min-height: 72px; border-radius: 24px; }
.quest-mode .btn-title { font-size: 16px; }
.quest-mode .btn-sub { font-size: 12px; }
.quest-mode .hotspot-card,
.quest-mode .tour-overlay,
.quest-mode .hint-card,
.quest-mode .scenario-panel { font-size: 1.08em; }
.quest-mode .exhibit-btn { width: 86px; height: 86px; }
.quest-mode .exhibit-btn-icon { font-size: 30px; }
.quest-mode .small-action { min-height: 42px; padding-left: 15px; padding-right: 15px; }
.quest-mode .ar-button { padding: 14px 34px !important; font-size: 16px !important; }
.quest-mode .progress-bar-wrap { width: min(650px, calc(100vw - 80px)); }
/* stronger readable light mode */
.app-root.light-scene .modal-bg { background: rgba(226,232,240,.72); }
.app-root.light-scene .qr-box { background: #fff !important; }
.app-root.light-scene .ios-install-toast { background: rgba(255,255,255,.94); color: #0f172a; border-color: rgba(15,23,42,.14); }
.app-root.light-scene .ios-install-toast strong { color: #1d4ed8; }
@media (max-width: 768px) {
  #scenarioBtn, #qualityBtn { display: none; }
  .dock-expanded #scenarioBtn, .dock-expanded #qualityBtn { display: flex; }
  .scenario-panel { left: 10px; bottom: 74px; width: calc(100vw - 20px); max-height: 58vh; }
  .scenario-option { grid-template-columns: 34px 1fr; padding: 8px 10px; }
  .scenario-icon { font-size: 22px; }
}


/* === XR ADMIN PRO UPGRADE: admin, anchors, hands, night scene, route/certificate, collection QR === */
.btn.active-feature {
  border-color: rgba(141,255,177,.62) !important;
  background: linear-gradient(135deg, rgba(141,255,177,.20), rgba(96,165,250,.12)) !important;
}
.admin-modal { width: min(820px, calc(100vw - 34px)); max-height: 86vh; overflow:auto; }
.admin-note { font-size: 12px; line-height: 1.55; color: var(--muted); margin-bottom: 12px; }
.admin-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.admin-grid label { display:flex; flex-direction:column; gap:5px; font-size:11px; color:var(--muted); font-weight:700; }
.admin-grid input,.admin-grid select,.admin-json {
  width:100%; border:1px solid rgba(255,255,255,.14); border-radius:14px; background:rgba(255,255,255,.08); color:var(--text); padding:10px 12px; font:13px system-ui,sans-serif; outline:none;
}
.admin-json { min-height:240px; margin-top:12px; font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; line-height:1.45; resize:vertical; }
.admin-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.route-list { display:grid; gap:10px; margin:14px 0; text-align:left; }
.route-item { padding:10px 12px; border:1px solid rgba(255,255,255,.12); border-radius:16px; background:rgba(255,255,255,.07); }
.route-item b { display:inline-flex; max-width:70%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.route-item span { float:right; color:var(--muted); font-weight:700; }
.route-track { height:6px; border-radius:999px; background:rgba(255,255,255,.12); overflow:hidden; clear:both; margin-top:8px; }
.route-track i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#8dffb1,#ffd36a); }
.collection-link { display:inline-flex; margin:4px 0 14px; color:#8dffb1; font-weight:800; text-decoration:none; border-bottom:1px dashed currentColor; }
.collection-qr { width:188px; height:188px; }
.collection-qr img { width:180px; height:180px; }
.app-root.night-kuren-scene {
  background:
    radial-gradient(circle at 50% 72%, rgba(255,136,48,.13), transparent 22%),
    radial-gradient(circle at 12% 0%, rgba(58,102,190,.18), transparent 34%),
    radial-gradient(circle at 92% 8%, rgba(124,58,237,.13), transparent 32%),
    linear-gradient(180deg,#02040a 0%,#050816 58%,#080b14 100%) !important;
}
.app-root.night-kuren-scene .topbar,
.app-root.night-kuren-scene .control-dock,
.app-root.night-kuren-scene .glass {
  border-color: rgba(255,180,92,.16);
  background: linear-gradient(180deg, rgba(12,18,34,.78), rgba(6,10,20,.56));
}
.app-root.night-kuren-scene .progress-bar-fill { background:linear-gradient(90deg,#ffb35c,#ffd36a); }
.app-root.light-scene .admin-modal,
.app-root.light-scene .route-modal,
.app-root.light-scene .collection-modal,
.app-root.light-scene .route-item,
.app-root.light-scene .admin-grid input,
.app-root.light-scene .admin-grid select,
.app-root.light-scene .admin-json {
  background: rgba(255,255,255,.94) !important;
  color: #0f172a !important;
  border-color: rgba(15,23,42,.16) !important;
}
.app-root.light-scene .admin-note,
.app-root.light-scene .admin-grid label,
.app-root.light-scene .route-item span { color:#475569 !important; }
@media (max-width: 768px) {
  #anchorBtn,#handBtn,#nightBtn,#routeBtn,#collectionBtn,#adminBtn { display:none; }
  .dock-expanded #anchorBtn,.dock-expanded #handBtn,.dock-expanded #nightBtn,.dock-expanded #routeBtn,.dock-expanded #collectionBtn,.dock-expanded #adminBtn { display:flex; }
  .admin-grid { grid-template-columns:1fr; }
  .admin-modal { width:calc(100vw - 20px); }
}

/* === SECURE ADMIN + CLEAN DOCK PATCH === */
/* Hidden attribute must beat author display rules; fixes permanent center spinner overlay. */
[hidden], .model-spinner-overlay[hidden] { display: none !important; }
.model-spinner-overlay { pointer-events: none !important; }

/* Static non-pulsing hotspots: no distracting rotating/loading circle over the exhibit. */
.hotspot-static-note { display:none; }

/* Keep only frequent actions visible. Everything else goes under ⋯ Ещё. */
.control-dock {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}
#shareBtn,
#lightBtn,
#scenarioBtn,
#qualityBtn,
#anchorBtn,
#handBtn,
#nightBtn,
#routeBtn,
#collectionBtn,
#installBtn,
#cameraBtn,
#favBtn,
#soundBtn {
  display: none !important;
}
.dock-expanded #shareBtn,
.dock-expanded #lightBtn,
.dock-expanded #scenarioBtn,
.dock-expanded #qualityBtn,
.dock-expanded #anchorBtn,
.dock-expanded #handBtn,
.dock-expanded #nightBtn,
.dock-expanded #routeBtn,
.dock-expanded #collectionBtn,
.dock-expanded #installBtn,
.dock-expanded #cameraBtn,
.dock-expanded #favBtn,
.dock-expanded #soundBtn {
  display: flex !important;
}
.btn-more-toggle { display:flex !important; }
.dock-expanded { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }

@media (max-width: 768px) {
  .control-dock { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .dock-expanded { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
