.commerce-panel { margin-block: 20px; }
.commerce-panel form > .button, .commerce-fieldset + .button { margin-top: 12px; }
.commerce-list { overflow-wrap: anywhere; }
.commerce-prose { white-space: pre-wrap; overflow-wrap: anywhere; }
.commerce-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.commerce-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-bottom: 18px; }
.commerce-facts div { padding: 10px 0; border-bottom: 1px solid #e7d7c9; }
.commerce-facts dt, .commerce-summary dt { color: #674b3f; font-weight: 700; }
.commerce-facts dd, .commerce-summary dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.commerce-summary { align-self: start; position: sticky; top: 85px; }
.commerce-summary dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; }
.commerce-summary h2:not(:first-child) { margin-top: 24px; }
.commerce-summary li, .service-aside li { margin-block: 6px; }
.commerce-builder { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(255px,.8fr); gap: clamp(16px,4vw,45px); }
.commerce-builder .portal-panel { min-width: 0; border: 1px solid #e7d7c9; padding: clamp(15px,3vw,32px); border-radius: 12px; background: #fffaf3; }
.commerce-builder .form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.commerce-builder .form-field { display: grid; gap: 4px; align-content: start; }
.commerce-builder .field-wide { grid-column: 1 / -1; }
.commerce-builder :is(input,select,textarea) { min-width: 0; width: 100%; padding: 9px; min-height: 44px; border-radius: 6px; border: 1px solid #c5b2a4; font: inherit; color: inherit; background: #fffdf8; }
.commerce-fieldset { min-width: 0; border: 0; padding: 0 0 22px; margin: 0 0 16px; border-bottom: 1px solid #e7d7c9; }
.commerce-fieldset legend { font-weight: 760; font-size: 1.15em; margin-bottom: 12px; }
.commerce-service-cover { display: block; width: 100%; max-height: 440px; object-fit: cover; border-radius: 12px; margin-block: 14px; }
.commerce-card-price { display: inline-block; color: #8b3517; font-weight: 700; margin-top: 7px; }
.commerce-distribution > div { display: grid; grid-template-columns: minmax(7em,1fr) 2fr auto; align-items: center; gap: 10px; padding-block: 6px; }
.commerce-distribution meter { width: 100%; }
.commerce-distribution meter::-webkit-meter-optimum-value { background: #ba4c25; }
.pipeline-board { display: grid; grid-template-columns: repeat(8,minmax(190px,1fr)); gap: 10px; overflow-x: auto; padding: 4px 0 12px; }
.pipeline-lane { border: 1px solid #e7d7c9; background: #f7eee4; border-radius: 8px; min-height: 260px; padding: 9px; }
.pipeline-lane h2 { font-size: 1rem; display: flex; justify-content: space-between; gap: 10px; margin: 4px 2px 10px; }
.pipeline-lane h2 span { color: #674b3f; }
.pipeline-card { cursor: grab; padding: 10px; background: #fffdf8; border: 1px solid #eadfd4; border-radius: 6px; margin-bottom: 8px; overflow-wrap: anywhere; }
.pipeline-card h3 { margin: 0 0 5px; font-size: 1rem; }
.pipeline-card p { margin: 2px 0; }
.pipeline-target { outline: 2px solid #bd4d26; outline-offset: -2px; }
.pipeline-drag { opacity: .55; }
.commerce-quote-line { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 8px; padding: 8px 0; }
.commerce-quote-line .form-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.commerce-quote-line + .commerce-quote-line { border-top: 1px solid #e7d7c9; }
.proposal-document { max-width: 850px; margin-inline: auto; background: #fffdf8; color: #29211c; border: 1px solid #eadfd4; border-radius: 9px; overflow-wrap: anywhere; }
.proposal-heading { background: #f4e3d3; padding: clamp(20px,5vw,52px); border-top: 7px solid #c95124; }
.proposal-heading p { font-size: .85em; letter-spacing: .18em; font-weight: 750; color: #9b3e1b; margin: 0; }
.proposal-heading h1 { font-size: clamp(1.7rem,4vw,3rem); margin-block: .28em; }
.proposal-document section { padding: 12px clamp(20px,5vw,52px); }
.proposal-document section:last-child { padding-bottom: 40px; }
.proposal-document p { white-space: pre-wrap; }
.proposal-document section h2 { color: #8b3517; font-size: 1.2em; margin-bottom: 8px; }
.proposal-document table { width: 100%; border-collapse: collapse; }
.proposal-document :is(th,td) { border-bottom: 1px solid #e7d7c9; text-align: left; padding: 8px; }
.proposal-document tr > :last-child { text-align: right; }
.proposal-document tfoot { font-weight: 700; background: #f7eadb; }
.proposal-controls { max-width: 850px; margin: 20px auto; }
.proposal-pdf { margin: 0; font: 11pt/1.55 Arial,"PingFang SC","Noto Sans CJK SC",sans-serif; }
@media (max-width: 720px) {
  .commerce-builder, .commerce-columns { grid-template-columns: 1fr; }
  .commerce-summary { position: static; }
  .commerce-quote-line { grid-template-columns: 1fr; }
}
@media (max-width: 475px) {
  .commerce-builder .form-grid, .commerce-facts, .commerce-quote-line .form-grid { grid-template-columns: 1fr; }
}
@page { size: A4; margin: 15mm; }
@media print {
  body:has(.proposal-document) { background: #fff; margin: 0; }
  body:has(.proposal-document) :is(.site-header,.site-footer,.proposal-controls,.skip-link) { display: none !important; }
  .proposal-page { width: auto; padding: 0; }
  .proposal-document { border: 0; border-radius: 0; max-width: none; print-color-adjust: exact; }
  .proposal-document section { padding: 9px 0; }
  .proposal-document section:last-child { padding-bottom: 0; }
  .proposal-heading { padding: 20px 24px; margin-bottom: 12px; break-inside: avoid; }
  .proposal-document h2 { break-after: avoid; }
  .proposal-document tr { break-inside: avoid; }
  .proposal-document thead { display: table-header-group; }
  .proposal-document tfoot { display: table-row-group; }
}
