@import url('https://fonts.googleapis.com/css2?family=Assistant:wght@400;500;700;800&family=Frank+Ruhl+Libre:wght@400;500;700;900&family=Heebo:wght@400;500;700;800;900&family=Karantina:wght@400;700&family=Rubik:wght@400;500;700;800;900&family=Secular+One&family=Suez+One&display=swap');

:root {
  --bg-panel: rgba(17, 21, 28, 0.88);
  --bg-panel-solid: #131820;
  --bg-card: rgba(30, 36, 48, 0.78);
  --bg-card-hover: rgba(44, 53, 70, 0.92);
  --border-subtle: rgba(255, 255, 255, 0.11);
  --border-gold: rgba(214, 170, 62, 0.55);
  --accent-gold: #d6aa3e;
  --accent-orange: #ea6815;
  --accent-red: #d92b33;
  --accent-silver: #cfd5df;
  --text-main: #f4f6f9;
  --text-muted: #9ba5b7;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 7px;
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Heebo', 'Rubik', 'Segoe UI', Arial, sans-serif;
  background: #11151c;
  color: var(--text-main);
  direction: rtl;
}

#viewport-stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 45%, #232b3a 0%, #10141b 75%, #0a0d12 100%);
  transition: background 0.35s ease;
}

#viewport-stage.bg-light {
  background: radial-gradient(circle at 50% 45%, #ffffff 0%, #e7ecf3 75%, #d6dde8 100%);
}

#viewport-stage.bg-c8c8c8 {
  background: #C8C8C8;
}

#viewport-stage.bg-slate {
  background: radial-gradient(circle at 50% 45%, #485160 0%, #2d333d 80%, #22272f 100%);
}

#viewport-stage.bg-chroma {
  background: #00b140;
}

#viewport-stage.bg-transparent {
  background-color: #1e2430;
  background-image:
    linear-gradient(45deg, #2a3242 25%, transparent 25%),
    linear-gradient(-45deg, #2a3242 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #2a3242 75%),
    linear-gradient(-45deg, transparent 75%, #2a3242 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
}

#canvas-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#cube-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

#cube-canvas:active {
  cursor: grabbing;
}

#cube-canvas.twist-cursor {
  cursor: crosshair;
}

/* Top Status & Header Bar */
.top-bar {
  position: fixed;
  top: 16px;
  right: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  z-index: 20;
  gap: 12px;
}

.brand-badge {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-panel);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-right: 3px solid var(--accent-gold);
  padding: 9px 16px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.brand-badge img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.brand-titles h1 {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: var(--text-main);
  line-height: 1.2;
}

.brand-titles span {
  font-size: 12px;
  color: var(--accent-gold);
  font-weight: 600;
}

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

.rec-indicator {
  display: none;
  align-items: center;
  gap: 8px;
  background: rgba(185, 25, 35, 0.92);
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 0 20px rgba(220, 38, 38, 0.6);
  animation: pulseRec 1.2s infinite ease-in-out;
}

.rec-indicator.active {
  display: flex;
}

.rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
}

@keyframes pulseRec {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.82; transform: scale(0.98); }
}

/* Side Control Panel */
.control-panel {
  position: fixed;
  top: 82px;
  right: 16px;
  bottom: 84px;
  width: 356px;
  background: var(--bg-panel);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 20;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  gap: 0;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
}

.panel-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  padding: 8px 10px;
  background: rgba(11, 14, 20, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.panel-tab-btn {
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}

.panel-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.09);
}

.panel-tab-btn.active {
  background: rgba(214, 170, 62, 0.16);
  color: var(--accent-gold);
  border-color: rgba(214, 170, 62, 0.48);
  box-shadow: inset 0 -2px 0 var(--accent-gold);
}

.panel-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel-body::-webkit-scrollbar {
  width: 5px;
}
.panel-body::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.18);
  border-radius: 4px;
}

.panel-tab-pane {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.panel-tab-pane.active {
  display: flex;
}

body.clean-ui .control-panel,
body.clean-ui .bottom-dock,
body.clean-ui .brand-badge {
  opacity: 0;
  pointer-events: none;
  transform: translateX(24px);
}

body.clean-ui .bottom-dock {
  transform: translateY(24px);
}

.panel-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--accent-silver);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.section-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Mode Toggle Segmented Control */
.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: rgba(0, 0, 0, 0.32);
  padding: 4px;
  border-radius: var(--radius-sm);
}

