.postage-workspace { container-type: inline-size; min-width: 0; }
.postage-workspace *, .postage-workspace *::before, .postage-workspace *::after { box-sizing: border-box; min-width: 0; }
.postage-workspace [hidden] { display: none !important; }
.postage-workspace h3 { margin: 0 0 .6rem; }
.postage-workspace p, .postage-workspace h3, .postage-workspace label, .postage-workspace button, .postage-workspace a { overflow-wrap: anywhere; }
.postage-workspace input, .postage-workspace select { width: 100%; min-height: 44px; max-width: 100%; }
.postage-workspace label { display: grid; gap: .4rem; margin-bottom: 1rem; }
.postage-workspace button, .postage-workspace .button { min-height: 44px; min-width: 44px; white-space: normal; text-align: center; }
.postage-workspace :focus-visible { outline: 3px solid #1767a3; outline-offset: 3px; }
.postage-workspace fieldset { min-width: 0; border: 0; padding: 0; margin: 0 0 1.25rem; }
.postage-workspace legend { font-weight: 700; margin-bottom: 1rem; }
.postage-case { font-weight: 700; }
.postage-mode { color: #365874; margin: .25rem 0 1rem; }
.postage-step { color: #365874; font-weight: 700; }
.postage-fields, .postage-review { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.5rem; }
.postage-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin: 1rem 0; }
.postage-address { white-space: pre-line; }
.postage-summary, .postage-price, .postage-dispatch, .postage-notice { padding: 1.25rem; border: 1px solid #d4dfe7; border-radius: 14px; margin: 1rem 0; background: #fff; }
.postage-notice, .postage-summary { background: #f2f6f9; }
.postage-price > strong { display: block; font-size: 2rem; color: #163956; }
.postage-products { display: grid; gap: .75rem; }
.postage-workspace .postage-product { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: .75rem; padding: .8rem; border: 1px solid #bacbd9; border-radius: 12px; margin: 0; cursor: pointer; }
.postage-workspace .postage-product:has(input:checked) { border: 2px solid #365874; background: #f2f6f9; }
.postage-product input { width: 44px; height: 44px; margin: 0; }
.postage-product small { display: block; margin-top: .35rem; }
.postage-message { scroll-margin-block: 1rem; }
.postage-message:empty { display: none; }
.postage-error { color: #952517; padding: 1rem; background: #fff5f2; border-left: 3px solid currentColor; }
.postage-workspace [data-postage-field-error] { color: #952517; font-weight: 600; }
.postage-state { font-weight: 700; color: #365874; }
.postage-sheet-grid {display:grid;grid-template-columns:repeat(var(--postage-columns,2),minmax(44px,1fr));gap:.4rem;max-width:28rem;padding:.5rem;border:1px solid #bacbd9;border-radius:8px;background:#fff;}
.postage-sheet-grid button {border:1px solid #8299ad;background:#f2f6f9;color:#163956;border-radius:6px;}
.postage-sheet-grid button[aria-pressed="true"] {background:#365874;color:#fff;border:2px solid #163956;}
.postage-workspace .postage-document-picks label {display:grid;grid-template-columns:44px minmax(0,1fr);align-items:center;gap:.75rem;}
.postage-document-picks input {width:44px;height:44px;margin:0;}
.postage-linked {border-top:1px solid #d4dfe7;margin-top:1rem;padding-top:.5rem;}
.postage-settings-dialog{width:min(850px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;border:1px solid #bacbd9;border-radius:14px;padding:24px;color:#163956;background:#fff;}
.postage-settings-dialog::backdrop{background:rgb(11 15 23 / .55);}
.postage-settings-dialog header{display:flex;align-items:center;justify-content:space-between;gap:1rem;}
.postage-settings-dialog input[type="checkbox"]{width:44px;height:44px;}
@container (max-width: 540px) {
  .postage-fields, .postage-review { grid-template-columns: minmax(0, 1fr); gap: .25rem; }
  .postage-actions > * { flex: 1 1 100%; }
  .postage-workspace .postage-product { grid-template-columns: 44px minmax(0, 1fr); }
  .postage-product > strong { grid-column: 2; }
  .postage-summary, .postage-price, .postage-dispatch, .postage-notice { padding: 1rem; }
}
