/* ...existing styles... */
:root { color-scheme: dark; --bg:#000; --fg:#e8e8e8; --muted:#9a9a9a; --panel:#0a0a0a; --border:#1a1a1a; --accent:#fff; }
* { box-sizing:border-box; }
html,body { margin:0; height:100%; background:#000; color:var(--fg); font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Noto Sans", sans-serif; text-transform: lowercase; }
#viewer { position:fixed; inset:0; width:100%; height:100%; display:block; background:#000; }

.brand { position:fixed; right:12px; bottom:12px; font-size:12px; letter-spacing:.08em; color:#fff; opacity:.65; background:rgba(0,0,0,.35); border:1px solid var(--border); padding:6px 10px; border-radius:10px; user-select:none; }

.ui.topbar, .ui.bottombar {
  position:fixed; left:0; right:0; display:flex; gap:8px; padding:10px 12px; backdrop-filter: blur(6px);
}
.ui.topbar { top:0; align-items:center; background:linear-gradient(to bottom, rgba(0,0,0,.7), rgba(0,0,0,0)); }
.ui.bottombar { bottom:0; flex-direction:column; background:linear-gradient(to top, rgba(0,0,0,.7), rgba(0,0,0,0)); }
.ui .row { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }

.ui.previews { position:fixed; top:56px; left:12px; right:12px; display:flex; gap:10px; padding:8px 0; overflow:auto; scrollbar-width: thin; }
.ui.previews .thumb { 
  position: relative; 
  display:flex; 
  flex-direction:column; 
  gap:6px; 
  align-items:flex-start; 
}
.ui.previews .thumb .remove-btn {
  position:absolute; 
  top:-6px; 
  right:-6px; 
  width:22px; 
  height:22px;
  border-radius:999px; 
  border:1px solid var(--border);
  background:#101010; 
  color:var(--fg); 
  display:flex; 
  align-items:center; 
  justify-content:center;
  cursor:pointer; 
  opacity:.85; 
  transition:transform .12s ease, opacity .2s;
}
.ui.previews .thumb .remove-btn:hover { 
  transform: scale(1.05); 
  opacity:1; 
}
.ui.previews .thumb canvas { width:110px; height:110px; border:1px solid var(--border); border-radius:10px; background:#0a0a0a; }
.ui.previews .thumb label { font-size:11px; color:var(--muted); padding-left:4px; }

.icon-btn { display:flex; align-items:center; gap:8px; padding:8px 10px; background:#0d0d0d; border:1px solid var(--border); color:var(--fg); border-radius:10px; cursor:pointer; transition: transform .12s ease, background .2s; }
.icon-btn[disabled] { opacity:.4; cursor:not-allowed; }
.icon-btn:hover:not([disabled]) { background:#111; transform:translateY(-1px); }
.icon-btn i { width:18px; height:18px; }
.icon-btn span { font-size:13px; }

.sep { width:1px; height:28px; background:var(--border); }
.spacer { flex:1; }

.panel { position:fixed; top:56px; right:12px; width:min(420px, calc(100% - 24px)); max-height:70vh; overflow:auto; background:var(--panel); border:1px solid var(--border); border-radius:12px; padding:14px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.panel.hidden { display:none; }
.panel h3 { margin:4px 0 10px; font-size:14px; color:var(--fg); }
.panel .control { display:grid; grid-template-columns: 1fr auto 54px; gap:8px; align-items:center; margin:8px 0; }
.panel .control label { color:var(--muted); font-size:12px; grid-column: 1 / 2; }
.panel .control input[type="range"] { grid-column: 2 / 4; width:100%; }
.panel .control input[type="number"] { width:100%; background:#0f0f0f; border:1px solid var(--border); color:var(--fg); border-radius:8px; padding:6px 8px; }

.modal { position:fixed; inset:0; background:rgba(0,0,0,.6); display:flex; align-items:center; justify-content:center; }
.modal.hidden { display:none; }
.modal-content { width:min(460px, 92vw); background:#0b0b0b; border:1px solid var(--border); border-radius:14px; overflow:hidden; }
.modal-header { display:flex; align-items:center; justify-content:space-between; padding:12px 14px; border-bottom:1px solid var(--border); }
.modal-body { padding:12px 14px; display:grid; gap:10px; }
.modal-body .export-maps { display:grid; grid-template-columns: repeat(3, 1fr); gap:8px; }
button.primary { padding:10px 12px; background:#fff; color:#000; border:none; border-radius:10px; cursor:pointer; font-weight:600; }

label { font-size:12px; color:var(--muted); }
select, input[type="number"] { background:#0f0f0f; border:1px solid var(--border); color:var(--fg); border-radius:8px; padding:6px 8px; }
input[type="range"] { accent-color:#fff; }

#boot {
  position: fixed; inset: 0; background: #000;
  display: grid; place-items: center;
  z-index: 9999; opacity: 1; transition: opacity .9s ease;
}
#boot .boot-inner { display:flex; flex-direction:column; align-items:center; gap:16px; opacity:0; transform: translateY(4px); transition: opacity .4s ease, transform .4s ease; }
#boot.show .boot-inner { opacity:1; transform: translateY(0); }
#boot .boot-logo { width:min(300px, 60vw); height:auto; image-rendering: auto; }
#boot .boot-loading { width:auto; height:auto; display:block; }
#boot.fade { opacity:0; pointer-events:none; }