/* R27 見積ページ（/estimate/）: SWELL の post_content の中で Codex デザインを崩さないための土台。
 * 読込順は estimate-base.css → estimate-design.css → panel-layout.css → case-packages.css → document-flow.css → estimate-live-total.css。
 * 子テーマ style.css は p/a/label/input/button 等の文字サイズと h1〜h3 の余白を !important で固定しているので、
 * ここで .led-estimate-r27 の中だけ inherit に戻し、デザイン側の値（生成 CSS で !important 付き）を効かせる。 */
.led-estimate-r27{min-width:0;text-align:left}
.led-estimate-r27 :is(p,li,label,a,input,select,textarea,button,td,th,small,figcaption,summary,legend){font-family:inherit;font-size:inherit!important;line-height:inherit}
.led-estimate-r27 :is(h1,h2,h3,h4){font-size:inherit!important;padding:0!important;border:0!important;background:none!important;position:static;z-index:auto;letter-spacing:normal;overflow-wrap:break-word}
.led-estimate-r27 :is(h1,h2,h3,h4)::before,.led-estimate-r27 :is(h1,h2,h3,h4)::after{display:none!important}
.led-estimate-r27 :is(p,li,dl,dd,dt,figure,ul,ol,table){margin:0!important}
.led-estimate-r27 :is(ul,ol){padding:0!important}
.led-estimate-r27 li{position:static}
.led-estimate-r27 small{opacity:1}
.led-estimate-r27 dt{font-weight:inherit}
.led-estimate-r27 :is(td,th){border:0!important;background:none;padding:0!important}
.led-estimate-r27 table :is(td,th){color:inherit;background:none;font-weight:inherit;text-align:inherit}
.led-estimate-r27 table{border:0;line-height:inherit}
.led-estimate-r27 a{text-decoration:underline!important;text-underline-offset:5px!important;color:var(--navy,#0b2b45)!important}
.led-estimate-r27 :is(input,select,textarea){box-shadow:none;border-radius:0}
.led-estimate-r27 :is(a,button,input,select,summary){touch-action:manipulation}
.led-estimate-r27 img{display:block;max-width:100%;height:auto}
.led-estimate-r27 svg{max-width:100%}
.led-estimate-r27 .icon-definitions{position:absolute;width:0;height:0;overflow:hidden}

/* 必須の印と、SWELL の固定ヘッダーの下に追従する進行ナビ */
.led-estimate-r27 .field-label{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.led-estimate-r27 .req{font-style:normal;font-weight:700;color:#b4283c;font-size:var(--small)!important}
.led-estimate-r27 .opt{font-style:normal;font-weight:400;color:var(--muted);font-size:var(--small)!important}
/* 二重クラスは、後から読む生成CSS（top:0 / scroll-margin-top）に勝つための指定 */
.led-estimate-r27 .estimate-progress.estimate-progress{top:var(--led-fixed-header,0px)}
.led-estimate-r27 .pl-support.pl-support{top:calc(var(--led-fixed-header,0px) + var(--estimate-progress-height,150px))}
.led-estimate-r27 .step-card.step-card,.led-estimate-r27 .quote-summary.quote-summary,.led-estimate-r27 .review-section.review-section{scroll-margin-top:calc(var(--led-fixed-header,0px) + var(--estimate-progress-height,145px) + 16px)}
.led-estimate-r27 #hanging-load{scroll-margin-top:calc(var(--led-fixed-header,0px) + var(--estimate-progress-height,145px) + 16px)}

/* 見積書作成の状態表示（サーバーへの送信中・エラー） */
.led-estimate-r27 .quote-request-status{margin-top:16px!important;font-size:var(--small)!important;color:var(--muted)}
.led-estimate-r27 .quote-request-status[data-kind="error"]{border-left:3px solid #ad5f50;background:#fff7f5;padding:14px 16px!important;color:#7a2b1b!important}
.led-estimate-r27 .quote-request-status[data-kind="busy"]{color:var(--cyan-deep)!important}
.led-estimate-r27 .review-action{flex-wrap:wrap}
.led-estimate-r27 .review-action>.quote-request-status{flex-basis:100%}
.led-estimate-r27 .contact-preview .field select{padding-right:28px}
.led-estimate-r27 .contact-consent{margin-top:4px}

/* 帳票側の追加：注文依頼のご連絡事項、送信結果、期限 */
.led-estimate-r27 .dw textarea{display:block;width:100%;min-height:110px;border:1px solid #a6bec9;padding:12px 14px!important;background:#fff;line-height:1.75;resize:vertical}
.led-estimate-r27 .dw-message{display:block;margin:16px 0!important;font-size:15px!important}
.led-estimate-r27 .dw-message>span{display:block;font-weight:700;margin-bottom:6px!important}
.led-estimate-r27 .dw-message small{display:block;color:var(--dw-muted);margin-top:6px!important;font-size:13px!important}
.led-estimate-r27 .dw-info{border-left:3px solid var(--dw-blue);background:#edf7f9;padding:12px 18px!important;font-size:14px!important;margin-bottom:24px!important}
.led-estimate-r27 .dw-info strong{margin-right:12px!important}
.led-estimate-r27 .dw-status{font-size:14px!important;padding:12px 14px!important;background:#ecf7f9;margin:15px 0!important}
.led-estimate-r27 .dw-status[data-kind="error"]{background:#fff1f2;color:#972634!important;border-left:3px solid var(--dw-red)}
.led-estimate-r27 .dw-button[aria-busy="true"]{opacity:.7;cursor:progress}
@media(max-width:599px){.led-estimate-r27 .contact-preview{gap:14px}}
/* R28b (2026-09-27): 企業規模の未選択の赤字・見積書を作成できない理由・帳票の短い見積番号。 */
.led-estimate-r27 .field .field-error{display:block;margin:0!important;color:#b4283c!important;font-size:var(--small)!important;font-weight:700;line-height:1.6}
.led-estimate-r27 .review-action .quote-blocked-reason{flex-basis:100%;margin:0!important;border-left:3px solid #ad5f50;background:#fff7f5;padding:14px 16px!important;color:#7a2b1b!important;font-size:var(--small)!important;line-height:1.75}
.led-estimate-r27 .dw .dw-doc-foot .dw-ref-id{overflow-wrap:anywhere} /* R28b V3: 照合ID は1枚目の足元 */
.led-estimate-r27 .live-total-meta #live-total-delta .live-total-change{white-space:nowrap} /* R28b: 帯の「トラス一式を追加：＋137,045円」の金額を割らない（折り返しは「：」の後。帯の差分 C_差分/estimate-live-total.js と対） */
.led-estimate-r27 .dw .dw-table td span.dw-nowrap{display:inline;white-space:nowrap;margin:0!important;font-size:inherit!important} /* R28b: 詳細内訳の「土日祝25%」などを割らない（td span の display:block を打ち消す） */
/* R29 B（2026-09-28 社長指示）: 帳票の見出し・発行者・文字の3段階。document-flow.css（生成物）より後に読まれないため、
 * #led-estimate-r27 の ID で強さを確保する（印刷用タブも同じ id の入れ物を使う）。 */
/* 文字は大・中・小の3段階だけ（前提表「見た目の決まり」PC 32/18/15px・スマホ 28/18/15px。印刷は estimate-print.css で 20/11/9pt）。図の中の文字（SVG）は図の縮尺に従う。 */
#led-estimate-r27 .dw-paper{--dw-l:32px;--dw-m:18px;--dw-s:15px}
@media(max-width:599px){#led-estimate-r27 .dw-paper{--dw-l:28px}}
#led-estimate-r27 .dw-paper,#led-estimate-r27 .dw-paper *:not(svg):not(svg *){font-size:var(--dw-s)!important}
#led-estimate-r27 .dw-paper .dw-term::before{font-size:var(--dw-s)!important}
#led-estimate-r27 .dw-paper :is(.dw-doc-kind h2,.dw-total-amount){font-size:var(--dw-l)!important}
#led-estimate-r27 .dw-paper :is(.dw-customer-name,.dw-issuer-name,.dw-issuer-name *,.dw-project>strong,.dw-section-title,.dw-term h3,.dw-ref-no,.dw-config strong,.dw-totals .dw-final,.dw-totals .dw-final *,.dw-bank h3,.dw-checks h3){font-size:var(--dw-m)!important}
/* 子テーマの .post_content p/li/dd{max-width:42em} が帳票の段落を紙の6割の幅で折っていた（条件書の右側が空いていた原因） */
#led-estimate-r27 .dw-paper :is(p,li,dd,dt){max-width:none!important}
#led-estimate-r27 .dw-nowrap{white-space:nowrap}
/* 見出し：左に題（主）と番号・日付、右に発行者（1枚目）またはロゴ（2枚目以降）。ページ番号は足元だけ。 */
#led-estimate-r27 .dw-doc-head{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px 32px;align-items:start;margin-bottom:20px!important}
#led-estimate-r27 .dw-doc-kind{min-width:0;text-align:left}
#led-estimate-r27 .dw-doc-kind h2{line-height:1.3}
#led-estimate-r27 .dw-doc-kind>p{margin-top:2px!important;letter-spacing:.09em;color:var(--dw-muted)!important}
#led-estimate-r27 .dw-ref-list{display:flex;flex-wrap:wrap;gap:0 20px;margin:10px 0 0!important}
#led-estimate-r27 .dw-ref-list>div{display:flex;gap:8px;align-items:baseline;white-space:nowrap}
#led-estimate-r27 .dw-ref-list dt{color:var(--dw-muted)!important;font-weight:400}
#led-estimate-r27 .dw-ref-no{font-weight:700;color:var(--dw-ink)!important;letter-spacing:.04em}
#led-estimate-r27 .dw-ref-note{margin-top:8px!important;color:var(--dw-muted)!important;line-height:1.7}
#led-estimate-r27 .dw-issuer{width:21em;max-width:100%}
#led-estimate-r27 .dw-issuer>p{line-height:1.6}
#led-estimate-r27 .dw-issuer .dw-party-label{margin-bottom:4px!important}
#led-estimate-r27 .dw-issuer-logo{display:block;width:12em;max-width:100%;height:auto;margin:0 0 8px!important}
#led-estimate-r27 .dw-issuer-name{font-weight:700;line-height:1.45!important;margin:0 0 4px!important}
#led-estimate-r27 .dw-doc-brand img{display:block;width:10em;max-width:100%;height:auto}
#led-estimate-r27 .dw-doc-brand p{margin-top:4px!important;color:var(--dw-muted)!important}
#led-estimate-r27 .dw-parties .dw-project{padding:0!important}
#led-estimate-r27 .dw-facts>div{grid-template-columns:7.5em minmax(0,1fr)}
#led-estimate-r27 .dw-table td:nth-child(2){line-height:1.6}
#led-estimate-r27 .dw-config{grid-template-columns:minmax(0,1fr) 16em}
#led-estimate-r27 .dw-totals dt{word-break:keep-all;overflow-wrap:normal}
#led-estimate-r27 .dw-table td span{word-break:keep-all} /* 明細の注記は「・」の所で折る（「片付け」「1枚1日」を割らない） */
#led-estimate-r27 .dw-table td:nth-child(2) .dw-nowrap{color:inherit!important} /* 数量・単価の欄の「13,200円」を注記の灰色にしない */
@media screen and (max-width:599px){#led-estimate-r27 .dw-doc-head{grid-template-columns:minmax(0,1fr);gap:16px}#led-estimate-r27 .dw-issuer{width:auto}#led-estimate-r27 .dw-facts>div{grid-template-columns:minmax(0,1fr)}#led-estimate-r27 .dw-config{grid-template-columns:minmax(0,1fr)}
 /* スマホ幅：明細は1行を「内容（全幅）→ 数量・単価｜金額」に組み直す（15pxの字で3列に割ると語の途中で折れる） */
 #led-estimate-r27 .dw-table,#led-estimate-r27 .dw-table tbody{display:block;width:100%}#led-estimate-r27 .dw-table thead{display:none}
 #led-estimate-r27 .dw-table tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;padding:10px 0;border-bottom:1px solid #dbe5e9}
 #led-estimate-r27 .dw-table td{display:block;width:auto;padding:0!important;border:0!important}#led-estimate-r27 .dw-table td:first-child{grid-column:1/-1}#led-estimate-r27 .dw-table td:last-child{align-self:end}
 /* 合計欄は生成CSSの width:65%（3重クラス）がスマホでも残り、「割引後の参考額」が語の途中で折れていた */
 #led-estimate-r27 .dw-totals{width:100%!important}}
/* 2026-10-01 参考総額の下の「この条件で相談する」（白地に紺の枠。押すとご相談フォームへ。href は estimate-design.js が作る） */
.led-estimate-r27 .quote-summary>.button.estimate-contact-link{margin-top:12px!important;background:#fff;color:var(--navy)!important}
.led-estimate-r27 .quote-summary>.button.estimate-contact-link:hover{background:#f1f7f9}
/* 文字は1かたまりで折らない（区切りの箱を入れると WebKit で「この条件で␣相談する」と隙間が出るため）。320px 前後では余白を詰めて1行に収める */
.led-estimate-r27 .quote-summary>.button.estimate-contact-link .estimate-contact-label{white-space:nowrap}
@media(max-width:359px){.led-estimate-r27 .quote-summary>.button.estimate-contact-link{padding-inline:12px!important;gap:10px}}
