/* Campaign Editor — chrome around the live preview canvas. */

/* 2026-05-28 — keyboard accessibility recovery.
   Various inputs and buttons in this stylesheet zero out `outline:` to
   suppress the browser's default focus ring (it's loud, and the design
   uses a coloured border-on-focus for many controls). That dropped
   keyboard-only users out of the loop on every control that didn't get
   a paired focus-visible style. This single rule restores a clear ring
   ONLY on keyboard focus (the `:focus-visible` pseudo-class skips mouse
   and touch focus), scoped to the editor surface so it doesn't leak
   into other CMS pages. */
.ce-app *:focus-visible {
  outline: 2px solid var(--aq-accent, #4a6cf7);
  outline-offset: 2px;
  border-radius: 3px;
}

.ce-app {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 64px 350px 1fr;
  grid-template-rows: 1fr;
  /* Transparent so the lighter .aq-main gradient shows through.
     Was set to the dark page gradient, which made the editor's
     interior look almost black against the dashboard's lighter chrome. */
  background: transparent;
  color: var(--aq-text);
  font-family: var(--aq-ff-sans, 'Inter', system-ui, sans-serif);
  position: relative;
  overflow: hidden;
  padding: 8px 8px 8px 0;
  gap: 4px;
}

/* ── Left rail ─────────────────────────────────────────────────── */
.ce-rail {
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 140% 90% at 0% 0%, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 35%, transparent 70%),
    transparent;
  padding: 14px 6px 12px;
  gap: 2px;
  z-index: 2;
}
.ce-rail-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  margin-bottom: 8px;
}
.ce-rail-back {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: grid; place-items: center;
  background: var(--aq-surface-2);
  border: 1px solid var(--aq-line);
  color: var(--aq-text-dim);
  cursor: pointer;
  transition: color var(--aq-d-1) var(--aq-ease), background var(--aq-d-1) var(--aq-ease);
}
.ce-rail-back:hover { color: var(--aq-text); background: rgba(255,255,255,0.06); }

.ce-rail-group { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; }
.ce-rail-grouplabel {
  font-family: var(--aq-ff-mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  color: var(--aq-text-faint);
  padding: 6px 6px 4px;
  text-align: center;
}
.ce-rail-divider {
  height: 1px;
  background: var(--aq-line);
  margin: 4px 8px;
}
.ce-rail-item {
  position: relative;
  background: transparent;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 7px 4px;
  font: inherit;
  color: var(--aq-text-faint);
  cursor: pointer;
  border-radius: 7px;
  transition: color var(--aq-d-1) var(--aq-ease), background var(--aq-d-1) var(--aq-ease);
}
.ce-rail-item:hover { color: var(--aq-text-dim); background: rgba(255,255,255,0.04); }
.ce-rail-item.is-active {
  color: var(--aq-text);
  background: var(--aq-surface);
  box-shadow: var(--aq-edge-top);
}
.ce-rail-icon {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 6px;
}
.ce-rail-item.is-active .ce-rail-icon { color: var(--aq-accent); }
.ce-rail-label {
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.ce-rail-marker {
  position: absolute;
  left: -6px; top: 14px;
  width: 2px; height: 18px;
  background: var(--aq-accent);
  border-radius: 0 2px 2px 0;
}
.ce-rail-spacer { flex: 1; }
.ce-rail-collapse {
  width: 32px; height: 32px;
  margin: 4px auto 0;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--aq-line);
  color: var(--aq-text-faint);
  display: grid; place-items: center;
  cursor: pointer;
  transition: color var(--aq-d-1) var(--aq-ease), background var(--aq-d-1) var(--aq-ease);
}
.ce-rail-collapse:hover { color: var(--aq-text); background: rgba(255,255,255,0.04); }

/* ── Top bar (inside the bordered main card) ───────────────────── */
.ce-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: rgba(10, 12, 16, 0.7);
  border-bottom: 1px solid var(--aq-line);
  z-index: 3;
  font-size: 12.5px;
}
.ce-top-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ce-top-mid  { display: flex; align-items: center; flex: 1; justify-content: center; }
.ce-top-right { display: flex; align-items: center; gap: 6px; }

