
















:root {
  --accent: #00d4ff;
  --accent-rgb: 0, 212, 255;
  --accent-2: #4db8ff;
  --accent-ink: #08121e;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}






[hidden] {
  display: none !important;
}

body {
  overflow: hidden;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #000;
}


a-scene {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

a-scene .a-canvas {
  width: 100% !important;
  height: 100% !important;
}


#scene-title-overlay {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 10px 20px;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.3px;
  pointer-events: none;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

#scene-title-overlay .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}

.quality-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  line-height: 1;
  transition: all 0.4s ease;
}

.quality-badge.lq {
  background: rgba(255, 170, 0, 0.3);
  color: #ffaa00;
  border: 1px solid rgba(255, 170, 0, 0.4);
}

.quality-badge.hq {
  background: rgba(0, 212, 100, 0.3);
  color: #00d464;
  border: 1px solid rgba(0, 212, 100, 0.4);
}






.quality-badge.preview {
  background: rgba(160, 160, 180, 0.25);
  color: #c8c8d8;
  border: 1px solid rgba(160, 160, 180, 0.35);
  animation: pulse-badge 1.2s ease-in-out infinite;
}

.quality-badge.loading {
  background: rgba(var(--accent-rgb), 0.3);
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  animation: pulse-badge 1.2s ease-in-out infinite;
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}


#btn-hd-toggle {
  position: relative;
  overflow: hidden;
}

#btn-hd-toggle .hd-btn-text {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.6);
  transition: all 0.3s ease;
}

#btn-hd-toggle.active .hd-btn-text {
  color: #00d464;
  text-shadow: 0 0 8px rgba(0, 212, 100, 0.5);
}

#btn-hd-toggle.active {
  background: rgba(0, 212, 100, 0.2);
  border-color: rgba(0, 212, 100, 0.5);
}

#btn-hd-toggle.loading .hd-btn-text {
  color: var(--accent);
  animation: pulse-badge 1s ease-in-out infinite;
}

#btn-hd-toggle.loading {
  background: rgba(var(--accent-rgb), 0.15);
  border-color: rgba(var(--accent-rgb), 0.4);
}


@media (min-width: 1024px) {
  #btn-hd-toggle {
    display: none;
  }
}


#controls-panel {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  gap: 8px;
  align-items: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 8px 14px;
}

.ctrl-btn {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.ctrl-btn:hover {
  background: rgba(var(--accent-rgb), 0.25);
  border-color: rgba(var(--accent-rgb), 0.5);
}

.ctrl-btn:active {
  transform: scale(0.92);
  background: rgba(var(--accent-rgb), 0.4);
}

.ctrl-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ctrl-divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 4px;
}


#btn-mute.active {
  background: rgba(255, 90, 90, 0.22);
  border-color: rgba(255, 90, 90, 0.55);
  color: #ffb3b3;
}



.viewer-hint {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translate(-50%, 12px);
  z-index: 60;
  max-width: min(520px, 88vw);
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(12, 16, 24, 0.92);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  color: #eaf4ff;
  font-size: 13.5px;
  line-height: 1.45;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.viewer-hint.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}


#dpad-controls {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 9999;
  display: grid;
  grid-template-columns: 42px 42px 42px;
  grid-template-rows: 42px 42px 42px;
  gap: 4px;
}

#dpad-controls .dpad-btn {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

#dpad-controls .dpad-btn:hover {
  background: rgba(var(--accent-rgb), 0.2);
}

#dpad-controls .dpad-btn:active {
  background: rgba(var(--accent-rgb), 0.4);
  transform: scale(0.9);
}

.dpad-up    { grid-column: 2; grid-row: 1; }
.dpad-left  { grid-column: 1; grid-row: 2; }
.dpad-center{ grid-column: 2; grid-row: 2; }
.dpad-right { grid-column: 3; grid-row: 2; }
.dpad-down  { grid-column: 2; grid-row: 3; }


#scene-list-panel {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100%;
  z-index: 10000;
  background: rgba(15, 15, 25, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px;
  overflow-y: auto;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

#scene-list-panel.open {
  right: 0;
}

#scene-list-panel h3 {
  color: #fff;
  font-size: 16px;
  margin-bottom: 16px;
  font-weight: 600;
}

.scene-btn {
  display: block;
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: #ccc;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.scene-btn:hover {
  background: rgba(var(--accent-rgb), 0.15);
  color: #fff;
  border-color: rgba(var(--accent-rgb), 0.3);
}

.scene-btn.active {
  background: rgba(var(--accent-rgb), 0.2);
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.5);
}

#close-scene-list {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: #888;
  font-size: 22px;
  cursor: pointer;
}

#close-scene-list:hover {
  color: #fff;
}


#initial-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  background: linear-gradient(135deg, #0a0a1a 0%, #1a1a3e 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: opacity 0.6s ease;
}

#initial-loader.hidden {
  opacity: 0;
  pointer-events: none;
}










#initial-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(16px);
  transform: scale(1.12);
  z-index: 0;
}


#initial-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 26, 0.55);
}

#initial-loader .initial-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#initial-loader .spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#initial-loader p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}


@media (max-width: 768px) {
  #scene-title-overlay {
    top: 12px;
    left: 12px;
    font-size: 13px;
    padding: 8px 14px;
  }

  #controls-panel {
    bottom: 12px;
    padding: 6px 10px;
    gap: 6px;
  }

  .ctrl-btn {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }

  #dpad-controls {
    bottom: 70px;
    right: 12px;
  }

  #dpad-controls .dpad-btn {
    width: 38px;
    height: 38px;
  }

  #scene-list-panel {
    width: 260px;
    right: -280px;
  }
}

@media (max-width: 480px) {
  #controls-panel {
    bottom: 8px;
    padding: 5px 8px;
    gap: 4px;
  }

  .ctrl-btn {
    width: 34px;
    height: 34px;
    font-size: 14px;
    border-radius: 8px;
  }
}







:root {
  --toolbar-h: 58px;
  --inspector-w: 320px;
}















