*{box-sizing:border-box} :root{font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#152f3b;background:#f3f6f7;font-size:16px;line-height:1.45;--teal:#086f74;--dark:#16333f;--border:#dce4e7;--muted:#607580}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea{ -webkit-tap-highlight-color:transparent}a{color:inherit}button{cursor:pointer}button:disabled{cursor:default;opacity:.5}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #60bfc4;outline-offset:3px}input,select,textarea{width:100%;border:1px solid #c8d5da;border-radius:7px;background:white;color:var(--dark);padding:.6rem .7rem;min-height:42px}input[type=checkbox]{width:19px;min-height:19px;height:19px;accent-color:var(--teal);margin:0}input[type=color]{padding:4px;width:50px}select{appearance:none;padding-right:2rem;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23536d78' stroke-width='1.5'/%3E%3C/svg%3E");background-position:right .8rem center;background-repeat:no-repeat}textarea{resize:vertical;min-height:100px}label{font-weight:600;font-size:.875rem;display:block;margin-bottom:.35rem}h1,h2,h3,p{margin-top:0}h1{font-size:2rem;line-height:1.15;letter-spacing:-.05em;margin-bottom:.55rem}h2{font-size:1.3rem;letter-spacing:-.025em}h3{font-size:1.05rem;margin-bottom:.6rem}.button{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;gap:.45rem;border:1px solid transparent;border-radius:7px;padding:.65rem .95rem;font-weight:650;font-size:.875rem;min-height:42px;white-space:nowrap;line-height:1.35}.primary{background:var(--teal);color:white}.primary:hover{background:#05595d}.secondary{background:white;border-color:#cbd8dd;color:var(--dark)}.secondary:hover{background:#edf5f5}.subtle{background:transparent;color:#365460}.subtle:hover{background:#e5edef}.danger{background:#fff0ee;border-color:#f0cbc6;color:#a03127}.small{padding:.4rem .7rem;min-height:34px}.brand{display:flex;align-items:center;gap:.7rem;text-decoration:none;font-size:1.1rem;font-weight:650;letter-spacing:-.025em}.brand-mark{background:var(--teal);color:white;padding:.1rem .5rem .3rem;border-radius:9px;font-size:1.6rem;letter-spacing:-.09em;font-weight:750;line-height:1.25}.topbar{height:76px;background:white;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;padding:0 2rem;gap:1rem}.topbar-right{display:flex;align-items:center;gap:1rem}.role-badge{font-size:.875rem;background:#e8f3f2;color:#176666;border-radius:5px;padding:.3rem .6rem}.workspace{padding:2rem;max-width:2200px;margin:auto}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:1.5rem;margin-bottom:1.8rem}.eyebrow{font-size:.75rem;letter-spacing:.13em;font-weight:750;color:var(--teal);margin-bottom:.55rem}.subtitle{font-size:.9rem;color:var(--muted);margin:0}.heading-actions,.tool-group{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap}.toolbar{background:white;border:1px solid var(--border);border-radius:11px 11px 0 0;padding:1rem 1.15rem;display:flex;align-items:end;gap:1rem}.field{min-width:170px}.month-field{width:190px}.search-field{width:280px}.print-button{margin-left:auto}.editor-toolbar{display:flex;justify-content:space-between;border:1px solid var(--border);border-top:0;padding:.45rem .65rem;background:#fbfcfc;gap:.7rem}.editor-toolbar[hidden]{display:none}.plan-info{border:1px solid var(--border);border-top:0;background:#f7fbfb;font-size:.875rem;color:#4f6973;padding:.6rem 1rem;display:flex;gap:.8rem;align-items:center;flex-wrap:wrap}.plan-info:empty{display:none}.plan-info strong{color:#345965}.plan-container{overflow:auto;max-height:calc(100vh - 350px);min-height:260px;background:white;border:1px solid var(--border);border-top:0;border-radius:0 0 9px 9px;scrollbar-color:#b3c9ce #f3f7f8}.schedule{border-collapse:separate;border-spacing:0;font-size:.875rem;width:max-content;min-width:100%;table-layout:fixed}.schedule th,.schedule td{border-right:1px solid #e2e8eb;border-bottom:1px solid #e2e8eb;padding:0;text-align:center;min-width:44px}.schedule thead th{background:#f4f8fa;position:sticky;top:0;z-index:3;height:57px;font-weight:650;box-shadow:0 1px 0 #cfdbe0}.schedule thead .name-column{z-index:5;text-align:left;padding:.8rem 1rem;vertical-align:middle}.name-column{position:sticky;left:0;background:white;min-width:210px!important;width:210px;max-width:210px;z-index:2;box-shadow:1px 0 0 #d9e3e7}.schedule .employee-name{text-align:left;padding:.6rem .85rem;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.employee-edit{border:0;background:transparent;padding:0;font:inherit;text-align:left;color:inherit;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.employee-edit:hover{text-decoration:underline;text-underline-offset:3px}.weekly-hours{font-size:.75rem;color:#6b8088;font-weight:400;display:block;margin-top:.15rem}.day-number{display:block;font-size:.95rem;line-height:1.2}.day-weekday{display:block;color:#6b7e88;font-size:.75rem;font-weight:400}.overflow-date{font-size:.7rem;display:block;color:#9b6435}.schedule .weekend{background:#eef1f5}.schedule thead .overflow{background:#fff5e8}.schedule .group-row th{position:static;background:#e6eff1;color:#365962;text-align:left;height:34px;padding:.4rem .9rem;font-weight:700;font-size:.8rem;letter-spacing:.025em}.schedule .group-row .name-column{position:sticky;left:0;z-index:2;box-shadow:1px 0 0 #d9e3e7;background:#e6eff1}.schedule .group-row .group-band{padding:0}.schedule tbody .day-cell{height:54px}.cell-button,.cell-display{display:flex;flex-direction:column;justify-content:center;align-items:center;border:0;border-radius:0;color:inherit;background:transparent;width:100%;min-width:44px;min-height:53px;padding:.25rem .25rem;line-height:1.3;position:relative;font-size:.875rem;box-shadow:none}.cell-button:hover{box-shadow:inset 0 0 0 2px var(--teal);z-index:1}.cell-button:focus-visible{outline-offset:-3px}.cell-code{font-weight:inherit;white-space:nowrap}.cell-hours,.cell-oncall{font-size:.75rem;opacity:.82;margin-top:.2rem;min-height:1em}.cell-oncall{font-weight:600}.wish{text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1.5px}.manual-hours::after{content:"•";font-size:.65rem;color:#93642c;margin-left:2px}.unknown{color:#a73529;font-weight:700}.summary-head{font-size:.75rem!important;min-width:65px!important;width:65px}.summary-cell{font-size:.8rem;padding:.35rem!important;background:#fbfcfc;min-width:65px!important}.summary-cell small{display:block;color:#738791;font-size:.7rem}.negative{color:#b03b32}.positive{color:#166f64}.vacation-head,.vacation-cell{min-width:42px!important}.plan-footer{display:flex;justify-content:space-between;align-items:center;gap:1rem;color:#6a7c86;font-size:.8rem;padding:.85rem .15rem}.wish-example{text-decoration:underline;text-underline-offset:3px;color:#3d5d69}.footer-dot{margin:0 .6rem}.notice{padding:.8rem 1rem;border-radius:7px;border:1px solid #aad9cd;background:#e8f6f0;color:#205d4b;font-size:.9rem;margin-bottom:1rem;white-space:pre-line}.notice.error{border-color:#edbfb5;background:#fff0ec;color:#912f24}.notice[hidden]{display:none}.empty-state{text-align:center;padding:3rem 1.5rem;color:var(--muted);max-width:650px;margin:auto}.empty-state h2{color:#2b4d59;margin-bottom:.4rem}.empty-symbol{display:block;color:#6b9b9d;font-size:2.5rem;margin-bottom:.8rem}.dirty-label{color:#995e1c;background:#fff3dd;border-radius:4px;padding:.2rem .45rem;font-size:.8rem}.published-label{color:#176757;background:#e4f2e9;border-radius:4px;padding:.2rem .45rem;font-size:.8rem}.draft-label{color:#657986;background:#eaf0f3;border-radius:4px;padding:.2rem .45rem;font-size:.8rem}.notes-panel{margin-top:1rem;font-size:.875rem;color:#5a737e;max-width:1100px}.notes-panel summary{cursor:pointer;font-weight:600}.notes-panel li{margin:.5rem 0}.screen-reader{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}dialog{border:1px solid #cfdddf;border-radius:14px;padding:0;max-width:560px;width:calc(100% - 2rem);max-height:90vh;color:var(--dark);box-shadow:0 25px 100px #092f3d38}dialog::backdrop{background:#102e3bb0;backdrop-filter:blur(3px)}dialog.wide{max-width:1100px}.modal-head{display:flex;align-items:center;justify-content:space-between;padding:1.1rem 1.3rem;border-bottom:1px solid var(--border);position:sticky;top:0;background:white;z-index:3;gap:1rem}.modal-head h2{margin:0}.icon-button{border:0;background:#edf3f4;border-radius:50%;font-size:1.4rem;line-height:1;width:32px;height:32px;color:#536e77;flex-shrink:0}.modal-body{padding:1.3rem}.modal-actions{display:flex;gap:.6rem;justify-content:flex-end;padding:1rem 1.3rem;border-top:1px solid var(--border);background:#fafcfc;position:sticky;bottom:0;z-index:2}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-row{margin-bottom:1rem}.form-row:last-child{margin-bottom:0}.check-label{display:flex;gap:.65rem;align-items:center;font-size:.9rem;font-weight:500;line-height:1.5;margin:.8rem 0}.help-text{color:#6b8089;font-size:.8rem;margin:.5rem 0 0}.form-error{border-radius:7px;background:#fff0ec;color:#922d24;padding:.75rem;font-size:.875rem}.dialog-error:empty{display:none}.dialog-error{margin:0 1.3rem 1rem}.table-scroller{overflow:auto;margin-top:1rem}.catalog-table,.roster-table{border-collapse:collapse;font-size:.875rem;width:100%}.catalog-table th,.roster-table th{text-align:left;padding:.55rem .4rem;color:#657c86;font-size:.8rem;white-space:nowrap}.catalog-table td,.roster-table td{padding:.35rem .4rem;border-top:1px solid #e5ecee;vertical-align:middle}.catalog-table input,.catalog-table select,.roster-table input,.roster-table select{font-size:.875rem;padding:.4rem;min-height:37px}.catalog-table .code-input{min-width:90px;max-width:110px}.catalog-table .number-input{min-width:70px;width:75px}.catalog-table .rule-select{min-width:145px}.roster-table .name-input{min-width:180px}.roster-table .number-input{min-width:70px;width:90px}.roster-table .group-select{min-width:130px}.compact-check{display:flex;align-items:center;justify-content:center;gap:.3rem;font-size:.8rem}.catalog-sample{min-width:65px;padding:.5rem;border-radius:5px;text-align:center;font-weight:600}.section-divider{border-top:1px solid var(--border);margin-top:1.5rem;padding-top:1rem}.inline-fields{display:flex;align-items:end;gap:.6rem;flex-wrap:wrap}.inline-fields .field{flex:1}.history-item{padding:1rem 0;border-bottom:1px solid var(--border);display:flex;gap:1rem;align-items:center;justify-content:space-between}.history-item p{margin:0}.history-item small{color:#6d818a}.history-list{padding-top:0}.loading{opacity:.6;pointer-events:none}.entry-page{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:2rem;background:radial-gradient(ellipse at 10% 5%,#d1e9e9 0,transparent 55%),#f1f5f6}.entry-card{background:white;border:1px solid #dce6e8;border-radius:20px;box-shadow:0 25px 85px #173a4b0d;padding:2.5rem}.entry-card .brand{margin-bottom:2.5rem}.entry-card h1{font-size:2.65rem;line-height:1.12}.home-card{max-width:720px;width:100%}.login-card{max-width:450px;width:100%}.login-card h1{font-size:2.2rem}.entry-intro{color:#667e88;font-size:1rem;line-height:1.6;margin-bottom:1.8rem}.role-links{display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin-top:2rem}.role-link{display:flex;flex-direction:column;gap:.3rem;border:1px solid #d6e3e6;padding:1.3rem;border-radius:10px;text-decoration:none;background:#f9fbfc;transition:background .15s,border-color .15s}.role-link:hover{background:#edf7f6;border-color:#80babb}.role-link strong{font-size:1.1rem}.role-link>span:last-child{color:#6d818c;font-size:.875rem;line-height:1.5}.role-icon{font-size:1.7rem;color:var(--teal);margin-bottom:.5rem}.entry-foot{margin:1.7rem 0 0;font-size:.8rem;color:#7a8e96}.login-form{display:grid;gap:.6rem;margin-bottom:1.5rem}.login-form .button{margin-top:.7rem}.text-link{color:var(--teal);font-size:.875rem;text-underline-offset:3px}.toggle-panel{background:#f3f8f8;padding:.9rem;border-radius:7px}.shift-legend{display:flex;gap:.4rem;flex-wrap:wrap}.legend-chip{padding:.25rem .5rem;font-size:.75rem;border-radius:4px}.active-count{font-weight:600;color:#294c59}
@media(min-height:850px){.plan-container{max-height:calc(100vh - 340px)}}
@media(max-width:900px){.workspace{padding:1.3rem 1rem}.topbar{padding:0 1rem}.page-heading{align-items:flex-start;flex-direction:column;gap:1rem;margin-bottom:1.3rem}.heading-actions{width:100%}.toolbar{flex-wrap:wrap;gap:.8rem;padding:.85rem}.field{min-width:145px;flex:1}.search-field{width:auto}.print-button{margin:0}.editor-toolbar{flex-wrap:wrap}.plan-container{max-height:65vh}.name-column{min-width:165px!important;width:165px;max-width:165px}.plan-footer{align-items:flex-start;flex-direction:column;gap:.4rem}h1{font-size:1.8rem}.schedule th,.schedule td{min-width:41px}.cell-button,.cell-display{min-width:41px}.form-grid{grid-template-columns:1fr 1fr}.entry-card{padding:2rem}}
@media(max-width:520px){.topbar{height:65px}.topbar .brand{font-size:1rem}.brand-mark{font-size:1.4rem}.topbar-right{gap:.4rem}.role-badge{font-size:.75rem}.workspace{padding:1.2rem .6rem}.heading-actions{gap:.4rem}.heading-actions .button{padding:.6rem .7rem;font-size:.8rem}.toolbar{gap:.6rem}.toolbar .month-field{flex-basis:45%}.toolbar .search-field{flex-basis:45%}.toolbar .field label{font-size:.75rem}.toolbar input,.toolbar select{font-size:.875rem}.toolbar .print-button{font-size:.8rem;flex:1}.name-column{min-width:137px!important;width:137px;max-width:137px}.schedule .employee-name{padding:.5rem .55rem;font-size:.8rem}.editor-toolbar .button{font-size:.75rem;padding:.5rem;min-height:34px}.plan-info{font-size:.8rem;padding:.6rem}.plan-footer{font-size:.75rem}.entry-page{padding:1rem}.entry-card{padding:1.7rem}.entry-card h1{font-size:2.1rem}.role-links{grid-template-columns:1fr}.role-link{padding:1rem}.role-icon{margin:0}.form-grid{grid-template-columns:1fr}.modal-body{padding:1rem}.modal-head{padding:1rem}.modal-actions{padding:.8rem 1rem}.modal-actions .button{font-size:.8rem;padding:.55rem .7rem}.footer-dot{margin:0 .25rem}}
@page{size:A3 landscape;margin:9mm}
@media print{body{background:white;color:black;font-size:9pt}.topbar,.toolbar,.editor-toolbar,.heading-actions,.notes-panel,.plan-footer,#notice,dialog{display:none!important}.workspace{padding:0;max-width:none}.page-heading{display:block;margin:0 0 10pt}.page-heading .eyebrow{font-size:8pt;margin-bottom:3pt}h1{font-size:20pt;margin-bottom:3pt}.subtitle{font-size:9pt}.plan-info{border:0;padding:0 0 8pt;font-size:8pt;background:white}.plan-container{overflow:visible;max-height:none;min-height:0;border:0}.schedule{width:100%;min-width:0;font-size:7pt;table-layout:fixed;border-top:1px solid #c6d1d6;border-left:1px solid #c6d1d6;print-color-adjust:exact;-webkit-print-color-adjust:exact}.schedule th,.schedule td{min-width:0;break-inside:avoid}.schedule thead{display:table-header-group}.schedule thead th{position:static;height:25pt;box-shadow:none}.name-column,.schedule .group-row .name-column{position:static;min-width:100pt!important;width:100pt!important;max-width:100pt!important;box-shadow:none}.schedule .employee-name{padding:2pt 4pt;font-size:7pt}.weekly-hours{font-size:6pt;margin-top:0}.schedule tbody .day-cell{height:25pt}.cell-button,.cell-display{min-width:0;min-height:25pt;padding:1pt;font-size:7pt}.cell-hours,.cell-oncall{font-size:6pt;margin-top:1pt}.day-number{font-size:8pt}.day-weekday{font-size:6pt}.overflow-date{font-size:5.5pt}.summary-head,.summary-cell{min-width:0!important;width:35pt!important;font-size:6pt!important}.vacation-head,.vacation-cell{min-width:0!important;width:22pt!important}.schedule .group-row th{height:16pt;padding:2pt 4pt;font-size:7pt}.group-row{break-after:avoid}.schedule tbody tr{break-inside:avoid}.employee-edit{text-decoration:none}.summary-cell small{font-size:6pt}.wish{text-decoration-thickness:1pt}.modal-head{position:static}}

/* Saved month exports and the operating guide. */
.toolbar{flex-wrap:wrap}.export-actions{display:flex;align-items:center;gap:.45rem;flex-wrap:wrap;margin-left:auto}.export-actions .button{font-size:.8rem;padding:.65rem .8rem}.catalog-table .label-input{min-width:175px;max-width:240px}.catalog-table input[readonly]{background:#edf3f4;color:#536d78;cursor:default}.help-section+.help-section{margin-top:1.6rem;padding-top:1.3rem;border-top:1px solid var(--border)}.help-section h3{margin-bottom:.6rem}.help-section ol{padding-left:1.3rem;margin:0;color:#526b77;font-size:.9rem}.help-section li{padding-left:.2rem;margin:.5rem 0}@media(max-width:900px){.export-actions{margin-left:0;flex-basis:100%}.export-actions .button{flex:1}}@media(max-width:520px){.export-actions{gap:.4rem}.export-actions .button{padding:.6rem .45rem;font-size:.75rem;min-height:40px}.help-section ol{font-size:.875rem}}
/* Month-scoped catalogs and explicit Niedersachsen calendar recommendations. */
.month-scope{font-weight:650;font-size:.9rem;color:#2d6268;background:#edf7f6;border:1px solid #d5e9e7;border-radius:7px;padding:.7rem .85rem;margin-bottom:1rem}.month-predecessor{padding:.75rem .85rem;background:#edf7f6;border:1px solid #cfe7e4;color:#2d5b62;border-radius:7px;margin-bottom:.65rem;font-size:.875rem;line-height:1.55}.predecessor-error{background:#fff1ed;color:#942f24;border-color:#efc5bb}.workday-calendar{background:#f4f9fa;border:1px solid #d7e6e9;border-radius:9px;padding:1rem;margin:1rem 0 1.2rem}.calendar-heading{display:flex;align-items:center;justify-content:space-between;gap:.8rem;flex-wrap:wrap}.calendar-heading h3{margin:0;color:#204e5a;font-size:1.05rem}.calendar-region{margin:0 0 .25rem;color:#487b82;letter-spacing:.025em;font-size:.8rem;font-weight:650}.calendar-rule{margin:.8rem 0 0;color:#3c626f;font-size:.875rem;line-height:1.55}.calendar-details{margin-top:.9rem;padding-top:.85rem;border-top:1px solid #d9e7e9;font-size:.875rem;color:#506f7c}.calendar-details summary{cursor:pointer;font-weight:600;color:#2f6570}.calendar-holidays{list-style:none;padding:0;margin:.75rem 0}.calendar-holidays li{display:flex;flex-direction:column;gap:.15rem;padding:.45rem 0;line-height:1.5}.calendar-holidays li+li{border-top:1px solid #e0eaed}.calendar-holidays small{color:#758a93;font-size:.8rem}.calendar-verification{font-size:.8rem;line-height:1.6;color:#677f8a;margin:.85rem 0 0}.calendar-sources{padding-left:1.2rem;margin:.75rem 0 0}.calendar-sources li{margin:.4rem 0;overflow-wrap:anywhere;line-height:1.5}.calendar-sources a{color:#086a74;text-underline-offset:3px}.calendar-error{font-size:.875rem;color:#9b392c;line-height:1.6;margin:0 0 .6rem}.workday-calendar>.help-text:first-child{margin-top:0}@media(max-width:520px){.workday-calendar{padding:.85rem}.calendar-heading{align-items:flex-start}.calendar-heading .button{width:100%;margin-top:.25rem}.calendar-heading h3{font-size:1rem}.calendar-holidays li{font-size:.875rem}}
/* Explicit JSON-backup preview and draft restoration. */
.backup-intro{font-size:.9rem;line-height:1.6;color:#5a7380;margin-bottom:1.2rem}.backup-restore-form input[type=file]{padding:.65rem;background:#f8fbfc;font-size:.875rem;line-height:1.5}.backup-restore-form input[type=file]::file-selector-button{border:1px solid #c9dade;border-radius:5px;background:white;color:#315d69;padding:.4rem .65rem;font:inherit;font-weight:600;margin-right:.6rem;cursor:pointer}.backup-file-status{font-size:.8rem;color:#68818b;overflow-wrap:anywhere;line-height:1.5;margin:.65rem 0}.backup-check-actions{display:flex;align-items:center;margin-top:.85rem}.backup-preview{margin-top:1.3rem;padding-top:1.2rem;border-top:1px solid var(--border)}.backup-preview h3{font-size:1.1rem;line-height:1.4;margin-bottom:.75rem}.backup-target{background:#e8f4f1;border:1px solid #c9e6de;color:#2c6259;padding:.8rem;border-radius:7px;font-size:.875rem;line-height:1.6}.backup-target-existing{background:#fff5e3;border-color:#ecd8ae;color:#805c27}.backup-facts{display:grid;grid-template-columns:145px 1fr;gap:.55rem .85rem;font-size:.875rem;line-height:1.55;margin:1rem 0 1.15rem}.backup-facts dt{color:#5f7985;font-weight:600}.backup-facts dd{margin:0;color:#2c4f5c;overflow-wrap:anywhere}.backup-publication{font-size:.875rem;line-height:1.6;color:#365f6b}.backup-restore-form[aria-busy=true]{opacity:.7}.backup-restore-form .modal-actions>.primary{white-space:normal;text-align:center}@media(max-width:520px){.backup-facts{grid-template-columns:1fr;gap:.15rem}.backup-facts dd{margin-bottom:.55rem}.backup-restore-form .modal-actions{flex-wrap:wrap}.backup-restore-form .modal-actions>.primary{flex:1;min-width:190px}}
/* Date markers: service colors remain on their own cell contents. */
:root{--marker-weekend-bg:#dbeafe;--marker-weekend:#1e3a8a;--marker-school:#7c3aed;--marker-school-bg:#ede9fe;--marker-public:#b42318;--marker-public-bg:#fee4e2}.schedule thead .date-head{height:80px;padding:.3rem .1rem .25rem;border-top:3px solid transparent;border-bottom:3px solid #d5e0e6;vertical-align:middle}.schedule thead .date-head .day-weekday{font-size:.8rem;color:#48616e;font-weight:650;line-height:1.35}.schedule thead .date-head .day-number{font-size:1rem;font-weight:700;line-height:1.3}.schedule thead .date-head.weekend{background:var(--marker-weekend-bg);color:var(--marker-weekend);border-bottom-color:var(--marker-weekend)}.schedule thead .date-head.weekend .day-weekday,.schedule thead .date-head.weekend .day-number{color:var(--marker-weekend);font-weight:800}.schedule thead .date-head.school-holiday{border-top-color:var(--marker-school)}.schedule thead .date-head.public-holiday:not(.school-holiday){border-top-color:var(--marker-public)}.schedule thead .date-head.public-holiday:not(.weekend) .day-number{color:var(--marker-public)}.schedule thead .date-head.overflow{border-right-color:#c49b4a}.schedule thead .date-head.weekend.overflow{background:var(--marker-weekend-bg)}.schedule thead .date-head .overflow-date{font-size:.7rem;font-weight:650;color:#986a27;line-height:1.35;margin-top:.1rem}.date-tags{display:flex;align-items:center;justify-content:center;gap:2px;min-height:17px;margin-top:3px;white-space:nowrap}.date-tag{display:inline-flex;align-items:center;justify-content:center;border-radius:3px;padding:0 3px;line-height:1.35;min-height:15px;min-width:12px;font-size:.75rem;font-weight:750;white-space:nowrap}.school-tag{background:var(--marker-school-bg);color:var(--marker-school)}.public-tag{background:var(--marker-public-bg);color:var(--marker-public)}.unknown-tag{background:#e8edf1;color:#566b78}.schedule tbody .day-cell.weekend{background:var(--marker-weekend-bg);border-right-color:#93a9d0}.schedule tbody .day-cell.school-holiday{border-left:2px solid var(--marker-school)}.calendar-marker-info{background:#fff;border:1px solid var(--border);border-top:0;border-bottom:0;padding:.75rem 1rem;color:#506a76;font-size:.8rem;line-height:1.55}.calendar-marker-info[hidden]{display:none!important}.marker-legend{display:flex;align-items:center;flex-wrap:wrap;gap:.45rem 1rem}.marker-legend-item{display:inline-flex;gap:.4rem;align-items:center;white-space:nowrap}.weekend-key{display:inline-block;background:var(--marker-weekend-bg);color:var(--marker-weekend);border-bottom:2px solid var(--marker-weekend);border-radius:3px;padding:0 4px;font-size:.75rem;font-weight:750;line-height:1.4}.marker-status{font-size:.8rem;color:#6b808b;margin:.55rem 0 0}.marker-details{margin-top:.45rem;font-size:.8rem}.marker-details summary{cursor:pointer;color:#2e6470;font-weight:600;display:list-item;width:max-content;max-width:100%}.marker-details>.help-text,.marker-status-detail{font-size:.8rem;line-height:1.6;margin:.65rem 0}.marker-sources{margin:.5rem 0 0;padding-left:1.1rem}.marker-sources li{margin:.35rem 0;overflow-wrap:anywhere}.marker-sources a{color:#086a74;text-underline-offset:3px}.marker-load-error{font-size:.8rem;color:#96392e;margin:.7rem 0;line-height:1.55}.marker-retry{margin-top:.3rem}@media(max-width:520px){.calendar-marker-info{padding:.65rem .75rem}.marker-legend{gap:.4rem .8rem}.marker-legend-item{font-size:.75rem}.date-tag{font-size:.7rem;padding:0 2px}.schedule thead .date-head{padding:.3rem 0 .2rem}.schedule thead .date-head .day-weekday{font-size:.75rem}}@media print{.calendar-marker-info{border:0;padding:0 0 7pt;print-color-adjust:exact;-webkit-print-color-adjust:exact;font-size:7pt}.marker-legend{gap:4pt 12pt}.marker-legend-item{font-size:7pt}.marker-status{font-size:6pt;margin-top:3pt}.marker-details{display:none!important}.weekend-key{font-size:6pt;border-bottom-width:1pt}.date-tag{font-size:6pt;min-height:8pt;line-height:1.2;padding:0 2pt;border-radius:1pt;min-width:7pt}.date-tags{min-height:9pt;margin-top:1pt;gap:1pt}.schedule thead .date-head{height:36pt;padding:2pt 0;border-top-width:2pt;border-bottom-width:1.5pt}.schedule thead .date-head .day-weekday{font-size:6pt;line-height:1.2}.schedule thead .date-head .day-number{font-size:8pt;line-height:1.2}.schedule thead .date-head .overflow-date{font-size:5.5pt;line-height:1.15;margin-top:1pt}.schedule tbody .day-cell.school-holiday{border-left-width:1pt}}

/* v1.6.0: screen-only theme. Saved shift palettes and paper output retain their colors. */
:root { color-scheme: light; }
.theme-toggle { display:inline-flex; align-items:center; justify-content:center; gap:.45rem; border:1px solid #cbd8dd; border-radius:999px; background:#f6fafb; color:#365460; padding:.45rem .8rem; min-height:36px; font-size:.8rem; font-weight:650; white-space:nowrap; }
.theme-toggle:hover { background:#e8f3f3; border-color:#83b8bc; }
.theme-toggle[hidden] { display:none!important; }
.entry-header { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:2rem; }
.entry-header .brand { margin-bottom:0; }
@media screen {
  html[data-theme="dark"] {
    color-scheme:dark; color:#e4edf3; background:#0f1b24;
    --dark:#e4edf3; --teal:#7bd4d4; --muted:#a9bac5; --border:#344955;
    --night-surface:#172832; --night-raised:#20343f; --night-control:#101f29;
    --marker-weekend-bg:#243c61; --marker-weekend:#c2d7ff;
    --marker-school:#c0a3ff; --marker-school-bg:#3a2b56;
    --marker-public:#ffb4a7; --marker-public-bg:#562f35;
  }
  html[data-theme="dark"] .entry-page { background:radial-gradient(ellipse at 10% 5%,#1d4549 0,transparent 58%),#0f1b24; }
  html[data-theme="dark"] :is(.entry-card,.topbar,.toolbar,.plan-container,dialog,.modal-head) { background:var(--night-surface); border-color:var(--border); }
  html[data-theme="dark"] .entry-card { box-shadow:0 25px 85px #0003; }
  html[data-theme="dark"] :is(.editor-toolbar,.plan-info,.calendar-marker-info,.modal-actions,.summary-cell) { background:#1b2e38; color:#c2d1da; }
  html[data-theme="dark"] .plan-info strong { color:#d5e7ee; }
  html[data-theme="dark"] :is(input,select,textarea) { background-color:var(--night-control); border-color:#49606d; color:var(--dark); }
  html[data-theme="dark"] :is(input,textarea)::placeholder { color:#8da3b0; opacity:1; }
  html[data-theme="dark"] select { background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23b3c9d4' stroke-width='1.5'/%3E%3C/svg%3E"); }
  html[data-theme="dark"] .primary { background:#11757c; color:#fff; }
  html[data-theme="dark"] .primary:hover { background:#19868b; }
  html[data-theme="dark"] .brand-mark { background:#197f85; color:white; }
  html[data-theme="dark"] :is(.secondary,.theme-toggle) { background:#203640; border-color:#49606c; color:#e2eef3; }
  html[data-theme="dark"] :is(.secondary,.theme-toggle):hover { background:#294752; border-color:#70a5ac; }
  html[data-theme="dark"] .subtle { color:#c6d8e1; }
  html[data-theme="dark"] :is(.subtle:hover,.icon-button) { background:#29414d; color:#d7e7ee; }
  html[data-theme="dark"] .danger { background:#482d33; border-color:#80515a; color:#ffc0b5; }
  html[data-theme="dark"] .role-badge { background:#24464a; color:#a0e3de; }
  html[data-theme="dark"] :is(.entry-intro,.entry-foot,.role-link>span:last-child,.weekly-hours,.plan-footer,.help-text,.history-item small,.notes-panel,.catalog-table th,.roster-table th,.help-section ol,.backup-intro,.backup-file-status,.backup-facts dt,.calendar-rule,.calendar-details,.calendar-holidays small,.calendar-verification,.marker-status,.calendar-marker-info) { color:var(--muted); }
  html[data-theme="dark"] :is(.wish-example,.empty-state h2,.active-count,.backup-facts dd,.backup-publication,.calendar-heading h3) { color:#d5e5ee; }
  html[data-theme="dark"] :is(.text-link,.calendar-sources a,.marker-sources a,.calendar-details summary,.marker-details summary,.calendar-region) { color:#86d3da; }
  html[data-theme="dark"] .role-link { background:#1d323d; border-color:#3a5361; }
  html[data-theme="dark"] .role-link:hover { background:#24434b; border-color:#6faeb1; }
  html[data-theme="dark"] .schedule :is(th,td) { border-right-color:#344955; border-bottom-color:#344955; }
  html[data-theme="dark"] .schedule thead th { background:#203540; box-shadow:0 1px 0 #49616d; }
  html[data-theme="dark"] .schedule .name-column { background:var(--night-surface); box-shadow:1px 0 0 #435966; }
  html[data-theme="dark"] .schedule thead .name-column { background:#203540; }
  html[data-theme="dark"] .schedule .group-row :is(th,td) { background:#28424c; color:#d4e7ed; }
  html[data-theme="dark"] .schedule thead .date-head { border-bottom-color:#4b606d; }
  html[data-theme="dark"] .schedule thead .date-head .day-weekday { color:#b5c7d2; }
  html[data-theme="dark"] .schedule thead .date-head.weekend { background:var(--marker-weekend-bg); border-bottom-color:var(--marker-weekend); }
  html[data-theme="dark"] .schedule thead .date-head.weekend :is(.day-number,.day-weekday) { color:var(--marker-weekend); }
  html[data-theme="dark"] .schedule thead .date-head.overflow:not(.weekend) { background:#423729; }
  html[data-theme="dark"] .schedule thead .date-head .overflow-date { color:#edc58e; }
  html[data-theme="dark"] .schedule tbody .day-cell.weekend { background:var(--marker-weekend-bg); border-right-color:#617ca5; }
  html[data-theme="dark"] .schedule .shift-uncolored, html[data-theme="dark"] .catalog-sample.shift-uncolored { color:var(--dark)!important; }
  html[data-theme="dark"] .shift-uncolored .unknown { color:#ffb4a7; }
  html[data-theme="dark"] .shift-uncolored .manual-hours::after { color:#edc58e; }
  html[data-theme="dark"] .summary-cell small { color:#a9bdc9; }
  html[data-theme="dark"] :is(.negative,.summary-cell.unknown) { color:#ffb4a7; }
  html[data-theme="dark"] .positive { color:#9bdbca; }
  html[data-theme="dark"] .unknown-tag { background:#374b58; color:#d2e0e8; }
  html[data-theme="dark"] .notice { background:#1f3e36; color:#b5e3d2; border-color:#426f60; }
  html[data-theme="dark"] :is(.notice.error,.form-error,.predecessor-error) { background:#482c30; color:#ffc0b0; border-color:#845451; }
  html[data-theme="dark"] :is(.calendar-error,.marker-load-error) { color:#ffb4a7; }
  html[data-theme="dark"] .dirty-label { background:#473b27; color:#f2cf95; }
  html[data-theme="dark"] .published-label { background:#234237; color:#aee1c5; }
  html[data-theme="dark"] .draft-label { background:#2b414e; color:#c2d4df; }
  html[data-theme="dark"] :is(.toggle-panel,.workday-calendar) { background:#1d333e; border-color:#3c5664; }
  html[data-theme="dark"] :is(.month-scope,.month-predecessor,.backup-target) { background:#223f43; color:#bce6e5; border-color:#3f6267; }
  html[data-theme="dark"] .predecessor-error { background:#482c30; color:#ffc0b0; border-color:#845451; }
  html[data-theme="dark"] .backup-target-existing { background:#443a28; color:#f1d09e; border-color:#776341; }
  html[data-theme="dark"] :is(.calendar-details,.calendar-holidays li+li,.catalog-table td,.roster-table td) { border-color:var(--border); }
  html[data-theme="dark"] .backup-restore-form input[type=file] { background:#152832; }
  html[data-theme="dark"] .backup-restore-form input[type=file]::file-selector-button { background:#28424d; color:#dfecf2; border-color:#4c6572; }
  html[data-theme="dark"] .catalog-table input[readonly] { background:#263c49; color:#b6c8d3; }
  html[data-theme="dark"] .legend-chip { background:#2b4853!important; color:#d2e7ee; }
  html[data-theme="dark"] dialog::backdrop { background:#050b12c9; }
  html[data-theme="dark"] .plan-container { scrollbar-color:#597785 #142731; }
}
@media(max-width:600px) {
  .topbar { height:auto; min-height:76px; flex-wrap:wrap; padding:.85rem 1rem; gap:.65rem; }
  .topbar-right { gap:.45rem; flex-wrap:wrap; justify-content:flex-end; }
  .theme-toggle { padding:.45rem .65rem; font-size:.75rem; }
  .entry-header { flex-wrap:wrap; gap:.8rem; }
}
@media print { .theme-toggle { display:none!important; } }

/* v1.8.0: compact planning and a viewport-filling editor, without changing paper output. */
.planning-view-controls { display:flex; align-items:center; gap:.4rem; flex-wrap:wrap; }
.planning-view-controls[hidden] { display:none!important; }
.planning-view-controls .button { min-height:36px; padding:.45rem .65rem; font-size:.8rem; }
.planning-view-controls [aria-pressed="true"] { background:#e2f1f0; border-color:#6caaad; color:#155f65; }
#planning-tools-toggle { display:none; }
@media screen {
  #app[data-role="leitung"] > .topbar { height:60px; }
  #app[data-role="leitung"] .workspace { padding:1rem; max-width:none; }
  #app[data-role="leitung"] .page-heading { margin-bottom:.85rem; gap:.8rem; }
  #app[data-role="leitung"] .page-heading h1 { font-size:1.65rem; margin-bottom:.3rem; }
  #app[data-role="leitung"] .page-heading .eyebrow { margin-bottom:.25rem; }
  #app[data-role="leitung"] .toolbar { padding:.65rem .8rem; gap:.65rem; }
  #app[data-role="leitung"] .toolbar .field { min-width:125px; }
  #app[data-role="leitung"] .toolbar .month-field { width:165px; }
  #app[data-role="leitung"] .toolbar .search-field { width:190px; flex:1; min-width:160px; }
  #app[data-role="leitung"] .toolbar label { font-size:.75rem; margin-bottom:.2rem; }
  #app[data-role="leitung"] .toolbar :is(input,select) { min-height:36px; padding:.45rem .6rem; font-size:.8rem; }
  #app[data-role="leitung"] .toolbar select { padding-right:1.8rem; }
  #app[data-role="leitung"] .export-actions .button { min-height:36px; padding:.45rem .55rem; font-size:.75rem; }
  #app[data-role="leitung"] .editor-toolbar { padding:.2rem .4rem; }
  #app[data-role="leitung"] .editor-toolbar .button { min-height:32px; padding:.4rem .6rem; font-size:.8rem; }
  #app[data-role="leitung"] .plan-info { padding:.4rem .7rem; font-size:.8rem; }
  #app[data-role="leitung"] .calendar-marker-info { padding:.45rem .7rem; }
  #app[data-role="leitung"] .marker-status { margin-top:.25rem; }
  #app[data-role="leitung"] .marker-details { margin-top:.2rem; }
  #app[data-role="leitung"] .plan-container { max-height:calc(100dvh - 330px); min-height:210px; }
  #app.planning-compact .schedule tbody .day-cell { height:34px; }
  #app.planning-compact :is(.cell-button,.cell-display) { min-height:33px; padding:2px .2rem; line-height:1.1; font-size:.8rem; }
  #app.planning-compact :is(.cell-hours,.cell-oncall) { font-size:.65rem; line-height:1.05; margin-top:1px; min-height:.8em; }
  #app.planning-compact .schedule .employee-name { padding:3px .65rem; font-size:.8rem; line-height:1.1; }
  #app.planning-compact .employee-edit { line-height:1.1; }
  #app.planning-compact .summary-cell { font-size:.7rem; line-height:1.15; padding:2px!important; }
  #app.planning-compact .summary-cell small { font-size:.625rem; line-height:1.1; }
  #app.planning-compact .weekly-hours { font-size:.65rem; margin-top:1px; line-height:1.1; }
  #app.planning-compact .schedule .name-column { min-width:190px!important; width:190px; max-width:190px; }
  #app.planning-compact .schedule .group-row th { height:25px; padding:.25rem .65rem; font-size:.7rem; }
  #app.planning-compact .schedule thead th { height:62px; }
  #app.planning-compact .schedule thead .date-head { height:62px; padding:.15rem .05rem; border-top-width:2px; border-bottom-width:2px; }
  #app.planning-compact .schedule thead .date-head .day-weekday { font-size:.7rem; line-height:1.1; }
  #app.planning-compact .schedule thead .date-head .day-number { font-size:.9rem; line-height:1.2; }
  #app.planning-compact .schedule thead .date-head .overflow-date { font-size:.6rem; line-height:1; margin-top:0; }
  #app.planning-compact .date-tags { min-height:13px; margin-top:2px; }
  #app.planning-compact .date-tag { font-size:.65rem; min-height:13px; line-height:1.15; }
  body.planning-focus-open { overflow:hidden; }
  #app.planning-focus { position:fixed; inset:0; z-index:1000; background:#f3f6f7; }
  #app.planning-focus > .topbar { display:none; }
  #app.planning-focus > .workspace { height:100vh; height:100dvh; display:flex; flex-direction:column; padding:.65rem; overflow:hidden; }
  #app.planning-focus .page-heading { flex:none; margin:0 0 .45rem; min-height:34px; flex-direction:row; align-items:center; }
  #app.planning-focus .page-heading .eyebrow { display:none; }
  #app.planning-focus .page-heading .subtitle { display:block; font-size:.7rem; margin:.1rem 0 0; max-width:52vw; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  #app.planning-focus .page-heading h1 { font-size:1.25rem; margin:0; }
  #app.planning-focus .heading-actions { width:auto; gap:.4rem; justify-content:flex-end; }
  #app.planning-focus .heading-actions .button { min-height:34px; padding:.4rem .7rem; font-size:.8rem; }
  #app.planning-focus .heading-actions > .button:nth-child(-n+2) { display:none; }
  #app.planning-focus .toolbar { flex:none; padding:.4rem .55rem; gap:.5rem; border-radius:8px 8px 0 0; }
  #app.planning-focus .toolbar .field { flex:0 1 155px; min-width:115px; }
  #app.planning-focus .toolbar .search-field { flex:1 1 170px; }
  #app.planning-focus .toolbar .export-actions { display:none; }
  #app.planning-focus #planning-tools-toggle { display:inline-flex; }
  #app.planning-focus #editor-toolbar { display:none!important; flex:none; }
  #app.planning-focus.planning-tools-open #editor-toolbar:not([hidden]) { display:flex!important; }
  #app.planning-focus :is(.plan-info,.calendar-marker-info,.plan-footer,#notes-panel) { display:none!important; }
  #app.planning-focus #notice { flex:none; max-height:4rem; overflow:auto; margin:0 0 .4rem; padding:.4rem .65rem; font-size:.8rem; }
  #app.planning-focus .plan-container { flex:1 1 0; min-height:0; max-height:none; width:100%; overscroll-behavior:contain; }
  #app.planning-focus .schedule thead th { top:0; }
  html[data-theme="dark"] .planning-view-controls [aria-pressed="true"] { background:#284b50; border-color:#72afb3; color:#ccf0ed; }
  html[data-theme="dark"] #app.planning-focus { background:#0f1b24; }
}
@media screen and (max-width:900px) {
  #app[data-role="leitung"] .page-heading { flex-direction:row; align-items:center; flex-wrap:wrap; }
  #app[data-role="leitung"] .heading-actions { width:auto; }
  #app[data-role="leitung"] .toolbar .export-actions { flex-basis:auto; }
  #app[data-role="leitung"] .plan-container { max-height:65dvh; }
  #app.planning-focus .plan-container { max-height:none; }
  #app.planning-focus .toolbar .field { flex:1 1 120px; }
  #app.planning-focus .toolbar .search-field { flex-basis:160px; }
}
@media screen and (max-width:520px) {
  #app[data-role="leitung"] .workspace { padding:.6rem; }
  #app[data-role="leitung"] > .topbar { height:auto; }
  #app.planning-focus > .workspace { padding:.35rem; }
  #app.planning-focus .page-heading { gap:.3rem; }
  #app.planning-focus .page-heading h1 { font-size:1.05rem; }
  #app.planning-focus .heading-actions .button { padding:.35rem .5rem; font-size:.75rem; }
  #app.planning-focus .toolbar { gap:.35rem; padding:.35rem; }
  #app.planning-focus .toolbar .field { flex:1 1 100px; min-width:90px; }
  #app.planning-focus .planning-view-controls { width:100%; gap:.35rem; }
  #app.planning-focus .planning-view-controls .button { flex:1; }
  #app.planning-compact .schedule .name-column { min-width:145px!important; width:145px; max-width:145px; }
}
@media print { .planning-view-controls { display:none!important; } }

/* v1.10.0: personal downloads use an explicit employee selection. */
.personal-plan-controls { display:flex; align-items:flex-end; gap:.6rem; flex-wrap:wrap; padding:.7rem; border:1px solid var(--border); border-radius:8px; background:#f4f9fa; }
.personal-plan-controls .personal-employee-field { min-width:220px; flex:1; }
.personal-plan-controls .personal-employee-field select { min-width:180px; }
.personal-plan-controls .help-text { flex-basis:100%; margin:0; max-width:42rem; }
@media screen {
  html[data-theme="dark"] .personal-plan-controls { background:#20343f; }
}
@media(max-width:900px) {
  .personal-plan-controls { width:100%; }
  .personal-plan-controls .personal-employee-field { min-width:170px; }
}
@media print { .personal-plan-controls { display:none!important; } }

/* v1.11.0: the employee's name is also a personal PDF download. */
.personal-name-download { display:inline; max-width:100%; padding:0; border:0; background:transparent; color:inherit; font:inherit; font-weight:700; text-align:left; cursor:pointer; text-decoration:underline; text-decoration-color:var(--border); text-underline-offset:3px; }
.personal-name-download:hover { text-decoration-color:currentColor; }
.personal-name-download:focus-visible { outline:2px solid currentColor; outline-offset:3px; border-radius:2px; }
.personal-name-download:disabled { cursor:wait; opacity:.65; }

/* v1.12.0: personal calendar subscription addresses and lifecycle controls. */
.subscription-panel { display:flex; flex-direction:column; gap:1rem; }
.subscription-person { margin:0; font-weight:700; }
.subscription-address:not([hidden]) { display:flex; flex-wrap:wrap; gap:.6rem; align-items:flex-end; padding:1rem; border:1px solid var(--border); border-radius:8px; background:#f4f9fa; }
.subscription-address .field { flex:1 1 270px; min-width:0; }
.subscription-address input { width:100%; min-width:0; font-family:ui-monospace,monospace; font-size:.8rem; }
.subscription-actions { display:flex; flex-wrap:wrap; gap:.6rem; }
.subscription-confirmation:not([hidden]) { border:1px solid #ba7650; border-radius:8px; padding:1rem; background:#fff6e8; }
.subscription-confirmation p { margin:0 0 .75rem; }
.subscription-help h3 { margin:.1rem 0 .6rem; }
.subscription-help ol { margin:.4rem 0 .7rem; padding-left:1.3rem; }
.subscription-help li { margin:.4rem 0; }
.subscription-secret-note { margin:0; padding:.8rem; border-left:3px solid #ba7650; font-size:.9rem; line-height:1.5; }
html[data-theme="dark"] .subscription-address:not([hidden]) { background:#20343f; }
html[data-theme="dark"] .subscription-confirmation:not([hidden]) { background:#382d24; }
@media(max-width:520px) {
  .subscription-address:not([hidden]) { padding:.65rem; }
  .subscription-address .button,.subscription-actions .button { flex:1 1 auto; }
}

/* Home navigation: personal timesheets beside the existing planning areas. */
.home-card{max-width:900px}.home-card .role-links{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:800px){.home-card .role-links{grid-template-columns:1fr}}

/* v1.13.0: dialyse-leer CI. Original logo; decorative waves stay outside the plan. */
.brand-ci { gap:.8rem; min-width:0; text-decoration:none; }
.brand-logo-shell { display:block; flex:none; padding:3px 6px; border-radius:4px; background:#fff; line-height:0; }
.brand-logo { display:block; width:200px; height:auto; max-width:100%; }
.brand-context { display:block; padding-left:.8rem; border-left:1px solid #dce5e9; font-size:.875rem; font-weight:600; line-height:1.3; letter-spacing:.015em; }
.ci-wave-divider { height:20px; background:url('brand/ci-waves.svg') left center / min(100%,520px) 26px no-repeat; }
@media screen {
  :root {
    font-family:Arial,Helvetica,sans-serif;
    --ci-ink:#294a58; --ci-text:#3e5965; --ci-muted:#5b737e;
    --ci-line:#dce5e9; --ci-pale:#f4f7f8; --ci-surface:#fff; --ci-input:#fff;
    --ci-hover:#edf3f5; --ci-control-border:#7b939f; --ci-focus:#547b90;
    --ci-primary:#294a58; --ci-primary-hover:#3e5965;
    --dark:var(--ci-ink); --muted:var(--ci-muted); --border:var(--ci-line); --teal:#547b90;
    color:var(--ci-text); background:var(--ci-pale);
  }
  html[data-theme="dark"] {
    --ci-ink:#edf3f5; --ci-text:#d4e0e6; --ci-muted:#b0c2cc;
    --ci-line:#3b4e59; --ci-pale:#14232c; --ci-surface:#1d2e38; --ci-input:#152630;
    --ci-hover:#293f4c; --ci-control-border:#7b939f; --ci-focus:#91bdd6;
    --ci-primary:#547b90; --ci-primary-hover:#456b80;
    --dark:var(--ci-ink); --muted:var(--ci-muted); --border:var(--ci-line); --teal:#b1ccdb;
    color:var(--ci-text); background:var(--ci-pale);
  }
  h1,h2,h3 { color:var(--ci-ink); font-weight:400; line-height:1.3; }
  .button,label,.role-link strong { font-weight:600; }
  .button { border-radius:5px; }
  :is(button,a,input,select,textarea):focus-visible { outline:3px solid var(--ci-focus); outline-offset:3px; }
  html[data-theme] :is(input,select,textarea) { background-color:var(--ci-input); border-color:var(--ci-control-border); color:var(--ci-ink); border-radius:5px; }
  html[data-theme] .primary { color:#fff; background:var(--ci-primary); }
  html[data-theme] .primary:hover { background:var(--ci-primary-hover); }
  html[data-theme] :is(.secondary,.theme-toggle) { color:var(--ci-ink); background:var(--ci-surface); border-color:var(--ci-control-border); }
  html[data-theme] :is(.secondary,.theme-toggle):hover { background:var(--ci-hover); border-color:var(--ci-focus); }
  html[data-theme] .subtle { color:var(--ci-text); }
  html[data-theme] .subtle:hover { color:var(--ci-ink); background:var(--ci-hover); }
  html[data-theme] .theme-toggle { border-radius:5px; }
  html[data-theme] :is(.topbar,.toolbar,.plan-container,dialog,.modal-head) { background:var(--ci-surface); border-color:var(--ci-line); }
  html[data-theme] :is(.editor-toolbar,.plan-info,.calendar-marker-info,.modal-actions) { background:var(--ci-pale); color:var(--ci-text); }
  html[data-theme] :is(.entry-intro,.entry-foot,.role-link>span:last-child,.weekly-hours,.plan-footer,.help-text,.history-item small,.notes-panel,.catalog-table th,.roster-table th,.help-section ol,.backup-intro,.backup-file-status,.backup-facts dt,.calendar-rule,.calendar-details,.calendar-holidays small,.calendar-verification,.marker-status) { color:var(--ci-muted); }
  html[data-theme] :is(.plan-info strong,.empty-state h2,.active-count,.backup-facts dd,.backup-publication,.calendar-heading h3,.wish-example) { color:var(--ci-ink); }
  html[data-theme] :is(.text-link,.calendar-sources a,.marker-sources a,.calendar-details summary,.marker-details summary,.calendar-region) { color:var(--ci-ink); }
  html[data-theme] :is(.month-scope,.month-predecessor,.toggle-panel,.workday-calendar,.personal-plan-controls) { background:var(--ci-pale); border-color:var(--ci-line); color:var(--ci-text); }
  html[data-theme] .predecessor-error { background:#fff1ed; color:#942f24; border-color:#efc5bb; }
  html[data-theme="dark"] .predecessor-error { background:#482c30; color:#ffc0b0; border-color:#845451; }
  html[data-theme] .subscription-address:not([hidden]) { background:var(--ci-pale); border-color:var(--ci-line); }
  html[data-theme] .role-badge { background:var(--ci-pale); color:var(--ci-ink); border:1px solid var(--ci-line); border-radius:5px; }
  .eyebrow { color:var(--ci-ink); font-weight:600; letter-spacing:.11em; }
  .topbar { position:relative; height:72px; border-color:var(--ci-line); }
  .topbar::after { content:""; position:absolute; right:1.75rem; bottom:-1px; width:190px; height:6px; background:url('brand/ci-waves.svg') center / 190px auto no-repeat; opacity:.65; pointer-events:none; }
  .brand-ci { color:var(--ci-ink); }
  .brand-context { border-color:var(--ci-line); }
  .entry-page { background:var(--ci-pale); }
  html[data-theme="dark"] .entry-page { background:var(--ci-pale); }
  html[data-theme] .entry-card { background:var(--ci-surface); border-color:var(--ci-line); border-radius:10px; box-shadow:0 18px 55px #294a580d; }
  html[data-theme="dark"] .entry-card { box-shadow:0 18px 55px #0003; }
  .entry-header { align-items:flex-start; margin-bottom:0; }
  .home-card .entry-header { margin-bottom:2rem; }
  .entry-header .brand-ci { flex-direction:column; align-items:flex-start; gap:.65rem; }
  .entry-header .brand-logo-shell { padding:0; }
  .entry-header .brand-logo { width:246px; }
  .entry-header .brand-context { padding:0; border:0; font-size:.75rem; font-weight:600; letter-spacing:.12em; }
  .entry-header .theme-toggle { margin-top:.15rem; flex:none; }
  .entry-card .ci-wave-divider { margin:1.05rem 0 1.65rem; opacity:.75; }
  .entry-card h1 { font-size:2.5rem; line-height:1.3; font-weight:400; letter-spacing:-.035em; margin-bottom:.8rem; }
  .login-card h1 { font-size:2.1rem; }
  .entry-intro { color:var(--ci-text); }
  html[data-theme] .role-link { position:relative; overflow:hidden; background:var(--ci-pale); border-color:var(--ci-line); border-radius:7px; padding:1.25rem 1.15rem 1.45rem; }
  html[data-theme] .role-link:hover { background:var(--ci-hover); border-color:var(--ci-control-border); }
  .role-link::after { content:""; position:absolute; right:.9rem; bottom:.5rem; width:110px; height:8px; background:url('brand/ci-waves.svg') center / 110px auto no-repeat; opacity:.55; pointer-events:none; }
  .role-icon { display:inline-flex; align-items:center; justify-content:center; width:38px; height:38px; border:1px solid var(--ci-line); border-radius:50%; margin-bottom:.6rem; color:#547b90; background:var(--ci-surface); }
  .role-icon svg { width:23px; height:23px; }
  html[data-theme="dark"] .role-icon { color:#b1ccdb; }
  .role-link strong { color:var(--ci-ink); font-size:1.05rem; }
  html[data-theme] .planning-view-controls [aria-pressed="true"] { background:var(--ci-hover); color:var(--ci-ink); border-color:var(--ci-focus); }
  html[data-theme] .schedule thead th:not(.date-head) { background:var(--ci-pale); }
  html[data-theme] .schedule .name-column { background:var(--ci-surface); }
  html[data-theme] .schedule thead .name-column { background:var(--ci-pale); }
  html[data-theme] .schedule .group-row :is(th,td) { background:var(--ci-hover); color:var(--ci-ink); }
  html[data-theme] .summary-cell { background:var(--ci-pale); }
  html[data-theme] #app.planning-focus { background:var(--ci-pale); }
}
@media screen and (min-width:601px) {
  #app[data-role="leitung"] > .topbar { height:60px; }
}
@media screen and (max-width:600px) {
  .topbar { height:auto; min-height:72px; }
  .topbar::after { right:1rem; width:145px; background-size:145px auto; }
  .entry-header .brand-logo { width:200px; }
  .entry-header .brand-ci { gap:.55rem; }
}
@media screen and (max-width:520px) {
  .brand-ci { gap:.6rem; }
  .brand-logo { width:180px; }
  .brand-context { padding-left:.6rem; font-size:.8rem; }
  .entry-card { padding:1.5rem; }
  .entry-card h1 { font-size:2rem; }
  .entry-card .ci-wave-divider { margin:.85rem 0 1.35rem; }
  html[data-theme] .role-link { padding:1rem 1rem 1.3rem; }
  .role-icon { margin-bottom:.35rem; }
}

/* v1.14.0: one optional location per monthly shift definition. */
.catalog-table .location-select { min-width:205px; width:220px; max-width:240px; padding-right:1.75rem; }

/* v1.15.0: read-only weekly planning with explicit monthly shift periods. */
.catalog-table .period-select { min-width:175px; width:190px; max-width:210px; padding-right:1.75rem; }
dialog.weekly-modal.wide { max-width:1600px; width:calc(100% - 2rem); }
.weekly-panel { min-width:0; }
.weekly-intro { margin:0 0 1rem; color:var(--ci-muted,var(--muted)); font-size:.875rem; line-height:1.55; }
.weekly-controls { display:flex; align-items:flex-end; gap:1rem; flex-wrap:wrap; margin-bottom:1.1rem; }
.weekly-controls .form-row { margin:0; flex:0 1 270px; }
.weekly-navigation { display:flex; align-items:center; gap:.5rem; flex-wrap:wrap; }
#weekly-heading { margin:0 0 .5rem; font-size:1.15rem; }
.weekly-status { margin:0 0 .85rem; padding:.7rem .85rem; background:var(--ci-pale,#f4f7f8); border:1px solid var(--border); border-radius:5px; font-size:.875rem; line-height:1.55; }
.weekly-status.weekly-incomplete { background:#fff6e8; border-color:#c49b4a; color:#755021; }
.weekly-error { margin:.75rem 0; }
.weekly-scroll-help { margin:.75rem 0; }
.weekly-table-scroll { width:100%; overflow:auto; border:1px solid var(--border); border-radius:6px; }
.weekly-table { width:100%; min-width:1080px; table-layout:fixed; border-spacing:0; border-collapse:separate; font-size:.85rem; }
.weekly-table th,.weekly-table td { border-right:1px solid var(--border); border-bottom:1px solid var(--border); text-align:left; vertical-align:top; }
.weekly-table tr>:last-child { border-right:0; }
.weekly-table tbody:last-child tr:last-child>* { border-bottom:0; }
.weekly-period-heading,.weekly-period { width:74px; padding:.65rem .5rem; }
.weekly-period-heading { font-size:.75rem; }
.weekly-day { padding:.65rem .5rem; text-align:center!important; background:var(--ci-pale,#f4f7f8); color:var(--ci-ink,#294a58); border-top:3px solid transparent; }
.weekly-day.weekend { background:var(--marker-weekend-bg); color:var(--marker-weekend); }
.weekly-day.school-holiday { border-top-color:var(--marker-school); }
.weekly-weekday,.weekly-day-date,.weekly-source { display:block; }
.weekly-weekday { font-size:.8rem; font-weight:600; }
.weekly-day-date { margin:.15rem 0; font-size:.9rem; font-weight:600; white-space:nowrap; }
.weekly-source { margin-top:.3rem; font-size:.7rem; font-weight:400; line-height:1.4; overflow-wrap:anywhere; }
.weekly-day-missing .weekly-source,.weekly-day-overflow .weekly-source { color:#805815; font-weight:600; }
.weekly-place-row th { padding:.65rem .75rem; color:var(--ci-ink,#294a58); background:var(--ci-hover,#edf3f5); font-size:.95rem; font-weight:600; }
.weekly-period { background:var(--ci-pale,#f4f7f8); color:var(--ci-ink,#294a58); font-weight:600; }
.weekly-slot { padding:.4rem .5rem; background:var(--ci-surface,#fff); }
.weekly-slot-missing { background:var(--ci-pale,#f4f7f8); }
.weekly-people { list-style:none; margin:0; padding:0; }
.weekly-people li { display:flex; align-items:baseline; justify-content:space-between; gap:.4rem; padding:.3rem 0; line-height:1.4; }
.weekly-people li+li { border-top:1px solid var(--border); }
.weekly-person-name { min-width:0; overflow-wrap:anywhere; }
.weekly-code { display:inline-block; flex:none; padding:.05rem .3rem; border:1px solid var(--border); border-radius:4px; background:var(--ci-pale,#f4f7f8); color:var(--ci-ink,#294a58); font-size:.75rem; font-weight:600; line-height:1.4; white-space:nowrap; }
.weekly-empty { display:block; padding:.3rem 0; color:var(--ci-muted,var(--muted)); font-size:.8rem; line-height:1.4; }
.weekly-source-notes,.weekly-unassigned { margin-top:1.15rem; padding:1rem; border:1px solid #c49b4a; border-radius:6px; background:#fffaf0; }
.weekly-source-notes h3,.weekly-unassigned h3 { margin:0 0 .5rem; font-size:1rem; }
.weekly-source-notes ul,.weekly-unassigned ul { margin:.6rem 0 0; padding-left:1.2rem; font-size:.875rem; line-height:1.55; }
.weekly-source-notes li,.weekly-unassigned li { margin:.35rem 0; }
.weekly-unassigned-day+.weekly-unassigned-day { margin-top:1rem; padding-top:.8rem; border-top:1px solid var(--border); }
.weekly-unassigned-day h4 { margin:.8rem 0 0; font-size:.9rem; font-weight:600; }
@media screen {
  html[data-theme="dark"] .weekly-status.weekly-incomplete,html[data-theme="dark"] :is(.weekly-source-notes,.weekly-unassigned) { background:#382d24; border-color:#96754c; color:#f0d7b4; }
  html[data-theme="dark"] :is(.weekly-day-missing,.weekly-day-overflow) .weekly-source { color:#efd199; }
}
@media(max-width:600px) {
  dialog.weekly-modal.wide { width:calc(100% - 1rem); max-height:94dvh; }
  .weekly-controls { align-items:stretch; gap:.65rem; }
  .weekly-controls .form-row { flex-basis:100%; }
  .weekly-navigation { width:100%; }
  .weekly-navigation .button { flex:1; }
  #weekly-heading { font-size:1rem; line-height:1.45; }
  .weekly-source-notes,.weekly-unassigned { padding:.8rem; }
}
/* Keep date and period orientation while scrolling the weekly table. */
.weekly-table-scroll { max-height:58vh; max-height:min(58dvh,580px); }
.weekly-table thead th { position:sticky; top:0; z-index:3; }
.weekly-table .weekly-period { position:sticky; left:0; z-index:2; box-shadow:1px 0 0 var(--border); }
.weekly-table thead .weekly-period-heading { left:0; z-index:5; background:var(--ci-pale,#f4f7f8); box-shadow:1px 0 0 var(--border); }
.weekly-table .weekly-place-row th { position:sticky; left:0; z-index:2; }