.ce-crumb-link {
  color: var(--aq-text-faint);
  font-size: 12px;
  cursor: pointer;
}
.ce-crumb-link:hover { color: var(--aq-text-dim); }
.ce-crumb-sep { color: var(--aq-text-faint); opacity: 0.6; }

.ce-type-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--aq-ff-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--aq-accent) 14%, transparent);
  color: var(--aq-accent);
  border: 1px solid color-mix(in srgb, var(--aq-accent) 30%, transparent);
}

.ce-title-input {
  background: transparent;
  border: 0;
  outline: none;
  color: var(--aq-text);
  font-family: var(--aq-ff-display);
  font-size: 14px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 4px;
  min-width: 0;
  width: 220px;
  transition: background 160ms;
}
.ce-title-input:hover { background: rgba(255,255,255,0.04); }
.ce-title-input:focus { background: rgba(255,255,255,0.06); }

.ce-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--aq-ff-mono);
  font-size: 10.5px;
  color: var(--aq-text-faint);
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--aq-line);
}
.ce-status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--aq-text-faint);
}

.ce-save {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--aq-success);
  font-family: var(--aq-ff-mono);
  font-size: 10.5px;
}
.ce-save-time { color: var(--aq-text-faint); }

.ce-history {
  display: inline-flex;
  border: 1px solid var(--aq-line);
  border-radius: 6px;
  background: var(--aq-surface);
  overflow: hidden;
}
.ce-icon-btn {
  width: 28px; height: 28px;
  background: transparent;
  border: 0;
  color: var(--aq-text-dim);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background var(--aq-d-1) var(--aq-ease), color var(--aq-d-1) var(--aq-ease);
}
.ce-icon-btn + .ce-icon-btn { border-left: 1px solid var(--aq-line); }
.ce-icon-btn:hover { background: rgba(255,255,255,0.06); color: var(--aq-text); }
.ce-icon-btn:disabled { opacity: 0.4; cursor: default; }
.ce-icon-btn:disabled:hover { background: transparent; color: var(--aq-text-dim); }

.ce-top-divider {
  width: 1px; height: 18px;
  background: var(--aq-line);
  margin: 0 4px;
}

.ce-ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 12px;
  background: transparent;
  border: 1px solid var(--aq-line);
  border-radius: 999px;   /* pill — was 6px */
  color: var(--aq-text-dim);
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
  transition: color var(--aq-d-1) var(--aq-ease), background var(--aq-d-1) var(--aq-ease);
}
.ce-ghost-btn:hover {
  color: var(--aq-text);
  background: rgba(255,255,255,0.04);
}
.ce-ghost-btn.sm { height: 26px; font-size: 11px; padding: 0 10px; }

.ce-publish {
  display: inline-flex;
  height: 28px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--aq-text);
  margin-left: 4px;
}
.ce-publish-main, .ce-publish-arrow {
  background: transparent;
  border: 0;
  color: #08090b;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 12px;
  height: 100%;
  transition: background var(--aq-d-1) var(--aq-ease);
}
.ce-publish-arrow { padding: 0 7px; border-left: 1px solid rgba(0,0,0,0.18); }
.ce-publish-main:hover, .ce-publish-arrow:hover { background: rgba(0,0,0,0.08); }
.ce-publish-main:active, .ce-publish-arrow:active { background: rgba(0,0,0,0.15); transition-duration: 60ms; }
.ce-publish-tri {
  width: 0; height: 0;
  border-left: 6px solid #08090b;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  margin-right: 1px;
}

/* ── Left panel ────────────────────────────────────────────────── */
.ce-panel {
  background: var(--aq-main-grad);
  border: 1px solid var(--aq-line);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-top: 14px;
  min-height: 0;
  position: relative;
}
.ce-panel::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.04) 50%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}
.ce-panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 14px 8px;
}
.ce-panel-title {
  margin: 0;
  font-family: var(--aq-ff-display);
  font-size: 16px;
  font-weight: 500;
  color: var(--aq-text);
  flex: 1;
  letter-spacing: -0.01em;
}
.ce-panel-icon {
  width: 26px; height: 26px;
  background: var(--aq-surface);
  border: 1px solid var(--aq-line);
  border-radius: 6px;
  color: var(--aq-text-dim);
  display: grid; place-items: center;
  cursor: pointer;
  transition: color var(--aq-d-1) var(--aq-ease), background var(--aq-d-1) var(--aq-ease);
}
.ce-panel-icon:hover { color: var(--aq-text); background: rgba(255,255,255,0.04); }

