*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0d0f14;
  --surface: #151820;
  --surface-2: #1c2030;
  --surface-3: #232840;
  --border: rgba(255,255,255,0.07);
  --border-active: rgba(99,179,237,0.4);
  --accent: #63b3ed;
  --accent-glow: rgba(99,179,237,0.15);
  --accent-2: #76e4c4;
  --text: #e8eaf0;
  --text-2: #8892a4;
  --text-3: #5a6270;
  --snow: #f0f4ff;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.6);
}

html, body { height: 100%; overflow-x: hidden; }

body {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ─── HEADER ─── */
.header {
  position: sticky; top: 0; z-index: 9999;
  background: rgba(13,15,20,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
}

.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem; font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}

.logo-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}

.logo-icon svg { width: 18px; height: 18px; color: #0d0f14; }

.badge {
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  background: linear-gradient(135deg, rgba(99,179,237,0.2), rgba(118,228,196,0.2));
  border: 1px solid rgba(99,179,237,0.3);
  color: var(--accent);
  padding: 3px 10px; border-radius: 20px;
}

.header-right { display: flex; align-items: center; gap: 1rem; }

.header-link {
  color: var(--text-2); text-decoration: none;
  font-size: 0.875rem; transition: color 0.2s;
}
.header-link:hover { color: var(--text); }

/* ─── MAIN LAYOUT ─── */
.app {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 0;
  height: calc(100vh - 60px);
}

/* ─── PREVIEW SECTION ─── */
.preview-section {
  display: flex; flex-direction: column;
  padding: 1.5rem;
  gap: 1rem;
  overflow-y: auto;
  background: var(--bg);
}

/* ─── SEARCH ─── */
.search-wrap {
  position: relative;
}

.search-box {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-box:focus-within {
  border-color: var(--border-active);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-icon {
  display: flex; align-items: center; padding: 0 1rem;
  color: var(--text-3);
}

.search-input {
  flex: 1;
  background: transparent;
  border: none; outline: none;
  padding: 0.875rem 0;
  font-size: 0.9rem; font-family: inherit;
  color: var(--text);
}
.search-input::placeholder { color: var(--text-3); }

.search-btn {
  padding: 0 1.25rem;
  background: var(--surface-3);
  border: none; border-left: 1px solid var(--border);
  color: var(--accent);
  cursor: pointer;
  transition: background 0.2s;
  display: flex; align-items: center;
}
.search-btn:hover { background: var(--accent-glow); }

/* ─── TABS ─── */
.tabs {
  display: flex; gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
}

.tab-btn {
  flex: 1; padding: 0.625rem;
  background: transparent; border: none;
  border-radius: 10px;
  font-size: 0.8rem; font-weight: 500;
  font-family: inherit; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--text-3);
  cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.tab-btn svg { width: 14px; height: 14px; }

.tab-btn.active {
  background: var(--surface-3);
  color: var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.tab-btn:hover:not(.active) { color: var(--text-2); }

/* ─── MAP ─── */
#map-container {
  flex: 1; position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  min-height: 500px;
  box-shadow: var(--shadow);
}
#map { width: 100%; height: 100%; }

/* Selection overlay */
.selection-box {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid var(--accent);
  pointer-events: none;
  z-index: 500;
  box-shadow: 0 0 0 2000px rgba(13,15,20,0.5),
              inset 0 0 30px rgba(99,179,237,0.05);
}
.selection-corners { position: absolute; width: 100%; height: 100%; }
.corner {
  position: absolute; width: 20px; height: 20px;
  border: 2px solid var(--accent);
}
.corner.tl { top:-2px; left:-2px; border-right:none; border-bottom:none; }
.corner.tr { top:-2px; right:-2px; border-left:none; border-bottom:none; }
.corner.bl { bottom:-2px; left:-2px; border-right:none; border-top:none; }
.corner.br { bottom:-2px; right:-2px; border-left:none; border-top:none; }

.selection-info {
  position: absolute; bottom: -38px; left: 50%;
  transform: translateX(-50%);
  background: rgba(99,179,237,0.15);
  border: 1px solid rgba(99,179,237,0.3);
  color: var(--accent);
  padding: 4px 12px; border-radius: 20px;
  font-size: 0.78rem; font-weight: 500;
  white-space: nowrap; letter-spacing: 0.03em;
}

/* Map overlay controls */
.map-overlay {
  position: absolute; bottom: 1rem; left: 1rem; right: 1rem;
  display: flex; flex-direction: column; gap: 0.75rem;
  pointer-events: none; z-index: 600;
}
.map-overlay > * { pointer-events: auto; }

.map-hint {
  background: rgba(13,15,20,0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.8rem; color: var(--text-2);
}

.map-stats {
  display: flex; gap: 1rem;
  background: rgba(13,15,20,0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.625rem 1rem;
  font-size: 0.78rem; color: var(--text-2);
}
.map-stats span { color: var(--text); font-weight: 500; }

.map-actions { display: flex; gap: 0.5rem; }

.map-btn {
  padding: 0.625rem 1.125rem;
  background: rgba(13,15,20,0.9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 0.8rem; font-weight: 500;
  font-family: inherit; cursor: pointer;
  transition: all 0.2s;
}
.map-btn:hover { border-color: var(--border-active); color: var(--accent); }

.map-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #0d0f14;
  font-weight: 600;
}
.map-btn.primary:hover { background: #90caf9; border-color: #90caf9; }

.mountain-found {
  display: none;
  background: rgba(118,228,196,0.1);
  border: 1px solid rgba(118,228,196,0.3);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.8rem; color: var(--accent-2);
}
.mountain-found strong { display: block; margin-bottom: 2px; }

/* ─── 3D PREVIEW ─── */
#preview-3d-container {
  flex: 1; position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  min-height: 500px;
  display: none;
  box-shadow: var(--shadow);
}
#preview-3d-container.active { display: block; }
#preview-3d { width: 100%; height: 100%; }

.loading-3d {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1rem; background: var(--surface);
}
.loading-spinner {
  width: 36px; height: 36px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-msg { color: var(--text-2); font-size: 0.85rem; }

.export-btn {
  position: absolute; top: 1rem; right: 1rem;
  padding: 0.625rem 1rem;
  background: rgba(13,15,20,0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-2); font-size: 0.8rem;
  font-family: inherit; font-weight: 500;
  cursor: pointer; display: none;
  transition: all 0.2s;
  display: flex; align-items: center; gap: 6px;
}
.export-btn:hover { border-color: var(--border-active); color: var(--accent); }

/* ─── CONFIG PANEL ─── */
.config-panel {
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow-y: auto;
  position: relative;
}

.panel-header {
  padding: 1.5rem 1.5rem 0;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.25rem;
}

.panel-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem; font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.panel-subtitle {
  font-size: 0.8rem; color: var(--text-3);
}

.panel-body { padding: 1.25rem 1.5rem; flex: 1; display: flex; flex-direction: column; gap: 1.5rem; }

/* Sections */
.section-label {
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 0.75rem;
}

/* Size grid */
.size-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
}

.size-opt {
  padding: 0.75rem 0.25rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center; cursor: pointer;
  transition: all 0.2s;
}
.size-opt:hover { border-color: rgba(99,179,237,0.3); }
.size-opt.selected {
  background: var(--accent-glow);
  border-color: var(--accent);
}

.size-name {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em;
  color: var(--text); margin-bottom: 1px;
}
.size-cm {
  font-size: 0.68rem; color: var(--text-3);
}
.size-opt.selected .size-name { color: var(--accent); }
.size-opt.selected .size-cm { color: var(--accent); opacity: 0.7; }

/* Material grid */
.material-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px;
}

.mat-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 0.75rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer; transition: all 0.2s;
}
.mat-opt:hover { border-color: rgba(99,179,237,0.3); }
.mat-opt.selected {
  background: var(--accent-glow);
  border-color: var(--accent);
}

.mat-swatch {
  width: 20px; height: 20px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  flex-shrink: 0;
}

.mat-name {
  font-size: 0.8rem; font-weight: 500; color: var(--text);
}
.mat-sub {
  font-size: 0.68rem; color: var(--text-3);
}
.mat-opt.selected .mat-name { color: var(--accent); }

/* Route section */
.route-btns { display: flex; gap: 6px; margin-bottom: 0.75rem; }

.route-btn {
  flex: 1; padding: 0.625rem;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.8rem; font-weight: 500; font-family: inherit;
  color: var(--text-2); cursor: pointer; transition: all 0.2s;
}
.route-btn:hover { border-color: rgba(99,179,237,0.3); color: var(--text); }
.route-btn.active {
  background: var(--accent-glow); border-color: var(--accent);
  color: var(--accent);
}
.route-btn.danger:hover { border-color: rgba(252,129,74,0.4); color: #fc814a; }

.route-settings { display: flex; flex-direction: column; gap: 0.75rem; }

.setting-row {
  display: flex; align-items: center; justify-content: space-between;
}

.setting-label { font-size: 0.8rem; color: var(--text-2); }

.color-dots { display: flex; gap: 6px; }

.color-dot {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid transparent; cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}
.color-dot:hover { transform: scale(1.15); }
.color-dot.selected { border-color: white; box-shadow: 0 0 0 2px rgba(255,255,255,0.3); }

/* Toggle */
.toggle { position: relative; width: 36px; height: 20px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-track {
  position: absolute; inset: 0;
  background: var(--surface-3); border-radius: 20px;
  cursor: pointer; transition: background 0.2s;
}
.toggle input:checked + .toggle-track { background: var(--accent); }
.toggle-track::after {
  content: ''; position: absolute;
  width: 14px; height: 14px;
  background: white; border-radius: 50%;
  top: 3px; left: 3px;
  transition: transform 0.2s;
}
.toggle input:checked + .toggle-track::after { transform: translateX(16px); }

/* Text input */
.text-input {
  width: 100%; padding: 0.75rem;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text); font-size: 0.85rem; font-family: inherit;
  resize: vertical; min-height: 72px;
  transition: border-color 0.2s;
  line-height: 1.5;
}
.text-input::placeholder { color: var(--text-3); }
.text-input:focus { outline: none; border-color: var(--border-active); }

/* STL action */
.stl-btn {
  width: 100%; padding: 0.875rem;
  background: linear-gradient(135deg, var(--accent), #90caf9);
  border: none; border-radius: var(--radius);
  color: #0d0f14; font-size: 0.9rem; font-weight: 700;
  font-family: inherit; letter-spacing: 0.03em;
  cursor: pointer; transition: opacity 0.2s, transform 0.1s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.stl-btn:hover { opacity: 0.9; }
.stl-btn:active { transform: scale(0.98); }
.stl-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.stl-btn svg { width: 18px; height: 18px; }

/* Panel locked overlay */
.config-panel.locked .panel-body { opacity: 0.4; pointer-events: none; }

.lock-notice {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1.25rem 1.5rem;
  background: rgba(13,15,20,0.95);
  border-top: 1px solid var(--border);
  text-align: center;
}
.lock-notice p { font-size: 0.82rem; color: var(--text-2); line-height: 1.5; }
.lock-notice strong { color: var(--accent); display: block; margin-bottom: 4px; }

/* Divider */
.divider {
  height: 1px; background: var(--border);
}

/* ─── SLIDERS ─── */
.slider-row {
  display: flex; flex-direction: column; gap: 6px;
}

.slider-header {
  display: flex; justify-content: space-between; align-items: center;
}

.slider-label { font-size: 0.8rem; color: var(--text-2); }

.slider-value {
  font-size: 0.78rem; font-weight: 600;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(99,179,237,0.2);
  padding: 2px 8px; border-radius: 20px;
  min-width: 44px; text-align: center;
}

input[type=range] {
  -webkit-appearance: none;
  width: 100%; height: 4px;
  background: var(--surface-3);
  border-radius: 2px; outline: none;
  cursor: pointer;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  cursor: pointer;
  transition: box-shadow 0.15s;
}
input[type=range]::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 5px var(--accent-glow);
}
input[type=range]::-moz-range-thumb {
  width: 16px; height: 16px;
  border: none; border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}

.route-style-btn {
  padding: 4px 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-3);
  cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center;
}
.route-style-btn:hover { border-color: rgba(99,179,237,0.3); color: var(--text-2); }
.route-style-btn.selected {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent);
}

.reset-btn:hover {
  border-color: rgba(252,129,74,0.4);
  color: #fc814a;
}

/* Info bar */
.info-bar {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 0.75rem;
}

.info-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-2); flex-shrink: 0;
}

.info-text { font-size: 0.75rem; color: var(--text-3); line-height: 1.4; }

/* ─── REBUILDING BANNER ─── */
.rebuild-banner {
  position: absolute;
  top: 1rem; left: 50%;
  transform: translateX(-50%) translateY(-120%);
  background: rgba(21,24,32,0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(99,179,237,0.3);
  border-radius: 30px;
  padding: 0.5rem 1.1rem 0.5rem 0.75rem;
  display: flex; align-items: center; gap: 10px;
  font-size: 0.8rem; font-weight: 500;
  color: var(--text-2);
  z-index: 1000;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  opacity: 0;
  white-space: nowrap;
}
.rebuild-banner.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.rebuild-dots {
  display: flex; gap: 4px; align-items: center;
}
.rebuild-dots span {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: rebuildPulse 1.2s ease-in-out infinite;
}
.rebuild-dots span:nth-child(2) { animation-delay: 0.2s; }
.rebuild-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes rebuildPulse {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-active); }

/* ─── LEAFLET OVERRIDES ─── */
.leaflet-control-zoom { border: 1px solid var(--border) !important; background: var(--surface) !important; }
.leaflet-control-zoom a { background: var(--surface-2) !important; color: var(--text-2) !important; border-color: var(--border) !important; }
.leaflet-control-zoom a:hover { background: var(--surface-3) !important; color: var(--text) !important; }

/* ─── AUTOCOMPLETE ─── */
.pac-container {
  background: var(--surface-2) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow-lg) !important;
  font-family: inherit !important;
  margin-top: 4px;
}
.pac-item {
  padding: 0.5rem 1rem !important;
  color: var(--text-2) !important;
  border-top-color: var(--border) !important;
  font-size: 0.85rem !important;
  cursor: pointer !important;
}
.pac-item:hover, .pac-item-selected { background: var(--surface-3) !important; color: var(--text) !important; }
.pac-item-query { color: var(--text) !important; }
.pac-icon { filter: invert(0.7); }
.pac-logo::after { display: none !important; }

