/* =========================================================
   CHROMA — lobby shell
   Top bar, rail, stage caption, camera bar, panel chrome,
   action bar, review/loading states, toasts, focus mode
   ========================================================= */

/* ---------- top bar ---------- */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 26px;
  pointer-events: none;
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 130px;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 2, 10, 0.62), rgba(5, 2, 10, 0));
}

.topbar > * {
  pointer-events: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex: none;
  filter: drop-shadow(0 0 14px rgba(255, 79, 216, 0.18));
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0.16em;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
}

.sector {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
}

.sector-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px 2px rgba(95, 245, 255, 0.4);
  animation: sector-pulse 3.6s ease-in-out infinite;
}

.sector-slash {
  color: rgba(255, 255, 255, 0.18);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgba(15, 8, 28, 0.55);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  backdrop-filter: blur(14px);
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.status-pill:hover {
  border-color: var(--line-strong);
  color: var(--paper);
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 9px 1px rgba(255, 205, 110, 0.4);
}

.status-pill[data-state="saved"] .status-dot {
  background: var(--cyan);
  box-shadow: 0 0 9px 1px rgba(95, 245, 255, 0.45);
}

.status-pill[data-state="published"] .status-dot {
  background: var(--success);
  box-shadow: 0 0 9px 1px rgba(125, 255, 196, 0.45);
}

.status-pill[data-state="unsaved"] .status-dot {
  background: var(--coral);
  box-shadow: 0 0 9px 1px rgba(255, 138, 95, 0.45);
}

.status-pill[data-state="clean"] .status-dot {
  background: var(--violet);
  box-shadow: 0 0 9px 1px rgba(169, 139, 255, 0.4);
}

.fps-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 99px;
  background: rgba(15, 8, 28, 0.4);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  backdrop-filter: blur(10px);
}

.fps-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--success);
}

.fps-chip[data-level="mid"] .fps-dot {
  background: var(--gold);
}

.fps-chip[data-level="low"] .fps-dot {
  background: var(--coral);
}

.fps-chip[hidden] {
  display: none;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(15, 8, 28, 0.55);
  color: var(--muted);
  backdrop-filter: blur(14px);
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.icon-button:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
  color: var(--paper);
}

/* ---------- rail ---------- */

.rail {
  position: fixed;
  left: 22px;
  top: 50%;
  z-index: 25;
  width: 168px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rail-item {
  position: relative;
  display: grid;
  grid-template-columns: 20px 20px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: var(--faint);
  text-align: left;
  overflow: hidden;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.rail-item:hover {
  color: var(--paper);
  background: rgba(255, 255, 255, 0.035);
}

.rail-item.is-active {
  border-color: color-mix(in srgb, var(--item-accent, var(--accent)) 22%, transparent);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--item-accent, var(--accent)) 14%, transparent), transparent 88%),
    rgba(13, 7, 25, 0.42);
  color: var(--paper);
  backdrop-filter: blur(12px);
}

.rail-index {
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
  color: rgba(179, 165, 201, 0.42);
  transition: color 180ms ease;
}

.rail-item.is-active .rail-index {
  color: color-mix(in srgb, var(--item-accent, var(--accent)) 72%, #fff);
}

.rail-icon {
  width: 19px;
  height: 19px;
  color: rgba(179, 165, 201, 0.6);
  transition: color 180ms ease, filter 180ms ease;
}

.rail-icon svg {
  width: 100%;
  height: 100%;
}

.rail-item.is-active .rail-icon {
  color: var(--item-accent, var(--accent));
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--item-accent, var(--accent)) 45%, transparent));
}