.editor-toolbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  min-height: var(--toolbar-h);
  z-index: 10001;
  background: rgba(15, 15, 25, 0.95);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 7px 16px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  row-gap: 8px;
  gap: 10px;
  color: #fff;
  font-size: 13px;
}

.editor-toolbar > * {
  flex-shrink: 0;
}



.editor-toolbar .tb-spacer { flex: 1 1 0; min-width: 0; }


.editor-toolbar .tb-sep { align-self: stretch; }

.tb-brand {
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
}



.tb-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tb-sep {
  width: 1px;
  height: 26px;
  background: rgba(255, 255, 255, 0.14);
}


.draft-status {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
  min-width: 92px;
}
.draft-status.saving { color: #ffd479; }
.draft-status.saved  { color: #7ddf8f; }
.draft-status.failed { color: #ff8080; }


.draft-bar {
  position: fixed;
  


  top: calc(var(--toolbar-h) + 10px);
  left: calc((100% - var(--inspector-w)) / 2);
  transform: translateX(-50%);
  z-index: 3000;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #1b1b26;
  border: 1px solid rgba(255, 212, 121, 0.5);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
  font-size: 13px;
  color: #f0f0f5;
  max-width: min(560px, calc(100vw - var(--inspector-w) - 24px));
}
.draft-bar[hidden] { display: none !important; }
.draft-bar button {
  padding: 5px 10px;
  font-size: 12px;
}

.tb-spacer {
  flex: 1;
  min-width: 8px;
}

.tb-field {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
  white-space: nowrap;
}

.editor-toolbar select,
.editor-toolbar input,
.editor-toolbar button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #fff;
  padding: 7px 12px;
  font-size: 13px;
}

.editor-toolbar input[type="number"] {
  width: 68px;
}



.editor-toolbar button.big {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}




.editor-toolbar button.big small {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.8;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.3);
}






.editor-toolbar select,
.editor-toolbar input[type="number"] {
  color-scheme: dark;
}

.editor-toolbar select option {
  background-color: #16161f;
  color: #fff;
}

.editor-toolbar button {
  cursor: pointer;
  transition: background 0.2s;
}

.editor-toolbar button:hover {
  background: rgba(var(--accent-rgb), 0.2);
}

.editor-toolbar button.primary {
  background: rgba(var(--accent-rgb), 0.3);
  border-color: rgba(var(--accent-rgb), 0.5);
}





.editor-toolbar button.primary.dirty {
  background: rgba(255, 176, 32, 0.28);
  border-color: rgba(255, 176, 32, 0.75);
  color: #ffd79a;
}

.editor-toolbar button.primary.dirty:hover {
  background: rgba(255, 176, 32, 0.42);
}

.editor-output {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  max-height: 250px;
  z-index: 10001;
  background: rgba(10, 10, 20, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 20px;
  overflow-y: auto;
  color: #0f0;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  display: none;
}

.editor-output.open {
  display: block;
}





body:has(.editor-toolbar) a-scene {
  position: fixed !important;
  top: var(--toolbar-h) !important;
  left: 0 !important;
  width: 100% !important;
  height: calc(100% - var(--toolbar-h)) !important;
}






.editor-crosshair {
  position: fixed;
  





  top: calc(50% + var(--toolbar-h) / 2);
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9998;
  pointer-events: none;
  color: #ffff00;
  text-shadow: 0 0 2px #08121e, 1px 1px 0 #08121e, -1px -1px 0 #08121e,
               1px -1px 0 #08121e, -1px 1px 0 #08121e;
  font-size: 34px;
  font-weight: 300;
  line-height: 1;
}

.editor-coords {
  position: fixed;
  top: calc(var(--toolbar-h) + 12px);
  left: 20px;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 8px;
  padding: 10px 14px;
  color: #0f0;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.6;
}


.editor-toast {
  position: fixed;
  top: calc(var(--toolbar-h) + 100px);
  left: 20px;
  max-width: 420px;
  z-index: 9999;
  background: rgba(0, 40, 60, 0.88);
  border: 1px solid rgba(var(--accent-rgb), 0.45);
  border-radius: 8px;
  padding: 8px 12px;
  color: #cfefff;
  font-size: 12px;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}

.editor-toast.show {
  opacity: 1;
  transform: translateY(0);
}






.inspector {
  position: fixed;
  top: var(--toolbar-h);
  right: 0;
  width: var(--inspector-w);
  min-width: 280px;
  max-width: 92vw;
  height: calc(100% - var(--toolbar-h));
  z-index: 10000;
  background: rgba(12, 12, 24, 0.93);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 13px;
  overflow-y: auto;
  





  overflow-x: hidden;
  overscroll-behavior: contain;
}

.inspector::-webkit-scrollbar { width: 8px; }
.inspector::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}


.insp-fixed {
  padding: 14px 16px;
  background: rgba(var(--accent-rgb), 0.06);
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.18);
}

.insp-fixed-note {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.45);
}



.insp-empty {
  padding: 40px 24px;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.6;
}

.insp-empty-icon {
  font-size: 44px;
  opacity: 0.25;
  margin-bottom: 12px;
}

.insp-empty-title {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 10px;
}

.insp-empty p { margin: 0 0 10px; }

.insp-empty-hint {
  font-size: 12px;
  opacity: 0.7;
}

.insp-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(18, 18, 34, 0.97);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}







.insp-head > div:first-child { min-width: 0; }


.insp-head > button { flex: 0 0 auto; }

