/* v89: all mobile workspaces have a viewport-bounded outer scroll surface.
   Inner vertical panes expand; tables retain horizontal scrolling. */
@media(max-width:880px) {
  body [role="dialog"][aria-modal="true"] {
    display:block!important;
    min-height:0!important;
    max-height:calc(100vh - 32px)!important;
    max-height:calc(100dvh - 32px)!important;
    overflow-y:auto!important;
    overscroll-behavior-y:contain;
    -webkit-overflow-scrolling:touch;
    touch-action:pan-x pan-y;
  }
  body [role="dialog"] :is(.estimate-layout,.estimate-editor,.estimate-summary,
    .customer-app-body,.customer-list-panel,.customer-list,.customer-detail-panel,
    .site-profit-workspace,.today-tasks-content,.estimate-settings-body,
    .estimate-review-large-content,.customer-estimate-sheet,.design-preview-content,
    .design-preview-pane,.onboarding-body,.beta-feedback-admin-body,.beta-admin-list) {
    height:auto!important; max-height:none!important; min-height:0!important;
    overflow:visible!important;
  }
  body [role="dialog"] :is(.estimate-layout,.customer-app-body) { display:block!important; }
  body .estimate-table-wrap {
    height:auto!important; max-height:none!important; min-height:0!important;
    overflow:auto; overscroll-behavior:auto;
    touch-action:pan-x pan-y;
  }
  body .estimate-table { margin-bottom:0; }
  body .customer-list { display:grid; }
  body .show-customer-detail .customer-detail-panel { overflow:visible!important; }
}
/* v88: one mobile scroll surface for the design form and its results. */
@media(max-width:880px) {
  #design3dModal .design3d-shell {
    display:block;
    height:100vh;
    height:100dvh;
    max-height:100dvh;
    overflow-y:auto;
    overscroll-behavior-y:contain;
    -webkit-overflow-scrolling:touch;
    touch-action:pan-y;
  }
  #design3dModal .design3d-body { display:block; height:auto; overflow:visible; }
  #design3dModal .design3d-settings { height:auto; max-height:none; overflow:visible; }
  #design3dModal .design3d-result { min-height:200px; height:auto; max-height:none; overflow:visible; }
  #design3dModal .design3d-header, #design3dModal .design-customer-linkbar { height:auto; }
}
/* v87: account dialog remains scrollable within the visible viewport. */
#authModal { min-height:0; padding:16px; }
#authModal .auth-dialog {
  box-sizing:border-box;
  min-height:0;
  max-height:calc(100vh - 32px);
  max-height:calc(100dvh - 32px);
  overflow-y:auto;
  overscroll-behavior-y:contain;
  -webkit-overflow-scrolling:touch;
  touch-action:pan-y;
  scroll-padding-block:20px;
}
/* v86: customer-first home and readable workspaces. */
html { scroll-padding-top: 96px; }
body h1, body h2, body h3, body button, body .quick-card, body p { word-break: keep-all; overflow-wrap: break-word; }
.hero.interior-hero { padding: 54px 0 48px; }
.interior-hero-grid { gap: 36px; align-items: center; }
.hero-copy h1 { font-size: clamp(32px,3.6vw,50px)!important; line-height: 1.24!important; letter-spacing: -.045em; }
.hero-title-line, .hero-title-accent { display: block; }
.hero-desc { font-size: 17px!important; line-height: 1.8!important; color: #455a69!important; }
.hero-meta { font-size: 13px!important; color: #536773!important; line-height: 1.7; }
.hero-cta-row { flex-wrap: wrap; gap: 12px; }
.hero-sample-cta-left { min-height: 52px; padding: 13px 18px!important; }
.hero-sample-cta-left strong { font-size: 14px!important; }
.hero-sample-cta-left span { display: block; font-size: 12px!important; margin-top: 4px; }
.signed-in-intro { display: none; }
.home-work-actions { display:none; }
.has-session .home-work-actions { display:flex; gap:10px; order:-1; }
.home-work-actions button { border:1px solid #c8dcd3; border-radius:10px; background:#fff; padding:12px 18px; font:inherit; font-size:14px; font-weight:800; color:#175e4b; cursor:pointer; }
.home-work-actions button:last-child { background:#0c2845; color:#fff; border-color:#0c2845; }
.interior-dashboard { display:flex; flex-direction:column; gap:16px; padding:24px!important; }
.dash-topline { margin:0; }
.dash-topline strong { font-size:18px; line-height:1.5; }
.quick-grid { margin:0; gap:12px; }
.quick-card { min-height:132px!important; padding:16px!important; }
.quick-card b { font-size:15px!important; line-height:1.5; }
.quick-card small { font-size:12px!important; line-height:1.7!important; color:#526572!important; }
.today-summary { margin:0; gap:8px; }
.summary-card { min-width:0; padding:12px 10px; }
.summary-card span { font-size:12px!important; color:#526572; }
.summary-card strong { font-size:18px; overflow-wrap:anywhere; }
.today-priority { margin:0; padding:16px; gap:12px; flex-wrap:wrap; }
.today-priority p { font-size:15px!important; line-height:1.6; }
.today-priority button:not([hidden]) { display:block!important; min-height:44px; padding:10px 16px; border:1px solid #bfd9d0; border-radius:10px; background:white; color:#126c55; font-size:14px; font-weight:800; cursor:pointer; }
body:not(.has-session) .today-summary, body:not(.has-session) .today-priority { display:none!important; }
.has-session .hero-copy > :not(.signed-in-intro) { display:none; }
.has-session .signed-in-intro { display:block; }
.signed-in-intro span { color:#13816a; font-weight:800; font-size:13px; }
.signed-in-intro h2 { font-size:30px; line-height:1.4; margin:8px 0; }
.signed-in-intro p { color:#526572; font-size:15px; line-height:1.7; margin:0; }
.has-session .interior-hero-grid { grid-template-columns:1fr!important; gap:24px; }
.has-session .interior-dashboard { width:100%; max-width:none; }
.has-session .dash-topline { display:none; }
.has-session .today-priority { order:-3; background:#eef8f4; }
.has-session .today-summary { order:-2; }
.has-session .quick-grid { grid-template-columns:repeat(6,minmax(0,1fr)); }
.has-session .interior-modules .section-kicker,.has-session .interior-modules h2,.has-session .interior-modules .section-sub,.has-session .workflow-grid { display:none; }
.has-session .interior-modules { padding:0 0 32px; }
.workflow-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; }
.module-card { padding:24px; min-height:220px; }
.module-card p { font-size:15px!important; line-height:1.8; color:#526572; }
.module-card small { display:block; margin-top:20px; font-size:12px; color:#15745c; line-height:1.6; }
.home-support-tools { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin-top:24px; padding:20px 0; }
.home-support-tools span { font-size:14px; color:#526572; margin-right:auto; }
.home-support-tools button { background:white; border:1px solid #d5e1e7; border-radius:10px; padding:12px 18px; font:inherit; font-size:14px; cursor:pointer; }
.customer-app-header h2,.design3d-header h2,.estimate-app-header h2 { font-size:24px; line-height:1.4; }
.customer-app-header p,.design3d-header p { font-size:14px!important; line-height:1.7; color:#526572!important; }
.customer-app-actions { flex-shrink:0; }
#newCustomerBtn { white-space:nowrap; min-height:44px; }
.customer-row-meta,.customer-row-next span,.customer-detail-label { font-size:13px!important; color:#536572; }
.customer-detail-shortcuts { grid-template-columns:repeat(2,minmax(0,1fr)); }
.customer-back { display:none; }
.estimate-layout { overflow:auto; align-items:start; }
.estimate-editor { overflow:visible; min-height:0; }
.estimate-editor > * { flex-shrink:0; }
.estimate-table-wrap { flex:none; height:clamp(320px,48vh,560px); min-height:320px; overflow:auto; }
.estimate-table thead { position:sticky; top:0; z-index:1; background:#edf4f7; }
.estimate-table th { font-size:13px; }
.estimate-table input,.estimate-table select { font-size:14px; min-height:40px; }
.estimate-editor-head small::after { content:' 좌우로 밀어 모든 금액 항목을 확인하세요.'; }
.design-options-disclosure summary::after { content:'구조·창호·문 위치·천장 유지 기본 적용'; display:block; margin-top:6px; font-size:12px; font-weight:500; line-height:1.6; color:#536572; }
.estimate-summary { overflow:visible; }
.design-options-disclosure { border:1px solid #d5e4df; border-radius:14px; background:#f7fbf9; padding:16px; margin:16px 0; }
.design-options-disclosure summary { font-size:15px; font-weight:800; color:#164c3e; cursor:pointer; }
.design-options-disclosure > p { font-size:13px; line-height:1.7; color:#526572; }
.design-step-help,.design-disclaimer,.design-tone-help { font-size:13px!important; line-height:1.7!important; color:#536572!important; }
.design-choice-grid button,.design-style-grid button { min-height:44px; }
.design3d-settings label,.design3d-settings select { font-size:13px; }
button:focus-visible,a:focus-visible,summary:focus-visible { outline:3px solid #2b9f84; outline-offset:3px; }
@media(max-width:1000px) {
 .has-session .quick-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
 .workflow-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .estimate-layout { grid-template-columns:1fr!important; display:block; }
}
@media(max-width:760px) {
 html { scroll-padding-top:80px; }
 .hero.interior-hero { padding:30px 0!important; }
 .hero-copy h1 { font-size:32px!important; line-height:1.3!important; margin:18px 0; }
 .hero-desc { font-size:16px!important; }
 .hero-desc br { display:none; }
 .hero-cta-row { display:grid; grid-template-columns:1fr; }
 .hero-cta-row > * { width:100%; }
 .hero-meta { margin-top:16px; }
 .nav-actions { gap:8px; }
 .nav-actions .auth-nav-btn { display:block!important; font-size:13px; white-space:nowrap; }
 .nav-actions .btn-small { padding:10px 12px; font-size:12px; }
 .interior-dashboard { padding:18px!important; border-radius:20px; }
 .quick-grid,.has-session .quick-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
 .quick-card { padding:14px!important; min-height:132px!important; }
 .quick-card b { font-size:14px!important; }
 .signed-in-intro h2 { font-size:25px; }
 .today-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .summary-card.profit { grid-column:1/-1; }
 .today-priority { display:flex; align-items:flex-start; }
 .today-priority p { flex-basis:100%; margin:0; }
 .today-priority button { width:100%; }
 .workflow-grid { grid-template-columns:1fr; }
 .module-card { min-height:0; padding:22px; }
 .interior-modules h2 { font-size:27px; line-height:1.4; }
 .home-support-tools { align-items:stretch; flex-direction:column; }
 .customer-app-header { display:grid; grid-template-columns:1fr; gap:14px; padding:20px!important; position:relative; }
 .customer-app-header > div:first-child { padding-right:40px; }
 .customer-app-header h2 { font-size:21px!important; max-width:none; }
 .customer-app-actions { justify-content:flex-start; }
 .customer-app-actions .customer-close-btn { position:absolute; right:16px; top:16px; }
 #newCustomerBtn { padding:12px 18px; }
 .customer-app-body { min-height:0; overflow:hidden; grid-template-columns:1fr; }
 .customer-list-panel { min-height:0; }
 .customer-row { padding:14px; }
 .customer-detail-panel { padding:16px; }
 .show-customer-detail .customer-list-panel,.show-customer-detail .customer-toolbar { display:none!important; }
 .show-customer-detail .customer-detail-panel { display:block!important; overflow:auto; }
 .customer-back { display:block; margin:0 0 16px; padding:12px 14px; border:1px solid #c9dcd4; border-radius:10px; background:#fff; color:#175e4b; font-size:14px; font-weight:800; }
 .customer-info-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .estimate-editor-head { align-items:flex-start; flex-direction:column; }
 .estimate-table-wrap { height:360px; min-height:360px; }
 .estimate-editor { padding:16px 12px; }
 .design3d-header h2 { font-size:21px; }
 .design3d-settings { padding:16px; }
 .design-options-disclosure { padding:14px; }
 input,select,textarea { font-size:16px; }
}
