:root {
    --bg: #f8f6f2;
    --surface: #ffffff;
    --surface-soft: #f4efe7;
    --surface-strong: #ede6da;
    --text: #21303d;
    --muted: #627182;
    --line: #e6ddd0;
    --brand: #22384c;
    --brand-2: #b9935a;
    --brand-2-soft: #f4e4cc;
    --success: #51745b;
    --shadow: 0 18px 45px rgba(34, 56, 76, 0.08);
    --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

.topbar {
    background: #fbfaf8;
    color: var(--muted);
}
.topbar-link {
    color: var(--brand);
    font-weight: 700;
}

.site-navbar {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(12px);
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brand), #35536c);
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}
.brand-title {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: var(--text);
}
.brand-subtitle {
    font-size: 0.78rem;
    color: var(--muted);
}

.navbar .nav-link {
    color: var(--text);
    font-weight: 600;
    padding: 0.75rem 0.95rem;
    border-radius: 999px;
}
.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: var(--brand);
    background: rgba(185, 147, 90, 0.14);
}

.btn {
    border-radius: 999px;
    padding: 0.86rem 1.35rem;
    font-weight: 700;
    border-width: 1px;
}
.btn-brand {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}
.btn-brand:hover {
    background: #1b2d3c;
    border-color: #1b2d3c;
    color: #fff;
}
.btn-outline-brand {
    border-color: var(--brand);
    color: var(--brand);
    background: transparent;
}
.btn-outline-brand:hover {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

.section-pad {
    padding: 5.5rem 0;
}
.bg-soft {
    background: linear-gradient(180deg, #fbfaf7 0%, #f4efe7 100%);
}
.eyebrow,
.mini-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 800;
    color: var(--brand);
}
.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.12;
    font-weight: 800;
}
.section-copy,
.hero-copy {
    color: var(--muted);
    font-size: 1.06rem;
}

.hero-section {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(185, 147, 90, 0.20), transparent 28%),
        radial-gradient(circle at left center, rgba(34, 56, 76, 0.08), transparent 30%),
        linear-gradient(180deg, #fffdf9 0%, #f8f6f2 100%);
}
.hero-section::before,
.hero-section::after {
    content: '';
    position: absolute;
    border-radius: 999px;
    background: rgba(185, 147, 90, 0.12);
    filter: blur(10px);
}
.hero-section::before {
    width: 240px;
    height: 240px;
    top: -40px;
    right: -60px;
}
.hero-section::after {
    width: 180px;
    height: 180px;
    bottom: 40px;
    left: -60px;
}
.hero-title {
    font-size: clamp(2.6rem, 5.5vw, 4.75rem);
    line-height: 1.02;
    font-weight: 800;
    letter-spacing: -0.04em;
}
.hero-trust span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 0.95rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255,255,255,0.8);
    color: var(--muted);
    font-size: 0.94rem;
}
.hero-trust i,
.check-list i { color: var(--success); }

.shadow-soft,
.info-card,
.category-card,
.step-card,
.cta-panel,
.footer-cta,
.calculator-preview,
.showcase-card,
.hero-showcase {
    box-shadow: var(--shadow);
}

.hero-showcase {
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(230, 221, 208, 0.85);
    border-radius: calc(var(--radius) + 6px);
    padding: 1.7rem;
}
.hero-showcase-top {
    padding: 0.4rem;
}
.showcase-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.showcase-card {
    background: linear-gradient(180deg, #fff, #f8f5ef);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 1rem;
}
.showcase-card h3,
.info-card h3,
.category-card h3,
.step-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.45rem;
}
.showcase-card p,
.info-card p,
.category-card p,
.step-card p {
    color: var(--muted);
    margin-bottom: 0;
}
.showcase-icon,
.info-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-2-soft);
    color: var(--brand);
    margin-bottom: 0.85rem;
    font-size: 1.1rem;
}

.trust-strip {
    background: #fff;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.trust-pill {
    height: 100%;
    background: #fffdf9;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.95rem 1rem;
    font-weight: 700;
    color: var(--text);
}

.section-intro {
    max-width: 840px;
}
.info-card,
.category-card,
.step-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.65rem;
}
.category-card {
    min-height: 190px;
    background: linear-gradient(180deg, #ffffff 0%, #fbf8f2 100%);
}
.step-number {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--brand-2);
    font-weight: 800;
    letter-spacing: 0.12em;
}