.insp-id {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: #ffe14d;
  font-weight: 700;
  

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.insp-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.insp-del {
  background: rgba(255, 60, 60, 0.15);
  border: 1px solid rgba(255, 80, 80, 0.4);
  color: #ff9a9a;
  border-radius: 8px;
  padding: 7px 11px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.insp-del:hover { background: rgba(255, 60, 60, 0.32); }

.insp-warn {
  margin: 12px 16px 0;
  padding: 9px 12px;
  border-radius: 8px;
  background: rgba(255, 90, 40, 0.14);
  border: 1px solid rgba(255, 110, 60, 0.45);
  color: #ffb59a;
  font-size: 12px;
  line-height: 1.5;
}

.insp-sec {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.insp-sec h4 {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(var(--accent-rgb), 0.85);
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.insp-hint {
  margin-left: auto;
  font-family: 'Courier New', monospace;
  font-size: 10px;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(255, 255, 255, 0.35);
}

.insp-note {
  margin: 0 0 12px;
  font-size: 11.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.5);
}


.insp-note kbd {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 1px 5px;
  color: rgba(255, 255, 255, 0.75);
  font-family: 'Courier New', monospace;
  font-size: 10.5px;
  white-space: nowrap;
}


.insp-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.insp-line:last-child { margin-bottom: 0; }

.insp-key {
  flex: 0 0 96px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.insp-line select,
.insp-line input[type="text"] {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #fff;
  padding: 7px 10px;
  font-size: 13px;
  color-scheme: dark;
}

.insp-line select option {
  background-color: #16161f;
  color: #fff;
}



.insp-textarea {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #fff;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.5;
  resize: vertical;
  color-scheme: dark;
}

.insp-textarea:focus {
  outline: none;
  border-color: rgba(var(--accent-rgb), 0.55);
}

.insp-field .insp-note { margin: 6px 0 0; }




.insp-video {
  width: 100%;
  max-height: 170px;
  margin-top: 8px;
  border-radius: 8px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: block;
}


.vl-row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}

.vl-row input[type="text"] {
  flex: 1 1 auto;
  min-width: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: #fff;
  padding: 5px 8px;
  font-size: 12px;
  font-family: inherit;
}

.vl-row .vl-label { flex: 0 0 72px; }

.vl-row button {
  background: rgba(255, 90, 90, 0.16);
  border: 1px solid rgba(255, 90, 90, 0.35);
  border-radius: 6px;
  color: #ffb3b3;
  cursor: pointer;
  font-size: 12px;
  padding: 4px 8px;
  flex: none;
}

.vl-row button:hover { background: rgba(255, 90, 90, 0.3); }


.icon-preview {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}



.insp-preview { margin-bottom: 14px; }

.insp-preview canvas {
  display: none;              
  width: 100%;
  height: auto;
  margin-top: 6px;
  border-radius: 8px;
  

  background:
    linear-gradient(45deg, rgba(255,255,255,0.06) 25%, transparent 25%,
                    transparent 75%, rgba(255,255,255,0.06) 75%),
    linear-gradient(45deg, rgba(255,255,255,0.06) 25%, transparent 25%,
                    transparent 75%, rgba(255,255,255,0.06) 75%);
  background-size: 14px 14px;
  background-position: 0 0, 7px 7px;
}


.insp-field { margin-bottom: 14px; }
.insp-field:last-child { margin-bottom: 0; }

.insp-flabel {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 6px;
}

.insp-ctrl {
  display: flex;
  align-items: center;
  gap: 9px;
}

.insp-ctrl input[type="range"] {
  flex: 1;
  min-width: 0;
  accent-color: var(--accent);
  height: 4px;
  cursor: pointer;
}

.insp-ctrl input[type="number"] {
  width: 66px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 7px;
  color: #fff;
  padding: 6px 8px;
  font-size: 12.5px;
  text-align: right;
  color-scheme: dark;
}

.insp-unit {
  width: 12px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
}

.insp-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
}

.insp-check input { accent-color: var(--accent); width: 15px; height: 15px; }


.insp-note-warn { color: #ff9d80 !important; }





.gal-item {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 8px 9px 6px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.gal-item.active {
  border-color: rgba(var(--accent-rgb), 0.55);
  background: rgba(var(--accent-rgb), 0.07);
}

.gal-head {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}

.gal-pick {
  flex: 1;
  text-align: left;
  background: none;
  border: none;
  color: #cfe4ef;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 0;
}

.gal-item.active .gal-pick { color: var(--accent); }
.gal-pick:hover { color: #fff; }

.gal-btn {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  color: #cfe4ef;
  font-size: 11px;
  line-height: 1;
  padding: 4px 6px;
  cursor: pointer;
}

.gal-btn:hover:not(:disabled) { background: rgba(var(--accent-rgb), 0.2); }
.gal-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.gal-field { display: block; margin-bottom: 5px; }

.gal-key {
  display: block;
  font-size: 10.5px;
  color: rgba(207, 228, 239, 0.65);
  margin-bottom: 2px;
}

.gal-field input,
.gal-field textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: #e8f4fa;
  font-size: 12px;
  padding: 5px 7px;
  font-family: inherit;
  resize: vertical;
}

.gal-field input:focus,
.gal-field textarea:focus {
  outline: none;
  border-color: rgba(var(--accent-rgb), 0.6);
}

.gal-status { margin: 2px 0 0 !important; font-size: 10.5px; }

.insp-wide {
  width: 100%;
  margin-top: 4px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.85);
  padding: 8px;
  font-size: 12.5px;
  cursor: pointer;
  transition: background 0.2s;
}

.insp-wide:hover { background: rgba(var(--accent-rgb), 0.2); }





.field-off {
  opacity: 0.3;
  pointer-events: none;
}

.field-off .tip { pointer-events: auto; }










.scene-manager-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--smp-w, 360px);
  min-width: 280px;
  max-width: 92vw;
  height: 100%;
  z-index: 10002;
  background: rgba(12, 12, 24, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid rgba(var(--accent-rgb), 0.2);
  display: flex;
  flex-direction: column;
  transform: translateX(101%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -4px 0 30px rgba(0, 0, 0, 0.5);
}

.scene-manager-panel.open { transform: translateX(0); }














.scene-manager-panel {
  visibility: hidden;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0.35s;
}

.scene-manager-panel.open {
  visibility: visible;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0s;
}




.panel-resizer {
  position: absolute;
  top: 0;
  left: -4px;
  width: 9px;
  height: 100%;
  cursor: ew-resize;
  touch-action: none;
  z-index: 2;
  background: transparent;
  border: 0;
  padding: 0;
}

.panel-resizer::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 3px;
  width: 3px;
  height: 46px;
  margin-top: -23px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.16);
  transition: background 0.15s;
}

.panel-resizer:hover::after,
.panel-resizer:focus-visible::after { background: rgba(var(--accent-rgb), 0.8); }
.panel-resizer:focus-visible { outline: none; }
.panel-resizing { transition: none !important; user-select: none; }



body.panel-resizing a-scene,
body.panel-resizing canvas { pointer-events: none; }
body.panel-resizing { cursor: ew-resize; }

.smp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.smp-header h3 {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  margin: 0;
}

.smp-close-btn {
  background: none;
  border: none;
  color: #888;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}

.smp-close-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.smp-actions {
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.smp-btn {
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #ccc;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.smp-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.smp-btn-primary {
  background: rgba(var(--accent-rgb), 0.2);
  border-color: rgba(var(--accent-rgb), 0.4);
  color: var(--accent);
  width: 100%;
}

.smp-btn-primary:hover {
  background: rgba(var(--accent-rgb), 0.35);
}




.smp-search {
  position: relative;
  padding: 10px 20px 6px;
}

.smp-search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 30px 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  color: #eee;
  font-size: 13px;
  font-family: inherit;
}

.smp-search-input::placeholder { color: rgba(255, 255, 255, 0.35); }

.smp-search-input:focus {
  outline: none;
  border-color: rgba(var(--accent-rgb), 0.55);
  background: rgba(0, 0, 0, 0.4);
}



.smp-search-input::-webkit-search-cancel-button { display: none; }

.smp-search-clear {
  position: absolute;
  right: 26px;
  top: 50%;
  transform: translateY(-40%);
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #ccc;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}

.smp-search-clear:hover { background: rgba(255, 255, 255, 0.24); color: #fff; }



.smp-empty {
  padding: 22px 16px;
  text-align: center;
  color: rgba(255, 255, 255, 0.45);
  font-size: 12.5px;
  line-height: 1.6;
}

.smp-scene-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
}

.smp-scene-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  cursor: grab;
  transition: all 0.2s;
  user-select: none;
}

.smp-scene-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.smp-scene-item.active {
  background: rgba(var(--accent-rgb), 0.12);
  border-color: rgba(var(--accent-rgb), 0.35);
}

.smp-scene-item.dragging {
  opacity: 0.4;
  transform: scale(0.96);
}

.smp-scene-item.drag-over {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.15);
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.2);
}

