/* Isolated document workspace. The conversion website keeps its own layout. */
body.hk-document-editor { min-width: 0; }
.hk-document-editor .editor-topbar { display:flex; flex-wrap:wrap; align-items:center; gap:12px; padding:14px 24px; border-bottom:1px solid var(--border-color); background:var(--bg-card); }
.editor-topbar .brand { flex:none; text-decoration:none; }
.editor-topbar .brand img { width:36px; height:36px; }
.editor-title { display:flex; flex:1 1 180px; flex-direction:column; min-width:0; gap:3px; }
.editor-title input { width:100%; min-width:0; border:1px solid transparent; border-radius:var(--ui-radius-control); padding:5px 8px; color:var(--text-main); background:transparent; font:inherit; font-weight:650; }
.editor-title input:hover,.editor-title input:focus { border-color:var(--border-color); background:var(--bg-main); }
.editor-status { margin:0; padding-left:8px; font-size:.75rem; color:var(--text-muted); }
.editor-file-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.hk-document-editor .editor-file-actions button { min-height:44px; padding:10px 14px; font-size:.82rem; }
.editor-workspace { width:100%; max-width:none; margin:0; padding:0 0 100px; display:block; }
.editor-toolbar { position:sticky; top:calc(var(--editor-header-height, 80px) + 8px); z-index:12; display:flex; flex-wrap:wrap; align-items:center; gap:5px; padding:10px 18px; margin:16px 24px; border:1px solid var(--border-color); border-radius:var(--ui-radius-card); background:var(--bg-card); }
.editor-toolbar button { min-height:44px; min-width:44px; display:inline-flex; justify-content:center; align-items:center; gap:4px; border:0; border-radius:var(--ui-radius-control); background:transparent; color:var(--text-main); font:inherit; padding:8px; cursor:pointer; }
.editor-toolbar button:hover { background:var(--bg-hover); }
.editor-toolbar button[aria-pressed="true"] { background:var(--bg-hover); box-shadow:inset 0 0 0 1px var(--border-color); }
.editor-toolbar { border-top:3px solid #8d86e5; }
.editor-toolbar button[aria-pressed="true"] { background:#e4ddff; color:#49357a; box-shadow:none; }
.dark-mode .editor-toolbar button[aria-pressed="true"] { background:#4c406d; color:#eee1ff; }
.editor-file-actions #select-file-button { background:var(--accent-soft); border-color:var(--accent-line); color:var(--accent-text); }
.editor-file-actions #editor-save-word { background:var(--ui-action-bg); color:var(--solid-ink); border-color:transparent; }
.editor-toolbar button svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.editor-toolbar select { max-width:150px; min-width:0; min-height:40px; padding:6px 24px 6px 10px; border:1px solid var(--border-color); border-radius:var(--ui-radius-control); color:var(--text-main); background:var(--bg-card); font:inherit; font-size:.82rem; }
.editor-toolbar button:focus-visible,.editor-toolbar select:focus-visible,.editor-title input:focus-visible { outline:3px solid var(--hk-focus); outline-offset:2px; }
.editor-toolbar button:disabled,.editor-file-actions button:disabled { opacity:.45; cursor:wait; }
.editor-toolbar-separator { width:1px; height:24px; background:var(--border-color); margin:0 4px; }
.editor-info { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; margin:0 24px 16px; color:var(--text-muted); font-size:.75rem; }
.editor-local { display:inline-flex; align-items:center; gap:7px; }
.editor-local svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.8; }
.editor-ocr-label { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.editor-ocr-label select { max-width:150px; min-height:36px; padding:4px 8px; border:1px solid var(--border-color); border-radius:var(--ui-radius-control); color:var(--text-main); background:var(--bg-card); font:inherit; }
.editor-scan-hint { flex-basis:100%; margin:0; font-size:.72rem; }
.editor-notice,.editor-error { max-width:794px; margin:12px auto; padding:12px 16px; border:1px solid var(--border-color); border-radius:var(--ui-radius-control); font-size:.82rem; line-height:1.55; }
.editor-notice { background:var(--bg-card); color:var(--text-muted); }
.editor-error { color:var(--danger); background:var(--bg-card); }
.editor-canvas { position:relative; max-width:794px; margin:0 auto; }
.editor-paper { --editor-sheet-height:1123px; display:flex; flex-direction:column; gap:28px; width:100%; margin-inline:auto; padding:0; border:0; outline:none; color:#202124; font:12pt/1.6 Arial,"Noto Sans JP","Yu Gothic",sans-serif; overflow-wrap:anywhere; }
.editor-paper[data-editor-empty="true"] { min-height:64px; }
.editor-projects { margin:0 24px 16px; color:var(--text-main); }
.editor-project-actions,.editor-project-item-actions { display:flex; flex-wrap:wrap; gap:8px; }
.editor-projects button { min-height:44px; padding:9px 14px; border:1px solid var(--border-color); border-radius:var(--ui-radius-control); background:var(--bg-card); color:var(--text-main); font:inherit; font-size:.8rem; cursor:pointer; }
.editor-projects button:focus-visible { outline:3px solid var(--hk-focus); outline-offset:2px; }
.editor-projects button:disabled { opacity:.5; cursor:wait; }
.editor-projects .editor-project-save { background:var(--ui-action-bg); color:var(--solid-ink); font-weight:650; }
.editor-project-status { font-size:.8rem; margin:8px 0 0; overflow-wrap:anywhere; }
.editor-project-status:empty { display:none; }
.editor-project-status[data-error="true"] { color:var(--danger); }
.editor-project-panel { margin-top:12px; padding:16px; border:1px solid var(--border-color); border-radius:var(--ui-radius-card); background:var(--bg-card); }
.editor-project-panel h2 { margin:0 0 8px; font-size:1rem; }
.editor-project-panel p { color:var(--text-muted); font-size:.8rem; line-height:1.5; }
.editor-project-auto { display:flex; align-items:center; gap:10px; min-height:44px; font-size:.83rem; }
.editor-project-auto input { flex:none; width:20px; height:20px; accent-color:var(--accent); }
.editor-project-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr)); gap:12px; padding:0; margin:12px 0; list-style:none; }
.editor-project-item { display:flex; flex-direction:column; min-width:0; gap:8px; padding:14px; border:1px solid var(--border-color); border-radius:var(--ui-radius-control); }
.editor-project-item strong { overflow-wrap:anywhere; font-size:.9rem; }
.editor-project-item>span { color:var(--text-muted); font-size:.75rem; }
.editor-project-item-actions { margin-top:auto; }
@media(max-width:767px) { .editor-projects { margin:0 12px 12px; } .editor-project-panel { padding:12px; } .editor-project-actions>button { flex:1 1 auto; } .editor-project-item-actions>button { flex:1 1 44%; } }
@media print { .editor-projects { display:none!important; } }
.editor-page { display:flow-root; flex:none; width:100%; min-height:var(--editor-sheet-height); padding:64px 68px; border:1px solid #dadce0; border-radius:6px; box-shadow:0 2px 10px #0000000a; background:#fff; }
.editor-paper:focus .editor-page { border-color:#a9b2bf; }
.editor-paper .editor-page[data-editor-positioned="true"] { position:relative; align-self:center; min-height:0; padding:0; border:0; outline:1px solid #dadce0; }
.editor-paper:focus .editor-page[data-editor-positioned="true"] { outline-color:#a9b2bf; }
.editor-page-content { position:absolute; top:0; left:0; width:var(--editor-native-width); height:var(--editor-native-height); transform:scale(var(--editor-page-scale,1)); transform-origin:0 0; isolation:isolate; }
/* Page geometry must be measurable immediately, including when a global
   reduced-motion rule gives every element a tiny transition duration. */
.hk-document-editor .editor-page-content,.hk-document-editor [data-editor-text-fit] { transition-property:none !important; animation:none !important; }
.editor-page-flow { position:relative; z-index:1; width:100%; min-height:100%; }
.editor-page-content > [data-editor-anchor] { position:absolute; display:block; margin:0; padding:0; border:0; overflow:visible; }
.editor-page-content > [data-editor-anchor="image"][data-editor-behind="true"] { pointer-events:none; user-select:none; }
.editor-page-content > [data-editor-anchor] > img { display:block; width:100%; height:100%; max-width:none; }
.editor-page-content [data-editor-text-fit="true"] { display:block; width:max-content; max-width:none; transform-origin:0 0; white-space:pre; overflow-wrap:normal; }
.editor-paper p { margin:0 0 10pt; }
.editor-paper h1,.editor-paper h2,.editor-paper h3 { color:inherit; line-height:1.25; text-align:start; letter-spacing:normal; margin:14pt 0 8pt; }
.editor-paper h1 { font-size:24pt; } .editor-paper h2 { font-size:19pt; } .editor-paper h3 { font-size:15pt; }
.editor-paper img { max-width:100%; height:auto; }
.editor-paper ul,.editor-paper ol { padding-left:24px; }
.editor-paper table { width:100%; table-layout:fixed; border-collapse:collapse; margin:12pt 0; }
.editor-paper td,.editor-paper th { border:1px solid #adb3bc; padding:7px; min-width:25px; vertical-align:top; }
.editor-paper .editor-page[data-page-break] { margin:0; }
.editor-paper [data-page-break]:not(.editor-page) { break-before:page; }
.editor-welcome { position:absolute; top:58px; left:68px; right:68px; color:#686e77; pointer-events:none; }
.editor-welcome h1 { font-size:1.4rem; margin:0 0 10px; color:#3b4049; line-height:1.4; }
.editor-welcome p { font-size:.92rem; line-height:1.65; }
.editor-footer { display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px; max-width:794px; margin:12px auto; color:var(--text-muted); font-size:.75rem; }
.hk-document-editor.dark-mode .editor-page { box-shadow:0 4px 20px #0002; }
@media(max-width:767px) {
 .hk-document-editor .site-header { position:static; }
 .hk-document-editor .editor-topbar { padding:12px; gap:10px; }
 .editor-topbar .brand span { display:none; }
 .editor-title { flex:1 1 160px; }
 .editor-file-actions { width:100%; }
 .hk-document-editor .editor-file-actions button { flex:1 1 auto; font-size:.75rem; padding:9px; }
 .editor-toolbar { top:8px; margin:12px; padding:8px; gap:3px; flex-wrap:nowrap; overflow-x:auto; scrollbar-width:thin; }
 .editor-toolbar > * { flex-shrink:0; }
 .editor-toolbar select { max-width:116px; font-size:.75rem; }
 .editor-toolbar button { min-width:42px; min-height:44px; }
 .editor-info { margin:0 12px 12px; }
 .editor-canvas,.editor-notice,.editor-error,.editor-footer { margin-left:12px; margin-right:12px; }
 .editor-paper { gap:20px; }
 .editor-page { padding:32px 22px; }
 .editor-welcome { top:32px; left:23px; right:23px; }
 .editor-welcome h1 { font-size:1.15rem; }
 .editor-welcome p { font-size:.82rem; }
}
/* A compact touch workspace. Existing controls move into these surfaces; they
   are not duplicated, and document geometry remains independent of the UI. */
.editor-mobile-menu,.editor-mobile-dock,.editor-mobile-sheet,.editor-mobile-backdrop,.editor-mobile-local { display:none; }
.editor-mobile-sheet[hidden],.editor-mobile-dock[hidden],.editor-mobile-backdrop[hidden] { display:none !important; }
@media(max-width:767px) {
 :root:root:root body.hk-document-editor.editor-mobile-mode[data-editor-mobile-keyboard=true] .navbar.editor-mobile-header { min-height:48px; padding-block:2px; }
 .editor-mobile-mode[data-editor-mobile-keyboard=true] .editor-status { display:none; }
 .editor-mobile-mode[data-editor-mobile-keyboard=true] .editor-mobile-dock { min-height:48px; padding-block:2px; }
 .editor-mobile-mode[data-editor-mobile-keyboard=true] .editor-mobile-dock .editor-mobile-tool { min-height:44px; }
 .editor-mobile-mode[data-editor-mobile-keyboard=true] .editor-mobile-dock .editor-mobile-tool-label { display:none; }
 .editor-mobile-mode[data-editor-mobile-keyboard=true] .editor-mobile-sheet { bottom:calc(var(--editor-mobile-bottom,0px) + 48px); }
 .editor-mobile-mode[data-editor-mobile-short=true] .editor-mobile-sheet { max-height:calc(var(--editor-mobile-vh,100dvh) - 60px); }
 .editor-mobile-mode[data-editor-mobile-short=true][data-editor-mobile-keyboard=true] .editor-mobile-sheet { max-height:calc(var(--editor-mobile-vh,100dvh) - 52px); }
 .editor-mobile-mode[data-editor-mobile-short=true] .editor-mobile-sheet-heading { min-height:44px; padding-block:0; }
 .editor-mobile-mode[data-editor-mobile-short=true] .editor-mobile-sheet-body { padding:8px; }
}
@media(max-width:767px) {
 body.hk-document-editor.editor-mobile-mode { padding-bottom:0; scroll-padding-top:68px; scroll-padding-bottom:88px; }
 :root:root:root body.hk-document-editor.editor-mobile-mode .site-header { position:sticky; top:0; z-index:40; }
 :root:root:root body.hk-document-editor.editor-mobile-mode .navbar.editor-mobile-header {
  display:flex; flex-wrap:nowrap; align-items:center; width:100%; min-width:0; max-width:none;
  min-height:56px; margin:0; padding:4px 8px; gap:8px; border-bottom:0;
 }
 :root:root:root body.hk-document-editor.editor-mobile-mode .editor-mobile-header .brand { flex:none; gap:0; margin:0; min-width:44px; min-height:44px; justify-content:center; }
 .editor-mobile-mode .editor-mobile-local { display:inline-flex; flex:none; align-items:center; justify-content:center; width:20px; color:var(--text-muted); }
 .editor-mobile-mode .editor-mobile-local svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
 :root:root:root body.hk-document-editor.editor-mobile-mode .editor-mobile-header .brand-icon { width:32px; height:32px; border-radius:var(--ui-radius-control); }
 .editor-mobile-mode .editor-mobile-header .brand span { display:none; }
 .editor-mobile-mode .editor-title { flex:1 1 0; min-width:0; gap:0; }
 .editor-mobile-mode .editor-title input { min-height:28px; padding:3px 5px; border-radius:7px; font-size:16px; line-height:20px; text-overflow:ellipsis; }
 .editor-mobile-mode .editor-status { padding-left:6px; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:10px; line-height:14px; }
 .editor-mobile-mode .editor-mobile-menu { display:inline-flex; flex:none; align-items:center; justify-content:center; width:44px; height:44px; padding:8px; border:0; border-radius:var(--ui-radius-control); color:var(--text-main); background:transparent; cursor:pointer; -webkit-tap-highlight-color:transparent; }
 .editor-mobile-mode .editor-mobile-menu:hover,.editor-mobile-mode .editor-mobile-menu[aria-expanded=true] { background:var(--bg-hover); }
 .editor-mobile-mode .editor-mobile-menu svg { width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
 .editor-mobile-mode .editor-mobile-menu > .editor-mobile-tool-label { display:none; }
 .editor-mobile-mode .editor-mobile-header > .hk-header-account { flex:0 0 44px; min-width:44px; }
 :root:root:root body.hk-document-editor.editor-mobile-mode .editor-mobile-header #editor-cancel { flex:none; min-width:44px; min-height:44px; height:auto; max-width:86px; padding:8px; font-size:.75rem; line-height:1.3; white-space:normal; }
 .editor-mobile-mode .editor-mobile-header #editor-cancel[hidden] { display:none !important; }
 .editor-mobile-mode .editor-workspace { min-width:0; padding:12px 0 calc(92px + env(safe-area-inset-bottom,0px)); }
 .editor-mobile-mode .editor-canvas { min-width:0; max-width:794px; margin-inline:8px; overflow-x:clip; }
 html[data-editor-mobile-view=actual] .editor-mobile-mode .editor-canvas { overflow-x:auto; overflow-y:visible; overscroll-behavior-x:contain; scrollbar-width:thin; -webkit-overflow-scrolling:touch; }
 html[data-editor-mobile-view=actual] .editor-mobile-mode .editor-paper { width:var(--editor-page-native-width,794px); min-width:100%; max-width:none !important; }
 .editor-mobile-mode .editor-paper { gap:16px; font-size:16px; }
 .editor-mobile-mode .editor-page:not([data-editor-positioned=true]) { padding:28px 18px; border-radius:4px; }
 .editor-mobile-mode .editor-paper[data-editor-empty=true] { min-height:64px; }
 .editor-mobile-mode .editor-welcome { top:28px; left:19px; right:19px; }
 .editor-mobile-mode .editor-welcome h1 { font-size:1.12rem; line-height:1.4; }
 .editor-mobile-mode .editor-welcome p { font-size:.87rem; line-height:1.6; }
 .editor-mobile-mode .editor-notice,.editor-mobile-mode .editor-error { margin:0 8px 12px; padding:10px 12px; font-size:.8rem; }
 .editor-mobile-mode .editor-footer { margin:12px 12px 0; gap:6px 12px; font-size:.72rem; }
 .editor-mobile-mode .editor-footer a { display:inline-flex; align-items:center; min-height:44px; }
 .editor-mobile-mode .editor-mobile-dock {
  position:fixed; z-index:61; inset-inline:0; bottom:var(--editor-mobile-bottom,0px); display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr)); gap:4px; width:100%; min-width:0;
  min-height:56px; padding:4px 8px calc(4px + env(safe-area-inset-bottom,0px));
  border-top:1px solid var(--border-color); background:var(--bg-card); box-shadow:0 -4px 20px #00000008;
 }
 .editor-mobile-mode .editor-mobile-tool { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; min-width:0; min-height:48px; padding:4px; border:0; border-radius:var(--ui-radius-control); color:var(--text-main); background:transparent; font:inherit; cursor:pointer; -webkit-tap-highlight-color:transparent; }
 .editor-mobile-mode .editor-mobile-tool svg { flex:none; width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
 .editor-mobile-mode .editor-mobile-tool-label { max-width:100%; font-size:10px; line-height:14px; text-align:center; overflow-wrap:anywhere; }
 .editor-mobile-mode .editor-mobile-tool:hover,.editor-mobile-mode .editor-mobile-tool[aria-expanded=true] { background:var(--bg-hover); }
 .editor-mobile-mode .editor-mobile-tool[aria-expanded=true] { color:var(--accent-text,var(--accent)); box-shadow:inset 0 0 0 1px var(--border-color); }
 .editor-mobile-mode .editor-mobile-tool:disabled { opacity:.4; cursor:wait; }
 .editor-mobile-mode .editor-mobile-backdrop { display:block; position:fixed; z-index:60; inset:0 0 var(--editor-mobile-bottom,0px); background:#0005; touch-action:manipulation; }
 .editor-mobile-mode .editor-mobile-sheet {
  position:fixed; z-index:62; inset-inline:0; bottom:calc(var(--editor-mobile-bottom,0px) + 56px + env(safe-area-inset-bottom,0px));
  display:flex; flex-direction:column; min-width:0; width:100%; max-height:calc(var(--editor-mobile-vh,100dvh) - 116px - env(safe-area-inset-bottom,0px));
  margin:0; padding:0; border:1px solid var(--border-color); border-bottom:0; border-radius:var(--ui-radius-panel) var(--ui-radius-panel) 0 0;
  color:var(--text-main); background:var(--bg-card); box-shadow:0 -8px 28px #0002;
  animation:hk-editor-sheet-enter 180ms cubic-bezier(.2,.8,.2,1);
 }
 .editor-mobile-mode .editor-mobile-sheet-heading { display:flex; flex:none; align-items:center; justify-content:space-between; gap:12px; min-width:0; min-height:56px; padding:6px 12px; border-bottom:1px solid var(--border-color); }
 .editor-mobile-mode .editor-mobile-sheet-heading h2 { min-width:0; margin:0; color:var(--text-main); font-size:1rem; line-height:1.4; text-align:start; letter-spacing:normal; }
 .editor-mobile-mode .editor-mobile-sheet-heading button { display:inline-flex; flex:none; justify-content:center; align-items:center; width:44px; height:44px; min-height:44px; padding:8px; border:0; border-radius:var(--ui-radius-control); color:var(--text-main); background:transparent; font:inherit; font-size:1.5rem; line-height:1; cursor:pointer; }
 .editor-mobile-mode .editor-mobile-sheet-heading button:hover { background:var(--bg-hover); }
 .editor-mobile-mode .editor-mobile-sheet-heading button svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; }
 .editor-mobile-mode .editor-mobile-sheet-heading .editor-mobile-tool { flex-direction:row; gap:0; }
 .editor-mobile-mode .editor-mobile-sheet-heading .editor-mobile-tool-label { display:none; }
 .editor-mobile-mode .editor-mobile-sheet-body { min-height:0; min-width:0; padding:12px; overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; }
 .editor-mobile-mode .editor-mobile-sheet-body > :first-child { margin-top:0; }
 .editor-mobile-mode .editor-mobile-sheet-body > :last-child { margin-bottom:0; }
 .editor-mobile-mode .editor-mobile-file-document h3,.editor-mobile-mode .editor-mobile-file-navigation h3 { margin:0 0 10px; color:var(--text-muted); font-size:.8rem; line-height:1.4; letter-spacing:normal; text-align:start; }
 .editor-mobile-mode .editor-mobile-sheet input:not([type=file]),.editor-mobile-mode .editor-mobile-sheet select,.editor-mobile-mode .editor-mobile-sheet textarea { font-size:16px; }
 .editor-mobile-mode .editor-mobile-sheet .editor-file-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:stretch; gap:8px; width:100%; margin:0; }
 :root:root:root body.hk-document-editor.editor-mobile-mode .editor-mobile-sheet .editor-file-actions button { display:flex; align-items:center; justify-content:center; min-width:0; min-height:44px; height:auto; padding:10px 8px; font-size:.85rem; line-height:1.35; white-space:normal; overflow-wrap:anywhere; }
 .editor-mobile-mode .editor-mobile-sheet .editor-file-actions [hidden] { display:none !important; }
 :root:root:root body.hk-document-editor.editor-mobile-mode .editor-mobile-sheet .nav-actions { justify-content:flex-start; padding-block:12px; gap:8px; }
 .editor-mobile-mode .editor-mobile-sheet .editor-info { display:flex; flex-direction:column; align-items:stretch; gap:12px; margin:8px 0 16px; padding:14px 0; border-top:1px solid var(--border-color); border-bottom:1px solid var(--border-color); }
 .editor-mobile-mode .editor-mobile-sheet .editor-local { align-items:flex-start; font-size:.78rem; line-height:1.5; }
 .editor-mobile-mode .editor-mobile-sheet .editor-local svg { flex:none; margin-top:2px; }
 .editor-mobile-mode .editor-mobile-sheet .editor-ocr-label { display:flex; flex-direction:column; align-items:stretch; gap:6px; font-size:.8rem; }
 .editor-mobile-mode .editor-mobile-sheet .editor-ocr-label select { max-width:none; width:100%; min-height:44px; }
 .editor-mobile-mode .editor-mobile-sheet .editor-scan-hint { margin:0; font-size:.75rem; line-height:1.5; }
 .editor-mobile-mode .editor-mobile-sheet .editor-projects { margin:16px 0; }
 .editor-mobile-mode .editor-mobile-sheet .editor-project-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
 .editor-mobile-mode .editor-mobile-sheet .editor-project-actions > button { min-width:0; padding:9px 8px; font-size:.83rem; line-height:1.4; overflow-wrap:anywhere; }
 .editor-mobile-mode .editor-mobile-sheet .editor-project-panel { padding:12px; }
 .editor-mobile-mode .editor-mobile-sheet .editor-project-list { grid-template-columns:minmax(0,1fr); }
 .editor-mobile-mode .editor-mobile-sheet .editor-project-auto { font-size:.8rem; line-height:1.5; }
 .editor-mobile-mode .editor-mobile-view { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; min-width:0; margin:16px 0; padding:12px; border:1px solid var(--border-color); border-radius:var(--ui-radius-control); }
 .editor-mobile-mode .editor-mobile-view legend { padding-inline:4px; color:var(--text-muted); font-size:.8rem; }
 .editor-mobile-mode .editor-mobile-view button { min-width:0; min-height:44px; padding:9px 8px; border:1px solid var(--border-color); border-radius:var(--ui-radius-control); color:var(--text-main); background:var(--bg-main); font:inherit; font-size:.85rem; line-height:1.4; cursor:pointer; }
 .editor-mobile-mode .editor-mobile-view button[aria-pressed=true] { border-color:var(--accent); color:var(--accent-text,var(--accent)); background:var(--bg-hover); }
 .editor-mobile-mode .editor-mobile-view .editor-mobile-tool-label { font-size:.85rem; line-height:1.4; }
 .editor-mobile-mode #editor-mobile-file .fnav { display:block; position:static; width:100%; max-width:none; margin:0; padding:12px 0 0; inset:auto; border:0; border-top:1px solid var(--border-color); background:transparent; transform:none; opacity:1; visibility:visible; }
 .editor-mobile-mode #editor-mobile-file .fnav-pill { display:flex; flex-direction:column; align-items:stretch; gap:4px; padding:0; border:0; border-radius:0; box-shadow:none; background:transparent; backdrop-filter:none; -webkit-backdrop-filter:none; }
 .editor-mobile-mode #editor-mobile-file .fnav-btn { display:flex; flex-direction:row; justify-content:flex-start; gap:12px; min-height:44px; width:100%; padding:10px 12px; border-radius:var(--ui-radius-control); font-size:.85rem; line-height:1.4; text-align:start; }
 .editor-mobile-mode #editor-mobile-file .fnav-btn svg { flex:none; width:22px; height:22px; }
 .editor-mobile-mode #editor-mobile-file .fnav-settings { width:100%; }
 .editor-mobile-mode #editor-mobile-file .fnav-menu { display:none; position:static; inset:auto; width:100%; min-width:0; max-width:none; max-height:none; margin:8px 0 0; padding:8px; border-radius:var(--ui-radius-control); box-shadow:none; transform:none !important; visibility:visible; opacity:1; pointer-events:auto; }
 .editor-mobile-mode #editor-mobile-file .fnav-settings.open .fnav-menu { display:block; }
 .editor-mobile-mode #editor-mobile-file .fnav-option { min-width:0; max-width:100%; white-space:normal; }
 .editor-mobile-mode #editor-mobile-file .fnav-language-list { padding-inline:0; }
 .editor-mobile-mode #editor-mobile-file .fnav-language-option { padding-inline:6px; }
 .editor-mobile-mode #editor-mobile-format-panel .editor-toolbar { position:static; display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:6px; min-width:0; margin:0; padding:0; border:0; border-radius:0; background:transparent; overflow:visible; }
 .editor-mobile-mode #editor-mobile-format-panel .editor-toolbar > * { min-width:0; }
 .editor-mobile-mode #editor-mobile-format-panel .editor-toolbar select { grid-column:span 2; width:100%; max-width:none; min-height:44px; padding:8px 20px 8px 6px; font-size:16px; }
 .editor-mobile-mode #editor-mobile-format-panel .editor-toolbar button { min-width:44px; min-height:44px; padding:8px; }
 .editor-mobile-mode #editor-mobile-format-panel .editor-toolbar-separator { display:none; }
 .editor-mobile-mode #editor-mobile-insert-panel .editor-mobile-sheet-body { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
 .editor-mobile-mode #editor-mobile-insert-panel .editor-mobile-sheet-body > button { display:flex; align-items:center; justify-content:flex-start; gap:10px; min-width:0; min-height:56px; padding:12px 8px; border:1px solid var(--border-color); border-radius:var(--ui-radius-control); color:var(--text-main); background:var(--bg-card); font:inherit; font-size:.85rem; line-height:1.4; text-align:start; cursor:pointer; }
 .editor-mobile-mode #editor-mobile-insert-panel .editor-mobile-sheet-body > button svg { flex:none; width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
 .editor-mobile-mode #editor-mobile-insert-panel .editor-mobile-tool-label { font-size:.85rem; line-height:1.4; text-align:start; }
 .editor-mobile-mode .editor-mobile-menu:focus-visible,.editor-mobile-mode .editor-mobile-tool:focus-visible,.editor-mobile-mode .editor-mobile-sheet button:focus-visible { outline:3px solid var(--hk-focus); outline-offset:2px; }
 .editor-mobile-mode[data-editor-mobile-obscured=true] .editor-mobile-dock { display:none; }
 .editor-mobile-mode .editor-mobile-sheet [hidden] { display:none !important; }
 @keyframes hk-editor-sheet-enter { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
}
@media(max-width:767px) and (max-height:480px) {
 .editor-mobile-mode .editor-workspace { padding-top:8px; }
 .editor-mobile-mode .editor-mobile-sheet-heading { min-height:44px; padding-block:0; }
 .editor-mobile-mode .editor-mobile-sheet-body { padding:8px 12px; }
 .editor-mobile-mode .editor-mobile-sheet { max-height:calc(var(--editor-mobile-vh,100dvh) - 112px - env(safe-area-inset-bottom,0px)); border-radius:16px 16px 0 0; }
}
@media(prefers-reduced-motion:reduce) { .editor-mobile-sheet { animation:none !important; } }
.reduce-motion .editor-mobile-sheet,.lite-mode .editor-mobile-sheet { animation:none !important; }
.lite-mode .editor-mobile-sheet,.lite-mode .editor-mobile-dock { box-shadow:none; }
@media print {
 @page { size:A4; margin:18mm; }
 html,body.hk-document-editor { background:white !important; padding:0 !important; margin:0 !important; }
 .hk-document-editor .site-header,.editor-toolbar,.editor-info,.editor-notice,.editor-error,.editor-footer,.editor-welcome,.hk-document-editor .fnav,.hk-document-editor #hk-news-panel,.hk-document-editor .site-footer,.editor-mobile-menu,.editor-mobile-dock,.editor-mobile-sheet,.editor-mobile-backdrop { display:none !important; }
 .editor-workspace,.editor-canvas,.editor-paper,.editor-page { display:block !important; width:auto !important; max-width:none !important; min-height:0 !important; margin:0 !important; padding:0 !important; border:0 !important; border-radius:0 !important; box-shadow:none !important; }
 .editor-paper,.editor-page { color:#000 !important; background:#fff !important; }
 .editor-page[data-page-break="true"] { break-before:page; }
 .editor-paper .editor-page[data-editor-positioned="true"] { width:var(--editor-native-width) !important; height:var(--editor-native-height) !important; min-height:var(--editor-native-height) !important; position:relative !important; outline:0; break-inside:avoid; }
 .editor-page[data-editor-positioned="true"] > .editor-page-content { display:block !important; width:var(--editor-native-width) !important; height:var(--editor-native-height) !important; transform:none !important; }
 .editor-paper [data-page-break] { border:0; margin:0; }
 .editor-paper tr,img { break-inside:avoid; }
}