.check-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.check-list li {
    position: relative;
    padding-left: 1.9rem;
    margin-bottom: 0.8rem;
}
.check-list li::before {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 0.1rem;
    color: var(--success);
}

.calculator-preview {
    background: linear-gradient(180deg, #fdfcf9 0%, #ffffff 100%);
    border: 1px solid var(--line);
    border-radius: 28px;
    overflow: hidden;
}
.preview-bar {
    height: 64px;
    background: linear-gradient(90deg, rgba(34,56,76,0.95), rgba(53,83,108,0.9));
}
.preview-body {
    padding: 1.5rem;
}
.preview-grid {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.preview-chip,
.preview-row,
.preview-card {
    background: #efe8dc;
    border-radius: 14px;
}
.preview-chip {
    height: 38px;
    flex: 1;
}
.preview-card {
    height: 150px;
    margin-bottom: 1rem;
}
.preview-card.small { height: 92px; }
.preview-row {
    height: 18px;
    margin-bottom: 0.75rem;
}
.preview-row.large { height: 48px; margin-bottom: 1rem; }
.preview-row.short { width: 40%; }

.cta-panel,
.footer-cta {
    background: linear-gradient(180deg, #fff 0%, #fbf7ef 100%);
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 2rem;
}

.site-footer {
    background: #fcfbf9;
    border-top: 1px solid var(--line);
}
.footer-heading {
    font-weight: 800;
    margin-bottom: 1rem;
}
.footer-links li + li { margin-top: 0.65rem; }
.footer-links a {
    color: var(--muted);
    text-decoration: none;
}
.footer-links a:hover,
.footer-contact-list a:hover {
    color: var(--brand);
}
.footer-contact-list,
.footer-bottom,
.site-footer p {
    color: var(--muted);
}

.table,
.card,
.accordion-item,
.form-control,
.form-select,
.list-group-item {
    border-color: var(--line);
}
.card,
.accordion-item {
    background: var(--surface);
    border-radius: 20px;
}
.form-control,
.form-select {
    min-height: 52px;
    border-radius: 14px;
}
textarea.form-control { min-height: 140px; }

.hero,
.service-card:hover {
    all: unset;
}

@media (max-width: 991.98px) {
    .section-pad { padding: 4.5rem 0; }
    .showcase-grid { grid-template-columns: 1fr; }
    .navbar .btn-brand { width: 100%; margin-top: 0.75rem; }
}

@media (max-width: 767.98px) {
    .hero-title { font-size: 2.55rem; }
    .section-title { font-size: 2rem; }
    .hero-showcase,
    .info-card,
    .category-card,
    .step-card,
    .cta-panel,
    .footer-cta { padding: 1.35rem; }
    .topbar .container { justify-content: center !important; }
}

/* Calculator helpers retained for the existing calculator page */
.min-w-90  { min-width: 90px; }
.min-w-110 { min-width: 110px; }
.min-w-150 { min-width: 150px; }
.min-w-160 { min-width: 160px; }

@media (max-width: 576px) {
    .room-row .d-flex {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .room-row input,
    .room-row select {
        font-size: 0.875rem;
    }

    .room-row .btn-sm {
        font-size: 1rem;
        padding: 0.25rem 0.5rem;
    }
}


.form-panel,
.contact-card,
.map-card,
.service-card,
.process-panel,
.service-area-box {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.form-panel,
.contact-card,
.map-card,
.process-panel {
    padding: 2rem;
}

.quote-badge,
.quote-inline-note {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: var(--brand-2-soft);
    color: var(--brand);
    font-weight: 700;
}
.quote-badge { padding: 0.65rem 1rem; }
.quote-inline-note {
    padding: 0.9rem 1rem;
    width: 100%;
    border: 1px solid rgba(185, 147, 90, 0.22);
}

.contact-list-item,
.process-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}
.contact-list-item {
    padding: 1rem;
    background: #fbfaf7;
    border: 1px solid var(--line);
    border-radius: 18px;
}
.contact-list-item i,
.service-icon,
.process-num {
    flex-shrink: 0;
}
.contact-list-item i,
.service-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-2-soft);
    color: var(--brand);
}
.service-area-box {
    padding: 1.15rem 1.25rem;
    background: linear-gradient(180deg, #fff 0%, #fbf7ef 100%);
}

.map-frame-wrap {
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--line);
}

.service-card {
    padding: 1.75rem;
    background: linear-gradient(180deg, #ffffff 0%, #fbf8f2 100%);
}
.service-card:hover {
    transform: translateY(-4px);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.service-icon {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}
.service-card h3 {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 0.65rem;
}
.service-card p,
.process-panel p,
.contact-card p,
.form-panel .text-secondary,
.map-card .text-secondary {
    color: var(--muted) !important;
}
.service-list {
    margin: 1rem 0 0;
    padding-left: 1.1rem;
    color: var(--muted);
}
.service-list li + li { margin-top: 0.4rem; }

.process-panel {
    background: linear-gradient(180deg, #fffdf9 0%, #f8f4ec 100%);
}
.process-step + .process-step {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
}
.process-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--brand);
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.04em;
}
.process-step h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

@media (max-width: 767.98px) {
    .form-panel,
    .contact-card,
    .map-card,
    .process-panel,
    .service-card {
        padding: 1.35rem;
    }
}

.notes-card,
.gallery-card,
.gallery-feature-card,
.review-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.notes-card {
    padding: 1.5rem;
}

.label {
    display: inline-block;
    font-size: 0.74rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 800;
}

.metric-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--brand);
    line-height: 1;
    margin-bottom: 0.75rem;
}

.gallery-feature-card,
.gallery-card {
    overflow: hidden;
}

.gallery-visual {
    min-height: 220px;
    background-size: cover;
    background-position: center;
}

.gallery-visual-lg {
    min-height: 360px;
}

.carpet-bg {
    background:
        linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.04)),
        linear-gradient(135deg, #d7cab8 0%, #b8a48d 50%, #ede5da 100%);
}

