/**
 * Drobe Configurator Styles
 *
 * UI v2: side controls (vertical open/close slider on left, large compartment
 * buttons on right with expanding horizontal colour rail), bottom-right FINISH
 * block. The original bottom-anchored dial (v1) is preserved in *-v1-backup.css
 * and hidden below for reference / quick revert.
 */

/* ============ HIDE V1 BOTTOM DIAL + V1 INFO BOX ============ */
.svg-container { display: none !important; }
#cabin-product-info { display: none !important; }
/* Old summary circles row + old checkout button are replaced by the new FINISH block. */
#drobe-summary-circles { display: none !important; }
#drobe-checkout-btn   { display: none !important; }
/* Old right-side step navigator is replaced by the right-side compartment rail. */
#configurator-steps   { display: none !important; }

:root {
    /* Fixed dial size on desktop so the layout is identical on every screen. */
    --dial-size: 600px;
    --finish-from-bottom: 0px;
}

@media (max-width: 1100px) {
    :root { --dial-size: 530px; --finish-from-bottom: 0px; }
}

@media (max-width: 640px) {
    :root { --dial-size: 360px; --finish-from-bottom: 0px; }
}

@media (max-height: 640px) {
    :root { --dial-size: 460px; --finish-from-bottom: 0px; }
}
@media (max-height: 480px) {
    :root { --dial-size: 340px; --finish-from-bottom: 0px; }
}

.svg-container {
    position: fixed;
    left: 50%;
    bottom: 0;
    width: var(--dial-size);
    height: var(--dial-size);
    /* Anchor: shift right by -50% (centre horizontally), then DOWN by
       (half-the-dial − finish-from-bottom). This puts the dial centre exactly
       at `--finish-from-bottom` pixels above the viewport bottom. */
    transform: translate(-50%, calc(50% - var(--finish-from-bottom)));
    pointer-events: none;
    z-index: 50;
}

.dial-container {
    position: relative;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
}

/* PREVIOUS SETUP (in case we revert from the more-transparent attempt below):
.dial-background {
    background:
        radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.06) 35%, rgba(255, 255, 255, 0) 60%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.02) 50%, rgba(255, 255, 255, 0.08) 100%);
    backdrop-filter: blur(6px) saturate(1.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.4),
        inset 0 -8px 20px rgba(255, 255, 255, 0.05),
        0 10px 35px rgba(0, 0, 0, 0.35);
}
*/

/* Background bowl — fully transparent glass: just a sheen + crisp rim. */
.dial-background {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 62%;
    height: 62%;
    border-radius: 50%;
    /* Crescent of light at upper-left (the glass reflection), then near-invisible body */
    background:
        radial-gradient(ellipse 75% 55% at 28% 18%,
            rgba(255, 255, 255, 0.55) 0%,
            rgba(255, 255, 255, 0.12) 40%,
            rgba(255, 255, 255, 0) 70%);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    box-shadow:
        inset 0 1.5px 0 rgba(255, 255, 255, 0.55),     /* crisp top edge */
        inset 0 -1px 0 rgba(255, 255, 255, 0.12),       /* subtle bottom edge */
        inset 0 -16px 30px rgba(255, 255, 255, 0.04),   /* faint internal glow */
        0 8px 30px rgba(0, 0, 0, 0.3);                  /* outer drop shadow */
    pointer-events: none;
}

/* Colour ring — pointer-events:none so canvas stays grabbable for orbit.
   Drag is captured by the colour buttons themselves. */
.dial-color-ring {
    position: absolute;
    inset: 0;
    pointer-events: none;
    will-change: transform;
    transform-origin: 50% 50%;
}
.dial-color-ring.dragging .dial-color-button { cursor: grabbing; }

.dial-color-button {
    position: absolute;
    width: 9.5%;
    height: 9.5%;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.35);
    cursor: pointer;
    pointer-events: auto;
    transform: translate(-50%, -50%) var(--btn-counter, rotate(0));
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), inset 0 1px 2px rgba(255, 255, 255, 0.2);
    font-size: 0;
    padding: 0;
    outline: none;
}
.dial-color-button:hover {
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65), 0 0 24px currentColor;
}
.dial-color-button.active {
    border-color: rgba(255, 255, 255, 0.95);
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.7),
        0 0 32px rgba(255, 255, 255, 0.45),
        inset 0 0 20px rgba(255, 255, 255, 0.25);
    transform: translate(-50%, -50%) var(--btn-counter, rotate(0)) scale(1.18);
    z-index: 3;
}