.smp-drag-handle {
  color: rgba(255, 255, 255, 0.25);
  font-size: 14px;
  cursor: grab;
  padding: 2px;
  flex-shrink: 0;
}

.smp-scene-item:hover .smp-drag-handle {
  color: rgba(255, 255, 255, 0.5);
}

.smp-scene-num {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.smp-scene-info {
  flex: 1;
  min-width: 0;
}

.smp-scene-title {
  color: #eee;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.smp-scene-id {
  color: rgba(255, 255, 255, 0.35);
  font-size: 10px;
  font-family: 'Courier New', monospace;
  margin-top: 2px;
}

.smp-scene-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.2s;
}

.smp-scene-item:hover .smp-scene-actions {
  opacity: 1;
}

.smp-scene-action-btn {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #aaa;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  padding: 0;
}

.smp-scene-action-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.smp-scene-action-btn.delete:hover {
  background: rgba(255, 60, 60, 0.3);
  color: #ff6666;
}

.smp-info {
  padding: 10px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}

.smp-info small {
  color: rgba(255, 255, 255, 0.3);
  font-size: 11px;
}


.smp-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10003;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
}

.smp-modal.open {
  display: flex;
}

.smp-modal-content {
  background: rgba(20, 20, 40, 0.98);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 16px;
  padding: 28px;
  width: 380px;
  max-width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.smp-modal-content h4 {
  color: #fff;
  font-size: 16px;
  margin: 0 0 20px;
}

.smp-modal-content label {
  display: block;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  margin-bottom: 12px;
}

.smp-modal-content input {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.smp-modal-content input:focus {
  border-color: rgba(var(--accent-rgb), 0.5);
}


.smp-modal-content select {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
}

.smp-modal-content select:focus { border-color: rgba(var(--accent-rgb), 0.5); outline: none; }



.smp-pano-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}

.smp-pano-row .mp-dim { flex: 1 1 160px; min-width: 0; }





.brand-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.brand-row input[type="color"] {
  flex: 0 0 auto;
  width: 46px;
  height: 36px;
  padding: 2px;
  margin-top: 0;
  cursor: pointer;
}

.brand-row input[type="text"] { flex: 1 1 auto; min-width: 0; margin-top: 0; }
.brand-row .smp-btn { flex: 0 0 auto; }

.brand-path {
  flex: 1 1 120px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}








.brand-logo-preview-wrap:has(img:not([hidden])) {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(8, 12, 20, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
#brand-logo-preview {
  display: block;
  max-height: 44px;
  max-width: 100%;
  object-fit: contain;
}

.brand-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 14px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-preview-btn {
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 700;
  font-family: inherit;
  font-size: 13px;
  cursor: default;
}

.brand-preview-chip {
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), 0.55);
  background: rgba(var(--accent-rgb), 0.14);
}

.brand-preview-note {
  flex: 1 1 140px;
  min-width: 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
}


#embed-modal .smp-modal-content { width: 560px; }

#embed-code {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #dfe5ef;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
  resize: vertical;
}

#embed-code:focus { border-color: rgba(var(--accent-rgb), 0.5); outline: none; }