.ce-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 14px 12px;
  padding: 6px 8px;
  border: 1px solid var(--aq-line);
  border-radius: 6px;
  background: var(--aq-surface);
}
.ce-search svg { color: var(--aq-text-faint); }
.ce-search input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--aq-text);
  font: inherit;
  font-size: 11.5px;
  min-width: 0;
}
.ce-search input::placeholder { color: var(--aq-text-faint); }
.ce-kbd {
  font-family: var(--aq-ff-mono);
  font-size: 9.5px;
  color: var(--aq-text-faint);
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--aq-line);
}

.ce-ai-card {
  margin: 0 14px 14px;
  padding: 10px 12px 12px;
  border: 1px solid color-mix(in srgb, var(--aq-accent) 35%, var(--aq-line));
  border-radius: 8px;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--aq-accent) 10%, transparent),
    transparent 70%);
  position: relative;
  overflow: hidden;
}
.ce-ai-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 90% 0%, color-mix(in srgb, var(--aq-accent) 18%, transparent), transparent 60%);
  pointer-events: none;
}
.ce-ai-head {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--aq-ff-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--aq-accent);
  margin-bottom: 8px;
}
.ce-ai-input {
  display: block;
  width: 100%;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--aq-line);
  border-radius: 5px;
  padding: 7px 9px;
  color: var(--aq-text);
  font: inherit;
  font-size: 11.5px;
  outline: none;
}
.ce-ai-input::placeholder { color: var(--aq-text-faint); font-style: italic; }
.ce-ai-go {
  margin-top: 8px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: var(--aq-accent);
  color: #08090b;
  border: 0;
  border-radius: 5px;
  padding: 6px 10px;
  font: inherit;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
}

.ce-pillrow {
  display: flex;
  gap: 4px;
  margin: 0 14px 12px;
  padding: 3px;
  background: var(--aq-surface);
  border: 1px solid var(--aq-line);
  border-radius: 6px;
}
.ce-pill {
  flex: 1;
  background: transparent;
  border: 0;
  border-radius: 4px;
  padding: 5px 8px;
  font: inherit;
  font-size: 11px;
  color: var(--aq-text-dim);
  cursor: pointer;
  transition: background 160ms, color 160ms;
}
.ce-pill:hover { color: var(--aq-text); }
.ce-pill.is-active {
  background: var(--aq-surface-2);
  color: var(--aq-text);
}

.ce-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 14px 8px;
  font-family: var(--aq-ff-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--aq-text-faint);
}
.ce-section-count {
  margin-left: auto;
  font-family: var(--aq-ff-mono);
  font-size: 9.5px;
  color: var(--aq-text-faint);
  padding: 1px 6px;
  border-radius: 99px;
  background: rgba(255,255,255,0.04);
}

.ce-tpl-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 14px 14px;
}
.ce-tpl {
  cursor: pointer;
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ce-tpl-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.04);
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: transform 160ms, border-color 160ms;
}
.ce-tpl:hover .ce-tpl-thumb {
  border-color: var(--aq-accent);
}
.ce-tpl-name {
  font-size: 11px;
  color: var(--aq-text);
  font-weight: 450;
}
.ce-tpl-meta {
  font-size: 9.5px;
  color: var(--aq-text-faint);
}
.ce-tpl-type {
  position: absolute;
  top: 5px;
  left: 5px;
  font-family: var(--aq-ff-mono);
  font-size: 8.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--aq-text);
  background: rgba(0,0,0,0.55);
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid rgba(255,255,255,0.08);
}