.rail-label {
  min-width: 0;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.rail-glow {
  position: absolute;
  left: 0;
  top: 22%;
  width: 2px;
  height: 56%;
  border-radius: 2px;
  background: var(--item-accent, var(--accent));
  box-shadow: 0 0 12px 1px color-mix(in srgb, var(--item-accent, var(--accent)) 55%, transparent);
  opacity: 0;
  transition: opacity 180ms ease;
}

.rail-item.is-active .rail-glow {
  opacity: 1;
}

.rail-divider {
  height: 1px;
  margin: 10px 12px;
  background: var(--line);
}

.rail-focus {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  color: rgba(128, 114, 151, 0.72);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 9px;
  transition: color 160ms ease, background-color 160ms ease;
}

.rail-focus svg {
  width: 15px;
  height: 15px;
}

.rail-focus:hover {
  color: var(--paper);
  background: rgba(255, 255, 255, 0.035);
}

/* ---------- stage caption ---------- */

.stage-plate {
  position: fixed;
  left: 206px;
  bottom: 110px;
  z-index: 20;
  width: min(400px, 31vw);
  pointer-events: none;
  text-shadow: 0 2px 26px rgba(5, 2, 12, 0.65);
}

.plate-rule {
  width: 38px;
  height: 2px;
  margin-bottom: 13px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--plate-accent, var(--cyan)), transparent);
  box-shadow: 0 0 16px color-mix(in srgb, var(--plate-accent, var(--cyan)) 40%, transparent);
}

.plate-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.plate-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--plate-accent, var(--cyan));
  box-shadow: 0 0 8px 1px color-mix(in srgb, var(--plate-accent, var(--cyan)) 55%, transparent);
}

#plate-number {
  color: var(--faint);
}

.plate-name {
  margin-top: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(34px, 3.7vw, 54px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  color: var(--paper);
  background: linear-gradient(104deg, #fff 4%, #f0e9ff 50%, var(--plate-accent, #a98bff) 118%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  overflow-wrap: anywhere;
}

.plate-tagline {
  margin-top: 8px;
  max-width: 31ch;
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(226, 216, 244, 0.72);
}

.plate-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 13px;
}

.plate-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(10, 5, 20, 0.36);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  backdrop-filter: blur(8px);
}

.plate-meta span::before {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--plate-accent, var(--cyan)) 72%, #fff);
}

/* ---------- camera bar ---------- */

.view-bar {
  position: fixed;
  left: 50%;
  bottom: 98px;
  z-index: 26;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(12, 6, 23, 0.68);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(18px) saturate(1.2);
  transform: translateX(-50%);
}

.view-button {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  color: rgba(198, 187, 219, 0.6);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 140ms ease, background-color 140ms ease;
}

.view-button svg {
  width: 15px;
  height: 15px;
}

.view-button:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--paper);
}

.view-button.is-wide {
  padding: 0 9px;
  letter-spacing: 0.1em;
}

.view-button[aria-pressed="true"] {
  background: rgba(95, 245, 255, 0.1);
  color: var(--cyan);
}

.view-sep {
  width: 1px;
  height: 17px;
  margin: 0 4px;
  background: var(--line);
}

/* ---------- gesture hint ---------- */

.gesture-hint {
  position: fixed;
  left: 50%;
  bottom: 148px;
  z-index: 24;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  background: rgba(10, 5, 20, 0.4);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(179, 165, 201, 0.58);
  backdrop-filter: blur(8px);
  transform: translateX(-50%);
  transition: opacity 500ms ease, transform 500ms ease;
  pointer-events: none;
}

.gesture-hint.is-hidden {
  opacity: 0;
  transform: translate(-50%, 5px);
}

.hint-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(95, 245, 255, 0.6);
}

.hint-slash {
  color: rgba(255, 255, 255, 0.16);
}

/* ---------- panel chrome ---------- */

.panel {
  position: fixed;
  top: 92px;
  right: 22px;
  bottom: 100px;
  z-index: 30;
  width: clamp(354px, 30vw, 420px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(158deg, rgba(35, 21, 63, 0.9) 0%, rgba(17, 10, 32, 0.94) 42%, rgba(11, 6, 23, 0.96) 100%);
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(26px) saturate(1.22);
  transition: transform 460ms cubic-bezier(0.22, 1, 0.36, 1), opacity 260ms ease;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), var(--panel-accent, var(--cyan)), rgba(255, 255, 255, 0.1), transparent);
  opacity: 0.85;
}

.panel::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 16px;
  width: 38px;
  height: 38px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 0 10px;
  pointer-events: none;
}

.panel.is-closed {
  transform: translateX(calc(100% + 44px));
  opacity: 0;
  pointer-events: none;
}

.panel-head {
  position: relative;
  flex: none;
  padding: 22px 20px 15px;
  border-bottom: 1px solid var(--line);
}

.panel-heading {
  position: relative;
  z-index: 2;
  padding-right: 34px;
}

.panel-kicker {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--panel-accent, var(--cyan));
}

