/* COSMO ENGINE custom UX layer — styles (external, loaded by ce-custom.js reference) */
/* ---- #6 hide helper ---- */
      .ce-gone { display: none !important; }

      /* ---- rebranded "COSMO Wedding" nav button (was "Login to Save") ---- */
      .ce-login-btn {
        border-radius: 999px !important;
        background: linear-gradient(135deg, #7e3cff, #ec50e0) !important;
        color: #fff !important; border: 0 !important;
        box-shadow: 0 6px 18px rgba(126,60,255,0.38) !important;
        transition: filter .12s ease, transform .12s ease !important;
      }
      .ce-login-btn:hover { filter: brightness(1.08) !important; transform: translateY(-1px) !important; }
      .ce-login-btn:active { transform: translateY(0) !important; }
      .ce-login-btn, .ce-login-btn * { color: #fff !important; }
      .ce-login-btn svg { color: #fff !important; stroke: #fff !important; }

      /* ---- #2 Dialog: glassmorphism + brand theme ---- */
      .wwise-overlay {
        background: rgba(14, 10, 32, 0.55) !important;
        -webkit-backdrop-filter: blur(7px) saturate(120%) !important;
        backdrop-filter: blur(7px) saturate(120%) !important;
      }
      .wwise {
        border-radius: 20px !important;
        background: linear-gradient(160deg, rgba(40,30,74,0.86), rgba(20,15,42,0.90)) !important;
        -webkit-backdrop-filter: blur(24px) saturate(150%) !important;
        backdrop-filter: blur(24px) saturate(150%) !important;
        border: 1px solid rgba(178,140,255,0.30) !important;
        box-shadow: 0 28px 80px rgba(8,5,24,0.60),
                    inset 0 1px 0 rgba(255,255,255,0.06),
                    0 0 48px rgba(126,60,255,0.18) !important;
        overflow: hidden !important;
        color: #f3f0ff !important;
      }
      /* neutralise the engine's white body / dark header so the glass reads as one piece */
      .wwise, .wwise * { background-color: transparent !important; }
      .wwise { background: linear-gradient(160deg, rgba(40,30,74,0.86), rgba(20,15,42,0.90)) !important; }
      .wwise * { color: #ece8ff !important; }
      .wwise h1, .wwise h2, .wwise h3, .wwise [class*="title"], .wwise [class*="header"] {
        color: #ffffff !important; letter-spacing: .2px !important;
      }
      .wwise button {
        border-radius: 12px !important;
        border: 1px solid rgba(178,140,255,0.26) !important;
        background: rgba(255,255,255,0.06) !important;
        color: #ece8ff !important;
        padding: 8px 22px !important;
        font-weight: 600 !important;
        transition: background .15s ease, border-color .15s ease, filter .15s ease, transform .08s ease !important;
      }
      .wwise button:hover { background: rgba(126,60,255,0.22) !important; border-color: rgba(178,140,255,0.55) !important; }
      .wwise button:active { transform: scale(0.97) !important; }
      /* primary / confirm action (rendered last) gets the brand gradient */
      .wwise button:last-of-type {
        background: linear-gradient(135deg, #7e3cff, #ec50e0) !important;
        border-color: transparent !important;
        color: #ffffff !important;
        box-shadow: 0 8px 22px rgba(126,60,255,0.40) !important;
      }
      .wwise button:last-of-type:hover { filter: brightness(1.08) !important; }

      /* ---- #1 Undo / Redo control ---- */
      #ce-undo-redo {
        position: fixed; z-index: 9000;
        display: flex; flex-direction: column; gap: 6px;
        padding: 6px; border-radius: 16px;
        background: rgba(28,23,48,0.55);
        -webkit-backdrop-filter: blur(18px) saturate(140%);
        backdrop-filter: blur(18px) saturate(140%);
        border: 1px solid rgba(178,140,255,0.22);
        box-shadow: 0 12px 32px rgba(8,5,24,0.42);
      }
      #ce-undo-redo button {
        width: 34px; height: 34px; padding: 0; border: none; border-radius: 11px;
        background: transparent; color: #e9e4ff; cursor: pointer;
        display: flex; align-items: center; justify-content: center;
        transition: background .15s ease, transform .08s ease;
      }
      #ce-undo-redo button:hover { background: rgba(126,60,255,0.24); }
      #ce-undo-redo button:active { transform: scale(0.9); }
      /* when docked inside the engine's vertical toolbar */
      .ce-dock-btn { cursor: pointer; }

#ce-search { position: relative; display: flex; align-items: center; height: 30px; margin-right: 4px; }
      #ce-search .ce-search-box {
        display: flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px;
        border-radius: 999px; background: rgba(255,255,255,0.55);
        border: 1px solid rgba(126,60,255,0.32);
        -webkit-backdrop-filter: blur(12px) saturate(140%); backdrop-filter: blur(12px) saturate(140%);
        transition: border-color .15s ease, box-shadow .15s ease, width .15s ease;
      }
      #ce-search .ce-search-box:focus-within {
        border-color: rgba(126,60,255,0.7);
        box-shadow: 0 0 0 3px rgba(126,60,255,0.16);
      }
      #ce-search .ce-search-box svg { flex: 0 0 auto; color: #7e3cff; }
      #ce-search input {
        background: transparent; border: none; outline: none; color: #1c1730;
        width: 150px; font-size: 13px; font-family: inherit;
      }
      #ce-search input::placeholder { color: #8a83a0; }
      #ce-search .ce-dd {
        position: fixed; min-width: 268px; max-height: 340px;
        overflow-y: auto; background: rgba(255,255,255,0.94);
        -webkit-backdrop-filter: blur(20px) saturate(150%); backdrop-filter: blur(20px) saturate(150%);
        border: 1px solid rgba(126,60,255,0.22); border-radius: 14px;
        box-shadow: 0 20px 54px rgba(20,12,48,0.28); padding: 6px; z-index: 9500;
      }
      #ce-search .ce-dd[hidden] { display: none; }
      .ce-dd-item { padding: 8px 11px; border-radius: 10px; cursor: pointer; display: flex; flex-direction: column; gap: 1px; }
      .ce-dd-item.active, .ce-dd-item:hover {
        background: linear-gradient(135deg, rgba(126,60,255,0.15), rgba(236,80,224,0.12));
      }
      .ce-dd-item .t { font-size: 13px; color: #1c1730; font-weight: 600; }
      .ce-dd-item .d { font-size: 11px; color: #6b6580; }
      .ce-dd-empty { padding: 12px 11px; color: #9a93ac; font-size: 12px; }
      /* flash highlight when a panel is opened from search */
      .ce-flash { animation: ceFlash 1.4s ease; }
      @keyframes ceFlash {
        0%, 100% { box-shadow: none; }
        20% { box-shadow: 0 0 0 2px rgba(126,60,255,0.7), 0 0 22px rgba(236,80,224,0.5); }
      }

/* ---- #5 Per-piece friendly Size control (simple + advanced) ---- */
#ce-size {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  z-index: 9200; display: none; flex-direction: column; gap: 10px;
  padding: 12px 16px; border-radius: 18px;
  background: linear-gradient(160deg, rgba(40,30,74,0.82), rgba(20,15,42,0.86));
  -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid rgba(178,140,255,0.30);
  box-shadow: 0 18px 50px rgba(8,5,24,0.45), 0 0 36px rgba(126,60,255,0.14);
  color: #f3f0ff; font-family: inherit; user-select: none;
}
#ce-size.ce-show { display: flex; }
#ce-size .ce-size-main { display: flex; align-items: center; gap: 13px; }
#ce-size .ce-size-title { font-size: 12px; font-weight: 700; letter-spacing: .3px; color: #d9ccff; white-space: nowrap; }
#ce-size .ce-size-sub { font-size: 10px; color: #9a8fc4; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#ce-size button.ce-step {
  width: 30px; height: 30px; border-radius: 10px; border: 1px solid rgba(178,140,255,0.25);
  background: rgba(255,255,255,0.06); color: #ece8ff; font-size: 18px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background .15s ease, transform .08s ease;
}
#ce-size button.ce-step:hover { background: rgba(126,60,255,0.24); }
#ce-size button.ce-step:active { transform: scale(0.9); }
#ce-size input[type=range] {
  -webkit-appearance: none; appearance: none; width: 200px; height: 6px; border-radius: 999px;
  background: linear-gradient(90deg, #7e3cff, #ec50e0); outline: none;
}
#ce-size .ce-adv-row input[type=range] { width: 116px; }
#ce-size button.ce-axstep {
  width: 22px; height: 22px; flex: 0 0 auto; border-radius: 7px; border: 1px solid rgba(178,140,255,0.25);
  background: rgba(255,255,255,0.06); color: #ece8ff; font-size: 14px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background .15s ease, transform .08s ease;
}
#ce-size button.ce-axstep:hover { background: rgba(126,60,255,0.24); }
#ce-size button.ce-axstep:active { transform: scale(0.9); }
#ce-size input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; border: 2px solid #7e3cff; cursor: grab; box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
#ce-size input[type=range]::-webkit-slider-thumb:active { cursor: grabbing; }
#ce-size .ce-size-val, #ce-size .ce-axval {
  min-width: 48px; text-align: center; font-size: 12px; font-weight: 700; color: #fff;
  background: rgba(255,255,255,0.08); border-radius: 9px; padding: 5px 8px;
}
#ce-size .ce-size-reset {
  font-size: 11px; color: #b9a9ee; background: none; border: none; cursor: pointer; text-decoration: underline; padding: 4px;
}
#ce-size .ce-size-reset:hover { color: #fff; }
#ce-size .ce-adv-toggle {
  font-size: 11px; font-weight: 600; color: #d9ccff; cursor: pointer; white-space: nowrap;
  background: rgba(126,60,255,0.14); border: 1px solid rgba(178,140,255,0.28);
  border-radius: 999px; padding: 6px 12px; transition: background .15s ease;
}
#ce-size .ce-adv-toggle:hover { background: rgba(126,60,255,0.28); }
#ce-size .ce-adv-toggle.ce-open { background: rgba(126,60,255,0.32); color: #fff; }
#ce-size .ce-adv {
  display: none; flex-direction: column; gap: 8px;
  padding-top: 10px; border-top: 1px solid rgba(178,140,255,0.18);
}
#ce-size .ce-adv.ce-open { display: flex; }
#ce-size .ce-adv-hint { font-size: 10px; color: #9a8fc4; margin-bottom: 1px; }
#ce-size .ce-adv-body { display: flex; align-items: center; gap: 18px; }
#ce-size .ce-adv-axes { display: flex; flex-direction: column; gap: 8px; flex: 0 0 auto; min-width: 0; }
#ce-size .ce-adv-row { display: flex; align-items: center; gap: 8px; }
#ce-size .ce-adv-row > .ce-ax-name { width: 56px; font-size: 11px; font-weight: 600; color: #c9bbf2; }