.mode-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.mode-btn.active {
  background: var(--accent-gold);
  color: #111318;
  box-shadow: 0 2px 10px rgba(214, 170, 62, 0.35);
}

/* Buttons */
.btn-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.btn-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.btn {
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-main);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.16s ease;
}

.btn:hover:not(:disabled) {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, #e86a17 0%, #c84e09 100%);
  border-color: rgba(255, 160, 90, 0.4);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #f57925 0%, #d85810 100%);
}

.btn-gold {
  background: linear-gradient(135deg, #dfB448 0%, #b88b22 100%);
  border-color: rgba(255, 225, 130, 0.5);
  color: #111318;
}

.btn-gold:hover:not(:disabled) {
  background: linear-gradient(135deg, #ecc259 0%, #c99a2c 100%);
}

.btn-danger {
  background: linear-gradient(135deg, #d62832 0%, #a51921 100%);
  border-color: rgba(255, 120, 120, 0.45);
  color: #fff;
}

.btn-sm {
  font-size: 12px;
  padding: 6px 9px;
}

/* Layer Mini Pad */
.layer-pad {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}

.layer-pad button {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 0;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.15s;
}

.layer-pad button:hover:not(:disabled) {
  background: rgba(214, 170, 62, 0.25);
  border-color: var(--border-gold);
}

/* Speed & Select Controls */
.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.control-row input[type="range"] {
  flex: 1;
  accent-color: var(--accent-gold);
  cursor: pointer;
}

.select-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.38);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 7px 9px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  outline: none;
}

/* Background Swatches */
.bg-swatches {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}

.swatch-btn {
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  height: 32px;
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, border-color 0.15s;
}

.swatch-btn.active {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 2px rgba(214, 170, 62, 0.35);
}

/* Director Preset Cards */
.preset-card {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 8px 9px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.preset-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #fff;
}

.preset-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Bottom Quick-Scan Face Dock */
.bottom-dock {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-panel);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 20;
  box-shadow: var(--shadow-lg);
  max-width: calc(100vw - 32px);
  overflow-x: auto;
}

.face-pill {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease;
}

.face-pill:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--border-gold);
}

.color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.dock-sep {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.14);
  margin: 0 2px;
}

/* Video Preview Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 13, 0.82);
  backdrop-filter: blur(8px);
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-box {
  background: var(--bg-panel-solid);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  width: min(760px, 95vw);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h2 {
  font-size: 17px;
  font-weight: 800;
  color: var(--accent-gold);
}

.modal-video {
  width: 100%;
  max-height: 62vh;
  background: #000;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.status-toast {
  position: fixed;
  bottom: 76px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(17, 21, 28, 0.92);
  border: 1px solid var(--border-gold);
  color: var(--text-main);
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.status-toast.visible {
  opacity: 1;
}

/* Face & Text Layout Studio */
.face-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.face-pick-btn {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.32);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  padding: 6px 5px;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
  transition: all 0.16s ease;
  min-width: 0;
}

.face-pick-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.26);
}

.face-pick-btn.selected {
  border-color: var(--accent-gold);
  background: rgba(214, 170, 62, 0.13);
  box-shadow: 0 0 0 1px rgba(214, 170, 62, 0.35);
}

.face-pick-swatch {
  width: 100%;
  height: 7px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  margin-bottom: 2px;
}

.face-pick-name {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.face-pick-preview {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.preview-and-meta-row {
  display: flex;
  align-items: stretch;
  gap: 9px;
  background: rgba(0, 0, 0, 0.26);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 8px;
}

#face-2d-preview {
  width: 124px;
  height: 124px;
  flex-shrink: 0;
  border-radius: 7px;
  border: 1px solid var(--border-gold);
  background: #10141b;
  cursor: grab;
  touch-action: none;
}

#face-2d-preview:active,
#face-2d-preview.dragging {
  cursor: grabbing;
}

.preview-meta-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 5px;
}

.inspector-face-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-gold);
  line-height: 1.2;
}

.face-text-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 9px;
  resize: vertical;
  min-height: 58px;
  max-height: 120px;
  line-height: 1.35;
  outline: none;
  user-select: text;
}

.face-text-input:focus {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--accent-gold);
}

.grid-3x3-editor {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  direction: ltr;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  padding: 6px;
}