/* Template thumb mock content */
.ce-tpl-mock-count {
  font-family: var(--aq-ff-mono);
  font-size: 16px;
  color: var(--aq-accent);
  font-weight: 600;
  text-shadow: 0 0 12px var(--aq-accent);
}
.ce-tpl-mock-qr {
  width: 32px; height: 32px;
  background:
    linear-gradient(transparent 0 25%, white 25% 27%, transparent 27% 50%, white 50% 52%, transparent 52% 75%, white 75% 77%, transparent),
    linear-gradient(90deg, transparent 0 25%, white 25% 27%, transparent 27% 50%, white 50% 52%, transparent 52% 75%, white 75% 77%, transparent);
  background-size: 100% 100%;
  border-radius: 2px;
}
.ce-tpl-mock-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 80%; height: 60%;
  gap: 2px;
}
.ce-tpl-mock-split span:first-child { background: rgba(255,255,255,0.18); border-radius: 2px; }
.ce-tpl-mock-split span:last-child { background: rgba(255,255,255,0.06); border-radius: 2px; }
.ce-tpl-mock-hero {
  width: 60%; height: 60%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #6cb8ff, #143a4f 70%);
}
.ce-tpl-mock-car {
  display: flex;
  gap: 3px;
}
.ce-tpl-mock-car span {
  width: 10px; height: 28px;
  background: rgba(255,255,255,0.18);
  border-radius: 2px;
}
.ce-tpl-mock-car span:first-child { background: rgba(255,255,255,0.4); }
.ce-tpl-mock-offer {
  font-family: var(--aq-ff-display);
  font-size: 30px;
  font-weight: 700;
  color: white;
}
.ce-tpl-mock-way {
  font-size: 36px;
  color: white;
  opacity: 0.8;
}
.ce-tpl-mock-spot {
  width: 70%; height: 50%;
  background:
    radial-gradient(ellipse at center, rgba(255,255,255,0.4), transparent 60%);
}
.ce-tpl-mock-blank {
  font-size: 20px;
  color: var(--aq-text-faint);
  font-weight: 300;
}

/* ── Main (bordered card layer) ────────────────────────────────── */
.ce-main {
  display: grid;
  grid-template-rows: 52px 1fr;
  background: var(--aq-main-grad);
  border: 1px solid var(--aq-line);
  border-radius: 10px;
  position: relative;
  min-width: 0;
  overflow: hidden;
}
.ce-main::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.04) 50%, transparent 100%);
  pointer-events: none;
  z-index: 2;
}
.ce-stage-wrap {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at center, rgba(255,255,255,0.012), transparent 60%),
    repeating-linear-gradient(45deg, transparent 0 14px, rgba(255,255,255,0.012) 14px 15px),
    #06070a;
  min-height: 0;
}
.ce-stage {
  position: absolute;
  inset: 64px 24px 24px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: auto;
}
.ce-stage-frame {
  flex-shrink: 0;
}

/* ── Floating top toolbar (over preview) ───────────────────────── */
/* Rounded pill aesthetic — matches the element-edit toolbar
   (.ce-canvas-top-toolbar) so both floating bars share visual language.
   Per Sarah Chen's feedback (screenshot of Countdown Pill controls):
   "make this more rounded". The outer container goes full-pill, and
   every inner chip / input / swatch follows suit below. */
.ce-float-toolbar {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  background: rgba(14, 16, 20, 0.92);
  backdrop-filter: blur(14px);
  border: 1px solid var(--aq-line);
  border-radius: 999px;
  z-index: 5;
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
  font-size: 11.5px;
}
.ce-ft-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
}
.ce-ft-label {
  font-family: var(--aq-ff-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--aq-text-faint);
}
.ce-ft-divider {
  width: 1px;
  align-self: stretch;
  background: var(--aq-line);
  margin: 4px 0;
}
.ce-ft-seg {
  display: inline-flex;
  background: var(--aq-surface);
  border: 1px solid var(--aq-line);
  border-radius: 999px;
  padding: 2px;
  gap: 0;
}
.ce-ft-seg button {
  background: transparent;
  border: 0;
  padding: 3px 10px;
  font: inherit;
  font-size: 10px;
  font-family: var(--aq-ff-mono);
  letter-spacing: 0.04em;
  color: var(--aq-text-faint);
  cursor: pointer;
  border-radius: 999px;
  transition: background 160ms, color 160ms;
}
.ce-ft-seg button:hover { color: var(--aq-text); }
.ce-ft-seg button.is-active {
  background: var(--aq-surface-2);
  color: var(--aq-text);
  box-shadow: var(--aq-edge-top);
}
.ce-ft-swatch {
  width: 24px;
  height: 24px;
  border-radius: 999px;   /* circle — was 6px square */
  border: 0;
  cursor: pointer;
  position: relative;
  padding: 0;
  flex-shrink: 0;
}
.ce-ft-swatch-edge {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.4);
  pointer-events: none;
}
.ce-ft-input {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  background: var(--aq-surface);
  border: 1px solid var(--aq-line);
  border-radius: 999px;   /* pill — was 5px */
}
.ce-ft-input svg { color: var(--aq-text-faint); }
.ce-ft-input input {
  background: transparent;
  border: 0;
  outline: none;
  color: var(--aq-text);
  font: inherit;
  font-family: var(--aq-ff-mono);
  font-size: 10.5px;
  width: 130px;
}
.ce-ft-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  background: var(--aq-surface);
  border: 1px solid var(--aq-line);
  border-radius: 5px;
  color: var(--aq-text);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
}
.ce-ft-action:hover { background: var(--aq-surface-2); }
.ce-ft-count {
  font-family: var(--aq-ff-mono);
  font-size: 9.5px;
  padding: 1px 5px;
  border-radius: 99px;
  background: rgba(255,255,255,0.06);
  color: var(--aq-text-dim);
}