/* ---- position D-pad (right side of the Advanced drawer) ---- */
#ce-size .ce-adv-pos { display: flex; flex-direction: column; align-items: center; gap: 5px; flex: 0 0 auto; padding-left: 16px; border-left: 1px solid rgba(178,140,255,0.18); }
#ce-size .ce-pos-label { font-size: 11px; font-weight: 600; color: #c9bbf2; align-self: center; }
#ce-size .ce-dpad { display: grid; grid-template-columns: repeat(3, 26px); grid-template-rows: repeat(3, 26px); gap: 4px; }
#ce-size .ce-dir {
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 9px; cursor: pointer; color: #ece8ff; font-size: 12px; line-height: 1;
  background: rgba(126,60,255,0.16); transition: background .12s ease, transform .08s ease; touch-action: none;
}
#ce-size .ce-dir:hover { background: rgba(126,60,255,0.34); }
#ce-size .ce-dir:active { transform: scale(0.88); background: rgba(126,60,255,0.5); }
#ce-size .ce-dir[data-dir=up]    { grid-column: 2; grid-row: 1; }
#ce-size .ce-dir[data-dir=left]  { grid-column: 1; grid-row: 2; }
#ce-size .ce-dir[data-dir=center]{ grid-column: 2; grid-row: 2; font-size: 14px; color: #d9ccff; background: rgba(126,60,255,0.08); }
#ce-size .ce-dir[data-dir=right] { grid-column: 3; grid-row: 2; }
#ce-size .ce-dir[data-dir=down]  { grid-column: 2; grid-row: 3; }
#ce-size .ce-depth { display: flex; align-items: center; gap: 6px; }
#ce-size .ce-dir-z { width: 32px; height: 22px; font-size: 11px; font-weight: 600; }
#ce-size .ce-depth-lbl { font-size: 10px; font-weight: 600; color: #8a7fb4; min-width: 34px; text-align: center; }
#ce-size .ce-pos-hint { font-size: 9px; color: #8a7fb4; white-space: nowrap; }

