/* MH Build · shared form language. Presentation only; loaded after page themes.
   Native dialogs and the existing accessible panel keep their own focus,
   validation, scrolling, submit and dismiss behavior. Print is unchanged. */
@media screen {
:root {
 --mf-ink:#20344e; --mf-muted:#63778f; --mf-edge:#c7d6e5;
 --mf-field:linear-gradient(145deg,#fff,#f4f8fc); --mf-paper:#f3f7fb;
 --mf-surface:linear-gradient(135deg,#edf4fb 0%,#f7f9fc 50%,#eaf5f4 100%);
 --mf-card:linear-gradient(140deg,#ffffffeb,#f0f6fae8);
 --mf-focus:#357c92; --mf-ring:#3f839324;
 --mf-head:radial-gradient(ellipse at 100% 0,#52889266,transparent 62%),linear-gradient(115deg,#29324d,#213d52 62%,#255966);
}
body.entry-dark {
 --mf-ink:#f3f5ff; --mf-muted:#b7c6d7; --mf-edge:#ffffff35;
 --mf-field:linear-gradient(140deg,#222a3f,#293548); --mf-paper:#293447;
 --mf-surface:linear-gradient(145deg,#2b3048,#263e4e); --mf-card:linear-gradient(145deg,#ffffff0d,#ffffff04);
 --mf-focus:#acd8e5; --mf-ring:#a6d6ff26;
}
html body.entry-dark :where(form,dialog,[role=dialog]) label,html body.entry-dark .z-feldzeile>span {color:var(--mf-ink)!important}
/* A consistent tactile field treatment, without changing control widths or
   native checkbox/radio/file semantics. Excludes visually hidden selects. */
html body :where(form,fieldset,dialog,[role=dialog],.pa-editor,.ws-profile-panel) :is(input:not([type=checkbox],[type=radio],[type=range],[type=color],[type=hidden],[type=submit],[type=button],[type=reset]),textarea,select:not(.mh-select-source),.mh-select-trigger) {
 color:var(--mf-ink)!important;background:var(--mf-field)!important;
 border:1px solid var(--mf-edge)!important;border-radius:13px!important;
 box-shadow:inset 0 1px 2px #20354e06,0 2px 3px #20354e03!important;
 caret-color:var(--mf-focus);font-size:16px;line-height:1.45;
 transition:border-color .16s ease,box-shadow .16s ease,background-color .16s ease;
}
html body :where(form,fieldset,dialog,[role=dialog],.pa-editor,.ws-profile-panel) :is(input,textarea)::placeholder {color:var(--mf-muted)!important;opacity:.9}
html body :where(form,fieldset,dialog,[role=dialog],.pa-editor,.ws-profile-panel) :is(input,textarea,select,.mh-select-trigger):focus-visible {
 outline:2px solid var(--mf-focus)!important;outline-offset:2px!important;box-shadow:0 0 0 5px var(--mf-ring)!important;
}
html body :where(form,fieldset,dialog,[role=dialog],.pa-editor,.ws-profile-panel) :is(input,textarea,select)[aria-invalid=true],
html body :where(form,dialog,[role=dialog]) :is(input,textarea,select):user-invalid {border-color:#b5483b!important;outline-color:#b5483b!important}
html body :where(form,fieldset,dialog,[role=dialog]) :is(input,textarea,select,.mh-select-trigger):disabled {opacity:.6;cursor:not-allowed}
html body :where(form,fieldset,dialog,[role=dialog]) :is(input,textarea)[readonly] {background:var(--mf-paper)!important;color:var(--mf-muted)!important}
html body :where(form,fieldset,dialog,[role=dialog]) :is(input[type=checkbox],input[type=radio]) {accent-color:#316a7c}
html body :where(form,dialog,[role=dialog]) input[type=file]::file-selector-button {border:1px solid #c3d2e1;border-radius:9px;padding:8px 12px;margin-right:12px;background:#e9f0f7;color:#213d52;font:inherit;cursor:pointer}
/* Every form dialog: branded title area, soft work surface, quiet depth. */
html body :is(dialog,[role=dialog]):has(:is(form,input,textarea,select)) {
 color:var(--mf-ink);background:var(--mf-surface)!important;
 border:1px solid #ffffffb3!important;border-radius:25px!important;
 box-shadow:0 30px 100px #15283d40,0 4px 18px #15283d14!important;
}
html body dialog:has(:is(form,input,textarea,select))::backdrop {background:#152a4669;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
html body .z-blende:has(.z-formular).offen {background:#152a4669;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
html body :is(dialog,[role=dialog]):has(:is(form,input,textarea,select)) > header,
html body :is(dialog,[role=dialog]) > form > header,
html body .ws-record-editor > header,
html body .pa-editor > header,
html body .ws-profile-panel:has(form) > header {
 background:var(--mf-head)!important;color:#fff!important;
 border-bottom:1px solid #ffffff30!important;
 padding:25px 28px!important;border-radius:23px 23px 0 0;
 box-shadow:inset 0 1px #ffffff20;
}
html body :is(dialog,[role=dialog]):has(form) > header :is(h1,h2,h3,strong),
html body :is(dialog,[role=dialog]) > form > header :is(h1,h2,h3,strong),
html body .ws-record-editor > header :is(h2,h3),html body .pa-editor > header :is(h2,h3) {
 color:#fff!important;font-weight:600;letter-spacing:-.035em;line-height:1.25;
}
html body :is(dialog,[role=dialog]):has(form) > header :is(p,small),
html body :is(dialog,[role=dialog]) > form > header :is(p,small) {color:#d4e4ef!important}
html body :is(dialog,[role=dialog]):has(form) > header button,
html body :is(dialog,[role=dialog]) > form > header button,
html body .pa-editor > header button {
 background:#ffffff12!important;color:#f3f8ff!important;border:1px solid #ffffff35!important;
 border-radius:12px!important;min-height:42px;box-shadow:none!important;
}
html body :is(dialog,[role=dialog]):has(form) > header button:hover {background:#ffffff26!important}
/* Dialog variants without a header wrapper still get a designed title. */
html body dialog:has(form) > :is(h1,h2,h3) {background:var(--mf-head);color:#fff!important;padding:22px 24px;border-radius:17px;margin-bottom:22px;letter-spacing:-.03em}
html body .z-tafel:has(.z-formular) .z-tafel-leib {background:var(--mf-surface)!important;padding:24px 28px!important}
html body .z-tafel-leib > .z-formular,
html body .ws-record-editor > .z-formular {
 background:var(--mf-card)!important;border:1px solid #c6d8e780!important;
 border-radius:18px!important;box-shadow:inset 0 1px #fff,0 5px 20px #203a5604;
 padding:24px!important;gap:22px 24px;
}
html body :is(.gala-dialog,.auto-dialog,.tk-dialog) > form {background:transparent!important;padding:24px 28px!important}
html body :is(dialog,[role=dialog]) :is(.z-feldzeile,.gala-form-grid>label,.auto-form-grid>label,.tk-fields>label) {color:var(--mf-ink);min-width:0}
html body :is(dialog,[role=dialog]) .z-feldzeile > span {color:var(--mf-ink)!important;font-size:13px!important;font-weight:600!important;margin-bottom:1px}
html body :is(dialog,[role=dialog]) :is(.z-formular,.gala-form-grid,.auto-form-grid,.tk-fields) :is(input:not([type=checkbox],[type=radio],[type=hidden]),select:not(.mh-select-source),.mh-select-trigger) {min-height:48px;padding:12px 14px}
html body :is(dialog,[role=dialog]) :is(.z-formular,.gala-form-grid,.auto-form-grid) textarea {padding:12px 14px;min-height:96px;resize:vertical}
html body :where(form,dialog,[role=dialog]) fieldset:not([disabled]) {border-color:var(--mf-edge);border-radius:15px}
html body :where(form,dialog,[role=dialog]) legend {color:var(--mf-ink);font-weight:600;padding:0 8px}
html body :is(dialog,[role=dialog]) :is(.z-formular-fuss,form>footer),
html body .ws-record-editor .z-formular-fuss {
 background:var(--mf-card)!important;border-top:1px solid var(--mf-edge)!important;
 padding-top:18px!important;display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;
}
html body :is(dialog,[role=dialog]) :is(.z-formular-fuss,form>footer) > button[type=button]:not(.primary,.danger,.gefahr,.schlimm) {
 background:var(--mf-field)!important;color:var(--mf-ink)!important;border:1px solid var(--mf-edge)!important;
 border-radius:12px!important;min-height:46px;padding:10px 16px;font:inherit;font-weight:500;
}
html body:not(.entry-dark) :where(form,dialog,[role=dialog]) :is(button[type=submit],.primary,.z-formular-fuss>.z-knopf:first-child):not(.danger,.gefahr,.schlimm) {
 background:linear-gradient(115deg,#263e5a,#285b6a)!important;color:#fff!important;
 border:1px solid #294d63!important;border-radius:12px!important;
 box-shadow:0 4px 12px #214a6220!important;min-height:46px;
}
html body.entry-dark :where(form,dialog) button[type=submit]:not(.danger,.gefahr) {background:linear-gradient(110deg,#d5eaff,#c4e1e5)!important;color:#20354c!important;border:1px solid #e0f1ff!important;border-radius:12px!important;min-height:46px;padding:11px 18px;font:inherit;font-weight:600;box-shadow:0 4px 14px #10253626!important}
html body :where(form,dialog,[role=dialog]) :is(button[type=submit],.primary):not(:disabled):hover {filter:brightness(1.07)}
html body :where(form,dialog,[role=dialog]) button:focus-visible {outline:2px solid var(--mf-focus);outline-offset:3px}
html body :where(form,dialog,[role=dialog]) button:disabled {filter:none;opacity:.55;cursor:not-allowed}
@media(max-width:600px) {
 html body :is(dialog,[role=dialog]):has(form) {border-radius:19px!important;max-width:calc(100vw - 16px)}
 html body :is(dialog,[role=dialog]):has(form) > header,html body :is(dialog,[role=dialog]) > form > header,html body .pa-editor > header {padding:20px 18px!important;border-radius:17px 17px 0 0;gap:14px}
 html body :is(dialog,[role=dialog]):has(form) > header h2 {font-size:22px!important;overflow-wrap:anywhere}
 html body .z-tafel:has(.z-formular) .z-tafel-leib {padding:14px!important}
 html body .z-tafel-leib > .z-formular,html body .ws-record-editor > .z-formular {padding:17px!important;gap:19px;grid-template-columns:minmax(0,1fr)!important}
 html body :is(.gala-dialog,.auto-dialog,.tk-dialog) > form {padding:20px 17px!important}
 html body :is(.gala-form-grid,.auto-form-grid) {grid-template-columns:minmax(0,1fr)}
 html body :is(dialog,[role=dialog]) :is(input,select,textarea,.mh-select-trigger) {font-size:16px!important;max-width:100%}
 html body :is(dialog,[role=dialog]) .z-formular-fuss > button {flex:1 1 auto}
}
@media(prefers-reduced-motion:reduce) {html body :where(form,dialog,[role=dialog]) :is(input,select,textarea,button) {transition:none!important}}
@media(forced-colors:active) {
 html body :is(dialog,[role=dialog]):has(form),html body :is(dialog,[role=dialog]):has(form)>header {background:Canvas!important;color:CanvasText!important;border:1px solid CanvasText!important}
 html body :is(dialog,[role=dialog]):has(form)>header :is(h2,h3,p,button) {color:CanvasText!important}
 html body :where(form,dialog,[role=dialog]) :is(input,textarea,select,button,.mh-select-trigger) {background:Canvas!important;color:CanvasText!important;border:1px solid ButtonText!important;forced-color-adjust:auto}
}
}