/* ── Subtle frame indicator (corner) ───────────────────────────── */
.ce-frame-tag {
  position: absolute;
  bottom: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(10, 12, 16, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid var(--aq-line);
  font-family: var(--aq-ff-mono);
  font-size: 9.5px;
  color: var(--aq-text-faint);
  letter-spacing: 0.06em;
  z-index: 4;
}
.ce-frame-tag-num { color: var(--aq-text-dim); }
.ce-frame-tag-name {
  color: var(--aq-text-dim);
  font-family: var(--aq-ff-sans, 'Inter', system-ui, sans-serif);
  font-size: 10px;
  letter-spacing: 0;
}

/* The preview itself — mimic the screenshot's content layout. */
.ce-preview {
  width: 1280px;
  height: 720px;
  background: linear-gradient(180deg, #051026 0%, #020613 80%);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.06);
  position: relative;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}
.ce-preview::after {
  /* subtle scanline / underwater feel */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(80,120,200,0.10), transparent 60%);
  pointer-events: none;
}
.ce-prev-eyebrow {
  position: absolute;
  top: 30px; left: 36px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: rgba(0,0,0,0.4);
  padding: 7px 14px;
  border-radius: 4px;
}
.ce-prev-eyebrow-label {
  font-family: var(--aq-ff-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: white;
}
.ce-prev-eyebrow-time {
  font-family: var(--aq-ff-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: #FF6F3C;
  letter-spacing: 0.04em;
}

.ce-prev-card {
  position: absolute;
  top: 86px; right: 36px;
  width: 540px;
  bottom: 30px;
  color: rgba(255,255,255,0.86);
}
.ce-prev-tabs {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 8px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 11.5px;
}
.ce-prev-tabs span { color: rgba(255,255,255,0.5); cursor: pointer; }
.ce-prev-tabs .is-active { color: white; border-bottom: 1px solid white; padding-bottom: 8px; margin-bottom: -9px; }
.ce-prev-body {
  font-size: 11.5px;
  line-height: 1.55;
  margin-bottom: 14px;
}
.ce-prev-eyebrow2 {
  font-family: var(--aq-ff-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: #FF6F3C;
  margin-bottom: 6px;
}
.ce-prev-eyebrow2.mt { margin-top: 12px; }
.ce-prev-fact {
  font-size: 11px;
  font-style: italic;
  color: rgba(255,255,255,0.7);
  line-height: 1.55;
  margin-bottom: 12px;
}
.ce-prev-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px 12px;
  font-size: 10px;
}
.ce-prev-stats > div { display: flex; flex-direction: column; gap: 2px; }
.ce-prev-stats span { color: rgba(255,255,255,0.5); font-size: 9px; }
.ce-prev-stats strong { color: white; font-weight: 500; font-size: 10px; line-height: 1.4; }
.ce-prev-map {
  position: relative;
  margin-top: 12px;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
  background: #050912;
}
.ce-prev-map-fill {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 60% 50%, rgba(96,200,255,0.4), transparent 4%),
    radial-gradient(circle at 70% 60%, rgba(96,200,255,0.5), transparent 3%),
    radial-gradient(circle at 80% 50%, rgba(96,200,255,0.45), transparent 3%),
    radial-gradient(circle at 73% 30%, rgba(96,200,255,0.4), transparent 3%),
    radial-gradient(ellipse at center, #0a1f3d, #050912 70%);
}
.ce-prev-map-cap {
  position: absolute;
  bottom: 6px;
  right: 8px;
  font-size: 8.5px;
  color: rgba(255,255,255,0.5);
}

.ce-prev-fish {
  position: absolute;
  top: 100px;
  left: 80px;
  width: 600px;
  height: 320px;
}
.ce-prev-fish svg { width: 100%; height: 100%; }

.ce-prev-title {
  position: absolute;
  bottom: 80px;
  left: 50px;
}
.ce-prev-title h2 {
  margin: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 76px;
  color: white;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 0.95;
}
.ce-prev-title em {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 22px;
  color: rgba(255,255,255,0.65);
  display: block;
  margin-top: 6px;
}
.ce-prev-conservation {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  background: transparent;
  border: 1px solid rgba(64, 200, 130, 0.5);
  color: #4ade80;
  border-radius: 99px;
  padding: 4px 12px;
  font-size: 11px;
  font-family: var(--aq-ff-mono);
}
.ce-prev-cdot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #4ade80;
}
.ce-prev-qr {
  position: absolute;
  bottom: 56px;
  left: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.ce-prev-qr-mock {
  width: 78px; height: 78px;
  background: white;
  border-radius: 4px;
  position: relative;
}
.ce-prev-qr-mock::before {
  content: "";
  position: absolute; inset: 6px;
  background:
    repeating-conic-gradient(from 0deg at 50% 50%, #000 0deg 18deg, white 18deg 36deg);
  background-size: 18px 18px;
  background:
    radial-gradient(circle at 20% 20%, #000 22%, transparent 23%),
    radial-gradient(circle at 80% 20%, #000 22%, transparent 23%),
    radial-gradient(circle at 20% 80%, #000 22%, transparent 23%),
    repeating-linear-gradient(0deg, #000 0 3px, transparent 3px 6px),
    repeating-linear-gradient(90deg, #000 0 3px, transparent 3px 6px);
  background-color: white;
}
.ce-prev-qr span {
  font-size: 8px;
  color: rgba(255,255,255,0.5);
  text-align: center;
  max-width: 80px;
  line-height: 1.3;
}

/* ── Right properties panel ────────────────────────────────────── */
.ce-props {
  background: #0c0e12;
  border-left: 1px solid var(--aq-line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-top: 52px;
  min-height: 0;
}
.ce-props-tabs {
  display: flex;
  border-bottom: 1px solid var(--aq-line);
  padding: 0 14px;
  flex-shrink: 0;
}
.ce-props-tabs button {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 12px 4px;
  font: inherit;
  font-size: 11.5px;
  color: var(--aq-text-faint);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 160ms, border-color 160ms;
  margin-bottom: -1px;
}
.ce-props-tabs button:hover { color: var(--aq-text-dim); }
.ce-props-tabs button.is-active {
  color: var(--aq-text);
  border-bottom-color: var(--aq-accent);
}

.ce-props-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0 14px;
  min-height: 0;
}
.ce-props-section {
  padding: 12px 14px;
  border-bottom: 1px solid var(--aq-line);
}
.ce-props-section:last-child { border-bottom: 0; }
.ce-props-label {
  font-family: var(--aq-ff-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--aq-text-faint);
  margin-bottom: 10px;
}

.ce-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.ce-row:last-child { margin-bottom: 0; }
.ce-tiny-label {
  font-size: 10.5px;
  color: var(--aq-text-faint);
  width: 64px;
  flex-shrink: 0;
  font-family: var(--aq-ff-mono);
}
.ce-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid var(--aq-line);
  border-radius: 5px;
  background: var(--aq-surface);
}
.ce-input-wrap svg { color: var(--aq-text-faint); }
.ce-input-wrap input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--aq-text);
  font: inherit;
  font-size: 11.5px;
  font-family: var(--aq-ff-mono);
  min-width: 0;
}

.ce-select {
  flex: 1;
  background: var(--aq-surface);
  border: 1px solid var(--aq-line);
  border-radius: 5px;
  padding: 5px 8px;
  color: var(--aq-text);
  font: inherit;
  font-size: 11.5px;
  outline: none;
}

.ce-segmented {
  display: inline-flex;
  flex: 1;
  border: 1px solid var(--aq-line);
  border-radius: 5px;
  background: var(--aq-surface);
  overflow: hidden;
  padding: 2px;
  gap: 0;
}
.ce-segmented button {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 5px 8px;
  font: inherit;
  font-size: 11px;
  color: var(--aq-text-dim);
  cursor: pointer;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background 160ms, color 160ms;
}
.ce-segmented button:hover { color: var(--aq-text); }
.ce-segmented button.is-active {
  background: var(--aq-surface-2);
  color: var(--aq-text);
  box-shadow: var(--aq-edge-top);
}
.ce-segmented.sm button { padding: 3px 6px; font-size: 10px; }

.ce-swatches {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
}
.ce-swatch {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  cursor: pointer;
  position: relative;
  background: white;
  transition: transform var(--aq-d-1) var(--aq-ease);
}
.ce-swatch:hover { transform: scale(1.08); }
.ce-swatch:active { transform: scale(0.96); transition-duration: 60ms; }
.ce-swatch.is-active {
  outline: 2px solid white;
  outline-offset: 2px;
}
.ce-swatch-custom {
  background: var(--aq-surface) !important;
  color: var(--aq-text-faint);
  display: grid;
  place-items: center;
  border-style: dashed !important;
}

.ce-species-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ce-species-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 5px;
  background: var(--aq-surface);
  border: 1px solid var(--aq-line);
}
.ce-species-row.is-pinned {
  border-color: color-mix(in srgb, var(--aq-accent) 40%, var(--aq-line));
  background: color-mix(in srgb, var(--aq-accent) 8%, var(--aq-surface));
}
.ce-species-thumb {
  width: 28px; height: 28px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  font-size: 14px;
  flex-shrink: 0;
}
.ce-species-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}
.ce-species-meta span {
  font-size: 11.5px;
  color: var(--aq-text);
  font-weight: 450;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ce-species-meta em {
  font-style: italic;
  font-size: 9.5px;
  color: var(--aq-text-faint);
  font-family: var(--aq-ff-mono);
}
.ce-mini-btn {
  width: 22px; height: 22px;
  background: transparent;
  border: 0;
  color: var(--aq-text-faint);
  cursor: pointer;
  border-radius: 4px;
  display: grid; place-items: center;
}
.ce-mini-btn:hover { color: var(--aq-text); background: rgba(255,255,255,0.06); }

.ce-species-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 8px;
  background: transparent;
  border: 1px dashed var(--aq-line);
  border-radius: 5px;
  color: var(--aq-text-faint);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  margin-top: 4px;
}
.ce-species-add:hover { color: var(--aq-text); border-color: var(--aq-text-faint); }

.ce-help {
  margin-top: 8px;
  font-size: 10.5px;
  color: var(--aq-text-faint);
  line-height: 1.5;
}

.ce-num-pill {
  font-family: var(--aq-ff-mono);
  font-size: 11px;
  color: var(--aq-text);
  padding: 3px 8px;
  background: var(--aq-surface);
  border: 1px solid var(--aq-line);
  border-radius: 4px;
  min-width: 36px;
  text-align: center;
}

.ce-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 100%;
  padding: 40px 20px;
  text-align: center;
  color: var(--aq-text-faint);
}
.ce-empty div {
  margin-top: 8px;
  font-size: 13px;
  color: var(--aq-text-dim);
  font-family: var(--aq-ff-display);
}
.ce-empty span {
  font-size: 11px;
  color: var(--aq-text-faint);
  max-width: 200px;
  line-height: 1.5;
}

/* ── Frame strip ───────────────────────────────────────────────── */
.ce-strip {
  background: #0a0c10;
  border-top: 1px solid var(--aq-line);
  padding: 10px 14px 12px;
  flex-shrink: 0;
}
.ce-strip-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}
.ce-strip-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--aq-ff-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--aq-text-dim);
}
.ce-strip-count {
  font-family: var(--aq-ff-mono);
  font-size: 9.5px;
  padding: 1px 5px;
  border-radius: 99px;
  background: rgba(255,255,255,0.04);
  color: var(--aq-text-faint);
  letter-spacing: 0;
}
.ce-strip-meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  color: var(--aq-text-faint);
  font-family: var(--aq-ff-mono);
}