/* ---- #5b Size-editor toggle injected into the Picker panel ---- */
.ce-picker-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 11px; margin: 8px; border-radius: 11px;
  background: linear-gradient(135deg, rgba(126,60,255,0.10), rgba(236,80,224,0.08));
  border: 1px solid rgba(126,60,255,0.24);
  font: 13px/1.2 inherit; color: #2a2340; cursor: pointer; user-select: none;
}
.ce-picker-toggle:hover { border-color: rgba(126,60,255,0.45); }
.ce-picker-toggle .ce-pt-label { font-weight: 600; display: flex; align-items: center; gap: 7px; }
.ce-picker-toggle .ce-pt-label svg { color: #7e3cff; }
.ce-switch {
  width: 38px; height: 22px; border-radius: 999px; background: #c9c4d6;
  position: relative; transition: background .15s ease; flex: 0 0 auto;
}
.ce-switch::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: left .15s ease;
}
.ce-picker-toggle.ce-on .ce-switch { background: linear-gradient(135deg, #7e3cff, #ec50e0); }
.ce-picker-toggle.ce-on .ce-switch::after { left: 18px; }

/* undo/redo UI hidden (engine has no reachable history for all ops) */
.ce-undo, .ce-redo, #ce-undo-redo { display: none !important; }

/* ============================================================
   #8 Responsive — injected UI fits small screens + overflow guard.
   App's own panels are iterated separately from device testing.
   ============================================================ */
@media (max-width: 900px) {
  #ce-search input { width: 110px; }
  #ce-search .ce-dd { min-width: 220px; }
}
@media (max-width: 640px) {
  /* stop sideways scroll/whitespace on phones */
  html, body { max-width: 100vw; overflow-x: hidden; }
  /* nav search: compact + full-width dropdown */
  #ce-search input { width: 86px; font-size: 12px; }
  #ce-search .ce-search-box { padding: 0 9px; gap: 5px; }
  #ce-search .ce-dd { position: fixed; left: 8px; right: 8px; top: 54px; min-width: 0; width: auto; max-height: 60vh; }
  /* SIZE editor: span the screen, wrap controls */
  #ce-size { left: 8px; right: 8px; transform: none; bottom: 12px; padding: 10px 12px; }
  #ce-size .ce-size-main { flex-wrap: wrap; gap: 8px; justify-content: center; }
  #ce-size input[type=range] { width: 150px; }
  #ce-size .ce-adv-row { gap: 8px; }
  #ce-size .ce-adv-row input[type=range] { width: 110px; }
  /* confirm/alert dialogs fit the viewport */
  .wwise { max-width: 92vw !important; }
  /* size-editor toggle: bigger tap target */
  .ce-picker-toggle { padding: 11px 12px; }
}
@media (max-width: 430px) {
  #ce-size input[type=range] { width: 120px; }
  #ce-size .ce-size-val, #ce-size .ce-axval { min-width: 42px; font-size: 11px; padding: 4px 6px; }
  #ce-size .ce-step { width: 28px; height: 28px; }
}

/* ============================================================
   #3 Reset + Undo/Redo — floating control cluster + toast.
   ============================================================ */
#ce-history { display: none !important; }   /* removed per request */
#ce-history.ce-removed-keep {
  position: fixed; left: 16px; bottom: 16px; z-index: 9000;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px; border-radius: 999px;
  background: linear-gradient(160deg, rgba(40,30,74,0.82), rgba(20,15,42,0.88));
  border: 1px solid rgba(126,60,255,0.35);
  -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%);
  box-shadow: 0 8px 26px rgba(0,0,0,0.4);
}
#ce-history[hidden] { display: none; }
#ce-history .ce-h-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; min-width: 34px; padding: 0 9px; border: 0; border-radius: 999px; cursor: pointer;
  font: 600 12px/1 system-ui, -apple-system, "Segoe UI", sans-serif; color: #ece8ff;
  background: rgba(126,60,255,0.16);
  transition: background .12s ease, transform .1s ease, opacity .15s ease;
}
#ce-history .ce-h-btn:hover:not(:disabled) { background: rgba(126,60,255,0.32); }
#ce-history .ce-h-btn:active:not(:disabled) { transform: scale(0.94); }
#ce-history .ce-h-btn:disabled { opacity: 0.32; cursor: default; }
#ce-history .ce-h-reset {
  color: #fff; background: linear-gradient(135deg, #7e3cff, #ec50e0); padding: 0 13px;
}
#ce-history .ce-h-reset:hover:not(:disabled) { filter: brightness(1.1); background: linear-gradient(135deg, #7e3cff, #ec50e0); }

