/* ============================================================
   CONSTRUCTOR (Creadores) — lobby + 3D editor + visit HUD.
   Dark, minimalist Uvlis theme. The 3D canvas is a fixed full-screen
   layer; editor/play HUDs float above it and only their .cst-ui
   controls capture pointer events (so drags pass through to the canvas).
   ============================================================ */
:root {
  --cst-bg: #090a11;
  --cst-elev: rgba(16, 18, 28, 0.9);          /* floating panels / bars */
  --cst-elev-2: rgba(26, 29, 43, 0.85);       /* secondary surface / buttons */
  --cst-surface: rgba(255, 255, 255, 0.045);  /* inputs / cards */
  --cst-surface-hi: rgba(255, 255, 255, 0.09);
  --cst-border: rgba(255, 255, 255, 0.08);
  --cst-border-hi: rgba(255, 255, 255, 0.15);
  --cst-accent: #7c5cff;
  --cst-accent-soft: rgba(124, 92, 255, 0.16);
  --cst-accent-2: #22d3ee;
  --cst-text: #e9ebf4;
  --cst-muted: #8b90a6;
  --cst-shadow: 0 18px 50px rgba(0, 0, 0, 0.5), 0 2px 10px rgba(0, 0, 0, 0.3);
  --cst-radius: 16px;
  --cst-radius-sm: 10px;
  --ax-x: #e08a94; --ax-y: #8fc79c; --ax-z: #8aabd6;
  /* legacy aliases (kept so older selectors keep resolving) */
  --cst-panel: var(--cst-elev);
  --cst-panel-2: var(--cst-elev-2);
}

/* ── immersive lock ── */
body.cst-immersive { overflow: hidden; }
body.cst-immersive .chat-page { filter: none; }

/* Editor/play sit ABOVE the sidebar (z-index 100) so they are truly immersive
   and the editor's own side panels aren't covered — same as the BuildBattle room. */
#cst-canvas-wrap {
  position: fixed; inset: 0; z-index: 1200; background:
    radial-gradient(130% 100% at 50% -10%, #121426 0%, var(--cst-bg) 55%);
}
#cst-canvas { display: block; width: 100%; height: 100%; touch-action: none; }

.cst-screen {
  position: fixed; inset: 0; z-index: 1210; pointer-events: none;
  color: var(--cst-text); font-family: system-ui, -apple-system, sans-serif;
}
.cst-screen .cst-ui { pointer-events: auto; }

/* Don't let shift-click / rapid clicks highlight the HUD text (rows, buttons,
   labels). Real inputs keep normal text selection. */
.cst-screen, .cst-screen * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.cst-screen input, .cst-screen textarea { -webkit-user-select: text; user-select: text; }

/* thin, subtle scrollbars inside the HUD */
.cst-screen ::-webkit-scrollbar { width: 8px; height: 8px; }
.cst-screen ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); border-radius: 8px; }
.cst-screen ::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .2); }
.cst-screen ::-webkit-scrollbar-track { background: transparent; }