.ce-strip-row {
  display: flex;
  align-items: stretch;
  gap: 6px;
}
.ce-strip-arrow {
  width: 24px;
  background: var(--aq-surface);
  border: 1px solid var(--aq-line);
  border-radius: 6px;
  color: var(--aq-text-dim);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.ce-strip-arrow:hover { color: var(--aq-text); }
.ce-strip-track {
  flex: 1;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0;
}

.ce-frame {
  flex-shrink: 0;
  width: 132px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 4px;
  border-radius: 5px;
  border: 1px solid transparent;
  transition: border-color 160ms, background 160ms;
}
.ce-frame:hover { background: rgba(255,255,255,0.03); }
.ce-frame.is-active {
  border-color: var(--aq-accent);
  background: color-mix(in srgb, var(--aq-accent) 8%, transparent);
}
.ce-frame-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  background:
    radial-gradient(ellipse at 30% 30%, rgba(80,140,200,0.25), transparent 70%),
    linear-gradient(180deg, #051026, #020613);
  border: 1px solid rgba(255,255,255,0.06);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.ce-frame.is-active .ce-frame-thumb {
  border-color: color-mix(in srgb, var(--aq-accent) 60%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--aq-accent) 30%, transparent);
}
.ce-frame-num {
  position: absolute;
  top: 4px;
  left: 5px;
  font-family: var(--aq-ff-mono);
  font-size: 9px;
  color: rgba(255,255,255,0.5);
}
.ce-frame-glyph {
  font-size: 28px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}
.ce-frame-pin {
  position: absolute;
  top: 4px;
  right: 5px;
  font-size: 10px;
  color: var(--aq-accent);
}
.ce-frame-warn {
  position: absolute;
  bottom: 4px;
  right: 5px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--aq-warn);
  color: #000;
  display: grid;
  place-items: center;
}
.ce-frame-meta { padding: 0 2px; }
.ce-frame-name {
  font-size: 11px;
  color: var(--aq-text);
  font-weight: 450;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ce-frame-sub {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--aq-ff-mono);
  font-size: 9.5px;
  color: var(--aq-text-faint);
  white-space: nowrap;
}