.tpl-list {
  max-height: min(52vh, 420px);
  overflow-y: auto;
  margin: 10px 0 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tpl-item {
  display: flex;
  align-items: stretch;
  gap: 6px;
}

.tpl-pick {
  flex: 1 1 auto;
  min-width: 0;                 
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #ddd;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.tpl-pick:hover, .tpl-pick:focus-visible {
  background: rgba(var(--accent-rgb), 0.14);
  border-color: rgba(var(--accent-rgb), 0.4);
  color: #fff;
  outline: none;
}

.tpl-icon { font-size: 20px; flex: 0 0 auto; line-height: 1; }

.tpl-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tpl-text strong { font-size: 13px; font-weight: 600; }
.tpl-text small {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.45);
  
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tpl-pick:hover .tpl-text small { color: rgba(255, 255, 255, 0.65); }


.tpl-user .tpl-pick { border-left: 2px solid rgba(255, 200, 0, 0.5); }

.tpl-del {
  flex: 0 0 auto;               
  width: 34px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  font-size: 13px;
}

.tpl-del:hover { background: rgba(255, 80, 80, 0.2); color: #fff; }

.smp-modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  justify-content: flex-end;
}





.smp-scene-settings {
  padding: 14px 20px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.smp-scene-settings h4 {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  color: #fff;
  font-size: 13px;
  margin: 0 0 8px;
}


.smp-scene-settings h4 small {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.45);
  font-weight: normal;
}

.smp-scene-settings .insp-note { margin: 0 0 12px; line-height: 1.5; }


.smp-scene-settings .insp-key { flex: 0 0 78px; }
.smp-scene-settings .insp-line { margin-bottom: 12px; }
.smp-scene-settings .insp-field { margin-bottom: 12px; }



.smp-scene-settings .smp-actions {
  display: flex;
  gap: 8px;
  padding: 0;
  margin-top: 14px;
  border-bottom: none;
}


.smp-scene-title-input {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.5);
  border-radius: 4px;
  color: #fff;
  font-size: 13px;
  padding: 2px 6px;
  width: 100%;
  outline: none;
  box-sizing: border-box;
}


.editor-help-panel {
  position: fixed;
  top: var(--toolbar-h);
  right: -360px;
  width: 340px;
  max-height: calc(100% - var(--toolbar-h) - 10px);
  z-index: 10002;
  background: rgba(12, 12, 24, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid rgba(var(--accent-rgb), 0.2);
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -4px 0 30px rgba(0, 0, 0, 0.5);
  overflow-y: auto;
}

.editor-help-panel.open {
  right: 0;
}

.help-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  background: rgba(12, 12, 24, 0.97);
}

.help-header h3 {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}

.help-content {
  padding: 8px 14px 16px;
}

.help-section {
  margin-bottom: 14px;
}

.help-section h4 {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 0 0 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.15);
}

.help-section h4 small {
  color: rgba(255, 255, 255, 0.4);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.help-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 12px;
}

.help-row kbd {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 2px 7px;
  color: #fff;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  white-space: nowrap;
}

.help-row span {
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  text-align: right;
}


.editor-coords .view-info {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--accent);
}

.editor-coords .visibility-warn {
  color: #ff6644;
  font-weight: bold;
}




#welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  opacity: 1;
  transition: opacity 0.5s ease;
  padding: 20px;
}

#welcome-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.welcome-box {
  background: rgba(10, 18, 32, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(0, 210, 255, 0.15);
  border-radius: 20px;
  padding: 36px 32px 28px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  animation: welcomeFadeIn 0.6s ease;
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.5), 0 0 80px rgba(0, 210, 255, 0.06);
}

@keyframes welcomeFadeIn {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.welcome-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 2px;
  letter-spacing: 0.5px;
}

.welcome-subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  margin: 0 0 24px;
  letter-spacing: 0.3px;
}

.welcome-items {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 26px;
  text-align: left;
}

.welcome-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.welcome-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  background: rgba(0, 210, 255, 0.1);
  border: 1px solid rgba(0, 210, 255, 0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.welcome-icon svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.welcome-text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.45;
}

.welcome-text strong {
  color: #fff;
}

.welcome-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}

#welcome-start-btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  border-radius: 10px;
  padding: 12px 36px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: background 0.2s, transform 0.15s;
}

#welcome-start-btn:hover {
  background: #33dfff;
  transform: scale(1.03);
}

#welcome-start-btn:active {
  transform: scale(0.97);
}


@media (max-width: 480px) {
  .welcome-box {
    padding: 28px 20px 22px;
    border-radius: 16px;
  }

  .welcome-title {
    font-size: 22px;
  }

  .welcome-subtitle {
    font-size: 12px;
  }

  .welcome-icon {
    width: 34px;
    height: 34px;
  }

  .welcome-icon svg {
    width: 17px;
    height: 17px;
  }

  .welcome-text {
    font-size: 13px;
  }

  #welcome-start-btn {
    padding: 11px 30px;
    font-size: 14px;
    width: 100%;
  }
}








.scene-loader {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9500;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.scene-loader.visible {
  opacity: 1;
  visibility: visible;
}


.scene-loader.has-error {
  pointer-events: auto;
}

.scene-loader-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px 36px;
  min-width: 240px;
  text-align: center;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.scene-loader-spinner {
  width: 42px;
  height: 42px;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: scene-loader-spin 0.9s linear infinite;
}

@keyframes scene-loader-spin {
  to { transform: rotate(360deg); }
}


.scene-loader.has-error .scene-loader-spinner {
  display: none;
}

.scene-loader-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.scene-loader-title:empty {
  display: none;
}

.scene-loader-text {
  font-size: 13px;
  opacity: 0.75;
  font-variant-numeric: tabular-nums;
}

.scene-loader.has-error .scene-loader-text {
  color: #ff8a7a;
  opacity: 1;
  max-width: 260px;
  line-height: 1.5;
}

.scene-loader-bar {
  width: 190px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.15);
  overflow: hidden;
}

.scene-loader-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 2px;
  background: var(--accent);
  transition: width 0.2s ease-out;
}

.scene-loader.has-error .scene-loader-bar {
  display: none;
}

.scene-loader-retry {
  display: none;
  margin-top: 4px;
  padding: 9px 22px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.scene-loader-retry:hover {
  background: rgba(var(--accent-rgb), 0.2);
  border-color: var(--accent);
}

.scene-loader.has-error .scene-loader-retry {
  display: block;
}


@media (prefers-reduced-motion: reduce) {
  .scene-loader-spinner {
    animation: none;
    border-top-color: rgba(255, 255, 255, 0.18);
  }
}

















.ctrl-btn:focus-visible,
.dpad-btn:focus-visible,
.scene-btn:focus-visible,
#welcome-start-btn:focus-visible,
#close-scene-list:focus-visible,
#btn-scene-list:focus-visible {
  outline: 3px solid var(--accent-2);
  outline-offset: 2px;
  
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.9);
}