/* ── shared buttons ── */
.cst-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--cst-border); background: var(--cst-elev-2); color: var(--cst-text);
  border-radius: var(--cst-radius-sm); padding: 8px 13px; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: transform .08s, background .15s, border-color .15s, filter .15s; white-space: nowrap;
  backdrop-filter: blur(10px);
}
.cst-btn svg { width: 17px; height: 17px; flex: 0 0 auto; }
.cst-btn.icon { padding: 8px; }                 /* square icon-only button */
.cst-btn:hover { background: var(--cst-surface-hi); border-color: var(--cst-border-hi); }
.cst-btn:active { transform: translateY(1px); }
.cst-btn.primary { background: linear-gradient(135deg, #8b6cff, #6b47e6); border-color: transparent; color: #fff; box-shadow: 0 4px 16px rgba(124, 92, 255, .4); }
.cst-btn.primary:hover { filter: brightness(1.08); }
.cst-btn.ghost { background: transparent; border-color: transparent; }
.cst-btn.ghost:hover { background: var(--cst-surface); }
.cst-btn.danger { background: rgba(255, 90, 110, 0.14); border-color: rgba(255, 90, 110, 0.35); color: #ff9aa6; }
.cst-btn.block { width: 100%; margin-top: 10px; justify-content: center; }
.cst-btn.sm { padding: 6px 10px; font-size: 12px; border-radius: 8px; }
.cst-btn:disabled { opacity: .5; cursor: default; }

/* ════════════════ LOBBY ════════════════ */
.cst-lobby-body { padding: 20px clamp(14px, 4vw, 40px) 80px; max-width: 1200px; margin: 0 auto; }
.tienda-topbar .cst-btn.primary { margin-left: auto; }
.cst-hero {
  background: radial-gradient(120% 140% at 0% 0%, rgba(124, 92, 255, .25), transparent 60%), var(--cst-elev);
  border: 1px solid var(--cst-border); border-radius: 20px; padding: 26px; margin: 14px 0 22px;
}
.cst-hero-badge {
  display: inline-block; font-size: 12px; font-weight: 700; color: var(--cst-accent-2);
  background: rgba(34, 211, 238, .12); border: 1px solid rgba(34, 211, 238, .3);
  padding: 4px 10px; border-radius: 99px; margin-bottom: 12px;
}
.cst-hero h1 { font-size: clamp(26px, 5vw, 40px); margin: 0 0 10px; }
.cst-hero-accent { background: linear-gradient(90deg, var(--cst-accent), var(--cst-accent-2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.cst-hero p { color: var(--cst-muted); line-height: 1.6; max-width: 760px; margin: 0; }

.cst-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.cst-tab {
  background: transparent; border: 1px solid var(--cst-border); color: var(--cst-muted);
  border-radius: 99px; padding: 8px 18px; font-weight: 600; cursor: pointer;
}
.cst-tab.active { color: #fff; background: var(--cst-elev-2); border-color: var(--cst-accent); }

.cst-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.cst-empty { grid-column: 1/-1; text-align: center; color: var(--cst-muted); padding: 50px 10px; }
.cst-card {
  background: var(--cst-elev); border: 1px solid var(--cst-border); border-radius: 16px; overflow: hidden;
  display: flex; flex-direction: column; transition: transform .12s, border-color .15s;
}
.cst-card:hover { transform: translateY(-3px); border-color: rgba(124, 92, 255, .5); }
.cst-card-thumb { position: relative; aspect-ratio: 16/9; background: #11131f; }
.cst-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cst-card-ph { width: 100%; height: 100%; display: grid; place-items: center; font-size: 42px; opacity: .5; }
.cst-badge { position: absolute; top: 8px; left: 8px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px; backdrop-filter: blur(6px); }
.cst-badge.pub { background: rgba(22, 199, 132, .9); color: #04140d; }
.cst-badge.draft { background: rgba(148, 163, 184, .9); color: #0a0b14; }
.cst-badge.owner { background: rgba(10, 11, 20, .7); color: #fff; }
.cst-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.cst-card-body h3 { margin: 0; font-size: 16px; }
.cst-card-body p { margin: 0; color: var(--cst-muted); font-size: 13px; min-height: 18px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cst-card-meta { color: var(--cst-muted); font-size: 12px; margin-top: auto; }
.cst-card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* ════════════════ EDITOR ════════════════ */
/* Header is a soft top fade with floating clusters — no heavy full-width bar. */
.cst-topbar {
  position: absolute; top: 0; left: 0; right: 0; height: 58px; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; z-index: 4;
  background: linear-gradient(180deg, rgba(9, 10, 17, .82) 0%, rgba(9, 10, 17, 0) 100%);
}
.cst-topbar.cst-ui { pointer-events: none; }
.cst-topbar > * { pointer-events: auto; }
.cst-title-input {
  background: var(--cst-surface); border: 1px solid var(--cst-border); color: #fff; border-radius: var(--cst-radius-sm);
  padding: 8px 12px; font-size: 14px; font-weight: 600; width: min(240px, 26vw);
}
.cst-title-input:focus { outline: none; border-color: var(--cst-accent); background: rgba(124, 92, 255, .08); }
.cst-topbar-actions {
  margin-left: auto; display: flex; gap: 6px; align-items: center;
  background: var(--cst-elev); border: 1px solid var(--cst-border); border-radius: 13px; padding: 5px;
  box-shadow: var(--cst-shadow); backdrop-filter: blur(18px) saturate(1.2);
}
.cst-exit-btn { font-weight: 700; }
.cst-play-title { font-weight: 700; font-size: 15px; padding: 6px 12px; background: var(--cst-elev); border: 1px solid var(--cst-border); border-radius: var(--cst-radius-sm); backdrop-filter: blur(12px); }
.cst-live-btn.active { background: rgba(255, 90, 110, .18); border-color: #ff5a6e; color: #ff9aa6; box-shadow: 0 0 14px rgba(255, 90, 110, .35); }

/* ── co-editing: presence + locks + collaborators ── */
.cst-presence { display: inline-flex; gap: -6px; align-items: center; margin-left: 4px; }
.cst-peer {
  width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center;
  font-size: 12px; font-weight: 800; color: #06070d; background: var(--c, #7c5cff);
  border: 2px solid var(--cst-bg); margin-left: -6px; box-shadow: 0 0 0 1px var(--c, #7c5cff);
}
.cst-peer.sm { width: 22px; height: 22px; font-size: 11px; margin-left: 0; }
.cst-h-row.locked { opacity: .65; }
.cst-h-lock { font-size: 10px; color: var(--c, #ff6b6b); white-space: nowrap; }
.cst-online-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #16c784; margin-left: 4px; box-shadow: 0 0 6px #16c784; }

.cst-collab-panel {
  position: absolute; top: 66px; right: 316px; width: 300px; max-height: 70vh; overflow-y: auto;
  background: var(--cst-elev); border: 1px solid var(--cst-border); border-radius: var(--cst-radius); padding: 14px; z-index: 6;
  backdrop-filter: blur(18px); box-shadow: var(--cst-shadow);
}
.cst-collab-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cst-collab-head h3 { margin: 0; font-size: 15px; }
.cst-collab-invite { display: flex; gap: 6px; margin: 10px 0; }
.cst-collab-invite input { flex: 1; background: var(--cst-surface); border: 1px solid var(--cst-border); color: #fff; border-radius: 8px; padding: 7px 10px; font-size: 13px; }
.cst-collab-list { display: flex; flex-direction: column; gap: 6px; }
.cst-collab-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.cst-collab-name { flex: 1; display: flex; align-items: center; }
@media (max-width: 820px), (max-height: 600px) and (pointer: coarse) { .cst-collab-panel { right: 8px; left: 8px; width: auto; } }
.cst-play-count { font-size: 13px; color: var(--cst-muted); }

/* ── floating side panels ── */
.cst-panel {
  position: absolute; top: 68px; bottom: 16px; width: 292px;
  background: var(--cst-elev); border: 1px solid var(--cst-border); border-radius: var(--cst-radius);
  box-shadow: var(--cst-shadow); backdrop-filter: blur(20px) saturate(1.2);
  display: flex; flex-direction: column; overflow: hidden;
  transition: transform .3s cubic-bezier(.4, 0, .2, 1), opacity .24s ease;
}
.cst-left { left: 14px; }
.cst-right { right: 14px; }

/* ── collapse / reopen (desktop) ── */
.cst-collapse, .cst-reopen { display: none; }          /* enabled on desktop below */
@media (min-width: 821px) and (min-height: 601px) {
  .cst-collapse {
    display: grid; place-items: center; position: absolute; top: 13px; right: 12px; z-index: 3;
    width: 27px; height: 27px; background: var(--cst-surface); border: 1px solid var(--cst-border);
    border-radius: 8px; color: var(--cst-muted); cursor: pointer;
    transition: background .14s, color .14s, border-color .14s;
  }
  .cst-collapse:hover { background: var(--cst-surface-hi); color: var(--cst-text); border-color: var(--cst-border-hi); }
  .cst-collapse svg { width: 15px; height: 15px; }
  .cst-left.cst-collapsed  { transform: translateX(calc(-100% - 26px)); opacity: 0; pointer-events: none; }
  .cst-right.cst-collapsed { transform: translateX(calc(100% + 26px)); opacity: 0; pointer-events: none; }

  .cst-reopen {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
    flex-direction: column; align-items: center; gap: 5px; width: 40px; padding: 13px 0;
    background: var(--cst-elev); border: 1px solid var(--cst-border); box-shadow: var(--cst-shadow);
    backdrop-filter: blur(18px) saturate(1.2); color: var(--cst-muted); cursor: pointer;
    transition: color .14s, background .14s;
  }
  .cst-reopen.show { display: flex; }
  .cst-reopen:hover { color: var(--cst-text); background: var(--cst-surface-hi); }
  .cst-reopen svg { width: 18px; height: 18px; }
  .cst-reopen .cst-reopen-chev { width: 13px; height: 13px; opacity: .65; }
  .cst-reopen-left  { left: 0;  border-left: none;  border-radius: 0 13px 13px 0; }
  .cst-reopen-right { right: 0; border-right: none; border-radius: 13px 0 0 13px; }
}
.cst-panel-sec { padding: 16px; display: flex; flex-direction: column; min-height: 0; }
.cst-panel-sec.cst-grow { flex: 1; overflow-y: auto; }
.cst-panel-sec + .cst-panel-sec { border-top: 1px solid var(--cst-border); }
.cst-panel-sec > h3, .cst-env h3 { margin: 0 0 14px; font-size: 11px; text-transform: uppercase; letter-spacing: .7px; font-weight: 700; color: var(--cst-muted); }

/* ── insert palette: search + shape grid + interaction lists ── */
.cst-palette { display: flex; flex-direction: column; gap: 18px; max-height: 52vh; overflow-y: auto; padding-right: 2px; }
.cst-ins-search { position: relative; display: flex; align-items: center; }
.cst-ins-search svg { position: absolute; left: 11px; width: 15px; height: 15px; color: var(--cst-muted); pointer-events: none; }
.cst-ins-search input {
  width: 100%; background: var(--cst-surface); border: 1px solid var(--cst-border); color: var(--cst-text);
  border-radius: var(--cst-radius-sm); padding: 9px 42px 9px 34px; font-size: 13px;
}
.cst-ins-search input:focus { outline: none; border-color: var(--cst-accent); background: rgba(124, 92, 255, .08); }
.cst-ins-search input::placeholder { color: var(--cst-muted); }
.cst-ins-search kbd {
  position: absolute; right: 8px; font-size: 10px; font-weight: 600; color: var(--cst-muted); font-family: inherit;
  background: var(--cst-surface-hi); border: 1px solid var(--cst-border); border-radius: 6px; padding: 2px 6px;
}
.cst-ins-sec { display: flex; flex-direction: column; gap: 9px; }
.cst-ins-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--cst-muted); }
.cst-ins-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cst-shape {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  aspect-ratio: 1 / 1; background: var(--cst-surface); border: 1px solid var(--cst-border);
  border-radius: 13px; color: var(--cst-text); cursor: pointer; padding: 6px;
  transition: transform .1s, border-color .14s, background .14s;
}
.cst-shape:hover { transform: translateY(-2px); border-color: rgba(124, 92, 255, .55); background: var(--cst-accent-soft); }
.cst-shape:active { transform: translateY(0); }
.cst-shape-ic { color: #c3c8f0; display: grid; place-items: center; }
.cst-shape-ic svg { width: 27px; height: 27px; display: block; }
.cst-shape:hover .cst-shape-ic { color: #fff; }
.cst-shape-lbl { font-size: 11.5px; font-weight: 600; color: var(--cst-muted); }
.cst-shape:hover .cst-shape-lbl { color: var(--cst-text); }
.cst-ins-list { display: flex; flex-direction: column; gap: 6px; }
.cst-ins-row {
  display: flex; align-items: center; gap: 11px; background: var(--cst-surface); border: 1px solid var(--cst-border);
  border-radius: 12px; padding: 9px 11px; color: var(--cst-text); cursor: pointer; text-align: left;
  transition: border-color .14s, background .14s, transform .08s;
}
.cst-ins-row:hover { border-color: var(--cst-border-hi); background: var(--cst-surface-hi); }
.cst-ins-row:active { transform: translateY(1px); }
.cst-ins-chip {
  width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; font-size: 15px;
  border-radius: 9px; background: color-mix(in srgb, var(--ic) 22%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ic) 38%, transparent);
}
.cst-ins-name { font-size: 13px; font-weight: 600; }
.cst-ins-import {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  background: var(--cst-surface); border: 1px dashed var(--cst-border-hi); color: var(--cst-text);
  border-radius: 11px; padding: 11px; font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: border-color .14s, background .14s, color .14s;
}
.cst-ins-import svg { width: 17px; height: 17px; color: var(--cst-accent-2); }
.cst-ins-import:hover { border-color: var(--cst-accent); background: var(--cst-accent-soft); }

/* ── scene hierarchy ── */
.cst-hierarchy { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.cst-h-row { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 9px; cursor: pointer; font-size: 13px; color: var(--cst-text); transition: background .12s; }
.cst-h-row:hover { background: var(--cst-surface); }
.cst-h-row.active { background: var(--cst-accent-soft); box-shadow: inset 0 0 0 1px rgba(124, 92, 255, .5); }
.cst-h-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cst-h-pin {
  margin-left: auto; flex: 0 0 auto; display: grid; place-items: center; width: 24px; height: 24px; padding: 0;
  background: transparent; border: none; color: var(--cst-muted); cursor: pointer; border-radius: 7px;
  opacity: 0; transition: opacity .12s, color .12s, background .12s;
}
.cst-h-pin svg { width: 14px; height: 14px; }
.cst-h-row:hover .cst-h-pin { opacity: .8; }
.cst-h-pin:hover { background: var(--cst-surface-hi); color: var(--cst-text); }
.cst-h-pin.on { opacity: 1; color: var(--cst-accent-2); }
.cst-h-row.fixed .cst-h-name { color: var(--cst-muted); }
.cst-prop-lock {
  flex: 0 0 auto; display: grid; place-items: center; width: 30px; height: 30px; padding: 0;
  background: var(--cst-surface); border: 1px solid var(--cst-border); border-radius: 9px;
  color: var(--cst-muted); cursor: pointer; transition: background .14s, color .14s, border-color .14s;
}
.cst-prop-lock svg { width: 16px; height: 16px; }
.cst-prop-lock:hover { color: var(--cst-text); border-color: var(--cst-border-hi); }
.cst-prop-lock.on { background: var(--cst-accent-soft); color: var(--cst-accent-2); border-color: rgba(34, 211, 238, .5); }
.cst-fixed-hint { margin: 0 0 10px; color: var(--cst-accent-2); }

/* ── properties ── */
.cst-props { display: flex; flex-direction: column; }
.cst-prop-head { display: flex; align-items: center; gap: 11px; margin: 2px 0 14px; }
.cst-prop-ic {
  width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 11px;
  background: linear-gradient(140deg, rgba(124, 92, 255, .28), rgba(124, 92, 255, .1));
  box-shadow: inset 0 0 0 1px rgba(124, 92, 255, .4); color: #d7d0ff; font-size: 18px;
}
.cst-prop-ic svg { width: 22px; height: 22px; }
.cst-prop-head-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.cst-prop-name-txt { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cst-prop-type { font-size: 11px; color: var(--cst-muted); }
.cst-sec-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--cst-muted); margin: 14px 0 10px; }
.cst-props h4 { margin: 2px 0 10px; font-size: 15px; }
.cst-props h5 { margin: 14px 0 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--cst-accent-2); }
.cst-hint { color: var(--cst-muted); font-size: 12.5px; line-height: 1.55; }

/* transform (X/Y/Z) rows */
.cst-tr-row { margin-bottom: 12px; }
.cst-tr-label { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; color: var(--cst-muted); margin-bottom: 6px; }
.cst-ax-lock {
  display: inline-grid; place-items: center; width: 20px; height: 20px; padding: 0; line-height: 1;
  background: var(--cst-surface); border: 1px solid var(--cst-border); border-radius: 6px;
  color: var(--cst-muted); font-size: 11px; cursor: pointer; transition: background .14s, color .14s, border-color .14s;
}
.cst-ax-lock:hover { color: var(--cst-text); border-color: var(--cst-border-hi); }
.cst-ax-lock.on { background: var(--cst-accent-soft); color: #c9bcff; border-color: rgba(124, 92, 255, .55); }
.cst-tr-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.cst-ax {
  display: flex; align-items: center; gap: 5px; background: var(--cst-surface); border: 1px solid var(--cst-border);
  border-radius: 9px; padding: 6px 8px; transition: border-color .12s, background .12s; min-width: 0;
}
.cst-ax:focus-within { border-color: var(--cst-accent); background: rgba(124, 92, 255, .07); }
.cst-ax > span { font-size: 11px; font-weight: 700; }
.cst-ax-x > span { color: var(--ax-x); }
.cst-ax-y > span { color: var(--ax-y); }
.cst-ax-z > span { color: var(--ax-z); }
.cst-ax input { width: 100%; min-width: 0; background: transparent; border: none; color: var(--cst-text); font-size: 12.5px; font-weight: 600; padding: 0; }
.cst-ax input:focus { outline: none; }
.cst-ax input::-webkit-outer-spin-button, .cst-ax input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cst-ax input[type=number] { -moz-appearance: textfield; }

/* generic fields / selects */
.cst-field { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; font-size: 12.5px; color: var(--cst-muted); }
.cst-field > span { flex: 0 0 auto; font-weight: 500; }
.cst-field input, .cst-field select {
  background: var(--cst-surface); border: 1px solid var(--cst-border); color: var(--cst-text); border-radius: 9px;
  padding: 7px 9px; font-size: 12.5px; width: 132px;
}
.cst-field.cst-field-wide input { width: 158px; }
.cst-field input:focus, .cst-field select:focus { outline: none; border-color: var(--cst-accent); background: rgba(124, 92, 255, .07); }
.cst-field select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 26px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b90a6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center;
}
.cst-field input[type=color] { padding: 3px; height: 30px; width: 46px; cursor: pointer; background: var(--cst-surface); border-radius: 9px; }
.cst-field.cst-range input[type=range] { width: 132px; }
/* stacked field (label above a wide control) — used by the multi-line text box */
.cst-field.cst-field-col { flex-direction: column; align-items: stretch; gap: 6px; }
.cst-field.cst-field-col > span { align-self: flex-start; }
.cst-textarea {
  width: 100%; background: var(--cst-surface); border: 1px solid var(--cst-border); color: var(--cst-text);
  border-radius: 9px; padding: 8px 10px; font-size: 13px; line-height: 1.35; resize: vertical; min-height: 62px;
  font-family: inherit;
}
.cst-textarea:focus { outline: none; border-color: var(--cst-accent); background: rgba(124, 92, 255, .07); }
.cst-txt-row2 { display: flex; gap: 14px; margin-bottom: 8px; }
.cst-txt-row2 .cst-check { flex: 1; margin-bottom: 0; }

/* 🔑 keypad / password modal (in play mode) */
.cst-keypad-modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgba(6, 8, 16, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.cst-keypad-card {
  width: min(300px, 86vw); background: var(--cst-surface, #141824); border: 1px solid var(--cst-border, #2a3350);
  border-radius: 18px; padding: 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, .55); text-align: center;
}
.cst-keypad-card.shake { animation: cstKeypadShake .34s; }
@keyframes cstKeypadShake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-9px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(4px); } }
.cst-keypad-title { font-size: 15px; font-weight: 600; color: var(--cst-text, #eef1f8); margin-bottom: 12px; }
.cst-keypad-display {
  width: 100%; text-align: center; letter-spacing: 4px; font-size: 22px; font-weight: 700; color: var(--cst-text, #fff);
  background: rgba(0, 0, 0, .28); border: 1px solid var(--cst-border, #2a3350); border-radius: 12px; padding: 10px 12px; margin-bottom: 14px;
}
.cst-keypad-display:focus { outline: none; border-color: var(--cst-accent, #7c5cff); }
.cst-keypad-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.cst-keypad-key {
  padding: 14px 0; font-size: 18px; font-weight: 600; color: var(--cst-text, #eef1f8); cursor: pointer;
  background: var(--cst-surface-hi, #1c2233); border: 1px solid var(--cst-border, #2a3350); border-radius: 12px; transition: background .12s, transform .06s;
}
.cst-keypad-key:hover { background: rgba(124, 92, 255, .16); }
.cst-keypad-key:active { transform: scale(.94); }
.cst-keypad-key.ok { background: var(--cst-accent, #7c5cff); border-color: transparent; color: #fff; }
.cst-keypad-key.del { color: #ff8095; }
.cst-keypad-msg { min-height: 18px; margin-top: 10px; font-size: 12.5px; color: #ff8095; }
.cst-keypad-cancel { margin-top: 6px; background: none; border: none; color: var(--cst-muted, #8b90a6); font-size: 13px; cursor: pointer; padding: 6px; }
.cst-keypad-cancel:hover { color: var(--cst-text, #fff); }

/* ── 🏬 3D asset gallery ── */
.cst-ins-gallery {
  display: flex; align-items: center; gap: 10px; width: 100%; margin-bottom: 12px; padding: 11px 12px; cursor: pointer; text-align: left;
  background: linear-gradient(135deg, rgba(124, 92, 255, .18), rgba(34, 211, 238, .12)); border: 1px solid var(--cst-border-hi, #34406a); border-radius: 13px; color: var(--cst-text, #eef1f8);
}
.cst-ins-gallery:hover { border-color: var(--cst-accent, #7c5cff); background: linear-gradient(135deg, rgba(124, 92, 255, .3), rgba(34, 211, 238, .18)); }
.cst-ins-gallery-ic { font-size: 22px; }
.cst-ins-gallery-tx { display: flex; flex-direction: column; flex: 1; line-height: 1.2; }
.cst-ins-gallery-tx small { color: var(--cst-muted, #8b90a6); font-size: 11px; }
.cst-ins-gallery svg { width: 16px; height: 16px; color: var(--cst-muted, #8b90a6); }

/* above the editor canvas (1200) + editor screen (1210); publish sits above the gallery */
.cst-gal-modal { z-index: 1400; }
.cst-pub-modal { z-index: 1450; }
.cst-gal-modal, .cst-pub-modal { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(6, 8, 16, .62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); padding: 16px; }
/* an explicit display: flex would otherwise override the [hidden] attribute → these must hide when hidden */
.cst-gal-modal[hidden], .cst-pub-modal[hidden], .cst-keypad-modal[hidden] { display: none !important; }
.cst-gal {
  width: min(1040px, 96vw); height: min(88vh, 860px); display: flex; flex-direction: column; overflow: hidden;
  background: var(--cst-elev, #141824); border: 1px solid var(--cst-border, #2a3350); border-radius: 20px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.cst-gal-top { display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--cst-border, #2a3350); }
.cst-gal-top h2 { margin: 0; font-size: 17px; font-weight: 700; color: var(--cst-text, #fff); }
.cst-gal-bal { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; color: #ffd76a; background: rgba(255, 200, 60, .1); border: 1px solid rgba(255, 200, 60, .25); border-radius: 999px; padding: 4px 11px; }
.cst-gal-bal svg { width: 15px; height: 15px; }
.cst-gal-bal small { font-weight: 600; opacity: .8; font-size: 11.5px; }
.cst-gal-sp { flex: 1; }
.cst-gal-x { width: 34px; height: 34px; border-radius: 9px; background: var(--cst-surface, #1c2233); border: 1px solid var(--cst-border, #2a3350); color: var(--cst-text, #fff); cursor: pointer; font-size: 15px; }
.cst-gal-x:hover { background: var(--cst-surface-hi, #232a3d); }
.cst-gal-bar { display: flex; align-items: center; gap: 10px; padding: 12px 18px; flex-wrap: wrap; }
.cst-gal-tabs { display: inline-flex; background: var(--cst-surface, #1c2233); border: 1px solid var(--cst-border, #2a3350); border-radius: 11px; padding: 3px; }
.cst-gal-tab { border: none; background: none; color: var(--cst-muted, #8b90a6); font-size: 12.5px; font-weight: 600; padding: 7px 13px; border-radius: 8px; cursor: pointer; }
.cst-gal-tab.active { background: var(--cst-accent, #7c5cff); color: #fff; }
.cst-gal-search { flex: 1; min-width: 140px; background: var(--cst-surface, #1c2233); border: 1px solid var(--cst-border, #2a3350); color: var(--cst-text, #fff); border-radius: 10px; padding: 8px 12px; font-size: 13px; }
.cst-gal-search:focus { outline: none; border-color: var(--cst-accent, #7c5cff); }
.cst-gal-sort { background: var(--cst-surface, #1c2233); border: 1px solid var(--cst-border, #2a3350); color: var(--cst-text, #fff); border-radius: 10px; padding: 8px 10px; font-size: 12.5px; cursor: pointer; }
.cst-gal-cats { display: flex; gap: 7px; padding: 0 18px 12px; overflow-x: auto; scrollbar-width: none; }
.cst-gal-cats::-webkit-scrollbar { display: none; }
.cst-gal-cat { flex: 0 0 auto; border: 1px solid var(--cst-border, #2a3350); background: var(--cst-surface, #1c2233); color: var(--cst-muted, #8b90a6); font-size: 12px; padding: 6px 11px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.cst-gal-cat.active { background: rgba(124, 92, 255, .18); border-color: var(--cst-accent, #7c5cff); color: var(--cst-text, #fff); }
.cst-gal-grid { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; padding: 4px 18px 20px; align-content: start; }
.cst-gal-empty { grid-column: 1 / -1; text-align: center; color: var(--cst-muted, #8b90a6); padding: 60px 20px; font-size: 14px; }
.cst-gal-card { background: var(--cst-surface, #1c2233); border: 1px solid var(--cst-border, #2a3350); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; transition: border-color .14s, transform .14s; }
.cst-gal-card:hover { border-color: var(--cst-border-hi, #3a4470); transform: translateY(-2px); }
.cst-gal-thumb { position: relative; aspect-ratio: 1; background: linear-gradient(135deg, #1a2036, #0e1220); display: flex; align-items: center; justify-content: center; }
.cst-gal-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cst-gal-ph { font-size: 44px; opacity: .5; }
.cst-gal-price { position: absolute; top: 8px; left: 8px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; backdrop-filter: blur(6px); }
.cst-gal-price.free { background: rgba(34, 211, 238, .22); color: #9defff; }
.cst-gal-price.paid { background: rgba(255, 200, 60, .2); color: #ffdf8a; }
.cst-gal-price.owned { background: rgba(80, 220, 130, .2); color: #9af5bd; }
.cst-gal-del { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 8px; border: none; background: rgba(10, 12, 20, .6); color: #fff; cursor: pointer; font-size: 13px; }
.cst-gal-del:hover { background: rgba(255, 90, 110, .85); }
.cst-gal-body { padding: 10px 11px 11px; display: flex; flex-direction: column; gap: 3px; }
.cst-gal-title { font-size: 13.5px; font-weight: 650; color: var(--cst-text, #fff); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cst-gal-sub { font-size: 11.5px; color: var(--cst-muted, #8b90a6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cst-gal-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.cst-gal-like { border: none; background: none; color: var(--cst-muted, #8b90a6); font-size: 12px; cursor: pointer; padding: 2px 4px; border-radius: 7px; }
.cst-gal-like.on { color: #ff6b81; }
.cst-gal-dl { font-size: 11.5px; color: var(--cst-muted, #8b90a6); }
.cst-gal-get { margin-left: auto; background: var(--cst-accent, #7c5cff); border: none; color: #fff; font-size: 12.5px; font-weight: 650; padding: 7px 13px; border-radius: 9px; cursor: pointer; }
.cst-gal-get:hover { filter: brightness(1.08); }
.cst-gal-get:disabled { opacity: .6; }

/* publish form */
.cst-pub { width: min(420px, 94vw); max-height: 92vh; overflow-y: auto; background: var(--cst-elev, #141824); border: 1px solid var(--cst-border, #2a3350); border-radius: 18px; padding: 18px; box-shadow: 0 26px 70px rgba(0, 0, 0, .6); }
.cst-pub h3 { margin: 0 0 14px; font-size: 16px; font-weight: 700; color: var(--cst-text, #fff); }
.cst-pub-preview { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.cst-pub-thumb { width: 96px; height: 96px; border-radius: 12px; overflow: hidden; background: linear-gradient(135deg, #1a2036, #0e1220); display: flex; align-items: center; justify-content: center; font-size: 34px; flex: 0 0 auto; }
.cst-pub-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cst-pub-count { font-size: 12.5px; color: var(--cst-muted, #8b90a6); }
.cst-pub-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.cst-prop-pub { width: 100%; justify-content: center; }
@media (max-width: 560px) {
  .cst-gal { height: 92vh; width: 100vw; border-radius: 0; }
  .cst-gal-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
}

/* range sliders */
.cst-screen input[type=range] { -webkit-appearance: none; appearance: none; height: 4px; border-radius: 4px; background: var(--cst-surface-hi); cursor: pointer; }
.cst-screen input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--cst-accent); box-shadow: 0 2px 6px rgba(0, 0, 0, .45); border: 2px solid rgba(255, 255, 255, .25); }
.cst-screen input[type=range]::-moz-range-thumb { width: 15px; height: 15px; border: none; border-radius: 50%; background: var(--cst-accent); box-shadow: 0 2px 6px rgba(0, 0, 0, .45); }

/* toggle switches (checkboxes) */
.cst-check { display: flex; flex-direction: row-reverse; justify-content: space-between; align-items: center; gap: 10px; font-size: 12.5px; color: var(--cst-text); margin-bottom: 10px; cursor: pointer; }
.cst-check input[type=checkbox] {
  appearance: none; -webkit-appearance: none; position: relative; width: 38px; height: 22px; border-radius: 99px; flex: 0 0 auto;
  background: var(--cst-surface-hi); border: 1px solid var(--cst-border); cursor: pointer; transition: background .16s, border-color .16s;
}
.cst-check input[type=checkbox]::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .16s; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.cst-check input[type=checkbox]:checked { background: var(--cst-accent); border-color: transparent; }
.cst-check input[type=checkbox]:checked::after { transform: translateX(16px); }

/* swatches */
.cst-swatches { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.cst-sw { width: 26px; height: 26px; border-radius: 8px; border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); cursor: pointer; transition: transform .1s, box-shadow .12s; }
.cst-sw:hover { transform: scale(1.1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5); }

.cst-sep { height: 1px; background: var(--cst-border); margin: 14px 0; }
.cst-env { padding: 16px; border-top: 1px solid var(--cst-border); max-height: 50vh; overflow-y: auto; }
.cst-env .cst-sec-title:first-of-type { margin-top: 4px; }

/* environment presets */
.cst-env-presets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-bottom: 4px; }
.cst-env-preset {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  background: var(--cst-surface); border: 1px solid var(--cst-border); color: var(--cst-text);
  border-radius: 9px; padding: 8px 6px; font-size: 12px; font-weight: 600; cursor: pointer;
  transition: border-color .14s, background .14s, transform .08s;
}
.cst-env-preset:hover { border-color: var(--cst-accent); background: var(--cst-accent-soft); }
.cst-env-preset:active { transform: translateY(1px); }

/* ── transform toolbar: floating command bar ── */
.cst-toolbar {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 6px;
  background: linear-gradient(180deg, rgba(32, 35, 53, .74), rgba(13, 15, 25, .74));
  border: 1px solid var(--cst-border-hi); border-radius: 17px;
  box-shadow: 0 22px 55px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(24px) saturate(1.35);
  transition: transform .28s cubic-bezier(.4, 0, .2, 1), opacity .22s ease;
}
/* mobile-only toggle that hides the transform toolbar (desktop: hidden) */
.cst-tools-toggle { display: none; }
.cst-tool-group { display: flex; align-items: center; gap: 4px; }
/* the transform modes are a real segmented control (inset track) */
.cst-modes { background: rgba(0, 0, 0, .28); border-radius: 12px; padding: 3px; gap: 3px; }
.cst-actions { gap: 2px; }
.cst-actions::before { content: ""; width: 1px; height: 26px; background: var(--cst-border); margin: 0 5px; }
.cst-tbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; line-height: 1;
  background: transparent; border: none; color: var(--cst-muted); border-radius: 10px;
  padding: 9px 15px; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background .14s, color .14s, box-shadow .14s, transform .08s;
}
.cst-tbtn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.cst-tbtn:hover { background: var(--cst-surface-hi); color: var(--cst-text); }
.cst-tbtn:active { transform: translateY(1px); }
.cst-tbtn.active { background: linear-gradient(135deg, #8b6cff, #6b47e6); color: #fff; box-shadow: 0 5px 16px rgba(124, 92, 255, .5); }
.cst-tbtn.cst-icon { padding: 9px; }
.cst-tbtn.cst-toggle.active { background: rgba(124, 92, 255, .22); color: #cabfff; box-shadow: inset 0 0 0 1px rgba(124, 92, 255, .6); }
.cst-tbtn.danger:hover { background: rgba(255, 90, 110, .16); color: #ff9aa6; }

/* ── 2D plan (blueprint) mode ── */
.cst-plan-btn {
  position: absolute; left: 16px; bottom: 18px; z-index: 5; display: inline-flex; align-items: center; gap: 7px;
  background: var(--cst-elev); border: 1px solid var(--cst-border); color: var(--cst-text);
  border-radius: 12px; padding: 9px 13px; font-size: 13px; font-weight: 600; cursor: pointer;
  box-shadow: var(--cst-shadow); backdrop-filter: blur(18px) saturate(1.2); transition: background .14s, border-color .14s;
}
.cst-plan-btn svg { width: 18px; height: 18px; }
.cst-plan-btn:hover { background: var(--cst-surface-hi); border-color: var(--cst-border-hi); }
.cst-plan-btn.active { background: linear-gradient(135deg, #8b6cff, #6b47e6); border-color: transparent; color: #fff; box-shadow: 0 4px 16px rgba(124, 92, 255, .45); }
.cst-plan-panel {
  position: absolute; left: 16px; bottom: 70px; width: 260px; z-index: 5;
  background: var(--cst-elev); border: 1px solid var(--cst-border); border-radius: var(--cst-radius);
  box-shadow: var(--cst-shadow); backdrop-filter: blur(20px) saturate(1.2); padding: 16px;
}
.cst-plan-panel h3 { margin: 0 0 8px; font-size: 13px; }
.cst-plan-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.cst-plan-tools { display: flex; gap: 6px; margin-bottom: 8px; }
.cst-plan-tool { flex: 1; padding: 8px 6px; font-size: 12px; font-weight: 600; border-radius: 9px; cursor: pointer; background: var(--cst-surface); border: 1px solid var(--cst-border); color: var(--cst-text); transition: border-color .14s, background .14s; }
.cst-plan-tool:hover { border-color: var(--cst-border-hi); }
.cst-plan-tool.active { background: var(--cst-accent-soft); border-color: var(--cst-accent); color: #c9bcff; }
.cst-plan-level-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; font-size: 12.5px; color: var(--cst-muted); }
.cst-plan-level-ctl { display: flex; align-items: center; gap: 8px; }
.cst-plan-level-ctl button { width: 26px; height: 26px; border-radius: 7px; background: var(--cst-surface); border: 1px solid var(--cst-border); color: var(--cst-text); cursor: pointer; font-size: 11px; }
.cst-plan-level-ctl button:hover { background: var(--cst-surface-hi); }
.cst-plan-level-ctl span { min-width: 56px; text-align: center; font-weight: 700; color: var(--cst-text); }
.cst-plan-labels { position: fixed; inset: 0; pointer-events: none; z-index: 1215; }
body:not(.cst-plan) .cst-plan-labels { display: none; }     /* hide dimension tags outside plan mode */
.cst-plan-dim {
  position: absolute; transform: translate(-50%, -50%); background: #fff; color: #14161f;
  font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 6px; box-shadow: 0 1px 5px rgba(0, 0, 0, .35); white-space: nowrap;
}
/* hide the transform toolbar while drawing the plan */
body.cst-plan .cst-toolbar { display: none; }
@media (max-width: 820px), (max-height: 600px) and (pointer: coarse) { .cst-plan-btn, .cst-plan-panel { display: none; } }

/* ════════════════ PLAY / VISIT ════════════════ */
.cst-crosshair {
  position: absolute; top: 50%; left: 50%; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px;
  border-radius: 50%; background: rgba(255, 255, 255, .65); box-shadow: 0 0 0 2px rgba(0, 0, 0, .35); pointer-events: none;
}
.cst-prompt {
  position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); background: rgba(10, 11, 20, .85);
  border: 1px solid var(--cst-accent); border-radius: 99px; padding: 9px 18px; font-weight: 700; font-size: 14px; backdrop-filter: blur(10px);
}
.cst-vr-btn {
  background: linear-gradient(135deg, var(--cst-accent-2), #0ea5b7); border: none; color: #04121a; border-radius: 10px;
  padding: 8px 12px; font-weight: 700; font-size: 13px; cursor: pointer;
}
.cst-vr-btn:disabled { opacity: .5; }

.cst-joy {
  position: absolute; left: 22px; bottom: 28px; width: 122px; height: 122px; border-radius: 50%;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--cst-border); touch-action: none;
}
.cst-joy-knob { position: absolute; top: 50%; left: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: rgba(124, 92, 255, .75); box-shadow: 0 4px 14px rgba(0, 0, 0, .4); }
.cst-touch-right { position: absolute; right: 22px; bottom: 28px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.cst-round { width: 60px; height: 60px; border-radius: 50%; background: var(--cst-elev-2); border: 1px solid var(--cst-border); color: #fff; font-size: 22px; cursor: pointer; touch-action: none; backdrop-filter: blur(10px); }
.cst-round:active { background: var(--cst-accent); }
.cst-round svg { width: 24px; height: 24px; }
.cst-round-sm { width: 46px; height: 46px; }
.cst-round-sm svg { width: 20px; height: 20px; }
.cst-round.third { background: var(--cst-accent); color: #fff; }
.cst-fly-col { display: flex; flex-direction: column; gap: 10px; }
.cst-fly-col .cst-round { width: 56px; height: 56px; font-size: 18px; }

/* mobile edge tabs to reveal the side panels (hidden on desktop) */
.cst-panel-tab { display: none; }
/* editor camera joystick + up/down — mobile only */
.cst-ed-joy, .cst-ed-fly { display: none; }
.cst-ed-fly { position: absolute; right: 16px; bottom: 16px; }
/* Touch devices wide enough for the DESKTOP layout (i.e. landscape iPad, which has
   no keyboard) still need the editor's fly joystick. Float it clear of the docked
   side panels (292px) and the centre toolbar. */
@media (min-width: 821px) and (min-height: 601px) {
  body.cst-touch .cst-ed-joy { display: block; left: 320px; bottom: 120px; width: 108px; height: 108px; }
  body.cst-touch .cst-ed-fly { display: flex; right: 320px; bottom: 120px; }
}

/* a small dialogue card — never covers the whole screen so "Salir" stays usable */
.cst-sign { position: absolute; left: 50%; bottom: 100px; transform: translateX(-50%); max-width: min(440px, 86vw); }
.cst-sign-card { background: var(--cst-elev); border: 1px solid var(--cst-accent); border-radius: var(--cst-radius); padding: 14px 22px; text-align: center; box-shadow: var(--cst-shadow); cursor: pointer; backdrop-filter: blur(16px); }
.cst-sign-ic { font-size: 26px; }
.cst-sign-text { font-size: 16px; line-height: 1.45; margin: 8px 0 6px; }
.cst-sign-text:empty { display: none; }
.cst-sign-close { font-size: 11px; color: var(--cst-muted); }

.cst-help { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); font-size: 11px; color: rgba(255, 255, 255, .45); text-align: center; pointer-events: none; }
.cst-help-touch { display: none; }

/* model upload progress pill */
.cst-upprog {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 1300;
  display: flex; flex-direction: column; gap: 7px; min-width: 220px;
  background: var(--cst-elev); border: 1px solid var(--cst-accent); color: #fff; padding: 12px 18px;
  border-radius: 13px; font-weight: 600; font-size: 13px; box-shadow: var(--cst-shadow); backdrop-filter: blur(14px);
}
.cst-upprog-track { height: 6px; border-radius: 6px; background: var(--cst-surface-hi); overflow: hidden; }
.cst-upprog-bar { height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, var(--cst-accent), var(--cst-accent-2)); transition: width .15s ease; }

/* toast */
.cst-toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px); z-index: 1500;
  background: var(--cst-elev); border: 1px solid var(--cst-accent); color: #fff; padding: 10px 18px; border-radius: 12px;
  font-weight: 600; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; backdrop-filter: blur(14px); box-shadow: var(--cst-shadow);
}
.cst-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Voice FAB (voice-room.js): dock the speaker into the topbar's action row
   (#cst-voice-slot) on every screen size, so it never eats canvas space. */
.cst-voice-slot { display: inline-flex; align-items: center; }
.cst-voice-slot:empty { display: none; }
.cst-voice-slot .rv-root {
  position: relative; right: auto; bottom: auto; left: auto; top: auto;
  flex-direction: row; align-items: center; gap: 0;
}
.cst-voice-slot .rv-fab { height: 34px; padding: 0 10px 0 9px; font-size: .8rem; border-radius: 9px; box-shadow: none; }
.cst-voice-slot .rv-fab:hover { transform: none; filter: brightness(1.07); }
.cst-voice-slot .rv-fab-ic { font-size: 1rem; }
.cst-voice-slot .rv-fab-count { min-width: 18px; padding: 1px 6px; font-size: .72rem; }
.cst-voice-slot .rv-panel { position: absolute; top: calc(100% + 10px); right: 0; bottom: auto; transform-origin: top right; }

/* ── touch / small screens ── */
@media (hover: none), (pointer: coarse) {
  .cst-help-desktop { display: none; }
  .cst-help-touch { display: inline; }
}

/* ════════ MOBILE EDITOR (declutter: collapsible panels + compact header) ════════ */
/* Applies to phones (narrow) AND landscape phones (short + touch), so a
   wide-but-short screen never gets the desktop floating toolbar that overlaps
   the panels. */
@media (max-width: 820px), (max-height: 600px) and (pointer: coarse) {
  /* header: one tidy row — title on the left, a single coherent action pill on the right */
  .cst-topbar { gap: 8px; padding: 8px 10px; height: 56px; }
  .cst-title-input { width: 88px; min-width: 60px; font-size: 13px; padding: 6px 9px; }
  .cst-presence { display: none; }
  .cst-topbar-actions {
    margin-left: auto; flex: 0 1 auto; min-width: 0; max-width: 100%;
    overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; justify-content: flex-start;
    background: var(--cst-elev); border: 1px solid var(--cst-border); border-radius: 12px;
    padding: 4px; gap: 3px; backdrop-filter: blur(16px) saturate(1.2); box-shadow: var(--cst-shadow);
  }
  .cst-topbar-actions::-webkit-scrollbar { display: none; }
  .cst-topbar-actions .cst-btn { padding: 7px 10px; font-size: 12px; flex: 0 0 auto; border-radius: 9px; }
  .cst-topbar-actions .cst-btn.ghost { background: transparent; }
  /* niche on a phone — hide file import/export to declutter the header */
  #cst-import, #cst-export { display: none; }
  /* the docked voice popover must escape the action pill's horizontal scroll */
  .cst-voice-slot .rv-panel { position: fixed; top: 62px; right: 10px; left: auto; }
  .cst-voice-slot .rv-fab-pulse { display: none; }   /* would be clipped by the pill anyway */

  /* tools toggle — collapses the transform toolbar to clear the top */
  .cst-tools-toggle {
    display: inline-grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px;
    background: var(--cst-surface); border: 1px solid var(--cst-border); border-radius: 10px;
    color: var(--cst-muted); cursor: pointer; transition: background .14s, color .14s, border-color .14s;
  }
  .cst-tools-toggle svg { width: 17px; height: 17px; transition: transform .28s ease; }
  .cst-tools-toggle.active { background: var(--cst-accent-soft); color: #c9bcff; border-color: rgba(124, 92, 255, .5); }
  #cst-editor.cst-tools-hidden .cst-tools-toggle svg { transform: rotate(180deg); }
  #cst-editor.cst-tools-hidden .cst-toolbar { transform: translateY(-135%); opacity: 0; pointer-events: none; }

  /* side panels slide in from the edges; hidden until you tap their tab */
  .cst-panel {
    top: 104px; bottom: 12px; width: min(82vw, 330px);
    transition: transform .22s ease; box-shadow: 0 18px 50px rgba(0, 0, 0, .6);
  }
  .cst-left  { left: 8px;  transform: translateX(calc(-100% - 24px)); }
  .cst-right { right: 8px; transform: translateX(calc(100% + 24px)); }
  .cst-panel.open { transform: none; }
  .cst-palette { max-height: none; }

  /* edge tabs */
  .cst-panel-tab {
    display: grid; place-items: center; position: absolute; top: 50%; transform: translateY(-50%);
    width: 42px; height: 58px; font-size: 20px; background: var(--cst-elev); color: #fff;
    border: 1px solid var(--cst-border); cursor: pointer; z-index: 4; backdrop-filter: blur(14px);
  }
  .cst-tab-left  { left: 0; border-radius: 0 14px 14px 0; border-left: none; }
  .cst-tab-right { right: 0; border-radius: 14px 0 0 14px; border-right: none; }

  /* transform toolbar moves UP under the header (one scrollable row) so the
     bottom is free for the camera joystick + fly buttons */
  .cst-toolbar { top: 58px; bottom: auto; left: 8px; right: 8px; transform: none; justify-content: flex-start; gap: 6px; padding: 5px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; border-radius: 13px; }
  .cst-toolbar::-webkit-scrollbar { display: none; }
  .cst-tool-group { flex: 0 0 auto; }
  .cst-tbtn { padding: 7px 9px; font-size: 12px; flex: 0 0 auto; }

  /* show the editor camera controls (joystick bottom-left, fly bottom-right) */
  .cst-ed-joy { display: block; left: 16px; bottom: 16px; width: 104px; height: 104px; }
  .cst-ed-fly { display: flex; }

  /* environment panel sits inside the right panel — fine; just cap height */
  .cst-env { max-height: 40vh; }
}

/* very small phones */
@media (max-width: 560px) {
  .cst-title-input { width: 64px; }
  .cst-panel { width: min(88vw, 330px); }
  .cst-joy { left: 14px; bottom: 20px; width: 110px; height: 110px; }
  .cst-touch-right { right: 14px; bottom: 20px; }
}

/* ============================================================
   GAME MODE — editor panel + play HUD + end screen
   ============================================================ */

/* ── editor: game-mode panel (twin of the environment panel) ── */
.cst-game-panel { }
.cst-gm-modes { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 6px 0 12px; }
.cst-gm-mode {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 11px 13px; border-radius: 12px; cursor: pointer;
  background: var(--cst-surface); border: 1px solid var(--cst-border); color: var(--cst-text);
  font-size: 14px; font-weight: 650;
}
.cst-gm-mode span { font-size: 18px; }
.cst-gm-mode:hover { border-color: var(--cst-accent); background: var(--cst-accent-soft); }
.cst-gm-mode.active { border-color: var(--cst-accent); background: var(--cst-accent-soft); box-shadow: inset 0 0 0 1px var(--cst-accent); }
.cst-game-settings .cst-field, .cst-game-settings .cst-check { margin-top: 8px; }
.cst-ins-hint { font-size: 11px; color: var(--cst-muted); margin: 8px 4px 2px; line-height: 1.4; }

/* ── play: hurt flash (red vignette) ── */
.cst-hurt {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; z-index: 2;
  background: radial-gradient(120% 120% at 50% 50%, transparent 45%, rgba(220, 38, 38, .55) 100%);
  transition: opacity .18s ease;
}
.cst-hurt.show { opacity: 1; transition: opacity .05s ease; }

/* crosshair becomes a dynamic reticle during a game — the ring size follows the
   current aim spread (grows while moving/firing, tightens when still / aiming). */
.cst-crosshair.cst-cross-game {
  --gap: 6px;
  width: calc(var(--gap) * 2); height: calc(var(--gap) * 2);
  margin: calc(var(--gap) * -1) 0 0 calc(var(--gap) * -1);
  background: transparent; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .82); box-shadow: 0 0 0 1px rgba(0, 0, 0, .55);
  transition: width .07s linear, height .07s linear, margin .07s linear, border-color .1s ease;
}
.cst-crosshair.cst-cross-game::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 3px; height: 3px; margin: -1.5px 0 0 -1.5px;
  background: rgba(255, 255, 255, .92); border-radius: 50%; box-shadow: 0 0 0 1px rgba(0, 0, 0, .5);
}
.cst-crosshair.cst-cross-game.fire { border-color: #ffd166; }
.cst-crosshair.cst-cross-game.hit { border-color: #ff4d4d; box-shadow: 0 0 9px rgba(255,77,77,.9), 0 0 0 1px rgba(0,0,0,.5); }
.cst-crosshair.cst-cross-game.head { border-color: #ffe14d; box-shadow: 0 0 12px rgba(255,225,77,.95), 0 0 0 1px rgba(0,0,0,.5); }

/* ── PvP death / respawn overlay ── */
.cst-death[hidden] { display: none !important; }
.cst-death {
  position: absolute; inset: 0; z-index: 6; pointer-events: none;   /* taps pass through to respawn */
  display: grid; place-items: center;
  background: radial-gradient(120% 120% at 50% 45%, rgba(120,0,0,.28) 0%, rgba(6,8,16,.62) 70%);
  animation: cst-fade .2s ease;
}
.cst-death-card { text-align: center; }
.cst-death-skull { font-size: 60px; line-height: 1; filter: drop-shadow(0 4px 12px rgba(0,0,0,.6)); }
.cst-death-by { margin-top: 6px; font-size: 20px; font-weight: 800; color: #fca5a5; text-shadow: 0 2px 6px rgba(0,0,0,.6); }
.cst-death-action { margin-top: 10px; font-size: 15px; font-weight: 700; color: #e9ebf4; opacity: .85; }
.cst-death.ready .cst-death-action { color: #34d399; animation: cst-pulse 1s ease-in-out infinite; }
@keyframes cst-pulse { 0%,100% { opacity: .6; } 50% { opacity: 1; } }

/* ── play: HUD ── */
.cst-hud { position: absolute; inset: 0; pointer-events: none; z-index: 3; font-variant-numeric: tabular-nums; }
.cst-hud-top { position: absolute; top: 58px; left: 50%; transform: translateX(-50%); display: flex; }
.cst-hud-stats { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.cst-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 99px;
  background: rgba(10, 11, 20, .74); border: 1px solid var(--cst-border-hi); backdrop-filter: blur(8px);
  font-size: 13px; font-weight: 600; color: var(--cst-text); white-space: nowrap;
}
.cst-chip b { font-weight: 800; }
.cst-hud-bottom {
  position: absolute; left: 20px; right: 20px; bottom: 22px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
}
.cst-hud-vitals { display: flex; flex-direction: column; gap: 7px; align-items: flex-start; }
.cst-hud-wpnwrap { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.cst-hud-healthwrap, .cst-hud-armor { display: flex; align-items: center; gap: 8px; }
.cst-hud-heart { font-size: 18px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.cst-hud-health {
  position: relative; width: 210px; height: 20px; border-radius: 10px; overflow: hidden;
  background: rgba(10, 11, 20, .7); border: 1px solid var(--cst-border-hi); backdrop-filter: blur(8px);
}
.cst-hud-health-fill { position: absolute; inset: 0; width: 100%; background: #16c784; border-radius: 10px; transition: width .16s ease, background .2s ease; }
.cst-hud-health-txt { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.7); }
.cst-hud-armor[hidden] { display: none !important; }
.cst-hud-armorbar {
  position: relative; width: 210px; height: 13px; border-radius: 7px; overflow: hidden;
  background: rgba(10, 11, 20, .7); border: 1px solid var(--cst-border-hi); backdrop-filter: blur(8px);
}
.cst-hud-armor-fill { position: absolute; inset: 0; width: 100%; background: #38bdf8; border-radius: 7px; transition: width .16s ease; }
.cst-hud-armor-txt { position: absolute; inset: 0; display: grid; place-items: center; font-size: 10px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.7); }
.cst-hud-slots[hidden] { display: none !important; }
.cst-hud-slots { display: flex; gap: 6px; }
.cst-slot {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 9px; font-size: 12px; font-weight: 700;
  color: var(--cst-muted); background: rgba(10, 11, 20, .6); border: 1px solid var(--cst-border); backdrop-filter: blur(8px);
}
.cst-slot b { font-size: 10px; opacity: .75; background: rgba(255,255,255,.12); border-radius: 4px; padding: 0 4px; font-weight: 800; }
.cst-slot.on { color: #fff; border-color: var(--cst-accent-2); background: rgba(56,189,248,.16); }
.cst-hud-weapon {
  display: inline-flex; align-items: baseline; gap: 10px; padding: 8px 14px; border-radius: 12px;
  background: rgba(10, 11, 20, .72); border: 1px solid var(--cst-border-hi); backdrop-filter: blur(8px);
}
.cst-hud-weapon-name { font-size: 14px; font-weight: 700; color: var(--cst-text); }
.cst-hud-weapon-ammo { font-size: 18px; font-weight: 800; color: var(--cst-accent-2); }
.cst-hud-weapon-ammo.low { color: #fbbf24; }
.cst-hud-weapon-ammo.empty { color: #ef4444; animation: cst-blink 1s steps(2, start) infinite; }
@keyframes cst-blink { 50% { opacity: .3; } }
.cst-hud-build {
  position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%);
  padding: 8px 16px; border-radius: 99px; background: rgba(10, 11, 20, .82);
  border: 1px solid #60a5fa; color: #dbeafe; font-weight: 700; font-size: 13px; backdrop-filter: blur(10px);
}
.cst-hud-build.no { border-color: #ef4444; color: #fecaca; }
.cst-hud-toasts { position: absolute; top: 108px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; align-items: center; }
.cst-hud-toast {
  padding: 6px 14px; border-radius: 99px; font-size: 13px; font-weight: 700; color: #fff;
  background: rgba(20, 22, 34, .9); border: 1px solid var(--cst-border-hi); backdrop-filter: blur(8px);
  animation: cst-toast-in .22s ease; box-shadow: 0 6px 20px rgba(0,0,0,.4);
}
.cst-hud-toast.good { border-color: #16c784; color: #b8f5da; }
.cst-hud-toast.bad { border-color: #ef4444; color: #fecaca; }
.cst-hud-toast.wave { border-color: #f59e0b; color: #fde4b8; }
.cst-hud-toast.out { opacity: 0; transform: translateY(-6px); transition: opacity .4s ease, transform .4s ease; }
@keyframes cst-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* fire / build / weapon touch buttons */
.cst-round.cst-fire:active { background: #ef4444; }
.cst-round.cst-build:active { background: #2563eb; }
.cst-round.cst-weapon.armed { background: var(--cst-accent); border-color: var(--cst-accent); }
.cst-round.cst-ads.on { background: var(--cst-accent-2); border-color: var(--cst-accent-2); }
.cst-round.cst-reload:active, .cst-round.cst-swap:active { background: #334155; }

/* ── kill feed ── */
.cst-killfeed { position: absolute; top: 150px; right: 16px; display: flex; flex-direction: column; gap: 5px; align-items: flex-end; }
.cst-kf-row {
  padding: 5px 11px; border-radius: 8px; font-size: 12px; white-space: nowrap; color: var(--cst-text);
  background: rgba(10, 11, 20, .72); border: 1px solid var(--cst-border-hi); backdrop-filter: blur(8px);
  opacity: 0; transform: translateX(14px); transition: opacity .25s ease, transform .25s ease;
}
.cst-kf-row.show { opacity: 1; transform: none; }
.cst-kf-row.out { opacity: 0; transform: translateX(14px); }
.cst-kf-row b { color: #34d399; font-weight: 800; }
.cst-kf-row i { color: #fca5a5; font-style: normal; font-weight: 700; }
.cst-kf-row span { opacity: .85; }

/* ── damage direction indicator ── */
.cst-dmgdir { position: absolute; inset: 0; display: grid; place-items: center; }
.cst-dmg-arc { position: absolute; width: 260px; height: 260px; opacity: 0; transition: opacity .12s ease; }
.cst-dmg-arc.show { opacity: 1; }
.cst-dmg-arc::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 110px; height: 30px; border-radius: 0 0 80px 80px / 0 0 46px 46px;
  background: radial-gradient(ellipse at 50% 0%, rgba(239,68,68,.9), rgba(239,68,68,0) 72%);
}

/* ── sniper scope overlay ── */
.cst-scope[hidden] { display: none !important; }
.cst-scope {
  position: absolute; inset: 0; z-index: 5; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, transparent 0, transparent 29vh, rgba(0,0,0,.5) 29.5vh, rgba(0,0,0,.95) 33vh);
}
.cst-scope::before {
  content: ''; position: absolute; inset: 0; margin: auto; width: 60vh; height: 60vh; border-radius: 50%;
  border: 2px solid rgba(0,0,0,.85); box-shadow: 0 0 0 2px rgba(140,200,255,.18) inset;
}
.cst-scope-h, .cst-scope-v { position: absolute; background: rgba(0,0,0,.8); }
.cst-scope-h { left: 0; right: 0; top: 50%; height: 1px; }
.cst-scope-v { top: 0; bottom: 0; left: 50%; width: 1px; }

/* editor: game-panel sub-section header */
.cst-sec-title.cst-sub { margin-top: 13px; opacity: .82; font-size: 11px; }

/* ── play: game over ── */
/* the [hidden] guard must beat the `display:grid` below (class selectors override
   the UA `[hidden]{display:none}`), or the overlay shows on top of everything. */
.cst-gameover[hidden], .cst-hud[hidden], .cst-hud-build[hidden] { display: none !important; }
.cst-gameover {
  position: absolute; inset: 0; z-index: 8; pointer-events: auto;
  display: grid; place-items: center; background: rgba(6, 8, 16, .72); backdrop-filter: blur(6px);
  animation: cst-fade .3s ease;
}
@keyframes cst-fade { from { opacity: 0; } to { opacity: 1; } }
.cst-gameover-card {
  width: min(90vw, 380px); text-align: center; padding: 30px 26px; border-radius: 20px;
  background: var(--cst-elev); border: 1px solid var(--cst-border-hi); box-shadow: var(--cst-shadow);
}
.cst-gameover-icon { font-size: 54px; line-height: 1; margin-bottom: 8px; }
.cst-gameover-title { margin: 6px 0; font-size: 24px; font-weight: 800; color: var(--cst-text); }
.cst-gameover.win .cst-gameover-title { color: #34d399; }
.cst-gameover.lose .cst-gameover-title { color: #f87171; }
.cst-gameover-detail { margin: 0 0 20px; color: var(--cst-muted); font-size: 14px; }
.cst-gameover-actions { display: flex; gap: 10px; justify-content: center; }

/* ── PvP scoreboard ── */
.cst-scoreboard[hidden] { display: none !important; }
.cst-scoreboard {
  position: absolute; top: 58px; right: 16px; z-index: 4; width: 210px; pointer-events: none;
  padding: 10px 12px; border-radius: 14px; background: rgba(10, 11, 20, .72);
  border: 1px solid var(--cst-border-hi); backdrop-filter: blur(8px); font-variant-numeric: tabular-nums;
}
.cst-sb-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--cst-accent-2); margin-bottom: 6px; }
.cst-sb-head { display: grid; grid-template-columns: 1fr 26px 26px; gap: 4px; font-size: 10px; color: var(--cst-muted); padding: 0 2px 4px; border-bottom: 1px solid var(--cst-border); }
.cst-sb-head span:not(:first-child), .cst-sb-row .cst-sb-k, .cst-sb-row .cst-sb-d { text-align: center; }
.cst-sb-row { display: grid; grid-template-columns: 1fr 26px 26px; gap: 4px; font-size: 13px; padding: 4px 2px; border-radius: 6px; color: var(--cst-text); }
.cst-sb-row.me { background: var(--cst-accent-soft); font-weight: 800; }
.cst-sb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cst-sb-k { font-weight: 800; color: #34d399; }
.cst-sb-d { color: var(--cst-muted); }

@media (max-width: 560px) {
  .cst-hud-health, .cst-hud-armorbar { width: 130px; }
  .cst-hud-bottom { left: 12px; right: 12px; bottom: 96px; }
  .cst-hud-slots { display: none; }              /* rely on the swap button on touch */
  .cst-scoreboard { width: 150px; top: 52px; right: 10px; padding: 8px; }
  .cst-killfeed { top: 120px; right: 10px; }
  .cst-kf-row { font-size: 11px; padding: 4px 8px; }
}