.vinyl-bg {
    background:
        linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.02)),
        linear-gradient(135deg, #9f8d7d 0%, #6d5c4e 50%, #d9cfc4 100%);
}

.hardwood-bg {
    background:
        linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.02)),
        linear-gradient(135deg, #8a5a3b 0%, #5d3924 50%, #d5b79f 100%);
}

.tile-bg {
    background:
        linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.03)),
        linear-gradient(135deg, #d7d7d5 0%, #b5b7bb 50%, #f3f3f1 100%);
}

.laminate-bg {
    background:
        linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.03)),
        linear-gradient(135deg, #c6b29a 0%, #98806b 50%, #ece3d9 100%);
}

.neutral-bg {
    background:
        linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.03)),
        linear-gradient(135deg, #ebe3d7 0%, #c7b6a1 50%, #f7f3ec 100%);
}

.gallery-card h3,
.review-card h3 {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 0.55rem;
}

.gallery-card p,
.review-card p,
.notes-card p {
    color: var(--muted);
}

.review-card {
    padding: 1.6rem;
}

.review-stars {
    color: var(--brand-2);
    letter-spacing: 0.08em;
}

.review-quote {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.review-author {
    font-weight: 700;
    color: var(--text);
}

.finance-stack {
    display: grid;
    gap: 0.9rem;
}

.finance-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.1rem;
    background: #fffdf9;
    border: 1px solid var(--line);
    border-radius: 18px;
}

.finance-row strong {
    color: var(--brand);
}

@media (max-width: 767.98px) {
    .gallery-visual-lg { min-height: 260px; }
    .notes-card,
    .review-card { padding: 1.25rem; }
}