/* ─── MOBILE ─── */
.mobile-route-controls {
  position: fixed; bottom: 1.25rem; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 0.75rem;
  background: rgba(21,24,32,0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
  z-index: 10000;
}

.mob-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 0.625rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 600;
  font-family: inherit; cursor: pointer;
  transition: all 0.15s;
}
.mob-btn.finish { background: var(--accent); color: #0d0f14; border: none; }
.mob-btn.clear { background: transparent; color: #fc814a; border: 1px solid rgba(252,129,74,0.3); }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; height: auto; }
  .config-panel { border-left: none; border-top: 1px solid var(--border); }
  .preview-section { height: 80vw; min-height: 400px; }
}

@media (max-width: 600px) {
  .app { grid-template-columns: 1fr; }
  .header { padding: 0 1rem; }
  .size-grid { grid-template-columns: repeat(2, 1fr); }
}

body.no-scroll { position: fixed; overflow: hidden; width: 100%; }

/* ── reset ── */
.stl-gate *, .stl-gate *::before, .stl-gate *::after {
  box-sizing: border-box; margin: 0; padding: 0;
}
 
.stl-gate {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.stl-gate[hidden] { display: none !important; }
 
.stl-gate-backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: sg-fade .2s ease;
}
 
/* ── panel ── */
.stl-gate-panel {
  position: relative; z-index: 1;
  width: 100%; max-width: 380px;
  background: #151820;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.07);
  padding: 28px 24px 22px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.6);
  animation: sg-up .28s cubic-bezier(.34,1.56,.64,1);
  overflow: hidden;
}
 