#ce-reset-toast {
  position: fixed; left: 50%; bottom: 70px; transform: translateX(-50%) translateY(8px);
  z-index: 9001; padding: 9px 16px; border-radius: 12px; pointer-events: none;
  font: 500 13px/1 system-ui, -apple-system, "Segoe UI", sans-serif; color: #f4f0ff;
  background: linear-gradient(160deg, rgba(40,30,74,0.92), rgba(20,15,42,0.94));
  border: 1px solid rgba(126,60,255,0.4);
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  opacity: 0; transition: opacity .2s ease, transform .2s ease;
}
#ce-reset-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 640px) {
  #ce-reset-model { left: 12px; bottom: 12px; padding: 8px 12px; font-size: 12px; }
}

#ce-nav-anchor { display: inline-block; width: 1px; height: 34px; vertical-align: middle; pointer-events: none; }


/* ============================================================
   #4 Group / Ungroup — right-click menu + transient toast
   (no persistent button; selection is shift-click in the 3D view)
   ============================================================ */
#ce-group-menu {
  position: fixed; z-index: 2147483640; min-width: 184px; padding: 5px;
  border-radius: 12px; background: rgba(26,18,64,0.96);
  -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgba(178,140,255,0.30); box-shadow: 0 18px 50px rgba(0,0,0,0.55);
  color: #ece8ff; font: 13px system-ui, -apple-system, sans-serif;
}
#ce-group-menu .ce-gm-item {
  display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; border-radius: 8px;
  background: transparent; color: #efe9ff; font: 600 13px system-ui; cursor: pointer; transition: background .12s ease;
}
#ce-group-menu .ce-gm-item:hover { background: linear-gradient(135deg, rgba(126,60,255,0.30), rgba(236,80,224,0.20)); }
#ce-group-menu .ce-gm-item.ce-gm-off { color: #6f659a; cursor: default; font-weight: 500; }
#ce-group-menu .ce-gm-item.ce-gm-off:hover { background: transparent; }
#ce-group-menu .ce-gm-sep { height: 1px; margin: 4px 6px; background: rgba(178,140,255,0.18); }

