:root{font-family:var(--font-interface);--font-ui-default:Arial,"Segoe UI",sans-serif;--font-ui-modern:"Segoe UI",Arial,sans-serif;--font-serif:Georgia,"Times New Roman",serif;--font-serif-romantic:"Palatino Linotype","Book Antiqua",Georgia,serif;--font-rounded:"Trebuchet MS",Arial,sans-serif;--font-playful:"Comic Sans MS","Trebuchet MS",sans-serif;--font-interface:var(--font-ui-default);--font-word-default:Courier New;--font-word-arial:Arial;--font-word-times:Times New Roman;--font-word-calibri:Calibri;--font-word-courier:Courier New;--font-word-helvetica:Helvetica;--heading-primary-font:var(--font-interface);--heading-secondary-font:var(--font-serif);color:#232323;background:#f5f5f5;font-size:14px}*{box-sizing:border-box}body{margin:0;min-width:850px}button,input,textarea{font:inherit}button{cursor:pointer;color:inherit}button:disabled{opacity:.35;cursor:default}.topbar{height:70px;display:flex;align-items:stretch;background:var(--preset-bg);border-top:1px solid color-mix(in srgb,var(--preset-ink) 0%,var(--preset-editor-muted));border-bottom:1px solid color-mix(in srgb,var(--preset-border) 69%,var(--preset-bg))}.brand{width:235px;flex:none;display:flex;align-items:center;padding:0 19px;border-right:1px solid var(--preset-border);font-family:var(--font-interface);font-size:30px;font-weight:1000;letter-spacing:-2px;color:color-mix(in srgb,var(--preset-ink) 20%,#000);white-space:nowrap}.brand span{letter-spacing:-2.5px}.brand span::first-letter{color:var(--preset-accent)}.menubar{display:flex;align-items:stretch;gap:1px;padding-left:14px}.menu{position:relative;display:flex;align-items:center}.menu summary,.menu-link{list-style:none;border:0;background:transparent;padding:12px 12px;font-size:14px}.menu summary::-webkit-details-marker{display:none}.menu summary:hover,.menu-link:hover,.menu[open] summary{background:color-mix(in srgb,var(--preset-border) 48%,var(--preset-bg))}.dropdown{position:absolute;z-index:30;top:56px;left:0;width:225px;background:white;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 5%,var(--preset-border));box-shadow:0 8px 25px #0002;padding:6px;border-radius:5px}.dropdown button,.menu-check{display:block;width:100%;border:0;text-align:left;background:transparent;padding:9px 10px;border-radius:4px;font-size:13px}.dropdown button:hover,.menu-check:hover{background:var(--preset-bg)}.dropdown hr{border:0;border-top:1px solid color-mix(in srgb,var(--preset-border) 38%,var(--preset-bg))}.menu-check input{accent-color:var(--preset-accent)}.top-actions{margin-left:auto;display:flex;align-items:center;gap:8px;padding:0 22px;color:color-mix(in srgb,var(--preset-ink) 0%,var(--preset-editor-muted));font-size:12px}.status-dot{width:7px;height:7px;background:var(--preset-accent);border-radius:50%}main{height:calc(100vh - 102px);min-height:380px;display:grid;grid-template-columns:51px minmax(300px,58%) minmax(300px,1fr)}.rail{border-right:1px solid color-mix(in srgb,var(--preset-border) 79%,var(--preset-bg));display:flex;flex-direction:column;align-items:center;gap:8px;padding:17px 4px;background:color-mix(in srgb,var(--preset-bg) 52%,var(--preset-dialog))}.rail button{width:39px;height:39px;border:1px solid var(--preset-border);border-radius:5px;background:color-mix(in srgb,var(--preset-bg) 52%,var(--preset-dialog));box-shadow:0 1px 2px #0001;font-size:20px;line-height:1}.rail button:hover{background:white;border-color:color-mix(in srgb,var(--preset-editor-muted) 11%,var(--preset-border))}.rail button.selected{border-color:var(--preset-accent);background:var(--preset-accent-soft);color:var(--preset-accent-strong)}.rail-rule{width:34px;border-top:1px solid color-mix(in srgb,var(--preset-editor-muted) 5%,var(--preset-border));margin:4px 0}.rail-bottom{margin-top:auto}.avatar{width:31px;height:31px;border-radius:7px;background:var(--preset-accent);display:grid;place-items:center}.workspace{min-width:0;min-height:0}.viewer{height:100%;overflow:auto;display:flex;align-items:flex-start;justify-content:center;padding:9px 24px 32px;background:var(--preset-bg)}.empty{margin:auto;text-align:center;color:color-mix(in srgb,var(--preset-editor-muted) 68%,var(--preset-border));max-width:430px}.empty-mark{font-family:var(--heading-primary-font);font-size:44px;font-weight:bold;color:color-mix(in srgb,var(--preset-ink) 71%,#000);letter-spacing:-3px}.empty-mark span{font-size:24px}.empty h1{font-size:21px;color:color-mix(in srgb,var(--preset-ink) 87%,var(--preset-editor-muted));font-weight:500}.empty p{line-height:1.5}.accent-button,.plain-button{border-radius:5px;padding:10px 14px;margin:5px}.accent-button{border:1px solid var(--preset-accent);background:var(--preset-accent);color:var(--preset-on-accent)}.plain-button{border:1px solid color-mix(in srgb,var(--preset-editor-muted) 5%,var(--preset-border));background:#fff}.page-surface{position:relative;flex:none;background:#fff;box-shadow:0 1px 3px #0002;transform-origin:top left}.page-surface[hidden]{display:none}.page-surface canvas{display:block}#boxLayer{position:absolute;inset:0;touch-action:none}.box{position:absolute;border:1px solid #d9362c;background:#df42341c;color:#c32e25;cursor:pointer;transform-origin:center}.box.selected-box{border:2px solid var(--preset-accent);background:#edaa3b25;z-index:2}.box.marked{border-color:#29a76d;background:#48c98e28}.box .tag{position:absolute;left:50%;top:-25px;transform:translateX(-50%);color:#ad2d23;font-size:16px;font-weight:bold;text-shadow:0 1px white}.box.selected-box .tag{color:var(--preset-accent-strong)}.box.is-point{width:14px!important;height:14px!important;border-radius:50%;margin-left:-7px;margin-top:-7px}.translations{min-width:0;min-height:0;background:var(--preset-bg);border-left:1px solid color-mix(in srgb,var(--preset-border) 69%,var(--preset-bg));display:flex;flex-direction:column}.translation-header{height:42px;border-bottom:1px solid color-mix(in srgb,var(--preset-border) 84%,var(--preset-bg));display:flex;align-items:center;justify-content:space-between;padding:0 16px}.translation-actions{display:flex;gap:5px}.translation-actions button{height:28px;min-width:29px;background:transparent;border:0;border-radius:4px;font-size:18px}.translation-actions button:hover{background:color-mix(in srgb,var(--preset-border) 38%,var(--preset-bg))}.translation-list{overflow:auto;flex:1;padding:26px 16px 60px 18px}.line{margin:0 0 13px 0;padding:7px 12px 8px 8px;border:1px solid transparent;border-radius:5px;color:color-mix(in srgb,var(--preset-editor-muted) 68%,var(--preset-border));background:transparent}.line.active{background:#fff;border-color:color-mix(in srgb,var(--preset-border) 69%,var(--preset-bg));box-shadow:0 1px 4px #0003;color:color-mix(in srgb,var(--preset-ink) 88%,#000)}.line-head{display:flex;align-items:center;gap:12px;min-height:28px}.line-head .label{font-size:15px;min-width:26px;color:color-mix(in srgb,var(--preset-editor-muted) 64%,var(--preset-border))}.line.active .line-head .label{color:color-mix(in srgb,var(--preset-ink) 87%,var(--preset-editor-muted))}.line-head .side{font-size:12px;color:color-mix(in srgb,var(--preset-editor-muted) 52%,var(--preset-border));margin-left:auto}.line-head button{background:transparent;border:0;color:color-mix(in srgb,var(--preset-editor-muted) 52%,var(--preset-border));font-size:17px}.line-head button:hover{color:var(--preset-accent)}.line textarea,.line .de-editor{display:block;width:calc(100% - 42px);margin-left:42px;padding:6px 7px;min-height:32px;border:0;border-bottom:1px solid transparent;outline:0;background:transparent;color:color-mix(in srgb,var(--preset-ink) 87%,var(--preset-editor-muted));resize:vertical;line-height:1.45}.line textarea{font-size:13px;color:color-mix(in srgb,var(--preset-ink) 0%,var(--preset-editor-muted))}.line:not(.active) textarea,.line:not(.active) .de-editor{min-height:24px;height:27px;overflow:hidden;resize:none;opacity:.55;pointer-events:none}.line.active textarea{border-bottom:1px dotted color-mix(in srgb,var(--preset-editor-muted) 5%,var(--preset-border))}.line .de-editor:empty:before{content:attr(aria-label);color:color-mix(in srgb,var(--preset-editor-muted) 52%,var(--preset-border))}.line textarea::placeholder{color:color-mix(in srgb,var(--preset-editor-muted) 52%,var(--preset-border))}.line .de-editor{white-space:pre-wrap;overflow-wrap:anywhere}.line-actions{display:flex;gap:3px;padding:4px 0 0 42px}.line:not(.active) .line-actions{display:none}.line-actions button{border:0;background:transparent;border-radius:3px;padding:3px 7px;color:color-mix(in srgb,var(--preset-editor-muted) 84%,var(--preset-border));font-size:11px}.line-actions button:hover{background:var(--preset-bg);color:color-mix(in srgb,var(--preset-ink) 87%,var(--preset-editor-muted))}.statusbar{height:32px;background:color-mix(in srgb,var(--preset-bg) 52%,var(--preset-dialog));border-top:1px solid color-mix(in srgb,var(--preset-border) 74%,var(--preset-bg));display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;padding:0 11px;color:color-mix(in srgb,var(--preset-editor-muted) 84%,var(--preset-border));font-size:12px}.project-info,.page-controls,.zoom-controls{display:flex;align-items:center;gap:7px;white-space:nowrap;min-width:0}.project-info{overflow:hidden}.project-info #message{overflow:hidden;text-overflow:ellipsis}.saved-indicator{font-size:12px;color:#39ae5b}.page-controls button,.zoom-controls button{border:0;background:transparent;padding:1px 7px;font-size:17px;color:color-mix(in srgb,var(--preset-ink) 0%,var(--preset-editor-muted))}.page-controls input{width:42px;border:0;background:transparent;color:color-mix(in srgb,var(--preset-ink) 0%,var(--preset-editor-muted));font-size:12px}.zoom-controls{justify-content:flex-end}.zoom-controls #pageNumber{max-width:160px;overflow:hidden;text-overflow:ellipsis;margin-right:8px}dialog{border:1px solid color-mix(in srgb,var(--preset-editor-muted) 5%,var(--preset-border));border-radius:9px;padding:0;min-width:370px;background:#fff;box-shadow:0 15px 60px #0003}dialog::backdrop{background:#0005}.dialog-header,.dialog-footer{padding:14px 18px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid color-mix(in srgb,var(--preset-border) 38%,var(--preset-bg))}.dialog-header h2{margin:0;font-size:18px;font-weight:500}.dialog-header button{border:0;background:none;font-size:23px}.dialog-footer{border-top:1px solid color-mix(in srgb,var(--preset-border) 38%,var(--preset-bg));border-bottom:0;justify-content:flex-end}.dialog-body{padding:16px 20px}.dialog-body label{display:block;margin-bottom:14px;font-size:12px;color:color-mix(in srgb,var(--preset-ink) 0%,var(--preset-editor-muted))}.dialog-body input{display:block;width:100%;margin-top:5px;padding:9px;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 5%,var(--preset-border));border-radius:5px;background:#fff}.dialog-body p{line-height:1.5;color:color-mix(in srgb,var(--preset-editor-muted) 84%,var(--preset-border));font-size:12px}@media(max-width:1100px){main{grid-template-columns:51px minmax(300px,53%) minmax(280px,1fr)}.brand{width:190px;font-size:25px}.menubar{padding-left:6px}.menu summary,.menu-link{padding:10px 7px}.top-actions{display:none}}@media(max-width:880px){.brand{width:160px;font-size:22px}.statusbar #pageNumber{display:none}}
.brand{width:252px;font-size:24px;letter-spacing:-1.7px}.brand span{letter-spacing:-1.7px}.empty-mark span{font-size:21px}@media(max-width:1100px){.brand{width:210px;font-size:20px}}
#drawingLayer,#numberLayer{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}#drawingLayer{overflow:visible}#numberLayer{display:flex;align-items:flex-end;justify-content:center;padding-bottom:10px;color:#c9302a;font-weight:600}.line-head{cursor:grab}.line.drag-over{border-color:var(--preset-accent);background:var(--preset-hover)}.dialog-body input[type=checkbox]{display:inline;width:auto;margin:0 6px 0 0}.glossary-entry{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:15px 0}.glossary-entry input:nth-child(3){grid-column:span 2}.glossary-list{max-height:230px;overflow:auto}.glossary-row{display:flex;justify-content:space-between;gap:10px;padding:6px;border-bottom:1px solid color-mix(in srgb,var(--preset-border) 38%,var(--preset-bg));font-size:12px}.glossary-row button{border:0;background:none}#searchResults{min-height:20px}
.viewer{justify-content:safe center}.page-surface{margin-inline:auto}#numberLayer{display:block;padding:0}#numberLayer span{position:absolute;bottom:10px;transform:translateX(-50%);white-space:nowrap}.line-head .side{border:0;background:transparent;color:color-mix(in srgb,var(--preset-editor-muted) 68%,var(--preset-border));cursor:pointer;font-size:12px}.line-head .side:hover{color:var(--preset-accent-strong)}
.side-switch{display:flex;gap:4px}.side-switch[hidden]{display:none}.side-switch button{border:1px solid color-mix(in srgb,var(--preset-editor-muted) 4%,var(--preset-border));border-radius:4px;background:color-mix(in srgb,var(--preset-bg) 52%,var(--preset-dialog));color:color-mix(in srgb,var(--preset-ink) 0%,var(--preset-editor-muted));padding:5px 9px;font-size:12px;cursor:pointer}.side-switch button.active{border-color:var(--preset-accent);color:var(--preset-accent-strong);background:var(--preset-accent-soft)}.translation-header .side-switch{margin-left:12px;margin-right:auto}#numberSideSwitch{margin:12px 0}
#wordExportDialog{max-height:88vh;max-width:min(650px,92vw)}.word-settings{display:grid;grid-template-columns:1fr 1fr;gap:0 16px;max-height:65vh;overflow:auto}.word-settings label{margin-bottom:10px}
:root{--page-number-color:#ff0000;--page-number-outline-color:#fff;--box-label-color:#ff0000;--box-label-outline-color:#fff;--box-line-color:#ff0000;--box-mark-color:#64c864;--arrow-color:#ff0000;--ellipse-color:#ff0000;--text-item-color:#ff0000;--glossar-text-color:#b71c1c;--comment-color:#4444aa;--footnote-color:#aa4444}
#numberLayer span{color:var(--page-number-color);-webkit-text-stroke:3px var(--page-number-outline-color);paint-order:stroke fill;text-shadow:1px 1px 0 var(--page-number-outline-color),-1px -1px 0 var(--page-number-outline-color)}.box .tag{color:var(--box-label-color);-webkit-text-stroke:3px var(--box-label-outline-color);paint-order:stroke fill;text-shadow:1px 1px 0 var(--box-label-outline-color),-1px -1px 0 var(--box-label-outline-color)}.box{border-color:var(--box-line-color)}.box.marked{border-color:var(--box-mark-color);background:color-mix(in srgb,var(--box-mark-color) 20%,transparent)}.gloss-tag{color:var(--glossar-text-color)}.annot-comment{background:color-mix(in srgb,var(--comment-color) 18%,transparent)}.annot-footnote{background:color-mix(in srgb,var(--footnote-color) 18%,transparent)}
#settingsDialog{width:min(680px,94vw);max-height:88vh}.settings-tabs{display:flex;border-bottom:1px solid color-mix(in srgb,var(--preset-border) 38%,var(--preset-bg))}.settings-tabs button{border:0;background:transparent;padding:12px 15px;color:color-mix(in srgb,var(--preset-ink) 0%,var(--preset-editor-muted));cursor:pointer}.settings-tabs button.active{color:var(--preset-accent-strong);border-bottom:2px solid var(--preset-accent)}.settings-content{max-height:62vh;overflow:auto}.settings-content section[hidden]{display:none}.settings-content h3{font-size:15px;font-weight:500}.settings-content button{border:1px solid color-mix(in srgb,var(--preset-editor-muted) 5%,var(--preset-border));border-radius:4px;background:color-mix(in srgb,var(--preset-bg) 52%,var(--preset-dialog));padding:7px;margin:4px}.color-row{display:grid;grid-template-columns:1fr 46px 44px;align-items:center;gap:7px;padding:3px 0}.color-row input{width:38px;height:32px;padding:2px;margin:0}.thumbnail-preview{display:block;max-width:120px;max-height:160px;object-fit:contain;margin:8px 0}.thumbnail-preview[hidden]{display:none}
.settings-tabs input[type=radio]{position:absolute;opacity:0;width:1px;height:1px;pointer-events:none}.settings-tabs label{display:block;padding:12px 15px;color:color-mix(in srgb,var(--preset-ink) 0%,var(--preset-editor-muted));cursor:pointer;border-bottom:2px solid transparent}.settings-tabs input:checked+label{color:var(--preset-accent-strong);border-bottom-color:var(--preset-accent)}.settings-tabs input:focus-visible+label{outline:2px solid var(--preset-accent)}.settings-content [data-settings-panel]{display:none}#settingsDialog:has(#tabProject:checked) [data-settings-panel=project],#settingsDialog:has(#tabNumbering:checked) [data-settings-panel=numbering],#settingsDialog:has(#tabGeneral:checked) [data-settings-panel=general],#settingsDialog:has(#tabAbout:checked) [data-settings-panel=about]{display:block}
main{grid-template-columns:51px minmax(300px,58%) 8px minmax(300px,1fr)}.column-resize{position:relative;cursor:col-resize;background:color-mix(in srgb,var(--preset-border) 38%,var(--preset-bg));border-left:1px solid color-mix(in srgb,var(--preset-editor-muted) 5%,var(--preset-border));border-right:1px solid color-mix(in srgb,var(--preset-editor-muted) 5%,var(--preset-border));touch-action:none}.column-resize span{position:absolute;top:50%;left:1px;width:4px;height:42px;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 13%,var(--preset-border));border-radius:4px;background:#fff;transform:translateY(-50%)}.column-resize:hover,.column-resize.dragging{background:#a592c7}
.translation-tools,.format-tools{display:flex;align-items:center;gap:3px;padding:5px 10px;border-bottom:1px solid color-mix(in srgb,var(--preset-border) 84%,var(--preset-bg));flex-wrap:wrap}.translation-tools button,.format-tools button{border:1px solid transparent;border-radius:4px;background:transparent;padding:4px 7px;color:color-mix(in srgb,var(--preset-ink) 0%,var(--preset-editor-muted));font-size:12px}.translation-tools button:hover,.format-tools button:hover{background:color-mix(in srgb,var(--preset-border) 48%,var(--preset-bg))}.translation-tools button.selected,.format-tools button.selected{background:var(--preset-accent-soft);color:var(--preset-accent-strong);border-color:#b7a6d1}
.page-heading{font-size:15px;color:var(--preset-accent);padding:0 5px 13px;margin-bottom:9px;border-bottom:1px solid var(--preset-border)}.line{transition:background-color .12s,border-color .12s}.line.hovered:not(.active){background:color-mix(in srgb,var(--preset-border) 53%,var(--preset-bg));color:color-mix(in srgb,var(--preset-ink) 0%,var(--preset-editor-muted))}.line.marked{background:color-mix(in srgb,var(--box-mark-color) 18%,#fff)}.box.hovered:not(.selected-box){background:color-mix(in srgb,var(--preset-accent) 24%,transparent);border-color:var(--preset-accent)}.line-head .label{cursor:pointer;user-select:none}.line-head .label:hover{color:var(--preset-accent)}.line-body{display:flex;align-items:flex-start}.line-body .de-editor{margin-left:0;flex:1;width:auto}.drag-grip{display:block;width:31px;margin:5px 0 0 7px;flex:none;color:color-mix(in srgb,var(--preset-ink) 0%,var(--preset-editor-muted));cursor:grab;user-select:none;font-size:20px;line-height:24px;text-align:center}.drag-grip:active{cursor:grabbing}.line textarea[hidden]{display:none}.line .de-editor{min-width:0}
.font-control{display:flex;align-items:center;gap:5px;color:color-mix(in srgb,var(--preset-ink) 0%,var(--preset-editor-muted));font-size:11px;margin-left:auto}.font-control input{width:48px;padding:2px;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 5%,var(--preset-border));border-radius:3px}.line-head .label{font-weight:600}.line-head .label:active{cursor:grabbing}
.drag-grip::before{content:"\283f"}
.shortcut-row{display:grid;grid-template-columns:minmax(100px,1fr) minmax(150px,2fr) auto;gap:8px;margin:7px 0}.shortcut-row input{min-width:0}.shortcut-row button{white-space:nowrap}#shortcutsList{max-height:45vh;overflow:auto}
.box.outline-hidden,.box.outline-hidden.selected-box,.box.outline-hidden.hovered,.box.outline-hidden.marked{border-color:transparent!important;background:transparent!important;box-shadow:none!important}
.jp-editor{width:calc(100% - 42px);margin-left:42px;padding:6px 7px;min-height:30px;outline:0;border-bottom:1px dotted color-mix(in srgb,var(--preset-editor-muted) 5%,var(--preset-border));color:color-mix(in srgb,var(--preset-ink) 0%,var(--preset-editor-muted));font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere}.jp-editor[hidden]{display:none}.jp-editor:empty::before{content:attr(data-placeholder);color:color-mix(in srgb,var(--preset-editor-muted) 52%,var(--preset-border));pointer-events:none}.line:not(.active) .jp-editor{height:27px;min-height:24px;overflow:hidden;opacity:.55;pointer-events:none}.line .de-editor{resize:none}::highlight(glossary){color:var(--glossar-text-color)}
.glossary-tabs{display:flex;gap:3px;overflow-x:auto;border-bottom:1px solid color-mix(in srgb,var(--preset-editor-muted) 5%,var(--preset-border));margin:13px 0 8px}.glossary-tabs button{flex:none;border:1px solid transparent;border-bottom:0;background:transparent;padding:8px 13px;border-radius:5px 5px 0 0;color:color-mix(in srgb,var(--preset-ink) 22%,var(--preset-editor-muted))}.glossary-tabs button.active{background:#fff;color:var(--preset-accent-strong);border-color:color-mix(in srgb,var(--preset-editor-muted) 5%,var(--preset-border));font-weight:600}.glossary-search-label{margin:8px 0!important}.glossary-list{max-height:min(48vh,580px);overflow:auto;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 5%,var(--preset-border));border-radius:5px;background:#fff}.glossary-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:13px}.glossary-table th{position:sticky;top:0;background:color-mix(in srgb,var(--preset-border) 22%,var(--preset-bg));text-align:left;z-index:1;padding:9px;border-bottom:1px solid color-mix(in srgb,var(--preset-editor-muted) 5%,var(--preset-border))}.glossary-table th:nth-child(1),.glossary-table th:nth-child(2){width:25%}.glossary-table th:nth-child(3){width:26%}.glossary-table th:nth-child(4){width:18%}.glossary-table th:nth-child(5){width:6%;min-width:68px}.glossary-table td{border-bottom:1px solid color-mix(in srgb,var(--preset-border) 38%,var(--preset-bg));padding:3px}.glossary-table tr:hover td{background:var(--preset-hover)}.glossary-table input{width:100%;min-width:0;border:1px solid transparent;border-radius:3px;background:transparent;padding:6px!important;margin:0!important}.glossary-table input:focus{outline:1px solid var(--preset-accent);background:#fff}.glossary-table button{border:0;background:transparent;color:#a44;padding:6px 3px}#glossaryDialog{width:min(1150px,96vw);max-width:96vw;max-height:92vh}#glossaryDialog .dialog-body{max-height:calc(92vh - 125px);overflow:auto}#glossaryDialog .glossary-entry{grid-template-columns:repeat(5,minmax(0,1fr))}#glossaryDialog .glossary-entry input:nth-child(3){grid-column:auto}#glossaryDialog .glossary-entry button{grid-column:1 / -1;justify-self:start}
.glossary-table:has(th:nth-child(6)){table-layout:auto;min-width:900px}.glossary-table:has(th:nth-child(6)) th{min-width:130px}.glossary-table th:last-child{width:78px!important;min-width:78px!important}
.selection-marquee,.selection-outline{position:absolute;border:2px dashed var(--preset-accent);background:color-mix(in srgb,var(--preset-accent) 7%,transparent);pointer-events:none;z-index:6;box-sizing:border-box}.selection-outline{border-width:2px;background:transparent}.box.group-selected{border-color:var(--preset-accent)!important;background:color-mix(in srgb,var(--preset-accent) 16%,transparent)!important;z-index:3}.box.outline-hidden.group-selected{border-color:var(--preset-accent)!important;background:color-mix(in srgb,var(--preset-accent) 9%,transparent)!important}.selection-tools{position:absolute;display:flex;flex-direction:column;gap:5px;z-index:8}.selection-tools button{width:34px;height:34px;border:2px solid var(--preset-accent);border-radius:5px;background:#fff;color:var(--preset-accent);font-size:22px;line-height:1;box-shadow:0 2px 5px #0002;cursor:pointer}.selection-tools button:hover{background:var(--preset-accent-soft)}
.selection-marquee[data-side]::after{content:attr(data-side);position:absolute;left:0;bottom:calc(100% + 4px);padding:3px 7px;border-radius:5px;background:var(--preset-accent-hover);color:var(--preset-on-accent);font-size:11px;white-space:nowrap}
button svg{width:18px;height:18px;display:inline-block;vertical-align:middle;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.rail button svg{width:20px;height:20px}.translation-actions button svg,.format-tools button svg,.page-controls button svg,.zoom-controls button svg{width:17px;height:17px}.rail button,.translation-actions button{display:inline-grid;place-items:center}.format-tools #formatBold{font-weight:700}.format-tools #formatItalic{font-style:italic}.format-tools #formatUnderline{text-decoration:underline}.workspace[hidden],.translations[hidden],.column-resize[hidden],.text-context-menu[hidden]{display:none!important}
.text-context-menu{position:fixed;z-index:1000;min-width:230px;max-height:min(75vh,620px);overflow:auto;padding:5px;background:#fff;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 5%,var(--preset-border));border-radius:8px;box-shadow:0 12px 36px #0003}.text-context-menu button{display:flex;justify-content:space-between;gap:18px;width:100%;text-align:left;padding:8px 10px;border:0;border-radius:4px;background:transparent;color:color-mix(in srgb,var(--preset-ink) 87%,var(--preset-editor-muted));font-size:13px;cursor:pointer}.text-context-menu button:hover,.text-context-menu button:focus-visible{background:var(--preset-accent-soft);outline:none}.text-context-menu button:disabled{color:color-mix(in srgb,var(--preset-editor-muted) 52%,var(--preset-border));cursor:default}.text-context-menu button span{color:color-mix(in srgb,var(--preset-editor-muted) 68%,var(--preset-border));white-space:nowrap}.text-context-menu hr{border:0;border-top:1px solid color-mix(in srgb,var(--preset-border) 38%,var(--preset-bg));margin:5px 2px}
.brand img{display:block;max-width:100%;max-height:56px;width:auto;height:auto;object-fit:contain}.brand{justify-content:center;padding:3px 14px}
.box-create-preview{position:absolute;z-index:7;pointer-events:none;border:1px dashed var(--box-line-color);background:color-mix(in srgb,var(--box-line-color) 12%,transparent);box-shadow:0 0 0 1px #fff8}
.box-create-preview[data-side]::after{content:attr(data-side);position:absolute;left:0;bottom:calc(100% + 4px);padding:3px 7px;border-radius:5px;background:var(--preset-accent-hover);color:var(--preset-on-accent);font-size:11px;white-space:nowrap;box-shadow:0 1px 4px #0002}
.box.selected-box{border:1px dashed var(--box-line-color);background:color-mix(in srgb,var(--box-line-color) 8%,transparent);z-index:5}
.box-grip{position:absolute;z-index:7;width:12px;height:12px;border:1px solid #fff;border-radius:50%;background:var(--box-line-color);box-shadow:0 0 0 1px var(--box-line-color);touch-action:none}
.grip-nw{left:0;top:0;transform:translate(-50%,-50%);cursor:nwse-resize}.grip-n{left:50%;top:0;transform:translate(-50%,-50%);cursor:ns-resize}.grip-ne{right:0;top:0;transform:translate(50%,-50%);cursor:nesw-resize}
.grip-e{right:0;top:50%;transform:translate(50%,-50%);cursor:ew-resize}.grip-se{right:0;bottom:0;transform:translate(50%,50%);cursor:nwse-resize}.grip-s{left:50%;bottom:0;transform:translate(-50%,50%);cursor:ns-resize}
.grip-sw{left:0;bottom:0;transform:translate(-50%,50%);cursor:nesw-resize}.grip-w{left:0;top:50%;transform:translate(-50%,-50%);cursor:ew-resize}
.brand{gap:9px;justify-content:flex-start;font-family:var(--font-interface);letter-spacing:-1px}.brand img{width:54px;max-height:54px;flex:none}.brand strong{font-size:17px;line-height:1;white-space:nowrap;letter-spacing:-.7px}.brand strong span{color:var(--preset-accent);letter-spacing:-.7px}.empty-mark img{display:block;width:min(270px,60vw);height:auto;margin:0 auto 18px}.empty-mark{letter-spacing:normal}
@media(max-width:1100px){.brand{gap:5px;padding-inline:8px}.brand img{width:44px}.brand strong{font-size:15px}}@media(max-width:880px){.brand img{width:36px}.brand strong{font-size:12px}}
.line-actions .line-delete{margin-left:auto;padding:2px 4px;color:color-mix(in srgb,var(--preset-ink) 0%,var(--preset-editor-muted))}.line-actions .line-delete:hover{color:#b43b3b;background:#fff0f0}.line-delete svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.brand{justify-content:center;padding-inline:12px}.brand img{display:block;width:100%;max-width:225px;max-height:60px;height:auto;object-fit:contain}@media(max-width:1100px){.brand img{width:100%;max-width:190px}}@media(max-width:880px){.brand img{width:100%;max-width:145px}}
.translation-list .line{position:relative;transition:background-color .15s,box-shadow .15s}.translation-list .line.line-placeholder{opacity:.22;background:var(--preset-accent-soft);box-shadow:none;pointer-events:none}.line-drag-ghost{position:fixed!important;z-index:1100;pointer-events:none;opacity:.98;background:#fff!important;border:2px solid var(--preset-accent)!important;box-shadow:0 12px 28px #0003!important;transform:none!important;overflow:hidden}.translation-list .drag-grip{touch-action:none;cursor:grab}.line-drag-ghost .drag-grip{cursor:grabbing}



.viewer-marquee{position:fixed;z-index:1001}.viewer{user-select:none}.viewer canvas,.viewer .box{user-select:none}

.translation-header{gap:8px}.translation-actions{align-items:center;gap:2px;flex:none}.translation-actions button{width:31px;height:31px;min-width:31px;padding:5px;color:color-mix(in srgb,var(--preset-ink) 15%,var(--preset-editor-muted))}.translation-actions button svg{width:18px;height:18px}.translation-actions button.selected{background:color-mix(in srgb,var(--preset-border) 29%,var(--preset-bg));color:var(--preset-accent)}.translation-tools{min-height:34px;gap:7px}.translation-tools .font-control{margin-left:0;margin-right:4px}.line-actions{align-items:center;gap:3px}.line-actions button.line-format{width:27px;min-height:27px;padding:3px;font-size:14px}.line-actions .line-format-bold{font-weight:700}.line-actions .line-format-italic{font-style:italic}.line-actions .line-format-underline{text-decoration:underline}.line-actions button.line-annotation{width:29px;height:27px;padding:3px;display:inline-grid;place-items:center}.line-annotation svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.translation-actions button svg,.line-actions button svg,.rail button svg{transition:transform .18s ease,stroke .18s ease}.translation-actions button:hover svg,.line-actions button:hover svg,.rail button:hover svg{transform:translateY(-2px)}.translation-actions button:active svg,.line-actions button:active svg,.rail button:active svg{transform:scale(.9)}@media(prefers-reduced-motion:reduce){.translation-actions button svg,.line-actions button svg,.rail button svg{transition:none}.translation-actions button:hover svg,.line-actions button:hover svg,.rail button:hover svg{transform:none}}
/* Serien-Dashboard */
body.hub-mode > main,body.hub-mode > .statusbar{display:none!important}
.hub[hidden]{display:none!important}.hub{position:fixed;inset:0;z-index:100;background:var(--preset-bg);color:var(--preset-ink);display:grid;grid-template-columns:248px minmax(0,1fr);font:15px/1.45 var(--font-interface);overflow:hidden}
.hub *{box-sizing:border-box}.hub button{font:inherit;cursor:pointer}.hub button:disabled{opacity:.45;cursor:default}.hub-sidebar{border-right:1px solid var(--preset-border);display:flex;flex-direction:column}.hub-logo{height:72px;border-bottom:1px solid var(--preset-border);padding:18px 20px}.hub-logo img{width:190px;max-height:38px;object-fit:contain;object-position:left center}.hub-sidebar nav{padding:18px 13px;display:grid;gap:5px}.hub-sidebar nav button,.project-tree button{border:0;background:none;text-align:left;border-radius:6px;padding:12px 14px;color:color-mix(in srgb,var(--preset-ink) 89%,var(--preset-editor-muted))}.hub-sidebar nav button:hover,.hub-sidebar nav button.active,.project-tree button.active,.project-tree button:hover{background:color-mix(in srgb,var(--preset-border) 62%,var(--preset-bg));color:var(--preset-accent-strong)}.hub-sidebar-foot{margin-top:auto;padding:20px;color:color-mix(in srgb,var(--preset-ink) 43%,var(--preset-editor-muted))}.hub-sidebar-foot small{color:color-mix(in srgb,var(--preset-editor-muted) 74%,var(--preset-border))}.hub-content{overflow:auto;padding:42px clamp(22px,4vw,76px)}.hub-page{max-width:1480px;margin:auto}.hub-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px}.hub-heading h1{font-size:32px;font-weight:400;margin:0}.hub-heading-actions,.hub-card-head>div,.project-section-head>div{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.hub-heading button,.hub-card-head button,.project-toolbar button,.project-section-head button,.hub-dialog button{background:#fff;border:1px solid var(--preset-border);border-radius:9px;padding:9px 14px;color:color-mix(in srgb,var(--preset-ink) 87%,var(--preset-editor-muted))}.hub button:hover:not(:disabled){border-color:var(--preset-accent);color:var(--preset-accent-strong)}.hub-primary,.hub-dialog button.hub-primary{background:var(--preset-accent);color:var(--preset-on-accent);border-color:var(--preset-accent)}.hub-layout{display:grid;grid-template-columns:minmax(550px,1fr) 290px;gap:18px}.hub-card,.hub-projects{border:1px solid var(--preset-border);border-radius:23px;background:var(--preset-bg);box-shadow:0 1px 3px #0000000b;padding:22px}.hub-card h2{font:italic 31px var(--heading-secondary-font);color:color-mix(in srgb,var(--preset-ink) 83%,var(--preset-editor-muted));margin:0 0 17px}.hub-card-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.hub-card-head span{font-size:14px;min-width:165px;text-align:center}.hub-card-head button{padding:5px 10px}.calendar-days{display:grid;grid-template-columns:repeat(7,1fr);text-align:center;color:color-mix(in srgb,var(--preset-editor-muted) 68%,var(--preset-border));font-size:12px;text-transform:uppercase;margin:6px 0 10px}.calendar-weeks{display:grid;gap:9px}.calendar-week{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));background:#fff;border-radius:17px;overflow:hidden;min-height:148px}.calendar-day{position:relative;min-width:0;border-right:1px solid color-mix(in srgb,var(--preset-border) 38%,var(--preset-bg));padding:9px 5px 28px;display:flex;flex-direction:column;gap:3px}.calendar-day:last-child{border:0}.day-top{display:flex;justify-content:space-between;align-items:center;color:color-mix(in srgb,var(--preset-ink) 0%,var(--preset-editor-muted));font-size:12px;padding:0 4px}.day-top span{font:italic 15px var(--heading-secondary-font);color:color-mix(in srgb,var(--preset-ink) 88%,var(--preset-editor-muted))}.day-top b{font-weight:400;border:1px solid transparent;border-radius:20px;min-width:27px;text-align:center}.calendar-day.today .day-top b{border-color:#795eab;color:#6344a7;font-weight:bold}.hub .event{border:0;border-radius:4px;background:var(--preset-accent-soft);color:var(--preset-accent-strong);text-align:left;font-size:11px;padding:4px 5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hub .event.deadline{background:color-mix(in srgb,var(--preset-accent) 45%,var(--preset-dialog));color:#fff}.hub .event.done{text-decoration:line-through;opacity:.55}.hub .day-add{position:absolute;bottom:5px;left:6px;border:1px solid color-mix(in srgb,var(--preset-border) 38%,var(--preset-bg));border-radius:50%;background:color-mix(in srgb,var(--preset-bg) 52%,var(--preset-dialog));width:22px;height:22px;line-height:18px;padding:0;opacity:0}.calendar-day:hover .day-add{opacity:1}.hub-side{display:grid;align-content:start;gap:17px}.hub-side .hub-card{min-height:210px}.ongoing,.upcoming{position:relative;width:100%;border:0;border-radius:10px;background:#fff;text-align:left;padding:12px 30px 12px 12px;margin:3px 0;display:grid;gap:2px}.ongoing strong{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ongoing small,.upcoming small{color:color-mix(in srgb,var(--preset-editor-muted) 85%,var(--preset-border))}.ongoing span{position:absolute;right:10px;top:18px}.hub-empty{color:color-mix(in srgb,var(--preset-editor-muted) 74%,var(--preset-border));margin:18px 8px}.hub-projects{padding:0;display:grid;grid-template-columns:245px minmax(0,1fr);min-height:620px;overflow:hidden}.project-tree{border-right:1px solid var(--preset-border);padding:18px 14px}.project-tree h3{font-size:14px;margin:4px 12px 14px}.project-tree button{display:block;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.project-main{padding:16px 22px}.project-toolbar{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:14px}.project-toolbar h2{margin:6px 0;font-size:24px;font-weight:500}.project-toolbar p{margin:0;color:color-mix(in srgb,var(--preset-editor-muted) 86%,var(--preset-border))}.project-toolbar input{border:1px solid color-mix(in srgb,var(--preset-editor-muted) 5%,var(--preset-border));border-radius:7px;background:#fff;padding:10px}.project-table{border:1px solid var(--preset-border);border-radius:10px;overflow:hidden;background:white;min-height:220px}.project-row{display:grid;grid-template-columns:2fr 1fr .5fr 1fr;gap:12px;width:100%;text-align:left;align-items:center;border:0;border-bottom:1px solid color-mix(in srgb,var(--preset-border) 38%,var(--preset-bg));background:white;padding:16px 18px;color:color-mix(in srgb,var(--preset-ink) 49%,var(--preset-editor-muted))}.project-row:last-child{border-bottom:0}.project-row strong{font-weight:500;color:color-mix(in srgb,var(--preset-ink) 86%,var(--preset-editor-muted))}.project-label{color:color-mix(in srgb,var(--preset-editor-muted) 76%,var(--preset-border));pointer-events:none}.volume-row{grid-template-columns:2fr 1fr 1fr}.project-section-head{display:flex;justify-content:space-between;align-items:center;margin:25px 0 12px}.project-section-head h3{font-size:20px;font-weight:500;margin:0}.project-task{background:white;border:1px solid color-mix(in srgb,var(--preset-border) 76%,var(--preset-bg));display:flex;align-items:center;gap:13px;padding:12px;border-radius:8px;margin-bottom:7px}.project-task input{accent-color:var(--preset-accent)}.project-task small{margin-left:auto;color:color-mix(in srgb,var(--preset-editor-muted) 85%,var(--preset-border))}.project-task button{border:0;background:none;color:color-mix(in srgb,var(--preset-editor-muted) 68%,var(--preset-border));font-size:21px}.task-done{text-decoration:line-through;color:color-mix(in srgb,var(--preset-editor-muted) 68%,var(--preset-border))}.hub-dialog{border:1px solid color-mix(in srgb,var(--preset-editor-muted) 5%,var(--preset-border));border-radius:16px;box-shadow:0 20px 70px #0004;width:min(440px,calc(100vw - 30px));padding:25px}.hub-dialog::backdrop{background:#2228}.hub-dialog h2{font-size:22px;font-weight:500;margin:0 0 20px}.hub-dialog label{display:grid;gap:6px;margin:12px 0;color:color-mix(in srgb,var(--preset-ink) 35%,var(--preset-editor-muted))}.hub-dialog input,.hub-dialog select{width:100%;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 10%,var(--preset-border));border-radius:7px;padding:10px;font:inherit}.hub-dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:24px}
@media(max-width:1050px){.hub{grid-template-columns:175px 1fr}.hub-layout{grid-template-columns:1fr}.hub-side{grid-template-columns:1fr 1fr}.hub-projects{grid-template-columns:180px 1fr}}@media(max-width:700px){.hub{grid-template-columns:1fr;grid-template-rows:68px 1fr}.hub-sidebar{flex-direction:row;align-items:center}.hub-logo{height:auto;border:0;padding:9px;width:130px}.hub-logo img{width:115px}.hub-sidebar nav{display:flex;padding:4px}.hub-sidebar-foot{display:none}.hub-content{padding:18px}.hub-heading{display:block}.hub-heading h1{margin-bottom:12px}.hub-layout{display:block}.hub-side{display:grid;grid-template-columns:1fr;margin-top:14px}.calendar-card{overflow-x:auto}.calendar-days,.calendar-week{min-width:560px}.hub-projects{display:block}.project-tree{border-right:0;border-bottom:1px solid color-mix(in srgb,var(--preset-editor-muted) 5%,var(--preset-border))}.project-main{padding:14px}.project-row{font-size:12px;padding:12px 5px}}
.hub .volume-row{grid-template-columns:minmax(140px,2fr) minmax(110px,1fr) minmax(95px,1fr) minmax(170px,1.4fr)}.hub .volume-actions{display:flex;gap:6px;flex-wrap:wrap}.hub .volume-actions button{border:1px solid color-mix(in srgb,var(--preset-editor-muted) 2%,var(--preset-border));background:#fff;border-radius:7px;padding:6px 8px;font-size:13px}.hub .project-row:not(button):hover{background:#fff}
.hub .volume-progress{width:100%;height:6px;background:color-mix(in srgb,var(--preset-border) 57%,var(--preset-bg));border-radius:10px;overflow:hidden;margin:7px 0 3px}.hub .volume-progress span{display:block;height:100%;background:#7657b7;border-radius:inherit}.hub .ongoing .volume-progress{margin-right:15px}.hub .ongoing small{font-size:12px}.hub .volume-status{display:block;font-weight:400;color:color-mix(in srgb,var(--preset-editor-muted) 88%,var(--preset-border));margin-top:5px}.hub .hub-check{display:flex;align-items:center;gap:8px}.hub .hub-check input{width:auto;accent-color:var(--preset-accent)}
.hub .ongoing .volume-progress span{position:static;right:auto;top:auto;max-width:100%;height:100%;border-radius:inherit}.hub .ongoing>span{position:absolute;right:10px;top:18px}
.hub .hub-notice{margin:-10px 0 16px;padding:11px 14px;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 3%,var(--preset-border));border-radius:9px;background:#f0ebfa;color:var(--preset-accent-strong)}.hub .hub-heading-actions{justify-content:flex-end}
.hub .series-actions{display:flex;gap:8px;flex-wrap:wrap}.hub #hubDeleteSeries{color:#a13f4a}.hub #hubDeleteSeries:hover{border-color:#a13f4a;color:#8c2835}
.hub-processing{opacity:.46;filter:grayscale(.45);pointer-events:none}
.hub-batch-fields{border:1px solid color-mix(in srgb,var(--preset-editor-muted) 2%,var(--preset-border));border-radius:10px;margin:12px 0;padding:12px}
.hub-batch-fields legend{font-weight:600;padding:0 6px}
.hub .series-glossary-import p{margin:0 0 9px;color:var(--preset-editor-muted)}.hub .series-glossary-import small{display:block;margin-top:8px;color:color-mix(in srgb,var(--preset-editor-muted) 91%,var(--preset-border))}
.hub-batch-fields label{display:flex;align-items:center;gap:9px;margin:8px 0}
.hub-batch-fields input{width:auto!important;margin:0}
.hub-batch-fields label:not(:has(input[type=checkbox])){display:grid;gap:5px}
.hub-batch-fields input:not([type=checkbox]){width:100%!important;min-width:0}

/* Shared editor/dashboard navigation and open volume tabs. */
:root{--brand-field-width:268px}
.topbar{position:relative;z-index:120}
.brand{width:var(--brand-field-width);appearance:none;cursor:pointer;border:0;border-right:1px solid var(--preset-border);background:transparent;text-align:left}
.brand:focus-visible{outline:2px solid var(--preset-accent);outline-offset:-3px}
.topbar{min-width:0}
.open-project-tabs{display:flex;align-items:stretch;gap:4px;min-width:0;flex:1;overflow-x:auto;overflow-y:hidden;padding:6px 8px 0;scrollbar-width:thin}
.open-project-tabs:empty{display:none}
.open-project-tab{position:relative;display:flex;align-items:stretch;flex:0 1 190px;min-width:125px;max-width:230px;height:58px;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 3%,var(--preset-border));border-bottom-color:color-mix(in srgb,var(--preset-editor-muted) 9%,var(--preset-border));border-radius:8px 8px 0 0;background:color-mix(in srgb,var(--preset-border) 26%,var(--preset-bg));color:color-mix(in srgb,var(--preset-ink) 48%,var(--preset-editor-muted))}
.open-project-tab[aria-selected=true]{border-color:color-mix(in srgb,var(--preset-editor-muted) 8%,var(--preset-border));border-bottom-color:#fff;background:#fff;color:color-mix(in srgb,var(--preset-ink) 83%,var(--preset-editor-muted));box-shadow:0 -2px 0 var(--preset-accent) inset}
.open-project-tab-main{display:flex;flex:1;min-width:0;flex-direction:column;justify-content:center;align-items:flex-start;gap:2px;padding:5px 30px 5px 11px;border:0;background:transparent;text-align:left;overflow:hidden}
.open-project-tab-main strong{max-width:100%;font-size:12px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.open-project-tab-main small{font-size:11px;color:color-mix(in srgb,var(--preset-editor-muted) 90%,var(--preset-border));white-space:nowrap}
.open-project-tab-close{position:absolute;top:4px;right:5px;width:22px;height:22px;display:grid;place-items:center;border:0;border-radius:5px;background:transparent;color:color-mix(in srgb,var(--preset-editor-muted) 84%,var(--preset-border));font-size:17px;line-height:1}
.open-project-tab-close:hover{background:color-mix(in srgb,var(--preset-border) 36%,var(--preset-bg));color:var(--preset-accent-strong)}
.translation-menu{flex:none}
.translation-menu summary{padding:8px 10px;font-size:14px;font-weight:500}
.translation-menu .dropdown{top:38px;left:0}
.hub .hub-notice{display:flex;align-items:center;justify-content:space-between;gap:16px}
.hub .hub-notice #retryVolumeOpen{flex:none;padding:9px 14px;border:1px solid var(--preset-accent);border-radius:9px;background:var(--preset-accent);color:var(--preset-on-accent);font:inherit;font-weight:500;box-shadow:0 1px 2px #30224722;transition:background .16s ease,transform .16s ease}
.hub .hub-notice #retryVolumeOpen:hover{background:var(--preset-accent-hover);color:var(--preset-on-accent);border-color:var(--preset-accent-strong);transform:translateY(-1px)}
body.hub-mode main,body.hub-mode .statusbar{display:none!important}
body.hub-mode .top-actions{display:none}
body.hub-mode .hub{position:fixed;inset:70px 0 0;grid-template-columns:var(--brand-field-width) minmax(0,1fr);grid-template-rows:minmax(0,1fr);height:auto}
body.hub-mode .hub-sidebar{border-right:1px solid var(--preset-border)}
body.hub-mode .hub-sidebar nav{padding-top:18px}
body.hub-mode .hub-logo{display:none}
@media(max-width:1100px){:root{--brand-field-width:235px}.open-project-tabs{padding-inline:4px}.open-project-tab{flex-basis:155px;min-width:115px}.open-project-tab-main{padding-left:8px}}
@media(max-width:900px){
  .topbar{height:58px}
  :root{--brand-field-width:154px}
  .brand{width:var(--brand-field-width);min-width:var(--brand-field-width);padding:6px 8px}
  .brand img{max-width:138px}
  .menubar{padding-left:4px}
  .open-project-tabs{padding-top:4px}
  .open-project-tab{height:49px;flex-basis:140px}
  body.hub-mode .hub{inset:58px 0 0;grid-template-columns:var(--brand-field-width) minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
  body.hub-mode .hub-sidebar nav{padding:12px 8px}
  body.hub-mode .hub-sidebar nav button{padding:10px 8px;font-size:13px}
  body.hub-mode .hub-sidebar-foot{padding:12px}
}

/* Narrow editor: keep the PDF and translation list usable without a page-wide scrollbar. */
@media(max-width:900px){
  body{min-width:0}
  .topbar{height:58px;min-width:0}
  .brand{width:154px;min-width:154px;padding:6px 8px}
  .brand img{max-width:138px}
  .menubar{min-width:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;white-space:nowrap;padding-left:4px}
  .menu{flex:none}.menu summary,.menu-link{padding:10px 8px}
  .dropdown{position:fixed;top:56px;left:auto;max-height:calc(100dvh - 80px);overflow:auto}
  main{height:calc(100dvh - 106px);min-height:400px;grid-template-columns:48px minmax(0,1fr)!important;grid-template-rows:minmax(180px,52%) minmax(170px,1fr)}
  .rail{grid-column:1;grid-row:1/3;overflow-y:auto;padding:8px 3px;gap:5px}
  .rail button{width:38px;height:38px;flex:none}
  .rail-bottom{margin-top:auto}
  .workspace{grid-column:2;grid-row:1;overflow:hidden}
  main:has(.translations[hidden]) .workspace{grid-row:1/3}
  .viewer{padding:8px 10px 20px}
  .column-resize{display:none!important}
  .translations{grid-column:2;grid-row:2;border-left:0;border-top:1px solid color-mix(in srgb,var(--preset-editor-muted) 3%,var(--preset-border));overflow:hidden}
  main:has(.workspace[hidden]) .translations{grid-row:1/3}
  .translation-header{height:auto;min-height:42px;flex-wrap:wrap;padding:5px 10px}
  .translation-header .side-switch{margin-left:4px;margin-right:auto}
  .translation-actions{margin-left:auto}
  .translation-list{padding:12px 12px 48px}
  .statusbar{height:48px;display:flex;gap:12px;overflow-x:auto;scrollbar-width:thin;white-space:nowrap}
  .project-info{min-width:150px;max-width:35vw;flex:none}
  .page-controls,.zoom-controls{flex:none}
  dialog{min-width:0;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow:auto}
}
@media(max-width:560px){
  .brand{width:108px;min-width:108px;padding:5px}
  .brand img{max-width:100px}
  main{height:calc(100dvh - 102px);grid-template-rows:minmax(170px,48%) minmax(210px,1fr)}
  .translation-header .side-switch{order:3;width:100%;margin:4px 0 0}
  .translation-header .side-switch button{flex:1}
  .translation-actions{gap:0}
  .translation-actions button{width:29px;min-width:29px}
  .translation-tools{padding:5px;gap:2px}
  .translation-tools button{padding:4px 5px}
  .line{padding-inline:5px}
  .statusbar{padding-inline:6px}
}

/* Dashboard: allow series, cards and dialogs to shrink with the viewport. */
@media(max-width:1050px){
  .hub-content,.hub-page,.hub-projects,.project-main,.hub-layout,.hub-side,.hub-card{min-width:0}
  .hub-heading{flex-wrap:wrap}
  .hub-heading-actions{justify-content:flex-start!important}
  .hub-card-head{flex-wrap:wrap}
  .calendar-card{overflow-x:auto}
  .calendar-days,.calendar-week{min-width:560px}
  .project-label{display:none}
  .project-row,.hub .volume-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:12px;min-width:0}
  .project-row strong{grid-column:1/-1;overflow-wrap:anywhere}
  .project-row>span{min-width:0;overflow-wrap:anywhere}
  .hub .volume-actions{grid-column:1/-1}
}
@media(max-width:700px){
  .hub{grid-template-rows:auto minmax(0,1fr)}
  .hub-sidebar{min-width:0;flex-wrap:wrap;border-right:0;border-bottom:1px solid var(--preset-border)}
  .hub-sidebar nav{min-width:0;flex-wrap:wrap}
  .hub-sidebar nav button{padding:9px}
  .hub-content{padding:14px 10px}
  .hub-heading h1{font-size:25px}
  .hub-heading-actions{gap:5px}
  .hub-heading button,.project-section-head button{padding:7px 9px}
  .hub-card{padding:14px;border-radius:16px}
  .hub-card h2{font-size:25px}
  .calendar-card{overflow-x:auto}
  .calendar-days,.calendar-week{min-width:560px}
  .calendar-day .day-add{opacity:1}
  .hub-projects{min-height:0}
  .project-tree{display:flex;align-items:center;gap:5px;overflow-x:auto;padding:8px}
  .project-tree h3{display:none}
  .project-tree button{width:auto;flex:none;max-width:180px;padding:8px}
  .project-main{padding:12px}
  .project-toolbar,.project-section-head{align-items:flex-start;flex-wrap:wrap;gap:9px}
  .project-toolbar input{max-width:100%}
  .project-label{display:none}
  .project-row,.hub .volume-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:12px;font-size:13px;min-width:0}
  .project-row strong{grid-column:1/-1;overflow-wrap:anywhere}
  .project-row>span{min-width:0;overflow-wrap:anywhere}
  .hub .volume-actions{grid-column:1/-1}
  .project-task{flex-wrap:wrap}
  .project-task small{margin-left:0}
  .hub-dialog{max-height:calc(100dvh - 24px);overflow:auto;padding:18px}
}
@media(max-width:420px){
  .hub-logo{width:105px;padding:7px}.hub-logo img{width:96px}
  .hub-sidebar nav button{font-size:13px;padding:7px}
  .hub-card-head span{min-width:0}
  .project-row,.hub .volume-row{grid-template-columns:1fr}
  .project-row strong,.hub .volume-actions{grid-column:1}
}

.volume-wizard{width:min(1160px,calc(100vw - 36px));height:min(790px,calc(100dvh - 36px));max-width:none;max-height:none;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 7%,var(--preset-border));border-radius:15px;padding:0;overflow:hidden;box-shadow:0 24px 75px #18132755;color:color-mix(in srgb,var(--preset-ink) 92%,#000)}
.volume-wizard::backdrop{background:#17141a8a}
.volume-wizard .wizard-step{width:100%;border:0;background:transparent;text-align:left;cursor:pointer;color:inherit;font:inherit}.volume-wizard .wizard-step:disabled{cursor:default}.volume-wizard .wizard-step.active{color:white}.volume-wizard .wizard-delete{margin:auto 0 18px;padding:12px 15px;border:1px solid #ffd4d4;border-radius:9px;background:#fff1f1;color:#a3322b;cursor:pointer;font:inherit;text-align:left}.volume-wizard .wizard-delete:hover{background:#ffe1e1}
.wizard-shell{height:100%;display:grid;grid-template-columns:265px minmax(0,1fr)}
.wizard-steps{background:linear-gradient(165deg,color-mix(in srgb,var(--theme-accent) 82%,white) 0%,var(--theme-accent) 55%,color-mix(in srgb,var(--theme-accent) 42%,black) 100%);color:#fff;padding:42px 26px 24px;display:flex;flex-direction:column;justify-content:space-between}
.wizard-steps-list{display:grid;gap:24px}.wizard-step{display:flex;align-items:center;gap:13px;opacity:.5;font-weight:600;font-size:15px}.wizard-step.active,.wizard-step.done{opacity:1}.wizard-step span{width:36px;height:36px;flex:none;border:1px solid #fff9;border-radius:50%;display:grid;place-items:center}.wizard-step.active span{background:#fff;color:#493bad;border-color:#fff}.wizard-steps img{width:180px;max-width:100%;filter:brightness(0) invert(1)}
.wizard-manual-labels{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 12px;padding:10px 12px;margin:8px 0;border:1px solid color-mix(in srgb,var(--preset-border) 88%,var(--preset-bg));border-radius:9px;background:color-mix(in srgb,var(--preset-bg) 79%,var(--preset-dialog))}.wizard-manual-labels strong,.wizard-manual-labels small{grid-column:1/-1}.wizard-manual-labels strong{font-size:13px}.wizard-manual-labels small{color:color-mix(in srgb,var(--preset-ink) 0%,var(--preset-editor-muted))}.wizard-manual-labels label{min-width:0}
.wizard-main{display:flex;flex-direction:column;min-width:0;min-height:0;position:relative;background:color-mix(in srgb,var(--preset-bg) 52%,var(--preset-dialog))}.wizard-close{position:absolute;top:14px;right:17px;font-size:26px!important;background:none!important;border:0!important;z-index:2;color:color-mix(in srgb,var(--preset-ink) 0%,var(--preset-editor-muted))!important;line-height:1;padding:4px!important}
.wizard-body{padding:42px 48px 12px;overflow:auto;flex:1;min-height:0}.wizard-body h2{font-size:30px;font-weight:400;margin:0 0 5px}.wizard-body>p{color:color-mix(in srgb,var(--preset-ink) 0%,var(--preset-editor-muted));margin:0 0 24px;line-height:1.5}.wizard-body label{display:grid;gap:6px;margin:14px 0;color:color-mix(in srgb,var(--preset-ink) 39%,var(--preset-editor-muted))}.wizard-body input:not([type=checkbox]):not([type=range]),.wizard-body select{width:100%;padding:11px;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 7%,var(--preset-border));border-radius:7px;background:#fff;color:var(--preset-ink);font:inherit;min-width:0}.wizard-body input[type=checkbox]{accent-color:var(--preset-accent);width:18px;height:18px;margin:0}.wizard-body .wizard-toggle{display:flex;align-items:center;gap:10px;color:color-mix(in srgb,var(--preset-ink) 88%,var(--preset-editor-muted))}.wizard-body input[type=range]{width:100%;accent-color:var(--preset-accent)}.wizard-error{color:#9c2832!important;background:#fff0f0;padding:10px 12px;border-radius:7px;margin:12px 0!important}
.wizard-footer{border-top:1px solid color-mix(in srgb,var(--preset-border) 60%,var(--preset-bg));display:flex;justify-content:space-between;gap:12px;padding:15px 48px;background:color-mix(in srgb,var(--preset-bg) 52%,var(--preset-dialog))}.wizard-footer button,.wizard-drop button,.wizard-page-nav button{border:1px solid color-mix(in srgb,var(--preset-editor-muted) 5%,var(--preset-border));border-radius:7px;background:white;padding:9px 15px}.wizard-footer .hub-primary{background:var(--preset-accent);color:var(--preset-on-accent);border-color:var(--preset-accent)}.wizard-footer button:disabled{opacity:.5}.wizard-drop{border:2px dashed var(--preset-accent);border-radius:12px;padding:17px;display:flex;align-items:center;flex-wrap:wrap;gap:9px;background:var(--preset-hover)}.wizard-drop.dragging{border-color:var(--preset-accent-strong);background:color-mix(in srgb,var(--preset-border) 47%,var(--preset-bg))}.wizard-drop strong{max-width:100%;overflow-wrap:anywhere;font-weight:600}.wizard-drop span{color:color-mix(in srgb,var(--preset-editor-muted) 87%,var(--preset-border));margin-right:auto}.wizard-drop button{color:var(--preset-accent-strong)}
.wizard-pdf-layout{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(210px,.7fr);gap:17px;margin-top:15px}.wizard-preview{background:color-mix(in srgb,var(--preset-border) 26%,var(--preset-bg));border-radius:10px;min-width:0;padding:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:hidden}.wizard-picture{position:relative;width:fit-content;max-width:100%;max-height:435px;margin:auto}.wizard-picture img{display:block;max-width:100%;max-height:435px;object-fit:contain}.wizard-divider{position:absolute;top:0;bottom:0;width:3px;background:var(--preset-accent);box-shadow:0 0 0 4px color-mix(in srgb,var(--preset-accent) 23%,transparent);transform:translateX(-50%);pointer-events:none}.wizard-divider[hidden]{display:none}.wizard-num{position:absolute;bottom:12px;transform:translateX(-50%);color:#d3362a;-webkit-text-stroke:2px #fff;paint-order:stroke fill;font-size:18px}.wizard-num.left{left:25%}.wizard-num.right{left:75%}.wizard-num.center{left:50%}.wizard-page-nav{width:100%;display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:9px;color:color-mix(in srgb,var(--preset-ink) 9%,var(--preset-editor-muted));text-align:center;font-size:12px}.wizard-page-nav button{padding:4px 11px;font-size:22px}.wizard-pdf-options{background:white;border:1px solid color-mix(in srgb,var(--preset-border) 88%,var(--preset-bg));border-radius:10px;padding:12px;align-self:start}.wizard-pdf-options p,.wizard-pdf-options small{color:color-mix(in srgb,var(--preset-ink) 0%,var(--preset-editor-muted));line-height:1.45}.wizard-processing{display:grid;grid-template-columns:minmax(230px,.75fr) minmax(0,1fr);gap:18px}.wizard-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 12px;align-content:start}.wizard-controls .wizard-toggle{grid-column:1/-1}.wizard-controls label{font-size:13px;margin:7px 0}.wizard-empty{padding:50px 10px;color:color-mix(in srgb,var(--preset-editor-muted) 82%,var(--preset-border));text-align:center}
.wizard-picture:has(.wizard-divider:not([hidden])){cursor:col-resize;touch-action:none}
@media(max-width:900px){.volume-wizard{width:calc(100vw - 18px);height:calc(100dvh - 18px)}.wizard-shell{grid-template-columns:140px minmax(0,1fr)}.wizard-steps{padding:25px 10px}.wizard-step{font-size:12px;gap:6px}.wizard-step span{width:29px;height:29px}.wizard-body{padding:38px 16px 12px}.wizard-footer{padding:12px 16px}.wizard-pdf-layout,.wizard-processing{grid-template-columns:1fr}.wizard-picture,.wizard-picture img{max-height:270px}.wizard-pdf-options{width:100%}}
@media(max-width:560px){.wizard-shell{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr)}.wizard-steps{padding:9px 12px}.wizard-steps-list{display:flex;gap:8px;justify-content:space-between}.wizard-step{font-size:11px}.wizard-step span{width:25px;height:25px}.wizard-steps img{display:none}.wizard-body h2{font-size:23px}.wizard-controls{grid-template-columns:1fr}.wizard-picture,.wizard-picture img{max-height:220px}.wizard-drop{padding:10px}.wizard-footer button{padding:8px 11px}}
.wizard-steps img{filter:none;background:none;border-radius:0;padding:0}
.volume-wizard{--theme-accent:var(--preset-accent)}.volume-wizard .wizard-footer .hub-primary{background:var(--theme-accent);border-color:var(--theme-accent)}.volume-wizard .wizard-step.active span{color:var(--theme-accent)}.volume-wizard .wizard-body input[type=checkbox],.volume-wizard .wizard-body input[type=range]{accent-color:var(--theme-accent)}
.wizard-picture{overflow:hidden}.wizard-picture.cropping{cursor:crosshair!important;touch-action:none}.wizard-crop-box{position:absolute;border:2px dashed var(--theme-accent);box-shadow:0 0 0 100vw #14101a72;pointer-events:none;z-index:3}.wizard-page-tools{display:flex;justify-content:center;flex-wrap:wrap;gap:5px;margin-top:8px}.wizard-page-tools button{padding:5px 8px;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 7%,var(--preset-border));background:#fff;border-radius:6px;font-size:12px}.wizard-page-tools button.active{background:var(--preset-accent-soft);border-color:var(--theme-accent);color:var(--theme-accent)}.wizard-page-tools button:disabled{opacity:.4}.wizard-page-nav span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wizard-sort-list button{max-width:220px}
.wizard-picture .wizard-crop-box{box-shadow:none;border-color:var(--preset-accent)}.wizard-picture .wizard-crop-box.active{border:2px dashed var(--theme-accent);box-shadow:0 0 0 100vw #14101a38;pointer-events:auto;cursor:move;z-index:5}.wizard-picture .wizard-crop-box.whole:not(.active){box-shadow:0 0 0 100vw #14101a38}.wizard-crop-handle{position:absolute;width:11px;height:11px;background:#fff;border:2px solid var(--theme-accent);border-radius:50%;transform:translate(-50%,-50%);pointer-events:auto}.wizard-crop-handle.nw{left:0;top:0;cursor:nwse-resize}.wizard-crop-handle.n{left:50%;top:0;cursor:ns-resize}.wizard-crop-handle.ne{left:100%;top:0;cursor:nesw-resize}.wizard-crop-handle.e{left:100%;top:50%;cursor:ew-resize}.wizard-crop-handle.se{left:100%;top:100%;cursor:nwse-resize}.wizard-crop-handle.s{left:50%;top:100%;cursor:ns-resize}.wizard-crop-handle.sw{left:0;top:100%;cursor:nesw-resize}.wizard-crop-handle.w{left:0;top:50%;cursor:ew-resize}.wizard-crop-hint{display:block;text-align:center;color:#777;margin:6px 0 0;font-size:11px}
.volume-delete-action{margin-top:20px;padding-top:16px;border-top:1px solid color-mix(in srgb,var(--preset-border) 38%,var(--preset-bg))}.danger-button{border:1px solid #c83636!important;color:#b12222!important;background:#fff7f7!important;border-radius:7px;padding:10px 14px}.danger-button:hover:not(:disabled){background:#fee9e9!important;color:#951515!important}.volume-delete-dialog p{line-height:1.5}.volume-delete-dialog .delete-error{color:#9d1d1d;background:#fff0f0;border-radius:6px;padding:9px}.volume-delete-dialog .danger-button:not(:disabled){background:#bc2929!important;color:#fff!important}.volume-delete-dialog .danger-button:disabled{opacity:.45}
.wizard-page-order{margin-top:12px;display:grid;gap:7px}.wizard-page-order strong{font-size:13px;color:color-mix(in srgb,var(--preset-ink) 39%,var(--preset-editor-muted))}.wizard-sort-list{display:flex;gap:6px;overflow:auto;padding:3px 0 7px;scrollbar-width:thin}.wizard-sort-list button{flex:none;max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 8%,var(--preset-border));background:#fff;border-radius:6px;padding:8px;cursor:grab;color:color-mix(in srgb,var(--preset-ink) 56%,var(--preset-editor-muted))}.wizard-sort-list button.current{border-color:var(--preset-accent);background:var(--preset-accent-soft)}.wizard-sort-list button:active{cursor:grabbing}
/* Serien-Templates */
.template-list{border:1px solid color-mix(in srgb,var(--preset-editor-muted) 2%,var(--preset-border));border-radius:16px;background:#fff;overflow:hidden;margin-top:24px}.template-row{display:grid;grid-template-columns:minmax(180px,2fr) 100px 100px minmax(220px,1fr);align-items:center;gap:14px;padding:17px 22px;border-bottom:1px solid color-mix(in srgb,var(--preset-border) 43%,var(--preset-bg))}.template-row:last-child{border-bottom:0}.template-row strong{overflow-wrap:anywhere}.template-row small{font-size:12px;font-weight:400;background:color-mix(in srgb,var(--preset-border) 31%,var(--preset-bg));padding:3px 7px;border-radius:6px}.template-head{background:color-mix(in srgb,var(--preset-bg) 79%,var(--preset-dialog));color:color-mix(in srgb,var(--preset-ink) 13%,var(--preset-editor-muted))}.template-dialog{width:min(1020px,95vw);height:min(760px,92vh);max-height:92vh;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 3%,var(--preset-border));border-radius:18px;padding:0;box-shadow:0 24px 80px #21153155;color:color-mix(in srgb,var(--preset-ink) 93%,#000)}.template-dialog::backdrop{background:#1c172a99}.template-dialog form{height:100%;display:flex;flex-direction:column}.template-dialog header,.template-dialog footer{padding:18px 24px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid color-mix(in srgb,var(--preset-border) 71%,var(--preset-bg))}.template-dialog header h2{margin:0;font-size:23px}.template-dialog header button{border:0;background:transparent;font-size:26px;cursor:pointer}.template-dialog footer{border-top:1px solid color-mix(in srgb,var(--preset-border) 71%,var(--preset-bg));border-bottom:0;justify-content:flex-end;gap:12px}.template-editor{display:grid;grid-template-columns:210px minmax(0,1fr);min-height:0;flex:1}.template-editor nav{border-right:1px solid color-mix(in srgb,var(--preset-border) 71%,var(--preset-bg));padding:20px 12px;display:flex;flex-direction:column;align-items:stretch;gap:5px}.template-editor nav button{padding:13px;text-align:left;background:transparent;border:0;border-radius:8px;cursor:pointer}.template-editor nav button.active{background:color-mix(in srgb,var(--preset-border) 31%,var(--preset-bg));color:#533a91;font-weight:700}.template-body{padding:30px 38px;overflow-y:auto;display:flex;flex-direction:column;gap:14px}.template-body h3{font:italic 30px var(--heading-secondary-font);margin:0}.template-body p{color:color-mix(in srgb,var(--preset-ink) 9%,var(--preset-editor-muted));margin:0 0 8px}.template-body label{display:flex;flex-direction:column;gap:6px;color:color-mix(in srgb,var(--preset-ink) 42%,var(--preset-editor-muted))}.template-body input:not([type=checkbox]){padding:10px 12px;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 9%,var(--preset-border));border-radius:8px;min-height:42px;background:#fff;color:color-mix(in srgb,var(--preset-ink) 90%,#000)}.template-body input[type=color]{width:80px;padding:3px}.template-body .template-check{flex-direction:row;align-items:center;gap:12px}.template-colors,.template-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 24px}@media(max-width:700px){.template-row{grid-template-columns:minmax(0,1fr) auto}.template-head{display:none}.template-editor{grid-template-columns:1fr}.template-editor nav{border-right:0;border-bottom:1px solid color-mix(in srgb,var(--preset-border) 71%,var(--preset-bg));flex-direction:row;overflow-x:auto;padding:8px}.template-editor nav button{white-space:nowrap}.template-body{padding:18px}.template-colors,.template-grid{grid-template-columns:1fr}}
.template-dialog .template-body.has-preview{display:grid;grid-template-columns:minmax(0,1fr) minmax(210px,34%);align-content:start;gap:14px 24px}.template-body.has-preview>h3,.template-body.has-preview>p{grid-column:1}.template-body.has-preview>.template-preview{grid-column:2;grid-row:1 / span 30;align-self:start;position:sticky;top:0}.template-preview{background:#f3f1f5;border:1px solid #e4dfeb;border-radius:12px;padding:18px;min-height:340px;display:flex;flex-direction:column;align-items:center;gap:12px}.template-preview-caption{font-size:13px;color:#625c6c;align-self:stretch}.template-preview small{font-size:11px;color:#77717f;text-align:center}.template-word-page{width:min(100%,230px);height:310px;background:#fff;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 3%,var(--preset-border));box-shadow:0 4px 12px #2b21351c;color:color-mix(in srgb,var(--preset-ink) 92%,var(--preset-editor-muted));overflow:hidden;padding-right:18px;padding-bottom:20px;line-height:1.45}.template-word-page p{font-size:inherit;color:inherit;margin:5px 0 12px;padding-left:8px}.template-manga-page{position:relative;width:min(100%,235px);height:320px;background:#fff;border:7px solid white;box-shadow:0 4px 12px #2b213526;overflow:hidden;filter:grayscale(.25)}.template-panel-art{position:absolute;left:5%;right:5%;border:2px solid color-mix(in srgb,var(--preset-ink) 87%,var(--preset-editor-muted));background:repeating-linear-gradient(135deg,#fff 0 5px,color-mix(in srgb,var(--preset-border) 86%,var(--preset-bg)) 6px 8px,#fff 9px 15px)}.art-top{top:4%;height:43%;clip-path:polygon(0 0,100% 0,85% 100%,0 90%)}.art-bottom{bottom:5%;height:43%;clip-path:polygon(15% 0,100% 10%,100% 100%,0 100%)}.template-box-mark,.template-page-mark{position:absolute;font-weight:800;text-shadow:-1px -1px #fff,1px 1px #fff,-1px 1px #fff,1px -1px #fff}.template-box-mark.first{top:20%;left:42%}.template-box-mark.second{top:62%;right:25%}.template-page-mark{bottom:0;left:50%;transform:translateX(-50%);white-space:nowrap}.template-body .template-switch{appearance:none;width:48px;height:27px;border:0;border-radius:50px;background:color-mix(in srgb,var(--preset-editor-muted) 15%,var(--preset-border));position:relative;cursor:pointer;flex:none;transition:background .2s}.template-body .template-switch::after{content:'';position:absolute;top:3px;left:3px;width:21px;height:21px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0004;transition:transform .2s}.template-body .template-switch:checked{background:var(--preset-accent)}.template-body .template-switch:checked::after{transform:translateX(21px)}.template-body .template-check{justify-content:space-between;padding:8px 0;border-bottom:1px solid color-mix(in srgb,var(--preset-border) 33%,var(--preset-bg))}.template-dialog button,.template-list button{font:inherit}.template-list button,.template-dialog footer button{border:1px solid color-mix(in srgb,var(--preset-editor-muted) 7%,var(--preset-border));background:#fff;color:color-mix(in srgb,var(--preset-ink) 56%,var(--preset-editor-muted));border-radius:9px;padding:9px 15px;cursor:pointer;box-shadow:0 2px 5px #2115310d}.template-dialog .hub-primary,.template-list .hub-primary{background:var(--preset-accent);color:var(--preset-on-accent);border-color:var(--preset-accent)}.template-list button:hover,.template-dialog footer button:hover{border-color:var(--preset-accent);background:var(--preset-hover);color:var(--preset-accent-strong)}.template-dialog footer .hub-primary:hover,.template-list .hub-primary:hover{background:#64469f;color:#fff}.template-editor nav button:hover{background:color-mix(in srgb,var(--preset-border) 16%,var(--preset-bg))}.template-body.has-preview>.template-colors,.template-body.has-preview>.template-grid{grid-column:1;grid-template-columns:repeat(2,minmax(0,1fr))}@media(max-width:780px){.template-dialog .template-body.has-preview{display:flex}.template-body.has-preview>.template-preview{position:static;order:10}.template-body.has-preview>.template-colors,.template-body.has-preview>.template-grid{grid-template-columns:1fr}}
.template-manga-page{filter:none}.template-manga-page img{width:100%;height:100%;display:block}.template-box-mark{width:64px;height:42px;display:grid;place-items:center;line-height:1}.template-box-mark.first{top:7%;left:7%}.template-box-mark.second{top:55%;right:6%}.template-box-mark.with-box{border:2px solid var(--box-color);border-radius:3px}.template-page-mark{bottom:2%;background:#fff9;padding:0 4px}.template-word-page{position:relative;box-sizing:border-box}.template-word-page .word-header,.template-word-page .word-footer{position:absolute;left:12px;right:12px;text-align:center;font-size:8px;color:color-mix(in srgb,var(--preset-ink) 0%,var(--preset-editor-muted))}.template-word-page .word-page-gap{height:15px}
.template-editor nav{overflow-y:auto;min-height:0}.template-body select{padding:10px 12px;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 9%,var(--preset-border));border-radius:8px;min-height:42px;background:#fff;color:color-mix(in srgb,var(--preset-ink) 90%,#000)}.template-word-page .word-comment{display:inline-block;font:8px sans-serif;color:var(--preset-accent);border-left:2px solid var(--preset-accent);padding-left:3px}.template-word-page .word-empty{font-size:9px;color:color-mix(in srgb,var(--preset-ink) 0%,var(--preset-editor-muted));border-top:1px dashed color-mix(in srgb,var(--preset-editor-muted) 21%,var(--preset-border))}.template-word-page strong{font-size:inherit}.template-word-page small{display:block;font-size:8px}
.template-editor{display:flex;flex-direction:column;min-height:0;flex:1}.template-editor nav{border:0;border-bottom:1px solid color-mix(in srgb,var(--preset-border) 71%,var(--preset-bg));padding:14px 22px;display:flex;flex-direction:row;align-items:center;gap:6px;overflow-x:auto;background:#fff}.template-editor nav button{white-space:nowrap;flex:none;padding:10px 15px;border:1px solid transparent;border-radius:999px;background:transparent;color:color-mix(in srgb,var(--preset-ink) 33%,var(--preset-editor-muted))}.template-editor nav button.active{border:2px solid #f39a32;background:#fff;color:color-mix(in srgb,var(--preset-ink) 90%,#000);font-weight:500}.template-body.has-preview{display:grid;grid-template-columns:minmax(0,1fr) minmax(250px,34%);align-content:start;gap:14px 24px}.template-body.has-preview>h3,.template-body.has-preview>p,.template-body.has-preview>.template-subtabs{grid-column:1}.template-body.has-preview>.template-preview{grid-column:2;grid-row:1 / span 40;align-self:start;position:sticky;top:0}.template-body.has-preview>.template-colors,.template-body.has-preview>.template-grid,.template-body.has-preview>.template-controls{grid-column:1}.template-body.has-preview>.template-colors,.template-body.has-preview>.template-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.template-subtabs{display:inline-flex;justify-self:start;align-items:center;gap:3px;padding:4px;border-radius:999px;background:color-mix(in srgb,var(--preset-border) 76%,var(--preset-bg));margin:4px 0 10px;width:max-content}.template-subtabs button{border:2px solid transparent;background:transparent;border-radius:999px;padding:7px 14px;min-height:36px;color:color-mix(in srgb,var(--preset-ink) 35%,var(--preset-editor-muted));cursor:pointer;font:inherit}.template-subtabs button.active,.template-subtabs button[aria-selected=true]{border-color:#f39a32;background:#f7f5f3;color:color-mix(in srgb,var(--preset-ink) 85%,#000)}.template-body h3{text-transform:none}.template-body.has-preview>h3{font:italic 30px var(--heading-secondary-font);text-transform:none}.template-body.has-preview>p{font-size:16px;color:color-mix(in srgb,var(--preset-ink) 84%,var(--preset-editor-muted))}.template-controls{display:flex;flex-direction:column;gap:10px;min-width:0}.template-body .format-switch-row{display:flex;flex-direction:row;justify-content:space-between;align-items:center;gap:18px;padding:9px 0}.format-switch-row>span,.template-choice-row>span{display:flex;flex-direction:column;gap:4px}.format-switch-row strong,.template-choice-row strong{font-size:16px;font-weight:500;color:color-mix(in srgb,var(--preset-ink) 95%,#000)}.format-switch-row small,.template-choice-row small{font-size:14px;color:color-mix(in srgb,var(--preset-ink) 20%,var(--preset-editor-muted))}.template-choice-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:8px 0}.template-choice{display:flex;gap:8px;align-items:center}.template-choice button{min-width:60px;padding:8px 12px;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 5%,var(--preset-border));border-radius:7px;background:white;box-shadow:0 1px 3px #0001;cursor:pointer}.template-choice button.selected{border:2px solid #f3a24c}.template-tag-fields,.template-numbering-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.template-preview{width:100%;box-sizing:border-box;background:#f4f3f3;border:1px solid #dedbdb;border-radius:10px;padding:18px;min-height:300px;display:flex;flex-direction:column;align-items:stretch;gap:12px}.template-preview-caption{font-size:14px;color:#625d5d}.format-preview-list{display:flex;flex-direction:column;gap:12px}.format-preview-list>div{min-height:42px;box-sizing:border-box;background:#fff;border:1px solid #dedede;border-radius:6px;padding:10px 12px;color:#272323;font:16px/1.4 var(--font-word-default),monospace}.format-preview-list b{font-weight:700}.format-preview-list i{font-style:italic}.template-word-page{box-sizing:border-box;align-self:center;max-width:100%;position:relative}.template-word-page p{color:color-mix(in srgb,var(--preset-ink) 91%,#000)}.template-word-page .word-empty{font-size:9px;color:color-mix(in srgb,var(--preset-ink) 44%,var(--preset-editor-muted));border-top:1px dashed color-mix(in srgb,var(--preset-editor-muted) 36%,var(--preset-border))}.template-body .template-switch{appearance:none;width:52px;height:29px;border:0;border-radius:50px;background:color-mix(in srgb,var(--preset-editor-muted) 5%,var(--preset-border));position:relative;cursor:pointer;flex:none;transition:background .2s}.template-body .template-switch::after{content:'';position:absolute;top:3px;left:3px;width:23px;height:23px;border-radius:50%;background:color-mix(in srgb,var(--preset-bg) 52%,var(--preset-dialog));box-shadow:0 1px 4px #0003;transition:transform .2s}.template-body .template-switch:checked{background:#efa956}.template-body .template-switch:checked::after{transform:translateX(23px)}.template-dialog header{border-bottom:0}.template-dialog{width:min(1180px,96vw);height:min(850px,95vh)}@media(max-width:780px){.template-body.has-preview{display:flex}.template-body.has-preview>.template-preview{position:static;order:30}.template-tag-fields,.template-numbering-row{grid-template-columns:1fr}.template-editor nav{padding:8px}.template-body{padding:18px}}
/* Template editor: preserve the project sidebar and palette, with one shared scroll area. */
.template-dialog{--template-accent:var(--preset-accent);--template-accent-strong:var(--preset-accent);--template-accent-soft:var(--preset-accent-soft)}
.template-editor{display:grid;grid-template-columns:236px minmax(0,1fr);grid-template-rows:minmax(0,1fr);min-height:0;flex:1}
.template-editor nav{width:auto;min-height:0;max-height:none;overflow-y:auto;overflow-x:hidden;flex-direction:column;align-items:stretch;gap:3px;padding:18px 12px;border-right:1px solid color-mix(in srgb,var(--preset-border) 71%,var(--preset-bg));border-bottom:0}
.template-editor nav button{width:100%;flex:none;white-space:normal;text-align:left;padding:12px 14px;border:1px solid transparent;border-radius:8px;color:color-mix(in srgb,var(--preset-ink) 87%,var(--preset-editor-muted));background:transparent}
.template-editor nav button.active{border-color:transparent;background:var(--template-accent-soft);color:var(--preset-accent-strong);font-weight:600}
.template-editor nav button:hover{background:var(--preset-hover)}
.template-body{min-width:0;min-height:0;overflow-y:auto;overflow-x:hidden}
.template-body.has-preview{overflow-y:auto;grid-template-columns:minmax(0,1fr) minmax(260px,38%);grid-template-rows:auto;gap:10px 24px}
.template-body.has-preview>.template-preview{position:static;top:auto;grid-column:2;grid-row:1 / span 32;align-self:start}
.template-body .template-switch:checked{background:var(--template-accent)}
.template-subtabs button.active,.template-subtabs button[aria-selected=true]{border-color:var(--template-accent);color:color-mix(in srgb,var(--preset-ink) 95%,#000);background:#f7f5f3}
.template-choice button.selected{border:2px solid var(--template-accent)}
.template-body .format-switch-row,.template-body .template-choice-row{min-height:54px;height:54px;box-sizing:border-box;margin:0;padding:0 2px;display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:15px}
.template-body .format-switch-row>span,.template-body .template-choice-row>span{min-width:0;display:flex;flex-direction:column;justify-content:center;gap:2px}
.template-body .format-switch-row strong,.template-body .template-choice-row strong{font-size:15px;font-weight:500;color:color-mix(in srgb,var(--preset-ink) 95%,#000);line-height:1.2}
.template-body .format-switch-row small,.template-body .template-choice-row small{font-size:13px;color:color-mix(in srgb,var(--preset-ink) 20%,var(--preset-editor-muted));line-height:1.15}
.template-body .format-switch-row input{margin:0 4px 0 10px}
.template-body .template-choice{flex:none}
.template-body .template-choice button{height:38px;min-width:54px;padding:5px 10px}
.template-preview{position:static!important;min-height:0;align-self:start}
.format-preview-list{display:grid;grid-template-rows:repeat(6,54px);gap:0}
.format-preview-list>div{height:54px;min-height:54px;margin:0;display:flex;align-items:center;box-sizing:border-box;padding:8px 12px}
.template-word-page{max-height:390px;overflow:hidden}
.template-dialog .hub-primary,.template-list .hub-primary{background:var(--preset-accent);border-color:var(--preset-accent)}
.template-dialog .hub-primary:hover,.template-list .hub-primary:hover{background:var(--preset-accent);border-color:var(--preset-accent)}
@media(max-width:780px){.template-editor{grid-template-columns:190px minmax(0,1fr)}.template-body.has-preview{grid-template-columns:1fr}.template-body.has-preview>.template-preview{grid-column:1;grid-row:auto;position:static;order:30}.template-body .format-switch-row,.template-body .template-choice-row{height:auto;min-height:54px}.format-preview-list{grid-template-rows:none}.format-preview-list>div{height:auto;min-height:54px}}
.template-manga-page{width:min(100%,220px);height:auto;aspect-ratio:2/3;border:0;filter:none}.template-manga-page img{object-fit:contain}
.template-body.has-preview>.template-preview{grid-row:3 / span 30}
.template-body.formatting-section{row-gap:0}
.template-body.formatting-section>.template-preview{grid-row:3 / span 32;padding-top:54px}
.template-body.formatting-section>.template-preview .template-preview-caption{display:none}
.template-body.formatting-section .format-preview-list{grid-template-rows:repeat(6,54px);gap:0}
.template-body.formatting-section .format-preview-list>div{height:54px;min-height:54px}
.template-body.formatting-section .format-preview-list>div:last-child{white-space:normal}
.template-body.has-preview{grid-template-columns:minmax(0,1fr) minmax(240px,36%)}
.template-body.has-preview>h3,.template-body.has-preview>p,.template-body.has-preview>.template-subtabs,.template-body.has-preview>.template-colors,.template-body.has-preview>.template-grid,.template-body.has-preview>.template-controls,.template-body.has-preview>label,.template-body.has-preview>.template-numbering-row,.template-body.has-preview>.format-bold-group{grid-column:1;min-width:0}
.template-body.has-preview>.template-subtabs{width:max-content;max-width:100%;min-width:0;box-sizing:border-box;overflow-x:auto;justify-self:start}
.template-body.has-preview>.template-subtabs button{flex:none;white-space:nowrap}
.template-body.has-preview>.template-preview,.template-preview,.template-preview .format-preview-list{min-width:0;max-width:100%;box-sizing:border-box}
.template-body.formatting-section>.template-preview{padding-top:82px}
.template-body.formatting-section .format-preview-list{width:100%;grid-template-rows:repeat(5,54px) minmax(54px,auto)}
.template-body.formatting-section .format-preview-list>div{min-width:0;height:54px;overflow-wrap:anywhere}
.template-body.formatting-section .format-preview-list>div:last-child{height:auto;min-height:54px;overflow-wrap:anywhere}
.template-body.formatting-section>.template-preview .template-preview-caption{display:none}
.template-body.formatting-section .format-bold-group{grid-column:1;min-width:0}
.template-body .format-tag-fields[hidden]{display:none!important}
.template-body .template-preview{overflow:hidden}
.template-word-page{display:block;overflow:hidden;overflow-wrap:anywhere}
.template-word-page .word-preview-page-block{display:block;min-width:0;margin:0 0 6px;padding:0 0 5px;border-bottom:1px dashed #d1ccd5}
.template-word-page .word-page-heading{display:block;clear:both;margin:1px 0 3px;font-family:inherit;font-size:9px;font-weight:400;line-height:1.25}
.template-word-page .word-preview-page-block p{margin:2px 0 4px;line-height:1.25;overflow-wrap:anywhere}
.template-word-page .word-comment{display:block;width:max-content;max-width:100%;margin:3px 0 0;overflow-wrap:anywhere}
.template-word-page .word-empty{margin:3px 0 0;padding-top:3px}
.template-word-page .word-translator{font-size:8px;text-align:center;margin-top:3px}
@media(max-width:780px){.template-body.has-preview>.template-subtabs{grid-column:1;overflow-x:auto}.template-body.formatting-section>.template-preview{grid-row:auto;padding-top:18px}.template-body.formatting-section>.template-preview .template-preview-caption{display:block}.template-body.formatting-section .format-preview-list{grid-template-rows:repeat(6,minmax(54px,auto))}.template-body.formatting-section .format-preview-list>div,.template-body.formatting-section .format-preview-list>div:last-child{height:auto;min-height:54px}}
.template-body.formatting-section{row-gap:0}
.template-body.formatting-section>.template-preview{padding-top:48px}
.template-body.has-preview>.template-subtabs{display:flex;width:max-content;max-width:100%;height:auto;overflow:visible;flex-wrap:wrap;align-items:center}
.template-body.has-preview>.word-subtabs{width:100%;max-width:100%;min-width:0;overflow:visible;flex-wrap:nowrap;justify-self:stretch}
.template-body.has-preview>.word-subtabs button{flex:1 1 auto;min-width:0;padding:7px 6px;font-size:13px;white-space:nowrap}
@media(max-width:780px){.template-body.has-preview>.word-subtabs{flex-wrap:wrap}.template-body.formatting-section>.template-preview{padding-top:18px}}
.template-box-mark{width:54px;height:48px}
.template-box-mark.first{top:3%;left:2%}
.template-box-mark.second{top:60%;right:2%}
.template-body.formatting-section{row-gap:12px!important}
.template-body.formatting-section>.template-preview{padding-top:18px!important}
.template-body.formatting-section .format-preview-list{row-gap:12px!important;grid-template-rows:repeat(5,54px) minmax(54px,auto)}
.format-preview-list>div:last-child>span{display:block;width:100%;min-width:0}
@media(max-width:780px){.template-body.formatting-section{row-gap:12px!important}.template-body.formatting-section>.template-preview{padding-top:18px!important}}

/* Wordvorschau zeigt nur den Dokumentinhalt, keine Seiten-Trennhilfen. */
.template-word-page .word-preview-page-block{border-bottom:0!important}
.template-word-page .word-empty{border-top:0!important}

.avatar{border:0;color:#fff;font-weight:700;padding:0}.avatar:hover{filter:brightness(1.08)}
.hub-sidebar-foot button{border:0;background:transparent;padding:0;text-align:left;color:inherit}.hub-sidebar-foot button:hover{text-decoration:underline}
.rail button.avatar{background:var(--preset-accent);color:var(--preset-on-accent);border:0;box-shadow:none;font-weight:700}.rail button.avatar:hover{background:var(--preset-accent-hover);color:var(--preset-on-accent)}.hub-sidebar-foot .hub-profile{display:flex;align-items:center;gap:10px;width:100%;text-align:left;text-decoration:none}.hub-profile-avatar{flex:none}.hub-profile-copy{display:flex;min-width:0;flex-direction:column;gap:2px}.hub-profile-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.hub-profile-copy small{font-size:11px}
.ocr-settings-card{max-width:760px;margin-top:22px}.ocr-settings-card>p{color:color-mix(in srgb,var(--preset-ink) 22%,var(--preset-editor-muted));line-height:1.5}.ocr-engine-label{display:block;margin:24px 0 7px;color:color-mix(in srgb,var(--preset-ink) 32%,var(--preset-editor-muted));font-weight:600}.ocr-engine-select{display:block;width:min(100%,440px);min-height:46px;padding:9px 12px;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 8%,var(--preset-border));border-radius:8px;background:#fff;color:var(--preset-ink);font:inherit}.ocr-engine-note{margin-top:10px;color:color-mix(in srgb,var(--preset-ink) 16%,var(--preset-editor-muted));font-size:.93rem}.ocr-engine-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:22px}.ocr-engine-actions button{min-height:40px;padding:8px 14px;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 8%,var(--preset-border));border-radius:8px;background:#fff;color:color-mix(in srgb,var(--preset-ink) 90%,var(--preset-editor-muted))}.ocr-engine-actions button.hub-primary{background:var(--preset-accent);border-color:var(--preset-accent);color:var(--preset-on-accent)}.ocr-install-status{min-height:1.5em;margin-top:14px;color:color-mix(in srgb,var(--preset-ink) 25%,var(--preset-editor-muted))}
/* Positionswahl für Boxnummern */
.box .tag{display:block;width:max-content;white-space:nowrap;pointer-events:auto}
.number-position-picker{position:absolute;left:50%;bottom:calc(100% + 8px);z-index:30;display:grid;grid-template-columns:repeat(3,26px);grid-template-rows:repeat(3,26px);gap:2px;padding:5px;border:2px solid var(--theme-accent,var(--preset-accent));border-radius:12px;background:#fff;box-shadow:0 4px 14px #20152d38;transform:translateX(-50%);color:var(--theme-accent,var(--preset-accent));text-shadow:none}
.number-position-picker[hidden]{display:none}
.number-position-picker::after{content:"";position:absolute;left:calc(50% - 6px);top:100%;border:6px solid transparent;border-top-color:var(--theme-accent,var(--preset-accent))}
.number-position-choice{display:grid;place-items:center;width:26px;height:26px;padding:0;border:1px solid color-mix(in srgb,var(--theme-accent,var(--preset-accent)) 65%,white);border-radius:7px;background:#fff;color:var(--theme-accent,var(--preset-accent));font:700 15px/1 var(--font-interface);cursor:pointer;text-shadow:none}
.number-family-choice{grid-column:1;grid-row:1;display:grid;place-items:center;width:26px;height:26px;padding:0;border:1px solid color-mix(in srgb,var(--theme-accent,var(--preset-accent)) 65%,white);border-radius:7px;background:var(--theme-accent,var(--preset-accent));color:#fff;font:800 8px/1 Arial,sans-serif;letter-spacing:-.35px;cursor:pointer;text-shadow:none}
.number-family-choice:hover{filter:brightness(.92)}
.number-position-choice[data-position="top"]{grid-column:2;grid-row:1}.number-position-choice[data-position="left"]{grid-column:1;grid-row:2}.number-position-choice[data-position="center"]{grid-column:2;grid-row:2;font-size:17px}.number-position-choice[data-position="right"]{grid-column:3;grid-row:2}.number-position-choice[data-position="bottom"]{grid-column:2;grid-row:3}
.number-position-choice:hover,.number-position-choice.active{background:var(--theme-accent,var(--preset-accent));border-color:var(--theme-accent,var(--preset-accent));color:#fff}
.number-position-picker.below{top:calc(100% + 8px);bottom:auto}
.number-position-picker.below::after{top:auto;bottom:100%;border-top-color:transparent;border-bottom-color:var(--theme-accent,var(--preset-accent))}
.panel-toggle{align-self:center;flex:none;width:38px;height:38px;margin:0 10px;border:1px solid color-mix(in srgb,var(--preset-border) 91%,var(--preset-bg));border-radius:6px;background:#fff;color:color-mix(in srgb,var(--preset-ink) 50%,var(--preset-editor-muted));display:grid;place-items:center}.panel-toggle:hover,.panel-toggle.selected{border-color:var(--preset-accent);background:var(--preset-accent-soft);color:var(--preset-accent-strong)}.panel-toggle svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#pageManagerButton svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.workspace{display:grid;grid-template-areas:"workspace-stack"}.workspace>.viewer,.workspace>#pageManager{grid-area:workspace-stack;min-width:0;min-height:0;width:100%;height:100%}.workspace>.viewer[hidden],.workspace>#pageManager[hidden]{display:none!important}
body.page-manager-open{width:100vw;height:100dvh;overflow:hidden}body.page-manager-open main{height:calc(100dvh - 102px);min-height:0;overflow:hidden}.rail-bottom{display:flex;flex-direction:column;align-items:center;gap:8px}
main{transition:grid-template-columns .28s cubic-bezier(.2,.75,.25,1)}.translations{min-width:0;overflow:hidden;transition:opacity .2s ease,transform .28s cubic-bezier(.2,.75,.25,1)}.translation-collapsed main,.page-manager-open main{grid-template-columns:51px minmax(0,100fr) 0px minmax(0,0fr)!important}.translation-collapsed .translations,.page-manager-open .translations{opacity:0;transform:translateX(20px);pointer-events:none;border:0}.translation-collapsed .column-resize,.page-manager-open .column-resize{opacity:0;pointer-events:none}.page-manager-open .rail button:not(#pageManagerButton):not(#railUndo):not(#railRedo){opacity:.32;filter:grayscale(1);pointer-events:none}.page-manager-open #pageManagerButton{border-color:var(--preset-accent);background:var(--preset-accent-soft);color:var(--preset-accent-strong);box-shadow:0 0 0 2px color-mix(in srgb,var(--preset-accent) 14%,transparent)}
.page-manager{height:100%;min-height:0;display:flex;flex-direction:column;overflow:hidden;background:var(--preset-bg)}.page-manager[hidden]{display:none}.page-manager-head{min-height:76px;padding:14px 24px;display:flex;align-items:center;justify-content:space-between;gap:18px;background:#fff;border-bottom:1px solid color-mix(in srgb,var(--preset-border) 84%,var(--preset-bg))}.page-manager-head h2{margin:0 0 4px;font-size:20px;font-weight:500;color:var(--preset-ink)}.page-manager-head p{margin:0;color:var(--preset-editor-muted);font-size:13px}.page-manager-head button,.page-manager-tools button{border:1px solid color-mix(in srgb,var(--preset-editor-muted) 4%,var(--preset-border));border-radius:6px;background:#fff;padding:8px 12px;color:color-mix(in srgb,var(--preset-ink) 47%,var(--preset-editor-muted))}.page-manager-head button:hover,.page-manager-tools button:not(:disabled):hover{border-color:var(--preset-accent);color:var(--preset-accent-strong);background:color-mix(in srgb,var(--preset-bg) 48%,var(--preset-dialog))}.page-manager-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px 18px;background:color-mix(in srgb,var(--preset-bg) 41%,var(--preset-dialog));border-bottom:1px solid color-mix(in srgb,var(--preset-border) 90%,var(--preset-bg))}.page-manager-tools button{white-space:nowrap}.page-manager-tools button:disabled{opacity:.4;cursor:default}.page-manager-tools .accent-button{background:var(--preset-accent);border-color:var(--preset-accent);color:var(--preset-on-accent)}.page-manager-tools .accent-button:disabled{opacity:.45}.page-manager-spacer{flex:1}.page-manager-tools #pageSelectionCount{padding:0 5px;color:color-mix(in srgb,var(--preset-ink) 7%,var(--preset-editor-muted));font-size:13px}.page-thumb-grid{flex:1;min-height:0;overflow:auto;padding:22px;display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));align-content:start;gap:18px}.page-thumb{min-width:0;align-self:start;padding:9px;border:1px solid transparent;border-radius:8px;background:transparent;text-align:center;color:color-mix(in srgb,var(--preset-ink) 47%,var(--preset-editor-muted));cursor:grab;user-select:none;transition:transform .16s ease,background .16s ease,border-color .16s ease,box-shadow .16s ease}.page-thumb:hover{background:#fff;border-color:color-mix(in srgb,var(--preset-editor-muted) 3%,var(--preset-border));box-shadow:0 3px 12px #2e243310}.page-thumb.selected{background:var(--preset-accent-soft);border-color:var(--preset-accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--preset-accent) 25%,transparent)}.page-thumb.dragging{opacity:.4;transform:scale(.96);cursor:grabbing}.page-thumb.drag-over{transform:translateY(-5px);background:var(--preset-accent-soft);border-color:var(--preset-accent);box-shadow:0 8px 20px #33234b26}.page-thumb-preview{width:100%;max-height:300px;display:grid;place-items:center;overflow:hidden;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 5%,var(--preset-border));background:#fff;box-shadow:0 2px 7px #241d2c12}.page-thumb-canvas{display:block;width:100%;height:100%;object-fit:contain}.page-thumb-caption{padding:8px 0 1px;font-size:14px;font-weight:600;color:color-mix(in srgb,var(--preset-ink) 47%,var(--preset-editor-muted))}.page-thumb[aria-busy="true"] .page-thumb-preview::after{content:"Vorschau wird geladen …";font-size:11px;color:color-mix(in srgb,var(--preset-editor-muted) 68%,var(--preset-border))}
@media(max-width:700px){.page-manager-head{padding:12px 14px}.page-manager-tools{padding:8px;gap:5px}.page-manager-tools button{padding:7px 8px;font-size:12px}.page-thumb-grid{grid-template-columns:repeat(auto-fill,minmax(125px,1fr));padding:12px;gap:10px}}


.top-actions{padding-right:12px}.top-actions .panel-toggle{margin:0 0 0 12px}@media(max-width:1100px){.top-actions{display:flex;padding-right:12px}.top-actions #sourceStatus,.top-actions .status-dot{display:none}}
html.translation-layout-transitioning,body.translation-layout-transitioning{overflow:hidden!important}body.translation-collapsed{width:100%;height:100vh;overflow:hidden}body.translation-collapsed main{min-width:0;overflow:hidden}

/* Keep the viewport fixed; scrolling belongs to the editor panes, never the browser window. */
html,body{width:100%;height:100%;overflow:hidden}body{min-width:0}


.selection-merge-button{position:absolute;z-index:9;width:36px;height:36px;border:2px solid var(--preset-accent);border-radius:50%;background:#fff;color:var(--preset-accent-strong);font-size:17px;font-weight:700;line-height:1;box-shadow:0 2px 6px #0003;cursor:pointer}.selection-merge-button:hover{background:var(--preset-accent-soft);transform:scale(1.06)}.selection-tools-sort{z-index:8}


/* Aufgeräumte Serienglossar-Ansicht */
#glossaryDialog{width:min(1260px,96vw);max-width:96vw;max-height:92vh;border:1px solid color-mix(in srgb,var(--preset-border) 86%,var(--preset-bg));border-radius:14px;overflow:hidden;box-shadow:0 24px 80px #1c153522}
#glossaryDialog .dialog-header{padding:18px 24px;align-items:flex-start;border-color:color-mix(in srgb,var(--preset-border) 38%,var(--preset-bg))}
#glossaryDialog .dialog-header h2{font-size:21px;font-weight:600;color:var(--preset-ink)}
#glossaryDialog .glossary-dialog-subtitle{margin:4px 0 0;color:var(--preset-editor-muted);font-size:13px}
#glossaryDialog .dialog-header .dialog-close{border:0;border-radius:8px;background:transparent;font-size:25px;color:var(--preset-editor-muted);padding:2px 8px}
#glossaryDialog .dialog-header .dialog-close:hover{background:var(--preset-hover);color:var(--preset-accent-strong)}
#glossaryDialog .dialog-body{padding:20px 24px 24px;max-height:calc(92vh - 132px);overflow:auto}
.glossary-add-section{padding:16px;border:1px solid color-mix(in srgb,var(--preset-border) 76%,var(--preset-bg));border-radius:12px;background:linear-gradient(135deg,color-mix(in srgb,var(--preset-bg) 52%,var(--preset-dialog)),var(--preset-bg));margin-bottom:22px}
.glossary-section-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:13px}
.glossary-section-heading h3{margin:0;font-size:15px;font-weight:600;color:color-mix(in srgb,var(--preset-ink) 86%,var(--preset-editor-muted))}
.glossary-section-heading p{margin:3px 0 0;color:color-mix(in srgb,var(--preset-editor-muted) 91%,var(--preset-border));font-size:12px}
.glossary-count{flex:none;padding:5px 10px;border-radius:999px;background:var(--preset-accent-soft);color:var(--preset-accent-strong);font-size:12px;font-weight:600}
#glossaryDialog .glossary-entry{display:grid;grid-template-columns:repeat(5,minmax(120px,1fr)) auto;gap:9px;margin:0}
#glossaryDialog .glossary-entry input{min-width:0;height:40px;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 3%,var(--preset-border));border-radius:7px;background:#fff;padding:8px 10px;color:color-mix(in srgb,var(--preset-ink) 91%,var(--preset-editor-muted));outline:none;transition:border-color .15s,box-shadow .15s}
#glossaryDialog .glossary-entry input:focus{border-color:var(--preset-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--preset-accent) 12%,transparent)}
#glossaryDialog .glossary-category-field{display:grid;grid-template-rows:12px 1fr;gap:3px;min-width:0;margin:0;color:color-mix(in srgb,var(--preset-ink) 7%,var(--preset-editor-muted));font-size:10px;line-height:1}
#glossaryDialog .glossary-entry select{width:100%;min-width:0;height:40px;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 3%,var(--preset-border));border-radius:7px;background:#fff;padding:7px 28px 7px 10px;color:color-mix(in srgb,var(--preset-ink) 91%,var(--preset-editor-muted));outline:none;font:inherit;font-size:13px;transition:border-color .15s,box-shadow .15s}
#glossaryDialog .glossary-entry select:focus{border-color:var(--preset-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--preset-accent) 12%,transparent)}
#glossaryDialog .glossary-entry button{grid-column:auto;align-self:stretch;justify-self:stretch;margin:0;white-space:nowrap;border-radius:7px;padding:0 16px}
.glossary-browse-section .glossary-section-heading{align-items:flex-end}
.glossary-search-label{display:grid;gap:5px;min-width:min(320px,45%);margin:0!important;color:color-mix(in srgb,var(--preset-ink) 20%,var(--preset-editor-muted));font-size:12px}
.glossary-search-label input{height:37px;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 3%,var(--preset-border));border-radius:7px;padding:7px 10px;background:#fff;outline:none}
.glossary-search-label input:focus{border-color:var(--preset-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--preset-accent) 12%,transparent)}
.glossary-tabs{gap:5px;overflow-x:auto;border:0;margin:0 0 10px;padding:3px 0 8px}
.glossary-tabs button{border:1px solid transparent;border-radius:999px;background:color-mix(in srgb,var(--preset-border) 12%,var(--preset-bg));padding:7px 13px;color:color-mix(in srgb,var(--preset-ink) 9%,var(--preset-editor-muted));font-size:12px;transition:background .15s,color .15s,border-color .15s}
.glossary-tabs button:hover{background:var(--preset-accent-soft);color:var(--preset-accent-strong)}
.glossary-tabs button.active{border-color:var(--preset-accent);background:var(--preset-accent-soft);color:var(--preset-accent-strong);font-weight:600}
.glossary-list{max-height:min(43vh,540px);overflow:auto;border:1px solid color-mix(in srgb,var(--preset-border) 90%,var(--preset-bg));border-radius:10px;background:#fff;box-shadow:0 2px 8px #21152a08}
.glossary-table{font-size:13px}
.glossary-table th{padding:11px 10px;background:var(--preset-bg);color:color-mix(in srgb,var(--preset-ink) 26%,var(--preset-editor-muted));font-size:12px;font-weight:600;border-bottom:1px solid color-mix(in srgb,var(--preset-border) 76%,var(--preset-bg))}
.glossary-table td{padding:5px;border-bottom:1px solid color-mix(in srgb,var(--preset-border) 29%,var(--preset-bg))}
.glossary-table tbody tr:nth-child(even) td{background:color-mix(in srgb,var(--preset-bg) 31%,var(--preset-dialog))}
.glossary-table tbody tr:hover td{background:var(--preset-hover)}
.glossary-table input{height:34px;padding:6px 8px!important;border-radius:5px!important;color:color-mix(in srgb,var(--preset-ink) 91%,var(--preset-editor-muted))}
.glossary-table input:focus{outline:0!important;border-color:#b7a6d1!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--preset-accent) 9%,transparent);background:#fff}
.glossary-table button{border-radius:5px;color:#a44651;padding:6px 8px}
.glossary-table button:hover{background:#fff0f1;color:#8d2d3a}
#glossaryDialog .dialog-footer{padding:12px 20px;border-top:1px solid color-mix(in srgb,var(--preset-border) 38%,var(--preset-bg));border-bottom:0;justify-content:flex-end;gap:8px;background:color-mix(in srgb,var(--preset-bg) 31%,var(--preset-dialog))}
#glossaryDialog .dialog-footer button{border:1px solid color-mix(in srgb,var(--preset-editor-muted) 3%,var(--preset-border));border-radius:7px;background:#fff;padding:9px 13px}
#glossaryDialog .dialog-footer button.accent-button{border-color:var(--preset-accent);background:var(--preset-accent);color:var(--preset-on-accent)}
@media(max-width:900px){#glossaryDialog .glossary-entry{grid-template-columns:repeat(2,minmax(0,1fr))}#glossaryDialog .glossary-entry button{grid-column:1/-1;justify-self:end;min-height:38px}.glossary-browse-section .glossary-section-heading{align-items:flex-start;flex-direction:column}.glossary-search-label{width:100%;min-width:0}}

/* Serienweite Suche */
.search-dialog{width:min(760px,calc(100vw - 32px));max-width:760px;max-height:min(86vh,900px);border-radius:16px;overflow:hidden}.search-dialog .dialog-body{display:flex;flex-direction:column;max-height:calc(86vh - 140px);overflow:hidden}.search-dialog .search-options{display:flex;flex-wrap:wrap;gap:10px 20px;margin:2px 0 14px}.search-dialog .search-options label{display:flex;align-items:center;gap:6px;margin:0;color:color-mix(in srgb,var(--preset-ink) 46%,var(--preset-editor-muted));font-size:13px}.search-dialog .search-options input[type=checkbox]{accent-color:var(--preset-accent)}.search-dialog .search-main-field,.search-dialog .search-replace-field{font-size:13px;color:color-mix(in srgb,var(--preset-ink) 32%,var(--preset-editor-muted))}.search-result-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:4px 0 10px}.search-result-toolbar p{margin:0;color:color-mix(in srgb,var(--preset-ink) 7%,var(--preset-editor-muted));font-size:13px}.search-result-toolbar>div{display:flex;gap:6px}.search-result-toolbar button{min-width:36px;height:34px;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 5%,var(--preset-border));border-radius:7px;background:#fff;color:color-mix(in srgb,var(--preset-ink) 46%,var(--preset-editor-muted));font-size:18px}.search-hit-list{display:grid;gap:8px;overflow:auto;min-height:0;padding:2px 4px 2px 0}.search-hit{display:grid;gap:5px;width:100%;padding:12px 14px;border:1px solid color-mix(in srgb,var(--preset-border) 93%,var(--preset-bg));border-radius:10px;background:color-mix(in srgb,var(--preset-bg) 52%,var(--preset-dialog));color:var(--preset-ink);text-align:left;cursor:pointer;transition:background .15s,border-color .15s,transform .15s}.search-hit:hover,.search-hit:focus-visible{border-color:var(--preset-accent);background:var(--preset-hover);transform:translateY(-1px);outline:none}.search-hit-meta{color:color-mix(in srgb,var(--preset-ink) 7%,var(--preset-editor-muted));font-size:12px}.search-hit-text{font-size:14px;line-height:1.45;overflow-wrap:anywhere}.search-hit-jp{color:var(--preset-editor-muted)}.search-hit mark{padding:0 2px;border-radius:3px;background:color-mix(in srgb,var(--preset-border) 40%,var(--preset-bg));color:#543a78;font-weight:700}.search-more{padding:7px;color:color-mix(in srgb,var(--preset-ink) 7%,var(--preset-editor-muted));font-size:12px;text-align:center}.search-dialog .dialog-footer{gap:8px;flex-wrap:wrap}.search-dialog .dialog-footer button:disabled{opacity:.45;cursor:not-allowed}
.search-dialog .dialog-header{padding:18px 22px;background:linear-gradient(120deg,#fff 0%,color-mix(in srgb,var(--preset-bg) 41%,var(--preset-dialog)) 100%)}.search-dialog .dialog-header h2{display:flex;align-items:center;gap:10px;font-size:21px;color:var(--preset-ink)}.search-dialog .dialog-header h2::before{content:'⌕';display:inline-grid;place-items:center;width:30px;height:30px;border-radius:50%;background:var(--preset-accent-soft);color:var(--preset-accent);font-size:25px;font-weight:400}.search-dialog .dialog-body{padding:18px 22px}.search-dialog .dialog-body>label{margin-bottom:12px}.search-dialog .search-main-field input,.search-dialog .search-replace-field input{height:46px;padding:10px 14px;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 8%,var(--preset-border));border-radius:9px;font-size:15px;transition:border-color .15s,box-shadow .15s}.search-dialog .search-main-field input:focus,.search-dialog .search-replace-field input:focus{outline:0;border-color:var(--preset-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--preset-accent) 15%,transparent)}.search-dialog .search-options{padding:10px 12px;border:1px solid color-mix(in srgb,var(--preset-border) 40%,var(--preset-bg));border-radius:9px;background:color-mix(in srgb,var(--preset-bg) 52%,var(--preset-dialog))}.search-dialog .search-options label{font-size:13px;color:color-mix(in srgb,var(--preset-ink) 47%,var(--preset-editor-muted))}.search-option-help{display:block;margin:-4px 0 12px;color:color-mix(in srgb,var(--preset-editor-muted) 97%,var(--preset-border));font-size:12px;line-height:1.5}.search-option-help code{padding:1px 4px;border-radius:4px;background:color-mix(in srgb,var(--preset-border) 28%,var(--preset-bg));color:color-mix(in srgb,var(--preset-ink) 28%,var(--preset-editor-muted))}.search-result-toolbar{margin:2px 0 8px}.search-result-toolbar p{font-size:13px;font-weight:600;color:color-mix(in srgb,var(--preset-ink) 15%,var(--preset-editor-muted))}.search-nav-button{width:36px;height:36px;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 4%,var(--preset-border));border-radius:8px;background:#fff;color:color-mix(in srgb,var(--preset-ink) 31%,var(--preset-editor-muted));box-shadow:0 1px 2px #0000000a;font-size:0;transition:all .15s}.search-nav-button:hover:not(:disabled){border-color:var(--preset-accent);background:var(--preset-hover);color:var(--preset-accent-strong)}.search-nav-button:disabled{opacity:.4;cursor:default}.search-nav-button::before{font-size:19px}.search-nav-button#findPrevious::before{content:'↑'}.search-nav-button#findNext::before{content:'↓'}.search-dialog .dialog-footer{padding:13px 20px;background:color-mix(in srgb,var(--preset-bg) 31%,var(--preset-dialog));gap:10px}.search-dialog .dialog-footer button{margin:0;min-height:39px;border-radius:8px;font-weight:600;transition:background .15s,border-color .15s,transform .15s}.search-dialog .dialog-footer .plain-button{border:1px solid color-mix(in srgb,var(--preset-editor-muted) 6%,var(--preset-border));background:white;color:color-mix(in srgb,var(--preset-ink) 48%,var(--preset-editor-muted))}.search-dialog .dialog-footer .plain-button:hover:not(:disabled){background:var(--preset-hover);border-color:var(--preset-accent)}.search-dialog .dialog-footer .accent-button{border:1px solid var(--preset-accent);background:var(--preset-accent);color:var(--preset-on-accent);box-shadow:0 2px 5px color-mix(in srgb,var(--preset-accent) 20%,transparent)}.search-dialog .dialog-footer .accent-button:hover:not(:disabled){background:var(--preset-accent-strong);transform:translateY(-1px)}@media(max-width:600px){.search-dialog .dialog-footer{justify-content:stretch}.search-dialog .dialog-footer button{flex:1}}

/* Glossarschlagwörter als Chips und jederzeit erreichbare Begriffshilfe */
.glossary-tag-editor{display:flex;align-items:center;flex-wrap:wrap;gap:4px;min-height:32px;padding:3px 4px;border:1px solid transparent;border-radius:7px;transition:border-color .15s,background .15s}.glossary-tag-editor:focus-within{border-color:var(--preset-accent);background:#fff;box-shadow:0 0 0 2px color-mix(in srgb,var(--preset-accent) 9%,transparent)}.glossary-tag{display:inline-flex;align-items:center;gap:4px;max-width:100%;padding:3px 6px 3px 9px;border:1px solid var(--preset-border);border-radius:999px;background:var(--preset-accent-soft);color:var(--preset-accent-strong);font-size:11px;line-height:1.25;overflow-wrap:anywhere}.glossary-table .glossary-tag-remove{flex:none;border:0!important;border-radius:50%!important;background:transparent!important;color:color-mix(in srgb,var(--preset-editor-muted) 99%,var(--preset-border))!important;padding:0 2px!important;font-size:15px;line-height:1;cursor:pointer}.glossary-table .glossary-tag-remove:hover{background:var(--preset-accent-soft)!important;color:var(--preset-accent-strong)!important}.glossary-table .glossary-tag-input{flex:1 0 75px;width:auto;min-width:75px;height:24px;padding:2px 4px!important;border:0!important;box-shadow:none!important;background:transparent;color:color-mix(in srgb,var(--preset-ink) 70%,var(--preset-editor-muted));font-size:11px}.glossary-table .glossary-tag-input:focus{outline:0!important;border:0!important;box-shadow:none!important}.line:not(.active) .de-editor{pointer-events:auto;cursor:default}::highlight(glossary){text-decoration:underline dotted var(--glossar-text-color);text-underline-offset:2px}.glossary-hover-card{position:fixed;z-index:1000;max-width:min(340px,calc(100vw - 24px));padding:11px 14px;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 2%,var(--preset-border));border-radius:11px;background:#fff;box-shadow:0 10px 30px #25133a2b;color:color-mix(in srgb,var(--preset-ink) 91%,var(--preset-editor-muted));pointer-events:none;animation:glossary-pop .12s ease-out}.glossary-hover-card[hidden]{display:none}.glossary-hover-term{display:block;margin-bottom:5px;color:var(--preset-accent-strong);font-size:13px;font-weight:700}.glossary-hover-translation{font-size:13px;line-height:1.45;overflow-wrap:anywhere}.glossary-hover-note{margin-top:7px;padding-top:7px;border-top:1px solid color-mix(in srgb,var(--preset-border) 40%,var(--preset-bg));color:color-mix(in srgb,var(--preset-ink) 9%,var(--preset-editor-muted));font-size:12px;line-height:1.4;white-space:pre-wrap;overflow-wrap:anywhere}@keyframes glossary-pop{from{opacity:0;transform:translateY(3px)}to{opacity:1;transform:translateY(0)}}

/* Suche: Serienscope und Filtermenü */
.search-tool-row{position:relative;display:flex;align-items:center;gap:8px;margin:3px 0 11px}.search-tool-button{height:38px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 12px;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 4%,var(--preset-border));border-radius:8px;background:#fff;color:color-mix(in srgb,var(--preset-ink) 31%,var(--preset-editor-muted));font-weight:600;box-shadow:0 1px 2px #2413310a;transition:background .15s,border-color .15s,color .15s,box-shadow .15s}.search-tool-button:hover{border-color:var(--preset-accent);background:color-mix(in srgb,var(--preset-bg) 52%,var(--preset-dialog));color:var(--preset-accent-strong)}.search-tool-button.active,.search-tool-button[aria-pressed=true]{border-color:var(--preset-accent);background:var(--preset-accent-soft);color:var(--preset-accent-strong);box-shadow:0 0 0 2px color-mix(in srgb,var(--preset-accent) 9%,transparent)}.search-scope-icon{font-size:23px;line-height:1;color:var(--preset-accent)}.search-filter-wrap{position:relative}.search-filter-wrap svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.search-filter-count{display:inline-grid;place-items:center;min-width:19px;height:19px;padding:0 5px;border-radius:999px;background:var(--preset-accent);color:var(--preset-on-accent);font-size:11px}.search-filter-count[hidden]{display:none}.search-filter-menu{position:absolute;z-index:30;top:calc(100% + 7px);right:0;width:265px;padding:13px;border:1px solid color-mix(in srgb,var(--preset-border) 97%,var(--preset-bg));border-radius:10px;background:#fff;box-shadow:0 12px 32px #24133128}.search-filter-menu[hidden]{display:none}.search-filter-menu>strong{display:block;margin:0 0 8px;color:color-mix(in srgb,var(--preset-ink) 91%,var(--preset-editor-muted));font-size:14px}.search-filter-menu label{display:flex;align-items:center;gap:9px;padding:8px 6px;margin:0!important;border-radius:6px;color:color-mix(in srgb,var(--preset-ink) 33%,var(--preset-editor-muted))!important;font-size:13px!important;cursor:pointer}.search-filter-menu label:hover{background:color-mix(in srgb,var(--preset-bg) 86%,var(--preset-dialog))}.search-filter-menu input[type=checkbox],.search-regex-toggle input[type=checkbox]{width:17px!important;height:17px!important;margin:0!important;accent-color:var(--preset-accent)}.search-regex-toggle{display:flex!important;align-items:center;gap:7px;margin:0 0 0 auto!important;color:color-mix(in srgb,var(--preset-ink) 33%,var(--preset-editor-muted))!important;font-size:13px!important;white-space:nowrap}.search-dialog .search-option-help{margin-top:0}.search-dialog .search-option-help code{font-weight:600}@media(max-width:620px){.search-tool-row{flex-wrap:wrap}.search-regex-toggle{margin-left:0!important}.search-filter-menu{left:0;right:auto}}
.series-glossary-cloud{border-color:color-mix(in srgb,var(--preset-editor-muted) 8%,var(--preset-border));background:linear-gradient(135deg,color-mix(in srgb,var(--preset-bg) 31%,var(--preset-dialog)),var(--preset-hover))}.series-glossary-cloud>p{margin:2px 0 12px;color:color-mix(in srgb,var(--preset-ink) 7%,var(--preset-editor-muted));font-size:12px;line-height:1.45}.series-glossary-cloud label{display:grid;gap:5px;margin:8px 0;color:color-mix(in srgb,var(--preset-ink) 33%,var(--preset-editor-muted));font-size:12px}.series-glossary-cloud select,.series-glossary-cloud input[type=url]{width:100%;height:36px;padding:7px 9px;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 3%,var(--preset-border));border-radius:6px;background:#fff;color:color-mix(in srgb,var(--preset-ink) 91%,var(--preset-editor-muted))}.series-glossary-cloud .cloud-auto-sync{display:flex;align-items:center;gap:8px}.series-glossary-cloud .cloud-auto-sync input{accent-color:var(--preset-accent)}.series-glossary-cloud [data-cloud-glossary-sync]{border:1px solid var(--preset-accent);border-radius:7px;background:var(--preset-accent);color:var(--preset-on-accent);padding:8px 12px}.series-glossary-cloud [data-cloud-glossary-sync]:hover{background:color-mix(in srgb,var(--preset-ink) 4%,var(--preset-editor-muted))}.series-glossary-cloud [data-cloud-glossary-status]{display:block;margin-top:8px;color:color-mix(in srgb,var(--preset-ink) 6%,var(--preset-editor-muted));font-size:12px;line-height:1.45;overflow-wrap:anywhere}

.glossary-cloud-status{display:inline-flex;align-items:center;gap:7px;margin-left:12px;padding:6px 10px;border-radius:999px;background:color-mix(in srgb,var(--preset-border) 17%,var(--preset-bg));color:color-mix(in srgb,var(--preset-ink) 8%,var(--preset-editor-muted));font-size:12px;font-weight:600;vertical-align:middle}.glossary-cloud-icon{font-size:17px;line-height:1}.glossary-cloud-status.identical{background:#edf7f0;color:#39744c}.glossary-cloud-status.different{background:#fff4e5;color:#96601c}.glossary-cloud-status.pending{background:color-mix(in srgb,var(--preset-border) 17%,var(--preset-bg));color:color-mix(in srgb,var(--preset-ink) 8%,var(--preset-editor-muted))}.glossary-cloud-status.readonly{background:#eef3fa;color:#4d6888}.glossary-dialog-footer{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.glossary-footer-spacer{flex:1}.glossary-dialog-footer button[hidden]{display:none}.glossary-dialog-footer button:not(.accent-button){border:1px solid color-mix(in srgb,var(--preset-editor-muted) 9%,var(--preset-border));border-radius:7px;background:#fff;color:color-mix(in srgb,var(--preset-ink) 47%,var(--preset-editor-muted));padding:8px 11px}.glossary-dialog-footer button:not(.accent-button):hover{border-color:var(--preset-accent);background:var(--preset-hover)}

.glossary-cloud-status.stale{background:#fff4e5;color:#96601c}

.google-cloud-settings{border-color:color-mix(in srgb,var(--preset-editor-muted) 8%,var(--preset-border));background:linear-gradient(135deg,color-mix(in srgb,var(--preset-bg) 31%,var(--preset-dialog)),var(--preset-hover))}.google-cloud-settings>p{color:color-mix(in srgb,var(--preset-ink) 7%,var(--preset-editor-muted));line-height:1.5}.google-cloud-actions{display:flex;flex-wrap:wrap;gap:9px;margin:14px 0}.google-cloud-actions button{border:1px solid color-mix(in srgb,var(--preset-editor-muted) 9%,var(--preset-border));border-radius:8px;background:#fff;color:color-mix(in srgb,var(--preset-ink) 47%,var(--preset-editor-muted));padding:9px 13px}.google-cloud-actions button.hub-primary{border-color:var(--preset-accent);background:var(--preset-accent);color:var(--preset-on-accent)}.google-cloud-actions button[hidden]{display:none}.google-cloud-status{font-size:13px!important;color:color-mix(in srgb,var(--preset-ink) 23%,var(--preset-editor-muted))!important}
.search-filter-menu{position:fixed;z-index:10000;right:auto;max-height:calc(100vh - 24px);overflow:auto}
.top-actions .panel-toggle{width:auto;min-width:38px;height:38px;padding:0 11px;display:flex;align-items:center;justify-content:center;gap:8px;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 7%,var(--preset-border));border-radius:8px;background:#fff;color:color-mix(in srgb,var(--preset-ink) 34%,var(--preset-editor-muted));font-size:12px;font-weight:600;white-space:nowrap;box-shadow:0 1px 3px #34244917;transition:background .16s,border-color .16s,box-shadow .16s,transform .16s}
.top-actions .panel-toggle:hover,.top-actions .panel-toggle.selected{background:var(--preset-hover);border-color:var(--preset-accent);color:#563d7d;box-shadow:0 2px 7px #34244920;transform:translateY(-1px)}
.top-actions .panel-toggle svg{width:20px;height:20px;flex:none}
.notification-bell{position:relative;display:grid;place-items:center;width:40px;height:40px;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 3%,var(--preset-border));border-radius:8px;background:#fff;color:color-mix(in srgb,var(--preset-ink) 49%,var(--preset-editor-muted));box-shadow:0 1px 3px #34244912;transition:background .16s,border-color .16s,box-shadow .16s}
.notification-bell:hover,.notification-bell[aria-expanded="true"]{border-color:var(--preset-accent);background:var(--preset-accent-soft);color:var(--preset-accent-strong);box-shadow:0 2px 7px #34244918}
.notification-bell svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.notification-badge{position:absolute;right:-5px;top:-6px;min-width:19px;height:19px;padding:0 5px;border:2px solid var(--preset-bg);border-radius:999px;background:#e8a13b;color:#241e16;font-size:10px;font-weight:700;line-height:15px;text-align:center}
.notification-badge[hidden]{display:none}
.notification-scrim{position:fixed;z-index:130;inset:58px 0 0;background:#18151e55;backdrop-filter:blur(3px)}
.notification-scrim[hidden],.notification-panel[hidden]{display:none}
.notification-panel{position:fixed;z-index:140;top:58px;right:0;bottom:0;width:min(570px,100vw);display:flex;flex-direction:column;background:var(--preset-bg);border-left:1px solid color-mix(in srgb,var(--preset-editor-muted) 4%,var(--preset-border));box-shadow:-12px 0 36px #20192a22;color:color-mix(in srgb,var(--preset-ink) 94%,var(--preset-editor-muted))}
.notification-header{height:76px;flex:none;display:flex;align-items:center;gap:12px;padding:0 22px;border-bottom:1px solid color-mix(in srgb,var(--preset-border) 71%,var(--preset-bg))}
.notification-header h2{display:flex;align-items:center;gap:10px;margin:0 auto 0 0;font-size:20px;font-weight:500;white-space:nowrap}
.notification-header h2 svg{width:24px;height:24px;fill:none;stroke:var(--preset-accent);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.notification-hide-read{display:flex;align-items:center;gap:8px;color:color-mix(in srgb,var(--preset-ink) 27%,var(--preset-editor-muted));font-size:12px;white-space:nowrap;cursor:pointer}
.notification-hide-read input{position:absolute;opacity:0;pointer-events:none}
.notification-hide-read i{position:relative;width:38px;height:22px;border-radius:99px;background:color-mix(in srgb,var(--preset-editor-muted) 8%,var(--preset-border));transition:background .18s}
.notification-hide-read i::after{position:absolute;content:"";left:3px;top:3px;width:16px;height:16px;border-radius:50%;background:white;box-shadow:0 1px 3px #0003;transition:transform .18s}
.notification-hide-read input:checked+i{background:var(--preset-accent)}
.notification-hide-read input:checked+i::after{transform:translateX(16px)}
.notification-icon-button{display:grid;place-items:center;flex:none;width:34px;height:34px;border:0;border-radius:7px;background:transparent;color:color-mix(in srgb,var(--preset-ink) 85%,var(--preset-editor-muted));font-size:22px}
.notification-icon-button:hover{background:color-mix(in srgb,var(--preset-border) 38%,var(--preset-bg));color:var(--preset-accent-strong)}
.notification-icon-button svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.notification-tabs{display:flex;align-self:flex-start;gap:3px;margin:20px 22px 14px;padding:4px;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 4%,var(--preset-border));border-radius:999px;background:color-mix(in srgb,var(--preset-border) 34%,var(--preset-bg))}
.notification-tabs button{display:flex;gap:6px;align-items:center;padding:8px 13px;border:1px solid transparent;border-radius:999px;background:transparent;color:color-mix(in srgb,var(--preset-ink) 27%,var(--preset-editor-muted));font-size:13px;white-space:nowrap}
.notification-tabs button.active{border-color:var(--preset-accent);background:#fff;color:#4f3b70;box-shadow:0 1px 3px #271b3815}
.notification-tabs button span{color:var(--preset-accent);font-weight:700}
.notification-search{position:relative;display:block;margin:0 22px 18px}
.notification-search input{width:100%;height:42px;padding:0 42px 0 13px;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 7%,var(--preset-border));border-radius:7px;background:white;color:var(--preset-ink);outline:none;font:inherit}
.notification-search input:focus{border-color:var(--preset-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--preset-accent) 12%,transparent)}
.notification-search svg{position:absolute;right:13px;top:11px;width:20px;height:20px;fill:none;stroke:color-mix(in srgb,var(--preset-ink) 15%,var(--preset-editor-muted));stroke-width:1.8;stroke-linecap:round}
.notification-list{display:grid;align-content:start;gap:12px;min-height:0;overflow:auto;padding:4px 22px 24px}
.notification-card{position:relative;display:grid;grid-template-columns:58px minmax(0,1fr) 26px;gap:14px;padding:22px 17px;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 1%,var(--preset-border));border-radius:10px;background:#fff;box-shadow:0 1px 2px #1c16220b;transition:border-color .16s,background .16s}
.notification-card:not(.read){border-left:3px solid var(--preset-accent)}
.notification-card.read{background:color-mix(in srgb,var(--preset-bg) 41%,var(--preset-dialog))}
.notification-card-icon{display:grid;place-items:center;width:52px;height:52px;border-radius:50%;background:#e9a13b;color:#2a2116}
.notification-card-icon.error{background:var(--preset-accent-hover);color:var(--preset-on-accent)}
.notification-card-icon svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.notification-card-content{min-width:0}
.notification-card-content strong{display:block;margin:1px 0 7px;font-size:14px}
.notification-card-content p{margin:0 0 8px;color:color-mix(in srgb,var(--preset-ink) 27%,var(--preset-editor-muted));font-size:14px;line-height:1.45;overflow-wrap:anywhere}
.notification-card-content time{color:color-mix(in srgb,var(--preset-editor-muted) 84%,var(--preset-border));font-size:11px}
.notification-dismiss{width:26px;height:26px;border:0;border-radius:5px;background:transparent;color:color-mix(in srgb,var(--preset-ink) 81%,var(--preset-editor-muted));font-size:22px;line-height:1}
.notification-dismiss:hover{background:color-mix(in srgb,var(--preset-border) 28%,var(--preset-bg));color:var(--preset-accent)}
.notification-empty{margin:30px 0;text-align:center;color:color-mix(in srgb,var(--preset-editor-muted) 91%,var(--preset-border));font-size:14px}
.hub-mode .top-actions{display:flex;gap:8px}
.hub-mode .top-actions .status-dot,.hub-mode .top-actions #sourceStatus{display:none}
@media(max-width:620px){.notification-panel{width:100vw}.notification-header{gap:6px;padding:0 12px}.notification-header h2{font-size:17px}.notification-hide-read{font-size:11px;gap:5px}.notification-header{height:66px}.notification-scrim{inset:58px 0 0}.notification-panel{top:58px}.notification-tabs{margin:14px 12px 12px}.notification-search{margin:0 12px 14px}.notification-list{padding:3px 12px 18px}.notification-card{grid-template-columns:44px minmax(0,1fr) 22px;gap:10px;padding:15px 12px}.notification-card-icon{width:42px;height:42px}.top-actions .panel-toggle span{display:none}.top-actions .panel-toggle{width:40px;padding:0}}
/* Notification drawer covers the complete app, including its navigation. */
.notification-scrim{inset:0;background:#211a2e66;backdrop-filter:blur(4px)}
.notification-panel{top:0}
.notification-badge{background:var(--preset-accent);color:var(--preset-on-accent);border-color:var(--preset-bg)}
.notification-card-icon{background:var(--preset-accent);color:var(--preset-on-accent)}
.notification-card-icon.error{background:#594078;color:#fff}
.notification-card:not(.read){border-left-color:var(--preset-accent)}
.notification-tabs button.active{border-color:var(--preset-accent);color:#594078}
.notification-tabs button span{color:var(--preset-accent)}
.notification-hide-read input:checked+i{background:var(--preset-accent)}
.notification-header h2 svg{stroke:var(--preset-accent)}
.notification-bell,.top-actions .panel-toggle{width:40px;height:40px;min-width:40px;flex:none;padding:0;border-radius:8px}
.top-actions .panel-toggle{display:grid;place-items:center;background:#fff;color:color-mix(in srgb,var(--preset-ink) 30%,var(--preset-editor-muted))}
.top-actions .panel-toggle svg{width:21px;height:21px}
.top-actions .panel-toggle span{display:none}
body.hub-mode .top-actions{display:flex;gap:8px}
body.hub-mode .top-actions .status-dot,body.hub-mode .top-actions #sourceStatus{display:none}
details.translation-menu summary{padding:7px 12px;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 7%,var(--preset-border));border-radius:8px;background:#fff;color:color-mix(in srgb,var(--preset-ink) 34%,var(--preset-editor-muted));font-weight:600;box-shadow:0 1px 3px #34244917;transition:background .16s,border-color .16s,box-shadow .16s}
details.translation-menu summary:hover,details.translation-menu[open] summary{border-color:var(--preset-accent);background:var(--preset-hover);color:#563d7d;box-shadow:0 2px 7px #34244920}
details.translation-menu summary:focus-visible{outline:2px solid var(--preset-accent);outline-offset:2px}
@media(max-width:620px){.notification-panel{top:0}.notification-scrim{inset:0}}
body.hub-mode .top-actions #toggleTranslations{display:none}
.app-message-dialog{width:min(500px,calc(100vw - 32px));max-width:500px;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 7%,var(--preset-border));border-radius:13px;padding:0;background:#fff;box-shadow:0 18px 55px #21183040;color:color-mix(in srgb,var(--preset-ink) 97%,var(--preset-editor-muted))}
.app-message-dialog::backdrop{background:#211a2e66;backdrop-filter:blur(3px)}
.app-message-dialog .dialog-header{padding:17px 20px;border-bottom:1px solid color-mix(in srgb,var(--preset-border) 48%,var(--preset-bg))}
.app-message-dialog .dialog-header h2{font-size:17px;font-weight:600;color:color-mix(in srgb,var(--preset-ink) 68%,var(--preset-editor-muted))}
.app-message-dialog .dialog-header button{width:30px;height:30px;border-radius:6px;color:color-mix(in srgb,var(--preset-ink) 23%,var(--preset-editor-muted));font-size:22px}
.app-message-dialog .dialog-header button:hover{background:color-mix(in srgb,var(--preset-border) 12%,var(--preset-bg));color:var(--preset-accent-strong)}
.app-message-dialog .dialog-body{padding:18px 20px 10px}
.app-message-dialog .dialog-body p{margin:0;color:color-mix(in srgb,var(--preset-ink) 48%,var(--preset-editor-muted));font-size:14px;line-height:1.55;white-space:pre-wrap}
.app-message-dialog .dialog-body label{margin:0 0 8px;color:color-mix(in srgb,var(--preset-ink) 15%,var(--preset-editor-muted));font-size:12px}
.app-message-dialog .dialog-body input{height:40px;border-color:color-mix(in srgb,var(--preset-editor-muted) 8%,var(--preset-border));border-radius:7px;color:color-mix(in srgb,var(--preset-ink) 94%,var(--preset-editor-muted));outline:none}
.app-message-dialog .dialog-body input:focus{border-color:var(--preset-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--preset-accent) 12%,transparent)}
.app-message-dialog .dialog-footer{gap:9px;padding:12px 18px 16px;border-top:0}
.app-message-dialog .dialog-footer button{min-width:96px;margin:0;border-radius:7px;padding:9px 14px;font-weight:600}
.app-message-dialog .dialog-footer .accent-button{border-color:var(--preset-accent);background:var(--preset-accent);color:var(--preset-on-accent)}
.app-message-dialog .dialog-footer .accent-button:hover{border-color:var(--preset-accent-strong);background:var(--preset-accent-strong)}
.app-message-dialog .dialog-footer .danger-button{border-color:var(--preset-accent-strong);background:var(--preset-accent-hover);color:var(--preset-on-accent)}
.app-message-dialog .dialog-footer .plain-button{border-color:color-mix(in srgb,var(--preset-editor-muted) 3%,var(--preset-border));background:#fff;color:color-mix(in srgb,var(--preset-ink) 41%,var(--preset-editor-muted))}
.app-message-dialog [hidden]{display:none!important}

/* Einheitliche Aktionsbuttons nach dem Stil der Suche */
:where(dialog) .dialog-footer button:not(.dialog-close):not(.danger-button),
.wizard-footer button,
.page-manager-tools button,
.google-cloud-actions button,
.series-glossary-cloud [data-cloud-glossary-sync],
#glossaryDialog .glossary-entry > button,
.hub-dialog .hub-primary,
.hub-dialog-actions button,
.hub-dialog-footer button {
  min-height: 39px;
  padding: 8px 14px;
  border: 1px solid #ded9e3;
  border-radius: 8px;
  background: #fff;
  color: #5e5866;
  font-weight: 600;
  box-shadow: 0 1px 2px #2413310a;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .15s;
}
:where(dialog) .dialog-footer button:not(.dialog-close):not(.danger-button):hover:not(:disabled),
.wizard-footer button:hover:not(:disabled),
.page-manager-tools button:hover:not(:disabled),
.google-cloud-actions button:hover:not(:disabled),
.series-glossary-cloud [data-cloud-glossary-sync]:hover:not(:disabled),
#glossaryDialog .glossary-entry > button:hover:not(:disabled),
.hub-dialog .hub-primary:hover:not(:disabled),
.hub-dialog-actions button:hover:not(:disabled),
.hub-dialog-footer button:hover:not(:disabled) {
  border-color: var(--preset-accent);
  background: #faf8fc;
  color: var(--preset-accent-strong);
  transform: translateY(-1px);
}
:where(dialog) .dialog-footer button.accent-button:not(.danger-button),
.wizard-footer button.hub-primary,
.google-cloud-actions button.hub-primary,
.hub-dialog .hub-primary,
#glossaryDialog .glossary-entry > button.accent-button {
  border-color: var(--preset-accent);
  background: var(--preset-accent);
  color:var(--preset-on-accent);
  box-shadow: 0 2px 5px color-mix(in srgb,var(--preset-accent) 20%,transparent);
}
:where(dialog) .dialog-footer button.accent-button:hover:not(:disabled),
.wizard-footer button.hub-primary:hover:not(:disabled),
.google-cloud-actions button.hub-primary:hover:not(:disabled),
.hub-dialog .hub-primary:hover:not(:disabled),
#glossaryDialog .glossary-entry > button.accent-button:hover:not(:disabled) {
  border-color:var(--preset-accent-strong);
  background:var(--preset-accent-hover);
  color:var(--preset-on-accent);
}
:where(dialog) .dialog-footer button:focus-visible,
.wizard-footer button:focus-visible,
.page-manager-tools button:focus-visible,
.google-cloud-actions button:focus-visible,
.series-glossary-cloud [data-cloud-glossary-sync]:focus-visible,
#glossaryDialog .glossary-entry > button:focus-visible,
.hub-dialog-actions button:focus-visible,
.hub-dialog-footer button:focus-visible {
  outline:2px solid var(--preset-accent);
  outline-offset: 2px;
}
:where(dialog) .dialog-footer button:disabled,
.wizard-footer button:disabled,
.page-manager-tools button:disabled,
.google-cloud-actions button:disabled,
.series-glossary-cloud [data-cloud-glossary-sync]:disabled,
#glossaryDialog .glossary-entry > button:disabled,
.hub-dialog-actions button:disabled,
.hub-dialog-footer button:disabled {
  opacity: .45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
/* Dashboard- und Einstellungsaktionen verwenden dieselbe Button-Sprache */
.hub-heading-actions button,
.series-actions button,
.project-section-head button,
.project-toolbar button:not(.dialog-close),
.ocr-engine-actions button,
.template-list button:not(.template-row button),
.template-dialog footer button,
.wizard-footer button,
.wizard-drop button,
.wizard-page-nav button {
  min-height: 39px;
  padding: 8px 14px;
  border:1px solid color-mix(in srgb,var(--preset-editor-muted) 4%,var(--preset-border));
  border-radius: 8px;
  background:#fff;
  color:color-mix(in srgb,var(--preset-ink) 31%,var(--preset-editor-muted));
  font-weight: 600;
  box-shadow: 0 1px 2px #2413310a;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .15s;
}
.hub-heading-actions button:hover:not(:disabled),
.series-actions button:hover:not(:disabled),
.project-section-head button:hover:not(:disabled),
.project-toolbar button:hover:not(:disabled),
.ocr-engine-actions button:hover:not(:disabled),
.template-dialog footer button:hover:not(:disabled),
.wizard-footer button:hover:not(:disabled),
.wizard-drop button:hover:not(:disabled),
.wizard-page-nav button:hover:not(:disabled) {
  border-color:var(--preset-accent);
  background:color-mix(in srgb,var(--preset-bg) 52%,var(--preset-dialog));
  color:var(--preset-accent-strong);
  transform: none;
}
.hub-heading-actions button.hub-primary,
.ocr-engine-actions button.hub-primary,
.template-dialog footer button.hub-primary,
.wizard-footer button.hub-primary {
  border-color:var(--preset-accent);
  background:var(--preset-accent);
  color:var(--preset-on-accent);
  box-shadow: 0 2px 5px color-mix(in srgb,var(--preset-accent) 20%,transparent);
}
.hub-heading-actions button.hub-primary:hover:not(:disabled),
.ocr-engine-actions button.hub-primary:hover:not(:disabled),
.template-dialog footer button.hub-primary:hover:not(:disabled),
.wizard-footer button.hub-primary:hover:not(:disabled) {
  border-color:var(--preset-accent-strong);
  background:var(--preset-accent-hover);
  color:var(--preset-on-accent);
  transform: translateY(-1px);
}
.hub-heading-actions button:focus-visible,
.series-actions button:focus-visible,
.project-section-head button:focus-visible,
.project-toolbar button:focus-visible,
.ocr-engine-actions button:focus-visible,
.template-dialog footer button:focus-visible,
.wizard-footer button:focus-visible,
.wizard-drop button:focus-visible,
.wizard-page-nav button:focus-visible {
  outline:2px solid var(--preset-accent);
  outline-offset: 2px;
}
.hub-heading-actions button:disabled,
.series-actions button:disabled,
.project-section-head button:disabled,
.project-toolbar button:disabled,
.ocr-engine-actions button:disabled,
.template-dialog footer button:disabled,
.wizard-footer button:disabled,
.wizard-drop button:disabled,
.wizard-page-nav button:disabled {
  opacity: .45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
/* Korrektur: Dialog-Eingaben bekommen global einen oberen Rand. Im Glossar müssen alle Felder bündig sitzen. */
#glossaryDialog .glossary-entry > input,
#glossaryDialog .glossary-entry > select {
  align-self: stretch;
  margin: 0 !important;
  height: 40px;
}

/* Text-Shortcuts: auch einfache Dialogaktionen erhalten den Suchdialog-Stil. */
#shortcutsDialog .dialog-body > button,
#shortcutsDialog .shortcut-row > button {
  min-height: 38px;
  padding: 8px 13px;
  border:1px solid color-mix(in srgb,var(--preset-editor-muted) 4%,var(--preset-border));
  border-radius: 8px;
  background:#fff;
  color:color-mix(in srgb,var(--preset-ink) 31%,var(--preset-editor-muted));
  font-weight: 600;
  box-shadow: 0 1px 2px #2413310a;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
#shortcutsDialog .dialog-body > button:hover:not(:disabled),
#shortcutsDialog .shortcut-row > button:hover:not(:disabled) {
  border-color:var(--preset-accent);
  background:color-mix(in srgb,var(--preset-bg) 52%,var(--preset-dialog));
  color:var(--preset-accent-strong);
}
#shortcutsDialog .dialog-body > button:focus-visible,
#shortcutsDialog .shortcut-row > button:focus-visible {
  outline:2px solid var(--preset-accent);
  outline-offset: 2px;
}
#shortcutsDialog .dialog-body > button:disabled,
#shortcutsDialog .shortcut-row > button:disabled {
  opacity: .45;
  cursor: not-allowed;
  box-shadow: none;
}
/* Das hidden-Attribut darf nicht durch allgemeine Eingabestile überschrieben werden. */
[hidden] { display: none !important; }
/* Einheitliche Typoklassen für Haupt- und Unterüberschriften */
:root{--heading-primary-font:var(--font-interface);--heading-secondary-font:var(--font-serif);--preset-bg:#f5f5f6;--preset-surface:#f7f7f8;--preset-sidebar:#f1f1f3;--preset-border:#e1e1e4;--preset-ink:#28262d}
.heading-primary,h1{font-family:var(--heading-primary-font)}
.heading-secondary,h2,h3{font-family:var(--heading-secondary-font)}
.hub .hub-heading h1,.hub .hub-page>h1,.user-settings-dialog h2{font-family:var(--heading-primary-font)}
.hub .hub-card h2,.hub .project-toolbar h2,.hub .hub-page h2,.hub .hub-page h3,.user-settings-dialog h3{font-family:var(--heading-secondary-font)}
.hub{background:var(--preset-bg);color:var(--preset-ink)}
.hub .hub-sidebar{background:var(--preset-sidebar);border-color:var(--preset-border)}
.hub .hub-card,.hub .hub-projects{background:var(--preset-surface);border-color:var(--preset-border)}
.hub .hub-profile-wrap{position:relative;width:100%}
.hub-sidebar-foot .hub-profile{width:100%;min-height:62px;padding:9px 10px;border:1px solid transparent;border-radius:9px;background:transparent;color:inherit;cursor:pointer}
.hub-sidebar-foot .hub-profile:hover,.hub-sidebar-foot .hub-profile[aria-expanded=true]{border-color:var(--preset-border);background:var(--preset-surface)}
.hub .hub-profile-menu{position:absolute;z-index:120;left:0;bottom:calc(100% + 9px);width:min(290px,calc(100vw - 24px));padding:7px;border:1px solid var(--preset-border);border-radius:12px;background:var(--preset-surface);color:var(--preset-ink);box-shadow:0 14px 40px #17121f2b}
.hub .hub-profile-menu[hidden]{display:none!important}
.hub .profile-menu-identity{display:flex;align-items:center;gap:11px;padding:10px 10px 13px;border-bottom:1px solid var(--preset-border);margin-bottom:5px}
.hub .profile-menu-identity .hub-profile-copy{flex:1}
.hub .hub-profile-menu>button{display:flex;width:100%;align-items:center;gap:12px;padding:10px;border:0;border-radius:8px;background:transparent;color:inherit;text-align:left;cursor:pointer}
.hub .hub-profile-menu>button:hover{background:color-mix(in srgb,var(--preset-accent) 11%,var(--preset-surface));color:var(--preset-accent-strong)}
.user-settings-dialog{width:min(980px,calc(100vw - 28px));max-width:980px;max-height:min(88vh,780px);padding:0;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 4%,var(--preset-border));border-radius:16px;background:#fff;color:color-mix(in srgb,var(--preset-ink) 93%,var(--preset-editor-muted));box-shadow:0 22px 70px #1d152c40;overflow:hidden}
.user-settings-dialog::backdrop{background:#211a2e66;backdrop-filter:blur(3px)}
.user-settings-header{height:64px;display:flex;align-items:center;justify-content:space-between;padding:0 22px;border-bottom:1px solid color-mix(in srgb,var(--preset-border) 64%,var(--preset-bg));background:#fff}
.user-settings-header h2{margin:0;font-size:21px;font-weight:600}
.user-settings-header .dialog-close{width:34px;height:34px;border:0;border-radius:7px;background:transparent;color:var(--preset-editor-muted);font-size:24px;cursor:pointer}
.user-settings-header .dialog-close:hover{background:var(--preset-hover);color:var(--preset-accent-strong)}
.user-settings-layout{min-height:400px;height:min(62vh,610px);display:grid;grid-template-columns:220px minmax(0,1fr)}
.user-settings-nav{padding:16px 12px;border-right:1px solid color-mix(in srgb,var(--preset-border) 64%,var(--preset-bg));background:color-mix(in srgb,var(--preset-bg) 41%,var(--preset-dialog));display:flex;flex-direction:column;gap:5px}
.user-settings-nav button{min-height:44px;padding:9px 12px;border:1px solid transparent;border-radius:8px;background:transparent;color:color-mix(in srgb,var(--preset-ink) 51%,var(--preset-editor-muted));text-align:left;font-weight:500;cursor:pointer}
.user-settings-nav button:hover,.user-settings-nav button.active{border-color:color-mix(in srgb,var(--preset-border) 52%,var(--preset-bg));background:var(--preset-hover);color:var(--preset-accent-strong)}
.user-settings-body{padding:28px 34px;overflow:auto}
.user-settings-section h3{margin:0 0 6px;font-size:24px;font-style:italic;font-weight:500;color:color-mix(in srgb,var(--preset-ink) 85%,var(--preset-editor-muted))}
.user-settings-section>p{margin:0 0 22px;color:color-mix(in srgb,var(--preset-ink) 5%,var(--preset-editor-muted));line-height:1.5}
.user-settings-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px 18px;max-width:720px}
.user-settings-fields label{display:grid;gap:7px;color:color-mix(in srgb,var(--preset-ink) 27%,var(--preset-editor-muted));font-size:13px}
.user-settings-fields input,.user-settings-fields select{width:100%;height:42px;padding:9px 12px;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 4%,var(--preset-border));border-radius:8px;background:#fff;color:color-mix(in srgb,var(--preset-ink) 91%,var(--preset-editor-muted));font:inherit;font-size:14px;box-shadow:0 1px 2px #2413310a}
.user-settings-fields input:focus,.user-settings-fields select:focus{outline:0;border-color:var(--preset-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--preset-accent) 12%,transparent)}
.user-settings-fields input[readonly]{background:var(--preset-bg);color:color-mix(in srgb,var(--preset-editor-muted) 91%,var(--preset-border))}
.appearance-row{display:grid;grid-template-columns:minmax(170px, .8fr) minmax(0,2fr);align-items:center;gap:18px;padding:16px 0;border-bottom:1px solid color-mix(in srgb,var(--preset-border) 40%,var(--preset-bg))}
.appearance-row>div:first-child{display:grid;gap:4px}.appearance-row>div:first-child strong{font-size:14px}.appearance-row>div:first-child small,.appearance-style small{color:color-mix(in srgb,var(--preset-editor-muted) 91%,var(--preset-border));font-size:12px;line-height:1.4}
.appearance-choice{display:flex;gap:9px}.appearance-option{min-width:104px;min-height:40px;padding:8px 12px;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 4%,var(--preset-border));border-radius:8px;background:#fff;color:color-mix(in srgb,var(--preset-ink) 31%,var(--preset-editor-muted));font-weight:600;cursor:pointer}
.appearance-option:hover,.appearance-option.active{border-color:var(--preset-accent);background:var(--preset-accent-soft);color:var(--preset-accent-strong)}
.appearance-styles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.appearance-style{min-height:68px;padding:10px 12px;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 4%,var(--preset-border));border-radius:9px;background:#fff;color:color-mix(in srgb,var(--preset-ink) 48%,var(--preset-editor-muted));text-align:left;display:grid;align-content:center;gap:4px;cursor:pointer;transition:background .15s,border-color .15s,box-shadow .15s}
.appearance-style:hover{border-color:var(--preset-accent);background:color-mix(in srgb,var(--preset-bg) 52%,var(--preset-dialog))}.appearance-style.active{border-color:var(--preset-accent);background:var(--preset-hover);box-shadow:0 0 0 2px color-mix(in srgb,var(--preset-accent) 9%,transparent)}
.appearance-style[data-style-choice=standard] strong{font-family:var(--font-ui-default)}.appearance-style[data-style-choice=modern] strong{font-family:var(--font-ui-modern)}.appearance-style[data-style-choice=romantisch] strong{font-family:var(--font-serif-romantic);font-style:italic}.appearance-style[data-style-choice=verspielt] strong{font-family:var(--font-rounded)}
.font-settings{margin-top:19px}
.user-settings-footer{display:flex;justify-content:flex-end;gap:9px;padding:13px 20px;border-top:1px solid color-mix(in srgb,var(--preset-border) 64%,var(--preset-bg));background:color-mix(in srgb,var(--preset-bg) 31%,var(--preset-dialog))}
.user-settings-footer button{min-height:39px;margin:0;border-radius:8px;padding:8px 14px;font-weight:600}
.settings-link-button{min-height:39px;padding:8px 14px;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 4%,var(--preset-border));border-radius:8px;background:#fff;color:color-mix(in srgb,var(--preset-ink) 31%,var(--preset-editor-muted));font-weight:600;cursor:pointer}
.settings-link-button:hover{border-color:var(--preset-accent);background:color-mix(in srgb,var(--preset-bg) 52%,var(--preset-dialog));color:var(--preset-accent-strong)}
.user-settings-dialog button:focus-visible{outline:2px solid var(--preset-accent);outline-offset:2px}
.hub[data-style=modern] .hub-card{border-radius:14px;box-shadow:0 3px 12px #24334c0b}
.hub[data-style=romantisch] .hub-card,.hub[data-style=romantisch] .hub-projects{border-radius:20px}
.hub[data-style=verspielt] .hub-card,.hub[data-style=verspielt] .hub-projects{border-radius:24px}
.hub[data-style=modern] .hub-card h2{font-style:normal;letter-spacing:-.02em}
.hub[data-style=verspielt] .hub-card h2{font-style:normal}
html[data-theme=dark] body{background:color-mix(in srgb,var(--preset-bg) 80%,#000);color:var(--preset-ink)}
html[data-theme=dark] .topbar,html[data-theme=dark] .statusbar{background:var(--preset-bg);border-color:var(--preset-row-hover);color:color-mix(in srgb,var(--preset-editor-muted) 47%,var(--preset-ink))}
html[data-theme=dark] .brand{border-color:var(--preset-row-hover)}
html[data-theme=dark] .translations,html[data-theme=dark] .translation-header,html[data-theme=dark] .rail{background:var(--preset-bg);border-color:var(--preset-row-hover);color:color-mix(in srgb,var(--preset-editor-muted) 12%,var(--preset-ink))}
html[data-theme=dark] .viewer{background:color-mix(in srgb,var(--preset-bg) 80%,#000)}
html[data-theme=dark] .line.active,html[data-theme=dark] .translation-list .line.active{background:var(--preset-dialog-subtle);border-color:var(--preset-border);color:var(--preset-ink)}
html[data-theme=dark] .line textarea,html[data-theme=dark] .line .de-editor{color:color-mix(in srgb,var(--preset-editor-muted) 30%,var(--preset-ink))}
html[data-theme=dark] .line.active textarea{border-color:color-mix(in srgb,var(--preset-border) 83%,var(--preset-editor-muted))}
html[data-theme=dark] dialog:not(.search-filter-menu){background:var(--preset-sidebar);color:var(--preset-ink);border-color:color-mix(in srgb,var(--preset-border) 93%,var(--preset-editor-muted))}
html[data-theme=dark] .dialog-header,html[data-theme=dark] .dialog-footer{background:var(--preset-sidebar);border-color:color-mix(in srgb,var(--preset-border) 93%,var(--preset-editor-muted))}
html[data-theme=dark] .dialog-body{background:var(--preset-sidebar);color:var(--preset-ink)}
html[data-theme=dark] .dialog-body input:not([type=checkbox]):not([type=range]),html[data-theme=dark] .dialog-body textarea,html[data-theme=dark] .dialog-body select{background:var(--preset-input);border-color:color-mix(in srgb,var(--preset-border) 86%,var(--preset-editor-muted));color:var(--preset-ink)}
html[data-theme=dark] .hub{background:color-mix(in srgb,var(--preset-bg) 87%,#000);color:var(--preset-ink)}
html[data-theme=dark] .hub .hub-sidebar{background:var(--preset-bg);border-color:var(--preset-row-hover)}
html[data-theme=dark] .hub .hub-sidebar nav button,html[data-theme=dark] .hub .hub-profile{color:color-mix(in srgb,var(--preset-editor-muted) 12%,var(--preset-ink))}
html[data-theme=dark] .hub .hub-sidebar nav button:hover,html[data-theme=dark] .hub .hub-sidebar nav button.active{background:var(--preset-input);color:var(--preset-accent-strong)}
html[data-theme=dark] .hub .hub-card,html[data-theme=dark] .hub .hub-projects,html[data-theme=dark] .hub .hub-profile-menu{background:var(--preset-sidebar);border-color:var(--preset-border);color:var(--preset-ink)}
html[data-theme=dark] .hub .hub-profile-menu>button:hover{background:var(--preset-row-hover);color:var(--preset-accent-strong)}
html[data-theme=dark] .hub .calendar-week,html[data-theme=dark] .hub .calendar-day,html[data-theme=dark] .hub .ongoing,html[data-theme=dark] .hub .upcoming,html[data-theme=dark] .hub .project-table,html[data-theme=dark] .hub .project-row{background:var(--preset-dialog-subtle);border-color:var(--preset-border);color:color-mix(in srgb,var(--preset-editor-muted) 12%,var(--preset-ink))}
html[data-theme=dark] .hub .project-row strong,html[data-theme=dark] .hub .day-top{color:color-mix(in srgb,var(--preset-editor-muted) 12%,var(--preset-ink))}
html[data-theme=dark] .hub .hub-heading h1,html[data-theme=dark] .hub .hub-card h2,html[data-theme=dark] .hub .project-toolbar h2,html[data-theme=dark] .hub .project-section-head h3{color:color-mix(in srgb,var(--preset-ink) 73%,#fff)}
html[data-theme=dark] .hub .hub-notice{background:color-mix(in srgb,var(--preset-input) 91%,var(--preset-row-hover));border-color:color-mix(in srgb,var(--preset-border) 75%,var(--preset-editor-muted));color:var(--preset-ink)}
html[data-theme=dark] .hub .hub-heading-actions button:not(.hub-primary),html[data-theme=dark] .hub .hub-card-head button,html[data-theme=dark] .hub .project-toolbar button,html[data-theme=dark] .hub .project-section-head button,html[data-theme=dark] .hub .hub-volume-actions button{background:var(--preset-input);border-color:color-mix(in srgb,var(--preset-border) 87%,var(--preset-editor-muted));color:var(--preset-ink)}
html[data-theme=dark] .user-settings-dialog,html[data-theme=dark] .user-settings-header,html[data-theme=dark] .user-settings-nav,html[data-theme=dark] .user-settings-body,html[data-theme=dark] .user-settings-footer{background:var(--preset-sidebar);color:var(--preset-ink);border-color:color-mix(in srgb,var(--preset-border) 93%,var(--preset-editor-muted))}
html[data-theme=dark] .user-settings-section h3{color:var(--preset-ink)}
html[data-theme=dark] .user-settings-fields label,html[data-theme=dark] .appearance-row>div:first-child strong{color:color-mix(in srgb,var(--preset-editor-muted) 18%,var(--preset-ink))}
html[data-theme=dark] .user-settings-fields input,html[data-theme=dark] .user-settings-fields select{background:var(--preset-input);border-color:color-mix(in srgb,var(--preset-border) 86%,var(--preset-editor-muted));color:var(--preset-ink)}
html[data-theme=dark] .user-settings-nav button{color:color-mix(in srgb,var(--preset-editor-muted) 26%,var(--preset-ink))}
html[data-theme=dark] .user-settings-nav button:hover,html[data-theme=dark] .user-settings-nav button.active,html[data-theme=dark] .appearance-option.active,html[data-theme=dark] .appearance-style.active{background:var(--preset-row-hover);border-color:var(--preset-accent);color:var(--preset-hover-text)}
html[data-theme=dark] .appearance-option,html[data-theme=dark] .appearance-style{background:var(--preset-input);border-color:color-mix(in srgb,var(--preset-border) 86%,var(--preset-editor-muted));color:var(--preset-ink)}
html[data-theme=dark] .user-settings-section>p,html[data-theme=dark] .appearance-row>div:first-child small,html[data-theme=dark] .appearance-style small{color:var(--preset-editor-muted)}
html[data-theme=dark] .user-settings-footer .plain-button,html[data-theme=dark] .settings-link-button{background:var(--preset-input);border-color:color-mix(in srgb,var(--preset-border) 86%,var(--preset-editor-muted));color:var(--preset-ink)}
html[data-theme=dark] .hub-dialog{background:var(--preset-sidebar);color:var(--preset-ink);border-color:color-mix(in srgb,var(--preset-border) 93%,var(--preset-editor-muted))}
@media(max-width:720px){.user-settings-layout{height:min(70vh,650px);grid-template-columns:145px minmax(0,1fr)}.user-settings-body{padding:22px 18px}.appearance-row{grid-template-columns:1fr;gap:10px}.appearance-styles{grid-template-columns:1fr}.user-settings-fields{grid-template-columns:1fr}}
@media(max-width:560px){.user-settings-dialog{max-height:94vh}.user-settings-layout{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr)}.user-settings-nav{flex-direction:row;overflow:auto;border-right:0;border-bottom:1px solid color-mix(in srgb,var(--preset-border) 64%,var(--preset-bg));padding:8px}.user-settings-nav button{white-space:nowrap;min-height:38px}.user-settings-body{padding:18px 15px}.font-settings{grid-template-columns:1fr}}
/* Dark Mode: Benachrichtigungsbereich samt Formularen, Karten und Symbolbuttons */
html[data-theme=dark] .notification-bell{background:var(--preset-dialog-subtle);border-color:color-mix(in srgb,var(--preset-border) 86%,var(--preset-editor-muted));color:color-mix(in srgb,var(--preset-editor-muted) 17%,var(--preset-ink))}
html[data-theme=dark] .notification-bell:hover,html[data-theme=dark] .notification-bell[aria-expanded=true]{background:var(--preset-row-hover);border-color:var(--preset-accent);color:var(--preset-accent-strong)}
html[data-theme=dark] .notification-badge{background:var(--preset-accent);color:var(--preset-on-accent);border-color:var(--preset-bg)}
html[data-theme=dark] .notification-panel{background:var(--preset-bg);border-color:var(--preset-border);color:var(--preset-ink);box-shadow:-12px 0 36px #0008}
html[data-theme=dark] .notification-header{border-color:var(--preset-border)}
html[data-theme=dark] .notification-header h2{color:var(--preset-ink)}
html[data-theme=dark] .notification-header h2 svg{stroke:var(--preset-accent)}
html[data-theme=dark] .notification-hide-read{color:color-mix(in srgb,var(--preset-editor-muted) 53%,var(--preset-ink))}
html[data-theme=dark] .notification-hide-read i{background:color-mix(in srgb,var(--preset-border) 87%,var(--preset-editor-muted))}
html[data-theme=dark] .notification-hide-read input:checked+i{background:var(--preset-accent)}
html[data-theme=dark] .notification-icon-button{background:transparent;color:color-mix(in srgb,var(--preset-editor-muted) 26%,var(--preset-ink))}
html[data-theme=dark] .notification-icon-button:hover{background:var(--preset-row-hover);color:var(--preset-accent-strong)}
html[data-theme=dark] .notification-tabs{background:var(--preset-input);border-color:color-mix(in srgb,var(--preset-border) 86%,var(--preset-editor-muted))}
html[data-theme=dark] .notification-tabs button{background:transparent;color:color-mix(in srgb,var(--preset-editor-muted) 48%,var(--preset-ink))}
html[data-theme=dark] .notification-tabs button.active{background:color-mix(in srgb,var(--preset-border) 97%,var(--preset-editor-muted));border-color:var(--preset-accent);color:var(--preset-hover);box-shadow:0 1px 3px #0005}
html[data-theme=dark] .notification-tabs button span{color:var(--preset-accent-strong)}
html[data-theme=dark] .notification-search input{background:var(--preset-input);border-color:color-mix(in srgb,var(--preset-border) 86%,var(--preset-editor-muted));color:var(--preset-ink)}
html[data-theme=dark] .notification-search input::placeholder{color:color-mix(in srgb,var(--preset-border) 11%,var(--preset-editor-muted))}
html[data-theme=dark] .notification-search svg{stroke:color-mix(in srgb,var(--preset-editor-muted) 75%,var(--preset-ink))}
html[data-theme=dark] .notification-card,html[data-theme=dark] .notification-card.read{background:var(--preset-dialog-subtle);border-color:var(--preset-border);color:var(--preset-ink);box-shadow:0 1px 3px #0004}
html[data-theme=dark] .notification-card:not(.read){border-left-color:var(--preset-accent)}
html[data-theme=dark] .notification-card-content strong{color:var(--preset-ink)}
html[data-theme=dark] .notification-card-content p{color:color-mix(in srgb,var(--preset-editor-muted) 55%,var(--preset-ink))}
html[data-theme=dark] .notification-card-content time{color:color-mix(in srgb,var(--preset-border) 14%,var(--preset-editor-muted))}
html[data-theme=dark] .notification-card-icon{background:var(--preset-accent);color:var(--preset-on-accent)}
html[data-theme=dark] .notification-card-icon.error{background:var(--preset-accent-hover);color:var(--preset-on-accent)}
html[data-theme=dark] .notification-dismiss{color:color-mix(in srgb,var(--preset-editor-muted) 30%,var(--preset-ink))}
html[data-theme=dark] .notification-dismiss:hover{background:var(--preset-border);color:#fff}
html[data-theme=dark] .notification-empty{color:var(--preset-editor-muted)}
/* Kalender-Monate nutzen dieselbe Unterüberschriften-Schrift wie die Dashboard-Karten. */
.hub .day-top span{font-family:var(--heading-secondary-font)}
/* Überschriften bleiben in normaler Schreibweise statt automatisch in Versalien. */
h2,h3,.heading-secondary{text-transform:none}
/* Nur „Eigener Stil“ erlaubt freie Schriftwahl; Vorlagen zeigen die festgelegten Schriftfamilien. */
.appearance-font-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:18px}
.appearance-font-summary>span{display:grid;gap:4px;padding:12px;border:1px solid color-mix(in srgb,var(--preset-border) 76%,var(--preset-bg));border-radius:8px;background:color-mix(in srgb,var(--preset-bg) 52%,var(--preset-dialog));overflow-wrap:anywhere}
.appearance-font-summary small{color:color-mix(in srgb,var(--preset-editor-muted) 91%,var(--preset-border));font-size:12px}
.appearance-font-summary strong{font-size:13px;font-weight:500}
.appearance-font-summary p,.font-custom-help{grid-column:1/-1;margin:0;color:color-mix(in srgb,var(--preset-editor-muted) 91%,var(--preset-border));font-size:12px;line-height:1.5}
.font-settings{margin-top:18px}
html[data-theme=dark] .appearance-font-summary>span{background:var(--preset-input);border-color:color-mix(in srgb,var(--preset-border) 86%,var(--preset-editor-muted))}
html[data-theme=dark] .appearance-font-summary small,html[data-theme=dark] .appearance-font-summary p,html[data-theme=dark] .font-custom-help{color:var(--preset-editor-muted)}
.embedded-editor-settings{display:grid;gap:14px;max-width:850px}
.embedded-editor-settings .hub-card{margin:0}
.embedded-editor-settings .hub-card-head h2{text-transform:none}
.user-settings-dialog .user-settings-section h3{text-transform:none}
@media(max-width:560px){.appearance-font-summary{grid-template-columns:1fr}.appearance-font-summary p{grid-column:1}}
/* Weitere Editor- und Dashboard-Flächen folgen im Dark Mode dem dunklen Oberflächenton. */
html[data-theme=dark]{color-scheme:dark}
html[data-theme=dark] .hub .volume-actions button,html[data-theme=dark] .hub .series-actions button,html[data-theme=dark] .hub .ocr-engine-actions button,html[data-theme=dark] .hub .google-cloud-actions button,html[data-theme=dark] .hub .project-toolbar button,html[data-theme=dark] .hub .project-section-head button{background:var(--preset-input);border-color:color-mix(in srgb,var(--preset-border) 87%,var(--preset-editor-muted));color:var(--preset-ink)}
html[data-theme=dark] .hub .ocr-engine-actions .hub-primary,html[data-theme=dark] .hub .google-cloud-actions .hub-primary,html[data-theme=dark] .hub .hub-heading-actions .hub-primary{background:var(--preset-accent);border-color:var(--preset-accent);color:var(--preset-on-accent)}
html[data-theme=dark] .hub .ocr-engine-select,html[data-theme=dark] .hub input:not([type=checkbox]):not([type=range]):not([type=file]),html[data-theme=dark] .hub select{background:var(--preset-input);border-color:color-mix(in srgb,var(--preset-border) 86%,var(--preset-editor-muted));color:var(--preset-ink)}
html[data-theme=dark] .hub .google-cloud-settings{background:var(--preset-sidebar);border-color:var(--preset-border);color:var(--preset-ink)}
html[data-theme=dark] .hub .ocr-engine-note,html[data-theme=dark] .hub .ocr-settings-card>p,html[data-theme=dark] .hub .google-cloud-settings>p,html[data-theme=dark] .hub .google-cloud-status{color:color-mix(in srgb,var(--preset-editor-muted) 76%,var(--preset-ink))!important}
html[data-theme=dark] .project-tree{background:var(--preset-bg);border-color:var(--preset-border)}
html[data-theme=dark] .project-tree h3,html[data-theme=dark] .project-tree button{color:color-mix(in srgb,var(--preset-editor-muted) 30%,var(--preset-ink))}
html[data-theme=dark] .project-tree button:hover,html[data-theme=dark] .project-tree button.active{background:var(--preset-row-hover);color:var(--preset-hover-text)}
html[data-theme=dark] .hub .project-toolbar p,html[data-theme=dark] .hub .volume-status,html[data-theme=dark] .hub .ongoing small,html[data-theme=dark] .hub .upcoming small{color:var(--preset-editor-muted)}
html[data-theme=dark] .hub .project-task{background:var(--preset-dialog-subtle);border-color:var(--preset-border);color:var(--preset-ink)}
html[data-theme=dark] .hub .volume-progress{background:var(--preset-border)}
html[data-theme=dark] .hub .hub-card-head button:not(.hub-primary){background:var(--preset-input);color:var(--preset-ink);border-color:color-mix(in srgb,var(--preset-border) 87%,var(--preset-editor-muted))}
/* Dunkle Varianten für Suche, Glossar, Shortcuts und Exportdialoge */
html[data-theme=dark] .search-dialog .dialog-header,html[data-theme=dark] .search-dialog .dialog-footer,html[data-theme=dark] #glossaryDialog .dialog-header,html[data-theme=dark] #glossaryDialog .dialog-footer{background:var(--preset-sidebar);border-color:color-mix(in srgb,var(--preset-border) 93%,var(--preset-editor-muted))}
html[data-theme=dark] .search-dialog .dialog-footer .plain-button,html[data-theme=dark] #glossaryDialog .dialog-footer button:not(.accent-button),html[data-theme=dark] #shortcutsDialog .dialog-body>button,html[data-theme=dark] #shortcutsDialog .shortcut-row>button,html[data-theme=dark] .search-tool-button,html[data-theme=dark] .search-nav-button{background:var(--preset-input);border-color:color-mix(in srgb,var(--preset-border) 86%,var(--preset-editor-muted));color:var(--preset-ink)}
html[data-theme=dark] .search-dialog .dialog-footer .plain-button:hover,html[data-theme=dark] #glossaryDialog .dialog-footer button:not(.accent-button):hover,html[data-theme=dark] #shortcutsDialog .dialog-body>button:hover,html[data-theme=dark] #shortcutsDialog .shortcut-row>button:hover,html[data-theme=dark] .search-tool-button:hover,html[data-theme=dark] .search-nav-button:hover:not(:disabled){background:var(--preset-row-hover);border-color:var(--preset-accent);color:var(--preset-hover-text)}
html[data-theme=dark] .search-dialog .search-hit{background:var(--preset-dialog-subtle);border-color:var(--preset-border);color:var(--preset-ink)}
html[data-theme=dark] .search-dialog .search-hit:hover,html[data-theme=dark] .search-dialog .search-hit:focus-visible{background:var(--preset-row-hover);border-color:var(--preset-accent)}
html[data-theme=dark] .search-hit-meta,html[data-theme=dark] .search-hit-jp,html[data-theme=dark] .search-result-toolbar p{color:var(--preset-editor-muted)}
html[data-theme=dark] .search-hit mark{background:color-mix(in srgb,var(--preset-border) 92%,var(--preset-editor-muted));color:var(--preset-hover)}
html[data-theme=dark] #glossaryDialog .glossary-add-section,html[data-theme=dark] #glossaryDialog .glossary-list{background:var(--preset-dialog-subtle);border-color:var(--preset-border);color:var(--preset-ink)}
html[data-theme=dark] #glossaryDialog .glossary-entry input,html[data-theme=dark] #glossaryDialog .glossary-entry select,html[data-theme=dark] #glossaryDialog .glossary-search-label input,html[data-theme=dark] .glossary-table input{background:var(--preset-input);border-color:color-mix(in srgb,var(--preset-border) 86%,var(--preset-editor-muted));color:var(--preset-ink)}
html[data-theme=dark] .glossary-table th{background:var(--preset-input);color:var(--preset-ink);border-color:color-mix(in srgb,var(--preset-border) 93%,var(--preset-editor-muted))}
html[data-theme=dark] .glossary-table td{border-color:var(--preset-border)}
html[data-theme=dark] .glossary-table tr:hover td{background:var(--preset-row-hover)}
html[data-theme=dark] .glossary-tabs{border-color:color-mix(in srgb,var(--preset-border) 93%,var(--preset-editor-muted))}
html[data-theme=dark] .glossary-tabs button{color:color-mix(in srgb,var(--preset-editor-muted) 57%,var(--preset-ink))}
html[data-theme=dark] .glossary-tabs button.active{background:var(--preset-input);border-color:color-mix(in srgb,var(--preset-border) 86%,var(--preset-editor-muted));color:var(--preset-hover-text)}
html[data-theme=dark] .glossary-cloud-status{background:var(--preset-input);color:color-mix(in srgb,var(--preset-editor-muted) 30%,var(--preset-ink))}
html[data-theme=dark] .glossary-cloud-status.identical{background:#263a30;color:#a9d5b5}
html[data-theme=dark] .glossary-cloud-status.different,html[data-theme=dark] .glossary-cloud-status.stale{background:#403329;color:#e4c38d}
html[data-theme=dark] #glossaryDialog .glossary-section-heading h3,html[data-theme=dark] #glossaryDialog .glossary-section-heading p{color:var(--preset-ink)}
html[data-theme=dark] .search-option-help,html[data-theme=dark] .search-option-help code{color:color-mix(in srgb,var(--preset-editor-muted) 73%,var(--preset-ink))}
html[data-theme=dark] .dialog-footer .accent-button,html[data-theme=dark] #glossaryDialog .dialog-footer .accent-button{background:var(--preset-accent);border-color:var(--preset-accent);color:var(--preset-on-accent)}
html[data-theme=dark] .top-actions .panel-toggle{background:var(--preset-dialog-subtle);border-color:color-mix(in srgb,var(--preset-border) 86%,var(--preset-editor-muted));color:color-mix(in srgb,var(--preset-editor-muted) 17%,var(--preset-ink))}
html[data-theme=dark] .top-actions .panel-toggle:hover,html[data-theme=dark] .top-actions .panel-toggle.selected{background:var(--preset-row-hover);border-color:var(--preset-accent);color:var(--preset-accent-strong)}
html[data-theme=dark] .rail button{background:var(--preset-dialog-subtle);border-color:color-mix(in srgb,var(--preset-border) 86%,var(--preset-editor-muted));color:color-mix(in srgb,var(--preset-editor-muted) 17%,var(--preset-ink))}
html[data-theme=dark] .rail button:hover,html[data-theme=dark] .rail button.selected{background:var(--preset-row-hover);border-color:var(--preset-accent);color:var(--preset-accent-strong)}
html[data-theme=dark] .translation-actions button,html[data-theme=dark] .line-head button,html[data-theme=dark] .line-actions button{color:color-mix(in srgb,var(--preset-editor-muted) 57%,var(--preset-ink))}
html[data-theme=dark] .translation-actions button:hover,html[data-theme=dark] .line-actions button:hover{background:var(--preset-row-hover);color:var(--preset-accent-strong)}
html[data-theme=dark] .translation-tools,html[data-theme=dark] .translation-tools button{color:color-mix(in srgb,var(--preset-editor-muted) 17%,var(--preset-ink))}
html[data-theme=dark] .glossary-cloud-icon,html[data-theme=dark] .notification-header h2 svg,html[data-theme=dark] .notification-search svg{color:var(--preset-accent)}
html[data-theme=dark] .app-message-dialog .plain-button,html[data-theme=dark] .app-message-dialog .dialog-footer .plain-button{background:var(--preset-input);border-color:color-mix(in srgb,var(--preset-border) 86%,var(--preset-editor-muted));color:var(--preset-ink)}
/* Nachkorrekturen für die im Dark Mode noch hellen Menüs und Vorlagenansichten. */
html[data-theme=dark] .dropdown{background:var(--preset-dialog-subtle);border-color:color-mix(in srgb,var(--preset-border) 86%,var(--preset-editor-muted));color:var(--preset-ink);box-shadow:0 12px 32px #0008}
html[data-theme=dark] .dropdown button,html[data-theme=dark] .dropdown a{color:color-mix(in srgb,var(--preset-editor-muted) 17%,var(--preset-ink))}
html[data-theme=dark] .dropdown button:hover,html[data-theme=dark] .dropdown a:hover{background:var(--preset-row-hover);color:color-mix(in srgb,var(--preset-editor-muted) 25%,var(--preset-ink))}
html[data-theme=dark] details.translation-menu summary{background:var(--preset-dialog-subtle);border-color:color-mix(in srgb,var(--preset-border) 86%,var(--preset-editor-muted));color:color-mix(in srgb,var(--preset-editor-muted) 17%,var(--preset-ink))}
html[data-theme=dark] details.translation-menu summary:hover,html[data-theme=dark] details.translation-menu[open] summary{background:var(--preset-row-hover);border-color:var(--preset-accent);color:var(--preset-accent-strong)}
html[data-theme=dark] .translation-menu .dropdown{background:var(--preset-dialog-subtle);color:var(--preset-ink)}
html[data-theme=dark] .hub-sidebar-foot .hub-profile{background:transparent;border-color:transparent;color:color-mix(in srgb,var(--preset-editor-muted) 12%,var(--preset-ink))}
html[data-theme=dark] .hub-sidebar-foot .hub-profile:hover,html[data-theme=dark] .hub-sidebar-foot .hub-profile[aria-expanded=true]{background:var(--preset-input);border-color:color-mix(in srgb,var(--preset-border) 86%,var(--preset-editor-muted));color:var(--preset-ink)}
html[data-theme=dark] .hub-profile-avatar{background:var(--preset-accent);color:var(--preset-on-accent)}
html[data-theme=dark] .hub-profile-copy strong{color:var(--preset-ink)}
html[data-theme=dark] .hub-profile-copy small{color:var(--preset-editor-muted)}
html[data-theme=dark] .open-project-tab{background:var(--preset-surface);border-color:var(--preset-border);color:color-mix(in srgb,var(--preset-editor-muted) 42%,var(--preset-ink))}
html[data-theme=dark] .open-project-tab[aria-selected=true]{background:var(--preset-bg);border-color:color-mix(in srgb,var(--preset-border) 86%,var(--preset-editor-muted));border-bottom-color:var(--preset-bg);color:var(--preset-ink)}
html[data-theme=dark] .open-project-tab-main small{color:var(--preset-editor-muted)}
html[data-theme=dark] .open-project-tab-close{color:color-mix(in srgb,var(--preset-editor-muted) 73%,var(--preset-ink))}
html[data-theme=dark] .open-project-tab-close:hover{background:var(--preset-row-hover);color:var(--preset-hover-text)}
/* Dashboard-Vorlagenliste */
html[data-theme=dark] .template-list{background:var(--preset-sidebar);border-color:var(--preset-border);color:var(--preset-ink)}
html[data-theme=dark] .template-row{background:var(--preset-sidebar);border-color:var(--preset-border);color:var(--preset-ink)}
html[data-theme=dark] .template-head{background:var(--preset-input);color:color-mix(in srgb,var(--preset-editor-muted) 45%,var(--preset-ink))}
html[data-theme=dark] .template-row small{background:var(--preset-row-hover);color:var(--preset-accent-strong)}
html[data-theme=dark] .template-row button:not(.hub-primary){background:var(--preset-input);border-color:color-mix(in srgb,var(--preset-border) 86%,var(--preset-editor-muted));color:var(--preset-ink)}
/* Vorlageneditor: Seitenleiste, Register, Eingaben und Vorschau-Hintergrund dunkel halten. */
html[data-theme=dark] .template-dialog{background:var(--preset-bg);border-color:color-mix(in srgb,var(--preset-border) 93%,var(--preset-editor-muted));color:var(--preset-ink)}
html[data-theme=dark] .template-dialog>form>header,html[data-theme=dark] .template-dialog>form>footer{background:var(--preset-bg);border-color:var(--preset-border);color:var(--preset-ink)}
html[data-theme=dark] .template-dialog header h2,html[data-theme=dark] .template-dialog header button{color:var(--preset-ink)}
html[data-theme=dark] .template-editor nav{background:var(--preset-bg);border-color:var(--preset-border)}
html[data-theme=dark] .template-editor nav button{background:transparent;color:color-mix(in srgb,var(--preset-editor-muted) 45%,var(--preset-ink))}
html[data-theme=dark] .template-editor nav button:hover{background:var(--preset-input);color:var(--preset-ink)}
html[data-theme=dark] .template-editor nav button.active{background:var(--preset-row-hover);border-color:var(--preset-accent);color:var(--preset-hover-text)}
html[data-theme=dark] .template-body{background:var(--preset-sidebar);color:color-mix(in srgb,var(--preset-editor-muted) 10%,var(--preset-ink))}
html[data-theme=dark] .template-body h3,html[data-theme=dark] .template-body p,html[data-theme=dark] .template-body label,html[data-theme=dark] .template-body strong{color:color-mix(in srgb,var(--preset-editor-muted) 16%,var(--preset-ink))}
html[data-theme=dark] .template-body .template-controls small,html[data-theme=dark] .template-body .template-choice-row small,html[data-theme=dark] .template-body .format-switch-row small{color:var(--preset-editor-muted)}
html[data-theme=dark] .template-body input:not([type=checkbox]):not([type=range]):not([type=color]):not([type=file]),html[data-theme=dark] .template-body textarea,html[data-theme=dark] .template-body select{background:var(--preset-input);border-color:color-mix(in srgb,var(--preset-border) 86%,var(--preset-editor-muted));color:var(--preset-ink)}
html[data-theme=dark] .template-subtabs{background:var(--preset-input)}
html[data-theme=dark] .template-subtabs button{color:color-mix(in srgb,var(--preset-editor-muted) 50%,var(--preset-ink))}
html[data-theme=dark] .template-subtabs button.active,html[data-theme=dark] .template-subtabs button[aria-selected=true]{background:var(--preset-row-hover);border-color:var(--preset-accent);color:var(--preset-ink)}
html[data-theme=dark] .template-body .format-switch-row strong,html[data-theme=dark] .template-body .template-choice-row strong{color:var(--preset-ink)}
html[data-theme=dark] .template-body .template-choice button{background:var(--preset-input);border-color:color-mix(in srgb,var(--preset-border) 86%,var(--preset-editor-muted));color:color-mix(in srgb,var(--preset-editor-muted) 10%,var(--preset-ink))}
html[data-theme=dark] .template-body .template-choice button.selected{border-color:var(--preset-accent);color:#fff}
html[data-theme=dark] .template-preview{background:var(--preset-input);border-color:color-mix(in srgb,var(--preset-border) 86%,var(--preset-editor-muted));color:var(--preset-ink)}
html[data-theme=dark] .template-preview-caption,html[data-theme=dark] .template-preview small{color:color-mix(in srgb,var(--preset-editor-muted) 76%,var(--preset-ink))}
html[data-theme=dark] .template-dialog footer button:not(.hub-primary){background:var(--preset-input);border-color:color-mix(in srgb,var(--preset-border) 86%,var(--preset-editor-muted));color:var(--preset-ink)}
html[data-theme=dark] .template-dialog footer .hub-primary{background:var(--preset-accent);border-color:var(--preset-accent);color:var(--preset-on-accent)}
/* Kalender: Monat und Hinzufügen-Symbol müssen auf der dunklen Tagesfläche kontrastreich bleiben. */
html[data-theme=dark] .hub .day-top span{color:var(--preset-accent-strong)}
html[data-theme=dark] .hub .day-top b{color:color-mix(in srgb,var(--preset-editor-muted) 10%,var(--preset-ink))}
html[data-theme=dark] .hub .day-add{background:var(--preset-input);border-color:color-mix(in srgb,var(--preset-border) 86%,var(--preset-editor-muted));color:var(--preset-accent-strong)}
html[data-theme=dark] .hub .day-add:hover{background:var(--preset-row-hover);border-color:var(--preset-accent);color:#fff}
html[data-theme=dark] .hub .calendar-day.today .day-top b{border-color:var(--preset-accent);color:var(--preset-accent-strong)}
/* Versalien-Hilfsstil darf Bezeichnungen in Überschriften nicht erzwingen. */
.template-body h3,.template-dialog h2,.template-dialog h3{text-transform:none}
html[data-theme=dark] .template-word-page,html[data-theme=dark] .template-word-page p,html[data-theme=dark] .template-word-page strong,html[data-theme=dark] .template-word-page small{color:var(--preset-input)}
:root{--heading-primary-weight:inherit;--heading-secondary-weight:inherit;--heading-primary-style:normal;--heading-secondary-style:normal;--preset-accent:#8065ad;--preset-accent-strong:#6f5598;--preset-accent-soft:#eee8f6;--preset-editor-bg:#f5f4f7;--preset-editor-panel:#fbfafc;--preset-editor-surface:#fff;--preset-editor-border:#ded9e5;--preset-editor-ink:#302b35;--preset-editor-muted:#77717d}
.heading-primary,h1{font-weight:var(--heading-primary-weight);font-style:var(--heading-primary-style)}
.heading-secondary,h2,h3{font-family:var(--heading-secondary-font);font-weight:var(--heading-secondary-weight);font-style:var(--heading-secondary-style)}
/* Theme palette carries through the editor chrome as well as the dashboard. */
body{background:var(--preset-editor-bg);color:var(--preset-editor-ink)}
.topbar,.statusbar{background:var(--preset-editor-panel);border-color:var(--preset-editor-border)}
.rail,.translations,.translation-header{background:var(--preset-editor-panel);border-color:var(--preset-editor-border);color:var(--preset-editor-ink)}
.viewer{background:var(--preset-editor-bg)}
.translation-list{background:var(--preset-editor-bg)}
.line.active{background:var(--preset-editor-surface);border-color:var(--preset-editor-border);color:var(--preset-editor-ink)}
.line.active .de-editor,.line.active textarea{color:var(--preset-editor-ink)}
.status-dot,.rail button.selected,.translation-actions button.selected,.notification-bell:hover,.notification-bell[aria-expanded=true]{color:var(--preset-accent);border-color:var(--preset-accent);}
.status-dot{background:var(--preset-accent)}
.rail button.selected,.translation-actions button.selected{background:var(--preset-accent-soft)}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid color-mix(in srgb,var(--preset-accent) 70%,white);outline-offset:2px}
input[type=checkbox],input[type=radio]{accent-color:var(--preset-accent)}
.notification-panel{background:var(--preset-editor-panel);border-color:var(--preset-editor-border);color:var(--preset-editor-ink)}
.notification-header,.notification-card,.notification-search input,.notification-tabs{border-color:var(--preset-editor-border)}
.notification-header h2 svg,.notification-tabs button span,.notification-badge,.notification-card:not(.read){color:var(--preset-accent)}
.notification-card:not(.read){border-left-color:var(--preset-accent)}
.notification-tabs button.active{border-color:var(--preset-accent);color:var(--preset-accent-strong)}
.notification-badge,.notification-card-icon{background:var(--preset-accent);color:var(--preset-on-accent)}
.notification-hide-read input:checked+i{background:var(--preset-accent)}
.notification-search input:focus{border-color:var(--preset-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--preset-accent) 18%,transparent)}
.hub-sidebar-foot .hub-profile,.hub-sidebar-foot .hub-profile:hover,.hub-sidebar-foot .hub-profile:focus-visible,.hub-profile-menu button,.hub-profile-menu button:hover,.hub-profile-menu button:focus-visible,.hub-profile-menu button *{text-decoration:none!important}
.hub .font-style-toggle{min-width:40px;height:40px;border:1px solid var(--preset-border);border-radius:8px;background:var(--preset-surface);color:var(--preset-ink);font-weight:700;box-shadow:0 1px 3px #34244912;transition:background .16s,border-color .16s,color .16s,transform .16s}
.hub .font-style-toggle.italic{font-style:italic}
.hub .font-style-toggle:hover{border-color:var(--preset-accent);background:var(--preset-accent-soft);color:var(--preset-accent-strong);transform:translateY(-1px)}
.hub .font-style-toggle.active{border-color:var(--preset-accent);background:var(--preset-accent);color:var(--preset-on-accent)}
.hub .custom-font-settings h4{margin:18px 0 10px;font-size:16px}
.hub .custom-font-row{display:grid;grid-template-columns:minmax(220px,1fr) auto;align-items:end;gap:12px;margin:10px 0}
.hub .custom-font-row label{display:grid;gap:6px}
.hub .custom-font-row select{width:100%;height:42px;padding:0 11px;border:1px solid var(--preset-border);border-radius:8px;background:var(--preset-surface);color:var(--preset-ink);font:inherit}
.hub .font-style-buttons{display:flex;gap:7px}
html[data-theme=dark] body{background:var(--preset-bg);color:var(--preset-ink)}
html[data-theme=dark] .topbar,html[data-theme=dark] .statusbar,html[data-theme=dark] .rail,html[data-theme=dark] .translations,html[data-theme=dark] .translation-header{background:var(--preset-bg);border-color:var(--preset-row-hover);color:var(--preset-ink)}
html[data-theme=dark] .viewer,html[data-theme=dark] .translation-list{background:var(--preset-bg)}
html[data-theme=dark] .line.active{background:var(--preset-dialog-subtle);border-color:var(--preset-border);color:var(--preset-ink)}
html[data-theme=dark] .line.active .de-editor,html[data-theme=dark] .line.active textarea{color:var(--preset-ink)}
html[data-theme=dark] .notification-panel{background:var(--preset-bg);border-color:var(--preset-border);color:var(--preset-ink)}
html[data-theme=dark] .notification-tabs button.active{border-color:var(--preset-accent);color:var(--preset-hover-text)}
html[data-theme=dark] .notification-card:not(.read){border-left-color:var(--preset-accent)}
html[data-theme=dark] .notification-bell:hover,html[data-theme=dark] .notification-bell[aria-expanded=true]{border-color:var(--preset-accent);color:var(--preset-hover-text)}
html[data-theme=dark] .hub-sidebar-foot .hub-profile:hover,html[data-theme=dark] .hub-sidebar-foot .hub-profile[aria-expanded=true]{text-decoration:none!important}
html[data-theme=dark] .hub .font-style-toggle{background:var(--preset-input);border-color:color-mix(in srgb,var(--preset-border) 86%,var(--preset-editor-muted));color:var(--preset-ink)}
html[data-theme=dark] .hub .font-style-toggle.active{background:var(--preset-accent);border-color:var(--preset-accent);color:var(--preset-on-accent)}
html[data-theme=dark] .hub .custom-font-row select{background:var(--preset-input);border-color:color-mix(in srgb,var(--preset-border) 86%,var(--preset-editor-muted));color:var(--preset-ink)}
html[data-theme=dark] .hub .calendar-day .day-top em,html[data-theme=dark] .hub .calendar-month,html[data-theme=dark] .hub .calendar-week-title{color:var(--preset-accent-strong)!important}
html[data-theme=dark] .hub .calendar-day .day-add{background:color-mix(in srgb,var(--preset-row-hover) 50%,var(--preset-border))!important;border-color:color-mix(in srgb,var(--preset-border) 59%,var(--preset-editor-muted))!important;color:var(--preset-hover)!important}
html[data-theme=dark] .hub .calendar-day .day-add:hover{background:var(--preset-accent)!important;border-color:var(--preset-accent)!important;color:var(--preset-on-accent)!important}
.box.selected-box{border-color:var(--preset-accent)}.box.selected-box .tag,.line-head button:hover,.line.drag-over{color:var(--preset-accent-strong);border-color:var(--preset-accent);background:var(--preset-accent-soft)}
.translation-menu summary:hover,.translation-menu[open] summary,.menu summary:hover,.menu-link:hover,.menu[open] summary{color:var(--preset-accent-strong);border-color:var(--preset-accent)}
.hub .hub-sidebar nav button:hover,.hub .hub-sidebar nav button.active,.hub .project-tree button.active,.hub .project-tree button:hover{background:var(--preset-accent-soft);color:var(--preset-accent-strong)}
.hub .hub-primary,.hub .accent-button{background:var(--preset-accent);border-color:var(--preset-accent);color:var(--preset-on-accent)}
.hub .hub-primary:hover,.hub .accent-button:hover{background:var(--preset-accent-hover);border-color:var(--preset-accent-strong);color:var(--preset-on-accent)}
html[data-theme=dark] .box.selected-box .tag{color:var(--preset-accent-soft)}
html[data-theme=dark] .translation-menu summary:hover,html[data-theme=dark] .translation-menu[open] summary{background:var(--preset-row-hover);border-color:var(--preset-accent);color:var(--preset-ink)}
/* Appearance palettes live here so each style and color mode is controlled by CSS tokens. */
:root{
  --preset-bg:#f5f5f6;--preset-surface:#f7f7f8;--preset-sidebar:#f1f1f3;--preset-border:#e1e1e4;--preset-ink:#28262d;
  --preset-accent:#8065ad;--preset-accent-strong:#6f5598;--preset-accent-soft:#eee8f6;--preset-hover:#f3eef9;--preset-hover-text:#4f3972;
  --preset-editor-bg:#f5f4f7;--preset-editor-panel:#fbfafc;--preset-editor-surface:#fff;--preset-editor-border:#ded9e5;--preset-editor-ink:#302b35;--preset-editor-muted:#77717d;
  --preset-row-hover:var(--preset-hover);--preset-dialog:#fff;--preset-dialog-subtle:#f7f4fa;--preset-input:#fff;--preset-danger:#a44651;--preset-danger-soft:#fff0f1;
}
html[data-style="modern"]{
  --preset-bg:#f4f7fa;--preset-surface:#fff;--preset-sidebar:#eaf0f5;--preset-border:#d6e0e8;--preset-ink:#263142;
  --preset-accent:#557b9c;--preset-accent-strong:#3f6484;--preset-accent-soft:#e3edf4;--preset-hover:#edf4f8;--preset-hover-text:#345a79;
  --preset-editor-bg:#f1f5f8;--preset-editor-panel:#f8fbfd;--preset-editor-surface:#fff;--preset-editor-border:#d2dfe8;--preset-editor-ink:#273747;--preset-editor-muted:#6d7c89;
  --preset-row-hover:#eaf2f7;--preset-dialog:#fff;--preset-dialog-subtle:#f2f6f9;--preset-input:#fff;--preset-danger:#a44651;--preset-danger-soft:#fff0f1;
}
html[data-style="romantisch"]{
  --preset-bg:#faf5f7;--preset-surface:#fffafb;--preset-sidebar:#f5ebf0;--preset-border:#ead9e2;--preset-ink:#3b2c36;
  --preset-accent:#a76f8d;--preset-accent-strong:#8d5875;--preset-accent-soft:#f4e6ed;--preset-hover:#f8edf2;--preset-hover-text:#78475f;
  --preset-editor-bg:#f8f0f4;--preset-editor-panel:#fff9fc;--preset-editor-surface:#fffefe;--preset-editor-border:#ead4df;--preset-editor-ink:#493542;--preset-editor-muted:#8b7482;
  --preset-row-hover:#f6eaf0;--preset-dialog:#fffafb;--preset-dialog-subtle:#f8eef3;--preset-input:#fff;--preset-danger:#a44651;--preset-danger-soft:#fff0f1;
}
html[data-style="verspielt"]{
  --preset-bg:#f7f7fc;--preset-surface:#fcfbff;--preset-sidebar:#efedfa;--preset-border:#e0dcf2;--preset-ink:#302a42;
  --preset-accent:#8065ad;--preset-accent-strong:#6f5598;--preset-accent-soft:#eee8f6;--preset-hover:#f1edfa;--preset-hover-text:#58417e;
  --preset-editor-bg:#f2eff9;--preset-editor-panel:#faf8ff;--preset-editor-surface:#fff;--preset-editor-border:#ded7f0;--preset-editor-ink:#352d48;--preset-editor-muted:#766c8c;
  --preset-row-hover:#eee9f8;--preset-dialog:#fff;--preset-dialog-subtle:#f4f0fa;--preset-input:#fff;--preset-danger:#a44651;--preset-danger-soft:#fff0f1;
}
html[data-style="own"]{--preset-bg:#f5f5f6;--preset-surface:#f7f7f8;--preset-sidebar:#f1f1f3;--preset-border:#e1e1e4;--preset-ink:#28262d;--preset-accent:#8065ad;--preset-accent-strong:#6f5598;--preset-accent-soft:#eee8f6;--preset-hover:#f3eef9;--preset-hover-text:#4f3972;--preset-editor-bg:#f5f4f7;--preset-editor-panel:#fbfafc;--preset-editor-surface:#fff;--preset-editor-border:#ded9e5;--preset-editor-ink:#302b35;--preset-editor-muted:#77717d;--preset-row-hover:var(--preset-hover);--preset-dialog:#fff;--preset-dialog-subtle:#f7f4fa;--preset-input:#fff;--preset-danger:#a44651;--preset-danger-soft:#fff0f1}
html[data-theme="dark"]{
  --preset-bg:#1d1a22;--preset-surface:#24212a;--preset-sidebar:#211e26;--preset-border:#403947;--preset-ink:#eeeaf2;
  --preset-editor-bg:#1d1a22;--preset-editor-panel:#211e26;--preset-editor-surface:#2a2630;--preset-editor-border:#403947;--preset-editor-ink:#eeeaf2;--preset-editor-muted:#b7afbf;
  --preset-row-hover:#38313f;--preset-dialog:#211e26;--preset-dialog-subtle:#2a2630;--preset-input:#302c36;--preset-danger:#ed9da4;--preset-danger-soft:#432d34;
}
html[data-theme="dark"][data-style="modern"]{--preset-accent:#79a9cc;--preset-accent-strong:#9bc2df;--preset-accent-soft:#354a5a;--preset-hover:#2d3d49;--preset-hover-text:#d9ecf8}
html[data-theme="dark"][data-style="romantisch"]{--preset-accent:#d28eac;--preset-accent-strong:#e5afc4;--preset-accent-soft:#503846;--preset-hover:#43313c;--preset-hover-text:#f4dce6}
html[data-theme="dark"][data-style="verspielt"]{--preset-accent:#aa8bd4;--preset-accent-strong:#cfb8f0;--preset-accent-soft:#40354f;--preset-hover:#393044;--preset-hover-text:#eee4fc}
html[data-theme="dark"][data-style="standard"],html[data-theme="dark"][data-style="own"]{--preset-accent:#aa8bd4;--preset-accent-strong:#cfb8f0;--preset-accent-soft:#40354f;--preset-hover:#393044;--preset-hover-text:#eee4fc}

/* Glossary: consistent surfaces, readable alternating rows and explicit hover feedback. */
#glossaryDialog{background:var(--preset-dialog);border-color:var(--preset-border);color:var(--preset-ink)}
#glossaryDialog .dialog-header,#glossaryDialog .dialog-footer{background:var(--preset-dialog-subtle);border-color:var(--preset-border)}
#glossaryDialog .dialog-header h2,#glossaryDialog .glossary-section-heading h3{color:var(--preset-ink)}
#glossaryDialog .glossary-dialog-subtitle,#glossaryDialog .glossary-section-heading p,#glossaryDialog .glossary-search-label{color:var(--preset-editor-muted)}
#glossaryDialog .glossary-add-section{border-color:var(--preset-border);background:linear-gradient(135deg,var(--preset-dialog-subtle),var(--preset-editor-panel))}
#glossaryDialog .glossary-count{background:var(--preset-accent-soft);color:var(--preset-accent-strong)}
#glossaryDialog .glossary-entry input,#glossaryDialog .glossary-entry select,#glossaryDialog .glossary-search-label input,#glossaryDialog .glossary-table input{background:var(--preset-input);border-color:var(--preset-border);color:var(--preset-ink)}
#glossaryDialog .glossary-entry input:focus,#glossaryDialog .glossary-entry select:focus,#glossaryDialog .glossary-search-label input:focus,#glossaryDialog .glossary-table input:focus{border-color:var(--preset-accent)!important;box-shadow:0 0 0 3px color-mix(in srgb,var(--preset-accent) 20%,transparent)!important;background:var(--preset-input)}
#glossaryDialog .glossary-list{background:var(--preset-editor-panel);border-color:var(--preset-border)}
#glossaryDialog .glossary-table th{background:var(--preset-dialog-subtle);color:var(--preset-editor-muted);border-color:var(--preset-border)}
#glossaryDialog .glossary-table tbody tr td{background:var(--preset-editor-panel);color:var(--preset-ink);border-color:var(--preset-border)}
#glossaryDialog .glossary-table tbody tr:nth-child(even) td{background:var(--preset-editor-surface)}
#glossaryDialog .glossary-table tbody tr:hover td{background:var(--preset-row-hover)!important}
#glossaryDialog .glossary-table .glossary-tag{background:var(--preset-accent-soft);border-color:var(--preset-border);color:var(--preset-accent-strong)}
#glossaryDialog .glossary-table .glossary-tag-input{background:transparent!important;color:var(--preset-ink)}
#glossaryDialog .glossary-table .glossary-tag-remove{color:var(--preset-accent-strong)!important}
#glossaryDialog .glossary-table .glossary-tag-remove:hover{background:var(--preset-hover)!important;color:var(--preset-hover-text)!important}
#glossaryDialog .glossary-table button:not(.glossary-tag-remove){color:var(--preset-danger)}
#glossaryDialog .glossary-table button:not(.glossary-tag-remove):hover{background:var(--preset-danger-soft);color:var(--preset-danger)}
#glossaryDialog .glossary-tabs button{background:var(--preset-dialog-subtle);border-color:var(--preset-border);color:var(--preset-editor-muted)}
#glossaryDialog .glossary-tabs button:hover{background:var(--preset-hover);border-color:var(--preset-accent);color:var(--preset-hover-text)}
#glossaryDialog .glossary-tabs button.active{background:var(--preset-accent-soft);border-color:var(--preset-accent);color:var(--preset-accent-strong)}
#glossaryDialog .dialog-footer button:not(.accent-button),#glossaryDialog .glossary-dialog-footer button:not(.accent-button){background:var(--preset-dialog);border-color:var(--preset-border);color:var(--preset-ink)}
#glossaryDialog .dialog-footer button:not(.accent-button):hover,#glossaryDialog .glossary-dialog-footer button:not(.accent-button):hover{background:var(--preset-hover);border-color:var(--preset-accent);color:var(--preset-hover-text)}
#glossaryDialog .dialog-footer .accent-button,#glossaryDialog .glossary-dialog-footer .accent-button{background:var(--preset-accent);border-color:var(--preset-accent);color:var(--preset-on-accent)}
#glossaryDialog .dialog-footer .accent-button:hover,#glossaryDialog .glossary-dialog-footer .accent-button:hover{background:var(--preset-accent-strong);border-color:var(--preset-accent-strong)}

/* Translation row hover remains subtle in both modes and follows the selected palette. */
.translation-list .line.hovered:not(.active),.translation-list .line:hover:not(.active){background:var(--preset-row-hover)!important;border-color:var(--preset-border);color:var(--preset-ink)}
.translation-list .line.active,.translation-list .line.active:hover{background:var(--preset-editor-surface);border-color:var(--preset-border);color:var(--preset-editor-ink)}
.translation-list .line-drag-ghost{background:var(--preset-editor-surface)!important;border-color:var(--preset-accent)!important;color:var(--preset-editor-ink)}
.translation-list .line.hovered .line-head .label,.translation-list .line:hover .line-head .label{color:var(--preset-accent-strong)}
.translation-list .line-head button:hover,.translation-list .line-actions button:hover{background:var(--preset-hover);color:var(--preset-accent-strong)}

/* The band wizard uses the same palette for its step rail, form, preview and footer. */
.volume-wizard{--theme-accent:var(--preset-accent);background:var(--preset-dialog);border-color:var(--preset-border);color:var(--preset-ink)}
.volume-wizard .wizard-steps{background:linear-gradient(165deg,color-mix(in srgb,var(--preset-accent) 82%,white) 0%,var(--preset-accent) 55%,color-mix(in srgb,var(--preset-accent) 42%,black) 100%);color:#fff}
.volume-wizard .wizard-main,.volume-wizard .wizard-footer{background:var(--preset-dialog);border-color:var(--preset-border);color:var(--preset-ink)}
.volume-wizard .wizard-body h2{color:var(--preset-ink)}
.volume-wizard .wizard-body>p,.volume-wizard .wizard-body label,.volume-wizard .wizard-manual-labels strong,.volume-wizard .wizard-page-order strong{color:var(--preset-ink)}
.volume-wizard .wizard-body small,.volume-wizard .wizard-drop span,.volume-wizard .wizard-page-nav,.volume-wizard .wizard-manual-labels small{color:var(--preset-editor-muted)}
.volume-wizard .wizard-body input:not([type=checkbox]):not([type=range]),.volume-wizard .wizard-body select{background:var(--preset-input);border-color:var(--preset-border);color:var(--preset-ink)}
.volume-wizard .wizard-body input:focus,.volume-wizard .wizard-body select:focus{border-color:var(--preset-accent);outline:0;box-shadow:0 0 0 3px color-mix(in srgb,var(--preset-accent) 20%,transparent)}
.volume-wizard .wizard-manual-labels,.volume-wizard .wizard-drop,.volume-wizard .wizard-preview,.volume-wizard .wizard-pdf-options{background:var(--preset-dialog-subtle);border-color:var(--preset-border);color:var(--preset-ink)}
.volume-wizard .wizard-drop{border-style:dashed}
.volume-wizard .wizard-drop.dragging{background:var(--preset-accent-soft);border-color:var(--preset-accent)}
.volume-wizard .wizard-footer button,.volume-wizard .wizard-drop button,.volume-wizard .wizard-page-nav button,.volume-wizard .wizard-page-tools button,.volume-wizard .wizard-sort-list button{background:var(--preset-dialog);border-color:var(--preset-border);color:var(--preset-ink)}
.volume-wizard .wizard-footer button:hover:not(:disabled),.volume-wizard .wizard-drop button:hover:not(:disabled),.volume-wizard .wizard-page-nav button:hover:not(:disabled),.volume-wizard .wizard-page-tools button:hover:not(:disabled),.volume-wizard .wizard-sort-list button:hover{background:var(--preset-hover);border-color:var(--preset-accent);color:var(--preset-hover-text)}
.volume-wizard .wizard-footer button.hub-primary,.volume-wizard .wizard-footer .hub-primary{background:var(--preset-accent);border-color:var(--preset-accent);color:var(--preset-on-accent)}
.volume-wizard .wizard-footer button.hub-primary:hover:not(:disabled),.volume-wizard .wizard-footer .hub-primary:hover:not(:disabled){background:var(--preset-accent-hover);border-color:var(--preset-accent-strong);color:var(--preset-on-accent)}
.volume-wizard .wizard-page-tools button.active,.volume-wizard .wizard-sort-list button.current{background:var(--preset-accent-soft);border-color:var(--preset-accent);color:var(--preset-accent-strong)}
.volume-wizard .wizard-delete{background:var(--preset-danger-soft);border-color:color-mix(in srgb,var(--preset-danger) 35%,var(--preset-border));color:var(--preset-danger)}
.volume-wizard .wizard-delete:hover{background:color-mix(in srgb,var(--preset-danger) 18%,var(--preset-dialog));color:var(--preset-danger)}
.volume-wizard .wizard-close{color:var(--preset-editor-muted)!important}
html[data-theme="dark"] .volume-wizard .wizard-step{color:var(--preset-ink)}
html[data-theme="dark"] .volume-wizard .wizard-step:not(.active){opacity:.75}
html[data-theme="dark"] .volume-wizard .wizard-step.active span{background:var(--preset-dialog);border-color:var(--preset-dialog);color:var(--preset-accent)}
html[data-theme="dark"] .volume-wizard .wizard-divider{background:var(--preset-accent);box-shadow:0 0 0 4px color-mix(in srgb,var(--preset-accent) 30%,transparent)}
html[data-theme="dark"] .volume-wizard .wizard-page-nav button,html[data-theme="dark"] .volume-wizard .wizard-page-tools button,html[data-theme="dark"] .volume-wizard .wizard-sort-list button{background:var(--preset-input);border-color:var(--preset-border);color:var(--preset-ink)}
html[data-theme="dark"] .volume-wizard .wizard-page-tools button.active,html[data-theme="dark"] .volume-wizard .wizard-sort-list button.current{background:var(--preset-accent-soft);border-color:var(--preset-accent);color:var(--preset-accent-strong)}
/* Remaining editor accents use the same preset tokens. */
.search-dialog .dialog-header,.search-dialog .dialog-footer{background:var(--preset-dialog-subtle);border-color:var(--preset-border)}
.search-dialog .dialog-header h2,.search-dialog .search-options label,.search-dialog .search-main-field,.search-dialog .search-replace-field{color:var(--preset-ink)}
.search-dialog .search-options,.search-dialog .search-main-field input,.search-dialog .search-replace-field input,.search-result-toolbar button,.search-hit,.search-nav-button{background:var(--preset-dialog);border-color:var(--preset-border);color:var(--preset-ink)}
.search-dialog .search-main-field input:focus,.search-dialog .search-replace-field input:focus{border-color:var(--preset-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--preset-accent) 20%,transparent)}
.search-hit:hover,.search-hit:focus-visible,.search-nav-button:hover:not(:disabled){background:var(--preset-hover);border-color:var(--preset-accent);color:var(--preset-hover-text)}
.search-hit-meta,.search-result-toolbar p,.search-option-help,.search-more{color:var(--preset-editor-muted)}
.search-hit mark,.search-tool-button.active,.search-tool-button[aria-pressed=true]{background:var(--preset-accent-soft);border-color:var(--preset-accent);color:var(--preset-accent-strong)}
.search-tool-button:hover,.search-nav-button:hover:not(:disabled){background:var(--preset-hover);border-color:var(--preset-accent);color:var(--preset-hover-text)}
.search-scope-icon,.search-filter-count{color:var(--preset-accent)}
.search-filter-count{background:var(--preset-accent);color:var(--preset-on-accent)}
.settings-tabs button.active,.settings-tabs input:checked+label{color:var(--preset-accent-strong);border-bottom-color:var(--preset-accent)}
.settings-tabs input:focus-visible+label{outline-color:var(--preset-accent)}
.selection-marquee,.selection-outline{border-color:var(--preset-accent);background:color-mix(in srgb,var(--preset-accent) 8%,transparent)}
.selection-outline{background:transparent}
.selection-tools button{border-color:var(--preset-accent);color:var(--preset-accent);background:var(--preset-dialog)}
.selection-tools button:hover{background:var(--preset-hover);color:var(--preset-hover-text)}
.side-switch button.active{border-color:var(--preset-accent);background:var(--preset-accent-soft);color:var(--preset-accent-strong)}
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea{color-scheme:dark}
html[data-theme="dark"] .search-dialog .search-options,html[data-theme="dark"] .search-dialog .search-main-field input,html[data-theme="dark"] .search-dialog .search-replace-field input,html[data-theme="dark"] .search-result-toolbar button,html[data-theme="dark"] .search-hit,html[data-theme="dark"] .search-nav-button{background:var(--preset-input);border-color:var(--preset-border);color:var(--preset-ink)}
html[data-theme="dark"] .search-hit:hover,html[data-theme="dark"] .search-hit:focus-visible,html[data-theme="dark"] .search-nav-button:hover:not(:disabled),html[data-theme="dark"] .search-tool-button:hover{background:var(--preset-hover);border-color:var(--preset-accent);color:var(--preset-hover-text)}
html[data-theme="dark"] .search-tool-button.active,html[data-theme="dark"] .search-tool-button[aria-pressed=true]{background:var(--preset-accent-soft);border-color:var(--preset-accent);color:var(--preset-accent-strong)}
html[data-theme="dark"] .selection-tools button{background:var(--preset-input);border-color:var(--preset-accent);color:var(--preset-accent-strong)}
html[data-theme="dark"] .side-switch button{background:var(--preset-input);border-color:var(--preset-border);color:var(--preset-editor-muted)}
html[data-theme="dark"] .side-switch button.active{background:var(--preset-accent-soft);border-color:var(--preset-accent);color:var(--preset-accent-strong)}
.glossary-hover-card{background:var(--preset-dialog);border-color:var(--preset-border);color:var(--preset-ink);box-shadow:0 10px 30px #09060d66}
.glossary-hover-term{color:var(--preset-accent-strong)}
.glossary-hover-note{border-color:var(--preset-border);color:var(--preset-editor-muted)}
html[data-theme="dark"] .glossary-hover-card{background:var(--preset-dialog);border-color:var(--preset-border);color:var(--preset-ink)}
html[data-theme="dark"] .glossary-hover-note{border-color:var(--preset-border);color:var(--preset-editor-muted)}
.glossary-cloud-icon{color:var(--preset-accent)}
/* Shared action-button system: match search dialog dimensions, colors, hover and disabled states. */
:where(dialog) .dialog-footer button:not(.dialog-close):not(.danger-button),
.hub-heading-actions button,.series-actions button,.project-section-head button,.project-toolbar button:not(.dialog-close),
.ocr-engine-actions button,.template-list button:not(.template-row button),.template-dialog footer button,
.wizard-footer button:not(.danger-button),.wizard-drop button,.wizard-page-nav button,.page-manager-tools button,
.google-cloud-actions button,.series-glossary-cloud [data-cloud-glossary-sync],#glossaryDialog .glossary-entry>button,
.hub-dialog .hub-primary,.hub-dialog-actions button,.hub-dialog-footer button{
  min-height:39px;margin:0;padding:8px 14px;border:1px solid var(--preset-border);border-radius:8px;background:var(--preset-dialog);color:var(--preset-ink);font:inherit;font-weight:600;box-shadow:0 1px 2px #2413310a;transition:background .15s,border-color .15s,color .15s,box-shadow .15s,transform .15s
}
:where(dialog) .dialog-footer button:not(.dialog-close):not(.danger-button):hover:not(:disabled),
.hub-heading-actions button:hover:not(:disabled),.series-actions button:hover:not(:disabled),.project-section-head button:hover:not(:disabled),
.project-toolbar button:hover:not(:disabled),.ocr-engine-actions button:hover:not(:disabled),.template-dialog footer button:hover:not(:disabled),
.wizard-footer button:hover:not(:disabled),.wizard-drop button:hover:not(:disabled),.wizard-page-nav button:hover:not(:disabled),
.page-manager-tools button:hover:not(:disabled),.google-cloud-actions button:hover:not(:disabled),
.series-glossary-cloud [data-cloud-glossary-sync]:hover:not(:disabled),#glossaryDialog .glossary-entry>button:hover:not(:disabled),
.hub-dialog-actions button:hover:not(:disabled),.hub-dialog-footer button:hover:not(:disabled){
  border-color:var(--preset-accent);background:var(--preset-hover);color:var(--preset-hover-text);box-shadow:0 2px 6px #24133112;transform:translateY(-1px)
}
:where(dialog) .dialog-footer button.accent-button:not(.danger-button),.hub-heading-actions button.hub-primary,.ocr-engine-actions button.hub-primary,
.template-dialog footer button.hub-primary,.wizard-footer button.hub-primary,.google-cloud-actions button.hub-primary,
.hub-dialog .hub-primary,#glossaryDialog .glossary-entry>button.accent-button,.series-glossary-cloud [data-cloud-glossary-sync]{
  border-color:var(--preset-accent);background:var(--preset-accent);color:var(--preset-on-accent);box-shadow:0 2px 5px color-mix(in srgb,var(--preset-accent) 28%,transparent)
}
:where(dialog) .dialog-footer button.accent-button:hover:not(:disabled),.hub-heading-actions button.hub-primary:hover:not(:disabled),
.ocr-engine-actions button.hub-primary:hover:not(:disabled),.template-dialog footer button.hub-primary:hover:not(:disabled),
.wizard-footer button.hub-primary:hover:not(:disabled),.google-cloud-actions button.hub-primary:hover:not(:disabled),
.hub-dialog .hub-primary:hover:not(:disabled),#glossaryDialog .glossary-entry>button.accent-button:hover:not(:disabled),
.series-glossary-cloud [data-cloud-glossary-sync]:hover:not(:disabled){
  border-color:var(--preset-accent-strong);background:var(--preset-accent-hover);color:var(--preset-on-accent);box-shadow:0 4px 9px color-mix(in srgb,var(--preset-accent) 32%,transparent);transform:translateY(-1px)
}
:where(dialog) .dialog-footer button:not(.dialog-close):not(.danger-button):focus-visible,.hub-heading-actions button:focus-visible,
.series-actions button:focus-visible,.project-section-head button:focus-visible,.project-toolbar button:focus-visible,
.ocr-engine-actions button:focus-visible,.template-dialog footer button:focus-visible,.wizard-footer button:focus-visible,
.wizard-drop button:focus-visible,.wizard-page-nav button:focus-visible,.page-manager-tools button:focus-visible,
.google-cloud-actions button:focus-visible,.series-glossary-cloud [data-cloud-glossary-sync]:focus-visible,
#glossaryDialog .glossary-entry>button:focus-visible,.hub-dialog-actions button:focus-visible,.hub-dialog-footer button:focus-visible{
  outline:2px solid var(--preset-accent);outline-offset:2px
}
:where(dialog) .dialog-footer button:disabled,.hub-heading-actions button:disabled,.series-actions button:disabled,
.project-section-head button:disabled,.project-toolbar button:disabled,.ocr-engine-actions button:disabled,
.template-dialog footer button:disabled,.wizard-footer button:disabled,.wizard-drop button:disabled,
.wizard-page-nav button:disabled,.page-manager-tools button:disabled,.google-cloud-actions button:disabled,
.series-glossary-cloud [data-cloud-glossary-sync]:disabled,#glossaryDialog .glossary-entry>button:disabled,
.hub-dialog-actions button:disabled,.hub-dialog-footer button:disabled{
  opacity:1;cursor:not-allowed;box-shadow:none;transform:none
}
:where(dialog) .dialog-footer button.accent-button:disabled,.hub-heading-actions button.hub-primary:disabled,.wizard-footer button.hub-primary:disabled,
.template-dialog footer button.hub-primary:disabled,#glossaryDialog .glossary-entry>button.accent-button:disabled{
  background:var(--preset-accent-soft);border-color:var(--preset-border);color:var(--preset-accent-strong)
}
:where(dialog) .dialog-footer button.plain-button:hover:not(:disabled),.hub-dialog-actions button:not(.hub-primary):hover:not(:disabled),
.hub-dialog-footer button:not(.hub-primary):hover:not(:disabled){background:var(--preset-hover);border-color:var(--preset-accent);color:var(--preset-hover-text)}

/* Editor profile button opens the same account menu used by the dashboard. */
.editor-profile-wrap{position:relative}
.editor-profile-menu{position:fixed;z-index:400;width:min(290px,calc(100vw - 78px));padding:7px;border:1px solid var(--preset-border);border-radius:12px;background:var(--preset-dialog);color:var(--preset-ink);box-shadow:0 14px 40px #17121f35}
.editor-profile-menu[hidden]{display:none!important}
.editor-profile-menu .profile-menu-identity{display:flex;align-items:center;gap:11px;padding:10px 10px 13px;border-bottom:1px solid var(--preset-border);margin-bottom:5px}
.editor-profile-menu .hub-profile-copy{display:flex;flex:1;min-width:0;flex-direction:column;gap:2px}
.editor-profile-menu .hub-profile-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}
.editor-profile-menu .hub-profile-copy small{font-size:11px;color:var(--preset-editor-muted)}
.editor-profile-menu>button{display:flex;width:100%;min-height:40px;align-items:center;gap:12px;padding:9px 10px;border:0;border-radius:8px;background:transparent;color:inherit;text-align:left;font:inherit;cursor:pointer;text-decoration:none!important}
.editor-profile-menu>button:hover,.editor-profile-menu>button:focus-visible{background:var(--preset-hover);color:var(--preset-hover-text);text-decoration:none!important;outline:none}
.rail button.avatar{background:var(--preset-accent);color:var(--preset-on-accent)}
.rail button.avatar:hover,.rail button.avatar[aria-expanded="true"]{background:var(--preset-accent-hover);color:var(--preset-on-accent);border-color:var(--preset-accent-strong)}
html[data-theme="dark"] .editor-profile-menu{background:var(--preset-dialog);border-color:var(--preset-border);color:var(--preset-ink)}
html[data-theme="dark"] .editor-profile-menu .hub-profile-copy small{color:var(--preset-editor-muted)}
html[data-theme="dark"] .editor-profile-menu>button:hover,html[data-theme="dark"] .editor-profile-menu>button:focus-visible{background:var(--preset-hover);color:var(--preset-hover-text)}

/* Dark wizard rail retains the chosen accent without turning into a light panel. */
html[data-theme="dark"] .volume-wizard .wizard-steps{background:linear-gradient(160deg,color-mix(in srgb,var(--preset-accent) 36%,var(--preset-input)),color-mix(in srgb,var(--preset-accent) 18%,var(--preset-bg)) 55%,var(--preset-bg));color:color-mix(in srgb,var(--preset-ink) 76%,#fff)}
html[data-theme="dark"] .volume-wizard .wizard-step{color:var(--preset-ink)}
html[data-theme="dark"] .volume-wizard .wizard-step span{background:transparent;border-color:color-mix(in srgb,var(--preset-accent) 55%,color-mix(in srgb,var(--preset-border) 11%,var(--preset-editor-muted)));color:var(--preset-ink)}
html[data-theme="dark"] .volume-wizard .wizard-step.active span{background:var(--preset-accent-soft);border-color:var(--preset-accent);color:var(--preset-accent-strong)}
html[data-theme="dark"] .volume-wizard .wizard-delete{background:var(--preset-danger-soft);border-color:color-mix(in srgb,var(--preset-danger) 40%,var(--preset-border));color:var(--preset-danger)}
.user-settings-footer button{min-height:39px;margin:0;padding:8px 14px;border:1px solid var(--preset-border);border-radius:8px;background:var(--preset-dialog);color:var(--preset-ink);font:inherit;font-weight:600;box-shadow:0 1px 2px #2413310a;transition:background .15s,border-color .15s,color .15s,box-shadow .15s,transform .15s}
.user-settings-footer button:hover:not(:disabled){background:var(--preset-hover);border-color:var(--preset-accent);color:var(--preset-hover-text);transform:translateY(-1px)}
.user-settings-footer button.accent-button{background:var(--preset-accent);border-color:var(--preset-accent);color:var(--preset-on-accent);box-shadow:0 2px 5px color-mix(in srgb,var(--preset-accent) 28%,transparent)}
.user-settings-footer button.accent-button:hover:not(:disabled){background:var(--preset-accent-hover);border-color:var(--preset-accent-strong);color:var(--preset-on-accent)}
.user-settings-footer button.accent-button:disabled{background:var(--preset-accent-soft);border-color:var(--preset-border);color:var(--preset-accent-strong);opacity:1;cursor:not-allowed;box-shadow:none;transform:none}
/* Keep the search dialog as the source of truth for button styling and color it by the active preset. */
.search-dialog .dialog-footer .plain-button{min-height:39px;margin:0;padding:8px 14px;border:1px solid var(--preset-border);border-radius:8px;background:var(--preset-dialog);color:var(--preset-ink);font-weight:600;box-shadow:0 1px 2px #2413310a;transition:background .15s,border-color .15s,color .15s,box-shadow .15s}
.search-dialog .dialog-footer .plain-button:hover:not(:disabled){background:var(--preset-hover);border-color:var(--preset-accent);color:var(--preset-hover-text);transform:none}
.search-dialog .dialog-footer .accent-button{min-height:39px;margin:0;padding:8px 14px;border:1px solid var(--preset-accent);border-radius:8px;background:var(--preset-accent);color:var(--preset-on-accent);font-weight:600;box-shadow:0 2px 5px color-mix(in srgb,var(--preset-accent) 28%,transparent);transition:background .15s,border-color .15s,color .15s,box-shadow .15s,transform .15s}
.search-dialog .dialog-footer .accent-button:hover:not(:disabled){background:var(--preset-accent-hover);border-color:var(--preset-accent-strong);color:var(--preset-on-accent);transform:translateY(-1px)}
.search-dialog .dialog-footer button:disabled{opacity:1;cursor:not-allowed;box-shadow:none;transform:none}
.search-dialog .dialog-footer .accent-button:disabled{background:var(--preset-accent-soft);border-color:var(--preset-border);color:var(--preset-accent-strong)}
.search-tool-button{background:var(--preset-dialog);border-color:var(--preset-border);color:var(--preset-editor-muted)}
.search-tool-button:hover{background:var(--preset-hover);border-color:var(--preset-accent);color:var(--preset-hover-text)}
.search-tool-button.active,.search-tool-button[aria-pressed="true"]{background:var(--preset-accent-soft);border-color:var(--preset-accent);color:var(--preset-accent-strong)}
/* Accent shades share one automatic radius in every preset. */
:root{--default-accent:#8065ad;--preset-accent-strong:color-mix(in srgb,var(--preset-accent) 76%,black);--preset-accent-soft:color-mix(in srgb,var(--preset-accent) 11%,white);--preset-hover:color-mix(in srgb,var(--preset-accent) 7%,white);--preset-hover-text:var(--preset-accent-strong)}
html[data-style]:not([data-theme="dark"]){--preset-accent-strong:color-mix(in srgb,var(--preset-accent) 76%,black);--preset-accent-soft:color-mix(in srgb,var(--preset-accent) 11%,white);--preset-hover:color-mix(in srgb,var(--preset-accent) 7%,white);--preset-hover-text:var(--preset-accent-strong)}
html[data-theme="dark"][data-style]{--preset-accent-strong:color-mix(in srgb,var(--preset-accent) 84%,white);--preset-accent-soft:color-mix(in srgb,var(--preset-accent) 28%,var(--preset-surface));--preset-hover:color-mix(in srgb,var(--preset-accent) 20%,var(--preset-surface));--preset-hover-text:color-mix(in srgb,var(--preset-ink) 75%,#fff)}
html[data-style="own"]:not([data-theme="dark"]){--preset-accent:var(--user-custom-accent,var(--default-accent))}
html[data-theme="dark"][data-style="own"]{--preset-accent:color-mix(in srgb,var(--user-custom-accent,var(--default-accent)) 68%,white);--preset-accent-strong:color-mix(in srgb,var(--preset-accent) 84%,white);--preset-accent-soft:color-mix(in srgb,var(--preset-accent) 28%,var(--preset-surface));--preset-hover:color-mix(in srgb,var(--preset-accent) 20%,var(--preset-surface));--preset-hover-text:color-mix(in srgb,var(--preset-ink) 75%,#fff)}
.hub .custom-accent-color{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0;padding:11px 13px;border:1px solid var(--preset-border);border-radius:9px;background:var(--preset-dialog-subtle);color:var(--preset-ink);font-weight:600}
.hub .custom-accent-color input[type=color]{width:48px;height:36px;padding:3px;border:1px solid var(--preset-border);border-radius:7px;background:var(--preset-dialog);cursor:pointer}
html[data-theme="dark"] .hub .custom-accent-color{background:var(--preset-dialog-subtle);border-color:var(--preset-border);color:var(--preset-ink)}
html[data-theme="dark"] .hub .custom-accent-color input[type=color]{background:var(--preset-input);border-color:var(--preset-border)}
.volume-progress span{background:var(--preset-accent)!important}
.volume-progress{background:var(--preset-accent-soft)}
.hub .calendar-day.today .day-top b{border-color:var(--preset-accent);color:var(--preset-accent-strong)}
.open-project-tab[aria-selected=true]{border-color:var(--preset-accent);border-bottom-color:var(--preset-accent)}
.template-row small{background:var(--preset-accent-soft);color:var(--preset-accent-strong)}
html[data-theme="dark"] .template-row small{background:var(--preset-accent-soft);color:var(--preset-accent-strong)}
/* Calendar, template and editor state accents also follow the active style. */
.hub .event{background:var(--preset-accent-soft);color:var(--preset-accent-strong)}
.hub .event.deadline{background:color-mix(in srgb,var(--preset-accent) 68%,var(--preset-ink));color:#fff}
html[data-theme="dark"] .hub .event{background:var(--preset-accent-soft);color:var(--preset-accent-strong)}
html[data-theme="dark"] .hub .event.deadline{background:color-mix(in srgb,var(--preset-accent) 42%,var(--preset-dialog));color:var(--preset-ink)}
.template-editor nav button.active,.template-subtabs button.active,.template-subtabs button[aria-selected="true"]{background:var(--preset-accent-soft);border-color:var(--preset-accent);color:var(--preset-accent-strong)}
.template-body .template-choice button.selected,.template-body .template-switch:checked{accent-color:var(--preset-accent)}
.template-editor nav button:hover,.template-subtabs button:hover{background:var(--preset-hover);border-color:var(--preset-accent);color:var(--preset-hover-text)}
html[data-theme="dark"] .template-editor nav button.active,html[data-theme="dark"] .template-subtabs button.active,html[data-theme="dark"] .template-subtabs button[aria-selected="true"],html[data-theme="dark"] .template-body .template-choice button.selected{background:var(--preset-accent-soft);border-color:var(--preset-accent);color:var(--preset-accent-strong)}
.translation-tools button.selected,.format-tools button.selected{background:var(--preset-accent-soft);color:var(--preset-accent-strong)}
html[data-theme="dark"] .translation-tools button.selected,html[data-theme="dark"] .format-tools button.selected{background:var(--preset-accent-soft);color:var(--preset-accent-strong)}

/* Finish accent-color coverage for controls that still had the old orange template/editor state. */
.template-dialog,.template-editor,.template-body{--template-accent:var(--preset-accent)}
.template-editor nav button.active,.template-subtabs button.active,.template-subtabs button[aria-selected="true"]{border-color:var(--preset-accent);background:var(--preset-accent-soft);color:var(--preset-accent-strong)}
.template-editor nav button:hover,.template-subtabs button:hover{border-color:var(--preset-accent);background:var(--preset-hover);color:var(--preset-hover-text)}
.template-body .template-choice button.selected{border-color:var(--preset-accent);color:var(--preset-accent-strong)}
.template-body .template-switch:checked{background:var(--preset-accent)}
.template-body .template-switch:focus-visible,.template-body .template-choice button:focus-visible{outline:2px solid var(--preset-accent);outline-offset:2px}
.hub .calendar-day .day-add:hover,.hub .calendar-day .day-add:focus-visible{background:var(--preset-hover)!important;border-color:var(--preset-accent)!important;color:var(--preset-hover-text)!important}
.hub .calendar-day .day-add{color:var(--preset-accent-strong)}
.hub .event.deadline{background:color-mix(in srgb,var(--preset-accent) 82%,var(--preset-ink));border-color:var(--preset-accent);color:#fff}
html[data-theme="dark"] .hub .event.deadline{background:color-mix(in srgb,var(--preset-accent) 60%,var(--preset-dialog));border-color:var(--preset-accent);color:var(--preset-ink)}
.hub .volume-progress span{background:var(--preset-accent)}
.hub .project-progress,.hub .volume-progress{accent-color:var(--preset-accent)}
.user-settings-nav button:hover,.user-settings-nav button.active{background:var(--preset-hover);border-color:var(--preset-accent);color:var(--preset-hover-text)}
html[data-theme="dark"] .user-settings-nav button:hover,html[data-theme="dark"] .user-settings-nav button.active,html[data-theme="dark"] .appearance-option.active,html[data-theme="dark"] .appearance-style.active{background:var(--preset-accent-soft);border-color:var(--preset-accent);color:var(--preset-accent-strong)}
.search-dialog input:focus-visible,.search-dialog select:focus-visible,.glossary-dialog input:focus-visible,.glossary-dialog select:focus-visible{outline-color:var(--preset-accent)}
.avatar svg{display:block;width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
html[data-theme="dark"] .page-manager{background:var(--preset-dialog);color:var(--preset-ink)}
html[data-theme="dark"] .page-manager-head,html[data-theme="dark"] .page-manager-tools{background:var(--preset-dialog-subtle);border-color:var(--preset-border);color:var(--preset-ink)}
html[data-theme="dark"] .page-manager-head h2{color:var(--preset-ink)}
html[data-theme="dark"] .page-manager-head p,html[data-theme="dark"] .page-manager-tools #pageSelectionCount{color:var(--preset-editor-muted)}
html[data-theme="dark"] .page-manager-head button,html[data-theme="dark"] .page-manager-tools button:not(.accent-button){background:var(--preset-input);border-color:var(--preset-border);color:var(--preset-ink)}
html[data-theme="dark"] .page-manager-head button:hover,html[data-theme="dark"] .page-manager-tools button:not(.accent-button):hover:not(:disabled){background:var(--preset-hover);border-color:var(--preset-accent);color:var(--preset-hover-text)}
html[data-theme="dark"] .page-manager-tools .accent-button{background:var(--preset-accent);border-color:var(--preset-accent);color:var(--preset-on-accent)}
html[data-theme="dark"] .page-thumb{color:var(--preset-ink)}
html[data-theme="dark"] .page-thumb:hover{background:var(--preset-dialog-subtle);border-color:var(--preset-border)}
html[data-theme="dark"] .page-thumb.selected,html[data-theme="dark"] .page-thumb.drag-over{background:var(--preset-accent-soft);border-color:var(--preset-accent);color:var(--preset-accent-strong)}
html[data-theme="dark"] .page-thumb-preview{background:var(--preset-input);border-color:var(--preset-border)}
html[data-theme="dark"] .page-thumb-caption{color:var(--preset-ink)}
html[data-theme="dark"] .page-thumb[aria-busy="true"] .page-thumb-preview::after{color:var(--preset-editor-muted)}
body.page-manager-opening .topbar,body.page-manager-open .topbar{pointer-events:none;opacity:.55;filter:grayscale(.55);user-select:none}
.search-regex-button{white-space:nowrap}
.search-help-wrap{position:relative;margin-left:auto;display:inline-flex;align-items:center}
.search-help-button{width:34px;height:34px;border:1px solid var(--preset-border);border-radius:50%;background:var(--preset-dialog);color:var(--preset-editor-muted);font-weight:700;cursor:help}
.search-help-button:hover,.search-help-button:focus-visible{border-color:var(--preset-accent);color:var(--preset-accent-strong);outline:2px solid color-mix(in srgb,var(--preset-accent) 22%,transparent);outline-offset:2px}
.search-help-tooltip{position:absolute;z-index:60;right:0;top:calc(100% + 8px);display:none;width:min(430px,calc(100vw - 56px));padding:12px 14px;border:1px solid var(--preset-border);border-radius:9px;background:var(--preset-dialog);color:var(--preset-ink);box-shadow:0 12px 32px #0003;font-size:12px;font-weight:400;line-height:1.5}
.search-help-wrap:hover .search-help-tooltip,.search-help-wrap:focus-within .search-help-tooltip{display:block}
.search-help-tooltip code{padding:1px 4px;border-radius:4px;background:var(--preset-accent-soft);color:var(--preset-accent-strong);font-weight:600}
.search-result-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap;margin-left:auto}
.search-result-actions .search-help-wrap{margin-left:0}
@media(max-width:620px){.search-result-toolbar{align-items:flex-start;flex-direction:column}.search-result-actions{width:100%;margin-left:0;justify-content:flex-start}.search-help-tooltip{right:-4px}}
html[data-theme="dark"] .column-resize{background:var(--preset-editor-border);border-color:var(--preset-editor-border)}
html[data-theme="dark"] .column-resize span{border:1px solid var(--preset-editor-muted);background:var(--preset-editor-muted);box-shadow:0 0 0 1px var(--preset-editor-bg)}
html[data-theme="dark"] .column-resize:hover,html[data-theme="dark"] .column-resize.dragging{background:var(--preset-accent);border-color:var(--preset-accent)}
html[data-theme="dark"] .column-resize:hover span,html[data-theme="dark"] .column-resize.dragging span{border-color:var(--preset-accent-strong);background:var(--preset-accent-strong)}
html[data-theme="dark"] .column-resize:focus-visible{outline:2px solid var(--preset-accent);outline-offset:1px}

/* Project view: consistent folder/book icons and clear row interaction states */
.hub .project-icon{width:22px;height:22px;flex:0 0 22px;fill:none;stroke:var(--preset-accent);stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;vertical-align:middle}
.hub .project-tree button{display:flex;align-items:center;gap:10px;min-width:0}
.hub .project-tree button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hub .project-tree button.active{background:var(--preset-accent-soft);color:var(--preset-accent-strong);font-weight:600}
.hub .project-tree button:hover:not(.active){background:var(--preset-hover);color:var(--preset-hover-text)}
.hub .project-tree button:hover .project-icon,.hub .project-tree button.active .project-icon{stroke:var(--preset-accent-strong)}
.hub .project-title-line{display:flex;align-items:center;gap:12px}
.hub .project-title-line>.project-icon{width:31px;height:31px;flex-basis:31px}
.hub .project-title-line h2{margin:0 0 4px}
.hub .project-toolbar #hubBack{display:inline-flex;align-items:center;gap:8px;margin-bottom:12px}
.hub .project-row[data-pick]{transition:background-color .16s ease,color .16s ease}
.hub .project-row[data-pick]:hover{background:var(--preset-hover);color:var(--preset-hover-text)}
.hub .project-row[data-pick]:hover strong{color:var(--preset-hover-text)}
.hub .project-row strong{display:flex;align-items:center;gap:10px;min-width:0}
.hub .project-row strong>span{min-width:0;overflow:hidden;text-overflow:ellipsis}
.hub .volume-row:not(.project-label){transition:background-color .16s ease}
.hub .volume-row:not(.project-label):hover{background:var(--preset-hover)}
.hub .volume-title{display:inline-flex;align-items:center;gap:10px;min-width:0;padding:0;border:0;background:transparent;color:var(--preset-ink);font:inherit;font-weight:500;text-align:left;cursor:pointer}
.hub .volume-title>span{overflow:hidden;text-overflow:ellipsis}
.hub .volume-title:hover{color:var(--preset-accent-strong);text-decoration:underline;text-decoration-color:var(--preset-accent);text-underline-offset:3px}
.hub .volume-title:focus-visible{outline:2px solid var(--preset-accent);outline-offset:3px;border-radius:3px}
.hub .volume-title .project-icon{width:21px;height:21px;flex-basis:21px}
html[data-theme="dark"] .hub .project-tree button:hover:not(.active),html[data-theme="dark"] .hub .project-row[data-pick]:hover{background:var(--preset-accent-soft);color:var(--preset-accent-strong)}
html[data-theme="dark"] .hub .project-row[data-pick]:hover strong,html[data-theme="dark"] .hub .volume-title{color:var(--preset-ink)}
html[data-theme="dark"] .hub .volume-row:not(.project-label):hover{background:var(--preset-accent-soft)}
html[data-theme="dark"] .hub .volume-title:hover{color:var(--preset-accent-strong)}
.hub .volume-row strong{flex-direction:column;align-items:flex-start;gap:5px}
.hub .volume-row .volume-status{margin:0 0 0 31px}
.hub .project-table .volume-row:not(.project-label):hover{background:var(--preset-hover)}
html[data-theme="dark"] .hub .project-table .volume-row:not(.project-label):hover{background:var(--preset-accent-soft)}
.ocr-engine-options{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0 20px}.ocr-engine-options label{display:flex;align-items:center;gap:9px;min-width:190px;padding:11px 14px;border:1px solid var(--preset-border);border-radius:10px;background:var(--preset-dialog);color:var(--preset-ink);font-weight:600;cursor:pointer}.ocr-engine-options label:has(input:checked){border-color:var(--preset-accent);background:var(--preset-hover)}.ocr-engine-options input[type=checkbox]{width:17px;height:17px;margin:0;accent-color:var(--preset-accent)}.ocr-engine-options input:focus-visible{outline:2px solid var(--preset-accent);outline-offset:3px}.ocr-settings-card .ocr-engine-label{max-width:440px}.ocr-settings-card .ocr-engine-actions{margin-top:20px}.ocr-settings-card .ocr-install-status{color:var(--preset-ink)}
html[data-theme=dark] .ocr-engine-options label{background:var(--preset-surface);color:var(--preset-ink)}

/* Kompakte Suchwerkzeuge und Regex-Hinweis im Suchfeld */
.search-dialog .search-main-field .search-query-wrap{position:relative;display:block;width:100%}
.search-dialog .search-query-wrap>input{width:100%;padding-right:48px!important}
.search-dialog .search-query-wrap .search-help-wrap{position:absolute;right:10px;top:50%;transform:translateY(-50%);margin:0;z-index:2}
.search-dialog .search-help-button{display:grid;place-items:center;width:22px;height:22px;padding:0;border:1.5px solid currentColor;background:transparent;color:var(--preset-editor-muted);font-family:inherit;font-size:13px;line-height:1;font-weight:600;cursor:help}
.search-dialog .search-help-button:hover,.search-dialog .search-help-button:focus-visible{color:var(--preset-accent-strong);outline:2px solid color-mix(in srgb,var(--preset-accent) 18%,transparent);outline-offset:2px}
.search-dialog .search-help-tooltip{top:calc(100% + 10px);right:-4px;width:min(380px,calc(100vw - 48px))}
.search-dialog .search-result-actions{flex-wrap:nowrap;gap:8px}
.search-dialog .search-result-actions .search-tool-button{width:40px;min-width:40px;height:40px;padding:0;font-size:0;gap:0}
.search-dialog .search-result-actions .search-tool-button svg{display:block;width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.search-dialog .search-scope-button{position:relative}
.search-dialog .search-scope-button::after{content:attr(data-tooltip);position:absolute;z-index:50;left:50%;top:calc(100% + 8px);transform:translate(-50%,-3px);padding:6px 9px;border:1px solid var(--preset-border);border-radius:7px;background:var(--preset-dialog);color:var(--preset-ink);box-shadow:0 5px 16px #0002;font-size:12px;font-weight:500;line-height:1.25;white-space:nowrap;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .12s,transform .12s}
.search-dialog .search-scope-button:hover::after,.search-dialog .search-scope-button:focus-visible::after{opacity:1;visibility:visible;transform:translate(-50%,0)}
@media(max-width:620px){.search-dialog .search-result-actions{width:auto;margin-left:auto;justify-content:flex-end}.search-dialog .search-result-toolbar{align-items:center;flex-direction:row}.search-dialog .search-result-toolbar p{max-width:48%;font-size:12px}}

/* Ruhiger Übergang beim Wiederherstellen einer Bandseite */
.viewer{position:relative}
.page-loading{position:absolute;inset:0;z-index:8;display:grid;place-content:center;justify-items:center;gap:13px;background:var(--preset-editor-bg,var(--preset-bg));color:var(--preset-editor-muted,color-mix(in srgb,var(--preset-ink) 7%,var(--preset-editor-muted)));font-size:14px;letter-spacing:.01em}
.page-loading[hidden]{display:none}
.page-loading-spinner{width:30px;height:30px;border:3px solid color-mix(in srgb,var(--preset-accent) 18%,transparent);border-top-color:var(--preset-accent);border-radius:50%;animation:page-loading-spin .8s linear infinite}
.page-surface-entering{animation:page-surface-appear .2s ease-out both}
@keyframes page-loading-spin{to{transform:rotate(360deg)}}
@keyframes page-surface-appear{from{opacity:.35;transform:translateY(3px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.page-loading-spinner{animation-duration:2.4s}.page-surface-entering{animation:none}}

/* Such-Tooltip nur einmal anzeigen und im Dialog sichtbar halten */
.search-dialog .search-scope-button::after{top:auto;bottom:calc(100% + 8px);transform:translate(-50%,3px)}
.search-dialog .search-scope-button:hover::after,.search-dialog .search-scope-button:focus-visible::after{transform:translate(-50%,0)}
/* Editor-Icons und Trennstege folgen vollständig der gewählten Stilpalette */
.top-actions .panel-toggle{background:var(--preset-editor-surface);border-color:var(--preset-editor-border);color:var(--preset-editor-ink)}
.top-actions .panel-toggle:hover,.top-actions .panel-toggle.selected{background:var(--preset-hover);border-color:var(--preset-accent);color:var(--preset-accent-strong)}
html[data-theme="dark"] .top-actions .panel-toggle{background:var(--preset-editor-surface);border-color:var(--preset-editor-border);color:var(--preset-editor-ink)}
html[data-theme="dark"] .top-actions .panel-toggle:hover,html[data-theme="dark"] .top-actions .panel-toggle.selected{background:var(--preset-hover);border-color:var(--preset-accent);color:var(--preset-accent-strong)}
.column-resize{background:var(--preset-editor-bg);border-color:var(--preset-editor-border)}
.column-resize span{background:var(--preset-editor-surface);border-color:var(--preset-editor-border);box-shadow:0 0 0 1px color-mix(in srgb,var(--preset-editor-border) 50%,transparent)}
.column-resize:hover,.column-resize.dragging{background:var(--preset-accent-soft);border-color:var(--preset-accent)}
.column-resize:hover span,.column-resize.dragging span{background:var(--preset-accent);border-color:var(--preset-accent-strong)}
.column-resize:focus-visible{outline:2px solid var(--preset-accent);outline-offset:1px}
.rail{border-right-color:var(--preset-editor-border)}
html[data-theme="dark"] .column-resize{background:var(--preset-editor-bg);border-color:var(--preset-editor-border)}
html[data-theme="dark"] .column-resize span{background:var(--preset-editor-surface);border-color:var(--preset-editor-border)}
html[data-theme="dark"] .column-resize:hover,html[data-theme="dark"] .column-resize.dragging{background:var(--preset-accent-soft);border-color:var(--preset-accent)}
html[data-theme="dark"] .column-resize:hover span,html[data-theme="dark"] .column-resize.dragging span{background:var(--preset-accent);border-color:var(--preset-accent-strong)}

/* Übersetzungsmenü wie die übrigen Komponenten an die Stilvorlage binden */
details.translation-menu summary{border-color:var(--preset-editor-border);background:var(--preset-editor-surface);color:var(--preset-editor-ink)}
details.translation-menu summary:hover,details.translation-menu[open] summary{border-color:var(--preset-accent);background:var(--preset-hover);color:var(--preset-accent-strong)}

.box.sfx-box{border-style:dashed}
/* Template workspace: compact, grouped typography and color controls. */
.template-controls{display:flex;flex-direction:column;gap:14px;min-width:0}
.template-layout-setting{display:grid!important;grid-template-columns:1fr auto;align-items:center;gap:8px 14px!important;padding:13px 15px;border:1px solid var(--preset-border);border-radius:12px;background:var(--preset-surface)}
.template-layout-setting input[type=range]{grid-column:1/-1;width:100%;accent-color:var(--preset-accent)}
.template-layout-setting output{color:var(--preset-accent-strong);font-weight:700}
.template-setting-card{min-width:0;margin:0;padding:16px;border:1px solid var(--preset-border);border-radius:13px;background:var(--preset-surface);box-shadow:0 2px 8px #21153108}
.template-setting-heading{display:flex;flex-direction:column;gap:4px;margin-bottom:12px}
.template-setting-heading h4{margin:0;font-size:16px;color:var(--preset-ink)}
.template-setting-heading p{margin:0;color:var(--preset-muted,var(--preset-editor-muted));font-size:12px}
.template-class-color-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.template-class-color-grid fieldset{display:grid;grid-template-columns:1fr auto;align-items:center;gap:7px 12px;min-width:0;margin:0;padding:12px;border:1px solid var(--preset-border);border-radius:10px;background:var(--preset-dialog)}
.template-class-color-grid legend{padding:0 5px;font-size:13px;font-weight:700;color:var(--preset-accent-strong)}
.template-class-color-grid label{display:contents!important;font-size:12px}
.template-class-color-grid label[hidden]{display:none!important}
.template-class-color-grid input[type=color],.template-style-grid input[type=color]{width:42px!important;height:34px;min-height:34px!important;padding:3px!important;border:1px solid var(--preset-border)!important;border-radius:8px;cursor:pointer}
.template-style-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px 14px}
.template-style-grid select,.template-controls input:not([type=checkbox]):not([type=range]):not([type=color]){min-height:40px;padding:8px 10px;border:1px solid var(--preset-border);border-radius:8px;background:var(--preset-dialog);color:var(--preset-ink);font:inherit}
.template-extra-colors summary{cursor:pointer;color:var(--preset-ink);font-weight:600}
.template-extra-colors[open] summary{margin-bottom:14px}
.template-color-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 16px}
.template-color-grid label{display:grid;grid-template-columns:1fr auto;align-items:center;gap:10px;font-size:12px}
.template-color-grid input[type=color]{width:42px!important;height:34px;min-height:34px!important;padding:3px!important;border:1px solid var(--preset-border)!important;border-radius:8px;cursor:pointer}
.box .tag{font-family:var(--box-label-font,var(--font-interface))}
#numberLayer span{font-family:var(--page-number-font,var(--font-interface))}
.box.number-style-badge .tag,.template-box-mark.number-style-badge,#numberLayer span.page-number-style-badge{padding:.04em .22em;border:1px solid currentColor;border-radius:.35em;background:color-mix(in srgb,currentColor 12%,white);-webkit-text-stroke:0;text-shadow:none}
.box.number-style-shadow .tag,.template-box-mark.number-style-shadow,#numberLayer span.page-number-style-shadow{-webkit-text-stroke:0;text-shadow:1px 1px 0 var(--box-label-outline-color,#fff),2px 2px 3px #0008}
#numberLayer span.page-number-style-shadow{text-shadow:1px 1px 0 var(--page-number-outline-color,#fff),2px 2px 3px #0008}
.box.number-style-minimal .tag,.template-box-mark.number-style-minimal,#numberLayer span.page-number-style-minimal{-webkit-text-stroke:0;text-shadow:none}
html[data-theme=dark] .template-setting-card,html[data-theme=dark] .template-layout-setting{background:var(--preset-surface);border-color:var(--preset-border);color:var(--preset-ink)}
html[data-theme=dark] .template-class-color-grid fieldset{background:var(--preset-dialog);border-color:var(--preset-border)}
html[data-theme=dark] .template-style-grid select,html[data-theme=dark] .template-controls input:not([type=checkbox]):not([type=range]){background:var(--preset-dialog);border-color:var(--preset-border);color:var(--preset-ink)}
@media(max-width:780px){.template-class-color-grid,.template-style-grid,.template-color-grid{grid-template-columns:1fr}}

.template-box-mark.number-style-badge,.template-box-mark.number-style-shadow,.template-box-mark.number-style-minimal{line-height:1;padding:.04em .22em}
.template-page-mark{color:var(--page-number-color);-webkit-text-stroke:2px var(--page-number-outline-color);paint-order:stroke fill;text-shadow:1px 1px 0 var(--page-number-outline-color),-1px -1px 0 var(--page-number-outline-color)}
/* Number labels: the stroke follows the label color, matching the editor and PDF output. */
.template-box-mark,.template-page-mark{font-weight:inherit;-webkit-text-stroke:3px currentColor;paint-order:stroke fill;text-shadow:1px 1px 0 currentColor,-1px -1px 0 currentColor;background:transparent;padding:0}
.template-box-mark.number-style-badge,.template-page-mark.page-number-style-badge{padding:.04em .22em;border:1px solid currentColor;border-radius:.35em;background:color-mix(in srgb,currentColor 12%,white);-webkit-text-stroke:0;text-shadow:none}
.template-box-mark.number-style-shadow,.template-page-mark.page-number-style-shadow{-webkit-text-stroke:0;text-shadow:1px 1px 0 currentColor,2px 2px 3px #0008}
.template-box-mark.number-style-minimal,.template-page-mark.page-number-style-minimal{-webkit-text-stroke:0;text-shadow:none}
.template-manga-page.pdf-preview .template-box-mark.with-box{border-width:1px}
.template-layout-setting small{grid-column:1/-1;color:var(--preset-muted,var(--preset-editor-muted));font-size:12px}/* Match the editor box preview to actual box geometry: number above a tinted box. */
.box{background:color-mix(in srgb,var(--box-fill-color,var(--box-line-color)) 11%,transparent)}
.template-box-sample{position:absolute;box-sizing:border-box;width:29%;height:18%;border:1px solid var(--box-color);background:color-mix(in srgb,var(--box-fill-color) 11%,transparent)}
.template-box-sample.first{top:23%;left:25%}
.template-box-sample.second{top:60%;right:10%}
.template-box-sample.letter,.template-box-sample.third{left:9%;bottom:14%;top:auto}
.template-box-sample:not(.with-box){border-color:transparent;background:transparent}
.template-box-sample .template-box-mark{top:-1.35em;left:50%;width:auto;height:auto;display:block;transform:translateX(-50%);line-height:1;white-space:nowrap;font-weight:700;-webkit-text-stroke:3px #fff;paint-order:stroke fill;text-shadow:1px 1px 0 #fff,-1px -1px 0 #fff}
.template-page-mark,.template-box-sample .template-box-mark{background:transparent;padding:0}
.template-box-sample .template-box-mark.number-style-badge,.template-page-mark.page-number-style-badge{padding:.04em .22em;border:1px solid currentColor;border-radius:.35em;background:color-mix(in srgb,currentColor 12%,white);-webkit-text-stroke:0;text-shadow:none}
.template-box-sample .template-box-mark.number-style-shadow,.template-page-mark.page-number-style-shadow{-webkit-text-stroke:0;text-shadow:1px 1px 0 #fff,2px 2px 3px #0008}
.template-box-sample .template-box-mark.number-style-minimal,.template-page-mark.page-number-style-minimal{-webkit-text-stroke:0;text-shadow:none}
.template-manga-page.pdf-preview .template-box-sample.with-box{border-width:1px;background:transparent}
.template-box-sample.second.with-box{border-style:dashed}
/* Classic preview keeps the same white text stroke as the real workspace. */
.template-box-mark,.template-page-mark{-webkit-text-stroke:3px #fff;text-shadow:1px 1px 0 #fff,-1px -1px 0 #fff;paint-order:stroke fill}
.box.number-style-capsule .tag,.template-box-mark.number-style-capsule,#numberLayer span.page-number-style-capsule,.template-page-mark.page-number-style-capsule{display:inline-block;width:auto;height:auto;padding:.08em .38em;border:1px solid currentColor;border-radius:999px;background:color-mix(in srgb,currentColor 12%,white);line-height:1.05;-webkit-text-stroke:0;text-shadow:none}
.template-box-sample .template-box-mark.number-style-capsule{width:auto;height:auto;padding:.08em .38em;border-radius:999px}

/* SFX suggestions below the translation of a selected SFX box (js/sfx-suggestions.js) */
.line{position:relative}
.sfx-suggestions{position:absolute;z-index:30;left:44px;top:calc(100% - 6px);display:grid;gap:6px;width:max-content;max-width:min(560px,calc(100% - 52px));max-height:min(330px,55vh);overflow:auto;overscroll-behavior:contain;padding:8px;border:1px solid var(--preset-border);border-radius:11px;background:var(--preset-dialog);color:var(--preset-editor-ink);box-shadow:0 10px 28px #25133a26;animation:glossary-pop .12s ease-out}
.sfx-suggestion-group{padding:7px 10px 9px;border:1px solid transparent;border-radius:8px}
.sfx-suggestion-group.best{border-color:var(--preset-accent);background:var(--preset-dialog)}
.sfx-suggestion-title{margin-bottom:7px;color:var(--preset-editor-muted);font-size:13px}
.sfx-suggestion-pills{display:flex;flex-wrap:wrap;gap:7px}
.sfx-suggestion{padding:5px 13px;border:1px solid var(--preset-border);border-radius:999px;background:var(--preset-editor-surface);color:var(--preset-editor-ink);font:inherit;font-size:15px;line-height:1.35;cursor:pointer;transition:background-color .12s,border-color .12s}
.sfx-suggestion.primary{border-color:var(--preset-accent);background:var(--preset-accent-soft)}
/* The highlight follows the mouse; without it the best group and its first suggestion stay marked. */
.sfx-suggestion-group:hover{border-color:var(--preset-accent)}
.sfx-suggestions:hover .sfx-suggestion-group.best:not(:hover){border-color:transparent}
.sfx-suggestion:hover{border-color:var(--preset-accent);background:var(--preset-accent-soft);color:var(--preset-editor-ink)}
.sfx-suggestions:hover .sfx-suggestion.primary:not(:hover){border-color:var(--preset-border);background:var(--preset-editor-surface)}
.sfx-suggestion:focus-visible{outline:2px solid var(--preset-accent);outline-offset:2px}
html[data-theme=dark] .sfx-suggestions{box-shadow:0 10px 30px #09060d66}
/* Tags in German lines (js/tags.js): chips in the colour of the box type of the line */
.line{--tag-color:var(--text-box-label-color,#ff0000)}
.line[data-kind="letter"]{--tag-color:var(--text-letter-box-label-color,#128a8c)}
.line[data-kind="sfx"]{--tag-color:var(--sfx-box-label-color,#65128c)}
.mt-tag{display:inline-block;margin:0 1px;padding:0 6px;border-radius:5px;background:color-mix(in srgb,var(--tag-color) 15%,transparent);color:var(--tag-color);line-height:1.45;white-space:nowrap;user-select:all;cursor:default}
.line:not(.active) .mt-tag{background:color-mix(in srgb,var(--tag-color) 9%,transparent)}
.tag-picker{position:fixed;z-index:1000;display:flex;flex-direction:column;width:340px;max-height:min(380px,60vh);border:1px solid var(--preset-border);border-radius:10px;background:var(--preset-dialog);box-shadow:0 10px 28px #25133a2b;color:var(--preset-editor-ink);animation:glossary-pop .12s ease-out}
.tag-picker-list{display:grid;gap:4px;padding:6px;overflow:auto;overscroll-behavior:contain}
.tag-picker-item{padding:9px 12px;border:1px solid var(--preset-border);border-radius:5px;background:var(--preset-editor-surface);color:var(--tag-color);font:inherit;font-size:15px;text-align:left;cursor:pointer}
.tag-picker-item.sfx{--tag-color:var(--sfx-box-label-color,#65128c)}
.tag-picker-item:hover,.tag-picker-item.active{border-color:color-mix(in srgb,var(--tag-color) 45%,var(--preset-border));background:color-mix(in srgb,var(--tag-color) 12%,var(--preset-editor-surface))}
.tag-picker-empty{margin:4px 6px;color:var(--preset-editor-muted);font-size:13px}
.tag-picker-new{display:flex;gap:8px;padding:9px;border-top:1px solid var(--preset-border)}
.tag-picker-new input{flex:1;min-width:0;padding:7px 10px;border:1px solid var(--preset-border);border-radius:6px;background:var(--preset-input,#fff);color:var(--preset-editor-ink);font:inherit;font-size:14px}
.tag-picker-new button,.tags-new button{padding:7px 12px;border:1px solid var(--preset-border);border-radius:6px;background:var(--preset-dialog-subtle);color:var(--preset-editor-muted);font:inherit;font-size:14px;cursor:pointer;white-space:nowrap}
.tag-picker-new button:hover,.tags-new button:hover{border-color:var(--preset-accent);color:var(--preset-accent-strong)}
/* "Tags" dialog */
.tags-dialog{width:min(760px,calc(100vw - 32px))}
.tags-dialog h2{display:flex;align-items:center;gap:10px}
.tags-dialog h2 svg{width:22px;height:22px;fill:none;stroke:var(--preset-accent);stroke-width:1.8;stroke-linejoin:round}
.tags-table{width:100%;border-collapse:separate;border-spacing:0;border:1px solid var(--preset-border);border-radius:10px;overflow:hidden}
.tags-table th{padding:11px 14px;border-bottom:1px solid var(--preset-border);background:var(--preset-dialog-subtle);color:var(--preset-editor-muted);font-weight:500;text-align:left}
.tags-table td{padding:10px 14px;border-bottom:1px solid var(--preset-border)}
.tags-table tr:last-child td{border-bottom:0}
.tags-table th:first-child,.tags-table td:first-child{width:150px;border-right:1px solid var(--preset-border)}
.tags-table .tags-actions{width:90px;text-align:right;white-space:nowrap}
.tags-table tr.dragging{opacity:.45}
.tags-type{white-space:nowrap}
.tags-info{display:inline-grid;place-items:center;width:16px;height:16px;margin-left:7px;border:1.5px solid currentColor;border-radius:50%;color:var(--preset-editor-muted);font:600 11px/1 Georgia,serif;vertical-align:-2px;cursor:help}
.tags-tag code{font-size:15px;letter-spacing:.02em}
.tags-edit,.tags-delete{width:28px;height:28px;margin-left:6px;padding:4px;border:0;border-radius:6px;background:transparent;vertical-align:middle;cursor:pointer}
.tags-edit svg,.tags-delete svg{width:18px;height:18px;fill:none;stroke:var(--preset-editor-muted);stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.tags-delete svg{stroke:var(--preset-danger,#c0392b)}
.tags-edit:hover,.tags-delete:hover{background:var(--preset-hover)}
.tags-grip{display:inline-block;width:14px;height:18px;vertical-align:middle;cursor:grab;background:radial-gradient(circle,var(--preset-editor-muted) 1.6px,transparent 1.8px) 0 0/7px 6px}
.tags-edit-input{width:100%;padding:6px 9px;border:1px solid var(--preset-accent);border-radius:6px;background:var(--preset-input,#fff);color:var(--preset-editor-ink);font:15px/1.3 monospace}
.tags-error{min-height:1.2em;margin:8px 2px 0;color:var(--preset-danger,#c0392b);font-size:13px}
.tags-new{display:flex;gap:10px}
.tags-new input{flex:1;padding:8px 11px;border:1px solid var(--preset-border);border-radius:6px;background:var(--preset-input,#fff);color:var(--preset-editor-ink);font:15px monospace}
/* One tooltip style for the whole page (js/tooltips.js), as for "Alle Bände durchsuchen" */
.mt-tooltip{position:fixed;z-index:2147483646;max-width:min(340px,calc(100vw - 12px));padding:6px 9px;border:1px solid var(--preset-border);border-radius:7px;background:var(--preset-dialog);color:var(--preset-ink);box-shadow:0 5px 16px #0002;font-size:12px;font-weight:500;line-height:1.35;pointer-events:none;opacity:0;transform:translateY(-3px);transition:opacity .12s,transform .12s;margin:0}
.mt-tooltip.visible{opacity:1;transform:none}
.mt-tooltip em{display:block;margin-top:3px;font-style:italic;font-weight:400;opacity:.85}
/* "Eigene SFX" dialog (js/sfx-own.js) */
.own-sfx-dialog{width:min(1040px,calc(100vw - 32px))}
.own-sfx-subtitle{margin:4px 0 0 32px;color:var(--preset-editor-muted);font-size:13px;line-height:1.4}
.own-sfx-subtitle code{font-size:12px}
.own-sfx-toolbar{display:flex;align-items:center;gap:12px;margin-bottom:12px}
.own-sfx-toolbar input{flex:1;max-width:360px;padding:7px 11px;border:1px solid var(--preset-border);border-radius:6px;background:var(--preset-input,#fff);color:var(--preset-editor-ink);font:inherit}
.own-sfx-count{color:var(--preset-editor-muted);font-size:13px}
.own-sfx-table th:first-child,.own-sfx-table td:first-child{width:auto}
.own-sfx-table td{vertical-align:top;overflow-wrap:anywhere}
.own-sfx-table .own-sfx-jp{font-size:16px;white-space:nowrap}
.own-sfx-table .own-sfx-note{color:var(--preset-editor-muted)}
.own-sfx-table tr.editing td{padding:6px 8px;background:var(--preset-dialog-subtle)}
.own-sfx-input{width:100%;min-width:70px;padding:6px 8px;border:1px solid var(--preset-accent);border-radius:6px;background:var(--preset-input,#fff);color:var(--preset-editor-ink);font:inherit}
.own-sfx-empty{padding:18px 14px;color:var(--preset-editor-muted);text-align:center}
.own-sfx-new{display:grid;grid-template-columns:1fr 1fr 2fr 2fr auto;gap:8px}
.own-sfx-new input{min-width:0;padding:8px 10px;border:1px solid var(--preset-border);border-radius:6px;background:var(--preset-input,#fff);color:var(--preset-editor-ink);font:inherit}
.own-sfx-new button{padding:7px 12px;border:1px solid var(--preset-border);border-radius:6px;background:var(--preset-dialog-subtle);color:var(--preset-editor-muted);font:inherit;cursor:pointer;white-space:nowrap}
.own-sfx-new button:hover{border-color:var(--preset-accent);color:var(--preset-accent-strong)}
.sfx-own-badge{display:inline-block;margin-left:4px;padding:0 6px;border-radius:999px;background:var(--preset-accent-soft);color:var(--preset-accent-strong);font-size:11px;line-height:1.6;vertical-align:1px}
.own-sfx-spacer{flex:1}
.own-sfx-file-button{padding:7px 12px;border:1px solid var(--preset-border);border-radius:6px;background:var(--preset-dialog-subtle);color:var(--preset-editor-ink);font:inherit;font-size:14px;cursor:pointer;white-space:nowrap}
.own-sfx-file-button:hover:not(:disabled){border-color:var(--preset-accent);color:var(--preset-accent-strong)}
.own-sfx-file-button:disabled{opacity:.5;cursor:default}
/* Dashboard calendar (js/calendar.js) - all colours from the theme variables */
.mc-calendar{--mc-line:var(--preset-border);--mc-cell:color-mix(in srgb,var(--preset-dialog) 94%,var(--preset-bg));color:var(--preset-ink)}
.mc-head{display:flex;flex-wrap:wrap;align-items:center;gap:12px 18px;margin-bottom:14px}
.mc-head h2{margin:0;flex:0 0 auto}
.mc-nav{display:flex;align-items:center;gap:6px;flex:1 1 auto;justify-content:center}
.mc-range{min-width:190px;text-align:center;font-size:15px;font-weight:500}
.mc-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.mc-calendar .mc-icon,.mc-calendar .mc-today,.mc-calendar .mc-add{height:34px;min-width:34px;padding:0 10px;border:1px solid var(--mc-line);border-radius:9px;background:var(--preset-dialog);color:var(--preset-ink);font-size:14px;line-height:1}
.mc-calendar .mc-icon{padding:0;font-size:19px}
.mc-calendar .mc-palette svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;vertical-align:middle}
.mc-calendar .mc-icon:hover,.mc-calendar .mc-today:hover{border-color:var(--preset-accent);color:var(--preset-accent-strong);background:var(--preset-dialog)}
.mc-calendar .mc-add{background:var(--preset-accent);border-color:var(--preset-accent);color:var(--preset-on-accent)}
.mc-calendar .mc-add:hover{background:var(--preset-accent-hover);border-color:var(--preset-accent-strong);color:var(--preset-on-accent)}
.mc-views{display:inline-flex;padding:2px;border:1px solid var(--mc-line);border-radius:9px;background:var(--preset-dialog-subtle)}
.mc-calendar .mc-views button{height:28px;padding:0 10px;border:0;border-radius:7px;background:transparent;color:var(--preset-editor-muted);font-size:13px}
.mc-calendar .mc-views button[aria-selected="true"]{background:var(--preset-dialog);color:var(--preset-ink);box-shadow:0 1px 3px #0002;font-weight:600}
.mc-calendar .mc-views button:hover{color:var(--preset-ink)}
.mc-weekdays,.mc-week{display:grid;grid-template-columns:86px repeat(7,minmax(0,1fr))}
.mc-weekdays{margin:0 0 6px;color:var(--preset-editor-muted);font-size:12px;letter-spacing:.06em;text-align:center;text-transform:uppercase}
.mc-week{position:relative;grid-template-rows:34px repeat(var(--mc-lanes,2),26px) 30px;margin-bottom:8px;border:1px solid var(--mc-line);border-radius:14px;background:var(--mc-cell);overflow:hidden}
.mc-week.current{border-color:color-mix(in srgb,var(--preset-accent) 55%,var(--mc-line))}
.mc-view-week .mc-week{grid-template-rows:34px repeat(var(--mc-lanes,6),30px) 34px}
.mc-weeklabel{grid-column:1;grid-row:1/-1;display:flex;flex-direction:column;gap:2px;padding:8px 10px;border-right:1px solid var(--mc-line)}
.mc-weeklabel strong{font-family:var(--heading-secondary-font,inherit);font-style:italic;font-weight:500;font-size:15px;color:var(--preset-ink)}
.mc-weeklabel span{color:var(--preset-editor-muted);font-size:12px}
.mc-day{position:relative;grid-row:1/-1;min-width:0;border-left:1px solid color-mix(in srgb,var(--mc-line) 70%,transparent);text-align:center}
.mc-day:nth-child(2){border-left:0}
.mc-day.weekend{background:color-mix(in srgb,var(--preset-bg) 55%,transparent)}
.mc-day.other-month .mc-date{opacity:.4}
.mc-day.drop{background:var(--preset-accent-soft)}
.mc-date{display:inline-block;min-width:30px;margin-top:6px;padding:2px 8px;border:1.5px solid transparent;border-radius:999px;font-size:14px;line-height:18px}
.mc-day.today .mc-date{border-color:var(--preset-accent);background:var(--preset-accent-soft);color:var(--preset-accent-strong);font-weight:700}
.mc-calendar .mc-day-add{position:absolute;right:5px;bottom:4px;z-index:3;width:24px;height:24px;padding:0;border:1px solid var(--mc-line);border-radius:50%;background:var(--preset-dialog);color:var(--preset-accent-strong);font-size:14px;line-height:1;opacity:0;transition:opacity .12s}
.mc-day:hover .mc-day-add,.mc-calendar .mc-day-add:focus-visible{opacity:1}
.mc-calendar .mc-day-add:hover{border-color:var(--preset-accent);background:var(--preset-accent);color:var(--preset-on-accent)}
.mc-item{position:relative;z-index:2;display:flex;align-items:center;gap:5px;min-width:0;margin:2px 4px;padding:0 9px;border:1.5px solid var(--mc-border,transparent);border-radius:7px;background:var(--mc-bg,var(--preset-accent-soft));color:var(--mc-text,var(--preset-ink));font-size:13px;line-height:20px;white-space:nowrap;cursor:grab;user-select:none;touch-action:none;outline:none}
.mc-item:hover,.mc-item:focus-visible{box-shadow:0 0 0 2px var(--preset-dialog),0 0 0 4px var(--preset-accent),0 4px 10px #0002}
.mc-item.dragging{opacity:.55;cursor:grabbing}
.mc-item.cut-start{margin-left:0;border-left-width:0;border-top-left-radius:0;border-bottom-left-radius:0}
.mc-item.cut-end{margin-right:0;border-right-width:0;border-top-right-radius:0;border-bottom-right-radius:0}
.mc-label{overflow:hidden;text-overflow:ellipsis}
.mc-flag{font-size:12px}
.mc-task{--mc-bg:var(--preset-dialog);--mc-text:var(--preset-ink);--mc-border:var(--mc-line);border-style:dashed}
.mc-task.done .mc-label{text-decoration:line-through;opacity:.6}
.mc-check{color:var(--preset-accent-strong);font-weight:700}
.mc-resize{position:absolute;top:0;bottom:0;width:9px;cursor:ew-resize}
.mc-resize.start{left:-2px}
.mc-resize.end{right:-2px}
.mc-item:hover .mc-resize::after{content:"";position:absolute;top:4px;bottom:4px;left:3px;width:3px;border-radius:2px;background:currentColor;opacity:.45}
.mc-menu{position:fixed;z-index:1000;display:grid;min-width:220px;padding:6px;border:1px solid var(--preset-border);border-radius:11px;background:var(--preset-dialog);color:var(--preset-ink);box-shadow:0 12px 30px #0003}
.mc-menu button{display:flex;align-items:center;gap:10px;padding:9px 12px;border:0;border-radius:7px;background:transparent;color:inherit;font:inherit;font-size:14px;text-align:left;cursor:pointer}
.mc-menu button:hover,.mc-menu button:focus-visible{background:var(--preset-hover);color:var(--preset-hover-text,inherit)}
.mc-menu button:disabled{opacity:.45;cursor:default;background:transparent}
.mc-menu .mc-more{margin-left:auto;font-size:18px}
.mc-menu .mc-tick{margin-left:auto;color:var(--preset-accent-strong);font-weight:700}
.mc-swatches{display:inline-flex;gap:3px}
.mc-swatches i,.mc-colors i{display:inline-block;width:13px;height:13px;border:1.5px solid var(--mc-border);border-radius:3px;background:var(--mc-bg)}
.mc-agenda-day{margin-bottom:12px;padding:10px 12px;border:1px solid var(--mc-line);border-radius:12px;background:var(--mc-cell)}
.mc-agenda-day.today{border-color:var(--preset-accent)}
.mc-agenda-day h3{display:flex;align-items:baseline;gap:10px;margin:0 0 8px;font-size:14px;font-weight:500;color:var(--preset-editor-muted)}
.mc-agenda-day h3 b{font-size:22px;color:var(--preset-ink)}
.mc-agenda-item{display:flex;justify-content:space-between;gap:12px;margin:5px 0;padding:6px 10px;line-height:1.35;white-space:normal;cursor:pointer}
.mc-agenda-item small{opacity:.85;white-space:nowrap}
.mc-empty{padding:24px;color:var(--preset-editor-muted);text-align:center}
.mc-dialog{width:min(520px,calc(100vw - 30px));background:var(--preset-dialog);color:var(--preset-ink)}
.mc-dialog .mc-hint{margin:-12px 0 8px;color:var(--preset-editor-muted);font-size:14px}
.mc-dialog textarea{width:100%;padding:10px;border:1px solid var(--preset-border);border-radius:7px;background:var(--preset-input,#fff);color:var(--preset-ink);font:inherit;resize:vertical}
.mc-dialog .mc-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.mc-colors{display:flex;gap:8px;margin:12px 0;padding:0;border:0}
.mc-colors legend{margin-bottom:6px;color:var(--preset-editor-muted)}
.mc-dialog .mc-colors label{display:block;margin:0;cursor:pointer}
.mc-colors input{position:absolute;opacity:0;pointer-events:none}
.mc-colors i{width:30px;height:30px;border-radius:7px}
.mc-colors input:checked+i{box-shadow:0 0 0 2px var(--preset-dialog),0 0 0 4px var(--preset-ink)}
.mc-colors input:focus-visible+i{outline:2px solid var(--preset-accent);outline-offset:3px}
.mc-dialog .mc-check-field{display:flex;align-items:center;gap:8px}
.mc-dialog .mc-check-field input{width:auto}
.mc-error{min-height:1.2em;margin:8px 0 0;color:var(--preset-danger,#c0392b);font-size:13px}
.mc-dialog .hub-dialog-actions{align-items:center}
.mc-spacer{flex:1}
@media(max-width:900px){.mc-weekdays,.mc-week{grid-template-columns:54px repeat(7,minmax(0,1fr))}.mc-weeklabel strong{font-size:12px}.mc-range{min-width:0}}
.mc-holiday{--mc-bg:transparent;--mc-text:var(--preset-danger,#a44651);--mc-border:transparent;font-weight:600;cursor:pointer}
.mc-holiday .mc-star{font-size:11px}
.mc-day.holiday .mc-date{color:var(--preset-danger,#a44651);font-weight:700}
.mc-external{cursor:pointer}
.mc-time{font-variant-numeric:tabular-nums;font-weight:600;opacity:.85}
.mc-subs-dialog{width:min(640px,calc(100vw - 30px))}
.mc-subs-section{margin:0 0 16px}
.mc-subs-section h3{margin:0 0 8px;font-size:15px;font-weight:650}
.mc-subs-list{display:grid;gap:6px;margin:0;padding:0;list-style:none}
.mc-subs-list li{display:flex;align-items:center;gap:10px;padding:8px 10px;border:1px solid var(--preset-border);border-radius:9px;background:var(--preset-dialog-subtle)}
.mc-subs-list .mc-subs-empty{color:var(--preset-editor-muted);background:transparent;border-style:dashed}
.mc-subs-dialog .mc-subs-name{display:flex;flex:1;align-items:center;gap:8px;min-width:0;margin:0;cursor:pointer}
.mc-subs-dialog .mc-subs-name input{width:auto}
.mc-subs-name span{display:grid;min-width:0}
.mc-subs-name small{overflow:hidden;color:var(--preset-editor-muted);font-size:12px;text-overflow:ellipsis;white-space:nowrap}
.mc-subs-name small.mc-sub-error{color:var(--preset-danger,#a44651);white-space:normal}
.mc-subs-dialog .mc-dot{flex:0 0 auto;width:18px;height:18px;min-width:0;padding:0;border:2px solid var(--preset-dialog);border-radius:50%;box-shadow:0 0 0 1px var(--preset-border);cursor:pointer}
.mc-subs-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.mc-note{margin:0 0 10px;color:var(--preset-editor-muted);font-size:13px;line-height:1.45}
.mc-info{display:grid;grid-template-columns:max-content 1fr;gap:6px 16px;margin:0 0 12px}
.mc-info dt{color:var(--preset-editor-muted)}
.mc-info dd{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}
.mc-export h4{margin:14px 0 6px;font-size:14px;font-weight:650}
.mc-export-kinds{display:flex;flex-wrap:wrap;gap:6px 18px;margin-bottom:6px}
.mc-subs-dialog .mc-export-kinds .mc-check-field,.mc-subs-dialog .mc-subs-actions .mc-check-field{margin:0}
.mc-subs-actions{align-items:center}
.mc-google-status{margin:0 0 6px;font-size:13px}
.mc-google-status.mc-sub-error{color:var(--preset-danger,#a44651)}
/* Text size in the status bar (between page number and zoom) */
.text-size-controls{display:flex;align-items:center;gap:4px;margin-right:8px;padding-right:10px;border-right:1px solid var(--preset-editor-border,color-mix(in srgb,var(--preset-editor-muted) 5%,var(--preset-border)))}
.text-size-controls .font-control{margin-left:0;font-size:12px;color:var(--preset-editor-muted,color-mix(in srgb,var(--preset-ink) 0%,var(--preset-editor-muted)))}
.zoom-controls .text-size-controls button{padding:3px 8px;border:1px solid var(--preset-editor-border,color-mix(in srgb,var(--preset-editor-muted) 5%,var(--preset-border)));border-radius:5px;font-size:12px;color:var(--preset-editor-muted,color-mix(in srgb,var(--preset-ink) 0%,var(--preset-editor-muted)))}
.zoom-controls .text-size-controls button:hover{border-color:var(--preset-accent);color:var(--preset-accent-strong)}
/* Calendar: target shown in work blocks, hover tools, searchable picker */
.mc-context{font-weight:650}
.mc-actions{position:absolute;top:50%;right:8px;z-index:3;display:none;align-items:center;gap:1px;padding-left:6px;transform:translateY(-50%);background:var(--mc-bg,var(--preset-dialog));border-radius:6px}
.mc-item:hover .mc-actions,.mc-item:focus-within .mc-actions{display:flex}
.mc-calendar .mc-actions button,.mc-actions .mc-grip{display:inline-grid;place-items:center;width:22px;height:20px;min-width:0;padding:0;border:0;border-radius:5px;background:transparent;color:inherit;cursor:pointer}
.mc-actions .mc-grip{cursor:grab}
.mc-calendar .mc-actions button:hover{background:color-mix(in srgb,currentColor 16%,transparent);color:inherit}
.mc-actions svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.mc-actions .mc-grip svg{fill:currentColor;stroke:none}
.mc-agenda-item{position:relative}
.mc-agenda-item:hover small,.mc-agenda-item:focus-within small{visibility:hidden}
.mc-agenda-item .mc-actions{right:6px}
.mc-calendar .mc-day-add{width:26px;height:26px;border:0;background:var(--preset-accent-strong);color:var(--preset-dialog);font-size:16px;font-weight:700;box-shadow:0 2px 6px #0003}
.mc-calendar .mc-day-add:hover{background:var(--preset-accent);color:var(--preset-dialog)}
.mc-picker{position:relative}
.mc-picker .mc-picker-input{width:100%}
.mc-picker-list{position:absolute;left:0;right:0;top:calc(100% + 4px);z-index:20;max-height:260px;margin:0;padding:4px;overflow:auto;list-style:none;border:1px solid var(--preset-border);border-radius:9px;background:var(--preset-dialog);box-shadow:0 12px 28px #0003}
.mc-picker-list li{display:flex;justify-content:space-between;gap:12px;padding:7px 10px;border-radius:6px;cursor:pointer}
.mc-picker-list li small{color:var(--preset-editor-muted);white-space:nowrap}
.mc-picker-list li[aria-selected=true]{background:var(--preset-hover);color:var(--preset-hover-text,inherit)}
.mc-picker-list .mc-picker-none{color:var(--preset-editor-muted);cursor:default}
.mc-field-label{display:block}
.mc-week .mc-actions{top:-21px;right:4px;transform:none;padding:1px 2px;border:1px solid var(--preset-border);background:var(--preset-dialog);color:var(--preset-ink);box-shadow:0 3px 8px #0002}
.mc-week .mc-item:hover,.mc-week .mc-item:focus-within{z-index:4}
.mc-dialog .mc-field{display:grid;gap:6px;margin:12px 0;color:color-mix(in srgb,var(--preset-ink) 35%,var(--preset-editor-muted))}
html[data-theme=dark] .mc-dialog .mc-field{color:inherit}
/* Movable windows (js/draggable-dialogs.js) */
dialog.mt-dialog-grab,dialog.mt-dialog-grab .dialog-header,dialog.mt-dialog-grab .dialog-header h2{cursor:move}
dialog.mt-dialog-dragging{cursor:grabbing;box-shadow:0 22px 50px #0004}
body.mt-dragging-window,body.mt-dragging-window *{user-select:none!important;cursor:grabbing!important}
/* === Dashboard redesign: all colours from the theme variables (light, dark, every style) === */
html[data-theme] .hub{--hub-card:var(--preset-dialog);--hub-line:var(--preset-border);--hub-muted:var(--preset-editor-muted);--hub-shadow:0 1px 2px #0000000d,0 6px 18px #2a1f3a0d}
html[data-theme=dark] .hub{--hub-shadow:0 1px 2px #0005,0 8px 22px #0004}
/* sidebar */
html[data-theme] .hub .hub-sidebar nav{display:grid;gap:4px}
html[data-theme] .hub .hub-sidebar nav button{display:flex;align-items:center;gap:10px;padding:10px 14px;border:0;border-radius:10px;background:transparent;color:var(--preset-ink);font-size:15px;text-align:left;transition:background .15s,color .15s}
html[data-theme] .hub .hub-sidebar nav button:hover{background:var(--preset-hover);color:var(--preset-hover-text,var(--preset-ink))}
html[data-theme] .hub .hub-sidebar nav button.active{background:var(--preset-accent-soft);color:var(--preset-accent-strong);font-weight:600;box-shadow:inset 3px 0 0 var(--preset-accent)}
html[data-theme] .hub .hub-nav-icon{width:19px;height:19px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
/* page heading */
html[data-theme] .hub .hub-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;flex-wrap:wrap;margin-bottom:22px}
html[data-theme] .hub .hub-heading h1{margin:0;font-size:34px;line-height:1.15;color:var(--preset-ink)}
html[data-theme] .hub .hub-subtitle{margin:6px 0 0;color:var(--hub-muted);font-size:15px}
html[data-theme] .hub .hub-heading-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
html[data-theme] .hub .hub-heading-actions button{border-radius:10px}
html[data-theme] .hub .hub-heading-actions button.hub-primary{box-shadow:0 4px 12px color-mix(in srgb,var(--preset-accent) 35%,transparent)}
/* key figures */
html[data-theme] .hub .hub-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:0 0 18px}
html[data-theme] .hub .hub-kpi{position:relative;display:grid;gap:4px;padding:16px 18px 16px 20px;border:1px solid var(--hub-line);border-radius:16px;background:var(--hub-card);box-shadow:var(--hub-shadow);overflow:hidden}
html[data-theme] .hub .hub-kpi::before{content:"";position:absolute;left:0;top:14px;bottom:14px;width:4px;border-radius:0 4px 4px 0;background:var(--preset-accent)}
html[data-theme] .hub .hub-kpi strong{font-size:26px;font-weight:650;line-height:1.1;color:var(--preset-ink);font-variant-numeric:tabular-nums}
html[data-theme] .hub .hub-kpi span{color:var(--hub-muted);font-size:13px}
html[data-theme] .hub .hub-kpi .hub-due{justify-self:start}
/* cards */
html[data-theme] .hub .hub-card{border:1px solid var(--hub-line);border-radius:18px;background:var(--hub-card);box-shadow:var(--hub-shadow)}
html[data-theme] .hub .hub-side .hub-card h2{margin-bottom:10px}
/* relative due dates */
html[data-theme] .hub .hub-due{display:inline-block;margin-left:6px;padding:1px 8px;border-radius:999px;background:color-mix(in srgb,var(--preset-ink) 8%,transparent);color:var(--hub-muted);font-size:12px;font-weight:600;line-height:18px;white-space:nowrap;vertical-align:middle}
html[data-theme] .hub .hub-due-soon{background:var(--preset-accent-soft);color:var(--preset-accent-strong)}
html[data-theme] .hub .hub-due-overdue{background:var(--preset-danger-soft,#fde8ea);color:var(--preset-danger,#a44651)}
/* series initials */
html[data-theme] .hub .hub-avatar{display:inline-grid;place-items:center;flex:none;width:36px;height:36px;border-radius:11px;background:hsl(var(--avatar-hue) 55% 90%);color:hsl(var(--avatar-hue) 45% 30%);font-size:14px;font-weight:700;letter-spacing:.02em}
html[data-theme=dark] .hub .hub-avatar{background:hsl(var(--avatar-hue) 28% 27%);color:hsl(var(--avatar-hue) 70% 86%)}
/* "In Bearbeitung" */
html[data-theme] .hub .ongoing{display:grid;grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"avatar title arrow" "avatar progress arrow" "avatar info arrow";column-gap:12px;row-gap:2px;align-items:center;margin:0 0 8px;padding:11px 12px;border:1px solid var(--hub-line);border-radius:12px;background:var(--preset-dialog-subtle);color:var(--preset-ink);transition:border-color .15s,transform .15s,box-shadow .15s}
html[data-theme] .hub .ongoing:hover:not(:disabled){border-color:var(--preset-accent);box-shadow:var(--hub-shadow);transform:translateY(-1px)}
html[data-theme] .hub .ongoing .hub-avatar{grid-area:avatar;width:34px;height:34px;font-size:13px}
html[data-theme] .hub .ongoing strong{grid-area:title;font-weight:600}
html[data-theme] .hub .ongoing .volume-progress{grid-area:progress;margin:4px 0 2px}
html[data-theme] .hub .ongoing small{grid-area:info;color:var(--hub-muted)}
html[data-theme] .hub .ongoing>span:last-child{grid-area:arrow;position:static;color:var(--preset-accent-strong);font-size:18px}
/* "Anstehend" */
html[data-theme] .hub .upcoming{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 10px;align-items:center;margin:0 0 8px;padding:10px 12px;border:1px solid var(--hub-line);border-radius:12px;background:var(--preset-dialog-subtle);color:var(--preset-ink);text-align:left}
html[data-theme] .hub .upcoming:hover{border-color:var(--preset-accent)}
html[data-theme] .hub .upcoming span:first-child{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html[data-theme] .hub .upcoming small{grid-column:1;color:var(--hub-muted)}
html[data-theme] .hub .upcoming .hub-due{grid-column:2;grid-row:1 / span 2;margin:0}
/* progress bars */
html[data-theme] .hub .volume-progress{height:7px;border-radius:999px;background:color-mix(in srgb,var(--preset-ink) 10%,transparent);overflow:hidden}
html[data-theme] .hub .volume-progress span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--preset-accent),var(--preset-accent-strong))}
/* projects: series cards */
html[data-theme] .hub .series-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:14px}
html[data-theme] .hub .series-card{display:grid;gap:14px;min-height:0;padding:16px;border:1px solid var(--hub-line);border-radius:16px;background:var(--hub-card);color:var(--preset-ink);text-align:left;box-shadow:var(--hub-shadow);transition:border-color .15s,transform .15s}
html[data-theme] .hub .series-card:hover{border-color:var(--preset-accent);transform:translateY(-2px)}
html[data-theme] .hub .series-card[hidden]{display:none}
html[data-theme] .hub .series-card-head{display:flex;align-items:center;gap:12px;min-width:0}
html[data-theme] .hub .series-card-head .hub-avatar{width:44px;height:44px;border-radius:13px;font-size:16px}
html[data-theme] .hub .series-card-title{display:grid;min-width:0}
html[data-theme] .hub .series-card-title strong{font-size:16px;font-weight:650;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html[data-theme] .hub .series-card-title small,html[data-theme] .hub .series-card-progress small,html[data-theme] .hub .series-card-muted{color:var(--hub-muted);font-size:13px}
html[data-theme] .hub .series-card-progress{display:grid;gap:6px}
html[data-theme] .hub .series-card-progress .volume-progress{margin:0}
html[data-theme] .hub .series-card-foot{display:flex;justify-content:space-between;align-items:center;gap:8px;padding-top:12px;border-top:1px solid var(--hub-line);font-size:13px}
/* projects: series page */
html[data-theme] .hub .project-title-line .hub-avatar{width:46px;height:46px;border-radius:14px;font-size:17px}
html[data-theme] .hub .project-tree button{border-radius:10px}
html[data-theme] .hub .project-tree button.active{background:var(--preset-accent-soft);color:var(--preset-accent-strong);font-weight:600}
html[data-theme] .hub .project-table{border:1px solid var(--hub-line);border-radius:14px;background:var(--hub-card);box-shadow:var(--hub-shadow)}
html[data-theme] .hub .volume-row:not(.project-label):hover{background:var(--preset-dialog-subtle)}
html[data-theme] .hub .volume-status{display:inline-block;margin-top:4px;padding:1px 8px;border-radius:999px;font-size:12px;font-weight:600}
html[data-theme] .hub .volume-status.is-active{background:var(--preset-accent-soft);color:var(--preset-accent-strong)}
html[data-theme] .hub .volume-status.is-done{background:color-mix(in srgb,#2f8f5b 16%,transparent);color:color-mix(in srgb,#2f8f5b 75%,var(--preset-ink))}
html[data-theme] .hub .volume-status.is-processing{background:color-mix(in srgb,#d98b1a 18%,transparent);color:color-mix(in srgb,#b06d08 75%,var(--preset-ink))}
html[data-theme] .hub .volume-deadline{display:flex;flex-wrap:wrap;align-items:center;gap:4px}
html[data-theme] .hub .volume-deadline .hub-due{margin:0}
html[data-theme] .hub .volume-actions{display:flex;gap:6px;flex-wrap:wrap}
html[data-theme] .hub .volume-actions button{border-radius:8px}
/* templates: cards */
html[data-theme] .hub .template-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:14px;margin-top:6px;border:0;background:transparent;box-shadow:none;overflow:visible}
html[data-theme] .hub .template-card{display:grid;grid-template-columns:none;gap:0;padding:0;border:1px solid var(--hub-line);border-radius:16px;background:var(--hub-card);box-shadow:var(--hub-shadow);overflow:hidden;min-height:0}
html[data-theme] .hub .template-card-swatches{position:relative;display:flex;align-items:flex-end;gap:6px;height:86px;padding:14px 16px;background:linear-gradient(135deg,var(--preset-accent-soft),var(--preset-dialog-subtle))}
html[data-theme] .hub .template-card-swatches i{width:18px;height:18px;border-radius:6px;box-shadow:0 0 0 2px var(--hub-card)}
html[data-theme] .hub .template-card-sample{position:absolute;top:14px;padding:0 6px;border:2px solid currentColor;border-radius:6px;background:var(--hub-card);font-weight:800;font-size:15px;line-height:22px}
html[data-theme] .hub .template-card-sample:not(.sfx){right:52px}
html[data-theme] .hub .template-card-sample.sfx{right:18px}
html[data-theme] .hub .template-card-body{display:grid;gap:4px;padding:14px 16px 4px}
html[data-theme] .hub .template-card-body strong{font-size:16px;font-weight:650;color:var(--preset-ink)}
html[data-theme] .hub .template-card-body strong small{margin-left:6px;padding:1px 8px;border-radius:999px;background:var(--preset-accent-soft);color:var(--preset-accent-strong);font-size:11px;font-weight:600;vertical-align:middle}
html[data-theme] .hub .template-card-body span{color:var(--hub-muted);font-size:13px}
html[data-theme] .hub .template-card-actions{display:flex;flex-wrap:wrap;gap:6px;padding:12px 16px 16px}
html[data-theme] .hub .template-card-actions button{border-radius:8px}
@media(max-width:1100px){html[data-theme] .hub .hub-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){html[data-theme] .hub .hub-kpis{grid-template-columns:1fr}}
html[data-theme] .hub .series-card.project-row{grid-template-columns:minmax(0,1fr);align-items:stretch;padding:16px;font-size:14px;border-bottom:1px solid var(--hub-line)}
html[data-theme] .hub .series-card>span{overflow-wrap:normal}
html[data-theme] .hub .series-card .series-card-title strong{grid-column:auto}
html[data-theme] .hub .ongoing .hub-avatar{position:static}
html[data-theme] .hub .ongoing .volume-progress span{position:static}
html[data-theme] .hub .hub-kpi{align-content:start}
html[data-theme] .hub button.hub-primary,html[data-theme] .hub .volume-actions button.hub-primary{border-color:var(--preset-accent);background:var(--preset-accent);color:var(--preset-on-accent)}
html[data-theme] .hub button.hub-primary:hover:not(:disabled){border-color:var(--preset-accent-strong);background:var(--preset-accent-hover);color:var(--preset-on-accent)}
html[data-theme=light] .hub button.hub-primary,html[data-theme=light] .hub .volume-actions button.hub-primary,html[data-theme=light] .hub button.hub-primary:hover:not(:disabled){color:var(--preset-on-accent)}
html[data-theme] .hub .ongoing strong{display:-webkit-box;overflow:hidden;white-space:normal;line-height:1.3;-webkit-line-clamp:2;-webkit-box-orient:vertical}
html[data-theme] .hub .ongoing small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html[data-theme] .hub .ongoing .volume-progress{margin-right:0}
html[data-theme] .hub .ongoing>span:last-child{font-size:16px}
html[data-theme] .hub .series-card-title strong,html[data-theme] .hub .series-card-title small{display:block}
html[data-theme] .hub .template-card-sample{background:#fff}
/* dark mode: dark text on the light accent buttons (white had too little contrast) */
html[data-theme=dark] .hub :is(.hub-heading-actions,.ocr-engine-actions,.google-cloud-actions,.volume-actions,.series-actions,.project-section-head) button.hub-primary:not(:disabled){color:var(--preset-on-accent)}
/* calendar add buttons: readable in every state (the general .hub button:hover colour must not apply) */
html[data-theme] .hub .mc-calendar .mc-add,html[data-theme] .hub .mc-calendar .mc-day-add{border-color:var(--preset-accent);background:var(--preset-accent);color:var(--preset-on-accent)}
html[data-theme] .hub .mc-calendar .mc-add:hover:not(:disabled),html[data-theme] .hub .mc-calendar .mc-day-add:hover{border-color:var(--preset-accent-strong);background:var(--preset-accent-hover);color:var(--preset-on-accent)}
html[data-theme=dark] .hub .mc-calendar .mc-add,html[data-theme=dark] .hub .mc-calendar .mc-day-add,html[data-theme=dark] .hub .mc-calendar .mc-add:hover:not(:disabled),html[data-theme=dark] .hub .mc-calendar .mc-day-add:hover{color:var(--preset-dialog)}
/* Dashboard fits the window: no page scrolling; calendar weeks share the height, side lists scroll inside */
@media (min-width:1051px) and (min-height:620px){
  html[data-theme] .hub[data-hub-view=dashboard] .hub-content{overflow:hidden;padding-top:24px;padding-bottom:20px}
  html[data-theme] .hub[data-hub-view=dashboard] .hub-page{display:flex;flex-direction:column;height:100%;min-height:0}
  html[data-theme] .hub[data-hub-view=dashboard] .hub-heading{flex:none;margin-bottom:14px}
  html[data-theme] .hub[data-hub-view=dashboard] .hub-heading h1{font-size:30px}
  html[data-theme] .hub[data-hub-view=dashboard] .hub-notice{flex:none}
  html[data-theme] .hub[data-hub-view=dashboard] .hub-kpis{flex:none;margin-bottom:14px}
  html[data-theme] .hub[data-hub-view=dashboard] .hub-kpi{padding:11px 16px 11px 20px;gap:2px}
  html[data-theme] .hub[data-hub-view=dashboard] .hub-kpi strong{font-size:22px}
  html[data-theme] .hub[data-hub-view=dashboard] .hub-layout{flex:1;min-height:0;grid-template-rows:minmax(0,1fr)}
  html[data-theme] .hub[data-hub-view=dashboard] .calendar-card{display:flex;flex-direction:column;min-height:0;overflow:hidden;padding-bottom:14px}
  html[data-theme] .hub[data-hub-view=dashboard] .mc-head{flex:none;margin-bottom:8px}
  html[data-theme] .hub[data-hub-view=dashboard] .mc-body{flex:1;min-height:0;display:flex;flex-direction:column;overflow-y:auto;scrollbar-width:thin}
  html[data-theme] .hub[data-hub-view=dashboard] .mc-weekdays{flex:none}
  html[data-theme] .hub[data-hub-view=dashboard] .mc-week{flex:1 0 auto;grid-template-rows:34px repeat(var(--mc-lanes,2),26px) minmax(24px,1fr)}
  html[data-theme] .hub[data-hub-view=dashboard] .mc-view-week .mc-week{grid-template-rows:34px repeat(var(--mc-lanes,6),30px) minmax(34px,1fr)}
  html[data-theme] .hub[data-hub-view=dashboard] .mc-view-agenda{display:block}
  html[data-theme] .hub[data-hub-view=dashboard] .hub-side{grid-template-rows:minmax(0,1.25fr) minmax(0,1fr);min-height:0}
  html[data-theme] .hub[data-hub-view=dashboard] .hub-side .hub-card{min-height:0;overflow-y:auto;scrollbar-width:thin;padding-top:0}
  html[data-theme] .hub[data-hub-view=dashboard] .hub-side .hub-card h2{position:sticky;top:0;z-index:1;margin:0 0 8px;padding:18px 0 8px;background:var(--hub-card)}
}
@media (min-width:1051px) and (min-height:620px){
  html[data-theme] .hub[data-hub-view=dashboard] .hub-kpi{grid-template-columns:auto 1fr;align-items:baseline;column-gap:10px}
  html[data-theme] .hub[data-hub-view=dashboard] .hub-kpi strong{grid-column:1 / -1}
  html[data-theme] .hub[data-hub-view=dashboard] .hub-kpi .hub-due{margin:0;justify-self:start}
  html[data-theme] .hub[data-hub-view=dashboard] .mc-head{gap:8px 14px}
  html[data-theme] .hub[data-hub-view=dashboard] .mc-head h2{font-size:28px}
  html[data-theme] .hub[data-hub-view=dashboard] .mc-weekdays{margin-bottom:4px}
  html[data-theme] .hub[data-hub-view=dashboard] .mc-week{margin-bottom:6px;grid-template-rows:30px repeat(var(--mc-lanes,2),23px) minmax(6px,1fr)}
  html[data-theme] .hub[data-hub-view=dashboard] .mc-date{margin-top:4px;line-height:16px}
  html[data-theme] .hub[data-hub-view=dashboard] .mc-week .mc-item{margin-top:1px;margin-bottom:1px;font-size:12.5px;line-height:19px}
}
@media (min-width:1051px) and (max-height:820px){
  html[data-theme] .hub[data-hub-view=dashboard] .hub-kpis{display:none}
}
/* projects: sort, keyword filter, keyword chips; series dialog colour + keywords; keyword settings */
html[data-theme] .hub .series-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
html[data-theme] .hub .series-toolbar-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
html[data-theme] .hub .series-sort{display:flex;align-items:center;gap:8px;color:var(--hub-muted);font-size:13px}
html[data-theme] .hub .series-sort select{height:38px;padding:0 10px;border:1px solid var(--hub-line);border-radius:10px;background:var(--preset-input,var(--hub-card));color:var(--preset-ink);font:inherit}
html[data-theme] .hub .keyword-filter{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 14px}
html[data-theme] .hub .keyword-filter button{padding:5px 12px;border:1px solid var(--hub-line);border-radius:999px;background:var(--hub-card);color:var(--preset-ink);font-size:13px}
html[data-theme] .hub .keyword-filter button:hover{border-color:var(--preset-accent);color:var(--preset-ink)}
html[data-theme] .hub .keyword-filter button.active{border-color:var(--preset-accent);background:var(--preset-accent-soft);color:var(--preset-accent-strong);font-weight:600}
html[data-theme] .hub .series-card-keywords{display:flex;flex-wrap:wrap;gap:5px}
html[data-theme] .hub .keyword-chip-static{padding:1px 9px;border-radius:999px;background:color-mix(in srgb,var(--preset-ink) 7%,transparent);color:var(--hub-muted);font-size:12px}
html[data-theme] .hub .series-color-field,html[data-theme] .hub .series-keyword-field{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:12px 0;padding:0;border:0}
html[data-theme] .hub .series-color-field legend,html[data-theme] .hub .series-keyword-field legend{margin-bottom:6px;color:var(--hub-muted)}
html[data-theme] .hub .series-color-field label,html[data-theme] .hub .series-keyword-field label{display:inline-flex;align-items:center;margin:0;cursor:pointer}
html[data-theme] .hub .series-color-field input,html[data-theme] .hub .series-keyword-field input{position:absolute;opacity:0;pointer-events:none}
html[data-theme] .hub .series-color-field .hub-avatar{width:28px;height:28px;border-radius:9px}
html[data-theme] .hub .series-color-field input:checked+.hub-avatar{box-shadow:0 0 0 2px var(--hub-card),0 0 0 4px var(--preset-ink)}
html[data-theme] .hub .series-color-auto span{padding:4px 10px;border:1px solid var(--hub-line);border-radius:9px;font-size:13px}
html[data-theme] .hub .series-color-auto input:checked+span{border-color:var(--preset-ink);font-weight:600}
html[data-theme] .hub .series-color-field input:focus-visible+*,html[data-theme] .hub .series-keyword-field input:focus-visible+span{outline:2px solid var(--preset-accent);outline-offset:2px}
html[data-theme] .hub .keyword-chip span{padding:4px 12px;border:1px solid var(--hub-line);border-radius:999px;font-size:13px}
html[data-theme] .hub .keyword-chip input:checked+span{border-color:var(--preset-accent);background:var(--preset-accent-soft);color:var(--preset-accent-strong);font-weight:600}
html[data-theme] .hub .keyword-settings .keyword-list{display:grid;gap:6px;margin:12px 0;padding:0;list-style:none}
html[data-theme] .hub .keyword-settings .keyword-list li{display:flex;align-items:center;gap:10px}
html[data-theme] .hub .keyword-settings .keyword-list input{flex:1}
html[data-theme] .hub .keyword-settings .keyword-list small{min-width:64px;color:var(--hub-muted)}
html[data-theme] .hub .keyword-settings .keyword-empty{color:var(--hub-muted)}
html[data-theme] .hub .keyword-settings .keyword-add{display:flex;gap:8px}
html[data-theme] .hub .keyword-settings .keyword-add input{flex:1}
html[data-theme] .hub .keyword-settings .keyword-error{min-height:1.2em;color:var(--preset-danger,#a44651);font-size:13px}
html[data-theme] .hub .template-card-samples{position:absolute;top:14px;right:16px;display:flex;gap:8px}
html[data-theme] .hub .template-card-samples .template-card-sample{position:static}
/* Light that follows the mouse (js/pointer-glow.js): a soft sheen plus a glowing outline near the pointer */
html[data-theme] .hub .hub-kpi::before{content:none}
html[data-theme] .hub .hub-kpi{background:linear-gradient(var(--preset-accent),var(--preset-accent)) left 0 top 14px / 4px calc(100% - 28px) no-repeat,var(--hub-card)}
html[data-theme] .hub .glow-surface{position:relative;isolation:isolate}
html[data-theme] .hub .glow-surface::before,html[data-theme] .hub .glow-surface::after{content:"";position:absolute;pointer-events:none;border-radius:inherit;opacity:0;transition:opacity .3s ease}
html[data-theme] .hub .glow-surface::after{inset:0;z-index:-1;background:radial-gradient(380px circle at var(--mx,50%) var(--my,50%),color-mix(in srgb,var(--preset-accent) 11%,transparent),transparent 55%)}
html[data-theme] .hub .glow-surface::before{inset:-1px;z-index:2;padding:1.5px;background:radial-gradient(220px circle at var(--mx,50%) var(--my,50%),color-mix(in srgb,var(--preset-accent) 85%,#fff),transparent 70%);-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0)}
html[data-theme=dark] .hub .glow-surface::after{background:radial-gradient(380px circle at var(--mx,50%) var(--my,50%),color-mix(in srgb,var(--preset-accent) 16%,transparent),transparent 55%)}
html[data-theme] .hub .glow-surface.is-lit::before,html[data-theme] .hub .glow-surface.is-lit::after{opacity:1}
@media (prefers-reduced-motion:reduce){html[data-theme] .hub .glow-surface::before,html[data-theme] .hub .glow-surface::after{transition:none}}
html[data-theme] .hub :is(.series-card,.ongoing,.upcoming):hover:not(:disabled){color:var(--preset-ink)}
/* === Polish: clearer type, calm side lists, cleaner light effect === */
:root{--font-ui-default:"Segoe UI Variable Text","Segoe UI",system-ui,-apple-system,"Helvetica Neue",Arial,sans-serif;--font-ui-arial:Arial,"Helvetica Neue",sans-serif}
html[data-theme] .hub{-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
html[data-theme] .hub button{font-weight:500}
html[data-theme] .hub .hub-heading-actions button{font-weight:500;letter-spacing:.005em}
html[data-theme] .hub .hub-sidebar nav button.active{font-weight:600}
html[data-theme] .hub .hub-kpi strong{font-weight:600;letter-spacing:-.01em}
html[data-theme] .hub .ongoing strong{font-size:14px;font-weight:600;line-height:1.3}
html[data-theme] .hub .ongoing small,html[data-theme] .hub .upcoming small{font-size:12px}
html[data-theme] .hub .upcoming span:first-child{font-size:14px;font-weight:600}
html[data-theme] .hub .series-card-title strong,html[data-theme] .hub .template-card-body strong{font-weight:600}
/* side cards: heading stays, only the list scrolls; slim scrollbar that appears on hover; fades */
html[data-theme] .hub .hub-side-card{display:flex;flex-direction:column;min-height:0;overflow:hidden}
html[data-theme] .hub .hub-side-card h2{flex:none}
html[data-theme] .hub .hub-side-list{flex:1;min-height:0;margin:0 -6px;padding:2px 6px 4px;overflow-x:hidden;overflow-y:auto;scrollbar-width:thin;scrollbar-color:transparent transparent;transition:scrollbar-color .2s}
html[data-theme] .hub .hub-side-list:hover{scrollbar-color:color-mix(in srgb,var(--preset-ink) 22%,transparent) transparent}
html[data-theme] .hub .hub-side-list.more-below{-webkit-mask-image:linear-gradient(#000 calc(100% - 28px),transparent);mask-image:linear-gradient(#000 calc(100% - 28px),transparent)}
html[data-theme] .hub .hub-side-list.more-above{-webkit-mask-image:linear-gradient(transparent,#000 22px);mask-image:linear-gradient(transparent,#000 22px)}
html[data-theme] .hub .hub-side-list.more-above.more-below{-webkit-mask-image:linear-gradient(transparent,#000 22px,#000 calc(100% - 28px),transparent);mask-image:linear-gradient(transparent,#000 22px,#000 calc(100% - 28px),transparent)}
html[data-theme] .hub .hub-side-list .ongoing:hover:not(:disabled){transform:none}
@media (min-width:1051px) and (min-height:620px){
  html[data-theme] .hub[data-hub-view=dashboard] .hub-side .hub-side-card{overflow:hidden;padding-top:18px}
  html[data-theme] .hub[data-hub-view=dashboard] .hub-side .hub-side-card h2{position:static;padding:0;margin:0 0 12px;background:none}
}
/* light effect: no outline on list entries (it was clipped at the edge of the scrolling list) */
html[data-theme] .hub .hub-side-list .glow-surface::before{content:none}
/* key figures: accent bar as an inset edge, so it follows the rounded corner */
html[data-theme] .hub .hub-kpi{background:var(--hub-card);box-shadow:inset 4px 0 0 var(--preset-accent),var(--hub-shadow)}
/* template editor: formatting examples aligned with their settings (js/template-editor.js) */
.template-body.formatting-section>.template-preview{padding-top:18px}
.template-body.formatting-section .format-preview-list.aligned{display:block;position:relative;width:100%}
.template-body.formatting-section .format-preview-list.aligned>div{position:absolute;left:0;right:0;height:auto;min-height:44px}
/* light effect outline only on series and template cards (on small cards it showed as a thin stripe) */
html[data-theme] .hub .glow-surface:not(.series-card):not(.template-card)::before{content:none}
html[data-theme] .hub .hub-kpi{border-left:4px solid var(--preset-accent);padding-left:18px;box-shadow:var(--hub-shadow)}
/* === Style presets 2: Modern, Verspielt (reworked), Manga and Washi (new) === */
:root{--font-display-modern:"Segoe UI Variable Display","Segoe UI",system-ui,sans-serif;--font-hand:"Ink Free","Segoe Print","Comic Sans MS",cursive;--font-manga:"Bahnschrift Condensed","Bahnschrift","Arial Narrow",Impact,sans-serif;--font-mincho:"Yu Mincho","YuMincho","Hiragino Mincho ProN","MS Mincho",Georgia,serif}
html[data-style="modern"]{
  --preset-bg:#f6f7f9;--preset-surface:#fff;--preset-sidebar:#fff;--preset-border:#e3e6eb;--preset-ink:#111827;
  --preset-accent:#2563eb;--preset-accent-strong:#1d4ed8;--preset-accent-soft:#e8efff;--preset-hover:#eef3ff;--preset-hover-text:#1e40af;
  --preset-editor-bg:#f3f4f6;--preset-editor-panel:#fbfbfc;--preset-editor-surface:#fff;--preset-editor-border:#e1e5ea;--preset-editor-ink:#111827;--preset-editor-muted:#5b6472;
  --preset-row-hover:#f1f5ff;--preset-dialog:#fff;--preset-dialog-subtle:#f6f8fb;--preset-input:#fff;--preset-danger:#b42318;--preset-danger-soft:#fef0ee;
}
html[data-theme="dark"][data-style="modern"]{
  --preset-bg:#0d1117;--preset-surface:#131a23;--preset-sidebar:#0f141b;--preset-border:#263040;--preset-ink:#e6edf3;
  --preset-accent:#5b9bff;--preset-accent-strong:#8db8ff;--preset-accent-soft:#16243d;--preset-hover:#17233a;--preset-hover-text:#d5e4ff;
  --preset-editor-bg:#0d1117;--preset-editor-panel:#0f141b;--preset-editor-surface:#131a23;--preset-editor-border:#263040;--preset-editor-ink:#e6edf3;--preset-editor-muted:#9aa7b4;
  --preset-row-hover:#17202c;--preset-dialog:#131a23;--preset-dialog-subtle:#18212d;--preset-input:#0f151d;--preset-danger:#ff8a80;--preset-danger-soft:#3a1d1d;
}
html[data-style="verspielt"]{
  --preset-bg:#fff7fb;--preset-surface:#fff;--preset-sidebar:#fff0f7;--preset-border:#f4d6e6;--preset-ink:#2d2440;
  --preset-accent:#c92f69;--preset-accent-strong:#a8204f;--preset-accent-soft:#ffe3ef;--preset-hover:#fff0f6;--preset-hover-text:#9c1f4b;
  --preset-editor-bg:#fff4f9;--preset-editor-panel:#fffafd;--preset-editor-surface:#fff;--preset-editor-border:#f2d5e4;--preset-editor-ink:#2d2440;--preset-editor-muted:#7a6a86;
  --preset-row-hover:#fff0f6;--preset-dialog:#fff;--preset-dialog-subtle:#fff5fa;--preset-input:#fff;--preset-danger:#b42318;--preset-danger-soft:#fef0ee;
  --style-pop-1:#c92f69;--style-pop-2:#7c5cff;--style-pop-3:#0e9f8a;--style-pop-4:#e58a00;
}
html[data-theme="dark"][data-style="verspielt"]{
  --preset-bg:#1e1726;--preset-surface:#261d31;--preset-sidebar:#211a2b;--preset-border:#45354f;--preset-ink:#f6ecff;
  --preset-accent:#ff7aa8;--preset-accent-strong:#ffa6c6;--preset-accent-soft:#4a2238;--preset-hover:#3a2333;--preset-hover-text:#ffd5e4;
  --preset-editor-bg:#1e1726;--preset-editor-panel:#211a2b;--preset-editor-surface:#2a2035;--preset-editor-border:#45354f;--preset-editor-ink:#f6ecff;--preset-editor-muted:#c2b2cf;
  --preset-row-hover:#33263f;--preset-dialog:#261d31;--preset-dialog-subtle:#2e2339;--preset-input:#2e2339;--preset-danger:#ff9a9a;--preset-danger-soft:#43222a;
  --style-pop-1:#ff7aa8;--style-pop-2:#a993ff;--style-pop-3:#4fd1b9;--style-pop-4:#ffc062;
}
html[data-style="manga"]{
  --preset-bg:#fafafa;--preset-surface:#fff;--preset-sidebar:#fff;--preset-border:#111;--preset-ink:#111;
  --preset-accent:#c8102e;--preset-accent-strong:#9b0c23;--preset-accent-soft:#fde3e6;--preset-hover:#fff1f2;--preset-hover-text:#9b0c23;
  --preset-editor-bg:#f2f2f2;--preset-editor-panel:#fff;--preset-editor-surface:#fff;--preset-editor-border:#1a1a1a;--preset-editor-ink:#111;--preset-editor-muted:#5c5c5c;
  --preset-row-hover:#f4f4f4;--preset-dialog:#fff;--preset-dialog-subtle:#f5f5f5;--preset-input:#fff;--preset-danger:#c8102e;--preset-danger-soft:#fde3e6;
  --style-panel-shadow:#111;
}
html[data-theme="dark"][data-style="manga"]{
  --preset-bg:#121212;--preset-surface:#1b1b1b;--preset-sidebar:#161616;--preset-border:#e8e8e8;--preset-ink:#f2f2f2;
  --preset-accent:#ff5a6a;--preset-accent-strong:#ff8f99;--preset-accent-soft:#3d1418;--preset-hover:#2a1416;--preset-hover-text:#ffd0d5;
  --preset-editor-bg:#121212;--preset-editor-panel:#161616;--preset-editor-surface:#1b1b1b;--preset-editor-border:#d6d6d6;--preset-editor-ink:#f2f2f2;--preset-editor-muted:#b3b3b3;
  --preset-row-hover:#222;--preset-dialog:#1b1b1b;--preset-dialog-subtle:#222;--preset-input:#222;--preset-danger:#ff8f99;--preset-danger-soft:#3d1418;
  --style-panel-shadow:#000;
}
html[data-style="washi"]{
  --preset-bg:#f6f1e7;--preset-surface:#fffdf8;--preset-sidebar:#efe7d8;--preset-border:#e0d5c0;--preset-ink:#2b2a33;
  --preset-accent:#2f4b7c;--preset-accent-strong:#223a63;--preset-accent-soft:#e6ebf4;--preset-hover:#efe9dc;--preset-hover-text:#223a63;
  --preset-editor-bg:#f3ede2;--preset-editor-panel:#fbf8f1;--preset-editor-surface:#fffdf8;--preset-editor-border:#dfd3bd;--preset-editor-ink:#2b2a33;--preset-editor-muted:#6e6a60;
  --preset-row-hover:#f1ead9;--preset-dialog:#fffdf8;--preset-dialog-subtle:#f8f3e8;--preset-input:#fffdf8;--preset-danger:#b8432a;--preset-danger-soft:#fbe9e3;
  --style-vermilion:#c8452c;
}
html[data-theme="dark"][data-style="washi"]{
  --preset-bg:#191a20;--preset-surface:#22232b;--preset-sidebar:#1d1e25;--preset-border:#3a3b46;--preset-ink:#ece6da;
  --preset-accent:#8fa9d8;--preset-accent-strong:#b3c6ea;--preset-accent-soft:#27324a;--preset-hover:#2a2e3a;--preset-hover-text:#d9e3f6;
  --preset-editor-bg:#191a20;--preset-editor-panel:#1d1e25;--preset-editor-surface:#22232b;--preset-editor-border:#3a3b46;--preset-editor-ink:#ece6da;--preset-editor-muted:#aaa497;
  --preset-row-hover:#2a2b34;--preset-dialog:#22232b;--preset-dialog-subtle:#282932;--preset-input:#282932;--preset-danger:#f0a08c;--preset-danger-soft:#43281f;
  --style-vermilion:#e8765c;
}
/* hub backgrounds follow the style (the old rules used fixed colours) */
html[data-style] .hub{background:var(--preset-bg);color:var(--preset-ink)}
html[data-style] .hub .hub-sidebar{background:var(--preset-sidebar);border-color:var(--preset-border)}
.appearance-style[data-style-choice=manga] strong{font-family:var(--font-manga);text-transform:uppercase;letter-spacing:.05em}
.appearance-style[data-style-choice=washi] strong{font-family:var(--font-mincho)}
.appearance-style[data-style-choice=verspielt] strong{font-family:var(--font-hand);font-size:16px}
.appearance-style[data-style-choice=modern] strong{font-family:var(--font-display-modern);letter-spacing:-.01em}

/* Modern: crisp edges, no italics, flat */
html[data-style=modern] .hub .hub-card,html[data-style=modern] .hub .hub-kpi,html[data-style=modern] .hub .series-card,html[data-style=modern] .hub .template-card{border-radius:10px;box-shadow:0 1px 2px #0000000f}
html[data-style=modern] .hub button,html[data-style=modern] .hub input,html[data-style=modern] .hub select{border-radius:8px}
html[data-style=modern] .hub .hub-heading h1{font-weight:650;letter-spacing:-.03em}
html[data-style=modern] .hub .hub-card h2,html[data-style=modern] .hub .mc-head h2{font-style:normal;font-weight:650;letter-spacing:-.02em;font-size:22px}
html[data-style=modern] .hub .hub-avatar{border-radius:8px}
html[data-style=modern] .hub .hub-kpi{border-left-width:3px}

/* Verspielt: candy colours, dots, pills, handwriting, little bounces */
html[data-style=verspielt] .hub{background:radial-gradient(color-mix(in srgb,var(--preset-accent) 16%,transparent) 1.3px,transparent 1.6px) 0 0 / 20px 20px,var(--preset-bg)}
html[data-style=verspielt] .hub .hub-card,html[data-style=verspielt] .hub .series-card,html[data-style=verspielt] .hub .template-card{border-radius:24px;border-width:2px}
html[data-style=verspielt] .hub .hub-kpi{border-radius:20px;border-width:2px;border-left-width:6px}
html[data-style=verspielt] .hub .hub-kpi:nth-child(4n+1){border-left-color:var(--style-pop-1)}
html[data-style=verspielt] .hub .hub-kpi:nth-child(4n+2){border-left-color:var(--style-pop-2)}
html[data-style=verspielt] .hub .hub-kpi:nth-child(4n+3){border-left-color:var(--style-pop-3)}
html[data-style=verspielt] .hub .hub-kpi:nth-child(4n+4){border-left-color:var(--style-pop-4)}
html[data-style=verspielt] .hub button,html[data-style=verspielt] .hub input,html[data-style=verspielt] .hub select{border-radius:999px}
html[data-style=verspielt] .hub .hub-heading h1{font-size:40px;font-weight:600;transform:rotate(-1.5deg);transform-origin:left center}
html[data-style=verspielt] .hub .hub-card h2,html[data-style=verspielt] .hub .mc-head h2{font-style:normal;font-weight:600;font-size:28px}
html[data-style=verspielt] .hub .hub-avatar{border-radius:50%}
html[data-style=verspielt] .hub :is(.series-card,.template-card,.hub-kpi){transition:transform .2s cubic-bezier(.34,1.56,.64,1),border-color .15s}
html[data-style=verspielt] .hub :is(.series-card,.template-card):hover{transform:translateY(-3px) rotate(-.6deg)}
html[data-style=verspielt] .hub .hub-kpi:hover{transform:translateY(-2px) rotate(.5deg)}
html[data-style=verspielt] .hub .volume-progress span{background:linear-gradient(90deg,var(--style-pop-1),var(--style-pop-2))}

/* Manga: comic panels with thick outlines, offset shadows and screentone */
html[data-style=manga] .hub{background:radial-gradient(color-mix(in srgb,var(--preset-ink) 11%,transparent) .9px,transparent 1.2px) 0 0 / 7px 7px,var(--preset-bg)}
html[data-style=manga] .hub .hub-card,html[data-style=manga] .hub .series-card,html[data-style=manga] .hub .template-card,html[data-style=manga] .hub .hub-kpi{border:2px solid var(--preset-ink);border-radius:4px;box-shadow:5px 5px 0 var(--style-panel-shadow)}
html[data-style=manga] .hub .hub-kpi{border-left:8px solid var(--preset-accent)}
html[data-style=manga] .hub :is(.series-card,.template-card):hover{transform:translate(-2px,-2px);box-shadow:7px 7px 0 var(--style-panel-shadow)}
html[data-style=manga] .hub button,html[data-style=manga] .hub input,html[data-style=manga] .hub select{border-radius:3px}
html[data-style=manga] .hub .hub-heading-actions button{border:2px solid var(--preset-ink);box-shadow:3px 3px 0 var(--style-panel-shadow)}
html[data-style=manga] .hub .hub-heading h1,html[data-style=manga] .hub .hub-card h2,html[data-style=manga] .hub .mc-head h2{font-style:normal;font-weight:700;text-transform:uppercase;letter-spacing:.04em}
html[data-style=manga] .hub .hub-heading h1{font-size:38px}
html[data-style=manga] .hub .hub-card h2,html[data-style=manga] .hub .mc-head h2{font-size:26px}
html[data-style=manga] .hub .hub-avatar{border:2px solid var(--preset-ink);border-radius:4px;background:var(--preset-dialog);color:var(--preset-ink)}
html[data-style=manga] .hub .ongoing,html[data-style=manga] .hub .upcoming{border:1.5px solid var(--preset-ink);border-radius:3px}
html[data-style=manga] .hub .hub-sidebar nav button.active{border-radius:3px}

/* Washi: paper, indigo and vermilion, Mincho headings */
html[data-style=washi] .hub{background:radial-gradient(120% 80% at 15% 0%,color-mix(in srgb,var(--preset-surface) 70%,transparent),transparent 60%),repeating-linear-gradient(115deg,color-mix(in srgb,var(--preset-ink) 2.5%,transparent) 0 1px,transparent 1px 9px),var(--preset-bg)}
html[data-style=washi] .hub .hub-card,html[data-style=washi] .hub .series-card,html[data-style=washi] .hub .template-card,html[data-style=washi] .hub .hub-kpi{border-radius:6px}
html[data-style=washi] .hub .hub-kpi{border-left-color:var(--style-vermilion)}
html[data-style=washi] .hub .hub-heading h1,html[data-style=washi] .hub .hub-card h2,html[data-style=washi] .hub .mc-head h2{font-style:normal;font-weight:500;letter-spacing:.04em}
html[data-style=washi] .hub .hub-card h2::before,html[data-style=washi] .hub .mc-head h2::before{content:"";display:inline-block;width:.42em;height:.42em;margin:0 .45em .12em 0;border-radius:50%;background:var(--style-vermilion);vertical-align:middle}
html[data-style=washi] .hub .hub-avatar{border-radius:50%}
html[data-style=washi] .hub button,html[data-style=washi] .hub input,html[data-style=washi] .hub select{border-radius:5px}

/* === Number styles 2: hanko stamp, circle, block === */
.box.number-style-stamp .tag,.template-box-mark.number-style-stamp,#numberLayer span.page-number-style-stamp,.template-page-mark.page-number-style-stamp{display:inline-grid;place-items:center;min-width:1.6em;height:1.6em;width:auto;padding:0 .25em;border-radius:50%;background:currentColor;box-shadow:inset 0 0 0 .1em #fff9,0 1px 2px #0004;line-height:1;font-weight:800;-webkit-text-fill-color:#fff;-webkit-text-stroke:0;text-shadow:none}
.box.number-style-ring .tag,.template-box-mark.number-style-ring,#numberLayer span.page-number-style-ring,.template-page-mark.page-number-style-ring{display:inline-grid;place-items:center;min-width:1.55em;height:1.55em;width:auto;padding:0 .2em;border:2px solid currentColor;border-radius:50%;background:#fff;line-height:1;-webkit-text-stroke:0;text-shadow:none}
.box.number-style-block .tag,.template-box-mark.number-style-block,#numberLayer span.page-number-style-block,.template-page-mark.page-number-style-block{display:inline-block;width:auto;height:auto;padding:.06em .42em;border-radius:2px;background:currentColor;box-shadow:.14em .14em 0 #0006;line-height:1.15;font-weight:800;-webkit-text-fill-color:#fff;-webkit-text-stroke:0;text-shadow:none}
/* selected main menu entry: a thin outline like the profile button (no bar at the left) */
html[data-theme] .hub .hub-sidebar nav button{border:1px solid transparent}
html[data-theme] .hub .hub-sidebar nav button.active{border-color:var(--preset-border);background:var(--preset-surface);color:var(--preset-ink);box-shadow:none}
html[data-theme] .hub .hub-sidebar nav button.active .hub-nav-icon{color:var(--preset-accent-strong)}
html[data-style=washi] .hub .hub-card h2,html[data-style=washi] .hub .mc-head h2{font-size:24px;letter-spacing:.02em}
html[data-style=modern] .hub .mc-weeklabel strong{font-style:normal;font-weight:600}
/* Romantisch (light): slightly deeper accent so white text on buttons stays readable */
html[data-style="romantisch"]:not([data-theme="dark"]){--preset-accent:#915a7a;--preset-accent-strong:#7d4a67}
/* key figures: no accent bar at the left, same outline all round (every style) */
html[data-style][data-theme] .hub .hub-kpis .hub-kpi:nth-child(n){border-left:1px solid var(--hub-line);padding-left:20px}
html[data-style=verspielt][data-theme] .hub .hub-kpis .hub-kpi:nth-child(n){border-left:2px solid var(--hub-line)}
html[data-style=manga][data-theme] .hub .hub-kpis .hub-kpi:nth-child(n){border-left:2px solid var(--preset-ink)}
/* === Style presets 3: Standard (glass), Modern (grid), Romantisch (blush) === */
/* Standard: soft colour fields behind frosted-glass cards */
html[data-style=standard] .hub{background:radial-gradient(38% 45% at 12% 8%,color-mix(in srgb,var(--preset-accent) 16%,transparent),transparent 70%),radial-gradient(35% 40% at 92% 18%,color-mix(in srgb,#5aa9e6 14%,transparent),transparent 70%),radial-gradient(40% 45% at 70% 95%,color-mix(in srgb,#e58bb5 12%,transparent),transparent 70%),var(--preset-bg)}
html[data-style=standard] .hub :is(.hub-card,.hub-kpi,.series-card,.template-card){background:color-mix(in srgb,var(--preset-dialog) 82%,transparent);border-color:color-mix(in srgb,var(--preset-dialog) 60%,var(--preset-border));-webkit-backdrop-filter:blur(16px) saturate(1.3);backdrop-filter:blur(16px) saturate(1.3);box-shadow:0 1px 0 color-mix(in srgb,#fff 60%,transparent) inset,0 10px 30px color-mix(in srgb,var(--preset-accent) 10%,#0000000d)}
html[data-theme=dark][data-style=standard] .hub :is(.hub-card,.hub-kpi,.series-card,.template-card){background:color-mix(in srgb,var(--preset-dialog) 86%,transparent);box-shadow:0 1px 0 #ffffff0d inset,0 12px 30px #0006}
html[data-style=standard] .hub .hub-sidebar{background:color-mix(in srgb,var(--preset-sidebar) 80%,transparent);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}
html[data-style=standard] .hub :is(.ongoing,.upcoming){background:color-mix(in srgb,var(--preset-dialog-subtle) 75%,transparent)}
html[data-style=standard] .hub .hub-heading h1{background:linear-gradient(90deg,var(--preset-ink),var(--preset-accent-strong));-webkit-background-clip:text;background-clip:text;color:transparent}
html[data-style=standard] .hub :is(.series-card,.template-card):hover{transform:translateY(-3px);box-shadow:0 18px 40px color-mix(in srgb,var(--preset-accent) 18%,#0000001a)}
html[data-style=standard] .hub .hub-kpi strong{background:linear-gradient(135deg,var(--preset-ink) 30%,var(--preset-accent-strong));-webkit-background-clip:text;background-clip:text;color:transparent}

/* Modern: millimetre grid, sharp labels, blue edge on hover */
html[data-style=modern] .hub{background:linear-gradient(color-mix(in srgb,var(--preset-ink) 5%,transparent) 1px,transparent 1px) 0 0 / 24px 24px,linear-gradient(90deg,color-mix(in srgb,var(--preset-ink) 5%,transparent) 1px,transparent 1px) 0 0 / 24px 24px,var(--preset-bg)}
html[data-style=modern] .hub .hub-kpi span,html[data-style=modern] .hub .hub-subtitle,html[data-style=modern] .hub .mc-weekdays,html[data-style=modern] .hub .series-card-title small{text-transform:uppercase;letter-spacing:.08em;font-size:11px;font-weight:600}
html[data-style=modern] .hub .hub-kpi strong{font-variant-numeric:tabular-nums;font-size:28px;letter-spacing:-.03em}
html[data-style=modern] .hub :is(.series-card,.template-card,.hub-kpi){transition:box-shadow .15s,border-color .15s,transform .15s}
html[data-style=modern] .hub :is(.series-card,.template-card):hover,html[data-style=modern] .hub .hub-kpi:hover{border-color:var(--preset-accent);box-shadow:0 0 0 1px var(--preset-accent),0 8px 24px color-mix(in srgb,var(--preset-accent) 14%,transparent);transform:translateY(-1px)}
html[data-style=modern] .hub .hub-card h2::after,html[data-style=modern] .hub .mc-head h2::after{content:"";display:block;width:28px;height:3px;margin-top:6px;border-radius:2px;background:var(--preset-accent)}
html[data-style=modern] .hub .volume-progress{height:5px;border-radius:2px}
html[data-style=modern] .hub .volume-progress span{border-radius:2px;background:var(--preset-accent)}
html[data-style=modern] .hub .hub-due{border-radius:4px;text-transform:uppercase;letter-spacing:.04em;font-size:10.5px}

/* Romantisch: blush gradient, round soft cards, italic serif headings with a fine ornament line */
html[data-style=romantisch] .hub{background:radial-gradient(60% 50% at 0% 0%,color-mix(in srgb,var(--preset-accent) 12%,transparent),transparent 70%),radial-gradient(50% 50% at 100% 100%,color-mix(in srgb,#e9b8a6 18%,transparent),transparent 70%),var(--preset-bg)}
html[data-style=romantisch] .hub :is(.hub-card,.series-card,.template-card){border-radius:26px;box-shadow:0 14px 34px color-mix(in srgb,var(--preset-accent) 14%,transparent)}
html[data-style=romantisch] .hub .hub-kpi{border-radius:22px;box-shadow:0 10px 26px color-mix(in srgb,var(--preset-accent) 12%,transparent)}
html[data-style=romantisch] .hub button,html[data-style=romantisch] .hub input,html[data-style=romantisch] .hub select{border-radius:999px}
html[data-style=romantisch] .hub .hub-heading h1{font-style:italic;font-size:38px}
html[data-style=romantisch] .hub .hub-card h2,html[data-style=romantisch] .hub .mc-head h2{font-style:italic}
html[data-style=romantisch] .hub .hub-card h2::after,html[data-style=romantisch] .hub .mc-head h2::after{content:"";display:block;width:70px;height:1px;margin-top:8px;background:linear-gradient(90deg,var(--preset-accent),transparent)}
html[data-style=romantisch] .hub .hub-avatar{border-radius:50%;background:linear-gradient(135deg,hsl(var(--avatar-hue) 60% 92%),hsl(calc(var(--avatar-hue) + 40) 60% 88%))}
html[data-theme=dark][data-style=romantisch] .hub .hub-avatar{background:linear-gradient(135deg,hsl(var(--avatar-hue) 30% 30%),hsl(calc(var(--avatar-hue) + 40) 30% 24%))}
html[data-style=romantisch] .hub .volume-progress span{background:linear-gradient(90deg,var(--preset-accent),#e9a38f)}
html[data-style=romantisch] .hub :is(.series-card,.template-card):hover{transform:translateY(-2px);box-shadow:0 20px 40px color-mix(in srgb,var(--preset-accent) 20%,transparent)}
html[data-style=romantisch] .hub .hub-kpi strong{font-family:var(--heading-primary-font);font-style:italic;font-weight:500}
html[data-style=standard] .hub{background:radial-gradient(40% 48% at 10% 6%,color-mix(in srgb,var(--preset-accent) 24%,transparent),transparent 70%),radial-gradient(36% 42% at 94% 14%,color-mix(in srgb,#5aa9e6 22%,transparent),transparent 70%),radial-gradient(42% 46% at 68% 98%,color-mix(in srgb,#e58bb5 20%,transparent),transparent 70%),var(--preset-bg)}
html[data-style=standard] .hub .hub-heading h1,html[data-style=standard] .hub .hub-kpi strong{-webkit-text-fill-color:transparent}
/* === Modern, sleek: cool slate, hairlines, almost square, no shadows (like current product UIs) === */
html[data-style="modern"]:not([data-theme="dark"]){
  --preset-bg:#f8fafc;--preset-surface:#fff;--preset-sidebar:#f8fafc;--preset-border:#e2e8f0;--preset-ink:#0f172a;
  --preset-accent:#0f172a;--preset-accent-strong:#334155;--preset-accent-soft:#f1f5f9;--preset-hover:#f1f5f9;--preset-hover-text:#0f172a;
  --preset-editor-bg:#f1f5f9;--preset-editor-panel:#f8fafc;--preset-editor-surface:#fff;--preset-editor-border:#e2e8f0;--preset-editor-ink:#0f172a;--preset-editor-muted:#64748b;
  --preset-row-hover:#f1f5f9;--preset-dialog:#fff;--preset-dialog-subtle:#f8fafc;--preset-input:#fff;--preset-danger:#dc2626;--preset-danger-soft:#fef2f2;
}
html[data-theme="dark"][data-style="modern"]{
  --preset-bg:#020617;--preset-surface:#0b1120;--preset-sidebar:#060b18;--preset-border:#1e293b;--preset-ink:#f1f5f9;
  --preset-accent:#f1f5f9;--preset-accent-strong:#cbd5e1;--preset-accent-soft:#1e293b;--preset-hover:#111a2e;--preset-hover-text:#f8fafc;
  --preset-editor-bg:#020617;--preset-editor-panel:#060b18;--preset-editor-surface:#0b1120;--preset-editor-border:#1e293b;--preset-editor-ink:#f1f5f9;--preset-editor-muted:#94a3b8;
  --preset-row-hover:#0f172a;--preset-dialog:#0b1120;--preset-dialog-subtle:#0f172a;--preset-input:#0f172a;--preset-danger:#f87171;--preset-danger-soft:#2a1215;
}
html[data-style=modern] .hub{background:var(--preset-bg)}
html[data-style=modern] .hub :is(.hub-card,.hub-kpi,.series-card,.template-card,.project-table,.hub-projects,.mc-week,.mc-agenda-day){border-radius:6px;box-shadow:none}
html[data-style=modern] .hub :is(.ongoing,.upcoming,.hub-sidebar nav button,.hub-profile,.mc-item,.mc-views,.mc-views button,.hub-avatar,.hub-due,.keyword-chip-static,.keyword-filter button,.volume-status,.template-card-sample,button,input,select){border-radius:4px}
html[data-style=modern] .hub :is(.series-card,.template-card,.hub-kpi,.ongoing,.upcoming):hover:not(:disabled){transform:none;box-shadow:none;border-color:color-mix(in srgb,var(--preset-ink) 28%,var(--preset-border))}
html[data-style=modern] .hub .hub-heading-actions button.hub-primary{box-shadow:none}
html[data-style=modern] .hub .hub-heading h1{font-size:28px;font-weight:600;letter-spacing:-.025em}
html[data-style=modern] .hub .hub-card h2,html[data-style=modern] .hub .mc-head h2{font-size:17px;font-weight:600;letter-spacing:-.01em}
html[data-style=modern] .hub .hub-card h2::after,html[data-style=modern] .hub .mc-head h2::after{content:none}
html[data-style=modern] .hub :is(.hub-kpi span,.hub-subtitle,.series-card-title small){text-transform:none;letter-spacing:0;font-size:13px;font-weight:400}
html[data-style=modern] .hub .hub-due{text-transform:none;letter-spacing:0;font-size:12px}
html[data-style=modern] .hub .hub-kpi strong{font-size:24px;font-weight:600;letter-spacing:-.02em}
html[data-style=modern] .hub .hub-avatar{background:hsl(var(--avatar-hue) 22% 94%);color:hsl(var(--avatar-hue) 28% 28%)}
html[data-theme=dark][data-style=modern] .hub .hub-avatar{background:hsl(var(--avatar-hue) 18% 16%);color:hsl(var(--avatar-hue) 35% 82%)}
html[data-style=modern] .hub .volume-progress{height:4px;border-radius:2px}
html[data-style=modern] .hub .volume-progress span{border-radius:2px;background:var(--preset-accent)}
html[data-style=modern] .hub .glow-surface::after{background:radial-gradient(300px circle at var(--mx,50%) var(--my,50%),color-mix(in srgb,var(--preset-ink) 4%,transparent),transparent 60%)}
html[data-style=modern] .hub .glow-surface::before{background:radial-gradient(180px circle at var(--mx,50%) var(--my,50%),color-mix(in srgb,var(--preset-ink) 35%,transparent),transparent 70%)}
html[data-style=modern] .hub .mc-weeklabel strong{font-style:normal;font-weight:600}
html[data-style=modern][data-theme] .hub[data-hub-view=dashboard] .mc-head h2{font-size:17px;font-weight:600;letter-spacing:-.01em}
/* the position picker sits inside the number label: it must not inherit the white fill of the stamp/block styles */
.number-position-picker,.number-position-picker *{-webkit-text-fill-color:currentColor;-webkit-text-stroke:0}
/* template cards: fixed swatch strip, buttons at the bottom (cards of a row line up) */
html[data-theme] .hub .template-card{grid-template-rows:86px auto 1fr;align-content:stretch}
html[data-theme] .hub .template-card-actions{align-self:end}

/* === Washi, refined: seigaiha waves on paper, hanko stamps, Mincho, indigo and vermilion === */
html[data-style=washi] .hub{background:radial-gradient(120% 80% at 15% 0%,color-mix(in srgb,var(--preset-surface) 75%,transparent),transparent 60%),url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24' viewBox='0 0 48 24'%3E%3Cg fill='%23f6f1e7' stroke='%232f4b7c' stroke-opacity='0.09' stroke-width='1'%3E%3Ccircle cx='0' cy='12' r='22'/%3E%3Ccircle cx='0' cy='12' r='16'/%3E%3Ccircle cx='0' cy='12' r='10'/%3E%3Ccircle cx='0' cy='12' r='4'/%3E%3Ccircle cx='48' cy='12' r='22'/%3E%3Ccircle cx='48' cy='12' r='16'/%3E%3Ccircle cx='48' cy='12' r='10'/%3E%3Ccircle cx='48' cy='12' r='4'/%3E%3Ccircle cx='24' cy='24' r='22'/%3E%3Ccircle cx='24' cy='24' r='16'/%3E%3Ccircle cx='24' cy='24' r='10'/%3E%3Ccircle cx='24' cy='24' r='4'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 48px 24px,var(--preset-bg)}
html[data-theme=dark][data-style=washi] .hub{background:radial-gradient(120% 80% at 15% 0%,color-mix(in srgb,var(--preset-surface) 60%,transparent),transparent 60%),url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24' viewBox='0 0 48 24'%3E%3Cg fill='%23191a20' stroke='%238fa9d8' stroke-opacity='0.08' stroke-width='1'%3E%3Ccircle cx='0' cy='12' r='22'/%3E%3Ccircle cx='0' cy='12' r='16'/%3E%3Ccircle cx='0' cy='12' r='10'/%3E%3Ccircle cx='0' cy='12' r='4'/%3E%3Ccircle cx='48' cy='12' r='22'/%3E%3Ccircle cx='48' cy='12' r='16'/%3E%3Ccircle cx='48' cy='12' r='10'/%3E%3Ccircle cx='48' cy='12' r='4'/%3E%3Ccircle cx='24' cy='24' r='22'/%3E%3Ccircle cx='24' cy='24' r='16'/%3E%3Ccircle cx='24' cy='24' r='10'/%3E%3Ccircle cx='24' cy='24' r='4'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 48px 24px,var(--preset-bg)}
html[data-style=washi] .hub :is(.hub-card,.series-card,.template-card,.hub-kpi){border-radius:3px;border-color:color-mix(in srgb,var(--preset-border) 80%,var(--preset-ink));background:linear-gradient(180deg,transparent,color-mix(in srgb,var(--preset-bg) 8%,transparent)),var(--preset-dialog);box-shadow:0 1px 0 color-mix(in srgb,var(--preset-ink) 6%,transparent),0 12px 28px color-mix(in srgb,var(--preset-ink) 6%,transparent)}
html[data-style=washi] .hub :is(.ongoing,.upcoming,button,input,select,.hub-due,.mc-item,.mc-views,.mc-views button,.keyword-chip-static){border-radius:3px}
html[data-style=washi] .hub .mc-week{border-radius:3px}
html[data-style=washi] .hub .hub-card h2::before,html[data-style=washi] .hub .mc-head h2::before{width:.5em;height:.5em;margin:0 .5em .14em 0;border-radius:2px;background:var(--style-vermilion);box-shadow:inset 0 0 0 .08em color-mix(in srgb,#fff 35%,transparent)}
html[data-style=washi] .hub .hub-heading h1{font-family:var(--font-mincho);font-weight:500;letter-spacing:.06em}
html[data-style=washi] .hub .hub-kpi strong{font-family:var(--font-mincho);font-weight:600;letter-spacing:.02em}
html[data-style=washi] .hub .hub-kpi span{letter-spacing:.04em}
html[data-style=washi] .hub .hub-avatar{border:1.5px solid var(--style-vermilion);border-radius:50%;background:color-mix(in srgb,var(--style-vermilion) 7%,var(--preset-dialog));color:var(--style-vermilion);font-family:var(--font-mincho);font-weight:600}
html[data-style=washi] .hub .volume-progress{height:4px;border-radius:0}
html[data-style=washi] .hub .volume-progress span{border-radius:0;background:linear-gradient(90deg,var(--preset-accent) calc(100% - 6px),var(--style-vermilion) calc(100% - 6px))}
html[data-style=washi] .hub :is(.series-card,.template-card):hover{border-color:var(--preset-accent);transform:translateY(-1px)}
html[data-style=washi] .hub .hub-sidebar nav button.active{border-color:color-mix(in srgb,var(--preset-accent) 40%,var(--preset-border))}
html[data-style=washi] .hub .hub-due-soon{background:color-mix(in srgb,var(--style-vermilion) 12%,transparent);color:color-mix(in srgb,var(--style-vermilion) 80%,var(--preset-ink))}
html[data-style=washi] .hub .template-card-swatches{background:linear-gradient(135deg,color-mix(in srgb,var(--preset-accent) 10%,var(--preset-dialog)),var(--preset-dialog-subtle))}
html[data-style=washi] .hub .mc-day.today .mc-date{border-color:var(--style-vermilion);background:color-mix(in srgb,var(--style-vermilion) 12%,transparent);color:color-mix(in srgb,var(--style-vermilion) 85%,var(--preset-ink))}
html[data-style=washi] .hub :is(.hub-projects,.project-table,.project-tree button){border-radius:3px}
/* === Own style: shapes, shadows, patterns, glass, light effect, font size (set in the settings) === */
html[data-style=own] .hub{font-size:var(--own-font-size,15px)}
html[data-style=own] .hub :is(.hub-card,.hub-kpi,.series-card,.template-card,.project-table,.hub-projects,.mc-week,.mc-agenda-day){border-radius:var(--own-radius,16px)}
html[data-style=own] .hub :is(button,input,select,.ongoing,.upcoming,.mc-item,.mc-views,.mc-views button,.hub-due,.keyword-filter button){border-radius:var(--own-button-radius,8px)}
html[data-style=own][data-own-shadow=none] .hub :is(.hub-card,.hub-kpi,.series-card,.template-card,.project-table){box-shadow:none}
html[data-style=own][data-own-shadow=strong] .hub :is(.hub-card,.hub-kpi,.series-card,.template-card,.project-table){box-shadow:0 2px 4px #0000001a,0 18px 40px #00000024}
html[data-style=own][data-own-pattern=dots] .hub{background:radial-gradient(color-mix(in srgb,var(--preset-accent) 18%,transparent) 1.3px,transparent 1.6px) 0 0 / 20px 20px,var(--preset-bg)}
html[data-style=own][data-own-pattern=grid] .hub{background:linear-gradient(color-mix(in srgb,var(--preset-ink) 6%,transparent) 1px,transparent 1px) 0 0 / 24px 24px,linear-gradient(90deg,color-mix(in srgb,var(--preset-ink) 6%,transparent) 1px,transparent 1px) 0 0 / 24px 24px,var(--preset-bg)}
html[data-style=own][data-own-pattern=lines] .hub{background:repeating-linear-gradient(135deg,color-mix(in srgb,var(--preset-ink) 4%,transparent) 0 1px,transparent 1px 10px),var(--preset-bg)}
html[data-style=own][data-own-pattern=waves] .hub{background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24' viewBox='0 0 48 24'%3E%3Cg fill='none' stroke='%236b7280' stroke-opacity='0.14'%3E%3Ccircle cx='0' cy='12' r='22'/%3E%3Ccircle cx='0' cy='12' r='16'/%3E%3Ccircle cx='0' cy='12' r='10'/%3E%3Ccircle cx='0' cy='12' r='4'/%3E%3Ccircle cx='48' cy='12' r='22'/%3E%3Ccircle cx='48' cy='12' r='16'/%3E%3Ccircle cx='48' cy='12' r='10'/%3E%3Ccircle cx='48' cy='12' r='4'/%3E%3Ccircle cx='24' cy='24' r='22'/%3E%3Ccircle cx='24' cy='24' r='16'/%3E%3Ccircle cx='24' cy='24' r='10'/%3E%3Ccircle cx='24' cy='24' r='4'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 48px 24px,var(--preset-bg)}
html[data-style=own][data-own-pattern=tone] .hub{background:radial-gradient(color-mix(in srgb,var(--preset-ink) 11%,transparent) .9px,transparent 1.2px) 0 0 / 7px 7px,var(--preset-bg)}
html[data-style=own][data-own-pattern=blobs] .hub{background:radial-gradient(40% 48% at 10% 6%,color-mix(in srgb,var(--preset-accent) 24%,transparent),transparent 70%),radial-gradient(36% 42% at 94% 14%,color-mix(in srgb,var(--preset-accent) 14%,#5aa9e6 10%),transparent 70%),radial-gradient(42% 46% at 68% 98%,color-mix(in srgb,var(--preset-accent) 18%,transparent),transparent 70%),var(--preset-bg)}
html[data-style=own][data-own-glass=on] .hub :is(.hub-card,.hub-kpi,.series-card,.template-card){background:color-mix(in srgb,var(--preset-dialog) 80%,transparent);-webkit-backdrop-filter:blur(16px) saturate(1.3);backdrop-filter:blur(16px) saturate(1.3)}
html[data-style=own][data-own-glow=off] .hub .glow-surface::before,html[data-style=own][data-own-glow=off] .hub .glow-surface::after{content:none}
.own-style-settings .own-hint{margin:0 0 10px;color:var(--preset-editor-muted,color-mix(in srgb,var(--preset-ink) 0%,var(--preset-editor-muted)));font-size:13px}
.own-style-settings .own-colors{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.own-style-settings .own-color{display:grid;gap:6px;font-size:13px}
.own-style-settings .own-color input[type=color]{width:100%;height:38px;padding:2px;border:1px solid var(--preset-border);border-radius:8px;background:var(--preset-input,#fff)}
.own-style-settings .own-color button{justify-self:start;padding:2px 0;border:0;background:none;color:var(--preset-accent-strong);font-size:12px;text-decoration:underline;cursor:pointer}
.own-style-settings .own-contrast{margin:8px 0 12px;font-size:13px;color:var(--preset-editor-muted,color-mix(in srgb,var(--preset-ink) 0%,var(--preset-editor-muted)))}
.own-style-settings .own-contrast.weak{color:var(--preset-danger,#a44651);font-weight:600}
.own-style-settings .own-range{display:grid;grid-template-columns:1fr auto;gap:4px 10px;align-items:center;margin:10px 0;font-size:13px}
.own-style-settings .own-range input{grid-column:1 / -1;width:100%;accent-color:var(--preset-accent)}
.own-style-settings .own-selects{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:6px 0}
.own-style-settings .own-select{display:grid;gap:6px;font-size:13px}
.own-style-settings .own-check{display:flex;align-items:center;gap:8px;margin:8px 0;font-size:13px}
.own-style-settings .own-select select{height:40px;padding:0 10px;border:1px solid var(--preset-border);border-radius:8px;background:var(--preset-input,#fff);color:inherit;font:inherit;font-size:14px}
/* hidden radio/checkbox inputs behind colour swatches and chips: no width, so dialogs get no horizontal scrollbar */
.mc-colors input,html[data-theme] .hub :is(.series-color-field,.series-keyword-field) input{width:1px;height:1px;margin:0}
/* === Series dialog: wider, in sections, glossary side by side, buttons always visible === */
html[data-theme] .hub dialog.series-dialog{width:min(860px,94vw);max-height:92vh;padding:0;overflow:auto}
html[data-theme] .hub dialog.series-dialog form{padding:26px 30px 0}
html[data-theme] .hub dialog.series-dialog #hubFields{display:grid;grid-template-columns:1fr 1fr;gap:0 18px}
html[data-theme] .hub dialog.series-dialog #hubFields>*{grid-column:1 / -1}
html[data-theme] .hub dialog.series-dialog #hubFields>label:has([name=source]){grid-column:1}
html[data-theme] .hub dialog.series-dialog #hubFields>label:has([name=target]){grid-column:2}
html[data-theme] .hub dialog.series-dialog .series-section{margin:18px 0 4px;padding-top:14px;border-top:1px solid var(--preset-border);color:var(--preset-ink);font-size:13px;font-weight:600;letter-spacing:.04em;text-transform:uppercase}
html[data-theme] .hub dialog.series-dialog .series-section:first-child{margin-top:0;padding-top:0;border-top:0}
html[data-theme] .hub dialog.series-dialog .series-glossary-grid{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:14px;align-items:start}
html[data-theme] .hub dialog.series-dialog .series-glossary-grid fieldset{margin:6px 0 0;min-width:0;border-radius:12px;background:var(--preset-dialog-subtle)}
html[data-theme] .hub dialog.series-dialog .hub-dialog-actions{position:sticky;bottom:0;z-index:2;margin:20px -30px 0;padding:14px 30px;border-top:1px solid var(--preset-border);background:var(--preset-dialog)}
@media(max-width:720px){html[data-theme] .hub dialog.series-dialog #hubFields>label{grid-column:1 / -1!important}html[data-theme] .hub dialog.series-dialog .series-glossary-grid{grid-template-columns:1fr}}

/* === Volume wizard: follows the style (accent), connected steps, cards, progress === */
html[data-theme] .volume-wizard .wizard-steps{background:linear-gradient(165deg,var(--preset-accent),color-mix(in srgb,var(--preset-accent-strong) 70%,#000) 130%)}
html[data-theme=dark] .volume-wizard .wizard-steps{background:linear-gradient(165deg,color-mix(in srgb,var(--preset-accent) 55%,#000),color-mix(in srgb,var(--preset-accent) 20%,#000))}
html[data-theme] .volume-wizard .wizard-steps-list{position:relative}
html[data-theme] .volume-wizard .wizard-step{position:relative}
html[data-theme] .volume-wizard .wizard-step:not(:last-child)::after{content:"";position:absolute;left:35px;top:calc(50% + 19px);width:2px;height:calc(100% - 38px + 24px);background:color-mix(in srgb,#fff 30%,transparent)}
html[data-theme] .volume-wizard .wizard-step.done:not(:last-child)::after{background:#fff}
html[data-theme] .volume-wizard .wizard-step.done span{font-size:0}
html[data-theme] .volume-wizard .wizard-step.done span::before{content:"✓";font-size:16px;font-weight:700}
html[data-theme] .volume-wizard .wizard-step.active span{box-shadow:0 0 0 5px color-mix(in srgb,#fff 25%,transparent)}
html[data-theme] .volume-wizard .wizard-main h2{font-size:28px;font-weight:600;letter-spacing:-.01em}
html[data-theme] .volume-wizard .wizard-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 18px;max-width:640px;margin-top:18px;padding:18px;border:1px solid var(--preset-border);border-radius:14px;background:var(--preset-dialog-subtle)}
html[data-theme] .volume-wizard .wizard-fields label{margin:0}
html[data-theme] .volume-wizard .wizard-drop{border-radius:14px}
html[data-theme] .volume-wizard .wizard-card{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px;align-items:end;margin:0 0 14px;padding:14px 16px;border:1px solid var(--preset-border);border-radius:14px;background:var(--preset-dialog-subtle)}
html[data-theme] .volume-wizard .wizard-card>h3{grid-column:1 / -1;margin:0;color:var(--preset-ink);font-size:13px;font-weight:600;letter-spacing:.04em;text-transform:uppercase}
html[data-theme] .volume-wizard .wizard-card>.wizard-toggle,html[data-theme] .volume-wizard .wizard-card>.wizard-manual-labels,html[data-theme] .volume-wizard .wizard-card>button{grid-column:1 / -1}
html[data-theme] .volume-wizard .wizard-card label{margin:0}
html[data-theme] .volume-wizard .wizard-footer{display:flex;align-items:center;justify-content:space-between;gap:12px}
html[data-theme] .volume-wizard .wizard-progress{flex:1;text-align:center;color:var(--preset-editor-muted,color-mix(in srgb,var(--preset-ink) 0%,var(--preset-editor-muted)));font-size:13px}
html[data-theme] .volume-wizard .wizard-controls{display:block}
html[data-theme] .hub dialog.series-dialog .series-glossary-grid{margin-top:16px;padding-top:12px;border-top:1px solid var(--preset-border)}
/* === Volume wizard: the preview fits the free height (portrait and landscape pages), no page scrolling === */
html[data-theme] .volume-wizard{width:min(1240px,calc(100vw - 36px));height:min(940px,calc(100dvh - 36px))}
html[data-theme] .volume-wizard .wizard-preview{justify-content:flex-start;min-height:0}
html[data-theme] .volume-wizard .wizard-stage{flex:1 1 auto;width:100%;min-height:0;display:flex;align-items:center;justify-content:center;container-type:size}
html[data-theme] .volume-wizard .wizard-stage .wizard-picture{margin:0;max-width:100cqw;max-height:100cqh}
html[data-theme] .volume-wizard .wizard-stage .wizard-picture img{width:auto;height:auto;max-width:100cqw;max-height:100cqh}
@media(min-width:901px){
  html[data-theme] .volume-wizard .wizard-body:has(.wizard-pdf-layout,.wizard-processing){display:flex;flex-direction:column}
  html[data-theme] .volume-wizard .wizard-body:has(.wizard-pdf-layout,.wizard-processing)>*{flex:none}
  html[data-theme] .volume-wizard .wizard-body>:is(.wizard-pdf-layout,.wizard-processing){flex:1 1 0;min-height:280px;grid-template-rows:minmax(0,1fr)}
  html[data-theme] .volume-wizard .wizard-body>:is(.wizard-pdf-layout,.wizard-processing)>:is(.wizard-pdf-options,.wizard-controls){max-height:100%;overflow:auto;overscroll-behavior:contain}
  html[data-theme] .volume-wizard .wizard-body>.wizard-pdf-layout{margin-top:12px}
  html[data-theme] .volume-wizard .wizard-body>.wizard-page-order{margin-top:12px}
}
@media(max-width:900px){html[data-theme] .volume-wizard .wizard-stage{flex:none;height:300px}}
@media(max-width:560px){html[data-theme] .volume-wizard .wizard-stage{height:230px}}
/* Volume data (step 1): all fields in one row across the full width */
html[data-theme] .volume-wizard .wizard-fields{grid-template-columns:repeat(auto-fit,minmax(190px,1fr));max-width:none;align-items:end}
/* Text on accent-coloured surfaces: white in light mode, dark in dark mode (light accents there) */
:root{--preset-on-accent:#fff}
html[data-theme=dark]{--preset-on-accent:var(--preset-dialog)}
/* === Leftovers that did not follow the style: unstyled controls, menu dividers === */
:is(#appearanceLanguage,#appearanceWeekStart){padding:6px 10px;border:1px solid var(--preset-border);border-radius:7px;background:var(--preset-input);color:var(--preset-ink);font:inherit}
:is(#appearanceLanguage,#appearanceWeekStart):focus{outline:0;border-color:var(--preset-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--preset-accent) 20%,transparent)}
.dropdown hr{border:0;border-top:1px solid var(--preset-editor-border,var(--preset-border));margin:5px 0}
.font-control input{background:var(--preset-input);color:var(--preset-editor-ink,var(--preset-ink));border-color:var(--preset-editor-border,var(--preset-border))}
/* === Romantisch dark: own warm plum surfaces instead of the Standard dark greys === */
html[data-theme="dark"][data-style="romantisch"]{
  --preset-bg:#1e171b;--preset-surface:#261d22;--preset-sidebar:#221a1f;--preset-border:#463540;--preset-ink:#f4e9ef;
  --preset-editor-bg:#1e171b;--preset-editor-panel:#221a1f;--preset-editor-surface:#2b2127;--preset-editor-border:#463540;--preset-editor-ink:#f4e9ef;--preset-editor-muted:#c1aab7;
  --preset-row-hover:#3b2b34;--preset-dialog:#231a20;--preset-dialog-subtle:#2c2228;--preset-input:#32262d;
}
/* Hover surface of accent buttons (own style may set it apart from the accent text colour) */
:root{--preset-accent-hover:var(--preset-accent-strong)}
/* === Series colours also in Manga and Washi (the style keeps its look, the hue tells series apart) === */
html[data-style=manga] .hub .hub-avatar{background:hsl(var(--avatar-hue) 62% 88%);color:var(--preset-ink)}
html[data-theme=dark][data-style=manga] .hub .hub-avatar{background:hsl(var(--avatar-hue) 32% 27%);color:var(--preset-ink)}
html[data-style=washi] .hub .hub-avatar{border-color:hsl(var(--avatar-hue) 38% 46%);background:hsl(var(--avatar-hue) 44% 89%);color:hsl(var(--avatar-hue) 45% 28%)}
html[data-theme=dark][data-style=washi] .hub .hub-avatar{border-color:hsl(var(--avatar-hue) 30% 58%);background:hsl(var(--avatar-hue) 26% 23%);color:hsl(var(--avatar-hue) 42% 82%)}
/* === "In Bearbeitung": slim cards (title on one line, volume · percent · deadline, thin bar at the bottom) === */
html[data-theme] .hub .hub-side-list .ongoing{position:relative;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"title arrow" "info arrow" "progress progress";column-gap:10px;row-gap:3px;padding:12px 14px 13px 15px}
html[data-theme] .hub .hub-side-list .ongoing strong{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;-webkit-line-clamp:none;font-size:14px;font-weight:600;line-height:1.35}
html[data-theme] .hub .hub-side-list .ongoing .ongoing-dot{display:inline-block;width:8px;height:8px;margin:0 8px 1px 0;border-radius:50%;vertical-align:middle;background:hsl(var(--avatar-hue) 55% 58%)}
html[data-theme=dark] .hub .hub-side-list .ongoing .ongoing-dot{background:hsl(var(--avatar-hue) 55% 66%)}
html[data-theme] .hub .hub-side-list .ongoing small{grid-area:info;padding-left:16px;font-size:12px}
html[data-theme] .hub .hub-side-list .ongoing .volume-progress{grid-area:progress;height:3px;margin:7px 0 0}
html[data-theme] .hub .hub-side-list .ongoing>span:last-child{grid-area:arrow;align-self:center;font-size:16px}
/* === Standard: gradient text is painted only inside its box; room below for g, j, p, y (layout unchanged) === */
html[data-style=standard] .hub :is(.hub-heading h1,.hub-kpi strong){padding:0 .06em .18em 0;margin-bottom:-.18em;margin-right:-.06em}
/* === Holidays of further countries: country code in front, muted, the day is not marked red === */
.mc-holiday.mc-holiday-extra{--mc-text:var(--preset-editor-muted,#77717d);font-weight:500}
.mc-cc{display:inline-block;margin-right:5px;padding:0 4px;border:1px solid currentColor;border-radius:4px;font-size:9px;font-weight:700;line-height:13px;letter-spacing:.03em;vertical-align:1px;opacity:.85}
.mc-extra-list{display:grid;gap:6px;margin:6px 0 0;padding:0;list-style:none}
.mc-extra-list li{display:flex;align-items:center;gap:10px;padding:8px 10px;border:1px solid var(--preset-border);border-radius:9px;background:var(--preset-dialog-subtle)}
.mc-extra-list li .mc-subs-name{flex:1}
.mc-extra-list .mc-subs-empty{color:var(--preset-editor-muted);background:transparent;border-style:dashed}
.mc-extra-list .mc-subs-name .mc-cc{display:inline-block;font-size:10px;line-height:15px;vertical-align:2px}
.mc-extra-list .mc-subs-name strong{font-weight:600}
.mc-holiday-warning{color:var(--preset-danger,#a44651)}
/* === Languages of a volume: menu and comparison line === */
.languages-menu{flex:none}
.languages-menu summary{padding:8px 10px;font-size:13px;font-weight:600;letter-spacing:.02em;white-space:nowrap}
.languages-menu .languages-dropdown{top:38px;left:0;width:min(440px,calc(100vw - 40px));padding:12px 14px}
.languages-dropdown h4{margin:0 0 8px;font-size:12px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--preset-editor-muted)}
.languages-list{display:grid;gap:6px;margin:0;padding:0;list-style:none}
.languages-list li{display:flex;align-items:center;gap:6px;padding:6px 8px;border:1px solid var(--preset-border);border-radius:8px;background:var(--preset-dialog-subtle)}
.languages-list li.working{border-color:color-mix(in srgb,var(--preset-accent) 55%,var(--preset-border))}
.languages-name{display:flex;flex:1;align-items:center;gap:7px;min-width:0;color:var(--preset-ink);font-size:13px}
.languages-name small{color:var(--preset-editor-muted);font-size:11px}
.languages-code,.compare-badge{flex:none;padding:0 5px;border:1px solid currentColor;border-radius:4px;font-size:10px;font-weight:700;line-height:16px;letter-spacing:.03em;color:var(--preset-accent-strong)}
.languages-list button{width:auto;padding:4px 8px;font-size:12px;white-space:nowrap}
.languages-list button.active{border-color:var(--preset-accent);background:color-mix(in srgb,var(--preset-accent) 12%,transparent);color:var(--preset-accent-strong);font-weight:600}
.languages-add{display:flex;gap:6px;margin-top:10px}
.languages-add select{flex:1;min-width:0}
.languages-add button{width:auto}
.languages-note{margin:10px 0 0;color:var(--preset-editor-muted);font-size:12px;line-height:1.4}
.line .compare-row{display:flex;align-items:flex-start;gap:8px;margin:2px 0 4px 42px}
.line .compare-badge{margin-top:7px}
.line .cmp-editor{flex:1;min-width:0;min-height:30px;padding:5px 8px;border-left:2px solid color-mix(in srgb,var(--preset-accent) 45%,transparent);border-radius:0 6px 6px 0;outline:0;background:color-mix(in srgb,var(--preset-accent) 5%,transparent);color:color-mix(in srgb,var(--preset-ink) 80%,var(--preset-editor-muted));line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere}
.line .cmp-editor:empty::before{content:attr(aria-label);color:color-mix(in srgb,var(--preset-editor-muted) 52%,var(--preset-border));pointer-events:none}
/* === Merging two copies of a volume: conflict dialog === */
.merge-dialog{width:min(760px,94vw);max-height:90vh;padding:0;border:1px solid var(--preset-border);border-radius:14px;background:var(--preset-dialog);color:var(--preset-ink);overflow:auto}
.merge-dialog::backdrop{background:rgba(20,18,24,.45)}
.merge-dialog form{display:flex;flex-direction:column;gap:12px;padding:20px 22px}
.merge-dialog .dialog-header h2{margin:0;font-size:19px}
.merge-intro{margin:0;color:var(--preset-editor-muted);font-size:13px;line-height:1.45}
.merge-conflicts{display:grid;gap:10px;margin:0;padding:0;list-style:none}
.merge-conflicts>li{padding:10px 12px;border:1px solid var(--preset-border);border-radius:10px;background:var(--preset-dialog-subtle)}
.merge-where{margin-bottom:8px;font-size:12px;font-weight:600;letter-spacing:.02em;color:var(--preset-editor-muted)}
.merge-options{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.merge-option{display:flex;gap:8px;align-items:flex-start;padding:8px 10px;border:1px solid var(--preset-border);border-radius:8px;background:var(--preset-dialog);cursor:pointer}
.merge-option:has(input:checked){border-color:var(--preset-accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--preset-accent) 22%,transparent)}
.merge-option input{width:auto;margin-top:3px}
.merge-option>span{display:grid;gap:3px;min-width:0}
.merge-option strong{font-size:12px}
.merge-text{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px}
.merge-text em{color:var(--preset-editor-muted)}
.merge-actions{position:sticky;bottom:-20px;display:flex;flex-wrap:wrap;gap:8px;margin:0 -22px -20px;padding:12px 22px;border-top:1px solid var(--preset-border);background:var(--preset-dialog)}
.merge-actions button{width:auto}
.merge-spacer{flex:1}
@media(max-width:620px){.merge-options{grid-template-columns:1fr}}

/* Glossary of another language version than the one edited: short hint in the dialog. */
#glossaryDialog .glossary-language-note{margin:6px 0 0;padding:6px 10px;border-radius:8px;background:color-mix(in srgb,var(--preset-editor-muted) 12%,transparent);color:var(--preset-editor-muted);font-size:13px}

/* Settings tab "Übertragen": status and lists of the transfer to the website (js/transfer.js). */
.transfer-settings .transfer-status{margin-top:12px;font-size:13px;line-height:1.5}
.transfer-settings .transfer-status ul{margin:4px 0 0;padding-left:18px}
.account-settings .account-qr{display:block;width:180px;height:180px;margin:8px 0;background:#fff;border-radius:8px}
.account-settings .account-secret{font-size:13px;letter-spacing:.04em}
.account-settings .account-codes{columns:2;max-width:360px;font-size:13px}

/* Note in the volume wizard (e.g. text recognition not available on the website). */
.wizard-hint{margin:6px 0 0;font-size:12px;opacity:.8}

/* Mark and name of the program (js/brand.js): speech bubble with a cut-out Y in the style's accent colour. */
.brand-mark-bubble{fill:var(--preset-accent);stroke:none}.brand-mark-y{fill:none;stroke:var(--preset-bg);stroke-width:13}
.brand .brand-mark-wrap{display:block;flex:none;width:40px;height:40px}.brand .brand-mark{display:block;width:100%;height:100%}
.brand .brand-name{font-size:19px;font-weight:800;letter-spacing:-.4px;color:var(--preset-ink)}.brand .brand-name span{color:var(--preset-accent);font-weight:600;letter-spacing:-.4px}
@media(max-width:1100px){.brand .brand-mark-wrap{width:34px;height:34px}.brand .brand-name{font-size:16px}}@media(max-width:880px){.brand .brand-mark-wrap{width:30px;height:30px}.brand .brand-name{font-size:13px}}
/* Mark and name at the foot of the volume wizard's step list (on the accent-coloured sidebar: shown inverted). */
.wizard-brand{display:flex;align-items:center;gap:8px;margin-top:auto;padding-top:14px}.wizard-brand-mark{display:block;width:30px;height:30px;flex:none}.wizard-brand-mark svg{display:block;width:100%;height:100%}.wizard-brand strong{font-size:15px;font-weight:800;letter-spacing:-.3px;color:#fff}.wizard-brand strong span{color:#fff;opacity:.82;font-weight:600}.wizard-brand .brand-mark-bubble{fill:#fff}.wizard-brand .brand-mark-y{stroke:var(--preset-accent)}
.platform-banner{position:fixed;z-index:100000;top:10px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:12px;padding:8px 10px 8px 16px;border-radius:10px;background:#7a271a;color:#fff;box-shadow:0 8px 24px #0004;font-size:13px}
.platform-banner button{border:1px solid #fff6;background:transparent;color:#fff;border-radius:7px;padding:4px 10px}.platform-banner .platform-banner-close{border:0;font-size:18px;padding:0 6px}
/* Website: state of the text recognition (GPU server starting ...) beside the editor buttons */
.translation-actions .ocr-status{width:auto;min-width:0;height:26px;padding:0 9px;border-radius:13px;font-size:11.5px;white-space:nowrap;background:color-mix(in srgb,var(--preset-accent) 14%,var(--preset-bg));color:var(--preset-accent-strong)}.translation-actions .ocr-status[hidden]{display:none}.translation-actions .ocr-status:disabled{opacity:1;cursor:default}.translation-actions .ocr-status[data-state=starting]::before{content:"";display:inline-block;width:7px;height:7px;margin-right:6px;border-radius:50%;background:var(--preset-accent);animation:ocr-pulse 1.2s ease-in-out infinite}@keyframes ocr-pulse{50%{opacity:.25}}@media(prefers-reduced-motion:reduce){.translation-actions .ocr-status::before{animation:none}}

/* Pages outside the app on the website: sign-in (login.html) and legal pages (/impressum, /datenschutz).
   They use the app's building blocks - .hub background, .hub-card, .user-settings-fields, .hub-primary -
   and its colour variables, so mode and style (js/look.js) look the same as in the dashboard. */
body.auth-body{min-width:0;min-height:100vh;background:var(--preset-bg)}
/* The app keeps html/body from scrolling (editor panes scroll instead): here the page itself is the scroll area. */
.hub.auth-page{position:fixed;inset:0;z-index:auto;display:flex;flex-direction:column;height:auto;padding:0 24px;overflow-x:hidden;overflow-y:auto}
.auth-top{flex:none;display:flex;align-items:center;height:70px;max-width:1100px;width:100%;margin:0 auto}
.auth-top .brand.auth-brand{width:auto;border:0;padding:0;gap:10px;background:none;text-decoration:none}
.auth-main{flex:1 0 auto;display:grid;place-items:center;padding:12px 0 28px}
.hub-card.auth-card{width:min(440px,100%);padding:30px 32px 26px}
.hub-card.auth-card h2,.hub-card.legal-card h2{margin:0 0 6px;font-size:28px}
.auth-card .auth-lead{margin:0 0 20px;color:color-mix(in srgb,var(--preset-ink) 5%,var(--preset-editor-muted));line-height:1.5}
.auth-form{display:grid;gap:16px}
.auth-card .user-settings-fields.auth-fields{grid-template-columns:1fr;max-width:none}
.auth-card .auth-submit{width:100%;min-height:44px;border:1px solid var(--preset-accent);border-radius:10px;font-weight:600;box-shadow:0 4px 12px color-mix(in srgb,var(--preset-accent) 30%,transparent)}
.auth-card .auth-submit:hover:not(:disabled){background:var(--preset-accent-strong);border-color:var(--preset-accent-strong)}
.auth-or{display:flex;align-items:center;gap:12px;margin:20px 0 14px;color:var(--preset-editor-muted);font-size:13px}
.auth-or::before,.auth-or::after{content:"";flex:1;border-top:1px solid var(--preset-border)}
.auth-providers{display:grid;gap:10px}
.auth-provider{display:flex;align-items:center;justify-content:center;gap:10px;min-height:44px;padding:9px 14px;border:1px solid var(--preset-border);border-radius:10px;background:#fff;color:color-mix(in srgb,var(--preset-ink) 87%,var(--preset-editor-muted));font-weight:500;box-shadow:0 1px 2px #2413310a}
.auth-provider:hover{border-color:var(--preset-accent);background:var(--preset-accent-soft)}
.auth-provider svg{width:18px;height:18px;flex:none}
.auth-links{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-top:18px}
.auth-link{border:0;padding:0;background:none;color:var(--preset-accent-strong);font-size:13.5px}
.auth-link:hover{text-decoration:underline}
.auth-message{margin:0 0 18px;padding:10px 13px;border-radius:10px;border:1px solid color-mix(in srgb,#b42318 30%,transparent);background:color-mix(in srgb,#b42318 8%,transparent);color:color-mix(in srgb,#b42318 80%,var(--preset-ink));font-size:13.5px}
.auth-message.ok{border-color:color-mix(in srgb,#15803d 30%,transparent);background:color-mix(in srgb,#15803d 9%,transparent);color:color-mix(in srgb,#15803d 80%,var(--preset-ink))}
.auth-footer{display:grid;justify-items:center;gap:14px;padding:0 0 26px;font-size:13px;color:var(--preset-editor-muted)}
.auth-footer-row{display:flex;justify-content:center;align-items:center;gap:22px;flex-wrap:wrap}
.auth-about{max-width:520px;margin:0;text-align:center;line-height:1.55;color:color-mix(in srgb,var(--preset-ink) 5%,var(--preset-editor-muted))}
.auth-footer select{margin-left:6px;padding:4px 8px;border:1px solid var(--preset-border);border-radius:8px;background:#fff;color:var(--preset-ink);font:inherit}
.auth-legal{display:flex;gap:16px}
.auth-legal a,.legal-card .legal-nav a{color:var(--preset-editor-muted);text-decoration:none}
.auth-legal a:hover,.legal-card .legal-nav a:hover{color:var(--preset-accent-strong);text-decoration:underline}
html[data-theme=dark] .auth-provider,html[data-theme=dark] .auth-footer select{background:var(--preset-input);border-color:color-mix(in srgb,var(--preset-border) 86%,var(--preset-editor-muted));color:var(--preset-ink)}
html[data-theme=dark] .auth-provider:hover{background:var(--preset-row-hover);border-color:var(--preset-accent)}
/* Legal pages: a wide card with the text of the platform admin */
.hub-card.legal-card{width:min(780px,100%);padding:34px 40px;line-height:1.65}
.legal-card h3{margin:26px 0 6px;font-size:19px}
.legal-card h4{margin:20px 0 4px;font-size:15px}
.legal-card p{margin:0 0 12px}
.legal-card a{color:var(--preset-accent-strong)}
.legal-card .legal-empty{color:var(--preset-editor-muted);font-style:italic}
.legal-card .legal-nav{display:flex;gap:18px;flex-wrap:wrap;margin-top:30px;padding-top:14px;border-top:1px solid var(--preset-border);font-size:13px}
@media (max-width:560px){.hub-card.auth-card,.hub-card.legal-card{padding:24px 20px}.hub.auth-page{padding:0 12px}}
.hub-card.auth-card:empty{visibility:hidden}
.auth-main:has(.legal-card){place-items:start center;padding-top:28px}

/* Settings rows on the website: tabs "Konto" (js/account.js) and "Plattform" (js/platform-admin.js).
   Built like the tab "Darstellung" (.appearance-row: title and hint left, controls right) with the inputs of
   "Profil" (.user-settings-fields); only the parts that tab has no equivalent for are defined here. */
.settings-row{align-items:start}
.settings-row>div:first-child{padding-top:2px}
.settings-row-body{display:grid;gap:12px;min-width:0;justify-items:start}
.settings-row-body>*{max-width:100%}
.settings-row-body .user-settings-fields{max-width:560px;width:100%}
.settings-row-body .user-settings-fields.settings-wide{grid-template-columns:1fr;max-width:none}
.settings-form{display:grid;gap:12px;width:100%;justify-items:start}
.settings-form.settings-inline{grid-template-columns:minmax(0,1fr) auto;align-items:end;max-width:560px}
.settings-form.settings-inline .user-settings-fields{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}
.user-settings-fields textarea{width:100%;padding:10px 12px;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 4%,var(--preset-border));border-radius:8px;background:#fff;color:color-mix(in srgb,var(--preset-ink) 91%,var(--preset-editor-muted));font:inherit;font-size:13px;line-height:1.5;resize:vertical}
.user-settings-fields textarea:focus{outline:0;border-color:var(--preset-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--preset-accent) 12%,transparent)}
.user-settings-fields label>span a{margin-left:6px;color:var(--preset-accent-strong);font-size:12px}
.settings-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.settings-button{min-height:38px;padding:8px 14px;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 4%,var(--preset-border));border-radius:8px;background:#fff;color:color-mix(in srgb,var(--preset-ink) 80%,var(--preset-editor-muted));font-weight:600;cursor:pointer;white-space:nowrap}
.settings-button:hover:not(:disabled){border-color:var(--preset-accent);background:var(--preset-accent-soft);color:var(--preset-accent-strong)}
.settings-button.primary{border-color:var(--preset-accent);background:var(--preset-accent);color:var(--preset-on-accent)}
.settings-button.primary:hover:not(:disabled){border-color:var(--preset-accent-strong);background:var(--preset-accent-strong);color:var(--preset-on-accent)}
.settings-button.danger{color:#b42318}
.settings-button.danger:hover:not(:disabled){border-color:#b42318;background:color-mix(in srgb,#b42318 8%,transparent);color:#b42318}
.settings-value{font-weight:600;overflow-wrap:anywhere}
.settings-pill{display:inline-flex;align-items:center;gap:6px;padding:3px 10px;border-radius:999px;background:var(--preset-accent-soft);color:var(--preset-accent-strong);font-size:12px;font-weight:600;line-height:1.5}
.settings-pill::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor;flex:none}
.settings-pill{border-radius:12px;align-items:flex-start;text-align:left}.settings-pill::before{margin-top:.45em}
.settings-pill.ok{background:color-mix(in srgb,#15803d 11%,transparent);color:color-mix(in srgb,#15803d 85%,var(--preset-ink))}
.settings-pill.warn{background:color-mix(in srgb,#b45309 12%,transparent);color:color-mix(in srgb,#b45309 85%,var(--preset-ink))}
.settings-note{margin:0;padding:8px 12px;border-radius:8px;border:1px solid color-mix(in srgb,#b42318 28%,transparent);background:color-mix(in srgb,#b42318 7%,transparent);color:color-mix(in srgb,#b42318 82%,var(--preset-ink));font-size:13px}
.settings-note.ok{border-color:color-mix(in srgb,#15803d 28%,transparent);background:color-mix(in srgb,#15803d 8%,transparent);color:color-mix(in srgb,#15803d 82%,var(--preset-ink))}
.settings-text{margin:0;color:color-mix(in srgb,var(--preset-editor-muted) 91%,var(--preset-border));font-size:13px;line-height:1.5}
.settings-error{display:block;margin-top:4px;color:#b42318;font-size:12px;overflow-wrap:anywhere}
.settings-facts{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:7px 18px;margin:0;font-size:13px;align-items:center}
.settings-facts dt{color:color-mix(in srgb,var(--preset-editor-muted) 91%,var(--preset-border))}
.settings-facts dd{margin:0;display:flex;align-items:center;gap:8px;flex-wrap:wrap;overflow-wrap:anywhere}
.settings-facts code,.settings-row-body code{font-size:12px;padding:1px 6px;border-radius:5px;background:color-mix(in srgb,var(--preset-border) 45%,transparent)}
.settings-details{width:100%}
.settings-details summary{display:inline-flex;align-items:center;gap:6px;cursor:pointer;color:var(--preset-accent-strong);font-weight:600;font-size:13.5px;list-style:none}
.settings-details summary::-webkit-details-marker{display:none}
.settings-details summary::before{content:"›";display:inline-block;transition:transform .15s}
.settings-details[open] summary::before{transform:rotate(90deg)}
.settings-details[open]{display:grid;gap:12px}
.settings-checks{display:flex;flex-wrap:wrap;gap:9px;margin:0;padding:0;border:0}
.settings-checks legend{width:100%;margin-bottom:7px;padding:0;color:color-mix(in srgb,var(--preset-ink) 27%,var(--preset-editor-muted));font-size:13px}
.settings-check{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:8px 12px;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 4%,var(--preset-border));border-radius:8px;background:#fff;color:color-mix(in srgb,var(--preset-ink) 31%,var(--preset-editor-muted));font-weight:600;cursor:pointer}
.settings-check input{accent-color:var(--preset-accent);margin:0}
.settings-check:has(input:checked){border-color:var(--preset-accent);background:var(--preset-accent-soft);color:var(--preset-accent-strong)}
.settings-providers{display:grid;gap:9px;width:100%;max-width:560px;margin:0;padding:0;list-style:none}
.settings-providers li{display:flex;align-items:center;gap:10px;padding:9px 10px 9px 14px;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 4%,var(--preset-border));border-radius:10px;background:#fff}
.settings-providers li>svg{width:18px;height:18px;flex:none}
.settings-providers li>span:not(.settings-pill){flex:1;font-weight:600}
.settings-qr{display:flex;align-items:center;gap:18px;flex-wrap:wrap}
.settings-qr small{display:block;margin-bottom:4px;color:var(--preset-editor-muted);font-size:12px}
.settings-row-body .account-codes{margin:0;padding-left:22px}
.settings-log{display:grid;gap:0;width:100%;margin:0;padding:0;list-style:none;font-size:13px}
.settings-log li{display:grid;grid-template-columns:150px minmax(0,1fr) auto;gap:12px;padding:7px 0;border-bottom:1px solid color-mix(in srgb,var(--preset-border) 40%,var(--preset-bg))}
.settings-log li:last-child{border-bottom:0}
.settings-log time,.settings-log small{color:color-mix(in srgb,var(--preset-editor-muted) 91%,var(--preset-border))}
html[data-theme=dark] .settings-button,html[data-theme=dark] .settings-check,html[data-theme=dark] .settings-providers li,html[data-theme=dark] .user-settings-fields textarea{background:var(--preset-input);border-color:color-mix(in srgb,var(--preset-border) 86%,var(--preset-editor-muted));color:var(--preset-ink)}
html[data-theme=dark] .settings-button.primary{background:var(--preset-accent);border-color:var(--preset-accent);color:var(--preset-on-accent)}
html[data-theme=dark] .settings-button:hover:not(:disabled):not(.primary),html[data-theme=dark] .settings-check:has(input:checked){background:var(--preset-accent-soft);border-color:var(--preset-accent);color:var(--preset-accent-strong)}
html[data-theme=dark] .settings-text,html[data-theme=dark] .settings-facts dt,html[data-theme=dark] .settings-log time,html[data-theme=dark] .settings-log small{color:var(--preset-editor-muted)}
@media (max-width:900px){.settings-form.settings-inline{grid-template-columns:1fr}.settings-log li{grid-template-columns:1fr}}
/* Publisher suites: name next to the logo on the suite's sign-in page; cards for suites (Plattform) and
   team members (Team); subdomain field with the domain behind it. */
.auth-top .auth-suite{margin-left:14px;padding-left:14px;border-left:1px solid var(--preset-border);font-weight:600;font-size:15px;color:color-mix(in srgb,var(--preset-ink) 80%,var(--preset-editor-muted))}
.settings-cards{display:grid;gap:10px;width:100%;margin:0;padding:0;list-style:none}
.settings-card{display:grid;gap:10px;padding:12px 14px;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 4%,var(--preset-border));border-radius:10px;background:#fff}
.settings-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.settings-card-head>div{display:grid;gap:2px;min-width:0}
.settings-card-head>div strong{font-size:14px}
.settings-card-head>div a,.settings-card-head>div span{font-size:12.5px;color:color-mix(in srgb,var(--preset-editor-muted) 91%,var(--preset-border));overflow-wrap:anywhere}
.settings-card-head>div a{color:var(--preset-accent-strong)}
.settings-suffix{display:flex;align-items:center;gap:6px}
.settings-suffix>span{color:var(--preset-editor-muted);font-size:13px;white-space:nowrap}
.user-settings-fields select{width:100%;height:42px;padding:9px 12px;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 4%,var(--preset-border));border-radius:8px;background:#fff;color:color-mix(in srgb,var(--preset-ink) 91%,var(--preset-editor-muted));font:inherit}
.settings-select{display:inline-flex;align-items:center;gap:8px;font-size:13px;color:color-mix(in srgb,var(--preset-ink) 27%,var(--preset-editor-muted))}
.settings-select select{height:38px;padding:6px 10px;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 4%,var(--preset-border));border-radius:8px;background:#fff;color:var(--preset-ink);font:inherit;font-weight:600}
html[data-theme=dark] .settings-card,html[data-theme=dark] .settings-select select,html[data-theme=dark] .user-settings-fields select{background:var(--preset-input);border-color:color-mix(in srgb,var(--preset-border) 86%,var(--preset-editor-muted));color:var(--preset-ink)}
/* Administration pages in the dashboard menu (Team, Plattform, Verlage): the module's own heading is the page
   heading already; the card holds the rows of the settings building blocks. */
.hub-sidebar nav .hub-nav-section{display:block;margin:16px 14px 4px;font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:color-mix(in srgb,var(--preset-editor-muted) 85%,var(--preset-border))}
.hub-admin-card{max-width:1080px;padding:8px 34px 26px}
.hub-admin-card .user-settings-section>h3{display:none}
.hub-admin-card .user-settings-section>p{margin:18px 0 6px}
/* Keywords: managed in a dialog of the page "Projekte" (button at the end of the filter row); in the series
   dialog a new one can be created right where it is chosen. Inputs as in the settings. */
html[data-theme] .hub .keyword-filter .keyword-manage{border-style:dashed;background:transparent;color:var(--preset-accent-strong)}
.keyword-dialog{width:min(560px,calc(100vw - 30px))}
.keyword-dialog .keyword-settings>p{margin:0 0 12px;color:color-mix(in srgb,var(--preset-ink) 5%,var(--preset-editor-muted));font-size:13.5px;line-height:1.5}
.keyword-dialog .keyword-list{display:grid;gap:8px;margin:0 0 14px;padding:0;list-style:none}
.keyword-dialog .keyword-list li{display:flex;align-items:center;gap:10px}
.keyword-dialog .keyword-list small{min-width:72px;color:var(--preset-editor-muted);font-size:12px}
.keyword-dialog .keyword-empty{color:var(--preset-editor-muted)}
.keyword-dialog .keyword-add{display:flex;gap:8px}
.keyword-dialog :is(.keyword-list,.keyword-add) input{flex:1;height:40px;padding:8px 12px;margin:0;border:1px solid color-mix(in srgb,var(--preset-editor-muted) 4%,var(--preset-border));border-radius:8px;background:#fff;color:var(--preset-ink);font:inherit}
.keyword-dialog :is(.keyword-list,.keyword-add) input:focus{outline:0;border-color:var(--preset-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--preset-accent) 12%,transparent)}
.keyword-dialog .keyword-add button,.keyword-dialog .keyword-list button{margin:0;padding:8px 14px;border-radius:8px}
.keyword-dialog .keyword-error{min-height:1.2em;margin:8px 0 0;color:#b42318;font-size:13px}
.keyword-dialog[data-theme=dark]{background:var(--preset-sidebar,#24212a);color:var(--preset-ink)}
.keyword-dialog[data-theme=dark] :is(.keyword-list,.keyword-add) input{background:var(--preset-input);border-color:color-mix(in srgb,var(--preset-border) 86%,var(--preset-editor-muted))}
html[data-theme] .hub .series-keyword-field .keyword-new{display:inline-flex;align-items:center;gap:6px}
html[data-theme] .hub .series-keyword-field .keyword-new input{position:static;opacity:1;pointer-events:auto;width:150px;height:30px;padding:4px 10px;margin:0;border:1px dashed var(--hub-line);border-radius:999px;font-size:13px}
html[data-theme] .hub .series-keyword-field .keyword-new button{padding:4px 12px;border-radius:999px;font-size:13px}

/* ==== Tablets, foldables, small or zoomed windows ======================================================
   Dashboard: below 1280 px the menu becomes a slim bar of symbols (names as tooltips), so the calendar and
   the side lists keep their room; the calendar column has no fixed minimum any more.
   Editor: tool bar and translation panel never grow taller than the space between top bar and status bar
   (they used to cover the status bar with page navigation and volume name on low screens); the tool bar
   gets compact buttons on low screens and scrolls if even that is not enough. */
@media (min-width:1051px){.hub-layout{grid-template-columns:minmax(0,1fr) minmax(250px,290px)}}
@media (max-width:1280px){
  html:root{--brand-field-width:72px}
  .topbar .brand{justify-content:center;padding:6px!important;width:var(--brand-field-width)!important;min-width:var(--brand-field-width)!important}
  .topbar .brand .brand-name{display:none}
  html body.hub-mode .hub{grid-template-columns:72px minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr)!important}
  html body.hub-mode .hub .hub-sidebar{display:flex!important;flex-direction:column!important;align-items:stretch}
  html body.hub-mode .hub .hub-sidebar nav{display:grid!important;gap:6px;padding:14px 10px!important}
  html body.hub-mode .hub .hub-sidebar nav button{display:grid;place-items:center;height:46px;padding:0!important;font-size:0!important;line-height:0}
  html body.hub-mode .hub .hub-sidebar nav button .hub-nav-icon{width:21px;height:21px}
  html body.hub-mode .hub .hub-sidebar nav .hub-nav-section{height:1px;margin:10px 6px;font-size:0;background:var(--preset-border)}
  html body.hub-mode .hub .hub-sidebar-foot{display:block!important;padding:12px 10px}
  html body.hub-mode .hub .hub-sidebar-foot .hub-profile{display:grid;place-items:center;min-height:50px;padding:4px}
  html body.hub-mode .hub .hub-sidebar-foot .hub-profile .hub-profile-copy{display:none}
  html body.hub-mode .hub .hub-profile-menu{left:10px;min-width:220px}
}
@media (max-width:900px){
  html body.hub-mode .hub .hub-content{padding:22px 18px}
}
@media (min-width:901px){
  main{grid-template-rows:minmax(0,1fr)}
  main>*{min-height:0}
  .rail{min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:none}
  .rail::-webkit-scrollbar{display:none}
  .translations{min-height:0}
}
@media (min-width:901px) and (max-height:860px){
  .rail{gap:4px!important;padding-top:6px!important;padding-bottom:6px!important}
  .rail button{width:34px!important;height:34px!important}
  .rail button svg{width:18px;height:18px}
}
/* translation panel: its buttons wrap to a second row instead of being cut off */
.translation-header{flex-wrap:wrap;row-gap:6px;height:auto;min-height:42px}
.translation-header .translation-actions{flex-wrap:wrap;justify-content:flex-end;min-width:0}
/* status bar: the volume name and messages give way first; page and zoom controls stay complete */
.statusbar .project-info{min-width:0;overflow:hidden}
.statusbar .project-info>*{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media (max-width:900px){
  .statusbar .project-info{flex:1 1 0;min-width:80px}
  .statusbar .page-controls,.statusbar .zoom-controls{flex:none}
}
/* Mobile browsers (Chrome on Android, foldables): 100vh counts the area behind the address bar, which
   pushed the editor's status bar out of sight; dvh is the visible height. */
@media (min-width:901px){
  main{height:calc(100dvh - 102px)}
}
body.translation-collapsed{height:100dvh}
/* the profile menu of the slim menu bar lies above the page content (the bar's blur makes its own layer) */
html body.hub-mode .hub .hub-sidebar{position:relative;z-index:30}
/* admin pages while their data loads: a quiet note instead of "…", only if it takes a moment */
.settings-loading{display:flex;align-items:center;gap:10px;margin:18px 0;color:var(--preset-editor-muted);font-size:13.5px;animation:settings-loading-in .2s .3s both}
.settings-loading::before{content:"";width:16px;height:16px;border-radius:50%;border:2px solid color-mix(in srgb,var(--preset-accent) 25%,transparent);border-top-color:var(--preset-accent);animation:settings-spin .8s linear infinite}
@keyframes settings-loading-in{from{opacity:0}to{opacity:1}}
@keyframes settings-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.settings-loading::before{animation:none}}
/* Romantisch: its own warm raspberry red for warnings and holidays (it had the red of Standard) */
html[data-style="romantisch"]{--preset-danger:#b03a5b}
html[data-theme="dark"][data-style="romantisch"]{--preset-danger:#f2a3bd}
/* Calendar export on the website: the personal subscription address (copy / open / renew) */
.mc-feed{display:flex;gap:8px;margin:6px 0}
.mc-feed input{flex:1;min-width:0;height:38px;padding:7px 10px;border:1px solid var(--preset-border);border-radius:8px;background:var(--preset-input,#fff);color:var(--preset-ink);font:inherit;font-size:12.5px}
.mc-feed-open{display:inline-flex;align-items:center;padding:8px 12px;border:1px solid var(--preset-border);border-radius:8px;color:var(--preset-accent-strong);text-decoration:none;font-weight:600}
.mc-feed-open:hover{border-color:var(--preset-accent)}
/* Website: Google Sheet of a series glossary (js/google-glossary.js), under "Serienglossar" on the series page */
html[data-theme] .hub .series-google{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:-4px 0 14px;padding:12px 14px;border:1px solid var(--hub-line,var(--preset-border));border-radius:12px;background:var(--hub-card,var(--preset-bg))}
html[data-theme] .hub .series-google-line{display:grid;gap:2px;min-width:0}
html[data-theme] .hub .series-google-state{font-weight:600}
html[data-theme] .hub .series-google-state a{color:var(--preset-accent-strong)}
html[data-theme] .hub .series-google small{color:var(--hub-muted,var(--preset-editor-muted))}
html[data-theme] .hub .series-google-actions{display:flex;gap:8px;flex-wrap:wrap}
html[data-theme] .hub .series-google-note{flex-basis:100%}
html[data-theme] .hub .series-google button{background:#fff;border:1px solid var(--preset-border);border-radius:9px;padding:8px 13px;color:color-mix(in srgb,var(--preset-ink) 87%,var(--preset-editor-muted));font-weight:500}
html[data-theme] .hub .series-google button:hover:not(:disabled){border-color:var(--preset-accent);color:var(--preset-accent-strong)}
html[data-theme=dark] .hub .series-google button{background:var(--preset-input);border-color:color-mix(in srgb,var(--preset-border) 86%,var(--preset-editor-muted));color:var(--preset-ink)}
/* Glossary: characters - speech and form of address (js/glossary.js) */
.glossary-character-bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 10px}
.glossary-character-bar small{color:var(--preset-editor-muted);font-size:12px}
.glossary-address-open{padding:6px 12px;border:1px solid var(--preset-accent);border-radius:8px;background:var(--preset-accent-soft);color:var(--preset-accent-strong);font-weight:600}
.glossary-address-summary{width:100%;min-width:120px;padding:5px 8px;border:1px dashed var(--preset-border);border-radius:6px;background:transparent;color:var(--preset-ink);text-align:left;font-size:12.5px;white-space:normal}
.glossary-address-summary:hover{border-color:var(--preset-accent);color:var(--preset-accent-strong)}
.glossary-hover-character{margin-top:4px;font-size:12.5px}
.glossary-address-dialog{width:min(980px,calc(100vw - 24px));max-height:calc(100dvh - 40px);padding:0;border:1px solid var(--preset-border);border-radius:14px;background:var(--preset-dialog,#fff);color:var(--preset-ink);box-shadow:0 20px 70px #0004}
.glossary-address-dialog::backdrop{background:#2228}
.glossary-address-dialog form{display:flex;flex-direction:column;max-height:calc(100dvh - 40px)}
.glossary-address-dialog .dialog-header{display:flex;justify-content:space-between;align-items:center;padding:16px 20px 6px}
.glossary-address-dialog h2{margin:0;font-size:20px}
.glossary-address-hint{margin:0 20px 10px;color:var(--preset-editor-muted);font-size:13px}
.glossary-address-scroll{overflow:auto;margin:0 20px;border:1px solid var(--preset-border);border-radius:10px}
.glossary-address-table{border-collapse:collapse;font-size:13px}
.glossary-address-table th,.glossary-address-table td{padding:6px 8px;border-bottom:1px solid color-mix(in srgb,var(--preset-border) 60%,transparent);border-right:1px solid color-mix(in srgb,var(--preset-border) 60%,transparent);text-align:left;vertical-align:top}
.glossary-address-table thead th{position:sticky;top:0;z-index:1;background:var(--preset-dialog-subtle,#f7f4fa);white-space:nowrap}
.glossary-address-table tbody th{position:sticky;left:0;background:var(--preset-dialog-subtle,#f7f4fa);white-space:nowrap}
.glossary-address-table tr.focus th{color:var(--preset-accent-strong)}
.glossary-address-table td.self{background:color-mix(in srgb,var(--preset-border) 35%,transparent)}
.glossary-address-cell{display:grid;gap:4px;min-width:118px}
.glossary-address-cell select,.glossary-address-cell input{width:100%;padding:4px 6px;border:1px solid var(--preset-border);border-radius:6px;background:var(--preset-input,#fff);color:var(--preset-ink);font:inherit;font-size:12.5px}
.glossary-address-dialog .dialog-footer{display:flex;justify-content:flex-end;gap:8px;padding:14px 20px}
.glossary-address-dialog .dialog-footer button{padding:8px 14px;border:1px solid var(--preset-border);border-radius:8px;background:transparent;color:inherit}
.glossary-address-dialog .dialog-footer .accent-button{background:var(--preset-accent);border-color:var(--preset-accent);color:var(--preset-on-accent)}
/* Touch: the page area handles two-finger pinch itself (zoom of the page, not of the whole website) */
#viewer{touch-action:pan-x pan-y}
/* Band prüfen (js/volume-check.js): list like the search hits, chips per kind */
.volume-check-dialog{width:min(720px,calc(100vw - 32px));max-height:min(80vh,760px)}
.volume-check-dialog[open]{display:flex;flex-direction:column}
.volume-check-body{padding:14px 20px;overflow:auto;min-height:0;flex:1}
.volume-check-summary{margin:0 0 12px;color:var(--preset-editor-muted);font-size:13px}
.volume-check-chips{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px}
.volume-check-chip{display:inline-flex;align-items:center;gap:6px;padding:5px 11px;border:1px solid var(--preset-border);border-radius:999px;background:transparent;color:var(--preset-ink);font-size:12px}
.volume-check-chip span{color:var(--preset-editor-muted);font-variant-numeric:tabular-nums}
.volume-check-chip.selected{border-color:var(--preset-accent);background:var(--preset-accent-soft);color:var(--preset-accent-strong)}
.volume-check-chip.selected span{color:inherit}
.volume-check-list{display:flex;flex-direction:column;gap:6px}
.volume-check-item{width:100%;text-align:left}
.volume-check-kind{font-weight:600;color:var(--preset-accent-strong)}
.volume-check-kind.kind-empty,.volume-check-kind.kind-open{color:var(--preset-danger)}
.volume-check-dialog .dialog-footer{gap:8px}
.volume-check-dialog .dialog-footer .plain-button,.volume-check-dialog .dialog-footer .accent-button{margin:0}
/* Writing pace towards the deadline (status bar of the editor, volume list of the dashboard) */
.pace-info{color:var(--preset-editor-muted);font-variant-numeric:tabular-nums;white-space:nowrap}
.statusbar .pace-info{margin-right:10px;overflow:hidden;text-overflow:ellipsis}
.pace-info.today{color:var(--preset-accent-strong)}
.pace-info.over{color:var(--preset-danger)}
small.pace-info{display:block}
@media (max-width:1280px){.statusbar .pace-info{max-width:190px}}
/* Translation memory (js/translation-memory.js): suggestions below the active field */
.memory-strip{margin:8px 0 2px 42px;padding:8px 10px;border:1px dashed color-mix(in srgb,var(--preset-accent) 35%,var(--preset-border));border-radius:8px;background:color-mix(in srgb,var(--preset-accent-soft) 45%,transparent)}
.memory-strip[hidden]{display:none}
.memory-title{margin-bottom:4px;color:var(--preset-accent-strong);font-size:11px;font-weight:600;letter-spacing:.02em}
.memory-item{padding:6px 0}
.memory-item+.memory-item{border-top:1px solid color-mix(in srgb,var(--preset-border) 60%,transparent)}
.memory-meta{display:block;color:var(--preset-editor-muted);font-size:11px}
.memory-text{margin:2px 0;color:var(--preset-ink);font-size:13px;line-height:1.4;white-space:pre-wrap;overflow-wrap:anywhere}
.memory-note{display:block;color:var(--preset-accent-strong);font-size:11px}
.memory-actions{display:flex;gap:6px;margin-top:4px}
.memory-actions button{padding:3px 10px;border:1px solid var(--preset-border);border-radius:999px;background:var(--preset-dialog);color:var(--preset-ink);font-size:11px}
.memory-actions button:hover{border-color:var(--preset-accent);color:var(--preset-accent-strong)}
.line:not(.active) .memory-strip{display:none}
