:root {
  --bg: #07111b;
  --panel: #0d1824;
  --panel-2: #122131;
  --line: #22384e;
  --text: #e8f1fb;
  --muted: #91a5bb;
  --accent: #2e8fff;
  --accent-2: #10b981;
  --danger: #ef4444;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--bg); color: var(--text); font-family: Inter, Arial, sans-serif; }
body { display: flex; flex-direction: column; }
button, input, select { font: inherit; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 16px; border-bottom: 1px solid var(--line); background: #08131e;
}
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand img { width: 64px; height: 64px; object-fit: contain; }
.brand h1 { font-size: 16px; margin: 0; line-height: 1.05; letter-spacing: 0.01em; }
.brand p { margin: 3px 0 0; color: var(--muted); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; }
.top-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.project-name {
  min-width: 220px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text);
}
.btn {
  padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel);
  color: var(--text); cursor: pointer;
}
.btn:hover { background: #172636; }
.btn.primary { background: #18304a; border-color: #29527b; }
.btn.accent { background: #143929; border-color: #1f6c49; }
.btn.danger { background: #3b1616; border-color: #7f1d1d; }
.layout {
  display: grid; grid-template-columns: 290px minmax(0, 1fr) 390px; gap: 12px;
  padding: 12px; min-height: 0; flex: 1; align-items: start;
}
.sidebar, .stage-section { min-height: 0; min-width: 0; }
.sidebar { overflow: auto; }
.sidebar.left { min-width: 0; }
.sidebar.right { min-width: 0; }
.stage-section { overflow: auto; padding-right: 4px; min-width: 0; }
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 12px; margin-bottom: 12px;
}
.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.panel-header-left { display: inline-flex; align-items: center; gap: 8px; }
#mediaPanelToggle { min-width: 34px; width: 34px; height: 34px; }
#mediaPanelSection.collapsed { padding-bottom: 10px; }
#mediaPanelSection.collapsed #mediaList { max-height: none; }
.panel-collapsed-note { color: var(--muted); font-size: 13px; padding: 8px 4px 2px; }
.list.collapsed-hint { max-height: none; }
.panel-header h2 { margin: 0; font-size: 15px; }
.pill {
  background: #162a3d; color: #c5d9ef; border: 1px solid #294765; border-radius: 999px;
  padding: 3px 8px; font-size: 12px;
}
.list { display: flex; flex-direction: column; gap: 8px; max-height: calc(50vh - 120px); overflow: auto; }
.list.empty, .empty { color: var(--muted); font-size: 14px; }
.media-item, .layer-item {
  border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--panel-2);
  cursor: pointer;
}
.media-item.selected, .layer-item.selected { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(46,143,255,0.35) inset; }
.media-item-title, .layer-item-title { font-weight: 600; font-size: 14px; }
.media-item-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.media-delete-btn { min-width: 30px; height: 28px; font-size: 14px; border-radius: 9px; flex: 0 0 auto; }
.media-item-sub, .layer-item-sub { color: var(--muted); font-size: 12px; margin-top: 4px; }
.layer-item-row { display: flex; justify-content: space-between; gap: 8px; }
.stage-section {
  display: flex; flex-direction: column; gap: 10px;
}
.stage-toolbar {
  display: flex; gap: 12px; align-items: center; justify-content: space-between;
  padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; flex-wrap: wrap;
}
.stage-toolbar label { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.stage-toolbar select { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); }
.stage-inline-tools, .projectors, .stage-zoom-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.stage-zoom-tools { margin-left: auto; }
.zoom-inline-label { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.zoom-inline-label input[type="range"] { width: 150px; }
.zoom-pill { min-width: 60px; text-align: center; }
.projectors { display: flex; gap: 8px; flex-wrap: wrap; }
.stage-wrap {
  flex: 1; min-height: 320px; display: flex; align-items: center; justify-content: center; overflow: auto;
  background: linear-gradient(180deg, #081019, #060b11); border: 1px solid var(--line); border-radius: 18px; padding: 12px;
}
.stage-viewport {
  width: 100%; max-width: none; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; transition: width 120ms ease;
}
#stageCanvas {
  width: 100%; max-width: 100%; aspect-ratio: 16/9;
  background: #000; border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}
.statusbar {
  display: flex; justify-content: space-between; gap: 12px; color: var(--muted);
  font-size: 12px; padding: 0 4px;
}
.inspector.hidden { display: none; }
.inspector label, .notes p { display: block; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.inspector input[type="text"], .inspector input[type="number"], .inspector select {
  width: 100%; margin-top: 6px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text);
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stepper-grid label { margin-bottom: 4px; }
.stepper-row {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}
.stepper-row input[type="number"] {
  margin-top: 0 !important;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  min-height: 48px;
}
.stepper-btn {
  min-width: 40px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #14283d;
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
}
.stepper-btn:hover { background: #1a3149; }
.stepper-btn:active { transform: translateY(1px); }
.checks { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0; color: var(--text); }
.inline-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.notes { color: var(--muted); font-size: 13px; line-height: 1.5; }
.bottom-dock {
  display: grid;
  grid-column: 2 / 4;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  margin-top: 4px;
  padding-bottom: 2px;
}
.dock-panel { margin-bottom: 0; min-height: 0; }
.dock-span-5 { grid-column: span 5; }
.dock-span-3 { grid-column: span 3; }
.dock-span-2 { grid-column: span 2; }
.bottom-dock .list { max-height: 290px; }
.compact-notes p { margin: 0 0 10px; }
.fx-pro-panel {
  padding: 12px;
  margin-top: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(19, 33, 49, 0.72);
}
.fx-grid { margin-top: 10px; }
.fx-slider-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}
.fx-slider-row input[type="range"] { width: 100%; }
.fx-value-chip {
  min-width: 58px;
  text-align: center;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid #294765;
  background: #102131;
  color: #d8e7f8;
  font-size: 12px;
}
.fx-color-input {
  width: 100%;
  margin-top: 6px;
  min-height: 42px;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}
.fx-actions-row { margin-top: 10px; }
.right .panel { position: sticky; top: 0; max-height: calc(100vh - 108px); overflow: auto; }
@media (max-width: 1680px) {
  .layout { grid-template-columns: 270px minmax(0, 1fr) 360px; }
  .project-name { min-width: 180px; }
}
@media (max-width: 1480px) {
  .topbar { gap: 12px; }
  .btn { padding: 8px 10px; }
  .layout { grid-template-columns: 240px minmax(0, 1fr) 330px; }
  .zoom-inline-label input[type="range"] { width: 120px; }
}
@media (max-width: 1380px) {
  .layout { grid-template-columns: 240px minmax(0, 1fr); }
  .right { grid-column: 1 / -1; }
  .bottom-dock { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dock-span-5, .dock-span-3, .dock-span-2 { grid-column: span 1; }
  .stage-zoom-tools { width: 100%; justify-content: flex-start; margin-left: 0; }
}
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .top-actions { justify-content: flex-start; }
  .project-name { width: 100%; min-width: 0; }
  .stage-toolbar { align-items: flex-start; }
  .stage-inline-tools, .stage-zoom-tools, .projectors { width: 100%; justify-content: flex-start; margin-left: 0; }
  .zoom-inline-label { width: 100%; justify-content: space-between; }
  .zoom-inline-label input[type="range"] { flex: 1; min-width: 120px; }
  .bottom-dock { grid-column: 1 / -1; grid-template-columns: 1fr; }
  .dock-span-5, .dock-span-3, .dock-span-2 { grid-column: span 1; }
}

.quick-output-block {
  padding: 10px 12px;
  margin-bottom: 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(19, 33, 49, 0.7);
}
.quick-output-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.quick-output-actions {
  margin-bottom: 6px;
}
.quick-output-tip {
  color: var(--muted);
  font-size: 12px;
}

.quick-output-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.quick-output-actions .btn { width: 100%; }
.video-zoom-panel { margin: 10px 0 4px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: rgba(12, 24, 36, 0.62); }
.video-zoom-panel.hidden { display: none; }
.right .panel .grid2 { gap: 8px; }
.right .panel .inline-actions { gap: 6px; }

.inspector input[disabled] { opacity: 0.65; }


.layer-item-tools {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.icon-btn {
  min-width: 36px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0f1f2f;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.icon-btn:hover { background: #1a3149; }
.icon-btn.active { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(46,143,255,0.35) inset; }
.icon-btn.danger { color: #fecaca; background: #321515; border-color: #7f1d1d; }
.project-bank-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: var(--panel-2);
}
.project-bank-title { font-weight: 600; font-size: 14px; }
.project-bank-sub { color: var(--muted); font-size: 12px; margin-top: 4px; }
.project-bank-actions { display: flex; gap: 8px; }
.btn.active { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(46,143,255,0.35) inset; }


.media-item-layout {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}
.media-thumb {
  position: relative;
  width: 116px;
  height: 66px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #294765;
  background: #08131e;
  flex: 0 0 auto;
}
.media-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.media-thumb-placeholder,
.project-bank-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c6d8ea;
  font-size: 24px;
  background: linear-gradient(180deg, #122131, #0a1520);
}
.media-type-chip {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(7, 17, 27, 0.86);
  border: 1px solid rgba(46, 143, 255, 0.45);
  font-size: 10px;
  letter-spacing: 0.04em;
}
.media-item-meta { min-width: 0; }
.media-item-title { word-break: break-word; }
.project-bank-list {
  max-height: calc(50vh - 80px);
}
.project-bank-item {
  align-items: stretch;
}
.project-bank-layout {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  flex: 1;
}
.project-bank-thumb {
  width: 92px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #294765;
  background: #08131e;
}
.project-bank-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.project-bank-meta { min-width: 0; }
.project-bank-title { word-break: break-word; }


.layer-item-layout {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}
.layer-thumb-wrap {
  display: flex;
  align-items: center;
}
.layer-thumb {
  position: relative;
  width: 88px;
  height: 60px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #294765;
  background: #08131e;
}
.layer-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.layer-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c6d8ea;
  font-size: 24px;
  background: linear-gradient(180deg, #122131, #0a1520);
}
.layer-thumb-chip {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(7, 17, 27, 0.86);
  border: 1px solid rgba(46, 143, 255, 0.45);
  font-size: 10px;
  letter-spacing: 0.04em;
}
.layer-item-main {
  min-width: 0;
}
.layer-item-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.layer-item-layout.compact {
  align-items: start;
}
.icon-btn.slim {
  min-width: 30px;
  width: 30px;
  height: 30px;
  font-size: 14px;
}
.compact-tools {
  gap: 6px;
}
.layer-details-panel {
  display: none;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.layer-details-panel.open {
  display: block;
}
.layer-details-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.layer-monitor-section {
  padding-bottom: 12px;
}
.layer-monitor-wrap {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(113,157,202,0.35);
  background: #050c15;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
}
.layer-monitor-canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  display: block;
  background: #050c15;
}
.layer-monitor-meta {
  color: var(--muted);
  font-size: 12px;
  margin-top: 8px;
  line-height: 1.35;
}
.layer-detail-section {
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}
.layer-detail-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}
.layer-details-hint {
  color: var(--muted);
  font-size: 12px;
  margin-top: 8px;
}
.layer-item.details-open {
  box-shadow: 0 0 0 1px rgba(46,143,255,0.22) inset;
}
.detail-tools .icon-btn.wide {
  min-width: 62px;
}
.project-bank-toolbar {
  margin-bottom: 10px;
}
.project-bank-top-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.autosave-info {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}
.project-search {
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
}
.pulse-outline {
  animation: pulseOutline 1.1s ease;
}
@keyframes pulseOutline {
  0% { box-shadow: 0 0 0 0 rgba(46, 143, 255, 0.0); }
  30% { box-shadow: 0 0 0 3px rgba(46, 143, 255, 0.38); }
  100% { box-shadow: 0 0 0 0 rgba(46, 143, 255, 0.0); }
}


.cue-bank-toolbar {
  margin-bottom: 10px;
}
.cue-list {
  max-height: calc(42vh - 80px);
}
.cue-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: var(--panel-2);
  cursor: pointer;
}
.cue-item.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(46,143,255,0.35) inset;
}
.cue-item-layout {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}
.cue-thumb {
  position: relative;
  width: 92px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #294765;
  background: #08131e;
}
.cue-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cue-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c6d8ea;
  font-size: 24px;
  background: linear-gradient(180deg, #122131, #0a1520);
}
.cue-thumb-chip {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(7, 17, 27, 0.86);
  border: 1px solid rgba(46, 143, 255, 0.45);
  font-size: 10px;
  letter-spacing: 0.04em;
}
.cue-item-main { min-width: 0; }
.cue-item-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.cue-item-title { font-weight: 600; font-size: 14px; }
.cue-item-sub { color: var(--muted); font-size: 12px; margin-top: 4px; }
.cue-item-badges { display: flex; gap: 6px; align-items: center; }
.cue-live-pill { color: #d7ebff; border-color: rgba(46,143,255,0.7); }
.cue-action-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.cue-action-grid .icon-btn { width: 100%; }


.btn-small {
  padding: 7px 10px;
  font-size: 12px;
  border-radius: 9px;
}
.output-ops-list {
  max-height: calc(50vh - 80px);
}
.output-ops-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: var(--panel-2);
}
.output-ops-card.is-blackout {
  border-color: #7f1d1d;
  box-shadow: 0 0 0 1px rgba(127, 29, 29, 0.3) inset;
}
.output-ops-card.is-frozen {
  border-color: #29527b;
  box-shadow: 0 0 0 1px rgba(41, 82, 123, 0.32) inset;
}
.output-ops-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.output-ops-title {
  font-weight: 700;
  font-size: 14px;
}
.output-ops-sub {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}
.output-ops-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}


.thumb-overlay-badge {
  position: absolute;
  left: 8px;
  top: 8px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 17, 27, 0.78);
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 4px 12px rgba(0,0,0,0.24);
  font-size: 12px;
}
.thumb-overlay-badge.image {
  font-size: 11px;
}
.layer-playlist-strip {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.playlist-entry {
  position: relative;
  width: 64px;
  height: 48px;
  border-radius: 10px;
  border: 1px solid #294765;
  background: #08131e;
  overflow: hidden;
  cursor: grab;
}
.playlist-entry.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(46,143,255,0.35) inset;
}
.playlist-entry.drag-over {
  border-color: #7dd3fc;
  box-shadow: 0 0 0 1px rgba(125,211,252,0.4) inset;
}
.playlist-entry.dragging {
  opacity: 0.55;
}
.playlist-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border-radius: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.playlist-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.playlist-thumb-placeholder,
.playlist-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
}
.playlist-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #122131, #0a1520);
}
.playlist-empty {
  min-height: 36px;
  padding: 0 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(8,19,30,0.35);
}
.playlist-index {
  position: absolute;
  left: 4px;
  bottom: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(7, 17, 27, 0.86);
  border: 1px solid rgba(46, 143, 255, 0.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 10px;
}
.playlist-delete {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(52, 21, 21, 0.86);
  color: #fff;
  font-size: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.playlist-delete:hover {
  background: rgba(127, 29, 29, 0.96);
}
.playlist-rows {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.playlist-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(8,19,30,0.42);
}
.playlist-row.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(46,143,255,0.28) inset;
}
.playlist-row-main {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.playlist-row-index {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(46, 143, 255, 0.38);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  background: rgba(7, 17, 27, 0.86);
}
.playlist-row-name {
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.playlist-row-meta {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.playlist-row.active .playlist-row-meta {
  color: #dbeafe;
}
.playlist-row-actions {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.layer-service-summary {
  margin-bottom: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: #dbeafe;
  font-size: 12px;
}

.output-blend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
  margin-top: 10px;
}
.output-blend-grid label {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}
.output-blend-grid input[type=range] {
  width: 100%;
}
.output-blend-value {
  min-width: 36px;
  text-align: right;
  color: #d9e8f7;
  font-weight: 600;
}

.icon-btn.wide { min-width: 54px; padding: 0 8px; font-size: 13px; }

.playlist-shift {
  position: absolute;
  top: 4px;
  width: 16px;
  height: 16px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(7, 17, 27, 0.82);
  color: #fff;
  font-size: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.playlist-shift.left { left: 4px; }
.playlist-shift.right { left: 24px; }
.playlist-shift:hover { background: rgba(46, 143, 255, 0.85); }
.playlist-delete { z-index: 2; }
.playlist-thumb, .playlist-delete, .playlist-shift { z-index: 2; }


.clipfx-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
}
.clipfx-label, .clipfx-value {
  font-size: 12px;
  color: #dbeafe;
  white-space: nowrap;
}
.clipfx-range {
  width: 100%;
}
.clipfx-range:hover { cursor: pointer; }


.stage-inline-tools { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.stage-inline-tools .btn { min-width: 96px; }


.mini-transform-panel {
  margin: 10px 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(19, 33, 49, 0.72);
}
.mini-transform-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.mini-step-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.mini-step-btn {
  min-height: 38px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #102131;
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}
.mini-step-btn:hover { background: #18334b; }

.stepper-btn.holding,
.mini-step-btn.holding {
  background: #24517a;
  border-color: #58a6ff;
  box-shadow: 0 0 0 2px rgba(88,166,255,0.15) inset;
}
.mini-step-btn {
  font-size: 19px;
  min-height: 44px;
}


.top-actions .btn.is-disabled,
.top-actions .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.2);
}

.camera-fx-actions { margin-top: 12px; }
.camera-fx-actions .btn { min-width: 110px; }


.text-editor-area{min-height:108px;resize:vertical;background:#0d2035;color:#f3f7ff;border:1px solid rgba(120,170,255,.22);border-radius:14px;padding:12px 14px;font:600 16px/1.4 Inter,system-ui,sans-serif}.text-editor-area:focus{outline:none;border-color:rgba(89,163,255,.58);box-shadow:0 0 0 2px rgba(89,163,255,.16)}

@media (max-width: 1480px) {
  .quick-output-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .brand img { width: 54px; height: 54px; }
  .brand h1 { font-size: 14px; }
  .brand p { font-size: 9px; }
  .project-bank-top-actions .btn { flex: 1 1 160px; }
}