#ce-group-toast {
  position: fixed; left: 50%; top: 18px; transform: translateX(-50%) translateY(-10px);
  z-index: 2147483641; padding: 8px 16px; border-radius: 999px;
  background: linear-gradient(135deg, rgba(126,60,255,0.96), rgba(236,80,224,0.94));
  color: #fff; font: 600 12.5px system-ui, -apple-system, sans-serif; white-space: nowrap;
  box-shadow: 0 10px 30px rgba(126,60,255,0.45);
  opacity: 0; pointer-events: none; transition: opacity .16s ease, transform .16s ease;
}
#ce-group-toast.ce-gt-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* COSMO watermark: bottom-left of the 3D viewport, non-interactive. */
#ce-watermark {
  position: absolute; left: 20px; bottom: 18px; z-index: 5;
  height: 22px; width: auto; opacity: 0.45;
  pointer-events: none; user-select: none;
}

/* Top bar: Home + Sign out, in the nav slot. */
#ce-account { display: inline-flex; align-items: center; gap: 8px; margin-left: 10px; vertical-align: middle; }
#ce-account .ce-acc-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  font: 600 13px/1 system-ui, -apple-system, "Segoe UI", sans-serif; color: #3b2a6b; text-decoration: none;
  background: #fff; border: 1px solid rgba(126,60,255,.28); transition: background .15s ease, border-color .15s ease, color .15s ease;
}
#ce-account .ce-acc-btn:hover { background: #f4eeff; border-color: rgba(126,60,255,.55); color: #7e3cff; }
#ce-account .ce-acc-btn:focus-visible { outline: 2px solid #b28cff; outline-offset: 2px; }
#ce-account .ce-acc-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#ce-account .ce-acc-out:hover { color: #c0356b; border-color: rgba(192,53,107,.45); background: #fff1f5; }
@media (max-width: 640px) {
  #ce-account .ce-acc-btn { padding: 0 10px; }
  #ce-account .ce-acc-btn span { display: none; }   /* icon-only on phones */
}

