/* Cutscene Markdown: the coloured editor box (2026-10-29). The textarea and the coloured copy behind it must share every measurement. */
.md-ed{position:relative;border:1px solid var(--border);border-radius:var(--radius);background:var(--card);margin-bottom:.75rem}
.md-ed:focus-within{border-color:var(--primary);box-shadow:0 0 0 3px var(--primary-tint)}
.md-ed .md-hl,.md-ed textarea.md-ta,.md-ed textarea.md-ta:focus{display:block;width:100%;margin:0;padding:1rem 1.125rem;border:0;font-family:var(--font-mono);font-size:var(--text-ui);line-height:1.65;letter-spacing:0;tab-size:2;white-space:pre-wrap;overflow-wrap:break-word;word-break:normal}
.md-bar{position:relative;display:flex;gap:.25rem;padding:.375rem .5rem;border-bottom:1px solid var(--border);background:var(--background);border-radius:0}
.md-bar-btn{display:inline-flex;align-items:center;gap:.375rem;padding:.25rem .5rem;border:0;border-radius:var(--radius-sm);background:none;font:inherit;font-size:var(--text-small);color:var(--muted-foreground);cursor:pointer}
.md-bar-btn svg{width:16px;height:16px}
.md-bar-btn:hover,.md-bar-btn:focus-visible,.md-bar-btn[aria-expanded="true"]{background:var(--accent);color:var(--foreground);outline:none}
.md-bar-gap{width:1px;margin:.25rem .375rem;background:var(--border)}
.md-bar-btn.md-snip{color:var(--primary)}
.md-body{position:relative}
/* A box with no bar keeps its round top corners; md-big is a heading's box (2026-10-29) */
.md-ed .md-body:first-child textarea.md-ta{border-radius:var(--radius)}
.md-ed.md-big .md-hl,.md-ed.md-big textarea.md-ta,.md-ed.md-big textarea.md-ta:focus{font-family:var(--font-sans);font-size:var(--text-lead);font-weight:600}
.md-ed .md-icon{color:var(--lane-2);background:#f8f0fc;border-radius:var(--radius-xs);font-weight:600}
.md-ed .md-icon .md-mark{color:inherit;opacity:.45}
.md-ed .md-icon-pic{color:transparent;background:var(--lane-2);-webkit-mask:var(--ic) center/1.2em no-repeat;mask:var(--ic) center/1.2em no-repeat}
.md-ed .md-hl{position:absolute;inset:0;overflow:hidden;pointer-events:none;color:var(--foreground)}
.md-ed textarea.md-ta,.md-ed textarea.md-ta:focus{position:relative;min-height:12rem;resize:none;overflow:hidden;background:transparent;color:transparent;caret-color:var(--foreground);outline:none;box-shadow:none;border-radius:var(--radius)}
.md-ed textarea.md-ta::selection{background:var(--primary-tint-strong);color:transparent}
.md-ed .md-mark{color:var(--subtle)}
.md-ed .md-h{color:var(--primary);font-weight:600}
.md-ed .md-h .md-mark{color:var(--primary);opacity:.55}
.md-ed .md-h1{background:var(--primary-soft)}
.md-ed .md-bold{font-weight:600}
.md-ed .md-ital{font-style:italic;color:#3d4450}
.md-ed .md-link{color:var(--primary);text-decoration:underline;text-decoration-color:rgba(59,111,224,.35)}
.md-ed .md-url{color:var(--lane-3)}
.md-ed .md-code{color:var(--danger);background:var(--danger-bg);border-radius:var(--radius-xs)}
.md-ed .md-code.md-live{color:var(--lane-1);background:var(--success-bg)}
.md-ed .md-code.md-soon{color:var(--lane-5);background:var(--warning-bg)}
.md-ed .md-code .md-mark{color:inherit;opacity:.45}
.md-ed .md-bullet{color:var(--lane-0);font-weight:600}
.md-ed .md-quote{color:var(--lane-1);font-style:italic}
.md-ed .md-quote .md-mark{color:var(--lane-1);font-style:normal}
.md-ed .md-hr{color:var(--subtle)}
.md-ed .md-tag{color:var(--lane-2)}
.md-ed .md-label{color:var(--lane-3);font-weight:600}
.md-ed .md-fence{color:var(--subtle)}
.md-ed .md-codeblock{color:var(--danger)}