.brand-mark {
    overflow: hidden;
    padding: 0;
}
.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.contact-quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.prefill-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fffdf8;
}
.summary-sticky {
    position: sticky;
    top: 110px;
}
.estimate-table thead th {
    white-space: nowrap;
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.empty-state {
    border: 1px dashed var(--line);
    border-radius: 18px;
    padding: 1.25rem;
    background: #fff;
    color: var(--muted);
    text-align: center;
}
.review-highlight {
    background: linear-gradient(180deg, #fff, #fbf7ef);
    border: 1px solid var(--line);
    border-radius: 26px;
    padding: 2rem;
    box-shadow: var(--shadow);
}
.review-placeholder-card {
    border-style: dashed;
}
.gallery-masonry {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.25rem;
}
.gallery-tile {
    min-height: 260px;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,0.45);
    grid-column: span 4;
}
.gallery-tile.wide { grid-column: span 8; }
.gallery-tile.tall { min-height: 380px; }
.gallery-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 1.4rem;
    color: #fff;
    background: linear-gradient(180deg, rgba(12,20,29,0.02), rgba(12,20,29,0.78));
}
.gallery-overlay h3 {
    font-size: 1.2rem;
    margin-bottom: .35rem;
}
.carpet-bg { background: linear-gradient(135deg, #d7cab5, #b7a58b); }
.vinyl-bg { background: linear-gradient(135deg, #8e7a66, #5d5045); }
.hardwood-bg { background: linear-gradient(135deg, #b47f53, #7c522d); }
.tile-bg { background: linear-gradient(135deg, #98a7b2, #687887); }
.laminate-bg { background: linear-gradient(135deg, #b89d79, #8a7053); }
.neutral-bg { background: linear-gradient(135deg, #a8aca8, #777d78); }

@media (max-width: 991.98px) {
    .summary-sticky { position: static; }
    .gallery-tile, .gallery-tile.wide { grid-column: span 6; }
}
@media (max-width: 767.98px) {
    .contact-quick-grid,
    .prefill-banner { grid-template-columns: 1fr; display: block; }
    .prefill-banner .btn { margin-top: .75rem; }
    .gallery-masonry { grid-template-columns: 1fr; }
    .gallery-tile, .gallery-tile.wide { grid-column: auto; }
}

.consent-box,
.legal-panel {
    background: #fffdf8;
    border: 1px solid #e8dece;
    border-radius: 18px;
    padding: 1.1rem 1.15rem;
}

.consent-box a,
.legal-panel a {
    color: var(--brand, #24384c);
    font-weight: 600;
}

.legal-panel h2 {
    font-size: 1.15rem;
    margin-top: 1.5rem;
    margin-bottom: .55rem;
}

.legal-panel p {
    color: #5f6f7d;
    line-height: 1.75;
}


.btn-brand:disabled {
    background: #9aa6b2;
    border-color: #9aa6b2;
    color: #fff;
    opacity: 1;
    cursor: not-allowed;
}

.submit-actions {
    margin-top: 0.35rem;
    padding-top: 1rem;
    border-top: 1px solid #eadfce;
}

.submit-actions .btn {
    min-height: 56px;
}

.consent-helper {
    font-size: 0.92rem;
}


.consent-error {
    font-weight: 600;
}


/* Calculator and financing polish */
.room-card .form-control-lg,
.room-card .form-select,
#finance-form .form-control,
#finance-form .form-select {
    min-height: 58px;
}

.room-remove-btn {
    min-width: 48px;
    min-height: 58px;
    border-radius: 16px;
    padding-inline: 0;
}

.empty-state {
    padding: 1.4rem 1.2rem;
    border: 1px dashed var(--line);
    border-radius: 18px;
    background: #fffdf9;
    color: var(--muted);
    text-align: center;
}

.finance-stack {
    display: grid;
    gap: 0.85rem;
}

.finance-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,0.7);
}

@media (max-width: 767.98px) {
    .room-card {
        padding: 1rem;
    }

    .room-card .row > [class*='col-'] {
        width: 100%;
    }

    .room-remove-btn {
        width: 100%;
    }
}


.measurement-help {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 1rem;
    align-items: start;
    padding: 1rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fffdf9;
}
.measurement-help-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-2-soft);
    color: var(--brand);
    font-size: 1.2rem;
}
.measure-diagram-panel {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
}
.measure-diagram {
    display: flex;
    justify-content: center;
}
.measure-box {
    position: relative;
    width: 140px;
    height: 100px;
    border: 2px solid var(--brand);
    border-radius: 14px;
    background: linear-gradient(180deg, #fff, #f8f6f2);
    display: flex;
    align-items: center;
    justify-content: center;
}
.measure-room {
    font-weight: 700;
    color: var(--brand);
}
.measure-label {
    position: absolute;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--muted);
}
.measure-label-top { top: -26px; left: 50%; transform: translateX(-50%); }
.measure-label-side { left: -34px; top: 50%; transform: translateY(-50%) rotate(-90deg); }
.room-card-grid .form-label { font-weight: 700; }
.roomy-input { min-width: 0; }
.material-hint {
    border: 1px solid rgba(185, 147, 90, 0.28);
    background: #fffaf2;
    border-radius: 16px;
    padding: 0.85rem 1rem;
    color: var(--text);
}
.material-cta {
    font-size: 0.95rem;
    color: var(--muted);
}
.material-cta a {
    color: var(--brand);
    font-weight: 700;
    text-decoration: none;
}
.material-cta a:hover { text-decoration: underline; }
.trust-block,
.save-estimate-form {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 1.35rem;
    box-shadow: var(--shadow);
}
.trust-block-item {
    display: flex;
    gap: 0.9rem;
    align-items: start;
    padding: 0.9rem 0;
    border-top: 1px solid rgba(230, 221, 208, 0.8);
}
.trust-block-item:first-of-type { border-top: 0; padding-top: 0.35rem; }
.trust-block-item:last-child { padding-bottom: 0; }
.trust-block-item i {
    color: var(--success);
    margin-top: 0.2rem;
    font-size: 1rem;
}
.trust-block-item strong {
    display: block;
    margin-bottom: 0.18rem;
}
.trust-block-item span {
    display: block;
    color: var(--muted);
    line-height: 1.55;
}
.save-estimate-form .form-control { min-height: 56px; }
@media (max-width: 767.98px) {
    .measurement-help,
    .measure-diagram-panel {
        grid-template-columns: 1fr;
    }
}

/* ===== Calculator polish updates ===== */

.project-builder-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.project-builder-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-left: auto;
}

.room-card-grid-top,
.room-card-grid-bottom {
    margin-left: 0;
    margin-right: 0;
}

.roomy-input {
    min-width: 0;
}

.roomy-input,
.room-card .form-control,
.room-card .form-select {
    font-size: 1rem;
}

.room-card .form-control.form-control-lg,
.room-card .form-select.form-select-lg {
    min-height: 58px;
}

.room-remove-btn {
    min-height: 58px;
    font-size: 1.4rem;
    line-height: 1;
    padding-left: 0;
    padding-right: 0;
}

.material-hint {
    background: #f8f4ec;
    border: 1px solid #e6dccd;
    border-radius: 14px;
    padding: 0.9rem 1rem;
    color: #5e5a53;
    font-size: 0.96rem;
}

.material-cta {
    color: #726b61;
    font-size: 0.95rem;
}

.material-cta a {
    font-weight: 700;
    color: var(--brand);
    text-decoration: none;
}

.material-cta a:hover {
    text-decoration: underline;
}

.room-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    background: #fffdf9;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0.9rem 1rem;
}

.room-summary-pill {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    color: var(--text);
}

.room-summary-pill strong {
    font-size: 1rem;
    font-weight: 800;
}

.room-summary-pill em {
    font-style: normal;
    color: var(--muted);
    font-size: 0.9rem;
}

.room-summary-separator {
    color: #c6b49b;
    font-weight: 700;
}

.measure-diagram-panel {
    background: #fffdfa;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 1.25rem;
}

.measure-figure-wrap {
    display: flex;
    justify-content: center;
}

.measure-figure {
    width: min(100%, 320px);
}

.measure-length {
    text-align: center;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--brand);
    margin-bottom: 0.55rem;
}

.measure-layout-row {
    display: flex;
    align-items: stretch;
    gap: 0.9rem;
}

.measure-width {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    text-align: center;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--brand);
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 26px;
}

.measure-room-box {
    flex: 1;
    min-height: 145px;
    border: 2px solid #ccb58d;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    font-weight: 700;
    background: linear-gradient(180deg, #fffefb 0%, #f7f0e3 100%);
}

.restore-banner {
    background: #fffdf8;
    border: 1px solid #e4d8c4;
    border-radius: 18px;
    padding: 1rem 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.restore-id-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    background: #f4ebdd;
    color: var(--brand);
    font-weight: 700;
    font-size: 0.88rem;
}

.empty-state {
    background: #fffdf9;
    border: 1px dashed #d8c8ae;
    border-radius: 18px;
    padding: 1.25rem;
    text-align: center;
    color: var(--muted);
}

.trust-block {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.4rem;
    box-shadow: var(--shadow);
}

.trust-block-item {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.trust-block-item:last-child {
    margin-bottom: 0;
}

.trust-block-item i {
    color: var(--success);
    margin-top: 0.2rem;
}

.trust-block-item strong {
    display: block;
    margin-bottom: 0.15rem;
}

.trust-block-item span {
    display: block;
    color: var(--muted);
    font-size: 0.94rem;
}

@media (max-width: 991.98px) {
    .project-builder-top {
        align-items: stretch;
    }

    .project-builder-actions {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
    }
}

@media (max-width: 767.98px) {
    .room-summary {
        gap: 0.45rem;
    }

    .room-summary-separator {
        display: none;
    }

    .measure-layout-row {
        gap: 0.6rem;
    }

    .measure-room-box {
        min-height: 120px;
    }
}