/* A modal workspace uses the top layer so the previous record is inert. */
.ps-dialog{inset:0;margin:auto;border:1px solid var(--line);border-radius:18px;padding:0;background:#fff;color:var(--ink);width:min(760px,calc(100vw - 24px));max-width:none;height:min(900px,calc(100dvh - 24px));max-height:none;overflow:hidden}
.ps-dialog::backdrop{background:rgba(14,44,32,.6)}
.ps-dialog[open]{display:flex;flex-direction:column}
/* Places must join the native dialog's top layer to remain visible and tappable. */
.ps-dialog.nzr-places-open{overflow:visible}
.ps-dialog>.pac-container .pac-item{min-height:44px;line-height:44px}
.ps-head{padding:16px 20px;border-bottom:1px solid var(--line);flex:none;background:var(--mint)}
.ps-head h2{font:800 20px Montserrat,Inter,sans-serif;margin:0 0 8px}.ps-head p{font-size:13px;margin:4px 0;overflow-wrap:anywhere}
#psBody{min-height:0;overflow:auto;flex:1;display:flex;flex-direction:column}
.ps-dialog #pform{display:flex!important;flex:1;flex-direction:column;padding:0!important;margin:0!important;border:0!important;background:#fff}
.ps-dialog [data-ps-step]{padding:20px;flex:1}.ps-dialog [hidden]{display:none!important}.ps-dialog h3{font:800 16px Montserrat,Inter,sans-serif;margin:0 0 16px}
.ps-dialog input:not([type=checkbox]),.ps-dialog select,.ps-dialog textarea{width:100%;box-sizing:border-box;font-size:16px!important;min-height:44px}
.ps-dialog label,.ps-dialog .hint{font-size:13px!important;line-height:1.5}.ps-dialog label{display:block;margin-top:12px}
.ps-dialog .f2,.ps-dialog .grid2{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}.ps-dialog .ten-row>div{min-width:0!important;width:100%;flex-basis:100%!important}
.ps-actions{position:sticky;bottom:0;z-index:1;background:#fff;border-top:1px solid var(--line);padding:12px 20px max(12px,env(safe-area-inset-bottom));display:flex;gap:8px;flex-wrap:wrap;flex:none}
.ps-actions button,.ps-dialog .btn{min-height:44px!important;white-space:normal}.ps-actions #psMessage{flex-basis:100%;font-size:13px;line-height:1.5;margin:0}.ps-actions #psMessage:empty{display:none}.ps-actions #cancelBtn{margin-left:auto}
.ps-confirm{display:flex!important;align-items:flex-start;gap:12px}.ps-confirm input{width:22px;height:22px;flex:none}
#psReview dl>div{padding:10px 0;border-bottom:1px solid var(--line)}#psReview dt{font-size:13px;color:var(--mute)}#psReview dd{margin:4px 0 0;overflow-wrap:anywhere;font-size:15px}#psReview p{font-size:13px;line-height:1.55}.ps-followups{display:flex;gap:12px;flex-wrap:wrap}
@media(min-width:701px){.ps-dialog .f2,.ps-dialog .grid2{grid-template-columns:repeat(2,minmax(0,1fr))}.ps-dialog [data-ps-step]{padding:24px}}
@media(max-width:700px){.ps-dialog{width:100vw;height:100dvh;border:0;border-radius:0;margin:0}.ps-head{padding:16px}.ps-dialog [data-ps-step]{padding:16px}.ps-actions{padding-left:16px;padding-right:16px}}

.mw-secondary{border:1px solid var(--line);border-radius:16px;background:#fff;margin:0 0 24px;padding:0 16px}.mw-secondary>summary{min-height:66px;display:flex;align-items:center;cursor:pointer;font-weight:700;color:var(--forest)}.mw-secondary>summary::before{content:"+";margin-right:12px}.mw-secondary[open]>summary::before{content:"−"}.mw-secondary>section{margin-bottom:16px}

.mw-focus-tabs{flex-wrap:wrap}.mw-focus-more>summary{min-height:44px;display:flex;align-items:center;cursor:pointer;color:var(--forest);font-weight:700;padding:12px}.mw-focus-more{border-top:1px solid var(--line)}

body.property-setup-open{overflow:hidden}.ps-confirm{min-height:44px}

/* Named steps stay reachable without hiding the current form on a phone. */
#psSteps{display:flex;gap:4px;flex-wrap:wrap;margin-top:12px}
#psSteps button{flex:1;min-width:52px;min-height:44px;padding:6px 3px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--forest);font:600 11px Inter,sans-serif;cursor:pointer}
#psSteps button span{display:block;font-size:12px;margin-bottom:3px}
#psSteps button[aria-current="step"]{background:var(--forest);color:#fff;border-color:var(--forest)}
#psSteps button:focus-visible{outline:2px solid var(--green);outline-offset:2px}
#psSteps button:disabled{cursor:default}
.ps-draft-notice{font-size:12px;line-height:1.6;color:var(--mute);overflow-wrap:anywhere}
body.ro .ps-draft-notice{display:none!important}

/* Guided record updates retain the established setup and save controls. */
.pqe-update{padding:16px;background:var(--mint);border:1px solid var(--line);border-radius:14px;margin-bottom:12px}
.pqe-update label{display:block;font-size:15px;font-weight:800;color:var(--forest);margin:0}
.pqe-update p{font-size:13px;line-height:1.5;margin:8px 0;color:var(--mute)}
.pqe-update-controls{display:flex;flex-wrap:wrap;gap:12px;margin-top:12px}
.pqe-update-controls select{flex:1 1 220px;width:100%;min-width:0;min-height:48px;border:1px solid var(--line);border-radius:12px;background:#fff;padding:10px;font:400 16px Inter,sans-serif;color:var(--ink)}
.pqe-update-controls button{min-height:48px!important;flex:1 1 120px;white-space:normal}
.pqe-source-note{padding-top:8px;border-top:1px solid var(--line)}
.ps-record-summary{margin:20px 0;border:1px solid var(--line);border-radius:12px;padding:0 12px}
.ps-record-summary>summary{min-height:48px;display:flex;align-items:center;font-size:14px;font-weight:700;cursor:pointer}
#psReview .ps-changes dd{display:grid;grid-template-columns:55px minmax(0,1fr);gap:8px;white-space:pre-wrap}
.ps-change-label{font-size:12px;color:var(--mute)}
@media(max-width:430px){.pqe-update-controls>*{flex-basis:100%!important}}

.ps-dialog #psSource{margin:16px 20px 0!important;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--mint);font-size:13px!important;line-height:1.5}
/* Edit now beside Review and save (2026-10-15): two thumb-sized buttons on
   one row under the task picker, each at least 44px, never overlapping. */
.pqe-update-actions{display:flex;gap:8px;flex:1 1 100%;min-width:0}
.pqe-update .pqe-update-controls .pqe-update-actions>button{flex:1 1 0;min-width:0;min-height:48px;white-space:normal}
