.quarter-page .card-calculator{padding-bottom:8px}.quarter-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.12fr);gap:32px;align-items:start}.quarter-preview{position:sticky;top:84px;text-align:center;padding:24px;border:1px solid var(--line);border-radius:var(--radius);background:#fff}.quarter-preview>img{display:block;width:100%;height:610px;object-fit:contain}.quarter-preview figcaption{margin-top:16px;font-size:14px;font-weight:500}.quarter-preview-note{font-size:12px;color:var(--muted);margin-top:8px}.quarter-controls{min-width:0}.quarter-controls fieldset{margin:0 0 24px;padding:0;border:0;min-width:0}.quarter-controls legend{font-size:16px;font-weight:500;margin-bottom:12px}.quarter-choices{display:flex;gap:8px;flex-wrap:wrap}.quarter-choice{position:relative;cursor:pointer}.quarter-choice input{position:absolute;width:1px;height:1px;opacity:0}.quarter-choice>span{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:12px 16px;border:1px solid var(--line);border-radius:12px;font-size:14px;line-height:1.4;height:100%}.quarter-choice input:checked+span{border-color:var(--green);background:var(--accent-soft);color:var(--green-dark)}.quarter-choice input:focus-visible+span{outline:2px solid var(--green);outline-offset:3px}.quarter-choice:hover>span{border-color:var(--green)}.quarter-samples{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}.quarter-samples .quarter-choice>span{padding:8px;font-size:13px;background:#fff}.quarter-samples img{width:100%;height:68px;object-fit:cover;border-radius:6px}.quarter-samples .quarter-choice input:checked+span{background:var(--accent-soft)}.quarter-quantities{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.quarter-quantities button{background:#fff;border:1px solid var(--line);border-radius:10px;padding:10px 6px;font-size:14px}.quarter-quantities button[aria-pressed=true]{border-color:var(--green);background:var(--accent-soft);color:var(--green-dark)}.quarter-custom{display:flex;gap:16px;align-items:center;margin-top:12px;font-size:14px;color:var(--muted)}.quarter-custom input{width:110px;padding:10px;border:1px solid var(--line);border-radius:10px;background:#fff}.quarter-spec{margin-bottom:20px;border-top:1px solid var(--line);padding-top:16px;font-size:14px}.quarter-spec summary{cursor:pointer;font-weight:500}.quarter-spec p{margin-top:10px;line-height:1.7;color:var(--muted);white-space:pre-line}.quarter-total{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px;border:1px solid var(--accent-line);border-radius:var(--radius);background:var(--accent-soft)}.quarter-total p{font-size:14px;max-width:180px}.quarter-total .text-btn{white-space:nowrap}.quarter-quote-note{font-size:12px;color:var(--muted);margin-top:12px}.quarter-design-link{border:0;background:none;padding:0;color:var(--green);text-decoration:underline}.quarter-info{margin-top:48px}.quarter-info p{max-width:850px;color:var(--muted);line-height:1.7}.quarter-info p+p{margin-top:12px}
@media(max-width:1000px){.quarter-layout{gap:24px}.quarter-preview>img{height:540px}.quarter-total{flex-direction:column;align-items:stretch}.quarter-total p{max-width:none}.quarter-samples{gap:6px}}
@media(max-width:767px){.quarter-layout{grid-template-columns:1fr;gap:24px}.quarter-preview{position:static;padding:16px}.quarter-preview>img{height:360px}.quarter-page .shape-tabs{margin-bottom:20px}.quarter-controls fieldset{margin-bottom:22px}.quarter-choice>span{padding:10px 12px;font-size:13px}.quarter-samples .quarter-choice>span{font-size:11px;padding:6px}.quarter-samples img{height:54px}.quarter-total{flex-direction:row;align-items:center;padding:14px;gap:10px}.quarter-total p{font-size:12px;max-width:140px}.quarter-total .text-btn{font-size:13px;padding:12px}.quarter-quantities{gap:6px}.quarter-info{margin-top:32px}}
@media(max-width:360px){.quarter-total{flex-direction:column;align-items:stretch}.quarter-total p{max-width:none}}

.quarter-fixed-spec{margin:0 0 24px;color:var(--muted);font-size:14px}

.quarter-quantities{grid-template-columns:repeat(4,minmax(0,1fr)) auto}#quarter-over-200{padding-inline:12px;white-space:nowrap;color:var(--green)}@media(max-width:767px){.quarter-quantities{grid-template-columns:repeat(4,minmax(0,1fr))}#quarter-over-200{grid-column:1/-1}}

/* Match the shared product choice controls. */
.quarter-choices:not(.quarter-samples){display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);width:100%}
.quarter-choices:not(.quarter-samples) .quarter-choice>span{min-height:45px;padding:6px 8px;border-radius:10px;font-size:14px;font-weight:500;gap:2px;text-align:center;box-shadow:var(--surface-shadow)}
.quarter-choice>span>small{font-size:11px;font-weight:400;color:var(--muted);line-height:1.4}
.quarter-samples .quarter-choice>span{font-weight:500}
.quarter-controls legend.sr-only{margin:0}
@media(max-width:767px){.quarter-choices:not(.quarter-samples) .quarter-choice>span{font-size:13px}.quarter-choice>span>small{font-size:10px}}
.quarter-choices:not(.quarter-samples) .quarter-choice>span{height:45px;min-height:45px;padding:4px 8px;line-height:1.2}
.quarter-choices:not(.quarter-samples) .quarter-choice>span>small{line-height:1.2}
/* Compact, evenly spaced choices on phones. */
.quarter-samples:has(input[name="springColor"]){grid-template-columns:repeat(3,minmax(0,1fr))}
.quarter-samples .quarter-choice>span{text-align:center}
@media(max-width:767px){
 .quarter-choices:has(input[name="size"]) .quarter-choice>span{font-size:12px;padding-inline:4px}
 .quarter-choices:has(input[name="size"]) .quarter-choice>span>span{white-space:nowrap}
 .quarter-samples .quarter-choice>span{padding:8px 5px;gap:8px;line-height:1.35}
 .quarter-samples:has(input[name="springColor"]) img{height:62px}
 .quarter-samples:has(input[name="springColor"]) .quarter-choice>span{font-size:12px}
 .quarter-controls .layout-actions{gap:10px}
 .quarter-controls .layout-action{min-height:48px;text-align:center}
}
@media(max-width:360px){
 .quarter-choices:has(input[name="size"]) .quarter-choice>span{font-size:11px;padding-inline:2px}
 .quarter-choices:has(input[name="size"]) .quarter-choice>span>small{font-size:9px}
}
/* Match the shared price-and-deadline order button. */
.quarter-total.quarter-order-actions{display:block;padding:0;border:0;background:transparent;margin:8px 0 0;border-radius:0;box-shadow:none}
.quarter-order-actions>.deadline-btn{width:100%;min-height:45px;border-radius:10px;background:var(--green);border-color:var(--green);color:#fff;gap:10px}
.quarter-order-actions>.deadline-btn strong{font-size:18px;color:#fff}.quarter-order-actions>.deadline-btn span{font-size:13px;color:#fff}
.quarter-cart-status{margin:10px 0 0;font-size:13px;color:var(--muted)}.quarter-cart-status:empty{display:none}
@media(max-width:360px){.quarter-order-actions>.deadline-btn{flex-wrap:wrap;gap:4px 10px;padding:10px}}

/* Mobile preview stays within the calculator, below the shared sticky header. */
.quarter-mobile-preview-copy{display:none}
.quarter-preview-dialog{width:min(620px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:16px;border:1px solid var(--line);border-radius:18px;background:#fff;color:var(--text);overflow:auto}
.quarter-preview-dialog::backdrop{background:#17211acc;backdrop-filter:blur(3px)}
.quarter-preview-close{display:block;margin:0 0 12px auto;min-height:44px;padding:10px 16px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--green-dark);font:inherit;cursor:pointer}
.quarter-preview-large{display:block;width:100%;height:calc(100dvh - 180px);min-height:180px;object-fit:contain}
.quarter-preview-description{margin:12px 0 0;font-size:13px;color:var(--muted);text-align:center;line-height:1.5}
.quarter-preview-open{overflow:hidden}
@media(max-width:767px){
 .quarter-layout{display:block}
 .quarter-preview{position:sticky;top:var(--header,60px);z-index:30;display:flex;align-items:center;gap:16px;height:158px;margin:0 0 24px;padding:12px 16px;background:#fff;border-radius:0 0 14px 14px;box-shadow:0 5px 12px #00000008}
 .quarter-preview>img{width:82px;height:132px;flex:none;cursor:zoom-in}
 .quarter-mobile-preview-copy{display:flex;flex-direction:column;align-items:flex-start;gap:3px;min-width:0;text-align:left;font-size:12px;line-height:1.35}
 .quarter-mobile-preview-copy strong{font-size:14px;font-weight:500;color:var(--text)}
 .quarter-preview-samples{display:flex;gap:6px;margin-top:2px}
 .quarter-preview-samples img{width:42px;height:24px;object-fit:cover;border-radius:4px}
 .quarter-preview-expand{padding:5px 0 0;border:0;background:transparent;color:var(--green);font:inherit;font-size:12px;text-decoration:underline;text-underline-offset:3px;min-height:28px;cursor:pointer}
 .quarter-controls{scroll-margin-top:calc(var(--header,60px) + 182px)}
 .quarter-controls input,.quarter-controls button,.quarter-controls summary{scroll-margin-top:calc(var(--header,60px) + 174px);scroll-margin-bottom:24px}
}
@media(max-width:360px){.quarter-preview{gap:12px;padding-inline:12px}.quarter-preview>img{width:72px}.quarter-mobile-preview-copy strong{font-size:13px}}


.quarter-choices:has(input[name="construction"]) .quarter-choice>span{height:auto;min-height:45px}
@media(max-width:767px){
 .quarter-choices:has(input[name="construction"]) .quarter-choice>span{min-height:62px;padding:7px 8px;gap:4px}
 .quarter-choices:has(input[name="construction"]) .quarter-choice>span>small{font-size:11px;line-height:1.3}
}
@media(max-width:767px){
 .quarter-preview{height:auto;min-height:180px;padding-block:12px}
 .quarter-preview>img{height:150px}
 #quarter-preview-details{white-space:pre-line;font-size:11px;line-height:1.4}
 .quarter-preview-samples{display:none}
 .quarter-controls input,.quarter-controls button,.quarter-controls summary{scroll-margin-top:calc(var(--header,60px) + 220px)}
}
.quarter-preview-dialog{padding-top:60px}
.quarter-preview-dialog>.quarter-preview-close{position:absolute;top:12px;right:12px;display:grid;place-items:center;width:36px;height:36px;min-height:36px;padding:0;margin:0;border:0;border-radius:50%;background:var(--card,#fff);color:var(--ink);cursor:pointer}
.quarter-floating-order{display:none}
@media(max-width:767px){
 .quarter-floating-order{display:block;position:fixed;bottom:0;left:0;right:0;z-index:34;padding:10px 12px calc(10px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid var(--line);box-shadow:0 -4px 18px #0000000d;transform:translateY(calc(100% + 20px));visibility:hidden;pointer-events:none;transition:transform .28s cubic-bezier(.22,.61,.36,1),visibility 0s linear .28s}
 .quarter-floating-order.is-visible{transform:translateY(0);visibility:visible;pointer-events:auto;transition-delay:0s}
 .quarter-floating-order>.deadline-btn,.quarter-order-actions>.deadline-btn{width:100%;min-height:58px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;background:var(--green);border-color:var(--green);border-radius:10px;color:#fff}
 .quarter-floating-order strong{font-size:18px;color:#fff}.quarter-floating-order span{font-size:13px;color:#fff}
 body.lock .quarter-floating-order,.quarter-preview-open .quarter-floating-order,.mobile-card-preview-open .quarter-floating-order{visibility:hidden}
}
@media(prefers-reduced-motion:reduce){.quarter-floating-order{transition:none}}
@media(min-width:768px){
 .quarter-total.quarter-order-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .quarter-order-actions>.deadline-btn{grid-column:2}
}