.ce-frame-add {
  flex-shrink: 0;
  width: 132px;
  background: transparent;
  border: 1px dashed var(--aq-line);
  border-radius: 5px;
  color: var(--aq-text-faint);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font: inherit;
  font-size: 11px;
}
.ce-frame-add:hover { color: var(--aq-text); border-color: var(--aq-text-faint); }

/* ── Viewport controls ─────────────────────────────────────────── */
.ce-viewport {
  position: absolute;
  bottom: 14px;
  right: 14px;
  display: flex;
  gap: 6px;
  align-items: center;
  z-index: 4;
  background: rgba(10, 12, 16, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--aq-line);
  border-radius: 8px;
  padding: 4px;
}
.ce-viewport-group {
  display: inline-flex;
  background: var(--aq-surface);
  border-radius: 5px;
  overflow: hidden;
}
.ce-viewport-group button {
  background: transparent;
  border: 0;
  color: var(--aq-text-dim);
  font: inherit;
  font-size: 11px;
  padding: 4px 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ce-viewport-group button:hover { color: var(--aq-text); background: rgba(255,255,255,0.04); }
.ce-viewport-group button.is-active { color: var(--aq-text); background: var(--aq-surface-2); }
.ce-viewport-num {
  display: inline-grid;
  place-items: center;
  font-family: var(--aq-ff-mono);
  font-size: 11px;
  color: var(--aq-text);
  padding: 4px 8px;
  min-width: 44px;
  text-align: center;
}
.ce-viewport-pill {
  background: var(--aq-surface);
  border: 0;
  color: var(--aq-text-dim);
  font: inherit;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 5px;
  cursor: pointer;
}
.ce-viewport-pill:hover { color: var(--aq-text); }
.ce-viewport-icon {
  width: 26px; height: 26px;
  background: transparent;
  border: 0;
  color: var(--aq-text-faint);
  cursor: pointer;
  border-radius: 5px;
  display: grid; place-items: center;
}
.ce-viewport-icon:hover { color: var(--aq-text); background: rgba(255,255,255,0.06); }

.aq-sep {
  color: var(--aq-text-faint);
  opacity: 0.4;
}
