/* Regulation EVO 1 shell: 12px field rhythm, separated heading/footer,
   Sorex tokens and buttons; PPK adapts its size to desktop/tablet/phone. */
.form-popup-open{overflow:hidden}
.page-head h1:has(.ppk-module-icon){display:flex;align-items:center;gap:10px}
.form-popup{width:min(620px,calc(100vw - 32px));max-width:none;height:fit-content;max-height:calc(var(--popup-height,100dvh) - 32px);padding:0;border:1px solid var(--line);border-radius:14px;color:var(--navy);background:#fff;box-shadow:0 8px 32px #102c4833;overflow:hidden}
.form-popup::backdrop{background:#102c4855}
.form-popup .ppk-editor{display:flex;flex-direction:column;width:100%;max-width:none;max-height:calc(var(--popup-height,100dvh) - 34px);margin:0;padding:0;gap:0;border:0;box-shadow:none;min-height:0;background:#fff}
.form-popup-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;border-bottom:1px solid var(--line);flex:none}
.form-popup-heading h2{margin:0;font-size:18px;line-height:1.4;overflow-wrap:anywhere}.form-popup-heading button{font-size:26px;line-height:1;width:44px;min-height:44px;flex:none}
.form-popup-body{padding:4px 18px 14px;overflow-y:auto;overscroll-behavior:contain;min-height:0;scroll-padding:18px;-webkit-overflow-scrolling:touch}
.form-popup .ppk-field-group{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border:1px solid var(--line);border-top:3px solid #0c589f;background:#f7f9fc;margin:16px 0;padding:14px;gap:12px}
.form-popup .ppk-field-group legend{display:block;font-size:15px;font-weight:700;padding:0 5px;color:var(--navy)}
.form-popup .ppk-field{min-width:0;font-size:14px}.form-popup input,.form-popup select,.form-popup textarea{width:100%;min-width:0;font-size:16px;min-height:46px;scroll-margin:18px}.form-popup .ppk-entry-hint{font-size:13px;color:var(--muted);margin:12px 0}
.form-popup .form-popup-footer{flex:none;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px;margin:auto 0 0;padding:12px 18px max(12px,env(safe-area-inset-bottom));border-top:1px solid var(--line);background:#fff}
.form-popup .form-popup-footer button{min-height:46px;flex:0 1 auto}.form-popup-error:empty{display:none}.form-popup-error{overflow-wrap:anywhere}
.ppk-common-summary,.ppk-technical-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0}.ppk-common-summary>div,.ppk-technical-summary>div{min-width:0;overflow-wrap:anywhere}.ppk-common-summary dt,.ppk-technical-summary dt{font-size:12px;color:var(--muted)}.ppk-common-summary dd,.ppk-technical-summary dd{margin:4px 0;font-size:14px;font-weight:600}.ppk-last-inspection{padding:12px;background:#f7f9fc;border:1px solid var(--line);border-radius:8px;margin-top:14px}.ppk-module-icon svg{width:24px;height:24px;display:block}
@media(pointer:coarse) and (min-width:601px){.form-popup{width:min(700px,calc(100vw - 40px))}.form-popup-body{padding-inline:22px}.form-popup .ppk-field-group{gap:16px;padding:18px}}
@media(max-width:600px){.form-popup{position:fixed;inset:auto 0 auto 0;top:var(--popup-top,0px);margin:0;width:100%;height:var(--popup-height,100dvh);max-height:var(--popup-height,100dvh);border-radius:0;border:0}.form-popup .ppk-editor{height:100%;max-height:100%;padding-top:env(safe-area-inset-top)}.form-popup .ppk-field-group{grid-template-columns:minmax(0,1fr);padding:12px}.form-popup-heading{padding:10px 14px}.form-popup-body{padding-inline:14px}.form-popup .form-popup-footer{padding-inline:14px;flex-wrap:wrap}.form-popup .form-popup-footer button{flex:1 1 0;white-space:normal}.form-popup .form-popup-footer .link{order:3;flex-basis:100%}.ppk-common-summary{grid-template-columns:1fr}}

.form-popup-open{overscroll-behavior:none}.form-popup{overscroll-behavior:none}.form-popup .form-popup-body{flex:1 1 auto;overflow-x:hidden;touch-action:pan-y}.form-popup textarea{resize:vertical;max-width:100%}.form-popup [hidden]{display:none!important}

.form-popup-heading,.form-popup-footer{position:sticky;z-index:2;background:#fff}.form-popup-heading{top:0}.form-popup-footer{bottom:0}.form-popup .form-popup-body{flex:1;min-height:0;scrollbar-gutter:stable}.form-popup textarea{max-height:var(--popup-body-space,220px);min-height:min(96px,var(--popup-body-space,96px))}.form-popup .form-popup-footer{flex-wrap:nowrap}.form-popup .form-popup-footer .link{font-size:12px}@media(max-width:600px){.form-popup .form-popup-footer{flex-wrap:wrap}}
