* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--tb-bg); color: var(--tb-text); font-family: var(--tb-font); }
#tb-app { position: fixed; inset: 0; }
#tb-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

#tb-loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: var(--tb-bg); z-index: 40; transition: opacity 0.6s ease; }
#tb-loading.tb-done { opacity: 0; pointer-events: none; }
.tb-loading-mark { font-size: 28px; font-weight: 700; letter-spacing: 0.08em; }
.tb-loading-mark::after { content: "."; color: var(--tb-accent); }
.tb-loading-bar { width: 220px; height: 3px; background: var(--tb-line); border-radius: 2px; overflow: hidden; }
.tb-loading-bar span { display: block; width: 40%; height: 100%; background: var(--tb-accent); border-radius: 2px; animation: tb-load-slide 1.2s ease-in-out infinite; box-shadow: 0 0 12px var(--tb-accent-glow); }
@keyframes tb-load-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(320%); } }

#tb-header { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 18px; padding: 12px 22px; z-index: 20; pointer-events: none; background: linear-gradient(180deg, rgba(11, 14, 19, 0.9), rgba(11, 14, 19, 0)); }
.tb-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: 0.08em; font-size: 17px; }
.tb-brand-logo { width: 30px; height: 30px; border-radius: 7px; }
.tb-accent { color: var(--tb-accent); }
.tb-title { flex: 1; font-size: 14px; color: var(--tb-text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-customer { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--tb-text-dim); }
.tb-customer img { max-height: 34px; max-width: 130px; border-radius: 4px; background: rgba(255, 255, 255, 0.92); padding: 3px 6px; }
.tb-loading-logo { width: 76px; height: 76px; border-radius: 16px; box-shadow: 0 0 40px var(--tb-accent-glow); }

#tb-nav { position: absolute; left: 0; top: 60px; bottom: 90px; display: flex; flex-direction: column; gap: 6px; padding: 12px; z-index: 20; overflow-y: auto; max-width: 230px; background: rgba(11, 14, 19, 0.88); backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px); border-right: 1px solid var(--tb-line); border-radius: 0 12px 12px 0; }
#tb-nav button { text-align: left; border: 1px solid transparent; border-left: 2px solid var(--tb-line); background: transparent; color: var(--tb-text-dim); font: inherit; font-size: 12px; padding: 7px 10px; cursor: pointer; border-radius: 0 6px 6px 0; transition: color 0.2s, border-color 0.2s, background 0.2s; }
#tb-nav button:hover { color: var(--tb-text); background: rgba(255, 122, 26, 0.07); }
#tb-nav button.tb-active { color: var(--tb-accent-soft); border-left-color: var(--tb-accent); background: rgba(255, 122, 26, 0.1); }

#tb-caption { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); max-width: min(720px, 88vw); padding: 12px 18px; background: rgba(18, 22, 31, 0.92); border: 1px solid var(--tb-line); border-left: 3px solid var(--tb-accent); border-radius: var(--tb-radius); font-size: 15px; line-height: 1.5; z-index: 20; opacity: 0; transition: opacity 0.35s ease; pointer-events: none; }
#tb-caption.tb-visible { opacity: 1; }

#tb-presenter-controls { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; gap: 10px; z-index: 25; }
.tb-btn { min-width: 44px; min-height: 44px; border: 1px solid var(--tb-line); border-radius: 50%; background: rgba(18, 22, 31, 0.92); color: var(--tb-text); font-size: 16px; cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s, color 0.2s; }
.tb-btn:hover { border-color: var(--tb-accent); color: var(--tb-accent-soft); box-shadow: 0 0 14px var(--tb-accent-glow); }
.tb-btn:disabled { opacity: 0.3; pointer-events: none; }
.tb-btn.tb-live { border-color: var(--tb-accent); color: var(--tb-accent); animation: tb-pulse 1.6s ease-in-out infinite; }
@keyframes tb-pulse { 0%, 100% { box-shadow: 0 0 4px var(--tb-accent-glow); } 50% { box-shadow: 0 0 20px var(--tb-accent-glow); } }

#tb-overlay { position: absolute; top: 70px; right: 22px; bottom: 90px; width: min(520px, 92vw); background: rgba(18, 22, 31, 0.97); border: 1px solid var(--tb-line); border-top: 3px solid var(--tb-accent); border-radius: var(--tb-radius); z-index: 30; overflow-y: auto; padding: 20px 24px; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55); animation: tb-slide-in 0.3s ease; }
@keyframes tb-slide-in { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.tb-overlay-close { position: absolute; top: 10px; right: 10px; min-width: 34px; min-height: 34px; font-size: 13px; }
#tb-overlay-content h1, #tb-overlay-content h2, #tb-overlay-content h3 { color: var(--tb-text); margin-top: 1.2em; }
#tb-overlay-content h2 { border-bottom: 1px solid var(--tb-line); padding-bottom: 6px; }
#tb-overlay-content strong { color: var(--tb-accent-soft); }
#tb-overlay-content img { max-width: 100%; border-radius: 6px; border: 1px solid var(--tb-line); }
#tb-overlay-content table { border-collapse: collapse; width: 100%; font-size: 13px; }
#tb-overlay-content td, #tb-overlay-content th { border: 1px solid var(--tb-line); padding: 6px 9px; text-align: left; }
#tb-overlay-content th { color: var(--tb-accent-soft); }

.tb-example-hint { color: var(--tb-text-dim); font-size: 12px; margin: 4px 0 12px; }
.tb-example-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.tb-example-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--tb-text); background: rgba(255, 255, 255, 0.03); border: 1px solid var(--tb-line); border-radius: 8px; padding: 8px; transition: border-color 0.15s ease, transform 0.15s ease; }
.tb-example-card:hover { border-color: var(--tb-accent); transform: translateY(-2px); }
.tb-example-thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 6px; background: #0f131d; }
.tb-example-thumb img { width: 100%; height: 100%; object-fit: cover; border: 0 !important; border-radius: 0 !important; }
.tb-example-placeholder { display: grid; place-items: center; width: 100%; height: 100%; color: var(--tb-accent); font-size: 26px; }
.tb-example-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 22px; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8); opacity: 0.9; }
.tb-example-title { font-size: 13px; font-weight: 600; line-height: 1.3; }
.tb-example-card em { font-style: normal; font-size: 11px; color: var(--tb-accent-soft); }

