:root {
    --ink: #181716;
    --ink-soft: #4c4945;
    --paper: #f7f3ec;
    --paper-deep: #eee7dc;
    --white: #fffdfa;
    --red: #c73b2f;
    --red-dark: #97271f;
    --amber: #f1b24b;
    --line: #d8d0c5;
    --success: #276b4c;
    --shadow: 0 18px 60px rgba(41, 29, 18, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
    background: var(--paper);
}

body {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    overflow-x: hidden;
    color: var(--ink);
    background:
        radial-gradient(circle at 92% 2%, rgba(241, 178, 75, 0.22), transparent 22rem),
        linear-gradient(180deg, #fffaf2 0, var(--paper) 28rem);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
    max-width: 100%;
    font: inherit;
}

button {
    color: inherit;
    touch-action: manipulation;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible,
a:focus-visible {
    outline: 3px solid var(--amber);
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 100;
    display: inline-flex;
    min-height: 44px;
    padding: 10px 14px;
    align-items: center;
    transform: translateY(-160%);
    border-radius: 10px;
    color: var(--white);
    background: var(--ink);
}

.skip-link:focus {
    transform: translateY(0);
}

.app-shell {
    display: flex;
    width: min(100%, 760px);
    min-width: 0;
    margin: 0 auto;
    padding: 18px max(14px, env(safe-area-inset-left)) calc(110px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-right));
    flex-direction: column;
}

.intro { order: 1; }
.mode-switch { order: 2; }
.progress-wrap { order: 3; }
.editor-context { order: 4; }
.quick-flow { order: 5; }
.retail-panel { order: 6; }
.quote-result { order: 7; }
.production-notes { order: 8; }
.pricing-caveat { order: 9; }

.intro {
    position: relative;
    min-width: 0;
    min-height: 48px;
    padding: 7px 104px 14px;
    text-align: center;
}

.eyebrow,
.step-kicker {
    margin: 0 0 7px;
    color: var(--red-dark);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.intro h1 {
    max-width: none;
    margin: 0;
    font-size: clamp(27px, 8vw, 36px);
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.quote-back-link {
    position: absolute;
    top: 6px;
    left: 4px;
    display: inline-flex;
    min-height: 44px;
    padding: 8px 8px;
    align-items: center;
    border-radius: 10px;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 850;
    text-decoration: none;
}

.quote-back-link:hover {
    color: var(--red-dark);
    background: rgba(255, 253, 250, 0.7);
}

.client-quote-mode [data-submit-project],
.client-quote-mode [data-submit-order] {
    display: none;
}

.client-quote-mode .result-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.intro-copy,
.panel-copy {
    max-width: 560px;
    margin: 5px 0 0;
    color: var(--ink-soft);
    font-size: 14px;
}

.mode-switch {
    display: grid;
    min-width: 0;
    margin: 0 0 18px;
    padding: 5px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 253, 250, 0.74);
}

.mode-button {
    display: flex;
    min-width: 0;
    min-height: 58px;
    padding: 8px 10px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border: 0;
    border-radius: 13px;
    background: transparent;
    cursor: pointer;
}

.mode-button span {
    font-weight: 900;
}

.mode-button small {
    color: var(--ink-soft);
    font-size: 11px;
}

.mode-button.is-active {
    color: var(--white);
    background: var(--ink);
    box-shadow: 0 6px 18px rgba(24, 23, 22, 0.17);
}

.mode-button.is-active small {
    color: rgba(255, 255, 255, 0.72);
}

.progress-wrap {
    display: none;
    margin: 0 4px 14px;
    align-items: center;
    gap: 12px;
}

.progress-track {
    height: 7px;
    flex: 1 1 auto;
    overflow: hidden;
    border-radius: 99px;
    background: var(--paper-deep);
}

.progress-value {
    display: block;
    width: 25%;
    height: 100%;
    border-radius: inherit;
    background: var(--red);
    transition: width 180ms ease;
}

.progress-copy {
    flex: 0 0 auto;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 800;
}

.editor-context {
    display: flex;
    min-width: 0;
    min-height: 48px;
    margin: 0 0 10px;
    padding: 4px 5px 4px 14px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
    font-size: 12px;
}

.editor-context strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

.editor-context button {
    min-height: 44px;
    flex: 0 0 auto;
    padding: 7px 10px;
    border: 0;
    border-radius: 10px;
    color: var(--red-dark);
    background: transparent;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.quick-flow {
    display: grid;
    min-width: 0;
    gap: 10px;
}

.quote-step {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 253, 250, 0.88);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.quote-step[data-step="4"] { order: 4; }
.quote-step[data-step="5"] { order: 5; }

.quote-step.is-active {
    border-color: rgba(199, 59, 47, 0.48);
    box-shadow: var(--shadow);
}

.quote-step[hidden] {
    display: none;
}

.step-summary {
    display: none;
    width: 100%;
    min-width: 0;
    min-height: 64px;
    padding: 10px 14px;
    align-items: center;
    gap: 11px;
    border: 0;
    background: var(--white);
    text-align: left;
    cursor: pointer;
}

.quote-step.is-collapsed .step-summary {
    display: flex;
}

.quote-step.is-collapsed .step-content {
    display: none;
}

.step-summary > span:nth-child(2) {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
}

.step-summary small {
    color: var(--ink-soft);
    font-size: 11px;
}

.step-summary strong {
    min-width: 0;
    overflow: hidden;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.change-label {
    flex: 0 0 auto;
    color: var(--red-dark);
    font-size: 12px;
    font-weight: 800;
}

.step-content {
    min-width: 0;
    padding: clamp(17px, 5vw, 28px);
}

.step-heading {
    display: flex;
    min-width: 0;
    margin-bottom: 18px;
    align-items: flex-start;
    gap: 12px;
}

.step-number {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border-radius: 50%;
    color: var(--white);
    background: var(--red);
    font-size: 14px;
    font-weight: 900;
}

.step-heading h2,
.quote-result h2,
.optional-heading h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(25px, 7vw, 38px);
    line-height: 1.05;
    letter-spacing: -0.025em;
    text-wrap: balance;
}

.step-kicker {
    margin-bottom: 3px;
    font-size: 10px;
}

.quantity-presets,
.tap-grid {
    display: grid;
    min-width: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.quantity-presets-more {
    margin-top: 8px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quantity-presets button,
.tap-grid button {
    min-width: 0;
    min-height: 52px;
    padding: 9px 7px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
    font-weight: 900;
    cursor: pointer;
}

.quantity-presets button:hover,
.tap-grid button:hover,
.quantity-presets button.is-active,
.tap-grid button.is-active {
    border-color: var(--red);
    color: var(--red-dark);
    background: #fff4ed;
}

.tap-grid button:disabled {
    border-color: var(--line);
    color: #9d9790;
    background: #f1ede7;
    cursor: not-allowed;
    opacity: 0.72;
}

.compact-choice-actions {
    display: flex;
    min-width: 0;
    margin-top: 8px;
    flex-wrap: wrap;
    gap: 6px;
}

.compact-choice-actions button,
.more-colors-button {
    min-width: 0;
    min-height: 44px;
    padding: 8px 11px;
    border: 0;
    border-radius: 11px;
    color: var(--red-dark);
    background: transparent;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.compact-choice-actions button:hover,
.more-colors-button:hover {
    background: #fff4ed;
}

.quantity-disclosure,
.custom-quantity-button {
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 48px;
    margin-top: 9px;
    padding: 9px 12px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid var(--line);
    border-radius: 13px;
    color: var(--ink);
    background: var(--paper);
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.quantity-action-row {
    display: grid;
    margin-top: 9px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.84fr);
    gap: 7px;
}

.quantity-action-row .quantity-disclosure,
.quantity-action-row .custom-quantity-button {
    min-height: 44px;
    margin-top: 0;
    padding: 7px 10px;
}

.quantity-disclosure {
    justify-content: space-between;
}

.quantity-disclosure .summary-plus {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
    font-size: 18px;
}

.quantity-disclosure[aria-expanded="true"] .summary-plus {
    transform: rotate(45deg);
}

.custom-quantity-button {
    border-color: transparent;
    color: var(--red-dark);
    background: transparent;
}

.quantity-disclosure:hover,
.custom-quantity-button:hover {
    border-color: var(--red);
    background: #fff4ed;
}

.quantity-custom {
    min-width: 0;
    margin-top: 8px;
}

.quantity-custom label,
.color-custom label,
.search-label,
.notes-field label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 800;
}

.quantity-custom > small,
.color-custom > small {
    display: block;
    margin-top: 6px;
    color: var(--ink-soft);
    font-size: 11px;
}

.quantity-input-row,
.catalog-search-row {
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.quantity-input-row input,
.catalog-search-row input,
.notes-field textarea {
    width: 100%;
    min-width: 0;
    min-height: 52px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--ink);
    background: var(--white);
    font-size: 16px;
}

.continue-button,
.catalog-search-row button {
    min-height: 52px;
    padding: 10px 16px;
    border: 0;
    border-radius: 14px;
    color: var(--white);
    background: var(--ink);
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.location-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.color-grid button {
    display: flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.color-choice-group {
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--paper);
}

.color-choice-tier {
    min-width: 0;
}

.color-choice-tier + .color-choice-tier {
    margin-top: 10px;
}

.color-choice-common {
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.color-range-label {
    margin: 0 0 6px;
    color: var(--ink-soft);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.color-grid-six {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.color-grid-four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.color-grid-more {
    margin-top: 0;
}

.color-grid-all {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
}

.more-colors-button {
    display: flex;
    width: 100%;
    margin: 0 0 9px;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--line);
    border-radius: 12px;
    background: var(--white);
}

.color-custom {
    min-width: 0;
    margin-top: 3px;
}

.step-help {
    margin: 13px 0 0;
    color: var(--ink-soft);
    font-size: 12px;
}

.method-grid {
    display: grid;
    min-width: 0;
    gap: 9px;
}

.method-grid button {
    display: grid;
    width: 100%;
    min-width: 0;
    min-height: 68px;
    padding: 11px 13px;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--white);
    text-align: left;
    cursor: pointer;
}

.method-grid button:hover,
.method-grid button.is-active {
    border-color: var(--red);
    background: #fff4ed;
}

.method-grid button > span:last-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.method-grid strong {
    font-size: 14px;
}

.method-grid small {
    margin-top: 2px;
    color: var(--ink-soft);
    font-size: 11px;
    overflow-wrap: anywhere;
}

.default-method-badge {
    display: inline-flex;
    margin-left: 5px;
    padding: 2px 5px;
    border-radius: 99px;
    color: var(--white);
    background: var(--red-dark);
    font-size: 8px;
    font-style: normal;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    vertical-align: 2px;
}

.method-icon {
    position: relative;
    display: block;
    width: 42px;
    height: 42px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--paper);
}

.method-icon::before,
.method-icon::after {
    position: absolute;
    content: "";
    border-radius: 7px;
}

.ink-dark::before {
    inset: 7px;
    background: var(--ink);
}

.ink-dark::after {
    inset: 13px;
    border: 2px solid var(--white);
}

.ink-light::before {
    inset: 7px;
    border: 2px solid var(--ink);
    background: var(--white);
}

.ink-transfer::before {
    width: 23px;
    height: 23px;
    top: 8px;
    left: 8px;
    border: 2px solid var(--red);
}

.ink-transfer::after {
    width: 23px;
    height: 23px;
    right: 6px;
    bottom: 6px;
    border: 2px solid var(--ink);
}

.ink-raised::before {
    inset: 10px 8px 7px 11px;
    background: var(--red);
    box-shadow: 5px -5px 0 var(--amber);
}

.location-options {
    min-width: 0;
    margin-top: 12px;
    overflow: hidden;
    border-top: 1px solid var(--line);
}

.location-options summary {
    display: flex;
    min-height: 54px;
    padding: 8px 2px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    list-style: none;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.location-options summary::-webkit-details-marker {
    display: none;
}

.location-options summary > span:first-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.location-options summary small {
    color: var(--red-dark);
    font-size: 9px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.location-options[open] > summary .summary-plus {
    transform: rotate(45deg);
}

.location-options-body {
    min-width: 0;
    padding: 2px 0 5px;
}

.location-options-body fieldset {
    min-width: 0;
    margin: 0;
    padding: 14px 0;
    border: 0;
    border-top: 1px solid var(--line);
}

.location-options-body legend {
    margin-bottom: 9px;
    padding: 0;
    font-size: 12px;
    font-weight: 900;
}

.location-options-body legend small {
    color: var(--ink-soft);
    font-size: 9px;
    font-weight: 700;
}

.specialty-method-grid {
    grid-template-columns: minmax(0, 1fr);
}

.location-save-row {
    display: grid;
    min-width: 0;
    margin-top: 14px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.location-save-row button {
    min-width: 0;
    min-height: 48px;
    padding: 9px 14px;
    border-radius: 13px;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.save-location {
    border: 0;
    color: var(--white);
    background: var(--ink);
}

.cancel-location {
    border: 1px solid var(--line);
    background: var(--white);
}

.quote-result,
.retail-panel,
.optional-details {
    min-width: 0;
    margin-top: 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.quote-result {
    padding: clamp(19px, 5vw, 30px);
    color: var(--white);
    background:
        radial-gradient(circle at 86% 8%, rgba(241, 178, 75, 0.30), transparent 12rem),
        var(--ink);
}

.quote-result[hidden],
.location-manager[hidden],
.retail-panel[hidden],
.optional-details[hidden],
.quote-dock[hidden],
.selected-product[hidden] {
    display: none;
}

.result-topline,
.optional-heading {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.start-over {
    min-height: 44px;
    flex: 0 0 auto;
    padding: 8px 0 8px 12px;
    border: 0;
    color: rgba(255, 255, 255, 0.72);
    background: transparent;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.result-price {
    display: flex;
    min-width: 0;
    margin-top: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 8px 12px;
}

.result-total {
    min-width: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(46px, 14vw, 76px);
    font-weight: 700;
    line-height: 0.92;
    letter-spacing: -0.055em;
    overflow-wrap: anywhere;
}

.result-per-item {
    padding-bottom: 6px;
    color: rgba(255, 255, 255, 0.67);
    font-size: 13px;
}

.result-per-item strong {
    color: var(--white);
}

.result-mode-note {
    margin: 15px 0 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}

.result-breakdown {
    display: grid;
    min-width: 0;
    margin-top: 19px;
    gap: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.breakdown-row {
    display: grid;
    min-width: 0;
    padding: 10px 0;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.78);
    font-size: 12px;
}

.breakdown-row span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.breakdown-row strong {
    color: var(--white);
}

.breakdown-row.is-total {
    font-size: 14px;
}

.result-actions {
    display: grid;
    min-width: 0;
    margin-top: 18px;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
}

.result-actions button {
    min-width: 0;
    min-height: 48px;
    padding: 9px 10px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 13px;
    color: var(--white);
    background: transparent;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.result-actions .save-quote {
    border-color: var(--white);
    color: var(--ink);
    background: var(--white);
}

.result-actions .save-quote:active {
    transform: translateY(1px);
}

.quote-step > .location-manager {
    min-width: 0;
    margin: 0;
    padding: 14px clamp(17px, 5vw, 28px) clamp(17px, 5vw, 24px);
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: rgba(255, 253, 250, 0.96);
    box-shadow: none;
}

.location-manager-heading {
    display: flex;
    min-width: 0;
    margin-bottom: 10px;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.location-manager-heading h2 {
    margin: 0;
    font-size: 18px;
    letter-spacing: -0.02em;
}

.location-manager-heading span {
    flex: 0 0 auto;
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 800;
}

.location-card-list {
    display: grid;
    min-width: 0;
    gap: 6px;
}

.location-card {
    display: grid;
    min-width: 0;
    padding: 8px 9px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--paper);
}

.location-card-copy {
    min-width: 0;
}

.location-card-title {
    display: flex;
    min-width: 0;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.location-card-title strong {
    min-width: 0;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.location-card-title strong:last-child {
    flex: 0 0 auto;
}

.location-card p,
.location-card small {
    min-width: 0;
    margin: 2px 0 0;
    color: var(--ink-soft);
    font-size: 10px;
    overflow-wrap: anywhere;
}

.location-card-actions {
    display: flex;
    min-width: 0;
    flex-direction: row;
    gap: 4px;
}

.location-card-actions button {
    min-width: 44px;
    min-height: 40px;
    padding: 6px 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--white);
    font-size: 10px;
    font-weight: 900;
    cursor: pointer;
}

.location-card-actions [data-remove-location] {
    color: var(--red-dark);
}

.another-location-choice {
    display: grid;
    min-width: 0;
    margin-top: 12px;
    padding: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
}

.another-location-choice > div:first-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.another-location-choice strong {
    font-size: 12px;
}

.another-location-choice small {
    margin-top: 2px;
    color: var(--ink-soft);
    font-size: 9px;
}

.another-location-options {
    display: grid;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(44px, 1fr));
    gap: 5px;
}

.another-location-options button {
    min-width: 76px;
    min-height: 54px;
    padding: 9px 15px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
}

.another-location-step {
    grid-template-columns: minmax(0, 1fr);
}

.another-location-step .another-location-options {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.another-location-options button.is-active {
    border-color: var(--red);
    color: var(--red-dark);
    background: #fff4ed;
}

.add-location-button {
    width: 100%;
    min-height: 54px;
    margin-top: 14px;
    padding: 10px 14px;
    border: 0;
    border-radius: 13px;
    color: var(--white);
    background: var(--red-dark);
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
}

.add-location-button:hover {
    background: var(--red);
}

.location-limit {
    margin: 9px 0 0;
    color: var(--ink-soft);
    font-size: 10px;
    text-align: center;
}

.retail-panel {
    padding: clamp(18px, 5vw, 28px);
    border: 1px solid var(--line);
    background: var(--white);
}

.optional-badge {
    flex: 0 0 auto;
    padding: 7px 9px;
    border-radius: 99px;
    color: var(--success);
    background: #e7f3ed;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.catalog-search-row {
    margin-top: 0;
}

.catalog-status,
.availability-note {
    margin: 9px 0 0;
    color: var(--ink-soft);
    font-size: 11px;
}

.catalog-status.is-error {
    color: var(--red-dark);
}

.catalog-results {
    display: grid;
    min-width: 0;
    margin-top: 12px;
    gap: 7px;
}

.catalog-product {
    display: grid;
    width: 100%;
    min-width: 0;
    min-height: 66px;
    padding: 10px 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--paper);
    text-align: left;
    cursor: pointer;
}

.catalog-product > span:first-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.catalog-product strong,
.catalog-product small {
    min-width: 0;
    overflow-wrap: anywhere;
}

.catalog-product strong {
    font-size: 13px;
}

.catalog-product small {
    margin-top: 2px;
    color: var(--ink-soft);
    font-size: 10px;
}

.catalog-product-price {
    flex: 0 0 auto;
    color: var(--red-dark);
    font-size: 13px;
    font-weight: 900;
}

.selected-product {
    display: grid;
    min-width: 0;
    margin-top: 14px;
    padding: 15px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 11px;
    border: 2px solid var(--success);
    border-radius: 16px;
    background: #f1f8f4;
}

.selected-product h3 {
    margin: 0;
    font-size: 16px;
    overflow-wrap: anywhere;
}

.selected-product p:not(.eyebrow) {
    margin: 4px 0 0;
    color: var(--ink-soft);
    font-size: 11px;
}

.selected-product small {
    display: block;
    margin-top: 5px;
    color: var(--ink-soft);
    font-size: 10px;
}

.selected-product-price {
    display: flex;
    flex: 0 0 auto;
    align-items: flex-end;
    flex-direction: column;
}

.selected-product-price strong {
    font-size: 17px;
}

.selected-product-price span {
    color: var(--ink-soft);
    font-size: 9px;
}

.selected-product-actions {
    display: flex;
    min-width: 0;
    grid-column: 1 / -1;
    flex-wrap: wrap;
    gap: 7px;
}

.selected-product-actions button {
    min-height: 44px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--white);
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
}

.optional-details {
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--white);
}

.optional-details summary {
    display: flex;
    min-height: 52px;
    padding: 5px 14px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    list-style: none;
    font-weight: 900;
    cursor: pointer;
}

.optional-details summary::-webkit-details-marker {
    display: none;
}

.optional-details summary span:first-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.optional-details summary small {
    color: var(--red-dark);
    font-size: 9px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.production-summary {
    margin-top: 1px;
    color: var(--ink-soft);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

.summary-plus {
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    place-items: center;
    border-radius: 50%;
    color: var(--white);
    background: var(--ink);
    font-size: 21px;
    line-height: 1;
    transition: transform 160ms ease;
}

.optional-details[open] .summary-plus {
    transform: rotate(45deg);
}

.details-body {
    min-width: 0;
    padding: 0 14px 16px;
}

.details-body fieldset {
    min-width: 0;
    margin: 0;
    padding: 14px 0;
    border: 0;
    border-top: 1px solid var(--line);
}

.details-body legend {
    margin-bottom: 10px;
    padding: 0;
    font-size: 13px;
    font-weight: 900;
}

.detail-options {
    display: grid;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.rush-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-options button {
    display: flex;
    min-width: 0;
    min-height: 48px;
    padding: 8px 9px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--paper);
    font-size: 11px;
    font-weight: 900;
    text-align: center;
    cursor: pointer;
}

.detail-options button small {
    color: var(--ink-soft);
    font-size: 9px;
}

.detail-options button.is-active {
    border-color: var(--red);
    color: var(--red-dark);
    background: #fff4ed;
}

.notes-field {
    min-width: 0;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.notes-field textarea {
    min-height: 76px;
    resize: vertical;
}

.pricing-caveat {
    margin: 20px 8px 0;
    color: var(--ink-soft);
    font-size: 10px;
    text-align: center;
}

.quote-dock {
    position: fixed;
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    left: max(12px, env(safe-area-inset-left));
    z-index: 30;
    display: flex;
    width: min(calc(100% - 24px), 724px);
    min-width: 0;
    min-height: 66px;
    margin: 0 auto;
    padding: 9px 10px 9px 16px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 18px;
    color: var(--white);
    background: rgba(24, 23, 22, 0.96);
    box-shadow: 0 16px 48px rgba(24, 23, 22, 0.28);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}

.quote-dock.is-input-active {
    display: none;
}

.quote-dock > span {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.quote-dock small {
    color: rgba(255, 255, 255, 0.62);
    font-size: 9px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.quote-dock strong {
    min-width: 0;
    font-size: 20px;
    overflow-wrap: anywhere;
}

.quote-dock button {
    min-height: 46px;
    flex: 0 0 auto;
    padding: 9px 14px;
    border: 0;
    border-radius: 12px;
    color: var(--ink);
    background: var(--white);
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
}

.noscript-message {
    margin: 20px;
    padding: 14px;
    border-radius: 12px;
    color: var(--white);
    background: var(--red-dark);
}

@media (max-width: 420px) {
    .app-shell {
        padding-top: 12px;
    }

    .intro {
        padding-top: 4px;
        padding-right: 78px;
        padding-left: 78px;
    }

    .quantity-presets {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .quantity-presets-more {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .color-grid.color-grid-six {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .color-grid.color-grid-four {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
    }

    .color-grid-all {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .quantity-presets button,
    .color-grid button {
        padding-right: 4px;
        padding-left: 4px;
        font-size: 13px;
    }

    .quantity-input-row,
    .catalog-search-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .continue-button,
    .catalog-search-row button {
        width: 100%;
    }

    .result-actions {
        grid-template-columns: minmax(0, 1fr);
    }

    .location-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .location-card-actions {
        flex-direction: row;
    }

    .location-card-actions button {
        flex: 1 1 0;
    }

    .selected-product {
        grid-template-columns: minmax(0, 1fr);
    }

    .selected-product-price {
        align-items: flex-start;
    }
}

@media (min-width: 640px) {
    .app-shell {
        padding-top: 28px;
    }

    .intro {
        padding: 24px 10px 25px;
    }

    .mode-switch {
        max-width: 420px;
    }

    .method-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-options {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

.quote-platform-bar {
    position: sticky;
    top: 0;
    z-index: 70;
    display: flex;
    min-height: 56px;
    padding: 8px max(14px, env(safe-area-inset-left));
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid rgba(216, 208, 197, 0.9);
    background: rgba(255, 253, 250, 0.94);
    backdrop-filter: blur(18px);
}

.quote-platform-bar a,
.quote-platform-bar button {
    display: inline-flex;
    min-height: 40px;
    padding: 8px 12px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 11px;
    color: var(--ink);
    background: var(--white);
    font-size: 12px;
    font-weight: 850;
    text-decoration: none;
    cursor: pointer;
}

.quote-platform-bar strong {
    min-width: 0;
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quote-save-toast {
    position: fixed;
    right: 14px;
    bottom: calc(84px + env(safe-area-inset-bottom));
    z-index: 90;
    max-width: min(360px, calc(100vw - 28px));
    padding: 12px 15px;
    border-radius: 14px;
    color: var(--white);
    background: var(--success);
    box-shadow: var(--shadow);
    font-size: 13px;
    font-weight: 800;
}

.quote-save-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    padding: 16px;
    place-items: center;
    background: rgba(24, 23, 22, 0.66);
    backdrop-filter: blur(8px);
}

.quote-save-dialog {
    width: min(100%, 500px);
    max-height: min(90vh, 680px);
    overflow-y: auto;
    padding: 22px;
    border-radius: 22px;
    background: var(--white);
    box-shadow: 0 28px 90px rgba(24, 23, 22, 0.32);
}

.quote-save-dialog h2 {
    margin: 0;
    font-size: 24px;
    letter-spacing: -0.03em;
}

.quote-save-dialog > p {
    margin: 5px 0 18px;
    color: var(--ink-soft);
    font-size: 13px;
}

.quote-save-grid {
    display: grid;
    gap: 12px;
}

.quote-save-grid label {
    display: grid;
    gap: 6px;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 800;
}

.quote-save-grid input,
.quote-save-grid select {
    width: 100%;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--ink);
    background: #fff;
    font: inherit;
}

.quote-save-actions {
    display: grid;
    margin-top: 18px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
    gap: 8px;
}

.quote-save-actions button {
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--white);
    font-weight: 900;
    cursor: pointer;
}

.quote-save-actions .quote-save-submit {
    border-color: var(--ink);
    color: var(--white);
    background: var(--ink);
}

.quote-save-error {
    margin: 12px 0 0;
    color: var(--red-dark);
    font-size: 12px;
    font-weight: 750;
}
