:root{font-family:system-ui,sans-serif;color-scheme:dark;background:#101722;color:#e9eef6}body{margin:0}header{background:#202d42;padding:16px 5%;display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap}a{color:#8ac9ff}header a{text-decoration:none}nav{display:flex;gap:14px}main{max-width:1100px;margin:auto;padding:24px}section,.card{background:#1c293b;border:1px solid #34475e;border-radius:12px;padding:18px;margin:16px 0}form{max-width:720px}label{display:block;margin:12px 0}input,textarea,select{display:block;box-sizing:border-box;width:100%;padding:10px;margin-top:5px;border-radius:7px;border:1px solid #61758a;background:#111b2b;color:white;font:inherit}button{background:#4b91d5;border:0;border-radius:8px;padding:11px 18px;color:white;cursor:pointer}.row{display:flex;gap:10px;max-width:none}.row>*{flex:1}.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:14px}.card{margin:0;text-decoration:none;display:flex;flex-direction:column;gap:9px}.card img{width:100%;height:150px;object-fit:cover}.card small{color:#c5d0df;overflow-wrap:anywhere}.full{max-width:100%;max-height:75vh;object-fit:contain}.notice{background:#394c61;padding:14px;border-radius:8px}.check{display:flex;gap:8px;align-items:center}.check input{width:auto}.pdf{font-size:40px;text-align:center;padding:35px}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{min-width:280px}button,input,select,textarea{font-size:16px}button{min-height:46px;font-weight:650}button.primary{width:100%;background:#408bd1}button.danger{background:#9e3d46}nav{align-items:center;flex-wrap:wrap}header{padding:12px 16px}main{padding:14px 14px 60px}h1{font-size:1.6rem}section{padding:16px;margin:14px 0}input,textarea,select{padding:13px;min-height:46px}.card{min-width:0}.card img{border-radius:8px}.muted{color:#afc0d1;font-size:.9rem}.full{display:block;width:100%;height:auto;max-height:none;border-radius:10px}.search{display:grid;gap:10px}.search button{width:100%}.brand{font-size:1.15rem;font-weight:800}#ocrbutton{background:#314a67}@media(min-width:720px){main{padding:28px}.search{grid-template-columns:2fr 1fr auto}.search button{width:auto}.primary{max-width:320px!important}}@media(max-width:540px){header{display:block}nav{margin-top:10px;gap:12px;font-size:.9rem}.grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.card{padding:9px}.card img{height:130px}.card small{font-size:.72rem}.row{flex-direction:column}}

.tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:16px 0}.tabs a{display:block;text-align:center;padding:14px 6px;background:#26354a;border-radius:10px;text-decoration:none;font-weight:650}.tabs a.active{background:#438ed0;color:white}.chat-card{padding:14px;background:#243348;border:1px solid #405571;border-radius:13px;margin:12px 0}.chat-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.chat-head strong{overflow-wrap:anywhere;color:#9ed8ff}.chat-head span{white-space:nowrap;color:#bdcad9}.chat-card p{font-size:1.08rem;line-height:1.5;overflow-wrap:anywhere;white-space:normal}.chat-card details{border-top:1px solid #44556b;padding-top:10px}.chat-card summary,.original summary{cursor:pointer;padding:10px 0;font-weight:650}.original{padding:12px;background:#1c293b;border-radius:10px}.original img{margin-top:12px}.chat-card input,.chat-card textarea{max-width:100%}
/* V004 touch-first scan preview */
.scan-box{background:#172c40;border:1px solid #456581;border-radius:14px;padding:14px;margin:16px 0}.scan-box button{width:100%;min-height:52px}.scan-box .chat-card{margin:9px 0}.scan-box .chat-card p{white-space:pre-wrap}.scan-box h3{margin:4px 0 8px}@media(max-width:600px){.chat-card{padding:12px}.chat-head{font-size:.96rem}}

/* V005: touch-friendly translation controls */
.translate-tools{margin:1rem 0}.translation-panel{margin-top:.75rem}.translation-panel button{min-height:44px}.translation-text:not(:empty){padding:.8rem;margin-top:.4rem;background:#1e3442;border-left:3px solid #67c5b5;border-radius:8px;white-space:pre-wrap;overflow-wrap:anywhere}select{width:100%;min-height:48px;padding:.7rem;border-radius:8px}button.secondary{background:#455365}nav a{display:inline-block;margin:.2rem}

/* V007 – mobile-first timeline */
.tb-timeline-link{display:block;text-align:center;text-decoration:none;padding:15px;border-radius:12px;background:#2d77bd;color:white;font-weight:700}
.tb-timeline-top{position:sticky;top:0;z-index:5;background:#101722;padding:10px;border-radius:12px;margin-bottom:10px}
.tb-timeline-top form{margin:0}.tb-timeline-top select{width:100%;min-height:44px}.tb-timeline-top button{width:100%;margin-top:8px;min-height:44px}
.tb-day{padding:0;margin:10px 0}.tb-day-head{display:flex;align-items:center;justify-content:space-between;gap:8px;position:sticky;top:0;background:#202b3b;padding:10px;border-radius:10px;z-index:2}.tb-day-head small{display:block}.tb-day-head button{white-space:nowrap}
.tb-messages{padding:8px}.tb-message{margin:8px 0;padding:12px;border-radius:12px}.tb-message p{overflow-wrap:anywhere;margin:8px 0}.tb-source{font-size:12px;opacity:.8}.tb-day-images{display:flex;overflow-x:auto;gap:10px;padding:10px}.tb-image-link img{height:160px;max-width:140px;object-fit:contain;border-radius:8px}.tb-category-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid #445;padding:12px 0}.tb-category-row button{min-height:44px}.tb-date-form{display:flex;align-items:end;flex-wrap:wrap;gap:10px}
@media(min-width:750px){.tb-timeline-top{top:8px}.tb-messages{max-width:820px;margin:auto}}

/* V008: kompakte mobile Administration */
.admin-tabs{display:flex;gap:8px;margin:12px 0}.admin-tabs a{flex:1;text-align:center;padding:13px 8px;border-radius:10px;background:#303b60;text-decoration:none;color:#fff;font-weight:700}.admin-tabs a.active{background:#667fda}.admin-search{display:grid;grid-template-columns:1fr;gap:10px}.admin-search label{display:block}.admin-search button{width:100%}.admin-member-list{display:grid;gap:7px}.admin-member-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 12px;background:#2a3451;border:1px solid #485579;border-radius:10px;text-decoration:none;color:#fff;min-height:60px}.admin-member-row small{display:block;font-weight:400;color:#b8c6e6;margin:4px 0 0 26px}.admin-member-row>span:last-child{white-space:nowrap;color:#b7caff}.admin-check-list{display:grid;gap:6px;margin-bottom:16px}.admin-check-row{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:48px;border-bottom:1px solid #455171;padding:8px 4px}.admin-check-row input{width:23px;height:23px;flex:none}.admin-check-row small{display:block;color:#b8c6e6}.admin-details{background:#222b44;border:1px solid #465375;border-radius:10px;padding:15px;margin:12px 0}.admin-details summary{cursor:pointer;font-weight:700;padding:4px 0;min-height:28px}.admin-details form{margin-top:14px}.admin-save{width:100%;position:sticky;bottom:8px;z-index:2}.admin-member-row:focus-visible,.admin-tabs a:focus-visible{outline:3px solid #fff}@media(min-width:700px){.admin-search{grid-template-columns:2fr 1fr auto;align-items:end}.admin-search button{width:auto}}

.welcome-copy textarea{width:100%;min-height:105px;resize:vertical;font-size:1rem;line-height:1.5}.welcome-copy button{min-height:48px;width:100%;max-width:420px}.welcome-copy{border:2px solid #74b6e9}

/* V014 fixed mobile add button, including iPhone safe area */
.tb-add-fab{position:fixed;right:max(18px,env(safe-area-inset-right));bottom:calc(18px + env(safe-area-inset-bottom));width:58px;height:58px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#4b91d5;color:#fff;text-decoration:none;font-size:38px;font-weight:500;line-height:1;box-shadow:0 5px 20px #0008;z-index:50}.tb-add-fab:focus-visible{outline:3px solid #fff;outline-offset:3px}main{padding-bottom:calc(100px + env(safe-area-inset-bottom))}

/* V015 */
.tb-type-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}.tb-type-tabs a{border:1px solid #56657b;padding:10px;border-radius:10px;text-decoration:none}.tb-type-tabs a.active{background:#294d83;color:white}.tb-inline-image{display:block;width:100%;max-height:65vh;object-fit:contain;border-radius:10px;margin:12px 0}.tb-inline-entry h3{margin:10px 0}.tb-inline-entry p{white-space:normal;overflow-wrap:anywhere}

/* V016 – compact, mobile-friendly activity history */
.tb-history-card{display:block;text-decoration:none;color:inherit;border:1px solid #334155;border-radius:12px;padding:14px;margin:10px 0;background:#172231;line-height:1.6}
.tb-history-card:hover,.tb-history-card:focus-visible{border-color:#7ab6ff;background:#213148}
.tb-history-time{display:block;font-size:.83rem;opacity:.75}
.tb-history-category{display:block;font-size:.9rem;opacity:.9;margin-top:5px}

/* Rabiator unified olive theme — visual changes only */
:root{color-scheme:dark;background:#111813;color:#eef4e9;font-family:system-ui,-apple-system,"Segoe UI",sans-serif}
body{background:radial-gradient(ellipse at 50% 0%,#2a3d2c 0%,#18231b 45%,#111813 100%);color:#eef4e9;min-height:100vh}
header{background:rgba(29,42,31,.94);border-bottom:1px solid #425944;align-items:center}
header .brand{color:#d8efbf;font-weight:800}
header nav a{color:#e3f2d8;padding:9px 13px;border:1px solid #526e4c;border-radius:9px;background:#293d2a;min-height:42px;display:inline-flex;align-items:center;justify-content:center}
header nav a:hover{background:#3d5936;border-color:#b5d798}
main{max-width:1100px}h1,h2,h3{color:#f3f8ef}h1{letter-spacing:-.025em}
section,.card,.original,.admin-details{background:rgba(29,42,31,.9);border-color:#425944;border-radius:16px;box-shadow:0 10px 28px #0002}
a{color:#c5e6a8}a:hover{color:#e0f4cd}
input,textarea,select{background:#18271b;border:1px solid #69835d;color:#f8fff4;border-radius:9px}
input:focus-visible,textarea:focus-visible,select:focus-visible,button:focus-visible,a:focus-visible{outline:3px solid #d7f1ad;outline-offset:3px}
button,button.primary,button.secondary,.tb-timeline-link,.tabs a,.admin-tabs a,.tb-type-tabs a,.tb-add-fab{background:linear-gradient(120deg,#354d31,#293d2a);border:1px solid #759565;color:#f8fff4;border-radius:10px;transition:background .18s,border-color .18s}
button:hover,.tb-timeline-link:hover,.tabs a:hover,.admin-tabs a:hover,.tb-type-tabs a:hover{background:#45663d;border-color:#b5d798;color:#fff}
button.danger{background:#803e3e;border-color:#b77a7a}
.tabs a.active,.admin-tabs a.active,.tb-type-tabs a.active{background:#527345;border-color:#b5d798;color:#fff}
.notice,.chat-card,.scan-box,.tb-day-head,.tb-timeline-top,.admin-member-row,.admin-check-row,.tb-history-card{background:#243629;border-color:#4b674b;color:#eef4e9}
.chat-head strong,.admin-member-row>span:last-child{color:#d3edb7}
.chat-head span,.card small,.muted,.admin-member-row small,.admin-check-row small{color:#bbcab6}
.chat-card details,.admin-check-row,.tb-category-row{border-color:#4b674b}
.translation-text:not(:empty){background:#253d2c;border-left-color:#a8ce89}
.welcome-copy{border-color:#759565}
.tb-timeline-top{background:#18271b}.tb-history-card:hover,.tb-history-card:focus-visible{background:#344b33;border-color:#b5d798}
.tb-design-credit{text-align:center;color:#91a38f;font-size:.8rem;padding:8px 12px 24px}
@media(max-width:540px){header nav a{flex:1 1 auto;text-align:center;padding:9px 10px}header nav{gap:7px}}
@media(prefers-reduced-motion:reduce){button,header nav a{transition:none}}
/* V025: mobile-first nested archive folders */
.tb-archive-category,.tb-archive-subcategory{margin:10px 0;border:1px solid #526b50;border-radius:13px;background:#1d3023;overflow:hidden}
.tb-archive-category>summary,.tb-archive-subcategory>summary{cursor:pointer;list-style:none;padding:15px 16px;min-height:58px;display:flex;flex-direction:column;gap:5px;position:relative;padding-right:38px}
.tb-archive-category>summary::-webkit-details-marker,.tb-archive-subcategory>summary::-webkit-details-marker{display:none}
.tb-archive-category>summary::after,.tb-archive-subcategory>summary::after{content:'▸';position:absolute;right:15px;top:20px;font-size:20px}
.tb-archive-category[open]>summary::after,.tb-archive-subcategory[open]>summary::after{content:'▾'}
.tb-folder-title{font-size:1.06rem;font-weight:700;overflow-wrap:anywhere}
.tb-archive-category summary small,.tb-archive-subcategory summary small{color:#b6c9b1;font-size:.79rem;overflow-wrap:anywhere}
.tb-archive-children{padding:0 10px 10px 18px}
.tb-archive-subcategory{background:#283b2c;margin:8px 0}
.tb-archive-content{padding:8px 10px 12px}
.tb-archive-entry{padding:12px;margin:8px 0}
.tb-archive-entry .tb-message{border-top:1px solid #526b50;padding:10px 0}
.tb-entry-meta{font-size:.78rem;opacity:.8;margin-top:12px}
.tb-load-more{width:100%;margin:10px 0}
.tb-timeline-top{position:static}
/* V026: compact translation action adjacent to each folder title */
.tb-folder-translate{display:inline-flex;align-items:center;justify-content:center;margin-left:.4rem;padding:.25rem .45rem;min-width:2rem;min-height:2rem;border-radius:.6rem;vertical-align:middle;cursor:pointer}
.tb-folder-translate[aria-pressed="true"]{outline:2px solid currentColor}

/* V027: single unobtrusive fixed translation control, clear of the add button. */
.tb-folder-translate{display:none!important}
.tb-translate-fab{position:fixed;right:calc(10px + env(safe-area-inset-right,0px));bottom:calc(108px + env(safe-area-inset-bottom,0px));z-index:90;width:34px;height:34px;min-width:34px;min-height:34px;padding:0;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:17px;line-height:1;background:#314d40;color:white;border:1px solid #8aa18b;box-shadow:0 2px 7px #0005;cursor:pointer}
.tb-translate-fab[aria-pressed="true"]{background:#216e60;outline:2px solid #b5e4d2}

/* V028: one small translation control below navigation, sticky on scroll. */
.tb-translation-toolbar{position:sticky;top:8px;z-index:90;display:flex;justify-content:flex-end;align-items:flex-start;gap:8px;pointer-events:none;margin:0 0 8px;}
.tb-translation-toolbar>*{pointer-events:auto}
.tb-translate-fab{position:static;right:auto;bottom:auto;flex:0 0 34px}
.tb-translation-progress{background:#203126;color:#e6f5e0;border:1px solid #6c8768;border-radius:8px;padding:7px 9px;font-size:12px;max-width:min(245px,75vw);box-shadow:0 2px 8px #0005}
.tb-translation-progress[hidden]{display:none}
.tb-translation-progress progress{width:100%;height:7px;display:block;margin-top:5px}

/* V034 compact inline deletion requests and third-level hierarchy */
.tb-archive-category,.tb-archive-subcategory{position:relative}
.tb-delete-widget{position:relative;text-align:right;padding:0 0 .25rem}
.tb-trash-toggle{font-size:.85rem;padding:.2rem .4rem;min-height:0;line-height:1.2;background:transparent;border:0;cursor:pointer}
.tb-delete-widget>.tb-trash-toggle{display:none}
details[open]>.tb-delete-widget>.tb-trash-toggle,details[open]>.tb-archive-children>.tb-delete-widget>.tb-trash-toggle{display:inline-block}
.tb-delete-request[hidden]{display:none!important}
.tb-delete-request:not([hidden]){display:flex;gap:.4rem;justify-content:flex-end;align-items:center;flex-wrap:nowrap}
.tb-delete-request input{min-width:0;flex:1;max-width:30rem}
.tb-delete-request button{flex:0 0 auto}
.tb-archive-childcategory{margin-left:1.1rem;border-left:2px solid #607363;padding-left:.5rem}
@media(max-width:480px){.tb-delete-request input{width:55%;}.tb-delete-request button{padding:.4rem .55rem}}

.tb-archive-category>.tb-archive-children>.tb-delete-widget{position:absolute;right:1rem;top:.35rem;z-index:2}
.tb-archive-subcategory>.tb-delete-widget{position:absolute;right:1rem;top:.35rem;z-index:2}
.tb-delete-widget:has(.tb-delete-request:not([hidden])){background:#18251b;padding:.35rem;border-radius:.35rem;min-width:min(80vw,23rem)}

/* V035 compact two-row category management */
.tb-manage-item{border-bottom:1px solid #7774;padding:9px 0;min-width:0}.tb-level-2{margin-left:16px}.tb-level-3{margin-left:32px}.tb-manage-form{display:block!important;margin:0!important}.tb-manage-name{display:block;width:100%;box-sizing:border-box;text-align:left;font-weight:600;margin:0 0 5px!important;min-width:0}.tb-manage-actions{display:flex;gap:8px;align-items:center;justify-content:flex-start}.tb-icon-btn{min-width:42px;min-height:42px;padding:6px!important;font-size:19px;line-height:1}.tb-manage-add{display:flex;gap:8px;align-items:center;margin-top:8px}.tb-manage-add[hidden]{display:none!important}.tb-manage-add input{min-width:0;flex:1}.tb-manage-visibility{display:flex;gap:8px;align-items:center;margin-top:5px;font-size:.85rem}.tb-manage-visibility button{padding:4px 9px!important}.tb-manage-visibility label{display:flex;align-items:center;gap:5px}

/* V036: compact automatic release version beside design credit */
.tb-design-credit .tb-version{display:inline-block;margin-left:.65em;white-space:nowrap;font-weight:600;opacity:.85}

/* V1.38: distinct aligned action groups */
.tb-manage-action-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:5px}
.tb-manage-action-row .tb-manage-actions{padding-left:14px;flex:0 0 auto}
.tb-manage-action-row .tb-manage-visibility{margin:0 0 0 auto;padding:5px 8px 5px 14px;border-left:2px solid #76917a;background:rgba(255,255,255,.045);border-radius:0 8px 8px 0;display:flex;gap:8px;align-items:center}
.tb-manage-action-row .tb-manage-visibility label{white-space:nowrap}
.tb-system-label{padding:8px 0;color:#cbd8c9}
.tb-system-label small{font-weight:normal;opacity:.8}
.tb-release-note{margin:12px 10px;padding:12px 16px;border:1px solid #536c53;border-radius:10px;background:#23392a}
.tb-release-note h3{margin:0 0 8px}.tb-release-note ul{margin:0;padding-left:22px}.tb-release-note li{margin:5px 0}
@media(max-width:470px){.tb-manage-action-row .tb-manage-visibility{width:100%;justify-content:flex-end}.tb-manage-action-row .tb-manage-actions{padding-left:8px}}

/* V1.39: visually group each complete category tree */
.tb-manage-group{border:2px solid rgba(125,157,141,.55);border-radius:13px;padding:12px 14px;margin:16px 0;background:rgba(127,156,140,.065);min-width:0;box-sizing:border-box}
.tb-manage-group>.tb-level-1{border-bottom:1px solid rgba(125,157,141,.35);padding-top:2px;padding-bottom:13px}
.tb-manage-group>.tb-level-2,.tb-manage-group>.tb-level-3{border-bottom:1px solid rgba(125,157,141,.17)}
.tb-manage-group>.tb-manage-item:last-child{border-bottom:0}
.tb-translation-on{color:#5cdb89!important}.tb-translation-off{color:#ff7777!important}
@media(max-width:470px){.tb-manage-group{padding:10px 8px}.tb-manage-group>.tb-level-2{margin-left:10px}.tb-manage-group>.tb-level-3{margin-left:20px}.tb-manage-actions{gap:4px}}

/* V1.40: kompakter Sichtbarkeitsschalter, ohne zusätzliche Zeile */
.tb-manage-action-row .tb-visibility-toggle{display:flex;align-items:center;margin:0 0 0 4px;padding:0;border:0;background:none}
.tb-visibility-switch{border:2px solid currentColor!important;border-radius:9px;cursor:pointer}
.tb-visibility-public{color:#4bd58a!important;background:rgba(38,160,92,.15)!important}
.tb-visibility-private{color:#f07878!important;background:rgba(175,40,40,.14)!important}
@media(max-width:470px){.tb-manage-action-row .tb-visibility-toggle{width:auto;justify-content:flex-start;margin:0 0 0 4px}}

.tb-rights-table{width:100%;border-collapse:collapse}.tb-rights-table th,.tb-rights-table td{padding:.55rem .7rem;border-bottom:1px solid #596659;text-align:left}.tb-rights-table td:last-child{white-space:nowrap}
/* V1.51 compact chat */
#mad-mini-chat{position:fixed;right:14px;bottom:14px;z-index:9000;font:14px/1.4 system-ui,sans-serif;color:#eaf3e9}#mad-mini-chat button{cursor:pointer}#mad-mini-chat .mini-toggle{background:#233d30;color:white;border:1px solid #62896b;border-radius:12px;padding:10px 16px;box-shadow:0 4px 20px #0005}#mad-mini-chat .mini-panel{width:min(355px,calc(100vw - 24px));height:min(390px,calc(100dvh - 95px));background:#17251e;border:1px solid #57715c;border-radius:12px;box-shadow:0 8px 30px #0009;display:flex;flex-direction:column;overflow:hidden}#mad-mini-chat .mini-panel[hidden]{display:none}#mad-mini-chat .mini-top{display:flex;justify-content:space-between;align-items:center;padding:9px 12px;background:#254031}#mad-mini-chat .mini-close{background:none;border:0;color:white;font-size:16px}#mad-mini-chat .mini-scroll{overflow-y:auto;flex:1;padding:9px;min-height:0}#mad-mini-chat .mini-older{display:block;margin:0 auto 10px;background:none;border:0;color:#bbdbbf;font-size:12px}#mad-mini-chat .mini-older[hidden]{display:none}#mad-mini-chat .mini-message{padding:6px 3px;border-bottom:1px solid #ffffff20;overflow-wrap:anywhere}#mad-mini-chat .mini-meta{display:flex;align-items:center;gap:7px;font-size:11px;color:#b4cdb7}#mad-mini-chat .mini-meta b{color:#f4f7f4}#mad-mini-chat .mini-meta button{margin-left:auto;border:0;background:transparent;color:white}#mad-mini-chat .mini-body{white-space:pre-wrap;margin-top:3px}#mad-mini-chat .mini-form{display:flex;padding:8px;gap:6px;background:#254031}#mad-mini-chat .mini-form input{flex:1;min-width:0;border-radius:7px;border:1px solid #6c9273;background:#fff;color:#152019;padding:9px}#mad-mini-chat .mini-form button{border:0;border-radius:7px;background:#6b9e71;padding:0 12px;color:#102015}#mad-mini-chat .mini-error{color:#ffb8b8;font-size:11px;padding:0 8px;background:#254031}#mad-mini-chat .mini-error:empty{display:none}

/* V1.52: Chat dauerhaft am sichtbaren Viewport verankern, auch beim Scrollen. */
html body #mad-mini-chat{position:fixed!important;right:14px!important;bottom:14px!important;top:auto!important;left:auto!important;z-index:2147483000!important;transform:none!important;}
@media(max-width:600px){html body #mad-mini-chat{right:10px!important;bottom:calc(10px + env(safe-area-inset-bottom, 0px))!important;}#mad-mini-chat .mini-panel{max-height:calc(100dvh - 85px);}}

/* V1.53: three-message compact viewport and one global translation toggle. */
#mad-mini-chat .mini-panel{height:auto!important;max-height:min(340px,calc(100dvh - 90px))!important}
#mad-mini-chat .mini-scroll{flex:0 1 auto;height:174px;max-height:174px;overflow-y:auto;overscroll-behavior:contain}
#mad-mini-chat .mini-message{padding:5px 3px;line-height:1.3}
#mad-mini-chat .mini-body{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
#mad-mini-chat .mini-top .mini-translate-all{margin-left:auto;margin-right:9px;background:transparent;border:1px solid #779b7e;border-radius:6px;padding:2px 6px;color:#fff}
#mad-mini-chat .mini-top .mini-translate-all.mini-original{opacity:.55}

/* V1.54: true viewport overlay, compact controls, scroll-only history */
html #mad-mini-chat{position:fixed!important;right:12px!important;bottom:12px!important;top:auto!important;left:auto!important;z-index:2147483647!important;width:auto!important;max-width:calc(100vw - 24px)!important;margin:0!important;padding:0!important;transform:none!important;}
html #mad-mini-chat .mini-toggle{display:block!important;padding:5px 9px!important;border-radius:7px!important;font-size:12px!important;line-height:1.2!important;min-height:0!important;width:auto!important;margin:0 0 0 auto!important;}
html #mad-mini-chat .mini-panel{width:min(310px,calc(100vw - 24px))!important;max-height:min(280px,calc(100dvh - 65px))!important;margin:0 0 5px auto!important;}
html #mad-mini-chat .mini-top{padding:5px 8px!important;font-size:12px!important;}
html #mad-mini-chat .mini-top .mini-translate-all{padding:1px 5px!important;min-height:0!important;min-width:0!important;font-size:13px!important;margin-right:0!important;}
html #mad-mini-chat .mini-scroll{height:150px!important;max-height:150px!important;min-height:0!important;overflow-y:auto!important;}
html #mad-mini-chat .mini-form{padding:5px!important;gap:4px!important;}
html #mad-mini-chat .mini-form input{padding:5px 7px!important;font-size:12px!important;min-height:0!important;}
html #mad-mini-chat .mini-form button{padding:2px 8px!important;font-size:13px!important;min-height:0!important;min-width:0!important;}
@media(max-width:600px){html #mad-mini-chat{right:8px!important;bottom:calc(8px + env(safe-area-inset-bottom, 0px))!important;}}

/* V1.55: Chat am linken Viewport-Rand, getrennt vom Plus-Button rechts. */
html body #mad-mini-chat{left:12px!important;right:auto!important;}
html #mad-mini-chat .mini-toggle{margin:0 auto 0 0!important;}
html #mad-mini-chat .mini-panel{margin:0 0 5px 0!important;}
@media(max-width:600px){html body #mad-mini-chat{left:8px!important;right:auto!important;}}

/* V1.57: Chat-FAB entspricht dem Plus-FAB (58 x 58 px), nur Symbol. */
html body #mad-mini-chat .mini-toggle{display:flex!important;align-items:center!important;justify-content:center!important;width:58px!important;height:58px!important;min-width:58px!important;min-height:58px!important;padding:0!important;border-radius:50%!important;font-size:27px!important;line-height:1!important;box-shadow:0 5px 20px #0008!important;margin:0!important;}
html body #mad-mini-chat{left:max(18px,env(safe-area-inset-left))!important;bottom:calc(18px + env(safe-area-inset-bottom))!important;}

/* V1.59: Plus-FAB optisch und geometrisch an Chat-FAB angleichen. */
html body a.tb-add-fab{
  position:fixed!important;
  right:max(18px,env(safe-area-inset-right))!important;
  left:auto!important;
  bottom:calc(18px + env(safe-area-inset-bottom))!important;
  width:58px!important;height:58px!important;
  min-width:58px!important;min-height:58px!important;
  padding:0!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  border-radius:50%!important;
  background:linear-gradient(120deg,#354d31,#293d2a)!important;
  border:1px solid #759565!important;color:#f8fff4!important;
  font-size:27px!important;font-weight:500!important;line-height:1!important;
  box-shadow:0 5px 20px #0008!important;
  text-decoration:none!important;z-index:2147483000!important;
}
html body a.tb-add-fab:hover{background:#45663d!important;border-color:#b5d798!important;}

/* V1.60: Vollständige Nachrichten anzeigen, ohne Begrenzung auf drei Textzeilen. */
html body #mad-mini-chat .mini-body{display:block!important;-webkit-line-clamp:unset!important;line-clamp:unset!important;overflow:visible!important;max-height:none!important;white-space:pre-wrap!important;overflow-wrap:anywhere!important;}

/* V1.61: Neue Chatnachrichten bei geschlossenem Fenster hervorheben. */
html body #mad-mini-chat .mini-toggle.mini-unread{background:#bb6625!important;border-color:#ffd08b!important;color:#fff!important;box-shadow:0 0 0 3px #f8c46a55,0 5px 20px #0008!important;}
html body #mad-mini-chat .mini-toggle.mini-unread::after{content:"";position:absolute;top:3px;right:3px;width:12px;height:12px;border-radius:50%;background:#ffe57c;border:2px solid #17251e;}
html body #mad-mini-chat .mini-toggle{position:relative!important;}

/* V1.62 compact icon navigation */
header nav a.tb-nav-icon{flex:0 0 auto;min-width:42px;min-height:42px;padding:8px 10px;text-align:center;font-size:1.15rem;font-weight:750;line-height:1}header nav a.tb-lang-code{font-size:.9rem;letter-spacing:.04em} .tb-self-settings{padding:10px 16px;margin:12px 0} @media(max-width:540px){header nav a.tb-nav-icon{flex:0 0 auto;padding:9px 10px}}

/* V1.64: Benutzername rechts neben dem Seitennamen statt in der Navigation. */
header .tb-header-user{margin-left:auto;align-self:center;text-align:right;font-weight:650;color:#e3f2d8;overflow-wrap:anywhere;min-width:0}
@media(max-width:540px){header{display:flex;flex-wrap:wrap;align-items:center;gap:8px}header .brand{flex:0 1 auto}header .tb-header-user{flex:0 1 auto;margin-left:auto}header nav{flex:1 0 100%;margin-top:4px}}

/* V1.67: role-separated member list */
.admin-member-group{border:1px solid #637a62;border-radius:12px;padding:14px;margin:16px 0;background:#202b32;}
.admin-member-group h3{margin:0 0 12px;padding-bottom:9px;border-bottom:1px solid #637a62;}
.admin-member-group h3 small{font-size:.8em;font-weight:400;opacity:.8;}
/* V1.77: Admin performance diagnostics */
.tb-perf-entry{margin:12px 0;padding:12px 16px}.tb-perf-actions{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin:18px 0}.tb-perf-actions label{display:flex;gap:8px;align-items:center}.tb-perf-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px;margin:16px 0}.tb-perf-metrics>div{background:#1d3039;border:1px solid #526873;border-radius:9px;padding:14px}.tb-perf-metrics strong{display:block;font-size:1.3rem}.tb-perf-metrics small{display:block;opacity:.8}.tb-perf canvas{display:block;width:100%;height:auto;max-width:850px;border:1px solid #526873;border-radius:8px}.tb-perf #perf-navigation{overflow-wrap:anywhere;margin:10px 0 16px}

/* V1.78: Archiv permanently distinct; current page outlined in gold. */
header nav a.tb-nav-archive{background:#286a2c;border-color:#65a765;color:#fff;gap:7px;font-weight:700;white-space:nowrap}header nav a.tb-nav-archive:hover{background:#328339}header nav a.tb-nav-active{border-color:#f0c65b!important;box-shadow:0 0 0 1px #f0c65b,0 0 8px rgba(240,198,91,.4)}
@media(max-width:540px){header nav{flex-wrap:nowrap;gap:5px;justify-content:flex-start}header nav a{margin:0;padding:8px 7px;flex:0 0 auto;min-width:0}header nav a.tb-nav-icon{padding:8px 7px;min-width:36px}header nav a.tb-nav-archive{padding:8px 7px;font-size:.84rem;gap:4px}header nav a.tb-nav-archive span{font-size:.82rem}}
/* V1.81: expandable health panel at the top of administration */
.tb-system-status{margin:0 0 1rem;padding:.75rem 1rem;background:#183729;border:1px solid #50775a;border-radius:12px;color:inherit}
.tb-system-status>summary{cursor:pointer;display:flex;align-items:center;gap:.65rem;flex-wrap:wrap;min-height:2rem}
.tb-system-status>summary #tb-system-overall{margin-left:auto;font-size:.9em}
.tb-system-body{padding:.8rem .2rem .2rem}
.tb-system-row{display:grid;grid-template-columns:18px minmax(130px,1fr) minmax(150px,1fr);align-items:center;gap:.7rem;padding:.65rem .4rem;border-bottom:1px solid #45614e}
.tb-system-row>span:last-child{text-align:right;font-size:.9em}
.tb-status-light{display:inline-block;width:13px;height:13px;border-radius:50%;background:#9da8ad;box-shadow:0 0 0 2px #ffffff20;flex-shrink:0}
.tb-state-ok{background:#43cf69}.tb-state-warn{background:#f0be40}.tb-state-error{background:#e35d5d}.tb-state-unknown{background:#a2aab0}
.tb-system-performance{margin-top:1rem;padding-top:.7rem;border-top:2px solid #9c8550}
.tb-system-performance canvas{max-width:100%;height:auto;display:block}
@media(max-width:540px){.tb-system-row{grid-template-columns:18px 1fr}.tb-system-row>span:last-child{grid-column:2;text-align:left}}

/* V1.82 – Systemstatus: visually integrated administration card */
.tb-system-status{display:block;box-sizing:border-box;margin:14px 0 18px;padding:0!important;background:linear-gradient(135deg,#223a29,#1a2a20)!important;border:1px solid #4d7353!important;border-radius:14px!important;overflow:hidden;box-shadow:0 4px 16px #0003;color:#f2f5ed}
.tb-system-status>summary{list-style:none;display:flex!important;flex-wrap:nowrap!important;align-items:center;gap:12px;padding:15px 18px;min-height:26px;cursor:pointer;user-select:none;background:linear-gradient(90deg,#2a4730,#213729);transition:background .2s}
.tb-system-status>summary::-webkit-details-marker{display:none}
.tb-system-status>summary::marker{content:''}
.tb-system-status>summary:hover{background:linear-gradient(90deg,#33563a,#26422d)}
.tb-system-status>summary .tb-status-light{width:15px;height:15px;box-shadow:0 0 0 3px #ffffff18,0 0 10px currentColor}
.tb-system-status>summary .tb-system-title{font-weight:750;font-size:1.03rem;white-space:nowrap}
.tb-system-status>summary #tb-system-overall{margin-left:auto;font-size:.88rem;color:#d3e3d2;text-align:right;line-height:1.3}
.tb-system-chevron{width:10px;height:10px;flex-shrink:0;border-right:2px solid #b7d6ac;border-bottom:2px solid #b7d6ac;transform:rotate(45deg);transition:transform .2s;margin:0 3px 5px 8px}
.tb-system-status[open] .tb-system-chevron{transform:rotate(225deg);margin:6px 3px 0 8px}
.tb-system-body{padding:17px 18px 20px!important;border-top:1px solid #45634a}
.tb-system-body>.muted{margin:0 0 14px;color:#c3d3c3;font-size:.9rem;line-height:1.5}
.tb-system-row{display:grid;grid-template-columns:16px minmax(120px,1fr) minmax(120px,1fr);gap:12px;align-items:center;padding:12px 13px;margin:0 0 6px;background:#ffffff08;border:1px solid #ffffff13;border-radius:8px}
.tb-system-row>strong{font-size:.93rem}.tb-system-row>span:last-child{color:#d4e1d2;font-size:.87rem;text-align:right;overflow-wrap:anywhere}
.tb-system-status #tb-system-refresh{background:#2d5935;color:#fff;border:1px solid #6c9a67;border-radius:8px;padding:9px 14px;cursor:pointer}
.tb-system-status #tb-system-refresh:hover{background:#397442}
.tb-system-status #tb-system-checked{margin-left:12px;color:#b8cbb7}
.tb-system-performance{margin-top:20px;padding:18px 0 0;border-top:1px solid #63845c}
.tb-system-performance h3{margin:0 0 8px;color:#f1d48b}
.tb-system-performance .tb-perf-metrics>div{background:#20352a;border-color:#54755a}
.tb-system-performance #perf-chart{border:1px solid #55745a;border-radius:9px;background:#13231b}
.tb-system-performance .tb-perf-actions{gap:9px}
@media(max-width:600px){.tb-system-status>summary{padding:12px;gap:9px}.tb-system-status>summary #tb-system-overall{font-size:.78rem}.tb-system-body{padding:12px!important}.tb-system-row{grid-template-columns:14px minmax(0,1fr);gap:5px 10px}.tb-system-row>span:last-child{grid-column:2;text-align:left}.tb-system-status #tb-system-checked{display:inline-block;margin:8px 0 0}}

/* V1.83 – Performance-Test innerhalb des Systemstatus separat einklappbar */
.tb-system-performance{margin-top:18px;padding:0!important;border:1px solid #547b57!important;border-radius:11px;background:#1b3022;overflow:hidden}
.tb-system-performance>summary{list-style:none;display:flex;align-items:center;gap:10px;cursor:pointer;padding:13px 15px;background:linear-gradient(90deg,#2b4932,#213a29);color:#f1f5ed;user-select:none}
.tb-system-performance>summary::-webkit-details-marker{display:none}
.tb-system-performance>summary::marker{content:''}
.tb-system-performance>summary:hover{background:#35563a}
.tb-system-performance>summary strong{font-size:1rem;color:#f1d48b}
.tb-perf-summary-hint{margin-left:auto;font-size:.82rem;color:#c4d6c4}
.tb-perf-chevron{width:9px;height:9px;border-right:2px solid #e4cb85;border-bottom:2px solid #e4cb85;transform:rotate(45deg);transition:transform .15s;margin:0 4px 5px 6px}
.tb-system-performance[open] .tb-perf-chevron{transform:rotate(225deg);margin-bottom:0;margin-top:5px}
.tb-system-performance-body{padding:14px 16px 16px}
@media(max-width:600px){.tb-system-performance>summary{padding:12px 10px}.tb-perf-summary-hint{font-size:.75rem}.tb-system-performance-body{padding:12px 10px}}

/* V1.85: Personal menu settings collapsible status-card design */
.tb-personal-menu{display:block;box-sizing:border-box;margin:14px 0 18px;padding:0!important;background:linear-gradient(135deg,#223a29,#1a2a20)!important;border:1px solid #4d7353!important;border-radius:14px!important;overflow:hidden;box-shadow:0 4px 16px #0003;color:#f2f5ed}
.tb-personal-menu>summary{list-style:none;display:flex;align-items:center;gap:12px;padding:15px 18px;min-height:26px;cursor:pointer;background:linear-gradient(90deg,#2a4730,#213729)}
.tb-personal-menu>summary::-webkit-details-marker{display:none}.tb-personal-menu>summary::marker{content:''}
.tb-personal-menu>summary:hover{background:linear-gradient(90deg,#33563a,#26422d)}
.tb-personal-menu>summary strong{font-weight:750;font-size:1.03rem}
.tb-personal-chevron{width:10px;height:10px;flex-shrink:0;margin:0 3px 5px auto;border-right:2px solid #b7d6ac;border-bottom:2px solid #b7d6ac;transform:rotate(45deg)}
.tb-personal-menu[open] .tb-personal-chevron{transform:rotate(225deg);margin-top:6px;margin-bottom:0}
.tb-personal-body{padding:17px 18px 20px;border-top:1px solid #45634a}.tb-personal-body form{margin:0}
@media(max-width:600px){.tb-personal-menu>summary{padding:12px}.tb-personal-body{padding:12px}}

/* V1.86 – administration actions match the Systemstatus and personal-menu cards */
a.tb-admin-action{box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:56px;margin:12px 0;padding:15px 18px;border:1px solid #4d7353;border-radius:14px;background:linear-gradient(90deg,#2a4730,#213729);color:#f2f5ed;text-decoration:none;box-shadow:0 4px 16px #0003}
a.tb-admin-action:hover,a.tb-admin-action:focus-visible{background:linear-gradient(90deg,#33563a,#26422d);border-color:#bca05a;color:#fff}
a.tb-admin-action strong{font-weight:750;font-size:1.03rem}
.tb-action-arrow{font-size:1.6rem;line-height:1;color:#b7d6ac}
.tb-add-member{margin:14px 0 18px!important}
.tb-add-member>summary{font-weight:normal}
@media(max-width:600px){a.tb-admin-action{padding:12px;min-height:50px}}

/* V1.87 inline expandable help and password panels */
.tb-admin-expand{margin:12px 0!important}
.tb-admin-expand-body{border-top:1px solid #45634a;padding:8px 12px 12px}
.tb-admin-expand-body iframe{display:block;width:100%;height:260px;border:0;background:transparent;overflow:hidden}
@media(max-width:600px){.tb-admin-expand-body{padding:5px}}

/* V1.88: Embedded administration panels use the entire available width. */
.tb-admin-expand-body{display:block;width:100%;min-width:0;overflow:hidden}
.tb-admin-expand-body iframe{display:block!important;width:100%!important;min-width:100%!important;max-width:100%!important;box-sizing:border-box;height:260px;overflow:auto}

/* V1.89: inline panels accessible to all roles */
.tb-admin-expand-body{width:100%;box-sizing:border-box;min-width:0;overflow:visible}
.tb-admin-expand-body>section{width:100%;max-width:none;box-sizing:border-box}
.tb-admin-expand-body .tb-rights-table{width:100%}

/* V2.01: current role highlighted inside the existing comparison */
.tb-role-matrix .tb-current-role{border-left:2px solid #80c77b!important;border-right:2px solid #80c77b!important;background:rgba(94,169,88,.12)}
.tb-role-matrix thead .tb-current-role{border-top:2px solid #80c77b!important}
.tb-role-matrix tbody tr:last-child .tb-current-role{border-bottom:2px solid #80c77b!important}
.tb-role-matrix .tb-role-cell{text-align:center}
.tb-role-matrix .tb-current-rights{margin-top:1rem;padding:1rem;border:1px solid #59745a;border-radius:10px}
.tb-role-matrix .tb-current-rights h3{margin-top:0}
.tb-role-matrix .tb-grant-group{margin:.8rem 0}
.tb-role-matrix .tb-grant-list{display:flex;flex-wrap:wrap;gap:.4rem;padding:0;margin:.45rem 0;list-style:none}
.tb-role-matrix .tb-grant-list li{border:1px solid #67836a;border-radius:7px;padding:.25rem .55rem;overflow-wrap:anywhere}

/* V2.02: expandable multilingual step-by-step help */
.tb-help-guides .tb-help-guide{margin:10px 0!important}
.tb-help-guides .tb-help-guide .tb-system-body p{line-height:1.6}
.tb-help-guides .tb-help-guide ol{margin:.6rem 0 1rem;padding-left:1.5rem;line-height:1.65}
.tb-help-guides .tb-help-guide li{margin:.5rem 0;overflow-wrap:anywhere}
.tb-help-guides .tb-help-guide .tb-system-title{white-space:normal}
