/* Shared authoring surfaces. Reader Markdown and code submission are untouched. */
html.hydro-refined{--md-panel:var(--editor-panel,var(--ref-panel,#fff));--md-wash:var(--editor-wash,#f5f7fa);--md-line:var(--editor-line,#d7dfeb);--md-text:var(--editor-ink,#273b53);--md-muted:var(--editor-muted,#61758b);--md-blue:#355fc3;--md-soft:#e9efff}
html.hydro-refined.theme--dark{--md-panel:#1e2b3c;--md-wash:#253449;--md-line:#3b4e65;--md-text:#e7edf5;--md-muted:#b5c3d6;--md-blue:#a8c3ff;--md-soft:#2b4064}
html.hydro-refined .dyoj-md{border:1px solid var(--md-line);border-radius:8px;background:var(--md-panel);color:var(--md-text);margin:10px 0 0;overflow:hidden;box-shadow:0 1px 2px #14294306;font:13px/1.6 "Segoe UI","Microsoft YaHei",sans-serif}
.dyoj-md [hidden]{display:none!important}
.dm-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:4px;padding:8px 10px;background:var(--md-wash);border-bottom:1px solid var(--md-line)}
.dm-formats{display:flex;align-items:center;gap:2px;flex-wrap:wrap;min-width:0;flex:1}
.dm-views{display:flex;align-items:center;gap:2px;padding:2px;border:1px solid var(--md-line);border-radius:6px;background:var(--md-panel);margin-left:auto}
html.hydro-refined .dyoj-md .dm-tool{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-width:30px;height:30px;padding:4px 7px;border:1px solid transparent;border-radius:5px;background:transparent;color:var(--md-text);font:500 12px/20px "Segoe UI","Microsoft YaHei",sans-serif;cursor:pointer;box-shadow:none;white-space:nowrap;user-select:none}
html.hydro-refined .dyoj-md .dm-tool:hover{background:var(--md-soft);color:var(--md-blue);border-color:var(--md-line)}
html.hydro-refined .dyoj-md .dm-tool[aria-pressed=true]{background:var(--md-soft);color:var(--md-blue);font-weight:650}
html.hydro-refined .dyoj-md :is(.dm-tool,.dm-heading):focus-visible{outline:2px solid var(--md-blue);outline-offset:1px}
.dm-tool svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:none}
.dm-divider{height:18px;width:1px;background:var(--md-line);margin:0 5px}
html.hydro-refined.dyoj-workspace .main .dm-heading{width:80px;min-height:30px;height:30px;margin:0 5px 0 0;padding:3px 24px 3px 7px;font:12px/20px "Segoe UI","Microsoft YaHei",sans-serif;border:1px solid var(--md-line);border-radius:5px;background-color:var(--md-panel);background-position:right 5px center;background-size:14px;color:var(--md-text)}
.dm-body{display:grid;grid-template-columns:1fr 1fr;min-height:0}
.dyoj-md[data-mode=edit] .dm-body,.dyoj-md[data-mode=preview] .dm-body{grid-template-columns:minmax(0,1fr)}
.dm-source-pane,.dm-preview-pane{min-width:0;display:flex;flex-direction:column;background:var(--md-panel)}
.dyoj-md[data-mode=split] .dm-preview-pane{border-left:1px solid var(--md-line)}
.dm-pane-label{padding:7px 16px;font-size:11px;color:var(--md-muted);background:var(--md-panel);border-bottom:1px solid var(--md-line);flex:none}
html.hydro-refined.dyoj-workspace .dyoj-md textarea.md-source{display:block;box-sizing:border-box;width:100%;min-width:0;min-height:270px;height:270px;max-height:640px;padding:14px 16px;margin:0;border:0!important;border-radius:0;background:var(--md-panel);color:var(--md-text);box-shadow:none!important;outline:none!important;resize:vertical;font:13px/1.8 Consolas,"Microsoft YaHei",monospace;flex:1}
.dm-source-pane:focus-within>.dm-pane-label{color:var(--md-blue);box-shadow:inset 3px 0 var(--md-blue)}
.dm-preview{padding:14px 18px;min-height:270px;max-height:640px;overflow:auto;overflow-wrap:anywhere;flex:1;font-size:13px;line-height:1.8}
.dm-preview> :first-child{margin-top:0}.dm-preview pre{overflow:auto}.dm-preview .dm-preview-empty{color:var(--md-muted);font-size:13px;margin:0}.dm-preview img{max-width:100%}
.dm-footer{display:flex;justify-content:space-between;gap:12px;padding:6px 12px;background:var(--md-wash);border-top:1px solid var(--md-line);color:var(--md-muted);font-size:11px}
.dm-status.is-error{color:#aa462b}.dm-count{margin-left:auto;white-space:nowrap;font-variant-numeric:tabular-nums}
.dm-dialog,.dm-expanded{position:fixed;inset:0;box-sizing:border-box;margin:auto;padding:0;border:1px solid var(--md-line);border-radius:12px;max-width:calc(100vw - 32px);background:var(--md-panel);color:var(--md-text);box-shadow:0 20px 80px #172a4a40;font:13px/1.6 "Segoe UI","Microsoft YaHei",sans-serif}
.dm-dialog{width:450px;max-height:calc(100dvh - 40px)}
.dm-dialog::backdrop,.dm-expanded::backdrop{background:#17263c66}
.dm-dialog-head{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;border-bottom:1px solid var(--md-line)}
.dm-dialog-head strong{font-size:16px}.dm-dialog-fields{padding:16px 18px 0}.dm-dialog-fields label{display:block;margin-bottom:12px;font-size:13px}
html.hydro-refined .dyoj-md .dm-dialog-fields input{box-sizing:border-box;display:block;width:100%;height:38px;padding:8px 10px;margin:5px 0 0;border:1px solid var(--md-line);border-radius:5px;background:var(--md-panel);color:var(--md-text);font:13px/20px inherit;outline-offset:2px}
.dm-dialog-error{color:#b34646;min-height:20px;margin:0}.dm-dialog-actions{display:flex;justify-content:flex-end;gap:8px;padding:14px 18px}
html.hydro-refined .dyoj-md .dm-dialog-actions .dm-tool{height:36px;padding:6px 14px;border-color:var(--md-line)}
html.hydro-refined .dyoj-md .dm-dialog-actions .dm-primary{background:#355fc3;border-color:#355fc3;color:#fff}
.dm-help{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:18px}.dm-help dt{font:12px/1.6 Consolas,monospace;white-space:pre-wrap}.dm-help dd{margin:0;color:var(--md-muted)}.dm-help-note{margin:18px;font-size:12px;color:var(--md-muted)}
.dm-expanded{width:min(1280px,calc(100vw - 64px));height:calc(100dvh - 64px);max-height:none;overflow:hidden}
.dm-expanded[open]{display:flex}.dm-expanded .dyoj-md{display:flex;flex-direction:column;flex:1;width:100%;border:0!important;margin:0!important}.dm-expanded .dm-body{flex:1;min-height:0}.dm-expanded :is(.dm-source-pane,.dm-preview-pane){min-height:0}.dm-expanded .dm-preview{max-height:none;min-height:0}.dm-expanded .dm-toolbar,.dm-expanded .dm-footer{flex:none}
html.hydro-refined.dyoj-workspace .dm-expanded .dyoj-md textarea.md-source{height:100%;max-height:none;min-height:0;resize:none}
/* Preserve the native editor's renderer, uploads and shortcuts; clarify its controls. */
html.hydro-refined .md-editor.textbox{--md-color:var(--md-text);--md-bk-color:var(--md-panel);--md-border-color:var(--md-line);border:1px solid var(--md-line);border-radius:8px;box-shadow:0 1px 2px #14294308;overflow:hidden}
html.hydro-refined .md-editor .md-editor-toolbar-wrapper{padding:7px 10px;background:var(--md-wash);border-bottom:1px solid var(--md-line)}
html.hydro-refined .md-editor .md-editor-toolbar{display:flex;flex-wrap:wrap;gap:4px;align-items:center}
html.hydro-refined .md-editor .md-editor-toolbar-left{display:flex;flex:1;flex-wrap:wrap;min-width:0;width:auto;gap:2px}
html.hydro-refined .md-editor .md-editor-toolbar-right{display:flex;flex:none;width:auto;gap:2px;margin-left:auto}
html.hydro-refined .md-editor .md-editor-toolbar-item{display:inline-flex;flex-direction:row;flex:none;align-items:center;justify-content:center;gap:5px;padding:5px 6px;margin:0;border:1px solid transparent;border-radius:5px;min-width:29px;min-height:29px;box-sizing:border-box;color:var(--md-text)}
html.hydro-refined .md-editor .md-editor-divider{margin:0 4px}
html.hydro-refined .md-editor .md-editor-toolbar-item:hover,html.hydro-refined .md-editor .md-editor-toolbar-active{background:var(--md-soft);color:var(--md-blue)}
html.hydro-refined .md-editor .md-editor-toolbar-item:focus-visible{outline:2px solid var(--md-blue);outline-offset:1px}
html.hydro-refined .md-editor .md-editor-toolbar-item[data-editor-caption]::after{content:attr(data-editor-caption);font:12px/18px "Segoe UI","Microsoft YaHei",sans-serif;white-space:nowrap}
html.hydro-refined .md-editor .md-editor-icon{width:17px!important;height:17px!important;flex:none;margin:0;padding:0}
html.hydro-refined .md-editor .md-editor-preview-wrapper{background:var(--md-panel)}
html.hydro-refined .md-editor .md-editor-footer{background:var(--md-wash);border-top:1px solid var(--md-line);color:var(--md-muted);font-size:11px}
@media(max-width:650px){.dm-toolbar{gap:5px;padding:7px}.dm-formats{flex-basis:100%;padding-bottom:5px}.dm-views{margin-left:0;margin-right:auto}.dm-body{grid-template-columns:1fr}.dyoj-md[data-mode=split] .dm-preview-pane{border-left:0;border-top:1px solid var(--md-line)}.dm-expanded{width:calc(100vw - 16px);height:calc(100dvh - 24px)}.dm-footer{flex-wrap:wrap}.dm-expanded .dm-body{overflow:auto}.dm-expanded .dm-source-pane,.dm-expanded .dm-preview-pane{min-height:250px}.dm-help{grid-template-columns:1fr}.md-editor .md-editor-toolbar-item[data-editor-caption]::after{display:none}}