/* Arc scrubber */
.dial-arc-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 4;
    overflow: visible;
}
.dial-arc-svg .arc-track,
.dial-arc-svg .arc-progress,
.dial-arc-svg .arc-handle { pointer-events: auto; }
.dial-arc-svg .arc-handle {
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
    transition: r 0.15s;
}
.dial-arc-svg .arc-handle:hover { r: 3; }

/* CLOSED / OPEN labels — dark for light bg */
.arc-label {
    position: absolute;
    color: rgba(255, 255, 255, 0.95);
    font-size: clamp(11px, 1.3vmin, 14px);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    transform: translate(-50%, -50%);
    pointer-events: none;
    user-select: none;
    z-index: 6;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Floating zoom +/- buttons */
#drobe-zoom-controls {
    position: fixed;
    top: 50%;
    left: 22px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 60;
    pointer-events: auto;
}
.drobe-zoom-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 22px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
}
.drobe-zoom-btn:hover {
    transform: scale(1.06);
}

/* Inner rotating compartment selector */
.dial-inner-svg {
    overflow: visible;
}
.dial-inner-svg .inner-comp-text {
    user-select: none;
    cursor: pointer;
    transition: fill 0.2s;
}
.dial-inner-svg .inner-rotating-group {
    transform-origin: 50% 50%;
}

/* Floating checkout button */
#drobe-checkout-btn {
    position: fixed;
    top: 50%;
    right: 24px;
    transform: translateY(-50%);
    z-index: 60;
    padding: 14px 26px;
    background: rgba(255,255,255,0.92);
    color: #0c1c36;
    border: 0;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0,0,0,0.3);
    transition: background 0.2s, transform 0.15s;
}
#drobe-checkout-btn:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.03);
}

/* FINISH button — legacy, no longer rendered but keep styles harmless */
.dial-center-button {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 19%;
    height: 19%;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.6);
    background: radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.08));
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: clamp(15px, 2vmin, 22px);
    font-weight: 700;
    letter-spacing: 1.5px;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.2s ease;
    box-shadow:
        0 0 40px rgba(0, 0, 0, 0.55),
        inset 0 1px 2px rgba(255, 255, 255, 0.35),
        inset 0 -10px 20px rgba(0, 0, 0, 0.25);
    outline: none;
    display: flex; align-items: center; justify-content: center;
    text-transform: uppercase;
    z-index: 5;
}
.dial-center-button:hover {
    background: radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.12));
    border-color: rgba(255, 255, 255, 0.9);
}
.dial-center-button:active {
    transform: translate(-50%, -50%) scale(0.95);
}

/* ============================================================
   CONFIGURATOR UI v2
   ============================================================ */

/* ----- LEFT RAIL: open/close slider + zoom buttons in one elegant column.
        Centred vertically so the slider (long) and the zoom buttons (compact)
        share the same x-axis and read as a single luxury control bar. */
#drobe-left-rail {
    position: fixed;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    display: flex; flex-direction: column; align-items: center;
    gap: 18px;
    z-index: 60;
    pointer-events: none;
}
#drobe-left-rail > * { pointer-events: auto; }

/* Vertical open/close slider — capsule pill (fully rounded top + bottom) */
#drobe-open-slider {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 16px 12px;
    width: 64px;                   /* matched with #drobe-right-rail */
    box-sizing: content-box;
    border-radius: 999px;
    touch-action: none; /* whole pill intercepts all touch — prevents scroll hijack */
}
.open-slider-cap {
    color: rgba(255,255,255,0.95);
    font-size: 9px; font-weight: 700; letter-spacing: 0.18em;
    text-transform: uppercase;
    cursor: pointer;
    user-select: none;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    transition: color 0.18s ease;
}
.open-slider-cap:hover { color: #fff; }
.open-slider-track {
    width: 6px;
    height: 280px;
    background: rgba(255,255,255,0.18);
    border-radius: 3px;
    position: relative;
    margin: 4px 0;
    cursor: pointer;
    touch-action: none; /* prevent page scroll on touch drag */
}
.open-slider-fill {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(255,255,255,0.55), rgba(255,255,255,0.85));
    border-radius: 3px;
    pointer-events: none;
}
.open-slider-handle {
    position: absolute;
    left: 50%; bottom: 0;
    transform: translate(-50%, 50%);
    width: 18px; height: 18px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(0,0,0,0.5);
    cursor: grab;
    touch-action: none;
}
.open-slider-handle:active { cursor: grabbing; }

