.case-form-fields{display:grid;gap:15px;min-width:0}
.case-form-tabs{display:flex;gap:18px;border-bottom:1px solid var(--line);margin-bottom:18px}
.case-form-tabs button{border:0;border-bottom:2px solid transparent;background:transparent;min-height:44px;padding:10px 2px;color:#475569;font-size:14px;font-weight:600}
.case-form-tabs button:hover{color:var(--blue)}
.case-form-tabs button[aria-selected=true]{border-bottom-color:var(--blue);color:var(--blue)}
.case-preview-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px}
.case-preview-toolbar p{margin:0;max-width:64ch;color:#475569;font-size:13px;line-height:1.5}
.case-preview-toolbar label{flex:none}
/* macOS WebKit ignores min-height on a native pop-up select. */
.case-preview-toolbar select{appearance:none;-webkit-appearance:none;height:44px;min-height:44px;border-radius:8px;padding-right:32px;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%230b163a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center}
#casePreviewStatus{font-size:13px;line-height:1.5;color:#475569;overflow-wrap:anywhere}
#casePreviewStatus[data-state=error]{color:#a12635}
#casePreviewProblems{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}
#casePreviewProblems:empty{display:none}
#casePreviewProblems button{min-height:44px;white-space:normal;text-align:left}
#casePreviewRetry{margin-bottom:16px;min-height:44px}
.case-preview-stage{padding:16px;background:#e9eef6;border:1px solid #d6dfea;min-width:0}
.case-preview-stage:has(.case-preview-canvas:empty){display:none}
.case-preview-canvas{max-width:1080px;margin:0 auto}
.case-preview-canvas[data-format=phone]{max-width:390px}
.case-preview-canvas .pdf-page{position:relative;background:#fff}
.case-preview-canvas canvas{display:block;width:100%;height:auto}
.case-preview-canvas .pdf-page-link{position:absolute;z-index:1;cursor:pointer}
.case-preview-canvas .pdf-page-link:hover,.case-preview-canvas .pdf-page-link:focus-visible{outline:3px solid #ff9f1c;outline-offset:2px}
.case-preview-canvas .visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.portal-form .case-preview-invalid{border-color:#b42338;outline:2px solid #b42338;outline-offset:1px}
@media(max-width:600px){
 .case-form-tabs{gap:14px}
 .case-preview-toolbar{align-items:stretch;flex-direction:column;gap:10px}
 .case-preview-stage{padding:6px}
 #caseFormPanel .form-actions .portal-button{min-height:44px;white-space:normal}
}
