:root {
    --ink: #151515;
    --muted: #6f746f;
    --paper: #f7f5ef;
    --surface: #ffffff;
    --surface-strong: #f0eee7;
    --line: #ddd8ca;
    --charcoal: #202322;
    --gold: #d7b56d;
    --teal: #207f73;
    --coral: #c96e52;
    --glass: rgba(255, 255, 255, 0.72);
    --shadow: 0 18px 70px rgba(20, 22, 20, 0.15);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100%;
    color: var(--ink);
    background: var(--paper);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    line-height: 1.6;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

.page-shell {
    width: min(1180px, calc(100% - 32px));
    margin-inline: auto;
}

.site-header {
    position: fixed;
    inset-inline: 0;
    top: 0;
    z-index: 20;
    background: rgba(21, 21, 21, 0.78);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.brand-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(215, 181, 109, 0.75);
    background: rgba(215, 181, 109, 0.16);
    color: #ffe2a1;
    border-radius: 8px;
    font-size: 0.92rem;
}

.site-header .navbar {
    padding-block: 10px;
}

.site-header .nav-link {
    color: rgba(255, 255, 255, 0.76);
    font-weight: 600;
}

    .site-header .nav-link:hover,
    .site-header .nav-link:focus {
        color: #ffffff;
    }

.nav-cta,
.primary-action,
.secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 800;
}

.nav-cta {
    color: #151515;
    background: var(--gold);
}

.hero-section {
    position: relative;
    min-height: 92vh;
    overflow: hidden;
    color: #ffffff;
    background: #141514;
}

.hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(16, 17, 16, 0.18), rgba(16, 17, 16, 0.82) 54%, rgba(16, 17, 16, 0.95)), linear-gradient(180deg, rgba(16, 17, 16, 0.2), rgba(16, 17, 16, 0.65));
}

.hero-content {
    position: relative;
    z-index: 1;
    min-height: 92vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 92px;
    padding-bottom: 48px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--gold);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.hero-content h1 {
    max-width: 820px;
    margin: 0;
    font-size: 4rem;
    line-height: 1.08;
    font-weight: 900;
}

.hero-copy {
    max-width: 680px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.25rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.primary-action {
    color: #151515;
    background: var(--gold);
}

.secondary-action {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.08);
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    width: min(640px, 100%);
    gap: 12px;
    margin: 42px 0 0;
}

    .hero-metrics div {
        padding: 18px;
        border: 1px solid rgba(255, 255, 255, 0.18);
        background: rgba(255, 255, 255, 0.08);
        border-radius: 8px;
    }

    .hero-metrics dt {
        font-size: 1.9rem;
        font-weight: 900;
        line-height: 1;
    }

    .hero-metrics dd {
        margin: 8px 0 0;
        color: rgba(255, 255, 255, 0.72);
    }