.panel-title {
  margin-top: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 27px;
  line-height: 1.04;
  letter-spacing: -0.025em;
}

.panel-sub {
  max-width: 32ch;
  margin-top: 7px;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--muted);
}

.panel-ghost {
  position: absolute;
  top: -20px;
  right: 8px;
  z-index: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 98px;
  line-height: 1;
  letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.055);
  pointer-events: none;
  user-select: none;
}

.panel-collapse {
  position: absolute;
  top: 18px;
  right: 14px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(10, 5, 20, 0.34);
  color: var(--faint);
  transition: color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

.panel-collapse svg {
  width: 16px;
  height: 16px;
}

.panel-collapse:hover {
  color: var(--paper);
  background: rgba(255, 255, 255, 0.07);
}

.panel-body {
  position: relative;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 20px 28px;
  scroll-behavior: smooth;
}

.panel-body > .panel-section:first-child {
  margin-top: 0;
}

.sheet-grab,
.mobile-tabs,
.sheet-actions {
  display: none;
}

.panel-reopen {
  position: fixed;
  right: 0;
  top: 50%;
  z-index: 31;
  display: none;
  align-items: center;
  gap: 9px;
  padding: 14px 10px;
  border: 1px solid var(--line-strong);
  border-right: 0;
  border-radius: 12px 0 0 12px;
  background: rgba(16, 9, 30, 0.9);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  backdrop-filter: blur(14px);
  transform: translateY(-50%);
  transition: color 160ms ease, padding-right 160ms ease;
}

.panel-reopen:hover {
  color: var(--paper);
  padding-right: 14px;
}

.panel-reopen svg {
  width: 15px;
  height: 15px;
}

body.panel-closed .panel-reopen {
  display: flex;
}

/* ---------- action bar ---------- */

.actionbar {
  position: fixed;
  left: 22px;
  right: 22px;
  bottom: 18px;
  z-index: 35;
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto minmax(290px, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 10px 12px 10px 13px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(100deg, rgba(22, 13, 40, 0.84), rgba(12, 7, 23, 0.86));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(22px) saturate(1.2);
}

.player-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 4px;
  border-radius: 12px;
  text-align: left;
  transition: background-color 160ms ease;
}

.player-chip:hover {
  background: rgba(255, 255, 255, 0.045);
}

.player-thumb {
  position: relative;
  width: 40px;
  height: 40px;
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 28%, rgba(255, 255, 255, 0.32), transparent 34%),
    conic-gradient(from 210deg, #5ff5ff, #a98bff 36%, #ff4fd8 68%, #ffcd6e);
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 16px rgba(10, 5, 20, 0.45);
}

.player-thumb::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px solid rgba(95, 245, 255, 0.18);
  border-radius: 50%;
}

.player-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.player-name {
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.player-sub {
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
}

.actionbar-note {
  display: flex;
  align-items: center;
  gap: 7px;
  justify-self: center;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(128, 114, 151, 0.72);
  white-space: nowrap;
}

.note-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(95, 245, 255, 0.55);
}

.actionbar-note .slash {
  color: rgba(255, 255, 255, 0.15);
}

#dirty-note {
  color: var(--faint);
}

#dirty-note.is-dirty {
  color: var(--coral);
}

.actionbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.actionbar-actions .btn {
  min-height: 40px;
  padding-top: 10px;
  padding-bottom: 10px;
}

/* ---------- focus mode ---------- */

.focus-exit {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  background: rgba(12, 6, 23, 0.62);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  backdrop-filter: blur(14px);
}

.focus-exit[hidden] {
  display: none;
}

.focus-exit svg {
  width: 12px;
  height: 12px;
}

.focus-exit:hover {
  color: var(--paper);
  border-color: var(--line-hot);
}

body.is-focus-mode .topbar,
body.is-focus-mode .rail,
body.is-focus-mode .panel,
body.is-focus-mode .panel-reopen,
body.is-focus-mode .actionbar,
body.is-focus-mode .view-bar,
body.is-focus-mode .stage-plate,
body.is-focus-mode .gesture-hint {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 260ms ease, visibility 260ms;
}

body.is-focus-mode .focus-exit {
  display: inline-flex;
}

body.is-focus-mode .stage-wash {
  opacity: 0.55;
}

/* ---------- loading / error ---------- */