/* ----- RIGHT RAIL: glass box framing the 4 compartment circles.
   When a compartment is tapped, that circle moves to the top and the colour
   options replace the other 3 as a vertical dropdown inside the same box. */
#drobe-right-rail {
    position: fixed;
    right: 26px;
    top: 50%;
    transform: translateY(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 38px;
    padding: 34px 12px;
    width: 64px;                   /* same width as the open/close box */
    box-sizing: content-box;
    border-radius: 999px;
    z-index: 60;
    transition: padding 0.3s ease, gap 0.3s ease;
}
/* Selecting-mode dropdown — tighter spacing than the default 4-compartment view. */
#drobe-right-rail.selecting {
    gap: 20px;
    padding: 26px 12px;
}
/* Compartment row — circle + label aligned in a column, always centered. */
.comp-wrap {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    width: 100%;                        /* span full box width so the circle centres */
    transition: opacity 0.25s ease, max-height 0.3s ease, margin 0.25s ease;
    max-height: 80px;
    opacity: 1;
}
.comp-wrap.hidden {
    max-height: 0;
    opacity: 0;
    margin: 0;
    pointer-events: none;
    overflow: hidden;
}
.comp-label {
    font-size: 9px; font-weight: 700;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: rgba(255,255,255,0.95);
    text-shadow: 0 1px 2px rgba(0,0,0,0.55);
    text-align: center;
    user-select: none;
    transition: color 0.18s ease;
    opacity: 1;                       /* match the CLOSED/OPEN cap visibility */
    line-height: 1.2;
    white-space: nowrap;              /* keep "TOP / BASE" on one line */
}
.comp-wrap:hover .comp-label,
.comp-wrap.active .comp-label { color: #fff; opacity: 1; }
.comp-btn {
    position: relative;
    width: 38px; height: 38px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.55);
    background: rgba(255,255,255,0.12);
    cursor: pointer;
    box-shadow:
        0 4px 12px rgba(0,0,0,0.35),
        inset 0 1px 2px rgba(255,255,255,0.25);
    padding: 0;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    overflow: visible;
}
.comp-btn:hover { border-color: rgba(255,255,255,0.95); }
/* Active state: keep the SAME visual size as the others so all circles sit on
   a perfectly straight vertical line — the active state is signalled by a
   brighter ring + outer glow only, no scale. */
.comp-btn.active {
    border-color: #fff;
    box-shadow:
        0 0 0 2px rgba(255,255,255,0.35),
        0 6px 18px rgba(0,0,0,0.5),
        inset 0 1px 2px rgba(255,255,255,0.4);
}
body.light-bg .comp-label,
body.light-bg .comp-wrap:hover .comp-label,
body.light-bg .comp-wrap.active .comp-label { color: #0c1c36; text-shadow: none; }
body.light-bg #drobe-right-rail {
    background: none;
    border: none;
    box-shadow: none;
}

/* Colour-option row shown inside the box when in selecting mode */
.color-row {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    width: 100%;                        /* span full box width so the swatch centres */
    transition: opacity 0.25s ease, max-height 0.3s ease;
    max-height: 80px;
    opacity: 1;
}
.color-row.disabled { opacity: 0.22; filter: grayscale(40%); pointer-events: none; }
.color-row-btn {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.12);
    cursor: pointer; padding: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4), inset 0 1px 2px rgba(255,255,255,0.18);
    transition: transform 0.18s cubic-bezier(.2,.7,.3,1.4), border-color 0.18s ease;
}
.color-row-btn:hover { transform: scale(1.12); border-color: rgba(255,255,255,0.95); }
.color-row-btn.current {
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.25), 0 6px 14px rgba(0,0,0,0.45);
}
.color-row-name {
    font-size: 9px; font-weight: 600;
    letter-spacing: 0.15em; text-transform: lowercase;
    color: rgba(255,255,255,0.85);
    text-shadow: 0 1px 2px rgba(0,0,0,0.55);
    white-space: nowrap;
    text-align: center;
    line-height: 1.25;
}
.color-row-material {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.95);
    margin-bottom: 1px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.55);
}
.color-row-label-only {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 2px 0;
}
.color-row-name-only {
    font-size: 9px;
    color: rgba(255,255,255,0.85);
    text-shadow: 0 1px 2px rgba(0,0,0,0.55);
    text-align: center;
}
body.light-bg .color-row-name-only { color: rgba(0,0,0,0.85); text-shadow: none; }
body.light-bg .color-row-name { color: rgba(0,0,0,0.85); text-shadow: none; }
body.light-bg .color-row-material { color: rgba(0,0,0,0.55); }