.grid-cell-input {
  width: 100%;
  min-width: 0;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  padding: 7px 4px;
  text-align: center;
  direction: rtl;
  outline: none;
  user-select: text;
}

.grid-cell-input:focus {
  border-color: var(--accent-gold);
  background: rgba(214, 170, 62, 0.12);
}

.field-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.seg-group {
  display: grid;
  gap: 4px;
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  padding: 3px;
}

.seg-group.seg-4 {
  grid-template-columns: repeat(4, 1fr);
}

.seg-group.seg-wrap {
  display: flex;
  flex-wrap: wrap;
}

.seg-group.seg-wrap .seg-btn {
  flex: 1 1 30%;
}

.seg-group.seg-3 {
  grid-template-columns: repeat(3, 1fr);
}

.seg-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 4px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.seg-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.07);
}

.seg-btn.active {
  background: var(--accent-gold);
  color: #111318;
  box-shadow: 0 1px 6px rgba(214, 170, 62, 0.35);
}

.slider-val {
  min-width: 38px;
  text-align: left;
  font-variant-numeric: tabular-nums;
  color: var(--text-main);
  font-weight: 700;
}

.per-line-editor-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.per-line-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 6px;
  padding: 6px 7px;
}

.per-line-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
}

.per-line-badge {
  background: rgba(214, 170, 62, 0.18);
  color: var(--accent-gold);
  border: 1px solid rgba(214, 170, 62, 0.4);
  border-radius: 4px;
  padding: 1px 6px;
  font-weight: 800;
  font-size: 10.5px;
  flex-shrink: 0;
}

.per-line-snippet {
  color: var(--text-main);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.per-line-controls {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
}

.per-line-controls-2 {
  display: flex;
  align-items: center;
  gap: 6px;
}

.per-line-y-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  font-size: 10px;
  color: var(--text-muted);
}

.per-line-y-wrap input[type="range"] {
  width: 100%;
  accent-color: var(--accent-gold);
  cursor: pointer;
}

.per-line-select {
  background: rgba(0, 0, 0, 0.45);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  padding: 3px 4px;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 700;
  outline: none;
  min-width: 0;
}

.per-line-color-input {
  width: 24px;
  height: 22px;
  border: none;
  border-radius: 4px;
  background: transparent;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.per-line-scale-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  font-size: 10px;
  color: var(--text-muted);
}

.per-line-scale-wrap input[type="range"] {
  width: 100%;
  accent-color: var(--accent-gold);
  cursor: pointer;
}

.color-pickers-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.color-Mini-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 6px;
  padding: 4px 5px;
  font-size: 10.5px;
  color: var(--text-muted);
}

.color-Mini-box input[type="color"] {
  width: 100%;
  height: 22px;
  border: none;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

/* Custom Review Video Sequence Builder */
.tour-steps-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 230px;
  overflow-y: auto;
  padding-left: 2px;
}

.tour-steps-list::-webkit-scrollbar {
  width: 4px;
}
.tour-steps-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
}

.tour-step-row {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 4px 5px;
}

.step-num-btn {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid rgba(214, 170, 62, 0.5);
  background: rgba(214, 170, 62, 0.16);
  color: var(--accent-gold);
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.step-num-btn:hover {
  background: var(--accent-gold);
  color: #111;
}

.step-target-select {
  flex: 1;
  min-width: 0;
  background: rgba(0, 0, 0, 0.42);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  padding: 4px 5px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  outline: none;
}

.step-hold-select {
  width: 58px;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.42);
  color: var(--accent-silver);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  padding: 4px 3px;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 600;
  outline: none;
}

.step-icon-btn {
  width: 21px;
  height: 22px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border-radius: 4px;
  font-size: 10.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.step-icon-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.18);
}

.step-icon-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.step-icon-btn.del:hover:not(:disabled) {
  background: rgba(220, 38, 38, 0.45);
  border-color: rgba(248, 113, 113, 0.6);
}

@media (max-width: 1100px) {
  .control-panel {
    width: 300px;
    top: 74px;
    bottom: 82px;
  }
  .panel-body {
    padding: 10px;
    gap: 10px;
  }
  .bottom-dock {
    border-radius: 16px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 5px 8px;
    gap: 4px;
  }
  .face-pill {
    font-size: 11px;
    padding: 4px 9px;
  }
}
