/* Event アクションの実画面プレビュー(event-stage-preview.js)。規約: 1px の線・角丸なし・影なし */
#ev-stage-preview {
  position: fixed;
  inset: 0;
  z-index: 150000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  font: 13px/1.4 var(--font-ui, system-ui, sans-serif);
  color: var(--text, #e0e0e0);
}
#ev-stage-preview .esp-box {
  display: flex;
  flex-direction: column;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  background: var(--surface, #353535);
  border: 1px solid var(--border, #4a4a4a);
}
#ev-stage-preview .esp-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  background: var(--bg, #2d2d2d);
  border-bottom: 1px solid var(--border, #4a4a4a);
}
#ev-stage-preview .esp-sub { color: var(--text-muted, #a8a8a8); font-size: 12px; }
#ev-stage-preview .esp-gap { flex: 1 1 auto; }
#ev-stage-preview .esp-body { display: flex; min-height: 0; }
#ev-stage-preview .esp-stage-wrap { padding: 10px; overflow: auto; }
#ev-stage-preview .esp-frame {
  position: relative;
  overflow: hidden;
  background: #09091a;
  border: 1px solid var(--border, #4a4a4a);
}
#ev-stage-preview .esp-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
#ev-stage-preview .esp-bg::after { content: ''; position: absolute; inset: 0; background: rgba(5, 5, 14, 0.42); }
#ev-stage-preview .esp-scene { position: absolute; left: 0; right: 0; top: 0; bottom: 25%; overflow: hidden; }
#ev-stage-preview .esp-band {
  position: absolute; left: 0; right: 0; bottom: 0; height: 25%;
  background: rgba(7, 7, 20, 0.78);
  border-top: 1px solid rgba(74, 158, 255, 0.45);
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
  padding: 6px 10px;
  pointer-events: none;
}
#ev-stage-preview .esp-layer { position: absolute; cursor: grab; user-select: none; touch-action: none; }
#ev-stage-preview .esp-layer:active { cursor: grabbing; }
#ev-stage-preview .esp-image { left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; }
#ev-stage-preview .esp-cast { bottom: 0; transform: translateX(-50%); }
#ev-stage-preview .esp-cast img { display: block; }
#ev-stage-preview .esp-cast-missing {
  display: flex; align-items: flex-end; justify-content: center;
  width: 90px; border: 1px dashed rgba(255, 255, 255, 0.5); color: rgba(255, 255, 255, 0.7);
  font-size: 11px; padding: 4px; text-align: center;
}
#ev-stage-preview .esp-selected { outline: 1px solid var(--accent, #7ee8a2); outline-offset: -1px; }
#ev-stage-preview .esp-hint { margin-top: 6px; color: var(--text-muted, #a8a8a8); font-size: 12px; max-width: 960px; }
#ev-stage-preview .esp-side {
  width: 280px;
  flex: 0 0 280px;
  border-left: 1px solid var(--border, #4a4a4a);
  padding: 8px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#ev-stage-preview .esp-list { display: flex; flex-direction: column; border: 1px solid var(--border, #4a4a4a); }
#ev-stage-preview .esp-row {
  text-align: left; padding: 4px 8px; border: 0; border-bottom: 1px solid var(--border, #4a4a4a);
  background: transparent; color: var(--text, #e0e0e0); font: inherit; cursor: pointer;
}
#ev-stage-preview .esp-row:last-child { border-bottom: 0; }
#ev-stage-preview .esp-row.active { background: rgba(126, 232, 162, 0.12); color: var(--accent, #7ee8a2); }
#ev-stage-preview .esp-empty { padding: 6px 8px; color: var(--text-muted, #a8a8a8); font-size: 12px; }
#ev-stage-preview .esp-val-title { font-weight: 600; margin-bottom: 2px; }
#ev-stage-preview .esp-muted { color: var(--text-muted, #a8a8a8); font-size: 12px; margin-bottom: 4px; }
#ev-stage-preview .esp-val { display: flex; align-items: center; gap: 6px; margin: 2px 0; }
#ev-stage-preview .esp-val span { width: 56px; color: var(--text-muted, #a8a8a8); font-size: 12px; }
#ev-stage-preview .esp-val input, #ev-stage-preview .esp-val select { flex: 1; min-width: 0; font-size: 12px; }
#ev-stage-preview .esp-btns, #ev-stage-preview .esp-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
#ev-stage-preview button {
  padding: 3px 8px; border: 1px solid var(--border, #4a4a4a); border-radius: 0;
  background: transparent; color: var(--text, #e0e0e0); font: inherit; cursor: pointer;
}
#ev-stage-preview button:hover { background: rgba(255, 255, 255, 0.08); }
#ev-stage-preview button[disabled] { opacity: 0.5; cursor: default; }
#ev-stage-preview .esp-note { color: var(--text-muted, #a8a8a8); font-size: 12px; }