/* Horizontal colour rail replaced by in-box dropdown — hide entirely. */
#drobe-color-rail { display: none !important; }

/* ----- HORIZONTAL COLOUR RAIL (legacy, hidden above) ----- */
#drobe-color-rail-old-rule-placeholder, #drobe-color-rail {
    position: fixed;
    right: 84px;             /* sits just to the LEFT of the comp buttons */
    top: 50%;                /* JS overrides this with the clicked button's centre */
    transform: translateY(-50%) translateX(20px);
    z-index: 59;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.3s cubic-bezier(.2,.7,.3,1.2), top 0.3s cubic-bezier(.2,.7,.3,1.2);
    display: flex; flex-direction: row; align-items: center; gap: 14px;
}
#drobe-color-rail.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0);
}
/* Colour-name label sits INSIDE the rail, to the right of the swatch track,
   between the track and the compartment button. Format: BIG colour name with
   small compartment subtitle. */
.color-rail-label {
    display: inline-flex; align-items: baseline;
    padding: 0 4px 0 4px;
    white-space: nowrap;
}
.color-rail-label .cl-color {
    font-size: 15px; font-weight: 800; letter-spacing: 0.10em;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.55);
    margin-right: 6px;
}
.color-rail-label .cl-comp {
    font-size: 9px; font-weight: 600; letter-spacing: 0.16em;
    color: rgba(255,255,255,0.78);
    text-transform: lowercase;
    text-shadow: 0 1px 2px rgba(0,0,0,0.55);
}
body.light-bg .color-rail-label .cl-color { color: #1a1a1a; text-shadow: none; }
body.light-bg .color-rail-label .cl-comp  { color: rgba(0,0,0,0.6); text-shadow: none; }

.color-rail-track {
    display: flex; align-items: center;
    gap: 10px;
    padding: 4px 14px;
    height: 46px;                 /* match the compartment button height */
    box-sizing: border-box;
    border-radius: 999px;
    border: 1.5px solid rgba(255,255,255,0.4);
    background:
        radial-gradient(ellipse 90% 100% at 50% 0%,
            rgba(255,255,255,0.25) 0%,
            rgba(255,255,255,0.04) 50%,
            rgba(255,255,255,0) 80%);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    box-shadow:
        inset 0 1.5px 0 rgba(255,255,255,0.55),
        inset 0 -1px 0 rgba(255,255,255,0.12),
        0 10px 28px rgba(0,0,0,0.35);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    max-width: 60vw;
    scroll-behavior: smooth;
    touch-action: pan-x; /* opt back into horizontal swipe under the global pan-y lock */
}
.color-rail-track::-webkit-scrollbar { display: none; }
.color-rail-swatch {
    flex: 0 0 auto;
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.4);
    cursor: pointer;
    padding: 0;
    scroll-snap-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4), inset 0 1px 2px rgba(255,255,255,0.18);
    transition: transform 0.18s cubic-bezier(.2,.7,.3,1.4), border-color 0.18s ease;
}
.color-rail-swatch:hover { transform: scale(1.1); border-color: rgba(255,255,255,0.85); }
.color-rail-swatch.disabled {
    opacity: 0.22;
    filter: grayscale(40%);
    cursor: not-allowed;
    pointer-events: none;
}
/* Tiny pulse on the comp button when a colour is picked, instead of a swatch ring. */
@keyframes drobe-comp-pulse {
    0%   { transform: scale(1.08); }
    40%  { transform: scale(1.20); }
    100% { transform: scale(1.08); }
}
.comp-btn.pulse { animation: drobe-comp-pulse 0.32s ease-out; }

