.language-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:6px 10px;border-bottom:1px solid var(--line,#263746);font-size:12px}
.language-toolbar select{max-width:125px}.language-toolbar button{font-size:11px;padding:4px 7px}
#language-status{font-size:11px;padding:4px 10px;margin:0;color:var(--muted,#a5b7c8)}
#studio-wording-diagnostics{padding:4px 10px;font-size:12px;color:var(--muted,#a5b7c8)}
#studio-wording-diagnostics summary{cursor:pointer}
#studio-wording-diagnostics pre{margin:4px 0;max-height:min(11rem,30vh);overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere}
#language-reader{position:absolute;inset:0;margin:0;padding:10px 18px 80px 7px;overflow:auto;white-space:pre;tab-size:4;font:13px/22px 'Cascadia Code',Consolas,monospace;color:#dbe8f5;background:var(--editor-bg,#0b1310)}
#language-reader[hidden],#editor[hidden],#source-colours[hidden]{display:none!important}
.language-command{color:var(--keyword,#65dbe9)}.author-comment{color:var(--comment,#8c8c8c)}.author-name:hover,.author-comment:hover,.author-name:focus,.author-comment:focus{background:#29445b;outline:none}
#language-tooltip{pointer-events:none;position:fixed;z-index:10000;max-width:350px;max-height:170px;overflow:auto;padding:10px 12px;border:1px solid #54718b;border-radius:6px;background:#142535;color:#edf5ff;box-shadow:0 5px 20px #0008;white-space:pre-wrap;font:12px/1.5 system-ui}
.translated-hover{margin-top:6px;color:#9de2bf;border-top:1px solid #3a5265;padding-top:6px}

.learning-source-toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:6px 10px;border-bottom:1px solid var(--border,#324345)}
.learning-source-toolbar:not(:has(>button:not([hidden]))){display:none}
.editor-panel .panel-heading{flex-wrap:nowrap}
.editor-panel .panel-heading .source-help-link{margin-inline-start:auto;white-space:nowrap}
.editor-panel .panel-heading .source-help-link+[data-context-trigger]{margin-inline-start:0}
.editor-wrap[data-language-reading=true] #gutter,.editor-wrap[data-language-reading=true] #execution-line{display:none!important}
.editor-wrap[data-language-reading=true] #language-reader{padding:18px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7}
.syntax-directive{color:var(--directive,#c9a7ef)}

#source-direction-warning{color:var(--accent)}
#source-direction-warning[hidden]{display:none}
.editor-wrap{direction:ltr}
.source-layer :is(#editor,#source-colours,#language-reader){direction:ltr;text-align:left;unicode-bidi:embed}
html[data-colour-mode] .source-layer[data-composing] #editor{color:var(--syntax-text,var(--text));-webkit-text-fill-color:currentColor}
.source-layer[data-composing] #source-colours{visibility:hidden}

#studio-language-badge > svg {display:block;flex:none}
.source-layer :is(#editor,#source-colours,#language-reader)[data-script="Jpan"] {font-family:"Cascadia Code","Noto Sans Mono CJK JP","Yu Gothic UI",Consolas,monospace}
.source-layer :is(#editor,#source-colours,#language-reader)[data-script="Hans"] {font-family:"Cascadia Code","Noto Sans Mono CJK SC","Microsoft YaHei UI",Consolas,monospace}
.source-layer :is(#editor,#source-colours,#language-reader)[data-script="Hant"] {font-family:"Cascadia Code","Noto Sans Mono CJK TC","Microsoft JhengHei UI",Consolas,monospace}
.source-layer :is(#editor,#source-colours,#language-reader):lang(yue) {font-family:"Cascadia Code","Noto Sans Mono CJK HK","Microsoft JhengHei UI",Consolas,monospace}
.source-layer :is(#editor,#source-colours,#language-reader)[data-script="Kore"] {font-family:"Cascadia Code","Noto Sans Mono CJK KR","Malgun Gothic",Consolas,monospace}
.source-layer :is(#editor,#source-colours,#language-reader)[data-script="Arab"] {font-family:"Cascadia Code","Noto Sans Arabic","Segoe UI",Consolas,monospace}


#project-wording :is(select, textarea) { max-inline-size: 100%; }
#project-wording textarea { inline-size: 100%; min-block-size: 4rem; }
#project-wording table { inline-size: 100%; text-align: start; }
#project-wording td { overflow-wrap: anywhere; }

#project-code-edition {
  position:absolute;inset:0;z-index:2;display:flex;flex-direction:column;
  background:var(--syntax-background,var(--editor-bg));
}
#project-code-edition[hidden]{display:none}
.editor-wrap[data-wording-preview] #project-code-edition{visibility:hidden}
[data-wording-flash]{animation:wording-highlight .2s ease-in-out}
@keyframes wording-highlight{0%,100%{background-color:transparent}30%{background-color:color-mix(in srgb,var(--accent) 28%,transparent)}}
@media(prefers-reduced-motion:reduce){[data-wording-flash]{animation:none;background-color:color-mix(in srgb,var(--accent) 24%,transparent)}}
.project-edition-source{flex:1;min-height:0;position:relative}
.project-edition-source :is(pre,textarea){
  position:absolute;inset:0;width:100%;height:100%;box-sizing:border-box;
  margin:0;border:0;padding:17px 18px 80px 8px;resize:none;white-space:pre;overflow:auto;
  font:13px/22px 'Cascadia Code',Consolas,monospace;tab-size:4;direction:ltr;text-align:left;
}
.project-edition-source pre{pointer-events:none;scrollbar-width:none}
.project-edition-source textarea{background:transparent;color:transparent;caret-color:var(--syntax-text,var(--text))}
.project-edition-source textarea::selection{background:var(--syntax-selection-background);color:var(--syntax-selection-text)}
#project-code-edition[data-composing] textarea{color:var(--syntax-text,var(--text))}
#project-code-edition[data-composing] pre{visibility:hidden}
