/* Dachwartung 300: gleiche Flächen, Karten und Firmenakzente wie Bautagesberichte. */
html body #roofMaintenance{--rm-bg:#f5f7f9;--rm-surface:#fff;--rm-text:#182b38;--rm-muted:#596b79;--rm-line:#dce4e8;--rm-soft:#f1f5f7;--rm-accent:var(--company-accent,#df293c);--rm-tint:var(--company-tint,#fff3f5);width:min(980px,calc(100vw - 40px));max-width:none;max-height:94dvh;box-sizing:border-box;overflow:auto;padding:24px;border:1px solid var(--rm-line)!important;border-radius:24px!important;background:var(--rm-bg)!important;color:var(--rm-text)!important;box-shadow:0 24px 100px #12273738!important;scroll-padding-top:120px;}
html body #roofMaintenance *{box-sizing:border-box;min-width:0;}
html body #roofMaintenance [hidden]{display:none!important;}
html body #roofMaintenance::backdrop{background:#10232c99;backdrop-filter:blur(3px);}
html body #roofMaintenance svg{width:23px;height:23px;flex:none;display:inline-block;}
html body #roofMaintenance .rm-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 0 18px;border:0;}
html body #roofMaintenance .rm-eyebrow{font-size:10px;font-weight:800;letter-spacing:.12em;color:var(--rm-muted)!important;margin:0 0 6px;}
html body #roofMaintenance h2{font-size:29px;letter-spacing:-.035em;margin:0;color:var(--rm-text)!important;}
html body #roofMaintenance h3{margin:0;color:var(--rm-text)!important;font-size:19px;line-height:1.3;letter-spacing:-.02em;}
html body #roofMaintenance p{line-height:1.5;}
html body #roofMaintenance #rmClose{border:1px solid var(--rm-line)!important;background:var(--rm-surface)!important;color:var(--rm-text)!important;font:inherit;font-size:26px;width:44px;height:44px;min-height:44px;padding:0;border-radius:12px;cursor:pointer;}
html body #roofMaintenance button{font:inherit;cursor:pointer;white-space:normal;line-height:1.35;}
html body #roofMaintenance button:disabled{opacity:.55;cursor:wait;}
html body #roofMaintenance :is(button,input,select,textarea):focus-visible{outline:3px solid var(--rm-accent)!important;outline-offset:3px;}
html body #roofMaintenance :is(.primary-button,.secondary-button){display:inline-flex;justify-content:center;align-items:center;gap:8px;min-height:48px;padding:12px 16px;border-radius:12px;font-size:14px;font-weight:750;box-shadow:none!important;}
html body #roofMaintenance .primary-button{color:#fff!important;background:#203541!important;border:1px solid #203541!important;}
html body #roofMaintenance .secondary-button{color:var(--rm-text)!important;background:var(--rm-surface)!important;border:1px solid var(--rm-line)!important;}
html body #roofMaintenance .rm-top-actions{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 12px;}
html body #roofMaintenance #rmStatus{border-left:3px solid var(--rm-accent);border-radius:0 8px 8px 0;padding:9px 12px;font-size:13px;background:var(--rm-surface)!important;white-space:pre-wrap;margin:0 0 14px;}
html body #roofMaintenance #rmStatus:empty{display:none;}
html body #roofMaintenance .rm-guide{position:sticky;top:-24px;z-index:4;background:var(--rm-bg)!important;padding:14px 0 12px;margin:0 0 18px;}
html body #roofMaintenance #rmProgress{font-size:13px;font-weight:750;color:var(--rm-text)!important;margin:0 0 12px;}
html body #roofMaintenance #rmSteps{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;}
html body #roofMaintenance #rmSteps button{display:flex;align-items:center;justify-content:center;gap:8px;padding:9px 5px;min-height:44px;background:var(--rm-surface)!important;color:var(--rm-muted)!important;border:1px solid var(--rm-line)!important;border-radius:11px;}
html body #roofMaintenance #rmSteps button>span{width:24px;height:24px;border-radius:50%;background:var(--rm-soft);display:grid;place-items:center;font-size:12px;font-weight:800;}
html body #roofMaintenance #rmSteps small{font-size:12px;font-weight:700;}
html body #roofMaintenance #rmSteps [aria-current=step]{border:2px solid var(--rm-accent)!important;background:var(--rm-tint)!important;color:var(--rm-text)!important;}
html body #roofMaintenance #rmSteps [aria-current=step]>span{background:var(--rm-accent);color:#fff;}
html body #roofMaintenance #rmSteps [data-done=true]>span{background:#dfefe6;color:#245a3d;}
html body #roofMaintenance .rm-guide-track{height:3px;background:var(--rm-line);border-radius:9px;margin-top:12px;overflow:hidden;}
html body #roofMaintenance #rmTrack{display:block;background:var(--rm-accent);height:100%;transition:width .2s;}
html body #roofMaintenance .rm-card{border:1px solid var(--rm-line)!important;border-radius:18px!important;background:var(--rm-surface)!important;color:var(--rm-text)!important;padding:22px;margin:0 0 16px;box-shadow:0 3px 10px #10263704!important;}
html body #roofMaintenance .rm-section-head{display:flex;align-items:flex-start;gap:13px;margin:0 0 20px;}
html body #roofMaintenance .rm-section-head p{margin:6px 0 0;color:var(--rm-muted)!important;font-size:13px;}
html body #roofMaintenance .rm-icon{display:grid;place-items:center;flex:none;width:42px;height:42px;background:var(--rm-soft);color:var(--rm-text)!important;border-radius:12px;}
html body #roofMaintenance .rm-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;}
html body #roofMaintenance .rm-wide{grid-column:1/-1;}
html body #roofMaintenance label{display:grid;gap:7px;font-weight:650;font-size:13px!important;line-height:1.5;margin:0;color:var(--rm-text)!important;}
html body #roofMaintenance :is(input,select,textarea){min-width:0;width:100%;min-height:48px;font:inherit;font-size:16px!important;font-weight:400;line-height:1.4;color:var(--rm-text)!important;background:var(--rm-soft)!important;border:1px solid var(--rm-line)!important;border-radius:10px!important;padding:12px;box-shadow:none!important;}
html body #roofMaintenance textarea{resize:vertical;}
html body #roofMaintenance input::placeholder,html body #roofMaintenance textarea::placeholder{color:var(--rm-muted)!important;opacity:.8;}
html body #roofMaintenance .rm-roof-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;}
html body #roofMaintenance .rm-roof-choices button{display:flex;flex-direction:column;position:relative;align-items:flex-start;text-align:left;gap:7px;padding:16px;border:1px solid var(--rm-line)!important;border-radius:14px;background:var(--rm-surface)!important;color:var(--rm-text)!important;}
html body #roofMaintenance .rm-roof-drawing{display:grid;place-items:center;height:74px;width:100%;background:var(--rm-soft);border-radius:8px;margin-bottom:5px;}
html body #roofMaintenance .rm-roof-drawing svg{width:64px;height:54px;stroke-width:1.1;}
html body #roofMaintenance .rm-roof-choices small{font-size:12px;line-height:1.5;color:var(--rm-muted)!important;}
html body #roofMaintenance .rm-choice-mark{position:absolute;right:10px;top:10px;border-radius:50%;width:22px;height:22px;display:grid;place-items:center;background:var(--rm-accent);color:white;opacity:0;}
html body #roofMaintenance .rm-roof-choices [aria-pressed=true]{border:2px solid var(--rm-accent)!important;background:var(--rm-tint)!important;padding:15px;}
html body #roofMaintenance .rm-roof-choices [aria-pressed=true] .rm-choice-mark{opacity:1;}
html body #roofMaintenance .rm-fold{padding:0;overflow:clip;}
html body #roofMaintenance .rm-fold>summary{display:flex;align-items:center;gap:12px;list-style:none;cursor:pointer;min-height:72px;padding:17px 20px;font-weight:750;line-height:1.5;}
html body #roofMaintenance summary::-webkit-details-marker{display:none;}
html body #roofMaintenance .rm-fold>summary>span{margin-left:auto;font-size:12px;font-weight:500;color:var(--rm-muted)!important;text-align:right;}
html body #roofMaintenance .rm-fold>summary::after{content:'⌄';font-size:20px;}
html body #roofMaintenance .rm-fold[open]>summary{border-bottom:1px solid var(--rm-line);}
html body #roofMaintenance .rm-fold-body{padding:20px;}
html body #roofMaintenance .rm-section-intro{margin:0 0 18px;}
html body #roofMaintenance .rm-section-intro p{font-size:14px;color:var(--rm-muted)!important;margin:7px 0;}
html body #roofMaintenance .rm-help{font-size:12px;color:var(--rm-muted)!important;margin:14px 0 0;line-height:1.6;}
html body #roofMaintenance .rm-record{border:1px solid var(--rm-line);border-radius:13px;margin:0 0 14px;overflow:clip;background:var(--rm-surface);}
html body #roofMaintenance .rm-record>summary{list-style:none;padding:14px;display:flex;gap:9px;align-items:center;cursor:pointer;background:var(--rm-soft);font-size:14px;}
html body #roofMaintenance .rm-record>summary>small{flex:1;color:var(--rm-muted)!important;overflow-wrap:anywhere;}
html body #roofMaintenance .rm-record-body{padding:18px;}
html body #roofMaintenance .rm-delete-record{margin-top:16px;font-size:12px;color:#a1323c!important;min-height:44px;}
html body #roofMaintenance .rm-add{width:100%;border-style:dashed!important;}
html body #roofMaintenance .rm-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:18px;}
html body #roofMaintenance .rm-stats>span{background:var(--rm-surface);border:1px solid var(--rm-line);border-radius:12px;padding:12px;font-size:12px;color:var(--rm-muted)!important;}
html body #roofMaintenance .rm-stats strong{display:block;font-size:20px;color:var(--rm-text)!important;margin-bottom:3px;}
html body #roofMaintenance .rm-check{background:var(--rm-surface);border:1px solid var(--rm-line);border-radius:14px;margin:0 0 10px;overflow:clip;}
html body #roofMaintenance .rm-check>summary{display:grid;grid-template-columns:38px minmax(0,1fr) auto 15px;align-items:center;gap:12px;list-style:none;min-height:76px;padding:14px 16px;cursor:pointer;}
html body #roofMaintenance .rm-check>summary strong{font-size:14px;line-height:1.5;}
html body #roofMaintenance .rm-check .rm-icon{width:36px;height:36px;border-radius:10px;}
html body #roofMaintenance .rm-badge{font-size:11px;font-weight:700;white-space:nowrap;border-radius:30px;padding:6px 9px;background:var(--rm-soft);color:var(--rm-muted)!important;}
html body #roofMaintenance .rm-check[data-rating="1"] .rm-badge{background:#e2f2e9;color:#24583d!important;}
html body #roofMaintenance .rm-check[data-rating="2"] .rm-badge{background:#fee6e6;color:#9c2630!important;}
html body #roofMaintenance .rm-check[data-rating="4"] .rm-badge,html body #roofMaintenance .rm-check[data-rating="5"] .rm-badge{background:#fff0cc;color:#775612!important;}
html body #roofMaintenance .rm-check-body{border-top:1px solid var(--rm-line);padding:18px;}
html body #roofMaintenance .rm-status-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:20px;}
html body #roofMaintenance .rm-status-choices button{min-height:53px;border:1px solid var(--rm-line)!important;border-radius:10px;background:var(--rm-surface)!important;color:var(--rm-text)!important;font-size:12px;font-weight:650;padding:9px;display:flex;align-items:center;gap:7px;justify-content:flex-start;}
html body #roofMaintenance .rm-status-choices button>span{font-size:18px;width:18px;text-align:center;flex:none;}
html body #roofMaintenance .rm-status-choices [aria-pressed=true]{border:2px solid var(--rm-accent)!important;background:var(--rm-tint)!important;padding:8px;}
html body #roofMaintenance .rm-status-choices .rm-rate-1[aria-pressed=true]{border-color:#34805a!important;background:#e2f2e9!important;color:#24583d!important;}
html body #roofMaintenance .rm-status-choices .rm-rate-2[aria-pressed=true]{border-color:#b13842!important;background:#fee6e6!important;color:#9c2630!important;}
html body #roofMaintenance .rm-check-help{font-size:12px;color:var(--rm-muted)!important;background:var(--rm-soft);padding:10px;border-radius:8px;}
html body #roofMaintenance .rm-work-choices{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:18px;}
html body #roofMaintenance .rm-work-choices button{font-size:12px;min-height:44px;padding:9px 12px;border-radius:30px;}
html body #roofMaintenance .rm-card>label{margin:16px 0;}
html body #roofMaintenance .rm-photo-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
html body #roofMaintenance .rm-photo-actions label{position:relative;display:flex;align-items:center;justify-content:center;gap:8px;min-height:72px;cursor:pointer;background:var(--rm-soft);border:1px dashed var(--rm-line);border-radius:12px;padding:12px;overflow:hidden;}
html body #roofMaintenance .rm-photo-actions input{position:absolute;inset:0;opacity:0;cursor:pointer;}
html body #roofMaintenance .rm-photo-actions label:focus-within{outline:3px solid var(--rm-accent);outline-offset:3px;}
html body #roofMaintenance .rm-photo-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:16px;}
html body #roofMaintenance .rm-photo-grid figure{margin:0;border:1px solid var(--rm-line);border-radius:12px;overflow:hidden;padding:10px;}
html body #roofMaintenance .rm-photo-wrap{position:relative;}
html body #roofMaintenance .rm-photo-wrap img{width:100%;height:170px;object-fit:cover;border-radius:7px;}
html body #roofMaintenance .rm-photo-wrap span{position:absolute;left:8px;bottom:12px;background:#182b38dd;color:white;font-size:11px;padding:4px 8px;border-radius:6px;}
html body #roofMaintenance .rm-photo-grid label{margin:10px 0;font-size:12px!important;}
html body #roofMaintenance .rm-photo-grid button{min-height:44px;width:100%;font-size:12px;}
html body #roofMaintenance .rm-review-object{display:grid;gap:6px;padding:17px;border-radius:12px;background:var(--rm-soft);overflow-wrap:anywhere;}
html body #roofMaintenance .rm-review-object strong{font-size:19px;}
html body #roofMaintenance .rm-review-object :is(small,span){color:var(--rm-muted)!important;}
html body #roofMaintenance .rm-review-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:14px 0;}
html body #roofMaintenance .rm-review-grid>span{padding:12px;background:var(--rm-soft);border-radius:10px;font-size:12px;}
html body #roofMaintenance .rm-review-grid strong{display:block;font-size:22px;margin-bottom:4px;}
html body #roofMaintenance .rm-review-warning{font-size:13px;padding:13px;border:1px solid #d8ba78;border-radius:10px;}
html body #roofMaintenance .rm-findings>div{border-bottom:1px solid var(--rm-line);padding:12px 0;font-size:13px;}
html body #roofMaintenance .rm-findings span{display:block;color:var(--rm-muted)!important;margin:6px 0;}
html body #roofMaintenance .rm-findings p{margin:4px 0;white-space:pre-wrap;overflow-wrap:anywhere;}
html body #roofMaintenance .rm-delivery{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:18px;}
html body #roofMaintenance .rm-footer{position:sticky;bottom:-24px;z-index:4;background:var(--rm-bg);border-top:1px solid var(--rm-line);padding:14px 0 0;display:flex;gap:12px;align-items:center;margin-top:20px;}
html body #roofMaintenance #rmFooterStep{margin-left:auto;color:var(--rm-muted);font-size:13px;}
html body #roofMaintenance .rm-footer button{min-width:115px;}
html body #roofMaintenance .rm-search{margin-bottom:20px;}
html body #roofMaintenance #rmHistory .modern-card{background:var(--rm-surface)!important;color:var(--rm-text)!important;border:1px solid var(--rm-line)!important;padding:18px;margin:12px 0;border-radius:15px;}
html body #roofMaintenance #rmHistory h4{font-size:17px;margin:0 0 7px;}
html body #roofMaintenance #rmHistory p{font-size:13px;color:var(--rm-muted)!important;}
html body #roofMaintenance .site-doc-actions{display:flex;gap:8px;flex-wrap:wrap;}
html body #roofMaintenance .rm-empty{display:grid;justify-items:center;gap:12px;padding:48px 24px;border:1px dashed var(--rm-line);border-radius:18px;background:var(--rm-surface);text-align:center;}
html body #roofMaintenance .rm-empty>svg{width:42px;height:42px;color:var(--rm-muted);}
html body #roofMaintenance .rm-empty p{margin:0;color:var(--rm-muted)!important;font-size:13px;}
html body #roofMaintenance a{color:var(--rm-text)!important;text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere;}
html body .rm-open{margin:10px;min-height:48px;}
html[data-theme=dark] body #roofMaintenance{--rm-bg:#111920;--rm-surface:#1c2731;--rm-text:#edf3f6;--rm-muted:#b1c0cc;--rm-line:#43515d;--rm-soft:#26343f;--rm-tint:#342a30;}
@media(max-width:620px){html body #roofMaintenance{width:100vw;height:100dvh;max-height:100dvh;margin:0;padding:18px;border-radius:0!important;border:0!important;}html body #roofMaintenance .rm-guide{top:-18px;padding-top:12px;}html body #roofMaintenance .rm-footer{bottom:-18px;padding-bottom:env(safe-area-inset-bottom);}html body #roofMaintenance .rm-card{padding:17px;}html body #roofMaintenance .rm-fold{padding:0;}html body #roofMaintenance .rm-fold-body{padding:15px;}html body #roofMaintenance .rm-fold>summary{padding:14px;font-size:14px;gap:9px;}html body #roofMaintenance .rm-fold>summary>span{font-size:10px;}html body #roofMaintenance #rmSteps button{flex-direction:column;gap:5px;padding:7px 2px;}html body #roofMaintenance #rmSteps small{font-size:9px;}html body #roofMaintenance .rm-grid{grid-template-columns:1fr;gap:14px;}html body #roofMaintenance .rm-roof-choices{grid-template-columns:1fr;gap:9px;}html body #roofMaintenance .rm-roof-choices button{display:grid;grid-template-columns:58px minmax(0,1fr);gap:4px 12px;padding:13px;}html body #roofMaintenance .rm-roof-choices [aria-pressed=true]{padding:12px;}html body #roofMaintenance .rm-roof-drawing{grid-row:1/3;height:58px;margin:0;}html body #roofMaintenance .rm-roof-drawing svg{width:42px;height:42px;}html body #roofMaintenance .rm-choice-mark{top:auto;bottom:8px;right:8px;width:18px;height:18px;font-size:12px;}html body #roofMaintenance .rm-check>summary{grid-template-columns:34px minmax(0,1fr) 12px;gap:7px 10px;padding:13px;}html body #roofMaintenance .rm-check>summary .rm-icon{grid-row:1/3;}html body #roofMaintenance .rm-badge{grid-column:2;justify-self:start;font-size:10px;padding:4px 8px;}html body #roofMaintenance .rm-chevron{grid-column:3;grid-row:1/3;}html body #roofMaintenance .rm-check-body{padding:14px;}html body #roofMaintenance .rm-status-choices{grid-template-columns:1fr 1fr;}html body #roofMaintenance .rm-status-choices button{font-size:11px;padding:9px 7px;}html body #roofMaintenance .rm-status-choices [aria-pressed=true]{padding:8px 6px;}html body #roofMaintenance .rm-stats>span{padding:10px;font-size:10px;}html body #roofMaintenance .rm-stats strong{font-size:19px;}html body #roofMaintenance .rm-record-body{padding:14px;}html body #roofMaintenance .rm-record>summary{flex-wrap:wrap;}html body #roofMaintenance .rm-record>summary>small{flex-basis:50%;font-size:11px;}html body #roofMaintenance .rm-review-grid{grid-template-columns:1fr 1fr;}html body #roofMaintenance .rm-delivery{grid-template-columns:1fr;}html body #roofMaintenance .rm-top-actions>button{flex:1;font-size:12px;padding:10px;}html body #roofMaintenance .rm-photo-actions label{font-size:12px!important;flex-direction:column;}html body #roofMaintenance .rm-photo-grid{grid-template-columns:1fr;}html body #roofMaintenance #rmProgress{font-size:12px;}html body #roofMaintenance .rm-footer button{min-width:100px;} }
@media(prefers-reduced-motion:reduce){html body #roofMaintenance #rmTrack{transition:none;}}

/* Schnellbewertung bleibt auch bei geschlossenen Prüfpunkten sichtbar. */
html body #roofMaintenance .rm-quick-actions{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:4px;}
html body #roofMaintenance .rm-quick-actions button{display:flex;align-items:center;justify-content:center;min-height:44px;padding:9px 6px;border:1px solid var(--rm-line)!important;border-radius:10px;background:var(--rm-surface)!important;color:var(--rm-text)!important;font-size:12px;font-weight:750;}
html body #roofMaintenance .rm-quick-actions .rm-rate-1[aria-pressed=true]{background:#e2f2e9!important;border:2px solid #34805a!important;color:#24583d!important;}
html body #roofMaintenance .rm-quick-actions .rm-rate-2[aria-pressed=true]{background:#fee6e6!important;border:2px solid #b13842!important;color:#9c2630!important;}

/* Version 303: stable mobile controls and direct multi-photo selection. */
html body #roofMaintenance #rmFooterStep{white-space:nowrap;min-width:48px;text-align:center;flex-shrink:0;}
html body #roofMaintenance .rm-check>summary{list-style:none;}
html body #roofMaintenance .rm-check>summary::marker{content:'';}
html body #roofMaintenance .rm-check>summary::-webkit-details-marker{display:none;}
html body #roofMaintenance .rm-photo-actions{grid-template-columns:1fr 1fr;}
html body #roofMaintenance .rm-photo-actions label:last-child{grid-column:1/-1;}
html body #roofMaintenance .rm-photo-actions input{width:100%;height:100%;margin:0;max-width:none;}
html body #roofMaintenance #rmPhotoStatus:empty{display:none;}
html body #roofMaintenance #rmPhotoStatus{font-size:14px;line-height:1.5;overflow-wrap:anywhere;}

/* Dachwartung is available only as a rubric within Doku. */
html body #siteDocumentation #siteDocRoofRubric{margin:16px 0 22px;padding:16px;border:1px solid #dce4e1;border-radius:16px;background:var(--surface,#f5f8f7);}
html body #siteDocumentation #siteDocRoofRubric h3{margin:0 0 6px;}
html body #siteDocumentation #siteDocRoofRubric p{margin:0 0 12px;font-size:14px;line-height:1.5;}
html body #siteDocumentation #siteDocRoofMaintenance{width:100%;min-height:48px;}
html[data-theme="dark"] body #siteDocumentation #siteDocRoofRubric{background:#202a36;border-color:#3a4758;color:#f2f5f7;}