/* Two-line label beside the compartment button — BIG colour name + small comp name. */
.comp-label .cl-color {
    font-size: 14px; font-weight: 800; letter-spacing: 0.10em;
    color: #fff;
    margin-right: 6px;
}
.comp-label .cl-comp {
    font-size: 9px; font-weight: 600; letter-spacing: 0.18em;
    color: rgba(255,255,255,0.75);
    text-transform: lowercase;
}
body.light-bg .comp-label .cl-color { color: #1a1a1a; }
body.light-bg .comp-label .cl-comp  { color: rgba(0,0,0,0.6); }

/* ----- BOTTOM-RIGHT FINISH BLOCK — frameless, luxury minimal ----- */
#drobe-finish-block {
    position: fixed;
    right: 28px;
    bottom: 64px;             /* pushed higher up the screen */
    z-index: 60;
    width: 184px;             /* narrower */
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    display: flex; flex-direction: column; align-items: stretch; gap: 12px;
}
.finish-circles {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 6px;
}
.finish-circle {
    width: 22px; height: 22px; border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.12);
    box-shadow: 0 4px 10px rgba(0,0,0,0.35);
    transition: background 0.3s ease;
}
#drobe-finish-btn {
    width: 100%;
    padding: 16px 22px;
    border: none;
    border-radius: 999px;
    background: rgba(255,255,255,0.80);
    color: #0c1830;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    cursor: pointer;
    text-shadow: none;
    transition: background 0.18s ease, transform 0.15s ease;
}
#drobe-finish-btn:hover {
    background: rgba(255,255,255,0.92);
    transform: translateY(-1px);
}
body.light-bg #drobe-finish-btn {
    background: rgba(12,24,48,0.80);
    color: #fff;
}
body.light-bg #drobe-finish-btn:hover {
    background: rgba(12,24,48,0.92);
}
.finish-total {
    text-align: center;
    color: rgba(255,255,255,0.88);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0,0,0,0.55);
}
#drobe-finish-total {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-left: 4px;
}
body.light-bg .finish-total { color: #0c1c36; text-shadow: none; }

/* ----- LIGHT BACKDROP MODE OVERRIDES ----- */
body.light-bg #drobe-open-slider {
    background: none;
    border: none;
    box-shadow: none;
}
body.light-bg .color-rail-track {
    background: none;
    border-color: rgba(0,0,0,0.2);
    box-shadow: none;
}
body.light-bg .open-slider-cap { color: #1a1a1a; text-shadow: none; }
body.light-bg .open-slider-track { background: rgba(0,0,0,0.18); }
body.light-bg .open-slider-fill { background: linear-gradient(to top, rgba(0,0,0,0.45), rgba(0,0,0,0.75)); }
body.light-bg .open-slider-handle { background: #0c1830; }
body.light-bg .color-rail-label { color: #0c1c36; text-shadow: none; }
body.light-bg .finish-total { color: #1a1a1a; text-shadow: none; }
body.light-bg .finish-circle { border-color: rgba(0,0,0,0.6); }
/* (Old #drobe-finish-btn light-mode override removed — the new glass treatment
   above is the canonical light-mode style for the Finished button.) */
body.light-bg .comp-btn { background: rgba(255,255,255,0.55); border-color: rgba(0,0,0,0.3); }
body.light-bg .comp-btn.active { border-color: #0c1c36; box-shadow: 0 0 0 3px rgba(0,0,0,0.18), 0 8px 20px rgba(0,0,0,0.25); }

/* ----- RESPONSIVE — MOBILE ----- */
@media (max-width: 640px) {
    /* Hug the screen edges on mobile: slider + zoom + bg-toggle to the far left,
       swatch / compartment pill to the far right (see #drobe-right-rail below). */
    #drobe-left-rail { left: 2px; gap: 12px; }
    #drobe-zoom-controls { left: 2px; }

    /* Open/close pill: narrower width + smaller cap text so it takes less horizontal space */
    #drobe-open-slider { width: 44px; padding: 10px 8px; }
    .open-slider-cap { font-size: 8px; letter-spacing: 0.10em; }
    .open-slider-track { height: 150px; }

    /* Swatch pill: slightly slimmer with reduced padding; wider inter-swatch gap
       so fingers can hit the correct circle without accidentally tapping a neighbour */
    #drobe-right-rail { right: 2px; width: 56px; padding: 18px 8px; gap: 18px; }
    .comp-btn { width: 36px; height: 36px; }
    /* Label same visual weight as OPEN/CLOSE caps — 9px, but tighter tracking
       so "TOP / BASE" stays on one line in the 56px content box */
    .comp-label { font-size: 9px; letter-spacing: 0.06em; }

    .color-rail-track { padding: 10px 14px; gap: 10px; max-width: 72vw; }
    .color-rail-swatch { width: 30px; height: 30px; }
    #drobe-color-rail { right: 49px; }
    #drobe-finish-block {
        /* Centred at the bottom of the screen on mobile */
        width: min(280px, calc(100vw - 120px));
        left: 50%;
        right: auto;
        bottom: 14px;
        transform: translateX(-50%);
        padding: 10px 12px;
    }
    .finish-circle { width: 20px; height: 20px; }
    #drobe-finish-btn { padding: 10px 12px; font-size: 12px; letter-spacing: 0.18em; }
}
