.commerce { width: min(1120px, calc(100% - 32px)); margin: auto; padding: 36px 0 64px; }
.commerce.checkout { max-width: 760px; color: #30251f; }
.commerce h1, .commerce h2 { font-family: var(--serif); line-height: 1.15; font-weight: 400; }
.commerce h1 { font-size: clamp(2.2rem, 5vw, 3.75rem); margin: 8px 0 18px; }
.commerce h2 { margin: 24px 0 10px; }
.commerce a:not(.btn) { text-decoration: underline; }
.commerce label { display: grid; align-content: start; gap: 5px; font-size: .9rem; }
.commerce input:not([type=checkbox]), .commerce textarea, .commerce select { width: 100%; min-width: 0; min-height: 42px; padding: 8px; background: #fffdf8; color: var(--ink); border: 1px solid #aa9383; }
.commerce textarea { resize: vertical; }
.commerce-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.commerce-wide { grid-column: 1 / -1; }
.commerce-inline { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.commerce-inline label { min-width: 0; }
.commerce .commerce-check { display: flex; align-items: start; gap: 8px; margin: 14px 0; }
.commerce-check input { flex: none; }
.commerce-totals { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; background: #f0e5d7; padding: 14px; }
.commerce-totals dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.commerce-error { border: 1px solid #9c3d28; color: #7d2b1d; padding: 12px; }
@media (max-width: 560px) { .commerce-fields { grid-template-columns: minmax(0, 1fr); } }
.commerce-admin { background: #f8f3ea; }
.commerce-header { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.commerce-header span { font-size: .85rem; }
.commerce-header nav { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.commerce-header form { margin-left: auto; }
.commerce-stack { display: grid; justify-items: start; gap: 12px; }
.commerce-stack > label, .commerce-stack > .commerce-fields { width: 100%; }
.commerce-login { max-width: 400px; }
.commerce-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 12px; }
.commerce-metrics > div, .commerce-panel { border: 1px solid var(--line); background: #fffaf3; padding: 14px; min-width: 0; overflow-wrap: anywhere; }
.commerce-metrics strong { display: block; font-size: 1.4rem; }
.commerce-panel h2 { margin-top: 0; }
.commerce-filter { margin-bottom: 16px; }
.commerce-table { max-width: 100%; overflow-x: auto; }
.commerce-table table { width: 100%; border-collapse: collapse; text-align: left; }
.commerce-table th, .commerce-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.commerce-table th { background: #f0e5d7; white-space: nowrap; }
.commerce-history { padding-left: 18px; list-style: disc; overflow-wrap: anywhere; }
.commerce .privilege-signout { margin: 16px 0; }
.commerce .privilege-code { font-size: 1.3rem; overflow-wrap: anywhere; user-select: all; }
.commerce-stack { grid-template-columns: minmax(0, 1fr); }
.commerce-stack .btn { max-width: 100%; text-align: center; }
.commerce h1 { overflow-wrap: anywhere; }
