/* Summary first; editable fields stay available in one disclosure. */
#modal:has(.simple-bill){width:640px;max-width:calc(100vw - 32px);background:#fff}
#modal:has(.simple-bill) .modal-head{margin-bottom:16px;padding:12px 16px}
#modal:has(.simple-bill) .modal-head h2{font-size:20px}
#modal:has(.simple-bill) .modal-head .close{width:44px;height:44px;flex:none;background:#edf3ff;color:#17375f;font-size:28px}
.simple-bill{color:#17375f;min-width:0}
.bm-identity{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:14px}
.bm-identity strong{font-size:16px}.bm-identity p{margin:2px 0 0;font-size:14px;color:#52677f}
.bm-amount{display:flex;justify-content:space-between;align-items:center;gap:12px;background:#eaf1fc;border:2px solid #adc3e5;border-radius:12px;padding:16px 18px}
.bm-amount span{font-size:14px;color:#3a5375}.bm-amount strong{display:block;font-size:32px;font-weight:800;line-height:1.35;margin-top:2px;color:#17375f;font-variant-numeric:tabular-nums}
.bm-due{text-align:right;line-height:1.6;flex:none}.bm-due b{font-weight:600}
.bm-item-list{padding:8px 2px 0}.bm-item-list .bill-line{padding:9px 0;border-bottom:1px solid #d5dfec;color:#314a66;gap:12px;font-size:16px}
.bm-item-list .bill-line:last-child{border-bottom:0}.bm-item-list strong{white-space:nowrap;font-weight:600;color:#17375f}
.bm-item-list small{font-size:14px;line-height:1.5;margin-top:2px;color:#586b83}
.bm-meter-state{font-size:14px;color:#197151;margin:8px 0 12px}.bm-needs-meter{color:#925c16}
.bm-error{border:1px solid #da9a92;border-radius:8px;background:#fff4f2;padding:10px;color:#a02c24;font-size:14px}.bm-error[hidden]{display:none}
.bm-empty{font-size:15px;color:#586b83;padding:6px 0}
.bm-edit{border:2px solid #b8c9df;border-radius:10px;background:white;margin:10px 0 14px;overflow:hidden}
.bm-edit summary{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:11px 14px;min-height:48px;cursor:pointer;list-style:none;color:#234d8c;font-weight:600;font-size:15px;background:#f5f8fd}
.bm-edit summary::-webkit-details-marker{display:none}.bm-edit summary:focus-visible{outline:3px solid #3263ed;outline-offset:-3px}
.bm-edit-arrow{font-size:22px;line-height:1}.bm-edit[open] .bm-edit-arrow{transform:rotate(180deg)}
.bm-edit-body{padding:2px 14px 14px;border-top:1px solid #b8c9df}.bm-edit .form-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}
.bm-edit .field{margin:10px 0}.bm-edit .field input{min-width:0;border:1.5px solid #aebfda;font-size:16px;min-height:44px}
.bm-edit .meter-title{margin:14px 0 2px;font-size:16px}.bm-edit .meter-title span{display:block;float:none;font-size:14px;margin-top:3px}
.bm-edit .stay-info{margin:6px 0}.bm-edit .svc-info{flex-wrap:wrap}.bm-edit .svc-pill{min-width:0}
.bm-edit .bm-photos{flex-wrap:wrap}.bm-edit .preview-img{max-width:100%}
.bm-footer{background:#fff;padding-top:2px}.bm-actions{display:grid;grid-template-columns:1fr 2fr;gap:10px}
.bm-actions .btn{min-height:48px;border-width:1.5px;font-size:16px}.bm-line-note{font-size:14px;color:#52677f;text-align:center;margin:8px 0 0;line-height:1.5}
@media(max-width:600px){
 #modal:has(.simple-bill){max-width:100%;width:100%;padding:14px;max-height:94dvh}
 #modal:has(.simple-bill) .modal-head{position:sticky;top:-14px;z-index:5;margin:-14px -14px 14px;border-radius:0;padding:10px 14px;background:#17375f}
 #modal:has(.simple-bill) .modal-head h2{color:#fff;font-size:19px}
 .bm-amount{padding:12px 14px}.bm-amount strong{font-size:28px}.bm-amount span{font-size:14px}.bm-due{max-width:105px}
 .bm-item-list .bill-line{font-size:15px;padding:8px 0}.bm-identity{margin-bottom:12px}
 .bm-edit{margin-bottom:12px}.bm-edit-body{padding:2px 10px 10px}
 .bm-footer{position:sticky;bottom:-14px;z-index:3;margin:0 -14px -14px;padding:12px 14px max(14px,env(safe-area-inset-bottom));border-top:2px solid #b8c9df;box-shadow:0 -4px 12px #17375f0c}
 .bm-actions .btn{font-size:15px}.bm-line-note{text-align:left}
}