@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


.initial-progress {
  width: 200px;
  height: 3px;
  margin-top: 14px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.15);
  overflow: hidden;
}

.initial-progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 2px;
  background: var(--accent);
  transition: width 0.2s ease-out;
}






.tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  margin-left: 4px;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.22);
  border: 1px solid rgba(var(--accent-rgb), 0.55);
  color: #6fe3ff;
  font-size: 10px;
  font-weight: 700;
  cursor: help;
  position: relative;
  flex: 0 0 auto;
  user-select: none;
}

.tip:hover {
  background: rgba(var(--accent-rgb), 0.4);
  color: #fff;
}











#tip-bubble {
  position: fixed;
  z-index: 10000;
  max-width: 320px;
  padding: 10px 13px;
  border-radius: 8px;
  background: #10171f;
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.6);
  color: #d8e6ef;
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.55;
  text-align: left;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.14s ease;
  pointer-events: none;
}

#tip-bubble.visible {
  opacity: 1;
  visibility: visible;
}


.editor-toolbar button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}


.help-section.help-highlight {
  background: rgba(var(--accent-rgb), 0.07);
  border-left: 2px solid rgba(var(--accent-rgb), 0.5);
  padding-left: 11px;
  border-radius: 0 6px 6px 0;
}

.help-note {
  margin: 7px 0 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: #b7c7d3;
}

.help-note strong {
  color: #e6f4fb;
}

.help-dim {
  color: #7b8894;
  font-style: italic;
}






.mp-note {
  color: rgba(255, 255, 255, 0.75);
  font-size: 12.5px;
  line-height: 1.55;
  margin: 0 0 10px;
}

.mp-dim {
  color: rgba(255, 255, 255, 0.45);
  font-size: 11.5px;
}

.mp-modal .smp-modal-content { width: 440px; }


.mp-actions .smp-btn { white-space: nowrap; }




.mp-progress {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 10050;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  min-width: 420px;
  max-width: 90vw;
  background: rgba(12, 12, 24, 0.97);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 12px;
}

.mp-progress-name {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.8);
}

.mp-progress-track {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.mp-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.15s linear;
}

.mp-progress-pct {
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.65);
  font-variant-numeric: tabular-nums;
}

.mp-progress-cancel {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  padding: 4px 10px;
}

.mp-progress-cancel:disabled { opacity: 0.4; cursor: default; }


.media-panel { width: var(--mp-w, 420px); }

.mp-tabs {
  display: flex;
  gap: 6px;
  padding: 12px 16px 0;
}

.mp-tab {
  flex: 1;
  padding: 7px 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  font-size: 12px;
}

.mp-tab.active {
  background: rgba(var(--accent-rgb), 0.15);
  border-color: rgba(var(--accent-rgb), 0.5);
  color: #fff;
}

.mp-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mp-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.mp-item.foreign { border-style: dashed; opacity: 0.75; }

.mp-thumb {
  width: 46px;
  height: 34px;
  flex: none;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06) center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.mp-item-main { flex: 1; min-width: 0; }

.mp-item-path {
  color: rgba(255, 255, 255, 0.85);
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mp-item-sub {
  color: rgba(255, 255, 255, 0.4);
  font-size: 10.5px;
  margin-top: 2px;
}

.mp-item-acts { display: flex; gap: 4px; flex: none; }

.mp-item-acts button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  padding: 4px 7px;
}

.mp-item-acts button:hover { background: rgba(var(--accent-rgb), 0.2); }
.mp-item-acts button:disabled { opacity: 0.35; cursor: default; }

.mp-foot {
  padding: 10px 16px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  line-height: 1.5;
}


.mp-inline {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  padding: 3px 8px;
  flex: none;
}

.mp-inline:hover { background: rgba(var(--accent-rgb), 0.22); }
.gal-field .mp-inline, .insp-line .mp-inline { margin-left: 6px; }


.gal-inrow { display: flex; align-items: center; gap: 6px; }
.gal-inrow input { flex: 1; min-width: 0; }







#v360-bar {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 8px 16px;
  border-radius: 999px;
  background: rgba(12, 16, 22, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #eaf2ff;
  font-size: 14px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}
#v360-bar[hidden] { display: none; }
#v360-label { opacity: 0.85; letter-spacing: 0.01em; }
#v360-bar button {
  border: 0;
  border-radius: 999px;
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font: inherit;
  

  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease;
}
#v360-bar button:hover { background: rgba(255, 255, 255, 0.24); }
#v360-bar button:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }


#v360-play { min-width: 44px; text-align: center; }

#v360-time {
  font-variant-numeric: tabular-nums;
  opacity: 0.8;
  min-width: 84px;
  text-align: center;
}


#v360-vol {
  width: 84px;
  accent-color: var(--accent);
  cursor: pointer;
}
#v360-vol:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

@media (max-width: 520px) {
  


  #v360-bar { top: 62px; font-size: 13px; padding: 6px 8px 6px 12px; gap: 6px; }
  #v360-label { display: none; }
  




  #v360-bar #v360-exit { font-size: 0; padding: 7px 12px; }
  #v360-bar #v360-exit::after { content: "✕"; font-size: 14px; }
  #v360-time { min-width: 72px; }
  

  #v360-vol { width: 56px; }
}