/* Branding: logo upload "+" tile. The icon wrapper's centring transform isn't
   applied in this build, so the "+" sat in the top-left corner. Centre it with
   inset + flex instead, and give the tile a proper upload look. */
span:has(> input[type="file"]) > button {
  background: #f3f0ff !important;
  border: 1.5px dashed #a78bfa !important;
  transition: background .15s ease, border-color .15s ease;
}
span:has(> input[type="file"]) > button:hover { background: #ebe4ff !important; border-color: #7c3aed !important; }
span:has(> input[type="file"]) > button label { background: transparent !important; }
span:has(> input[type="file"]) > button label > div.absolute {
  inset: 0 !important;
  transform: none !important;
  translate: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
span:has(> input[type="file"]) > button svg { color: #7c3aed !important; fill: currentColor; }

/* Branding: "Loading screen logo" overlay shown while a model loads. */
#ce-brand-loading {
  position: absolute; inset: 0; z-index: 20; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: rgba(245, 243, 250, .82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility 0s linear .3s;
}
#ce-brand-loading.on { opacity: 1; visibility: visible; transition: opacity .2s ease; }
#ce-brand-loading img { max-width: min(320px, 60%); max-height: 120px; object-fit: contain; }
#ce-brand-loading i {
  display: block; width: 140px; height: 3px; border-radius: 3px; overflow: hidden;
  background: linear-gradient(90deg, transparent, #7c3aed, transparent) no-repeat, rgba(124, 58, 237, .15);
  background-size: 40% 100%, 100% 100%; animation: ce-brand-sweep 1.2s ease-in-out infinite;
}
@keyframes ce-brand-sweep { from { background-position: -60% 0, 0 0; } to { background-position: 160% 0, 0 0; } }

/* Branding: "Logo behind model" switch (matches the editor's switches). */
#ce-brand-behind .ce-bb-label { font-size: 11px !important; cursor: pointer; }
#ce-brand-behind .ce-bb-switch { transform: scale(.85); transform-origin: right center; }
#ce-brand-behind .ce-bb-switch {
  position: relative; width: 40px; height: 24px; flex: none; border: 0; border-radius: 999px; padding: 0;
  background: #b3b3b8; cursor: pointer; transition: background .2s ease;
}
#ce-brand-behind .ce-bb-switch i {
  position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s ease;
}
#ce-brand-behind .ce-bb-switch.on { background: #6e6ee8; }
#ce-brand-behind .ce-bb-switch.on i { transform: translateX(16px); }

/* Locked sidebar features (VJSON, ModelStage), brochure demo only */
html.ce-demo [data-ce-locked] { position: relative; cursor: not-allowed !important; }
html.ce-demo [data-ce-locked] > * { opacity: .45; filter: grayscale(.6); }
html.ce-demo [data-ce-locked]::after {
  content: ""; position: absolute; top: 4px; right: 4px; width: 18px; height: 18px; border-radius: 50%;
  background: #1c1530 url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23c9a6ff'><path d='M12 2a5 5 0 0 0-5 5v3H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2h-1V7a5 5 0 0 0-5-5zm-3 8V7a3 3 0 1 1 6 0v3H9z'/></svg>") center/11px no-repeat;
  pointer-events: none; z-index: 2;
}