.services-section,
.workflow-section,
.accessories-section {
    padding: 88px 0;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

    .section-heading h2,
    .panel-title h2 {
        margin: 0;
        font-size: 2rem;
        line-height: 1.2;
        font-weight: 900;
    }

.service-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.service-card,
.workflow-grid article,
.accessory-showcase article,
.control-panel,
.quote-panel {
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(34, 34, 30, 0.06);
}

.service-card {
    position: relative;
    min-height: 222px;
    padding: 22px;
    overflow: hidden;
}

    .service-card::before {
        content: "";
        position: absolute;
        inset-inline: 0;
        top: 0;
        height: 4px;
        background: var(--accent);
    }

.service-dot {
    display: block;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--accent) 42%, #ffffff);
    border: 1px solid color-mix(in srgb, var(--accent) 70%, #ffffff);
}

.service-card h3,
.workflow-grid h3,
.accessory-showcase h3,
.ai-preview h3 {
    margin: 18px 0 8px;
    font-size: 1.12rem;
    font-weight: 850;
}

.service-card p,
.workflow-grid p,
.ai-preview p {
    margin: 0;
    color: var(--muted);
}

.service-rate {
    display: inline-flex;
    margin-top: 18px;
    color: var(--teal);
    font-weight: 800;
}

.studio-section {
    padding: 38px 0 82px;
    background: linear-gradient(180deg, #ebe7dc, #f7f5ef 64%), var(--surface-strong);
}

.studio-shell {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr) 300px;
    gap: 16px;
    align-items: stretch;
}

.control-panel,
.quote-panel {
    padding: 18px;
}

.panel-title {
    margin-bottom: 18px;
}

.segmented-control {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}

.segment,
.stage-actions button {
    min-height: 42px;
    border: 1px solid var(--line);
    background: #f8f7f2;
    color: var(--ink);
    border-radius: 8px;
    font-weight: 800;
}

    .segment.active,
    .stage-actions button:hover,
    .stage-actions button:focus {
        border-color: var(--teal);
        background: #e1f0ec;
        color: #0f554e;
    }

.control-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

    .control-grid label,
    .range-control {
        display: grid;
        gap: 6px;
    }

        .control-grid span,
        .range-control span,
        .mini-heading,
        .stage-summary span,
        .quote-lines span {
            color: var(--muted);
            font-size: 0.86rem;
            font-weight: 750;
        }

    .control-grid input {
        width: 100%;
        min-height: 42px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #ffffff;
        color: var(--ink);
        padding: 8px 10px;
    }

.range-control {
    grid-template-columns: 1fr auto;
    align-items: center;
    margin: 16px 0;
}

    .range-control input {
        grid-column: 1 / -1;
        accent-color: var(--teal);
    }

.swatch-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 18px;
}

.swatch {
    width: 36px;
    height: 36px;
    border: 2px solid transparent;
    border-radius: 8px;
    background: var(--swatch);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14);
}

    .swatch.active {
        border-color: var(--teal);
        outline: 2px solid rgba(32, 127, 115, 0.16);
    }

.mini-heading {
    margin-bottom: 8px;
}

.accessory-list {
    display: grid;
    gap: 8px;
    max-height: 196px;
    overflow: auto;
    padding-inline-end: 4px;
}

.accessory-option,
.toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    background: #fbfaf6;
    border-radius: 8px;
}

    .accessory-option input,
    .toggle-row input {
        width: 18px;
        height: 18px;
        accent-color: var(--teal);
    }

    .accessory-option span {
        flex: 1;
        font-weight: 750;
    }

    .accessory-option small {
        color: var(--teal);
        font-weight: 800;
    }

.toggle-row {
    margin-top: 16px;
    font-weight: 800;
}

.designer-stage {
    position: relative;
    min-height: 660px;
    overflow: hidden;
    border: 1px solid rgba(34, 34, 30, 0.18);
    border-radius: 8px;
    background: radial-gradient(circle at 74% 20%, rgba(215, 181, 109, 0.24), transparent 28%), linear-gradient(135deg, #222521 0%, #393d37 54%, #191a19 100%);
    box-shadow: var(--shadow);
}

.designer-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.stage-toolbar,
.stage-summary {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(20, 22, 20, 0.68);
    color: #ffffff;
    backdrop-filter: blur(14px);
    border-radius: 8px;
}

.stage-toolbar {
    inset-inline: 18px;
    top: 18px;
    padding: 12px;
}

    .stage-toolbar span {
        display: block;
        color: rgba(255, 255, 255, 0.72);
        font-size: 0.86rem;
    }

    .stage-toolbar strong {
        display: block;
        font-size: 1rem;
    }

.stage-actions {
    display: flex;
    gap: 8px;
}

    .stage-actions button {
        width: 42px;
        padding: 0;
        color: #ffffff;
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.18);
    }

.stage-summary {
    inset-inline: 18px;
    bottom: 18px;
    padding: 14px 16px;
}

    .stage-summary div {
        min-width: 170px;
    }

    .stage-summary span {
        display: block;
        color: rgba(255, 255, 255, 0.68);
    }

    .stage-summary strong {
        display: block;
        margin-top: 2px;
        font-size: 1.3rem;
    }

