/* ===== Paint colour charts =====
   Colour chart page, the colour band on paint categories, the colour box on paint products,
   and the pop-up layers (colour details, picker, room visualiser).
   Written phone-first; wider screens add columns. Layers sit under the quote list (10040)
   and its toast (10030) so "added to quote" messages show on top. */

:root {
    --cc-red: #e30613;
    --cc-red-deep: #b80510;
    --cc-ink: #1c1c1c;
    --cc-ink-2: #2a2a2a;
    --cc-bg: #f5f4f3;
    --cc-surface: #ffffff;
    --cc-text: #1c1c1c;
    --cc-muted: #66615e;
    --cc-line: #e5e1de;
    --cc-chip: #f1eeec;
    --cc-display: 'Montserrat', 'Poppins', 'Segoe UI', system-ui, sans-serif;
    --cc-body: 'Poppins', 'Segoe UI', system-ui, sans-serif;
    --cc-rainbow: conic-gradient(#d83940, #ff902d, #fee97a, #568360, #86a6d9, #8c598f, #d83940);
}

html.cc-lock,
html.cc-lock body {
    overflow: hidden !important;
}

/* ---------- Buttons ---------- */
.cc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-family: var(--cc-display);
    font-weight: 700;
    font-size: 0.86rem;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.cc-btn:focus-visible,
.cc-sw:focus-visible,
.cc-fams button:focus-visible,
.cc-seg button:focus-visible,
.cc-x:focus-visible {
    outline: 3px solid #ffb4b8;
    outline-offset: 2px;
}
.cc-btn:disabled { background: #d4cfcc !important; border-color: #d4cfcc !important; color: #fff !important; cursor: not-allowed; }
.cc-btn-red { background: var(--cc-red); color: #fff; }
.cc-btn-red:hover { background: var(--cc-red-deep); color: #fff; }
.cc-btn-red.is-done { background: var(--cc-ink); }
.cc-btn-dark { background: var(--cc-ink); color: #fff; }
.cc-btn-dark:hover { background: #000; color: #fff; }
.cc-btn-line { background: var(--cc-surface); color: var(--cc-text); border-color: var(--cc-line); font-weight: 600; font-family: var(--cc-body); }
.cc-btn-ghost { background: transparent; color: var(--cc-ink); border-color: var(--cc-ink); }
.cc-btn-sm { min-height: 38px; padding: 8px 12px; font-size: 0.78rem; border-radius: 10px; white-space: nowrap; }
.cc-btn .bi { font-size: 1.05em; }

.cc-label {
    font-family: var(--cc-display);
    font-weight: 700;
    font-size: 0.74rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cc-muted);
    margin: 0 0 8px;
}
.cc-note { font-size: 0.78rem; color: var(--cc-muted); margin: 0; line-height: 1.5; }
.cc-loading { padding: 32px 4px; color: var(--cc-muted); text-align: center; margin: 0; }
.cc-strip { display: flex; }
.cc-strip span { flex: 1; }

/* ---------- Colour band on paint category pages ---------- */
.cc-band {
    position: relative;
    display: grid;
    gap: 18px;
    margin: 0 0 22px;
    padding: 26px 18px 18px;
    border-radius: 18px;
    background: var(--cc-ink);
    color: #fff;
    overflow: hidden;
}
.cc-band > .cc-strip { position: absolute; inset: 0 0 auto 0; height: 6px; }
.cc-band-copy { display: grid; gap: 8px; min-width: 0; }
.cc-kicker {
    font-family: var(--cc-display);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--cc-red);
}
.cc-band .cc-kicker { color: #ff6b73; }
.cc-band h2 {
    font-family: var(--cc-display);
    font-size: clamp(1.3rem, 5.4vw, 1.9rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
    color: #fff;
}
.cc-band p { margin: 0; color: rgba(255, 255, 255, 0.76); font-size: 0.92rem; max-width: 46ch; }
.cc-steps { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 4px; font-size: 0.78rem; color: rgba(255, 255, 255, 0.88); }
.cc-steps span { display: inline-flex; align-items: center; gap: 6px; }
.cc-steps b {
    width: 20px; height: 20px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--cc-red); color: #fff;
    font-family: var(--cc-display); font-size: 0.68rem;
}
.cc-brands { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; min-width: 0; }
.cc-brand {
    display: flex;
    flex-direction: column;
    background: var(--cc-surface);
    color: var(--cc-text);
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}
.cc-brand:hover { color: var(--cc-text); transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35); }
.cc-brand .cc-strip { height: 74px; }
.cc-brand .cc-strip span { transition: flex 0.3s; }
.cc-brand:hover .cc-strip span:nth-child(odd) { flex: 1.7; }
.cc-brand-body { display: grid; gap: 2px; padding: 12px 14px 14px; }
.cc-brand-body strong { font-family: var(--cc-display); font-size: 1.02rem; font-weight: 800; }
.cc-brand-body small { color: var(--cc-muted); font-size: 0.76rem; }
.cc-brand-body em { font-style: normal; font-family: var(--cc-display); font-weight: 700; font-size: 0.78rem; color: var(--cc-red); margin-top: 6px; }

@media (min-width: 768px) {
    .cc-band { grid-template-columns: 1fr 1.15fr; align-items: center; gap: 24px; padding: 30px 26px 26px; }
    .cc-brand .cc-strip { height: 90px; }
}

/* Tag and button on product cards that come in colours */
.cc-card-tag {
    position: absolute;
    left: 8px;
    top: 8px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px 3px 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-size: 0.66rem;
    font-weight: 600;
    color: var(--cc-text);
    pointer-events: none;
}
.cc-card-tag i { width: 14px; height: 14px; border-radius: 50%; background: var(--cc-rainbow); }
.cc-card-pick {
    width: 100%;
    min-height: 40px;
    margin-bottom: 8px;
    border: 0;
    border-radius: 10px;
    background: var(--cc-red);
    color: #fff;
    font-family: var(--cc-display);
    font-weight: 700;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    cursor: pointer;
}
.cc-card-pick i { width: 15px; height: 15px; border-radius: 50%; background: conic-gradient(#ffd2d4, #fff3c4, #d8f0d8, #d6e6ff, #ead8f2, #ffd2d4); flex: none; }
.cc-card-pick:hover { background: var(--cc-red-deep); }
@media (max-width: 575.98px) {
    .cc-card-pick { font-size: 0.72rem; min-height: 36px; padding: 0 6px; }
    .cc-card-tag { font-size: 0.6rem; left: 6px; top: 6px; }
}

/* ---------- Colour box on paint product pages ---------- */
.cc-pbox {
    display: grid;
    gap: 14px;
    margin: 18px 0;
    padding: 16px;
    border: 1px solid var(--cc-line);
    border-radius: 16px;
    background: var(--cc-surface);
}
.cc-pbox-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.cc-pbox-head a { font-size: 0.82rem; font-weight: 600; color: var(--cc-red); text-decoration: none; }
.cc-pbox-head a:hover { text-decoration: underline; }
.cc-pbox-row { display: flex; align-items: center; gap: 12px; }
.cc-pbox-sw {
    width: 54px; height: 54px; flex: none;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: repeating-linear-gradient(135deg, #eeeae7 0 8px, #f8f6f4 8px 16px);
    transition: background 0.3s;
}
.cc-pbox-txt { min-width: 0; flex: 1; }
.cc-pbox-txt b { display: block; font-family: var(--cc-display); font-size: 1rem; line-height: 1.25; }
.cc-pbox-txt span { display: block; font-size: 0.8rem; color: var(--cc-muted); }
.cc-pop-wrap .cc-note { margin-bottom: 6px; }
.cc-pop { display: flex; flex-wrap: wrap; gap: 8px; }
.cc-pop button {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--cc-line);
    padding: 0;
    cursor: pointer;
}
.cc-pop button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--cc-red); }
.cc-pbox-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 399.98px) { .cc-pbox-btns { grid-template-columns: 1fr; } }
.cc-pbox-add { width: 100%; min-height: 48px; }

/* ---------- Colour chart page ---------- */
.cc-page { padding-bottom: 40px; }
.cc-crumbs { font-size: 0.8rem; color: var(--cc-muted); margin: 6px 0 12px; display: flex; flex-wrap: wrap; gap: 4px; }
.cc-crumbs a { color: var(--cc-muted); }
.cc-crumbs a:hover { color: var(--cc-red); }
.cc-head {
    position: relative;
    display: grid;
    gap: 14px;
    padding: 24px 18px 18px;
    border-radius: 18px;
    background: var(--cc-ink);
    color: #fff;
    overflow: hidden;
}
.cc-head > .cc-strip { position: absolute; inset: 0 0 auto 0; height: 6px; }
.cc-head h1 { font-family: var(--cc-display); font-size: clamp(1.35rem, 5.6vw, 2.1rem); font-weight: 800; margin: 0; color: #fff; line-height: 1.2; }
.cc-head p { margin: 6px 0 0; color: rgba(255, 255, 255, 0.74); font-size: 0.9rem; }
.cc-switch { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.cc-switch::-webkit-scrollbar { display: none; }
.cc-switch a {
    flex: none;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
}
.cc-switch a[aria-current="page"] { background: #fff; color: var(--cc-ink); }
@media (min-width: 768px) {
    .cc-head { grid-template-columns: 1fr auto; align-items: center; padding: 28px; }
}
.cc-credit { font-size: 0.76rem; color: var(--cc-muted); border-top: 1px solid var(--cc-line); padding-top: 14px; margin: 26px 0 0; }

/* ---------- Colour grid, search and filters (page and picker) ---------- */
.cc-tools { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.cc-search { position: relative; flex: 1 1 240px; margin: 0; }
.cc-search .bi { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--cc-muted); pointer-events: none; }
.cc-search input {
    width: 100%;
    min-height: 46px;
    padding: 10px 14px 10px 40px;
    border: 1px solid var(--cc-line);
    border-radius: 12px;
    background: var(--cc-surface);
    color: var(--cc-text);
    font: inherit;
    font-size: 16px; /* 16px stops iPhone zooming in when typing */
}
.cc-search input:focus { outline: none; border-color: var(--cc-ink); box-shadow: 0 0 0 3px rgba(28, 28, 28, 0.08); }
.cc-seg { display: flex; flex: 1 1 240px; padding: 3px; border: 1px solid var(--cc-line); border-radius: 12px; background: var(--cc-surface); }
.cc-seg button {
    flex: 1;
    min-height: 38px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--cc-muted);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
}
.cc-seg button[aria-pressed="true"] { background: var(--cc-ink); color: #fff; }
@media (min-width: 768px) { .cc-seg { flex: 0 0 auto; } .cc-seg button { padding: 0 14px; } }

.cc-fams {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 14px 2px 4px;
    margin: 0 -2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
}
.cc-fams::-webkit-scrollbar { display: none; }
.cc-fams button {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 5px 14px 5px 5px;
    border: 1px solid var(--cc-line);
    border-radius: 999px;
    background: var(--cc-surface);
    color: var(--cc-text);
    font-size: 0.84rem;
    font-weight: 500;
    white-space: nowrap;
    scroll-snap-align: start;
    cursor: pointer;
}
.cc-fams button[aria-pressed="true"] { border-color: var(--cc-ink); box-shadow: inset 0 0 0 1px var(--cc-ink); }
.cc-dot { width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.08); flex: none; }
.cc-dot-all { background: var(--cc-rainbow); }
.cc-count { font-size: 0.82rem; color: var(--cc-muted); margin: 12px 0 10px; }

.cc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 480px) { .cc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 768px) { .cc-grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 14px; } }
.cc-sw {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 0;
    border: 1px solid var(--cc-line);
    border-radius: 12px;
    background: var(--cc-surface);
    color: var(--cc-text);
    text-align: left;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.18s, box-shadow 0.18s;
    -webkit-tap-highlight-color: transparent;
}
.cc-sw:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0, 0, 0, 0.1); }
.cc-sw.is-picked { box-shadow: 0 0 0 3px var(--cc-red); }
/* Square colour block that works in every browser, including older iPhone Safari */
.cc-chip { display: block; width: 100%; position: relative; }
.cc-chip::before { content: ""; display: block; padding-top: 100%; }
.cc-cap { display: block; padding: 7px 8px 9px; min-width: 0; }
.cc-nm {
    display: block;
    font-family: var(--cc-display);
    font-weight: 700;
    font-size: 0.68rem;
    line-height: 1.25;
    letter-spacing: 0.02em;
    overflow-wrap: anywhere;
}
.cc-code { display: block; font-size: 0.66rem; color: var(--cc-muted); margin-top: 2px; }
@media (min-width: 768px) { .cc-nm { font-size: 0.74rem; } .cc-cap { padding: 8px 10px 10px; } }
.cc-none { grid-column: 1 / -1; padding: 30px 0; color: var(--cc-muted); text-align: center; margin: 0; }
.cc-more {
    display: block;
    margin: 18px auto 0;
    min-height: 44px;
    padding: 0 22px;
    border: 1px solid var(--cc-ink);
    border-radius: 12px;
    background: transparent;
    font-weight: 600;
    cursor: pointer;
}

/* ---------- Pop-up layers ---------- */
.cc-layer { position: fixed; inset: 0; z-index: 10010; }
.cc-layer[hidden] { display: none; }
.cc-scrim { position: absolute; inset: 0; background: rgba(20, 18, 18, 0.5); opacity: 0; transition: opacity 0.25s; }
.cc-layer.is-open .cc-scrim { opacity: 1; }
.cc-x {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
    color: var(--cc-ink);
    font-size: 1rem;
    cursor: pointer;
    flex: none;
}
.cc-x-plain { background: var(--cc-chip); }
.cc-x-dark { background: rgba(255, 255, 255, 0.14); color: #fff; }

/* Colour details: bottom sheet on phones, side panel on larger screens */
.cc-sheet {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    max-height: 92%;
    display: flex;
    flex-direction: column;
    background: var(--cc-surface);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.25);
    transform: translateY(104%);
    transition: transform 0.32s cubic-bezier(0.2, 0.75, 0.2, 1);
    overflow: hidden;
}
.cc-layer.is-open .cc-sheet { transform: none; }
.cc-sheet-swatch { position: relative; flex: none; height: 120px; transition: background 0.3s; }
.cc-grab { position: absolute; left: 50%; top: 8px; width: 42px; height: 5px; margin-left: -21px; border-radius: 3px; background: rgba(255, 255, 255, 0.75); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06); }
.cc-sheet-swatch .cc-x { position: absolute; top: 12px; right: 12px; }
.cc-sheet-body {
    display: grid;
    gap: 18px;
    align-content: start;
    padding: 18px 18px calc(22px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
.cc-sheet-body h2 { font-family: var(--cc-display); font-size: 1.4rem; font-weight: 800; margin: 0; }
.cc-sub { margin: 4px 0 0; font-size: 0.84rem; color: var(--cc-muted); }
.cc-combos { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); height: 44px; border-radius: 10px; overflow: hidden; }
.cc-combos button { border: 0; padding: 0; cursor: pointer; }
.cc-combos button:disabled { cursor: default; }
.cc-paints { display: grid; gap: 8px; }
.cc-paint { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--cc-line); border-radius: 12px; }
.cc-paint-any { justify-content: space-between; padding: 12px; font-size: 0.86rem; }
.cc-paint-ph { width: 54px; height: 54px; flex: none; border-radius: 10px; display: grid; place-items: center; overflow: hidden; color: rgba(0, 0, 0, 0.4); }
.cc-paint-ph img { max-width: 84%; max-height: 84%; object-fit: contain; }
.cc-paint-name { flex: 1; min-width: 0; font-size: 0.86rem; font-weight: 600; line-height: 1.3; color: var(--cc-text); text-decoration: none; }
.cc-paint-name small { display: block; font-weight: 400; font-size: 0.74rem; color: var(--cc-muted); }
@media (min-width: 768px) {
    .cc-sheet {
        left: auto; top: 0; right: 0; bottom: 0;
        width: 440px; max-height: none;
        border-radius: 0;
        transform: translateX(104%);
        box-shadow: -12px 0 40px rgba(0, 0, 0, 0.22);
    }
    .cc-sheet-swatch { height: 190px; }
    .cc-grab { display: none; }
}