.validate-badge {
  
  position: fixed;
  left: 14px;
  bottom: 14px;
  z-index: 10003;
  padding: 7px 12px;
  min-width: 92px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #cfd6e4;
  cursor: pointer;
}
.validate-badge.ok      { border-color: rgba(80, 220, 140, 0.45); color: #7ee2a8; }
.validate-badge.warn    { border-color: rgba(255, 196, 0, 0.55);  color: #ffcc44; }
.validate-badge.error   { border-color: rgba(255, 90, 90, 0.6);   color: #ff8a8a; }
.validate-badge:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }

.vp-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  margin-bottom: 6px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left-width: 3px;
  background: rgba(255, 255, 255, 0.04);
  color: #dfe5ef;
  font-size: 12px;
  line-height: 1.45;
  cursor: pointer;
}
.vp-item.err  { border-left-color: #ff5a5a; }
.vp-item.warn { border-left-color: #ffc400; }

.vp-item.no-jump { cursor: default; }
.vp-item:hover:not(.no-jump) { background: rgba(var(--accent-rgb), 0.10); }
.vp-item:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }

.vp-where { display: block; font-size: 11px; color: #8ea0bd; margin-bottom: 2px; }

.vp-fix   { display: block; margin-top: 4px; color: #8fe3b4; }
.vp-empty { padding: 14px 6px; color: #8ea0bd; font-size: 12px; line-height: 1.5; }





.tb-menu { position: relative; display: inline-flex; }















.tb-menu-pop {
  position: fixed;
  z-index: 10050;
  min-width: 260px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(12, 12, 24, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 10px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.55);
}
.tb-menu-pop[hidden] { display: none; }




.tb-menu-pop > button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: #e6ecf7;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.tb-menu-pop > button small { color: #8ea0bd; font-size: 11px; }
.tb-menu-pop > button:hover { background: rgba(var(--accent-rgb), 0.12); }
.tb-menu-pop > button:focus-visible { outline: 3px solid var(--accent-2); outline-offset: -2px; }
.tb-menu-pop > button:disabled { opacity: .75; cursor: default; }
.tb-menu-pop > button.tb-menu-current { background: rgba(var(--accent-rgb), 0.10); opacity: 1; }
.tb-menu-sep { height: 1px; margin: 4px 2px; background: rgba(255, 255, 255, 0.12); }




.tb-tour { display: inline-flex; align-items: center; gap: 6px; }




.tb-lang-badge {
  flex: none;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255, 180, 84, 0.22);
  border: 1px solid rgba(255, 180, 84, 0.55);
  color: #ffd9a8;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.tb-lang-badge[hidden] { display: none; }

#tour-menu-label {
  display: block;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


#btn-add-menu[aria-expanded="true"] { border-color: rgba(var(--accent-rgb), 0.55); }


.tb-icon {
  width: 38px;
  padding: 0;
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tb-icon:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }


.insp-action {
  width: 100%;
  margin: 6px 0 2px;
  padding: 8px 10px;
  border-radius: 7px;
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  background: rgba(var(--accent-rgb), 0.08);
  color: #bfe9ff;
  font-size: 12px;
  cursor: pointer;
}
.insp-action:hover { background: rgba(var(--accent-rgb), 0.16); }
.insp-action:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }
.insp-hint { margin: 2px 0 6px; font-size: 11px; color: #8fe3b4; line-height: 1.4; }












body.preview-mode .editor-toolbar,
body.preview-mode #editor-inspector,
body.preview-mode #editor-coords,
body.preview-mode #btn-validate,
body.preview-mode #validate-panel,
body.preview-mode #editor-help-panel { display: none !important; }


body.preview-mode #editor-scene-wrap,
body.preview-mode a-scene,
body.preview-mode .a-canvas { inset: 0 !important; width: 100% !important; }

#preview-bar {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10060;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(12, 12, 24, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  color: #cfe8ff;
  font-size: 12px;
}
#preview-bar[hidden] { display: none; }
#preview-bar button {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}
#preview-bar button:hover { background: rgba(var(--accent-rgb), 0.18); }
#preview-bar button:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }
#preview-bar kbd {
  margin-left: 6px; padding: 1px 5px; border-radius: 4px;
  background: rgba(255, 255, 255, 0.12); font-size: 10px;
}





#tour-overlay { position: fixed; inset: 0; z-index: 10080; }
#tour-overlay[hidden] { display: none; }








#tour-spot {
  position: absolute;
  border-radius: 10px;
  box-shadow: 0 0 0 9999px rgba(4, 6, 14, 0.72), 0 0 0 2px var(--accent-2) inset;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

#tour-card {
  position: absolute;
  width: 330px;
  padding: 16px 18px;
  border-radius: 12px;
  background: rgba(14, 16, 30, 0.98);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  color: #e6ecf7;
}
#tour-card h3 { margin: 0 0 8px; font-size: 15px; color: #7fd8ff; }
#tour-card p  { margin: 0 0 14px; font-size: 13px; line-height: 1.55; white-space: pre-line; }
.tour-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
#tour-step { font-size: 11px; color: #8ea0bd; }
.tour-actions { display: flex; gap: 8px; }
#tour-card button {
  padding: 7px 14px; border-radius: 7px; font-size: 12px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06); color: #dfe5ef;
}
#tour-card button.primary { background: #0f7fa8; border-color: #16a3d4; color: #fff; }
#tour-card button:hover { filter: brightness(1.15); }
#tour-card button:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }





.graph-panel {
  width: var(--gp-w, 420px);
  right: var(--smp-open-w, 0px);
}

.graph-canvas {
  overflow: auto;                 
  max-height: calc(100vh - 260px);
  padding: 6px 2px 10px;
}

.graph-canvas svg { display: block; margin: 0 auto; }

.gr-edge {
  stroke: rgba(160, 190, 230, 0.45);
  stroke-width: 2;
}


.gr-edge-one {
  stroke: #ffb454;
  stroke-dasharray: 6 5;
}

.gr-node rect {
  fill: rgba(255, 255, 255, 0.07);
  stroke: rgba(255, 255, 255, 0.18);
  stroke-width: 1.5;
}

.gr-node text {
  fill: #dbe6f7;
  font-size: 12.5px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  pointer-events: none;
}

.gr-node { cursor: pointer; }
.gr-node:hover rect { fill: rgba(var(--accent-rgb), 0.16); }
.gr-node:focus-visible rect { stroke: var(--accent-2); stroke-width: 3; }
.gr-node:focus { outline: none; }

.gr-start rect { stroke: rgba(120, 230, 160, 0.75); }
.gr-current rect { fill: rgba(var(--accent-rgb), 0.22); stroke: rgba(var(--accent-rgb), 0.8); }
.gr-orphan rect { stroke: #ff7a7a; stroke-dasharray: 5 4; }
.gr-orphan text { fill: #ffc9c9; }

.graph-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 10px 2px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.55);
  font-size: 11.5px;
}