.quote-lines {
    display: grid;
    gap: 8px;
}

.quote-line {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
}

    .quote-line strong {
        font-size: 1rem;
    }

    .quote-line em {
        display: block;
        color: var(--muted);
        font-style: normal;
        font-size: 0.82rem;
    }

.ai-preview {
    display: grid;
    grid-template-columns: 98px 1fr;
    gap: 12px;
    align-items: center;
    margin: 20px 0;
    padding: 12px;
    border: 1px solid var(--line);
    background: #fbfaf6;
    border-radius: 8px;
}

.ai-preview-visual {
    display: grid;
    place-items: end start;
    min-height: 98px;
    padding: 10px;
    overflow: hidden;
    color: #fff1d0;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(32, 127, 115, 0.78), rgba(201, 110, 82, 0.72)), linear-gradient(45deg, #2b2c29, #d7b56d);
    font-weight: 900;
    font-size: 0.82rem;
}

.quote-notes {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

    .quote-notes li {
        padding: 10px 12px;
        color: #4f544f;
        background: #f4f1e7;
        border-radius: 8px;
        font-size: 0.88rem;
    }

.workflow-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

    .workflow-grid article {
        padding: 22px;
    }

    .workflow-grid span {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        color: #ffffff;
        background: var(--charcoal);
        border-radius: 8px;
        font-weight: 900;
    }

.accessories-section {
    background: #e9f1ed;
}

.accessory-showcase {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

    .accessory-showcase article {
        padding: 16px;
        min-height: 148px;
    }

    .accessory-showcase small {
        color: var(--coral);
        font-weight: 900;
    }

    .accessory-showcase p {
        margin: 0;
        color: var(--teal);
        font-weight: 800;
    }

.site-footer {
    padding: 28px 0;
    color: rgba(255, 255, 255, 0.72);
    background: #181918;
}

.footer-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

    .footer-grid strong,
    .footer-grid span {
        display: block;
    }

    .footer-grid strong {
        color: #ffffff;
    }

.designer-page {
    min-height: 100vh;
    padding: 92px 18px 18px;
    background: linear-gradient(180deg, rgba(32, 35, 33, 0.96), rgba(21, 22, 21, 0.98)), #1b1d1b;
    color: #ffffff;
}

.designer-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    max-width: 1540px;
    margin: 0 auto 14px;
}

    .designer-topbar h1 {
        margin: 0;
        font-size: 1.55rem;
        font-weight: 900;
    }

.designer-topbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.ai-render-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 11px 18px;
    border: 0;
    border-radius: 8px;
    color: #151515;
    background: linear-gradient(135deg, #ffd983, #d7b56d 48%, #8ed1bd);
    font-weight: 900;
    box-shadow: 0 12px 30px rgba(215, 181, 109, 0.24);
}

    .ai-render-button span {
        display: grid;
        place-items: center;
        width: 32px;
        height: 32px;
        color: #ffffff;
        background: #202322;
        border-radius: 8px;
        font-size: 0.84rem;
    }

    .ai-render-button.wide {
        width: 100%;
        margin-top: 16px;
    }

    .ai-render-button:disabled {
        cursor: wait;
        filter: grayscale(0.2);
        opacity: 0.74;
    }

.room-workspace {
    display: grid;
    grid-template-columns: 310px minmax(520px, 1fr) 340px;
    gap: 14px;
    max-width: 1540px;
    height: calc(100vh - 164px);
    min-height: 640px;
    margin-inline: auto;
}

.room-panel {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(247, 245, 239, 0.96);
    color: var(--ink);
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

.library-panel,
.properties-panel {
    display: flex;
    flex-direction: column;
    padding: 16px;
    min-height: 0;
}

.properties-panel {
    overflow: auto;
}

.segmented-control.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 12px;
}

.object-library {
    display: grid;
    gap: 8px;
    overflow: auto;
    padding-inline-end: 4px;
}

    .object-library button {
        display: grid;
        gap: 3px;
        width: 100%;
        min-height: 66px;
        padding: 11px 12px;
        text-align: start;
        border: 1px solid var(--line);
        background: #ffffff;
        color: var(--ink);
        border-radius: 8px;
    }

        .object-library button:hover,
        .object-library button:focus {
            border-color: var(--teal);
            background: #eaf3ef;
        }

    .object-library strong {
        font-size: 0.95rem;
    }

    .object-library span {
        color: var(--muted);
        font-size: 0.82rem;
    }

.room-stage {
    position: relative;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: radial-gradient(circle at 70% 20%, rgba(215, 181, 109, 0.18), transparent 28%), linear-gradient(135deg, #222521 0%, #343934 58%, #161716 100%);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.3);
}

.room-toolbar {
    inset-inline: 16px;
    top: 16px;
}

    .room-toolbar .stage-actions button {
        width: auto;
        min-width: 42px;
        padding-inline: 12px;
    }

.room-hint {
    position: absolute;
    z-index: 2;
    inset-inline: 16px;
    bottom: 16px;
    padding: 12px 14px;
    color: rgba(255, 255, 255, 0.78);
    background: rgba(20, 22, 20, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    backdrop-filter: blur(14px);
    font-size: 0.9rem;
}

.object-stack {
    margin-top: 16px;
}

.object-list {
    display: grid;
    gap: 8px;
    max-height: 190px;
    overflow: auto;
    padding-inline-end: 4px;
}

.object-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    background: #ffffff;
    border-radius: 8px;
}

.object-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px;
    max-width: 136px;
}

.object-row strong,
.object-row span {
    display: block;
}

.object-row span {
    color: var(--muted);
    font-size: 0.78rem;
}

.object-row button,
.object-actions button {
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid #e6b7a8;
    border-radius: 8px;
    color: #8b321d;
    background: #fff0eb;
    font-weight: 800;
}

    .object-actions button:not([data-delete]) {
        min-width: 30px;
        padding: 4px 8px;
        color: #105a52;
        background: #e7f3ef;
        border-color: #bcd8cf;
    }

.object-list-empty {
    padding: 12px;
    color: var(--muted);
    border: 1px dashed var(--line);
    border-radius: 8px;
}

.ai-result {
    margin-top: 10px;
    padding: 11px 12px;
    color: #41534e;
    background: #e8f2ee;
    border: 1px solid #c8dfd6;
    border-radius: 8px;
    font-size: 0.88rem;
}

.quote-compact {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

    .quote-compact div {
        padding: 12px;
        color: #ffffff;
        background: var(--charcoal);
        border-radius: 8px;
    }

    .quote-compact span,
    .quote-compact strong {
        display: block;
    }

    .quote-compact span {
        color: rgba(255, 255, 255, 0.66);
        font-size: 0.82rem;
    }

    .quote-compact strong {
        margin-top: 2px;
        font-size: 1.05rem;
    }

.compact-lines {
    max-height: 182px;
    overflow: auto;
    margin-top: 12px;
}

@media (max-width: 1100px) {
    .service-grid,
    .workflow-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .studio-shell {
        grid-template-columns: 290px minmax(0, 1fr);
    }

    .room-workspace {
        grid-template-columns: 280px minmax(0, 1fr);
    }

    .quote-panel {
        grid-column: 1 / -1;
    }

    .properties-panel {
        grid-column: 1 / -1;
    }

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

@media (max-width: 760px) {
    .page-shell {
        width: min(100% - 22px, 1180px);
    }

    .hero-content h1 {
        font-size: 2.4rem;
    }

    .hero-copy {
        font-size: 1rem;
    }

    .hero-metrics,
    .service-grid,
    .workflow-grid,
    .studio-shell,
    .accessory-showcase {
        grid-template-columns: 1fr;
    }

    .section-heading,
    .footer-grid {
        align-items: start;
        flex-direction: column;
    }

    .services-section,
    .workflow-section,
    .accessories-section {
        padding: 58px 0;
    }

    .designer-stage {
        min-height: 540px;
    }

    .stage-toolbar,
    .stage-summary {
        inset-inline: 10px;
    }

    .stage-summary {
        display: grid;
        grid-template-columns: 1fr;
    }

    .designer-page {
        padding-inline: 10px;
    }

    .designer-topbar,
    .designer-topbar-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .room-workspace {
        grid-template-columns: 1fr;
        height: auto;
        min-height: auto;
    }

    .room-stage {
        min-height: 560px;
    }

    .room-toolbar {
        display: grid;
        align-items: start;
    }
}

/* =========================================================
   SALWADI DESIGNER — MOBILE FIX
   Keep all toolbar controls inside the top block.
   Use native nested scrolling for material/color lists.
   ========================================================= */

@media (max-width: 900px) {
    body.designer-shell .room-workspace {
        overflow: visible !important;
    }

        body.designer-shell
        .room-workspace:not(.properties-collapsed)
        .properties-panel {
            display: flex !important;
            flex-direction: column !important;
            height: 78dvh !important;
            max-height: 78dvh !important;
            min-height: 0 !important;
            overflow-x: hidden !important;
            overflow-y: auto !important;
            -webkit-overflow-scrolling: touch !important;
            overscroll-behavior-y: contain !important;
            touch-action: pan-y !important;
            position: relative !important;
            z-index: 20 !important;
        }

    body.designer-shell .properties-panel > .panel-title {
        flex: 0 0 auto !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 30 !important;
    }

    body.designer-shell .properties-panel > .properties-edge-toggle {
        flex: 0 0 auto !important;
    }

    body.designer-shell .properties-panel .property-panel,
    body.designer-shell .properties-panel [data-property-panel],
    body.designer-shell .properties-panel .property-tab-groups,
    body.designer-shell .properties-panel .room-dimensions-panel {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        flex-shrink: 0 !important;
    }

    body.designer-shell #objectLibrary,
    body.designer-shell .object-library {
        max-height: 70dvh !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior-y: contain !important;
        touch-action: pan-y !important;
    }
}

@media (max-width: 760px) {

    /* ---------- TOP 3D BLOCK ---------- */
    body.designer-shell .room-toolbar {
        position: absolute !important;
        top: 6px !important;
        right: 6px !important;
        left: 6px !important;
        width: auto !important;
        max-width: none !important;
        height: 48px !important;
        min-height: 48px !important;
        max-height: 48px !important;
        display: grid !important;
        grid-template-columns: 32px 100px minmax(88px, 1fr) 66px !important;
        grid-template-rows: 40px !important;
        align-items: center !important;
        justify-content: stretch !important;
        gap: 3px !important;
        padding: 4px 5px !important;
        margin: 0 !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
        direction: rtl !important;
    }

        body.designer-shell .room-toolbar > * {
            min-width: 0 !important;
            max-width: 100% !important;
            margin: 0 !important;
            align-self: center !important;
            grid-row: 1 !important;
        }

    /* Logo occupies only one tiny cell. */
    body.designer-shell .designer-brand-chip {
        grid-column: 1 !important;
        width: 30px !important;
        min-width: 30px !important;
        max-width: 30px !important;
        height: 30px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

        body.designer-shell .designer-brand-chip img {
            display: block !important;
            width: 28px !important;
            height: 28px !important;
            object-fit: contain !important;
        }

        body.designer-shell .designer-brand-chip span {
            display: none !important;
        }

    /* Reset / undo / redo are always inside the block. */
    body.designer-shell .stage-actions {
        grid-column: 2 !important;
        width: 100px !important;
        min-width: 100px !important;
        max-width: 100px !important;
        display: grid !important;
        grid-template-columns: 42px 27px 27px !important;
        grid-template-rows: 32px !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 2px !important;
        direction: ltr !important;
        overflow: hidden !important;
    }

        body.designer-shell .stage-actions button,
        body.designer-shell .room-toolbar .stage-actions button {
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            width: 27px !important;
            min-width: 27px !important;
            max-width: 27px !important;
            height: 32px !important;
            min-height: 32px !important;
            max-height: 32px !important;
            margin: 0 !important;
            padding: 0 !important;
            border-radius: 7px !important;
            font-size: 0.62rem !important;
            line-height: 1 !important;
            visibility: visible !important;
            opacity: 1 !important;
            overflow: hidden !important;
        }

    body.designer-shell #resetRoomButton {
        width: 42px !important;
        min-width: 42px !important;
        max-width: 42px !important;
        padding: 0 2px !important;
        font-size: 0.50rem !important;
    }

    /* AI cell. */
    body.designer-shell .stage-ai-zone,
    body.designer-shell .stage-ai-tools {
        grid-column: 3 !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        gap: 2px !important;
        overflow: hidden !important;
    }

    body.designer-shell .stage-ai-button {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 118px !important;
        height: 32px !important;
        min-height: 32px !important;
        max-height: 32px !important;
        gap: 3px !important;
        padding: 2px 5px !important;
        margin: 0 !important;
        font-size: 0.54rem !important;
        line-height: 1 !important;
        white-space: nowrap !important;
        visibility: visible !important;
        opacity: 1 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

        body.designer-shell .stage-ai-button > span {
            display: grid !important;
            place-items: center !important;
            width: 23px !important;
            height: 23px !important;
            min-width: 23px !important;
            flex: 0 0 23px !important;
            padding: 0 !important;
            font-size: 0.50rem !important;
        }

    body.designer-shell .stage-ai-result,
    body.designer-shell .stage-ai-status {
        display: none !important;
    }

    body.designer-shell .ai-render-previews {
        display: flex !important;
        flex: 0 0 auto !important;
        min-width: 0 !important;
    }

        body.designer-shell .ai-render-previews[hidden] {
            display: none !important;
        }

    body.designer-shell .ai-render-preview {
        width: 27px !important;
        height: 27px !important;
        flex: 0 0 27px !important;
    }

    /* Dimensions cell. */
    body.designer-shell .room-dimensions-display {
        grid-column: 4 !important;
        width: 66px !important;
        min-width: 66px !important;
        max-width: 66px !important;
        height: 36px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        overflow: hidden !important;
        text-align: center !important;
        line-height: 1 !important;
    }

        body.designer-shell .room-dimensions-display span {
            display: block !important;
            width: 100% !important;
            font-size: 0.43rem !important;
            line-height: 1 !important;
            white-space: nowrap !important;
            overflow: hidden !important;
            text-overflow: ellipsis !important;
        }

        body.designer-shell .room-dimensions-display strong {
            display: block !important;
            width: 100% !important;
            margin-top: 2px !important;
            font-size: 0.47rem !important;
            line-height: 1 !important;
            white-space: nowrap !important;
            overflow: hidden !important;
            text-overflow: ellipsis !important;
        }

    /* ---------- SELECTED OBJECT STRIP ---------- */
    body.designer-shell .selection-toolbar,
    body.designer-shell .room-stage.inside-camera-view .selection-toolbar {
        right: 5px !important;
        left: 5px !important;
        bottom: 5px !important;
        width: auto !important;
        display: grid !important;
        grid-template-columns: minmax(50px, 1.15fr) minmax(42px, .85fr) 36px 31px 66px 35px !important;
        align-items: center !important;
        gap: 3px !important;
        min-height: 38px !important;
        max-height: 38px !important;
        padding: 4px !important;
        overflow: hidden !important;
    }

        body.designer-shell .selection-toolbar span,
        body.designer-shell .selection-toolbar strong,
        body.designer-shell .room-stage.inside-camera-view .selection-toolbar span,
        body.designer-shell .room-stage.inside-camera-view .selection-toolbar strong {
            min-width: 0 !important;
            max-width: 100% !important;
            margin: 0 !important;
            flex-basis: auto !important;
            font-size: 0.48rem !important;
            line-height: 1 !important;
            white-space: nowrap !important;
            overflow: hidden !important;
            text-overflow: ellipsis !important;
        }

        body.designer-shell .selection-toolbar button {
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            width: 100% !important;
            min-width: 0 !important;
            height: 29px !important;
            min-height: 29px !important;
            max-height: 29px !important;
            padding: 2px 3px !important;
            font-size: 0.47rem !important;
            line-height: 1 !important;
            white-space: nowrap !important;
        }

    /* =====================================================
       MATERIAL/COLOR LIST:
       native scroll; finger can start directly on a swatch.
       ===================================================== */
    body.designer-shell .properties-panel .material-picker-field {
        display: block !important;
        min-width: 0 !important;
        overflow: visible !important;
    }

    body.designer-shell .properties-panel .material-image-grid,
    body.designer-shell .properties-panel .compact-material-grid,
    body.designer-shell
    .properties-panel
    .material-image-grid.compact-material-grid {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 7px !important;
        width: 100% !important;
        height: 220px !important;
        min-height: 220px !important;
        max-height: 220px !important;
        padding: 5px 8px 5px 5px !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior-y: contain !important;
        touch-action: pan-y !important;
        position: relative !important;
        z-index: 40 !important;
        scrollbar-width: thin !important;
        scrollbar-gutter: stable !important;
    }

    /* Critical: do NOT use touch-action: manipulation on the buttons. */
    body.designer-shell .properties-panel .material-image-choice,
    body.designer-shell .properties-panel .material-image-choice *,
    body.designer-shell .properties-panel .material-choice-swatch,
    body.designer-shell .properties-panel .material-choice-label {
        touch-action: pan-y !important;
    }

    body.designer-shell .properties-panel .material-image-choice {
        min-width: 0 !important;
        padding: 4px !important;
        gap: 4px !important;
        user-select: none !important;
        -webkit-user-select: none !important;
        -webkit-user-drag: none !important;
    }

    body.designer-shell .properties-panel .material-choice-swatch {
        height: 60px !important;
        pointer-events: none !important;
    }

    body.designer-shell .properties-panel .material-choice-label {
        font-size: 0.58rem !important;
        line-height: 1.15 !important;
        pointer-events: none !important;
    }

    body.designer-shell .properties-panel .material-image-grid::-webkit-scrollbar {
        width: 6px !important;
    }

    body.designer-shell .properties-panel .material-image-grid::-webkit-scrollbar-thumb {
        background: #6b734e !important;
        border-radius: 999px !important;
    }

    body.designer-shell .properties-panel .material-image-grid::-webkit-scrollbar-track {
        background: rgba(107, 115, 78, 0.12) !important;
        border-radius: 999px !important;
    }
}

@media (max-width: 380px) {
    body.designer-shell .room-toolbar {
        grid-template-columns: 29px 96px minmax(78px, 1fr) 58px !important;
    }

    body.designer-shell .stage-actions {
        width: 96px !important;
        min-width: 96px !important;
        max-width: 96px !important;
        grid-template-columns: 40px 26px 26px !important;
    }

    body.designer-shell #resetRoomButton {
        width: 40px !important;
        min-width: 40px !important;
        max-width: 40px !important;
    }

    body.designer-shell .stage-actions button,
    body.designer-shell .room-toolbar .stage-actions button {
        width: 26px !important;
        min-width: 26px !important;
        max-width: 26px !important;
    }

    body.designer-shell .room-dimensions-display {
        width: 58px !important;
        min-width: 58px !important;
        max-width: 58px !important;
    }

    body.designer-shell .stage-ai-button {
        font-size: 0.50rem !important;
    }
}

/* =========================================================
   END SALWADI DESIGNER — MOBILE FIX
   ========================================================= */
