.editing-rp-image .forum-workspace { display: block; }
.editing-rp-image .chatbox-column, .editing-rp-image .quick-actions, .editing-rp-image #page-status { display: none; }
.rp-editor { min-width: 0; }
.rp-editor-intro { margin: 8px 0 24px; }
.rp-editor-intro > a { color: var(--forum-accent); font-size: 13px; }
.rp-editor-intro p { font-size: 15px; line-height: 1.8; color: var(--muted); margin: 18px 0 0; }
.rp-editor-layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 24px; align-items: start; }
.rp-editor-controls { display: grid; gap: 16px; min-width: 0; }
.rp-editor-panel, .rp-editor-workspace, .rp-editor-guide { min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.rp-editor-panel { padding: 20px; }
.rp-editor-panel h3 { font-size: 16px; line-height: 1.5; margin: 0 0 18px; }
.rp-editor-panel h3 > span { color: var(--forum-accent); font-size: 11px; margin-right: 8px; font-weight: 400; }
.rp-editor-panel label:not(.rp-editor-check) { display: grid; gap: 7px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.rp-editor-panel input[type="text"], .rp-editor-panel select, .rp-editor-panel textarea { width: 100%; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 5px; background: var(--bg); color: var(--text); font: inherit; font-size: 14px; }
.rp-editor-panel textarea { display: block; line-height: 1.7; resize: vertical; min-height: 180px; margin-top: 12px; }
.rp-editor-panel input:focus-visible, .rp-editor-panel select:focus-visible, .rp-editor-panel textarea:focus-visible { outline: 2px solid var(--forum-accent); outline-offset: 2px; }
.rp-image-upload { display: grid; padding: 16px; border: 1px dashed #80644c; border-radius: 6px; text-align: center; color: var(--forum-accent) !important; cursor: pointer; background: #e6a46a06; }
.rp-image-upload:focus-within, .rp-image-upload:hover { border-color: var(--forum-accent); }
.rp-image-upload small { color: var(--muted); font-size: 11px; }
.rp-image-upload input, .rp-log-import input { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
.rp-editor-hint, .rp-editor-session-note { color: var(--muted); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; margin: 12px 0; }
.rp-editor code { font-size: .94em; color: #e9b88f; background: #e6a46a0a; padding: 1px 3px; border-radius: 3px; }
.rp-editor-panel details { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.rp-editor-panel summary { color: var(--text); font-size: 13px; cursor: pointer; line-height: 1.7; }
.rp-editor-panel details[open] > summary { margin-bottom: 16px; }
.rp-editor-panel .rp-range { margin: 14px 0; }
.rp-image-filters { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.rp-image-filters .rp-editor-hint { margin-bottom: 0; }
.rp-image-filters input:disabled { opacity: .4; cursor: default; }
.rp-range > span { display: flex; align-items: baseline; gap: 4px; }
.rp-range output { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--forum-accent); }
.rp-range input[type="range"] { width: 100%; accent-color: var(--forum-accent); padding: 0; height: 24px; cursor: pointer; }
.rp-editor-check { display: flex; align-items: center; gap: 9px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.rp-editor-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--forum-accent); }
.rp-command-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.rp-speaker-controls { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.rp-speaker-controls > button { margin-top: 10px; max-width: 100%; font-size: 12px; white-space: normal; }
.rp-speaker-controls .rp-editor-hint { margin-bottom: 0; }
.rp-character-title { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.rp-character-picker { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-bottom: 14px; }
.rp-character-picker button { min-height: 38px; border: 1px solid var(--line); border-radius: 5px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.rp-character-picker button:hover, .rp-character-picker button[aria-pressed="true"] { border-color: var(--forum-accent); color: var(--forum-accent); background: #e6a46a0a; }
.rp-character-picker button:focus-visible { outline: 2px solid var(--forum-accent); outline-offset: 2px; }
.rp-command-buttons button { padding: 6px 9px; border: 1px solid var(--line); border-radius: 4px; background: transparent; color: var(--forum-accent); font-size: 12px; cursor: pointer; }
.rp-command-buttons button:hover { border-color: var(--forum-accent); background: #e6a46a0a; }
.rp-editor-small-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 14px 0; }
.rp-editor-small-actions button, .rp-editor-small-actions .rp-log-import { border: 0; padding: 0; background: none; color: var(--forum-accent); cursor: pointer; font-size: 12px; line-height: 1.7; }
.rp-palette { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 8px; }
.rp-editor-panel .rp-palette label { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.rp-palette input { flex: 0 0 30px; width: 30px; height: 28px; border: 1px solid var(--line); padding: 2px; background: var(--bg); cursor: pointer; }
.rp-editor-workspace { position: sticky; top: calc(var(--nav-overlay-height, 72px) + 18px); overflow: hidden; }
.rp-editor-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; }
.rp-editor-preview-head > div:first-child { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; }
.rp-editor-preview-head strong { font-size: 14px; }
#rp-editor-dimensions { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.rp-editor-history { display: flex; gap: 6px; }
.rp-editor-history button { font-size: 19px; line-height: 1; padding: 7px 12px; }
.rp-editor button:disabled { cursor: default; opacity: .4; }
.rp-editor-modes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 18px 14px; }
.rp-editor-modes button { padding: 7px 10px; font-size: 12px; background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; cursor: pointer; }
.rp-editor-modes button[aria-pressed="true"] { border-color: var(--forum-accent); color: var(--forum-accent); background: #e6a46a08; }
.rp-editor-modes > span { margin-left: auto; font-size: 11px; color: var(--muted); }
.rp-editor-canvas-wrap { display: flex; position: relative; justify-content: center; align-items: center; overflow: hidden; min-height: 180px; border-block: 1px solid var(--line); background: #0f131a; }
.rp-editor-canvas-wrap.is-dragging { outline: 2px solid var(--forum-accent); outline-offset: -3px; }
#rp-editor-canvas { display: block; width: auto; height: auto; max-width: 100%; max-height: 60dvh; margin: auto; touch-action: none; cursor: move; }
#rp-editor-canvas:focus-visible { outline: 2px solid var(--forum-accent); outline-offset: -3px; }
.rp-editor-canvas-wrap.is-zoomed { display: block; max-height: 60dvh; overflow: auto; }
.rp-editor-canvas-wrap.is-zoomed #rp-editor-canvas { width: 200%; max-width: none; max-height: none; }
#rp-editor-empty { display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center; position: absolute; inset: 0; background: #11161ef0; padding: 20px; text-align: center; }
#rp-editor-empty[hidden] { display: none; }
#rp-editor-empty > span { color: var(--text); font-size: 20px; font-weight: 700; }
#rp-editor-empty small { color: var(--muted); font-size: 13px; line-height: 1.7; }
#rp-editor-empty button { margin-top: 10px; font-size: 14px; }
.rp-editor-warning { padding: 14px 18px; margin: 0; color: #f2c096; font-size: 13px; line-height: 1.7; background: #e6a46a0a; }
.rp-editor-export { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 16px 18px 0; }
.rp-editor-export > p { flex: 1 0 100%; color: var(--muted); font-size: 12px; line-height: 1.7; margin: 0 0 4px; overflow-wrap: anywhere; }
.rp-editor-export > p.is-error { color: #efa8a8; }
.rp-editor-export button { font-size: 13px; padding: 10px 14px; }
.rp-editor-session-note { margin: 14px 18px 18px; font-size: 11px; }
.rp-editor-guide { margin-top: 24px; }
.rp-editor-guide > summary { padding: 20px; color: var(--forum-accent); font-size: 15px; cursor: pointer; }
.rp-editor-guide-body { border-top: 1px solid var(--line); padding: 8px 22px 20px; }
.rp-editor-guide-body p { font-size: 14px; line-height: 1.85; color: var(--muted); }
.rp-editor-guide-body a { color: var(--forum-accent); text-decoration: underline; text-underline-offset: 3px; }
.rp-editor-table-wrap { overflow-x: auto; margin: 20px 0; }
.rp-editor-guide table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.7; color: var(--muted); }
.rp-editor-guide caption { color: var(--text); font-weight: 700; padding: 0 0 14px; text-align: left; }
.rp-editor-guide th, .rp-editor-guide td { padding: 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.rp-editor-guide th { color: var(--text); }
@media (max-width: 1100px) {
  .rp-editor-layout { grid-template-columns: 300px minmax(0, 1fr); gap: 16px; }
  .rp-editor-panel { padding: 16px; }
  .rp-editor-modes > span { flex: 1 0 100%; }
}
@media (max-width: 800px) {
  .rp-editor-layout { display: flex; flex-direction: column; }
  .rp-editor-controls, .rp-editor-workspace { width: 100%; }
  .rp-editor-workspace { position: static; order: -1; }
  .rp-editor-controls { grid-template-columns: minmax(0, 1fr); }
  #rp-editor-canvas { max-height: 55dvh; }
  .rp-editor-panel input[type="text"], .rp-editor-panel select, .rp-editor-panel textarea { font-size: 16px; }
  .rp-command-buttons button { min-height: 38px; min-width: 38px; }
  .rp-editor-guide-body { padding: 8px 14px 16px; }
  .rp-editor-guide th, .rp-editor-guide td { padding: 9px; }
}
