*{box-sizing:border-box}body{margin:0;background:#0e1815;color:#f2f7f4;font:16px/1.5 system-ui,-apple-system,sans-serif}header{display:flex;justify-content:space-between;align-items:center;padding:16px 18px;background:#172920;border-bottom:1px solid #365444}header a{color:#dff5e6;font-weight:800;text-decoration:none}header span{font-size:12px;color:#acc3b4}main{max-width:720px;margin:auto;padding:20px 16px 110px}h1{font-size:1.55rem;margin:0 0 16px}.muted,.hint{color:#b4c7bb}.hint{font-size:.92rem}.card{display:flex;align-items:center;gap:12px;background:#1b3027;border:1px solid #365445;border-radius:16px;padding:17px;margin:10px 0;color:#fff;text-decoration:none;min-height:70px}.card strong{flex:1;overflow-wrap:anywhere}.card small{color:#bbcfbf}.card span{font-size:25px;color:#a9e4b9}.bottom{position:fixed;bottom:0;left:0;right:0;display:flex;justify-content:space-around;background:#182b23;border-top:1px solid #40604d;padding:8px 0 calc(8px + env(safe-area-inset-bottom))}.bottom a{color:#e6f7e9;text-decoration:none;text-align:center;font-size:25px;min-width:65px}.bottom small{display:block;font-size:11px}label{display:block;margin:15px 0}input{display:block;width:100%;font:inherit;margin-top:6px;padding:14px;background:#20352b;border:1px solid #65836d;border-radius:10px;color:#fff}button{font:inherit;font-weight:700;background:#82d89b;color:#092017;border:0;border-radius:12px;padding:14px 20px;width:100%}.error{color:#ffb7b7}.back{color:#b0efc1}a:focus-visible,button:focus-visible,input:focus-visible{outline:3px solid #a5ffc0}
.chips{display:flex;gap:8px;overflow-x:auto;padding:8px 0 14px}.chips a{white-space:nowrap;border:1px solid #52755d;border-radius:24px;padding:9px 14px;color:#e4f9e8;text-decoration:none}.chips .selected{background:#82d89b;color:#102719}.preview{display:block;width:100%;height:auto;border-radius:12px}.message,.textbody{background:#1b3027;border:1px solid #365445;border-radius:14px;padding:14px;margin:12px 0;overflow-wrap:anywhere}.message p{margin:8px 0 0}textarea{display:block;width:100%;font:inherit;margin-top:6px;padding:14px;background:#20352b;border:1px solid #65836d;border-radius:10px;color:#fff}h2{font-size:1.15rem;margin:22px 0 10px}.bottom a{min-width:50px}

select{display:block;width:100%;font:inherit;margin-top:6px;padding:14px;background:#20352b;border:1px solid #65836d;border-radius:10px;color:#fff}progress{accent-color:#82d89b}

.web-frame{width:100%;height:65vh;min-height:420px;border:1px solid #58735c;border-radius:12px;background:#fff;}

/* V0.4.3: equally sized upload mode buttons, including small screens. */
.chips:has(a[href*="type=chat"]){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;overflow:visible}
.chips:has(a[href*="type=chat"]) a{display:flex;align-items:center;justify-content:center;min-width:0;width:100%;text-align:center;white-space:normal;min-height:48px}

/* V0.4.4: uniform upload mode controls and prevent iOS input overflow */
.upload-modes{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:12px!important;overflow:visible!important;width:100%}
.upload-modes a{display:flex!important;justify-content:center;align-items:center;min-width:0!important;width:100%!important;min-height:52px;padding:12px 8px!important;text-align:center;white-space:normal}
#tb-upload-form,#tb-upload-form label,#tb-upload-form input,#tb-upload-form select,#tb-upload-form textarea{max-width:100%;min-width:0}
#tb-upload-form input[type=date],#tb-upload-form input[type=time],#tb-upload-form input[type=file]{width:100%;min-width:0}
#tb-upload-form button{width:100%}

/* V0.4.5: equal upload tabs and prevent native control overflow */
.upload-modes{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important;gap:12px!important}
.upload-modes>a{box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:100%!important;display:flex!important;align-items:center;justify-content:center;text-align:center}
#tb-upload-form select,#tb-upload-form input,#tb-upload-form textarea{box-sizing:border-box;width:100%;max-width:100%;min-width:0}

/* V0.4.7 – aligned with Web V2.04 green theme, mobile-first navigation */
:root{color-scheme:dark}body{background:radial-gradient(ellipse at top,#213525 0%,#101b15 65%);color:#eef4e9}.app-header{background:rgba(29,42,31,.96);border-color:#425944;gap:10px}.app-brand{color:#d8efbf}.app-version{color:#c0d1b7;text-align:right}main{padding-bottom:calc(116px + env(safe-area-inset-bottom))}h1{color:#f1f8eb;letter-spacing:-.02em}.card,.message,.textbody{background:#243629;border-color:#4b674b;box-shadow:0 3px 15px #0002}.card:hover,.card:focus-visible{border-color:#b5d798;background:#304b32}.card strong{line-height:1.35}.card small{color:#bbcab6}.chips a{background:#293d2a;border-color:#759565}.chips .selected{background:#527345;color:#fff;border-color:#b5d798}input,select,textarea{background:#203529;border-color:#759565}button{background:linear-gradient(120deg,#354d31,#293d2a);border:1px solid #759565;color:#f8fff4}.bottom{z-index:100;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;padding:8px max(8px,env(safe-area-inset-right)) calc(9px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));background:#1d2a1f;border-color:#526e4c;box-shadow:0 -6px 20px #0004}.bottom a{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;min-height:61px;gap:2px;padding:6px 1px;border:1px solid #526e4c;border-radius:11px;background:#293d2a;font-size:20px;line-height:1.2}.bottom a.active{background:#527345;border-color:#b5d798}.bottom a:focus-visible{outline:3px solid #d7f1ad;outline-offset:1px}.bottom small{font-size:clamp(9px,2.4vw,11px);line-height:1.2;overflow-wrap:anywhere}.nav-icon{font-size:23px;line-height:1.2}.web-frame{height:calc(100dvh - 255px);min-height:380px;border-color:#526e4c}.section-heading{font-size:1.05rem;color:#d3edb7;margin:18px 0 8px}.quick-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.quick-grid .card{margin:0;min-height:95px;flex-direction:column;align-items:flex-start;justify-content:center}.quick-grid .card strong{font-size:1rem}.quick-grid .card span{display:none}@media(max-width:370px){.app-version{font-size:10px}.bottom{gap:3px;padding-left:4px;padding-right:4px}.bottom a{padding:5px 0}.bottom small{font-size:9px}}

/* V0.4.8: five primary destinations, mobile-native submenus */
.menu-card{gap:10px}.menu-card>span:first-child{font-size:24px;flex:0 0 32px}.menu-card strong{flex:1}.menu-card small{font-size:12px;max-width:42%;text-align:right}.menu-card>span:last-child{font-size:22px}.info-panel{background:#243629;border:1px solid #4b674b;border-radius:14px;padding:14px 16px;margin:10px 0;overflow-wrap:anywhere}.info-panel strong{display:block}.info-panel small{display:block;color:#bbcab6;margin-top:4px}.info-panel p{margin:7px 0}.subline{padding-left:14px;color:#d6e9cd}.childline{padding-left:30px;color:#c0d8b6}.timeline-item{flex-wrap:wrap}.timeline-item small{flex:0 0 100%}.timeline-item strong{flex:1}.notice{padding:12px;border:1px solid #82d89b;border-radius:10px;color:#d9f6d9}#status-refresh{margin-top:14px}

/* V0.4.9: menu switch occupies exactly one of five bottom slots. */
.bottom .nav-switch{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;width:100%;min-height:61px;gap:2px;padding:6px 1px;border:1px solid #789469;border-radius:11px;background:#354d31;color:#e6f7e9;font:inherit;line-height:1.2;cursor:pointer}
.bottom .nav-switch small{display:block;font-size:clamp(9px,2.4vw,11px);line-height:1.2}
.bottom .nav-switch.secondary-mode{background:#527345;border-color:#b5d798}
.bottom .nav-switch:focus-visible{outline:3px solid #d7f1ad;outline-offset:1px}
@media(max-width:370px){.bottom .nav-switch{padding:5px 0}.bottom .nav-switch small{font-size:9px}}

/* V0.5.0 – Archivdarstellung nach Web V2.04: verschachtelte, mobil bedienbare Ordner */
.archive-intro{font-size:.9rem;color:#b9ccb5;margin:0 0 18px}
.archive-folder,.archive-subfolder{border:1px solid #526b50;border-radius:13px;background:#1d3023;margin:10px 0;overflow:hidden}
.archive-folder>summary,.archive-subfolder>summary{display:flex;align-items:center;gap:12px;justify-content:space-between;list-style:none;cursor:pointer;padding:15px 16px;min-height:60px}
.archive-folder>summary::-webkit-details-marker,.archive-subfolder>summary::-webkit-details-marker{display:none}
.archive-folder>summary:focus-visible,.archive-subfolder>summary:focus-visible{outline:3px solid #d7f1ad;outline-offset:-3px}
.folder-name{font-size:1.06rem;font-weight:700;min-width:0;overflow-wrap:anywhere}
.folder-chevron{flex:none;color:#c7dfb9;font-size:22px;transition:transform .15s}
.archive-folder[open]>summary>.folder-chevron,.archive-subfolder[open]>summary>.folder-chevron{transform:rotate(180deg)}
.folder-content{padding:0 10px 10px 16px;border-top:1px solid #405a42}
.archive-subfolder{background:#283b2c;margin:8px 0}
.archive-subfolder .folder-content{padding-left:12px}
.folder-all{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:48px;padding:10px 12px;color:#e5f3dc;text-decoration:none;border-bottom:1px solid #405a42;overflow-wrap:anywhere}
.folder-all:last-child{border-bottom:0}.folder-all span{font-size:24px;color:#b5d798}
.folder-child{padding-left:18px}.folder-all:focus-visible{outline:3px solid #d7f1ad}
.archive-entry-list .card{min-height:74px}.archive-entry-list .card strong{font-size:1rem}
@media(prefers-reduced-motion:reduce){.folder-chevron{transition:none}}

/* V0.5.1 translation and content layout */
.translate-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;position:sticky;top:0;z-index:50;padding:9px 0;background:#14241a;flex-wrap:wrap}.translate-bar button{min-height:44px;padding:8px 14px;border-radius:11px}.translate-bar small{color:#c1d6b9}.translatable{white-space:pre-wrap;overflow-wrap:anywhere}.preview{max-width:100%;height:auto}.message p{white-space:pre-wrap;overflow-wrap:anywhere}details>summary{cursor:pointer;min-height:44px;padding:10px 0}
/* V0.5.5: inline archive entries */
.archive-item{margin:8px 0;border:1px solid #48634b;border-radius:10px;background:#223b2a;overflow:hidden}
.archive-item>summary{cursor:pointer;min-height:48px;padding:12px;overflow-wrap:anywhere;font-weight:600}
.archive-item>summary small{display:block;font-weight:400;opacity:.75;margin-top:4px}
.archive-item-body{padding:12px;border-top:1px solid #48634b;overflow-wrap:anywhere}
.archive-item-body img{max-width:100%;height:auto}
.archive-release-list{padding-top:8px}

/* V0.5.6: Nachrichten vollständig, klar getrennt und ohne Titel-Dopplung */
.archive-item{margin:9px 0 13px;border:1px solid #527258;border-radius:11px;background:#223b2a;overflow:hidden}
.archive-item-date{padding:11px 12px;font-weight:600;color:#e5f2db;border-bottom:1px solid #48634b;font-size:.91rem}
.archive-item-body{padding:12px;border-top:0}
.archive-item-body>.muted:first-child{display:none}
.archive-item-body img{max-width:100%;height:auto}
.archive-item.release-note ul{margin:10px 12px 14px;padding-left:20px}

/* V0.5.7: independent translation control; clear of bottom navigation and safe area. */
.floating-translate{position:fixed;right:calc(10px + env(safe-area-inset-right,0px));bottom:calc(88px + env(safe-area-inset-bottom,0px));z-index:1000;width:34px;height:34px;min-width:34px;min-height:34px;padding:0;border:1px solid #8aa18b;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#216e60;color:#fff;box-shadow:0 2px 7px #0005;font-size:17px;line-height:1;cursor:pointer}.floating-translate[aria-pressed="false"]{background:#314d40;outline:none}.floating-translate[aria-pressed="true"]{outline:2px solid #b5e4d2}.floating-translate .translate-state{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.dynamic-label{overflow-wrap:anywhere}

/* V0.5.9: fixed at the top right, immediately below the app title bar. */
.floating-translate{top:var(--translate-top,78px);bottom:auto;right:calc(12px + env(safe-area-inset-right,0px))}
/* V0.6.0: compact chat button next to translate; expandable panel above bottom navigation. */
.floating-chat{position:fixed;top:var(--translate-top,78px);right:calc(54px + env(safe-area-inset-right,0px));z-index:1001;width:34px;height:34px;min-width:34px;min-height:34px;padding:0;border:1px solid #8aa18b;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#216e60;color:#fff;box-shadow:0 2px 7px #0005;font-size:17px;line-height:1;cursor:pointer}.floating-chat[aria-expanded="true"]{outline:2px solid #b5e4d2}
.mobile-chat-panel{position:fixed;z-index:999;left:8px;right:8px;bottom:var(--chat-nav-height,85px);height:min(420px,calc(100dvh - var(--chat-top,80px) - var(--chat-nav-height,85px) - 12px));min-height:180px;display:flex;flex-direction:column;background:#1d2a1f;border:1px solid #759565;border-radius:14px 14px 0 0;box-shadow:0 -7px 22px #0009;overflow:hidden}.mobile-chat-panel[hidden]{display:none!important}.mobile-chat-head{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background:#293d2a;border-bottom:1px solid #526e4c}.mobile-chat-close{width:38px;height:34px;padding:0;border-radius:50%;font-size:19px}.mobile-chat-list{flex:1;overflow-y:auto;min-height:0;padding:10px}.mobile-chat-message{padding:9px 11px;margin:0 0 9px;background:#243629;border:1px solid #4b674b;border-radius:10px;overflow-wrap:anywhere}.mobile-chat-meta{display:flex;justify-content:space-between;gap:8px;color:#bbcab6;font-size:12px}.mobile-chat-body{white-space:pre-wrap;margin-top:5px}.mobile-chat-form{display:flex;gap:6px;padding:8px;border-top:1px solid #526e4c}.mobile-chat-form input{flex:1;min-width:0;margin:0;padding:9px;font-size:16px}.mobile-chat-form button{width:auto;min-width:62px;padding:8px}.mobile-chat-error{color:#ffb7b7;font-size:12px;padding:0 8px}.mobile-chat-open main{padding-bottom:calc(116px + env(safe-area-inset-bottom))}

/* V0.6.1: anchored below the title bar; half-button spacing (17px). */
.floating-translate,.floating-chat{position:fixed!important;top:var(--translate-top,78px)!important;bottom:auto!important;transform:none!important;z-index:2001!important;will-change:auto}
.floating-chat{right:calc(63px + env(safe-area-inset-right,0px))!important}
.mobile-translation-progress{position:fixed;top:calc(var(--translate-top,78px) + 41px);right:calc(12px + env(safe-area-inset-right,0px));z-index:2000;min-width:132px;max-width:min(220px,75vw);padding:5px 7px;border:1px solid #6c8768;border-radius:8px;background:#203126;color:#e6f5e0;box-shadow:0 2px 8px #0005;font-size:11px;text-align:center;pointer-events:none}
.mobile-translation-progress[hidden]{display:none!important}
.mobile-translation-progress progress{display:block;width:100%;height:5px;margin-top:4px}

/* V0.6.4: unread chat indicator */
.floating-chat.mobile-chat-unread{background:#b64d25!important;border-color:#ffd278!important;color:#fff!important;box-shadow:0 0 0 2px #ffda8855,0 2px 7px #0005!important}
.floating-chat.mobile-chat-unread::after{content:'';position:absolute;top:-2px;right:-2px;width:11px;height:11px;border-radius:50%;background:#ffe36c;border:2px solid #182b1c;box-sizing:content-box}

/* V0.6.7: both fixed controls raised by 3/4 of their 34px diameter (25.5px). */
.floating-chat,.floating-translate{top:var(--translate-top,52px)!important}
.mobile-translation-progress{top:calc(var(--translate-top,52px) + 41px)}

/* V0.7.0: progress is integrated into the round translation control. */
.floating-translate{border:0!important;outline:none!important;isolation:isolate;background:conic-gradient(#8fe4a8 var(--translation-percent,100%),#53685b 0)!important;color:#fff!important;font-size:17px!important;box-shadow:0 2px 7px #0006!important}
.floating-translate::before{content:"";position:absolute;inset:3px;border-radius:50%;background:#216e60;z-index:-1}
.floating-translate[aria-pressed="false"]{background:#53685b!important}
.floating-translate[aria-pressed="false"]::before{background:#314d40}
.floating-translate.translation-working{font-size:0!important}
.floating-translate.translation-working::after{content:attr(data-progress) "%";font-size:10px;font-weight:700;letter-spacing:-.5px;color:#fff;position:absolute;inset:0;display:flex;align-items:center;justify-content:center}
.floating-translate:focus-visible{outline:2px solid #e2f7c5!important;outline-offset:3px!important}

/* V0.7.1: chat gestures scroll the message list, never the page behind it. */
.mobile-chat-panel{overscroll-behavior:contain;touch-action:pan-y}
.mobile-chat-list{overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-y:contain;touch-action:pan-y;scrollbar-gutter:stable}
.mobile-chat-head,.mobile-chat-form{touch-action:manipulation}
/* V0.7.3: inherited category-name translation controls */
.mobile-rule-level{margin:12px 0 8px 14px;padding-left:10px;border-left:0}
.mobile-rule-form{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:8px 0 12px}
.mobile-rule-form label{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.mobile-rule-form select{max-width:100%;padding:8px;border-radius:7px}
.mobile-rule-form button{padding:8px 12px;border-radius:7px}
.mobile-rule-form small{width:100%;opacity:.8}
/* V0.7.4: compact category action switches, aligned with the web administration. */
.mobile-category-row{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:42px}
.mobile-category-row strong{min-width:0;overflow-wrap:anywhere}
.mobile-category-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}
.mobile-toggle-form{display:inline-flex;margin:0;padding:0}
.mobile-icon-toggle{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:9px;border:1px solid currentColor;font-size:20px;cursor:pointer;background:transparent}
.mobile-toggle-on{color:#176c36;background:#e1f5e5}
.mobile-toggle-off{color:#a22a2a;background:#fbe6e6}
.mobile-toggle-inherit{color:#1a5794;background:#e5f0ff}

.mobile-category-name{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}.mobile-category-preview{display:block;font-size:.8em;opacity:.78;overflow-wrap:anywhere}.mobile-category-actions{flex-shrink:0}

.help-topic{padding:0 14px}.help-topic>summary{list-style:none;padding:14px 0;cursor:pointer}.help-topic>summary::-webkit-details-marker{display:none}.help-topic>summary::after{content:"";position:absolute;right:17px;top:50%;width:10px;height:10px;border-right:2px solid #d6edc6;border-bottom:2px solid #d6edc6;transform:translateY(-65%) rotate(45deg);transition:transform .2s ease}.help-topic[open]>summary::after{transform:translateY(-30%) rotate(225deg)}.help-topic>summary strong{display:block;padding-right:28px}.help-topic>summary small{display:block;color:#bbcab6;margin-top:5px;padding-right:28px}.help-topic>p{padding:0 0 15px;margin:0;line-height:1.6}
/* V0.8.5: responsive read-only permissions comparison */
.tb-role-matrix {margin:12px 0;border:1px solid #536652;border-radius:12px;padding:12px;background:#172319;color:#e8efe8}
.tb-role-matrix summary{cursor:pointer;display:flex;gap:8px;align-items:center;font-weight:700}
.tb-role-matrix .tb-system-body{padding-top:12px}
.tb-role-matrix table{border-collapse:collapse;width:100%;min-width:460px;font-size:13px}
.tb-role-matrix th,.tb-role-matrix td{padding:8px 6px;border-bottom:1px solid #405041;text-align:center}
.tb-role-matrix th:first-child,.tb-role-matrix td:first-child{text-align:left;min-width:210px}
.tb-role-matrix .tb-current-role{background:rgba(110,178,115,.19)}
.tb-role-matrix .tb-grant-list{padding-left:20px;overflow-wrap:anywhere}
.tb-role-matrix .tb-current-rights{margin-top:20px}

/* V0.8.7: read-only category hierarchy in rights matrix */
.mobile-matrix-category-row{padding:9px 0;border-bottom:1px solid rgba(128,128,128,.2);min-width:0}
.mobile-matrix-depth-1{margin-left:18px}
.mobile-matrix-depth-2{margin-left:36px}

/* V0.8.9: group each readable top-level category with its descendants. */
.mobile-matrix-permitted{margin-top:14px}
.mobile-matrix-category-group{border:1px solid #536652;border-radius:10px;padding:8px 11px;margin:12px 0;background:rgba(100,140,100,.09);overflow-wrap:anywhere}
.mobile-matrix-category-group .mobile-matrix-category-row:last-child{border-bottom:0}
.mobile-matrix-category-group .mobile-matrix-depth-0{font-weight:700;border-bottom:1px solid #536652;padding-bottom:10px}
.mobile-matrix-category-group .mobile-matrix-depth-1{margin-left:16px}
.mobile-matrix-category-group .mobile-matrix-depth-2{margin-left:32px}

/* V0.9.3: password editing stays in the personal-settings accordion. */
.mobile-password-form{display:grid;gap:12px;padding:8px 0 14px}.mobile-password-form label{display:grid;gap:6px}.mobile-password-form input{width:100%;box-sizing:border-box;min-height:44px}.mobile-password-form button{min-height:44px}.mobile-password-panel>summary{list-style:none}.mobile-password-panel>summary::-webkit-details-marker{display:none}

/* V0.9.5: konsistente, gut erkennbare Klappkarten statt Plus/Minus. */
.help-topic{border:1px solid #526f52;border-radius:15px;background:linear-gradient(145deg,#293e2e,#1b2c21);box-shadow:0 3px 12px #0002;margin:11px 0;overflow:hidden;transition:border-color .2s ease,box-shadow .2s ease}
.help-topic>summary{position:relative;display:block;min-height:68px;padding:15px 44px 15px 15px;list-style:none;border-radius:14px;transition:background .2s ease}
.help-topic>summary::-webkit-details-marker{display:none}
.help-topic>summary strong{padding-right:0;font-size:1rem;line-height:1.4}
.help-topic>summary small{padding-right:0;line-height:1.4}
.help-topic>summary::after{right:20px}
.help-topic>summary:hover{background:#344d38}
.help-topic>summary:focus-visible{outline:3px solid #c5eaa8;outline-offset:-3px}
.help-topic[open]{border-color:#8fb886;box-shadow:0 5px 18px #0004}
.help-topic[open]>summary{background:#334b36;border-bottom:1px solid #5a7a59;border-radius:14px 14px 0 0}
.help-topic>p,.help-topic>.admin-accordion-body{padding:14px 16px 18px}
.help-topic>.admin-accordion-body:empty{padding:0}
/* Auch innere Bereiche wie Passwort und Matrizen bekommen denselben Pfeil. */
.mobile-password-panel>summary,.tb-role-matrix>summary{position:relative;list-style:none;padding-right:35px;min-height:46px}
.mobile-password-panel>summary::-webkit-details-marker,.tb-role-matrix>summary::-webkit-details-marker{display:none}
.mobile-password-panel>summary::after,.tb-role-matrix>summary::after{content:"";position:absolute;right:12px;top:50%;width:9px;height:9px;border-right:2px solid #d6edc6;border-bottom:2px solid #d6edc6;transform:translateY(-65%) rotate(45deg);transition:transform .2s ease}
.mobile-password-panel[open]>summary::after,.tb-role-matrix[open]>summary::after{transform:translateY(-30%) rotate(225deg)}
@media(prefers-reduced-motion:reduce){.help-topic,.help-topic>summary,.help-topic>summary::after,.mobile-password-panel>summary::after,.tb-role-matrix>summary::after{transition:none}}

/* V1.0.1 localized upload picker */
.file-picker{display:flex;flex-direction:column;gap:9px;margin:12px 0}.file-picker-button{display:inline-flex;align-items:center;justify-content:center;max-width:fit-content;border:1px solid #799783;border-radius:12px;padding:10px 16px;background:#eaf4ed;color:#1c4430;font-weight:650;cursor:pointer}.file-picker-input{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden}.file-picker:focus-within .file-picker-button{outline:2px solid #387b55;outline-offset:2px}#selected-files{font-size:.9em;overflow-wrap:anywhere}

.delete-image-button{margin:12px 0;padding:10px 16px;border:1px solid #b54d4d;border-radius:10px;background:#4a2222;color:#fff;font-weight:650;cursor:pointer}.delete-image-button:focus-visible{outline:3px solid #e8c27a;outline-offset:3px}

/* V1.0.5: kompakte, einzeln klappbare Aktionen je Archiveintrag */
.entry-actions{display:flex;flex-wrap:wrap;gap:9px;margin:14px 0 5px;align-items:flex-start}
.entry-action-panel{flex:1 1 145px;min-width:0;border:1px solid #69836a;border-radius:10px;background:#293d2c;overflow:hidden}
.entry-action-panel>summary{display:flex;align-items:center;gap:7px;cursor:pointer;list-style:none;min-height:44px;padding:9px 32px 9px 12px;position:relative;font-weight:650;box-sizing:border-box}
.entry-action-panel>summary::-webkit-details-marker{display:none}
.entry-action-panel>summary::after{content:'';position:absolute;right:13px;top:50%;width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:translateY(-70%) rotate(45deg);transition:transform .2s}
.entry-action-panel[open]>summary::after{transform:translateY(-25%) rotate(225deg)}
.entry-action-panel[open]>summary{border-bottom:1px solid #69836a;background:#344a36}
.entry-action-panel>summary:focus-visible{outline:3px solid #c5eaa8;outline-offset:-3px}
.entry-action-body{padding:12px;overflow-wrap:anywhere}
.entry-action-body label{display:block}.entry-action-body textarea{display:block;width:100%;box-sizing:border-box;min-height:85px;margin-top:6px}
.entry-edit-link{display:inline-flex;align-items:center;min-height:44px;padding:4px 8px}
.entry-action-body .delete-image-button{width:100%;margin:10px 0 0}
@media(prefers-reduced-motion:reduce){.entry-action-panel>summary::after{transition:none}}

.entry-inline-edit-form input,.entry-inline-edit-form textarea{width:100%;box-sizing:border-box;margin:6px 0 12px;min-width:0}
.entry-inline-edit-form button{width:100%;min-height:44px}
.entry-edit-status{margin:6px 0 0;overflow-wrap:anywhere}

/* V1.0.7: symbol-only action bar with a single full-width expandable content row */
.entry-action-layout{display:flex;flex-direction:column;width:100%;margin:14px 0 5px;min-width:0}
.entry-action-layout .entry-actions{display:flex;flex-wrap:nowrap;gap:10px;margin:0 0 8px;width:100%;align-items:center}
.entry-action-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 52px;min-height:48px;border:1px solid #69836a;border-radius:10px;background:#293d2c;color:#fff;font-size:23px;cursor:pointer}
.entry-action-icon[aria-expanded="true"]{background:#405a40;border-color:#b2d39d}
.entry-action-icon:focus-visible{outline:3px solid #c5eaa8;outline-offset:2px}
.entry-action-content{box-sizing:border-box;width:100%;min-width:0;border:1px solid #69836a;border-radius:10px;padding:13px;background:#293d2c;overflow-wrap:anywhere}
.entry-action-content[hidden]{display:none!important}
.entry-action-content form,.entry-action-content label{display:block;width:100%;box-sizing:border-box}
.entry-action-content input,.entry-action-content textarea{max-width:100%;box-sizing:border-box}
.entry-action-content .preview{max-width:100%;height:auto}

/* V1.0.8: all action panels are siblings below the icon row and span the entire entry width. */
.entry-action-layout{display:flex;flex-direction:column;width:100%;min-width:0}
.entry-action-layout>.entry-actions{display:flex;flex-direction:row;flex-wrap:nowrap;width:100%;gap:10px}
.entry-action-layout>.entry-action-content{display:block;flex:0 0 auto;align-self:stretch;width:100%;max-width:100%;min-width:0;margin-top:2px}
.entry-action-layout>.entry-action-content[hidden]{display:none!important}
.entry-action-layout>.entry-action-content textarea,.entry-action-layout>.entry-action-content input{width:100%;max-width:100%;box-sizing:border-box}

/* V1.0.10: Originalbild über dem OCR-Korrekturfeld im Inline-Editor. */
.entry-edit-original{width:100%;margin:4px 0 14px}
.entry-edit-original img{display:block;max-width:100%;width:auto;height:auto;max-height:65vh;object-fit:contain;border-radius:8px;border:1px solid #617954}
.entry-inline-edit-form textarea[name="ocr_text"]{display:block;width:100%;min-height:230px;resize:vertical}

/* V1.0.11: small OCR version switch; only one content version visible. */
.ocr-version-switch{display:flex;justify-content:flex-end;margin:6px 0}
.ocr-switch{width:auto;min-height:34px;padding:5px 10px;font-size:.82rem;border-radius:8px}
.ocr-version[hidden]{display:none!important}

.mad-message-editor{display:block;margin:12px 0;padding:10px;border:1px solid #627a54;border-radius:8px}.mad-message-editor textarea{display:block;width:100%;box-sizing:border-box;min-height:100px;margin-top:8px}

/* V1.0.15: editable player and optional time per OCR message */
.mad-message-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(125px,0.65fr);gap:10px}.mad-message-editor input{display:block;width:100%;box-sizing:border-box;min-width:0;margin-top:6px}.mad-message-editor label{display:block;min-width:0}@media(max-width:370px){.mad-message-fields{grid-template-columns:1fr}}

/* V1.0.16: Compact, individually collapsible OCR message editors. */
.mad-message-editor{display:block;margin:7px 0;padding:0;overflow:hidden}
.mad-message-editor>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;list-style:none;padding:11px 12px;min-height:44px;box-sizing:border-box;font-weight:650}
.mad-message-editor>summary::-webkit-details-marker{display:none}
.mad-message-heading{min-width:0;overflow-wrap:anywhere}
.mad-message-chevron{flex:none;transition:transform .2s ease}
.mad-message-editor[open] .mad-message-chevron{transform:rotate(180deg)}
.mad-message-inner{padding:8px 10px 12px;border-top:1px solid #627a54}
.mad-message-editor:not([open]) .mad-message-inner{display:none}
@media(prefers-reduced-motion:reduce){.mad-message-chevron{transition:none}}
/* V1.0.21: compact collapsible OCR import review */
.ocr-review-scan{margin:1rem 0;padding:.7rem;border:1px solid var(--border,#526052);border-radius:12px;min-width:0}
.ocr-review-scan h3{font-size:1rem;overflow-wrap:anywhere;margin:.3rem 0 .7rem}
.ocr-review-image{display:block;max-width:100%;max-height:420px;object-fit:contain;margin:0 auto .8rem;border-radius:8px}
.ocr-review-message{border:1px solid var(--border,#526052);border-radius:9px;margin:.4rem 0;padding:.35rem .65rem;min-width:0}
.ocr-review-message summary{cursor:pointer;padding:.55rem .2rem;font-weight:600;overflow-wrap:anywhere}
.ocr-review-message label{display:block;margin:.5rem 0;min-width:0}
.ocr-review-message input,.ocr-review-message textarea{display:block;width:100%;box-sizing:border-box;min-width:0;font-size:16px}

/* Timeline: archive visual language, collapsible chat messages */
.timeline-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0 18px}.timeline-tabs a{display:block;text-align:center;padding:12px 6px;background:#293d2a;border:1px solid #759565;border-radius:12px;color:#e4f9e8;text-decoration:none;font-weight:600}.timeline-tabs a.selected{background:#527345;border-color:#b5d798;color:#fff}.timeline-entry .archive-item-body>strong{display:block;margin-bottom:9px}.timeline-entry-content{margin-top:10px}.timeline-entry-content .entry-action-layout{margin-top:10px}.timeline-message{margin:0 0 12px}.timeline-message summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;gap:8px;align-items:center}.timeline-message summary::-webkit-details-marker{display:none}.timeline-message summary:after{content:'⌄';margin-left:auto}.timeline-message[open] summary:after{content:'⌃'}.timeline-message summary small{white-space:nowrap}.timeline-open{display:inline-flex;padding:9px 12px;border:1px solid #759565;border-radius:9px;color:#d8efbf;text-decoration:none;margin-top:8px}

/* V1.0.27: Timeline archive entries are expanded initially and can be collapsed. */
.timeline-entry-summary{cursor:pointer;display:block;position:relative;padding:11px 42px 11px 12px;font-weight:600;color:#e5f2db;font-size:.91rem;overflow-wrap:anywhere;list-style:none}
.timeline-entry-summary::-webkit-details-marker{display:none}
.timeline-entry-summary small{display:block;font-weight:400;opacity:.8;margin-top:5px}
.timeline-entry-chevron{position:absolute;right:14px;top:13px;transition:transform .18s ease}
.timeline-entry:not([open]) .timeline-entry-chevron{transform:rotate(-90deg)}
.timeline-entry[open]>.archive-item-body{border-top:1px solid #48634b}
.timeline-entry-summary:focus-visible{outline:2px solid #b5d798;outline-offset:-3px}

/* V1.0.28 */
.mad-return-button{display:block;margin:0 0 14px;padding:11px 15px;width:100%;text-align:left;border:1px solid #6f946e;border-radius:10px;background:#243b2b;color:#e9f6e7;font-weight:600;cursor:pointer}.mad-focused-entry{outline:2px solid #86b88b;outline-offset:3px;border-radius:8px;scroll-margin-top:85px}

/* V1.0.30: return direction overlaid inside the existing toolbar icon size. */
.mad-return-icon .mad-return-symbol{position:relative;display:inline-flex;align-items:center;justify-content:center;line-height:1;font-size:23px}
.mad-return-icon .mad-return-arrow{position:absolute;top:-9px;left:-11px;font-size:17px;font-weight:800;line-height:1;color:#e8ffda;text-shadow:0 1px 2px #142516;pointer-events:none}

/* V1.0.37: navigation return icon is always the first (leftmost) action. */
.entry-actions > .mad-return-icon{order:-100;flex-shrink:0;margin-left:0;margin-right:0}

/* V1.0.59: compact category rename action aligned with translation/visibility buttons */
.mobile-category-rename{position:relative;flex:0 0 auto;margin:0;padding:0;border:0;min-width:36px}
.mobile-category-rename>summary{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:36px;height:36px;border:1px solid currentColor;border-radius:9px;cursor:pointer;font-size:20px;list-style:none;background:transparent}
.mobile-category-rename>summary::-webkit-details-marker{display:none}
.mobile-category-rename>form{position:relative;z-index:1;min-width:min(260px,75vw);padding:10px;border:1px solid #78916a;border-radius:9px;background:#203020}
.mobile-category-row{flex-wrap:wrap}.mobile-category-rename[open]{flex-basis:100%;order:4}.mobile-category-rename[open]>summary{margin-left:auto}

/* V1.0.61: category editor permission overview */
.mobile-category-access{margin-top:14px;padding-top:10px;border-top:1px solid rgba(170,205,153,.3)}
.mobile-category-access>strong{display:block;margin-bottom:9px}
.mobile-category-access-group{min-width:0;margin:8px 0;padding:9px 12px;border:1px solid #6b885e;border-radius:10px}
.mobile-category-access-group legend{padding:0 7px;font-weight:700}
.mobile-category-access-names{overflow-wrap:anywhere;line-height:1.7}

/* V1.0.89: Desktop Edition foundation; mobile and embedded admin remain unchanged. */
.mad-desktop-sidebar{display:none}
@media(min-width:1100px){
 body:has(.mad-desktop-sidebar){--mad-sidebar-width:244px}
 body:has(.mad-desktop-sidebar)>.app-header{margin-left:var(--mad-sidebar-width);padding:14px 28px}
 body:has(.mad-desktop-sidebar)>main{margin-left:var(--mad-sidebar-width);margin-right:0;max-width:none;width:calc(100% - var(--mad-sidebar-width));padding:28px clamp(22px,3vw,58px) 70px}
 body:has(.mad-desktop-sidebar)>.bottom{display:none!important}
 .mad-desktop-sidebar{display:flex;flex-direction:column;position:fixed;inset:0 auto 0 0;width:244px;background:#17271d;border-right:1px solid #506b4b;z-index:95;padding:24px 14px 18px;overflow-y:auto}
 .mad-desktop-sidebar-title{padding:5px 12px 22px;color:#dff0c7;font-size:1.2rem;font-weight:800}
 .mad-desktop-sidebar-title small{display:block;font-size:.76rem;color:#b7c9ad;font-weight:400}
 .mad-desktop-sidebar nav{display:grid;gap:6px}
 .mad-desktop-sidebar nav a{display:flex;align-items:center;gap:12px;min-height:46px;padding:9px 12px;color:#e7f4df;text-decoration:none;border:1px solid transparent;border-radius:10px}
 .mad-desktop-sidebar nav a:hover,.mad-desktop-sidebar nav a:focus-visible{background:#2b452f;border-color:#6d8e62}
 .mad-desktop-sidebar nav a.active{background:#3c593b;border-color:#9abc81;font-weight:700}
 .mad-desktop-sidebar nav a span{font-size:1.2rem;width:26px;text-align:center}
 .mad-desktop-account{margin-top:auto;padding:18px 12px 0;color:#c1d4b7;border-top:1px solid #425b3f;overflow-wrap:anywhere}
 body:has(.mad-desktop-sidebar) main>.quick-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
 body:has(.mad-desktop-sidebar) main>.archive-folder{max-width:none}
 body:has(.mad-desktop-sidebar) .archive-entry-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 body:has(.mad-desktop-sidebar) .archive-entry-list>.card{margin:0}
 body:has(.mad-desktop-sidebar) .archive-folder>.folder-content{padding:16px 20px}
 body:has(.mad-desktop-sidebar) .archive-subfolder>.folder-content{padding:12px 16px}
 body:has(.mad-desktop-sidebar) input,body:has(.mad-desktop-sidebar) select,body:has(.mad-desktop-sidebar) textarea{max-width:100%}
 body:has(.mad-desktop-sidebar) .web-frame{height:75vh}
}
@media(min-width:1600px){
 body:has(.mad-desktop-sidebar){--mad-sidebar-width:268px}
 .mad-desktop-sidebar{width:268px}
 body:has(.mad-desktop-sidebar) main>.quick-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
 body:has(.mad-desktop-sidebar) .archive-entry-list{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* V1.0.92: desktop chat anchored above the viewport edge when bottom navigation is hidden. */
@media(min-width:1100px){
 body:has(.mad-desktop-sidebar) .mobile-chat-panel{left:auto;right:22px;bottom:18px;width:min(460px,calc(100vw - 300px));height:min(520px,calc(100dvh - var(--chat-top,80px) - 32px));border-radius:14px}
 body:has(.mad-desktop-sidebar).mobile-chat-open main{padding-bottom:70px}
}

/* V1.0.99: progress ring and percent stay visible on desktop and mobile while translating. */
.floating-translate.translation-working{background:conic-gradient(#8fe4a8 var(--translation-percent,0%),#53685b 0)!important;border:0!important;isolation:isolate}
.floating-translate.translation-working::after{content:attr(data-progress) "%"!important;display:flex!important;font-size:10px!important;z-index:2}
@media(min-width:1200px){.floating-translate.translation-working{z-index:2100!important}}