.graph-legend i {
  display: inline-block;
  width: 14px; height: 3px;
  margin-right: 5px;
  vertical-align: middle;
  border-radius: 2px;
}

.graph-legend .lg-start { background: rgba(120, 230, 160, 0.85); }
.graph-legend .lg-current { background: rgba(var(--accent-rgb), 0.85); }
.graph-legend .lg-orphan { background: #ff7a7a; }
.graph-legend .lg-oneway { background: #ffb454; }


.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}


.lang-switch {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 45;
  display: block;
}




.lang-switch:has(~ .gallery-link:not([hidden])) { right: 148px; }

@media (max-width: 640px) {
  .lang-switch:has(~ .gallery-link:not([hidden])) { right: 74px; }
}

.lang-switch select {
  appearance: none;
  padding: 10px 30px 10px 14px;
  border-radius: 14px;
  background: rgba(12, 16, 26, 0.78)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2300d4ff'/%3E%3C/svg%3E")
    no-repeat right 12px center / 10px 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #eaf2ff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
}

.lang-switch select:hover { border-color: rgba(var(--accent-rgb), 0.55); }
.lang-switch select:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; }
.lang-switch select option { background: #12161f; color: #fff; }
.lang-switch[hidden] { display: none; }




.gallery-link {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px 10px 13px;
  border-radius: 14px;
  background: rgba(12, 16, 26, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #eaf2ff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s, background 0.18s, border-color 0.18s;
}

.gallery-link svg {
  width: 20px;
  height: 20px;
  flex: none;
  fill: var(--accent);
}

.gallery-link:hover {
  background: rgba(var(--accent-rgb), 0.20);
  border-color: rgba(var(--accent-rgb), 0.55);
  transform: translateY(-1px);
}

.gallery-link:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; }
.gallery-link[hidden] { display: none; }


@media (max-width: 640px) {
  .gallery-link { padding: 10px; border-radius: 12px; }
  .gallery-link span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-link { transition: none; }
  .gallery-link:hover { transform: none; }
}











.brand-logo {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 45;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(12, 16, 26, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  line-height: 0;
  transition: background 0.18s, border-color 0.18s;
}

.brand-logo img {
  max-height: 38px;
  max-width: 190px;
  width: auto;
  height: auto;
  display: block;
}


.brand-logo:not([href]) { cursor: default; }
.brand-logo[href]:hover { background: rgba(var(--accent-rgb), 0.18); border-color: rgba(var(--accent-rgb), 0.5); }
.brand-logo:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; }
.brand-logo[hidden] { display: none; }



@media (max-width: 640px) {
  .brand-logo { bottom: 88px; left: 12px; padding: 6px 9px; }
  .brand-logo img { max-height: 26px; max-width: 120px; }
}




.brand-logo-head {
  position: static;
  display: inline-flex;
  margin: 0 0 14px;
  background: none;
  border: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0;
}

.brand-logo-head img { max-height: 46px; max-width: 240px; }
.brand-logo-head[href]:hover { background: none; opacity: 0.85; }

@media (max-width: 640px) {
  .brand-logo-head { bottom: auto; left: auto; margin: 0 0 10px; padding: 0; }
  .brand-logo-head img { max-height: 34px; max-width: 170px; }
}








.open-full {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(12, 16, 26, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #eaf2ff;
  font-size: 19px;
  text-decoration: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
  transition: background 0.18s, border-color 0.18s;
}

.open-full:hover { background: rgba(var(--accent-rgb), 0.20); border-color: rgba(var(--accent-rgb), 0.55); }
.open-full:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; }
.open-full[hidden] { display: none; }

.lang-switch:has(~ .open-full:not([hidden])) { right: 70px; }

@media (prefers-reduced-motion: reduce) {
  .brand-logo, .open-full { transition: none; }
}






.gallery-body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(120% 100% at 50% 0%, #16233a 0%, #0b0f18 60%);
  color: #e6ecf7;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.gallery-head {
  padding: 42px 24px 18px;
  text-align: center;
}

.gallery-head h1 {
  margin: 0;
  font-size: clamp(22px, 4vw, 34px);
  letter-spacing: 0.2px;
}

.gallery-sub {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
}

.tour-grid {
  list-style: none;
  margin: 0 auto;
  padding: 12px 20px 56px;
  max-width: 1200px;
  display: grid;
  
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.tour-grid-single { max-width: 560px; }

.tour-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.18s, border-color 0.18s, background 0.18s;
}

.tour-card-link:hover,
.tour-card-link:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(var(--accent-rgb), 0.45);
  background: rgba(var(--accent-rgb), 0.08);
}

.tour-card-link:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }

.tour-cover {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 1;      
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
}

.tour-cover-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.35);
  font-size: 22px;
  letter-spacing: 2px;
}

.tour-card-body { padding: 14px 16px 16px; }

.tour-card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.tour-card-meta {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
}

.gallery-empty {
  max-width: 520px;
  margin: 40px auto;
  padding: 0 24px;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
}


@media (prefers-reduced-motion: reduce) {
  .tour-card-link { transition: none; }
  .tour-card-link:hover, .tour-card-link:focus-visible { transform: none; }
}






.report-panel {
  position: fixed;
  inset: auto 12px 12px 12px;
  max-height: 70vh;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  background: rgba(10, 14, 20, 0.96);
  border: 1px solid rgba(var(--accent-rgb), 0.55);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  color: #e8eef5;
}
.report-panel[hidden] { display: none; }

.report-panel__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.25);
}
.report-panel__bar strong {
  flex: 1 1 auto;
  min-width: 0;                 
  color: var(--accent);
  font-size: 0.95rem;
}
.report-panel__bar button {
  flex: 0 0 auto;               
  padding: 4px 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.5);
  border-radius: 6px;
  background: transparent;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
}
.report-panel__bar button:hover,
.report-panel__bar button:focus-visible {
  background: var(--accent);
  color: var(--accent-ink);
}

.report-panel pre {
  margin: 0;
  padding: 10px 12px;
  overflow: auto;               
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
