/* Color Mine Compact - all selectors scoped under .cmc-* to avoid theme collisions */

/* When we're using the site chrome (not modal mode), the main nav has data-aos="fade-down"
   which leaves it invisible if AOS doesn't fire in time. Force nav + footer visible here
   so the compact page never flickers into view. */
body.cmc-body [data-aos],
body.cmc-body [data-aos].aos-init {
    opacity: 1 !important;
    transform: none !important;
}

.cmc-body { margin: 0; padding: 0; font-family: 'Nunito Sans', sans-serif; background: #fff; color: #282828; -webkit-font-smoothing: antialiased; }
.cmc-app  { box-sizing: border-box; }
.cmc-app *, .cmc-app *::before, .cmc-app *::after { box-sizing: border-box; }

/* Placeholder while JS hasn't rendered yet */
.cmc-app:empty::before {
    content: 'Loading Color Mine...';
    display: block;
    text-align: center;
    padding: 80px 20px;
    color: #969696;
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Canvas */
.cmc-canvas-wrap { background: #fff; border-bottom: 1px solid #e1e1e1; }
.cmc-canvas {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    height: 50vh;
    min-height: 220px;
    max-height: 480px;
}
.cmc-layer {
    position: absolute;
    top: 0;
    left: 2%;
    width: 96%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.35s ease;
}
.cmc-layer.swapping { opacity: 0.4; }

.cmc-canvas-loader {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: #282828;
    color: #fff;
    font-family: 'Oswald', sans-serif;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 6px 16px;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}
.cmc-canvas-loader.show { opacity: 0.85; }

/* Controls */
.cmc-controls { width: 100%; margin: 0 auto; padding: 0 24px 40px; }

/* Section strip wrapper - holds scrollable row + absolute-positioned scroll arrows */
.cmc-section-strip {
    position: relative;
}
.cmc-section-scroll {
    position: absolute;
    top: 0; bottom: 4px;  /* align with section-row padding-bottom */
    width: 44px;
    border: none;
    display: none;             /* Toggled on via data-can-left/right */
    align-items: center;
    cursor: pointer;
    color: #DC2323;
    font-size: 16px;
    z-index: 3;
    padding: 0;
    transition: color 0.15s ease;
}
.cmc-section-scroll:hover { color: #0f0f0f; }
.cmc-section-scroll-left  {
    left: 0;
    justify-content: flex-start;
    padding-left: 10px;
    background: linear-gradient(to right, #ffffff 55%, rgba(255,255,255,0) 100%);
}
.cmc-section-scroll-right {
    right: 0;
    justify-content: flex-end;
    padding-right: 10px;
    background: linear-gradient(to left,  #ffffff 55%, rgba(255,255,255,0) 100%);
}
.cmc-section-strip[data-can-left]  .cmc-section-scroll-left  { display: flex; }
.cmc-section-strip[data-can-right] .cmc-section-scroll-right { display: flex; }

/* Section strip */
.cmc-section-row {
    display: flex;
    gap: 0;
    /* Reserve 44px left+right for the scroll arrow buttons so a section's edge
       is never hidden under an arrow when overflow happens. Also means trailing
       whitespace on very wide monitors, which reads cleaner than left-flush. */
    padding: 12px 44px 4px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    margin-top: 8px;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    overscroll-behavior-x: contain;
}
.cmc-section-row::-webkit-scrollbar { display: none; }
.cmc-section-btn {
    background: none;
    border: none;
    border-right: 1px solid #ececec;  /* Hairline separator between sections */
    padding: 10px 14px 14px;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;              /* Center-align so varying label widths read as intentional */
    justify-content: center;
    gap: 3px;
    transition: background 0.2s ease, color 0.15s ease;
    box-sizing: border-box;
    width: 160px;
    flex-shrink: 0;
    text-align: center;
}
/* Shared content block - holds the section strip and the swatch grid.
   Its max-width is set in JS to exactly (visible section count × 160px + 88px gutters),
   so swatches and section buttons share the same left edge automatically. */
.cmc-content { max-width: 1500px; margin: 0 auto; }
.cmc-section-btn:last-child { border-right: none; }
.cmc-section-name {
    font-family: 'Oswald', sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: #6a6a6a;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.cmc-section-pick {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 11px;
    font-weight: 400;
    font-style: italic;               /* Editorial italic echoes Vexus theme's <em> pattern */
    color: #9a9a9a;
    line-height: 1.25;
    min-height: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.cmc-section-btn:hover {
    background: rgba(220,35,35,0.03);
}
.cmc-section-btn:hover .cmc-section-name { color: #282828; }
.cmc-section-btn.active {
    background: rgba(220,35,35,0.05);
}
.cmc-section-btn.active .cmc-section-name {
    color: #DC2323;
    font-weight: 600;
}
.cmc-section-btn.active .cmc-section-pick {
    color: #282828;
    font-style: italic;
    font-weight: 600;
}
/* Active indicator: center-anchored 3px bar that expands in from 0 */
.cmc-section-btn.active::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: calc(100% - 28px);
    height: 3px;
    background: #DC2323;
    transform: translateX(-50%);
    pointer-events: none;
}
/* Swatch grid
   Left-padding matches the section-row arrow gutter so the first swatch
   starts at the same x as the first section button. Extra top-padding
   gives the selection underline breathing room. */
.cmc-swatch-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding: 28px 44px 36px;
}
.cmc-swatch-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 92px;
    border: none;
    background: none;
    padding: 4px;
    cursor: pointer;
}
.cmc-swatch-fill {
    position: relative;
    display: block;
    width: 100%;
}
.cmc-swatch-fill img {
    display: block;
    width: 100%;
    height: auto;
}
.cmc-swatch-check {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.45);
    color: #fff;
    font-size: 28px;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}
.cmc-swatch-item.active .cmc-swatch-check { opacity: 1; }
.cmc-swatch-name {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #646464;
    text-align: center;
    line-height: 1.3;
}
.cmc-swatch-item.active .cmc-swatch-name { color: #282828; }

/* Top bar - under the canvas on all breakpoints (order: 2 in .cmc-stage).
   Centered with the same max-width as .cmc-content, and 44px horizontal padding
   matches the section-row arrow gutter so DVX/VX aligns with the first section's
   left edge and Your Build aligns with the last section's right edge. */
.cmc-top-bar {
    width: 100%;
    margin: 0 auto;        /* center within parent so alignment matches .cmc-content */
    background: #fafafa;
    border-top: 1px solid #ececec;
    border-bottom: 1px solid #ececec;
    padding: 16px 44px;
    gap: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}
.cmc-top-left  { display: flex; flex: 0 0 auto; align-items: center; gap: 0; }
.cmc-top-right { display: flex; flex: 1 1 auto; align-items: center; justify-content: flex-end; gap: 10px; }
.cmc-top-left, .cmc-top-right { display: flex; align-items: center; gap: 16px; }
.cmc-brand {
    font-family: 'Oswald', sans-serif;
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.cmc-brand span { color: #DC2323; }

.cmc-boat-switch { display: flex; gap: 0; }
.cmc-boat-btn {
    font-family: 'Oswald', sans-serif;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #646464;
    background: transparent;
    border: 1px solid #e1e1e1;
    padding: 0 22px;
    min-width: 90px;
    height: 46px !important;  /* Hard-lock - must match .cmc-finish-btn + .cmc-overview-btn */
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-sizing: border-box;
}
.cmc-boat-btn + .cmc-boat-btn { border-left: none; }
.cmc-boat-btn:hover:not(.active) { color: #282828; background: #f3f3f3; }
.cmc-boat-btn.active { background: #282828; border-color: #282828; color: #fff; }

.cmc-finish-toggles { display: flex; gap: 0; }
.cmc-finish-btn {
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #282828;
    background: transparent;
    border: 2px solid #DC2323;
    padding: 0 20px;
    height: 46px !important; /* Hard-lock - must match .cmc-boat-btn + .cmc-overview-btn */
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-sizing: border-box;
}
.cmc-finish-btn + .cmc-finish-btn { border-left: none; }
.cmc-finish-btn.active { background: #DC2323; color: #fff; }
.cmc-finish-btn:hover:not(.active) { background: rgba(220,35,35,0.12); }

/* Stage wrapper - flex column on all breakpoints so the top bar
   can sit below the canvas via order: 2 (boat-first layout). */
.cmc-stage {
    display: flex;
    flex-direction: column;
}
.cmc-canvas-wrap { order: 1; }
.cmc-top-bar     { order: 2; }
.cmc-sheet       { order: 3; }


/* ============================================================ */
/* MOBILE - applies <= 768px                                    */
/* ============================================================ */
@media (max-width: 768px) {
    /* overflow-x hidden (not overflow:hidden) so pull-to-refresh can bubble up vertically on Android */
    .cmc-body { overflow-x: hidden; }
    /* Document-flow layout - no fixed-viewport height. Site nav sits above, footer below. */
    .cmc-app  { display: flex; flex-direction: column; }

    /* All three button types share the same height so the bar reads as one row */
    .cmc-top-bar    { padding: 10px 12px; gap: 6px; flex-wrap: nowrap; }
    .cmc-top-right  { gap: 6px; }
    .cmc-boat-btn,
    .cmc-finish-btn,
    .cmc-overview-btn { height: 36px !important; padding: 0 12px; font-size: 11px; letter-spacing: 0.8px; min-width: 0; }
    .cmc-boat-btn   { padding: 0 14px; font-size: 12px; letter-spacing: 1.5px; }

    .cmc-stage {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }
    /* Explicit order on mobile: canvas first, then compact controls, then sections/swatches */
    .cmc-canvas-wrap { order: 1; }
    .cmc-sheet       { order: 3; }

    /* Portrait canvas: locked to boat aspect so no vertical whitespace */
    .cmc-canvas-wrap {
        flex: 0 0 auto;
        width: 100%;
        aspect-ratio: 2800 / 1097;
        position: relative;
        overflow: hidden;
    }
    .cmc-canvas {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        min-height: 0;
        margin: 0;
    }

    /* Sheet fills the remaining column height below the aspect-locked canvas */
    .cmc-sheet {
        flex: 1 1 auto;
        min-height: 0;
        background: #fff;
        border-top: 1px solid #e1e1e1;
        box-shadow: 0 -8px 24px rgba(0,0,0,0.06);
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    /* Handle kept as visual affordance; drag behavior disabled in fixed-aspect layout */
    .cmc-sheet-handle {
        flex: 0 0 auto;
        width: 100%;
        height: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: default;
        touch-action: none;
    }
    .cmc-sheet-handle::before {
        content: '';
        width: 44px; height: 4px;
        border-radius: 2px;
        background: #cfcfcf;
    }

    /* Mobile sheet controls: boat + finish at top, then sections, then swatches */
    .cmc-controls {
        flex: 1 1 auto;
        width: 100%;
        max-width: none;
        margin: 0;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        padding: 0 12px 24px;
    }

    .cmc-section-row { padding: 12px 0 4px; }
    .cmc-section-btn { width: 150px; padding: 6px 12px 10px; }
    .cmc-section-name { font-size: 13px; }
    .cmc-section-pick { font-size: 10px; }

    /* Grid auto-fills 4 bigger swatches per row; wraps into rows to fill the sheet */
    .cmc-swatch-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
        gap: 12px;
        padding: 12px 6px 28px;
    }
    .cmc-swatch-item { width: auto; flex: unset; }
    .cmc-swatch-fill img { width: 100%; }
    .cmc-swatch-name  { font-size: 12px; }
}

/* ============================================================ */
/* MOBILE LANDSCAPE - phone-sized in landscape                  */
/* Boat gets the canvas full-width; controls collapse to a      */
/* short bottom strip so the boat reads as "full view"          */
/* ============================================================ */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
    /* Canvas reclaims vertical space - no aspect lock in landscape */
    .cmc-canvas-wrap {
        flex: 1 1 auto;
        aspect-ratio: auto;
        min-height: 0;
    }
    /* Sheet shrinks to a bottom strip */
    .cmc-sheet          { flex: 0 0 auto; flex-basis: 130px; }
    .cmc-sheet-handle   { display: none; }
    .cmc-section-row    { padding: 4px 0 0; }
    .cmc-section-btn    { width: 130px; padding: 4px 10px 6px; }
    /* Vertical space is tight in landscape - single-row horizontal swatches */
    .cmc-swatch-grid {
        display: flex;
        grid-template-columns: none;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x;
        overscroll-behavior-x: contain;
        padding: 6px 4px 10px;
    }
    .cmc-swatch-grid::-webkit-scrollbar { display: none; }
    .cmc-swatch-item { width: 60px; flex: 0 0 60px; }
    .cmc-swatch-name { font-size: 10px; }
}

/* Desktop-only rules live above in the base block. */

/* Overview drawer */
.cmc-overview-btn {
    font-family: 'Oswald', sans-serif;
    font-size: 14px; font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #282828;
    background: transparent;
    border: 2px solid #DC2323;
    padding: 0 20px;
    height: 46px !important; /* Hard-lock - must match .cmc-boat-btn + .cmc-finish-btn */
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-sizing: border-box;
}
.cmc-overview-btn:hover { background: #DC2323; color: #fff; }

.cmc-drawer-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1050;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}
.cmc-drawer-overlay.open { opacity: 1; pointer-events: auto; }

.cmc-drawer {
    position: fixed;
    top: 0; right: 0;
    width: 100%;
    max-width: 420px;
    height: 100dvh;
    background: #fff;
    z-index: 1060;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 32px rgba(0,0,0,0.1);
}
.cmc-drawer.open { transform: translateX(0); }

.cmc-drawer-head {
    flex: 0 0 auto;
    padding: 18px 22px;
    border-bottom: 1px solid #e1e1e1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.cmc-drawer-head h2 {
    margin: 0;
    font-family: 'Oswald', sans-serif;
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.cmc-drawer-close {
    width: 36px; height: 36px;
    border: 1px solid #e1e1e1;
    background: transparent;
    color: #646464;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.cmc-drawer-close:hover { color: #DC2323; border-color: #DC2323; }

.cmc-drawer-list { flex: 1 1 auto; overflow-y: auto; padding: 0; }
.cmc-drawer-item {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 22px;
    border-bottom: 1px solid #f3f3f3;
}
.cmc-drawer-mini {
    width: 52px; height: 52px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cmc-drawer-mini.empty {
    border: 1px dashed #d8d8d8;
    border-radius: 50%;
    width: 40px; height: 40px;
}
.cmc-drawer-mini img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    background: transparent;
}

.cmc-drawer-info { flex: 1; }
.cmc-drawer-sec {
    font-family: 'Oswald', sans-serif;
    font-size: 11px; font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #969696;
}
.cmc-drawer-color {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 14px; font-weight: 600;
    color: #282828;
}
.cmc-drawer-color.none {
    color: #afafaf;
    font-style: italic;
    font-weight: 400;
}

.cmc-drawer-foot {
    flex: 0 0 auto;
    padding: 16px 22px;
    border-top: 1px solid #e1e1e1;
}
.cmc-save-form {
    display: flex;
    gap: 8px;
}
.cmc-save-form input[type="email"] {
    flex: 1;
    font-family: 'Nunito Sans', sans-serif;
    font-size: 14px;
    padding: 10px 12px;
    border: 1px solid #e1e1e1;
    border-radius: 0;
    outline: none;
}
.cmc-save-form input[type="email"]:focus { border-color: #DC2323; }
.cmc-btn-save {
    font-family: 'Oswald', sans-serif;
    font-size: 13px; font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    background: #DC2323;
    color: #fff;
    border: 2px solid #DC2323;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s;
}
.cmc-btn-save:hover { background: #c51f1f; }
.cmc-btn-save:disabled { opacity: 0.6; cursor: wait; }

.cmc-save-status {
    margin-top: 10px;
    font-size: 13px;
    min-height: 18px;
}
.cmc-save-status.success { color: #2c7a2c; }
.cmc-save-status.error   { color: #DC2323; }

/* Missing swatch asset fallback */
.cmc-swatch-item.cmc-swatch-missing .cmc-swatch-fill {
    background: repeating-linear-gradient(45deg, #f9f9f9, #f9f9f9 6px, #eee 6px, #eee 12px);
}
.cmc-swatch-item.cmc-swatch-missing .cmc-swatch-fill img {
    opacity: 0.3;
}
.cmc-swatch-item.cmc-swatch-missing .cmc-swatch-name::after {
    content: ' !';
    color: #DC2323;
    font-weight: 700;
}

/* Accessibility - visible focus rings for keyboard nav */
.cmc-swatch-item:focus-visible,
.cmc-section-btn:focus-visible,
.cmc-finish-btn:focus-visible,
.cmc-boat-btn:focus-visible,
.cmc-overview-btn:focus-visible,
.cmc-btn-save:focus-visible,
.cmc-drawer-close:focus-visible {
    outline: 2px solid #DC2323;
    outline-offset: 2px;
}
.cmc-swatch-item:focus-visible .cmc-swatch-fill {
    box-shadow: 0 0 0 2px #fff inset;
}

/* ============================================================ */
/* DESKTOP TOP BAR REDESIGN                                     */
/* Editorial typography above the boat - no chrome, no grey bar. */
/* Boat + finish read as display headline pairs centered on the  */
/* page. Active state mirrors the section strip's red underline  */
/* so the whole page shares one visual rhyme. Your Build becomes */
/* a quiet hairline-outlined pill, right-aligned out of the way. */
/* ============================================================ */
@media (min-width: 769px) {
    .cmc-top-bar {
        max-width: none !important;
        margin: 0 auto !important;
        background: transparent !important;
        border-top: none !important;
        border-bottom: none !important;
        padding: 36px 0 28px !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 88px !important;
        position: relative !important;
    }
    .cmc-top-bar .cmc-top-left,
    .cmc-top-bar .cmc-top-right {
        flex: 0 0 auto !important;
        gap: 0 !important;
        justify-content: center !important;
    }

    /* Toggle groups lose their pill chrome */
    .cmc-top-bar .cmc-boat-switch,
    .cmc-top-bar .cmc-finish-toggles {
        display: flex;
        gap: 0;
        background: transparent;
    }

    /* Individual toggles become letter-spaced text tabs */
    .cmc-top-bar .cmc-boat-btn,
    .cmc-top-bar .cmc-finish-btn {
        height: auto !important;
        min-width: 0 !important;
        padding: 10px 26px !important;
        border: none !important;
        background: transparent !important;
        color: #9a9a9a !important;
        font-family: 'Oswald', sans-serif !important;
        font-size: 16px !important;
        font-weight: 400 !important;
        letter-spacing: 4px !important;
        text-transform: uppercase !important;
        position: relative !important;
        transition: color 0.2s ease !important;
    }
    .cmc-top-bar .cmc-boat-btn:hover,
    .cmc-top-bar .cmc-finish-btn:hover {
        color: #282828 !important;
        background: transparent !important;
    }
    .cmc-top-bar .cmc-boat-btn.active,
    .cmc-top-bar .cmc-finish-btn.active {
        color: #282828 !important;
        background: transparent !important;
        border-color: transparent !important;
        font-weight: 600 !important;
    }
    /* 2px red underline spans the full width of the label (matches padding) */
    .cmc-top-bar .cmc-boat-btn.active::after,
    .cmc-top-bar .cmc-finish-btn.active::after {
        content: '';
        position: absolute;
        bottom: 2px;
        left: 26px;   /* matches button's horizontal padding so underline hugs the text */
        right: 26px;
        height: 2px;
        background: #DC2323;
        transform-origin: left center;
        animation: cmc-underline-in 0.28s ease-out both;
    }
    @keyframes cmc-underline-in {
        from { transform: scaleX(0); }
        to   { transform: scaleX(1); }
    }

    /* Your Build - quiet ghost pill floating right, doesn't compete */
    .cmc-top-bar .cmc-overview-btn {
        position: absolute !important;
        right: 36px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        height: 38px !important;
        padding: 0 18px !important;
        border: 1px solid #d8d8d8 !important;
        background: transparent !important;
        color: #555 !important;
        font-size: 11px !important;
        letter-spacing: 2.5px !important;
        font-weight: 600 !important;
        transition: all 0.2s ease !important;
    }
    .cmc-top-bar .cmc-overview-btn:hover {
        border-color: #DC2323 !important;
        color: #DC2323 !important;
        background: transparent !important;
    }

    /* Staggered fade-in on load so the bar arrives with a small moment */
    @keyframes cmc-fade-down {
        from { opacity: 0; transform: translateY(-6px); }
        to   { opacity: 1; transform: translateY(0); }
    }
    .cmc-top-bar .cmc-boat-btn,
    .cmc-top-bar .cmc-finish-btn,
    .cmc-top-bar .cmc-overview-btn {
        animation: cmc-fade-down 0.4s ease-out both;
    }
    .cmc-top-bar .cmc-boat-switch    .cmc-boat-btn:nth-child(1) { animation-delay: 0.05s; }
    .cmc-top-bar .cmc-boat-switch    .cmc-boat-btn:nth-child(2) { animation-delay: 0.10s; }
    .cmc-top-bar .cmc-finish-toggles .cmc-finish-btn:nth-child(1) { animation-delay: 0.18s; }
    .cmc-top-bar .cmc-finish-toggles .cmc-finish-btn:nth-child(2) { animation-delay: 0.22s; }
    .cmc-top-bar .cmc-overview-btn   { animation-delay: 0.32s; }
    /* Override the global [data-aos] reset that sets transform: none */
    .cmc-top-bar .cmc-overview-btn { transform: translateY(-50%) !important; }

    /* Reorder stage: toggles ABOVE the boat on desktop (user request) */
    .cmc-top-bar     { order: 1 !important; }
    .cmc-canvas-wrap { order: 2 !important; }
    .cmc-sheet       { order: 3 !important; }
}

/* ============================================================ */
/* MOBILE HEIGHT LOCK - comes LAST in the stylesheet so it wins  */
/* over any base rule declared later in the file.                */
/* ============================================================ */
@media (max-width: 768px) {
    .cmc-boat-btn,
    .cmc-finish-btn,
    .cmc-overview-btn {
        height: 36px !important;
        padding: 0 12px !important;
        font-size: 11px !important;
        letter-spacing: 0.8px !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
    .cmc-boat-btn {
        padding: 0 14px !important;
        font-size: 12px !important;
        letter-spacing: 1.5px !important;
    }
}

/* ============================================================ */
/* MOBILE UNDERLINE TREATMENT - matches desktop look              */
/* Comes LAST so it beats the pill-button base rules and the     */
/* HEIGHT LOCK for boat/finish buttons. Your Build stays a pill. */
/* ============================================================ */
@media (max-width: 768px) {
    .cmc-top-bar {
        background: transparent !important;
        border-top: none !important;
        border-bottom: none !important;
        padding: 12px 8px !important;
        gap: 6px !important;
    }
    .cmc-top-bar .cmc-top-left,
    .cmc-top-bar .cmc-top-right { gap: 6px !important; }

    .cmc-top-bar .cmc-boat-switch,
    .cmc-top-bar .cmc-finish-toggles {
        background: transparent !important;
        gap: 0 !important;
    }
    .cmc-top-bar .cmc-boat-btn,
    .cmc-top-bar .cmc-finish-btn {
        height: auto !important;
        min-width: 0 !important;
        padding: 6px 5px !important;
        border: none !important;
        background: transparent !important;
        color: #9a9a9a !important;
        font-family: 'Oswald', sans-serif !important;
        font-size: 11px !important;
        font-weight: 400 !important;
        letter-spacing: 1.5px !important;
        text-transform: uppercase !important;
        position: relative !important;
        transition: color 0.2s ease !important;
        white-space: nowrap !important;
    }
    .cmc-top-bar .cmc-boat-btn:hover:not(.active),
    .cmc-top-bar .cmc-finish-btn:hover:not(.active) {
        color: #282828 !important;
        background: transparent !important;
    }
    .cmc-top-bar .cmc-boat-btn.active,
    .cmc-top-bar .cmc-finish-btn.active {
        color: #282828 !important;
        background: transparent !important;
        border-color: transparent !important;
        font-weight: 600 !important;
    }
    .cmc-top-bar .cmc-boat-btn.active::after,
    .cmc-top-bar .cmc-finish-btn.active::after {
        content: '';
        position: absolute;
        bottom: 2px;
        left: 5px;
        right: 5px;
        height: 2px;
        background: #DC2323;
        transform-origin: left center;
        animation: cmc-underline-in 0.28s ease-out both;
    }
    /* Skinnier Your Build pill on mobile so the whole row fits on one line */
    .cmc-top-bar .cmc-overview-btn {
        padding: 0 8px !important;
        font-size: 10px !important;
        letter-spacing: 0.6px !important;
        white-space: nowrap !important;
    }
}