/* accent top bar */
.stl-gate-panel::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, #63b3ed, #76e4c4, transparent);
  opacity: .7;
}
 
/* ── close ── */
.stl-gate-close {
  position: absolute; top: 12px; right: 12px;
  width: 28px; height: 28px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 7px; color: #5a6270;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .17s;
}
.stl-gate-close:hover { background: rgba(255,255,255,0.1); color: #e8eaf0; }
 
/* ── hero ── */
.stl-gate-hero { text-align: center; margin-bottom: 20px; }
 
.stl-gate-icon-ring {
  width: 48px; height: 48px; margin: 0 auto 12px;
  background: rgba(99,179,237,0.15);
  border: 1px solid rgba(99,179,237,0.4);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #63b3ed;
}
 
.stl-gate-hero h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 17px; font-weight: 600;
  color: #e8eaf0; letter-spacing: -.1px; margin-bottom: 6px;
}
.stl-gate-hero p { font-size: 12.5px; color: #8892a4; line-height: 1.6; }
 
/* ── quick login box ── */
.stl-quicklogin {
  background: #1c2030;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 14px 14px 12px;
}
 
.stl-ql-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 700; color: #5a6270;
  text-transform: uppercase; letter-spacing: .7px; margin-bottom: 10px;
}
 
.stl-ql-field { display: flex; gap: 8px; }
 
