.quote-page { padding: 0 0 2rem; }
.quote-page-header, .quote-page .estimate-panel { max-width: 46rem; margin: 0 auto; }
.quote-page-header { padding: 1.4rem clamp(1rem, 4vw, 2.25rem); border-bottom: 1px solid var(--visual-edge); }
.estimate-dialog { width: min(43rem, calc(100% - 2rem)); max-width: none; max-height: 92dvh; margin: auto; padding: 0; overflow: auto; overscroll-behavior: contain; border: 1px solid #636e53; border-top: 3px solid var(--signal); background: var(--canvas); color: var(--ink); }
.estimate-dialog::backdrop { background: #090c08ce; }
body:has(.estimate-dialog[open]) { overflow: hidden; }
.estimate-dialog-bar { position: sticky; top: 0; z-index: 1; display: flex; justify-content: flex-end; padding: .4rem .8rem; background: var(--canvas); border-bottom: 1px solid var(--visual-edge); }
.estimate-dialog-bar button { min-height: 2.75rem; padding-inline: 1rem; font-size: .94rem; }
.estimate-panel { padding: clamp(1.2rem, 3.4vw, 2.2rem); }
.estimate-panel .estimate-title, .estimate-result h2 { max-width: 100%; font: 700 clamp(2.5rem, 6vw, 3.7rem)/.96 var(--display); text-transform: none; letter-spacing: -.02em; }
.estimate-title span { display: inline; color: var(--signal); }
.estimate-intro, .receipt-help { margin: .75rem 0 1.2rem; color: var(--body); line-height: 1.5; }
.estimate-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem 1rem; margin-bottom: .85rem; }
.estimate-panel label { display: grid; gap: .35rem; font-weight: 650; }
.estimate-panel input:not([type=file]), .estimate-panel select, .estimate-panel textarea { width: 100%; min-height: 2.75rem; padding: .55rem .7rem; border: 1px solid #78846b; border-radius: 0; background: var(--raised); color: var(--ink); font: inherit; font-weight: 400; }
.estimate-panel textarea { resize: vertical; }
.estimate-panel select { appearance: none; padding-right: 2rem; background: linear-gradient(45deg, transparent 50%, currentColor 50%) right 1.03rem center / .33rem .33rem no-repeat, linear-gradient(135deg, currentColor 50%, transparent 50%) right .7rem center / .33rem .33rem no-repeat, var(--raised); }
.estimate-upload { margin: 1rem 0; padding: .85rem 1rem; border: 1px dashed #748361; background: var(--raised); }
.estimate-upload label { display: block; }
.estimate-upload label span, .estimate-upload p { color: var(--body); font-weight: 400; }
.estimate-upload p { margin: .32rem 0 .65rem; line-height: 1.4; font-size: .91rem; }
.estimate-upload input[type=file] { max-width: 100%; font-size: .9rem; }
.estimate-upload input::file-selector-button { padding: .48rem .75rem; margin-right: .55rem; background: var(--canvas); color: var(--ink); border: 1px solid #78846b; cursor: pointer; }
.estimate-photo-list { list-style: none; padding: 0; margin: 0; }
.estimate-photo-list li { display: flex; align-items: center; justify-content: space-between; gap: .7rem; border-top: 1px solid var(--visual-edge); margin-top: .6rem; padding-top: .45rem; }
.estimate-photo-list span { overflow-wrap: anywhere; }
.estimate-photo-list button { flex: none; background: none; color: var(--signal); border: 0; min-height: 2.5rem; text-decoration: underline; }
.estimate-status:not(:empty) { margin: .7rem 0; color: var(--ink); }
.estimate-panel [aria-invalid=true] { outline: 2px solid #f6b575; }
.estimate-submit:disabled { opacity: .65; cursor: wait; }
.estimate-result iframe { width: 100%; height: min(27rem, 52dvh); background: white; border: 1px solid var(--visual-edge); }
.estimate-edit { margin-top: .8rem; }
.estimate-map { margin: 0 0 1rem; background: var(--raised); border: 1px solid #58664c; }
.estimate-map > summary { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .8rem 2.25rem .8rem .8rem; color: var(--ink); }
.estimate-map > summary::before, .estimate-map > summary::after { right: .8rem; background: var(--signal); }
.estimate-map summary small { font-size: .9rem; color: var(--body); font-weight: 400; }
.estimate-map summary strong { font-size: .86rem; color: var(--signal); }
.map-editor { padding: 0 .8rem .85rem; }
.map-first .estimate-panel, .map-first .quote-page-header { max-width: 68rem; }
.map-first .estimate-title { max-width: 16em; }
.map-first .estimate-fields { margin-top: 1.6rem; }
.map-first .estimate-panel form > label, .map-first .estimate-fields, .map-first .estimate-upload { max-width: 44rem; }
.estimate-dialog-loading { margin: 1.5rem; }
@media (max-width: 600px) {
  .estimate-dialog { width: 100%; max-height: 100dvh; max-height: 100svh; }
  .estimate-panel { padding-bottom: max(1.3rem, env(safe-area-inset-bottom)); }
  .estimate-fields { grid-template-columns: 1fr; }
  .estimate-submit { width: 100%; }
}