.tb-hidden { display: none !important; }
.tb-noscript { padding: 40px; text-align: center; }

#tb-fallback { position: absolute; inset: 0; overflow-y: auto; padding: 40px clamp(16px, 8vw, 120px); background: var(--tb-bg); z-index: 35; line-height: 1.6; }
#tb-fallback h1 { color: var(--tb-accent); }
#tb-fallback img { max-width: 100%; border-radius: 8px; }

@media (max-width: 767px) {
  #tb-nav { display: none; }
  #tb-caption { bottom: 110px; font-size: 13px; }
  .tb-title { display: none; }
  #tb-overlay { top: 56px; right: 8px; left: 8px; width: auto; }
}

#tb-start { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 40; background: rgba(8, 10, 14, 0.72); backdrop-filter: blur(4px); }
.tb-start-card { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 34px 42px; background: rgba(18, 22, 31, 0.96); border: 1px solid var(--tb-line); border-top: 3px solid var(--tb-accent); border-radius: var(--tb-radius); max-width: min(420px, 86vw); text-align: center; }
.tb-start-logo { width: 88px; height: 88px; border-radius: 16px; box-shadow: 0 0 40px var(--tb-accent-glow); }
.tb-start-hint { font-size: 15px; line-height: 1.55; color: var(--tb-text-dim); }
.tb-start-button { font: inherit; font-size: 16px; font-weight: 700; letter-spacing: 0.04em; color: #fff; background: var(--tb-accent); border: 0; border-radius: 10px; padding: 13px 30px; cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; box-shadow: 0 6px 24px var(--tb-accent-glow); }
.tb-start-button:hover { transform: translateY(-1px); box-shadow: 0 8px 30px var(--tb-accent-glow); }

.tb-video-embed { margin-top: 14px; }
.tb-video-embed iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 10px; background: #000; }

/* ── Enterable showcase scene (scene_walk.js) ─────────────────────────────── */
#tb-scene-veil { position: fixed; inset: 0; background: #06080c; opacity: 0; transition: opacity 0.38s ease; z-index: 60; pointer-events: none; }
.tb-scene-hud { position: fixed; inset: 0; z-index: 30; pointer-events: none; }
.tb-scene-exit { position: absolute; top: 14px; left: 14px; pointer-events: auto; font: inherit; font-size: 13px; font-weight: 600; color: var(--tb-text); background: rgba(18, 22, 31, 0.92); border: 1px solid var(--tb-line); border-left: 3px solid var(--tb-accent); border-radius: 8px; padding: 9px 14px; cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s; }
.tb-scene-exit:hover { border-color: var(--tb-accent); box-shadow: 0 0 14px var(--tb-accent-glow); }
.tb-scene-label { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); padding: 9px 16px; background: rgba(18, 22, 31, 0.92); border: 1px solid var(--tb-line); border-radius: 999px; font-size: 13px; color: var(--tb-text-dim); white-space: nowrap; }
body.tb-scene-mode #tb-header, body.tb-scene-mode #tb-nav, body.tb-scene-mode #tb-caption, body.tb-scene-mode #tb-presenter-controls, body.tb-scene-mode #tb-overlay { display: none; }

/* Hotspot interaction prompt (scene mode) */
.tb-scene-prompt {
  position: absolute;
  left: 50%;
  bottom: 68px;
  transform: translateX(-50%);
  padding: 7px 14px;
  border-radius: 8px;
  background: rgba(11, 14, 19, 0.78);
  border: 1px solid #2dd6e8;
  color: #e8f6f8;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

/* Enter VR button (scene mode, shown only when a headset is present) */
.tb-scene-vrbtn { top: 18px; right: 18px; left: auto; position: absolute; border-color: #2dd6e8; }
.tb-scene-vrnote { position: absolute; top: 18px; right: 18px; padding: 6px 10px; border-radius: 8px; background: rgba(11, 14, 19, 0.6); color: #8fa2ad; font-size: 12px; }