.stage-loading {
  position: fixed;
  left: 50%;
  bottom: 230px;
  z-index: 28;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgba(12, 6, 23, 0.78);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
  transform: translateX(-50%);
}

.stage-loading[hidden] {
  display: none;
}

.spinner {
  width: 13px;
  height: 13px;
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 750ms linear infinite;
}

.stage-error {
  position: fixed;
  inset: 0;
  z-index: 29;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 2, 10, 0.4);
  backdrop-filter: blur(5px);
}

.stage-error[hidden] {
  display: none;
}

.stage-error-card {
  width: min(410px, 100%);
  padding: 24px;
  border: 1px solid rgba(255, 113, 136, 0.24);
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(44, 19, 40, 0.96), rgba(13, 7, 23, 0.98));
  box-shadow: var(--shadow-panel);
}

.stage-error-card .eyebrow {
  color: var(--danger);
}

.stage-error-card h2 {
  margin-top: 9px;
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.1;
}

.stage-error-card p:not(.eyebrow) {
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.stage-error-actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

/* ---------- import review ---------- */

.review-bar {
  position: fixed;
  top: 86px;
  left: 50%;
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: calc(100vw - 48px);
  padding: 10px 12px 10px 15px;
  border: 1px solid rgba(95, 245, 255, 0.26);
  border-radius: 15px;
  background: linear-gradient(100deg, rgba(17, 26, 38, 0.94), rgba(17, 9, 31, 0.95));
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(95, 245, 255, 0.05) inset;
  backdrop-filter: blur(20px);
  transform: translateX(-50%);
}

.review-bar[hidden] {
  display: none;
}

.review-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cyan);
  white-space: nowrap;
}

.review-pulse {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px 2px rgba(95, 245, 255, 0.45);
  animation: sector-pulse 1.8s ease-in-out infinite;
}

.review-name {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-left: 13px;
  border-left: 1px solid var(--line);
}

.review-name span {
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.review-name input {
  width: 132px;
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  font-size: 12.5px;
  font-weight: 600;
  outline: none;
}

.review-name input:focus {
  border-bottom-color: var(--cyan);
}

.review-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.review-stats span {
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 6.8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
}

.review-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.review-actions .btn {
  min-height: 34px;
  padding: 8px 11px;
  font-size: 11px;
}

/* ---------- toasts ---------- */

.toasts {
  position: fixed;
  left: 50%;
  bottom: 106px;
  z-index: 250;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(440px, calc(100vw - 32px));
  pointer-events: none;
  transform: translateX(-50%);
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(16, 9, 30, 0.94);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.4);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  pointer-events: auto;
  animation: toast-in 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
  backdrop-filter: blur(16px);
}

.toast.is-out {
  animation: toast-out 220ms ease both;
}

.toast-icon {
  width: 7px;
  height: 7px;
  flex: none;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(95, 245, 255, 0.6);
}

.toast[data-type="success"] .toast-icon {
  background: var(--success);
  box-shadow: 0 0 10px rgba(125, 255, 196, 0.55);
}

.toast[data-type="error"] .toast-icon {
  background: var(--danger);
  box-shadow: 0 0 10px rgba(255, 113, 136, 0.55);
}

.toast[data-type="warn"] .toast-icon {
  background: var(--gold);
  box-shadow: 0 0 10px rgba(255, 205, 110, 0.5);
}

.toast strong {
  display: block;
  margin-bottom: 2px;
  color: var(--paper);
  font-size: 11.5px;
  font-weight: 600;
}

/* ---------- keyframes ---------- */

@keyframes sector-pulse {
  0%, 100% { opacity: 0.9; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.72); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateY(4px); }
}

/* ---------- quality reductions ---------- */

body[data-quality="potato"] .panel,
body[data-quality="potato"] .actionbar,
body[data-quality="potato"] .view-bar,
body[data-quality="potato"] .review-bar,
body[data-quality="potato"] .status-pill,
body[data-quality="potato"] .icon-button,
body[data-quality="potato"] .toast,
body[data-quality="potato"] .rail-item.is-active {
  backdrop-filter: none;
}

body[data-quality="potato"] .panel {
  background: linear-gradient(158deg, #22143d, #110a20 55%, #0b0617);
}

body[data-quality="potato"] .actionbar {
  background: #140c26;
}

body[data-quality="potato"] .panel-ghost {
  display: none;
}