/* Picker: full-height sheet on phones, centred window on larger screens */
.cc-picker {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 94%;
    display: flex;
    flex-direction: column;
    background: var(--cc-bg);
    border-radius: 20px 20px 0 0;
    overflow: hidden;
    transform: translateY(104%);
    transition: transform 0.32s cubic-bezier(0.2, 0.75, 0.2, 1);
}
.cc-layer.is-open .cc-picker { transform: none; }
.cc-picker-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 16px 12px; background: var(--cc-surface); border-bottom: 1px solid var(--cc-line); }
.cc-picker-top h2 { font-family: var(--cc-display); font-size: 1.08rem; font-weight: 800; margin: 0; }
.cc-picker-chart { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 14px 18px; -webkit-overflow-scrolling: touch; }
.cc-picker-chart .cc-tools { margin-top: 12px; }
.cc-picker-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    background: var(--cc-surface);
    border-top: 1px solid var(--cc-line);
    box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.06);
}
.cc-pick-sw { width: 44px; height: 44px; flex: none; border-radius: 10px; border: 1px solid rgba(0, 0, 0, 0.08); background: repeating-linear-gradient(135deg, #eeeae7 0 7px, #f8f6f4 7px 14px); }
.cc-pick-txt { flex: 1; min-width: 0; }
.cc-pick-txt b { display: block; font-family: var(--cc-display); font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-pick-txt span { display: block; font-size: 0.76rem; color: var(--cc-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-pick-see { width: 44px; padding: 0; flex: none; }
.cc-pick-go { flex: none; }
@media (max-width: 379.98px) { .cc-pick-see { display: none; } .cc-pick-go { padding: 10px 12px; font-size: 0.8rem; } }
@media (min-width: 768px) {
    .cc-picker {
        left: 50%; top: 50%; bottom: auto;
        width: min(920px, calc(100% - 48px));
        height: min(760px, calc(100% - 48px));
        border-radius: 18px;
        transform: translate(-50%, -46%);
        opacity: 0;
        transition: transform 0.25s, opacity 0.25s;
        box-shadow: 0 30px 70px rgba(0, 0, 0, 0.3);
    }
    .cc-layer.is-open .cc-picker { transform: translate(-50%, -50%); opacity: 1; }
    .cc-picker-chart .cc-grid { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 10px; }
}

/* Room visualiser: full screen */
.cc-viz {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    background: var(--cc-bg);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.25s, transform 0.25s;
}
.cc-layer.is-open .cc-viz { opacity: 1; transform: none; }
.cc-viz-top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: calc(10px + env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 0px)) 10px max(14px, env(safe-area-inset-left, 0px));
    background: var(--cc-ink);
    color: #fff;
}
.cc-viz-dot { width: 34px; height: 34px; flex: none; border-radius: 9px; border: 2px solid rgba(255, 255, 255, 0.7); }
.cc-viz-title { flex: 1; min-width: 0; }
.cc-viz-title h2 { font-family: var(--cc-display); font-size: 1rem; font-weight: 800; margin: 0; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-viz-title p { margin: 0; font-size: 0.74rem; color: rgba(255, 255, 255, 0.7); }
.cc-viz-main { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.cc-viz-stage { display: grid; gap: 10px; padding: 12px 12px 6px; }
.cc-viz-scenes { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.cc-viz-scenes::-webkit-scrollbar { display: none; }
.cc-viz-scenes button {
    flex: none;
    min-height: 38px;
    padding: 0 15px;
    border: 1px solid var(--cc-line);
    border-radius: 999px;
    background: var(--cc-surface);
    color: var(--cc-text);
    font-size: 0.84rem;
    font-weight: 500;
    cursor: pointer;
}
.cc-viz-scenes button[aria-pressed="true"] { background: var(--cc-ink); border-color: var(--cc-ink); color: #fff; }
.cc-viz-canvas { display: grid; place-items: center; }
.cc-viz-canvas svg { display: block; width: 100%; height: auto; max-height: 62vh; border-radius: 14px; background: #ddd; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16); }
.cc-viz-canvas [data-s] { mix-blend-mode: multiply; cursor: pointer; transition: fill 0.45s ease; }
.cc-viz-hint { font-size: 0.76rem; color: var(--cc-muted); text-align: center; margin: 0; }
.cc-viz-side { display: grid; gap: 16px; align-content: start; padding: 14px 14px calc(24px + env(safe-area-inset-bottom, 0px)); background: var(--cc-surface); border-top: 1px solid var(--cc-line); }
.cc-viz-chips { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.cc-viz-chips button { position: relative; padding: 0; border: 1px solid rgba(0, 0, 0, 0.1); border-radius: 10px; cursor: pointer; }
.cc-viz-chips button::before { content: ""; display: block; padding-top: 100%; }
.cc-viz-chips button[aria-pressed="true"] { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--cc-red); }
.cc-viz-chips button.is-main::after { content: "\2605"; position: absolute; top: 2px; right: 4px; font-size: 0.6rem; color: rgba(0, 0, 0, 0.45); }
.cc-viz-active { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 0.84rem; }
.cc-viz-active i { width: 22px; height: 22px; flex: none; border-radius: 6px; border: 1px solid rgba(0, 0, 0, 0.1); }
.cc-viz-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cc-viz-legend { display: grid; gap: 8px; }
.cc-viz-legend div { display: flex; align-items: center; gap: 10px; font-size: 0.84rem; }
.cc-viz-legend i { width: 26px; height: 26px; flex: none; border-radius: 7px; border: 1px solid rgba(0, 0, 0, 0.1); }
.cc-viz-legend i.is-blank { background: repeating-linear-gradient(135deg, #eee 0 5px, #fff 5px 10px) !important; }
.cc-viz-legend small { display: block; color: var(--cc-muted); font-size: 0.74rem; }
.cc-viz-quote { width: 100%; min-height: 48px; }
@media (min-width: 900px) {
    .cc-viz-main { display: grid; grid-template-columns: minmax(0, 1fr) 320px; overflow: hidden; }
    .cc-viz-stage { grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; padding: 16px; }
    .cc-viz-canvas { min-height: 0; container-type: size; }
    .cc-viz-canvas svg { width: min(100cqw, calc(100cqh * var(--r))); max-height: none; }
    .cc-viz-side { overflow-y: auto; border-top: 0; border-left: 1px solid var(--cc-line); padding: 18px; }
    .cc-viz-chips { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
    .cc-sheet, .cc-picker, .cc-viz, .cc-scrim, .cc-sw, .cc-brand, .cc-viz-canvas [data-s] { transition: none !important; }
}

/* Outside house is a drawing: parts get the plain colour, shading is drawn on top of them */
.cc-viz-canvas svg.is-vector { background: #cfe6f6; }
.cc-viz-canvas svg.is-vector [data-s] { mix-blend-mode: normal; }
.cc-viz-canvas svg.is-vector [data-s]:hover { filter: brightness(1.06); }
