/* Morphr Studio — docked Explorer + viewport (not full-bleed canvas overlay) */
:root {
  --bg: #0c0c0e;
  --panel: rgba(22, 22, 26, 0.92);
  --panel-solid: #16161a;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8e8ea;
  --muted: #8b8b93;
  --accent: #3d8bfd;
  --accent-2: #5fd8d2;
  --danger: #f07178;
  --ok: #7fd99a;
  --fab: rgba(28, 28, 34, 0.94);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --radius: 10px;
  --font: "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, Consolas, monospace;
  --z-viewport: 0;
  --z-chrome: 20;
  --z-fab: 30;
  --z-modal: 50;
}
* { box-sizing: border-box; }
html, body, #app {
  height: 100%; margin: 0;
  background: var(--bg); color: var(--text);
  font: 12px/1.35 var(--font);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
#app { min-height: 0; }

/* ---- Fixed app chrome (creator MenuBar parity) ---- */
.topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 0 4px;
  background: var(--panel-solid);
  border-bottom: 1px solid var(--border);
  z-index: 60;
  min-height: 36px;
}
.topbar .spacer { flex: 1; }
.topbar-status {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--muted);
}
.topbar-status strong { color: var(--text); font-weight: 600; }
.menubar { display: flex; align-items: center; gap: 8px; }
.menubar-menus { display: flex; gap: 0; }
.menu { position: relative; }
.menu-title {
  background: none; border: none; color: var(--text);
  padding: 8px 10px; border-radius: 0; cursor: pointer; font-size: 13px;
}
.menu-title:hover, .menu-title.active { background: #2a2a32; }
.menu-drop {
  position: absolute; top: 100%; left: 0; z-index: 70;
  min-width: 240px;
  background: var(--panel-solid); border: 1px solid var(--border);
  border-radius: 6px; padding: 4px;
  box-shadow: var(--shadow);
}
.menu-item {
  display: flex; justify-content: space-between; gap: 16px;
  width: 100%; text-align: left;
  background: none; border: none; color: var(--text);
  padding: 6px 10px; border-radius: 4px; cursor: pointer;
  font-size: 13px; white-space: nowrap;
}
.menu-item:hover:not(:disabled) { background: #2a2a32; color: var(--accent-2); }
.menu-item:disabled { color: var(--muted); cursor: default; opacity: 0.6; }
.menu-item.sep { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 8px; }
.menu-item .kv { color: var(--muted); font-size: 11px; }
.menubar-tools { display: flex; align-items: center; gap: 2px; padding-left: 8px; border-left: 1px solid var(--border); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 1px solid transparent; color: var(--text);
  padding: 5px; border-radius: 4px; cursor: pointer; width: 28px; height: 28px;
}
.icon-btn:hover:not(:disabled) { background: #2a2a32; border-color: var(--border); color: var(--accent-2); }
.icon-btn:disabled { color: var(--muted); cursor: default; opacity: 0.45; }
.icon-btn svg.feather { display: block; }
.tool-sep { width: 1px; height: 18px; background: var(--border); margin: 0 4px; }
button, input, select, textarea {
  font: inherit; color: inherit;
  background: #2a2a32; border: 1px solid var(--border);
  border-radius: 6px; padding: 4px 8px;
}
button { cursor: pointer; background: #25252c; }
button:hover { background: #303038; }
button.primary { background: var(--accent); border-color: transparent; color: #fff; }
button.active, button[aria-pressed="true"] {
  outline: 1px solid var(--accent); color: #fff; background: #1a2a44;
}
.topbar button.active,
.ws-toggle button.active,
.ws-tabs button.active {
  outline: none;
}
.topbar button.menu-title,
.topbar button.icon-btn,
.topbar button.menu-item {
  background: none;
  border: 1px solid transparent;
}
.topbar button.menu-title:hover, .topbar button.menu-title.active { background: #2a2a32; }
.topbar button.icon-btn:hover:not(:disabled) { background: #2a2a32; border-color: var(--border); }
.topbar button.menu-item:hover:not(:disabled) { background: #2a2a32; }
input[type="number"] { width: 100%; min-width: 0; }
input[type="color"] { padding: 0; width: 28px; height: 22px; border: none; background: none; cursor: pointer; }
a { color: #7eb8ff; text-decoration: none; }

.auth-wrap {
  max-width: 420px; padding: 28px; margin: auto;
  background: var(--panel-solid); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow);
}
.auth-wrap h1 { margin: 0 0 6px; font-size: 18px; }
.connect {
  max-width: 640px; width: 100%;
  margin: 0 auto; padding: 24px 20px;
  overflow: auto; flex: 1; min-height: 0;
}
.auth-wrap label { display: block; margin: 10px 0 4px; color: var(--muted); }
.auth-wrap input { width: 100%; }
.auth-wrap .row { display: flex; gap: 8px; margin-top: 16px; }
.auth-wrap .err { color: var(--danger); margin-top: 8px; }

/* Workspace home — tab strip + sidebar + files */
.ws-shell {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}
.ws-tabs {
  flex: 0 0 auto;
  display: flex;
  align-items: stretch;
  min-height: 36px;
  background: #101014;
  border-bottom: 1px solid var(--border);
  z-index: 8;
}
.ws-tabs svg.feather { display: block; }
.ws-tabs-house {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  flex: 0 0 36px;
  background: transparent;
  border: none;
  border-radius: 0;
  color: var(--muted);
  padding: 0;
}
.ws-tabs-house:hover { background: #1a1a20; color: var(--text); }
.ws-tabs-house:focus-visible,
.ws-tabs-plus:focus-visible {
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border);
}
.ws-tabs-house.is-on {
  background: var(--panel-solid);
  color: var(--text);
  box-shadow: inset 0 -1px 0 var(--panel-solid);
}
.ws-tabs-house.is-on:focus-visible {
  box-shadow: inset 0 -1px 0 var(--panel-solid), inset 0 0 0 1px var(--border);
}
.ws-tabs-list {
  display: flex;
  align-items: stretch;
  flex: 0 1 auto;
  min-width: 0;
  max-width: calc(100% - 72px);
  overflow-x: auto;
  scrollbar-width: thin;
}
.ws-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  min-width: 96px;
  max-width: 176px;
  padding: 0 6px 0 12px;
  background: transparent;
  border: none;
  border-radius: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.ws-tab-label { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ws-tab-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-left: auto;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  opacity: 0.4;
}
.ws-tab:hover .ws-tab-close,
.ws-tab.is-on .ws-tab-close,
.ws-tab:focus-within .ws-tab-close { opacity: 1; }
.ws-tab-close:hover { background: #2a2a32; color: var(--text); }
.ws-tab:hover { background: #1a1a20; color: var(--text); }
.ws-tab:focus { outline: none; }
.ws-tab:focus-visible { background: #1a1a20; color: var(--text); }
.ws-tab.is-on {
  background: var(--panel-solid);
  color: var(--text);
  box-shadow: inset 0 -1px 0 var(--panel-solid);
}
.ws-tabs-plus-wrap { position: relative; flex: 0 0 auto; }
.ws-tabs-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  flex: 0 0 32px;
  height: 100%;
  background: transparent;
  border: none;
  border-radius: 0;
  color: var(--muted);
  padding: 0;
}
.ws-tabs-plus:hover { background: #1a1a20; color: var(--text); }
.ws {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  background: var(--bg);
}
.ws-side {
  width: 248px;
  flex: 0 0 248px;
  border-right: 1px solid var(--border);
  background: var(--panel-solid);
  display: flex;
  flex-direction: column;
  padding: 8px 8px 12px;
  gap: 4px;
  min-height: 0;
  overflow: auto;
}
.ws-side button:focus { outline: none; }
.ws-side button:focus-visible { box-shadow: inset 0 0 0 1px var(--border); }
.ws-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 6px 8px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
}
.ws-profile:hover { background: #1e1e24; }
.ws-profile svg { color: var(--muted); flex: 0 0 auto; }
.ws-avatar {
  width: 26px; height: 26px; border-radius: 7px;
  background: #1a2a44; color: #9ec1ff;
  display: grid; place-items: center; font-weight: 600; flex: 0 0 auto;
}
.ws-profile-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ws-profile-copy strong { font-size: 13px; font-weight: 600; }
.ws-profile-copy span { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.ws-profile-wrap { position: relative; }
.ws-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 6;
  display: flex; flex-direction: column; gap: 2px;
  background: #1c1c22; border: 1px solid var(--border); border-radius: 8px; padding: 4px;
}
.ws-menu[hidden],
.ws-plus-menu[hidden] { display: none; }
.ws-plus-menu {
  position: absolute; right: 4px; top: calc(100% + 4px); z-index: 9;
  min-width: 180px;
  display: flex; flex-direction: column; gap: 2px;
  background: #1c1c22; border: 1px solid var(--border); border-radius: 8px; padding: 4px;
}
.ws-plus-menu button {
  display: flex; align-items: center; gap: 8px;
  width: 100%; text-align: left; background: none; border: none; padding: 7px 8px; border-radius: 6px;
}
.ws-plus-menu button:hover { background: #2a2a32; }
.ws-menu button {
  display: flex; align-items: center; gap: 8px;
  width: 100%; text-align: left; background: none; border: none; padding: 7px 8px; border-radius: 6px;
}
.ws-menu button:hover { background: #2a2a32; }
.ws-nav { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; }
.ws-section { display: flex; flex-direction: column; gap: 1px; flex: 0 0 auto; }
.ws-section-projects { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.ws-section-invites { margin-top: 8px; }
.ws-group { display: flex; flex-direction: column; gap: 1px; }
.ws-group-row {
  display: flex; align-items: center; gap: 2px;
  border-radius: 6px;
}
.ws-group-row:hover, .ws-group-row:focus-within { background: #1e1e24; }
.ws-group-toggle {
  display: flex; align-items: center; gap: 6px;
  flex: 1; min-width: 0;
  text-align: left; background: none; border: none;
  padding: 5px 4px 5px 6px; border-radius: 6px;
  color: var(--text); font-size: 13px; font-weight: 500;
}
.ws-group-toggle:hover, .ws-proj:hover { background: transparent; }
.ws-group-toggle span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-group-toggle svg { flex: 0 0 auto; color: var(--muted); }
.ws-group-add, .ws-row-more {
  width: 22px; height: 22px; padding: 0; flex: 0 0 auto;
  display: grid; place-items: center;
  background: none; border: none; border-radius: 4px; color: var(--muted);
  opacity: 0;
}
.ws-group-row:hover .ws-group-add,
.ws-group-row:hover .ws-row-more,
.ws-group-row:focus-within .ws-group-add,
.ws-group-row:focus-within .ws-row-more,
.ws-proj-row:hover .ws-row-more,
.ws-proj-row:focus-within .ws-row-more,
.ws-group-add:focus-visible,
.ws-row-more:focus-visible {
  opacity: 1;
}
.ws-group-add:hover, .ws-row-more:hover { background: transparent; color: var(--text); }
.ws-group-body { display: flex; flex-direction: column; gap: 1px; padding-left: 10px; }
.ws-proj-row {
  display: flex; align-items: center; gap: 2px;
  border-radius: 6px;
}
.ws-proj-row.is-on,
.ws-proj-row:hover,
.ws-proj-row:focus-within { background: #1e1e24; }
.ws-label {
  color: var(--muted); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 8px 6px;
}
.ws-dest, .ws-proj, .ws-ghost {
  display: flex; align-items: center; gap: 8px;
  width: 100%; text-align: left; background: transparent;
  border: 1px solid transparent;
  padding: 6px 8px; border-radius: 6px; color: var(--text);
}
.ws-dest svg, .ws-proj svg, .ws-ghost svg { flex: 0 0 auto; }
.ws-proj { color: var(--muted); flex: 1; min-width: 0; padding: 5px 6px; }
.ws-proj span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-dest:hover, .ws-ghost:hover { background: #1e1e24; color: var(--text); }
.ws-dest.is-on {
  background: #1e1e24;
  color: var(--text);
}
.ws-ghost { color: var(--muted); padding-top: 5px; padding-bottom: 5px; }
.ws-invite-row {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 8px; border-radius: 6px;
}
.ws-invite-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--text); }
.ws-side-foot { margin-top: auto; }
.ws-main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.ws-main:focus { outline: none; }
.ws-bar {
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px 20px 12px; border-bottom: 1px solid var(--border);
}
.ws-bar-recents { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; }
.ws-bar-recents .ws-bar-tools { width: auto; flex: 1; min-width: 0; }
.ws-bar-recents .ws-search { flex: 1; max-width: 360px; }
.ws-bar-recents .ws-search input { width: 100%; min-width: 0; }
.ws-bar-recents .ws-actions { flex: none; }
.ws-bar-top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.ws-bar-tools {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.ws-title h1 { margin: 0; font-size: 20px; font-weight: 600; }
.ws-crumbs { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.ws-crumb { background: none; border: none; color: var(--muted); padding: 0; display: inline-flex; gap: 6px; align-items: center; }
.ws-crumb:hover { color: var(--text); }
.ws-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ws-sel-count { color: var(--muted); font-size: 13px; white-space: nowrap; }
.ws-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 6px;
}
a.ws-btn {
  background: #25252c; border: 1px solid var(--border); color: var(--text); cursor: pointer;
}
a.ws-btn:hover { background: #303038; color: var(--text); }
.ws-btn.primary { background: var(--accent); border-color: transparent; color: #fff; }
.ws-search {
  display: flex; align-items: center; gap: 6px;
  background: #1c1c22; border: 1px solid var(--border); border-radius: 6px;
  padding: 0 8px; height: 28px; color: var(--muted);
}
.ws-search input {
  background: transparent; border: none; color: var(--text);
  width: 140px; outline: none; font: inherit;
}
.ws-select { color: var(--muted); font-size: 11px; display: flex; align-items: center; gap: 6px; }
.ws-toggle { display: flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.ws-toggle button { width: 32px; height: 28px; border: none; border-radius: 0; background: #1c1c22; }
.ws-toggle button.active { background: #1a2a44; }
.ws-files { flex: 1; overflow: auto; padding: 16px 20px 32px; min-height: 0; }
.ws-files.grid,
.ws-recent-continue {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  grid-auto-rows: max-content;
  gap: 10px;
  align-content: start;
  align-items: start;
  justify-content: start;
}
.ws-files.list { display: flex; flex-direction: column; gap: 0; flex: 1; padding: 4px 12px 24px; }
.ws-file {
  display: flex; flex-direction: column; align-items: stretch; gap: 8px;
  text-align: left; background: #16161a; border: 1px solid var(--border);
  border-radius: 10px; padding: 10px; width: 100%; max-width: 100%;
  height: auto; min-height: auto; overflow: hidden;
  user-select: none;
}
.ws-file-head {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 7.5rem;
  align-items: center; gap: 10px;
  padding: 8px 10px 6px; color: var(--muted);
  font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase;
  border-bottom: 1px solid var(--border); margin-bottom: 2px;
  user-select: none;
}
.ws-files.list .ws-file {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 7.5rem;
  align-items: center; gap: 10px;
  padding: 5px 10px; min-height: 36px; height: 36px;
  border: none; border-radius: 6px; background: transparent; width: auto;
}
.ws-files.list .ws-file:hover { background: #1c1c22; border-color: transparent; }
.ws-files.list .ws-file.selected { outline: none; background: #1a2a44; }
.ws-file:hover { border-color: var(--accent); background: #1c1c22; }
.ws-file.selected { outline: 1px solid var(--accent); background: #1a2a44; }
.ws-file.drop-over,
.ws-proj-row.drop-over,
.ws-crumb.drop-over,
.ws-recent-project-name.drop-over {
  outline: 1px solid var(--accent);
  background: #1a2a44;
}
.ws-files.list .ws-file.drop-over { outline: none; }
.ws-file-icon,
.ws-file-thumb {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex: 0 0 auto;
  color: var(--muted); background: #0e0e12; border-radius: 6px;
  overflow: hidden;
}
.ws-file-thumb { object-fit: contain; image-rendering: pixelated; }
.ws-file-icon svg.feather {
  width: 18px; height: 18px; flex: 0 0 auto; display: block;
}
.ws-files.grid .ws-file-icon,
.ws-files.grid .ws-file-thumb,
.ws-recent-continue .ws-file-icon,
.ws-recent-continue .ws-file-thumb {
  width: 100%; height: 88px; flex: 0 0 88px;
}
.ws-files.grid .ws-file-icon svg.feather,
.ws-recent-continue .ws-file-icon svg.feather {
  width: 28px; height: 28px;
}
.ws-files.list .ws-file-icon,
.ws-files.list .ws-file-thumb {
  width: 24px; height: 24px; flex: none; border-radius: 4px; background: transparent;
}
.ws-files.list .ws-file-icon svg.feather { width: 16px; height: 16px; }
.ws-files.list .ws-file.folder .ws-file-icon { color: #c9a227; }
.ws-recent-continue .ws-file-icon,
.ws-recent-continue .ws-file-thumb,
.ws-recent-continue .sk-thumb { height: 96px; flex-basis: 96px; }
.ws-file-name {
  font-size: 13px; font-weight: 600; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.ws-files.list .ws-file-name { flex: none; font-weight: 500; }
.ws-file-meta { color: var(--muted); font-size: 11px; line-height: 1.3; min-width: 0; }
.ws-files.list .ws-file-meta,
.ws-file-head .ws-file-meta {
  margin-left: 0; text-align: right; font-variant-numeric: tabular-nums;
}
.ws-empty { color: var(--muted); padding: 48px 20px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.ws-empty p { margin: 0; }
.ws-recent { flex: 1; overflow: auto; padding: 8px 20px 32px; }
.ws-recent-label {
  color: var(--muted); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 16px 2px 8px;
}
.ws-recent-continue-wrap .ws-recent-label { padding-top: 4px; }
.ws-recent-group .ws-files.list { flex: none; overflow: visible; padding: 0; }
.ws-recent-project { padding-bottom: 12px; }
.ws-recent-project-name {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 4px 2px 0; padding: 0; border: none; background: none;
  color: var(--text); font-size: 15px; font-weight: 600;
}
button.ws-recent-project-name:hover { color: var(--accent); }

.vh {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.spin {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin-rotate 0.7s linear infinite;
  flex: 0 0 auto;
}
.spin-sm { width: 14px; height: 14px; }
.spin-center {
  position: relative;
  flex: 1 1 auto;
  display: grid;
  place-items: center;
  min-height: 0;
  width: 100%;
}
@keyframes spin-rotate { to { transform: rotate(360deg); } }
.sk {
  display: block;
  background: #1c1c22;
  border-radius: 6px;
  animation: sk-pulse 1.2s ease-in-out infinite;
}
.sk-line { height: 10px; width: 100%; max-width: 140px; }
.sk-meta { height: 8px; max-width: 64px; }
.sk-avatar {
  width: 26px; height: 26px; border-radius: 7px; flex: 0 0 auto;
}
.sk-row { height: 28px; width: 100%; margin: 2px 0; border-radius: 6px; }
.sk-thumb { width: 100%; height: 88px; border-radius: 6px; }
.ws-files.list .sk-thumb { width: 24px; height: 24px; flex: none; border-radius: 4px; }
.ws-file.sk-tile, .ws-file.sk-tile:hover {
  pointer-events: none;
  border-color: var(--border);
  background: #16161a;
  cursor: default;
}
.ws-files.list .ws-file.sk-tile,
.ws-files.list .ws-file.sk-tile:hover {
  background: transparent;
  border: none;
}
.ws-file.sk-tile .sk-line { width: 70%; }
@keyframes sk-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}
button[aria-busy="true"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.5em;
}
@media (prefers-reduced-motion: reduce) {
  .spin { animation: none; opacity: 0.85; }
  .sk { animation: none; opacity: 0.7; }
}
.ws-ctx {
  position: fixed; z-index: 80; min-width: 180px;
  background: #16161a; border: 1px solid var(--border); border-radius: 8px;
  padding: 4px; box-shadow: var(--shadow);
}
.ws-ctx button {
  display: block; width: 100%; text-align: left; background: none; border: none;
  padding: 7px 10px; border-radius: 5px;
}
.ws-ctx button:hover { background: #2a2a32; }
.ws-ctx button.danger { color: var(--danger); }
.ws-dialog-back {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(0,0,0,.45); display: grid; place-items: center;
}
.ws-dialog {
  width: min(420px, calc(100% - 32px));
  background: var(--panel-solid); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 10px;
}
.ws-dialog h2 { margin: 0; font-size: 16px; }
.ws-dialog label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); }
.ws-dialog input, .ws-dialog select, .ws-dialog textarea {
  background: #1c1c22; border: 1px solid var(--border); border-radius: 6px;
  color: var(--text); padding: 7px 8px; font: inherit;
}
.ws-dialog-err { color: var(--danger); margin: 0; font-size: 12px; }
.ws-dialog-row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.ws-btn.danger { color: #fff; background: #5a2024; border-color: transparent; }
.ws-invite, .ws-invite-out { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 4px 0; }
.ws-invite span { font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.ws-pending { margin-top: 8px; }
.ws-member-list { margin: 0; padding-left: 18px; color: var(--muted); }
.ws-invite-out[hidden] { display: none; }
.ws-settings-dialog {
  width: min(780px, calc(100% - 32px));
  height: min(560px, 85vh);
  padding: 0;
  gap: 0;
  overflow: hidden;
}
.ws-settings-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--border); flex: 0 0 auto;
}
.ws-settings-head h2 { margin: 0; font-size: 16px; }
.ws-settings-close, .ws-icon-btn {
  width: 32px; height: 32px; padding: 0;
  display: grid; place-items: center;
  background: none; border: none; border-radius: 6px; color: var(--muted); flex: 0 0 auto;
}
.ws-settings-close:hover, .ws-icon-btn:hover { background: #1e1e24; color: var(--text); }
.ws-settings-split {
  display: flex; flex: 1 1 auto; min-height: 0;
}
.ws-settings-nav {
  width: 196px; flex: 0 0 196px;
  border-right: 1px solid var(--border);
  padding: 8px;
  display: flex; flex-direction: column; gap: 1px;
  overflow: auto;
}
.ws-settings-nav .ws-dest { font-size: 13px; }
.ws-settings-nav .ws-dest svg { color: var(--muted); }
.ws-settings-nav .ws-dest.is-on svg { color: var(--text); }
.ws-settings-nav .ws-dest span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-settings-content {
  flex: 1; min-width: 0; min-height: 0; overflow: auto;
}
.ws-settings {
  padding: 20px 24px 28px;
  display: flex; flex-direction: column; gap: 14px;
}
.ws-settings-lead h2 { margin: 0; font-size: 16px; font-weight: 600; }
.ws-settings-lead .ws-muted { margin: 6px 0 0; font-size: 12px; line-height: 1.45; }
.ws-settings-form { display: flex; flex-direction: column; gap: 12px; max-width: 400px; }
.ws-settings label, .ws-field { display: flex; flex-direction: column; gap: 5px; }
.ws-field-label, .ws-settings label { color: var(--muted); font-size: 12px; }
.ws-field-static { margin: 0; color: var(--text); font-size: 13px; }
.ws-settings input {
  background: #1c1c22; border: 1px solid var(--border); border-radius: 6px;
  color: var(--text); padding: 7px 8px; font: inherit; width: 100%; max-width: 400px;
}
.ws-settings-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ws-settings-empty, .ws-settings-revoked { margin: 0; font-size: 12px; color: var(--muted); }
.ws-settings-warn { margin: 0; font-size: 12px; }
.ws-radio { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 13px; }
.ws-radio input { width: auto; max-width: none; }
.ws-rbx-form { max-width: 440px; position: relative; }
.ws-rbx-shortcut { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ws-rbx-shortcut .ws-hint { flex: 1 1 160px; }
.ws-seg {
  display: flex; gap: 0; padding: 0; margin: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
  background: #1c1c22; position: relative; min-inline-size: 0;
}
.ws-seg legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ws-seg-opt {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  margin: 0; padding: 8px 10px; color: var(--muted); font-size: 13px; cursor: pointer; user-select: none;
}
.ws-seg-opt:has(input:checked) { background: #2a2a34; color: var(--text); font-weight: 600; }
.ws-seg-opt + .ws-seg-opt { border-left: 1px solid var(--border); }
.ws-seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.ws-key-row { display: flex; align-items: center; gap: 6px; }
.ws-key-row input { flex: 1; min-width: 0; max-width: none; }
.ws-secret { -webkit-text-security: disc; }
.ws-autofill-trap {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  pointer-events: none;
}
.ws-rbx-status {
  display: flex; align-items: flex-start; gap: 10px;
  background: #1c1c22; border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; max-width: 440px;
}
.ws-rbx-status strong { display: block; font-size: 13px; font-weight: 600; }
.ws-rbx-status .ws-muted { margin: 3px 0 0; font-size: 12px; }
.ws-rbx-status .status-pill { margin-top: 2px; flex: 0 0 auto; }
.ws-ext {
  color: var(--accent); text-decoration: none;
}
.ws-ext:hover { text-decoration: underline; }
.ws-device-code {
  font: 22px/1.2 ui-monospace, Consolas, monospace;
  letter-spacing: 0.14em;
  margin: 12px 0 8px;
  color: var(--text);
}
.ws-settings-sub { margin: 4px 0 0; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.ws-steps {
  margin: 0; padding-left: 18px; color: var(--muted); font-size: 12px; line-height: 1.55;
}
.ws-copy-row {
  display: flex; align-items: center; gap: 6px;
  background: #1c1c22; border: 1px solid var(--border); border-radius: 6px;
  padding: 2px 4px 2px 10px; min-height: 34px;
}
.ws-copy-row code {
  flex: 1; min-width: 0; word-break: break-all; font-size: 12px; color: var(--text);
}
.ws-cred-list { display: flex; flex-direction: column; gap: 6px; }
.ws-cred {
  display: flex; align-items: center; gap: 10px;
  background: #1c1c22; border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 10px;
}
.ws-cred-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ws-cred-meta strong { font-size: 13px; font-weight: 600; }
.ws-cred-meta code { font-size: 11px; color: var(--muted); word-break: break-all; }
.ws-settings code { word-break: break-all; }
.ws-muted { color: var(--muted); }
.ws-token-list { padding-left: 18px; color: var(--muted); }
.unit-grid { display: none; }
.status-pill {
  display: inline-block; font-size: 10px; padding: 2px 7px;
  border-radius: 999px; background: #2a2a32; color: var(--muted);
}
.status-pill.complete { background: #1b3d2a; color: var(--ok); }

/* Editor = fixed left Explorer + viewport stage beside it (never full-bleed overlay). */
.editor {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  align-items: stretch;
}
.editor.explorer-collapsed {
  grid-template-columns: 0 minmax(0, 1fr);
}
/* Solid dock — grid cell 1; never absolute over the mesh */
.dock-left {
  position: relative;
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #141418;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  z-index: 3;
  min-height: 0;
  pointer-events: auto;
  overflow: hidden;
}
.dock-left.collapsed {
  border-right: none;
  pointer-events: none;
  visibility: hidden;
}
.dock-left .dock-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex: 0 0 auto;
  cursor: default;
}
.dock-left .dock-head .grow { flex: 1; }
.dock-left .dock-head button {
  width: 22px; height: 22px; padding: 0; border-radius: 5px; font-size: 12px;
  cursor: pointer;
}
.dock-left .tree {
  flex: 1;
  min-height: 0;
  overflow: auto;
  user-select: text;
}
/* 3D photograph — grid cell 2 only (remaining width) */
.viewport-stage {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #0b0a10;
  z-index: 1;
  isolation: isolate;
}
/* Canvas layer under chrome — WebGL must not cover HTML tools */
.stage-canvas-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.stage-loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  background: #0b0a10;
  pointer-events: auto;
}
.stage-loading[hidden] { display: none; }
.stage-chrome {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.stage-chrome > * {
  pointer-events: auto;
}
.viewport-stage.qa .fab-rail,
.viewport-stage.qa #panel-attrs,
.viewport-stage.qa #panel-timeline {
  display: none !important;
}
#viewport-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  z-index: 0;
  touch-action: none;
}
/* Keep reopen out of the grid flow */
.explorer-reopen {
  display: none;
  position: absolute;
  left: 0; top: 48%;
  z-index: 40;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  padding: 10px 4px;
  border-radius: 0 8px 8px 0;
  border: 1px solid var(--border);
  border-left: none;
  background: var(--panel-solid);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  grid-column: 1;
  grid-row: 1;
}
.editor.explorer-collapsed:not(.qa-mode) .explorer-reopen {
  display: block;
}

.corner {
  position: absolute; z-index: var(--z-chrome);
  pointer-events: none;
}
.corner > * { pointer-events: auto; }
.corner-tl { top: 12px; left: 64px; display: flex; gap: 8px; align-items: center; }
.corner-tr { top: 12px; right: 12px; display: flex; gap: 8px; align-items: center; }
.corner-bl { bottom: 12px; left: 64px; }
.corner-br { bottom: 12px; right: 12px; text-align: right; color: var(--muted); font-size: 11px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 999px;
  background: var(--fab); border: 1px solid var(--border);
  box-shadow: var(--shadow); backdrop-filter: blur(10px);
}
.chip strong { font-weight: 600; }
.chip .muted { color: var(--muted); }

/* Tool rail: inside stage chrome, top-left, labeled so it can't vanish as icon-only */
.fab-rail {
  position: absolute; left: 10px; top: 10px; transform: none;
  z-index: var(--z-fab);
  display: flex; flex-direction: column; gap: 4px;
  padding: 6px;
  background: #1c1c24;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px; box-shadow: var(--shadow);
}
.fab-rail button {
  width: 52px; min-height: 44px; padding: 4px 2px;
  border-radius: 8px; border: 1px solid transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  color: #f2f2f4;
  background: #25252c;
}
.fab-rail button .tool-ico { display: flex; line-height: 0; }
.fab-rail button .tool-ico svg.feather { width: 16px; height: 16px; stroke: currentColor; }
.fab-rail button .tool-lbl {
  font-size: 9px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--muted); line-height: 1;
}
.fab-rail button.active {
  background: #1a2a44;
  outline: 1px solid var(--accent);
  color: #fff;
}
.fab-rail button.active .tool-lbl { color: var(--accent-2); }
.fab-rail button:hover { background: #303038; }
.fab-rail .sep { height: 1px; background: var(--border); margin: 4px 2px; }
.inc-box {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 4px 0 2px; color: var(--muted); font-size: 9px;
}
.inc-box[hidden] { display: none !important; }
.inc-box.active { color: var(--accent-2); }
.inc-box input {
  width: 36px; padding: 2px 0; text-align: center; font-size: 11px;
  border-radius: 4px;
}
.space-box {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 2px 0;
}
.space-box[hidden] { display: none !important; }
.space-box button {
  width: 28px; min-height: 22px; padding: 0;
  font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
}
.fab-palette {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 3px;
  padding: 4px 0 2px; max-width: 52px;
}
.fab-palette[hidden] { display: none !important; }
.fab-swatch {
  width: 14px !important; height: 14px !important; min-height: 14px !important;
  padding: 0 !important; border-radius: 3px !important;
  border: 1px solid rgba(255,255,255,0.25) !important;
}
.fab-swatch.active {
  outline: 1px solid #fff;
  border-color: #fff !important;
}

#view-hud {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: var(--z-chrome);
  width: 220px;
  padding: 8px 10px;
  background: var(--fab);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  font-size: 11px;
  pointer-events: auto;
}
#view-hud .view-btns {
  display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px;
}
#view-hud .view-btns button {
  padding: 3px 7px; font-size: 10px; border-radius: 5px;
}
#view-hud .view-btns button.active {
  outline: 1px solid var(--accent); background: #1a2a44;
}
#view-hud .legend-row {
  display: flex; gap: 6px; margin: 2px 0; color: var(--muted);
  line-height: 1.35;
}
#view-hud .legend-row strong { color: var(--text); font-weight: 600; }
#view-hud .axis-key {
  display: flex; gap: 8px; margin: 6px 0 4px; font-family: var(--mono); font-size: 10px;
}
#view-hud .axis-key .ax-x { color: #e74c3c; }
#view-hud .axis-key .ax-y { color: #2ecc71; }
#view-hud .axis-key .ax-z { color: #3498db; }
#view-hud .front-note { color: var(--accent-2); font-size: 10px; margin: 2px 0 6px; }
#view-hud .gate-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
#view-hud .gate-chip {
  font-size: 9px; padding: 2px 6px; border-radius: 999px;
  background: #2a2a32; color: var(--muted);
}
#view-hud .gate-chip.ok { background: #1b3d2a; color: var(--ok); }
#view-hud .gate-chip.bad { background: #3d1b1b; color: #ffc4c7; }
#crop48 {
  margin-top: 8px;
  width: 192px;
  height: 192px;
  image-rendering: pixelated;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #0a0a0c;
  display: block;
}
#crop48[hidden] { display: none; }

.overlay-panel {
  position: absolute;
  z-index: var(--z-chrome);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.overlay-panel .float-head {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  user-select: none; font-size: 11px; font-weight: 600;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em;
  cursor: default;
}
.overlay-panel .float-head .grow { flex: 1; }
.overlay-panel .float-head button {
  width: 22px; height: 22px; padding: 0; border-radius: 5px; font-size: 12px;
}
.overlay-panel .float-body { overflow: auto; flex: 1; min-height: 0; }
/* attrs sit under view-hud when both visible (right margin, off silhouette) */
.viewport-stage:not(.qa) #panel-attrs:not([hidden]) {
  top: auto;
  bottom: 64px;
  right: 12px;
  max-height: min(320px, calc(100% - 220px));
}
#panel-attrs {
  top: auto;
  bottom: 64px;
  right: 12px;
  width: 248px;
  max-height: min(320px, calc(100% - 220px));
}
#panel-attrs.has-hud {
  top: auto;
  bottom: 64px;
  max-height: min(320px, calc(100% - 220px));
}
#panel-timeline {
  left: 50%;
  transform: translateX(-50%);
  bottom: 56px;
  width: min(720px, calc(100% - 140px));
  max-height: 150px;
}
#panel-timeline[hidden] { display: none; }
#panel-attrs[hidden] { display: none; }

#transport {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: var(--z-chrome);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--fab);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  max-width: none;
  transform: none;
  pointer-events: auto;
}
#transport .transport-btns {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}
#transport button {
  width: 32px; height: 32px; padding: 0;
  border-radius: 8px; display: inline-flex;
  align-items: center; justify-content: center;
  border: 1px solid transparent;
}
#transport button#play.active {
  background: #1a2a44;
  outline: 1px solid var(--accent);
}
#transport button#stop.bind {
  background: #2a2a32;
  color: var(--accent-2);
}
#transport button svg.feather { width: 15px; height: 15px; }
#transport .clip-wrap {
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
  flex: 0 1 150px;
}
#transport .clip-wrap label {
  font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em;
}
#transport select {
  width: 100%; max-width: none; font-size: 12px; border-radius: 8px;
  padding: 5px 8px;
}
#transport .scrub-wrap {
  flex: 1 1 auto;
  min-width: 100px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
#transport .scrub-meta {
  display: flex; justify-content: space-between; gap: 8px;
  font-family: var(--mono); font-size: 10px; color: var(--muted);
}
#transport input[type=range] {
  width: 100%; margin: 0; accent-color: var(--accent);
}
#transport .mode-pill {
  flex: 0 0 auto;
  font-size: 10px; font-weight: 700; letter-spacing: 0.05em;
  padding: 4px 8px; border-radius: 6px;
  background: #2a2a32; color: var(--muted);
}
#transport .mode-pill.playing { background: #3d2a1a; color: #f0a060; }
#transport .mode-pill.bind { background: #1b2838; color: var(--accent-2); }

/* Legacy float chrome removed — Explorer is .dock-left; attrs/timeline use .overlay-panel */

.tree ul { list-style: none; margin: 0; padding: 0 0 0 10px; }
.tree > ul { padding: 4px; }
.tree .node {
  display: flex; align-items: center; gap: 4px;
  padding: 2px 6px; border-radius: 5px; cursor: pointer;
}
.tree .ex-icon {
  width: 16px; height: 16px; flex: 0 0 auto;
  image-rendering: pixelated;
}
.tree .ex-name {
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tree .node:hover { background: rgba(255,255,255,0.04); }
.tree .node.selected { background: rgba(61, 139, 253, 0.28); }
.tree .twisty {
  width: 12px; flex: 0 0 auto; text-align: center;
  color: var(--muted); font-size: 10px; line-height: 1;
  user-select: none;
}
.tree .twisty.leaf { visibility: hidden; }
.tree .twisty:not(.leaf):hover { color: var(--text); }

.attrs { padding: 4px 0 8px; }
.attrs .section {
  padding: 6px 8px 2px; font-size: 9px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.attrs .row {
  display: grid; grid-template-columns: 68px 1fr;
  gap: 4px; align-items: center;
  padding: 2px 8px;
}
.attrs .row label { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attrs .row .note { grid-column: 1 / -1; font-size: 10px; color: var(--muted); line-height: 1.3; white-space: normal; }
.attrs .vec3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 3px; }
.attrs .vec3 input { padding: 3px 4px; font-size: 11px; font-family: var(--mono); }
.attrs .vec3 input[data-i="0"] { border-color: rgba(231, 76, 60, 0.45); }
.attrs .vec3 input[data-i="1"] { border-color: rgba(46, 204, 113, 0.45); }
.attrs .vec3 input[data-i="2"] { border-color: rgba(52, 152, 219, 0.45); }
.attrs .row.json-row {
  grid-template-columns: 1fr;
  align-items: start;
}
.attrs .row.json-row textarea {
  width: 100%; min-height: 72px; font-family: var(--mono); font-size: 10px;
  resize: vertical;
}

#studio-toast {
  position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%);
  z-index: 90; display: none;
  max-width: min(520px, calc(100% - 32px));
  padding: 8px 14px; border-radius: 8px;
  background: var(--fab); border: 1px solid var(--border);
  box-shadow: var(--shadow); color: var(--text);
  font-size: 12px; white-space: pre-wrap; word-break: break-word;
}
#studio-toast.show { display: block; }
#studio-toast.err { border-color: var(--danger); color: #ffc4c7; }
.attrs .ops-mini {
  padding: 4px 8px; font-family: var(--mono); font-size: 10px;
  max-height: 64px; overflow: auto; color: var(--muted);
}
.palette-strip {
  display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 8px 8px;
}
.swatch {
  width: 22px; height: 22px; border-radius: 5px;
  border: 2px solid transparent; cursor: pointer;
}
.swatch.active { border-color: #fff; box-shadow: 0 0 0 1px var(--accent); }

.tl-bar {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
}
.tl-bar input[type=range] { flex: 1; }
.tl-tracks { padding: 0 10px 8px; font-family: var(--mono); font-size: 10px; }
.track-row { display: grid; grid-template-columns: 90px 1fr; gap: 6px; margin-bottom: 3px; align-items: center; }
.track-keys { height: 14px; background: #0a0a0c; border-radius: 2px; position: relative; }
.key-dot {
  position: absolute; top: 2px; width: 6px; height: 10px;
  background: #f0c674; border-radius: 1px; transform: translateX(-50%);
}

.mode-badge {
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
  padding: 2px 6px; border-radius: 4px;
  background: #2a2a32; color: var(--muted);
}
.mode-badge.animate { background: #3d2a1a; color: #f0a060; }
.mode-badge.paint { background: #1a2a3d; color: var(--accent-2); }

#hud-hint {
  position: absolute; left: 72px; top: 14px; transform: none;
  z-index: var(--z-chrome);
  pointer-events: none;
  padding: 6px 12px; border-radius: 999px;
  background: var(--fab); border: 1px solid var(--border);
  color: var(--muted); font-size: 11px;
  opacity: 0; transition: opacity 0.15s;
  max-width: calc(100% - 300px);
}
#hud-hint.show { opacity: 1; }

.token-once {
  background: #1b2838; border: 1px solid var(--accent);
  padding: 12px; margin: 0; border-radius: 8px;
  display: flex; flex-direction: column; gap: 10px;
}
.token-once-lead {
  margin: 0; display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; color: var(--text);
}
.token-once-lead svg { flex: 0 0 auto; color: var(--accent); }
.token-once .ws-copy-row { background: #121820; }