.stl-ql-input {
  flex: 1; min-width: 0;
  background: #232840; border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px; padding: 10px 12px;
  font-size: 14px; color: #e8eaf0;
  font-family: inherit; outline: none;
  transition: all .18s;
}
.stl-ql-input::placeholder { color: #5a6270; }
.stl-ql-input:focus {
  border-color: rgba(99,179,237,0.4);
  box-shadow: 0 0 0 3px rgba(99,179,237,0.15);
}
 
.stl-ql-btn {
  width: 40px; height: 40px; flex-shrink: 0;
  background: #63b3ed;
  border: none; border-radius: 8px; color: #0d0f14;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .18s;
}
.stl-ql-btn:hover { background: #90caf9; transform: translateY(-1px); }
.stl-ql-btn:active { transform: translateY(0); }
.stl-ql-btn:disabled { opacity: .4; cursor: not-allowed; transform: none !important; }
 
.stl-ql-hint { font-size: 11px; color: #5a6270; margin-top: 8px; line-height: 1.4; }
 
/* ── separator ── */
.stl-gate-sep {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 0 11px; font-size: 11px; color: #5a6270;
}
.stl-gate-sep::before, .stl-gate-sep::after {
  content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.07);
}
 
/* ── auth page link ── */
.stl-gate-auth-link {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 16px;
  background: transparent;
  border: 1px solid rgba(99,179,237,0.3);
  border-radius: 8px;
  color: #63b3ed; font-size: 13px; font-weight: 600;
  font-family: inherit; text-decoration: none;
  transition: all .18s;
}
.stl-gate-auth-link:hover {
  background: rgba(99,179,237,0.15);
  color: #90caf9; transform: translateY(-1px);
}
 
/* ── OTP view ── */
.stl-otp-head { text-align: center; margin-bottom: 20px; }
 
.stl-otp-anim {
  width: 48px; height: 48px; margin: 0 auto 12px;
  background: rgba(99,179,237,0.15);
  border: 1px solid rgba(99,179,237,0.4);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #63b3ed;
  animation: sg-pulse 2.5s ease-in-out infinite;
}
.stl-otp-head h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 17px; font-weight: 600; color: #e8eaf0; margin-bottom: 5px;
}
.stl-otp-head p { font-size: 12.5px; color: #8892a4; line-height: 1.6; }
.stl-otp-head strong { color: #63b3ed; font-weight: 600; }
 
/* ── digit inputs ── */
.stl-otp-digits {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-bottom: 12px;
}
.stl-digit {
  width: 44px; height: 52px;
  background: #1c2030; border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px; text-align: center;
  font-size: 20px; font-weight: 700; color: #e8eaf0;
  font-family: 'Outfit', monospace; outline: none;
  transition: all .16s;
}
.stl-digit:focus { border-color: rgba(99,179,237,0.4); box-shadow: 0 0 0 3px rgba(99,179,237,0.15); color: #63b3ed; }
.stl-digit.filled { border-color: rgba(99,179,237,0.3); color: #63b3ed; }
.stl-digit.err { border-color: rgba(239,68,68,.5); animation: sg-shake .35s ease; }
.stl-dot-sep { width: 5px; height: 5px; border-radius: 50%; background: #5a6270; margin: 0 2px; }
 
/* ── timer ── */
.stl-otp-timer { text-align: center; font-size: 12px; color: #5a6270; margin-bottom: 12px; }
.stl-otp-timer strong { color: #63b3ed; }
.stl-otp-timer.expired strong { color: #ef4444; }
 
/* ── verify button ── */
.stl-ql-verify-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px;
  background: #63b3ed;
  border: none; border-radius: 8px; color: #0d0f14;
  font-size: 13.5px; font-weight: 700; font-family: inherit; cursor: pointer;
  transition: all .18s; margin-bottom: 8px;
}
.stl-ql-verify-btn:hover { background: #90caf9; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(99,179,237,0.3); }
.stl-ql-verify-btn:disabled { opacity: .4; cursor: not-allowed; transform: none !important; }
 
/* ── otp action links ── */
.stl-otp-actions { display: flex; align-items: center; justify-content: center; gap: 8px; }
.stl-txt-btn {
  background: none; border: none; color: #8892a4; font-size: 12px;
  font-weight: 500; font-family: inherit; cursor: pointer;
  padding: 5px 8px; border-radius: 6px; transition: all .15s;
}
.stl-txt-btn:hover { background: #1c2030; color: #63b3ed; }
.stl-dot { color: #5a6270; }
 
/* ── view / hidden ── */
.stl-view.hidden { display: none; }
 
/* ── feedback ── */
.stl-feedback {
  display: flex; align-items: flex-start; gap: 8px;
  background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.2);
  border-radius: 8px; padding: 10px 12px;
  font-size: 12.5px; color: #f87171; line-height: 1.4; margin-top: 12px;
}
.stl-feedback.ok {
  background: rgba(99,179,237,.08); border-color: rgba(99,179,237,.25); color: #63b3ed;
}
.stl-feedback.hidden { display: none; }
 
/* ── animations ── */
@keyframes sg-fade  { from{opacity:0} to{opacity:1} }
@keyframes sg-up    { from{opacity:0;transform:translateY(14px) scale(.97)} to{opacity:1;transform:none} }
@keyframes sg-shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)} }
@keyframes sg-pulse { 0%,100%{box-shadow:0 0 0 0 rgba(99,179,237,0.15)} 50%{box-shadow:0 0 0 6px transparent} }
 
@media (max-width: 420px) {
  .stl-gate-panel { padding: 22px 16px 18px; }
  .stl-digit { width: 38px; height: 46px; font-size: 18px; }
}