/* =========================================================
   Wishboard CSS
   Cleaned + organised
   ========================================================= */


/* =========================
   1. Global
========================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f8f5f0;
    color: #1f1f1f;
}

a {
    color: inherit;
}

button,
input,
select {
    font-family: inherit;
}


/* =========================================================
   2. Navbar / Topbar / Sidebar shell
   Consolidated from across the file (was previously scattered
   across the base stylesheet, the unlabeled hotfix zone, and
   several appended redesign blocks) - relative order of every
   rule (and of every @media block relative to every other one)
   is preserved exactly as it was, so cascade behaviour is
   unchanged; only the *location* moved.
========================= */

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;

    min-height: 76px;
    padding: 0 64px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid #eee6dc;
}

/* The "deckd" wordmark (top bar .logo, the auth modals'
   .deckd-auth-wordmark, the landing footer's .lp-footer-logo).
   Self-hosted like fonts-landing.css (SIL Open Font License); latin
   subset only - the wordmark never needs anything else. Archivo Black
   only ships a 400 weight, so the wordmark rules set font-weight: 400
   rather than letting the browser fake-bold an already black face.
   Regenerate from: https://fonts.googleapis.com/css2?family=Archivo+Black&display=swap */
@font-face {
    font-family: 'Archivo Black';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/archivo-black-normal-400-latin.4b6914a69e6a.woff2") format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

.logo {
    color: #1f1f1f;
    text-decoration: none;

    font-family: 'Archivo Black', Arial, sans-serif;
    font-size: 28px;
    font-weight: 400;
    /* -53 tracking, i.e. -53/1000 em - em-based so it stays proportional
       at every breakpoint's font-size below. */
    letter-spacing: -0.053em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-links a {
    color: #333;
    text-decoration: none;

    font-size: 15px;
    font-weight: 800;
}

@media (max-width: 800px) {
    .navbar {
        padding: 0 28px;
    }
}

@media (max-width: 560px) {
    .navbar {
        padding: 18px 20px;

        flex-direction: column;
        justify-content: center;
        gap: 14px;
    }

    .logo {
        font-size: 36px;
    }

    .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }

    .nav-links a {
        font-size: 12px;
    }
}

@media (max-width: 360px) {
    .logo {
        font-size: 30px;
    }

    .nav-links a {
        font-size: 10px;
    }
}

/* Navbar account icon */

.nav-account-icon {
    width: 34px;
    height: 34px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    color: #1f1f1f;
}

.nav-account-menu {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-account-icon {
    width: 36px;
    height: 36px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: none;
    border-radius: 50%;

    background: transparent;
    color: #1f1f1f;

    cursor: pointer;
}

.nav-account-icon svg {
    width: 22px;
    height: 22px;
}

.nav-account-icon:hover {
    background: #f4efe8;
}

.nav-account-dropdown {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    z-index: 3000;

    width: 240px;

    display: none;

    padding: 16px;

    background: white;
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.14);
}

.nav-account-menu:hover .nav-account-dropdown,
.nav-account-menu:focus-within .nav-account-dropdown {
    display: block;
}

.nav-account-dropdown::before {
    content: "";

    position: absolute;
    top: -14px;
    right: 0;

    width: 100%;
    height: 14px;
}

.nav-profile-row {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-bottom: 14px;
}

.nav-profile-avatar {
    width: 46px;
    height: 46px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #f4efe8;
    color: #1f1f1f;

    font-size: 20px;
    font-weight: 900;
}

.nav-profile-row strong {
    display: block;

    color: #1f1f1f;

    font-size: 15px;
    font-weight: 900;
}

.nav-profile-row span {
    display: block;

    margin-top: 3px;

    color: #8a7f73;

    font-size: 13px;
    font-weight: 700;
}

.nav-dropdown-title {
    margin: 0 0 14px;

    color: #1f1f1f;

    text-align: center;

    font-size: 15px;
    font-weight: 900;
}

.nav-dropdown-button {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-top: 10px;
    padding: 12px 16px;

    border-radius: 999px;

    background: #1f1f1f;
    color: white !important;

    text-decoration: none !important;

    font-size: 14px !important;
    font-weight: 800 !important;
}

.secondary-nav-dropdown-button {
    background: #f4efe8;
    color: #1f1f1f !important;
    border: 1px solid #e6ddd2;
}

@media (max-width: 560px) {
    .nav-account-dropdown {
        right: 50%;
        transform: translateX(50%);

        width: 220px;
    }

    .nav-account-icon {
        width: 32px;
        height: 32px;
    }

    .nav-account-icon svg {
        width: 20px;
        height: 20px;
    }
}

.nav-dropdown-button {
    border: none;
    cursor: pointer;
    font-family: inherit;
}

/* Navbar button link */

.nav-link-button {
    border: none;
    background: transparent;
    color: #333;

    font-family: inherit;
    font-size: 15px;
    font-weight: 800;

    cursor: pointer;
    padding: 0;
}

.nav-link-button:hover {
    opacity: 0.7;
}

@media (max-width: 560px) {
    .nav-link-button {
        font-size: 12px;
    }
}

.nav-profile-avatar {
    overflow: hidden;
}

.nav-profile-avatar img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}

@media (max-width: 560px) {
    .navbar {
        align-items: center !important;
        text-align: center !important;
    }

    .nav-links {
        width: 100% !important;

        display: flex !important;
        align-items: center !important;
        justify-content: center !important;

        gap: 18px !important;
    }

    .nav-links > a,
    .nav-links > button,
    .nav-account-menu {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .nav-account-icon {
        width: 24px !important;
        height: 24px !important;
    }

    .nav-account-icon svg {
        width: 17px !important;
        height: 17px !important;
    }

    .nav-links {
        transform: translateX(6px) !important;
    }
}

.nav-currency-button {
    border: none;
    background: transparent;
    cursor: pointer;

    display: flex;
    align-items: center;
    gap: 5px;

    font-size: 14px;
    font-weight: 700;
    color: inherit;

    padding: 8px 10px;
    border-radius: 999px;
}

.nav-currency-symbol {
    font-size: 14px;
    line-height: 1;
}

.nav-currency-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;

    min-width: 120px;
    padding: 8px;

    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.16);

    display: none;
    z-index: 9999;
}

.nav-currency-option {
    width: 100%;
    border: none;
    background: transparent;
    cursor: pointer;

    text-align: left;
    padding: 9px 10px;
    border-radius: 10px;

    font-size: 13px;
    font-weight: 600;
}

.navbar-with-left-currency {
    position: relative;
}

.nav-currency-menu {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-currency-menu-left {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-43%);
    z-index: 1000;
}

.nav-currency-button {
    border: none;
    background: transparent;
    cursor: pointer;

    display: flex;
    align-items: center;
    gap: 5px;

    font-size: 14px;
    font-weight: 700;
    color: #000000;

    padding: 8px 10px;
    border-radius: 999px;
}

.nav-currency-button:hover {
    background: rgba(0, 0, 0, 0.06);
}

.nav-currency-globe {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #000000;
}

.nav-currency-globe svg {
    width: 16px;
    height: 16px;
    display: block;
}

.nav-currency-symbol {
    font-size: 16px;
    line-height: 1;
    color: #000000;
    white-space: nowrap;
    font-weight: 700;
}

.nav-currency-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;

    min-width: 120px;
    padding: 8px;

    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.16);

    display: none;
    z-index: 9999;
}

.nav-currency-menu.open .nav-currency-dropdown {
    display: block;
}

.nav-currency-option {
    width: 100%;
    border: none;
    background: transparent;
    cursor: pointer;

    text-align: left;
    padding: 9px 10px;
    border-radius: 10px;

    font-size: 13px;
    font-weight: 600;
    color: #000000;
}

.nav-currency-option:hover {
    background: rgba(0, 0, 0, 0.06);
}

.navbar-with-left-currency .logo {
    margin-left: 34px;
}

/* Keep navbar visible above Explore content */
.navbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 10000 !important;
    background: #ffffff !important;
}

/* Make sure the left currency control stays aligned inside sticky navbar */
.navbar-with-left-currency {
    position: sticky !important;
    top: 0 !important;
    z-index: 10000 !important;
}

/* Keep currency selector slightly lower and visible */
.nav-currency-menu-left {
    top: 53% !important;
    transform: translateY(-50%) !important;
}

.navbar,
.navbar-with-left-currency {
    background: #ffffff !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10000 !important;
    border-bottom: none !important;
}

/* Currency is 24px from left */
.nav-currency-menu-left {
    left: 24px !important;
    top: 53% !important;
    transform: translateY(-50%) !important;
}

/* Make currency button width predictable */
.nav-currency-button {
    padding: 8px 10px !important;
    gap: 8px !important;
}

/* Make wishboard gap match nav-link spacing */
.navbar-with-left-currency .logo {
    margin-left: 65px !important;
}

/* Right nav is 24px from right, matching currency from left */
.nav-links {
    margin-left: auto !important;
    margin-right: -30px !important;
    gap: 28px !important;
}

.navbar {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04) !important;
}

/* Vertically align left currency + logo with right nav links */
.navbar-with-left-currency .logo {
    position: relative !important;
    top: -3px !important;
}

.nav-currency-menu-left {
    top: calc(50% - 1px) !important;
}

/* New shared navbar layout */
.site-navbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 10000 !important;

    display: grid !important;
    grid-template-columns: 1fr auto 1fr !important;
    align-items: center !important;

    height: 72px !important;
    padding: 0 32px !important;

    background: #ffffff !important;
    box-shadow: none !important;
    border-bottom: none !important;
}

.site-navbar::after {
    display: none !important;
    content: none !important;
}

/* Left logo */
.navbar-left {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
}

.site-navbar .logo {
    margin: 0 !important;
    padding: 0 !important;
    position: static !important;
    transform: none !important;

    color: #111111 !important;
    text-decoration: none !important;
}

/* Centre nav */
.navbar-center {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 34px !important;
}

.navbar-center-link {
    position: relative !important;

    background: transparent !important;
    border: none !important;
    box-shadow: none !important;

    padding: 8px 0 !important;

    color: #111111 !important;
    text-decoration: none !important;

    font-size: 16px !important;
    font-weight: 800 !important;
    line-height: 1 !important;

    cursor: pointer !important;
}

/* Active page underline */
.navbar-center-link.active-nav-link::after {
    content: "" !important;

    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: -3px !important;

    height: 2px !important;
    background: #000000 !important;
    border-radius: 999px !important;
}

/* Do not underline the logo */
.site-navbar .logo::after {
    display: none !important;
    content: none !important;
}

/* Account in centre */
.navbar-account-center {
    position: relative !important;
}

.nav-account-text-button {
    font-family: inherit !important;
}

/* Right currency */
.navbar-right {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
}

.site-navbar .nav-currency-menu {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    right: auto !important;
    transform: none !important;
}

.site-navbar .nav-currency-button {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;

    color: #111111 !important;

    padding: 8px 0 !important;

    font-size: 12px !important;
    font-weight: 800 !important;

    cursor: pointer !important;
}

.site-navbar .nav-currency-symbol {
    color: #111111 !important;
}

/* Currency dropdown on far right */
.site-navbar .nav-currency-dropdown {
    position: absolute !important;
    top: calc(100% + 14px) !important;
    right: 0 !important;
    left: auto !important;

    min-width: 128px !important;

    display: none;
}

.site-navbar .nav-currency-menu.open .nav-currency-dropdown {
    display: block !important;
}

/* Account dropdown under centre account */
.navbar-account-center .nav-account-dropdown {
    top: calc(100% + 14px) !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
}

/* Hide old right nav-links layout if old CSS tries to interfere */
.site-navbar .nav-links {
    display: none !important;
}

/* Account icon back on RHS */
.site-navbar .navbar-account-right {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
}

/* Account icon styling */
.site-navbar .nav-account-icon {
    position: relative !important;

    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;

    padding: 0 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: transparent !important;
    border: none !important;
    box-shadow: none !important;

    color: #111111 !important;
    cursor: pointer !important;
}

/* Account SVG size */
.site-navbar .nav-account-icon svg {
    width: 20px !important;
    height: 20px !important;
    stroke: #111111 !important;
}

/* Account dropdown under right icon */
.site-navbar .navbar-account-right .nav-account-dropdown {
    top: calc(100% + 16px) !important;
    right: 0 !important;
    left: auto !important;
    transform: none !important;
}

/* Centre nav now only Explore + My Boards */
.site-navbar .navbar-center {
    gap: 42px !important;
}

.site-navbar .navbar-right {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
}

.site-navbar .navbar-right .nav-currency-menu {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
}

.site-navbar .navbar-right .navbar-account-right,
.site-navbar .navbar-right .nav-account-menu {
    position: relative !important;
}

@media (max-width: 768px) {
    .site-navbar {
        height: 64px !important;
        padding: 0 18px !important;

        display: grid !important;
        grid-template-columns: auto 1fr auto !important;
        align-items: center !important;

        background: #ffffff !important;
        box-shadow: none !important;
        border-bottom: none !important;
    }

    .site-navbar .logo {
        font-size: 26px !important;
        line-height: 1 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .site-navbar .navbar-center {
        gap: 18px !important;
        justify-content: center !important;
    }

    .site-navbar .navbar-center-link {
        font-size: 11px !important;
        letter-spacing: 0.09em !important;
        padding: 8px 0 !important;
    }

    .site-navbar .navbar-center-link.active-nav-link::after {
        bottom: -8px !important;
        height: 2px !important;
    }

    .site-navbar .navbar-right {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 18px !important;
    }

    .site-navbar .nav-currency-button {
        font-size: 20px !important;
        letter-spacing: 0.06em !important;
        padding: 0 !important;
        white-space: nowrap !important;
    }

    .site-navbar .nav-account-icon {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
        min-height: 30px !important;
    }

    .site-navbar .nav-account-icon svg {
        width: 23px !important;
        height: 23px !important;
    }

    .site-navbar .nav-currency-dropdown,
    .site-navbar .nav-account-dropdown {
        top: calc(100% + 14px) !important;
        right: 0 !important;
        left: auto !important;
        transform: none !important;
    }
}

@media (max-width: 480px) {
    .site-navbar {
        padding: 0 12px !important;
    }

    .site-navbar .logo {
        font-size: 22px !important;
    }

    .site-navbar .navbar-center {
        gap: 12px !important;
    }

    .site-navbar .navbar-center-link {
        font-size: 10px !important;
        letter-spacing: 0.06em !important;
    }

    .site-navbar .navbar-right {
        gap: 12px !important;
    }

    .site-navbar .nav-currency-button {
        font-size: 10px !important;
    }
}

/* Account dropdown gets priority over currency dropdown */
.site-navbar .navbar-right .navbar-account-right {
    z-index: 10040 !important;
}

.site-navbar .navbar-right .nav-currency-menu {
    z-index: 10020 !important;
}

/* Account dropdown opens only from JS class */
.site-navbar .navbar-right .navbar-account-right > .nav-account-dropdown {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.site-navbar .navbar-right .navbar-account-right.account-dropdown-open > .nav-account-dropdown {
    display: block !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Currency dropdown should close/lose priority when account is open */
.site-navbar .navbar-right .navbar-account-right.account-dropdown-open ~ .nav-currency-menu .nav-currency-dropdown,
.site-navbar .navbar-right .nav-currency-menu:has(~ .navbar-account-right.account-dropdown-open) .nav-currency-dropdown {
    display: none !important;
}

/* Right-side container */
.site-navbar .navbar-right {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;

    gap: 14px !important;

    width: auto !important;
    min-width: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    position: relative !important;
}

/* Direct children only */
.site-navbar .navbar-right > .nav-quick-add-menu,
.site-navbar .navbar-right > #navQuickAddMenu,
.site-navbar .navbar-right > .nav-currency-menu,
.site-navbar .navbar-right > #navCurrencyMenu,
.site-navbar .navbar-right > .nav-account-menu,
.site-navbar .navbar-right > .navbar-account-right {
    position: relative !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;

    margin: 0 !important;
    padding: 0 !important;

    flex: 0 0 auto !important;

    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
}

.site-navbar .nav-quick-add-button,
.site-navbar #navQuickAddButton {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;

    margin: 0 !important;
    padding: 0 !important;

    display: grid !important;
    place-items: center !important;

    border: none !important;
    border-radius: 999px !important;

    background: #000000 !important;
    color: #ffffff !important;

    line-height: 0 !important;

    cursor: pointer !important;
}

.site-navbar .nav-quick-add-icon {
    width: 15px !important;
    height: 15px !important;

    display: block !important;

    stroke: #ffffff !important;
    color: #ffffff !important;
}

/* IMPORTANT: hide quick-add dropdown from navbar flow */
.site-navbar .nav-quick-add-dropdown,
.site-navbar #navQuickAddDropdown {
    position: absolute !important;
    top: calc(100% + 14px) !important;
    right: 0 !important;
    z-index: 10050 !important;

    min-width: 170px !important;

    display: none !important;

    margin: 0 !important;
    padding: 10px !important;

    background: #ffffff !important;
    border-radius: 20px !important;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.14) !important;
}

.site-navbar .nav-currency-button,
.site-navbar #navCurrencyButton {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;

    margin: 0 !important;
    padding: 0 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    border: none !important;
    background: transparent !important;

    color: #000000 !important;

    font-family: inherit !important;
    font-size: 16px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    white-space: nowrap !important;

    cursor: pointer !important;
}

.site-navbar .nav-currency-symbol,
.site-navbar #navCurrencySymbol {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    margin: 0 !important;
    padding: 0 !important;

    color: #000000 !important;

    line-height: 1 !important;
    white-space: nowrap !important;
}

/* IMPORTANT: hide currency dropdown from navbar flow */
.site-navbar .nav-currency-dropdown,
.site-navbar #navCurrencyDropdown {
    position: absolute !important;
    top: calc(100% + 14px) !important;
    right: 0 !important;
    z-index: 10040 !important;

    min-width: 130px !important;

    display: none !important;

    margin: 0 !important;
    padding: 10px !important;

    background: #ffffff !important;
    border-radius: 18px !important;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.14) !important;
}

/* Show currency dropdown only when JS adds .open */
.site-navbar .nav-currency-menu.open .nav-currency-dropdown,
.site-navbar #navCurrencyMenu.open #navCurrencyDropdown {
    display: block !important;
}

.site-navbar .nav-currency-option {
    width: 100% !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;

    margin: 0 !important;
    padding: 10px 12px !important;

    border: none !important;
    border-radius: 12px !important;

    background: transparent !important;
    color: #111111 !important;

    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 800 !important;

    text-align: left !important;
    white-space: nowrap !important;

    cursor: pointer !important;
}

.site-navbar .nav-currency-option:hover {
    background: #f3f3f2 !important;
}

/* "About conversion" (i) row at the bottom of the currency dropdown -
   opens #currencyDisclaimerModal. Deliberately quieter than the
   currency options above it: smaller, grey, with a hairline divider so
   it reads as a footnote, not another pickable currency. Sticky so it
   stays pinned at the bottom even when the currency list scrolls (the
   dropdown caps at max-height: 280px). Stays inside the panel's content
   box (no negative margins) so it never runs under the scrollbar
   gutter. */
.site-navbar .nav-currency-info-row {
    width: 100% !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 7px !important;

    position: sticky !important;
    bottom: 0 !important;
    z-index: 2 !important;

    margin: 5px 0 0 !important;
    padding: 9px 12px !important;

    border: none !important;
    border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 0 !important;

    background: rgba(252, 252, 252, 0.97) !important;
    color: #8a8a8a !important;

    font-family: inherit !important;
    font-size: 12px !important;
    font-weight: 600 !important;

    text-align: left !important;
    white-space: nowrap !important;

    cursor: pointer !important;
}

.site-navbar .nav-currency-info-row:hover {
    background: rgba(244, 244, 244, 0.99) !important;
    color: #555555 !important;
}

.site-navbar .nav-currency-info-icon {
    width: 14px !important;
    height: 14px !important;
    flex-shrink: 0 !important;
}

.site-navbar .nav-account-icon {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;

    margin: 0 !important;
    padding: 0 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    border: none !important;
    border-radius: 999px !important;

    background: transparent !important;
    color: #000000 !important;

    line-height: 0 !important;

    cursor: pointer !important;
}

.site-navbar .nav-account-icon svg {
    width: 23px !important;
    height: 23px !important;

    display: block !important;

    stroke: #000000 !important;
}

/* IMPORTANT: hide account dropdown from navbar flow */
.site-navbar .nav-account-dropdown {
    position: absolute !important;
    top: calc(100% + 14px) !important;
    right: 0 !important;
    z-index: 10060 !important;

    width: 240px !important;

    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;

    margin: 0 !important;
    padding: 16px !important;

    background: #ffffff !important;
    border-radius: var(--dm-radius-modal) !important;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.14) !important;
}

/* Show account dropdown only when JS adds .account-dropdown-open */
.site-navbar .navbar-account-right.account-dropdown-open > .nav-account-dropdown,
.site-navbar .nav-account-menu.account-dropdown-open > .nav-account-dropdown {
    display: block !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Stop old hover CSS from opening it accidentally */
.site-navbar .nav-account-menu:hover > .nav-account-dropdown {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.site-navbar .nav-account-menu.account-dropdown-open:hover > .nav-account-dropdown {
    display: block !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

@media (max-width: 768px) {
    .site-navbar .navbar-right {
        gap: 10px !important;
    }

    .site-navbar .nav-quick-add-button,
    .site-navbar #navQuickAddButton {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        min-height: 28px !important;
    }

    .site-navbar .nav-quick-add-icon {
        width: 14px !important;
        height: 14px !important;
    }

    .site-navbar .nav-currency-button,
    .site-navbar #navCurrencyButton {
        font-size: 13px !important;
    }

    .site-navbar .nav-account-icon {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
    }

    .site-navbar .nav-account-icon svg {
        width: 22px !important;
        height: 22px !important;
    }
}

/* Main navbar spacing from page edges */
html body nav.site-navbar,
html body .site-navbar {
    padding-left: 28px !important;
    padding-right: 28px !important;

    display: grid !important;
    grid-template-columns: minmax(150px, 1fr) auto minmax(150px, 1fr) !important;
    align-items: center !important;
}

/* Left / center / right placement */
html body .site-navbar .navbar-left {
    grid-column: 1 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;

    margin: 0 !important;
    padding: 0 !important;
}

html body .site-navbar .navbar-center {
    grid-column: 2 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    margin: 0 !important;
    padding: 0 !important;
}

html body .site-navbar .navbar-right {
    grid-column: 3 !important;

    display: grid !important;

    /*
       1 = plus button
       2 = space between plus and currency
       3 = currency button
       4 = space between currency and account
       5 = account icon
    */
    grid-template-columns: 30px 18px max-content 13px 34px !important;

    align-items: center !important;
    justify-content: end !important;

    gap: 0 !important;
    column-gap: 0 !important;
    row-gap: 0 !important;

    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;

    margin: 0 !important;
    padding: 0 !important;
}

/* RHS exact item placement */
html body .site-navbar .navbar-right > .nav-quick-add-menu,
html body .site-navbar .navbar-right > #navQuickAddMenu {
    grid-column: 1 !important;
}

html body .site-navbar .navbar-right > .nav-currency-menu,
html body .site-navbar .navbar-right > #navCurrencyMenu {
    grid-column: 3 !important;
}

html body .site-navbar .navbar-right > .nav-account-menu,
html body .site-navbar .navbar-right > .navbar-account-right {
    grid-column: 5 !important;
}

/* Reset RHS wrappers only */
html body .site-navbar .navbar-right > .nav-quick-add-menu,
html body .site-navbar .navbar-right > #navQuickAddMenu,
html body .site-navbar .navbar-right > .nav-currency-menu,
html body .site-navbar .navbar-right > #navCurrencyMenu,
html body .site-navbar .navbar-right > .nav-account-menu,
html body .site-navbar .navbar-right > .navbar-account-right {
    position: relative !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;

    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;

    margin: 0 !important;
    padding: 0 !important;

    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;

    flex: none !important;
}

/* Plus button sizing/position only */
html body .site-navbar .nav-quick-add-button,
html body .site-navbar #navQuickAddButton {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;

    margin: 0 !important;
    padding: 0 !important;

    display: grid !important;
    place-items: center !important;

    line-height: 0 !important;
}

/* Plus SVG sizing only */
html body .site-navbar .nav-quick-add-icon {
    width: 15px !important;
    height: 15px !important;

    display: block !important;
}

/* Quick-add dropdown: hidden from navbar flow */
html body .site-navbar .nav-quick-add-dropdown,
html body .site-navbar #navQuickAddDropdown {
    position: absolute !important;
    top: calc(100% + 14px) !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    z-index: 10060 !important;

    min-width: 170px !important;

    display: none !important;

    margin: 0 !important;
}

/* Open quick-add dropdown */
html body .site-navbar .nav-quick-add-menu.open .nav-quick-add-dropdown,
html body .site-navbar #navQuickAddMenu.open #navQuickAddDropdown {
    display: block !important;
}

/* Currency button: no hidden width, no margin */
html body .site-navbar .nav-currency-button,
html body .site-navbar #navCurrencyButton {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;

    height: auto !important;
    min-height: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    white-space: nowrap !important;
    line-height: 1 !important;
}

/* Currency text wrapper */
html body .site-navbar .nav-currency-symbol,
html body .site-navbar #navCurrencySymbol {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    margin: 0 !important;
    padding: 0 !important;

    white-space: nowrap !important;
    line-height: 1 !important;
}

html body .site-navbar .nav-currency-dropdown,
html body .site-navbar #navCurrencyDropdown {
    position: absolute !important;
    top: calc(100% + 14px) !important;

    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;

    z-index: 10050 !important;

    min-width: 130px !important;

    display: none !important;

    margin: 0 !important;
}

/* Open currency dropdown */
html body .site-navbar .nav-currency-menu.open .nav-currency-dropdown,
html body .site-navbar #navCurrencyMenu.open #navCurrencyDropdown {
    display: block !important;
}

/* Account icon sizing/position only */
html body .site-navbar .nav-account-icon {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;

    margin: 0 !important;
    padding: 0 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    line-height: 0 !important;
}

html body .site-navbar .nav-account-icon svg {
    display: block !important;
}

/* Account dropdown: hidden from navbar flow */
html body .site-navbar .nav-account-dropdown {
    position: absolute !important;
    top: calc(100% + 14px) !important;
    right: 0 !important;
    z-index: 10070 !important;

    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;

    margin: 0 !important;
}

/* JS-controlled account dropdown only */
html body .site-navbar .navbar-account-right.account-dropdown-open > .nav-account-dropdown,
html body .site-navbar .nav-account-menu.account-dropdown-open > .nav-account-dropdown {
    display: block !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Kill old hover-open account rule */
html body .site-navbar .nav-account-menu:hover > .nav-account-dropdown {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

html body .site-navbar .nav-account-menu.account-dropdown-open:hover > .nav-account-dropdown {
    display: block !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

@media (max-width: 768px) {
    html body nav.site-navbar,
    html body .site-navbar {
        padding-left: 16px !important;
        padding-right: 16px !important;

        grid-template-columns: minmax(88px, 1fr) auto minmax(88px, 1fr) !important;
    }

    html body .site-navbar .nav-quick-add-button,
    html body .site-navbar #navQuickAddButton {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        min-height: 28px !important;
    }

    html body .site-navbar .nav-quick-add-icon {
        width: 14px !important;
        height: 14px !important;
    }

    html body .site-navbar .nav-account-icon {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
    }
}

/* Make sure sticky search/tool rows never sit above modal */
html body .explore-search-row,
html body .boards-page > .search-expand-wrapper,
html body .board-tools-row,
html body .site-navbar,
html body nav.site-navbar {
    z-index: auto;
}

/* But keep navbar normally above page content when modal is closed */
html body .site-navbar,
html body nav.site-navbar {
    z-index: 10000 !important;
}

/* Keep sticky bars lower than modal */
html body nav.site-navbar,
html body .site-navbar,
html body .explore-search-row,
html body .boards-page > .search-expand-wrapper,
html body .board-tools-row {
    z-index: 10000 !important;
}

html body nav.site-navbar,
html body .site-navbar {
    z-index: 90000 !important;
}

html body .site-navbar .navbar-right {
    position: relative !important;
    z-index: 90001 !important;
}

html body .site-navbar .nav-quick-add-menu,
html body .site-navbar #navQuickAddMenu,
html body .site-navbar .nav-currency-menu,
html body .site-navbar #navCurrencyMenu,
html body .site-navbar .navbar-account-right,
html body .site-navbar .nav-account-menu {
    position: relative !important;
    z-index: 90002 !important;
}

html body .site-navbar .nav-quick-add-dropdown,
html body .site-navbar #navQuickAddDropdown {
    z-index: 90010 !important;
}

html body .site-navbar .nav-currency-dropdown,
html body .site-navbar #navCurrencyDropdown {
    z-index: 90010 !important;
}

html body .site-navbar .nav-account-dropdown {
    z-index: 90020 !important;
}

/* Navbar must stay visible while scrolling */
html body nav.site-navbar,
html body .site-navbar,
html body .navbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 90000 !important;

    transform: none !important;
    translate: none !important;

    overflow: visible !important;
}

/* Keep navbar inner dropdowns above sticky search bars */
html body .site-navbar .navbar-right,
html body .site-navbar .nav-quick-add-menu,
html body .site-navbar .nav-currency-menu,
html body .site-navbar .nav-account-menu,
html body .site-navbar .navbar-account-right {
    position: relative !important;
    z-index: 90001 !important;
}

html body .site-navbar .nav-quick-add-dropdown,
html body .site-navbar .nav-currency-dropdown,
html body .site-navbar .nav-account-dropdown {
    z-index: 90010 !important;
}

/* Navbar stays highest */
html body nav.site-navbar,
html body .site-navbar,
html body .navbar {
    z-index: 90000 !important;
}

.deckd-shell {
    display: flex;
    align-items: stretch;
    min-height: 100vh;
}

/* ---------- Sidebar ---------- */

.deckd-sidebar {
    position: sticky;
    top: 0;
    align-self: flex-start;

    width: 64px;
    height: 100vh;
    flex: 0 0 auto;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;

    padding: 14px 0;

    background: #ffffff;
    border-right: 1px solid #ede7de;

    z-index: 10001;
}

.deckd-sidebar-link {
    position: relative;

    width: 48px;
    height: 48px;
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 13px;

    background: transparent;
    color: #111111;

    text-decoration: none;
    cursor: pointer;

    transition: background 0.15s ease;
}

.deckd-sidebar-link svg {
    width: 24px;
    height: 24px;
}

.deckd-sidebar-link:hover {
    background: #f3f3f2;
}

.deckd-sidebar-link.deckd-sidebar-link-active {
    background: #eeeeec;
    color: #1f1f1f;
}

.deckd-sidebar-link.deckd-sidebar-link-active:hover {
    background: #eeeeec;
}

/* =========================================================
   INSTANT STYLED TOOLTIPS
   LHS sidebar icons + top navbar's currency/notifications buttons
   (see data-tooltip="..." in base.html). Pure CSS/:hover, so there's
   none of the native title attribute's ~600ms-1s OS-level delay - the
   only pause is the short fade below, there to avoid a jarring instant
   snap rather than to add a deliberate delay. title was removed from
   these elements when data-tooltip was added (aria-label carries the
   accessible name instead) so the browser's own tooltip never fires
   alongside this one.
   ========================================================= */

[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);

    position: absolute;
    z-index: 10050;

    padding: 6px 10px;

    background: #1f1f1f;
    border-radius: 7px;

    color: #ffffff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;

    opacity: 0;
    pointer-events: none;

    transition: opacity 0.08s ease, transform 0.08s ease;
}

[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
    opacity: 1;
}

/* Sidebar icons: bubble to the right, arrow pointing back at the icon. */
.deckd-sidebar-link[data-tooltip]::after {
    top: 50%;
    left: calc(100% + 10px);
    transform: translateY(-50%) scale(0.96);
}

.deckd-sidebar-link[data-tooltip]:hover::after,
.deckd-sidebar-link[data-tooltip]:focus-visible::after {
    transform: translateY(-50%) scale(1);
}

/* Quick Access is the one sidebar icon with its own dropdown - hide
   the tooltip once that's open so it doesn't sit awkwardly next to
   (or under) the dropdown card occupying roughly the same spot. */
.deckd-sidebar-quickadd.open [data-tooltip]::after {
    opacity: 0 !important;
}

/* Currency + notifications: bubble below, arrow pointing back up. */
.nav-currency-button[data-tooltip]::after,
.nav-notifications-button[data-tooltip]::after {
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) scale(0.96);
}

.nav-currency-button[data-tooltip]:hover::after,
.nav-currency-button[data-tooltip]:focus-visible::after,
.nav-notifications-button[data-tooltip]:hover::after,
.nav-notifications-button[data-tooltip]:focus-visible::after {
    transform: translateX(-50%) scale(1);
}

/* Search bar's Filter button: bubble below, like the buttons next to it. */
.deckd-search-filter-button[data-tooltip]::after {
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) scale(0.96);
}

.deckd-search-filter-button[data-tooltip]:hover::after,
.deckd-search-filter-button[data-tooltip]:focus-visible::after {
    transform: translateX(-50%) scale(1);
}

/* Hide the currency/notifications tooltip once that button's own
   dropdown is open, same reasoning as Quick Access above. */
.nav-currency-menu.open [data-tooltip]::after,
.nav-notifications-menu.open [data-tooltip]::after {
    opacity: 0 !important;
}

.deckd-sidebar-quickadd {
    position: relative;
}

.deckd-sidebar-dropdown {
    display: none;

    /* Centred on the button's own vertical midpoint (was top:0, i.e.
       anchored to the button's TOP edge) - the Quick Add button sits
       near the bottom of the sidebar, so a dropdown this tall growing
       only downward from that point ran off the bottom of the
       viewport. Growing evenly up/down from the centre instead keeps
       it on-screen regardless of where the button lands. */
    position: absolute !important;
    top: 50% !important;
    left: calc(100% + 12px) !important;
    right: auto !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;

    min-width: 190px;
    padding: 10px;

    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.14);
}

.deckd-sidebar-quickadd.open .deckd-sidebar-dropdown {
    display: block !important;
}

.deckd-sidebar-dropdown .nav-quick-add-option {
    display: block;
    width: 100%;

    padding: 12px 14px;

    border: none;
    border-radius: 10px;

    background: transparent;
    color: #1f1f1f;

    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    text-decoration: none;

    cursor: pointer;
}

.deckd-sidebar-dropdown .nav-quick-add-option:hover {
    background: #f3f3f2;
}

/* ---------- Main column + top bar ---------- */

.deckd-main {
    flex: 1 1 auto;
    min-width: 0;
}

.deckd-topbar.site-navbar {
    display: flex !important;
    flex-direction: row !important;
    grid-template-columns: none !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0 !important;
}

.deckd-topbar .navbar-left,
.deckd-topbar .navbar-right {
    flex: 0 0 auto !important;
}

html body .deckd-topbar .navbar-right {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center !important;
}

/* ---------- Header search bar (Pinterest-style) ---------- */

.deckd-topbar-search.deckd-topbar-search {
    flex: 1 1 auto !important;
    min-width: 0;
    width: auto !important;
    max-width: none !important;
    height: 48px !important;
    min-height: 48px !important;

    position: relative !important;
    top: auto !important;
    z-index: auto !important;

    display: flex !important;
    align-items: center !important;

    /* margin-left/margin-right now live only in the "TOP NAVBAR
       SPACING" block appended at the end of this file. */
    padding: 0 !important;

    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.deckd-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);

    width: 18px;
    height: 18px;

    color: #777772;
    pointer-events: none;
}

/* .deckd-topbar-search doubled: this form also carries the older
   .explore-search-row class (still used by a few page-specific rules
   elsewhere in this file), whose own "input" rule is an equal-specificity
   competitor (1 class + 1 type same as this) - doubling wins outright
   regardless of which rule happens to come first in the file. */
.deckd-topbar-search.deckd-topbar-search input {
    width: 100% !important;
    max-width: none !important;
    height: 42px !important;
    flex: 1 1 auto !important;

    margin: 0 !important;
    padding: 0 52px 0 46px !important;

    background: #e6e6e4 !important;
    border: 1px solid #aaaaa8 !important;
    border-radius: 11px !important;

    color: #111111 !important;
    font-size: 13px !important;

    outline: none !important;
    box-shadow: none !important;
}

.deckd-topbar-search input::placeholder {
    color: #777772 !important;
}

.deckd-topbar-search input:focus {
    outline: none !important;
    box-shadow: none !important;
    border-color: #777775 !important;
}

.deckd-topbar-search-no-button input {
    padding-right: 18px !important;
}

/* Doubled for the same reason as the input rule above: the button also
   carries the older .filter-icon-button class, whose own rule is an
   equal-specificity (2-class) competitor. */
.deckd-topbar-search.deckd-topbar-search .deckd-search-filter-button {
    position: absolute !important;
    right: 6px !important;
    top: 50% !important;
    transform: translateY(-50%) scale(1) !important;

    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    flex: none !important;

    border-radius: 999px !important;

    background: transparent !important;
    color: #111111 !important;

    transition: background 0.15s ease, transform 0.15s ease !important;
}

.deckd-topbar-search.deckd-topbar-search .deckd-search-filter-button svg {
    width: 20px !important;
    height: 20px !important;
    stroke: currentColor !important;
    stroke-width: 1.8 !important;
    color: #111111 !important;
}

.deckd-topbar-search.deckd-topbar-search .deckd-search-filter-button:hover {
    background: #f3f3f2 !important;
    transform: translateY(-50%) scale(1.08) !important;
}

@media (max-width: 700px) {
    .deckd-sidebar {
        width: 56px;
        gap: 10px;
        padding: 12px 0;
    }

    .deckd-sidebar-link {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .deckd-sidebar-link svg {
        width: 19px;
        height: 19px;
    }

    .deckd-topbar.site-navbar {
        flex-wrap: wrap !important;
        height: auto !important;
        min-height: 64px !important;
        padding: 10px 16px !important;
        row-gap: 10px !important;
        gap: 12px !important;
    }

    .deckd-topbar .navbar-left {
        order: 1 !important;
    }

    .deckd-topbar .navbar-right {
        order: 2 !important;
    }

    .deckd-topbar .site-navbar .logo,
    .deckd-topbar.site-navbar .logo {
        font-size: 20px !important;
    }

    .deckd-topbar-search.deckd-topbar-search {
        order: 3 !important;
        flex: 1 1 100% !important;
        width: 100% !important;
    }

    .deckd-search-icon {
        left: 14px;
    }

    .deckd-topbar-search.deckd-topbar-search input {
        padding: 0 44px 0 38px !important;
    }
}

.nav-dropdown-button:hover {
    background: #333333;
}

.secondary-nav-dropdown-button:hover {
    background: #ece2d3;
}

/* Remove the active-page underline indicator under the account icon. */
.site-navbar .nav-account-icon.active-account-icon::after {
    content: none !important;
    display: none !important;
}

html body .nav-account-dropdown .nav-dropdown-button {
    border-radius: 14px !important;
}

html body .nav-account-dropdown .secondary-nav-dropdown-button {
    background: #f3f3f2 !important;
    color: #1f1f1f !important;

    border: 1px solid #ddddda !important;
    box-shadow: none !important;
}

html body .nav-account-dropdown .secondary-nav-dropdown-button:hover {
    background: #e9e9e6 !important;
    border-color: #d0d0cc !important;
}

/* Navbar currency dropdown options: slightly heavier */

html body .deckd-shell .deckd-topbar .nav-currency-dropdown .nav-currency-option {
    font-weight: 600 !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
}

/* 10 currencies (was 5) no longer fit without scrolling - caps how far
   this dropdown can push down the page instead of growing to fit every
   option. Appended last/highest-specificity deliberately: several
   earlier .nav-currency-dropdown rules above (redesign-era duplicates)
   already fight over its size/position, and none of them set
   max-height/overflow - this only needs to beat them on those two
   properties, not replace them. */
html body .site-navbar .nav-currency-dropdown,
html body .site-navbar #navCurrencyDropdown {
    max-height: 280px !important;
    overflow-y: auto !important;

    scrollbar-width: thin !important;
    scrollbar-color: #c4c4c4 transparent !important;
}

html body .site-navbar .nav-currency-dropdown::-webkit-scrollbar,
html body .site-navbar #navCurrencyDropdown::-webkit-scrollbar {
    width: 6px !important;
}

html body .site-navbar .nav-currency-dropdown::-webkit-scrollbar-track,
html body .site-navbar #navCurrencyDropdown::-webkit-scrollbar-track {
    background: transparent !important;
}

html body .site-navbar .nav-currency-dropdown::-webkit-scrollbar-thumb,
html body .site-navbar #navCurrencyDropdown::-webkit-scrollbar-thumb {
    background: #c4c4c4 !important;
    border-radius: 8px !important;
}

/* Centre the left-sidebar icon group vertically - within the space
   below the top navbar, not the full viewport height, since the
   navbar (z-index 1200) sits above the sidebar (1100) and hides
   whatever the sidebar renders behind it. Without this top padding,
   "centre of 100vh" reads as noticeably above centre of the actual
   visible icon track (topbar bottom -> screen bottom). */

html body .deckd-sidebar {
    height: 100vh !important;
    min-height: 100vh !important;
    /* Without this, content-box sizing (the default) adds the top
       padding below on TOP of the explicit 100vh height instead of
       carving it out of that height - pushing the whole centred
       group visibly low (and clipping ~100px off the bottom, past
       the viewport, since this is position:fixed). Border-box makes
       the 100vh figure include the padding, so centring happens
       within (100vh - topbar height) as intended. */
    box-sizing: border-box !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;

    /* --deckd-sidebar-top-inset is set from JS (base.html) to the
       topbar's real rendered height - --deckd-topbar-height (a static
       100px guess used elsewhere for the sidebar divider line) doesn't
       match any of the several conflicting actual navbar heights
       (72/76/78px) across breakpoints, so it's only the fallback here
       for the brief instant before JS runs. */
    padding-top: var(--deckd-sidebar-top-inset, var(--deckd-topbar-height)) !important;
    padding-bottom: 0 !important;
}

/* Extend the top navbar behind the left sidebar */

html body .deckd-topbar {
    position: sticky !important;
    isolation: isolate !important;

    background: transparent !important;
    border-bottom: none !important;
}

html body .deckd-topbar::before {
    content: "";

    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: -64px;

    z-index: -1;

    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    border-bottom: 1px solid #e5e5e5;
}

/* Keep the sidebar icons visibly above the extended navbar. */

html body .deckd-sidebar {
    position: relative !important;
    z-index: 1100 !important;
}

html body .deckd-topbar {
    z-index: 1000 !important;
}

@media (max-width: 700px) {
    html body .deckd-topbar::before {
        left: -56px;
    }
}

/* Keep the left sidebar permanently visible */

html body .deckd-shell {
    display: block !important;
    min-height: 100vh !important;
}

html body .deckd-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;

    width: 64px !important;
    height: 100vh !important;
    min-height: 100vh !important;

    z-index: 1100 !important;

    overflow: visible !important;
}

html body .deckd-main {
    width: calc(100% - 64px) !important;
    min-width: 0 !important;

    margin-left: 64px !important;
}

@supports (height: 100dvh) {
    html body .deckd-sidebar {
        height: 100dvh !important;
        min-height: 100dvh !important;
    }
}

@media (max-width: 700px) {
    html body .deckd-sidebar {
        width: 56px !important;
    }

    html body .deckd-main {
        width: calc(100% - 56px) !important;
        margin-left: 56px !important;
    }
}

html body .deckd-topbar {
    position: sticky !important;
    overflow: visible !important;
    z-index: 1200 !important;
}

html body .deckd-topbar .navbar-left {
    position: absolute !important;
    top: 50% !important;
    left: calc(-64px + 24px) !important;

    margin: 0 !important;
    padding: 0 !important;

    transform: translateY(-50%) !important;
}

html body .deckd-topbar .navbar-left .logo {
    margin: 0 !important;
    padding: 0 !important;
}

html body .deckd-topbar > .deckd-topbar-search {
    position: relative !important;
    left: -64px !important;
}

html body .deckd-sidebar {
    z-index: 1100 !important;
}

@media (max-width: 700px) {
    html body .deckd-topbar .navbar-left {
        left: calc(-56px + 16px) !important;
    }

    html body .deckd-topbar > .deckd-topbar-search {
        left: -56px !important;
    }
}

html body .deckd-topbar > .deckd-topbar-search {
    position: relative !important;
    left: 0 !important;
}

@media (max-width: 700px) {
    html body .deckd-topbar > .deckd-topbar-search {
        left: 0 !important;
    }
}

html body .deckd-sidebar {
    border-right: none !important;
}

html body .deckd-sidebar::after {
    /* Was a second divider segment continuing from the topbar's bottom
       edge (top: var(--deckd-topbar-height)) all the way down to the
       page bottom - combined with .deckd-shell::after (which covers
       just the topbar's own height, see above) that drew ONE
       continuous line the full height of the page. The divider should
       stop as soon as it reaches the bottom of the top navbar, so this
       segment is disabled entirely - .deckd-shell::after alone is now
       the whole divider. */
    content: none;
}

/* Quick Access dropdown — frosted glass */

html body .nav-quick-add-menu .nav-quick-add-dropdown,
html body .deckd-sidebar-quickadd .deckd-sidebar-dropdown {
    padding: 8px !important;

    background: rgba(255, 255, 255, 0.55) !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    border-radius: 16px !important;
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.12) !important;

    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
}

html body
.nav-quick-add-menu
.nav-quick-add-dropdown
.nav-quick-add-option {
    width: 100% !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;

    margin: 0 !important;
    padding: 10px 12px !important;

    background: transparent !important;
    border: none !important;
    border-radius: 10px !important;
    box-shadow: none !important;

    color: #111111 !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-align: left !important;
    text-decoration: none !important;
}

html body
.nav-quick-add-menu
.nav-quick-add-dropdown
.nav-quick-add-option:hover {
    background: rgba(31, 31, 31, 0.06) !important;
}

html body .deckd-shell::after {
    content: "";

    position: fixed;
    top: 0;
    left: calc(64px - 1px);

    width: 1px;
    height: var(--deckd-topbar-height);

    background: #e5e5e5;

    pointer-events: none;
    z-index: 1300;
}

@media (max-width: 700px) {
    html body .deckd-shell::after {
        left: calc(56px - 1px);
    }
}

html body .nav-notifications-menu {
    position: relative;
}

html body .nav-notifications-button {
    position: relative;

    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    margin: 0;
    padding: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: none;
    border: none;

    color: #1f1f1f;
    cursor: pointer;
}

html body .nav-notifications-button svg {
    /* Matches .site-navbar .nav-account-icon svg's actual rendered size
       (23x23, stroke-width 2.6 on the markup) so the bell reads at the
       same visual weight as the account/currency icons beside it. */
    width: 23px;
    height: 23px;
    display: block;
}

html body .nav-notifications-badge {
    position: absolute;
    top: 2px;
    right: 2px;

    /* Fixed width AND height (not min-width) so it's always a true
       circle - a 2-character count like "9+" used to widen the badge
       past its own height under min-width, turning the rounded ends
       into a flatter, wider pill instead of a circle. */
    width: 17px;
    height: 17px;
    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #d03b3b;
    border: 2px solid #ffffff;
    border-radius: 50%;

    color: #ffffff;
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
}

html body .nav-notifications-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    z-index: 10070;

    width: 320px;
    /* Capped at roughly 4 rows tall (title + 4 .nav-notifications-row at
       their plain/history height, measured ~343px including this
       dropdown's own padding) rather than growing with every notification
       - min() with 70vh as a fallback so it still fits on a short/zoomed
       browser window. A taller pending-invite row (with Accept/Decline
       buttons) just means slightly fewer than 4 rows show before
       scrolling, not a taller cap. */
    max-height: min(344px, 70vh);
    overflow-y: auto;
    /* Stops an overscroll/rubber-band past the top or bottom from
       chaining to the page underneath (which could otherwise flash
       through at the dropdown's edge for an instant). */
    overscroll-behavior: contain;

    /* Extra right padding insets the scrollbar a few px in from the
       rounded corner instead of it sitting flush against the edge. */
    padding: 10px 16px 10px 10px;

    /* Frosted glass: translucent white over a blur, so whatever's on
       the page behind it (product cards, etc.) softly shows through
       rather than the dropdown reading as a flat opaque card. */
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    box-shadow: 0 18px 46px rgba(31, 31, 31, 0.18);

    scrollbar-width: thin;
    scrollbar-color: #c4c4c4 transparent;
}

html body .nav-notifications-dropdown::-webkit-scrollbar {
    width: 6px;
}

html body .nav-notifications-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

html body .nav-notifications-dropdown::-webkit-scrollbar-thumb {
    background: #c4c4c4;
    border-radius: 8px;
}

html body .nav-notifications-menu.open .nav-notifications-dropdown {
    display: block;
}

html body .nav-notifications-title {
    margin: 4px 6px 8px;

    font-size: 13px;
    font-weight: 800;
    color: #1f1f1f;
}

html body .nav-notifications-empty {
    padding: 16px 10px;

    font-size: 13px;
    color: #9a9a9a;
    text-align: center;
}

html body .nav-notifications-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    padding: 10px;
    border-radius: 12px;
}

html body .nav-notifications-row:hover {
    background: #f5f5f5;
}

/* Rows whose "rest of the row" click-through resolves to somewhere
   (see deckdNotificationActionUrl in base.html) get this - not every
   row does ('invite_declined' has nowhere to send you, and a still-
   pending invite has no destination until it's accepted), so it stays
   opt-in via its own class rather than a blanket cursor: pointer on
   every row. */
html body .nav-notifications-row-clickable {
    cursor: pointer;
}

html body .nav-notifications-row-content {
    flex: 1;
    min-width: 0;
}

html body .nav-notifications-avatar {
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;

    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 50%;
    overflow: hidden;
    box-sizing: border-box;

    color: #1f1f1f;
    font-size: 13px;
    font-weight: 700;
}

html body .nav-notifications-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Wraps .nav-notifications-avatar when a notification/invite/friend
   request has a specific person to link to their own profile (see
   deckdBuildNotificationAvatar's linkHref param) - plain flex wrapper
   so it doesn't disturb the avatar's own size/shape, just makes it a
   clickable target. */
html body .nav-notifications-avatar-link {
    display: flex;
    flex-shrink: 0;
}

/* Inline equivalent for a username mentioned inside a notification's
   own body text (see deckdPersonLink in base.html) - reads as part of
   the same bold sentence as .nav-notifications-row-text strong, just
   underlined on hover to hint it's a separate, more specific link
   than the rest of the (possibly also clickable) row. */
html body .nav-notifications-name-link {
    color: inherit;
    text-decoration: none;
}

html body .nav-notifications-name-link:hover {
    text-decoration: underline;
}

html body .nav-notifications-row-text {
    margin: 0 0 10px;

    font-size: 13px;
    line-height: 1.4;
    color: #1f1f1f;
}

html body .nav-notifications-row-text strong {
    font-weight: 800;
}

html body .nav-notifications-row-history .nav-notifications-row-text {
    margin-bottom: 2px;
}

html body .nav-notifications-row-time {
    margin: 0;

    font-size: 12px;
    color: #9a9a9a;
}

html body .nav-notifications-row-actions {
    display: flex;
    gap: 8px;
}

html body .nav-notifications-accept,
html body .nav-notifications-decline {
    flex: 1;
    padding: 7px 10px;

    border-radius: 999px;
    border: 1px solid #dddddd;

    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

html body .nav-notifications-accept {
    background: #1f1f1f;
    border-color: #1f1f1f;
    color: #ffffff;
}

html body .nav-notifications-accept:hover {
    background: #333333;
}

html body .nav-notifications-decline {
    background: #ffffff;
    color: #5c5c5c;
}

html body .nav-notifications-decline:hover {
    background: #f0f0f0;
    color: #1f1f1f;
}

html body .site-navbar .nav-account-icon {
    transform: translateY(-2px);
}

html body .site-navbar .nav-account-dropdown {
    background: rgba(255, 255, 255, 0.72) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
}

html body .deckd-topbar-search .deckd-search-filter-button svg,
html body .nav-notifications-button svg,
html body .site-navbar .nav-account-icon svg {
    width: 23px !important;
    height: 23px !important;
    stroke-width: 2 !important;
}

html body .deckd-search-icon {
    width: 18px !important;
    height: 18px !important;
    stroke-width: 2 !important;
}

@media (max-width: 768px) {
    html body .site-navbar .nav-account-icon svg {
        width: 23px !important;
        height: 23px !important;
        stroke-width: 2 !important;
    }
}

html body .deckd-topbar-search .deckd-search-filter-button,
html body .nav-notifications-button,
html body .nav-account-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

html body .deckd-topbar .navbar-right {
    align-items: center !important;
}

html body .site-navbar .nav-account-icon {
    transform: translateY(-2px) !important;
}

html body .deckd-search-icon {
    top: 50% !important;
    transform: translateY(-50%) !important;
}

html body .deckd-topbar-search .deckd-search-filter-button {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
}

html body .site-navbar .nav-currency-button,
html body .site-navbar #navCurrencyButton {
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 12px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
}

html body .site-navbar .nav-currency-symbol,
html body .site-navbar #navCurrencySymbol {
    font-size: 14px !important;
    font-weight: 700 !important;
}

html body .nav-profile-avatar {
    background: #ffffff !important;
    border: 1px solid #e5e5e5 !important;
    color: #1f1f1f !important;
}

html body .nav-profile-row span {
    color: #9a9a9a !important;
}

html body .nav-account-dropdown .nav-dropdown-button,
html body .nav-account-dropdown .secondary-nav-dropdown-button {
    border-radius: 999px !important;
    font-weight: 700 !important;
}

html body .nav-account-dropdown .secondary-nav-dropdown-button {
    background: #f5f5f5 !important;
    border-color: #dddddd !important;
}

html body .nav-account-dropdown .secondary-nav-dropdown-button:hover {
    background: #f0f0f0 !important;
    border-color: #1f1f1f !important;
}

html body .nav-dropdown-title {
    font-weight: 800 !important;
}

html body .site-navbar .nav-currency-button,
html body .site-navbar #navCurrencyButton {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 10px 0 12px !important;
    font-size: 19px !important;
}

html body nav.site-navbar.deckd-topbar {
    padding-right: 24px !important;
}

html body .deckd-topbar > .deckd-topbar-search {
    /* .explore-search-row's old "margin: 0 auto 34px" left a phantom
       34px bottom margin in place (this rule only ever set left/right),
       so align-items:center on the topbar was centering the search
       bar's 48px + 34px MARGIN box, not its actual 48px border box -
       pushing it visibly above the true centreline. Zeroing top/bottom
       here removes that phantom margin for good. Right margin is 12px
       (24 optical target minus currency's own 12px left padding). */
    margin: 0 12px 0 44px !important;
}

html body .deckd-topbar .navbar-right {
    margin-left: auto !important;
    gap: 10px !important;
}

html body .site-navbar.deckd-topbar #navCurrencyMenu {
    margin-right: -4.5px !important;
}

@media (max-width: 700px) {
    html body nav.site-navbar.deckd-topbar {
        padding-right: 16px !important;
    }

    html body .deckd-topbar > .deckd-topbar-search {
        margin: 0 8px 0 18px !important;
    }

    html body .site-navbar.deckd-topbar #navCurrencyMenu {
        margin-right: -2px !important;
    }

    html body .deckd-topbar .navbar-right {
        gap: 8px !important;
    }
}

html body .deckd-shell::after {
    content: none !important;
}

/* -------------------------------------------------------------------
   Design notes (navbar icon family, account dropdown, spacing)
   Explains several non-obvious value choices above.
   ------------------------------------------------------------------- */

/* Restore the sidebar divider through the topbar.
   This sits above the white topbar layer, then stops at its bottom edge. */

/* Small circular face for whichever specific person a row is about -
   the inviter on a pending request, the person who just accepted on a
   board owner's notification. Same img-or-initial fallback as
   .deckd-collaborator-avatar (board_detail.html's Collaborators modal). */

/* Read-only history row (an invite already responded to, or - for a
   board owner - one of their invites being accepted) - no action
   buttons, just the past-tense text plus a relative timestamp. */

/* The account icon's own artwork (a head + shoulders) sits slightly
   bottom-heavy within its 24-unit viewBox, reading as visually low next
   to the currency text and the notifications bell beside it — nudge it
   up a couple px to optically align. */

/* Frosted glass — same treatment as .nav-notifications-dropdown beside
   it, so the two hover/click panels in the navbar read as one family
   instead of one being a flat opaque card and the other translucent. */

/* The search, filter, notification-bell and account icons had each
   picked up a different stroke-width (2.2 / 2.6 / 2.6) and a different
   rendered size (18 / 20 / 23 / 22px) across earlier passes, so they
   read as several unrelated icon sets next to the sidebar's flat,
   uniform 2px-stroke/23px family - now declared once, together. */

/* A narrower, more specific mobile-only rule elsewhere in this file
   (".site-navbar .nav-account-icon svg" inside @media max-width:768px)
   has two classes to the rule above's one, so it still out-specifies it
   below 768px. Repeated here, scoped to the same breakpoint, so the
   icon stays 23px there too. */

/* Every icon centred within its own button, regardless of the
   button's own box size, so they all land on one shared centreline. */

/* The whole right-hand icon group (currency / notifications / account)
   shares one centreline with the search bar beside it. */

/* The account glyph sits low in its viewBox and the search-icon anchor
   shifted a touch bigger — keep both optical nudges intact so the
   uniform size above doesn't reintroduce the misalignment they fix. */

/* Filter button was 36px against notifications/account's 34px -
   close, but a visible 2px mismatch once they're all the same weight. */

/* Currency button had no icon, so it rendered as a small 900-weight
   text label (16px tall) next to 34px icon circles beside it - reads
   much lighter/smaller than the rest of the group. Give it the same
   34px-tall footprint and pull its font-weight down from 900 toward
   the 700 used on every other piece of navbar/modal text, so it reads
   as part of the same icon row instead of a separate, heavier label. */

/* Account dropdown matches the shared modal system: same frosted-glass
   card already used here and on the notifications dropdown, avatar
   circle and "Logged in" caption on the same palette as everywhere
   else, action buttons pill-shaped/700-weight like every modal. */

/* Currency button: slightly bigger than its 34px baseline, per request
   - flex align-items:center on .navbar-right still keeps it on the
   same centreline as the 34px notification/account circles either
   side of it, regardless of its own height. Padding is asymmetric on
   purpose (12 left / 10 right, down from a flat 14 both sides): the
   old flat 14px padding was invisible whitespace on top of the box
   gaps either side of it, so the OPTICAL gap search-bar-to-currency
   and currency-to-notifications read much bigger than the matching
   logo-to-search / notifications-to-account gaps even though the box
   gaps themselves were equal - shrinking the padding (and pulling the
   currency menu 4px closer to notifications below) brings the visible
   whitespace back in line. */

/* Every gap/margin below is declared exactly once as a single source
   of truth:
     - EDGE_GAP  (24px): logo-to-left-edge == account-to-right-edge
     - SEARCH_GAP (24px optical): logo-to-search-bar == search-bar-to-currency
     - ICON_GAP  (10px optical): identical gap between currency/notifications/account
   Box-gap values are smaller than the 24/10 optical targets above by
   exactly currency's own padding, since currency (unlike the logo or
   the icon circles) has visible internal padding of its own. */

/* Pulls the currency pill closer to the notification bell only -
   currency's own 10px right padding already accounts for some of the
   optical gap, so the effective gap here needs to be smaller than the
   10px .navbar-right gap so it matches notifications-to-account
   (which has no padding of its own). #navCurrencyMenu is required: the
   ".site-navbar .navbar-right > .nav-currency-menu, ... >
   #navCurrencyMenu, ..." reset rule (which flattens every navbar-right
   child to margin:0) includes an id arm in its selector list, so a
   classes-only override - even with matching class count, !important,
   and later source order - still loses to it. */



/* =========================
   3. Shared buttons / links
========================= */

.new-board-button,
.shop-button,
.auth-card button,
.account-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 15px 24px;

    border: none;
    border-radius: 999px;

    background: #1f1f1f;
    color: white;

    text-decoration: none;
    font-weight: 800;
    white-space: nowrap;

    cursor: pointer;
}

.secondary-button,
button.secondary-button {
    margin-top: 14px;

    background: #f4efe8;
    color: #1f1f1f;
    border: 1px solid #e6ddd2;
}

.secondary-form-link,
.clear-filters-link {
    display: block;

    color: #8a7f73;
    text-align: center;
    text-decoration: none;

    font-weight: 800;
}

.secondary-form-link {
    margin-top: 18px;
}

.clear-filters-link {
    margin-top: 16px;
}

.create-board-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 14px 28px;

    border-radius: 999px;

    background: #1f1f1f;
    color: white;

    text-decoration: none;

    font-size: 16px;
    font-weight: 700;

    transition: 0.2s ease;
}

.create-board-button:hover {
    transform: scale(1.03);
}


/* =========================
   4. Back buttons
========================= */

.auth-back,
.board-detail-back {
    width: 52px;
    height: 52px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #f4efe8;
    color: #1f1f1f;

    text-decoration: none;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;

    transition: 0.2s ease;
}

.auth-back:hover,
.board-detail-back:hover {
    opacity: 0.7;
}

.auth-back {
    position: absolute;
    top: 18px;
    left: 18px;
}

button.auth-back {
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}

/* Text variant of the back button (e.g. password_reset_done.html) - sits
   in normal flow above the card's icon/heading instead of the plain
   corner circle, so .auth-card-inline-back cancels the h1's padding-top
   that exists only to clear that circle's absolute positioning.
   ".auth-card button" (Shared buttons/links, above) turns every plain
   <button> in an .auth-card into a solid black pill - out-specify it
   with the ".auth-card button.auth-back-link" qualifier rather than
   relying on source order to win. */
.auth-card button.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;

    margin: 0 0 18px;
    padding: 0;

    border: none;
    background: none;

    color: #9c9488;
    text-decoration: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;

    cursor: pointer;
    transition: color 0.2s ease;
}

.auth-back-link:hover {
    color: #1f1f1f;
}

/* Bottom-of-card placement (e.g. password_reset_done.html) instead of
   the default top-left flow position - full width and centred rather
   than inline-flex, needs the extra class/type-selector padding to
   out-specify ".auth-card button.auth-back-link" above. */
.auth-card button.auth-back-link.auth-back-link-bottom {
    display: block;
    width: 100%;

    margin: 24px 0 0;

    text-align: center;
}

.auth-card-inline-back h1 {
    padding-top: 0;
}

/* Lighter/smaller heading treatment for the run of one-line status
   cards in the password-reset and account-concern flow (Set a new
   password / Link expired / Check your email / Password updated /
   Think this wasn't you? / Thanks, we'll be in touch) - the default
   .auth-card h1 (38px, bold) was sized for the old standalone login/
   signup pages and reads as oversized next to a single sentence of
   status text. ".auth-card h1" needs the qualifier below to out-specify
   the shared rule; ".auth-card p" has no font-size of its own to beat,
   so .auth-subtext-compact alone is enough there.
   !important is required here, not just a specificity bump: a later
   "FINAL override" block (search this file for that exact phrase, several
   stacked copies of it) forces every .auth-card h1 to 26px/800/-0.4px-
   tracking with !important. Beating an !important rule takes a selector
   that's MORE specific, and that override's most specific form (html body
   main.auth-page .auth-card > h1) pads itself with extra type selectors
   (html/body/main) to win specificity ties on class-count alone - so
   ".auth-card h1.auth-heading-compact" (2 classes) still loses to its
   (2 classes, but more type selectors) despite the qualifier. Adding
   ".auth-page" as a third class wins outright: CSS compares class-count
   before type-count, and nothing in that override block goes past 2
   classes on any of its selector alternatives. */
.auth-page .auth-card h1.auth-heading-compact {
    padding-top: 0 !important;

    font-size: 26px !important;
    font-weight: 600 !important;
    letter-spacing: normal !important;
}

.auth-card p.auth-subtext-compact {
    margin: 0 0 22px;

    font-size: 14px;
}


/* =========================
   5. Hero
========================= */

.hero {
    max-width: 850px;
    margin: 0 auto;
    padding: 90px 24px 55px;

    text-align: center;
}

.hero h1 {
    margin: 0 0 18px;

    font-size: 58px;
    line-height: 1.05;
    letter-spacing: -2px;
}

.hero p {
    max-width: 620px;
    margin: 0 auto 30px;

    color: #68615a;

    font-size: 19px;
    line-height: 1.6;
}


/* =========================
   6. Auth / account / form cards
========================= */

.auth-page,
.account-page {
    min-height: calc(100vh - 76px);

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 60px 24px;
}

.auth-card,
.account-card {
    width: 100%;

    background: white;
    border-radius: 30px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.08);
}

.auth-card {
    position: relative;

    max-width: 460px;
    padding: 42px;
}

.account-card {
    max-width: 520px;
    padding: 46px;

    text-align: center;
}

.auth-card h1,
.account-card h1 {
    margin: 0 0 10px;

    text-align: center;
}

.auth-card h1 {
    padding-top: 28px;

    font-size: 38px;
}

.account-card h1 {
    font-size: 44px;
}

.auth-card p,
.account-card p {
    color: #68615a;

    text-align: center;
}

.auth-card p {
    margin: 0 0 30px;
}

.account-card p {
    margin: 0 0 32px;

    font-size: 17px;
    line-height: 1.6;
}

.auth-card form {
    display: flex;
    flex-direction: column;
}

.auth-card label {
    margin-bottom: 8px;

    font-weight: 800;
}

/* Lighter label weight for the same compact-card pages as
   .auth-heading-compact/.auth-subtext-compact above (password reset's
   own new-password fields, the account-concern form) - the default 800
   reads as too heavy next to their smaller heading. */
.auth-card label.auth-label-compact {
    font-weight: 600;
}

.auth-card input,
.auth-card select {
    margin-bottom: 18px;
    padding: 15px 16px;

    border: 1px solid #e4ddd3;
    border-radius: 14px;

    background: white;

    font-size: 15px;
}

.deckd-auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;

    margin: 4px 0 18px;

    color: #a39b8f;

    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.deckd-auth-divider::before,
.deckd-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;

    background: #e4ddd3;
}

.google-signin-button {
    display: flex;
    justify-content: center;

    margin-bottom: 6px;
}

#loginModal .deckd-field label,
#signupModal .deckd-field label {
    text-align: left;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.account-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
}

.message {
    margin-bottom: 20px;
    padding: 12px 14px;

    background: #f8f5f0;
    border-radius: 14px;

    font-weight: 700;
}


/* =========================
   7. File upload / image preview
========================= */

input[type="file"] {
    display: none;
}

.custom-file-upload {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 14px;
    padding: 16px 20px;

    border: 1px solid #e4ddd3;
    border-radius: 16px;

    background: white;

    font-weight: 800;

    cursor: pointer;
    transition: 0.2s ease;
}

.custom-file-upload:hover {
    background: #faf8f5;
}

#file-name,
.file-selected-text {
    margin-top: -2px;
    margin-bottom: 22px;

    color: #8a7f73;

    text-align: center;

    font-size: 15px;
    font-weight: 700;
}

.file-selected-text.has-file {
    color: #1f1f1f;

    font-size: 20px;
    font-weight: 800;
}

.image-upload-preview {
    display: none;

    max-width: 100%;
    max-height: 160px;

    width: auto;
    height: auto;

    margin: 12px auto 0;

    border-radius: 18px;

    background: transparent;

    object-fit: contain;
    object-position: center;
}


/* =========================
   8. Product grids / cards
========================= */

.wishlist-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 32px 80px;

    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

.product-link {
    color: inherit;
    text-decoration: none;

    cursor: pointer;
}

.product-card,
.card-info,
.card-info h3 {
    min-width: 0;
}

.product-card {
    position: relative;

    /* Was overflow: hidden to clip the image to the card's rounded
       corners - but that also clipped the "..." dropdown menu (an
       absolutely-positioned child) whenever a short card left too
       little room below the button, cutting the menu off instead of
       letting it overflow visibly. The image now rounds its own top
       corners directly (below) so the card can stay overflow: visible. */
    overflow: visible;

    background: white;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 26px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.07);
}

.product-card img {
    width: 100%;
    height: 260px;

    display: block;

    object-fit: cover;
    border-radius: 26px 26px 0 0;
}

.card-info {
    padding: 18px 20px 22px;

    overflow: hidden;
}

.card-info h3 {
    margin: 0 0 8px;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    overflow: hidden;
    text-overflow: ellipsis;

    word-break: normal;
    overflow-wrap: normal;

    font-size: 18px;
    line-height: 1.18;

    /* 2 lines at this size/line-height is 42.48px - 42px was clipping
       part of the second line, which could push the line-clamp ellipsis
       up onto the first line. */
    min-height: 44px;
    max-height: 44px;
}

.card-info p {
    margin: 0;

    color: #8a7f73;

    font-weight: 700;
}


/* =========================
   9. Explore
========================= */

.explore-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 34px 32px 70px;
}

.explore-header {
    margin-bottom: 50px;

    text-align: center;
}

.explore-header h1 {
    margin: 0 0 12px;

    font-size: 40px;
}

.explore-header p {
    margin: 0;

    color: #68615a;

    font-size: 18px;
}

.explore-page .wishlist-grid {
    padding: 20px 32px 80px;
}

.explore-search-row {
    max-width: 760px;
    margin: 0 auto 34px;

    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.explore-search-row > input {
    min-width: 0;

    padding: 14px 18px;

    border: 1px solid #e4ddd3;
    border-radius: 999px;

    background: white;

    font-size: 15px;
}

.filter-icon-button {
    position: relative;

    width: 52px;
    height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: none;
    border-radius: 50%;

    background: #1f1f1f;
    color: white;

    cursor: pointer;
}

.filter-icon-button svg {
    width: 24px;
    height: 24px;

    stroke-width: 1;
}

.filter-count-badge {
    position: absolute;
    right: -2px;
    bottom: -2px;

    width: 20px;
    height: 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 2px solid #f8f5f0;
    border-radius: 50%;

    background: #f4efe8;
    color: #1f1f1f;

    font-size: 12px;
    font-weight: 800;
}

.save-product-button {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 20;

    padding: 8px 14px;

    border: none;
    border-radius: 999px;

    background: #f4efe8;
    color: #8a7f73;

    font-family: inherit;
    font-size: 14px;
    font-weight: 800;

    text-decoration: none;

    opacity: 0;
    pointer-events: none;

    cursor: pointer;
    transition: 0.2s ease;
}

.product-card:hover .save-product-button {
    opacity: 1;
    pointer-events: auto;
}



.saved-label {
    background: #f4efe8;
    color: #8a7f73;
}


/* =========================
   10. Filter modal
========================= */

.filter-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;

    align-items: center;
    justify-content: center;

    padding: 24px;

    background: rgba(31, 31, 31, 0.25);
}

.filter-card {
    width: 100%;
    max-width: 520px;

    padding: 38px;

    background: white;
    border-radius: 30px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.16);
}

.filter-card form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.filter-card h2 {
    margin: 0;

    text-align: center;

    font-size: 34px;
}

.filter-card label {
    margin: 0;

    font-weight: 800;
}

.filter-category-row,
.filter-price-row,
.filter-actions,
.filter-cancel-row {
    display: flex;
    align-items: center;
}

.filter-category-row,
.filter-price-row {
    gap: 16px;
}

.filter-actions {
    justify-content: center;
    gap: 14px;
}

.filter-cancel-row {
    justify-content: center;
}

.filter-card select {
    padding: 15px 16px;

    border: 1px solid #e4ddd3;
    border-radius: 14px;

    background: white;

    font-size: 15px;
}

.filter-price-row input[type="range"] {
    flex: 1;

    margin: 0;
}

.filter-card button {
    padding: 15px 20px;

    border: none;
    border-radius: 999px;

    background: #1f1f1f;
    color: white;

    font-weight: 800;

    cursor: pointer;
}

.cancel-filter-button {
    margin-top: 12px;

    background: #f4efe8;
    color: #1f1f1f;
}

.category-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.category-options label {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 10px 14px;

    border-radius: 999px;

    background: #f8f5f0;

    cursor: pointer;
}

.category-options input {
    accent-color: #1f1f1f;
}

/* Max price slider (#filterModal): a plain type="range" with no wrapper
   class of its own, so it was inheriting deckd_modals.css's generic
   ".deckd-field input" text-field treatment (12px/14px padding, a
   border, a grey fill) - that padding box was what read as "space at
   either end", since the native track/thumb only travel within it, not
   the input's own outer edges. Stripped back to a bare custom-drawn
   track so the thumb reaches the true left/right edges at min/max, with
   a black fill (--price-fill, 0-100%, kept in sync with the slider's
   value by the inline oninput/style in explore.html) instead of the
   browser's default blue. */
#filterModal .deckd-field input[type="range"] {
    -webkit-appearance: none;
    appearance: none;

    width: 100%;
    height: 6px;
    margin: 10px 0 0;
    padding: 0;

    border: none;
    border-radius: 999px;
    background: linear-gradient(
        to right,
        #1f1f1f var(--price-fill, 100%),
        #e4ddd3 var(--price-fill, 100%)
    );

    outline: none;
    cursor: pointer;
}

#filterModal .deckd-field input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;

    width: 18px;
    height: 18px;
    border-radius: 50%;

    background: #1f1f1f;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);

    cursor: pointer;
}

#filterModal .deckd-field input[type="range"]::-moz-range-track {
    height: 6px;
    border-radius: 999px;
    background: #e4ddd3;
}

#filterModal .deckd-field input[type="range"]::-moz-range-progress {
    height: 6px;
    border-radius: 999px;
    background: #1f1f1f;
}

#filterModal .deckd-field input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 50%;

    background: #1f1f1f;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);

    cursor: pointer;
}


/* =========================
   11. Product detail
========================= */

.detail-page {
    min-height: calc(100vh - 76px);
    max-width: 900px;
    margin: 0 auto;
    padding: 36px 32px 60px;
}

.detail-top-row {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 22px;
}

.detail-top-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.detail-menu-wrapper {
    position: relative;
}

.detail-card {
    position: relative;

    width: 100%;

    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);

    overflow: hidden;

    background: white;
    border-radius: 34px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.detail-card img {
    width: 100%;
    height: 540px;

    object-fit: cover;
}

.detail-info,
.detail-info h1 {
    min-width: 0;
}

.detail-info {
    padding: 38px;

    display: flex;
    flex-direction: column;
    justify-content: center;
}

.detail-info h1 {
    margin: 0 0 18px;

    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;

    overflow: hidden;
    text-overflow: ellipsis;

    font-size: 44px;
    line-height: 1.05;
    letter-spacing: -1px;

    overflow-wrap: anywhere;
}

.detail-price {
    margin-bottom: 24px;

    color: #8a7f73;

    font-size: 22px;
    font-weight: 800;
}

.detail-meta {
    margin: 0 0 28px;
}

.detail-meta span {
    display: block;

    margin-bottom: 6px;

    color: #8a7f73;

    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.detail-meta strong {
    font-size: 20px;
}

.detail-notes {
    margin-bottom: 35px;

    color: #57504a;

    font-size: 17px;
    line-height: 1.7;
}

.shop-button {
    width: fit-content;
}
.detail-save-button {
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 50%;

    background: #f4efe8;
    color: #1f1f1f;

    font-family: inherit;

    cursor: pointer;
    transition: 0.2s ease;
}

.detail-save-button {
    text-decoration: none;

    font-size: 30px;
    font-weight: 400;
}

.detail-save-button:hover {
    transform: scale(1.05);
}

/* Product detail dropdown — match product card dropdown */

.detail-menu {
    display: none;
    position: absolute;
    top: 58px;
    right: 0;
    z-index: 101;

    min-width: 150px;
    padding: 10px;

    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.12);

    text-align: left;
    pointer-events: auto;
}

.detail-menu a,
.detail-menu button,
.detail-menu .menu-delete-button {
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 10px 12px;

    display: block;

    background: none;
    border: none;
    border-radius: 12px;

    color: #1f1f1f;

    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;

    cursor: pointer;
}

.detail-menu a:hover,
.detail-menu button:hover,
.detail-menu .menu-delete-button:hover {
    background: #f3f3f2 !important;
}

.detail-menu .menu-action-form {
    width: 100%;
    margin: 0;
    padding: 0;
}


/* =========================
   12. Boards page
========================= */

.boards-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 34px 32px 70px;
}

.boards-header {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 42px;
}

.boards-header h1 {
    width: 100%;
    margin: 0;

    text-align: center;

    font-size: 40px;
}

.boards-header .new-board-button {
    position: absolute;
    right: 0;
}

.boards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.board-card {
    position: relative;

    min-height: 220px;
    padding: 32px;

    overflow: hidden;

    background: white;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 28px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.07);

    cursor: grab;
}

.board-card-header {
    position: relative;

    min-height: 66px;
    width: 100%;
    margin-bottom: 18px;
    padding: 0 46px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.board-card-header h2 {
    max-width: 100%;
    min-height: 44px;
    margin: 0 auto;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    overflow: hidden;

    text-align: center;

    font-size: clamp(20px, 3vw, 30px);
    line-height: 1.1;

    overflow-wrap: anywhere;
}

.board-card-header .board-menu-button {
    top: -10px;
    right: 0;

    transform: none;
}


/* =========================
   13. Board detail
========================= */

.board-detail-page {
    position: relative;

    max-width: 1200px;
    margin: 0 auto;
    padding: 34px 32px 60px;
}

.board-detail-header {
    width: 100%;
    margin-bottom: 26px;

    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 72px;
    align-items: center;
    gap: 24px;
}

.board-detail-back {
    grid-column: 1;
    justify-self: start;
}

.board-detail-header h1 {
    grid-column: 2;

    min-width: 0;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    overflow: hidden;

    text-align: center;

    font-size: 40px;
    line-height: 1.05;

    overflow-wrap: anywhere;
}

.board-detail-actions {
    grid-column: 3;
    justify-self: end;

    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;

    flex-shrink: 0;
}

.edit-board-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 15px 22px;

    border: none;
    border-radius: 999px;

    background: #f4efe8;
    color: #1f1f1f;

    text-decoration: none;
    font-weight: 800;
    white-space: nowrap;

    cursor: pointer;
}

.board-description {
    max-width: 620px;
    margin: 0 auto 40px;

    color: #68615a;

    text-align: center;

    font-size: 18px;
    line-height: 1.6;
}

.board-products-empty {
    padding: 70px 32px;

    background: white;
    border-radius: 28px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.06);

    text-align: center;
}

.board-products-empty p {
    color: #68615a;

    font-size: 18px;
}


/* =========================
   14. Board detail tools row
========================= */

.board-tools-row {
    max-width: 1200px;
    margin: 18px auto 28px;

    display: grid;
    grid-template-columns: 260px minmax(360px, 1fr) 260px;
    align-items: center;
    gap: 20px;
}

.board-tools-purchased {
    margin: 0;
    padding: 0;

    max-width: none;

    display: flex;
    justify-content: flex-start;
}

.board-tools-row .board-product-search-wrapper {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;

    display: flex;
    justify-content: center;
}

.board-tools-row .search-expand-form {
    width: 100%;
    max-width: 620px;
    margin: 0 auto;
}

.board-tools-row .search-expand-input {
    width: 100%;
    max-width: none;
}

.board-tools-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.board-tools-actions .new-board-button,
.board-tools-actions .edit-board-button {
    padding: 12px 16px;

    font-size: 14px;
}

.purchased-filter-form {
    max-width: 1200px;
    margin: 18px auto 16px auto;
    padding-left: 32px;

    display: flex;
    justify-content: flex-start;
}


/* =========================
   15. Search bars
========================= */

.search-expand-wrapper {
    width: 100%;
    margin: -8px auto 32px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.search-expand-form {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.search-expand-input {
    width: min(520px, calc(100vw - 150px));
    max-width: min(520px, calc(100vw - 150px));

    padding: 14px 18px;

    border: 1px solid #e4ddd3;
    border-radius: 999px;

    background: white;
    color: #1f1f1f;

    outline: none;

    font-size: 15px;
    font-weight: 500;

    pointer-events: auto;
}

.search-expand-input::placeholder {
    color: #8a7f73;
}

.search-icon-expand-button {
    width: 52px;
    height: 52px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: none;
    border-radius: 50%;

    background: #1f1f1f;
    color: white;

    cursor: pointer;
}

.search-icon-expand-button svg {
    width: 22px;
    height: 22px;

    stroke: currentColor;
}

.board-product-search-wrapper {
    max-width: 1200px;
    margin: 8px auto 18px;
    padding-left: 32px;
    padding-right: 32px;

    justify-content: center;
}

.board-product-search-wrapper .search-expand-form {
    justify-content: center;
}


/* =========================
   16. Menus
========================= */

.board-menu-button,
.product-menu-button {
    position: absolute;
    z-index: 20;

    border: none;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.92);

    font-weight: 900;

    cursor: pointer;
}

.board-menu-button {
    width: 44px;
    height: 44px;

    background: #f6f2ec;

    font-size: 22px;

    flex-shrink: 0;
}

.product-menu-button {
    top: 16px;
    right: 16px;

    width: 38px;
    height: 38px;

    font-size: 20px;
}

/* Assignee avatar overlay (see ItemAssignment in models.py) — bottom-left
   of the photo, mirroring the menu button's top-right circular treatment
   so the two overlays read as one visual family. */
.product-assignee-badge {
    position: absolute;
    z-index: 20;
    left: 12px;
    bottom: 12px;

    width: 30px;
    height: 30px;
    margin: 0;
    padding: 0;

    appearance: none;
    -webkit-appearance: none;

    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);

    background: #f6f2ec;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    font: inherit;
    cursor: pointer;
}

.product-assignee-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-assignee-badge-initial {
    font-size: 13px;
    font-weight: 800;
    color: #6b6459;
}

.board-menu,
.product-menu {
    display: none;
    position: absolute;
    z-index: 101;

    padding: 10px;

    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 18px;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.12);

    pointer-events: auto;
}

.board-menu {
    top: 88px;
    right: 32px;

    min-width: 160px;
}

.product-menu {
    top: 58px;
    right: 16px;

    min-width: 130px;
}

.board-menu a,
.product-menu a {
    display: block;

    padding: 10px 12px;

    border-radius: 12px;

    color: #1f1f1f;
    text-decoration: none;

    font-weight: 800;
}

.menu-delete-button {
    display: block;

    width: 100%;
    padding: 10px 12px;

    border: none;
    border-radius: 12px;

    background: none;
    color: #1f1f1f;

    text-align: left;
    text-decoration: none;

    font-size: 16px;
    font-weight: 800;

    cursor: pointer;
}

.menu-action-form {
    margin: 0;
    padding: 0;
}

.menu-action-form button {
    background: none;
}


/* =========================
   17. Board cover collage
========================= */

.board-cover-collage {
    width: 100%;
    height: 180px;

    display: grid;
    gap: 4px;

    overflow: hidden;

    background: #f6f2ec;
    border-radius: 22px;
}

.board-cover-collage img {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;

    display: block;

    object-fit: cover;
    object-position: center center;
}

.custom-board-cover img {
    object-fit: cover;
    object-position: center center;
}

.product-count-0 {
    display: none;
}

.product-count-1 {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}

.product-count-2 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
}

.product-count-3 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.product-count-3 img:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
}

.product-count-3 img:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
}

.product-count-3 img:nth-child(3) {
    grid-column: 2;
    grid-row: 1 / 3;
}


/* =========================
   18. Purchased state
========================= */

.purchased-card img {
    opacity: 0.55;
    filter: grayscale(0.35);
}

/* Assignee avatar is a UI indicator, not photo content - it shouldn't
   fade/desaturate along with the product photo just because the item
   also happens to be marked bought. */
.purchased-card .product-assignee-badge img {
    opacity: 1;
    filter: none;
}

.purchased-card .card-info h3,
.purchased-card .card-info p {
    opacity: 0.55;
}

.purchased-card::after {
    content: "Bought";

    /* Top-left rather than bottom-(right or left) - the always-on brand/
       price pills (.card-info, see board_detail.html's inline styles)
       live along the bottom edge, and a long brand+price combo can wrap
       wide enough to run under a bottom-anchored badge. */
    position: absolute;
    top: 14px;
    left: 14px;

    padding: 7px 12px;

    border-radius: 999px;

    background: #f4efe8;
    color: #1f1f1f;

    font-size: 12px;
    font-weight: 600;
}


/* =========================
   19. Drag / SortableJS
========================= */

.sortable-item {
    cursor: grab;
}

.sortable-item:active,
.sortable-board:active {
    cursor: grabbing;
}

.sortable-ghost {
    opacity: 0.35;
}

.sortable-chosen {
    opacity: 0.9;
}

.sortable-drag {
    opacity: 1;

    transform: rotate(1deg);
}


/* =========================
   20. Modals
========================= */

.delete-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;

    align-items: center;
    justify-content: center;

    padding: 24px;

    background: rgba(31, 31, 31, 0.25);

    cursor: pointer;
}

.delete-modal-card {
    width: 100%;
    max-width: 420px;
    padding: 38px;

    background: white;
    border-radius: 30px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.16);

    text-align: center;

    cursor: default;
}

.delete-modal-card h2 {
    margin: 0 0 12px;

    font-size: 34px;
}

.delete-modal-card p {
    margin-bottom: 28px;

    color: #68615a;
}

.delete-modal-card form {
    margin: 0;

    display: flex;
    flex-direction: column;
    gap: 14px;
}

.delete-modal-card label {
    text-align: left;

    font-size: 15px;
    font-weight: 800;
}

.delete-modal-card input,
.delete-modal-card select {
    padding: 15px 16px;

    border: 1px solid #e6ddd2;
    border-radius: 16px;

    background: white;

    font-size: 15px;
}

.delete-modal-card button {
    width: 100%;
    padding: 15px 20px;

    border: none;
    border-radius: 999px;

    font-size: 15px;
    font-weight: 800;

    cursor: pointer;
    transition: 0.2s ease;
}

.delete-modal-card form button {
    background: #1f1f1f;
    color: white;
}

.delete-modal-card .cancel-delete-button {
    margin-top: 12px;

    background: #f4efe8;
    color: #1f1f1f;
    border: 1px solid #e6ddd2;
}


/* =========================
   21. Edit modals
========================= */

#editProductModal .delete-modal-card,
#editBoardModal .delete-modal-card {
    max-height: 86vh;
    overflow: hidden;
    padding: 30px;
}

#editProductModal .delete-modal-card form,
#editBoardModal .delete-modal-card form {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 8px;

    display: flex;
    flex-direction: column;
    gap: 10px;
}

#editProductModal .delete-modal-card h2,
#editBoardModal .delete-modal-card h2 {
    margin: 0 0 18px;

    font-size: 30px;
}

#editProductModal .delete-modal-card label,
#editBoardModal .delete-modal-card label {
    font-size: 14px;
}

#editProductModal .delete-modal-card input,
#editProductModal .delete-modal-card select,
#editBoardModal .delete-modal-card input,
#editBoardModal .delete-modal-card select {
    padding: 12px 14px;

    font-size: 14px;
}

#editProductModal .cancel-delete-button,
#editBoardModal .cancel-delete-button {
    margin-top: 12px;
}


/* =========================
   22. Save product modal
========================= */

#saveProductFormFields {
    width: 100%;
    min-width: 0;
}

#saveProductFormFields label {
    display: block;

    width: 100%;
    margin: 0 0 6px;

    text-align: center;

    font-weight: 800;
}

#saveProductFormFields select {
    width: 100%;
    max-width: 100%;
    min-width: 0;

    box-sizing: border-box;
    margin-bottom: 18px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    appearance: none;
    -webkit-appearance: none;

    background-color: white;
    background-image:
        linear-gradient(45deg, transparent 50%, #1f1f1f 50%),
        linear-gradient(135deg, #1f1f1f 50%, transparent 50%);
    background-position:
        calc(100% - 28px) center,
        calc(100% - 22px) center;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;

    padding-right: 56px;
}

#saveProductFormFields button {
    width: 100%;
}

#saveProductFormFields .create-board-button {
    margin-top: 14px;
}

.duplicate-warning-card {
    margin-top: 24px;
    padding: 26px;

    background: #f5f5f5;
    border-radius: 24px;

    text-align: center;
}

.duplicate-warning-card p {
    margin: 0 0 12px;

    color: #1f1f1f;

    font-size: 16px;
    font-weight: 700;
}

.duplicate-warning-card form {
    margin-top: 22px;
}

.duplicate-warning-card button {
    width: 100%;
}

.modal-duplicate-warning {
    display: none;

    margin-top: 26px;
    padding: 30px 32px;

    background: #f5f5f5;
    border-radius: 26px;
}

.modal-duplicate-warning p {
    margin: 0 0 12px;

    color: #1f1f1f;

    font-size: 16px;
    font-weight: 800;
    line-height: 1.35;
}

.modal-duplicate-warning p:last-of-type {
    margin-bottom: 24px;
}

.modal-duplicate-warning button {
    margin-top: 0;
}

.modal-duplicate-warning .cancel-delete-button {
    margin-top: 16px;
}


/* =========================
   23. Board cover upload modal section
========================= */

.board-cover-upload-section {
    display: none;

    margin: 6px 0 10px;
    padding: 14px 18px;

    background: #f8f5f0;
    border-radius: 20px;
}

.delete-modal-card form .cover-toggle-button {
    margin: 4px 0 6px;

    background: #f4efe8;
    color: #1f1f1f;
    border: 1px solid #e6ddd2;
}

.board-cover-upload-section .custom-file-upload {
    margin-bottom: 10px;
    padding: 12px 22px;

    border-radius: 16px;

    font-size: 15px;
}

.board-cover-upload-section .file-selected-text {
    margin-bottom: 4px;

    font-size: 15px;
}

.board-cover-upload-section label:first-child {
    margin-bottom: 6px;
}


/* =========================
   24. Dropdown arrows
========================= */

.delete-modal-card select,
.auth-card select,
.filter-card select {
    appearance: none;
    -webkit-appearance: none;

    background-image:
        linear-gradient(45deg, transparent 50%, #1f1f1f 50%),
        linear-gradient(135deg, #1f1f1f 50%, transparent 50%);

    background-position:
        calc(100% - 22px) center,
        calc(100% - 16px) center;

    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;

    padding-right: 48px;
}


/* =========================
   25. Add product form
========================= */

.add-product-card {
    max-width: 860px;
}

.add-product-form {
    display: flex;
    flex-direction: column;
}

.form-field {
    display: flex;
    flex-direction: column;
}

@media (min-width: 801px) {
    .add-product-form {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 24px;
        row-gap: 16px;
    }

    .add-product-form .form-field {
        margin: 0;
    }

    .add-product-form label {
        margin-bottom: 8px;
    }

    .add-product-form input,
    .add-product-form select {
        margin-bottom: 0;
    }

    .form-full-width {
        grid-column: 1 / -1;
    }

    .image-field {
        align-items: flex-start;
    }

    .image-field .custom-file-upload {
        width: 100%;
        margin-bottom: 8px;
    }

    .add-product-form button[type="submit"] {
        margin-top: 10px;
    }
}

@media (max-width: 800px) {
    .add-product-card {
        max-width: 460px;
    }
}


/* =========================
   26. Empty states / simple pages
========================= */

.empty-board-action {
    display: flex;
    justify-content: center;

    margin-top: 28px;
}

.simple-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 100px 32px;
}

.simple-page h1 {
    margin: 0 0 16px;

    font-size: 56px;
}

.simple-page p {
    color: #68615a;

    font-size: 20px;
}


/* =========================
   27. Responsive: tablet
========================= */

@media (max-width: 1100px) {
    .wishlist-grid,
    .explore-page .wishlist-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .boards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1000px) {
    .board-tools-row {
        grid-template-columns: 1fr;
        gap: 14px;

        margin-top: 14px;
    }

    .board-tools-purchased,
    .board-tools-actions,
    .board-tools-row .board-product-search-wrapper {
        justify-content: center;
    }

    .board-tools-row .search-expand-form {
        max-width: 520px;
        margin: 0 auto;
    }
}

@media (max-width: 800px) {

    .wishlist-grid,
    .explore-page .wishlist-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;

        padding-left: 20px;
        padding-right: 20px;
    }

    .boards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-card {
        grid-template-columns: 1fr;
    }

    .detail-card img {
        height: 420px;
    }

    .detail-info {
        padding: 34px;
    }

    .detail-info h1 {
        font-size: 38px;
    }

    .boards-header {
        flex-direction: column;
        gap: 18px;
    }

    .boards-header .new-board-button {
        position: static;
    }
}


/* =========================
   28. Responsive: mobile
========================= */

@media (max-width: 700px) {
    .board-detail-header {
        position: relative;

        width: 100%;
        margin: 0 0 18px;

        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .board-detail-back {
        position: absolute;
        left: 0;
        top: 0;

        width: 36px;
        height: 36px;
    }

    .board-detail-header h1 {
        width: 100%;
        max-width: 240px;
        margin: 0 auto;
        padding: 0;

        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;

        overflow: hidden;

        text-align: center;

        font-size: 32px;
        line-height: 1.05;

        overflow-wrap: anywhere;
    }

    .board-detail-actions {
        width: 100%;

        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
}

@media (max-width: 560px) {




    .hero {
        padding-top: 55px;
    }

    .hero h1 {
        font-size: 42px;
    }

    .explore-page,
    .boards-page,
    .board-detail-page {
        padding: 24px 18px 48px;
    }

    .explore-header,
    .boards-header {
        margin-bottom: 28px;
    }

    .explore-header h1,
    .boards-header h1 {
        font-size: 32px;
        line-height: 1;
    }

    .explore-header p,
    .board-description {
        margin-bottom: 24px;

        font-size: 15px;
    }

    .explore-search-row {
        grid-template-columns: 1fr auto;
        gap: 8px;
    }

    .explore-search-row > input {
        padding: 13px 16px;

        font-size: 14px;
    }

    .filter-icon-button {
        width: 46px;
        height: 46px;
    }

    .filter-icon-button svg {
        width: 22px;
        height: 22px;
    }

    .wishlist-grid,
    .explore-page .wishlist-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;

        padding: 10px 0 60px;
    }

    .product-card {
        border-radius: 22px;
    }

    .product-card img {
        height: 190px;
    }

    .card-info {
        padding: 14px 14px 18px;
    }

    .card-info h3 {
        margin-bottom: 8px;

        font-size: 13px;
        line-height: 1.18;

        min-height: 31px;
        max-height: 31px;
    }

    .card-info p {
        font-size: 14px;
    }

    .save-product-button {
        padding: 7px 11px;
        font-size: 12px;
    }

    .boards-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .boards-header .new-board-button {
        position: static;

        width: fit-content;
        padding: 8px 14px;

        font-size: 12px;
    }

    .board-card {
        padding: 24px;

        border-radius: 24px;
    }

    .board-card-header h2 {
        font-size: 24px;
    }

    .board-cover-collage {
        height: 150px;
    }

    .board-detail-page {
        padding-top: 10px;
    }

    .board-tools-row {
        width: 100%;
        margin: 14px auto 22px;

        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .board-tools-row .board-product-search-wrapper {
        order: 1;

        width: 100%;
        margin: 0;
        padding: 0;

        display: flex;
        justify-content: center;
    }

    .board-tools-row .search-expand-form {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;

        display: grid;
        grid-template-columns: minmax(0, 1fr) 42px;
        gap: 8px;
    }

    .board-tools-row .search-expand-input {
        width: 100%;
        max-width: 100%;
        min-width: 0;

        padding: 11px 14px;

        font-size: 13px;
    }

    .board-tools-row .search-icon-expand-button {
        width: 42px;
        height: 42px;
    }

    .board-tools-purchased {
        order: 2;

        margin: 0;
        padding: 0;

        justify-content: center;

        font-size: 13px;
    }

    .board-tools-actions {
        order: 3;

        width: 100%;

        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .board-tools-actions .new-board-button,
    .board-tools-actions .edit-board-button,
    .board-detail-actions .new-board-button,
    .edit-board-button {
        width: fit-content;
        padding: 8px 12px;

        font-size: 12px;
        line-height: 1;
    }

    .board-description {
        margin: 4px auto 18px;
    }

    .board-product-search-wrapper {
        padding-left: 0;
        padding-right: 0;
    }

    .search-expand-wrapper {
        margin: 0 auto 22px;
    }

    .search-expand-input {
        width: min(260px, calc(100vw - 92px));
        max-width: min(260px, calc(100vw - 92px));

        padding: 12px 16px;

        font-size: 14px;
    }

    .search-icon-expand-button {
        width: 44px;
        height: 44px;
    }

    .search-icon-expand-button svg {
        width: 19px;
        height: 19px;
    }

    .product-menu-button {
        top: 12px;

        width: 34px;
        height: 34px;

        right: 12px;
    }

    .auth-page,
    .account-page {
        padding: 36px 18px;
    }

    .auth-card,
    .account-card {
        padding: 42px 24px;

        border-radius: 28px;
    }

    .detail-page {
        padding: 28px 18px 48px;
    }

    .detail-card {
        border-radius: 28px;
    }

    .detail-card img {
        height: 360px;
    }

    .filter-card {
        padding: 30px 24px;
    }

    .filter-category-row,
    .filter-price-row,
    .filter-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-actions,
    .filter-cancel-row {
        align-items: center;
    }
}

@media (max-width: 360px) {

}

/* =========================
   Add product page layout fix
========================= */

.auth-card.add-product-card {
    max-width: 860px !important;
}

.auth-card.add-product-card form.add-product-form {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    column-gap: 28px !important;
    row-gap: 16px !important;
}

.auth-card.add-product-card .form-field {
    display: flex !important;
    flex-direction: column !important;
}

.auth-card.add-product-card .form-field label {
    margin-bottom: 8px !important;
}

.auth-card.add-product-card input,
.auth-card.add-product-card select {
    width: 100% !important;
    margin-bottom: 0 !important;
}

.auth-card.add-product-card .custom-file-upload {
    width: 100% !important;
    margin-bottom: 8px !important;
}

.auth-card.add-product-card .form-full-width {
    grid-column: 1 / -1 !important;
}

.auth-card.add-product-card button[type="submit"] {
    grid-column: 1 / -1 !important;
    margin-top: 10px !important;
}

/* Fix Add Product checkbox row */

.add-product-checkbox-row {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;

    margin-top: 4px !important;
}

.add-product-checkbox-row .checkbox-label {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    gap: 10px !important;

    margin: 0 !important;

    font-weight: 800 !important;
}

.add-product-checkbox-row input[type="checkbox"] {
    width: auto !important;
    margin: 0 !important;
}

/* Fix Add Product mobile layout */

@media (max-width: 560px) {
    .auth-card.add-product-card {
        max-width: 100% !important;
        padding: 42px 18px 30px !important;
    }

    .auth-card.add-product-card form.add-product-form {
        display: flex !important;
        flex-direction: column !important;
        gap: 14px !important;
    }

    .auth-card.add-product-card .form-field {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .auth-card.add-product-card label {
        font-size: 14px !important;
        margin-bottom: 7px !important;
    }

    .auth-card.add-product-card input,
    .auth-card.add-product-card select {
        width: 100% !important;
        min-width: 0 !important;
        margin-bottom: 0 !important;
        padding: 13px 14px !important;
        font-size: 14px !important;
    }

    .auth-card.add-product-card .custom-file-upload {
        width: 100% !important;
        padding: 14px 16px !important;
        margin-bottom: 0 !important;
        font-size: 15px !important;
    }

    .add-product-checkbox-row {
        width: 100% !important;
        justify-content: center !important;
        margin-top: 4px !important;
    }

    .add-product-checkbox-row .checkbox-label {
        display: inline-flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        font-size: 14px !important;
        text-align: center !important;
    }

    .add-product-checkbox-row input[type="checkbox"] {
        width: auto !important;
        min-width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .auth-card.add-product-card button[type="submit"] {
        width: 100% !important;
        margin-top: 4px !important;
        padding: 14px 18px !important;
        font-size: 14px !important;
    }
}

/* Account dashboard */

.account-dashboard-card {
    max-width: 620px;
}

.account-username {
    margin: 0 0 28px !important;

    color: #8a7f73 !important;

    font-size: 18px !important;
    font-weight: 800 !important;
}

.account-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;

    margin: 30px 0 34px;
}

.account-stat {
    background: #f8f5f0;

    border-radius: 22px;

    padding: 22px 14px;

    text-align: center;
}

.account-stat span {
    display: block;

    margin-bottom: 8px;

    color: #8a7f73;

    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.account-stat strong {
    display: block;

    color: #1f1f1f;

    font-size: 34px;
    line-height: 1;
}

.account-dashboard-card .account-actions {
    margin-top: 4px;
}

@media (max-width: 560px) {
    .account-dashboard-card {
        max-width: 100%;
    }

    .account-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .account-stat {
        padding: 20px 12px;
    }

    .account-stat strong {
        font-size: 30px;
    }

    .account-dashboard-card .account-actions {
        flex-direction: column;
    }

    .account-dashboard-card .account-button {
        width: 100%;
    }
}




/* =========================
   Navbar account dropdown
========================= */















@media (max-width: 560px) {


}

/* =========================
   Login / signup auth modals
========================= */

.auth-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 3000;

    align-items: center;
    justify-content: center;

    padding: 24px;

    background: rgba(31, 31, 31, 0.25);

    cursor: pointer;
}

.auth-modal-card {
    position: relative;

    width: 100%;
    max-width: 460px;

    padding: 42px;

    background: white;
    border-radius: 30px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.16);

    cursor: default;
}

.auth-modal-card h1 {
    margin: 0 0 10px;
    padding-top: 28px;

    text-align: center;

    font-size: 38px;
}

.auth-modal-card p {
    margin: 0 0 30px;

    color: #68615a;

    text-align: center;
}

.auth-modal-card form {
    display: flex;
    flex-direction: column;
}

.auth-modal-card label {
    margin-bottom: 8px;

    font-weight: 800;
}

.auth-modal-card input {
    margin-bottom: 18px;
    padding: 15px 16px;

    border: 1px solid #e4ddd3;
    border-radius: 14px;

    background: white;

    font-size: 15px;
}

.auth-modal-card form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 15px 24px;

    border: none;
    border-radius: 999px;

    background: #1f1f1f;
    color: white;

    font-weight: 800;

    cursor: pointer;
}

.auth-modal-back {
    border: none;
    cursor: pointer;
}

.auth-modal-switch {
    width: 100%;
    margin-top: 14px !important;
}


@media (max-width: 560px) {
    .auth-modal-card {
        padding: 42px 24px;
        border-radius: 28px;
    }

    .auth-modal-card h1 {
        font-size: 34px;
    }
}

/* =========================
   Auth modal polish
========================= */

.auth-modal-switch {
    width: 100% !important;

    margin-top: 14px !important;
    padding: 14px 18px !important;

    border: 1px solid #e6ddd2 !important;
    border-radius: 999px !important;

    background: #f4efe8 !important;
    color: #1f1f1f !important;

    font-size: 15px !important;
    font-weight: 800 !important;

    cursor: pointer !important;
}

.auth-modal-switch:hover {
    background: #eee7dc !important;
}

/* Make auth modals a touch smaller */

.auth-modal-card {
    max-width: 430px !important;
    padding: 34px 34px 30px !important;
}

.auth-modal-card h1 {
    font-size: 34px !important;
    padding-top: 24px !important;
}

.auth-modal-card p {
    margin-bottom: 22px !important;
}

/* Scroll signup form inside the card */

#signupModal .auth-modal-card {
    max-height: 86vh !important;
    overflow: hidden !important;
}

#signupModal .auth-modal-card form {
    max-height: 48vh !important;
    overflow-y: auto !important;

    padding-right: 8px !important;
}

/* Keep spacing tidy inside signup scroll area */

#signupModal .auth-modal-card label {
    font-size: 14px !important;
}

#signupModal .auth-modal-card input {
    margin-bottom: 14px !important;
    padding: 13px 14px !important;
    font-size: 14px !important;
}

#signupModal .auth-modal-card form button {
    margin-top: 2px !important;
}

/* Mobile auth modal sizing */

@media (max-width: 560px) {
    .auth-modal-card {
        max-width: 100% !important;
        padding: 34px 22px 26px !important;
    }

    #signupModal .auth-modal-card {
        max-height: 84vh !important;
    }

    #signupModal .auth-modal-card form {
        max-height: 46vh !important;
    }

    .auth-modal-card h1 {
        font-size: 32px !important;
    }
}

/* Make whole signup modal content scroll, not just the form */

#signupModal .auth-modal-card {
    max-height: 86vh !important;
    overflow-y: auto !important;
    padding-right: 34px !important;
}





/* My Boards login prompt */

.boards-login-prompt-card {
    max-width: 430px !important;
}

.boards-login-prompt-card h1 {
    font-size: 34px !important;
}

.boards-login-prompt-card p {
    margin-bottom: 28px !important;

    color: #68615a !important;

    font-size: 16px !important;
    line-height: 1.5 !important;
}

.boards-login-prompt-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.boards-login-prompt-actions .nav-dropdown-button {
    margin-top: 0 !important;
}

@media (max-width: 560px) {

    .boards-login-prompt-card {
        max-width: 100% !important;
    }
}

/* Keep signup scrollbar inside the card */

#signupModal .auth-modal-card {
    max-height: 84vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

#signupModal .auth-modal-card form {
    max-height: none !important;
    overflow: visible !important;
    padding-right: 0 !important;
}

#signupModal .auth-modal-switch {
    position: static !important;
}

/* Slightly tidy the inside spacing */
#signupModal .auth-modal-card {
    padding: 34px 34px 30px !important;
}

#signupModal .auth-modal-card input {
    margin-bottom: 14px !important;
}

@media (max-width: 560px) {
    #signupModal .auth-modal-card {
        max-height: 82vh !important;
        padding: 34px 22px 26px !important;
    }
}

/* Signup modal scrollbar inside card */

#signupModal .signup-modal-card {
    max-height: 84vh !important;
    overflow: hidden !important;
    padding: 0 !important;
}

#signupModal .auth-modal-scroll {
    max-height: 84vh !important;

    overflow-y: auto !important;
    overflow-x: hidden !important;

    padding: 34px 34px 30px !important;

    border-radius: 30px;
}

#signupModal .auth-modal-scroll form {
    max-height: none !important;
    overflow: visible !important;
    padding-right: 0 !important;
}

#signupModal .auth-modal-switch {
    position: static !important;
    margin-top: 14px !important;
}

/* Optional: make the scrollbar feel neater */

#signupModal .auth-modal-scroll::-webkit-scrollbar-track {
    background: transparent;
    margin: 22px 0;
}

#signupModal .auth-modal-scroll::-webkit-scrollbar-thumb {
    background: #9b9b9b;
    border-radius: 999px;
}

@media (max-width: 560px) {
    #signupModal .signup-modal-card {
        max-height: 82vh !important;
    }

    #signupModal .auth-modal-scroll {
        max-height: 82vh !important;
        padding: 34px 22px 26px !important;
        border-radius: 28px;
    }
}

/* Let signup modal back button scroll with the content */

#signupModal .auth-modal-back {
    position: static !important;

    margin: 0 0 18px 0 !important;
}

/* Tighten signup modal spacing */

#signupModal .auth-modal-scroll {
    padding: 24px 28px 26px !important;
}

#signupModal .auth-modal-back {
    position: static !important;

    width: 48px !important;
    height: 48px !important;

    margin: 0 0 8px 0 !important;
}

#signupModal .auth-modal-card h1,
#signupModal .auth-modal-scroll h1 {
    padding-top: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 8px !important;
}

#signupModal .auth-modal-card p,
#signupModal .auth-modal-scroll p {
    margin-bottom: 22px !important;
}

@media (max-width: 560px) {
    #signupModal .auth-modal-scroll {
        padding: 22px 20px 24px !important;
    }

    #signupModal .auth-modal-back {
        width: 44px !important;
        height: 44px !important;
        margin-bottom: 6px !important;
    }
}

/* Reduce bottom padding in signup modal */

#signupModal .auth-modal-scroll {
    padding-bottom: 14px !important;
}

@media (max-width: 560px) {
    #signupModal .auth-modal-scroll {
        padding-bottom: 12px !important;
    }
}

/* Account details modal */

.account-edit-button {
    margin: 0 auto 28px;
}

.account-details-modal-card {
    max-width: 460px;
}

.account-details-modal-card form {
    text-align: left;
}

.account-details-modal-card .cancel-delete-button {
    margin-top: 0;
}

/* Profile pictures */

.account-profile-main {
    display: flex;
    flex-direction: column;
    align-items: center;

    margin-bottom: 20px;
}

.account-profile-image {
    width: 94px;
    height: 94px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    border-radius: 50%;

    background: #f4efe8;
    color: #1f1f1f;

    font-size: 38px;
    font-weight: 900;
}

.account-profile-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}



.account-details-modal-card .image-upload-preview {
    max-width: 120px;
    max-height: 120px;

    border-radius: 50%;

    object-fit: cover;
}

.account-details-modal-card .checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;

    margin-bottom: 14px;
}

.account-details-modal-card .checkbox-label input {
    width: auto;
    margin: 0;
}

/* Centre navbar links/icons on mobile */

@media (max-width: 560px) {




}

/* Fine-tune mobile navbar centring */

@media (max-width: 560px) {
}

/* =========================
   Sticky search / tools rows
   Explore, My Boards, Board Detail
========================= */

/* Explore search bar */
.explore-search-row {
    position: sticky !important;
    top: 92px !important;
    z-index: 850 !important;

    padding: 12px !important;
    margin-bottom: 34px !important;

    background: rgba(248, 245, 240, 0.94) !important;
    backdrop-filter: blur(12px) !important;

    border-radius: 999px !important;
}

/* My Boards search bar */
.boards-page > .search-expand-wrapper {
    position: sticky !important;
    top: 92px !important;
    z-index: 850 !important;

    padding: 12px !important;
    margin-bottom: 34px !important;

    background: rgba(248, 245, 240, 0.94) !important;
    backdrop-filter: blur(12px) !important;

    border-radius: 999px !important;
}

/* Opened board toolbar: hide purchased + search + buttons */
.board-tools-row {
    position: sticky !important;
    top: 92px !important;
    z-index: 850 !important;

    padding: 12px !important;

    background: rgba(248, 245, 240, 0.94) !important;
    backdrop-filter: blur(12px) !important;

    border-radius: 999px !important;
}

/* Keep sticky rows from looking too wide */
.explore-search-row,
.boards-page > .search-expand-wrapper,
.board-tools-row {
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.04) !important;
}

/* Lower sticky search rows on mobile */

@media (max-width: 560px) {
    .explore-search-row,
    .boards-page > .search-expand-wrapper,
    .board-tools-row {
        top: 150px !important;
    }
}

/* Mobile: bottom sticky board search only */

@media (max-width: 560px) {
    /* Stop the whole board toolbar being sticky */
    .board-tools-row {
        position: static !important;

        background: transparent !important;
        box-shadow: none !important;
        backdrop-filter: none !important;

        padding: 0 !important;
        border-radius: 0 !important;

        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;

        gap: 10px !important;
        margin: 10px auto 18px !important;
    }

    /* Put hide purchased and buttons at the top */
    .board-tools-purchased {
        order: 1 !important;
    }

    .board-tools-actions {
        order: 2 !important;
    }

    /* Make only search bar sticky at bottom */
    .board-tools-row .board-product-search-wrapper {
        order: 3 !important;

        position: fixed !important;
        left: 50% !important;
        bottom: calc(env(safe-area-inset-bottom) + 14px) !important;
        transform: translateX(-50%) !important;

        z-index: 1200 !important;

        width: calc(100vw - 42px) !important;
        max-width: 330px !important;

        margin: 0 !important;
        padding: 10px !important;

        background: rgba(248, 245, 240, 0.96) !important;
        backdrop-filter: blur(12px) !important;

        border-radius: 999px !important;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12) !important;
    }

    .board-tools-row .search-expand-form {
        width: 100% !important;
        max-width: none !important;

        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 42px !important;
        gap: 8px !important;

        margin: 0 !important;
    }

    .board-tools-row .search-expand-input {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;

        padding: 11px 14px !important;

        font-size: 13px !important;
    }

    .board-tools-row .search-icon-expand-button {
        width: 42px !important;
        height: 42px !important;
    }

    /* Add breathing room so bottom search doesn't cover last products */
    .board-detail-page .wishlist-grid {
        padding-bottom: 120px !important;
    }
}

/* Mobile: search sits under board controls, only search is sticky */

@media (max-width: 560px) {
    /* Whole toolbar should not be sticky */
    .board-tools-row {
        position: static !important;

        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;

        width: 100% !important;

        margin: 10px auto 18px !important;
        padding: 0 !important;

        gap: 10px !important;

        background: transparent !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        border-radius: 0 !important;
    }

    /* Hide purchased first */
    .board-tools-purchased {
        order: 1 !important;

        margin: 0 !important;
        padding: 0 !important;

        justify-content: center !important;
    }

    /* Search third, below buttons, sticky on scroll */
    .board-tools-row .board-product-search-wrapper {
        order: 3 !important;

        position: sticky !important;
        top: 132px !important;
        z-index: 900 !important;

        width: 100% !important;
        max-width: 290px !important;

        margin: 2px auto 0 !important;
        padding: 8px !important;

        display: flex !important;
        justify-content: center !important;

        background: rgba(248, 245, 240, 0.96) !important;
        backdrop-filter: blur(12px) !important;

        border-radius: 999px !important;
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06) !important;

        transform: none !important;
        left: auto !important;
        bottom: auto !important;
    }





}

/* Mobile: board controls with sticky search at bottom of toolbar */

@media (max-width: 560px) {
    .board-tools-row {
        position: sticky !important;
        top: 132px !important;
        z-index: 900 !important;

        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;

        width: 100% !important;
        max-width: 310px !important;

        margin: 10px auto 18px !important;
        padding: 10px 12px !important;

        gap: 8px !important;

        background: rgba(248, 245, 240, 0.96) !important;
        backdrop-filter: blur(12px) !important;

        border-radius: 28px !important;
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06) !important;
    }




    .board-tools-row .board-product-search-wrapper {
        order: 3 !important;

        position: static !important;

        width: 100% !important;
        max-width: none !important;

        margin: 2px auto 0 !important;
        padding: 0 !important;

        background: transparent !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        border-radius: 0 !important;

        transform: none !important;
        left: auto !important;
        bottom: auto !important;
    }

    .board-tools-row .search-expand-form {
        width: 100% !important;
        max-width: none !important;

        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 40px !important;
        gap: 8px !important;

        margin: 0 !important;
    }

    .board-tools-row .search-expand-input {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;

        padding: 10px 13px !important;

        font-size: 13px !important;
    }

    .board-tools-row .search-icon-expand-button {
        width: 40px !important;
        height: 40px !important;
    }

    .board-tools-row .search-icon-expand-button svg {
        width: 17px !important;
        height: 17px !important;
    }
}

/* Mobile: only board search bar is sticky */

@media (max-width: 560px) {
    .board-tools-row {
        position: static !important;

        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;

        width: 100% !important;
        max-width: none !important;

        margin: 10px auto 8px !important;
        padding: 0 !important;

        gap: 10px !important;

        background: transparent !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        border-radius: 0 !important;
    }

    .board-tools-purchased {
        order: 1 !important;

        margin: 0 !important;
        padding: 0 !important;

        justify-content: center !important;

        font-size: 12px !important;
    }

    .board-tools-actions {
        order: 2 !important;

        width: 100% !important;

        display: flex !important;
        align-items: center !important;
        justify-content: center !important;

        gap: 8px !important;
    }

    .board-tools-actions .new-board-button,
    .board-tools-actions .edit-board-button {
        padding: 8px 12px !important;

        font-size: 12px !important;
        line-height: 1 !important;
    }

    .board-product-search-wrapper {
        position: sticky !important;
        top: 132px !important;
        z-index: 900 !important;

        width: 100% !important;
        max-width: 300px !important;

        margin: 8px auto 18px !important;
        padding: 8px !important;

        display: flex !important;
        justify-content: center !important;

        background: rgba(248, 245, 240, 0.96) !important;
        backdrop-filter: blur(12px) !important;

        border-radius: 999px !important;
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06) !important;

        transform: none !important;
        left: auto !important;
        bottom: auto !important;
    }

    .board-product-search-wrapper .search-expand-form {
        width: 100% !important;
        max-width: none !important;

        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 40px !important;
        gap: 8px !important;

        margin: 0 !important;
    }

    .board-product-search-wrapper .search-expand-input {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;

        padding: 10px 13px !important;

        font-size: 13px !important;
    }

    .board-product-search-wrapper .search-icon-expand-button {
        width: 40px !important;
        height: 40px !important;
    }

    .board-product-search-wrapper .search-icon-expand-button svg {
        width: 17px !important;
        height: 17px !important;
    }
}

/* Force only one board search bar to show */

.mobile-board-search {
    display: none !important;
}

@media (min-width: 561px) {
    .board-tools-row .desktop-board-search {
        display: flex !important;
    }

    .board-detail-page > .mobile-board-search {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }
}

@media (max-width: 560px) {
    .board-tools-row .desktop-board-search {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    .board-detail-page > .mobile-board-search {
        display: flex !important;
        visibility: visible !important;
        height: auto !important;
        overflow: visible !important;
    }
}

/* More space above mobile sticky board search */

@media (max-width: 560px) {
    .board-detail-page > .mobile-board-search {
        margin-top: 22px !important;
    }
}

/* Narrow My Boards sticky search wrapper */

.boards-page > .search-expand-wrapper {
    width: fit-content !important;
    max-width: calc(100vw - 64px) !important;

    margin-left: auto !important;
    margin-right: auto !important;

    padding: 10px 12px !important;
}

.boards-page > .search-expand-wrapper .search-expand-form {
    width: auto !important;
}

.boards-page > .search-expand-wrapper .search-expand-input {
    width: min(620px, calc(100vw - 170px)) !important;
    max-width: min(620px, calc(100vw - 170px)) !important;
}

@media (max-width: 560px) {
    .boards-page > .search-expand-wrapper {
        max-width: calc(100vw - 36px) !important;
        padding: 8px 10px !important;
    }

    .boards-page > .search-expand-wrapper .search-expand-input {
        width: min(250px, calc(100vw - 100px)) !important;
        max-width: min(250px, calc(100vw - 100px)) !important;
    }
}

/* Save login prompt */

.save-login-prompt-card {
    max-width: 430px !important;
}

.save-login-prompt-card h1 {
    font-size: 34px !important;
}

.save-login-prompt-card p {
    margin-bottom: 28px !important;

    color: #68615a !important;

    font-size: 16px !important;
    line-height: 1.5 !important;
}

.save-login-prompt-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.save-login-prompt-actions .nav-dropdown-button {
    margin-top: 0 !important;
}

@media (max-width: 560px) {
    .save-login-prompt-card {
        max-width: 100% !important;
    }
}

/* Move Explore search closer to intro text */

.explore-header {
    margin-bottom: 22px !important;
}

.explore-search-row {
    margin-top: 0 !important;
}

/* Change password modal */

.account-password-button {
    margin: -14px auto 28px !important;
}

.change-password-modal-card {
    max-width: 460px !important;
}

.change-password-modal-card form {
    text-align: left !important;
}

.change-password-modal-card .cancel-delete-button {
    margin-top: 0 !important;
}

@media (max-width: 560px) {
    .account-password-button {
        margin-top: -10px !important;
    }
}

/* =========================
   Account dashboard redesign
========================= */

.account-dashboard-page {
    max-width: 1220px;
    margin: 0 auto;
    padding: 46px 32px 70px;

    display: grid;
    grid-template-columns: minmax(260px, 0.9fr) minmax(0, 2.1fr);
    gap: 34px;
}

.account-sidebar-card,
.account-main-area {
    background: white;
    border-radius: 34px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.07);
}

.account-sidebar-card {
    padding: 36px 30px;

    min-height: 650px;
}

.account-sidebar-profile {
    display: flex;
    flex-direction: column;
    align-items: center;

    margin-bottom: 52px;
}

.account-sidebar-image-wrap {
    position: relative;

    width: 180px;
    height: 180px;

    margin-bottom: 18px;
}

.account-sidebar-image {
    width: 100%;
    height: 100%;

    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #f4efe8;
    color: #1f1f1f;

    font-size: 62px;
    font-weight: 900;
}

.account-sidebar-image img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}

.profile-pencil-button {
    position: absolute;
    top: 14px;
    right: 8px;

    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 50%;

    background: #f4efe8;
    color: #1f1f1f;

    font-size: 20px;
    font-weight: 900;

    cursor: pointer;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

.account-sidebar-username {
    border: none;
    background: transparent;

    color: #8a7f73;

    font-family: inherit;
    font-size: 28px;
    font-weight: 800;

    cursor: pointer;
}

.account-sidebar-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    gap: 18px;
}

.account-sidebar-link {
    padding: 0;

    border: none;
    background: transparent;

    color: #68615a;

    font-family: inherit;
    font-size: 18px;
    font-weight: 700;

    cursor: pointer;
    text-align: left;
}

.account-sidebar-link:hover,
.account-sidebar-link.active {
    color: #1f1f1f;
}

.account-sidebar-delete-link {
    margin-top: 8px;

    color: #a36b5f;

    font-size: 15px;
}

.account-main-area {
    min-height: 650px;
    padding: 44px;
}

.account-message-stack {
    margin-bottom: 22px;
}

.account-panel {
    display: none;
}

.account-panel.active {
    display: block;
}

.account-panel h1 {
    margin: 0 0 28px;

    text-align: center;

    font-size: 38px;
    letter-spacing: -1px;
}

.account-dashboard-summary-card,
.account-board-preview-card,
.account-info-card {
    padding: 28px;

    background: #f8f5f0;
    border-radius: 28px;
}

.account-dashboard-summary-card {
    margin-bottom: 34px;

    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.account-dashboard-stat {
    padding: 22px 16px;

    background: white;
    border-radius: 22px;

    text-align: center;
}

.account-dashboard-stat span {
    display: block;

    margin-bottom: 10px;

    color: #8a7f73;

    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.account-dashboard-stat strong {
    display: block;

    font-size: 34px;
    line-height: 1;
}

.account-section-heading-row {
    margin-bottom: 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.account-section-heading-row h2 {
    margin: 0;

    font-size: 28px;
}

.account-section-heading-row a {
    color: #8a7f73;

    text-decoration: none;

    font-weight: 900;
}

.account-board-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.account-mini-board-card {
    padding: 14px;

    display: block;

    background: white;
    border-radius: 24px;

    color: inherit;
    text-decoration: none;
}

.account-mini-board-cover {
    height: 130px;

    overflow: hidden;

    border-radius: 18px;

    background: #f4efe8;
}

.account-mini-board-cover > img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}

.account-mini-board-collage {
    width: 100%;
    height: 100%;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
}

.account-mini-board-collage img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.account-mini-board-empty {
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #8a7f73;

    font-size: 34px;
    font-weight: 800;
}

.account-mini-board-card h3 {
    margin: 12px 0 0;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    overflow: hidden;

    text-align: center;

    font-size: 16px;
    line-height: 1.15;
}

.account-info-card {
    max-width: 680px;
    margin: 0 auto;
}

.account-info-row {
    padding: 18px 0;

    display: flex;
    justify-content: space-between;
    gap: 18px;

    border-bottom: 1px solid #e6ddd2;
}

.account-info-row:first-child {
    padding-top: 0;
}

.account-info-row span {
    color: #8a7f73;

    font-weight: 800;
}

.account-info-row strong {
    text-align: right;
}

.account-panel-action {
    width: 100%;
    margin-top: 18px;
}

.account-panel-copy {
    margin: 0 0 22px;

    color: #68615a;

    font-size: 16px;
    line-height: 1.6;
}

.account-toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;

    margin: 14px 0;

    color: #68615a;

    font-weight: 800;
}

.account-danger-card {
    background: #fbf2ef;
}

.account-danger-button {
    width: 100%;
    padding: 15px 20px;

    border: none;
    border-radius: 999px;

    background: #a36b5f;
    color: white;

    font-family: inherit;
    font-size: 15px;
    font-weight: 900;

    cursor: pointer;
}

.account-danger-modal-card form button {
    background: #a36b5f;
}

@media (max-width: 900px) {
    .account-dashboard-page {
        grid-template-columns: 1fr;
    }

    .account-sidebar-card {
        min-height: auto;
    }

    .account-sidebar-nav {
        align-items: center;
    }
}

@media (max-width: 560px) {
    .account-dashboard-page {
        padding: 24px 18px 48px;
        gap: 20px;
    }

    .account-sidebar-card,
    .account-main-area {
        border-radius: 28px;
    }

    .account-sidebar-card {
        padding: 30px 22px;
    }

    .account-main-area {
        padding: 30px 20px;
    }

    .account-sidebar-image-wrap {
        width: 132px;
        height: 132px;
    }

    .account-sidebar-username {
        font-size: 24px;
    }

    .account-panel h1 {
        font-size: 32px;
    }

    .account-dashboard-summary-card {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .account-board-preview-grid {
        grid-template-columns: 1fr;
    }

    .account-info-row {
        flex-direction: column;
        gap: 6px;
    }

    .account-info-row strong {
        text-align: left;
    }
}

/* Account dashboard card centring */





.account-dashboard-summary-card {
}

/* Fix account dashboard card layout */

.account-main-area {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.account-panel {
    width: 100% !important;
}

.account-panel.active {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.account-dashboard-summary-card,
.account-board-preview-card {
    width: 100% !important;
    max-width: 980px !important;

    margin-left: auto !important;
    margin-right: auto !important;
}

/* Dashboard title inside card */
.account-dashboard-summary-card {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 18px !important;

    align-items: stretch !important;

    padding: 42px !important;
    margin-bottom: 34px !important;
}

.account-dashboard-summary-card h1 {
    grid-column: 1 / -1 !important;

    margin: 0 0 8px !important;

    text-align: center !important;

    font-size: 38px !important;
    line-height: 1 !important;
    letter-spacing: -1px !important;
}

.account-dashboard-stat {
    min-width: 0 !important;
}

/* My Boards card heading centred nicely */
.account-board-preview-card {
    padding: 42px !important;
}

.account-section-heading-row {
    width: 100% !important;

    display: grid !important;
    grid-template-columns: 1fr auto 1fr !important;
    align-items: center !important;
}

.account-section-heading-row h2 {
    grid-column: 2 !important;

    margin: 0 !important;

    text-align: center !important;
}

.account-section-heading-row a {
    grid-column: 3 !important;
    justify-self: end !important;
}

/* Responsive account dashboard stats */
@media (max-width: 900px) {
    .account-dashboard-summary-card {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 560px) {
    .account-dashboard-summary-card,
    .account-board-preview-card {
        padding: 28px 20px !important;
    }

    .account-dashboard-summary-card h1 {
        font-size: 32px !important;
    }

    .account-dashboard-summary-card {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

    .account-section-heading-row {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .account-section-heading-row h2,
    .account-section-heading-row a {
        grid-column: 1 !important;
        justify-self: center !important;
    }
}

/* Match account dashboard section heading sizes */

.account-dashboard-summary-card h1,
.account-section-heading-row h2 {
    font-size: 34px !important;
    line-height: 1.05 !important;
    letter-spacing: -0.8px !important;
    font-weight: 700 !important;
}

@media (max-width: 560px) {
    .account-dashboard-summary-card h1,
    .account-section-heading-row h2 {
        font-size: 30px !important;
    }
}

/* Force account dashboard headings to match */

.account-main-area .account-dashboard-summary-card > h1,
.account-main-area .account-board-preview-card .account-section-heading-row > h2 {
    font-size: 30px !important;
    line-height: 1.05 !important;
    letter-spacing: -0.8px !important;
    font-weight: 700 !important;
    font-family: Arial, sans-serif !important;
}

@media (max-width: 560px) {
    .account-main-area .account-dashboard-summary-card > h1,
    .account-main-area .account-board-preview-card .account-section-heading-row > h2 {
        font-size: 30px !important;
        font-weight: 700 !important;
    }
}

/* Profile picture crop modal */

.profile-picture-crop-modal-card {
    max-width: 520px !important;
}

.profile-picture-crop-modal-card p {
    margin-bottom: 22px !important;
}

.profile-crop-area {
    margin: 4px auto 20px;

    display: flex;
    align-items: center;
    justify-content: center;
}

/* Upload trigger: was a plain beige-bordered rectangle (border-radius
   16px, left-aligned by default as an inline-flex label) - the only
   control on the whole site still in that older style instead of the
   pill-shaped, centred .deckd-btn family every modal action uses now.
   Scoped to this modal rather than changing .custom-file-upload
   itself, which other pages (add/edit product, board cover) still use
   as-is. */
#profilePictureModal .custom-file-upload {
    display: flex;
    width: fit-content;

    margin: 0 auto 4px;
    padding: 9px 14px;

    border: 1px solid #d9d9d9;
    border-radius: 8px;

    background: #ffffff;
    color: #1f1f1f;

    font-size: 14px;
    font-weight: 500;

    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

#profilePictureModal .custom-file-upload:hover {
    background: #f5f5f5;
    border-color: #c2c2c2;
    color: #1f1f1f;
}

.profile-crop-circle {
    position: relative;

    width: 300px;
    height: 300px;

    overflow: hidden;

    border-radius: 50%;

    background: #f4efe8;
    box-shadow:
        inset 0 0 0 2px #e6ddd2,
        0 14px 34px rgba(0, 0, 0, 0.08);

    cursor: grab;
    touch-action: none;
}

.profile-crop-circle:active {
    cursor: grabbing;
}

.profile-crop-circle img {
    position: absolute;
    top: 50%;
    left: 50%;

    display: none;

    max-width: none;
    max-height: none;

    user-select: none;
    pointer-events: none;
}

.profile-crop-controls {
    display: none;

    margin: 0 auto 22px;
}

.profile-crop-controls label {
    display: block;

    margin-bottom: 8px;

    text-align: center;
}

.profile-crop-controls input[type="range"] {
    width: 100%;
    accent-color: #1f1f1f;
}

@media (max-width: 560px) {
    .profile-picture-crop-modal-card {
        max-width: 100% !important;
    }

    .profile-crop-circle {
        width: 240px;
        height: 240px;
    }
}

/* Profile crop natural zoom behaviour */

.profile-crop-circle {
    outline: none;
}


.profile-picture-crop-modal-card p::after {
    content: " Drag to position. Pinch or scroll over the circle to zoom.";
}

.profile-crop-controls {
    display: none !important;
}

.profile-crop-circle {
    outline: none;
    touch-action: none;
}

.profile-crop-circle:focus {
    box-shadow:
        inset 0 0 0 2px #1f1f1f,
        0 14px 34px rgba(0, 0, 0, 0.08);
}

/* Profile crop temporary grid overlay */

.profile-crop-circle {
    position: relative !important;
    outline: none !important;
    touch-action: none !important;
}

.profile-crop-circle img {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;

    z-index: 1 !important;

    display: none;

    max-width: none !important;
    max-height: none !important;

    user-select: none !important;
    pointer-events: none !important;
}

.profile-crop-grid {
    position: absolute !important;
    inset: 0 !important;

    z-index: 5 !important;

    pointer-events: none !important;

    opacity: 0;

    background-image:
        linear-gradient(
            to right,
            rgba(255, 255, 255, 0.55) 1px,
            transparent 1px
        ),
        linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.55) 1px,
            transparent 1px
        );

    background-size: 33.333% 33.333%;

    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.65);

    transition: opacity 0.18s ease;
}

.profile-crop-grid::before,
.profile-crop-grid::after {
    content: "";

    position: absolute;

    background: rgba(255, 255, 255, 0.7);
}

.profile-crop-grid::before {
    left: 50%;
    top: 0;

    width: 1px;
    height: 100%;

    transform: translateX(-50%);
}

.profile-crop-grid::after {
    top: 50%;
    left: 0;

    width: 100%;
    height: 1px;

    transform: translateY(-50%);
}

.profile-crop-grid.is-visible {
    opacity: 1 !important;
}

/* Make profile crop grid more spacious */

.profile-crop-grid {
    background-size: 50% 50% !important;
}

/* Profile crop grid: 3 lines each direction */

.profile-crop-grid {
    background-size: 25% 25% !important;
}

/* Show profile crop grid on hover only after image chosen */

.profile-crop-circle.has-image:hover .profile-crop-grid {
    opacity: 1 !important;
}

/* Existing profile picture preview inside crop modal */

.profile-crop-circle.has-image #profile-crop-image {
    display: block;
}

/* Scrollable profile picture crop modal */




@media (max-width: 560px) {
}

/* Scrollable profile picture crop modal */

.profile-picture-crop-modal-card {
    max-height: calc(100vh - 48px) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
}

.profile-picture-crop-modal-card::-webkit-scrollbar {
    width: 8px;
}

.profile-picture-crop-modal-card::-webkit-scrollbar-thumb {
    background: rgba(31, 31, 31, 0.18);
    border-radius: 999px;
}

@media (max-width: 560px) {
    .profile-picture-crop-modal-card {
        max-height: calc(100vh - 28px) !important;
    }
}

/* Centre empty My Boards preview on account dashboard */

.account-board-preview-card .account-empty-panel-card {
    min-height: 170px !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;

    text-align: center !important;
}

.account-board-preview-card .account-empty-panel-card p {
    margin: 0 0 22px !important;

    text-align: center !important;
}

.account-board-preview-card .account-empty-panel-card .account-button {
    margin: 0 auto !important;
}

/* Account create board modal */




/* Create board modal */



/* Create board modal */

.create-board-modal-card {
    max-width: 460px !important;
}

.create-board-modal-card form {
    text-align: left !important;
}

.create-board-modal-card .cancel-delete-button {
    margin-top: 0 !important;
}

/* Stop board title letters being clipped */

.board-detail-page h1,
.board-title,
.board-header h1 {
    line-height: 1.18 !important;
    padding-bottom: 6px !important;
    overflow: visible !important;
}

/* =========================
   Account dashboard layout v2
   My Boards above Activity + sidebar nav card
========================= */

.account-dashboard-page-v2 {
    grid-template-columns: minmax(260px, 0.85fr) minmax(0, 2.15fr) !important;
    align-items: start !important;
}


.account-sidebar-card-v2 .account-sidebar-profile {
    margin-bottom: 30px !important;
}

.account-sidebar-nav-card {
    width: calc(100% + 14px) !important;
    margin-left: -7px !important;
    margin-right: -7px !important;
    padding: 24px 22px !important;

    background: #f8f5f0 !important;
    border-radius: 26px !important;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.055) !important;
}

.account-sidebar-nav-card .account-sidebar-nav {
    gap: 16px !important;
}

.account-sidebar-nav-card .account-sidebar-link {
    width: 100% !important;
    padding: 0 !important;

    border: none !important;
    background: transparent !important;

    text-align: left !important;
}

.account-main-area-v2 .account-panel.active {
    gap: 34px !important;
}

.account-board-preview-card-top,
.account-activity-card {
    width: 100% !important;
    max-width: 980px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.account-board-preview-card-top {
    margin-bottom: 0 !important;
}

.account-activity-card {
    display: block !important;
    padding: 42px !important;
}

.account-activity-heading-row {
    margin-bottom: 24px !important;
}

.account-activity-heading-row h2,
.account-board-preview-card-top .account-section-heading-row h2 {
    font-size: 34px !important;
    line-height: 1.05 !important;
    letter-spacing: -0.8px !important;
    font-weight: 800 !important;
}

.account-recent-logins-button {
    justify-self: end !important;

    padding: 12px 20px !important;

    border: none !important;
    border-radius: 999px !important;

    background: #1f1f1f !important;
    color: white !important;

    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 900 !important;

    cursor: pointer !important;
}

.account-dashboard-stat-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 18px !important;
}

.account-details-danger-row {
    margin-top: 28px !important;
    padding-top: 24px !important;

    border-top: 1px solid #e6ddd2 !important;
}

.account-details-danger-row p {
    margin: 0 0 14px !important;

    color: #8a7f73 !important;

    font-size: 14px !important;
    line-height: 1.5 !important;
    text-align: center !important;
}

.account-details-delete-button {
    max-width: 260px !important;
    margin: 0 auto !important;
    display: block !important;
}

.recent-logins-modal-card {
    max-width: 440px !important;
}

.recent-logins-modal-card p {
    color: #68615a !important;
    line-height: 1.5 !important;
}

@media (max-width: 900px) {
    .account-dashboard-page-v2 {
        grid-template-columns: 1fr !important;
    }

    .account-sidebar-nav-card {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .account-sidebar-nav-card .account-sidebar-nav {
        align-items: center !important;
    }

    .account-sidebar-nav-card .account-sidebar-link {
        text-align: center !important;
    }

    .account-dashboard-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 560px) {
    .account-activity-card {
        padding: 28px 20px !important;
    }

    .account-activity-heading-row {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .account-activity-heading-row h2,
    .account-recent-logins-button {
        grid-column: 1 !important;
        justify-self: center !important;
    }

    .account-activity-heading-row h2,
    .account-board-preview-card-top .account-section-heading-row h2 {
        font-size: 30px !important;
    }

    .account-dashboard-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }
}

/* Account sidebar rectangular nav card */


.account-sidebar-nav-card {
    width: 80% !important;

    margin-left: -30px !important;
    margin-right: auto !important;

    padding: 26px 26px 26px 30px !important;

    border-radius: 0 24px 24px 0 !important;

    background: #f8f5f0 !important;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.06) !important;
}




/* Mobile: keep it neat and centred */
@media (max-width: 900px) {
    .account-sidebar-nav-card {
        width: 100% !important;

        margin-left: 0 !important;
        padding: 24px !important;

        border-radius: 24px !important;
    }

}

/* Account sidebar nav: full screen-edge rectangle */

.account-dashboard-page-v2 {
    position: relative !important;
}

.account-sidebar-card-v2 {
    position: relative !important;
    overflow: visible !important;
}

.account-sidebar-nav-card {
    position: relative !important;

    width: calc(100% + 32px) !important;

    margin-left: calc(-1 * ((100vw - min(1220px, 100vw)) / 2 + 32px)) !important;
    margin-right: 0 !important;

    padding: 26px 28px 26px calc(((100vw - min(1220px, 100vw)) / 2 + 32px) + 30px) !important;

    border-radius: 0 !important;

    background: #f8f5f0 !important;
    box-shadow: none !important;
}

.account-sidebar-nav {
    gap: 18px !important;
}

.account-sidebar-link {
    width: 100% !important;

    color: #68615a !important;

    font-size: 13px !important;
    font-weight: 900 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;

    text-align: left !important;
}

.account-sidebar-link:hover,
.account-sidebar-link.active {
    color: #1f1f1f !important;
}

/* Tablet/mobile: stop it overflowing weirdly */
@media (max-width: 900px) {
    .account-sidebar-nav-card {
        width: 100% !important;

        margin-left: 0 !important;
        padding: 24px !important;

        border-radius: 0 !important;
    }

    .account-sidebar-link {
        text-align: center !important;
    }
}

/* Bigger, more spaced account sidebar titles */

.account-sidebar-nav {
    gap: 36px !important;
}

.account-sidebar-link {
    font-size: 15px !important;
    letter-spacing: 0.09em !important;
}

/* Match "See recent logins" to "View all" styling */

.account-recent-logins-button {
    padding: 0 !important;

    border: none !important;
    background: transparent !important;
    box-shadow: none !important;

    color: #8a7f73 !important;

    font-family: inherit !important;
    font-size: inherit !important;
    font-weight: 900 !important;
    line-height: inherit !important;

    text-decoration: none !important;

    cursor: pointer !important;
}

.account-recent-logins-button:hover {
    color: #1f1f1f !important;
}

/* Force My Boards title to match Activity title */

.account-main-area .account-board-preview-card .account-section-heading-row h2,
.account-main-area-v2 .account-board-preview-card .account-section-heading-row h2,
.account-board-preview-card .account-section-heading-row > h2,
.account-board-preview-card-top .account-section-heading-row > h2 {
    font-size: 34px !important;
    line-height: 1.05 !important;
    letter-spacing: -0.8px !important;
    font-weight: 800 !important;
    font-family: Arial, sans-serif !important;

    margin: 0 !important;
    text-align: center !important;
}

@media (max-width: 560px) {
    .account-main-area .account-board-preview-card .account-section-heading-row h2,
    .account-main-area-v2 .account-board-preview-card .account-section-heading-row h2,
    .account-board-preview-card .account-section-heading-row > h2,
    .account-board-preview-card-top .account-section-heading-row > h2 {
        font-size: 30px !important;
        line-height: 1.05 !important;
        font-weight: 800 !important;
    }
}

/* Make My Boards and Activity match exactly, slightly lighter */

.account-dashboard-page .account-main-area .account-board-preview-card .account-section-heading-row > h2,
.account-dashboard-page .account-main-area-v2 .account-board-preview-card .account-section-heading-row > h2,
.account-dashboard-page .account-main-area .account-board-preview-card-top .account-section-heading-row > h2,
.account-dashboard-page .account-main-area-v2 .account-board-preview-card-top .account-section-heading-row > h2,
.account-dashboard-page .account-main-area .account-activity-heading-row > h2,
.account-dashboard-page .account-main-area-v2 .account-activity-heading-row > h2 {
    font-family: Arial, sans-serif !important;
    font-size: 26px !important;
    line-height: 1.05 !important;
    letter-spacing: -0.8px !important;
    font-weight: 800 !important;

    margin: 0 !important;
    text-align: center !important;
}

@media (max-width: 560px) {
    .account-dashboard-page .account-main-area .account-board-preview-card .account-section-heading-row > h2,
    .account-dashboard-page .account-main-area-v2 .account-board-preview-card .account-section-heading-row > h2,
    .account-dashboard-page .account-main-area .account-board-preview-card-top .account-section-heading-row > h2,
    .account-dashboard-page .account-main-area-v2 .account-board-preview-card-top .account-section-heading-row > h2,
    .account-dashboard-page .account-main-area .account-activity-heading-row > h2,
    .account-dashboard-page .account-main-area-v2 .account-activity-heading-row > h2 {
        font-size: 26px !important;
        line-height: 1.05 !important;
        font-weight: 800 !important;
    }
}

/* Match opened account section titles */

.account-dashboard-page .account-panel > h1,
.account-dashboard-page .account-panel > h2 {
    font-size: 26px !important;
    line-height: 1.05 !important;
    font-weight: 800 !important;
    letter-spacing: -0.4px !important;
    font-family: Arial, sans-serif !important;

    margin-bottom: 24px !important;
    text-align: center !important;
}

/* Reduce spacing under opened account section titles */

.account-dashboard-page .account-panel > h1,
.account-dashboard-page .account-panel > h2 {
    margin-bottom: 10px !important;
}

/* Keep info cards close to the section title */
.account-dashboard-page .account-panel > h1 + .account-info-card,
.account-dashboard-page .account-panel > h2 + .account-info-card {
    margin-top: 0 !important;
}

/* Tighten opened account section spacing */

.account-dashboard-page .account-panel > h1,
.account-dashboard-page .account-panel > h2 {
    margin-bottom: 12px !important;
}

/* Reduce the empty buffer at the top of the opened section cards */
.account-dashboard-page .account-panel .account-info-card {
    padding-top: 22px !important;
}

/* Keep the first row close to the top of the card */
.account-dashboard-page .account-info-card > *:first-child {
    margin-top: 0 !important;
}

/* Force tighter spacing in opened account sections */

#accountPanelPersonal.account-panel.active,
#accountPanelAccount.account-panel.active,
#accountPanelNotifications.account-panel.active,
#accountPanelPrivacy.account-panel.active,
#accountPanelShare.account-panel.active,
#accountPanelDelete.account-panel.active {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;

    gap: 23px !important;
    row-gap: 23px !important;
}

#accountPanelPersonal.account-panel > h1,
#accountPanelAccount.account-panel > h1,
#accountPanelNotifications.account-panel > h1,
#accountPanelPrivacy.account-panel > h1,
#accountPanelShare.account-panel > h1,
#accountPanelDelete.account-panel > h1 {
    margin: 0 !important;
    padding: 0 !important;

    font-size: 26px !important;
    line-height: 1.05 !important;
    font-weight: 800 !important;
}

#accountPanelPersonal.account-panel > .account-info-card,
#accountPanelAccount.account-panel > .account-info-card,
#accountPanelNotifications.account-panel > .account-info-card,
#accountPanelPrivacy.account-panel > .account-info-card,
#accountPanelShare.account-panel > .account-info-card,
#accountPanelDelete.account-panel > .account-info-card {
    margin-top: 0 !important;
    padding-top: 22px !important;
}

#accountPanelPersonal.account-panel > .account-info-card > *:first-child,
#accountPanelAccount.account-panel > .account-info-card > *:first-child,
#accountPanelNotifications.account-panel > .account-info-card > *:first-child,
#accountPanelPrivacy.account-panel > .account-info-card > *:first-child,
#accountPanelShare.account-panel > .account-info-card > *:first-child,
#accountPanelDelete.account-panel > .account-info-card > *:first-child {
    margin-top: 0 !important;
}

/* Match Edit picture modal title to account section title styling */

.profile-picture-crop-modal-card h2 {
    font-size: 26px !important;
    line-height: 1.05 !important;
    font-weight: 800 !important;
    letter-spacing: -0.4px !important;
    font-family: Arial, sans-serif !important;

    margin: 0 0 14px !important;
    padding: 0 !important;

    text-align: center !important;
}

/* Global modal/card title styling */

.delete-modal-card > h1,
.delete-modal-card > h2,

.profile-picture-crop-modal-card > h1,
.profile-picture-crop-modal-card > h2,

.account-details-modal-card > h1,
.account-details-modal-card > h2,

.change-password-modal-card > h1,
.change-password-modal-card > h2,

.account-danger-modal-card > h1,
.account-danger-modal-card > h2,

.create-board-modal-card > h1,
.create-board-modal-card > h2,

.edit-board-modal-card > h1,
.edit-board-modal-card > h2,

.delete-board-modal-card > h1,
.delete-board-modal-card > h2,

.save-product-modal-card > h1,
.save-product-modal-card > h2,

.save-login-modal-card > h1,
.save-login-modal-card > h2,

.save-duplicate-modal-card > h1,
.save-duplicate-modal-card > h2,

.edit-product-modal-card > h1,
.edit-product-modal-card > h2,

.delete-product-modal-card > h1,
.delete-product-modal-card > h2,

.filter-modal-card > h1,
.filter-modal-card > h2,
.filters-modal-card > h1,
.filters-modal-card > h2,

.login-card > h1,
.login-card > h2,

.signup-card > h1,
.signup-card > h2,

.auth-card > h1,
.auth-card > h2,

.auth-form-card > h1,
.auth-form-card > h2 {
    font-size: 26px !important;
    line-height: 1.05 !important;
    font-weight: 800 !important;
    letter-spacing: -0.4px !important;
    font-family: Arial, sans-serif !important;

    margin: 0 0 14px !important;
    padding: 0 !important;

    text-align: center !important;
}

/* Force consistent title styling across all popup cards */

body .delete-modal .delete-modal-card > h1,
body .delete-modal .delete-modal-card > h2,

body #editBoardModal .delete-modal-card > h1,
body #editBoardModal .delete-modal-card > h2,
body #deleteBoardModal .delete-modal-card > h1,
body #deleteBoardModal .delete-modal-card > h2,
body #createBoardModal .delete-modal-card > h1,
body #createBoardModal .delete-modal-card > h2,

body #saveProductModal .delete-modal-card > h1,
body #saveProductModal .delete-modal-card > h2,
body #editProductModal .delete-modal-card > h1,
body #editProductModal .delete-modal-card > h2,
body #editPictureModal .delete-modal-card > h1,
body #editPictureModal .delete-modal-card > h2,
body #deleteModal .delete-modal-card > h1,
body #deleteModal .delete-modal-card > h2,

body #profilePictureModal .delete-modal-card > h1,
body #profilePictureModal .delete-modal-card > h2,
body #accountDetailsModal .delete-modal-card > h1,
body #accountDetailsModal .delete-modal-card > h2,
body #changePasswordModal .delete-modal-card > h1,
body #changePasswordModal .delete-modal-card > h2,
body #deleteAccountModal .delete-modal-card > h1,
body #deleteAccountModal .delete-modal-card > h2,

body .auth-modal .auth-modal-card > h1,
body .auth-modal .auth-modal-card > h2,
body .auth-modal .auth-modal-card .auth-modal-scroll > h1,
body .auth-modal .auth-modal-card .auth-modal-scroll > h2,

body #loginModal .auth-modal-card > h1,
body #loginModal .auth-modal-card > h2,
body #signupModal .auth-modal-card > h1,
body #signupModal .auth-modal-card > h2,
body #signupModal .auth-modal-scroll > h1,
body #signupModal .auth-modal-scroll > h2,
body #boardsLoginPromptModal .auth-modal-card > h1,
body #boardsLoginPromptModal .auth-modal-card > h2,
body #saveLoginPromptModal .auth-modal-card > h1,
body #saveLoginPromptModal .auth-modal-card > h2,

body .filter-modal .filter-card h1,
body .filter-modal .filter-card h2,
body #filterModal .filter-card h1,
body #filterModal .filter-card h2 {
    font-size: 26px !important;
    line-height: 1.05 !important;
    font-weight: 800 !important;
    letter-spacing: -0.4px !important;
    font-family: Arial, sans-serif !important;

    margin: 0 0 14px !important;
    padding: 0 !important;

    text-align: center !important;
}

/* FINAL override: all popup/card titles */

html body .delete-modal-card h1,
html body .delete-modal-card h2,
html body .delete-modal-card h3,

html body .auth-modal-card h1,
html body .auth-modal-card h2,
html body .auth-modal-card h3,

html body .auth-card h1,
html body .auth-card h2,
html body .auth-card h3,

html body .filter-card h1,
html body .filter-card h2,
html body .filter-card h3,

html body .modal-card h1,
html body .modal-card h2,
html body .modal-card h3,

html body .popup-card h1,
html body .popup-card h2,
html body .popup-card h3 {
    font-size: 26px !important;
    line-height: 1.05 !important;
    font-weight: 800 !important;
    letter-spacing: -0.4px !important;
    font-family: Arial, sans-serif !important;

    margin-top: 0 !important;
    margin-bottom: 14px !important;
    padding: 0 !important;

    text-align: center !important;
}

/* Final modal/card title override using the real modal IDs/classes */

/* Product + board + account modal titles */
html body #editProductModal.delete-modal .delete-modal-card h2,
html body #editPictureModal.delete-modal .delete-modal-card h2,
html body #deleteModal.delete-modal .delete-modal-card h2,
html body #editBoardModal.delete-modal .delete-modal-card h2,
html body #deleteBoardModal.delete-modal .delete-modal-card h2,
html body #createBoardModal.delete-modal .delete-modal-card h2,
html body #saveProductModal.delete-modal .delete-modal-card h2,
html body #profilePictureModal.delete-modal .delete-modal-card h2,
html body #accountDetailsModal.delete-modal .delete-modal-card h2,
html body #changePasswordModal.delete-modal .delete-modal-card h2,
html body #deleteAccountModal.delete-modal .delete-modal-card h2,
html body #recentLoginsModal.delete-modal .delete-modal-card h2,

/* Fallback for any other delete-style modal card */
html body .delete-modal .delete-modal-card h1,
html body .delete-modal .delete-modal-card h2,

/* Auth modal titles */
html body #loginModal.auth-modal .auth-modal-card h1,
html body #signupModal.auth-modal .auth-modal-card h1,
html body #boardsLoginPromptModal.auth-modal .auth-modal-card h1,
html body #saveLoginPromptModal.auth-modal .auth-modal-card h1,
html body #loginModal.auth-modal .auth-modal-scroll h1,
html body #signupModal.auth-modal .auth-modal-scroll h1,

/* Fallback for any other auth modal */
html body .auth-modal .auth-modal-card h1,
html body .auth-modal .auth-modal-card h2,
html body .auth-modal .auth-modal-scroll h1,
html body .auth-modal .auth-modal-scroll h2,

/* Normal login/signup page cards */
html body .auth-page .auth-card h1,
html body .auth-page .auth-card h2,
html body .auth-card h1,
html body .auth-card h2,

/* Filter modal titles */
html body #filterModal.filter-modal .filter-card h1,
html body #filterModal.filter-modal .filter-card h2,
html body .filter-modal .filter-card h1,
html body .filter-modal .filter-card h2 {
    font-size: 26px !important;
    line-height: 1.05 !important;
    font-weight: 800 !important;
    letter-spacing: -0.4px !important;
    font-family: Arial, sans-serif !important;

    margin-top: 0 !important;
    margin-bottom: 14px !important;
    padding: 0 !important;

    text-align: center !important;
}

/* Exact title styling for Explore, Login, Signup popup/card titles */

html body #filterModal.filter-modal .filter-card form > h2,
html body #filterModal.filter-modal .filter-card h2,

html body #saveProductModal.delete-modal .delete-modal-card > h2,
html body #createBoardModal.delete-modal .delete-modal-card > h2,

html body #saveLoginPromptModal.auth-modal .auth-modal-card > h1,
html body #boardsLoginPromptModal.auth-modal .auth-modal-card > h1,
html body #loginModal.auth-modal .auth-modal-card > h1,
html body #signupModal.auth-modal .auth-modal-card > h1,
html body #signupModal.auth-modal .auth-modal-scroll > h1,

html body main.auth-page .auth-card > h1,
html body .auth-page .auth-card > h1,
html body .auth-card > h1 {
    font-size: 26px !important;
    line-height: 1.05 !important;
    font-weight: 800 !important;
    letter-spacing: -0.4px !important;
    font-family: Arial, sans-serif !important;

    margin-top: 0 !important;
    margin-bottom: 14px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;

    text-align: center !important;
}

/* Make login/signup modal titles all caps */

#loginModal.auth-modal .auth-modal-card > h1,
#signupModal.auth-modal .auth-modal-card > h1,
#signupModal.auth-modal .auth-modal-scroll > h1 {
    text-transform: uppercase !important;
}
/* Make all login-required prompt titles all caps */

#loginModal.auth-modal .auth-modal-card > h1,
#signupModal.auth-modal .auth-modal-card > h1,
#signupModal.auth-modal .auth-modal-scroll > h1,
#saveLoginPromptModal.auth-modal .auth-modal-card > h1,
#boardsLoginPromptModal.auth-modal .auth-modal-card > h1 {
    text-transform: uppercase !important;
}

/* Match login/signup and login-required modal titles */

#loginModal.auth-modal .auth-modal-card > h1,
#signupModal.auth-modal .auth-modal-card > h1,
#signupModal.auth-modal .auth-modal-scroll > h1,
#saveLoginPromptModal.auth-modal .auth-modal-card > h1,
#boardsLoginPromptModal.auth-modal .auth-modal-card > h1 {
    font-size: 26px !important;
    line-height: 1.05 !important;
    font-weight: 800 !important;
    letter-spacing: -0.4px !important;
    font-family: Arial, sans-serif !important;

    text-transform: uppercase !important;
    text-align: center !important;

    margin-top: 0 !important;
    margin-bottom: 14px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Make signup modal spacing match login modal */

#signupModal .signup-modal-card {
    position: relative !important;
    padding: 0 !important;
    overflow: hidden !important;
}

#signupModal .auth-modal-scroll {
    max-height: calc(100vh - 96px) !important;
    overflow-y: auto !important;

    padding: 34px 42px 42px !important;
}

#signupModal .auth-modal-back {
    position: absolute !important;
    top: 22px !important;
    left: 38px !important;
    z-index: 5 !important;
}

#signupModal .auth-modal-scroll > h1 {
    margin-top: 0 !important;
    margin-bottom: 14px !important;

    font-size: 26px !important;
    line-height: 1.05 !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;

    text-align: center !important;
}

#signupModal .auth-modal-scroll > p {
    margin: 0 0 32px !important;

    text-align: center !important;
}

/* Keep the scrollbar neat */
#signupModal .auth-modal-scroll::-webkit-scrollbar {
    width: 8px;
}

#signupModal .auth-modal-scroll::-webkit-scrollbar-thumb {
    background: rgba(31, 31, 31, 0.28);
    border-radius: 999px;
}

/* Explore page title — larger version of modal/account title style */


/* Explore page title — larger version of modal/account title style */

.explore-header h1 {
    font-size: 42px !important;
    line-height: 1.05 !important;
    font-weight: 800 !important;
    letter-spacing: -0.8px !important;
    font-family: Arial, sans-serif !important;

    margin: 0 0 14px !important;
    text-align: center !important;
}

/* My Boards page title — match Explore title style */

.boards-header h1 {
    font-size: 42px !important;
    line-height: 1.05 !important;
    font-weight: 800 !important;
    letter-spacing: -0.8px !important;
    font-family: Arial, sans-serif !important;

    margin: 0 !important;
    text-align: center !important;
}

/* Recent logins modal */

.recent-logins-modal-card {
    max-width: 480px !important;
}

.recent-logins-list {
    width: 100% !important;

    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;

    margin: 18px 0 24px !important;
}

.recent-login-row {
    width: 100% !important;

    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 18px !important;

    padding: 14px 16px !important;

    background: #f8f5f0 !important;
    border-radius: 18px !important;

    text-align: left !important;
}

.recent-login-row strong {
    display: block !important;

    color: #1f1f1f !important;

    font-size: 15px !important;
    font-weight: 800 !important;
}

.recent-login-row span {
    display: block !important;

    color: #8a7f73 !important;

    font-size: 13px !important;
    font-weight: 800 !important;
}

.recent-login-row p {
    margin: 0 !important;

    color: #68615a !important;

    font-size: 13px !important;
    font-weight: 800 !important;

    text-align: right !important;
    word-break: break-word !important;
}

@media (max-width: 560px) {
    .recent-login-row {
        align-items: flex-start !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    .recent-login-row p {
        text-align: left !important;
    }
}

/* Recent login rows */

.recent-login-row {
    width: 100% !important;

    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 18px !important;

    padding: 18px 24px !important;

    background: #f8f5f0 !important;
    border-radius: 18px !important;

    text-align: left !important;
}

.recent-login-time-block {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
}

.recent-login-row strong {
    margin: 0 !important;

    color: #1f1f1f !important;

    font-size: 16px !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;
}

.recent-login-row span {
    margin-top: 4px !important;

    color: #8a7f73 !important;

    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;
}

.recent-login-ip {
    margin: 0 !important;

    color: #68615a !important;

    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;

    text-align: right !important;
}

/* Scrollable recent logins modal */

/* Recent logins modal: only inner list scrolls */

.recent-logins-modal-card {
    max-width: 520px !important;
    max-height: calc(100vh - 72px) !important;

    overflow: hidden !important;
    overscroll-behavior: contain !important;
}

.recent-logins-list {
    max-height: 520px !important;
    overflow-y: auto !important;

    padding-right: 8px !important;
}

.recent-logins-list {
    max-height: 420px !important;
    overflow-y: auto !important;

    padding-right: 6px !important;
}

/* Match Recent logins modal title to other modal/account titles */

#recentLoginsModal .recent-logins-modal-card > h2 {
    font-size: 26px !important;
    line-height: 1.05 !important;
    font-weight: 800 !important;
    letter-spacing: -0.4px !important;
    font-family: Arial, sans-serif !important;

    margin-top: 0 !important;
    margin-bottom: 24px !important;
    padding: 0 !important;

    text-align: center !important;
    text-transform: uppercase !important;
}

/* Match left account card height to right dashboard area */

.account-dashboard-page-v2 {
    align-items: stretch !important;
}

.account-sidebar-card-v2 {
    min-height: 680px !important;

    display: flex !important;
    flex-direction: column !important;
}

.account-sidebar-nav-card {
    flex: 1 !important;

    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

.account-sidebar-nav {
    height: 100% !important;

    display: flex !important;
    flex-direction: column !important;
    justify-content: space-evenly !important;

    gap: 0 !important;
}

/* Keep names neat with the new spacing */
.account-sidebar-link {
    margin: 0 !important;
}


/* Mobile/touch Explore long-press save reveal */

body.touch-save-enabled .explore-page .product-link,
body.touch-save-enabled .explore-page .product-card,
body.touch-save-enabled .explore-page .product-card * {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

body.touch-save-enabled .explore-page .product-card img {
    pointer-events: none !important;
    -webkit-user-drag: none !important;
    -webkit-touch-callout: none !important;
}

body.touch-save-enabled .explore-page .product-card .save-product-button {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(6px) !important;
    transition: opacity 0.18s ease, transform 0.18s ease !important;
}

body.touch-save-enabled .explore-page .product-card.touch-save-active .save-product-button {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
}

/* Recent logins modal close button fix */

#recentLoginsModal .recent-logins-modal-card {
    max-height: calc(100vh - 80px) !important;
    overflow: hidden !important;

    display: flex !important;
    flex-direction: column !important;
}

#recentLoginsModal .recent-logins-list {
    flex: 1 1 auto !important;
    min-height: 0 !important;

    overflow-y: auto !important;

    margin-bottom: 18px !important;
    padding-right: 8px !important;
}

#recentLoginsModal .recent-logins-close-button {
    flex: 0 0 auto !important;

    display: block !important;
    width: 100% !important;

    margin-top: 0 !important;
}

/* Explore save success tick */
/* Hide Save/Saved hover button while success tick is showing */
.explore-page .product-card.save-success-active .save-product-button {
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

.save-success-tick {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 35;

    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #1f1f1f;
    color: white;

    font-size: 18px;
    font-weight: 900;
    line-height: 1;

    opacity: 0;
    transform: scale(0.75);

    pointer-events: none;

    animation: saveTickPop 1.15s ease forwards;
}

@keyframes saveTickPop {
    0% {
        opacity: 0;
        transform: scale(0.75);
    }

    18% {
        opacity: 1;
        transform: scale(1.08);
    }

    32% {
        transform: scale(1);
    }

    78% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(0.85);
    }
}

/* Pinterest-style masonry Explore layout */

.explore-page .wishlist-grid {
    display: block !important;

    column-count: 4 !important;
    column-gap: 24px !important;

    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 20px 32px 80px !important;
}

.explore-page .product-link {
    display: inline-block !important;

    width: 100% !important;
    margin: 0 0 24px !important;

    break-inside: avoid !important;
    -webkit-column-break-inside: avoid !important;
    page-break-inside: avoid !important;
}

.explore-page .product-card {
    width: 100% !important;
    display: block !important;
}

.explore-page .product-card img {
    width: 100% !important;
    height: auto !important;

    display: block !important;

    object-fit: contain !important;
}

@media (max-width: 1100px) {
    .explore-page .wishlist-grid {
        column-count: 3 !important;
    }
}

@media (max-width: 800px) {
    .explore-page .wishlist-grid {
        column-count: 2 !important;
        column-gap: 18px !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .explore-page .product-link {
        margin-bottom: 18px !important;
    }
}

@media (max-width: 560px) {
    .explore-page .wishlist-grid {
        column-count: 2 !important;
        column-gap: 16px !important;
        padding: 10px 0 60px !important;
    }

    .explore-page .product-link {
        margin-bottom: 16px !important;
    }
}

/* Filtered/search Explore: masonry look, but fills left-to-right */
.explore-page .wishlist-grid.wishlist-grid-filtered-masonry {
    column-count: initial !important;
    column-gap: initial !important;

    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
    grid-auto-rows: 8px !important;

    row-gap: 28px !important;
    column-gap: 28px !important;

    align-items: start !important;
    position: relative !important;
    z-index: 1 !important;
}

.explore-page .wishlist-grid.wishlist-grid-filtered-masonry .product-link {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;

    break-inside: auto !important;
    page-break-inside: auto !important;
    box-sizing: border-box !important;
}

.explore-page .wishlist-grid.wishlist-grid-filtered-masonry .product-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.explore-page .wishlist-grid.wishlist-grid-filtered-masonry .product-card img {
    width: 100% !important;
    display: block !important;
}



























/* Move the sticky Explore search/filter bar upward */
.explore-search-row {
    top: 84px !important;
    z-index: 9000 !important;
}

/* Prevent product cards from sliding too high behind the sticky search bar */
.explore-page {
    padding-top: 18px !important;
}

/* Final navbar spacing + underline tuning */
body {
    background: #ffffff !important;
}









/* Account preferred currency dropdown */
.account-currency-row {
    position: relative;
    overflow: visible !important;
}

.account-currency-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: auto;
}

.account-currency-button {
    border: none;
    background: transparent;
    cursor: pointer;

    display: flex;
    align-items: center;
    gap: 8px;

    font-size: 14px;
    font-weight: 700;
    color: #000000;

    padding: 8px 10px;
    border-radius: 999px;
}

.account-currency-button:hover {
    background: rgba(0, 0, 0, 0.06);
}

.account-currency-symbol {
    font-size: 16px;
    line-height: 1;
    color: #000000;
    font-weight: 700;
    white-space: nowrap;
}

.account-currency-code {
    font-size: 13px;
    line-height: 1;
    color: #000000;
    font-weight: 700;
}

.account-currency-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;

    min-width: 120px;
    padding: 8px;

    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.16);

    /* 10 currencies (was 5) no longer fit without scrolling - caps how
       far the dropdown can push down the page instead of growing to
       fit every option. Scrollbar styling matches
       .nav-notifications-dropdown's own thin/subtle treatment. */
    max-height: 260px;
    overflow-y: auto;

    scrollbar-width: thin;
    scrollbar-color: #c4c4c4 transparent;

    display: none;
    z-index: 9999;
}

.account-currency-dropdown::-webkit-scrollbar {
    width: 6px;
}

.account-currency-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.account-currency-dropdown::-webkit-scrollbar-thumb {
    background: #c4c4c4;
    border-radius: 8px;
}

.account-currency-menu.open .account-currency-dropdown {
    display: block;
}

.account-currency-option {
    width: 100%;
    border: none;
    background: transparent;
    cursor: pointer;

    text-align: left;
    padding: 9px 10px;
    border-radius: 10px;

    font-size: 13px;
    font-weight: 600;
    color: #000000;
}

.account-currency-option:hover {
    background: rgba(0, 0, 0, 0.06);
}

.account-info-card {
    overflow: visible !important;
}

/* Account currency button only */
.account-currency-button,
.account-currency-button span,
.account-currency-button svg {
    color: #000000 !important;
    stroke: #000000 !important;
}

.account-currency-option {
    color: #000000 !important;
}



/* Cool grey/white scrollbar */
html {
    scrollbar-color: #bfc3c7 #ffffff;
    scrollbar-width: thin;
}

/* Chrome, Edge, Safari */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #ffffff;
}

::-webkit-scrollbar-thumb {
    background: #bfc3c7;
    border-radius: 999px;
    border: 2px solid #ffffff;
}

::-webkit-scrollbar-thumb:hover {
    background: #aeb3b8;
}

/* Final cool grey/white page scrollbar */
html,
body {
    scrollbar-color: #b8bdc3 #ffffff !important;
    scrollbar-width: thin !important;
}

/* Chrome, Edge, Safari page scrollbar */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
    width: 12px !important;
    height: 12px !important;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
    background: #ffffff !important;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
    background-color: #b8bdc3 !important;
    border-radius: 999px !important;
    border: 3px solid #ffffff !important;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover {
    background-color: #9fa6ad !important;
}

/* Clean grey/white Explore search bar */
.explore-search-row {
    background: #f5f6f7 !important;
    border: 1px solid #e1e4e8 !important;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.06) !important;
}

.explore-search-row input {
    background: #ffffff !important;
    border: 1px solid #d9dde2 !important;
    color: #111111 !important;
}

.explore-search-row input::placeholder {
    color: #7b828a !important;
}

.filter-icon-button {
    background: #1f1f1f !important;
    color: #ffffff !important;
}

.filter-icon-button:hover {
    background: #000000 !important;
}

/* Soft neutral search bars: Explore, My Boards, Board Detail */
.explore-search-row,
.boards-search-row,
.board-search-row,
.board-detail-search-row,
.board-detail-controls,
.product-search-row {
    background: #f3f3f2 !important;
    border: 1px solid #ddddda !important;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.05) !important;
}

/* Search inputs inside those bars */
.explore-search-row input,
.boards-search-row input,
.board-search-row input,
.board-detail-search-row input,
.board-detail-controls input,
.product-search-row input {
    background: #ffffff !important;
    border: 1px solid #d6d6d3 !important;
    color: #111111 !important;
}

/* Placeholder text */
.explore-search-row input::placeholder,
.boards-search-row input::placeholder,
.board-search-row input::placeholder,
.board-detail-search-row input::placeholder,
.board-detail-controls input::placeholder,
.product-search-row input::placeholder {
    color: #777772 !important;
}

/* Filter/search buttons */
.filter-icon-button,
.boards-search-row button,
.board-search-row button,
.board-detail-search-row button,
.board-detail-controls button,
.product-search-row button {
    background: #1f1f1f !important;
    color: #ffffff !important;
}

/* Hover state */
.filter-icon-button:hover,
.boards-search-row button:hover,
.board-search-row button:hover,
.board-detail-search-row button:hover,
.board-detail-controls button:hover,
.product-search-row button:hover {
    background: #000000 !important;
}

/* Soft neutral search styling: Explore, My Boards, Board Detail */
.explore-search-row,
.boards-page .search-expand-wrapper,
.board-detail-page .board-product-search-wrapper {
    background: #f3f3f2 !important;
    border: 1px solid #ddddda !important;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.05) !important;
}

/* Inputs */
.explore-search-row input,
.boards-page .search-expand-input,
.board-detail-page .board-product-search-input {
    background: #ffffff !important;
    border: 1px solid #d6d6d3 !important;
    color: #111111 !important;
}

/* Placeholder text */
.explore-search-row input::placeholder,
.boards-page .search-expand-input::placeholder,
.board-detail-page .board-product-search-input::placeholder {
    color: #777772 !important;
}

/* Search/filter buttons */
.filter-icon-button,
.boards-page .search-icon-expand-button,
.board-detail-page .search-icon-expand-button {
    background: #1f1f1f !important;
    color: #ffffff !important;
}

/* Search icon stroke */
.boards-page .search-icon-expand-button svg,
.board-detail-page .search-icon-expand-button svg,
.filter-icon-button svg {
    stroke: #ffffff !important;
}

/* Hover */
.filter-icon-button:hover,
.boards-page .search-icon-expand-button:hover,
.board-detail-page .search-icon-expand-button:hover {
    background: #000000 !important;
}

/* Board Detail full tools/search pill */
.board-detail-page .board-tools-row {
    background: #f3f3f2 !important;
    border: 1px solid #ddddda !important;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.05) !important;
}

/* Board Detail search input */
.board-detail-page .board-tools-row .search-expand-input,
.board-detail-page .board-product-search-input {
    background: #ffffff !important;
    border: 1px solid #d6d6d3 !important;
    color: #111111 !important;
}

/* Board Detail placeholder */
.board-detail-page .board-tools-row .search-expand-input::placeholder,
.board-detail-page .board-product-search-input::placeholder {
    color: #777772 !important;
}

/* Board Detail search button */
.board-detail-page .board-tools-row .search-icon-expand-button {
    background: #1f1f1f !important;
    color: #ffffff !important;
}

/* Board Detail search icon */
.board-detail-page .board-tools-row .search-icon-expand-button svg {
    stroke: #ffffff !important;
}

/* Remove the inner box around Board Detail search */
.board-detail-page .board-tools-row .board-product-search-wrapper,
.board-detail-page .board-tools-row .search-expand-wrapper,
.board-detail-page .board-tools-row .search-expand-form {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Keep only the input itself styled */
.board-detail-page .board-tools-row .search-expand-input,
.board-detail-page .board-product-search-input {
    background: #ffffff !important;
    border: 1px solid #d6d6d3 !important;
    box-shadow: none !important;
}
.new-board-button,
.edit-board-button,
.save-product-button,
.saved-product-button,
.save-to-board-button,
.saved-to-board-button,
.product-save-button,
.product-detail-save-button {
    background: #FFFFFF !important;
    border: 1px solid #ddddda !important;
    color:  #000000 !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.04) !important;
}
.new-board-button svg,
.edit-board-button svg,
.save-product-button svg,
.saved-product-button svg,
.save-to-board-button svg,
.saved-to-board-button svg,
.product-save-button svg,
.product-detail-save-button svg {
    stroke: #111111 !important;
    color: #111111 !important;
}
.new-board-button:hover,
.edit-board-button:hover,
.save-product-button:hover,
.saved-product-button:hover,
.save-to-board-button:hover,
.saved-to-board-button:hover,
.product-save-button:hover,
.product-detail-save-button:hover {
    background: #FFFFFF !important;
    border-color: #d2d2cf !important;
    color: #000000 !important;
}
/* Softer text colour for Save to / Saved to buttons only */
.save-product-button,
.saved-product-button,
.save-to-board-button,
.saved-to-board-button,
.product-save-button,
.product-detail-save-button {
    color: #555555 !important;
}

/* Icons inside Save to / Saved to buttons */
.save-product-button svg,
.saved-product-button svg,
.save-to-board-button svg,
.saved-to-board-button svg,
.product-save-button svg,
.product-detail-save-button svg {
    color: #555555 !important;
    stroke: #555555 !important;
}

/* Slightly darker on hover, but not pure black */
.save-product-button:hover,
.saved-product-button:hover,
.save-to-board-button:hover,
.saved-to-board-button:hover,
.product-save-button:hover,
.product-detail-save-button:hover {
    color: #3f3f3f !important;
}

.save-product-button:hover svg,
.saved-product-button:hover svg,
.save-to-board-button:hover svg,
.saved-to-board-button:hover svg,
.product-save-button:hover svg,
.product-detail-save-button:hover svg {
    color: #3f3f3f !important;
    stroke: #3f3f3f !important;
}

/* Lighter grey text for Save to / Saved to buttons */
.save-product-button,
.saved-product-button,
.save-to-board-button,
.saved-to-board-button,
.product-save-button,
.product-detail-save-button {
    color: #707070 !important;
}

/* Icons inside Save to / Saved to buttons */
.save-product-button svg,
.saved-product-button svg,
.save-to-board-button svg,
.saved-to-board-button svg,
.product-save-button svg,
.product-detail-save-button svg {
    color: #707070 !important;
    stroke: #707070 !important;
}

/* Hover: slightly darker, still not black */
.save-product-button:hover,
.saved-product-button:hover,
.save-to-board-button:hover,
.saved-to-board-button:hover,
.product-save-button:hover,
.product-detail-save-button:hover {
    color: #5f5f5f !important;
}

.save-product-button:hover svg,
.saved-product-button:hover svg,
.save-to-board-button:hover svg,
.product-save-button:hover svg,
.product-detail-save-button:hover svg {
    color: #5f5f5f !important;
    stroke: #5f5f5f !important;
}

/* Product Detail save/edit buttons + small round menu buttons = same grey as search bar */
.product-detail-page .save-product-button,
.product-detail-page .saved-product-button,
.product-detail-page .save-to-board-button,
.product-detail-page .saved-to-board-button,
.product-detail-page .product-save-button,
.product-detail-page .product-detail-save-button,
.product-detail-page .edit-product-button,
.product-detail-page .product-detail-edit-button,
.product-detail-page .product-menu-button,
.boards-page .board-menu-button,
.board-detail-page .product-menu-button {
    background: #f3f3f2 !important;
    border: 1px solid #ddddda !important;
    color: #707070 !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.04) !important;
}

/* Icons inside those grey buttons */
.product-detail-page .save-product-button svg,
.product-detail-page .saved-product-button svg,
.product-detail-page .save-to-board-button svg,
.product-detail-page .saved-to-board-button svg,
.product-detail-page .product-save-button svg,
.product-detail-page .product-detail-save-button svg,
.product-detail-page .edit-product-button svg,
.product-detail-page .product-detail-edit-button svg,
.product-detail-page .product-menu-button svg,
.boards-page .board-menu-button svg,
.board-detail-page .product-menu-button svg {
    stroke: #707070 !important;
    color: #707070 !important;
}

/* Keep Board Detail + Add Product and Edit buttons white */
.board-detail-page .board-tools-actions .new-board-button,
.board-detail-page .board-tools-actions .edit-board-button {
    background: #ffffff !important;
    border: 1px solid #ddddda !important;
    color: #111111 !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.04) !important;
}

/* Keep their text black */
.board-detail-page .board-tools-actions .new-board-button *,
.board-detail-page .board-tools-actions .edit-board-button * {
    color: #111111 !important;
    stroke: #111111 !important;
}

/* Hover states */
.product-detail-page .save-product-button:hover,
.product-detail-page .saved-product-button:hover,
.product-detail-page .save-to-board-button:hover,
.product-detail-page .saved-to-board-button:hover,
.product-detail-page .product-save-button:hover,
.product-detail-page .product-detail-save-button:hover,
.product-detail-page .edit-product-button:hover,
.product-detail-page .product-detail-edit-button:hover,
.product-detail-page .product-menu-button:hover,
.boards-page .board-menu-button:hover,
.board-detail-page .product-menu-button:hover {
    background: #e8e8e6 !important;
    color: #5f5f5f !important;
}

.board-detail-page .board-tools-actions .new-board-button:hover,
.board-detail-page .board-tools-actions .edit-board-button:hover {
    background: #f7f7f7 !important;
    color: #000000 !important;
}

/* Card three-dot menu buttons: no circle, just black dots */
.boards-page .board-menu-button,
.board-detail-page .product-menu-button,
.product-card .product-menu-button,
.board-card .board-menu-button {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #000000 !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    font-size: 26px !important;
    line-height: 1 !important;
}

/* Keep dots black on hover too */
.boards-page .board-menu-button:hover,
.board-detail-page .product-menu-button:hover,
.product-card .product-menu-button:hover,
.board-card .board-menu-button:hover {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #000000 !important;
}

/* Save/+ button on Product Detail: same grey as search bar */
.detail-page .detail-top-actions .detail-save-button {
    background: #f3f3f2 !important;
    border: 1px solid #ddddda !important;
    color: #707070 !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.04) !important;

    border-radius: 999px !important;
}

/* Save/+ hover */
.detail-page .detail-top-actions .detail-save-button:hover {
    background: #e8e8e6 !important;
    border-color: #d2d2cf !important;
    color: #5f5f5f !important;
}
.detail-page .detail-top-actions .detail-save-button {
    background: #f3f3f2 !important;
    border: 1px solid #ddddda !important;
    color: #000000 !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.04) !important;

    width: 72px !important;
    height: 72px !important;
    min-width: 72px !important;
    min-height: 72px !important;

    border-radius: 999px !important;
    padding: 0 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    font-size: 30px !important;
    line-height: 1 !important;
}
.detail-page .detail-top-actions .detail-save-button,
.detail-page .detail-top-actions .detail-save-button * {
    color: #000000 !important;
    stroke: #000000 !important;
}
.detail-page .detail-top-actions .detail-save-button:hover {
    background: #e8e8e6 !important;
    border-color: #d2d2cf !important;
    color: #000000 !important;
}
.detail-page .detail-top-actions .detail-save-button{
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
    min-height: 56px !important;

    border-radius: 999px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: #f3f3f2 !important;
    border: 1px solid #ddddda !important;
    color: #000000 !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.04) !important;

    padding: 0 !important;
    line-height: 1 !important;
}
.detail-page .detail-top-actions .detail-save-button {
    font-size: 28px !important;
}
.detail-page .detail-top-actions .detail-save-button *{
    color: #000000 !important;
    stroke: #000000 !important;
}

/* Move My Boards title closer to navbar */
.boards-page {
    padding-top: 20px !important;
}

.boards-page .boards-header {
    margin-top: 0 !important;
    padding-top: 0 !important;
    margin-bottom: 34px !important;
}

.boards-page .boards-header h1 {
    margin-top: 0 !important;
}

/* Move Board Detail title closer to navbar */
.board-detail-page {
    padding-top: 20px !important;
}

.board-detail-page .board-detail-header {
    margin-top: 0 !important;
    padding-top: 0 !important;
    margin-bottom: 28px !important;
}

.board-detail-page .board-detail-header h1 {
    margin-top: 0 !important;
}



















/* Smaller page titles: Explore + My Boards */
.explore-page h1,
.boards-page .boards-header h1 {
    font-size: 34px !important;
    letter-spacing: 0.05em !important;
    line-height: 1.05 !important;
}

/* Make Explore + My Boards search bars same width */
.explore-search-row,
.boards-page #boardsSearchWrapper {
    width: min(760px, calc(100% - 48px)) !important;
    max-width: 760px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Match distance between My Boards title and search bar */
.boards-page .boards-header {
    margin-bottom: 22px !important;
}

/* Remove extra spacing on the My Boards search wrapper */
.boards-page #boardsSearchWrapper {
    margin-top: 0 !important;
    margin-bottom: 42px !important;
}

.boards-page #boardsSearchWrapper .search-expand-form {
    width: 100% !important;
}

.boards-page #boardsSearchWrapper .search-expand-input {
    width: 100% !important;
    flex: 1 !important;
}

/* Equal Explore + My Boards search bar layout */
.explore-search-row,
.boards-page #boardsSearchWrapper {
    width: min(1230px, calc(100% - 88px)) !important;
    max-width: 1230px !important;
    min-height: 82px !important;

    margin-left: auto !important;
    margin-right: auto !important;

    display: flex !important;
    align-items: center !important;

    padding: 12px 14px 12px 28px !important;
    gap: 14px !important;

    background: #f3f3f2 !important;
    border: 1px solid #ddddda !important;
    border-radius: 999px !important;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.05) !important;
}

/* My Boards form must fill the whole wrapper */
.boards-page #boardsSearchWrapper .search-expand-form {
    width: 100% !important;
    max-width: none !important;

    display: flex !important;
    align-items: center !important;
    gap: 14px !important;

    margin: 0 !important;
    padding: 0 !important;

    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Inner white input: stretch properly on both pages */
.explore-search-row input,
.boards-page #boardsSearchWrapper .search-expand-input {
    flex: 1 1 auto !important;

    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    height: 58px !important;

    margin: 0 !important;
    padding: 0 28px !important;

    background: #ffffff !important;
    border: 1px solid #d6d6d3 !important;
    border-radius: 999px !important;

    color: #111111 !important;
    font-size: 19px !important;
}

/* Right icon button: fixed at far right */
.explore-search-row .filter-icon-button,
.boards-page #boardsSearchWrapper .search-icon-expand-button {
    flex: 0 0 58px !important;

    width: 58px !important;
    height: 58px !important;
    min-width: 58px !important;
    min-height: 58px !important;

    margin: 0 !important;
    padding: 0 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: #1f1f1f !important;
    border: none !important;
    border-radius: 999px !important;

    color: #ffffff !important;
}

/* Icon size/colour */
.explore-search-row .filter-icon-button svg,
.boards-page #boardsSearchWrapper .search-icon-expand-button svg {
    width: 23px !important;
    height: 23px !important;
    stroke: #ffffff !important;
}

/* Placeholder */

/* Final search bar sizing: Explore + My Boards */
.explore-search-row,
.boards-page #boardsSearchWrapper {
    width: min(900px, calc(100% - 70px)) !important;
    max-width: 900px !important;
    min-height: 66px !important;

    padding: 8px 10px 8px 10px !important;
    gap: 10px !important;

    display: flex !important;
    align-items: center !important;

    background: #f3f3f2 !important;
    border: 1px solid #ddddda !important;
    border-radius: 999px !important;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.05) !important;
}

/* My Boards inner form */
.boards-page #boardsSearchWrapper .search-expand-form {
    width: 100% !important;
    max-width: none !important;
    height: 50px !important;

    display: flex !important;
    align-items: center !important;
    gap: 10px !important;

    margin: 0 !important;
    padding: 0 !important;

    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Inner input: smaller, more evenly wrapped */
.explore-search-row input,
.boards-page #boardsSearchWrapper .search-expand-input {
    flex: 1 1 auto !important;

    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    height: 50px !important;

    margin: 0 !important;
    padding: 0 24px !important;

    background: #ffffff !important;
    border: 1px solid #d6d6d3 !important;
    border-radius: 999px !important;

    color: #111111 !important;
    font-size: 18px !important;
}

/* Right icon button: matching height */
.explore-search-row .filter-icon-button,
.boards-page #boardsSearchWrapper .search-icon-expand-button {
    flex: 0 0 50px !important;

    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    min-height: 50px !important;

    margin: 0 !important;
    padding: 0 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: #1f1f1f !important;
    border: none !important;
    border-radius: 999px !important;

    color: #ffffff !important;
}

/* Icons */
.explore-search-row .filter-icon-button svg,
.boards-page #boardsSearchWrapper .search-icon-expand-button svg {
    width: 21px !important;
    height: 21px !important;
    stroke: #ffffff !important;
}

/* Placeholder */
.explore-search-row input::placeholder,
.boards-page #boardsSearchWrapper .search-expand-input::placeholder {
    color: #777772 !important;
}

/* Board Detail tools row: balanced layout */
.board-detail-page .board-tools-row {
    width: min(1680px, calc(100% - 88px)) !important;
    max-width: 1680px !important;

    margin-left: auto !important;
    margin-right: auto !important;

    min-height: 76px !important;

    padding: 10px 16px !important;

    display: grid !important;
    grid-template-columns: minmax(250px, 1fr) minmax(520px, 760px) minmax(250px, 1fr) !important;
    align-items: center !important;
    column-gap: 28px !important;

    background: #f3f3f2 !important;
    border: 1px solid #ddddda !important;
    border-radius: 999px !important;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.05) !important;
}

/* Left hide-purchased section */
.board-detail-page .board-tools-purchased {
    justify-self: start !important;

    margin: 0 !important;
    padding-left: 26px !important;

    display: flex !important;
    align-items: center !important;
}

/* Centre search wrapper */
.board-detail-page .desktop-board-search {
    justify-self: center !important;

    width: 100% !important;
    max-width: 760px !important;

    margin: 0 !important;
}

/* Search form */
.board-detail-page .desktop-board-search .search-expand-form {
    width: 100% !important;

    display: flex !important;
    align-items: center !important;
    gap: 10px !important;

    margin: 0 !important;
    padding: 0 !important;

    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Right action section */
.board-detail-page .board-tools-actions {
    justify-self: end !important;

    display: flex !important;
    align-items: center !important;
    gap: 14px !important;

    margin: 0 !important;
    padding-right: 0 !important;
}

/* Keep Add Product and Edit white */
.board-detail-page .board-tools-actions .new-board-button,
.board-detail-page .board-tools-actions .edit-board-button {
    height: 50px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: #ffffff !important;
    border: 1px solid #ddddda !important;
    border-radius: 999px !important;

    color: #111111 !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.04) !important;
}

/* Board Detail tools row: same height/style as Explore + My Boards */
.board-detail-page .board-tools-row {
    width: min(1080px, calc(100% - 70px)) !important;
    max-width: 1080px !important;
    min-height: 66px !important;

    margin-left: auto !important;
    margin-right: auto !important;

    padding: 8px 10px !important;
    gap: 10px !important;

    display: flex !important;
    align-items: center !important;

    background: #f3f3f2 !important;
    border: 1px solid #ddddda !important;
    border-radius: 999px !important;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.05) !important;
}

/* Hide purchased section */
.board-detail-page .board-tools-purchased {
    flex: 0 0 auto !important;

    margin: 0 !important;
    padding: 0 16px 0 18px !important;

    display: flex !important;
    align-items: center !important;
    white-space: nowrap !important;

    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Search wrapper fills the middle */
.board-detail-page .desktop-board-search {
    flex: 1 1 auto !important;

    width: auto !important;
    max-width: none !important;
    min-width: 260px !important;

    margin: 0 !important;
    padding: 0 !important;

    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Search form */
.board-detail-page .desktop-board-search .search-expand-form {
    width: 100% !important;
    height: 50px !important;

    display: flex !important;
    align-items: center !important;
    gap: 10px !important;

    margin: 0 !important;
    padding: 0 !important;

    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Search input */
.board-detail-page .desktop-board-search .board-product-search-input {
    flex: 1 1 auto !important;

    width: auto !important;
    min-width: 0 !important;
    height: 50px !important;

    margin: 0 !important;
    padding: 0 24px !important;

    background: #ffffff !important;
    border: 1px solid #d6d6d3 !important;
    border-radius: 999px !important;

    color: #111111 !important;
    font-size: 18px !important;
}

/* Search icon */
.board-detail-page .desktop-board-search .search-icon-expand-button {
    flex: 0 0 50px !important;

    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    min-height: 50px !important;

    margin: 0 !important;
    padding: 0 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: #1f1f1f !important;
    border: none !important;
    border-radius: 999px !important;

    color: #ffffff !important;
}

/* Right-side buttons stay inside wrapper */
.board-detail-page .board-tools-actions {
    flex: 0 0 auto !important;

    display: flex !important;
    align-items: center !important;
    gap: 10px !important;

    margin: 0 !important;
    padding: 0 !important;

    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Add Product + Edit buttons */
.board-detail-page .board-tools-actions .new-board-button,
.board-detail-page .board-tools-actions .edit-board-button {
    height: 50px !important;
    min-height: 50px !important;

    padding: 0 22px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: #ffffff !important;
    border: 1px solid #ddddda !important;
    border-radius: 999px !important;

    color: #111111 !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.04) !important;

    white-space: nowrap !important;
}

/* Search icon SVG */
.board-detail-page .desktop-board-search .search-icon-expand-button svg {
    width: 21px !important;
    height: 21px !important;
    stroke: #ffffff !important;
}

/* Move Board Detail title/back button higher */
.board-detail-page {
    padding-top: 8px !important;
}

/* Board title row closer to navbar */
.board-detail-page .board-detail-header {
    margin-top: 0 !important;
    margin-bottom: 15px !important;
    padding-top: 0 !important;
}

/* Board title itself */
.board-detail-page .board-detail-header h1 {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}


/* Move Board Detail search/tools row closer to title */
.board-detail-page .board-tools-row {
    margin-top: 0 !important;
    margin-bottom: 40px !important;
}

/* Right side navbar: account icon + currency (gap now controlled by
   the "TOP NAVBAR SPACING" block appended at the end of this file) */






/* Product Detail: place buttons on top of the card */
.detail-page .detail-card {
    position: relative !important;
    overflow: visible !important;
}

/* Full button row over the card */
.detail-page .detail-card-button-row {
    position: absolute !important;
    top: 20px !important;
    left: 22px !important;
    right: 22px !important;
    z-index: 30 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;

    margin: 0 !important;
    padding: 0 !important;

    pointer-events: none !important;
}
.detail-page .detail-card-button-row .detail-top-actions,
.detail-page .detail-card-button-row .detail-menu-wrapper,
.detail-page .detail-card-button-row button {
    pointer-events: auto !important;
}

/* RHS buttons */
.detail-page .detail-card-button-row .detail-top-actions {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
}
.detail-page .detail-card-button-row .detail-save-button {
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
    min-height: 56px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 0 !important;
    margin: 0 !important;

    border-radius: 999px !important;
    background: #f3f3f2 !important;
    border: 1px solid #ddddda !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.04) !important;

    color: #000000 !important;
    line-height: 1 !important;
}
.detail-page .detail-card-button-row .detail-save-button {
    font-size: 28px !important;
}

/* Dropdown position from new card button location */
.detail-page .detail-card-button-row .detail-menu {
    top: calc(100% + 12px) !important;
    right: 0 !important;
    left: auto !important;
}

/* Product Detail: smaller laptop-friendly card */
.detail-page .detail-card {
    max-width: 900px !important;
    min-height: 0 !important;
    height: auto !important;

    margin-top: 24px !important;
    margin-left: auto !important;
    margin-right: auto !important;

    padding: 0 !important;
}

/* Product image smaller vertically */
.detail-page .detail-card > img {
    max-height: 460px !important;
    height: 460px !important;
    object-fit: cover !important;
}

/* Product info section tighter */
.detail-page .detail-info {
    padding: 42px 48px !important;
}

/* Product title smaller/tighter. Shown in full - the base .detail-info h1
   rule clamps to 4 lines with an ellipsis, which looked broken when the
   title wrapped past it. */
.detail-page .detail-info h1 {
    display: block !important;
    -webkit-line-clamp: unset !important;
    font-family: var(--card-title-font) !important;
    font-weight: 400 !important;
    font-size: 28px !important;
    line-height: 1.05 !important;
    margin-bottom: 18px !important;
}

/* Price tighter */
.detail-page .detail-price {
    font-size: 24px !important;
    margin-bottom: 24px !important;
}

/* Product metadata tighter */
.detail-page .detail-meta {
    margin-bottom: 18px !important;
}

/* View product button slightly smaller */
.detail-page .shop-button {
    height: 52px !important;
    padding: 0 26px !important;
}

/* Product Detail: reduce gap below navbar */
.detail-page {
    padding-top: 18px !important;
}

/* Pull product card closer to navbar */
.detail-page .detail-card {
    margin-top: 8px !important;
    border-radius: 34px !important;
    overflow: hidden !important;
}

/* Make sure left image corners are filleted too */
.detail-page .detail-card > img {
    border-top-left-radius: 34px !important;
    border-bottom-left-radius: 34px !important;
}

/* If the image is wrapped by another element, catch that too */
.detail-page .detail-card img {
    border-top-left-radius: 34px !important;
    border-bottom-left-radius: 34px !important;
}

/* Product Detail: move product info content downward */
.detail-page .detail-info {
    display: flex !important;
    flex-direction: column !important;

    padding-top: 82px !important;
    padding-bottom: 28px !important;
}

/* Push price/brand/button lower as a group */
.detail-page .detail-price {
    margin-top: 22px !important;
}

/* Keep the View product button lower, with less wasted bottom padding */
.detail-page .shop-button {
    margin-bottom: 0 !important;
}

/* Product Detail: stop title descenders being cut off */
.detail-page .detail-info {
    overflow: visible !important;
}

.detail-page .detail-info h1 {
    line-height: 1.14 !important;
    padding-bottom: 18px !important;
    margin-bottom: 22px !important;
    overflow: visible !important;
}

/* Spacing between currency/notifications/account (gap) and their
   individual margins is now controlled entirely by the single "TOP
   NAVBAR SPACING" block appended at the end of this file - these
   dead gap/margin values (34px gap, 10px/28px/0 margins) used to
   fight each other and the redesign's own gap:13px rule; removed so
   there's exactly one place spacing is declared. */






.detail-page .detail-card-button-row .detail-save-button {
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
    min-height: 56px !important;

    padding: 0 !important;
    margin: 0 !important;

    display: grid !important;
    place-items: center !important;

    line-height: 0 !important;
    text-align: center !important;

    font-weight: 600 !important;
}

/* Plus */
.detail-page .detail-card-button-row .detail-save-button {
    font-size: 32px !important;
}
.detail-page .detail-card-button-row .detail-save-button {
    font-family: Arial, Helvetica, sans-serif !important;
}

/* Product Detail plus button: thinner + centred */
.detail-page .detail-card-button-row .detail-save-button {
    font-size: 34px !important;
    font-weight: 300 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    line-height: 1 !important;
}

/* keep it geometrically centred */
.detail-page .detail-card-button-row .detail-save-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding-bottom: 2px !important;
}

/* =========================================================
   MOBILE OVERRIDES FOR RECENT LAYOUT FIXES
   ========================================================= */

@media (max-width: 768px) {

    /* =========================
       Explore + My Boards page titles
       ========================= */

    .explore-page h1,
    .boards-page .boards-header h1 {
        font-size: 30px !important;
        line-height: 1.05 !important;
        letter-spacing: 0.1em !important;
    }

    .boards-page {
        padding-top: 22px !important;
    }

    .boards-page .boards-header {
        margin-bottom: 18px !important;
    }


    /* =========================
       Explore + My Boards search bars
       ========================= */

    .explore-search-row,
    .boards-page #boardsSearchWrapper {
        width: calc(100% - 28px) !important;
        max-width: none !important;
        min-height: 58px !important;

        margin-left: auto !important;
        margin-right: auto !important;

        padding: 7px 8px !important;
        gap: 8px !important;

        display: flex !important;
        align-items: center !important;

        background: #f3f3f2 !important;
        border: 1px solid #ddddda !important;
        border-radius: 999px !important;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.045) !important;
    }

    .boards-page #boardsSearchWrapper .search-expand-form {
        width: 100% !important;
        max-width: none !important;
        height: 44px !important;

        display: flex !important;
        align-items: center !important;
        gap: 8px !important;

        margin: 0 !important;
        padding: 0 !important;

        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

    .explore-search-row input,
    .boards-page #boardsSearchWrapper .search-expand-input {
        flex: 1 1 auto !important;

        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
        height: 44px !important;

        margin: 0 !important;
        padding: 0 18px !important;

        background: #ffffff !important;
        border: 1px solid #d6d6d3 !important;
        border-radius: 999px !important;

        color: #111111 !important;
        font-size: 16px !important;
    }

    .explore-search-row .filter-icon-button,
    .boards-page #boardsSearchWrapper .search-icon-expand-button {
        flex: 0 0 44px !important;

        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;

        margin: 0 !important;
        padding: 0 !important;

        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;

        background: #1f1f1f !important;
        border: none !important;
        border-radius: 999px !important;

        color: #ffffff !important;
    }

    .explore-search-row .filter-icon-button svg,
    .boards-page #boardsSearchWrapper .search-icon-expand-button svg {
        width: 19px !important;
        height: 19px !important;
        stroke: #ffffff !important;
    }


    /* =========================
       Board Detail title/header
       ========================= */

    .board-detail-page {
        padding-top: 12px !important;
    }

    .board-detail-page .board-detail-header {
        margin-top: 0 !important;
        margin-bottom: 14px !important;
        padding-top: 0 !important;
    }

    .board-detail-page .board-detail-header h1 {
        font-size: 34px !important;
        line-height: 1.05 !important;
        margin: 0 !important;
    }


    /* =========================
       Board Detail tools/search row
       ========================= */

    .board-detail-page .board-tools-row {
        width: calc(100% - 28px) !important;
        max-width: none !important;
        min-height: auto !important;

        margin-left: auto !important;
        margin-right: auto !important;
        margin-top: 0 !important;
        margin-bottom: 30px !important;

        padding: 10px !important;
        gap: 10px !important;

        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;

        background: #f3f3f2 !important;
        border: 1px solid #ddddda !important;
        border-radius: 28px !important;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.045) !important;
    }

    .board-detail-page .board-tools-purchased {
        width: 100% !important;

        margin: 0 !important;
        padding: 6px 12px !important;

        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;

        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

    .board-detail-page .desktop-board-search,
    .board-detail-page .mobile-board-search {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;

        margin: 0 !important;
        padding: 0 !important;

        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

    .board-detail-page .desktop-board-search .search-expand-form,
    .board-detail-page .mobile-board-search .search-expand-form {
        width: 100% !important;
        height: 44px !important;

        display: flex !important;
        align-items: center !important;
        gap: 8px !important;

        margin: 0 !important;
        padding: 0 !important;

        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

    .board-detail-page .board-product-search-input {
        flex: 1 1 auto !important;

        width: auto !important;
        min-width: 0 !important;
        height: 44px !important;

        margin: 0 !important;
        padding: 0 18px !important;

        background: #ffffff !important;
        border: 1px solid #d6d6d3 !important;
        border-radius: 999px !important;

        color: #111111 !important;
        font-size: 16px !important;
    }

    .board-detail-page .search-icon-expand-button {
        flex: 0 0 44px !important;

        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;

        margin: 0 !important;
        padding: 0 !important;

        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;

        background: #1f1f1f !important;
        border: none !important;
        border-radius: 999px !important;

        color: #ffffff !important;
    }

    .board-detail-page .search-icon-expand-button svg {
        width: 19px !important;
        height: 19px !important;
        stroke: #ffffff !important;
    }

    .board-detail-page .board-tools-actions {
        width: 100% !important;

        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 10px !important;

        margin: 0 !important;
        padding: 0 !important;

        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

    .board-detail-page .board-tools-actions .new-board-button,
    .board-detail-page .board-tools-actions .edit-board-button {
        flex: 1 1 0 !important;

        height: 44px !important;
        min-height: 44px !important;

        padding: 0 16px !important;

        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;

        background: #ffffff !important;
        border: 1px solid #ddddda !important;
        border-radius: 999px !important;

        color: #111111 !important;
        white-space: nowrap !important;
        box-shadow: 0 8px 22px rgba(0, 0, 0, 0.04) !important;
    }


    /* =========================
       Product Detail card layout
       ========================= */

    .detail-page {
        padding-top: 8px !important;
    }

    .detail-page .detail-card {
        width: calc(100% - 28px) !important;
        max-width: none !important;

        margin-top: 8px !important;
        margin-left: auto !important;
        margin-right: auto !important;

        display: flex !important;
        flex-direction: column !important;

        border-radius: 28px !important;
        overflow: hidden !important;
    }

    .detail-page .detail-card > img {
        width: 100% !important;
        height: 390px !important;
        max-height: 390px !important;

        object-fit: cover !important;

        border-top-left-radius: 28px !important;
        border-top-right-radius: 28px !important;
        border-bottom-left-radius: 0 !important;
    }

    .detail-page .detail-info {
        padding: 34px 28px 28px !important;

        display: flex !important;
        flex-direction: column !important;

        overflow: visible !important;
    }

    .detail-page .detail-info h1 {
        font-size: 36px !important;
        line-height: 1.14 !important;

        margin-top: 0 !important;
        margin-bottom: 32px !important;
        padding-bottom: 8px !important;

        overflow: visible !important;
    }

    .detail-page .detail-price {
        font-size: 24px !important;
        margin-top: 8px !important;
        margin-bottom: 22px !important;
    }

    .detail-page .detail-meta {
        margin-bottom: 18px !important;
    }

    .detail-page .shop-button {
        height: 48px !important;
        padding: 0 24px !important;
        margin-top: 18px !important;
    }


    /* =========================
       Product Detail card buttons
       ========================= */

    .detail-page .detail-card {
        position: relative !important;
    }

    .detail-page .detail-card-button-row {
        position: absolute !important;
        top: 16px !important;
        left: 16px !important;
        right: 16px !important;
        z-index: 30 !important;

        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;

        margin: 0 !important;
        padding: 0 !important;

        pointer-events: none !important;
    }
    .detail-page .detail-card-button-row .detail-top-actions,
    .detail-page .detail-card-button-row .detail-menu-wrapper,
    .detail-page .detail-card-button-row button {
        pointer-events: auto !important;
    }

    .detail-page .detail-card-button-row .detail-top-actions {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
    }
    .detail-page .detail-card-button-row .detail-save-button {
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
        min-height: 48px !important;

        padding: 0 !important;
        margin: 0 !important;

        display: grid !important;
        place-items: center !important;

        background: #f3f3f2 !important;
        border: 1px solid #ddddda !important;
        border-radius: 999px !important;
        box-shadow: 0 8px 22px rgba(0, 0, 0, 0.045) !important;

        color: #000000 !important;
        line-height: 0 !important;
        text-align: center !important;
    }

    .detail-page .detail-card-button-row .detail-save-button {
        font-size: 31px !important;
        font-weight: 300 !important;
    }

    .detail-page .detail-card-button-row .detail-menu {
        top: calc(100% + 10px) !important;
        right: 0 !important;
        left: auto !important;
    }


    /* =========================
       Product/board card menu dots
       ========================= */

    .boards-page .board-menu-button,
    .board-detail-page .product-menu-button,
    .product-card .product-menu-button,
    .board-card .board-menu-button {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;

        color: #000000 !important;

        width: auto !important;
        height: auto !important;
        min-width: 0 !important;
        min-height: 0 !important;

        padding: 0 !important;
        border-radius: 0 !important;

        font-size: 24px !important;
        line-height: 1 !important;
    }


    /* =========================
       Account page currency button
       ========================= */

    .account-currency-button,
    .account-currency-button span,
    .account-currency-button svg {
        color: #000000 !important;
        stroke: #000000 !important;
    }

    .account-currency-row > span:first-child {
        color: inherit !important;
        stroke: inherit !important;
    }

}

@media (max-width: 480px) {







    .explore-search-row,
    .boards-page #boardsSearchWrapper,
    .board-detail-page .board-tools-row,
    .detail-page .detail-card {
        width: calc(100% - 20px) !important;
    }

    .detail-page .detail-card > img {
        height: 330px !important;
        max-height: 330px !important;
    }

    .detail-page .detail-info {
        padding: 30px 22px 24px !important;
    }

    .detail-page .detail-info h1 {
        font-size: 31px !important;
    }

    .board-detail-page .board-detail-header h1 {
        font-size: 30px !important;
    }

    .board-detail-page .board-tools-actions {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .board-detail-page .board-tools-actions .new-board-button,
    .board-detail-page .board-tools-actions .edit-board-button {
        width: 100% !important;
    }

}
.detail-page .detail-card-button-row .detail-save-button {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    min-height: 46px !important;

    padding: 0 !important;

    display: grid !important;
    place-items: center !important;

    border-radius: 999px !important;
}

.detail-page .detail-card-button-row .detail-save-button {
    font-size: 28px !important;
    font-weight: 300 !important;
}

/* Slightly tighter spacing between right buttons */
.detail-page .detail-card-button-row .detail-top-actions {
    gap: 9px !important;
}

/* My Boards card edit dots: larger clickable area, still just black dots */
.boards-page .board-card .board-menu-button {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 0 !important;
    margin: 0 !important;

    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 999px !important;

    color: #000000 !important;
    font-size: 26px !important;
    line-height: 1 !important;

    cursor: pointer !important;
}

/* Keep hover invisible, but clickable area remains bigger */
.boards-page .board-card .board-menu-button:hover {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #000000 !important;
}

/* =========================================================
   GLOBAL CREATE BOARD MODAL
   Used by My Boards + navbar quick access
   ========================================================= */

html body #createBoardModal.create-board-modal,
html body .create-board-modal {
    position: fixed !important;
    inset: 0 !important;

    z-index: 50000 !important;

    display: none;

    align-items: flex-start !important;
    justify-content: center !important;

    padding-top: 96px !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
    padding-bottom: 24px !important;

    background: rgba(31, 31, 31, 0.25) !important;

    cursor: pointer !important;
}

/* Modal card */
html body #createBoardModal .create-board-modal-card,
html body #createBoardModal .delete-modal-card {
    position: relative !important;
    z-index: 50001 !important;

    width: 100% !important;
    max-width: 420px !important;

    cursor: default !important;
}



/* Modal always wins */
html body #createBoardModal {
    z-index: 50000 !important;
}

/* Mobile gap below navbar */
@media (max-width: 768px) {
    html body #createBoardModal.create-board-modal,
    html body .create-board-modal {
        padding-top: 82px !important;
    }
}

/* =========================================================
   NAVBAR BOARD-ONLY MODAL
   Same look as create-board modal, but always above nav/search
   ========================================================= */

html body #navbarBoardOnlyModal.navbar-board-only-modal {
    position: fixed !important;
    inset: 0 !important;

    z-index: 60000 !important;

    display: none;

    align-items: flex-start !important;
    justify-content: center !important;

    padding-top: 96px !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
    padding-bottom: 24px !important;

    background: rgba(31, 31, 31, 0.25) !important;

    cursor: pointer !important;
}

/* Card: same create-board modal styling */
html body #navbarBoardOnlyModal .navbar-board-only-modal-card,
html body #navbarBoardOnlyModal .create-board-modal-card,
html body #navbarBoardOnlyModal .delete-modal-card {
    position: relative !important;
    z-index: 60001 !important;

    width: 100% !important;
    max-width: 460px !important;

    text-align: center !important;

    cursor: default !important;
}

html body #navbarBoardOnlyModal .navbar-board-only-modal-card form,
html body #navbarBoardOnlyModal .create-board-modal-card form {
    text-align: left !important;
}

/* Make sure this modal is above sticky search rows and navbar */
html body #navbarBoardOnlyModal,
html body #navbarBoardOnlyModal.navbar-board-only-modal {
    z-index: 60000 !important;
}

html body #navbarBoardOnlyModal .delete-modal-card {
    z-index: 60001 !important;
}


/* Mobile: smaller gap below navbar */
@media (max-width: 768px) {
    html body #navbarBoardOnlyModal.navbar-board-only-modal {
        padding-top: 82px !important;
    }
}

/* Keep sticky search/tool rows lower */
html body .explore-search-row,
html body .boards-page > .search-expand-wrapper,
html body .board-tools-row {
    z-index: 800 !important;
}

/* Hide purchased checkbox: minimal styling only */

html body .board-detail-page .purchased-filter-form label,
html body .board-detail-page .board-tools-purchased label {
    font-weight: 650 !important;
}

html body .board-detail-page .purchased-filter-form input[type="checkbox"],
html body .board-detail-page .board-tools-purchased input[type="checkbox"] {
    accent-color: #111111 !important;
}

/* =========================================================
   ADD PRODUCT TEMPLATE FLOW
   Mirrors current Product Detail card styling
   ========================================================= */

html body .add-product-template-page {
    min-height: calc(100vh - 76px) !important;

    max-width: 900px !important;
    margin: 0 auto !important;

    padding-top: 18px !important;
    padding-left: 32px !important;
    padding-right: 32px !important;
    padding-bottom: 70px !important;
}

html body .add-product-template-form {
    width: 100% !important;
    max-width: 900px !important;

    margin: 0 auto !important;
    padding: 0 !important;
}

/* Sized to match #productDetailModal .detail-card exactly (same fixed
   520px/74vh-capped height, same auto/1fr column split that forces a
   square image column, same 860px cap, same 28px corners) so the Add/
   Edit Item card reads as the same shape as the "view item" card
   instead of its own wider, shorter, more rounded one-off proportions. */
html body .add-product-template-card {
    position: relative !important;

    width: 100% !important;
    max-width: 860px !important;

    min-height: 0 !important;
    height: min(520px, 74vh) !important;

    margin-top: 8px !important;
    margin-left: auto !important;
    margin-right: auto !important;

    padding: 0 !important;

    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    grid-template-rows: 100% !important;

    overflow: hidden !important;

    background: #ffffff !important;
    border-radius: var(--dm-radius-modal) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1) !important;
}

/* Top card buttons: same placement idea as product detail */
html body .add-product-template-top-row {
    position: absolute !important;
    top: 22px !important;
    left: 22px !important;
    right: 22px !important;
    z-index: 30 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;

    margin: 0 !important;
    padding: 0 !important;

    pointer-events: none !important;
}

html body .add-product-template-back,
html body .add-product-template-save {
    pointer-events: auto !important;
}

/* Back + Save bubbles - sized to match the product-detail modal's own
   top-row buttons (#productDetailModalContent .detail-back /
   .detail-save-button in deckd_modals.css both use this same 34px
   height) instead of this page's own larger, one-off 46px. */
html body .add-product-template-back,
html body .add-product-template-save {
    height: 34px !important;
    min-height: 34px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;

    margin: 0 !important;

    border-radius: 999px !important;

    line-height: 1 !important;
    text-decoration: none !important;

    cursor: pointer !important;
}

/* Back: icon + "wherever this item came from" label (Explore/board name),
   matching the product-detail modal's own back pill (see
   #productDetailModalContent .detail-back in deckd_modals.css) instead of
   a bare unlabelled chevron circle - same light pill/border/shadow this
   button already had, just sized to its content instead of a fixed
   circle now that there's a label alongside the icon. */
html body .add-product-template-back {
    width: auto !important;
    min-width: 0 !important;

    padding: 0 14px !important;

    border: 1px solid #ddddda !important;
    background: #f3f3f2 !important;
    color: #1f1f1f !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.045) !important;

    font-size: 13px !important;
    font-weight: 700 !important;
}

html body .add-product-template-back:hover {
    background: #ffffff !important;
    border-color: #cfcfcb !important;
}

html body .add-product-template-back svg {
    width: 15px !important;
    height: 15px !important;
    flex: 0 0 auto !important;
}

html body .add-product-template-back-label {
    max-width: min(220px, 40vw) !important;

    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* Save: the primary action on this page, so it gets the site's own
   primary-button treatment (solid black pill, same as .deckd-btn-primary
   used everywhere else) instead of the same light grey the secondary
   Back pill uses - a clearer, more deliberate look than two
   same-weight buttons sitting side by side. */
html body .add-product-template-save {
    width: auto !important;
    min-width: 0 !important;

    padding: 0 18px !important;

    border: 1px solid transparent !important;
    background: #1f1f1f !important;
    color: #ffffff !important;
    box-shadow: 0 10px 24px rgba(31, 31, 31, 0.22) !important;

    font-size: 13px !important;
    font-weight: 700 !important;

    transition: background 0.15s ease, transform 0.1s ease !important;
}

html body .add-product-template-save:hover {
    background: #333333 !important;
}

html body .add-product-template-save:active {
    transform: scale(0.97) !important;
}

/* Image side: forced to a true square (height:100% of the row + a 1:1
   aspect-ratio, same trick #productDetailModalContent .detail-card > img
   uses) instead of a fixed width%/460px rectangle - the "auto" grid
   column above then sizes itself off this element's own resolved
   width, same as the modal's image-driven column. */
html body .add-product-template-image-panel {
    position: relative !important;

    width: auto !important;
    height: 100% !important;
    aspect-ratio: 1 / 1 !important;
    max-height: none !important;
    min-height: 0 !important;

    overflow: hidden !important;

    background: #f3f3f2 !important;

    border-top-left-radius: var(--dm-radius-modal) !important;
    border-bottom-left-radius: var(--dm-radius-modal) !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Camera upload target */
html body .add-product-camera-upload {
    position: absolute !important;
    inset: 0 !important;
    z-index: 5 !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;

    margin: 0 !important;
    padding: 0 !important;

    color: #111111 !important;

    cursor: pointer !important;
}

html body .add-product-camera-upload svg {
    width: 46px !important;
    height: 46px !important;

    display: block !important;

    stroke: #111111 !important;
}

html body .add-product-camera-upload span {
    font-size: 15px !important;
    font-weight: 800 !important;
}

/* When image chosen, hide camera until hover */
html body .add-product-camera-upload.has-image {
    opacity: 0 !important;
}

html body .add-product-template-image-panel:hover .add-product-camera-upload.has-image {
    opacity: 1 !important;

    background: rgba(255, 255, 255, 0.62) !important;
    backdrop-filter: blur(4px) !important;
}

/* Preview image */
html body .add-product-template-preview {
    position: absolute !important;
    inset: 0 !important;

    width: 100% !important;
    height: 100% !important;

    display: none;

    object-fit: cover !important;
    object-position: center center !important;

    border-top-left-radius: var(--dm-radius-modal) !important;
    border-bottom-left-radius: var(--dm-radius-modal) !important;
}

/* Info side: mirrors current Product Detail image height */
html body .add-product-template-info {
    min-width: 0 !important;

    height: 100% !important;
    min-height: 0 !important;

    padding: 82px 48px 28px !important;

    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;

    overflow: visible !important;
}

/* Inputs should look like content, not form fields */
html body .add-product-template-title,
html body .add-product-template-price,
html body .add-product-template-meta-row input {
    width: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    border: none !important;
    outline: none !important;
    box-shadow: none !important;

    background: transparent !important;
    color: #111111 !important;

    font-family: inherit !important;
}

/* Product title field: mirrors detail h1 */
html body .add-product-template-title {
    margin-top: 0 !important;
    margin-bottom: 18px !important;
    padding-bottom: 8px !important;

    font-size: 42px !important;
    font-weight: 800 !important;
    line-height: 1.05 !important;
    letter-spacing: -1.5px !important;

    overflow: visible !important;
}

/* Price field: mirrors detail price */
html body .add-product-template-price {
    margin-top: 22px !important;
    margin-bottom: 24px !important;

    color: #8a7f73 !important;

    font-size: 24px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
}

/* Brand/link metadata */
html body .add-product-template-meta {
    display: flex !important;
    flex-direction: column !important;
    gap: 18px !important;

    margin: 0 0 18px !important;
    padding: 0 !important;
}

html body .add-product-template-meta-row {
    margin: 0 !important;
    padding: 0 !important;
}

html body .add-product-template-meta-row span {
    display: block !important;

    margin-bottom: 6px !important;

    color: #8a7f73 !important;

    font-size: 12px !important;
    font-weight: 800 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    line-height: 1.2 !important;
}

html body .add-product-template-meta-row input {
    font-size: 20px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
}

/* Placeholder colours */
html body .add-product-template-title::placeholder,
html body .add-product-template-price::placeholder,
html body .add-product-template-meta-row input::placeholder {
    color: #b8b1aa !important;
    opacity: 1 !important;
}

/* Helper text low in card */
html body .add-product-template-placeholder-note {
    margin-top: auto !important;
    margin-bottom: 0 !important;

    color: #8a7f73 !important;

    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
}

/* "Fetching item details..." / error status under the Item link field -
   same colour language as .deckd-export-toast (base.html) for
   consistency across the site: neutral tone matches this card's own
   helper text above, error tone reuses the export toast's error red. No
   background/border chip here (unlike the toast) since this is inline
   hint text under a field inside a card that already has its own
   background, not a floating notification over arbitrary page content. */
html body .add-product-scrape-status {
    margin: 6px 0 0 !important;

    min-height: 18px !important;

    color: #8a7f73 !important;

    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;

    transition: color 0.15s ease !important;
}

html body .add-product-scrape-status-error {
    color: #97402d !important;
}

/* =========================================================
   ADD PRODUCT FINISH MODAL
   Category + notes + board choice
   ========================================================= */

/* No "display: none" here (unlike this rule's other properties, this one
   was never !important) - .deckd-modal already defaults to display:none
   and only .deckd-modal.is-visible (deckd_modals.css) turns it back on;
   redeclaring the same default here at higher specificity (id+class vs
   two classes) permanently beat that .is-visible toggle regardless of
   its own !importants, so the "Finish item" modal could never actually
   open. */
html body #addProductFinishModal.add-product-finish-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 100000 !important;

    align-items: flex-start !important;
    justify-content: center !important;

    padding-top: 96px !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
    padding-bottom: 24px !important;

    background: rgba(31, 31, 31, 0.25) !important;

    cursor: pointer !important;
}

html body #addProductFinishModal .add-product-finish-modal-card,
html body #addProductFinishModal .delete-modal-card {
    position: relative !important;
    z-index: 100001 !important;

    width: 100% !important;
    max-width: 460px !important;
    max-height: calc(100vh - 120px) !important;

    overflow-y: auto !important;

    cursor: default !important;
}

html body #addProductFinishModal .add-product-finish-subtitle {
    margin-top: -4px !important;
    margin-bottom: 24px !important;

    color: #68615a !important;
}

html body #addProductFinishModal textarea {
    width: 100% !important;
    min-height: 100px !important;

    resize: vertical !important;

    padding: 15px 16px !important;

    border: 1px solid #dddddd !important;
    border-radius: 16px !important;

    background: #ffffff !important;

    font-family: inherit !important;
    font-size: 15px !important;
}

/* Unscoped (was #addProductFinishModal-only, which left Edit Item's own
   finish modal - same classes, same markup - using each browser's bare
   default checkbox instead of this styling at all). */
html body .add-product-board-choice,
html body .add-product-public-choice {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;

    margin: 10px 0 !important;

    color: #1f1f1f !important;
    font-size: 14px !important;
    font-weight: 700 !important;

    cursor: pointer !important;
}

/* Custom tickbox: the native checkbox reskinned via appearance:none
   rather than swapped for a fake div, so it stays a real, keyboard/
   screen-reader accessible form control - just drawn as a black/white
   square+checkmark (border-trick, no image) instead of each browser's
   own default (blue on Chrome, grey on others) to match this app's
   white/black/grey system. */
html body .add-product-public-choice input[type="checkbox"] {
    appearance: none !important;
    -webkit-appearance: none !important;

    width: 20px !important;
    height: 20px !important;
    flex: 0 0 auto !important;
    margin: 0 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    border: 1.5px solid #ddddda !important;
    border-radius: 6px !important;
    background: #f9f9f8 !important;

    cursor: pointer !important;

    transition: background 0.15s ease, border-color 0.15s ease !important;
}

html body .add-product-public-choice input[type="checkbox"]:hover {
    border-color: #cfcfcb !important;
}

html body .add-product-public-choice input[type="checkbox"]:checked {
    background: #1f1f1f !important;
    border-color: #1f1f1f !important;
}

html body .add-product-public-choice input[type="checkbox"]:checked::after {
    content: "" !important;
    width: 5px !important;
    height: 9px !important;

    border: solid #ffffff !important;
    border-width: 0 2px 2px 0 !important;

    transform: rotate(45deg) translate(-1px, -1px) !important;
}

/* Custom radio (Add Item's "existing board" / "new board" choice) -
   same reskin approach as the checkbox above, drawn as a dot-in-ring
   instead of a square+check. */
html body .add-product-board-choice input[type="radio"] {
    appearance: none !important;
    -webkit-appearance: none !important;

    width: 20px !important;
    height: 20px !important;
    flex: 0 0 auto !important;
    margin: 0 !important;

    border: 1.5px solid #ddddda !important;
    border-radius: 50% !important;
    background: #f9f9f8 !important;

    cursor: pointer !important;

    transition: background 0.15s ease, border-color 0.15s ease !important;
}

html body .add-product-board-choice input[type="radio"]:hover {
    border-color: #cfcfcb !important;
}

html body .add-product-board-choice input[type="radio"]:checked {
    border-color: #1f1f1f !important;
    background:
        radial-gradient(circle, #1f1f1f 0 5px, transparent 5px 100%) !important;
}

/* =========================================================
   ADD PRODUCT TEMPLATE MOBILE
   Mirrors current Product Detail mobile behaviour
   ========================================================= */

@media (max-width: 768px) {
    html body .add-product-template-page {
        padding-top: 8px !important;
        padding-left: 14px !important;
        padding-right: 14px !important;
        padding-bottom: 48px !important;

        max-width: none !important;
    }

    html body .add-product-template-form {
        max-width: none !important;
    }

    html body .add-product-template-card {
        width: calc(100% - 0px) !important;
        max-width: none !important;

        /* Desktop's fixed height: min(520px, 74vh) (see the base rule
           above) would otherwise carry over here too - nothing in this
           breakpoint used to need to reset it back to auto since the
           old desktop rule already was auto, but the stacked mobile
           layout (image on top, fields below) always needs to grow
           with its own content instead of being capped to a height
           tuned for the desktop side-by-side layout. */
        height: auto !important;
        min-height: 0 !important;

        display: flex !important;
        flex-direction: column !important;

        border-radius: var(--dm-radius-modal) !important;
    }

    html body .add-product-template-image-panel {
        width: 100% !important;
        height: 390px !important;
        min-height: 390px !important;
        max-height: 390px !important;

        border-top-left-radius: var(--dm-radius-modal) !important;
        border-top-right-radius: var(--dm-radius-modal) !important;
        border-bottom-left-radius: 0 !important;
    }

    html body .add-product-template-preview {
        border-top-left-radius: var(--dm-radius-modal) !important;
        border-top-right-radius: var(--dm-radius-modal) !important;
        border-bottom-left-radius: 0 !important;
    }

    html body .add-product-template-top-row {
        top: 16px !important;
        left: 16px !important;
        right: 16px !important;
    }

    html body .add-product-template-back {
        height: 34px !important;
        min-height: 34px !important;
    }

    html body .add-product-template-back-label {
        max-width: 34vw !important;
    }

    html body .add-product-template-save {
        height: 34px !important;
        min-height: 34px !important;
        padding: 0 18px !important;
    }

    html body .add-product-template-info {
        height: auto !important;
        min-height: 0 !important;

        padding: 34px 28px 28px !important;
    }

    html body .add-product-template-title {
        font-size: 36px !important;
        line-height: 1.14 !important;

        margin-bottom: 18px !important;
        padding-bottom: 8px !important;
    }

    html body .add-product-template-price {
        font-size: 24px !important;

        margin-top: 8px !important;
        margin-bottom: 22px !important;
    }

    html body .add-product-template-meta {
        margin-bottom: 18px !important;
    }

    html body #addProductFinishModal.add-product-finish-modal {
        padding-top: 82px !important;
    }
}

@media (max-width: 480px) {
    html body .add-product-template-card {
        width: calc(100% - 0px) !important;
    }

    html body .add-product-template-image-panel {
        height: 330px !important;
        min-height: 330px !important;
        max-height: 330px !important;
    }

    html body .add-product-template-info {
        padding: 30px 22px 24px !important;
    }

    html body .add-product-template-title {
        font-size: 31px !important;
    }
}

/* =========================================================
   ADD PRODUCT TEMPLATE — BASIC FIELD POSITIONING
   Move price/brand/link down safely
   ========================================================= */

/* Make the right panel a vertical layout */
html body .add-product-template-info {
    height: 100% !important;
    min-height: 0 !important;

    padding: 110px 48px 42px !important;

    display: flex !important;
    flex-direction: column !important;

    overflow: hidden !important;
}

/* Product title stays at the top */
html body .add-product-template-title {
    flex: 0 0 auto !important;

    margin-bottom: 44px !important;
}

/* This block contains price + brand + product link */
html body .add-product-template-meta,
html body .add-product-template-details {
    margin-top: 34px !important;

    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;

    flex: 0 1 auto !important;

    max-height: 230px !important;
    overflow: hidden !important;
}

/* Brand/link inputs - sized to match the product-detail modal's own
   Brand/Item link values (#productDetailModalContent .detail-meta
   strong, 14px/700) instead of the oversized 20px this used to carry
   over from the Price field before Price got its own dedicated rule
   below. */
html body .add-product-template-meta-row input {
    width: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    border: none !important;
    outline: none !important;
    box-shadow: none !important;

    background: transparent !important;
    color: #111111 !important;

    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
}

/* Price is also a ".add-product-template-meta-row input" (see markup
   in add_product.html / edit_product.html), so the generic Brand/link
   rule above - one class + one type selector, same specificity as this
   one - would otherwise win the tiebreak on source order alone. Adding
   the price class back into the selector here (two classes + one type)
   outranks it on pure specificity instead, guaranteeing Price always
   resolves to its own size regardless of rule order. Matches the
   product-detail modal's own Price (#productDetailModalContent
   .detail-price, 19px/800). */
html body .add-product-template-meta-row input.add-product-template-price {
    font-size: 19px !important;
}

/* Label spacing */
html body .add-product-template-meta-row span {
    margin-bottom: 6px !important;
}

/* Make placeholders consistent */
html body .add-product-template-price::placeholder,
html body .add-product-template-meta-row input::placeholder {
    color: #b8b1aa !important;
    opacity: 1 !important;
}

/* =========================================================
   ADD PRODUCT TEMPLATE — LOWER DETAIL GROUP
   Bottom gap matches Save button top gap
   ========================================================= */

html body .add-product-template-info {
    position: relative !important;

    height: 100% !important;
    min-height: 0 !important;

    padding: 82px 48px 22px !important;

    display: flex !important;
    flex-direction: column !important;

    overflow: hidden !important;
}

/* Title stays in the upper part */
html body .add-product-template-title {
    flex: 0 0 auto !important;

    margin: 0 !important;
    padding-bottom: 8px !important;
}

/* Price/brand/link group sits at bottom */
html body .add-product-template-meta {
    margin-top: auto !important;
    margin-bottom: 0 !important;

    display: flex !important;
    flex-direction: column !important;
    gap: 22px !important;

    max-height: 230px !important;
    overflow: hidden !important;
}

/* =========================================================
   ADD PRODUCT TEMPLATE — TITLE WRAP + FIELD SPACING
   ========================================================= */

/* Title now wraps instead of overflowing in one line - max-height caps it
   at 8 lines (line-height 1.25em × 8) before clipping, so a long/garbled
   title can't push the price/brand/link fields further down the card.
   Sized for the 150-character title limit (ADD_PRODUCT_TITLE_MAX_LENGTH). */
html body textarea.add-product-template-title {
    width: 100% !important;
    max-width: 100% !important;

    min-height: 90px !important;
    max-height: 10em !important;

    margin: 0 !important;
    padding: 0 !important;

    display: block !important;

    border: none !important;
    outline: none !important;
    box-shadow: none !important;

    background: transparent !important;
    color: #111111 !important;

    font-family: inherit !important;
    font-size: 22px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.3px !important;

    resize: none !important;

    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;

    overflow: hidden !important;
}

/* Placeholder wraps too */
html body textarea.add-product-template-title::placeholder {
    color: #b8b1aa !important;
    opacity: 1 !important;

    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
}

/* Keep title area separate from lower fields */
html body .add-product-template-info {
    padding: 82px 48px 22px !important;

    display: flex !important;
    flex-direction: column !important;

    overflow: hidden !important;
}

/* Price / brand / product link group stays near bottom */
html body .add-product-template-meta {
    margin-top: auto !important;
    margin-bottom: 0 !important;

    display: flex !important;
    flex-direction: column !important;
    gap: 22px !important;

    max-height: 245px !important;
    overflow: hidden !important;
}

/* More space specifically between Price and Brand */
html body .add-product-template-meta-row:first-child {
    margin-bottom: 10px !important;
}

/* Price styled like Brand/Product Link input */
html body .add-product-template-price {
    width: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    border: none !important;
    outline: none !important;
    box-shadow: none !important;

    background: transparent !important;
    color: #111111 !important;

    font-family: inherit !important;
    font-size: 20px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
}

html body .add-product-template-price::placeholder {
    color: #b8b1aa !important;
    opacity: 1 !important;
}

/* =========================================================
   EXPLORE + BOARD DETAIL — ORDERED MASONRY COLUMNS
   Cards always distribute left-to-right by count
   ========================================================= */

html body .explore-page .wishlist-grid,
html body .board-detail-page .wishlist-grid,
html body .explore-page #sortable-products,
html body .board-detail-page #sortable-products {
    width: min(1200px, calc(100vw - 64px)) !important;
    max-width: 1200px !important;

    margin-left: auto !important;
    margin-right: auto !important;

    padding: 20px 0 80px !important;

    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;

    gap: 24px !important;

    column-count: initial !important;
    column-width: initial !important;
    grid-template-columns: none !important;
}

/* 3 columns on medium screens */
@media (max-width: 1100px) {
    html body .explore-page .wishlist-grid,
    html body .board-detail-page .wishlist-grid,
    html body .explore-page #sortable-products,
    html body .board-detail-page #sortable-products {
        width: min(100%, calc(100vw - 48px)) !important;
        gap: 20px !important;
    }

}

/* 2 columns on tablet/mobile */
@media (max-width: 800px) {
    html body .explore-page .wishlist-grid,
    html body .board-detail-page .wishlist-grid,
    html body .explore-page #sortable-products,
    html body .board-detail-page #sortable-products {
        width: calc(100vw - 36px) !important;
        gap: 18px !important;
        padding-top: 12px !important;
    }

}

/* Still 2 columns on small phones */
@media (max-width: 420px) {
    html body .explore-page .wishlist-grid,
    html body .board-detail-page .wishlist-grid,
    html body .explore-page #sortable-products,
    html body .board-detail-page #sortable-products {
        width: calc(100vw - 28px) !important;
        gap: 14px !important;
    }

}

/* =========================================================
   ORDERED MASONRY — EXPLORE + BOARD DETAIL
   Fill cards left-to-right by count:
   1,5,9 in col 1 / 2,6,10 in col 2 / etc.
   ========================================================= */

html body .explore-page .wishlist-grid,
html body .board-detail-page #sortable-products {
    width: min(1200px, calc(100vw - 64px)) !important;
    max-width: 1200px !important;

    margin-left: auto !important;
    margin-right: auto !important;

    padding: 20px 0 80px !important;

    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    gap: 24px !important;

    grid-template-columns: none !important;
    column-count: initial !important;
    column-width: initial !important;
}

/* JS-created columns */
html body .explore-page .wishboard-masonry-column,
html body .board-detail-page .wishboard-masonry-column {
    flex: 1 1 0 !important;
    min-width: 0 !important;

    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
}

/* Product items inside columns */
html body .explore-page .wishboard-masonry-column > .product-link,
html body .board-detail-page .wishboard-masonry-column > .product-link {
    display: block !important;

    width: 100% !important;
    max-width: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    break-inside: avoid !important;
}

/* Cards fill their column */
html body .explore-page .product-card,
html body .board-detail-page .product-card {
    width: 100% !important;
    max-width: 100% !important;
}

/* True masonry image sizing */
html body .explore-page .product-card img,
html body .board-detail-page .product-card img {
    width: 100% !important;
    height: auto !important;

    display: block !important;

    object-fit: contain !important;
}

/* Medium screens */
@media (max-width: 1100px) {
    html body .explore-page .wishlist-grid,
    html body .board-detail-page #sortable-products {
        width: min(100%, calc(100vw - 48px)) !important;
        gap: 20px !important;
    }

}

/* Tablet/mobile */
@media (max-width: 800px) {
    html body .explore-page .wishlist-grid,
    html body .board-detail-page #sortable-products {
        width: calc(100vw - 36px) !important;
        gap: 18px !important;
        padding-top: 12px !important;
    }

}

/* Small phones */
@media (max-width: 420px) {
    html body .explore-page .wishlist-grid,
    html body .board-detail-page #sortable-products {
        width: calc(100vw - 28px) !important;
        gap: 14px !important;
    }

    html body .explore-page .wishboard-masonry-column,
    html body .board-detail-page .wishboard-masonry-column {
        gap: 14px !important;
    }
}

/* =========================================================
   RESTORE PRODUCT CARD SIZE + PAGE SIDE PADDING
   Explore + Board Detail ordered masonry
   ========================================================= */

/* Give the grid proper page gutters again */
html body .explore-page .wishlist-grid,
html body .board-detail-page #sortable-products {
    width: min(1200px, calc(100vw - 64px)) !important;
    max-width: 1200px !important;

    padding: 20px 0 80px !important;

    gap: 24px !important;
}

/* Keep columns evenly sized */
html body .explore-page .wishboard-masonry-column,
html body .board-detail-page .wishboard-masonry-column {
    gap: 24px !important;
}

/* Product card: back to original card look. overflow is NOT re-hidden
   here (unlike the very similar-looking rule this replaced) - hiding it
   also clipped the "..." menu (an absolutely-positioned child) whenever
   a short card left too little room below the button. The image below
   rounds its own top corners directly so the card doesn't need
   overflow: hidden to still look right. */
html body .explore-page .product-card,
html body .board-detail-page .product-card {
    width: 100% !important;
    max-width: 100% !important;

    background: #ffffff !important;
    border-radius: 26px !important;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.07) !important;
}

/* Restore image height instead of auto-height blown-out masonry */
html body .explore-page .product-card img,
html body .board-detail-page .product-card img {
    width: 100% !important;
    height: 260px !important;

    display: block !important;

    object-fit: cover !important;
    object-position: center center !important;
}

/* Restore card text area */
html body .explore-page .card-info,
html body .board-detail-page .card-info {
    padding: 18px 20px 22px !important;
    overflow: hidden !important;
}

/* Restore title sizing */
html body .explore-page .card-info h3,
html body .board-detail-page .card-info h3 {
    margin: 0 0 8px !important;

    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;

    overflow: hidden !important;
    text-overflow: ellipsis !important;

    font-size: 18px !important;
    line-height: 1.18 !important;

    /* 2 lines at this size/line-height is 42.48px - 42px was clipping
       part of the second line, which could push the line-clamp ellipsis
       up onto the first line. */
    min-height: 44px !important;
    max-height: 44px !important;
}

/* Restore price/brand text */
html body .explore-page .card-info p,
html body .board-detail-page .card-info p {
    margin: 0 !important;

    color: #8a7f73 !important;

    font-weight: 700 !important;
}

/* Medium screens */
@media (max-width: 1100px) {
    html body .explore-page .wishlist-grid,
    html body .board-detail-page #sortable-products {
        width: min(1200px, calc(100vw - 48px)) !important;
        gap: 20px !important;
    }

    html body .explore-page .wishboard-masonry-column,
    html body .board-detail-page .wishboard-masonry-column {
        gap: 20px !important;
    }
}

/* Tablet/mobile */
@media (max-width: 800px) {
    html body .explore-page .wishlist-grid,
    html body .board-detail-page #sortable-products {
        width: calc(100vw - 40px) !important;
        gap: 18px !important;
        padding-top: 12px !important;
    }

    html body .explore-page .wishboard-masonry-column,
    html body .board-detail-page .wishboard-masonry-column {
        gap: 18px !important;
    }

}

/* Phone */
@media (max-width: 560px) {
    html body .explore-page .wishlist-grid,
    html body .board-detail-page #sortable-products {
        width: calc(100vw - 28px) !important;
        gap: 16px !important;
    }

    html body .explore-page .wishboard-masonry-column,
    html body .board-detail-page .wishboard-masonry-column {
        gap: 16px !important;
    }

    html body .explore-page .product-card,
    html body .board-detail-page .product-card {
        border-radius: 22px !important;
    }


    html body .explore-page .card-info,
    html body .board-detail-page .card-info {
        padding: 14px 14px 18px !important;
    }

    html body .explore-page .card-info h3,
    html body .board-detail-page .card-info h3 {
        font-size: 13px !important;
        line-height: 1.18 !important;

        min-height: 31px !important;
        max-height: 31px !important;
    }

    html body .explore-page .card-info p,
    html body .board-detail-page .card-info p {
        font-size: 14px !important;
    }
}

/* =========================================================
   ORDERED MASONRY — CENTERED + THINNER CARDS
   Explore + Board Detail
   ========================================================= */

/* Stop the page from creating a sideways scrollbar */
html,
body {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

/* Center the whole masonry grid */
html body .explore-page .wishlist-grid,
html body .board-detail-page #sortable-products {
    width: min(1040px, calc(100vw - 96px)) !important;
    max-width: 1040px !important;

    margin-left: auto !important;
    margin-right: auto !important;

    padding-left: 0 !important;
    padding-right: 0 !important;

    display: flex !important;
    justify-content: center !important;
    align-items: flex-start !important;

    gap: 22px !important;

    transform: none !important;
    left: auto !important;
    right: auto !important;
}

/* Make the masonry columns/card slots thinner */
html body .explore-page .wishboard-masonry-column,
html body .board-detail-page .wishboard-masonry-column {
    flex: 0 1 244px !important;
    max-width: 244px !important;
    min-width: 0 !important;

    gap: 22px !important;
}

/* Cards fill the thinner columns */
html body .explore-page .wishboard-masonry-column > .product-link,
html body .board-detail-page .wishboard-masonry-column > .product-link,
html body .explore-page .product-card,
html body .board-detail-page .product-card {
    width: 100% !important;
    max-width: 100% !important;
}

/* Keep product image proportions clean */
html body .explore-page .product-card img,
html body .board-detail-page .product-card img {
    height: 245px !important;
    object-fit: cover !important;
    object-position: center center !important;
}

/* Medium screen: still centered, slightly thinner */
@media (max-width: 1100px) {
    html body .explore-page .wishlist-grid,
    html body .board-detail-page #sortable-products {
        width: min(940px, calc(100vw - 64px)) !important;
        max-width: 940px !important;
        gap: 20px !important;
    }

    html body .explore-page .wishboard-masonry-column,
    html body .board-detail-page .wishboard-masonry-column {
        flex-basis: 220px !important;
        max-width: 220px !important;
        gap: 20px !important;
    }

    html body .explore-page .product-card img,
    html body .board-detail-page .product-card img {
        height: 225px !important;
    }
}

/* Tablet */
@media (max-width: 800px) {
    html body .explore-page .wishlist-grid,
    html body .board-detail-page #sortable-products {
        width: min(520px, calc(100vw - 36px)) !important;
        max-width: 520px !important;
        gap: 18px !important;
    }

    html body .explore-page .wishboard-masonry-column,
    html body .board-detail-page .wishboard-masonry-column {
        flex-basis: 240px !important;
        max-width: 240px !important;
        gap: 18px !important;
    }

    html body .explore-page .product-card img,
    html body .board-detail-page .product-card img {
        height: 220px !important;
    }
}

/* Phone */
@media (max-width: 560px) {
    html body .explore-page .wishlist-grid,
    html body .board-detail-page #sortable-products {
        width: calc(100vw - 28px) !important;
        max-width: none !important;
        gap: 14px !important;
    }

    html body .explore-page .wishboard-masonry-column,
    html body .board-detail-page .wishboard-masonry-column {
        flex-basis: calc((100vw - 42px) / 2) !important;
        max-width: calc((100vw - 42px) / 2) !important;
        gap: 14px !important;
    }

    html body .explore-page .product-card img,
    html body .board-detail-page .product-card img {
        height: 190px !important;
    }
}

/* =========================================================
   MASONRY CARD HEIGHTS — USE ORIGINAL IMAGE RATIO
   Explore + Board Detail
   ========================================================= */

/* Let image height follow the original image ratio */
html body .explore-page .product-card img,
html body .board-detail-page .product-card img {
    width: 100% !important;
    height: auto !important;

    display: block !important;

    object-fit: contain !important;
    object-position: center center !important;
}

/* Let the card grow/shrink naturally with the image */
html body .explore-page .product-card,
html body .board-detail-page .product-card {
    height: auto !important;
    min-height: 0 !important;
}

/* Keep text area consistent underneath */
html body .explore-page .card-info,
html body .board-detail-page .card-info {
    padding: 18px 20px 22px !important;
}

/* Prevent tiny images from making cards too short */
html body .explore-page .product-card img,
html body .board-detail-page .product-card img {
    min-height: 170px !important;
    max-height: 390px !important;
}

/* Mobile safety */
@media (max-width: 560px) {
    html body .explore-page .product-card img,
    html body .board-detail-page .product-card img {
        min-height: 140px !important;
        max-height: 310px !important;
    }
}

/* =========================================================
   RESTORE STICKY NAVBAR + STICKY SEARCH BARS
   Explore / My Boards / Board Detail
   ========================================================= */

/* Do not let previous overflow rules break sticky positioning */
html {
    overflow-x: clip !important;
}

body {
    overflow-x: clip !important;
}




/* Explore search bar sticky again */
html body .explore-page .explore-search-row {
    position: sticky !important;
    top: 92px !important;
    z-index: 80000 !important;

    margin-bottom: 34px !important;

    background: rgba(248, 245, 240, 0.94) !important;
    backdrop-filter: blur(12px) !important;
}

/* My Boards search bar sticky again */
html body .boards-page > .search-expand-wrapper {
    position: sticky !important;
    top: 92px !important;
    z-index: 80000 !important;

    margin-bottom: 34px !important;

    background: rgba(248, 245, 240, 0.94) !important;
    backdrop-filter: blur(12px) !important;
}

/* Board Detail toolbar sticky again */
html body .board-detail-page .board-tools-row {
    position: sticky !important;
    top: 92px !important;
    z-index: 80000 !important;

    margin-bottom: 28px !important;

    background: rgba(248, 245, 240, 0.94) !important;
    backdrop-filter: blur(12px) !important;
}

/* Make sure sticky bars do not hide under masonry cards */
html body .explore-page .wishlist-grid,
html body .boards-page .boards-grid,
html body .board-detail-page #sortable-products {
    position: relative !important;
    z-index: 1 !important;
}

/* Mobile sticky spacing */
@media (max-width: 768px) {
    html body .explore-page .explore-search-row,
    html body .boards-page > .search-expand-wrapper,
    html body .board-detail-page .board-tools-row {
        top: 78px !important;
    }
}

/* MATCH EXPLORE SEARCH WRAPPER TO MY BOARDS */

html body .explore-page .explore-search-row {
    background: #f3f3f2 !important;
    border: 1px solid #ddddda !important;
    border-radius: 999px !important;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.05) !important;
    backdrop-filter: none !important;
}

/* MATCH BOARD DETAIL TOOLBAR WRAPPER TO MY BOARDS */

html body .board-detail-page .board-tools-row {
    background: #f3f3f2 !important;
    border: 1px solid #ddddda !important;
    border-radius: 999px !important;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.05) !important;
    backdrop-filter: none !important;
}

/* Keep the inside controls clean */
html body .board-detail-page .board-tools-row .search-expand-wrapper,
html body .board-detail-page .board-tools-row .board-product-search-wrapper {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Give every masonry column a full-height drop zone, like boards' single
   grid, so dragging near the bottom of a shorter column doesn't land in
   dead space outside any column and lose the card. */
html body .board-detail-page #sortable-products {
    align-items: stretch !important;
}

/* =========================================================
   BOARD DETAIL DRAG FIX
   Stop Sortable + masonry from jumping/off-page
   ========================================================= */

html body .board-detail-page #sortable-products,
html body .board-detail-page .wishboard-masonry-column {
    overflow: visible !important;
}

html body .board-detail-page #sortable-products.is-sorting-products {
    pointer-events: auto !important;
}

html body .board-detail-page .drag-handle {
    position: absolute !important;
    top: 16px !important;
    right: 16px !important;
    z-index: 40 !important;

    width: 38px !important;
    height: 38px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 0 !important;

    border: none !important;
    border-radius: 999px !important;

    background: rgba(255, 255, 255, 0.92) !important;
    color: #111111 !important;

    font-size: 18px !important;
    font-weight: 900 !important;
    line-height: 1 !important;

    cursor: grab !important;
    user-select: none !important;
    touch-action: none !important;
}


html body .board-detail-page .sortable-ghost {
    opacity: 0.25 !important;
}

html body .board-detail-page .sortable-chosen {
    z-index: 99990 !important;
}

html body .board-detail-page .sortable-drag,
html body .board-detail-page .sortable-fallback {
    z-index: 999999 !important;
    opacity: 0.96 !important;
    pointer-events: none !important;
}

/* =========================================================
   BOARD DETAIL CONTROLLED DRAG
   Ghost stays under cursor and inside masonry outline
   ========================================================= */

html body .board-detail-page #sortable-products {
    position: relative !important;
    overflow: visible !important;
    contain: layout !important;
}

html body .board-detail-page .wishboard-masonry-column {
    overflow: visible !important;
}

html body .board-detail-page .drag-handle {
    position: absolute !important;
    top: 16px !important;
    right: 16px !important;
    z-index: 50 !important;

    width: 38px !important;
    height: 38px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 0 !important;

    border: none !important;
    border-radius: 999px !important;

    background: rgba(255, 255, 255, 0.92) !important;
    color: #111111 !important;

    font-size: 18px !important;
    font-weight: 900 !important;
    line-height: 1 !important;

    cursor: grab !important;

    user-select: none !important;
    -webkit-user-select: none !important;

    touch-action: none !important;
}

html body .board-detail-page .drag-handle:active {
    cursor: grabbing !important;
}

/* Original card stays in the masonry slot as a blank placeholder */
html body .board-detail-page .board-drag-source-hidden {
    opacity: 0.18 !important;
    pointer-events: none !important;
}

/* The visible dragged card */
html body .board-drag-ghost {
    position: fixed !important;
    z-index: 999999 !important;

    margin: 0 !important;

    opacity: 0.96 !important;
    pointer-events: none !important;

    transform: none !important;
    rotate: none !important;

    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22) !important;
}

/* Prevent text/image dragging during custom drag */
html body .board-detail-page #sortable-products.board-masonry-is-dragging,
html body .board-detail-page #sortable-products.board-masonry-is-dragging * {
    user-select: none !important;
    -webkit-user-select: none !important;
}

html body .board-detail-page #sortable-products img {
    -webkit-user-drag: none !important;
    user-drag: none !important;
}

/* =========================================================
   BOARD DETAIL DRAG VISUALS — HALFTONE, NO SCALE
   Keeps original card shape/size while dragging
   ========================================================= */

/* Original card placeholder stays in the grid as a halftone version */
html body .board-detail-page .board-drag-source-hidden {
    opacity: 0.32 !important;
    filter: grayscale(0.15) contrast(0.85) !important;
    transform: none !important;
    scale: 1 !important;
    pointer-events: none !important;
}

/* The card under the cursor stays exactly the same size/shape */
html body .board-drag-ghost {
    position: fixed !important;
    z-index: 999999 !important;

    margin: 0 !important;

    opacity: 0.62 !important;
    filter: grayscale(0.2) contrast(0.9) !important;

    transform: none !important;
    scale: 1 !important;
    rotate: 0deg !important;

    border-radius: 26px !important;
    overflow: hidden !important;

    pointer-events: none !important;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.14) !important;
}

/* Make sure inner card does not enlarge either */
html body .board-drag-ghost .product-card {
    transform: none !important;
    scale: 1 !important;
    width: 100% !important;
    max-width: 100% !important;

    border-radius: 26px !important;
    box-shadow: none !important;
}

/* Keep image shape stable */
html body .board-drag-ghost .product-card img {
    transform: none !important;
    scale: 1 !important;
}

/* Slightly quiet the selected card */
html body .board-detail-page #sortable-products.board-masonry-is-dragging .sortable-item {
    transition: opacity 0.12s ease !important;
}

/* Prevent any existing drag/chosen rules from rotating or enlarging */
html body .board-detail-page .sortable-chosen,
html body .board-detail-page .sortable-drag,
html body .board-detail-page .sortable-fallback {
    transform: none !important;
    scale: 1 !important;
    rotate: 0deg !important;
}

/* BOARD DETAIL DRAG GHOST — STYLE THREE-LINE HANDLE */

html body .board-drag-ghost .drag-handle {
    position: absolute !important;
    top: 16px !important;
    right: 16px !important;
    z-index: 50 !important;

    width: 38px !important;
    height: 38px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 0 !important;
    margin: 0 !important;

    border: none !important;
    border-radius: 999px !important;

    background: rgba(255, 255, 255, 0.88) !important;
    color: #111111 !important;

    font-family: inherit !important;
    font-size: 18px !important;
    font-weight: 900 !important;
    line-height: 1 !important;

    appearance: none !important;
    -webkit-appearance: none !important;

    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12) !important;

    cursor: grabbing !important;
    pointer-events: none !important;
}

/* Also keep the original hidden/halftone card handle styled */
html body .board-detail-page .board-drag-source-hidden .drag-handle {
    background: rgba(255, 255, 255, 0.72) !important;
    color: rgba(17, 17, 17, 0.55) !important;
    box-shadow: none !important;
}

/* BOARD DETAIL DRAG — SMOOTHER ROW MOVEMENT */
html body .board-detail-page #sortable-products.board-masonry-is-dragging .sortable-item {
    transition:
        opacity 0.1s ease,
        transform 0.1s ease !important;
}

html body .board-drag-ghost {
    transition: none !important;
}

/* BOARD DETAIL DRAG — AUTO SCROLL FEEL */
html body .board-detail-page #sortable-products.board-masonry-is-dragging {
    cursor: grabbing !important;
}

html body .board-drag-ghost {
    will-change: top, left !important;
}

/* =========================================================
   ALL MODALS — Z-INDEX + CENTERING
   Every modal backdrop must render above every other element
   on the page (navbar, sticky search bars, dropdowns, drag
   ghosts, etc.) and stay vertically centred with breathing
   room from the top/bottom edges rather than pinned to the
   top or overflowing off-screen. Because each backdrop is a
   fixed, full-viewport, semi-transparent overlay, rendering
   it above the navbar also has the effect of greying the
   navbar over while the modal is open.
   ========================================================= */

html body .delete-modal,
html body .auth-modal,
html body .filter-modal,
html body #navbarBoardOnlyModal.navbar-board-only-modal,
html body #addProductFinishModal.add-product-finish-modal,
html body #editProductFinishModal {
    z-index: 2147483000 !important;

    align-items: center !important;

    padding: 24px !important;
}

html body .delete-modal-card,
html body .auth-modal-card,
html body .filter-card,
html body .create-board-modal-card,
html body .navbar-board-only-modal-card {
    max-height: calc(100vh - 48px) !important;
    overflow-y: auto !important;
}

/* =========================================================
   STYLED DROPDOWNS
   Choose board + category selects
   ========================================================= */

html body select[name="board"],
html body select[name="category"],
html body #saveProductModal select[name="board"],
html body #saveProductFormFields select[name="board"],
html body .add-product-template-page select[name="board"],
html body .add-product-template-page select[name="category"],
html body .delete-modal select[name="board"],
html body .delete-modal select[name="category"],
html body .auth-modal select[name="board"],
html body .auth-modal select[name="category"] {
    width: 100% !important;
    height: 54px !important;

    padding: 0 48px 0 18px !important;

    border: 1px solid #ddddda !important;
    border-radius: 999px !important;

    background-color: #f3f3f2 !important;
    color: #111111 !important;

    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 750 !important;

    outline: none !important;
    box-shadow: none !important;

    cursor: pointer !important;

    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;

    background-image:
        linear-gradient(45deg, transparent 50%, #111111 50%),
        linear-gradient(135deg, #111111 50%, transparent 50%) !important;
    background-position:
        calc(100% - 24px) 23px,
        calc(100% - 17px) 23px !important;
    background-size:
        7px 7px,
        7px 7px !important;
    background-repeat: no-repeat !important;
}

html body select[name="board"]:hover,
html body select[name="category"]:hover,
html body #saveProductModal select[name="board"]:hover,
html body #saveProductFormFields select[name="board"]:hover,
html body .add-product-template-page select[name="board"]:hover,
html body .add-product-template-page select[name="category"]:hover,
html body .delete-modal select[name="board"]:hover,
html body .delete-modal select[name="category"]:hover {
    background-color: #ffffff !important;
    border-color: #cfcfcb !important;
}

html body select[name="board"]:focus,
html body select[name="category"]:focus,
html body #saveProductModal select[name="board"]:focus,
html body #saveProductFormFields select[name="board"]:focus,
html body .add-product-template-page select[name="board"]:focus,
html body .add-product-template-page select[name="category"]:focus,
html body .delete-modal select[name="board"]:focus,
html body .delete-modal select[name="category"]:focus {
    background-color: #ffffff !important;
    border-color: #111111 !important;
    box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08) !important;
}

/* Dropdown options — browser support varies, but this helps where supported */
html body select[name="board"] option,
html body select[name="category"] option {
    background: #ffffff !important;
    color: #111111 !important;
    font-weight: 650 !important;
}

/* Labels above board/category dropdowns */
html body #saveProductModal label,
html body .add-product-template-page label,
html body .delete-modal label {
    color: #111111 !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    letter-spacing: 0.04em !important;
}

/* CUSTOM DROPDOWN LIST — NOT NATIVE SELECT */

html body .custom-select {
    position: relative !important;
    width: 100% !important;
    z-index: 60 !important;
}

html body .custom-select-button {
    width: 100% !important;
    height: 54px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;

    padding: 0 18px !important;

    border: 1px solid #ddddda !important;
    border-radius: 999px !important;

    background: #f3f3f2 !important;
    color: #111111 !important;

    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 750 !important;

    cursor: pointer !important;
}

html body .custom-select-button::after {
    content: "⌄" !important;
    margin-left: auto !important;
    font-size: 18px !important;
    line-height: 1 !important;
}

html body .custom-select.is-open .custom-select-button {
    background: #ffffff !important;
    border-color: #111111 !important;
    box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08) !important;
}

html body .custom-select-list {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 99999 !important;

    display: none !important;

    padding: 8px !important;

    background: #ffffff !important;
    border: 1px solid #ddddda !important;
    border-radius: 22px !important;

    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.14) !important;

    overflow: hidden !important;
}

html body .custom-select.is-open .custom-select-list {
    display: block !important;
}

html body .custom-select-list button {
    width: 100% !important;
    height: 42px !important;

    display: flex !important;
    align-items: center !important;

    padding: 0 14px !important;

    border: none !important;
    border-radius: 14px !important;

    background: transparent !important;
    color: #111111 !important;

    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 750 !important;
    text-align: left !important;

    cursor: pointer !important;
}

html body .custom-select-list button:hover {
    background: #f3f3f2 !important;
}

html body .custom-select-list button.is-selected {
    background: #111111 !important;
    color: #ffffff !important;
}

html body .custom-select.is-disabled .custom-select-button {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* BOARD DETAIL — ONLY MOVE BUTTON GETS DRAG CURSOR */

html body .board-detail-page .sortable-item,
html body .board-detail-page .sortable-item *,
html body .board-detail-page .product-card,
html body .board-detail-page .product-card * {
    cursor: pointer !important;
}

/* Three-line move button only */
html body .board-detail-page .drag-handle,
html body .board-detail-page .drag-handle * {
    cursor: grab !important;
}

html body .board-detail-page .drag-handle:active,
html body .board-detail-page .drag-handle:active * {
    cursor: grabbing !important;
}

/* Keep menu controls normal */
html body .board-detail-page .product-menu-button,
html body .board-detail-page .product-menu-button *,
html body .board-detail-page .product-menu,
html body .board-detail-page .product-menu *,
html body .board-detail-page button:not(.drag-handle),
html body .board-detail-page a {
    cursor: pointer !important;
}

/* =========================================================
   ADD PRODUCT PHOTO ADJUSTMENT
   Drag / zoom / crop preview
   ========================================================= */

html body .add-product-template-image-panel {
    overflow: hidden !important;
    cursor: default !important;
}

html body .add-product-template-image-panel.is-adjusting-photo {
    cursor: grabbing !important;
}

html body .add-product-template-preview {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;

    max-width: none !important;
    max-height: none !important;

    transform: translate(-50%, -50%) scale(1);
    transform-origin: center center !important;

    user-select: none !important;
    -webkit-user-drag: none !important;

    cursor: grab !important;
}

html body .add-product-template-image-panel.is-adjusting-photo .add-product-template-preview {
    cursor: grabbing !important;
}

/* Let the image be dragged after upload */
html body .add-product-camera-upload.has-image {
    pointer-events: none !important;
}

html body .add-product-photo-controls {
    position: absolute !important;
    left: 18px !important;
    right: 18px !important;
    bottom: 18px !important;
    z-index: 40 !important;

    display: none;
    flex-direction: column !important;
    gap: 8px !important;

    padding: 12px !important;

    border-radius: 22px !important;

    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(12px) !important;

    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.12) !important;
}

html body .add-product-photo-controls span {
    color: #111111 !important;
    font-size: 12px !important;
    font-weight: 850 !important;
    text-align: center !important;
}

html body .add-product-photo-zoom-row {
    width: 100% !important;

    display: grid !important;
    grid-template-columns: 34px 1fr 34px !important;
    gap: 8px !important;
    align-items: center !important;
}

html body .add-product-photo-zoom-row button,
html body .add-product-photo-controls #addProductPhotoReset,
html body .add-product-photo-change {
    height: 34px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    border: none !important;
    border-radius: 999px !important;

    background: #f3f3f2 !important;
    color: #111111 !important;

    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 850 !important;

    cursor: pointer !important;
}

html body .add-product-photo-controls #addProductPhotoReset,
html body .add-product-photo-change {
    width: 100% !important;
}

html body .add-product-photo-change {
    margin: 0 !important;
    text-decoration: none !important;
}

html body #addProductPhotoZoom {
    width: 100% !important;
    accent-color: #111111 !important;
    cursor: pointer !important;
}

/* =========================================================
   ADD PRODUCT IMAGE CROPPER — PROFILE STYLE
   Drag / pinch zoom / hover grid / edit icon
   ========================================================= */

html body .add-product-template-image-panel {
    position: relative !important;
    overflow: hidden !important;
    background: #f3f3f2 !important;
    cursor: default !important;
    touch-action: none !important;
}

/* Remove old grey hover overlay completely */
html body .add-product-camera-upload,
html body .add-product-camera-upload.has-image,
html body .add-product-template-image-panel:hover .add-product-camera-upload.has-image {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    background: transparent !important;
    backdrop-filter: none !important;
}

/* Empty state only before an image exists */
html body .add-product-empty-photo-prompt {
    position: absolute !important;
    inset: 0 !important;
    z-index: 20 !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;

    color: #111111 !important;
    cursor: pointer !important;
}

html body .add-product-empty-photo-prompt svg {
    width: 46px !important;
    height: 46px !important;
    stroke: #111111 !important;
}

html body .add-product-empty-photo-prompt span {
    font-size: 15px !important;
    font-weight: 850 !important;
}

/* Edit icon top-right */
html body .add-product-image-edit-button {
    position: absolute !important;
    top: 18px !important;
    right: 18px !important;
    z-index: 60 !important;

    width: 34px !important;
    height: 34px !important;

    display: none !important;
    align-items: center !important;
    justify-content: center !important;

    margin: 0 !important;
    padding: 0 !important;

    border: none !important;
    border-radius: 999px !important;

    background: rgba(255, 255, 255, 0.92) !important;
    color: #111111 !important;

    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12) !important;

    cursor: pointer !important;
}

html body .add-product-template-image-panel.has-image .add-product-image-edit-button {
    display: flex !important;
}

/* Once a photo exists, the "Add photo" overlay is fully replaced by the
   edit (photo) button — never show both at once. */
html body .add-product-template-image-panel.has-image .add-product-empty-photo-prompt {
    display: none !important;
}

html body .add-product-image-edit-button svg {
    width: 15px !important;
    height: 15px !important;
    stroke: #111111 !important;
}

/* Preview image */
html body .add-product-template-preview {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;

    max-width: none !important;
    max-height: none !important;

    display: none;

    transform: translate(-50%, -50%) scale(1);
    transform-origin: center center !important;

    user-select: none !important;
    -webkit-user-drag: none !important;

    cursor: grab !important;
}

html body .add-product-template-image-panel.has-image {
    cursor: grab !important;
}

html body .add-product-template-image-panel.is-adjusting-photo,
html body .add-product-template-image-panel.is-adjusting-photo .add-product-template-preview {
    cursor: grabbing !important;
}

/* ---------- Photo background colour picker ---------- */
/* Instagram-story-style picker: only shown once JS
   (updateBgColorButtonVisibility, see add_product.html / edit_product.html)
   detects the photo doesn't fully cover the window - there's nothing to
   recolour when the photo already fills the whole panel. Sits in the same
   top row as, and directly to the left of, the edit (photo) button so the
   two read as one toolbar. No icon - the button itself IS a swatch of
   whatever the current background colour is (set via setDeckdBgColor in
   base.html, matched by the same white ring the palette options below
   use), so the button always shows what you'll actually get. */
html body .add-product-bg-color-button {
    position: absolute !important;
    top: 18px !important;
    right: 60px !important;
    z-index: 60 !important;

    width: 34px !important;
    height: 34px !important;

    display: none !important;
    align-items: center !important;
    justify-content: center !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 1.5px solid rgba(255, 255, 255, 0.92) !important;
    border-radius: 999px !important;

    background: #f3f3f2 !important;
    color: #111111 !important;

    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12) !important;

    cursor: pointer !important;
}

html body .add-product-template-image-panel.show-bg-color-button .add-product-bg-color-button {
    display: flex !important;
}

/* Expanding row of colour options - anchored by its right edge (pinned
   just left of the trigger button) with no fixed width, so adding swatches
   naturally pushes the row's own left edge further left instead of
   growing downward like a dropdown. `overflow-x: auto` is a safety net on
   narrow panels rather than a primary interaction - it lets the row
   scroll instead of overflowing the card if it ever runs out of room. */
html body .add-product-bg-color-menu {
    position: absolute !important;
    top: 18px !important;
    right: 102px !important;
    z-index: 61 !important;

    display: none;
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important;

    max-width: calc(100% - 124px) !important;
    padding: 3px !important;

    background: transparent !important;
    border-radius: 999px !important;

    overflow-x: auto !important;
    /* Belt-and-braces for "swipe to see the rest" on narrow panels where
       not every swatch fits: native touch drag already works on an
       overflow-x:auto row, this just makes sure nothing here blocks it
       (touch-action) or fights it with an accidental vertical/elastic
       bounce (overscroll-behavior-x), plus a smooth landing for the
       wheel-scroll/drag-to-scroll fallbacks wired up in
       enableDeckdHorizontalScroll below for mouse/trackpad use. */
    touch-action: pan-x !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-x: contain !important;
    scroll-behavior: smooth !important;
    cursor: grab !important;
    scrollbar-width: none !important;
}

html body .add-product-bg-color-menu::-webkit-scrollbar {
    display: none !important;
}

html body .add-product-bg-color-menu.is-open {
    display: flex;
}

/* Base circle shared by every option in the row: the neutral presets, the
   eyedropper, and the "choose any colour" swatch. */
html body .add-product-bg-color-swatch {
    width: 22px !important;
    height: 22px !important;
    flex: 0 0 auto !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 1.5px solid rgba(255, 255, 255, 0.92) !important;
    border-radius: 50% !important;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;

    cursor: pointer !important;
    transition: transform 0.12s ease !important;
}

html body .add-product-bg-color-swatch:hover {
    transform: scale(1.08) !important;
}

html body .add-product-bg-color-swatch:active {
    transform: scale(0.94) !important;
}

/* "Sample from photo" - the actual eyedropper/pipette tool icon, recast as
   a frosted circle to match the preset swatches either side of it. */
html body .add-product-bg-color-eyedropper {
    background: rgba(255, 255, 255, 0.92) !important;
    color: #111111 !important;
}

html body .add-product-bg-color-eyedropper svg {
    width: 12px !important;
    height: 12px !important;
    stroke: currentColor !important;
}

/* "Choose any colour" - a fixed rainbow ring around a white centre with
   a black "+" (matching the deck/collage editors' own custom colour
   swatch - see .ribbon-color-custom-swatch further down), rather than a
   flat spectrum circle, since it now opens the same kind of rich SV/
   hue/hex picker popover below instead of the browser's plain native
   colour dialog (see setupAddProductCustomColorPicker in base.html).
   The ring is a nested .add-product-bg-color-custom-ring rather than
   this element's own background: painting the conic-gradient directly
   at this swatch's small 22px size leaves faint seams at each colour
   stop, most visible right at the outer edge since the ring reads as
   only a couple of px wide - rendering it 3x oversized and scaling
   back down with `transform` forces the browser to anti-alias across
   those seams instead of rasterising them at (visible) native size. */
html body .add-product-bg-color-custom {
    position: relative !important;
    overflow: hidden !important;

    background: none !important;
}

html body .add-product-bg-color-custom-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    transform: translate(-50%, -50%) scale(0.3334);

    background:
        radial-gradient(circle at center, #ffffff 23.5px, transparent 24px),
        conic-gradient(
            from 180deg,
            hsl(0, 85%, 65%), hsl(30, 85%, 65%), hsl(60, 85%, 65%), hsl(90, 85%, 65%),
            hsl(120, 85%, 65%), hsl(150, 85%, 65%), hsl(180, 85%, 65%), hsl(210, 85%, 65%),
            hsl(240, 85%, 65%), hsl(270, 85%, 65%), hsl(300, 85%, 65%), hsl(330, 85%, 65%),
            hsl(360, 85%, 65%)
        );
}

html body .add-product-bg-color-custom::after {
    content: '' !important;

    position: absolute !important;
    inset: 0 !important;

    background:
        linear-gradient(#1f1f1f, #1f1f1f) center / 1.2px 8.5px no-repeat,
        linear-gradient(#1f1f1f, #1f1f1f) center / 8.5px 1.2px no-repeat !important;
}

/* Trigger + popover wrapper (see _add_product_custom_color_picker.html)
   - position: relative purely as a safety net, since the popover is
   always reparented to <body> (position: fixed) before it's ever shown
   - see setupAddProductCustomColorPicker. */
html body .add-product-bg-color-custom-dropdown {
    position: relative !important;
    flex: 0 0 auto !important;
}

/* The rich picker popover itself - a plain top-level menu (not nested
   under .add-product-bg-color-menu) since it's reparented to <body>
   once opened, same reasoning as deck/collage's own
   .ribbon-custom-picker-menu: this swatch lives inside the pill row's
   own narrow, overflow-x: auto flex container, which would otherwise
   clip it. No eyedropper row here (unlike that shared component) - see
   _add_product_custom_color_picker.html's own comment on why. */
html body .add-product-bg-color-custom-menu {
    display: none;
    position: absolute;
    z-index: 99999 !important;

    width: 220px;
    padding: 14px;

    background: #ffffff !important;
    border-radius: 16px !important;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.25) !important;

    cursor: default;
}

html body .add-product-bg-color-custom-menu.is-open {
    display: block;
}

html body .add-product-bg-color-custom-sv {
    position: relative !important;

    width: 100% !important;
    height: 130px !important;
    margin: 0 0 12px !important;

    border-radius: 10px !important;
    /* Hue itself is set inline (background-color) by JS - these two
       layers give the standard saturation (white->transparent,
       left->right) / value (black->transparent, bottom->top) picking
       surface on top of it. */
    background-image:
        linear-gradient(to top, #000000, transparent),
        linear-gradient(to right, #ffffff, transparent) !important;

    cursor: pointer !important;
    touch-action: none !important;
}

html body .add-product-bg-color-custom-sv-handle {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 16px !important;
    height: 16px !important;
    margin: 0 !important;

    border-radius: 50% !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 1px 4px rgba(0, 0, 0, 0.3) !important;

    transform: translate(-50%, -50%) !important;
    pointer-events: none !important;
}

html body .add-product-bg-color-custom-hue {
    position: relative !important;

    width: 100% !important;
    height: 14px !important;
    margin: 0 0 12px !important;

    border-radius: 999px !important;
    background: linear-gradient(
        to right,
        #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000
    ) !important;

    cursor: pointer !important;
    touch-action: none !important;
}

html body .add-product-bg-color-custom-hue-handle {
    position: absolute !important;
    left: 0 !important;
    top: 50% !important;
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;

    border-radius: 50% !important;
    background: #ffffff !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 1px 4px rgba(0, 0, 0, 0.3) !important;

    transform: translate(-50%, -50%) !important;
    pointer-events: none !important;
}

html body .add-product-bg-color-custom-hex-input {
    width: 100% !important;
    padding: 7px 10px !important;
    margin: 0 !important;

    background: #f3f3f2 !important;
    border: 1px solid #e2e2df !important;
    border-radius: 8px !important;

    color: #1f1f1f !important;

    font-family: inherit !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em !important;
    text-transform: uppercase !important;

    box-shadow: none !important;
    cursor: text !important;
}

html body .add-product-bg-color-custom-hex-input:focus {
    outline: none !important;
    border-color: #1f1f1f !important;
}

/* Eyedropper mode: the real cursor is hidden in favour of the magnifier
   loupe below (see activateEyedropper in base.html), which already carries
   its own crosshair - cleared the moment a sample is taken (or cancelled). */
html body .add-product-template-image-panel.is-picking-color,
html body .add-product-template-image-panel.is-picking-color .add-product-template-preview {
    cursor: none !important;
}

/* Magnifier loupe that follows the cursor while sampling a colour from the
   photo - shows a zoomed-in crop of whatever's directly under the cursor,
   with a small crosshair pinpointing the exact pixel that would be picked.
   Fixed-positioned (not a child of the image panel) so it can float freely
   over the whole viewport, including past the panel's own edges. */
html body .deckd-eyedropper-loupe {
    position: fixed !important;
    z-index: 2147483000 !important;
    pointer-events: none !important;

    width: 34px !important;
    height: 34px !important;
    margin: 0 !important;
    padding: 0 !important;

    border: 1.5px solid #ffffff !important;
    border-radius: 50% !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(0, 0, 0, 0.1) !important;

    overflow: hidden !important;

    opacity: 0;
    transition: opacity 0.1s ease !important;
}

html body .deckd-eyedropper-loupe.is-visible {
    opacity: 1;
}

html body .deckd-eyedropper-loupe canvas {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    image-rendering: pixelated !important;
}

/* Crosshair pinpointing the exact centre pixel the loupe is zoomed on -
   dark+light double ring so it stays visible against any photo colour. */
html body .deckd-eyedropper-loupe::after {
    content: "" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;

    width: 4px !important;
    height: 4px !important;
    margin: -2px 0 0 -2px !important;

    border: 1.5px solid rgba(255, 255, 255, 0.95) !important;
    border-radius: 50% !important;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5) !important;

    pointer-events: none !important;
}

/* Hover grid, profile-picture style */
html body .add-product-image-grid {
    position: absolute !important;
    inset: 0 !important;
    z-index: 45 !important;

    opacity: 0 !important;
    pointer-events: none !important;

    background-image:
        linear-gradient(to right, rgba(255,255,255,0.55) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.55) 1px, transparent 1px) !important;

    background-size:
        33.333% 100%,
        100% 33.333% !important;

    transition: opacity 0.15s ease !important;
}

html body .add-product-template-image-panel.has-image:hover .add-product-image-grid,
html body .add-product-template-image-panel.is-adjusting-photo .add-product-image-grid {
    opacity: 1 !important;
}

/* Keep hidden file input hidden */
html body #image-upload {
    display: none !important;
}

/* =========================================================
   MOVE SEARCH / TOOL BARS CLOSER TO NAVBAR
   Explore / My Boards / Board Detail
   ========================================================= */

html body .explore-page {
    padding-top: 18px !important;
}

html body .boards-page {
    padding-top: 18px !important;
}

html body .board-detail-page {
    padding-top: 18px !important;
}

/* Remove old empty header/title spacing */
html body .explore-page .explore-header,
html body .boards-page .boards-header {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
}

/* Search/tool bars sit near navbar immediately */
html body .explore-page .explore-search-row,
html body .boards-page > .search-expand-wrapper,
html body .board-detail-page .board-tools-row {
    margin-top: 0 !important;
    margin-bottom: 28px !important;
}

/* Sticky position stays close to navbar while scrolling */
html body .explore-page .explore-search-row,
html body .boards-page > .search-expand-wrapper,
html body .board-detail-page .board-tools-row {
    top: 84px !important;
}

@media (max-width: 768px) {
    html body .explore-page,
    html body .boards-page,
    html body .board-detail-page {
        padding-top: 12px !important;
    }

    html body .explore-page .explore-search-row,
    html body .boards-page > .search-expand-wrapper,
    html body .board-detail-page .board-tools-row {
        top: 72px !important;
        margin-bottom: 22px !important;
    }
}

/* Board detail tools dropdown + budget planner polish
   Paste at the bottom of wishlist/static/wishlist/style.css
*/

.board-detail-page {
    --board-tool-surface: rgba(255, 255, 255, 0.96);
    --board-tool-border: rgba(17, 17, 17, 0.08);
    --board-tool-shadow: 0 22px 65px rgba(15, 15, 15, 0.14);
    --board-tool-soft-shadow: 0 14px 35px rgba(15, 15, 15, 0.08);
    --board-tool-muted: rgba(17, 17, 17, 0.58);
    --board-tool-soft: rgba(17, 17, 17, 0.045);
    --board-tool-strong: rgba(17, 17, 17, 0.9);
}

.board-tools-row {
    position: relative;
    align-items: center;
    gap: 14px;
}

.board-tools-dropdown {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    justify-content: center;
    z-index: 70;
}

.board-tools-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid var(--board-tool-border);
    border-radius: 999px;
    background: var(--board-tool-surface);
    color: var(--board-tool-strong);
    font: inherit;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--board-tool-soft-shadow);
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.board-tools-toggle:hover,
.board-tools-dropdown.is-open .board-tools-toggle {
    transform: translateY(-1px);
    box-shadow: var(--board-tool-shadow);
}

.board-tools-toggle-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--board-tool-soft);
    font-size: 13px;
}

.board-tools-toggle-chevron {
    font-size: 16px;
    transform: translateY(-1px);
    transition: transform 160ms ease;
}

.board-tools-dropdown.is-open .board-tools-toggle-chevron {
    transform: rotate(180deg) translateY(1px);
}

.board-tools-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    width: min(92vw, 390px);
    padding: 14px;
    border: 1px solid var(--board-tool-border);
    border-radius: 24px;
    background: var(--board-tool-surface);
    box-shadow: var(--board-tool-shadow);
    backdrop-filter: blur(18px);
    transform: translateX(-50%);
}

.board-tools-dropdown.is-open .board-tools-dropdown-menu {
    display: block;
    animation: boardToolsDropIn 180ms ease both;
}

@keyframes boardToolsDropIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-6px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

.board-tools-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 4px 4px 12px;
}

.board-tools-menu-header p {
    margin: 0 0 3px;
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--board-tool-strong);
}

.board-tools-menu-header span {
    display: block;
    font-size: 0.78rem;
    color: var(--board-tool-muted);
}

.board-tools-menu-close,
.board-panel-close-button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: var(--board-tool-soft);
    color: var(--board-tool-strong);
    font: inherit;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease;
}

.board-tools-menu-close:hover,
.board-panel-close-button:hover {
    transform: scale(1.04);
    background: rgba(17, 17, 17, 0.08);
}

.board-tools-menu-form {
    margin: 0;
}

.board-tool-card {
    width: 100%;
    min-height: 86px;
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin: 0 0 10px;
    padding: 11px;
    border: 1px solid var(--board-tool-border);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.7);
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(17, 17, 17, 0.045);
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.board-tool-card:last-child {
    margin-bottom: 0;
}

.board-tool-card:hover,
.board-tool-card.is-active,
.board-tool-card-checkbox:has(input:checked) {
    transform: translateY(-1px);
    border-color: rgba(17, 17, 17, 0.16);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 16px 34px rgba(17, 17, 17, 0.09);
}

.board-tool-card-visual {
    position: relative;
    width: 74px;
    height: 62px;
    overflow: hidden;
    border-radius: 17px;
    background: linear-gradient(135deg, rgba(17, 17, 17, 0.075), rgba(17, 17, 17, 0.025));
}

.board-tool-mini-card {
    position: absolute;
    display: block;
    width: 32px;
    height: 40px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(17, 17, 17, 0.16);
}

.board-tool-card-visual-filter .board-tool-mini-card:nth-child(1) {
    left: 9px;
    top: 11px;
}

.board-tool-card-visual-filter .board-tool-mini-card:nth-child(2) {
    left: 29px;
    top: 8px;
}

.board-tool-card-visual-filter .board-tool-mini-card-hidden {
    right: 8px;
    bottom: -10px;
    opacity: 0.34;
    transform: rotate(9deg);
}

.board-tool-card-visual-organise .board-tool-mini-card {
    right: 9px;
    top: 9px;
}

.board-tool-card-visual-organise .board-tool-mini-card-offset {
    right: 28px;
    top: 19px;
    transform: rotate(-7deg);
}

.board-tool-drag-lines {
    position: absolute;
    left: 10px;
    top: 19px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 7px 16px rgba(17, 17, 17, 0.12);
    font-size: 18px;
    z-index: 2;
}

.board-tool-budget-total {
    position: absolute;
    left: 11px;
    top: 10px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(17, 17, 17, 0.14);
    font-weight: 900;
    z-index: 2;
}

.board-tool-card-visual-budget .board-tool-mini-card {
    right: 11px;
    top: 10px;
}

.board-tool-card-visual-budget .board-tool-mini-card-small {
    right: 31px;
    top: 27px;
    width: 25px;
    height: 30px;
    opacity: 0.9;
    transform: rotate(-8deg);
}

.board-tool-card-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.board-tool-card-copy strong {
    color: var(--board-tool-strong);
    font-size: 0.96rem;
    line-height: 1.15;
}

.board-tool-card-copy small {
    color: var(--board-tool-muted);
    font-size: 0.78rem;
    line-height: 1.3;
}

.board-tool-card-arrow {
    color: var(--board-tool-muted);
    font-weight: 800;
}

.board-tool-card-control {
    position: relative;
    width: 44px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    border-radius: 999px;
    background: rgba(17, 17, 17, 0.13);
    transition: background 160ms ease;
}

.board-tool-card-control input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.board-tool-card-control span {
    width: 20px;
    height: 20px;
    margin-left: 3px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 3px 8px rgba(17, 17, 17, 0.18);
    transition: transform 160ms ease;
}

.board-tool-card-control input:checked + span {
    transform: translateX(18px);
}

.board-tool-card-checkbox:has(input:checked) .board-tool-card-control {
    background: rgba(17, 17, 17, 0.85);
}


.board-detail-page.organise-mode .drag-handle {
    display: inline-flex;
}

.board-detail-page.organise-mode .sortable-item {
    cursor: grab;
}



.board-organise-banner {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 14px auto 22px;
    padding: 12px 14px 12px 18px;
    border: 1px solid var(--board-tool-border);
    border-radius: 999px;
    background: var(--board-tool-surface);
    box-shadow: var(--board-tool-soft-shadow);
}

.board-organise-banner.is-open {
    display: flex;
}

.board-organise-banner div {
    display: grid;
    gap: 2px;
}

.board-organise-banner strong {
    font-size: 0.92rem;
}

.board-organise-banner span {
    color: var(--board-tool-muted);
    font-size: 0.8rem;
}

.board-organise-done-button {
    white-space: nowrap;
}

.board-budget-panel {
    display: none;
}

.board-budget-panel.is-open {
    display: block;
    animation: boardBudgetRise 190ms ease both;
}

@keyframes boardBudgetRise {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.board-budget-shell {
    padding: clamp(18px, 3vw, 26px);
    border: 1px solid var(--board-tool-border);
    border-radius: 28px;
    background: radial-gradient(circle at top left, rgba(17, 17, 17, 0.05), transparent 30%), var(--board-tool-surface);
    box-shadow: var(--board-tool-shadow);
}

.board-budget-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
}

.board-panel-eyebrow {
    margin: 0 0 6px;
    color: var(--board-tool-muted);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.board-budget-panel h2 {
    margin: 0 0 6px;
    font-size: clamp(1.4rem, 3vw, 2rem);
}

.board-budget-panel-header p:not(.board-panel-eyebrow) {
    max-width: 620px;
    margin: 0;
    color: var(--board-tool-muted);
    line-height: 1.45;
}

.board-budget-form {
    display: flex;
    gap: 10px;
    align-items: stretch;
    margin-top: 18px;
}

.board-budget-input {
    flex: 1;
    min-width: 0;
    padding: 13px 16px;
    border: 1px solid var(--board-tool-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: inherit;
    font: inherit;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.board-budget-input:focus {
    outline: none;
    border-color: rgba(17, 17, 17, 0.24);
    box-shadow: 0 0 0 4px rgba(17, 17, 17, 0.06);
}

.board-budget-submit-button {
    white-space: nowrap;
}

.board-budget-helper {
    margin: 10px 3px 0;
    color: var(--board-tool-muted);
    font-size: 0.8rem;
}

.board-budget-results {
    margin-top: 18px;
}

.board-budget-summary {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(17, 17, 17, 0.055);
    font-weight: 700;
}

.board-budget-empty,
.board-budget-warning {
    margin: 0;
    padding: 13px 15px;
    border-radius: 16px;
    background: rgba(17, 17, 17, 0.055);
    color: var(--board-tool-strong);
}

.board-budget-combination {
    padding: 14px;
    margin-top: 12px;
    border: 1px solid var(--board-tool-border);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 10px 28px rgba(17, 17, 17, 0.055);
}

.board-budget-combination-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.board-budget-combination-heading h3 {
    margin: 0;
    font-size: 1rem;
}

.board-budget-combination-heading span {
    color: var(--board-tool-muted);
    font-size: 0.84rem;
    font-weight: 700;
    white-space: nowrap;
}

.board-budget-mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 10px;
}

.board-budget-mini-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 8px;
    border: 1px solid var(--board-tool-border);
    border-radius: 16px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(17, 17, 17, 0.05);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.board-budget-mini-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(17, 17, 17, 0.09);
}

.board-budget-mini-card-media {
    width: 54px;
    height: 62px;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(17, 17, 17, 0.055);
}

.board-budget-mini-card-media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.board-budget-mini-card-media-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--board-tool-muted);
    font-size: 1.3rem;
}

.board-budget-mini-card-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.board-budget-mini-card-copy strong {
    overflow: hidden;
    color: var(--board-tool-strong);
    font-size: 0.82rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-budget-mini-card-copy span {
    color: var(--board-tool-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

@media (min-width: 900px) {
    .board-tools-row {
        display: grid;
        grid-template-columns: minmax(140px, 1fr) minmax(260px, 560px) minmax(140px, 1fr);
    }

    .board-tools-dropdown {
        justify-self: end;
    }

    .desktop-board-search {
        justify-self: center;
        width: 100%;
    }

    .board-tools-actions {
        justify-self: start;
    }
}

@media (max-width: 760px) {
    .board-tools-row {
        justify-content: center;
    }

    .board-tools-dropdown {
        order: 2;
    }

    .board-tools-actions {
        order: 1;
    }

    .board-tools-dropdown-menu {
        width: min(94vw, 360px);
    }

    .board-tool-card {
        grid-template-columns: 64px minmax(0, 1fr) auto;
        min-height: 78px;
    }

    .board-tool-card-visual {
        width: 64px;
        height: 56px;
    }

    .board-budget-form {
        flex-direction: column;
    }

    .board-organise-banner {
        align-items: flex-start;
        border-radius: 22px;
        flex-direction: column;
    }

    .board-organise-done-button {
        width: 100%;
    }

    .board-budget-combination-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .board-budget-combination-heading span {
        white-space: normal;
    }
}

/* =========================================================
   Board detail Tools + Budget final polish
   Paste this at the very bottom of style.css.
   It overrides the earlier Tools/Budget add-on safely.
   ========================================================= */

.board-detail-page {
    --board-tool-surface: rgba(255, 255, 255, 0.97);
    --board-tool-border: rgba(31, 31, 31, 0.08);
    --board-tool-shadow: 0 22px 65px rgba(31, 31, 31, 0.13);
    --board-tool-soft-shadow: 0 12px 30px rgba(31, 31, 31, 0.06);
    --board-tool-muted: #8a7f73;
    --board-tool-soft: #f4efe8;
    --board-tool-strong: #1f1f1f;
}

/* Keep the toolbar centred, tidy, and inside the page */
.board-detail-page .board-tools-row {
    position: sticky !important;
    top: 92px !important;
    z-index: 850 !important;

    width: 100% !important;
    max-width: 1120px !important;
    margin: 18px auto 28px !important;
    padding: 12px !important;

    display: grid !important;
    grid-template-columns: minmax(86px, 120px) minmax(0, 560px) minmax(160px, auto) !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;

    overflow: visible !important;

    border-radius: 999px !important;
    background: rgba(248, 245, 240, 0.94) !important;
    backdrop-filter: blur(12px) !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.04) !important;
}

.board-detail-page .board-tools-dropdown {
    position: static !important;
    display: inline-flex !important;
    justify-self: center !important;
    justify-content: center !important;
    z-index: 80 !important;
}

.board-detail-page .board-tools-toggle {
    min-width: 88px !important;
    min-height: 44px !important;
    padding: 0 18px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;

    border: 1px solid var(--board-tool-border) !important;
    border-radius: 999px !important;

    background: white !important;
    color: var(--board-tool-strong) !important;

    font-size: 14px !important;
    font-weight: 900 !important;
    letter-spacing: 0.01em !important;
    line-height: 1 !important;

    box-shadow: var(--board-tool-soft-shadow) !important;
    cursor: pointer !important;
}

.board-detail-page .board-tools-toggle:hover,
.board-detail-page .board-tools-dropdown.is-open .board-tools-toggle {
    transform: translateY(-1px) !important;
    box-shadow: var(--board-tool-shadow) !important;
}

/* Remove the Tools arrow/icon and any option icons/arrows from older markup */
.board-detail-page .board-tools-toggle-icon,
.board-detail-page .board-tools-toggle-chevron,
.board-detail-page .board-tool-card-visual,
.board-detail-page .board-tool-card-arrow {
    display: none !important;
}

.board-detail-page .board-tools-dropdown-menu {
    display: none !important;
    position: absolute !important;
    top: calc(100% + 14px) !important;
    left: 50% !important;
    right: auto !important;
    z-index: 1200 !important;

    width: min(820px, calc(100vw - 48px)) !important;
    max-width: calc(100vw - 48px) !important;
    padding: 16px !important;

    border: 1px solid var(--board-tool-border) !important;
    border-radius: 28px !important;

    background: var(--board-tool-surface) !important;
    backdrop-filter: blur(18px) !important;
    box-shadow: var(--board-tool-shadow) !important;

    transform: translateX(-50%) !important;
}

.board-detail-page .board-tools-dropdown.is-open .board-tools-dropdown-menu {
    display: block !important;
    animation: boardToolsFinalDropIn 180ms ease both !important;
}

@keyframes boardToolsFinalDropIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-6px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

.board-detail-page .board-tools-menu-header {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 14px !important;

    padding: 2px 4px 14px !important;
}

.board-detail-page .board-tools-menu-header p {
    margin: 0 0 4px !important;

    color: var(--board-tool-strong) !important;

    font-size: 15px !important;
    font-weight: 900 !important;
}

.board-detail-page .board-tools-menu-header span {
    display: block !important;

    color: var(--board-tool-muted) !important;

    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
}

.board-detail-page .board-tools-menu-close,
.board-detail-page .board-panel-close-button {
    width: 34px !important;
    height: 34px !important;
    flex: 0 0 34px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;

    background: var(--board-tool-soft) !important;
    color: var(--board-tool-strong) !important;

    font-size: 22px !important;
    font-weight: 800 !important;
    line-height: 1 !important;

    cursor: pointer !important;
}

.board-detail-page .board-tools-menu-options {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px !important;
}

.board-detail-page .board-tools-menu-form {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.board-detail-page .board-tool-card {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 96px !important;
    margin: 0 !important;
    padding: 15px 16px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;

    border: 1px solid var(--board-tool-border) !important;
    border-radius: 22px !important;

    background: white !important;
    color: var(--board-tool-strong) !important;

    font: inherit !important;
    text-align: left !important;
    text-decoration: none !important;

    box-shadow: 0 10px 24px rgba(31, 31, 31, 0.045) !important;
    cursor: pointer !important;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease !important;
}

.board-detail-page .board-tool-card:hover,
.board-detail-page .board-tool-card.is-active,
.board-detail-page .board-tool-card-checkbox:has(input:checked) {
    transform: translateY(-2px) !important;
    border-color: rgba(31, 31, 31, 0.18) !important;
    background: #fffdf9 !important;
    box-shadow: 0 18px 36px rgba(31, 31, 31, 0.09) !important;
}

.board-detail-page .board-tool-card-copy {
    min-width: 0 !important;

    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
}

.board-detail-page .board-tool-card-copy strong {
    color: var(--board-tool-strong) !important;

    font-size: 14px !important;
    font-weight: 900 !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
}

.board-detail-page .board-tool-card-copy small {
    color: var(--board-tool-muted) !important;

    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
}

.board-detail-page .board-tool-card-control {
    position: relative !important;

    width: 44px !important;
    height: 26px !important;
    flex: 0 0 44px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;

    border-radius: 999px !important;
    background: rgba(31, 31, 31, 0.13) !important;
}

.board-detail-page .board-tool-card-control input {
    position: absolute !important;
    inset: 0 !important;

    width: 100% !important;
    height: 100% !important;

    opacity: 0 !important;
    cursor: pointer !important;
}

.board-detail-page .board-tool-card-control span {
    width: 20px !important;
    height: 20px !important;
    margin-left: 3px !important;

    border-radius: 50% !important;
    background: white !important;
    box-shadow: 0 3px 8px rgba(31, 31, 31, 0.18) !important;
    transition: transform 160ms ease !important;
}

.board-detail-page .board-tool-card-control input:checked + span {
    transform: translateX(18px) !important;
}

.board-detail-page .board-tool-card-checkbox:has(input:checked) .board-tool-card-control {
    background: #1f1f1f !important;
}

/* The Hide Purchased / Assigned-to form still carries the legacy
   .purchased-filter-form class (display: flex + page-level margins) from
   when it was a standalone control - reset it inside the Organise
   dropdown so its rows stack like the toggle rows above them instead of
   sitting side by side. */
html body .board-detail-page .board-tools-dropdown-menu .board-tools-menu-form,
html body .board-detail-page .board-tools-dropdown-menu .purchased-filter-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;

    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* "Assigned to" filter row in the Organise dropdown. Reuses the shared
   .custom-select .deckd-compact-select pill/flyout so the person list
   matches the rest of the menu instead of the browser's own <select>
   popup - just pinned to a fixed width on the right of the row rather
   than the component's default full width, and the flyout right-aligned
   under it. */
.board-detail-page .board-tool-card-select {
    cursor: default !important;
}

html body .board-detail-page .board-tool-assignee-select.custom-select {
    width: 156px !important;
    flex: 0 0 156px !important;

    z-index: auto !important;
}

html body .board-detail-page .board-tool-assignee-select .custom-select-button {
    width: 100% !important;
}

html body .board-detail-page .board-tool-assignee-select .custom-select-list {
    left: auto !important;
    right: 0 !important;
    width: 200px !important;

    /* Room for ~5 people before it scrolls, rather than the compact
       component's tighter 4-row default. */
    max-height: 232px !important;
}

.board-detail-page:not(.organise-mode) .drag-handle {
    display: none !important;
}

.board-detail-page.organise-mode .drag-handle {
    display: inline-flex !important;
}



.board-detail-page .board-organise-banner {
    display: none !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;

    max-width: 860px !important;
    margin: 14px auto 22px !important;
    padding: 12px 14px 12px 18px !important;

    border: 1px solid var(--board-tool-border) !important;
    border-radius: 999px !important;

    background: var(--board-tool-surface) !important;
    box-shadow: var(--board-tool-soft-shadow) !important;
}

.board-detail-page .board-organise-banner.is-open {
    display: flex !important;
}

.board-detail-page .board-organise-banner div {
    display: grid !important;
    gap: 2px !important;
}

.board-detail-page .board-organise-banner strong {
    font-size: 14px !important;
    font-weight: 900 !important;
}

.board-detail-page .board-organise-banner span {
    color: var(--board-tool-muted) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
}

.board-detail-page .board-organise-done-button {
    white-space: nowrap !important;
}

/* Budget panel - positioning (margin) now lives only in board_detail.html's
   own <style> block ("Budget Studio positioning"); display toggle stays here. */
.board-detail-page .board-budget-panel {
    display: none !important;
}

.board-detail-page .board-budget-panel.is-open {
    display: block !important;
    animation: boardBudgetFinalRise 190ms ease both !important;
}

@keyframes boardBudgetFinalRise {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.board-detail-page .board-budget-shell {
    max-width: 1120px !important;
    margin: 0 auto !important;
    padding: clamp(18px, 3vw, 28px) !important;

    border: 1px solid var(--board-tool-border) !important;
    border-radius: 32px !important;

    background: var(--board-tool-surface) !important;
    box-shadow: var(--board-tool-shadow) !important;
}

.board-detail-page .board-budget-panel-header {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 18px !important;
}

.board-detail-page .board-panel-eyebrow {
    margin: 0 0 6px !important;

    color: var(--board-tool-muted) !important;

    font-size: 12px !important;
    font-weight: 900 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
}

.board-detail-page .board-budget-panel h2 {
    margin: 0 0 6px !important;

    color: var(--board-tool-strong) !important;

    font-size: clamp(26px, 4vw, 38px) !important;
    line-height: 1.05 !important;
}

.board-detail-page .board-budget-panel-header p:not(.board-panel-eyebrow) {
    max-width: 640px !important;
    margin: 0 !important;

    color: var(--board-tool-muted) !important;

    font-size: 15px !important;
    line-height: 1.5 !important;
}

.board-detail-page .board-budget-form {
    display: flex !important;
    align-items: stretch !important;
    gap: 10px !important;

    margin-top: 20px !important;
}

.board-detail-page .board-budget-input {
    flex: 1 !important;
    min-width: 0 !important;

    padding: 14px 18px !important;

    border: 1px solid var(--board-tool-border) !important;
    border-radius: 999px !important;

    background: white !important;
    color: var(--board-tool-strong) !important;

    font: inherit !important;
    font-weight: 700 !important;
}

.board-detail-page .board-budget-input:focus {
    outline: none !important;
    border-color: rgba(31, 31, 31, 0.22) !important;
    box-shadow: 0 0 0 4px rgba(31, 31, 31, 0.06) !important;
}

.board-detail-page .board-budget-submit-button {
    white-space: nowrap !important;
}

.board-detail-page .board-budget-helper {
    margin: 10px 3px 0 !important;

    color: var(--board-tool-muted) !important;

    font-size: 12px !important;
    font-weight: 700 !important;
}

.board-detail-page .board-budget-results {
    margin-top: 20px !important;
}

.board-detail-page .board-budget-summary {
    margin: 0 0 16px !important;
    padding: 13px 15px !important;

    border-radius: 18px !important;
    background: #f8f5f0 !important;
    color: var(--board-tool-strong) !important;

    font-size: 14px !important;
    font-weight: 800 !important;
}

.board-detail-page .board-budget-empty,
.board-detail-page .board-budget-warning {
    margin: 0 !important;
    padding: 14px 16px !important;

    border-radius: 18px !important;
    background: #f8f5f0 !important;
    color: var(--board-tool-strong) !important;

    font-weight: 800 !important;
}

/* Budget options now look like board cards */
.board-detail-page .board-budget-board-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
    gap: 22px !important;
}

.board-detail-page .board-budget-board-card {
    position: relative !important;

    min-width: 0 !important;
    min-height: 220px !important;
    padding: 24px !important;

    overflow: hidden !important;

    background: white !important;
    border-radius: 28px !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.07) !important;
}

.board-detail-page .board-budget-card-header {
    min-height: 66px !important;
    width: 100% !important;
    margin-bottom: 18px !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;

    text-align: center !important;
}

.board-detail-page .board-budget-card-header h3 {
    max-width: 100% !important;
    margin: 0 !important;

    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;

    overflow: hidden !important;

    color: #1f1f1f !important;
    text-align: center !important;

    font-size: clamp(20px, 3vw, 30px) !important;
    font-weight: 900 !important;
    line-height: 1.1 !important;
}

.board-detail-page .board-budget-card-header p {
    margin: 0 !important;

    color: #8a7f73 !important;

    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
}

.board-detail-page .board-budget-card-collage {
    width: 100% !important;
    height: 180px !important;

    display: grid !important;
    gap: 4px !important;

    overflow: hidden !important;

    background: #f6f2ec !important;
    border-radius: 22px !important;
}

.board-detail-page .board-budget-card-collage.product-count-0 {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.board-detail-page .board-budget-card-collage img {
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;

    display: block !important;

    object-fit: cover !important;
    object-position: center center !important;
}

.board-detail-page .board-budget-card-collage-empty {
    color: #8a7f73 !important;

    font-size: 14px !important;
    font-weight: 900 !important;
}

.board-detail-page .board-budget-card-details {
    margin-top: 16px !important;
}

.board-detail-page .board-budget-card-count {
    margin: 0 0 10px !important;

    color: #1f1f1f !important;

    text-align: center !important;
    font-size: 14px !important;
    font-weight: 900 !important;
}

.board-detail-page .board-budget-card-products {
    display: grid !important;
    gap: 8px !important;
}

.board-detail-page .board-budget-card-product-link {
    min-width: 0 !important;
    padding: 9px 11px !important;

    display: block !important;

    overflow: hidden !important;

    border-radius: 14px !important;
    background: #f8f5f0 !important;
    color: #1f1f1f !important;

    text-decoration: none !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;

    font-size: 13px !important;
    font-weight: 800 !important;
}

.board-detail-page .board-budget-card-product-link:hover {
    background: #f4efe8 !important;
}

/* The old mini-result layout is no longer used, but keep it hidden if cached markup appears */
.board-detail-page .board-budget-combination,
.board-detail-page .board-budget-mini-grid,
.board-detail-page .board-budget-mini-card {
    display: none !important;
}

@media (max-width: 1000px) {
    .board-detail-page .board-tools-row {
        grid-template-columns: 1fr !important;
        border-radius: 30px !important;
        gap: 12px !important;
    }

    .board-detail-page .board-tools-dropdown,
    .board-detail-page .board-tools-actions,
    .board-detail-page .board-tools-row .board-product-search-wrapper {
        justify-self: center !important;
        justify-content: center !important;
    }

    .board-detail-page .board-tools-dropdown {
        order: 2 !important;
    }

    .board-detail-page .desktop-board-search {
        order: 1 !important;
        width: 100% !important;
    }

    .board-detail-page .board-tools-actions {
        order: 3 !important;
    }

    .board-detail-page .board-tools-dropdown-menu {
        top: calc(100% + 12px) !important;
        width: min(720px, calc(100vw - 36px)) !important;
        max-width: calc(100vw - 36px) !important;
    }
}

@media (max-width: 760px) {
    .board-detail-page .board-tools-menu-options {
        grid-template-columns: 1fr !important;
    }

    .board-detail-page .board-tool-card {
        min-height: 72px !important;
    }

    .board-detail-page .board-budget-form {
        flex-direction: column !important;
    }

    .board-detail-page .board-budget-submit-button {
        width: 100% !important;
    }

    .board-detail-page .board-organise-banner {
        align-items: flex-start !important;
        border-radius: 24px !important;
        flex-direction: column !important;
    }

    .board-detail-page .board-organise-done-button {
        width: 100% !important;
    }

    .board-detail-page .board-budget-board-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 560px) {
    .board-detail-page .board-tools-row {
        top: 72px !important;
        margin: 14px auto 22px !important;
        padding: 10px !important;
    }

    .board-detail-page .board-tools-dropdown-menu {
        width: min(94vw, 360px) !important;
        max-width: 94vw !important;
        padding: 14px !important;
        border-radius: 24px !important;
    }

    .board-detail-page .board-tools-menu-header {
        padding-bottom: 12px !important;
    }

    .board-detail-page .board-tool-card-copy strong {
        font-size: 13px !important;
    }

    .board-detail-page .board-tool-card-copy small {
        font-size: 11px !important;
    }

    .board-detail-page .board-budget-shell {
        border-radius: 26px !important;
    }

    .board-detail-page .board-budget-card-collage {
        height: 150px !important;
    }

    .board-detail-page .board-budget-board-card {
        padding: 22px !important;
        border-radius: 24px !important;
    }
}

/* =========================================================
   Board detail toolbar reset + budget board-card formatting
   Paste this at the very bottom of style.css.

   This removes the large grey toolbar wrapper from the board
   detail page and puts the row back to the original layout:
   Tools on the left, search centred, actions on the right.
   ========================================================= */

html body .board-detail-page .board-tools-row {
    position: relative !important;
    top: auto !important;
    z-index: 60 !important;

    width: 100% !important;
    max-width: 1200px !important;
    min-height: 0 !important;

    margin: 18px auto 28px !important;
    padding: 0 !important;

    display: grid !important;
    grid-template-columns: 260px minmax(360px, 1fr) 260px !important;
    align-items: center !important;
    justify-content: normal !important;
    gap: 20px !important;

    overflow: visible !important;

    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

html body .board-detail-page .board-tools-dropdown {
    position: relative !important;
    grid-column: 1 !important;
    justify-self: center !important;
    align-self: center !important;

    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

html body .board-detail-page .board-tools-toggle {
    min-width: 88px !important;
    height: 52px !important;
    min-height: 52px !important;

    padding: 0 22px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;

    background: #ffffff !important;
    border: 1px solid #e4ddd3 !important;
    border-radius: 999px !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.04) !important;

    color: #1f1f1f !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    text-decoration: none !important;

    cursor: pointer !important;
}

html body .board-detail-page .board-tools-toggle:hover,
html body .board-detail-page .board-tools-dropdown.is-open .board-tools-toggle {
    transform: none !important;
    background: #f4efe8 !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06) !important;
}


html body .board-detail-page .desktop-board-search,
html body .board-detail-page .board-tools-row .board-product-search-wrapper {
    grid-column: 2 !important;
    justify-self: center !important;

    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

html body .board-detail-page .desktop-board-search .search-expand-form,
html body .board-detail-page .board-tools-row .search-expand-form {
    width: 100% !important;
    max-width: 620px !important;
    height: auto !important;

    margin: 0 auto !important;
    padding: 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;

    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

html body .board-detail-page .desktop-board-search .board-product-search-input,
html body .board-detail-page .board-tools-row .board-product-search-input {
    flex: 1 1 auto !important;

    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: auto !important;

    margin: 0 !important;
    padding: 14px 18px !important;

    background: #ffffff !important;
    border: 1px solid #e4ddd3 !important;
    border-radius: 999px !important;
    box-shadow: none !important;

    color: #1f1f1f !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    line-height: normal !important;
}

html body .board-detail-page .desktop-board-search .search-icon-expand-button,
html body .board-detail-page .board-tools-row .search-icon-expand-button {
    flex: 0 0 52px !important;

    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    min-height: 52px !important;

    margin: 0 !important;
    padding: 0 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: #1f1f1f !important;
    border: none !important;
    border-radius: 50% !important;
    box-shadow: none !important;

    color: #ffffff !important;
}


html body .board-detail-page .board-tools-actions {
    grid-column: 3 !important;
    justify-self: end !important;

    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;

    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

html body .board-detail-page .board-tools-actions .new-board-button,
html body .board-detail-page .board-tools-actions .edit-board-button {
    height: auto !important;
    min-height: 0 !important;
    padding: 12px 16px !important;

    background: #1f1f1f !important;
    border: none !important;
    border-radius: 999px !important;
    box-shadow: none !important;

    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: normal !important;
}

html body .board-detail-page .board-tools-actions .edit-board-button {
    background: #f4efe8 !important;
    color: #1f1f1f !important;
}

/* Keep the Tools dropdown tidy, but anchor it from the left column. */
html body .board-detail-page .board-tools-dropdown-menu {
    top: calc(100% + 12px) !important;
    left: 0 !important;
    right: auto !important;

    width: min(760px, calc(100vw - 160px)) !important;
    max-width: min(760px, calc(100vw - 160px)) !important;

    transform: none !important;
}


@keyframes boardToolsFinalDropIn {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 1000px) {
    html body .board-detail-page .board-tools-row {
        grid-template-columns: 1fr !important;
        gap: 14px !important;

        margin-top: 14px !important;
    }

    html body .board-detail-page .board-tools-dropdown,
    html body .board-detail-page .desktop-board-search,
    html body .board-detail-page .board-tools-row .board-product-search-wrapper,
    html body .board-detail-page .board-tools-actions {
        grid-column: 1 !important;
        justify-self: center !important;
    }

    html body .board-detail-page .board-tools-dropdown-menu {
        left: 50% !important;
        width: calc(100vw - 36px) !important;
        max-width: 820px !important;
        transform: translateX(-50%) !important;
    }

    html body .board-detail-page .board-tools-dropdown.is-open .board-tools-dropdown-menu {
        transform: translateX(-50%) !important;
    }

    @keyframes boardToolsFinalDropIn {
        from {
            opacity: 0;
            transform: translateX(-50%) translateY(-6px) scale(0.98);
        }

        to {
            opacity: 1;
            transform: translateX(-50%) translateY(0) scale(1);
        }
    }
}

@media (max-width: 560px) {
    html body .board-detail-page .board-tools-row {
        width: 100% !important;
        margin: 14px auto 16px !important;
        padding: 0 !important;

        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 12px !important;

        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    html body .board-detail-page .board-tools-dropdown {
        order: 2 !important;
    }

    html body .board-detail-page .board-tools-actions {
        order: 3 !important;
        width: 100% !important;
        justify-content: center !important;
    }

    html body .board-detail-page > .mobile-board-search {
        margin-top: 0 !important;
        margin-bottom: 18px !important;
        padding: 0 !important;

        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

    html body .board-detail-page > .mobile-board-search .search-expand-form {
        width: 100% !important;
        max-width: 280px !important;

        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 42px !important;
        gap: 8px !important;

        margin: 0 auto !important;
    }

    html body .board-detail-page > .mobile-board-search .board-product-search-input {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: auto !important;

        padding: 11px 14px !important;

        font-size: 13px !important;
    }


    html body .board-detail-page .board-tools-toggle,
    html body .board-detail-page .board-tools-actions .new-board-button,
    html body .board-detail-page .board-tools-actions .edit-board-button {
        height: auto !important;
        min-height: 0 !important;
        padding: 8px 12px !important;

        font-size: 12px !important;
        line-height: 1 !important;
    }



    html body .board-detail-page .board-tool-card {
        min-height: auto !important;
        padding: 13px 14px !important;
    }


}

/* =========================================================
   Board detail tools/search tight wrapper fix
   Paste this at the VERY bottom of style.css, after the
   previous board detail tools/budget CSS.

   Result:
   - Restores the light grey toolbar wrapper.
   - Makes the wrapper fit tightly around Tools + search + actions.
   - Keeps Tools centred in the left-hand column.
   - Keeps dropdown/options inside the page.
   - Keeps Budget options styled like board cards.
   ========================================================= */

html body .board-detail-page .board-tools-row {
    position: sticky !important;
    top: 92px !important;
    z-index: 80000 !important;

    width: fit-content !important;
    max-width: calc(100vw - 64px) !important;
    min-height: 0 !important;

    margin: 18px auto 28px !important;
    padding: 10px 12px !important;

    display: grid !important;
    grid-template-columns: 130px minmax(420px, 620px) auto !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;

    overflow: visible !important;

    background: #f3f3f2 !important;
    border: 1px solid #ddddda !important;
    border-radius: 999px !important;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.05) !important;
    backdrop-filter: none !important;
}

html body .board-detail-page .board-tools-dropdown {
    position: relative !important;
    grid-column: 1 !important;
    justify-self: center !important;
    align-self: center !important;

    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

html body .board-detail-page .board-tools-toggle {
    width: auto !important;
    min-width: 94px !important;
    height: 52px !important;
    min-height: 52px !important;

    padding: 0 22px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;

    background: #ffffff !important;
    border: 1px solid #ececea !important;
    border-radius: 999px !important;
    box-shadow: none !important;

    color: #1f1f1f !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    text-decoration: none !important;

    cursor: pointer !important;
}

html body .board-detail-page .board-tools-toggle:hover,
html body .board-detail-page .board-tools-dropdown.is-open .board-tools-toggle {
    background: #ffffff !important;
    transform: none !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05) !important;
}








html body .board-detail-page .board-tools-actions {
    grid-column: 3 !important;
    justify-self: end !important;
    align-self: center !important;

    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 12px !important;

    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

html body .board-detail-page .board-tools-actions .new-board-button,
html body .board-detail-page .board-tools-actions .edit-board-button {
    width: auto !important;
    height: 52px !important;
    min-height: 52px !important;

    margin: 0 !important;
    padding: 0 28px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: #ffffff !important;
    border: 1px solid #ececea !important;
    border-radius: 999px !important;
    box-shadow: none !important;

    color: #111111 !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}

html body .board-detail-page .board-tools-actions .edit-board-button {
    padding-left: 24px !important;
    padding-right: 24px !important;
}

html body .board-detail-page .board-tools-actions .new-board-button:hover,
html body .board-detail-page .board-tools-actions .edit-board-button:hover,
html body .board-detail-page .board-tools-toggle:hover {
    background: #ffffff !important;
    transform: none !important;
    opacity: 0.9 !important;
}

@media (max-width: 1000px) and (min-width: 561px) {
    html body .board-detail-page .board-tools-row {
        width: min(100%, calc(100vw - 36px)) !important;
        max-width: calc(100vw - 36px) !important;

        grid-template-columns: 112px minmax(240px, 1fr) auto !important;
        gap: 8px !important;
    }




    html body .board-detail-page .board-tools-toggle,
    html body .board-detail-page .board-tools-actions .new-board-button,
    html body .board-detail-page .board-tools-actions .edit-board-button {
        height: 46px !important;
        min-height: 46px !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
        font-size: 13px !important;
    }



}

@media (max-width: 720px) and (min-width: 561px) {
    html body .board-detail-page .board-tools-row {
        border-radius: 34px !important;
        grid-template-columns: 1fr auto !important;
        grid-template-areas:
            "tools actions"
            "search search" !important;
    }

    html body .board-detail-page .board-tools-dropdown {
        grid-area: tools !important;
        grid-column: auto !important;
        justify-self: start !important;
        width: auto !important;
    }

    html body .board-detail-page .desktop-board-search,
    html body .board-detail-page .board-tools-row .board-product-search-wrapper {
        grid-area: search !important;
        grid-column: auto !important;
    }

    html body .board-detail-page .board-tools-actions {
        grid-area: actions !important;
        grid-column: auto !important;
    }
}

@media (max-width: 560px) {

    html body .board-detail-page .board-tools-dropdown {
        order: 1 !important;
        width: auto !important;
    }


    html body .board-detail-page .board-tools-toggle,
    html body .board-detail-page .board-tools-actions .new-board-button,
    html body .board-detail-page .board-tools-actions .edit-board-button {
        height: 42px !important;
        min-height: 42px !important;
        padding: 0 13px !important;
        font-size: 12px !important;
    }











}

/* =========================================================
   Board detail toolbar update: Tools + Edit Board on the LHS
   Paste this at the VERY bottom of style.css, after any older
   board detail tools/budget additions.

   Result:
   - The light grey toolbar wrapper stays tight.
   - Tools and Edit Board sit together on the left of the search bar.
   - Add Product stays on the right.
   - The search area remains centred inside the toolbar.
   - Dropdown stays neat and inside the page.
   - Budget options continue to look like board cards.
   ========================================================= */

html body .board-detail-page .board-tools-row {
    position: sticky !important;
    top: 92px !important;
    z-index: 80000 !important;

    width: fit-content !important;
    max-width: calc(100vw - 64px) !important;
    min-height: 0 !important;

    margin: 18px auto 28px !important;
    padding: 10px 12px !important;

    display: grid !important;
    grid-template-columns: 236px minmax(420px, 620px) 236px !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;

    overflow: visible !important;

    background: #f3f3f2 !important;
    border: 1px solid #ddddda !important;
    border-radius: 999px !important;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.05) !important;
    backdrop-filter: none !important;
}

html body .board-detail-page .board-tools-left {
    grid-column: 1 !important;
    justify-self: center !important;
    align-self: center !important;

    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;

    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

html body .board-detail-page .board-tools-dropdown {
    position: relative !important;
    grid-column: auto !important;
    justify-self: auto !important;
    align-self: center !important;

    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    order: 0 !important;

    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

html body .board-detail-page .board-tools-toggle,
html body .board-detail-page .board-tools-left .edit-board-button,
html body .board-detail-page .board-tools-left .board-tools-edit-board-button {
    width: auto !important;
    height: 52px !important;
    min-height: 52px !important;

    margin: 0 !important;
    padding: 0 20px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;

    background: #ffffff !important;
    border: 1px solid #ececea !important;
    border-radius: 999px !important;
    box-shadow: none !important;

    color: #1f1f1f !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    white-space: nowrap !important;

    cursor: pointer !important;
}


html body .board-detail-page .board-tools-left .edit-board-button,
html body .board-detail-page .board-tools-left .board-tools-edit-board-button {
    min-width: 122px !important;
}

html body .board-detail-page .board-tools-toggle:hover,
html body .board-detail-page .board-tools-dropdown.is-open .board-tools-toggle,
html body .board-detail-page .board-tools-left .edit-board-button:hover,
html body .board-detail-page .board-tools-left .board-tools-edit-board-button:hover {
    background: #ffffff !important;
    transform: none !important;
    opacity: 0.9 !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05) !important;
}


html body .board-detail-page .desktop-board-search,
html body .board-detail-page .board-tools-row .board-product-search-wrapper {
    grid-column: 2 !important;
    justify-self: center !important;
    align-self: center !important;

    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

html body .board-detail-page .desktop-board-search .search-expand-form,
html body .board-detail-page .board-tools-row .search-expand-form {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;

    margin: 0 !important;
    padding: 0 !important;

    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 52px !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;

    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

html body .board-detail-page .desktop-board-search .board-product-search-input,
html body .board-detail-page .board-tools-row .board-product-search-input {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 52px !important;

    margin: 0 !important;
    padding: 0 36px !important;

    background: #ffffff !important;
    border: 1px solid #d6d6d3 !important;
    border-radius: 999px !important;
    box-shadow: none !important;

    color: #111111 !important;
    font-size: 20px !important;
    font-weight: 500 !important;
    line-height: 52px !important;
    outline: none !important;
}

html body .board-detail-page .desktop-board-search .board-product-search-input::placeholder,
html body .board-detail-page .board-tools-row .board-product-search-input::placeholder {
    color: #777772 !important;
}

html body .board-detail-page .desktop-board-search .search-icon-expand-button,
html body .board-detail-page .board-tools-row .search-icon-expand-button {
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    min-height: 52px !important;
    flex: 0 0 52px !important;

    margin: 0 !important;
    padding: 0 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: #1f1f1f !important;
    border: none !important;
    border-radius: 50% !important;
    box-shadow: none !important;

    color: #ffffff !important;
}

html body .board-detail-page .desktop-board-search .search-icon-expand-button svg,
html body .board-detail-page .board-tools-row .search-icon-expand-button svg {
    width: 22px !important;
    height: 22px !important;
    stroke: currentColor !important;
}

html body .board-detail-page .board-tools-actions {
    grid-column: 3 !important;
    justify-self: center !important;
    align-self: center !important;

    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;

    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

html body .board-detail-page .board-tools-actions .new-board-button {
    width: auto !important;
    height: 52px !important;
    min-height: 52px !important;

    margin: 0 !important;
    padding: 0 28px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: #ffffff !important;
    border: 1px solid #ececea !important;
    border-radius: 999px !important;
    box-shadow: none !important;

    color: #111111 !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}

html body .board-detail-page .board-tools-actions .new-board-button:hover {
    background: #ffffff !important;
    transform: none !important;
    opacity: 0.9 !important;
}

/* Keep the dropdown neat and inside the page. */
html body .board-detail-page .board-tools-dropdown-menu {
    top: calc(100% + 14px) !important;
    left: 0 !important;
    right: auto !important;

    width: min(760px, calc(100vw - 64px)) !important;
    max-width: min(760px, calc(100vw - 64px)) !important;

    padding: 16px !important;

    transform: none !important;
}



html body .board-detail-page .board-tool-card,
html body .board-detail-page .board-tool-card-checkbox {
    min-width: 0 !important;
    min-height: 106px !important;
    padding: 16px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;

    background: #f8f5f0 !important;
    border: 1px solid #eee6dc !important;
    border-radius: 22px !important;
    box-shadow: none !important;

    text-align: left !important;
}

html body .board-detail-page .board-budget-card-header h3 {
    max-width: 100% !important;
    min-height: 0 !important;
    margin: 0 auto 8px !important;

    color: #1f1f1f !important;
    text-align: center !important;
    font-size: clamp(20px, 3vw, 30px) !important;
    line-height: 1.1 !important;
    font-weight: 900 !important;

    overflow-wrap: anywhere !important;
}

html body .board-detail-page .board-budget-card-header span,
html body .board-detail-page .board-budget-card-header small {
    color: #8a7f73 !important;
    font-size: 13px !important;
    font-weight: 800 !important;
}



html body .board-detail-page .board-budget-card-products {
    margin-top: 18px !important;

    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

html body .board-detail-page .board-budget-card-product-link {
    width: 100% !important;
    padding: 11px 14px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;

    background: #f8f5f0 !important;
    border: 1px solid #eee6dc !important;
    border-radius: 999px !important;

    color: #1f1f1f !important;
    text-decoration: none !important;
    font-size: 13px !important;
    font-weight: 800 !important;
}

@media (max-width: 1000px) and (min-width: 561px) {
    html body .board-detail-page .board-tools-row {
        width: min(100%, calc(100vw - 36px)) !important;
        max-width: calc(100vw - 36px) !important;

        grid-template-columns: auto minmax(240px, 1fr) auto !important;
        gap: 8px !important;
    }

    html body .board-detail-page .board-tools-left {
        width: auto !important;
        gap: 8px !important;
    }

    html body .board-detail-page .desktop-board-search .search-expand-form,
    html body .board-detail-page .board-tools-row .search-expand-form {
        grid-template-columns: minmax(0, 1fr) 46px !important;
        gap: 8px !important;
    }

    html body .board-detail-page .desktop-board-search .board-product-search-input,
    html body .board-detail-page .board-tools-row .board-product-search-input {
        height: 46px !important;
        padding: 0 18px !important;
        font-size: 15px !important;
        line-height: 46px !important;
    }

    html body .board-detail-page .desktop-board-search .search-icon-expand-button,
    html body .board-detail-page .board-tools-row .search-icon-expand-button {
        width: 46px !important;
        height: 46px !important;
        min-width: 46px !important;
        min-height: 46px !important;
    }

    html body .board-detail-page .board-tools-toggle,
    html body .board-detail-page .board-tools-left .edit-board-button,
    html body .board-detail-page .board-tools-left .board-tools-edit-board-button,
    html body .board-detail-page .board-tools-actions .new-board-button {
        height: 46px !important;
        min-height: 46px !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
        font-size: 13px !important;
    }

    html body .board-detail-page .board-tools-toggle {
        min-width: 84px !important;
    }

    html body .board-detail-page .board-tools-left .edit-board-button,
    html body .board-detail-page .board-tools-left .board-tools-edit-board-button {
        min-width: 104px !important;
    }

    html body .board-detail-page .board-tools-dropdown-menu {
        left: 50% !important;
        width: calc(100vw - 36px) !important;
        max-width: 760px !important;
        transform: translateX(-50%) !important;
    }

    html body .board-detail-page .board-tools-dropdown.is-open .board-tools-dropdown-menu {
        transform: translateX(-50%) !important;
    }
}

@media (max-width: 760px) and (min-width: 561px) {
    html body .board-detail-page .board-tools-row {
        border-radius: 34px !important;
        grid-template-columns: 1fr auto !important;
        grid-template-areas:
            "left actions"
            "search search" !important;
    }

    html body .board-detail-page .board-tools-left {
        grid-area: left !important;
        grid-column: auto !important;
        justify-self: start !important;
        width: auto !important;
    }

    html body .board-detail-page .desktop-board-search,
    html body .board-detail-page .board-tools-row .board-product-search-wrapper {
        grid-area: search !important;
        grid-column: auto !important;
    }

    html body .board-detail-page .board-tools-actions {
        grid-area: actions !important;
        grid-column: auto !important;
        justify-self: end !important;
        width: auto !important;
    }
}

@media (max-width: 560px) {
    html body .board-detail-page .board-tools-row {
        position: static !important;
        top: auto !important;
        z-index: 60 !important;

        width: fit-content !important;
        max-width: calc(100vw - 36px) !important;

        margin: 14px auto 16px !important;
        padding: 8px !important;

        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;

        background: #f3f3f2 !important;
        border: 1px solid #ddddda !important;
        border-radius: 999px !important;
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.05) !important;
        backdrop-filter: none !important;
    }

    html body .board-detail-page .board-tools-left {
        order: 1 !important;
        width: auto !important;
        gap: 8px !important;
    }

    html body .board-detail-page .board-tools-actions {
        order: 2 !important;
        width: auto !important;
        justify-content: center !important;
        gap: 8px !important;
    }

    html body .board-detail-page .board-tools-toggle,
    html body .board-detail-page .board-tools-left .edit-board-button,
    html body .board-detail-page .board-tools-left .board-tools-edit-board-button,
    html body .board-detail-page .board-tools-actions .new-board-button {
        height: 42px !important;
        min-height: 42px !important;
        padding: 0 13px !important;
        font-size: 12px !important;
    }

    html body .board-detail-page .board-tools-toggle {
        min-width: 76px !important;
    }

    html body .board-detail-page .board-tools-left .edit-board-button,
    html body .board-detail-page .board-tools-left .board-tools-edit-board-button {
        min-width: 88px !important;
    }





    html body .board-detail-page .board-tools-dropdown-menu {
        left: 50% !important;
        width: calc(100vw - 24px) !important;
        max-width: calc(100vw - 24px) !important;
        padding: 12px !important;
        transform: translateX(-50%) !important;
    }

    html body .board-detail-page .board-tools-dropdown.is-open .board-tools-dropdown-menu {
        transform: translateX(-50%) !important;
    }




}
/* =========================================================
   Board detail final toolbar:
   search centered, all text buttons on RHS
   ========================================================= */

html body .board-detail-page .board-tools-row.board-tools-row-all-buttons-right,
html body .board-detail-page .board-tools-row {
    position: sticky !important;
    top: 92px !important;
    z-index: 80000 !important;

    width: fit-content !important;
    max-width: calc(100vw - 64px) !important;
    min-height: 0 !important;

    margin: 18px auto 28px !important;
    padding: 10px 12px !important;

    display: grid !important;
    grid-template-columns: minmax(420px, 640px) auto !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;

    overflow: visible !important;

    background: #f3f3f2 !important;
    border: 1px solid #ddddda !important;
    border-radius: 999px !important;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.05) !important;
    backdrop-filter: none !important;
}

html body .board-detail-page .board-tools-search-slot,
html body .board-detail-page .board-tools-row .desktop-board-search,
html body .board-detail-page .board-tools-row .board-product-search-wrapper {
    grid-column: 1 !important;
    justify-self: center !important;
    align-self: center !important;

    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}


html body .board-detail-page .board-tools-search-slot .board-product-search-input,
html body .board-detail-page .board-tools-row .board-product-search-input {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 52px !important;

    margin: 0 !important;
    padding: 0 36px !important;

    background: #ffffff !important;
    border: 1px solid #d6d6d3 !important;
    border-radius: 999px !important;
    box-shadow: none !important;

    color: #111111 !important;
    font-size: 20px !important;
    font-weight: 500 !important;
    line-height: 52px !important;
    outline: none !important;
}



html body .board-detail-page .board-tools-search-slot .search-icon-expand-button svg,
html body .board-detail-page .board-tools-row .search-icon-expand-button svg {
    width: 22px !important;
    height: 22px !important;
    stroke: currentColor !important;
}



html body .board-detail-page .board-tools-toggle,
html body .board-detail-page .board-tools-edit-board-button,
html body .board-detail-page .board-tools-add-product-button,
html body .board-detail-page .board-tools-actions .new-board-button,
html body .board-detail-page .board-tools-actions .edit-board-button {
    width: auto !important;
    height: 52px !important;
    min-height: 52px !important;

    margin: 0 !important;
    padding: 0 22px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: #ffffff !important;
    border: 1px solid #ececea !important;
    border-radius: 999px !important;
    box-shadow: none !important;

    color: #111111 !important;
    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    white-space: nowrap !important;

    cursor: pointer !important;
    transform: none !important;
}


html body .board-detail-page .board-tools-edit-board-button {
    min-width: 126px !important;
}


html body .board-detail-page .board-tools-toggle:hover,
html body .board-detail-page .board-tools-dropdown.is-open .board-tools-toggle,
html body .board-detail-page .board-tools-edit-board-button:hover,
html body .board-detail-page .board-tools-add-product-button:hover,
html body .board-detail-page .board-tools-actions .new-board-button:hover,
html body .board-detail-page .board-tools-actions .edit-board-button:hover {
    background: #f3f3f2 !important;
    border-color: #ddddda !important;
    box-shadow: none !important;
    opacity: 1 !important;
    transform: none !important;
}

html body .board-detail-page .board-tool-card-copy {
    min-width: 0 !important;
}

/* Tablet */
@media (max-width: 1060px) and (min-width: 561px) {
    html body .board-detail-page .board-tools-row.board-tools-row-all-buttons-right,
    html body .board-detail-page .board-tools-row {
        width: min(100%, calc(100vw - 36px)) !important;
        max-width: calc(100vw - 36px) !important;

        grid-template-columns: minmax(250px, 1fr) auto !important;
        gap: 8px !important;
    }

    html body .board-detail-page .board-tools-search-slot .search-expand-form,
    html body .board-detail-page .board-tools-row .search-expand-form {
        grid-template-columns: minmax(0, 1fr) 46px !important;
        gap: 8px !important;
    }

    html body .board-detail-page .board-tools-search-slot .board-product-search-input,
    html body .board-detail-page .board-tools-row .board-product-search-input {
        height: 46px !important;
        padding: 0 18px !important;
        font-size: 15px !important;
        line-height: 46px !important;
    }

    html body .board-detail-page .board-tools-search-slot .search-icon-expand-button,
    html body .board-detail-page .board-tools-row .search-icon-expand-button {
        width: 46px !important;
        height: 46px !important;
        min-width: 46px !important;
        min-height: 46px !important;
    }

    html body .board-detail-page .board-tools-toggle,
    html body .board-detail-page .board-tools-edit-board-button,
    html body .board-detail-page .board-tools-add-product-button,
    html body .board-detail-page .board-tools-actions .new-board-button,
    html body .board-detail-page .board-tools-actions .edit-board-button {
        height: 46px !important;
        min-height: 46px !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        font-size: 13px !important;
    }

    html body .board-detail-page .board-tools-toggle {
        min-width: 84px !important;
    }

    html body .board-detail-page .board-tools-edit-board-button {
        min-width: 106px !important;
    }

    html body .board-detail-page .board-tools-add-product-button,
    html body .board-detail-page .board-tools-actions .new-board-button {
        min-width: 122px !important;
    }
}

@media (max-width: 820px) and (min-width: 561px) {
    html body .board-detail-page .board-tools-row.board-tools-row-all-buttons-right,
    html body .board-detail-page .board-tools-row {
        border-radius: 34px !important;
        grid-template-columns: 1fr !important;
        grid-template-areas:
            "search"
            "actions" !important;
    }

    html body .board-detail-page .board-tools-search-slot,
    html body .board-detail-page .board-tools-row .desktop-board-search {
        grid-area: search !important;
        grid-column: auto !important;
    }

    html body .board-detail-page .board-tools-actions-right,
    html body .board-detail-page .board-tools-actions {
        grid-area: actions !important;
        grid-column: auto !important;
        justify-self: end !important;
        width: auto !important;
    }

    html body .board-detail-page .board-tools-dropdown-menu {
        right: 50% !important;
        left: auto !important;
        width: calc(100vw - 36px) !important;
        max-width: 760px !important;
        transform: translateX(50%) !important;
    }

    html body .board-detail-page .board-tools-dropdown.is-open .board-tools-dropdown-menu {
        transform: translateX(50%) !important;
    }
}

/* Mobile */
@media (max-width: 560px) {
    html body .board-detail-page .board-tools-row.board-tools-row-all-buttons-right,
    html body .board-detail-page .board-tools-row {
        position: static !important;
        top: auto !important;
        z-index: 60 !important;

        width: fit-content !important;
        max-width: calc(100vw - 36px) !important;

        margin: 14px auto 16px !important;
        padding: 8px !important;

        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;

        background: #f3f3f2 !important;
        border: 1px solid #ddddda !important;
        border-radius: 999px !important;
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.05) !important;
        backdrop-filter: none !important;
    }



    html body .board-detail-page .board-tools-toggle,
    html body .board-detail-page .board-tools-edit-board-button,
    html body .board-detail-page .board-tools-add-product-button,
    html body .board-detail-page .board-tools-actions .new-board-button,
    html body .board-detail-page .board-tools-actions .edit-board-button {
        height: 42px !important;
        min-height: 42px !important;
        padding: 0 12px !important;
        font-size: 12px !important;
    }


    html body .board-detail-page .board-tools-edit-board-button {
        min-width: 88px !important;
    }


    html body .board-detail-page > .mobile-board-search {
        width: fit-content !important;
        max-width: calc(100vw - 36px) !important;
        margin: 0 auto 18px !important;
        padding: 8px !important;

        display: flex !important;
        justify-content: center !important;

        background: #f3f3f2 !important;
        border: 1px solid #ddddda !important;
        border-radius: 999px !important;
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.05) !important;
        backdrop-filter: none !important;
    }

    html body .board-detail-page > .mobile-board-search .search-expand-form {
        width: min(300px, calc(100vw - 72px)) !important;
        max-width: min(300px, calc(100vw - 72px)) !important;

        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 42px !important;
        gap: 8px !important;

        margin: 0 !important;
        padding: 0 !important;
    }








}

/* =========================================================
   Board detail: top-right edit menu + longer search toolbar
   Paste at the very bottom of style.css
   ========================================================= */

/* ---------- Header three-dot board menu ---------- */

html body .board-detail-page .board-detail-header {
    grid-template-columns: 72px minmax(0, 1fr) 72px !important;
}

html body .board-detail-page .board-detail-header-menu-wrapper {
    position: relative !important;

    grid-column: 3 !important;
    justify-self: end !important;
    align-self: center !important;

    width: 52px !important;
    height: 52px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

html body .board-detail-page .board-detail-kebab-button {
    width: 52px !important;
    height: 52px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 0 !important;

    border: none !important;
    border-radius: 50% !important;

    background: #f4efe8 !important;
    color: #1f1f1f !important;

    font-family: inherit !important;
    font-size: 28px !important;
    font-weight: 900 !important;
    line-height: 1 !important;

    cursor: pointer !important;
}

html body .board-detail-page .board-detail-kebab-button:hover,
html body .board-detail-page .board-detail-header-menu-wrapper.is-open .board-detail-kebab-button {
    background: #ece6dc !important;
    opacity: 1 !important;
}

html body .board-detail-page .board-detail-header-menu {
    display: none !important;

    position: absolute !important;
    top: calc(100% + 12px) !important;
    right: 0 !important;
    z-index: 90000 !important;

    width: 180px !important;
    padding: 10px !important;

    background: #ffffff !important;
    border: 1px solid #eee6dc !important;
    border-radius: 18px !important;
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.14) !important;
}

html body .board-detail-page .board-detail-header-menu-wrapper.is-open .board-detail-header-menu {
    display: block !important;
}

html body .board-detail-page .board-detail-header-menu-item {
    width: 100% !important;
    padding: 11px 13px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;

    border: none !important;
    border-radius: 12px !important;

    background: transparent !important;
    color: #1f1f1f !important;

    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    text-align: left !important;

    cursor: pointer !important;
}



/* ---------- Toolbar wrapper: longer search, buttons on RHS ---------- */

html body .board-detail-page .board-tools-row.board-tools-row-all-buttons-right,
html body .board-detail-page .board-tools-row {
    position: sticky !important;
    top: 92px !important;
    z-index: 80000 !important;

    width: min(100%, 1200px) !important;
    max-width: calc(100vw - 64px) !important;

    margin: 18px auto 28px !important;
    padding: 10px 12px !important;

    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;

    overflow: visible !important;

    background: #f3f3f2 !important;
    border: 1px solid #ddddda !important;
    border-radius: 999px !important;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.05) !important;
    backdrop-filter: none !important;
}

/* Search slot fills the available space */
html body .board-detail-page .board-tools-search-slot,
html body .board-detail-page .board-tools-row .desktop-board-search,
html body .board-detail-page .board-tools-row .board-product-search-wrapper {
    grid-column: 1 !important;
    justify-self: stretch !important;

    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

html body .board-detail-page .board-tools-search-slot .search-expand-form,
html body .board-detail-page .board-tools-row .search-expand-form {
    width: 100% !important;
    max-width: none !important;

    margin: 0 !important;
    padding: 0 !important;

    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 52px !important;
    align-items: center !important;
    gap: 12px !important;

    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

html body .board-detail-page .board-tools-search-slot .board-product-search-input,
html body .board-detail-page .board-tools-row .board-product-search-input {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 52px !important;

    margin: 0 !important;
    padding: 0 34px !important;

    background: #ffffff !important;
    border: 1px solid #d6d6d3 !important;
    border-radius: 999px !important;
    box-shadow: none !important;

    color: #111111 !important;
    font-size: 20px !important;
    font-weight: 500 !important;
    line-height: 52px !important;
    outline: none !important;
}

html body .board-detail-page .board-tools-search-slot .board-product-search-input::placeholder,
html body .board-detail-page .board-tools-row .board-product-search-input::placeholder {
    color: #777772 !important;
}

html body .board-detail-page .board-tools-search-slot .search-icon-expand-button,
html body .board-detail-page .board-tools-row .search-icon-expand-button {
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    min-height: 52px !important;

    margin: 0 !important;
    padding: 0 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: #1f1f1f !important;
    border: none !important;
    border-radius: 50% !important;
    box-shadow: none !important;

    color: #ffffff !important;
}

html body .board-detail-page .board-tools-search-slot .search-icon-expand-button svg,
html body .board-detail-page .board-tools-row .search-icon-expand-button svg {
    width: 22px !important;
    height: 22px !important;
}


/* RHS buttons: Tools + Add Product only */

html body .board-detail-page .board-tools-actions-right,
html body .board-detail-page .board-tools-actions {
    grid-column: 2 !important;
    justify-self: end !important;
    align-self: center !important;

    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;

    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

html body .board-detail-page .board-tools-edit-board-button {
    display: none !important;
}

html body .board-detail-page .board-tools-dropdown {
    position: relative !important;

    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

html body .board-detail-page .board-tools-toggle,
html body .board-detail-page .board-tools-add-product-button,
html body .board-detail-page .board-tools-actions .new-board-button {
    width: auto !important;
    height: 52px !important;
    min-height: 52px !important;

    margin: 0 !important;
    padding: 0 22px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: #ffffff !important;
    border: 1px solid #ececea !important;
    border-radius: 999px !important;
    box-shadow: none !important;

    color: #111111 !important;
    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    white-space: nowrap !important;

    cursor: pointer !important;
    transform: none !important;
}

html body .board-detail-page .board-tools-toggle {
    min-width: 94px !important;
}

html body .board-detail-page .board-tools-add-product-button,
html body .board-detail-page .board-tools-actions .new-board-button {
    min-width: 146px !important;
}

html body .board-detail-page .board-tools-toggle:hover,
html body .board-detail-page .board-tools-dropdown.is-open .board-tools-toggle,
html body .board-detail-page .board-tools-add-product-button:hover,
html body .board-detail-page .board-tools-actions .new-board-button:hover {
    background: #f3f3f2 !important;
    border-color: #ddddda !important;
    box-shadow: none !important;
    opacity: 1 !important;
    transform: none !important;
}


/* ---------- Tools dropdown ---------- */

html body .board-detail-page .board-tools-toggle-icon,
html body .board-detail-page .board-tools-toggle-chevron,
html body .board-detail-page .board-tool-card-visual,
html body .board-detail-page .board-tool-card-arrow {
    display: none !important;
    content: none !important;
}

html body .board-detail-page .board-tools-dropdown-menu {
    top: calc(100% + 14px) !important;
    right: 0 !important;
    left: auto !important;

    width: min(760px, calc(100vw - 64px)) !important;
    max-width: min(760px, calc(100vw - 64px)) !important;

    padding: 16px !important;

    border: 1px solid #ddddda !important;
    border-radius: 26px !important;
    background: #ffffff !important;
    box-shadow: 0 22px 65px rgba(15, 15, 15, 0.14) !important;

    transform: none !important;
}

html body .board-detail-page .board-tools-dropdown.is-open .board-tools-dropdown-menu {
    display: block !important;
    transform: none !important;
}

html body .board-detail-page .board-tools-menu-options {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px !important;
}

html body .board-detail-page .board-tool-card,
html body .board-detail-page .board-tool-card-checkbox {
    min-width: 0 !important;
    min-height: 106px !important;
    padding: 16px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;

    background: #ffffff !important;
    border: 1px solid #eee6dc !important;
    border-radius: 22px !important;
    box-shadow: none !important;

    color: #111111 !important;
    text-align: left !important;
    transform: none !important;
}

html body .board-detail-page .board-tool-card:hover,
html body .board-detail-page .board-tool-card.is-active,
html body .board-detail-page .board-tool-card-checkbox:has(input:checked),
html body .board-detail-page #boardBudgetToolButton.is-active,
html body .board-detail-page #boardOrganiseButton.is-active {
    background: #f3f3f2 !important;
    border-color: #ddddda !important;
    box-shadow: none !important;
    transform: none !important;
}

html body .board-detail-page .board-tool-card-copy strong {
    display: block !important;
    margin-bottom: 5px !important;

    color: #111111 !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
}

html body .board-detail-page .board-tool-card-copy small {
    display: block !important;

    color: #777772 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
}


/* ---------- Budget results stay board-card styled ---------- */

html body .board-detail-page .board-budget-board-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 24px !important;
}

html body .board-detail-page .board-budget-board-card {
    position: relative !important;

    min-height: 220px !important;
    padding: 32px !important;

    overflow: hidden !important;

    background: #ffffff !important;
    border: none !important;
    border-radius: 28px !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.07) !important;

    cursor: default !important;
}

html body .board-detail-page .board-budget-card-header {
    min-height: 66px !important;
    width: 100% !important;
    margin-bottom: 18px !important;
    padding: 0 20px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: column !important;

    text-align: center !important;
}

html body .board-detail-page .board-budget-card-header h3 {
    max-width: 100% !important;
    margin: 0 auto 8px !important;

    color: #1f1f1f !important;
    text-align: center !important;
    font-size: clamp(20px, 3vw, 30px) !important;
    line-height: 1.1 !important;
    font-weight: 900 !important;

    overflow-wrap: anywhere !important;
}

html body .board-detail-page .board-budget-card-header p {
    margin: 0 !important;

    color: #8a7f73 !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1.35 !important;
}

html body .board-detail-page .board-budget-card-collage,
html body .board-detail-page .board-budget-card-collage.board-cover-collage {
    width: 100% !important;
    height: 180px !important;

    display: grid !important;
    gap: 4px !important;

    overflow: hidden !important;

    background: #f6f2ec !important;
    border-radius: 22px !important;
}

html body .board-detail-page .board-budget-card-collage img {
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;

    display: block !important;

    object-fit: cover !important;
    object-position: center center !important;
}

html body .board-detail-page .board-budget-card-details {
    margin-top: 18px !important;
}

html body .board-detail-page .board-budget-card-count {
    margin: 0 0 12px !important;

    color: #8a7f73 !important;
    text-align: center !important;
    font-size: 13px !important;
    font-weight: 800 !important;
}

html body .board-detail-page .board-budget-card-products {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

html body .board-detail-page .board-budget-card-product-link {
    width: 100% !important;
    padding: 11px 14px !important;

    display: block !important;

    background: #f8f5f0 !important;
    border: 1px solid #eee6dc !important;
    border-radius: 999px !important;

    color: #1f1f1f !important;
    text-decoration: none !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;

    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

html body .board-detail-page .board-budget-card-product-link:hover {
    background: #f3f3f2 !important;
    border-color: #ddddda !important;
}


/* ---------- Tablet ---------- */

@media (max-width: 920px) and (min-width: 561px) {
    html body .board-detail-page .board-tools-row.board-tools-row-all-buttons-right,
    html body .board-detail-page .board-tools-row {
        width: min(100%, calc(100vw - 36px)) !important;
        max-width: calc(100vw - 36px) !important;

        grid-template-columns: 1fr !important;
        grid-template-areas:
            "search"
            "actions" !important;

        border-radius: 34px !important;
        gap: 10px !important;
    }

    html body .board-detail-page .board-tools-search-slot,
    html body .board-detail-page .board-tools-row .desktop-board-search {
        grid-area: search !important;
        grid-column: auto !important;
    }

    html body .board-detail-page .board-tools-actions-right,
    html body .board-detail-page .board-tools-actions {
        grid-area: actions !important;
        grid-column: auto !important;
        justify-self: end !important;
        width: auto !important;
    }

    html body .board-detail-page .board-tools-search-slot .board-product-search-input,
    html body .board-detail-page .board-tools-row .board-product-search-input {
        height: 48px !important;
        padding: 0 22px !important;
        font-size: 16px !important;
        line-height: 48px !important;
    }

    html body .board-detail-page .board-tools-search-slot .search-expand-form,
    html body .board-detail-page .board-tools-row .search-expand-form {
        grid-template-columns: minmax(0, 1fr) 48px !important;
        gap: 8px !important;
    }

    html body .board-detail-page .board-tools-search-slot .search-icon-expand-button,
    html body .board-detail-page .board-tools-row .search-icon-expand-button {
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
        min-height: 48px !important;
    }

    html body .board-detail-page .board-tools-toggle,
    html body .board-detail-page .board-tools-add-product-button,
    html body .board-detail-page .board-tools-actions .new-board-button {
        height: 46px !important;
        min-height: 46px !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
        font-size: 13px !important;
    }

    html body .board-detail-page .board-tools-dropdown-menu {
        right: 50% !important;
        left: auto !important;
        width: calc(100vw - 36px) !important;
        max-width: 760px !important;
        transform: translateX(50%) !important;
    }

    html body .board-detail-page .board-tools-dropdown.is-open .board-tools-dropdown-menu {
        transform: translateX(50%) !important;
    }
}


/* ---------- Mobile ---------- */

@media (max-width: 560px) {
    html body .board-detail-page .board-detail-header {
        display: grid !important;
        grid-template-columns: 44px minmax(0, 1fr) 44px !important;
        align-items: center !important;
        gap: 8px !important;
    }

    html body .board-detail-page .board-detail-kebab-button {
        width: 40px !important;
        height: 40px !important;
    }

    html body .board-detail-page .board-detail-kebab-button {
        font-size: 24px !important;
    }

    html body .board-detail-page .board-detail-header-menu-wrapper {
        width: 40px !important;
        height: 40px !important;
    }

    html body .board-detail-page .board-tools-row.board-tools-row-all-buttons-right,
    html body .board-detail-page .board-tools-row {
        position: static !important;
        top: auto !important;

        width: fit-content !important;
        max-width: calc(100vw - 36px) !important;

        margin: 14px auto 16px !important;
        padding: 8px !important;

        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;

        background: #f3f3f2 !important;
        border: 1px solid #ddddda !important;
        border-radius: 999px !important;
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.05) !important;
    }

    html body .board-detail-page .board-tools-row .desktop-board-search {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    html body .board-detail-page .board-tools-actions-right,
    html body .board-detail-page .board-tools-actions {
        width: auto !important;
        justify-content: center !important;
        gap: 8px !important;
    }

    html body .board-detail-page .board-tools-toggle,
    html body .board-detail-page .board-tools-add-product-button,
    html body .board-detail-page .board-tools-actions .new-board-button {
        height: 42px !important;
        min-height: 42px !important;
        padding: 0 12px !important;
        font-size: 12px !important;
    }

    html body .board-detail-page .board-tools-toggle {
        min-width: 72px !important;
    }

    html body .board-detail-page .board-tools-add-product-button,
    html body .board-detail-page .board-tools-actions .new-board-button {
        min-width: 104px !important;
    }

    html body .board-detail-page > .mobile-board-search {
        width: min(100%, calc(100vw - 36px)) !important;
        max-width: calc(100vw - 36px) !important;
        margin: 0 auto 18px !important;
        padding: 8px !important;

        display: flex !important;
        justify-content: center !important;

        background: #f3f3f2 !important;
        border: 1px solid #ddddda !important;
        border-radius: 999px !important;
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.05) !important;
    }

    html body .board-detail-page > .mobile-board-search .search-expand-form {
        width: 100% !important;
        max-width: none !important;

        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 42px !important;
        gap: 8px !important;

        margin: 0 !important;
        padding: 0 !important;
    }

    html body .board-detail-page > .mobile-board-search .board-product-search-input {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: 42px !important;
        padding: 0 14px !important;
        font-size: 13px !important;
        line-height: 42px !important;
    }

    html body .board-detail-page > .mobile-board-search .search-icon-expand-button {
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
        min-height: 42px !important;
    }

    html body .board-detail-page .board-tools-dropdown-menu {
        right: 50% !important;
        left: auto !important;
        width: calc(100vw - 24px) !important;
        max-width: calc(100vw - 24px) !important;
        padding: 12px !important;
        transform: translateX(50%) !important;
    }

    html body .board-detail-page .board-tools-dropdown.is-open .board-tools-dropdown-menu {
        transform: translateX(50%) !important;
    }

    html body .board-detail-page .board-tools-menu-options {
        grid-template-columns: 1fr !important;
    }

    html body .board-detail-page .board-tool-card,
    html body .board-detail-page .board-tool-card-checkbox {
        min-height: auto !important;
        padding: 13px 14px !important;
    }

    html body .board-detail-page .board-budget-board-grid {
        grid-template-columns: 1fr !important;
    }

    html body .board-detail-page .board-budget-board-card {
        padding: 24px !important;
    }
}

/* =========================================================
   Board detail: remove beige UI colours
   Paste at the very bottom of style.css
   ========================================================= */

html body .board-detail-page {
    --board-ui-white: #ffffff;
    --board-ui-grey: #f3f3f2;
    --board-ui-grey-border: #ddddda;
    --board-ui-text: #1f1f1f;
    --board-ui-muted: #777772;
}

/* Header three-dot menu button */
html body .board-detail-page .board-detail-kebab-button {
    background: #ffffff !important;
    color: #1f1f1f !important;
    border: 1px solid #ddddda !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.05) !important;
}

html body .board-detail-page .board-detail-kebab-button:hover,
html body .board-detail-page .board-detail-header-menu-wrapper.is-open .board-detail-kebab-button {
    background: #f3f3f2 !important;
    border-color: #d6d6d3 !important;
    opacity: 1 !important;
}

/* Header dropdown */
html body .board-detail-page .board-detail-header-menu {
    background: #ffffff !important;
    border: 1px solid #ddddda !important;
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.12) !important;
}

html body .board-detail-page .board-detail-header-menu-item:hover {
    background: #f3f3f2 !important;
}

/* Tools wrapper + buttons */
html body .board-detail-page .board-tools-row {
    background: #f3f3f2 !important;
    border-color: #ddddda !important;
}

html body .board-detail-page .board-tools-toggle,
html body .board-detail-page .board-tools-add-product-button,
html body .board-detail-page .board-tools-actions .new-board-button {
    background: #ffffff !important;
    border-color: #ddddda !important;
    color: #1f1f1f !important;
}

html body .board-detail-page .board-tools-toggle:hover,
html body .board-detail-page .board-tools-dropdown.is-open .board-tools-toggle,
html body .board-detail-page .board-tools-add-product-button:hover,
html body .board-detail-page .board-tools-actions .new-board-button:hover {
    background: #f3f3f2 !important;
    border-color: #d6d6d3 !important;
}

/* Tools dropdown and option cards */
html body .board-detail-page .board-tools-dropdown-menu {
    background: #ffffff !important;
    border-color: #ddddda !important;
}

html body .board-detail-page .board-tool-card,
html body .board-detail-page .board-tool-card-checkbox {
    background: #ffffff !important;
    border-color: #ddddda !important;
}

html body .board-detail-page .board-tool-card:hover,
html body .board-detail-page .board-tool-card.is-active,
html body .board-detail-page .board-tool-card-checkbox:has(input:checked),
html body .board-detail-page #boardBudgetToolButton.is-active,
html body .board-detail-page #boardOrganiseButton.is-active {
    background: #f3f3f2 !important;
    border-color: #d6d6d3 !important;
}

html body .board-detail-page .board-tool-card-copy small {
    color: #777772 !important;
}

/* Budget panel: neutral greys, no beige */
html body .board-detail-page .board-budget-panel,
html body .board-detail-page .board-organise-status {
    background: #ffffff !important;
    border-color: #ddddda !important;
}

html body .board-detail-page .board-budget-close-button,
html body .board-detail-page .board-organise-done-button,
html body .board-detail-page .board-budget-submit-button {
    background: #ffffff !important;
    border: 1px solid #ddddda !important;
    color: #1f1f1f !important;
}

html body .board-detail-page .board-budget-close-button:hover,
html body .board-detail-page .board-organise-done-button:hover,
html body .board-detail-page .board-budget-submit-button:hover {
    background: #f3f3f2 !important;
    border-color: #d6d6d3 !important;
}

/* Budget result cards */
html body .board-detail-page .board-budget-board-card {
    background: #ffffff !important;
}

html body .board-detail-page .board-budget-card-collage,
html body .board-detail-page .board-budget-card-collage.board-cover-collage {
    background: #f3f3f2 !important;
}

html body .board-detail-page .board-budget-card-product-link {
    background: #ffffff !important;
    border-color: #ddddda !important;
    color: #1f1f1f !important;
}

html body .board-detail-page .board-budget-card-product-link:hover {
    background: #f3f3f2 !important;
    border-color: #d6d6d3 !important;
}

/* Edit board modal elements inside this page */
html body .board-detail-page #editBoardModal .delete-modal-card,
html body .board-detail-page #deleteModal .delete-modal-card {
    background: #ffffff !important;
}

html body .board-detail-page #editBoardModal .cancel-delete-button,
html body .board-detail-page #deleteModal .cancel-delete-button,
html body .board-detail-page #editBoardModal .cover-toggle-button,
html body .board-detail-page .board-cover-upload-section,
html body .board-detail-page .custom-file-upload {
    background: #f3f3f2 !important;
    border-color: #ddddda !important;
    color: #1f1f1f !important;
}

html body .board-detail-page #editBoardModal .cancel-delete-button:hover,
html body .board-detail-page #deleteModal .cancel-delete-button:hover,
html body .board-detail-page #editBoardModal .cover-toggle-button:hover,
html body .board-detail-page .custom-file-upload:hover {
    background: #e9e9e6 !important;
    border-color: #d0d0cc !important;
}

/* =========================================================
   Board detail toolbar height: match Boards / Explore search
   Paste at the very bottom of style.css
   ========================================================= */

html body .board-detail-page .board-tools-row.board-tools-row-all-buttons-right,
html body .board-detail-page .board-tools-row {
    min-height: 0 !important;
    padding: 8px 10px !important;
    gap: 10px !important;
}

/* Search input */
html body .board-detail-page .board-tools-search-slot .board-product-search-input,
html body .board-detail-page .board-tools-row .board-product-search-input {
    height: 46px !important;
    min-height: 46px !important;

    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 22px !important;
    padding-right: 22px !important;

    font-size: 15px !important;
    line-height: 46px !important;
}

/* Search icon */
html body .board-detail-page .board-tools-search-slot .search-icon-expand-button,
html body .board-detail-page .board-tools-row .search-icon-expand-button {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    min-height: 46px !important;
}

html body .board-detail-page .board-tools-search-slot .search-icon-expand-button svg,
html body .board-detail-page .board-tools-row .search-icon-expand-button svg {
    width: 20px !important;
    height: 20px !important;
}

/* RHS buttons */
html body .board-detail-page .board-tools-toggle,
html body .board-detail-page .board-tools-add-product-button,
html body .board-detail-page .board-tools-actions .new-board-button {
    height: 46px !important;
    min-height: 46px !important;

    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 18px !important;
    padding-right: 18px !important;

    font-size: 14px !important;
    line-height: 1 !important;
}

/* Keep proportions clean */
html body .board-detail-page .board-tools-toggle {
    min-width: 86px !important;
}

html body .board-detail-page .board-tools-add-product-button,
html body .board-detail-page .board-tools-actions .new-board-button {
    min-width: 132px !important;
}

/* Search form spacing */
html body .board-detail-page .board-tools-search-slot .search-expand-form,
html body .board-detail-page .board-tools-row .search-expand-form {
    grid-template-columns: minmax(0, 1fr) 46px !important;
    gap: 10px !important;
}

/* Tablet */
@media (max-width: 920px) and (min-width: 561px) {
    html body .board-detail-page .board-tools-row.board-tools-row-all-buttons-right,
    html body .board-detail-page .board-tools-row {
        padding: 8px !important;
        gap: 8px !important;
    }

    html body .board-detail-page .board-tools-search-slot .board-product-search-input,
    html body .board-detail-page .board-tools-row .board-product-search-input {
        height: 44px !important;
        min-height: 44px !important;
        line-height: 44px !important;
        font-size: 14px !important;
    }

    html body .board-detail-page .board-tools-search-slot .search-icon-expand-button,
    html body .board-detail-page .board-tools-row .search-icon-expand-button,
    html body .board-detail-page .board-tools-toggle,
    html body .board-detail-page .board-tools-add-product-button,
    html body .board-detail-page .board-tools-actions .new-board-button {
        height: 44px !important;
        min-height: 44px !important;
    }

    html body .board-detail-page .board-tools-search-slot .search-expand-form,
    html body .board-detail-page .board-tools-row .search-expand-form {
        grid-template-columns: minmax(0, 1fr) 44px !important;
    }
}

/* Mobile */
@media (max-width: 560px) {
    html body .board-detail-page .board-tools-row.board-tools-row-all-buttons-right,
    html body .board-detail-page .board-tools-row {
        padding: 7px !important;
        gap: 7px !important;
    }

    html body .board-detail-page .board-tools-toggle,
    html body .board-detail-page .board-tools-add-product-button,
    html body .board-detail-page .board-tools-actions .new-board-button {
        height: 40px !important;
        min-height: 40px !important;
        padding-left: 11px !important;
        padding-right: 11px !important;
        font-size: 12px !important;
    }

    html body .board-detail-page > .mobile-board-search {
        padding: 7px !important;
    }

    html body .board-detail-page > .mobile-board-search .board-product-search-input,
    html body .board-detail-page > .mobile-board-search .search-icon-expand-button {
        height: 40px !important;
        min-height: 40px !important;
    }

    html body .board-detail-page > .mobile-board-search .search-icon-expand-button {
        width: 40px !important;
        min-width: 40px !important;
    }

    html body .board-detail-page > .mobile-board-search .search-expand-form {
        grid-template-columns: minmax(0, 1fr) 40px !important;
    }
}

/* =========================================================
   Board detail toolbar: match Tools + Add Product typography
   ========================================================= */

html body .board-detail-page .board-tools-toggle,
html body .board-detail-page .board-tools-add-product-button,
html body .board-detail-page .board-tools-actions .new-board-button {
    font-size: 14px !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
    line-height: 1 !important;
}

/* Keep them matching on mobile too */
@media (max-width: 560px) {
    html body .board-detail-page .board-tools-toggle,
    html body .board-detail-page .board-tools-add-product-button,
    html body .board-detail-page .board-tools-actions .new-board-button {
        font-size: 12px !important;
        font-weight: 800 !important;
        letter-spacing: 0 !important;
        line-height: 1 !important;
    }
}

/* =========================================================
   Board detail scroll layering:
   tools panels slide behind sticky search,
   product cards stay visible in navbar/search gap
   ========================================================= */


/* Sticky board search/tools bar sits below navbar */
html body .board-detail-page .board-tools-row {
    position: sticky !important;
    top: 92px !important;
    z-index: 80000 !important;

    overflow: visible !important;
}

/* Keep the actual search/actions visually above any opened tools content */
html body .board-detail-page .board-tools-search-slot,
html body .board-detail-page .desktop-board-search,
html body .board-detail-page .board-tools-actions-right,
html body .board-detail-page .board-tools-actions,
html body .board-detail-page .board-tools-dropdown {
    position: relative !important;
    z-index: 80002 !important;
}

/* Dropdown can sit above the toolbar only while open/clickable */
html body .board-detail-page .board-tools-dropdown-menu {
    z-index: 80003 !important;
}

/* Budget + organise sections should scroll underneath the sticky search bar */
html body .board-detail-page .board-budget-panel,
html body .board-detail-page .board-organise-status {
    position: relative !important;
    z-index: 2 !important;
}

/* Product cards stay above normal page sections, but below sticky search/navbar */
html body .board-detail-page #sortable-products,
html body .board-detail-page .wishlist-grid,
html body .board-detail-page .wishboard-masonry-column {
    position: relative !important;
    z-index: 50 !important;
}

/* Individual cards remain visible in the navbar/search gap */
html body .board-detail-page .sortable-item,
html body .board-detail-page .product-card {
    position: relative !important;
    z-index: 51 !important;
}

/* But while dragging, the dragged ghost still needs to sit above everything */
html body .board-detail-page .board-drag-ghost {
    z-index: 95000 !important;
}

/* Mobile: match your lower sticky navbar spacing */
@media (max-width: 768px) {
    html body .board-detail-page .board-tools-row {
        top: 78px !important;
    }
}

/* =========================================================
   Board tools panels: progressively disappear behind toolbar
   ========================================================= */

html body .board-detail-page .board-organise-status,
html body .board-detail-page .board-organise-banner,
html body .board-detail-page .board-budget-panel {
    --board-tool-clip-top: 0px;

    /* Only the TOP edge clips (the panel sliding up behind the sticky
       toolbar). The other three sides sit well outside the box so card
       hover outlines and drop shadows that legitimately paint outside it
       - e.g. the budget compare picker's 2px outline - aren't cut off. */
    clip-path: inset(var(--board-tool-clip-top) -999px -999px -999px) !important;
    -webkit-clip-path: inset(var(--board-tool-clip-top) -999px -999px -999px) !important;

    will-change: clip-path;
    transform: translateZ(0);
}

html body .board-detail-page .board-tool-panel-fully-clipped {
    pointer-events: none !important;
}

/* =========================================================
   Budget tool: clean range inputs, no grey outer box
   Paste at the very bottom of style.css
   ========================================================= */

html body .board-detail-page .board-budget-panel {
    display: none !important;

    width: min(100%, 1200px) !important;
    max-width: calc(100vw - 64px) !important;

    margin: 18px auto 28px !important;
    padding: 0 !important;

    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

html body .board-detail-page .board-budget-panel.is-open {
    display: block !important;
}

html body .board-detail-page .board-budget-shell {
    padding: 0 !important;
    margin: 0 !important;

    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

html body .board-detail-page .board-budget-panel-header,
html body .board-detail-page .board-budget-helper,
html body .board-detail-page .board-panel-eyebrow {
    display: none !important;
}

html body .board-detail-page .board-budget-form.board-budget-range-form,
html body .board-detail-page .board-budget-range-form {
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;

    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 12px !important;

    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

html body .board-detail-page .board-budget-input,
html body .board-detail-page .board-budget-range-input {
    width: 100% !important;
    min-width: 0 !important;
    height: 46px !important;

    margin: 0 !important;
    padding: 0 22px !important;

    background: #ffffff !important;
    border: 1px solid #d6d6d3 !important;
    border-radius: 999px !important;
    box-shadow: none !important;

    color: #111111 !important;
    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 46px !important;
    outline: none !important;
}

html body .board-detail-page .board-budget-input::placeholder,
html body .board-detail-page .board-budget-range-input::placeholder {
    color: #777772 !important;
}

html body .board-detail-page .board-budget-input:focus,
html body .board-detail-page .board-budget-range-input:focus {
    border-color: #bfbfbb !important;
    box-shadow: none !important;
    outline: none !important;
}

html body .board-detail-page .board-budget-submit-button {
    height: 46px !important;
    min-height: 46px !important;

    margin: 0 !important;
    padding: 0 22px !important;

    background: #ffffff !important;
    border: 1px solid #d6d6d3 !important;
    border-radius: 999px !important;
    box-shadow: none !important;

    color: #111111 !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

html body .board-detail-page .board-budget-submit-button:hover {
    background: #f3f3f2 !important;
    border-color: #d6d6d3 !important;
}

html body .board-detail-page .board-budget-results {
    margin-top: 22px !important;
}

/* Mobile */
@media (max-width: 700px) {
    html body .board-detail-page .board-budget-panel {
        max-width: calc(100vw - 36px) !important;
    }

    html body .board-detail-page .board-budget-form.board-budget-range-form,
    html body .board-detail-page .board-budget-range-form {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    html body .board-detail-page .board-budget-submit-button {
        width: 100% !important;
    }
}

/* =========================================================
   Budget tool: compact centred range controls
   Paste at the very bottom of style.css
   ========================================================= */

html body .board-detail-page .board-budget-form.board-budget-range-form,
html body .board-detail-page .board-budget-range-form {
    width: fit-content !important;
    max-width: 100% !important;
    margin: 0 auto !important;

    display: grid !important;
    grid-template-columns: 190px 190px 220px !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 14px !important;
}

html body .board-detail-page .board-budget-input,
html body .board-detail-page .board-budget-range-input {
    width: 190px !important;
    max-width: 190px !important;
    min-width: 0 !important;
}

html body .board-detail-page .board-budget-submit-button {
    width: 220px !important;
    max-width: 220px !important;
    min-width: 220px !important;
    justify-content: center !important;
}

/* Tablet: keep centred, slightly smaller */
@media (max-width: 900px) {
    html body .board-detail-page .board-budget-form.board-budget-range-form,
    html body .board-detail-page .board-budget-range-form {
        grid-template-columns: 160px 160px 200px !important;
        gap: 10px !important;
    }

    html body .board-detail-page .board-budget-input,
    html body .board-detail-page .board-budget-range-input {
        width: 160px !important;
        max-width: 160px !important;
    }

    html body .board-detail-page .board-budget-submit-button {
        width: 200px !important;
        max-width: 200px !important;
        min-width: 200px !important;
    }
}

/* Mobile: stack neatly */
@media (max-width: 560px) {
    html body .board-detail-page .board-budget-form.board-budget-range-form,
    html body .board-detail-page .board-budget-range-form {
        width: min(100%, 280px) !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

}

/* =========================================================
   Budget controls thinner + organise section no outer box
   Paste at the very bottom of style.css
   ========================================================= */

/* Budget: thinner, centred controls */
html body .board-detail-page .board-budget-form.board-budget-range-form,
html body .board-detail-page .board-budget-range-form {
    width: fit-content !important;
    max-width: 100% !important;
    margin: 0 auto !important;

    display: grid !important;
    grid-template-columns: 120px 120px 185px !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
}

html body .board-detail-page .board-budget-input,
html body .board-detail-page .board-budget-range-input {
    width: 120px !important;
    max-width: 120px !important;
    min-width: 0 !important;
    height: 42px !important;

    padding-left: 16px !important;
    padding-right: 16px !important;

    font-size: 14px !important;
    line-height: 42px !important;
}

html body .board-detail-page .board-budget-submit-button {
    width: 185px !important;
    max-width: 185px !important;
    min-width: 185px !important;
    height: 42px !important;
    min-height: 42px !important;

    padding-left: 16px !important;
    padding-right: 16px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    font-size: 14px !important;
    line-height: 1 !important;
}

/* Remove weird outer box from organise section */
html body .board-detail-page .board-organise-status,
html body .board-detail-page .board-organise-banner,
html body .board-detail-page .board-organise-panel,
html body .board-detail-page .board-reorganise-status,
html body .board-detail-page .board-reorganise-banner,
html body .board-detail-page .board-reorganise-panel {
    width: fit-content !important;
    max-width: calc(100vw - 36px) !important;

    margin: 10px auto 18px !important;
    padding: 0 !important;

    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    backdrop-filter: none !important;
}

/* Keep the organise text/button themselves tidy after removing the container */
html body .board-detail-page .board-organise-status p,
html body .board-detail-page .board-organise-banner p,
html body .board-detail-page .board-organise-status strong,
html body .board-detail-page .board-organise-banner strong {
    margin: 0 !important;
}

html body .board-detail-page .board-organise-done-button {
    height: 42px !important;
    min-height: 42px !important;

    padding: 0 18px !important;

    background: #ffffff !important;
    border: 1px solid #ddddda !important;
    border-radius: 999px !important;
    box-shadow: none !important;

    color: #1f1f1f !important;
    font-size: 14px !important;
    font-weight: 800 !important;
}

/* Tablet */
@media (max-width: 900px) {
    html body .board-detail-page .board-budget-form.board-budget-range-form,
    html body .board-detail-page .board-budget-range-form {
        grid-template-columns: 105px 105px 170px !important;
        gap: 8px !important;
    }

    html body .board-detail-page .board-budget-input,
    html body .board-detail-page .board-budget-range-input {
        width: 105px !important;
        max-width: 105px !important;
    }

    html body .board-detail-page .board-budget-submit-button {
        width: 170px !important;
        max-width: 170px !important;
        min-width: 170px !important;
    }
}

/* Mobile */
@media (max-width: 560px) {

}

/* Budget: keep height, make From/To around two-thirds width */

html body .board-detail-page .board-budget-form.board-budget-range-form,
html body .board-detail-page .board-budget-range-form {
    grid-template-columns: 80px 80px 185px !important;
}

html body .board-detail-page .board-budget-input,
html body .board-detail-page .board-budget-range-input {
    width: 80px !important;
    max-width: 80px !important;
    height: 42px !important;
    line-height: 42px !important;
}

html body .board-detail-page .board-budget-submit-button {
    height: 42px !important;
    min-height: 42px !important;
}

/* Tablet */
@media (max-width: 900px) {
    html body .board-detail-page .board-budget-form.board-budget-range-form,
    html body .board-detail-page .board-budget-range-form {
        grid-template-columns: 70px 70px 170px !important;
    }

    html body .board-detail-page .board-budget-input,
    html body .board-detail-page .board-budget-range-input {
        width: 70px !important;
        max-width: 70px !important;
    }
}

/* Mobile stays stacked and usable */
@media (max-width: 560px) {
    html body .board-detail-page .board-budget-form.board-budget-range-form,
    html body .board-detail-page .board-budget-range-form {
        width: min(100%, 260px) !important;
        grid-template-columns: 1fr !important;
    }

    html body .board-detail-page .board-budget-input,
    html body .board-detail-page .board-budget-range-input,
    html body .board-detail-page .board-budget-submit-button {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* =========================================================
   Board tool panels: cohesive Budget + Reorganise styling
   Paste at the very bottom of style.css
   ========================================================= */

/* Shared panel reset - positioning (width/max-width/margin) for
   .board-budget-panel specifically now lives ONLY in board_detail.html's
   own <style> block (search for "Budget Studio positioning" there) so
   there's one single authoritative rule instead of this plus several
   other copies fighting over it; .board-organise-banner keeps its copy
   since that element wasn't part of this. */
html body .board-detail-page .board-organise-banner {
    width: min(100%, 1200px) !important;
    max-width: calc(100vw - 64px) !important;

    margin: 18px auto 28px !important;
    padding: 0 !important;

    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* Budget layout - .board-budget-controls-wrap positioning also now
   lives only in board_detail.html's own <style> block (see above). */

html body .board-detail-page .board-budget-form.board-budget-range-form,
html body .board-detail-page .board-budget-range-form {
    width: fit-content !important;
    max-width: 100% !important;

    margin: 0 auto !important;
    padding: 0 !important;

    display: grid !important;
    grid-template-columns: 80px 80px 185px !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;

    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

html body .board-detail-page .board-budget-input,
html body .board-detail-page .board-budget-range-input {
    width: 80px !important;
    max-width: 80px !important;
    height: 42px !important;

    margin: 0 !important;
    padding: 0 14px !important;

    background: #ffffff !important;
    border: 1px solid #d6d6d3 !important;
    border-radius: 999px !important;

    color: #1f1f1f !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 42px !important;
    text-align: left !important;
}

html body .board-detail-page .board-budget-input::placeholder,
html body .board-detail-page .board-budget-range-input::placeholder {
    color: #777772 !important;
    font-weight: 600 !important;
}

html body .board-detail-page .board-budget-submit-button {
    width: 185px !important;
    max-width: 185px !important;
    min-width: 185px !important;
    height: 42px !important;
    min-height: 42px !important;

    margin: 0 !important;
    padding: 0 16px !important;

    background: #ffffff !important;
    border: 1px solid #d6d6d3 !important;
    border-radius: 999px !important;

    color: #111111 !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

html body .board-detail-page .board-budget-exit-text,
html body .board-detail-page .board-tool-exit-hint {
    width: 100% !important;

    margin: 12px auto 0 !important;
    padding: 0 !important;

    display: block !important;

    color: #777772 !important;
    text-align: center !important;

    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
}

/* Reorganise layout: make it visually match Budget */
html body .board-detail-page .board-organise-banner {
    display: none !important;
}

html body .board-detail-page .board-organise-banner.is-open {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

html body .board-detail-page .board-organise-banner > div {
    width: fit-content !important;
    max-width: 100% !important;

    margin: 0 auto !important;
    padding: 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;

    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;

    text-align: center !important;
}

html body .board-detail-page .board-organise-banner strong {
    margin: 0 !important;
    padding: 0 !important;

    color: #1f1f1f !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
}

html body .board-detail-page .board-organise-banner span {
    margin: 0 !important;
    padding: 0 !important;

    color: #777772 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
}

/* Keep both panels progressively clipping behind the sticky search bar.
   Top edge only - see the matching rule earlier in this file for why the
   other three sides are pushed outside the box. */
html body .board-detail-page .board-budget-panel,
html body .board-detail-page .board-organise-banner {
    --board-tool-clip-top: 0px;

    clip-path: inset(var(--board-tool-clip-top) -999px -999px -999px) !important;
    -webkit-clip-path: inset(var(--board-tool-clip-top) -999px -999px -999px) !important;

    will-change: clip-path;
    transform: translateZ(0);
}

/* Mobile */
@media (max-width: 560px) {
    html body .board-detail-page .board-budget-form.board-budget-range-form,
    html body .board-detail-page .board-budget-range-form {
        width: min(100%, 260px) !important;
        grid-template-columns: 1fr !important;
        gap: 9px !important;
    }

    html body .board-detail-page .board-budget-input,
    html body .board-detail-page .board-budget-range-input,
    html body .board-detail-page .board-budget-submit-button {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    html body .board-detail-page .board-organise-banner > div {
        flex-direction: column !important;
        gap: 4px !important;
    }

    html body .board-detail-page .board-organise-banner strong,
    html body .board-detail-page .board-organise-banner span,
    html body .board-detail-page .board-budget-exit-text,
    html body .board-detail-page .board-tool-exit-hint {
        font-size: 13px !important;
        white-space: normal !important;
    }
}

/* Reorganise helper: title on top, helper text below on one line */

html body .board-detail-page .board-organise-banner > div {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;

    text-align: center !important;
}

html body .board-detail-page .board-organise-banner strong {
    display: block !important;

    margin: 0 !important;

    font-size: 15px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

html body .board-detail-page .board-organise-banner span {
    display: block !important;

    margin: 0 !important;

    color: #777772 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
}

@media (max-width: 560px) {
    html body .board-detail-page .board-organise-banner span {
        white-space: normal !important;
        max-width: 260px !important;
    }
}




/* =========================================================================
   DECKD SIDEBAR + TOPBAR REDESIGN (trial) — 2026-07-10

   Pinterest-style layout trial: left icon sidebar (Explore / My Boards /
   Quick add) + a top bar with the logo, a stretched search field and the
   account/currency cluster. Appended as a single block so the whole trial
   can be reversed by deleting everything below this comment and restoring
   base.html / explore.html from wishlist/_redesign_backup_2026-07-10/.

   Nothing above this line was edited or deleted.
   ========================================================================= */

/* ---------- Wider product cards: edge-to-card gap matches inter-card gap ---------- */

/* The page wrappers were centered with a capped max-width, leaving edge
   margins much wider than the 24px gap between cards. Go full-bleed instead,
   and use horizontal padding equal to the masonry gap at each breakpoint
   (mirrors the existing .wishboard-masonry-column gap values: 24/20/18/14px)
   so the distance from the viewport edge to the first/last card equals the
   distance between cards. */
html body .explore-page,
html body .board-detail-page {
    max-width: none !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
}

html body .explore-page .wishlist-grid,
html body .board-detail-page .wishlist-grid,
html body .explore-page #sortable-products,
html body .board-detail-page #sortable-products {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    justify-content: flex-start !important;
}

/* The masonry columns had a fixed max-width (244/220/240px depending on
   breakpoint) combined with the grid's justify-content:center above — on a
   full-bleed container that left large, uneven centered gaps instead of an
   edge gap matching the inter-column gap. Let columns grow to fill the
   full-bleed width instead, which also makes each card wider. */
html body .explore-page .wishboard-masonry-column,
html body .board-detail-page .wishboard-masonry-column {
    flex: 1 1 0 !important;
    max-width: none !important;
}

html body .explore-page .product-card img,
html body .board-detail-page .product-card img {
    height: auto !important;
    display: block !important;
    object-fit: cover !important;
}

/* Corner radius between the card's old radius (22px) and the search bar's
   (14px). */
html body .explore-page .product-card,
html body .board-detail-page .product-card {
    border-radius: 18px !important;
}

/* Explore: cards start right under the top bar instead of the old stacked
   page + grid top padding. */
html body .explore-page {
    padding-top: 0 !important;
}

/* Top padding now matches whatever .explore-page's own side padding
   currently is (24/20/18/14px across the breakpoints below), instead
   of sitting almost flush under the navbar divider - the grid itself
   is full-bleed (padding-left/right: 0 above), so .explore-page's own
   padding is the actual "gap to the screen edge" these track. */
html body .explore-page .wishlist-grid,
html body .explore-page #sortable-products {
    padding-top: 24px !important;
}

@media (max-width: 1100px) {
    html body .explore-page,
    html body .board-detail-page {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    html body .explore-page .wishlist-grid,
    html body .explore-page #sortable-products {
        padding-top: 20px !important;
    }
}

@media (max-width: 800px) {
    html body .explore-page,
    html body .board-detail-page {
        padding-left: 18px !important;
        padding-right: 18px !important;
    }

    html body .explore-page .wishlist-grid,
    html body .explore-page #sortable-products {
        padding-top: 18px !important;
    }
}

@media (max-width: 420px) {
    html body .explore-page,
    html body .board-detail-page {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    html body .explore-page .wishlist-grid,
    html body .explore-page #sortable-products {
        padding-top: 14px !important;
    }
}

/* ---------- Responsive (sidebar / top bar) ---------- */

@media (max-width: 700px) {



    /* Too narrow to fit logo + search + account on one row — wrap the
       search bar onto its own full-width row underneath. */






}

/* ---------- Boards / Board detail: search moved into the top bar ---------- */

/* Boards + Board detail now feed their search markup into the same
   header_search block explore.html uses, styled identically via the
   deckd-topbar-search / deckd-search-filter-button classes above. No extra
   rules needed for the search bar itself.

   What DID need new rules: the buttons that used to sit next to those
   search bars (+ New Board / Tools / + Add Product) have been pulled out of
   the wrapper along with the search bar and temporarily placed in a plain
   top-right row in the page content — positioning to be refined later. */
/* =========================================================
   My Boards owner header + action buttons
   ========================================================= */

.deckd-page-actions-topright {
    display: none !important;
}

.boards-owner-header {
    width: 100%;

    margin: 0 0 30px;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.boards-owner-main {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 18px;
}




.boards-owner-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

.boards-owner-action-button,
html body .boards-page .boards-owner-action-button.new-board-button {
    height: 48px;
    min-height: 48px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 0 18px;

    border: 1px solid #e2ded5;
    border-radius: 14px;

    background: #f3f3f2;
    color: #111111;

    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;

    text-decoration: none;
    white-space: nowrap;

    cursor: pointer;
    box-shadow: none;
}

.boards-owner-action-button:hover,
html body .boards-page .boards-owner-action-button.new-board-button:hover {
    background: #e9e9e6;
    border-color: #d6d6d3;
    transform: none;
}

.boards-owner-share-button {
    cursor: default;
}

.boards-owner-action-icon {
    width: 17px;
    height: 17px;

    flex-shrink: 0;

    stroke: currentColor;
}

@media (max-width: 560px) {

    .boards-owner-main {
        gap: 14px;
    }



    .boards-owner-actions {
        width: 100%;
        gap: 8px;
    }

    .boards-owner-action-button,
    html body .boards-page .boards-owner-action-button.new-board-button {
        height: 44px;
        min-height: 44px;

        padding: 0 14px;

        font-size: 13px;
    }
}



@media (max-width: 700px) {
    .deckd-page-actions-topright {
        padding: 0 18px;
    }
}

/* ---------- Boards grid: Pinterest-style tiles ---------- */
/* Smaller, shorter tiles, 4 per row; title moved out of the white card and
   placed as plain text under the cover image; edit ("...") button only
   shows on hover, overlaid on the cover image itself. */

.boards-page .boards-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 20px !important;
}

.boards-page .board-card {
    min-height: 0 !important;
    padding: 0 !important;

    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;

    /* Base .board-card sets overflow: hidden for its own rounded-corner
       image cropping, but here that's already handled by
       .board-cover-collage-wrap/.board-cover-collage's own overflow:
       hidden - left unset, it also clips the "..." dropdown's expanded
       Export submenu against the card's own (short) height. */
    overflow: visible !important;
}

.boards-page .board-cover-collage-wrap {
    position: relative;
}

/* The cover preview is always a fixed 4:3 framed box, even for a board
   with no items yet - .product-count-0 hides the inner collage grid
   (which would otherwise collapse the tile down to just its title, with
   nothing to hover or darken). The thin outline + light fill on the
   wrap keeps an empty board visibly "there", and since the hover
   overlay (.board-cover-collage-wrap::after, further down) and the "..."
   menu button both live on this wrap, an empty board darkens on hover
   and shows its menu button exactly like a populated one. */
.boards-page .deckd-board-tile .board-cover-collage-wrap {
    aspect-ratio: 4 / 3 !important;

    background: #f4f4f4 !important;
    border: 1px solid #dcdcdc !important;
    border-radius: 16px !important;
}

.boards-page .board-cover-collage {
    height: auto !important;
    aspect-ratio: 4 / 3 !important;
    border-radius: 16px !important;

    gap: 1px !important;
    background: #dcdcdc !important;
    border: 1px solid #dcdcdc !important;
}

/* Images with transparent backgrounds were letting the (dark) collage
   background show through them. Give each image its own white backing so
   only the 1px dividers between photos show the grey, never a product's
   own transparent padding. */
.boards-page .board-cover-collage img {
    background: #ffffff !important;
}

/* "..." edit/delete button — hidden overlay on the cover image, revealed
   on hover (or keyboard focus). Scoped to this tile only so the shared
   .board-menu-button styling used elsewhere (board detail product cards)
   is untouched. */
.boards-page .board-cover-collage-wrap .board-menu-button {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    z-index: 20 !important;

    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    line-height: 1 !important;
    font-size: 17px !important;

    background: rgba(255, 255, 255, 0.92) !important;
    border-radius: 50% !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18) !important;
    color: #1f1f1f !important;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.boards-page .deckd-board-tile:hover .board-cover-collage-wrap .board-menu-button,
.boards-page .board-cover-collage-wrap .board-menu-button:focus-visible,
/* While this tile's menu is open, keep its button visible even after the
   cursor leaves the tile - otherwise the button vanishes out from under
   the dropdown that's still anchored to it. toggleMenu() in boards.html
   sets .is-open on the .board-menu; a click anywhere else clears it and
   the button fades back out. */
.boards-page .deckd-board-tile:has(.board-menu.is-open) .board-cover-collage-wrap .board-menu-button {
    opacity: 1;
    pointer-events: auto;
}

/* Some shared button styling elsewhere resets the background to transparent
   on :hover/:focus/:active — pin it white in every interaction state here. */
.boards-page .board-cover-collage-wrap .board-menu-button,
.boards-page .board-cover-collage-wrap .board-menu-button:hover,
.boards-page .board-cover-collage-wrap .board-menu-button:focus,
.boards-page .board-cover-collage-wrap .board-menu-button:focus-visible,
.boards-page .board-cover-collage-wrap .board-menu-button:active {
    background: rgba(255, 255, 255, 0.92) !important;
}

.boards-page .board-menu {
    top: 46px !important;
    right: 8px !important;
    left: auto !important;
}

.boards-page .deckd-board-tile-title {
    margin: 10px 2px 0;

    font-family: var(--card-title-font);
    font-size: 16px;
    font-weight: 400;
    color: #1f1f1f;
    line-height: 1.3;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 1000px) {
    .boards-page .boards-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 700px) {
    .boards-page .boards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* ---------- Board detail: product card "..." menu, same treatment as the
   board tile's edit button — hidden until hover, dots centred ---------- */

.board-detail-page .product-card .product-menu-button {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;

    padding: 0 !important;
    line-height: 1 !important;
    font-size: 17px !important;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

/* Organise mode: the drag handle lives top-right (see .drag-handle
   above), the same spot the "..." menu button normally sits - editing
   a card mid-reorder isn't the point of organise mode anyway, so the
   menu button is just hidden for as long as it's on, rather than
   moved somewhere it'd still clash with the top-left "Bought" badge.
   Matches the exact #sortable-products > .product-card > .product-menu-button
   chain (plus its own :hover/:focus-within reveal rule) further down
   this file, with .organise-mode added to out-specify both of those -
   a plain .board-detail-page.organise-mode .product-card
   .product-menu-button selector isn't specific enough to beat either,
   since both of those are id-scoped (#sortable-products). */
html body
.board-detail-page.organise-mode
#sortable-products
.product-card
> .product-menu-button,
html body
.board-detail-page.organise-mode
#sortable-products
.product-card:hover
> .product-menu-button,
html body
.board-detail-page.organise-mode
#sortable-products
.product-card:focus-within
> .product-menu-button {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.board-detail-page .product-card:hover .product-menu-button,
.board-detail-page .product-card .product-menu-button:focus-visible {
    opacity: 1;
    pointer-events: auto;
}

/* ---------- Board menu / product menu dropdown options: hover state
   matching the sidebar quick-add dropdown (grey out on hover) ---------- */

.menu-delete-button:hover {
    background: #f3f3f2 !important;
}

/* Board menu / product menu dropdown option text — match the quick-add
   dropdown's size/weight (14px / 700) instead of the default 16px / 800. */
.board-menu .menu-delete-button,
.product-menu .menu-delete-button {
    font-size: 14px !important;
    font-weight: 700 !important;
}

/* ---------- Board tile: "N products" subtext under the title ---------- */

.boards-page .deckd-board-tile-count {
    margin: 2px 2px 0;

    font-size: 13px;
    font-weight: 600;
    color: #9a9a9a;
}

/* ---------- Product detail: "+" save button becomes "Save +" ---------- */
/* A later, more specific rule (.detail-page .detail-card-button-row
   .detail-save-button) was pinning this to a fixed 46px circle — match its
   specificity so the pill shape actually wins. */
.detail-page .detail-card-button-row .detail-save-button,
.detail-page .detail-top-actions .detail-save-button {
    width: auto !important;
    height: 44px !important;
    min-width: 0 !important;

    padding: 0 18px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;

    border-radius: 999px !important;

    font-size: 15px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
}

/* ---------- Keep the navbar's width constant whether or not the page has
   a vertical scrollbar (always reserve the scrollbar's gutter) ---------- */

html {
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

/* ---------- Navbar account dropdown: hover indicators ---------- */
/* Log in / Account details / Sign up / Log out had no hover feedback at
   all (unlike the currency dropdown options, which already grey out on
   hover). Give them the same kind of activity indicator. */




/* =========================================================================
   ACCOUNT SECTION REDESIGN — 2026-07-11

   General architecture (sidebar nav + panel switcher, same modals) is
   unchanged; this is a full visual pass to bring it in line with the rest
   of the redesigned site — same radii, same warm neutral palette, same
   pill-button and hover-indicator language used on the sidebar/board tiles.
   ========================================================================= */

/* ---------- Shell ---------- */

html body .account-dashboard-page {
    max-width: 1160px !important;
    padding: 16px 32px 90px !important;
    gap: 28px !important;
    grid-template-columns: minmax(240px, 0.85fr) minmax(0, 2.15fr) !important;
    align-items: flex-start !important;
}

html body .account-sidebar-card,
html body .account-main-area {
    border-radius: 28px !important;
    box-shadow: 0 10px 32px rgba(31, 31, 31, 0.06) !important;
    border: 1px solid #e5e5e3 !important;
}

/* Account-only cards/surfaces still had the site's old cream fill —
   swap for the neutral greys used elsewhere in the redesign. */
html body .account-dashboard-summary-card,
html body .account-board-preview-card,
html body .account-info-card {
    background: #f3f3f2 !important;
}

html body .account-sidebar-image {
    background: #eeeeec !important;
}

html body .profile-pencil-button {
    background: #f3f3f2 !important;
}

html body .account-sidebar-card {
    position: sticky !important;
    top: 92px !important;
    padding: 19px 22px !important;
    min-height: 0 !important;
}

/* C2 is a fixed height across every panel (matching the sidebar's
   height); panels with more content than that scroll internally
   instead of growing the card. */
html body .account-main-area {
    padding: 40px 44px !important;
    height: 469px !important;
    min-height: 0 !important;
    overflow-y: auto !important;
}

html body .account-main-area:has(#accountPanelDashboard.active) {
    padding: 16px !important;
}

/* ---------- Sidebar: profile block ---------- */

.account-sidebar-profile {
    margin-bottom: 20px !important;
}

.account-sidebar-image-wrap {
    width: 92px !important;
    height: 92px !important;
    margin-bottom: 12px !important;
}

.account-sidebar-image {
    font-size: 32px !important;
    font-weight: 800 !important;
}

.profile-pencil-button {
    top: auto !important;
    bottom: 2px !important;
    right: 0 !important;

    width: 34px !important;
    height: 34px !important;

    font-size: 14px !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18) !important;
    transition: transform 0.15s ease, background 0.15s ease;
}

.profile-pencil-button:hover {
    background: #e5e5e3 !important;
    transform: scale(1.06);
}

.account-sidebar-username {
    font-size: 17px !important;
    color: #1f1f1f !important;
    letter-spacing: -0.2px;
    transition: color 0.15s ease;
}

.account-sidebar-username:hover {
    color: #6b6b67 !important;
}

/* ---------- Sidebar: nav pills ---------- */

/* A legacy full-bleed variant of this card (position:relative, negative
   margin-left, a huge calc()-based left padding meant to break out of a
   narrower container) was still winning for every box-model property we
   didn't explicitly touch, squeezing the actual nav down to ~90px wide.
   Reset the whole box model here instead of patching individual sides. */
.account-sidebar-nav-card {
    position: static !important;
    width: 100% !important;
    margin: 8px 0 0 !important;
    padding: 18px 0 0 !important;

    display: block !important;

    border-top: 1px solid #e5e5e3 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.account-sidebar-nav {
    width: 100% !important;
    height: auto !important;
    gap: 4px !important;
    justify-content: flex-start !important;
}

.account-sidebar-link {
    width: 100% !important;

    display: flex !important;
    align-items: center !important;
    gap: 12px !important;

    padding: 15px 14px !important;
    border-radius: 14px !important;

    color: #444444 !important;

    font-size: 14px !important;
    font-weight: 700 !important;

    transition: background 0.15s ease, color 0.15s ease;
}

/* Restore vertical padding a more specific legacy rule was zeroing out,
   so the icon+label row has comfortable, natural spacing. This is
   deliberately independent of the activity indicator's own height
   (see ::before below) — resizing one no longer squeezes the other. */
.account-sidebar-nav-card .account-sidebar-link {
    padding: 10px 0 10px 8px !important;
    gap: 8px !important;
}

/* Tighter spacing between nav rows so the sidebar stays compact. */
.account-sidebar-nav-card .account-sidebar-nav {
    gap: 3px !important;
}

.account-sidebar-link-icon {
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0;
    opacity: 0.7;
}

/* The activity indicator is a separate layer behind the icon+label, so
   its height can be tuned independently without squeezing their
   padding. It spans the link's full box (starting a bit before the
   icon) but is vertically centred at a shorter height than the row. */
.account-sidebar-link {
    position: relative !important;
    background: transparent !important;
}

.account-sidebar-link-icon,
.account-sidebar-link span {
    position: relative;
    z-index: 1;
}

.account-sidebar-link::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);

    height: 28px;
    border-radius: 10px;

    background: transparent;
    transition: background 0.15s ease;
}

.account-sidebar-link:hover {
    color: #1f1f1f !important;
}

.account-sidebar-link:hover::before {
    background: #f3f3f2;
}

.account-sidebar-link:hover .account-sidebar-link-icon {
    opacity: 1;
}

/* Activity indicator matches the LHS site navbar's active state — a light
   grey highlight, not a solid black fill. */
.account-sidebar-link.active {
    color: #1f1f1f !important;
}

.account-sidebar-link.active::before {
    background: #eeeeec;
}

.account-sidebar-link.active .account-sidebar-link-icon {
    opacity: 1;
}

.account-sidebar-delete-link {
    margin-top: 10px !important;
    padding-top: 14px !important;
    border-top: 1px solid #e5e5e3 !important;
}

/* ---------- Message toasts (previously rendered then hidden) ---------- */

.account-message-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;

    margin-bottom: 26px !important;
}

.account-message {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 14px 16px;
    border-radius: 16px;

    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;

    animation: accountMessageIn 0.25s ease;
}

.account-message svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.account-message span {
    flex: 1 1 auto;
}

.account-message-success {
    background: #eef6ee;
    color: #386b40;
    border: 1px solid #cde6cf;
}

.account-message-error {
    background: #fbf0ee;
    color: #97402d;
    border: 1px solid #f0d3cb;
}

.account-message-dismiss {
    border: none;
    background: transparent;
    color: inherit;

    padding: 0 2px;

    font-size: 19px;
    line-height: 1;
    opacity: 0.55;

    cursor: pointer;
    transition: opacity 0.15s ease;
}

.account-message-dismiss:hover {
    opacity: 1;
}

.account-message.is-leaving {
    animation: accountMessageOut 0.35s ease forwards;
}

@keyframes accountMessageIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes accountMessageOut {
    to {
        opacity: 0;
        transform: translateY(-6px);
    }
}

/* ---------- Panel headings ---------- */

.account-panel h1 {
    margin: 0 0 28px !important;

    text-align: left !important;

    font-size: 26px !important;
    font-weight: 800 !important;
    letter-spacing: -0.4px !important;
    color: #1f1f1f !important;
}

.account-panel-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    margin-bottom: 26px;
}

.account-panel-heading-row h1 {
    margin: 0 !important;
}

.account-coming-soon-badge {
    flex-shrink: 0;

    padding: 6px 13px;
    border-radius: 999px;

    background: #f3f3f2;
    border: 1px solid #dddddd;
    color: #777772;

    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

html body .account-activity-heading-row h2,
html body .account-board-preview-card-top .account-section-heading-row h2,
.account-dashboard-page .account-main-area .account-board-preview-card .account-section-heading-row > h2,
.account-dashboard-page .account-main-area-v2 .account-board-preview-card .account-section-heading-row > h2,
.account-dashboard-page .account-main-area .account-board-preview-card-top .account-section-heading-row > h2,
.account-dashboard-page .account-main-area-v2 .account-board-preview-card-top .account-section-heading-row > h2,
.account-dashboard-page .account-main-area .account-activity-heading-row > h2,
.account-dashboard-page .account-main-area-v2 .account-activity-heading-row > h2 {
    font-size: 20px !important;
    font-weight: 800 !important;
    letter-spacing: -0.2px !important;
}

.account-section-heading-row a {
    font-size: 13px !important;
    font-weight: 800 !important;
    transition: color 0.15s ease;
}

.account-section-heading-row a:hover {
    color: #1f1f1f !important;
}

/* ---------- Buttons: hover indicators ---------- */

.account-button {
    transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.account-button:not(.secondary-button):hover {
    background: #333333;
}

.account-panel .secondary-button,
.account-panel button.secondary-button,
.account-panel a.secondary-button {
    background: #f3f3f2 !important;
    border-color: #ddddda !important;
}

.account-panel .secondary-button:hover,
.account-panel button.secondary-button:hover {
    background: #e5e5e3 !important;
}

.account-details-danger-row {
    border-top-color: #e5e5e3 !important;
}

html body .account-recent-logins-button {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;

    font-size: 13px !important;

    transition: color 0.15s ease;
}

html body .account-recent-logins-button:hover {
    color: #1f1f1f !important;
}

html body .account-activity-card,
html body .account-board-preview-card-top {
    padding: 16px 20px !important;
    border-radius: 28px !important;
}

/* S2 grows slightly (S1 shrinks to match, via its flex:1 fill) */
html body .account-activity-card {
    padding-top: 20px !important;
    padding-bottom: 20px !important;
}

.account-board-preview-card-top .account-section-heading-row {
    margin-bottom: 10px !important;
}

/* The extra room S2 gained is shared between its own padding and its
   content (stat tiles), rather than sitting as unused whitespace. */
.account-activity-heading-row {
    margin-bottom: 14px !important;
}

/* S1 (boards card) grows to soak up the extra room created by matching
   C2's height to the sidebar; S2 (activity card) keeps its natural size
   and is simply pushed down by S1 growing above it. */
html body .account-board-preview-card-top {
    flex: 1 1 0 !important;
    min-height: 0 !important;

    display: flex !important;
    flex-direction: column !important;
}

html body .account-activity-card {
    flex: 0 0 auto !important;
    margin-bottom: 0 !important;
}

.account-board-preview-card-top .account-board-preview-grid,
.account-board-preview-card-top .account-empty-panel-card {
    flex: 1 1 0 !important;
    min-height: 0 !important;
}

.account-mini-board-card {
    height: 100% !important;

    display: flex !important;
    flex-direction: column !important;
}

.account-mini-board-cover {
    flex: 1 1 auto !important;
    height: auto !important;
}

/* Section heading icon (boards grid icon / activity clock) sits inline
   before its heading text, sized and coloured the same in both cases. */
.account-section-heading-row h2 {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.account-section-heading-icon {
    width: 17px !important;
    height: 17px !important;
    flex-shrink: 0;
}

.account-dashboard-stat {
    padding: 18px 12px !important;

    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.account-dashboard-stat span {
    margin-bottom: 4px !important;
}

.account-dashboard-stat strong {
    font-size: 24px !important;
}

.account-dashboard-stat:hover {
    box-shadow: 0 8px 20px rgba(31, 31, 31, 0.07);
    transform: translateY(-1px);
}

/* ---------- Dashboard: board previews as one regular collage grid,
   instead of three large side-by-side tiles ---------- */

.account-board-preview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 1px !important;

    background: #dcdcdc !important;
    border: 1px solid #dcdcdc !important;
    border-radius: 14px !important;
    overflow: hidden !important;
}

.account-mini-board-card {
    padding: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
}

.account-mini-board-cover {
    height: auto !important;
    aspect-ratio: 5 / 2 !important;

    border-radius: 0 !important;
    background: #dcdcdc !important;
    border: none !important;
}

.account-mini-board-collage {
    gap: 1px !important;
    background: #dcdcdc !important;
}

.account-mini-board-collage img,
.account-mini-board-cover > img {
    background: #ffffff !important;
}

/* Three separate mini board cards (own card + cover) instead of one
   fused, borderless collage strip. */
.account-board-preview-grid {
    gap: 10px !important;

    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
}

.account-mini-board-card {
    padding: 6px !important;

    background: #ffffff !important;
    border: 1px solid #ececea !important;
    border-radius: 14px !important;
}

.account-mini-board-cover {
    height: 60px !important;
    aspect-ratio: auto !important;

    border-radius: 10px !important;
    background: #f0f0ee !important;
}

/* Grid-type collage (matching the board cover collage used on the
   Boards page) instead of the products laid out side by side in a row. */
.account-mini-board-collage {
    display: grid !important;
    gap: 2px !important;
    background: #f0f0ee !important;
    border-radius: 10px !important;
    overflow: hidden !important;
}

.account-mini-board-collage.product-count-1 {
    grid-template-columns: 1fr !important;
    grid-template-rows: 1fr !important;
}

.account-mini-board-collage.product-count-2 {
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: 1fr !important;
}

.account-mini-board-collage.product-count-3 {
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: 1fr 1fr !important;
}

.account-mini-board-collage.product-count-3 img:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
}

.account-mini-board-collage.product-count-3 img:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
}

.account-mini-board-collage.product-count-3 img:nth-child(3) {
    grid-column: 2;
    grid-row: 1 / 3;
}

.account-mini-board-empty {
    background: #f3f3f2 !important;
    color: #c4c4c0 !important;
}

.account-mini-board-empty svg {
    width: 30px;
    height: 30px;
}

/* Titles aren't needed on a plain collage grid. */
.account-mini-board-card h3 {
    display: none !important;
}

.account-mini-board-card {
    transition: opacity 0.15s ease;
}

.account-mini-board-card:hover {
    opacity: 0.85;
}

.account-empty-panel-icon {
    width: 36px;
    height: 36px;

    margin-bottom: 4px;

    color: #c4c4c0;
}

/* ---------- Info rows (Personal / Account details) ---------- */

.account-info-row span {
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.account-info-row strong {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #1f1f1f !important;
}

/* ---------- Notifications: real-looking toggle switches ---------- */

.account-toggle-row {
    align-items: center !important;
    justify-content: space-between !important;

    padding: 14px 0 !important;
    margin: 0 !important;

    border-bottom: 1px solid #e5e5e3;

    cursor: not-allowed;
}

.account-toggle-row:last-child {
    border-bottom: none;
}

.account-toggle-label {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.account-toggle-label strong {
    font-size: 14.5px;
    font-weight: 700;
    color: #1f1f1f;
}

.account-toggle-label small {
    font-size: 12.5px;
    font-weight: 500;
    color: #777772;
}

.account-toggle-switch {
    position: relative;
    flex-shrink: 0;

    width: 40px;
    height: 23px;

    opacity: 0.65;
}

.account-toggle-switch input {
    position: absolute;
    inset: 0;

    margin: 0;
    opacity: 0;

    cursor: not-allowed;
}

.account-toggle-slider {
    position: absolute;
    inset: 0;

    background: #dddddd;
    border-radius: 999px;
}

.account-toggle-slider::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;

    width: 17px;
    height: 17px;

    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18);
}

/* ---------- Danger zone ---------- */

.account-details-danger-row {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.account-danger-icon {
    width: 26px;
    height: 26px;

    margin-bottom: 8px;

    color: #a36b5f;
}

.account-danger-button {
    transition: background 0.15s ease;
}

.account-danger-button:hover {
    background: #8a594e;
}

/* ---------- Currency dropdown: unify hover with the rest of the site ---------- */

.account-currency-button:hover {
    background: #f3f3f2 !important;
}

.account-currency-option:hover {
    background: #f3f3f2 !important;
}

/* ---------- Modals ---------- */

.account-danger-modal-header {
    gap: 10px;
}

.account-danger-modal-icon {
    display: block;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin: 0;

    color: #b3392c;
}

.recent-login-row {
    align-items: center !important;
    gap: 14px !important;
    background: #f3f3f2 !important;
}

/* The row switches to a column layout on mobile (see the existing
   max-width:560px rule) — align-items:center above would otherwise
   centre the whole time block instead of keeping its text flush left. */
@media (max-width: 560px) {
    .recent-login-row {
        align-items: flex-start !important;
    }
}

.recent-login-icon {
    flex-shrink: 0;

    width: 34px;
    height: 34px;
    padding: 8px;

    border-radius: 50%;
    background: #f3f3f2;
    color: #777772;
}

.recent-login-time-of-day {
    font-weight: 700;
    color: #777772;
}

.recent-login-relative {
    text-transform: none !important;
    letter-spacing: normal !important;
}

/* "Most recent" now sits on its own line below the relative time, so
   this row's time-block matches the width/shape of the other rows
   instead of being stretched wider by the inline "· Most recent" tag. */
.recent-login-most-recent {
    color: #1f1f1f !important;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
    html body .account-dashboard-page {
        grid-template-columns: 1fr !important;
    }

    html body .account-sidebar-card {
        position: static !important;
    }

    .account-board-preview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 560px) {
    html body .account-main-area {
        padding: 28px 22px !important;
    }

    .account-panel-heading-row {
        flex-wrap: wrap;
    }
}

/* =========================================================
   My Boards owner header
   ========================================================= */

.boards-owner-header {
    width: 100%;

    margin: 0 0 30px;

    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 18px;
}

.boards-owner-avatar {
    width: 88px;
    height: 88px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    border-radius: 50%;

    background: #ffffff;
    color: #1f1f1f;

    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.07);

    font-size: 34px;
    font-weight: 800;
    line-height: 1;
}

.boards-owner-avatar img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}

.boards-owner-title {
    margin: 0;

    color: #1f1f1f;

    font-size: clamp(22px, 3vw, 30px);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.4px;
}

@media (max-width: 560px) {
    .boards-owner-header {
        margin-bottom: 24px;
        gap: 14px;
    }

    .boards-owner-avatar {
        width: 68px;
        height: 68px;

        font-size: 27px;
    }

    .boards-owner-title {
        font-size: 22px;
        letter-spacing: -0.2px;
    }
}

/* =========================================================
   My Boards header: left aligned + white action buttons
   ========================================================= */

html body .boards-page .boards-owner-header {
    width: 100% !important;

    margin: 0 0 30px !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;

    text-align: left !important;
    gap: 16px !important;
}

html body .boards-page .boards-owner-main {
    width: auto !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;

    text-align: left !important;
    gap: 18px !important;
}

html body .boards-page .boards-owner-title {
    margin: 0 !important;

    text-align: left !important;

    font-family: var(--card-title-font) !important;
    font-size: clamp(24px, 3.2vw, 32px) !important;
    font-weight: 400 !important;
    line-height: 1.1 !important;
    letter-spacing: -0.4px !important;
}

html body .boards-page .boards-owner-actions {
    width: auto !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;

    margin: 0 !important;
    padding: 0 !important;

    gap: 10px !important;
}

/* Share + New Board: matching white rounded-rectangle buttons */
html body .boards-page .boards-owner-action-button,
html body .boards-page .boards-owner-action-button.new-board-button,
html body .boards-page .boards-owner-share-button {
    height: 48px !important;
    min-height: 48px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;

    padding: 0 18px !important;

    border: 1px solid #ddddda !important;
    border-radius: 14px !important;

    background: #ffffff !important;
    color: #111111 !important;

    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1 !important;

    text-decoration: none !important;
    white-space: nowrap !important;

    box-shadow: none !important;
    transform: none !important;
}

html body .boards-page .boards-owner-action-button:hover,
html body .boards-page .boards-owner-action-button.new-board-button:hover,
html body .boards-page .boards-owner-share-button:hover {
    background: #f6f6f4 !important;
    border-color: #d0d0cc !important;
    transform: none !important;
}

html body .boards-page .boards-owner-action-icon {
    width: 17px !important;
    height: 17px !important;

    flex-shrink: 0;

    stroke: currentColor !important;
}

@media (max-width: 560px) {
    html body .boards-page .boards-owner-header {
        align-items: flex-start !important;
        text-align: left !important;
        gap: 14px !important;
    }

    html body .boards-page .boards-owner-main {
        justify-content: flex-start !important;
        text-align: left !important;
        gap: 14px !important;
    }

    html body .boards-page .boards-owner-actions {
        justify-content: flex-start !important;
        gap: 8px !important;
    }

    html body .boards-page .boards-owner-action-button,
    html body .boards-page .boards-owner-action-button.new-board-button,
    html body .boards-page .boards-owner-share-button {
        height: 44px !important;
        min-height: 44px !important;

        padding: 0 14px !important;

        font-size: 13px !important;
    }
}

/* Match Share and New Board button spacing/icons */

html body .boards-page .boards-owner-action-button,
html body .boards-page .boards-owner-action-button.new-board-button,
html body .boards-page .boards-owner-share-button {
    gap: 7px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
}

html body .boards-page .boards-owner-action-icon,
html body .boards-page .boards-owner-plus-icon {
    width: 17px !important;
    height: 17px !important;

    flex: 0 0 17px !important;

    display: block !important;

    stroke: currentColor !important;
}

/* Slightly reduce just New Board's extra width */
html body .boards-page .boards-owner-action-button.new-board-button {
    padding-left: 15px !important;
    padding-right: 15px !important;
}

/* Account dropdown buttons: filleted rectangles, matching the rest of
   the site, on both the signed-in (Account details / Log out) and
   signed-out (Log in / Sign up) states. */



/* Compress product card details area only */

html body .explore-page .product-card > .card-info,
html body .board-detail-page #sortable-products .product-card > .card-info,
html body .board-detail-page .wishboard-masonry-column .product-card > .card-info {
    padding: 8px 14px 10px !important;
}

html body .explore-page .product-card > .card-info p,
html body .board-detail-page #sortable-products .product-card > .card-info p,
html body .board-detail-page .wishboard-masonry-column .product-card > .card-info p {
    margin: 0 !important;
    line-height: 1.18 !important;
}

html body .explore-page .product-card > .card-info p + p,
html body .board-detail-page #sortable-products .product-card > .card-info p + p,
html body .board-detail-page .wishboard-masonry-column .product-card > .card-info p + p {
    margin-top: 2px !important;
}

@media (max-width: 560px) {
    html body .explore-page .product-card > .card-info,
    html body .board-detail-page #sortable-products .product-card > .card-info,
    html body .board-detail-page .wishboard-masonry-column .product-card > .card-info {
        padding: 7px 12px 9px !important;
    }
}

/* Explore Save / Saved button: shape only - also applied to the
   Viewer Mode Save button on a read-only board (.board-detail-page),
   which reuses this exact same button/icon markup, so it must render
   pixel-identical to Explore's rather than falling back to the base
   .save-product-button's larger pill/unsized icon. */

html body .explore-page .product-card .save-product-button,
html body .board-detail-page .product-card .save-product-button {
    border-radius: 14px !important;

    /* Smaller than the base 14px - once saved this reads "Saved to
       {board title} +", which at the base size ran noticeably wider
       than the plain "Save" state and crowded the card corner. */
    font-size: 11px !important;
}

/* Save button bookmark icon */

html body .explore-page .save-product-button,
html body .board-detail-page .save-product-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
}

html body .explore-page .save-product-button-icon,
html body .board-detail-page .save-product-button-icon {
    width: 15px !important;
    height: 15px !important;

    flex: 0 0 15px !important;

    display: block !important;

    stroke: currentColor !important;
}

html body .detail-page .detail-save-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
}

html body .detail-page .detail-save-button-icon {
    width: 15px !important;
    height: 15px !important;

    flex: 0 0 15px !important;

    display: block !important;

    stroke: currentColor !important;
}

/* Board detail bought tag: grey instead of tan */

html body .board-detail-page .purchased-card::after {
    background: #f3f3f2 !important;
    color: #6b6b6b !important;
    border: 1px solid #ddddda !important;
}

/* Board detail bought tag: grey background, black text */

html body .board-detail-page .purchased-card::after {
    background: #f3f3f2 !important;
    color: #111111 !important;
    border: 1px solid #ddddda !important;
}

/* Board detail Tools + Add Product:
   match Share / New Board button styling */

html body .board-detail-page .board-tools-toggle,
html body .board-detail-page .board-tools-add-product-button,
html body .board-detail-page .board-tools-actions .new-board-button.board-tools-add-product-button {
    height: 48px !important;
    min-height: 48px !important;

    width: auto !important;
    min-width: 0 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;

    margin: 0 !important;
    padding: 0 16px !important;

    background: #ffffff !important;
    color: #111111 !important;

    border: 1px solid #ddddda !important;
    border-radius: 14px !important;

    box-shadow: none !important;

    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    white-space: nowrap !important;

    transform: none !important;
}

html body .board-detail-page .board-tools-toggle:hover,
html body .board-detail-page .board-tools-dropdown.is-open .board-tools-toggle,
html body .board-detail-page .board-tools-add-product-button:hover,
html body .board-detail-page .board-tools-actions .new-board-button.board-tools-add-product-button:hover {
    background: #f6f6f4 !important;
    border-color: #d0d0cc !important;
    transform: none !important;
}

html body .board-detail-page .board-tools-add-product-icon {
    width: 17px !important;
    height: 17px !important;

    flex: 0 0 17px !important;

    display: block !important;

    stroke: currentColor !important;
}

@media (max-width: 560px) {
    html body .board-detail-page .board-tools-toggle,
    html body .board-detail-page .board-tools-add-product-button,
    html body .board-detail-page .board-tools-actions .new-board-button.board-tools-add-product-button {
        height: 44px !important;
        min-height: 44px !important;

        padding: 0 14px !important;

        font-size: 13px !important;
    }

    html body .board-detail-page .board-tools-add-product-icon {
        width: 16px !important;
        height: 16px !important;

        flex-basis: 16px !important;
    }
}

/* Board detail Tools + Add Product text: match Share / New Board */

html body .board-detail-page .board-tools-toggle,
html body .board-detail-page .board-tools-add-product-button,
html body .board-detail-page .board-tools-actions .new-board-button.board-tools-add-product-button {
    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    text-align: center !important;
}

html body .board-detail-page .board-tools-toggle *,
html body .board-detail-page .board-tools-add-product-button * {
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
    letter-spacing: inherit !important;
    text-transform: inherit !important;
}

@media (max-width: 560px) {
    html body .board-detail-page .board-tools-toggle,
    html body .board-detail-page .board-tools-add-product-button,
    html body .board-detail-page .board-tools-actions .new-board-button.board-tools-add-product-button {
        font-size: 13px !important;
        font-weight: 700 !important;
    }
}

/* Board detail Tools/Add Product: left side + visible Tools icon */

html body .board-detail-page .deckd-page-actions-topright.board-tools-actions,
html body .board-detail-page .board-tools-actions.board-tools-actions-right,
html body .board-detail-page .board-tools-actions {
    position: static !important;
    inset: auto !important;

    width: fit-content !important;
    max-width: 100% !important;

    margin: 0 0 22px 0 !important;
    padding: 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    justify-self: start !important;

    gap: 10px !important;

    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

html body .board-detail-page .board-tools-toggle,
html body .board-detail-page .board-tools-add-product-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
}

html body .board-detail-page .board-tools-toggle-icon-visible {
    width: 17px !important;
    height: 17px !important;

    flex: 0 0 17px !important;

    display: block !important;

    stroke: currentColor !important;
}

html body .board-detail-page .board-tools-dropdown-menu {
    left: 0 !important;
    right: auto !important;
}

/* Board detail title: match Grace's boards heading */

html body .board-detail-page .board-detail-header h1 {
    font-family: var(--card-title-font) !important;
    font-size: clamp(24px, 3.2vw, 32px) !important;
    font-weight: 400 !important;
    line-height: 1.1 !important;
    letter-spacing: -0.4px !important;
}

/* Board detail Tools dropdown: stack options vertically */

html body .board-detail-page .board-tools-dropdown-menu {
    width: min(360px, calc(100vw - 36px)) !important;
    max-width: min(360px, calc(100vw - 36px)) !important;

    padding: 10px !important;
}

html body .board-detail-page .board-tools-menu-options {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;

    grid-template-columns: none !important;
}


html body .board-detail-page .board-tool-card,
html body .board-detail-page .board-tool-card-checkbox {
    width: 100% !important;
    min-height: auto !important;

    padding: 13px 14px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
}

/* Board detail Tools dropdown: align to button left + shorter wrapped rows */

html body .board-detail-page .board-tools-dropdown {
    position: relative !important;
}

html body .board-detail-page .board-tools-dropdown-menu {
    position: absolute !important;

    top: calc(100% + 10px) !important;
    left: 0 !important;
    right: auto !important;

    width: 300px !important;
    max-width: calc(100vw - 36px) !important;

    transform: none !important;

    padding: 8px !important;

    z-index: 90000 !important;
}

html body .board-detail-page .board-tools-dropdown.is-open .board-tools-dropdown-menu {
    transform: none !important;
}

html body .board-detail-page .board-tools-menu-options {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;

    grid-template-columns: none !important;
}

html body .board-detail-page .board-tools-menu-form {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

html body .board-detail-page .board-tool-card,
html body .board-detail-page .board-tool-card-checkbox {
    width: 100% !important;
    min-height: 0 !important;

    padding: 10px 12px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
}

html body .board-detail-page .board-tool-card-copy {
    min-width: 0 !important;

    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
}

html body .board-detail-page .board-tool-card-copy strong {
    font-size: 13px !important;
    line-height: 1.15 !important;
    white-space: normal !important;
}

html body .board-detail-page .board-tool-card-copy small {
    font-size: 12px !important;
    line-height: 1.2 !important;
    white-space: normal !important;
}

/* Board detail Tools wrench icon: centred with Tools text */

html body .board-detail-page .board-tools-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;

    line-height: 1 !important;
}

html body .board-detail-page .board-tools-toggle-icon-visible {
    width: 20px !important;
    height: 20px !important;

    flex: 0 0 20px !important;

    display: block !important;
    align-self: center !important;

    margin: 0 !important;

    stroke: currentColor !important;
    stroke-width: 2 !important;

    transform: translateY(-3px) !important;
    vertical-align: middle !important;
}

/* Move plus icons up slightly + make them a bit bolder */

/* Board detail: Add Product plus icon */
html body .board-detail-page .board-tools-add-product-icon {
    width: 17px !important;
    height: 17px !important;

    flex: 0 0 17px !important;

    stroke-width: 2.8 !important;
    transform: translateY(-1.5px) !important;
}

/* My Boards: New Board plus icon */
html body .boards-page .boards-owner-plus-icon {
    width: 17px !important;
    height: 17px !important;

    flex: 0 0 17px !important;

    stroke-width: 2.8 !important;
    transform: translateY(-1.5px) !important;
}

/* Boards Sort + Board Detail Share buttons */

html body .boards-page .boards-owner-sort-button,
html body .board-detail-page .board-tools-share-button {
    height: 48px !important;
    min-height: 48px !important;

    width: auto !important;
    min-width: 0 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;

    margin: 0 !important;
    padding: 0 16px !important;

    background: #ffffff !important;
    color: #111111 !important;

    border: 1px solid #ddddda !important;
    border-radius: 14px !important;

    box-shadow: none !important;

    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1 !important;

    text-decoration: none !important;
    white-space: nowrap !important;

    transform: none !important;
}

html body .boards-page .boards-owner-sort-button:hover,
html body .board-detail-page .board-tools-share-button:hover {
    background: #f6f6f4 !important;
    border-color: #d0d0cc !important;
    transform: none !important;
}

html body .boards-page .boards-owner-sort-icon,
html body .board-detail-page .board-tools-share-icon {
    width: 17px !important;
    height: 17px !important;

    flex: 0 0 17px !important;

    display: block !important;

    stroke: currentColor !important;
}

html body .boards-page .boards-owner-sort-icon {
    transform: translateY(-0.5px) !important;
}

/* My Boards Sort dropdown */

html body .boards-page .boards-owner-sort-dropdown {
    position: relative !important;
    display: inline-flex !important;
}

html body .boards-page .boards-owner-sort-menu {
    display: none !important;

    position: absolute !important;
    top: calc(100% + 10px) !important;
    left: 0 !important;
    right: auto !important;

    width: 240px !important;
    padding: 8px !important;

    background: #ffffff !important;
    border: 1px solid #ddddda !important;
    border-radius: 16px !important;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.12) !important;

    z-index: 90000 !important;
}

html body .boards-page .boards-owner-sort-dropdown.is-open .boards-owner-sort-menu {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
}

html body .boards-page .boards-owner-sort-menu button {
    width: 100% !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;

    padding: 10px 12px !important;

    border: none !important;
    border-radius: 11px !important;

    background: transparent !important;
    color: #111111 !important;

    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-align: left !important;

    cursor: pointer !important;
}

html body .boards-page .boards-owner-sort-menu button:hover {
    background: #f3f3f2 !important;
}

/* My Boards sort dropdown title */

html body .boards-page .boards-owner-sort-menu-title {
    margin: 4px 8px 6px !important;

    color: #8a8a85 !important;

    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    letter-spacing: 0.02em !important;

    text-transform: uppercase !important;
}

/* My Boards sort dropdown note */

html body .boards-page .boards-owner-sort-menu-note {
    margin: 6px 8px 4px !important;

    color: #8a8a85 !important;

    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    letter-spacing: 0.02em !important;

    text-align: center !important;
}



/* Board detail Tools dropdown: remove individual option outlines */

html body .board-detail-page .board-tools-dropdown-menu .board-tool-card,
html body .board-detail-page .board-tools-dropdown-menu .board-tool-card-checkbox {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

html body .board-detail-page .board-tools-dropdown-menu .board-tool-card:hover,
html body .board-detail-page .board-tools-dropdown-menu .board-tool-card-checkbox:hover {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* My Boards Sort dropdown: slightly narrower */

html body .boards-page .boards-owner-sort-menu {
    width: 220px !important;
}

/* My Boards sort dropdown note */

html body .boards-page .boards-owner-sort-menu-note {
    max-width: 175px !important;
    margin: 6px auto 4px !important;

    text-align: center !important;
    line-height: 1.45 !important;
}

/* Was "true horizontal screen centre" - a -32px nudge left, stale from
   an older layout before the sidebar existed. With the sidebar's 64px
   now permanently part of .deckd-main's own box (see .board-detail-page
   .board-budget-panel's positioning comment in board_detail.html), this
   only pushed the panel off-centre; removed entirely for
   .board-budget-panel (kept for .board-organise-banner, untouched here,
   since that wasn't part of what was asked). */
html body .board-detail-page .board-organise-banner.is-open {
    position: relative !important;
    left: -32px !important;
}

@media (max-width: 700px) {
    html body .board-detail-page .board-organise-banner.is-open {
        left: 0 !important;
    }
}

/* Board Detail edit-board dropdown text: match Edit Product text */

html body .board-detail-page .board-detail-header-menu a,
html body .board-detail-page .board-detail-header-menu button,
html body .board-detail-page .board-detail-header-menu .board-detail-header-menu-item,
html body .board-detail-page .board-detail-header-menu .menu-delete-button {
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
}

/* Board Detail edit-board dropdown: narrower */

html body .board-detail-page .board-detail-header-menu {
    min-width: 135px !important;
    width: 135px !important;
}

html body .board-detail-page .board-detail-header-menu a,
html body .board-detail-page .board-detail-header-menu button,
html body .board-detail-page .board-detail-header-menu .board-detail-header-menu-item,
html body .board-detail-page .board-detail-header-menu .menu-delete-button {
    white-space: nowrap !important;
}


/* Board Detail back link — match Deck Detail back link */

html body .board-detail-page .board-detail-header a.board-detail-back-link {
    grid-column: 1 !important;
    justify-self: start !important;
    align-self: center !important;

    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 4px !important;

    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;

    color: #777772 !important;

    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    white-space: nowrap !important;

    transition: color 0.15s ease !important;
}

html body .board-detail-page .board-detail-header a.board-detail-back-link:hover {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;

    color: #1f1f1f !important;
    opacity: 1 !important;
}

html body .board-detail-page .board-detail-header a.board-detail-back-link svg {
    width: 16px !important;
    height: 16px !important;
    flex: 0 0 auto !important;
}

html body .board-detail-page .board-detail-kebab-button {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 0 0 2px 0 !important;

    font-size: 24px !important;
    line-height: 1 !important;
}

/* =========================================================
   Product detail back/edit buttons: cleaned final
   Removes old conflicting .detail-back / .detail-menu-button sizing.
   ========================================================= */



/* Product Detail back link — match Deck Detail back link */

html body .detail-page .detail-top-row a.product-detail-back-link {
    align-self: center !important;
    flex: 0 1 auto !important;

    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: min(280px, 45vw) !important;

    margin: 0 !important;
    padding: 0 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 4px !important;

    overflow: hidden !important;

    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;

    color: #777772 !important;

    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    white-space: nowrap !important;

    opacity: 1 !important;
    pointer-events: auto !important;
    cursor: pointer !important;

    transition: color 0.15s ease !important;
}

html body .detail-page .detail-top-row a.product-detail-back-link:hover {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;

    color: #1f1f1f !important;
    opacity: 1 !important;
}

html body .detail-page .detail-top-row a.product-detail-back-link svg {
    width: 16px !important;
    height: 16px !important;
    flex: 0 0 auto !important;
}

html body .detail-page .detail-top-row .product-detail-back-label {
    min-width: 0 !important;

    display: block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

html body .detail-page .detail-top-actions button.detail-menu-button,
html body .detail-page button.detail-menu-button {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;

    padding: 0 0 2px 0 !important;
    margin: 0 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: #ffffff !important;
    color: #1f1f1f !important;
    border: 1px solid #ddddda !important;
    border-radius: 50% !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.05) !important;

    font-family: inherit !important;
    font-size: 24px !important;
    font-weight: 900 !important;
    line-height: 1 !important;

    cursor: pointer !important;
}

html body .detail-page .detail-top-actions button.detail-menu-button:hover,
html body .detail-page button.detail-menu-button:hover,
html body .detail-page .detail-menu-wrapper.is-open button.detail-menu-button {
    background: #f3f3f2 !important;
    border-color: #d6d6d3 !important;
    opacity: 1 !important;
}
/* Product detail back button only: restore click without moving anything else */

html body .detail-page a.detail-back {
    position: relative !important;
    z-index: 100 !important;

    pointer-events: auto !important;
    cursor: pointer !important;
}

/* =========================================================
   MODAL SYSTEM REDESIGN
   One consistent look for every modal on the site: the
   .delete-modal / .delete-modal-card family (confirmations,
   account settings, board/product CRUD), .auth-modal /
   .auth-modal-card (login/signup/prompts), .filter-card
   (Explore filters), and the account page's own recent-logins
   card. Matches the account-page redesign language: white
   cards, 28px "fillet" radius, #f3f3f2 neutral greys instead
   of the old tan/cream palette, filleted-rectangle buttons
   instead of full pill shapes. Nothing here changes any JS
   function name, modal id, or form field — purely visual.
   ========================================================= */

/* ---------- Backdrop ---------- */

html body .delete-modal,
html body .auth-modal,
html body .filter-modal {
    background: rgba(31, 31, 31, 0.32) !important;
}

/* ---------- Card shell ---------- */

html body .delete-modal-card,
html body .auth-modal-card,
html body .filter-card {
    padding: 32px !important;

    background: #ffffff !important;
    border: 1px solid #e5e5e3 !important;
    border-radius: 28px !important;
    box-shadow: 0 20px 50px rgba(31, 31, 31, 0.16) !important;
}

/* Two size tiers instead of the half-dozen mismatched widths
   this had accumulated — compact for confirmations/forms,
   slightly wider only where the content genuinely needs it
   (filter categories grid, recent logins list). */
html body .delete-modal-card,
html body .auth-modal-card {
    max-width: 420px !important;
}

html body .filter-card,
html body .recent-logins-modal-card {
    max-width: 460px !important;
}

/* The profile picture cropper needs its own footprint for the
   crop circle — leave its width/height alone, just bring the
   shell (radius/border/shadow above) in line with the rest. */
html body .profile-picture-crop-modal-card {
    max-width: 480px !important;
}

@media (max-width: 560px) {
    html body .delete-modal-card,
    html body .auth-modal-card,
    html body .filter-card {
        padding: 26px 22px !important;
        border-radius: 24px !important;
    }
}

/* ---------- Typography ---------- */

html body .delete-modal-card p,
html body .auth-modal-card p,
html body .filter-card p {
    color: #6b6b67 !important;
    margin-bottom: 20px !important;
}

/* ---------- Inputs ---------- */

html body .delete-modal-card input,
html body .delete-modal-card select,
html body .delete-modal-card textarea,
html body .auth-modal-card input,
html body .filter-card select,
html body .custom-file-upload {
    padding: 13px 14px !important;

    background: #ffffff !important;
    border: 1px solid #e5e5e3 !important;
    border-radius: 14px !important;

    color: #1f1f1f !important;

    transition: border-color 0.15s ease;
}

html body .delete-modal-card input:focus,
html body .delete-modal-card select:focus,
html body .delete-modal-card textarea:focus,
html body .auth-modal-card input:focus,
html body .filter-card select:focus {
    outline: none !important;
    border-color: #1f1f1f !important;
}

/* ---------- Buttons: filleted rectangles, not pills ---------- */

html body .delete-modal-card button,
html body .auth-modal-card form button,
html body .filter-card button {
    padding: 14px 20px !important;

    border-radius: 14px !important;

    font-weight: 800 !important;

    transition: background 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

html body .delete-modal-card form button:not(.cancel-delete-button):not(.cover-toggle-button),
html body .delete-modal-card button[type="submit"]:not(.cancel-delete-button),
html body .auth-modal-card form button:not(.cancel-delete-button),
html body .filter-card form button:not(.cancel-filter-button) {
    background: #1f1f1f !important;
    color: #ffffff !important;
}

html body .delete-modal-card form button:not(.cancel-delete-button):not(.cover-toggle-button):hover,
html body .delete-modal-card button[type="submit"]:not(.cancel-delete-button):hover,
html body .auth-modal-card form button:not(.cancel-delete-button):hover,
html body .filter-card form button:not(.cancel-filter-button):hover {
    background: #333333 !important;
}

/* Secondary / cancel buttons — the same neutral grey already
   used for the account dropdown's "Log out" button, instead of
   the old tan #f4efe8 fill. */
html body .cancel-delete-button,
html body .cancel-filter-button,
html body .auth-modal-switch,
html body .delete-modal-card form .cover-toggle-button {
    background: #f3f3f2 !important;
    color: #1f1f1f !important;
    border: 1px solid #ddddda !important;
    border-radius: 14px !important;
}

html body .cancel-delete-button:hover,
html body .cancel-filter-button:hover,
html body .auth-modal-switch:hover,
html body .delete-modal-card form .cover-toggle-button:hover {
    background: #e9e9e6 !important;
    border-color: #d0d0cc !important;
}

/* Destructive confirmations keep a distinct accent (consistent
   with the account page's own danger button/icon) rather than
   defaulting to the same black as every other primary action. */
html body #deleteAccountModal .delete-modal-card form button,
html body #deleteModal .delete-modal-card form button,
html body #boardDeleteModal .delete-modal-card form button,
html body #deckDeleteModal .delete-modal-card form button {
    background: #a36b5f !important;
}

html body #deleteAccountModal .delete-modal-card form button:hover,
html body #deleteModal .delete-modal-card form button:hover,
html body #boardDeleteModal .delete-modal-card form button:hover,
html body #deckDeleteModal .delete-modal-card form button:hover {
    background: #8a594e !important;
}

/* ---------- Remaining tan spots ---------- */

html body .board-cover-upload-section {
    background: #f3f3f2 !important;
    border-radius: 16px !important;
}

html body .category-options label {
    background: #f3f3f2 !important;
    border: 1px solid #ececea !important;
    border-radius: 12px !important;

    transition: background 0.15s ease;
}

html body .category-options label:hover {
    background: #ececea !important;
}

/* ---------- Recent logins list rows already use the neutral
   grey palette from the account redesign; just line their card
   shell up with the rest of the modal system above. ---------- */
html body .recent-logins-modal-card {
    max-height: min(600px, calc(100vh - 64px)) !important;
}

/* ---------- Auth modal back chevron: a proper icon button
   instead of bare unstyled text (page-level .auth-back outside
   modals is untouched — this only targets the modal variant). ---------- */
html body .auth-modal-back {
    width: 36px !important;
    height: 36px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: #f3f3f2 !important;
    border-radius: 50% !important;

    color: #1f1f1f !important;
    font-size: 18px !important;
    line-height: 1 !important;

    transition: background 0.15s ease;
}

html body .auth-modal-back:hover {
    background: #e9e9e6 !important;
}

/* ---------- Duplicate-save warning card (inside Save product) ---------- */

html body .duplicate-warning-card,
html body .modal-duplicate-warning {
    background: #f3f3f2 !important;
}

/* ---------- Filter modal: clear-filters link ---------- */

html body .filter-card .clear-filters-link {
    color: #6b6b67 !important;
}

html body .filter-card .clear-filters-link:hover {
    color: #1f1f1f !important;
}

/* ---------- Profile picture crop circle (empty state) ---------- */

html body .profile-crop-circle {
    background: #f3f3f2 !important;
    box-shadow:
        inset 0 0 0 2px #e5e5e3,
        0 14px 34px rgba(0, 0, 0, 0.08) !important;
}

html body .profile-crop-circle:focus {
    box-shadow:
        inset 0 0 0 2px #1f1f1f,
        0 14px 34px rgba(0, 0, 0, 0.08) !important;
}

/* =========================================================
   DECKD CONTENT TABS — small text-link switcher between sibling
   top-level views (currently Decks / Collages on the Decks Studio
   page). Deliberately plain: no pill/box background, just an
   underline on whichever one is current. Unscoped to any one page
   so it's reusable wherever else this pattern gets added later.
   ========================================================= */

.deckd-content-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;

    margin: 0 0 28px;
}

.deckd-content-tab {
    padding-bottom: 6px;

    color: #9a9a95;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;

    border-bottom: 2px solid transparent;
}

.deckd-content-tab:hover {
    color: #1f1f1f;
}

.deckd-content-tab.is-active {
    color: #1f1f1f;
    border-bottom-color: #1f1f1f;
}

/* =========================================================
   DECKD DECKS PAGE (rudimentary architecture) — 2026-07-13
   New "Decks" feature: sidebar icon (base.html) + a first-pass
   page shell (wishlist/decks.html), styled to match the Boards
   page's owner header/avatar/page padding. No deck-building
   logic yet — this is just the scaffold to build on.
   ========================================================= */

.decks-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 34px 32px 70px;
    padding-top: 18px;
}

.decks-owner-header {
    width: 100%;

    margin: 0 0 30px;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.decks-owner-main {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 18px;
}

.decks-owner-avatar {
    width: 88px;
    height: 88px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    border-radius: 50%;

    background: #ffffff;
    color: #1f1f1f;

    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.07);

    font-size: 34px;
    font-weight: 800;
    line-height: 1;
}

.decks-owner-avatar img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}

.decks-owner-title {
    margin: 0;

    color: #1f1f1f;

    font-size: clamp(22px, 3vw, 30px);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.4px;
}

.decks-owner-subtitle {
    margin: 10px 0 0;
    padding-left: 106px;

    color: #777772;

    font-size: 15px;
    line-height: 1.4;
}

/* =========================================================
   Decks Studio / Collage Studio header — centered, matching
   Boards/Board Detail's own header layout (title, small dark
   avatar + export button, actions row below). Scoped to
   .decks-page rather than either page's own template, since both
   decks.html and collages.html share that wrapper class and are
   meant to look identical — one definition, both pages stay in
   sync automatically instead of drifting apart across two copies.
   Overrides the older left-aligned rules just above the same way
   boards.html's own header block overrides its older left-aligned
   equivalent there.
   ========================================================= */

html body .decks-page .decks-owner-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0 !important;

    width: 100% !important;
    max-width: 100% !important;
    margin: 4px auto 8px !important;
    padding: 4px 0 0 !important;
    box-sizing: border-box !important;

    text-align: center !important;
}

html body .decks-page .decks-owner-title {
    max-width: 100% !important;
    margin: 0 0 6px !important;

    font-family: var(--card-title-font) !important;
    font-size: 28px !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
    letter-spacing: normal !important;
    text-align: center !important;

    overflow-wrap: break-word !important;
}

html body .decks-page .decks-owner-subtitle {
    max-width: 420px !important;
    margin: 0 0 20px !important;
    padding-left: 0 !important;

    color: #777772 !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    text-align: center !important;
}

html body .decks-page .decks-owner-main {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;

    width: 100% !important;
    max-width: 640px !important;
    margin: 0 auto !important;
    gap: 0 !important;

    text-align: center !important;
}

html body .decks-page .decks-owner-username {
    margin: 0 !important;

    color: #777772 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

html body .decks-page .decks-owner-people-row {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    margin: 18px 0 20px !important;
}

html body .decks-page .decks-owner-avatar {
    width: 44px !important;
    height: 44px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: #1f1f1f !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    overflow: hidden !important;

    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
}

html body .decks-page .decks-owner-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* Export, in the same spot boards.html puts its own Export button —
   layered in front of the avatar, same size, same -16px overlap. Shared
   by decks.html (openExportDeckModal) and collages.html
   (openExportCollageModal). */
html body .decks-page .decks-owner-export-button {
    position: relative !important;
    z-index: 2 !important;

    width: 44px !important;
    height: 44px !important;
    margin-left: -16px !important;
    padding: 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: #ffffff !important;
    border: 2px solid #ffffff !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18) !important;

    color: #1f1f1f !important;
    cursor: pointer !important;
    transition: background 0.15s ease, transform 0.15s ease !important;
}

html body .decks-page .decks-owner-export-button svg {
    width: 18px !important;
    height: 18px !important;
}

/* Same 1px lift on hover as its two counterparts elsewhere: boards.html's
   own export button (which gets it for free from the shared
   .board-tools-toggle:hover rule above, a class this button doesn't
   carry) and board_detail.html's add-collaborator button (which, like
   this one, needs its own copy). All three sit in the same spot — layered
   over the avatar — so they should react to hover identically. */
html body .decks-page .decks-owner-export-button:hover {
    background: #f3f3f2 !important;
    transform: translateY(-1px) !important;
}

html body .decks-page .decks-owner-export-button:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* Nothing to invite a click while the button is disabled — no lift. */
html body .decks-page .decks-owner-export-button:disabled:hover {
    background: #ffffff !important;
    transform: none !important;
}

/* Shared busy state for any "download as ..." trigger while its
   background export job is being built (see deckdStartExport in
   base.html) - dims it and blocks re-clicks without needing to know
   anything about what kind of element it's attached to (plain link,
   button, or a whole picker card). */
.is-exporting {
    opacity: 0.6;
    pointer-events: none;
}

/* Floating "generating your export" indicator (see deckdShowExportToast/
   deckdStartExport in base.html) - frosted glass, matching
   .nav-notifications-dropdown/.nav-account-dropdown elsewhere on the
   site (translucent white over a blur). Fixed to the bottom-centre of
   the viewport so it reads the same regardless of which page/layout
   triggered it. */
.deckd-export-toast {
    display: flex;
    align-items: center;
    gap: 12px;

    position: fixed;
    /* Centred on the area to the right of the sidebar, not the full
       screen - same trick as .deckd-modal's own card centring
       (deckd_modals.css): offset by half the sidebar's own width (64px
       desktop / 56px mobile, see .deckd-sidebar) rather than the
       viewport's true centre. */
    left: calc(50% + 32px);
    bottom: 28px;
    z-index: 999999;

    max-width: min(92vw, 380px);
    padding: 14px 16px;

    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    box-shadow: 0 18px 46px rgba(31, 31, 31, 0.18);

    color: #1f1f1f;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;

    opacity: 0;
    transform: translateX(-50%) translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.deckd-export-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.deckd-export-toast.is-error {
    background: rgba(251, 240, 238, 0.92);
    border-color: rgba(240, 211, 203, 0.9);
    color: #97402d;
}

@media (max-width: 700px) {
    .deckd-export-toast {
        /* Matches .deckd-modal's own 700px sidebar-width breakpoint. */
        left: calc(50% + 28px);
    }
}

.deckd-export-toast-spinner {
    width: 18px;
    height: 18px;
    flex-shrink: 0;

    border: 2px solid rgba(31, 31, 31, 0.15);
    border-top-color: #1f1f1f;
    border-radius: 50%;

    animation: deckdExportToastSpin 0.7s linear infinite;
}

@keyframes deckdExportToastSpin {
    to {
        transform: rotate(360deg);
    }
}

.deckd-export-toast-text {
    flex: 1 1 auto;
}

.deckd-export-toast-close {
    flex-shrink: 0;

    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: inherit;

    cursor: pointer;
    transition: background 0.15s ease;
}

/* .deckd-export-toast-close's own `display: flex` ties the browser's
   default `[hidden] { display: none }` UA rule on specificity (both are
   a single selector at weight 0-1-0), and author styles win a tie
   regardless of load order - so the plain class rule above was silently
   keeping the button visible even while its `hidden` attribute was set.
   This attribute+class selector is more specific than the class alone,
   so it actually wins. */
.deckd-export-toast-close[hidden] {
    display: none;
}

.deckd-export-toast-close svg {
    width: 14px;
    height: 14px;
}

.deckd-export-toast-close:hover {
    background: rgba(31, 31, 31, 0.08);
}

/* Global one-off message toasts (Django messages - see the deckdFlashToasts
   block in base.html). Same frosted-glass / bottom-centre placement as
   .deckd-export-toast above, just stacked (newest lowest) and self-
   dismissing rather than tied to an export job's lifetime. */
.deckd-flash-toasts {
    position: fixed;
    left: calc(50% + 32px);
    bottom: 28px;
    z-index: 999999;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;

    width: max-content;
    max-width: min(92vw, 380px);

    transform: translateX(-50%);
    pointer-events: none;
}

@media (max-width: 700px) {
    .deckd-flash-toasts {
        left: calc(50% + 28px);
    }
}

.deckd-flash-toast {
    display: flex;
    align-items: center;
    gap: 12px;

    width: 100%;
    padding: 13px 16px;

    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    box-shadow: 0 18px 46px rgba(31, 31, 31, 0.18);

    color: #1f1f1f;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;

    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: auto;
}

.deckd-flash-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.deckd-flash-toast.is-error {
    background: rgba(251, 240, 238, 0.92);
    border-color: rgba(240, 211, 203, 0.9);
    color: #97402d;
}

.deckd-flash-toast-text {
    flex: 1 1 auto;
}

.deckd-flash-toast-close {
    flex-shrink: 0;

    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: inherit;

    cursor: pointer;
    transition: background 0.15s ease;
}

.deckd-flash-toast-close svg {
    width: 14px;
    height: 14px;
}

.deckd-flash-toast-close:hover {
    background: rgba(31, 31, 31, 0.08);
}

.decks-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;

    padding: 72px 32px;

    background: #ffffff;
    border: 1px solid #ede7de;
    border-radius: 22px;

    text-align: center;
}

.decks-empty-icon {
    width: 64px;
    height: 64px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #f4efe8;
    color: #1f1f1f;
}

.decks-empty-icon svg {
    width: 28px;
    height: 28px;

    stroke: currentColor;
}

.decks-empty-state h2 {
    margin: 0;

    color: #1f1f1f;

    font-size: 20px;
    font-weight: 700;
}

.decks-empty-state p {
    margin: 0;
    max-width: 360px;

    color: #777772;

    font-size: 14px;
    line-height: 1.5;
}

@media (max-width: 700px) {
    .decks-page {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 560px) {
    .decks-owner-header {
        margin-bottom: 24px;
        gap: 14px;
    }

    .decks-owner-main {
        gap: 14px;
    }

    .decks-owner-avatar {
        width: 68px;
        height: 68px;

        font-size: 27px;
    }

    .decks-owner-title {
        font-size: 22px;
        letter-spacing: -0.2px;
    }

    .decks-owner-subtitle {
        padding-left: 82px;
    }

    .decks-empty-state {
        padding: 48px 20px;
    }
}

/* =========================================================
   DECKD DECKS DASHBOARD + SLIDE EDITOR — 2026-07-13
   Canva-inspired "create a deck" dashboard (deck grid + board
   picker modal) and slide viewer (thumbnail rail + stage).
   Slides are generated from a board's products at render time,
   with inline editing of title/price saved back to the product.

   Greys only (no tan/beige) — same palette as the existing
   "Board detail: remove beige UI colours" pass elsewhere in this
   file: white #ffffff, grey #f3f3f2, grey-border #ddddda,
   text #1f1f1f, muted #777772.
   ========================================================= */

/* ---------- Decks dashboard grid ---------- */

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

.deck-create-tile {
    display: flex;
    flex-direction: column;

    padding: 0;

    background: none;
    border: none;

    font-family: inherit;
    text-align: left;

    cursor: pointer;
}

.deck-create-tile-box {
    width: 100%;
    aspect-ratio: 16 / 9;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f7f7f6;
    border: 2px dashed #ddddda;
    border-radius: 16px;

    color: #9a9a9a;

    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.deck-create-tile-box svg {
    width: 26px;
    height: 26px;
}

.deck-create-tile:hover .deck-create-tile-box {
    background: #f3f3f2;
    border-color: #1f1f1f;
    color: #1f1f1f;
}

.deck-create-tile-label {
    margin: 10px 2px 0;

    color: #1f1f1f;

    font-size: 16px;
    font-weight: 800;
}

.deck-card {
    position: relative;

    cursor: pointer;
}

.deck-card-cover-wrap {
    position: relative;
}

/* Same subtle grey-out on hover as Explore/deck-product-picker/board-tile
   covers (see their own ::before/::after) - shared here on the wrap
   rather than .deck-card-cover or .collage-frame individually since both
   the Decks and Collages list tiles render their preview inside this one
   wrapper class, so one rule covers both. z-index: 2 keeps it below
   .deck-menu-button's z-index: 20 so the kebab menu stays clickable and
   visible through it. */
.deck-card-cover-wrap::after {
    content: "";

    position: absolute;
    inset: 0;
    z-index: 2;

    border-radius: 16px;
    background: rgba(17, 17, 17, 0);

    pointer-events: none;
    transition: background 0.15s ease;
}

.deck-card:hover .deck-card-cover-wrap::after {
    background: rgba(17, 17, 17, 0.1);
}

.deck-card-cover-wrap.is-letterboxed {
    display: flex;
    align-items: center;
    justify-content: center;

    aspect-ratio: 16 / 9;

    background: #f1f1ef;
    border-radius: 16px;
}

/* A square / portrait / story deck keeps the same tile footprint as every
   other deck (so the grid stays even) and shows its slide at its true shape
   inside it: the wrap is 16:9, so a slide exactly as tall as the wrap is
   (wrap height = 9/16 of the wrap width) times its own width:height wide. */
.deck-card-cover-wrap.is-letterboxed .deck-card-cover {
    width: min(100%, calc(100% * 0.5625 * var(--deck-ratio-num, 1.777778)));
    aspect-ratio: var(--deck-ratio, 16 / 9);
}

.deck-card-cover {
    position: relative;

    width: 100%;
    aspect-ratio: 16 / 9;

    overflow: hidden;

    background: #ffffff;
    border: 1px solid #ddddda;
    border-radius: 16px;

    container-type: inline-size;
}

.deck-card-first-slide {
    isolation: isolate;
}

.deck-cover-element {
    position: absolute;

    min-width: 0;
    min-height: 0;

    overflow: hidden;
    pointer-events: none;
}

.deck-cover-element-text {
    padding: calc(2 * 100cqw / 780);

    font-size:
        calc(
            var(--cover-font-size, 18) *
            100cqw /
            780
        );

    line-height: 1.2;
    overflow-wrap: anywhere;
}

.deck-cover-element-shape {
    box-sizing: border-box;

    background: var(
        --cover-shape-fill,
        transparent
    );

    border-style: solid;
    border-color: var(
        --cover-shape-outline,
        transparent
    );

    border-width:
        max(
            1px,
            calc(
                var(--cover-outline-weight, 1) *
                100cqw /
                780
            )
        );

    border-radius:
        calc(var(--cover-shape-corner-radius, 8) * 100cqw / 780);
}

.deck-cover-element-shape-circle,
.deck-cover-element-shape-oval {
    border-radius: 50%;
}

.deck-cover-element-shape-rectangle_sharp {
    border-radius: 0;
}

.deck-cover-element-shape-line {
    /*
     * Lines in the editor are regular filled shape elements.
     * Do not replace their fill with outline_color.
     */
    border-radius: 999px;
}

.deck-cover-element-svg-shape {
    overflow: visible;
}

.deck-cover-element-svg-shape svg {
    width: 100%;
    height: 100%;

    display: block;
    overflow: visible;
    background: transparent;
    border: none;
}


.deck-cover-element-image {
    overflow: hidden;
}

.deck-cover-element-image img {
    position: absolute;

    max-width: none;
    max-height: none;

    display: block;

    object-fit: cover;

    margin: 0;
    padding: 0;

    border-radius: 0;
}

.deck-menu-button {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    z-index: 20 !important;

    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 0 !important;

    border: none !important;
    outline: none !important;
    border-radius: 50% !important;

    background: rgba(255, 255, 255, 0.92) !important;
    color: #1f1f1f !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18) !important;

    font-family: inherit !important;
    font-size: 17px !important;
    font-weight: 900 !important;
    line-height: 1 !important;

    opacity: 0;
    pointer-events: none;

    cursor: pointer;
    transition: opacity 0.15s ease;
}

.deck-card:hover .deck-menu-button,
.deck-menu-button:focus-visible {
    opacity: 1;
    pointer-events: auto;
}

.deck-menu-button:hover,
.deck-menu-button:focus,
.deck-menu-button:focus-visible,
.deck-menu-button:active {
    border: none !important;
    outline: none !important;
    background: rgba(255, 255, 255, 0.92) !important;
}

.deck-menu {
    display: none;
    position: absolute;

    top: 46px !important;
    right: 8px !important;
    left: auto !important;
    z-index: 101;

    min-width: 160px;
    padding: 10px;

    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.12);

    pointer-events: auto;
}

.deck-menu .menu-delete-button {
    font-size: 14px !important;
    font-weight: 700 !important;
}

/* .deck-menu's own display: none above is only ever toggled to block via
   the .is-open class added by toggleDeckMenu/toggleCollageMenu (see
   decks.html/collages.html) — frosted glass + the rest of this restyle
   used to live only in decks.html's own inline <style> block, so
   collages.html (which reuses the identical .deck-menu-button/.deck-menu
   markup and JS) rendered a plain opaque menu instead. Scoped to
   .decks-page (the shared wrapper class both pages render their <main>
   as) rather than duplicated per-page, so any current or future
   .decks-page page gets the same frosted menu by default. */
.decks-page .deck-menu.is-open {
    display: block !important;
}

.decks-page .deck-menu {
    padding: 8px !important;

    background: rgba(255, 255, 255, 0.55) !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    border-radius: 16px !important;
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.12) !important;

    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
}

.decks-page .deck-menu .menu-delete-button {
    width: 100% !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;

    margin: 0 !important;
    padding: 10px 12px !important;

    background: transparent !important;
    border: none !important;
    border-radius: 10px !important;
    box-shadow: none !important;

    color: #111111 !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-align: left !important;

    cursor: pointer !important;
}

.decks-page .deck-menu .menu-delete-button:hover {
    background: rgba(31, 31, 31, 0.06) !important;
}

/* The Export submenu (boards.html's expandable Export item, decks.html/
   collages.html's own single Export link) reuses .menu-delete-button for
   each option, so it inherits all of the above automatically wherever
   it's nested inside a frosted .decks-page .deck-menu - only the
   indent/divider and the toggle row's chevron need their own rules (see
   .menu-submenu below, shared by every page's menu). */

/* Export submenu — shared by boards.html (expands to PDF/Excel/Word),
   decks.html/collages.html (a single link, no toggle needed, but reuses
   the same indent for a consistent look if ever expanded to more than
   one option later). Nested inside whichever dropdown it's rendered in
   (.board-menu or .deck-menu) so it inherits that menu's own background/
   frosted-glass/opaque styling automatically - only the indent/divider
   and toggle chevron are its own concern. */
.menu-submenu {
    display: none;
    flex-direction: column;
    gap: 2px;

    margin: 2px 0 2px 10px;
    padding-left: 8px;

    border-left: 2px solid rgba(0, 0, 0, 0.08);
}

.menu-submenu.is-open {
    display: flex;
}

/* Currently-assigned option in the "Assign to" submenu (see
   board_detail.html's product menu) - same highlight convention as
   .budget-picker-menu button.is-selected elsewhere on this page. */
.menu-submenu .menu-delete-button.is-selected {
    background: rgba(31, 31, 31, 0.08);
}

.menu-export-toggle {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.menu-export-chevron {
    width: 14px;
    height: 14px;
    flex-shrink: 0;

    transition: transform 0.15s ease;
}

.menu-export-toggle.is-open .menu-export-chevron {
    transform: rotate(180deg);
}

#editDeckModal .delete-modal-card {
    max-height: 86vh;
    overflow: hidden;
    padding: 30px;
}

#editDeckModal .delete-modal-card form {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 8px;

    display: flex;
    flex-direction: column;
    gap: 10px;
}

#editDeckModal .delete-modal-card h2 {
    margin: 0 0 18px;

    font-size: 30px;
}

#editDeckModal .delete-modal-card label {
    font-size: 14px;
}

#editDeckModal .delete-modal-card input {
    padding: 12px 14px;

    font-size: 14px;
}

.deck-card-title {
    margin: 10px 2px 0;

    color: #1f1f1f;

    font-family: var(--card-title-font);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.3;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.deck-card-count {
    margin: 2px 2px 0;

    color: #9a9a9a;

    font-size: 13px;
    font-weight: 600;
}

@media (max-width: 1000px) {
    .decks-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

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

/* ---------- Create-deck modal: board picker ---------- */

html body #createDeckModal .create-deck-modal-card,
html body #navbarCreateDeckModal .create-deck-modal-card {
    max-width: 400px !important;
    max-height: calc(100vh - 48px) !important;
    padding: 32px !important;

    display: flex;
    flex-direction: column;

    overflow: hidden !important;
    text-align: left;
}

.create-deck-modal-card h2 {
    flex-shrink: 0;
    text-align: center;
}

.create-deck-modal-subtitle {
    flex-shrink: 0;
    text-align: center;
}

html body #createDeckModal .create-deck-modal-card form,
html body #navbarCreateDeckModal .create-deck-modal-card form {
    flex: 1;
    min-height: 0;

    gap: 0;
    overflow: hidden;
}

.deck-board-picker {
    flex: 1 1 320px;
    min-height: 0;
    max-height: 320px;

    display: flex;
    flex-direction: column;
    gap: 10px;

    margin-bottom: 12px;
    padding-right: 4px;

    overflow-y: auto;
}

html body #createDeckModal .create-deck-submit,
html body #navbarCreateDeckModal .create-deck-submit {
    flex-shrink: 0;
    margin: 0;
}

.deck-board-picker-option {
    display: flex;
    align-items: center;
    gap: 12px;

    width: 100%;

    font-family: inherit;
    text-align: left;

    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

/* A later "filleted rectangles" layer (search that phrase further down this
   file) forces every <button> inside a .delete-modal-card form to the
   black/white primary-action look via :not() exclusions + !important —
   higher specificity than a plain class rule can beat. These option buttons
   are selection cards, not primary actions, so they need matching
   specificity (ID-scoped + !important) to opt back out. Scoped to the
   Decks page's own create-deck modal, the navbar's global one (see
   openNavbarCreateDeckOption in base.html), and the Save Item modal
   (explore/product_detail/board_detail.html) - all three share this same
   board-picker markup/behaviour. */
html body #createDeckModal .deck-board-picker-option,
html body #navbarCreateDeckModal .deck-board-picker-option,
html body #saveProductModal .deck-board-picker-option {
    padding: 10px !important;

    background: #ffffff !important;
    border: 1px solid #ddddda !important;
    border-radius: 14px !important;

    color: #1f1f1f !important;
    font-weight: 400 !important;
}

html body #createDeckModal .deck-board-picker-option:hover,
html body #navbarCreateDeckModal .deck-board-picker-option:hover,
html body #saveProductModal .deck-board-picker-option:hover {
    background: #f7f7f6 !important;
}

html body #createDeckModal .deck-board-picker-option.is-selected,
html body #navbarCreateDeckModal .deck-board-picker-option.is-selected,
html body #saveProductModal .deck-board-picker-option.is-selected {
    background: #f3f3f2 !important;
    border: 1px solid #1f1f1f !important;
}

html body #navbarCreateDeckModal .deck-board-picker-loading {
    margin: 0 0 20px;

    color: #9a9a9a;

    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.deck-board-picker-cover {
    width: 44px;
    height: 44px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    background: #f3f3f2;
    border-radius: 50%;

    color: #1f1f1f;

    font-size: 16px;
    font-weight: 800;
}

.deck-board-picker-cover img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}

.deck-board-picker-cover-custom svg {
    width: 20px;
    height: 20px;
}

.deck-board-picker-info {
    display: flex;
    flex-direction: column;
    gap: 2px;

    min-width: 0;
}

.deck-board-picker-info strong {
    color: #1f1f1f;

    font-size: 14px;
    font-weight: 800;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.create-deck-modal-card .deck-board-picker-info strong,
html body #saveProductModal .deck-board-picker-info strong {
    font-weight: 600;
}

.deck-board-picker-info span {
    color: #9a9a9a;

    font-size: 12px;
    font-weight: 600;
}

/* Matches the site's current "filleted rectangle" modal-button look (see
   that phrase further down this file) — a rounded rectangle, not a pill.
   The <button type="submit"> case already gets this exact look for free
   from that later !important layer; these plain rules exist so the
   <a class="create-deck-submit"> "Go to My Boards" fallback (used when the
   user has no boards) matches it too, since that layer only targets
   <button> elements. */
.create-deck-submit {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    padding: 14px 20px;

    background: #1f1f1f;
    border: none;
    border-radius: 14px;

    color: #ffffff;

    font-size: 15px;
    font-weight: 800;
    text-decoration: none;

    cursor: pointer;
    transition: background 0.15s ease;
}

.create-deck-submit:hover {
    background: #333333;
}

/* The same !important layer forces the submit button's background/color
   even while disabled (it has no :disabled exclusion), so this needs
   ID-scoped !important too, same reasoning as the board-picker options
   above. */
html body #createDeckModal .create-deck-submit:disabled,
html body #navbarCreateDeckModal .create-deck-submit:disabled {
    background: #e0e0e0 !important;
    color: #a3a3a3 !important;

    cursor: not-allowed;
}

/* ---------- Deck editor: "Add product slide" picker ---------- */
/* Reuses the app's standard .product-card/.card-info (see near the top of
   this file) inside a plain CSS grid — deliberately not the masonry/
   collage layout used for board covers elsewhere, so cards line up in
   even rows regardless of photo aspect ratio. */

.deck-product-picker-modal-card {
    width: fit-content;
    max-height: min(85vh, 800px);

    text-align: left;
    overflow-y: auto;
}

/* The "MODAL SYSTEM REDESIGN" layer (search that phrase further down this
   file) caps every .delete-modal-card at max-width: 420px !important and
   forces padding: 32px !important on all four sides — both need opting out
   here, the same way that layer's own .filter-card/
   .profile-picture-crop-modal-card size exceptions already do: matching
   specificity (html body .SELECTOR) + !important. No fixed max-width of its
   own — width: fit-content above already shrinks the card to wrap exactly
   the three-column grid (only a viewport-driven ceiling, for narrow
   screens). The extra padding-right (on top of the same 32px on every
   other side) gives the styled scrollbar below room to sit inset from the
   card's rounded corner, rather than looking like it cuts through the edge. */
html body .deck-product-picker-modal-card {
    max-width: 100% !important;
    padding-right: 40px !important;
}

.deck-product-picker-modal-card h2 {
    text-align: center;
}

/* Thin, subtle scrollbar instead of the browser default — matches the
   #signupModal .auth-modal-scroll treatment used elsewhere. */
.deck-product-picker-modal-card {
    scrollbar-color: #9b9b9b transparent;
    scrollbar-width: thin;
}

.deck-product-picker-modal-card::-webkit-scrollbar {
    width: 8px;
}

.deck-product-picker-modal-card::-webkit-scrollbar-track {
    background: transparent;
}

.deck-product-picker-modal-card::-webkit-scrollbar-thumb {
    background: #9b9b9b;
    border-radius: 999px;
}

.deck-product-picker-subtitle {
    margin: 0 0 20px;

    color: #68615a;

    text-align: center;
}

/* Three per row, each column a fixed width rather than 1fr — matches
   Explore's own card width and gap exactly (see .explore-page .product-card
   / .wishlist-grid) so these read as the same card, just laid out in a
   plain grid instead of Explore's masonry. The modal itself has no fixed
   width of its own (see .deck-product-picker-modal-card's fit-content) so
   it shrinks to wrap precisely this, rather than the grid stretching to
   fill a wider modal. */
.deck-product-picker-grid {
    display: grid;
    grid-template-columns: repeat(3, 273px);
    gap: 22px;
}

.deck-product-picker-card {
    position: relative;
    overflow: hidden;

    cursor: pointer;
}

.deck-product-picker-card > img {
    display: block;
    margin: 0;
}

/* Brand/price sit on the photo, hidden until hover — same treatment as
   Explore's own cards (see ".explore-page .wishlist-grid .product-card
   > .card-info" further down this file), just reused here without the
   .explore-page scope so a plain (non-masonry) grid of the user's own
   saved products reads as the identical card, not a different one. */
.deck-product-picker-card > .card-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;

    /* Each line (brand, price) becomes its own small pill below, rather
       than one shared panel sized to whatever line is widest — same
       layout as explore.html's own .card-info override for these same
       two classes. */
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;

    width: auto;
    margin: 0;
    padding: 14px;

    background: none;
    pointer-events: none;

    opacity: 0;
    visibility: hidden;

    transition: opacity 0.15s ease, visibility 0.15s ease;
}

.deck-product-picker-card > .card-info p {
    display: inline-flex;
    width: fit-content;

    margin: 0;
    padding: 4px 10px;
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);

    color: #1f1f1f;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
}

.deck-product-picker-card:hover > .card-info {
    opacity: 1;
    visibility: visible;
}

/* Same subtle grey-out on hover as Explore, instead of a lift/shadow. */
.deck-product-picker-card::before {
    content: "";

    position: absolute;
    inset: 0;
    z-index: 2;

    background: rgba(17, 17, 17, 0);

    pointer-events: none;
    transition: background 0.15s ease;
}

.deck-product-picker-card:hover::before {
    background: rgba(17, 17, 17, 0.1);
}

.deck-product-picker-loading,
.deck-product-picker-empty {
    grid-column: 1 / -1;

    padding: 30px 0;

    color: #9a9a9a;

    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

/* =========================================================
   COLLAGE STUDIO — fixed-template photo collages built from
   COLLAGE_TEMPLATES (see views.py). .collage-frame/.collage-slot are
   reused at three sizes with the exact same slot rects (rendered as
   inline-style percentages by the template): a tiny read-only
   thumbnail in the template picker (.collage-template-preview), a
   card-sized read-only preview on the Collage Studio list
   (.collage-card-preview), and the full interactive fill view
   (.collage-editor-frame) — so a collage always looks identical at
   every size it's shown at, just scaled.
   ========================================================= */

.collage-frame {
    position: relative;
    display: block;

    width: 100%;
    /* Set inline from the collage's / template's frame shape; 9:16 unless
       it's e.g. the Square template (see COLLAGE_FRAME_RATIOS). */
    aspect-ratio: var(--collage-ratio, 9 / 16);

    overflow: hidden;

    background: #e5e5e3;
    border-radius: 16px;
}

/* The Collage Studio dashboard's own card preview and the live editor's
   fill view - not the template picker's tiny thumbnail (see this
   section's own comment on why all three share .collage-frame), which
   already sits inside a modal card with its own chrome. A thin border
   distinguishes the frame from the page's own background in both of the
   other two contexts. */
.collage-card-preview,
.collage-editor-frame {
    border: 1px solid #e0e0dd;
}

/* .collage-slot is just a positioning/click-target box at the template's
   raw, contiguous percentage rect (no gap of its own — adjacent slots'
   rects touch exactly). The visible divider lines are .collage-frame's
   dark background showing through the fixed inset around
   .collage-slot-inner below, which is what actually carries the
   background/photo/placeholder.

   This needs the extra nesting because a plain `margin` on .collage-slot
   itself doesn't work: for an absolutely positioned box with
   left/top/width/height already set from inline style, margin only
   shifts where that box starts (via margin-top/-left) — it doesn't
   shrink width/height by margin-right/-bottom too, so only the frame's
   own top-left edge ever got inset and every other edge (between
   adjacent slots, and along the frame's own right/bottom) touched or
   silently overflowed past the frame with no visible gap at all. */
.collage-slot {
    position: absolute;
}

/* Each slot gets its own small radius on every corner (not just the ones
   touching the frame edge) — since it's smaller than .collage-frame's
   own 16px radius, a corner slot's curve always sits safely inside the
   frame's own rounded clip instead of the frame's overflow:hidden
   abruptly slicing a sharp square corner off, which is what "not
   getting the proper fillet" looked like before this. */
.collage-slot-inner {
    position: absolute;
    inset: 1.5px;

    overflow: hidden;
    border-radius: 8px;

    background: #ffffff;

    transition: box-shadow 0.15s ease;
}

.collage-slot-inner img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* Only applied to a blank collage's dashboard-card preview (see
   collages.html) - .collage-slot-inner's own #ffffff (right for a fixed
   template's slot divider, always meant to be a solid opaque card) would
   otherwise show through a freehand-clipped photo's transparent margins
   as an opaque white box, hiding the cutout's real silhouette and making
   it look like an uncropped rectangular photo instead - especially when
   the collage's own background_color happens to be close to white. The
   live editor never had this bug (its own .slide-element-image-frame has
   no background at all - see style.css), only this read-only preview,
   since it's the only other place a blank collage's elements are
   rendered through the shared .collage-slot/.collage-slot-inner markup.
   Transparent here lets the same .collage-card-preview's own
   background_color (set inline in collages.html) show through instead,
   matching the live editor exactly. */
.collage-slot-inner-freeform {
    background: transparent;
}

/* A slot sitting at one of .collage-frame's own four corners needs that
   one corner's radius bumped up past the default 8px (see
   .collage-slot-inner's own comment) so its curve nests concentrically
   inside the frame's 16px clip instead of staying square long enough to
   get sliced off by it. Only the corner(s) a slot actually touches are
   bumped — .collage-slot-inner still has border-radius: 8px everywhere,
   these longhand properties selectively win over just one corner apiece
   because they're more specific than the shorthand. Server-tagged per
   slot (corner_tl/tr/bl/br) in _tag_slot_frame_corners in views.py, since
   only Python knows each slot's raw x/y/width/height. */
.collage-slot-inner-corner-tl {
    border-top-left-radius: 14.5px;
}

.collage-slot-inner-corner-tr {
    border-top-right-radius: 14.5px;
}

.collage-slot-inner-corner-bl {
    border-bottom-left-radius: 14.5px;
}

.collage-slot-inner-corner-br {
    border-bottom-right-radius: 14.5px;
}

.collage-slot-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;

    background: #f7f7f6;
    color: #9a9a9a;
}

.collage-slot-empty .collage-slot-add-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.collage-slot-empty .collage-slot-add-label {
    padding: 0 4px;

    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

/* Card preview (Collage Studio list) and template preview (create-
   collage modal) are read-only at a small size — no icon/label
   clutter, just the grid shape itself. */
.collage-card-preview .collage-slot-add-icon,
.collage-card-preview .collage-slot-add-label,
.collage-template-preview .collage-slot-add-icon,
.collage-template-preview .collage-slot-add-label {
    display: none;
}

/* .deck-create-tile-box defaults to a 16:9 deck-slide ratio - collages
   are a thin 9:16 portrait instead. */
.collage-create-tile-box {
    aspect-ratio: 9 / 16 !important;
}

/* ---------- Template picker (createCollageModal) ---------- */

/* Overrides the base .deckd-modal-card's own max-height: 80vh +
   overflow-y: auto - .collage-template-picker (below) already scrolls
   its own overflow via .deckd-scroll, so leaving the outer card's
   scroll active too meant two nested scrollbars once the template grid
   got tall enough to hit 80vh. The outer card now just grows to fit its
   header + whatever height the picker's own vh-relative cap leaves it,
   so only the inner picker ever scrolls. !important needed on both:
   .deckd-modal-card lives in deckd_modals.css, loaded after style.css
   (see base.html), so at equal single-class specificity its plain
   (non-!important) values would otherwise win purely on source order. */
.collage-template-modal-card {
    width: fit-content;
    max-width: 560px !important;
    max-height: none !important;
    overflow: visible !important;
}

.collage-template-picker {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;

    max-height: min(60vh, 520px);
    padding: 4px;
}

.collage-template-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;

    width: 130px;

    background: none;
    border: none;
    padding: 0;

    font-family: inherit;
    cursor: pointer;
}

/* A non-portrait collage keeps the same tile footprint as every other
   (so the list grid stays even) and shows its frame at its true shape,
   centred inside it. */
.deck-card-cover-wrap.is-collage-letterboxed {
    display: flex;
    align-items: center;

    aspect-ratio: 9 / 16;

    background: #f1f1ef;
    border-radius: 16px;
}

.collage-template-option .collage-frame {
    width: 100%;
    border: 1px solid #e5e5e3;

    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.collage-template-option:hover .collage-frame {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

/* ---------- Editor (collage_detail.html) ---------- */

/* Frame on the left, every saved product always visible on the right —
   click a slot, then click a photo to fill it (see selectCollageSlot /
   fillActiveCollageSlot in collage_detail.html). No modal, so nothing
   ever hides the product list mid-pick. */
.collage-editor-layout {
    display: flex;
    align-items: stretch;
    gap: 36px;
}

.collage-editor-frame-wrap {
    flex: 1 1 auto;

    display: flex;
    justify-content: center;

    /* Anchors .collage-slot-selection-ring, an absolutely-positioned
       sibling of #collageStage that needs to line up with it exactly
       while staying outside its overflow: hidden clip - see the ring's
       own comment. */
    position: relative;
}

/* Height is set directly by syncCollageEditorFrameHeight in
   collage_detail.html to match .collage-product-panel's own real
   rendered height (a plain CSS flex-stretch, relying on height: 100%
   against an ambiguous/circular cross-size, turned out not to shrink
   the frame back down when the panel's content was short - see that
   function's own comment) - width then follows from that height through
   aspect-ratio, so the card starts and ends level with the product panel
   at any viewport size. max-height is just a fallback ceiling for before
   that JS runs / if it doesn't. */
.collage-editor-frame {
    width: auto;
    height: 100%;
    max-height: calc(400px * 16 / 9);
}

.collage-editor-frame .collage-slot-button {
    margin: 0;
    padding: 0;

    background: none;
    border: none;
    outline-offset: 2px;

    font: inherit;
    color: inherit;
    text-align: inherit;

    cursor: pointer;
}

.collage-editor-frame .collage-slot-button:hover .collage-slot-empty {
    background: #eeeeec;
    color: #1f1f1f;
}

.collage-editor-frame .collage-slot-empty .collage-slot-add-icon svg {
    width: 22px;
    height: 22px;
}

.collage-editor-frame .collage-slot-empty .collage-slot-add-label {
    font-size: 13px;
}

.collage-slot-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 2;

    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;

    background: rgba(17, 17, 17, 0.65);
    border-radius: 50%;

    color: #ffffff;
    font-size: 15px;
    line-height: 1;

    opacity: 0;
    transition: opacity 0.15s ease, background 0.15s ease;
}

.collage-editor-frame .collage-slot-button:hover .collage-slot-remove {
    opacity: 1;
}

.collage-slot-remove:hover {
    background: rgba(17, 17, 17, 0.85);
}

/* Fades the origin slot's photo out while it's being dragged onto another
   slot (see handleCollageSlotDragStart in collage_detail.html) - the
   custom drag image already shows the photo following the cursor, so
   without this the same photo reads as visible twice at once. */
.collage-editor-frame .collage-slot-button.is-drag-source {
    opacity: 0.35;
}

/* ---------- Selected/drag-target slot ring (collage_detail.html) ---------- */
/* The ring around whichever slot is selected (or being dragged over)
   used to live as a box-shadow on that slot's own .collage-slot-inner,
   but an outward-bled ring has nowhere to go on any slot that sits
   flush against another slot or against the frame's own edge (which is
   every slot, somewhere): .collage-frame's overflow: hidden or a
   same-painted-later neighbour simply clipped/covered whichever side
   had no room, so the ring read as present on some sides and missing on
   others depending on position. Rendering it instead as a separate
   overlay that sits on top of (rather than inside) .collage-frame lets
   it bleed outward freely without ever being clipped, on every slot
   regardless of position. It's kept perfectly aligned with whichever
   slot is targeted without any JS math: .collage-slot-selection-ring
   mirrors .collage-editor-frame's own sizing exactly (so it's the same
   box, just unclipped and stacked on top), then
   .collage-slot-selection-ring-target is positioned with the exact same
   left/top/width/height percentages as the real slot button (copied by
   updateCollageSelectionRing in collage_detail.html), and
   .collage-slot-selection-ring-inner mirrors .collage-slot-inner's own
   1.5px inset so the ring lines up with the slot's actual photo/
   placeholder box rather than its outer click-target rect. */
.collage-slot-selection-ring {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);

    height: 100%;
    aspect-ratio: var(--collage-ratio, 9 / 16);
    max-height: calc(400px * 16 / 9);

    display: none;
    pointer-events: none;
}

.collage-slot-selection-ring.is-visible {
    display: block;
}

.collage-slot-selection-ring-target {
    position: absolute;
}

.collage-slot-selection-ring-inner {
    position: absolute;
    inset: 1.5px;

    border-radius: 8px;

    box-shadow:
        0 0 0 2px #ffffff,
        0 0 0 4px #1f1f1f,
        0 8px 18px rgba(0, 0, 0, 0.2);
}

/* ---------- Saved-products side panel (collage_detail.html) ---------- */
/* Canva/Pinterest-style: a soft card housing a two-column grid of
   draggable photo tiles (each keeping its own natural photo aspect ratio
   instead of being cropped square), with a frosted brand/price pill
   revealed on hover — the same treatment .deck-product-picker-card
   already uses elsewhere, just laid out as a permanent panel instead of
   a modal grid. */

.collage-product-panel {
    flex: 0 0 340px;

    padding: 18px;

    background: #fafaf9;
    border: 1px solid #ededea;
    border-radius: 20px;

    position: sticky;
    top: 18px;
}

/* Same All items / Boards switcher look as the Decks/Collages page tabs
   (.deckd-content-tabs), just left-aligned and sized down to fit this
   panel instead of centered under a full page header. */
.collage-product-panel-tabs {
    justify-content: flex-start;
    gap: 14px;
    margin: 0 0 12px;
}

/* .deckd-content-tab was written for <a> tags (see its own comment) - it
   only ever sets border-bottom, never resets the other three sides, so
   reusing it on <button> elements here left the browser's own default
   button chrome (a full 4-sided outset border, buttonface background)
   showing on top of it. Reset that away explicitly. */
.collage-product-panel-tabs .deckd-content-tab {
    padding: 0 0 3px;

    background: none;
    border: none;
    border-bottom: 2px solid transparent;

    font-family: inherit;
    font-size: 14px;

    cursor: pointer;
}

.collage-product-panel-tabs .deckd-content-tab.is-active {
    border-bottom-color: #1f1f1f;
}

/* Reuses the exact same header search bar styling as Explore (see
   .deckd-topbar-search in the "Header search bar" section) minus its
   filter button (.deckd-topbar-search-no-button, an existing modifier
   for that), just placed inline in the panel instead of the page's top
   navbar - shown whenever there's an actual grid of items to search
   (All items, or a specific board), hidden on the board-picker screen
   itself where there's nothing yet to search (see
   showCollageProductPanelBoardsList in collage_detail.html). */
.collage-product-panel-search {
    margin: 0 0 12px;
}

/* .deckd-topbar-search-no-button's own input rule (a single class,
   specificity 1-1) loses to .deckd-topbar-search.deckd-topbar-search
   input's deliberately-doubled specificity (2-1, see that rule's own
   comment) regardless of no-button being present, so the input still
   reserved the filter button's 52px of right padding despite there being
   no button. Tripling the class here (3-1) is the only way to actually
   win that fight. */
.collage-product-panel-search.deckd-topbar-search.deckd-topbar-search input {
    padding-right: 18px !important;
}

/* Slightly shorter than the 48px Explore/topbar search bar this is
   otherwise reusing - the panel sits in a narrower, more form-dense
   sidebar rather than the page's top navbar. Same specificity-tripling
   trick as the padding-right rule above is needed to beat the base
   .deckd-topbar-search.deckd-topbar-search height (also !important). */
.collage-product-panel-search.deckd-topbar-search.deckd-topbar-search,
.collage-product-panel-search.deckd-topbar-search.deckd-topbar-search input {
    height: 40px !important;
    min-height: 40px !important;
}

/* !important needed to beat "html body .deckd-search-icon" (Header
   search bar section) - two classes here still out-specifies its single
   class + 2 elements, but only once both sides are !important. */
.collage-product-panel-search .deckd-search-icon {
    width: 15px !important;
    height: 15px !important;
}

/* Shown only while browsing a specific board's items (Boards tab, after
   a board's been picked) - takes the user back to the board list rather
   than all the way out to "All items". */
.collage-product-panel-board-back {
    display: flex;
    align-items: center;
    gap: 4px;

    margin: 0 0 10px;
    padding: 0;

    background: none;
    border: none;

    color: #777772;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;

    cursor: pointer;
    transition: color 0.15s ease;
}

.collage-product-panel-board-back:hover {
    color: #1f1f1f;
}

.collage-product-panel-board-back svg {
    width: 14px;
    height: 14px;
}

/* A fixed `height` (not just `max-height`) so a short board list (only
   a board or two) still fills the same vertical space the panel has
   available - rather than shrinking to fit its few rows and leaving the
   card's bottom padding floating well above where it should sit. Taller
   than .collage-product-panel-grid's own 420px cap below (and the offset
   trimmed from 260 to 200) on purpose - unlike the grid, nothing else on
   this list ever needs the extra room back for a search bar's height. */
.collage-product-panel-boards-list {
    display: flex;
    flex-direction: column;
    gap: 8px;

    height: min(640px, calc(100vh - 200px));
    padding: 2px 4px 2px 2px;

    overflow-y: auto;
}

/* A small cover-collage preview (same component boards.html's own tiles
   use, see .board-cover-collage/.product-count-N) plus the title, rather
   than a plain text row. */
.collage-product-panel-board-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;

    padding: 8px;

    background: #ffffff;
    border: 1px solid #ededea;
    border-radius: 14px;

    font-family: inherit;
    text-align: left;

    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.collage-product-panel-board-option:hover {
    border-color: #d8d8d4;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.collage-product-panel-board-cover {
    width: 52px;
    height: 52px;
    flex-shrink: 0;

    border-radius: 10px;
}

.collage-product-panel-board-option-title {
    color: #1f1f1f;
    font-size: 13px;
    font-weight: 700;
}

/* The panel toggle (setCollageProductPanelMode et al. in
   collage_detail.html) hides/shows these via the plain HTML `hidden`
   attribute, but each one also sets its own `display` for when it's
   shown - an attribute selector and a class selector tie in specificity,
   and author styles beat the browser's own `[hidden] { display: none }`
   default at a tie, so the `display: flex`/`display: grid` below was
   silently winning even while `hidden` was set. Without this, the boards
   list and the product grid ended up stacked on top of each other rather
   than one replacing the other, roughly doubling the panel's (and
   therefore the collage frame's own height-matched) height. Individual
   cards have the exact same problem when selectCollageProductPanelBoard
   hides the ones outside the chosen board - .collage-product-panel-card's
   own `display: block` won the same tie against `[hidden]`, so every card
   stayed visibly on screen and the board filter looked like it did
   nothing at all. .collage-product-panel-search reuses
   .deckd-topbar-search's own `display: flex !important`, so its override
   needs `!important` too to actually win. */
.collage-product-panel-grid[hidden],
.collage-product-panel-boards-list[hidden],
.collage-product-panel-board-back[hidden],
.collage-product-panel-card[hidden] {
    display: none;
}

.collage-product-panel-search[hidden] {
    display: none !important;
}

/* Scroll wrapper only - the actual masonry columns are the separate
   .collage-product-panel-masonry element nested inside it, kept free of
   its own height/overflow so CSS multi-column's default column-fill:
   balance can size it as tall as its content naturally needs. A
   height/overflow constraint applied directly to a columns element
   instead makes it open new columns off to the side once it runs out of
   vertical room rather than growing new rows - e.g. a 19-item list once
   ended up 1537px wide inside a 303px-wide panel. Scrolling the wrapper
   instead just reveals more of the inner element's already-balanced
   columns as you scroll down. */
.collage-product-panel-grid {
    max-height: min(420px, calc(100vh - 260px));
    padding: 2px 4px 2px 2px;

    overflow-y: auto;
}

/* The Favourites tab has no search bar of its own (see the tabs' own
   onclick handlers in collage_detail.html) - same reasoning as
   .collage-product-panel-boards-list's own taller budget just below,
   reclaims that bar's height back for the grid instead of leaving it as
   dead space underneath a shorter cap. Still max-height (not boards-
   list's fixed height) since this stays a masonry photo grid that should
   shrink to fit a short favourites list, exactly like
   .collage-product-panel-grid itself does. */
#collageFavouritesPanelGrid {
    max-height: min(640px, calc(100vh - 200px));
}

/* Pinterest-style masonry, same technique as Explore's own .wishlist-grid
   (see its own comment) - each card keeps its own natural photo aspect
   ratio rather than being cropped to a fixed grid cell. */
.collage-product-panel-masonry {
    column-count: 2;
    column-gap: 12px;
}

/* An empty state ("Elements you favourite will appear here.") sits inside
   the two-column masonry, which split it across both columns - it spans
   the whole width instead. */
.collage-product-panel-masonry .collage-product-panel-empty {
    column-span: all;
    margin: 0;
    padding: 30px 12px;
    font-weight: 500;
    line-height: 1.5;
}

.collage-product-panel-card {
    display: block;
    width: 100%;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;

    position: relative;
    overflow: hidden;

    margin: 0 0 12px;
    padding: 0;

    background: #eeeeec;
    border: none;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);

    cursor: grab;
}

.collage-product-panel-card:active {
    cursor: grabbing;
}

.collage-product-panel-card img {
    width: 100%;
    height: auto;
    display: block;

    /* Redundant with the card's own overflow:hidden for normal
       rendering, but the browser's native drag-ghost snapshot (see
       handleCollageProductDragStart in collage_detail.html) doesn't
       reliably respect a parent's clipping — setting the radius
       directly on the dragged element keeps the ghost's corners
       rounded too. */
    border-radius: 14px;
}

/* Same subtle grey-out on hover as Explore/deck-product-picker/board
   covers, instead of a lift+shadow. */
.collage-product-panel-card::before {
    content: "";

    position: absolute;
    inset: 0;
    z-index: 2;

    border-radius: inherit;
    background: rgba(17, 17, 17, 0);

    pointer-events: none;
    transition: background 0.15s ease;
}

.collage-product-panel-card:hover::before {
    background: rgba(17, 17, 17, 0.1);
}

/* Brand/price sit on the photo as their own small frosted pills, hidden
   until hover - same treatment as Explore/.deck-product-picker-card (see
   its own comment) reused here so a saved item reads as the same card
   everywhere in the app. */
.collage-product-panel-card-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;

    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;

    margin: 0;
    padding: 10px;

    background: none;
    pointer-events: none;

    opacity: 0;
    visibility: hidden;

    transition: opacity 0.15s ease, visibility 0.15s ease;
}

.collage-product-panel-card-info span {
    display: inline-flex;
    width: fit-content;

    padding: 3px 9px;
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);

    color: #1f1f1f;
    font-size: 11px;
    line-height: 1.2;
    white-space: nowrap;
}

.collage-product-panel-card:hover .collage-product-panel-card-info,
.collage-product-panel-card:focus-visible .collage-product-panel-card-info {
    opacity: 1;
    visibility: visible;
}

.collage-product-panel-empty {
    padding: 30px 0;

    color: #9a9a9a;

    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

/* Favourites tab (blank collages only - see is_blank in collage_detail's
   own view) - each card is a plain div wrapper (rather than the product
   card's own <button>) since it needs two independent controls of its
   own: the photo itself (insert onto the canvas) and a small remove
   overlay (drop from the library). Still picks up every
   .collage-product-panel-card/-card img rule above (rounded corners,
   hover dim, etc) for free, so a favourite reads as the same kind of
   card as a saved product. */
.collage-favourite-card-insert {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}

.collage-favourite-card-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 4;

    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;

    border: none;
    border-radius: 999px;
    background: rgba(17, 17, 17, 0.55);

    color: #ffffff;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;

    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}

.collage-favourite-card:hover .collage-favourite-card-remove,
.collage-favourite-card-remove:focus-visible {
    opacity: 1;
    visibility: visible;
}

.collage-favourite-card-remove:hover {
    background: rgba(17, 17, 17, 0.85);
}

@media (max-width: 900px) {
    .collage-editor-layout {
        flex-direction: column;
        align-items: stretch;
    }

    .collage-product-panel {
        flex: 1 1 auto;
        position: static;
    }

    .collage-editor-frame {
        width: min(420px, 100%);
        height: auto;
        max-height: none;
        margin: 0 auto;
    }

    .collage-slot-selection-ring {
        width: min(420px, 100%);
        height: auto;
        max-height: none;
    }
}

@media (max-width: 560px) {
    .collage-editor-frame {
        width: 100%;
    }

    .collage-slot-selection-ring {
        width: 100%;
    }
}

/* ---------- Deck editor: topbar ---------- */

.deck-editor-page {
    max-width: 1320px;
    margin: 0 auto;
    padding: 18px 32px 32px;
}

.deck-editor-topbar {
    display: flex;
    align-items: center;
    gap: 18px;

    margin-bottom: 18px;
    padding-bottom: 16px;

    border-bottom: 1px solid #e5e5e3;
}

.deck-editor-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;

    color: #777772;

    font-size: 14px;
    font-weight: 700;
    text-decoration: none;

    transition: color 0.15s ease;
}

.deck-editor-back:hover {
    color: #1f1f1f;
}

.deck-editor-back svg {
    width: 16px;
    height: 16px;
}

.deck-editor-title {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;

    color: #1f1f1f;

    font-family: var(--card-title-font);
    font-size: 22px;
    font-weight: 400;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.deck-editor-title.is-editing {
    text-overflow: clip;
    outline: none;
    border-radius: 6px;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.12);
    cursor: text;
}

.deck-editor-meta {
    flex-shrink: 0;

    color: #9a9a9a;

    font-size: 13px;
    font-weight: 600;
}

.deck-present-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;

    padding: 10px 16px;

    background: #1f1f1f;
    border: none;
    border-radius: 999px;

    color: #ffffff;

    font-family: inherit;
    font-size: 14px;
    font-weight: 800;

    cursor: pointer;
    transition: background 0.15s ease;
}

.deck-present-button:hover {
    background: #333333;
}

.deck-present-button svg {
    width: 16px;
    height: 16px;
}

/* ---------- Deck editor: thumbnail rail ---------- */

.deck-editor-body {
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

.deck-editor-rail {
    width: 150px;
    flex-shrink: 0;

    display: flex;
    flex-direction: column;
    gap: 12px;

    max-height: calc(100vh - 220px);
    padding-right: 4px;

    overflow-y: auto;
}

.deck-slide-thumb {
    position: relative;

    display: flex;
    flex-direction: column;
    gap: 6px;

    padding: 0;

    background: none;
    border: none;

    font-family: inherit;
    text-align: left;

    cursor: pointer;
}

/* Number and delete icon share one row so the delete control sits right
   next to (not floating over) the slide number, rather than badge-style on
   top of the preview thumbnail. */
.deck-slide-thumb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding-left: 2px;
}

.deck-slide-thumb-number {
    color: #9a9a9a;

    font-size: 11px;
    font-weight: 700;
}

/* Hidden until hover/focus so the rail doesn't look cluttered with a
   trash icon on every slide at rest. */
.deck-slide-thumb-delete {
    width: 26px;
    height: 26px;
    flex-shrink: 0;

    display: none;
    align-items: center;
    justify-content: center;

    background: none;
    border: none;
    border-radius: 6px;

    color: #9a9a9a;

    cursor: pointer;
}

.deck-slide-thumb-delete svg {
    width: 17px;
    height: 17px;
}

.deck-slide-thumb:hover .deck-slide-thumb-delete,
.deck-slide-thumb:focus-within .deck-slide-thumb-delete {
    display: flex;
}

.deck-slide-thumb-delete:hover {
    background: #f3e2e0;
    color: #8a4a42;
}

/* Styled as one more card in the same family as .deck-slide-thumb-preview
   above it (white face, rounded 10px corners, soft shadow) rather than a
   dashed dropzone, so the rail reads as one consistent stack of slides
   with a "+" tile at the end instead of a visually unrelated control. */
.deck-slide-thumb-add {
    /* Tall formats (4:5, 9:16) cap the thumbnail's height rather than let
       it run on for 2-3x the rail's width. */
    width: min(100%, calc(170px * var(--deck-ratio-num, 1.777778)));
    margin: 0 auto;
    aspect-ratio: var(--deck-ratio, 16 / 9);

    display: flex;
    align-items: center;
    justify-content: center;

    background: #ffffff;
    border: 2px solid transparent;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);

    color: #9a9a9a;

    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.deck-slide-thumb-add:hover {
    border-color: #1f1f1f;
    color: #1f1f1f;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.deck-slide-thumb-add:focus {
    outline: none;
}

.deck-slide-thumb-add:focus-visible {
    outline: 2px solid #1f1f1f;
    outline-offset: 2px;
}

/* A circular chip behind the "+" instead of the bare glyph floating in the
   card — sits it visibly farther in from the card's edges and gives the
   bigger icon somewhere to live rather than just looking blown up. */
.deck-slide-thumb-add-icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f3f3f2;
    border-radius: 50%;

    transition: background 0.15s ease;
}

.deck-slide-thumb-add:hover .deck-slide-thumb-add-icon {
    background: #e9e9e6;
}

.deck-slide-thumb-add svg {
    width: 22px;
    height: 22px;
}

/* Thumbnails are true miniatures of the real slide — same shape, and
   the JS-built .deck-slide-thumb-mini-elements overlay (see
   syncSlideThumbElements) mirrors every slide element's actual position,
   so this stays legible as an at-a-glance outline of the deck instead of a
   generic image strip. This container itself has no static content of its
   own — every slide (title/product/blank) renders identically. */
.deck-slide-thumb-preview {
    position: relative;

    width: min(100%, calc(170px * var(--deck-ratio-num, 1.777778)));
    margin: 0 auto;
    aspect-ratio: var(--deck-ratio, 16 / 9);

    display: flex;
    overflow: hidden;

    background: #ffffff;
    border: 2px solid transparent;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);

    transition: border-color 0.15s ease;
}

/* Mirrors whatever custom text boxes/shapes are on the real slide, scaled
   down 1:1 by percentage (the thumb and the real slide share one shape, so
   %-of-slide coordinates are also valid %-of-thumb coordinates). */
.deck-slide-thumb-mini-elements {
    position: absolute;
    inset: 0;
    z-index: 5;
}

.deck-slide-thumb-mini-element {
    position: absolute;
    overflow: hidden;
}

.deck-slide-thumb-mini-element-text {
    font-size: 5px;
    line-height: 1.15;
    font-weight: 700;
}

.deck-slide-thumb-mini-element-shape {
    border-radius: 2px;
    border: 1px solid transparent;
    box-sizing: border-box;
}

.deck-slide-thumb-mini-element-shape-circle,
.deck-slide-thumb-mini-element-shape-oval {
    border-radius: 50%;
}

.deck-slide-thumb-mini-element-shape-line {
    border-radius: 1px;
}

.deck-slide-thumb-mini-element-shape-rectangle_sharp {
    border-radius: 0;
}

.deck-slide-thumb-mini-element-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.deck-slide-thumb:hover .deck-slide-thumb-preview {
    border-color: #ddddda;
}

.deck-slide-thumb.is-active .deck-slide-thumb-preview {
    border-color: #1f1f1f;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

/* The thumb is a div with tabindex="0" (see deck_detail.html), so clicking
   it leaves it as document.activeElement — and unlike a real <button>,
   Chromium still matches :focus-visible for this kind of element after a
   mouse click, not just real keyboard navigation. Left alone, that drew a
   heavy outline around the whole card any time it was clicked, on top of
   the .is-active border already showing which slide is current (and
   activateDeckSlide() now moves focus along with Up/Down-arrow navigation
   too, so nothing here needs its own indicator to track that). */
.deck-slide-thumb:focus,
.deck-slide-thumb:focus-visible {
    outline: none;
}

/* ---------- Deck editor: slide stage ---------- */
/* The slide's max-width is capped by BOTH a pixel ceiling and a
   viewport-height-derived value (width = available height * the slide's
   width:height), so a slide can never end up taller than the laptop screen
   regardless of how wide the window is. --deck-ratio / --deck-ratio-num are
   set per deck on .deck-editor-page (and on each list card) from
   Deck.slide_format; they fall back to 16:9, the default widescreen deck. */

.deck-editor-stage {
    position: relative;

    flex: 1 1 auto;
    min-width: 0;
    height: calc(100vh - 200px);
    min-height: 320px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f3f3f2;
    border-radius: 24px;
    padding: 24px;

    /* Belt-and-suspenders alongside the marquee mousedown's own
       preventDefault (see deck_detail.html) — without this, a click-drag
       across the canvas can still start the browser's native text/image
       selection (an image included gets painted with the blue selection
       highlight for the rest of the drag) rather than just drawing the
       marquee box. Re-enabled below specifically while a text element is
       being edited, since that relies on real text selection. */
    user-select: none;
    -webkit-user-select: none;
}

.deck-slide {
    position: relative;

    display: none;
    flex-direction: column;

    width: 100%;
    max-width: min(780px, calc((100vh - 260px) * var(--deck-ratio-num, 1.777778)));
    aspect-ratio: var(--deck-ratio, 16 / 9);

    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.14);
}

/* Desktop: fit the stage to the space actually left below the navbar,
   title row and ribbon (--deck-editor-top, measured live by
   syncDeckEditorTop in deck_detail.html) instead of a guessed 200px
   offset, and let the slide fill that stage at 16:9 - whichever of
   width or height runs out first - rather than stopping at 780px. Slide
   text/elements already scale off the slide's own width (100cqw / 780),
   so a bigger slide just renders bigger. Mobile has its own container
   sizing (body.deck-mobile, further down); <=900px keeps the stacked
   layout below. */
@media (min-width: 901px) {
    html body:not(.deck-mobile) .deck-editor-page {
        max-width: 1680px;
    }

    html body:not(.deck-mobile) .deck-editor-stage:not(.is-presenting) {
        height: calc(100vh - var(--deck-editor-top, 300px) - 34px);
        container-type: size;
    }

    html body:not(.deck-mobile) .deck-editor-stage:not(.is-presenting) .deck-slide {
        width: min(100cqw, 100cqh * var(--deck-ratio-num, 1.777778));
        max-width: 1280px;
    }

    html body:not(.deck-mobile) .deck-editor-rail,
    html body:not(.deck-mobile) .deck-editor-layer-panel {
        max-height: calc(100vh - var(--deck-editor-top, 300px) - 34px);
    }
}

/* Title slide's default look (only while its background is still
   untouched — see deck_detail.html's slide loop): the board's own
   product photos in a 4-column staggered masonry echoing the Explore
   page's own look (see .explore-page .wishlist-grid/.product-card
   above), darkened the same way the page behind an open product detail
   card dims (--dm-backdrop, deckd_modals.css) — not blurred — behind a
   floating white card, echoing the product detail page's own card
   styling (.detail-card/.detail-info) instead of a flat background
   color. The title/subtitle text itself is unchanged — still the same
   absolutely-positioned SlideElements as always, just now sitting on
   top of these two extra decorative layers instead of a plain fill.

   Tiles are positioned with fixed left/top/width/height percentages
   computed once server-side (build_title_slide_bg_tiles in views.py),
   not a browser-computed CSS column-count masonry: two independent
   multi-column layouts (the full slide vs. the rail's tiny thumbnail
   preview) balance their content differently at different container
   sizes and end up showing visibly different arrangements, whereas
   percentage positions scale identically at any size, so the full slide
   and its thumbnail always show the exact same layout. The layout
   deliberately runs past 100% tall so it reads as a real masonry that
   continues down the page rather than a grid neatly sized to fit — see
   .deck-title-slide-bg's own overflow: hidden for where it gets cropped. */
.deck-title-slide-bg {
    position: absolute;
    inset: 0;
    z-index: 1;

    overflow: hidden;
    /* Whatever the slide's own rounding is (16px desktop editor, 10px
       phone editor, scaled while presenting) - a fixed 16px here left a
       white crescent of the slide showing at each corner wherever the
       two radii differed. */
    border-radius: inherit;

    background: #ffffff;
}

.deck-title-slide-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    /* Slightly lighter than --dm-backdrop's own 0.32 (deckd_modals.css) -
       a deliberate, independent value rather than the shared variable, so
       tuning this background doesn't also affect every modal backdrop. */
    background: rgba(31, 31, 31, 0.24);
}

.deck-title-slide-bg-tile {
    position: absolute;

    background: #ffffff;
    /* Explore's own product-card is 26px on a ~282px-wide masonry column
       (1200px container, 4 columns, 24px gaps) - 9.22% of its own width,
       not a flat 26px, so these tiles (a very different, size-varying
       width depending on whether this is the full slide or the tiny
       rail thumbnail preview) read with the same proportions as Explore
       instead of the same absolute radius looking right on one and
       wildly over-rounded on the other. */
    border-radius: 9.22%;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.07);
    overflow: hidden;
}

.deck-title-slide-bg-tile img {
    display: block;
    width: 100%;
    height: 100%;
    /* cover, not contain: tile height is computed from each photo's own
       aspect ratio (see build_title_slide_bg_tiles in views.py), but
       rounding between that server-side calc and the browser's actual
       layout can still leave a sliver uncovered - cover guarantees the
       photo always fills its tile edge-to-edge, cropping a hair if
       needed, instead of ever showing a gap. */
    object-fit: cover;
}

/* Same idea and the exact same tile positions (see
   build_title_slide_bg_tiles), scaled down for the slide rail's own
   tiny preview (see .deck-slide-thumb-preview, already
   position:relative/overflow:hidden). */
.deck-title-slide-thumb-bg {
    position: absolute;
    inset: 0;
    z-index: 1;

    overflow: hidden;

    background: #ffffff;
}

.deck-title-slide-thumb-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    /* Slightly lighter than --dm-backdrop's own 0.32 (deckd_modals.css) -
       a deliberate, independent value rather than the shared variable, so
       tuning this background doesn't also affect every modal backdrop. */
    background: rgba(31, 31, 31, 0.24);
}

.deck-title-slide-thumb-tile {
    position: absolute;

    background: #ffffff;
    /* Explore's own product-card is 26px on a ~282px-wide masonry column
       (1200px container, 4 columns, 24px gaps) - 9.22% of its own width,
       not a flat 26px, so these tiles (a very different, size-varying
       width depending on whether this is the full slide or the tiny
       rail thumbnail preview) read with the same proportions as Explore
       instead of the same absolute radius looking right on one and
       wildly over-rounded on the other. */
    border-radius: 9.22%;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.07);
    overflow: hidden;
}

.deck-title-slide-thumb-tile img {
    display: block;
    width: 100%;
    height: 100%;
    /* cover, not contain: tile height is computed from each photo's own
       aspect ratio (see build_title_slide_bg_tiles in views.py), but
       rounding between that server-side calc and the browser's actual
       layout can still leave a sliver uncovered - cover guarantees the
       photo always fills its tile edge-to-edge, cropping a hair if
       needed, instead of ever showing a gap. */
    object-fit: cover;
}

/* decks.html's own cover reuses this same class, but — unlike the deck
   editor's rail thumbnail (a purely decorative swatch with no text) —
   also renders the slide's *real* title/subtitle/card
   .deck-cover-element-* on top, each carrying its own SlideElement.z_index
   (0 for the seeded card, 1 for title/price/brand, higher for anything a
   user has layered above them). This bg's z-index: 1 above would sit
   above that real content and hide it, so within this specific cover it
   drops below any real z-index instead - safe because
   .deck-card-first-slide (style.css above) already isolates its own
   stacking context, so this can't bleed into neighbouring deck cards. */
.deck-card-cover .deck-title-slide-thumb-bg {
    z-index: -2;
}

.deck-slide.is-active {
    display: flex;
}

/* Product slides no longer have any dedicated child markup of their own —
   photo/name/price are all regular SlideElements now (see
   ensure_deck_text_elements in views.py), rendered the same generic way
   as anything else in .deck-slide-elements. */

/* ---------- Presenting (fullscreen) ---------- */

.deck-present-hotzone {
    display: none;
}

/* z-index is intentionally far above anything else in the app (the sidebar
   rail sticks at 10001, which would otherwise paint over this fallback
   overlay — native Fullscreen doesn't have this problem since the browser
   stops rendering everything outside the fullscreen element, but the
   manual "fake fullscreen" fallback needs to out-rank it explicitly). */
.deck-editor-stage.is-presenting {
    position: fixed;
    inset: 0;
    z-index: 999999;

    /* inset: 0 alone sizes it to exactly what's visible. An explicit
       100vh is taller than the visible area on mobile Safari whenever
       its toolbars are showing, which cut the bottom of the slide off. */
    height: auto;

    background: #1f1f1f;
    border-radius: 0;
    padding: 0;
}

.deck-editor-stage.is-presenting .deck-slide.is-active {
    max-width: min(94vw, calc(94vh * var(--deck-ratio-num, 1.777778)));
    max-width: min(94vw, calc(94dvh * var(--deck-ratio-num, 1.777778)));
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.deck-editor-stage.is-presenting .deck-present-hotzone {
    display: block;

    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1;

    height: 80px;
}

.deck-present-exit {
    position: absolute;
    top: 20px;
    right: 20px;

    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(255, 255, 255, 0.14);
    border: none;
    border-radius: 50%;

    color: #ffffff;

    opacity: 0;
    pointer-events: none;
    cursor: pointer;
    transition: opacity 0.15s ease, background 0.15s ease;
}

.deck-present-exit svg {
    width: 18px;
    height: 18px;
}

.deck-present-exit:hover {
    background: rgba(255, 255, 255, 0.24);
}

.deck-editor-stage.is-presenting .deck-present-hotzone:hover .deck-present-exit {
    opacity: 1;
    pointer-events: auto;
}

/* ---------- Deck editor: layer panel ---------- */
/* A Pinterest-style stack of every element on the active slide (text,
   shape, image), front-most on top, with drag-to-reorder and a locked
   "Background" row pinned at the bottom. Same width/scroll treatment as
   .deck-editor-rail above so the three-column layout (rail/stage/panel)
   reads as one family. */

.deck-editor-layer-panel {
    width: 230px;
    flex-shrink: 0;

    display: flex;
    flex-direction: column;
    gap: 10px;

    max-height: calc(100vh - 220px);
}

.deck-layer-panel-header h2 {
    margin: 0 0 2px;
    font-size: 15px;
    font-weight: 800;
    color: #1f1f1f;
}

.deck-layer-panel-header p {
    margin: 0;
    font-size: 12px;
    color: #9a9a9a;
}

.deck-layer-list {
    display: flex;
    flex-direction: column;
    gap: 6px;

    padding-right: 4px;
    overflow-y: auto;
}

.deck-layer-empty-hint {
    padding: 14px 4px;
    font-size: 12px;
    color: #9a9a9a;
}

.deck-layer-row {
    position: relative;

    display: flex;
    align-items: center;
    gap: 10px;

    width: 100%;
    padding: 6px 10px 6px 6px;

    background: none;
    border: 1px solid transparent;
    border-radius: 12px;

    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.deck-layer-row:hover {
    background: #f7f7f5;
}

.deck-layer-row.is-selected {
    background: #f3f3f2;
    border-color: #ddddda;
}

.deck-layer-row-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    width: 20px;
    height: 32px;

    color: #b8b8b4;
    cursor: grab;
}

.deck-layer-row-handle svg {
    width: 14px;
    height: 14px;
}

.deck-layer-thumb {
    position: relative;
    flex-shrink: 0;

    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;

    background: #f3f3f2;
    border-radius: 8px;
}

/* The locked "Background" row's own swatch (deck editor and blank
   collage alike) is the one layer thumb whose fill is an arbitrary
   user-chosen colour, painted straight onto it as an inline background
   by JS (syncDeckLayerBackgroundThumb / applyCollageBackgroundVisually).
   A white or near-white background therefore rendered as an invisible
   square that just merged into the panel behind it. An inset ring rather
   than a real border: it draws inside the existing 36x36 box (no layout
   shift, no box-sizing dependency) and follows the same border-radius,
   and being inset it sits on top of the inline background rather than
   being overwritten by it. */
#deckLayerBackgroundThumb,
#collageLayerBackgroundThumb {
    box-shadow: inset 0 0 0 1px #d8d8d4;
}

.deck-layer-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.deck-layer-thumb-text {
    font-size: 8px;
    line-height: 1.15;
    font-weight: 700;
    text-align: center;
    padding: 2px;
    overflow: hidden;
}

.deck-layer-thumb-shape {
    width: 22px;
    height: 22px;
    box-sizing: border-box;
    border: 1px solid transparent;
}

.deck-layer-thumb-shape-circle,
.deck-layer-thumb-shape-oval {
    border-radius: 50%;
}

.deck-layer-thumb-shape svg {
    width: 100%;
    height: 100%;
}

.deck-layer-row-label {
    flex: 1;
    min-width: 0;

    font-size: 13px;
    font-weight: 600;
    color: #1f1f1f;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.deck-layer-row-menu-toggle {
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;

    background: none;
    border: none;
    border-radius: 8px;

    color: #9a9a9a;
    cursor: pointer;
}

.deck-layer-row-menu-toggle:hover {
    background: #ececea;
    color: #1f1f1f;
}

.deck-layer-row-locked {
    cursor: pointer;
}

.deck-layer-row-locked .deck-layer-thumb {
    background-image: radial-gradient(#cfcfcb 1px, transparent 1px);
    background-size: 7px 7px;
}

.deck-layer-row-lock {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 20px;
    color: #9a9a9a;
}

.deck-layer-row-lock svg {
    width: 15px;
    height: 15px;
}

.deck-layer-row.sortable-ghost {
    opacity: 0.4;
}

.deck-layer-row.sortable-chosen {
    background: #f3f3f2;
}

@media (max-width: 900px) {
    .deck-editor-page {
        padding-left: 20px;
        padding-right: 20px;
    }

    .deck-editor-topbar {
        flex-wrap: wrap;
    }

    .deck-editor-body {
        flex-direction: column;
    }

    .deck-editor-rail {
        width: 100%;
        flex-direction: row;

        max-height: none;
        padding-right: 0;
        padding-bottom: 4px;

        overflow-x: auto;
        overflow-y: visible;
    }

    .deck-slide-thumb {
        flex: 0 0 120px;
    }

    .deck-editor-stage {
        height: auto;
        min-height: 260px;
        padding: 20px;
    }

    .deck-slide {
        max-width: 100%;
    }

    .deck-editor-layer-panel {
        width: 100%;
        max-height: none;
    }

    .deck-layer-list {
        max-height: 260px;
    }
}

@media (max-width: 560px) {
    .deck-editor-page {
        padding-left: 14px;
        padding-right: 14px;
    }

    .deck-editor-topbar {
        gap: 12px;
    }

    .deck-editor-title {
        font-size: 17px;
    }

    .deck-present-button span {
        display: none;
    }
}

/* =========================================================
   DECKD SLIDE EDITING RIBBON + ELEMENTS — 2026-07-13
   PowerPoint/Canva-inspired top ribbon for adding/formatting text
   boxes and shapes on top of a slide. Elements are positioned as
   percentages of the slide so they scale at any slide size.
   Greys only, matching the rest of the deck feature.
   ========================================================= */

/* Two stacked rows instead of one long wrapping strip: a fixed top row
   for tools that are always available (undo/redo, insert), and a
   second contextual row underneath for whatever applies to the
   current selection (format controls, effects, align/layer/delete) -
   same split PowerPoint/Canva/Slides all use, so the ribbon reads as
   "insert" vs. "format this" instead of one big mixed bag that
   reflows unpredictably. Never overflow-hidden/scroll on either row -
   every dropdown here (colour pickers, font list, layouts, effects)
   is an absolutely-positioned popover anchored to a button inside it,
   and clipping/scrolling the row would clip those open menus too. */
.deck-editor-ribbon {
    display: flex;
    flex-direction: column;

    margin-bottom: 18px;

    background: #ffffff;
    border: 1px solid #e5e5e3;
    border-radius: 14px;
}

.ribbon-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;

    padding: 10px 14px;
}

/* Matches the tools row's own control height (32px + this padding) so
   the ribbon doesn't visibly grow/shrink switching between "nothing
   selected" (just the empty-hint text) and an active selection (a
   full row of 32px controls). */
.ribbon-row-context {
    min-height: 52px;

    background: #fafaf9;
    border-top: 1px solid #ececea;
    border-radius: 0 0 14px 14px;
}

/* Freehand drawing mode (enterDeckDrawMode/exitDeckDrawMode in
   deck_detail.html) - a third ribbon row, hidden by default and swapped
   in for just .ribbon-row-context (its own element-style controls are
   meaningless mid-drawing, nothing can be selected) while active, via
   #deckRibbon's own is-draw-mode class. .ribbon-row-tools (Undo/Redo,
   Add slide, Text/Image/Draw/Favourites/Shape...) stays visible on
   purpose - hiding the whole ribbon read as the tool having vanished,
   not switched modes. !important on both sides of the swap avoids any
   specificity fight with the plain .ribbon-row{display:flex} rule above. */
.ribbon-row-draw {
    display: none !important;

    background: #fafaf9;
    border-top: 1px solid #ececea;
    border-radius: 0 0 14px 14px;
}

.deck-editor-ribbon.is-draw-mode .ribbon-row-draw {
    display: flex !important;
}

.deck-editor-ribbon.is-draw-mode .ribbon-row-context {
    display: none !important;
}

.ribbon-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ribbon-group-right {
    display: none;
    margin-left: auto;
}

.ribbon-group-right.is-visible {
    display: flex;
}

.ribbon-group-effects {
    display: none;
}

.ribbon-group-effects.is-visible {
    display: flex;
}

.ribbon-divider {
    width: 1px;
    height: 26px;
    flex-shrink: 0;

    background: #e5e5e3;
}

.ribbon-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 8px 12px;

    background: #f3f3f2;
    border: 1px solid transparent;
    border-radius: 10px;

    color: #1f1f1f;

    font-family: inherit;
    font-size: 13px;
    font-weight: 700;

    cursor: pointer;
    transition: background 0.15s ease;
}

.ribbon-button:hover {
    background: #e9e9e6;
}

.ribbon-button svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.ribbon-text-icon {
    width: 16px;

    font-size: 14px;
    font-weight: 800;
    text-align: center;
}

.ribbon-dropdown {
    position: relative;
}

.ribbon-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    /* Beats .slide-selection-overlay's z-index: 1000 (style.css, "Slide
       elements" section) - none of this menu's ancestors up to <body>
       set their own position+z-index/transform, so it competes with the
       overlay directly in the SAME root stacking context (same reasoning
       as .ribbon-custom-picker-menu's own z-index just above). Without
       this, a selected element's outline/handles paint over any open
       ribbon dropdown instead of the other way around. */
    z-index: 2000;

    min-width: 150px;
    padding: 6px;

    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.12);
}

.ribbon-dropdown-menu.is-open {
    display: block;
}

/* The layer-order dropdown sits near the ribbon's right edge — anchoring
   its menu to the left (the default) would push it off past the edge of
   the ribbon/viewport, so it hangs from the right edge of its button
   instead. */
.ribbon-dropdown-menu-right {
    left: auto;
    right: 0;
}

/* Deck layer row "..." menu: pinned to the viewport rather than its
   button, so the scrolling layer list can't clip it - top/left are set
   by positionDeckLayerRowMenu in deck_detail.html when it opens. */
.ribbon-dropdown-menu.deck-layer-row-menu {
    position: fixed;
    right: auto;
    bottom: auto;
    z-index: 3000;
}

.ribbon-dropdown-option {
    display: flex;
    align-items: center;
    gap: 10px;

    width: 100%;
    padding: 8px 10px;

    background: none;
    border: none;
    border-radius: 8px;

    color: #1f1f1f;

    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    text-align: left;

    cursor: pointer;
}

.ribbon-dropdown-option:hover {
    background: #f3f3f2;
}

.ribbon-dropdown-option:disabled {
    background: none;
    color: #b5b5b1;
    cursor: not-allowed;
}

.ribbon-dropdown-option svg {
    width: 16px;
    height: 16px;
}

/* Trailing "opens a submenu" indicator (see deckAddSlideMenuLayouts) -
   pushed flush right within the option's own flex row, de-emphasised
   relative to the option's leading icon/label. */
.ribbon-dropdown-option-chevron {
    margin-left: auto;
    color: #b5b5b1;
    flex-shrink: 0;
}

/* Shared by the ribbon's "Add a slide" button and the thumbnail rail's own
   "+" tile (see openDeckAddSlideMenu) — position: fixed rather than the
   .ribbon-dropdown-menu default of absolute-relative-to-its-button, since
   the rail trigger sits inside a scrolling container that would otherwise
   clip an absolutely-positioned menu. JS sets top/left to match whichever
   trigger opened it. */
.deck-add-slide-menu {
    position: fixed;
    top: auto;
    left: auto;
}

/* This menu's own deckdFlyIn open animation (deckd_modals.css) leaves a
   non-none transform on it via animation-fill-mode: both, which per
   spec makes it the containing block for position:fixed descendants
   for as long as it stays open - breaking the Layouts flyout it hosts
   (deckAddSlideMenuLayouts), which is JS-positioned relative to the
   true viewport as a flyout beside this menu. Same fix/reasoning as
   .ribbon-color-menu.is-open above. */
.deck-add-slide-menu.is-open {
    transform: none !important;
}

.ribbon-weight-option {
    justify-content: center;
}

.ribbon-weight-preview {
    width: 40px;
    flex-shrink: 0;

    background: #1f1f1f;
    border-radius: 999px;
}

.ribbon-group-text,
.ribbon-group-shape,
.ribbon-group-image,
.ribbon-group-type-switch {
    display: none;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ribbon-group-text.is-visible,
.ribbon-group-shape.is-visible,
.ribbon-group-image.is-visible,
.ribbon-group-type-switch.is-visible {
    display: flex;
}

/* Bold/italic/underline/strikethrough only mean something with a live
   text-editing caret in a single focused element — meaningless for a
   batch edit across a marquee group, so they're hidden rather than left
   visible-but-inert while editing a group's text as a whole. */
.ribbon-group-text.is-group-editing .ribbon-run-format,
.ribbon-group-text.is-group-editing .ribbon-run-format + .ribbon-divider {
    display: none;
}

.ribbon-image-hint {
    color: #9a9a9a;
    font-size: 12px;
}

/* Only meaningful for the line shape (a rectangle/circle's "thickness" is
   just its height, adjusted via the normal resize handles instead). */
#ribbonLineWeightControl {
    display: none;
}

#ribbonLineWeightControl.is-visible {
    display: flex;
}

.ribbon-select {
    height: 32px;
    padding: 0 28px 0 12px;

    background: #f3f3f2 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f1f1f' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center/14px 14px;
    border: 1px solid #e2e2df;
    border-radius: 10px;

    color: #1f1f1f;

    font-family: inherit;
    font-size: 13px;
    font-weight: 600;

    cursor: pointer;

    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ribbon-select:hover {
    background-color: #ececea;
    border-color: #d0d0cc;
}

.ribbon-select:focus {
    outline: none;
    border-color: #1f1f1f;
}

/* The real font <select> (see deck_detail.html) stays in the DOM purely
   as a value-holder every other script reads/writes and listens to for
   'change' — visually replaced by .ribbon-font-dropdown below it, so it's
   hidden without display:none (which would make some browsers skip firing
   events on a programmatic .value change) or visibility:hidden (which
   would still occupy layout space). */
.ribbon-select-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ribbon-font-dropdown {
    display: inline-flex;
}

.ribbon-font-toggle {
    display: flex;
    align-items: center;

    max-width: 160px;
}

.ribbon-font-toggle-label {
    overflow: hidden;

    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Constrained to a handful of rows (rather than the native <select>
   popup's browser-controlled, unstyleable height) and scrollable, so
   picking a font doesn't blow past the bottom of the screen — the whole
   point of replacing the native control. */
.ribbon-font-menu {
    max-height: 260px;
    min-width: 190px;

    overflow-y: auto;
}

.ribbon-font-option {
    font-weight: 400;
    font-size: 14px;

    /* Each option renders in its own font-family (set inline per-button
       in the template) so picking one previews it directly, rather than
       every row reading in the same generic UI font. */
}

.ribbon-font-option.is-selected {
    background: #f3f3f2;
    font-weight: 700;
}

.ribbon-stepper {
    display: flex;
    align-items: center;

    background: #f3f3f2;
    border: 1px solid #e5e5e3;
    border-radius: 10px;

    overflow: hidden;
}

.ribbon-stepper-button {
    width: 26px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: none;
    border: none;

    color: #1f1f1f;

    font-size: 15px;
    font-weight: 700;

    cursor: pointer;
}

.ribbon-stepper-button:hover {
    background: #e9e9e6;
}

.ribbon-number {
    width: 42px;
    height: 32px;

    border: none;
    border-left: 1px solid #e5e5e3;
    border-right: 1px solid #e5e5e3;

    background: #ffffff;
    color: #1f1f1f;

    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.ribbon-zoom-label {
    min-width: 42px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0 4px;
    border-left: 1px solid #e5e5e3;
    border-right: 1px solid #e5e5e3;

    background: #ffffff;
    color: #1f1f1f;

    font-size: 13px;
    font-weight: 700;
}

.ribbon-color-swatch {
    width: 32px;
    height: 32px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f3f3f2;
    border: 1px solid #e5e5e3;
    border-radius: 10px;

    overflow: hidden;

    cursor: pointer;
}

/* Native <input type="color"> normally renders with its own inset border
   and padding around the swatch, leaving a visible ring of the button's
   own background showing through. Strip that browser chrome so the swatch
   fills the button fully with the actual colour. */
.ribbon-color-swatch input[type="color"] {
    -webkit-appearance: none;
    appearance: none;

    width: 100%;
    height: 100%;

    padding: 0;
    border: none;

    cursor: pointer;
}

.ribbon-color-swatch input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
}

.ribbon-color-swatch input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 8px;
}

.ribbon-color-swatch input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: 8px;
}

/* Fill/outline swatch buttons: an icon (which colour this is) with a thin
   coloured bar along the bottom showing the current value — distinguishes
   the two at a glance without needing two identical-looking colour chips. */
.ribbon-color-swatch-button {
    position: relative;
    width: 32px;
    height: 32px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f3f3f2;
    border: 1px solid #e5e5e3;
    border-radius: 10px;

    color: #1f1f1f;
    cursor: pointer;
}

.ribbon-color-swatch-button:hover {
    background: #e9e9e6;
}

.ribbon-color-swatch-icon {
    width: 16px;
    height: 16px;
}

.ribbon-color-swatch-bar {
    position: absolute;
    left: 6px;
    right: 6px;
    bottom: 5px;
    height: 3px;

    background: #dddddd;
    border-radius: 999px;
}

.ribbon-color-swatch-bar.is-none {
    background-image: repeating-linear-gradient(45deg, #b5b5b1 0, #b5b5b1 2px, transparent 2px, transparent 4px);
}

/* Icon-only grid (no text labels) — with 12 shape options now, a vertical
   list of labelled rows would make for an unwieldy-tall dropdown, so this
   packs them into a compact 3-column grid instead, same pattern as the
   colour swatch grid. Each icon's title attribute stands in for the label. */
.ribbon-shape-menu {
    width: 168px;
    padding: 8px;
}

.ribbon-shape-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.ribbon-shape-option {
    width: 100%;
    aspect-ratio: 1;

    display: flex;
    align-items: center;
    justify-content: center;

    background: none;
    border: none;
    border-radius: 8px;

    color: #1f1f1f;

    cursor: pointer;
}

.ribbon-shape-option:hover {
    background: #f3f3f2;
}

.ribbon-shape-option svg {
    width: 18px;
    height: 18px;
}

/* Favourites dropdown (see FavouriteCutout in models.py) - a grid of
   thumbnail cards rather than .ribbon-shape-grid's plain icon buttons,
   since each entry is a user's own photo rather than a fixed shape, plus
   its own remove control - same "wrapper div + two independent buttons"
   structure as .collage-favourite-card in the collage editor's product
   panel (see that class's own comment). */
/* Width is derived from the grid below rather than picked freely: three
   fixed 74px cards + two 6px gaps (234) + the grid's own 5px side
   padding (10) + a reserved ~15px scrollbar gutter + this menu's 8px
   padding (16). */
.ribbon-favourite-menu {
    width: 276px;
    padding: 8px;
}

.ribbon-favourite-grid {
    display: grid;
    /* Fixed-width columns, not 1fr: each card is square (aspect-ratio: 1
       below), so a fluid column would make the ROW height depend on
       whether a scrollbar is currently taking width - and the whole
       point of the max-height here is to cut the list at exactly three
       rows, which needs a row height that doesn't move. */
    grid-template-columns: repeat(3, 74px);
    justify-content: center;
    gap: 6px;

    box-sizing: border-box;
    /* Room for .ribbon-favourite-remove, which hangs 4px outside its own
       card's top/right corner. Without it that overhang counted as
       overflow, and since a box with overflow-y: auto computes its
       other axis to auto too (rather than leaving it visible), it put a
       permanent horizontal scrollbar along the bottom of this menu. */
    padding: 5px;

    /* Exactly three rows: 3 x 74 card + 2 x 6 gap + 2 x 5 padding. */
    max-height: 244px;
    overflow-y: auto;
    overflow-x: hidden;
    /* Keeps the gutter reserved whether or not it's currently scrolling,
       so opening/adding never shifts the cards sideways. */
    scrollbar-gutter: stable;
}

.ribbon-favourite-card {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
}

.ribbon-favourite-insert {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;

    border: none;
    border-radius: 8px;
    background: #f3f3f2;
    overflow: hidden;

    cursor: pointer;
}

.ribbon-favourite-insert:hover {
    background: #e9e9e6;
}

.ribbon-favourite-insert img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.ribbon-favourite-remove {
    position: absolute;
    top: -4px;
    right: -4px;
    z-index: 1;

    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;

    border: none;
    border-radius: 999px;
    background: rgba(17, 17, 17, 0.6);

    color: #ffffff;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;

    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}

.ribbon-favourite-card:hover .ribbon-favourite-remove,
.ribbon-favourite-remove:focus-visible {
    opacity: 1;
    visibility: visible;
}

.ribbon-favourite-remove:hover {
    background: rgba(17, 17, 17, 0.85);
}

.ribbon-favourite-empty {
    grid-column: 1 / -1;

    padding: 14px 4px;

    color: #9a9a9a;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

.ribbon-layout-menu {
    width: 320px;
    padding: 0;

    /* Clips .ribbon-layout-menu-scroll's own scrollbar to these rounded
       corners - overflow-y living on this element directly instead
       would let the scrollbar's straight track cut across them. */
    overflow: hidden;
}

.ribbon-layout-menu-scroll {
    padding: 10px;

    /* Baseline cap for however tall the preset grid naturally is -
       always opened as a flyout now (see deckAddSlideMenuLayouts),
       which also sets an inline max-height bounded by the actual space
       below its anchor; this is just the ceiling for when that space
       is generous. */
    max-height: 420px;
    overflow-y: auto;
}

.ribbon-layout-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.ribbon-layout-option {
    display: flex;
    flex-direction: column;
    gap: 6px;

    padding: 8px;

    background: none;
    border: 1px solid #e5e5e3;
    border-radius: 10px;

    cursor: pointer;
}

.ribbon-layout-option:hover {
    background: #f3f3f2;
    border-color: #d8d8d4;
}

.ribbon-layout-preview {
    position: relative;

    width: 100%;
    aspect-ratio: var(--deck-ratio, 16 / 9);

    background: #fbfbfa;
    border-radius: 4px;
    overflow: hidden;
}

.ribbon-layout-preview-block {
    position: absolute;

    background: #c7c7c2;
    border-radius: 1px;
}

.ribbon-layout-preview-block-shape {
    background: #dcdcd8;
}

.ribbon-layout-option-label {
    color: #1f1f1f;

    font-size: 11px;
    font-weight: 700;
    text-align: left;
}

.ribbon-color-menu {
    width: 296px;
    padding: 0;
    border-radius: 18px;

    /* Clips .ribbon-color-menu-scroll's own scrollbar to these rounded
       corners - same reasoning as .ribbon-layout-menu. */
    overflow: hidden;
}

/* Widened to match .ribbon-layout-menu's own 320px exactly (and its
   scroll wrapper's 10px padding, just below) - this is the one
   .ribbon-color-menu that lays out .ribbon-pattern-option tiles rather
   than plain colour swatches, and those are meant to come out the same
   size as the Layouts flyout's own preview tiles. */
#ribbonSlideBgDesignsMenu {
    width: 320px;
}

#ribbonSlideBgDesignsMenu .ribbon-color-menu-scroll {
    padding: 10px;
}

/* .ribbon-dropdown-menu.is-open (deckd_modals.css) plays a "fly in"
   entrance animation whose end state sets transform: translateY(0)
   scale(1) with animation-fill-mode: both - not literally `none`, so
   per spec it still becomes the containing block for any
   position:fixed descendant for as long as this menu stays open. That
   breaks the custom colour picker (_ribbon_custom_color_picker.html),
   which is deliberately position:fixed and JS-positioned relative to
   the true viewport as a flyout beside this menu (same idea as the
   "Add a slide" menu's own Layouts flyout - see the matching override
   on .deck-add-slide-menu below). Neutralising the transform here
   only drops this menu's own subtle scale/lift on open; the fade
   still plays. .ribbon-effects-menu needs the same treatment since
   the Shadow/Gradient colour dropdowns (and so their own custom
   picker) sit nested inside it. */
.ribbon-color-menu.is-open,
.ribbon-effects-menu.is-open {
    transform: none !important;
}

/* Scrolls internally once the (now much larger, see
   _ribbon_color_swatches.html) preset grid plus whatever else a given
   dropdown adds - patterns/gradients/recently used/custom - runs
   taller than a reasonable popover height. A static vh cap rather than
   the Layouts flyout's JS-computed one: these open via the ordinary
   .ribbon-dropdown toggle (anchored under their button via plain CSS),
   not a custom fixed-position flyout, so there's no anchor rect to
   measure space against here. */
.ribbon-color-menu-scroll {
    max-height: 60vh;
    padding: 14px;
    overflow-y: auto;
}

.ribbon-color-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.ribbon-color-option {
    width: 24px;
    height: 24px;
    padding: 0;

    background: none;
    /* Strong enough that the white swatch (first cell of the shared
       palette - see _ribbon_color_swatches.html) still reads as a
       distinct circle against this menu's own white background, rather
       than disappearing into it. Still light enough to stay a hairline
       on the saturated swatches. */
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 50%;

    cursor: pointer;
    transition: transform 0.1s ease;
}

.ribbon-color-option:hover {
    transform: scale(1.15);
}

/* "No fill"/"No outline" - a plain white circle with a red ring reads
   as "empty/off" at a glance, same visual language as a camera app's
   "no flash" icon, instead of the diagonal-stripe swatch pattern this
   used before. */
.ribbon-color-option-none {
    background: #ffffff;
    border: 2px solid #e63946;
}

/* "Background designs" (Patterns + Photo masonry, see
   ribbonSlideBgDesignsMenu in deck_detail.html) - sized and laid out
   exactly like the "Layouts" flyout's own preview tiles
   (.ribbon-layout-option/-preview/-grid above) instead of the plain
   colour swatches' small circles: a pattern or masonry choice is hard
   to read at a 24px dot, the same way a slide layout would be. Reuses
   .ribbon-color-option for JS click delegation
   (data-pattern-type/data-color) and .ribbon-layout-grid for the
   2-column layout - this class only supplies the option card's own
   look, overriding .ribbon-color-option's circular-swatch defaults
   (declared later in the file, so it wins the tie on shared
   properties). The actual pattern/icon preview lives on a nested
   .ribbon-pattern-option-preview span rather than the button's own
   background, mirroring .ribbon-layout-preview being nested inside
   .ribbon-layout-option rather than styling that button directly. */
.ribbon-pattern-option {
    display: flex;
    flex-direction: column;
    gap: 6px;

    width: auto;
    height: auto;
    padding: 8px;

    background: none;
    border: 1px solid #e5e5e3;
    border-radius: 10px;

    cursor: pointer;
    transition: none;
}

.ribbon-pattern-option:hover {
    background: #f3f3f2;
    border-color: #d8d8d4;
    transform: none;
}

.ribbon-pattern-option-preview {
    position: relative;

    width: 100%;
    aspect-ratio: 16 / 9;

    background: #fbfbfa;
    border: 1px solid #e5e5e3;
    border-radius: 4px;
    overflow: hidden;
}

/* Masonry isn't a real CSS colour to preview as a background fill, so
   its preview box gets a fake 4-column staggered grid of grey blocks
   (see the inline flex ratios in deck_detail.html) instead of a plain
   background swatch - same idea as the real thing
   (.deck-title-slide-bg) but with plain tiles standing in for board
   photos. */
.ribbon-pattern-option-preview-masonry {
    display: flex;
    gap: 2px;
    padding: 3px;
}

.ribbon-masonry-preview-col {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
}

.ribbon-masonry-preview-col i {
    display: block;

    background: #e2e2de;
    border-radius: 1px;
    font-style: normal;
}

.ribbon-color-section-label,
.ribbon-color-recent-label {
    margin: 12px 0 8px;

    color: #8a8a86;

    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ribbon-color-section-label:first-child,
.ribbon-color-recent-label:first-child {
    margin-top: 0;
}

.ribbon-color-recent.is-empty {
    display: flex;
}

.ribbon-color-recent.is-empty::after {
    content: 'None yet';

    color: #b5b5b1;

    font-size: 11px;
    font-weight: 600;
}

/* Used as both a <label> (the 4 small utility rows - Pattern/Backing/
   Gradient 1/Gradient 2 colours - each still just a native colour
   input) and a <button> (the "Custom colour" row itself, which now
   opens the rich picker below via _ribbon_custom_color_picker.html) -
   the width/border/font resets only matter for the button case, but
   are harmless no-ops on a label. */
.ribbon-color-custom {
    display: flex;
    align-items: center;
    gap: 10px;

    width: 100%;
    margin-top: 12px;
    padding: 8px;

    background: #f3f3f2;
    border: none;
    border-radius: 12px;

    color: #1f1f1f;

    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    text-align: left;

    cursor: pointer;
}

.ribbon-color-custom-button {
    width: 100%;
    border: none;
    font-family: inherit;
    text-align: left;
}

.ribbon-color-custom input[type="color"] {
    -webkit-appearance: none;
    appearance: none;

    width: 28px;
    height: 28px;
    flex-shrink: 0;

    padding: 0;
    border: none;

    cursor: pointer;
}

.ribbon-color-custom input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 50%;
    overflow: hidden;
}

.ribbon-color-custom input[type="color"]::-webkit-color-swatch {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 50%;
}

.ribbon-color-custom input[type="color"]::-moz-color-swatch {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 50%;
}

/* The "Custom colour" row's own hex readout (see deckAddSlideMenuLayouts-
   style sibling id convention: #ribbon<Key>ColorCustomHex) - a bordered
   box standing in for the plain "Custom colour" text label, so the
   swatch's actual current value is always visible rather than a static
   caption. Read-only by design: the native colour input beside it (and
   its own rich system picker) is still the one way to change it, this
   just mirrors that value back as text. */
.ribbon-color-custom-hex {
    flex: 1;

    padding: 7px 10px;

    background: #ffffff;
    border: 1px solid #d8d8d4;
    border-radius: 8px;

    color: #1f1f1f;

    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* The "Custom colour" row's trigger swatch chip (see
   _ribbon_custom_color_picker.html) - a plain span, not the native
   colour input's own swatch, since that input is hidden now and this
   button opens the rich picker below instead of the OS one directly.
   Always shows a fixed rainbow ring around a white centre with a thin
   black "+" (rather than mirroring the current colour, which the hex
   readout beside it already does) so it reads as an "add your own
   colour" affordance instead of a plain swatch.

   The ring itself is a nested .ribbon-color-custom-swatch-ring, not
   this element's own background: painting a conic-gradient directly at
   28px left faint seams at each colour stop (most visible right at the
   outer edge, since the ring is clipped down to ~3px wide) because the
   gradient was being rasterised at final size. Rendering that same
   gradient at 3x size and scaling it back down with `transform`
   forces the browser to anti-alias across the seams instead of
   rasterising them at native (visible) size - the overflow: hidden
   below is what then clips it back down to the actual 28px circle. The
   white centre is a second background layer on that *same* element
   (painted on top of the conic-gradient, both baked into one image
   before the transform scales it down) rather than a separately
   inset ::before - two independently-positioned layers could each
   round to the nearest device pixel differently and drift a fraction
   of a pixel apart, which is what read as the white centre looking
   slightly off to one side. ::after draws the "+" as two thin bars
   over both, rather than a font glyph. The outer ring is a box-shadow
   rather than a border, since a 1px border on a circle this small can
   itself facet rather than reading as a clean curve. */
.ribbon-color-custom-swatch {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;

    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.ribbon-color-custom-swatch-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    transform: translate(-50%, -50%) scale(0.3334);

    background:
        radial-gradient(circle at center, #ffffff 32.5px, transparent 33px),
        conic-gradient(
            from 180deg,
            hsl(0, 85%, 65%), hsl(30, 85%, 65%), hsl(60, 85%, 65%), hsl(90, 85%, 65%),
            hsl(120, 85%, 65%), hsl(150, 85%, 65%), hsl(180, 85%, 65%), hsl(210, 85%, 65%),
            hsl(240, 85%, 65%), hsl(270, 85%, 65%), hsl(300, 85%, 65%), hsl(330, 85%, 65%),
            hsl(360, 85%, 65%)
        );
}

.ribbon-color-custom-swatch::after {
    content: '';

    position: absolute;
    inset: 0;
    z-index: 2;

    background:
        linear-gradient(#1f1f1f, #1f1f1f) center / 1.5px 11px no-repeat,
        linear-gradient(#1f1f1f, #1f1f1f) center / 11px 1.5px no-repeat;
}

/* =========================================================
   Custom colour picker (saturation/value square, hue slider,
   hex field, eyedropper) - see setupCustomColorPicker in
   deck_detail.html.
   ========================================================= */

.ribbon-custom-picker-dropdown {
    position: relative;
    flex: 1;
    min-width: 0;
}

.ribbon-custom-picker-menu {
    /* Beats .slide-selection-overlay's z-index: 1000 (style.css, "Slide
       elements" section) - once opened, this menu is reparented straight
       to <body> (see setupCustomColorPicker), same as the selection
       overlay's own ancestor chain up to <body> has no position/
       transform of its own, so both compete directly at the SAME root
       stacking context: without this, the base .ribbon-dropdown-menu
       z-index: 50 loses to the overlay's 1000 outright, letting a
       selected element's outline/handles paint over this picker instead
       of the other way around. */
    z-index: 2000;

    width: 220px;
    padding: 14px;
    border-radius: 16px;
}

.ribbon-custom-picker-sv {
    position: relative;

    width: 100%;
    height: 130px;
    margin-bottom: 12px;

    border-radius: 10px;
    /* Hue itself is set inline (background-color) by JS - these two
       layers give the standard saturation (white->transparent,
       left->right) / value (black->transparent, bottom->top) picking
       surface on top of it. */
    background-image:
        linear-gradient(to top, #000000, transparent),
        linear-gradient(to right, #ffffff, transparent);

    cursor: crosshair;
    touch-action: none;
}

.ribbon-custom-picker-sv-handle {
    position: absolute;
    left: 0;
    top: 0;
    width: 16px;
    height: 16px;

    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 1px 4px rgba(0, 0, 0, 0.3);

    transform: translate(-50%, -50%);
    pointer-events: none;
}

.ribbon-custom-picker-hue {
    position: relative;

    width: 100%;
    height: 14px;
    margin-bottom: 12px;

    border-radius: 999px;
    background: linear-gradient(
        to right,
        #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000
    );

    cursor: pointer;
    touch-action: none;
}

.ribbon-custom-picker-hue-handle {
    position: absolute;
    left: 0;
    top: 50%;
    width: 18px;
    height: 18px;

    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 1px 4px rgba(0, 0, 0, 0.3);

    transform: translate(-50%, -50%);
    pointer-events: none;
}

.ribbon-custom-picker-hex-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ribbon-custom-picker-hex-input {
    flex: 1;
    min-width: 0;

    padding: 7px 10px;

    background: #f3f3f2;
    border: 1px solid #e2e2df;
    border-radius: 8px;

    color: #1f1f1f;

    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.ribbon-custom-picker-hex-input:focus {
    outline: none;
    border-color: #1f1f1f;
}

.ribbon-custom-picker-eyedropper {
    width: 32px;
    height: 32px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f3f3f2;
    border: 1px solid #e2e2df;
    border-radius: 8px;

    color: #1f1f1f;

    cursor: pointer;
}

.ribbon-custom-picker-eyedropper svg {
    width: 15px;
    height: 15px;
}

.ribbon-custom-picker-eyedropper:hover {
    background: #ececea;
}

.ribbon-custom-picker-eyedropper:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ribbon-outline-weight-row {
    display: flex;
    gap: 6px;
}

.ribbon-outline-weight-option {
    flex: 1 1 0;
    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f3f3f2;
    border: none;
    border-radius: 8px;

    cursor: pointer;
}

.ribbon-outline-weight-option:hover {
    background: #e9e9e6;
}

.ribbon-outline-weight-option .ribbon-weight-preview {
    width: 20px;
}

.ribbon-effects-menu {
    width: 220px;
    padding: 10px;
    border-radius: 16px;
}

.ribbon-effects-row {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 4px 2px;

    color: #1f1f1f;
    font-size: 12px;
    font-weight: 700;
}

/* Pattern/backing colour (deck_detail.html's "Background designs" menu) -
   two .ribbon-effects-row lines side by side instead of stacked, so each
   only needs to claim half the width. */
.ribbon-pattern-backing-colors {
    display: flex;
    gap: 16px;
}

.ribbon-pattern-backing-colors .ribbon-effects-row {
    flex: 1 1 0;
    min-width: 0;
    padding: 4px 0;
}

/* Pattern/backing colour's own palette menu opens INLINE - expanding the
   "Background designs" panel's own flow (pushing Masonry/Image below it
   down) rather than floating as a detached popover like every other
   .ribbon-color-menu. position:static drops it out of the absolute-
   positioned overlay behaviour entirely so display:block (.is-open, see
   the shared .ribbon-dropdown-menu rule) just reveals it in place; width
   overrides the shared 296px fixed width to fill its own wrapper instead. */
.ribbon-color-menu-inline {
    position: static;
    width: 100%;
    margin-top: 8px;
}

.ribbon-effects-row-label {
    width: 56px;
    flex-shrink: 0;
}

.ribbon-effects-row-value {
    width: 34px;
    flex-shrink: 0;
    text-align: right;
    font-weight: 400;
}

.ribbon-effects-row input[type="range"] {
    flex: 1 1 auto;
    width: 0;
    accent-color: #1f1f1f;
}

.ribbon-effects-toggle-row {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 4px 2px;

    color: #1f1f1f;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.ribbon-effects-subrows {
    display: none;
    flex-direction: column;
    gap: 6px;

    margin: 4px 0 8px;
    padding: 8px;

    background: #f3f3f2;
    border-radius: 10px;
}

.ribbon-effects-subrows.is-visible {
    display: flex;
}

.ribbon-effects-subrows .ribbon-color-dropdown {
    align-self: flex-start;
}

.ribbon-icon-button {
    width: 32px;
    height: 32px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f3f3f2;
    border: 1px solid transparent;
    border-radius: 10px;

    color: #1f1f1f;

    font-family: inherit;
    font-size: 14px;
    font-weight: 800;

    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.ribbon-icon-button svg {
    width: 16px;
    height: 16px;
}

.ribbon-icon-button:hover {
    background: #e9e9e6;
}

/* The B/I/U/S glyph buttons read as visually heavier than the rest of the
   ribbon's line-icon buttons (bold text on top of an already-800-weight
   button face) — trim both down a notch. */
#ribbonBold,
#ribbonItalic,
#ribbonUnderline,
#ribbonStrikethrough {
    font-size: 13px;
    font-weight: 600;
}

#ribbonBold b {
    font-weight: 700;
}

.ribbon-icon-button.is-active {
    background: #1f1f1f;
    color: #ffffff;
}

.ribbon-icon-button:disabled {
    color: #c5c5c1;
    cursor: default;
}

.ribbon-icon-button:disabled:hover {
    background: #f3f3f2;
}

.ribbon-delete-button {
    color: #8a4a42;
}

.ribbon-delete-button:hover {
    background: #f0e4e2;
}

.ribbon-empty-hint {
    display: none;

    color: #9a9a9a;

    font-size: 13px;
    font-weight: 600;
}

.ribbon-empty-hint.is-visible {
    display: block;
}

/* ---------- Slide elements: text boxes + shapes ---------- */

.deck-slide-elements {
    position: absolute;
    inset: 0;
    z-index: 10;

    pointer-events: none;

    /* Clips element content to the slide's own bounds (elements can be
       dragged/resized partially off-slide — see slide-element clamps in
       deck_detail.html — but the offscreen part shouldn't be visible).
       Deliberately scoped to just this layer, not .deck-slide itself: the
       shared selection overlay lives as a sibling of this element (see
       ensureSelectionOverlay) specifically so its resize handles stay
       reachable even when the element they belong to is mostly clipped
       out of view. Rounding inherited from the slide (16px desktop,
       10px phone editor, scaled while presenting) - a fixed 16px clipped
       photos at the slide's edges to a different curve than the slide's
       own corner and outline. */
    overflow: hidden;
    border-radius: inherit;

    /* Lets slide-element text size itself off this slide's own rendered
       width (via cqw below) instead of a fixed px value — otherwise text
       that looks right at the editor's ~780px-wide stage reads as tiny
       once the same slide fills a much wider fullscreen presentation.
       (Deliberately not on .deck-slide itself — combining container-type
       with aspect-ratio on the same element throws off the resolved
       container width.) */
    container-type: inline-size;
}

/* Freehand drawing mode (enterDeckDrawMode in deck_detail.html) - a
   transparent canvas overlaid directly on the active .deck-slide (a
   sibling of .deck-slide-elements, appended/removed by JS rather than
   living in the template, since only one drawing session can be active
   at a time). Drawing happens right on top of the real slide content
   the user already sees, not a separate blank canvas, so the finished
   result can be placed exactly where it was drawn instead of a generic
   centred default box. z-index beats .deck-slide-elements (10) and the
   selection overlay (1000)/snap lines (1200) so it captures every
   pointer event while active - normal element selection/dragging is
   blocked for the duration on purpose. Its own pixel buffer is a fixed
   working resolution (DECK_DRAW_WIDTH/HEIGHT, matching SLIDE_ASPECT_RATIO)
   set via JS width/height attributes, not this CSS - width/height:100%
   here just stretches that buffer to exactly cover the slide. */
.deck-slide-draw-canvas {
    position: absolute;
    inset: 0;
    z-index: 1500;

    display: block;
    width: 100%;
    height: 100%;

    touch-action: none;
    cursor: crosshair;
}

.slide-element {
    position: absolute;

    pointer-events: auto;
    cursor: move;
}

/* A layout's "Add photo here" placeholder (shape + its text label, both
   flagged is_photo_placeholder - see LAYOUT_PRESETS in views.py) isn't
   draggable/selectable like a normal element - clicking either half opens
   the image picker instead (see initialiseSlideElementInteractions in
   deck_detail.html), so it gets a pointer cursor instead of the usual
   drag affordance, plus a hover tint on the shape itself as a hint that
   it's clickable. */
.slide-element[data-is-photo-placeholder="true"] {
    cursor: pointer;
}

.slide-element-shape[data-is-photo-placeholder="true"]:hover {
    background: #dcdcd8 !important;
}

.slide-element-text .slide-element-body {
    width: 100%;
    height: 100%;

    padding: 2px;

    overflow: hidden;
    outline: none;

    /* --element-font-size is the plain px number the ribbon's font-size
       stepper shows (e.g. 18), calibrated against the editor's ~780px-wide
       slide. Expressing it as a fraction of the slide's own current width
       (1cqw = 1% of .deck-slide's inline size) instead of a literal px
       value keeps it visually proportional whether the slide is rendered
       small in the editor or filling the screen in presentation mode. */
    font-size: calc(var(--element-font-size, 18) * 100cqw / 780);

    /* line-height's unitless form scales with font-size automatically, but
       letter-spacing is stored the same way font-size is (a plain number
       calibrated against the ~780px design width) so it needs the same
       cqw-relative scaling to stay visually proportional. */
    line-height: var(--element-line-height, 1.2);
    letter-spacing: calc(var(--element-letter-spacing, 0) * 100cqw / 780);

    word-break: break-word;
}

/* The parent's cursor:move is right for dragging the box around, but once
   actually editing text, hovering it should show a normal text-insertion
   cursor, not "move". Also re-enables real text selection, overriding the
   whole-stage user-select:none (see .deck-editor-stage) that exists so a
   marquee drag doesn't also paint a native browser selection. */
.slide-element-body[contenteditable="true"] {
    cursor: text;
    user-select: text;
    -webkit-user-select: text;
}

.slide-element-shape {
    border-radius: 8px;
    border: 2px solid transparent;
    box-sizing: border-box;
}

.slide-element-shape-circle,
.slide-element-shape-oval {
    border-radius: 50%;
}

.slide-element-shape-line {
    border-radius: 4px;
}

.slide-element-shape-rectangle_sharp {
    border-radius: 0;
}

.slide-element-shape-svg {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
}

/* The <img> is sized/positioned independently of the box now (see
   applyElementStyle/startSlideElementResize's photo_scale/offset handling
   for images) so a corner-drag can scale it and a side-drag can crop into
   it without the two fighting — which means it can extend past the box's
   own bounds, so this needs to actually clip it. */
.slide-element-image {
    overflow: hidden;
}

/* Crops the <img> to this box's own bounds (overflow:hidden) — kept
   separate from .slide-element-image itself (which owns the drag/select
   mousedown listener) so the element's full rectangular hit area stays
   clickable regardless of the photo's crop/pan/zoom. */
.slide-element-image-frame {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.slide-element-image-img {
    position: absolute;
    display: block;

    /* draggable="false" on the element itself already stops the browser's
       native image-drag-ghost from hijacking mousedown, but Firefox also
       needs this to fully suppress it. */
    -webkit-user-drag: none;
}

/* Entered by double-clicking an image (see enterImagePhotoEditMode) —
   dragging now pans the photo inside its fixed box/frame instead of
   moving the box, so the cursor and an inset outline flag that the click
   target has changed even though nothing else about the box looks
   different. The outline sits just inside the box's own edge rather than
   on it, so it stays visible even where a frame's clip-path has cut the
   photo itself away from that edge (e.g. a circle or star frame). */
.slide-element-image.is-editing-photo {
    cursor: move;
    outline: 2px solid #1f7aec;
    outline-offset: -2px;
}

/* Elements stay visible while presenting but shouldn't intercept clicks —
   the stage's own click-to-advance handler needs those clicks instead.
   (A parent's pointer-events:none alone wouldn't be enough here since each
   .slide-element sets its own pointer-events:auto, which wins.) */
.deck-editor-stage.is-presenting .slide-element {
    pointer-events: none;
}

/* Belt and braces alongside enterDeckPresentation's own deselect: no
   editing chrome (selection outline + handles, a group's box, the
   marquee) ever shows on a presented slide. */
.deck-editor-stage.is-presenting .slide-selection-overlay,
.deck-editor-stage.is-presenting .deck-group-selection-box,
.deck-editor-stage.is-presenting .deck-marquee-select-box {
    display: none !important;
}

/* A shared selection overlay (see ensureSelectionOverlay in
   deck_detail.html) supplies the outline + resize handles, repositioned
   to match whichever element is selected and always painted above every
   .slide-element in that slide (z-index 1000, higher than
   .deck-slide-elements' own 10) regardless of THEIR individual z-index.
   The actual selected element never has its own z-index touched, so
   something sent to the back stays visually behind other elements even
   while selected/being resized — only the handles/outline (UI chrome, not
   content) render on top. */
.slide-selection-overlay {
    display: none;
    position: absolute;
    z-index: 1000;

    outline: 2px solid #1f1f1f;
    outline-offset: 3px;

    pointer-events: none;
}

.slide-selection-overlay.is-visible {
    display: block;
}

/* Snap guides (see getDeckSnapCandidates/startSlideElementDrag) — thin
   dashed lines that only appear once a dragged element's own center is
   close to a snap target (the slide's own center, or the mirrored spot of
   another element already on the slide), and sit above the selection
   outline (z-index) so they stay visible even while a handle-bearing
   element is selected. left/top are set inline by JS each time, since the
   target isn't always dead-center. */
.deck-snap-line {
    display: none;
    position: absolute;
    z-index: 1200;

    pointer-events: none;
}

.deck-snap-line.is-visible {
    display: block;
}

.deck-snap-line-vertical {
    top: 0;
    bottom: 0;
    width: 0;

    border-left: 1px dashed #ff2d95;
}

.deck-snap-line-horizontal {
    left: 0;
    right: 0;
    height: 0;

    border-top: 1px dashed #ff2d95;
}

/* Drag-a-box multi-select (see startDeckMarqueeSelect) — the box itself
   while dragging, and the per-element outline each caught element gets
   instead of the single-selection overlay's resize handles (a group of
   mixed elements doesn't have one uniform resize gesture). */
.deck-marquee-select-box {
    display: none;
    position: absolute;
    z-index: 1300;

    background: rgba(31, 111, 235, 0.1);
    border: 1px solid #1f6feb;

    pointer-events: none;
}

.deck-marquee-select-box.is-visible {
    display: block;
}

.slide-element.is-multi-selected,
/* Live drag-in-progress preview (see updateDeckMarqueePreview) - styled
   identically to the committed multi-selection above so catching an
   element reads the same whether the box is still moving or already
   released. */
.slide-element.is-marquee-preview {
    outline: 2px solid #1f6feb;
    outline-offset: 2px;
}

/* A persisted group (see groupSelectedElements/syncDeckMultiSelectionVisual
   in deck_detail.html) reads as one object, not several — a single outline
   around the union of its members' bounds, styled exactly like a normal
   single-element selection (.slide-selection-overlay) rather than the
   blue used for an in-progress/ephemeral marquee catch, since a group is
   a permanent, saved unit and should read the same as selecting any other
   single object. */
.deck-group-selection-box {
    display: none;
    position: absolute;
    z-index: 1300;

    outline: 2px solid #1f1f1f;
    outline-offset: 3px;

    pointer-events: none;
}

.deck-group-selection-box.is-visible {
    display: block;
}

.slide-selection-overlay .slide-element-resize-handle,
.deck-group-selection-box .slide-element-resize-handle {
    display: block;

    position: absolute;
    right: -7px;
    bottom: -7px;

    width: 13px;
    height: 13px;

    background: #ffffff;
    border: 2px solid #1f1f1f;
    border-radius: 50%;

    cursor: nwse-resize;
    pointer-events: auto;
}

/* Edge handles: right (width-only) and bottom (height-only), alongside the
   corner handle (both at once) — matches the standard multi-handle resize
   pattern instead of forcing every resize to change both dimensions. */
.slide-selection-overlay .slide-element-resize-handle-right,
.slide-selection-overlay .slide-element-resize-handle-bottom,
.slide-selection-overlay .slide-element-resize-handle-left,
.slide-selection-overlay .slide-element-resize-handle-top,
.deck-group-selection-box .slide-element-resize-handle-right,
.deck-group-selection-box .slide-element-resize-handle-bottom {
    display: block;

    position: absolute;

    background: #ffffff;
    border: 2px solid #1f1f1f;
    border-radius: 4px;

    pointer-events: auto;
}

.slide-selection-overlay .slide-element-resize-handle-right,
.deck-group-selection-box .slide-element-resize-handle-right {
    top: 50%;
    right: -6px;

    width: 9px;
    height: 16px;

    transform: translateY(-50%);

    cursor: ew-resize;
}

.slide-selection-overlay .slide-element-resize-handle-bottom,
.deck-group-selection-box .slide-element-resize-handle-bottom {
    left: 50%;
    bottom: -6px;

    width: 16px;
    height: 9px;

    transform: translateX(-50%);

    cursor: ns-resize;
}

.slide-selection-overlay .slide-element-resize-handle-left {
    top: 50%;
    left: -6px;

    width: 9px;
    height: 16px;

    transform: translateY(-50%);

    cursor: ew-resize;
}

.slide-selection-overlay .slide-element-resize-handle-top {
    left: 50%;
    top: -6px;

    width: 16px;
    height: 9px;

    transform: translateX(-50%);

    cursor: ns-resize;
}

/* Circle/star/heart selections resize uniformly from any handle (see
   startSlideElementResize) — an edge-only handle would break that, so
   only the corner handle shows for those shapes. */
.slide-selection-overlay.is-uniform-resize .slide-element-resize-handle-right,
.slide-selection-overlay.is-uniform-resize .slide-element-resize-handle-bottom {
    display: none;
}

/* The left/top edge handles are crop-only (see startSlideElementResize) —
   only images get them; every other element type keeps the original
   corner + right + bottom set. */
.slide-selection-overlay .slide-element-resize-handle-left,
.slide-selection-overlay .slide-element-resize-handle-top {
    display: none;
}

.slide-selection-overlay.is-image-resize .slide-element-resize-handle-left,
.slide-selection-overlay.is-image-resize .slide-element-resize-handle-top {
    display: block;
}

/* Heart button (see favouriteSelectedSlideElement/
   favouriteSelectedCollageElement) - sits at the box's top-right corner,
   the one corner none of the resize/rotate handles above already occupy
   (bottom-right is the corner resize handle, top-centre is the crop
   handle). Only shown for images - reuses is-image-resize (already
   exactly "the selected element is a photo") rather than a second class,
   and since the collage editor's own overlay carries is-image-resize
   permanently (every collage element is a photo), this is always visible
   there. */
.slide-favourite-button {
    display: none;

    position: absolute;
    top: -12px;
    right: -12px;
    /* Deliberately far beyond any realistic element z_index (which stays
       in the low thousands at most) - in the deck editor, this button
       lives inside the selection overlay/ring, a sibling of the stage
       rather than a child of it, so it should never need to compete with
       a photo's own z-index at all, but this removes any doubt. The
       collage editor's own version (.slide-favourite-button-floating,
       below) doesn't rely on this at all - it sidesteps the question
       entirely by living outside the stage's stacking context altogether. */
    z-index: 999999;

    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;

    background: #ffffff;
    border: 2px solid #1f1f1f;
    border-radius: 50%;

    color: #1f1f1f;
    cursor: pointer;
    pointer-events: auto;
}

/* The collage editor's heart button (see ensureCollageFavouriteButton in
   collage_detail.html) - a body-level element rather than a child of the
   selection overlay, so it can never lose a stacking-context comparison
   against a photo inside #collageStage no matter what's going on in
   there (a photo's own z-index, a hover/drag transform, etc). Position is
   set inline in document coordinates by positionCollageFavouriteButton,
   so top/right here just need to get out of the way rather than supply a
   corner offset the way the deck editor's own (nested) version does. */
.slide-favourite-button-floating {
    top: auto;
    right: auto;
    left: 0;
    z-index: 2147483000;
}

.slide-favourite-button-floating.is-visible {
    display: flex;
}

/* ...but never on top of an open modal. This button's whole design is
   "beat every stacking context on the page" (see the near-max z-index
   above), which it does a little too well - it also beat .deckd-modal's
   own backdrop, leaving the heart floating over the cutout/delete/etc.
   dialogs. deckdLockBodyScroll (base.html) stamps this data attribute on
   <body> for as long as ANY modal is open (it's a nesting counter, so it
   only clears once the last one closes), which makes it the one reliable
   "a modal is up" signal available to CSS here. Hiding rather than
   lowering the z-index: while a modal is open the selection behind it
   isn't interactive anyway, so there's nothing for the button to do. */
body[data-deckd-modal-lock-count]:not([data-deckd-modal-lock-count="0"]) .slide-favourite-button-floating.is-visible {
    display: none;
}

.slide-favourite-button svg {
    width: 13px;
    height: 13px;
}

.slide-selection-overlay.is-image-resize .slide-favourite-button {
    display: flex;
}

.slide-favourite-button:hover {
    background: #f3f3f2;
}

/* Persistent "already in your favourites" state (see
   syncFavouriteButtonState) - stays red rather than fading back out,
   since a user can't favourite the same image twice (see
   create_favourite_cutout's own get_or_create/unique constraint) and
   this is the button's only indicator of that. */
.slide-favourite-button.is-favourited {
    background: #fff0f4;
    border-color: #e0245e;
    color: #e0245e;
}

.slide-favourite-button.is-favourited svg {
    fill: currentColor;
}

.slide-favourite-button.is-favourited:hover {
    background: #ffe1e9;
}

/* Directional-arrow-only handle (see startArrowHeadResize in
   deck_detail.html) sitting at the shaft/head boundary — `left` (for
   'arrow') or `top` (for 'arrow_down') is set inline by
   syncSelectionOverlay since, unlike every other handle here, its
   position depends on the arrow's own arrow_head_length rather than
   always sitting at a fixed edge/corner. Diamond-shaped and blue rather
   than matching the plain corner/edge handles, so it reads as a
   different kind of drag (resize the head, not the whole box) at a
   glance. */
.slide-selection-overlay .slide-element-resize-handle-arrowhead {
    display: none;

    position: absolute;
    top: 50%;

    width: 12px;
    height: 12px;

    background: #ffffff;
    border: 2px solid #1f6feb;

    transform: translate(-50%, -50%) rotate(45deg);

    cursor: ew-resize;
    pointer-events: auto;
}

.slide-selection-overlay.is-arrow-shape .slide-element-resize-handle-arrowhead {
    display: block;
}

/* 'arrow_down' is the vertical mirror of 'arrow' above - the handle
   sits at a fixed horizontal centre instead, dragged along `top`
   (inline, see syncSelectionOverlay) instead of `left`, with a
   vertical-resize cursor to match. */
.slide-selection-overlay.is-arrow-down-shape .slide-element-resize-handle-arrowhead {
    display: block;
    left: 50%;
    cursor: ns-resize;
}

/* Rotate handle: a stem above the box's top edge plus a round grip at
   its end (matches the corner resize handle's look) — only on the
   single-element overlay, not the multi-element group-selection box
   (rotating a whole group of possibly-already-rotated elements as one
   unit isn't supported yet). Both are children of the overlay, so they
   rotate along with it for free once syncSelectionOverlay copies the
   selected element's own transform onto the overlay. */
.slide-selection-overlay .slide-element-rotate-stem {
    display: block;

    position: absolute;
    left: 50%;
    top: -26px;

    width: 2px;
    height: 24px;

    background: #1f1f1f;

    transform: translateX(-50%);
    pointer-events: none;
}

.slide-selection-overlay .slide-element-rotate-handle {
    display: block;

    position: absolute;
    left: 50%;
    top: -34px;

    width: 14px;
    height: 14px;

    background: #ffffff;
    border: 2px solid #1f1f1f;
    border-radius: 50%;

    transform: translateX(-50%);

    cursor: grab;
    pointer-events: auto;
}

.slide-selection-overlay .slide-element-rotate-handle:active {
    cursor: grabbing;
}

/* While a photo is mid-edit (see enterImagePhotoEditMode in
   deck_detail.html), these same handles scale/crop/rotate the PHOTO
   instead of the frame (startImagePhotoResize/startImagePhotoRotate) —
   recoloured to match the mode's own blue inset outline (.is-editing-
   photo) so it's visually obvious a drag here won't touch the frame. */
.slide-selection-overlay.is-photo-edit-mode .slide-element-resize-handle,
.slide-selection-overlay.is-photo-edit-mode .slide-element-resize-handle-right,
.slide-selection-overlay.is-photo-edit-mode .slide-element-resize-handle-bottom,
.slide-selection-overlay.is-photo-edit-mode .slide-element-resize-handle-left,
.slide-selection-overlay.is-photo-edit-mode .slide-element-resize-handle-top,
.slide-selection-overlay.is-photo-edit-mode .slide-element-rotate-handle {
    border-color: #1f7aec;
}

.slide-selection-overlay.is-photo-edit-mode .slide-element-rotate-stem {
    background: #1f7aec;
}

.slide-selection-overlay.is-photo-edit-mode {
    outline-color: #1f7aec;
}

@media (max-width: 900px) {
    .ribbon-row {
        gap: 10px;
        padding: 8px 10px;
    }

    .ribbon-button span,
    .ribbon-button {
        font-size: 12px;
    }
}

/* =========================================================
   Decks sort button — match My Boards sort
   ========================================================= */

html body .decks-page .decks-owner-actions {
    width: auto !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    /* Now sits beneath the Decks/Collages toggle rather than inside the
       centered header (see decks.html) - it no longer inherits spacing
       from that flex column, so it needs its own bottom margin here. */
    margin: 0 0 24px !important;
    padding: 0 !important;

    gap: 10px !important;
}

html body .decks-page .decks-owner-sort-dropdown {
    position: relative !important;

    display: inline-flex !important;
}

html body .decks-page .decks-owner-sort-button {
    width: auto !important;
    min-width: 0 !important;

    height: 48px !important;
    min-height: 48px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;

    margin: 0 !important;
    padding: 0 16px !important;

    background: #ffffff !important;
    color: #111111 !important;

    border: 1px solid #ddddda !important;
    border-radius: 14px !important;

    box-shadow: none !important;

    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1 !important;

    text-decoration: none !important;
    white-space: nowrap !important;

    cursor: pointer !important;
    transform: none !important;
}

html body .decks-page .decks-owner-sort-button:hover {
    background: #f6f6f4 !important;
    border-color: #d0d0cc !important;

    transform: none !important;
}

html body .decks-page .decks-owner-action-icon,
html body .decks-page .decks-owner-sort-icon {
    width: 17px !important;
    height: 17px !important;

    flex: 0 0 17px !important;

    display: block !important;

    stroke: currentColor !important;
}

html body .decks-page .decks-owner-sort-icon {
    transform: translateY(-0.5px) !important;
}

html body .decks-page .decks-owner-sort-menu {
    display: none !important;

    position: absolute !important;
    top: calc(100% + 10px) !important;
    left: 0 !important;
    right: auto !important;
    z-index: 90000 !important;

    width: 220px !important;
    padding: 8px !important;

    background: #ffffff !important;
    border: 1px solid #ddddda !important;
    border-radius: 16px !important;

    box-shadow:
        0 16px 38px
        rgba(0, 0, 0, 0.12) !important;
}

html body
.decks-page
.decks-owner-sort-dropdown.is-open
.decks-owner-sort-menu {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
}

html body .decks-page .decks-owner-sort-menu button {
    width: 100% !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;

    padding: 10px 12px !important;

    background: transparent !important;
    color: #111111 !important;

    border: none !important;
    border-radius: 11px !important;

    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-align: left !important;

    cursor: pointer !important;
}

html body .decks-page .decks-owner-sort-menu button:hover {
    background: #f3f3f2 !important;
}

html body .decks-page .decks-owner-sort-menu-title {
    margin: 4px 8px 6px !important;

    color: #8a8a85 !important;

    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    letter-spacing: 0.02em !important;

    text-transform: uppercase !important;
}

@media (max-width: 560px) {
    html body .decks-page .decks-owner-actions {
        width: 100% !important;
        gap: 8px !important;
    }

    html body .decks-page .decks-owner-sort-button {
        height: 44px !important;
        min-height: 44px !important;

        padding: 0 14px !important;

        font-size: 13px !important;
    }
}

/* Decks subtitle and Sort button on one line */

html body .decks-page .decks-owner-secondary-row {
    width: 100% !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 16px !important;

    margin: 0 !important;
    padding: 0 !important;
}

html body .decks-page .decks-owner-secondary-row .decks-owner-actions {
    width: auto !important;
    flex: 0 0 auto !important;

    margin: 0 !important;
    padding: 0 !important;
}

html body .decks-page .decks-owner-secondary-row .decks-owner-subtitle {
    min-width: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    color: #777772 !important;

    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
}

@media (max-width: 560px) {
    html body .decks-page .decks-owner-secondary-row {
        flex-wrap: wrap !important;
        gap: 10px 14px !important;
    }

    html body .decks-page .decks-owner-secondary-row .decks-owner-subtitle {
        flex: 1 1 220px !important;
        font-size: 13px !important;
    }
}

/* Product Detail back link — white pill */

html body .detail-page .detail-top-row a.product-detail-back-link {
    min-height: 40px !important;

    padding: 0 14px !important;

    background: #ffffff !important;
    border: 1px solid #ddddda !important;
    border-radius: 999px !important;

    box-shadow: none !important;
}

html body .detail-page .detail-top-row a.product-detail-back-link:hover {
    background: #f6f6f4 !important;
    border-color: #d0d0cc !important;

    color: #1f1f1f !important;
    box-shadow: none !important;
}

html body .decks-page .decks-owner-sort-menu-note {
    margin: 6px 8px 4px !important;

    color: #8a8a85 !important;

    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    letter-spacing: 0.02em !important;

    text-align: center !important;
}

/* Product-card menu button — exact Board-card circle size */

html body .product-card > .product-menu-button {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;

    padding: 0 !important;

    background: rgba(255, 255, 255, 0.92) !important;
    border: none !important;
    border-radius: 50% !important;

    box-shadow:
        0 6px 16px
        rgba(0, 0, 0, 0.18) !important;

    font-size: 17px !important;
    line-height: 1 !important;
}

html body .product-card > .product-menu-button:hover,
html body .product-card > .product-menu-button:focus,
html body .product-card > .product-menu-button:focus-visible,
html body .product-card > .product-menu-button:active {
    background: rgba(255, 255, 255, 0.92) !important;
    border: none !important;
}

/* Board-detail product menu — exact Boards menu-circle size */

html body
.board-detail-page
#sortable-products
.product-card
> .product-menu-button {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    z-index: 20 !important;

    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    max-width: 34px !important;
    max-height: 34px !important;
    flex: 0 0 34px !important;

    margin: 0 !important;
    padding: 0 0 3px !important;
    box-sizing: border-box !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: rgba(255, 255, 255, 0.92) !important;
    border: none !important;
    border-radius: 50% !important;

    box-shadow:
        0 6px 16px
        rgba(0, 0, 0, 0.18) !important;

    color: #1f1f1f !important;

    font-family: inherit !important;
    font-size: 17px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    text-align: center !important;

    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;

    transform: none !important;

    transition:
        opacity 0.15s ease,
        visibility 0.15s ease !important;
}

html body
.board-detail-page
#sortable-products
.product-card:hover
> .product-menu-button,
html body
.board-detail-page
#sortable-products
.product-card:focus-within
> .product-menu-button {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

html body
.board-detail-page
#sortable-products
.product-card
> .product-menu-button:hover,
html body
.board-detail-page
#sortable-products
.product-card
> .product-menu-button:focus,
html body
.board-detail-page
#sortable-products
.product-card
> .product-menu-button:active {
    width: 34px !important;
    height: 34px !important;

    background: rgba(255, 255, 255, 0.92) !important;
    border: none !important;

    transform: none !important;
}

/* Explore: show brand and price only when the card is hovered */

html body
.explore-page
.wishlist-grid
.product-card {
    position: relative !important;
    overflow: hidden !important;
}

html body
.explore-page
.wishlist-grid
.product-card > img {
    display: block !important;
    margin: 0 !important;

    /* The photo fills this card's full height - .card-info floats on
       top of it (bottom: 0, above) rather than sitting in its own
       section underneath - so the photo IS the bottom of the card, not
       just the top. The shared product-card image rule only rounds the
       top two corners (right for pages where a separate section
       follows below the photo); override back to all four here so
       Explore's cards keep their originally equally-filleted look.
       `inherit` so it always matches the card's own current radius,
       including the smaller radius used at narrow breakpoints. */
    border-radius: inherit !important;
}

/* Position the existing text on the photo, but hide it initially. The
   actual per-line frosted-glass pill look lives in explore.html's own
   page-scoped <style> block (same selector, loaded after this file, so
   it wins) — this base rule only handles show/hide + box position; see
   .deck-product-picker-card > .card-info further down for the "add
   product slide" picker's copy of that same per-line pill treatment. */

html body
.explore-page
.wishlist-grid
.product-card > .card-info {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 3 !important;

    margin: 0 !important;
    padding: 18px 20px 22px !important;

    background: transparent !important;
    pointer-events: none !important;

    opacity: 0 !important;
    visibility: hidden !important;

    transition:
        opacity 0.15s ease,
        visibility 0.15s ease !important;
}

html body
.explore-page
.wishlist-grid
.product-card:hover > .card-info {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Retain the subtle grey-out on hover. */

html body
.explore-page
.wishlist-grid
.product-card::before {
    content: "" !important;

    position: absolute !important;
    inset: 0 !important;
    z-index: 2 !important;

    background: rgba(17, 17, 17, 0) !important;

    pointer-events: none !important;
    transition: background 0.15s ease !important;
}

html body
.explore-page
.wishlist-grid
.product-card:hover::before {
    background: rgba(17, 17, 17, 0.1) !important;
}


@supports (height: 100dvh) {
}





@media (max-width: 700px) {
}




@supports (height: 100dvh) {
}

@media (max-width: 700px) {

}

/* Move the logo and search bar left together,
   preserving their original gap. */




/* The logo moved 64px left, so move the search bar
   left by the same amount to retain the original gap. */



@media (max-width: 700px) {

}

/* Keep the logo left - its gap to the search bar now lives only in
   the "TOP NAVBAR SPACING" block appended at the end of this file. */


@media (max-width: 700px) {
}

/* Stop the sidebar divider at the bottom of the top navbar */

:root {
    --deckd-topbar-height: 100px;
}



/* Boards: subtle darkening on hover, matching product cards */

html body
.boards-page
.deckd-board-tile
.board-cover-collage-wrap {
    position: relative !important;
    overflow: hidden !important;
}

html body
.boards-page
.deckd-board-tile
.board-cover-collage-wrap::after {
    content: "";

    position: absolute;
    inset: 0;
    z-index: 2;

    background: rgba(17, 17, 17, 0);

    pointer-events: none;
    transition: background 0.15s ease;
}

html body
.boards-page
.deckd-board-tile:hover
.board-cover-collage-wrap::after {
    background: rgba(17, 17, 17, 0.1);
}

/* Keep the three-dot menu above the hover overlay. */

html body
.boards-page
.deckd-board-tile
.board-menu-button {
    position: absolute !important;
    z-index: 3 !important;
}

html body
.boards-page
.deckd-board-tile
.board-cover-collage-wrap {
    border-radius: 16px !important;
}

html body
.boards-page
.deckd-board-tile
.board-cover-collage-wrap::after {
    border-radius: 16px !important;
}

/* The masonry/card-sizing rules above target ".product-card img" as a
   plain descendant selector, which also catches the tiny assignee-badge
   avatar nested inside .product-card (see .product-assignee-badge
   above) — forcing it to card-photo height (170-390px) inside its 30px
   circular frame, so only a thin sliver of the avatar showed, looking
   "zoomed in". Restore it to simply fill its own badge circle. */
html body .board-detail-page .product-assignee-badge img {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center center !important;
}

/* =========================================================================
   MOBILE: LHS SIDEBAR -> FLOATING BOTTOM PILL
   =========================================================================
   Below the same 700px breakpoint the topbar/sidebar already treat as
   "mobile" elsewhere in this file, the LHS icon sidebar (.deckd-sidebar)
   stops being a full-height strip pinned to the left edge and instead
   becomes a single floating pill of icons, centred and inset from the
   bottom edge - the icons themselves (size/border-radius/hover state)
   are untouched, only the sidebar's own position/shape and everything
   that was previously carved out to make room for it on the left.
   Appended last so it wins every earlier !important tie by source order
   without needing higher-specificity selectors everywhere.

   Tablets get the pill too, not just phones: anything up to 1024px wide
   (portrait iPads, small windows), plus any touch-first screen however
   wide it is (landscape iPads / iPad Pro report hover: none + a coarse
   pointer), since a full-height strip on the left is a desktop idiom.
   ========================================================================= */

@media (max-width: 1024px), (hover: none) and (pointer: coarse) {

    /* The pill scales with the screen rather than jumping between fixed
       phone/tablet sizes: each value grows linearly with viewport width,
       clamped so a phone gets the original compact pill (38px buttons)
       and a big landscape tablet tops out at 60px buttons. */
    html body {
        --deckd-pill-button: clamp(38px, 30px + 2.3vw, 60px);
        --deckd-pill-icon: clamp(19px, 15px + 1.1vw, 30px);
        --deckd-pill-gap: clamp(6px, 2px + 0.9vw, 16px);
        --deckd-pill-pad-y: clamp(8px, 4px + 0.8vw, 14px);
        --deckd-pill-pad-x: clamp(14px, 8px + 1.4vw, 26px);
        --deckd-pill-bottom: clamp(14px, 6px + 1.6vw, 30px);
    }

    html body .deckd-sidebar-link {
        width: var(--deckd-pill-button) !important;
        height: var(--deckd-pill-button) !important;
        border-radius: calc(var(--deckd-pill-button) * 0.27) !important;
    }

    html body .deckd-sidebar-link svg {
        width: var(--deckd-pill-icon) !important;
        height: var(--deckd-pill-icon) !important;
    }

    html body .deckd-sidebar {
        /* Explicitly fixed (not sticky/relative from an earlier rule) and
           on its own compositor layer, so iOS Safari keeps it pinned to the
           bottom while its toolbar collapses/expands during scroll instead
           of leaving it stranded mid-screen. */
        position: fixed !important;
        top: auto !important;
        /* Centred with auto margins rather than left:50% + translateX(-50%):
           a transformed, rounded, fixed element is what iOS Safari paints
           a grey square around. */
        left: 0 !important;
        right: 0 !important;
        bottom: calc(var(--deckd-pill-bottom) + env(safe-area-inset-bottom, 0px)) !important;
        transform: none !important;
        -webkit-transform: none !important;

        width: max-content !important;
        max-width: calc(100vw - 32px) !important;
        height: auto !important;
        min-height: 0 !important;

        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: var(--deckd-pill-gap) !important;

        padding: var(--deckd-pill-pad-y) var(--deckd-pill-pad-x) !important;
        margin: 0 auto !important;

        /* Solid white, no backdrop-filter: iOS Safari paints a square grey
           box around a blurred, rounded, shadowed fixed element. */
        background: #ffffff !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border: 1px solid #ece7df !important;
        border-radius: 999px !important;
        box-shadow: none !important;

        z-index: 1400 !important;
    }

    /* No sidebar on the left any more - the main column and topbar can
       both go back to using the full viewport width. */

    html body .deckd-main {
        width: 100% !important;
        margin-left: 0 !important;
        /* Clears the floating pill so it never sits over the last row
           of a page's content. */
        padding-bottom: calc(
            var(--deckd-pill-button) + 2 * var(--deckd-pill-pad-y) +
            var(--deckd-pill-bottom) + 28px + env(safe-area-inset-bottom, 0px)
        ) !important;
    }

    /* Cancel the "pull the logo/search left behind the sidebar" trick -
       there's no sidebar reserving space on the left to pull into. */

    html body .deckd-topbar .navbar-left {
        position: static !important;
        left: auto !important;
        transform: none !important;
    }

    html body .deckd-topbar::before {
        left: 0 !important;
    }

    /* The vertical divider line that used to sit at the sidebar's right
       edge no longer has a sidebar to divide from. */

    html body .deckd-shell::after {
        content: none !important;
    }

    /* Quick Access's own dropdown opened to the right of the vertical
       sidebar; from a bottom pill it opens upward, centred on the
       button instead. */

    html body .deckd-sidebar-dropdown {
        top: auto !important;
        bottom: calc(100% + 12px) !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
    }

    /* deckd_modals.css bakes a translateY(-50%) baseline into this
       dropdown's entrance animation to match the vertical sidebar's
       "centred on the button's midpoint" positioning - swap in an
       equivalent animation built on translateX(-50%) so it matches the
       horizontal centring above instead of fighting it. */

    html body .deckd-sidebar-quickadd.open .deckd-sidebar-dropdown {
        animation: deckdFlyInCenteredX 0.16s cubic-bezier(0.16, 1, 0.3, 1) both !important;
    }

    /* Tooltips popped out to the right of each vertical sidebar icon;
       from a horizontal bottom pill they pop upward instead. */

    html body .deckd-sidebar-link[data-tooltip]::after {
        top: auto !important;
        bottom: calc(100% + 10px) !important;
        left: 50% !important;
        transform: translateX(-50%) scale(0.96) !important;
    }

    html body .deckd-sidebar-link[data-tooltip]:hover::after,
    html body .deckd-sidebar-link[data-tooltip]:focus-visible::after {
        transform: translateX(-50%) scale(1) !important;
    }

    /* Every .deckd-modal card centred itself in the space to the right
       of the vertical sidebar via extra left padding - with the sidebar
       off the left edge entirely, that padding just pushes modals
       (including the currency disclaimer) off-centre. */

    .deckd-modal {
        padding: 20px !important;
    }

    /* The export-progress toast offset itself right of the vertical
       sidebar and sat 28px off the bottom edge - re-centre it on the
       full-width column and lift it clear of the new bottom pill. */

    .deckd-export-toast {
        left: 50% !important;
        bottom: calc(
            var(--deckd-pill-button) + 2 * var(--deckd-pill-pad-y) +
            var(--deckd-pill-bottom) + 20px + env(safe-area-inset-bottom, 0px)
        ) !important;
    }
}

@keyframes deckdFlyInCenteredX {
    from { opacity: 0; transform: translateX(-50%) translateY(6px) scale(0.98); }
    to { opacity: 1; transform: translateX(-50%) scale(1); }
}

/* =========================================================================
   MOBILE: TOP NAVBAR - no currency picker, one-row search that expands
   on focus
   =========================================================================
   Same 700px breakpoint as the bottom-pill sidebar above. The currency
   picker is dropped entirely on mobile; the search bar (.deckd-topbar-search
   - the class every page's own header_search block carries, whatever
   markup sits inside it: Explore's plain input, boards/friends/
   board_detail/public_profile's search-expand-wrapper) stays on the same
   row as the logo/notifications/account instead of wrapping to a second
   row below it, shrinking to fit. Focusing its input hides the logo and
   the icon group so the bar can grow to fill the whole row -
   :focus-within/:has() do this without JS, so it works identically for
   every page's own search bar variant and reverts the moment focus
   leaves, with no per-page wiring needed. */

@media (max-width: 700px) {

    /* Pin the topbar to the screen instead of position:sticky. On iOS
       Safari (html is the overflow container here, and the browser's own
       toolbars collapse while scrolling) a sticky bar drifted up and got
       cut off as the page scrolled; fixed stays glued to the top edge.
       It leaves the flow, so .deckd-main reserves its (live-measured)
       height as top padding to keep content from sliding underneath. */
    /* The desktop-only "html { overflow-y: scroll }" (reserves the
       scrollbar gutter) turns the root into a manual scroll container,
       which makes iOS Safari treat fixed elements as shifting with its
       collapsing toolbars: the bar slid up while scrolling down and only
       snapped back on scrolling up. Phones have overlay scrollbars and
       need no gutter, so let the page scroll natively there. */
    html {
        overflow-y: visible !important;
        scrollbar-gutter: auto !important;
    }

    html body:not(.deck-mobile) .deckd-topbar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: auto !important;
        box-sizing: border-box !important;
    }

    html body:not(.deck-mobile) .deckd-main {
        padding-top: var(--deckd-sidebar-top-inset, 68px) !important;
    }

    /* Matches (and so out-specifies, being both an ID selector AND later
       in the file) the unconditional ".navbar-right > #navCurrencyMenu"
       display:flex rule elsewhere that would otherwise keep winning over
       a plain ".nav-currency-menu" selector here regardless of source
       order, since an ID always outranks any number of classes. */
    html body .site-navbar .navbar-right > #navCurrencyMenu {
        display: none !important;
    }

    .deckd-topbar.site-navbar {
        flex-wrap: nowrap !important;
        /* Tighter than the 12px/16px the wrapping two-row layout used -
           every px trimmed here is a px the collapsed search bar (the
           row's only flexible item) gets back, now that logo/search/
           icons all have to share one row instead of two. */
        padding: 10px 10px !important;
        gap: 8px !important;
    }

    .deckd-topbar-search.deckd-topbar-search {
        order: 2 !important;
        flex: 1 1 auto !important;
        width: auto !important;
        min-width: 0 !important;
    }

    .deckd-topbar .navbar-right {
        order: 3 !important;
    }

    /* input:focus rather than the wrapper's own :focus-within - Explore's
       search bar also has a filter icon BUTTON inside .deckd-topbar-search
       (openFilterModal()), and focus-within would fire for that too,
       expanding the bar out from under the filter button (and shifting
       it) right as it's tapped instead of just opening the filter
       modal. Only the actual text input should trigger the expand. */
    .deckd-topbar.site-navbar:has(.deckd-topbar-search input:focus) .navbar-left,
    .deckd-topbar.site-navbar:has(.deckd-topbar-search input:focus) .navbar-right {
        display: none !important;
    }

    /* Tapping that filter button blurs the search input first (focus
       moves to the button on mousedown, before its click opens the
       modal), so by the rule above alone the bar would visibly snap
       back to collapsed for a moment right as the modal opens over it.
       #filterModal.is-open (deckdOpenModal's own marker class, shared by
       every modal on the site) keeps it expanded for as long as the
       filter modal stays open, however the tap that got it there
       happened - :has() can reach #filterModal here even though it
       isn't a descendant of the navbar, since both sit under <body>. */
    body:has(#filterModal.is-open) .deckd-topbar .navbar-left,
    body:has(#filterModal.is-open) .deckd-topbar .navbar-right {
        display: none !important;
    }

    /* iOS Safari auto-zooms the whole page on focus for any text input
       under 16px - every search input here is 13-15px depending on the
       page, so tapping in to search used to zoom the viewport in a
       little on iPhone. 16px is the smallest size that avoids it. */
    html body .deckd-topbar-search.deckd-topbar-search input,
    .deckd-topbar-search .search-expand-input {
        font-size: 16px !important;
    }

    /* Notifications dropdown: right:0 is relative to .nav-notifications-menu
       (the bell's own wrapper), not the screen - and since the account
       icon sits to its right in .navbar-right, that left the dropdown's
       right edge well short of the true screen edge. Anchoring to the
       viewport instead (fixed rather than absolute) puts it flush with
       the screen's right edge as intended; top reuses the topbar's own
       real measured height (--deckd-sidebar-top-inset, kept in sync by
       base.html) since 100% no longer means anything once the ancestor
       being percentaged against is the viewport instead of the button. */
    html body .nav-notifications-dropdown {
        position: fixed !important;
        top: calc(var(--deckd-sidebar-top-inset, var(--deckd-topbar-height)) + 8px) !important;
        right: 0 !important;
        left: auto !important;
    }

    /* Product detail modal (#productDetailModal): .detail-card lays the
       photo and info out side by side for desktop - a fixed
       height:min(520px,74vh) square image (width:auto, sized off that
       height) in an auto-width grid column, with the info column beside
       it (see deckd_modals.css). On a narrow phone that square alone is
       wider than the whole modal, so the card overflowed its container;
       being left-anchored by default, only the LEFT slice of the
       oversized square ever showed - reading as zoomed in and
       off-centre no matter how the overflow itself was aligned. Stacked
       instead: the image spans the card's own actual width (still a
       square, via aspect-ratio, but sized off that width now rather
       than a fixed height) with the info column flowing below it, so
       nothing overflows and the whole photo is visible. */
    html body #productDetailModalContent,
    html body #productDetailModalContent .detail-page {
        height: auto !important;
    }

    /* The card must never scroll: it is capped to the room actually
       available (dynamic viewport height minus navbar, bottom pill and
       padding - dvh tracks mobile browser toolbars, vh is the
       fallback), and the PHOTO is the flexible part. It stays square
       when there's room, but shrinks (min-height:0, object-fit:cover)
       whenever the info column below needs the space, so the title,
       price, brand and "View item" are always fully visible. */
    html body #productDetailModal .deckd-modal-card {
        max-height: calc(100vh - var(--deckd-navbar-height, 76px) - var(--deckd-bottom-bar-height, 0px) - 40px) !important;
        max-height: calc(100dvh - var(--deckd-navbar-height, 76px) - var(--deckd-bottom-bar-height, 0px) - 40px) !important;
        overflow: hidden !important;
        /* Flex, not block: as a block container the wrapper left an 8px
           gap above the card, pushing the card's bottom 8px past the
           wrapper's own rounded clip - which sliced the bottom corners
           off almost square. */
        display: flex !important;
        flex-direction: column !important;
    }

    html body #productDetailModalContent,
    html body #productDetailModalContent .detail-page {
        max-height: inherit !important;
        min-height: 0 !important;
        flex: 0 1 auto !important;
    }

    html body #productDetailModalContent .detail-card {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        max-height: calc(100vh - var(--deckd-navbar-height, 76px) - var(--deckd-bottom-bar-height, 0px) - 40px) !important;
        max-height: calc(100dvh - var(--deckd-navbar-height, 76px) - var(--deckd-bottom-bar-height, 0px) - 40px) !important;
        overflow: hidden !important;
        border-radius: var(--dm-radius-modal) !important;
        /* .detail-card carries an 8px top margin from the standalone page;
           inside the capped modal it pushes the card's bottom 8px past
           the wrapper's rounded clip, slicing the bottom corners. */
        margin: 0 auto !important;
        /* overflow:hidden + border-radius alone doesn't reliably clip the
           bottom corners on iOS Safari once the card is height-capped;
           clip-path does. */
        clip-path: inset(0 round var(--dm-radius-modal)) !important;
    }

    html body #productDetailModalContent .detail-card > img {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 / 1 !important;
        flex: 0 1 auto !important;
        min-height: 0 !important;
        border-radius: var(--dm-radius-modal) var(--dm-radius-modal) 0 0 !important;
    }

    /* The floating back/save button row now overlays the image only
       (it's first in the stacked column, same as it overlays just the
       image's own column on desktop) rather than the info column below
       it - so the 72px top padding desktop needs to clear that row is
       just dead space here. */
    html body #productDetailModalContent .detail-info {
        height: auto !important;
        flex: 0 0 auto !important;
        overflow: visible !important;
        border-radius: 0 0 var(--dm-radius-modal) var(--dm-radius-modal) !important;
        padding: 20px 20px 24px !important;
    }

    /* Boards/board detail/friends/public profile's search bar
       (.deckd-topbar-search-no-button - no filter button, unlike
       Explore's) was still picking up an old rule written for its
       previous home (a floating sticky pill inside the page body,
       .board-product-search-wrapper .search-expand-form) that reserves
       a second 40px grid column for a button this variant never had -
       wasting 48px (40px column + 8px gap) that the input could
       otherwise use, so the box read as noticeably shorter than
       Explore's own search bar right next to it in the same row. */
    html body .deckd-topbar-search.deckd-topbar-search-no-button .search-expand-form {
        display: flex !important;
        width: 100% !important;
    }

    html body .deckd-topbar-search.deckd-topbar-search-no-button .search-expand-input {
        width: 100% !important;
        max-width: none !important;
        flex: 1 1 auto !important;
    }
}


/* =========================================================================
   DECK EDITOR: MOBILE LAYOUT
   =========================================================================
   A phone gets a pared-back, landscape-only editor instead of the full
   desktop studio. Keyed off body.deck-mobile rather than a media query -
   deck_detail.html's initialiseDeckMobileEditor toggles it from the same
   DECKD_DECK_MOBILE_QUERY the "limited on mobile" notice uses
   (_deck_mobile_notice.html), since a phone held sideways is wider than
   the site's usual 700px mobile breakpoint and only recognisable by its
   short height + coarse pointer.

   - No site topbar/sidebar - just the editor's own slim bar (Back / + /
     Present).
   - The thumbnail rail becomes a thin scrollbar under that bar; the slide
     itself fills the rest of the screen and swipes between slides.
   - The ribbon is hidden until a selection's paintbrush is tapped, then
     just its contextual (format) row takes over the topbar's spot -
     body.deck-mobile-styling.
   ========================================================================= */

.deck-mobile-add-button,
.deck-mobile-history,
.deck-mobile-bg-button,
.deck-mobile-bg-tabs,
.deck-mobile-scrollbar,
.deck-mobile-ribbon-done,
.deck-mobile-rotate,
.deck-mobile-float-menu {
    display: none;
}

html.deck-mobile-root,
html.deck-mobile-root body {
    overflow: hidden !important;
    overscroll-behavior: none;
}

html body.deck-mobile .deckd-sidebar,
html body.deck-mobile .deckd-topbar {
    display: none !important;
}

html body.deck-mobile .deckd-main {
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

html body.deck-mobile .deck-editor-page {
    position: fixed;
    inset: 0;

    display: flex;
    flex-direction: column;

    max-width: none;
    margin: 0;
    padding:
        calc(6px + env(safe-area-inset-top, 0px))
        max(12px, env(safe-area-inset-right, 0px))
        calc(6px + env(safe-area-inset-bottom, 0px))
        max(12px, env(safe-area-inset-left, 0px));

    background: #ffffff;

    /* No pinch/double-tap zoom anywhere in the mobile editor - an
       accidental zoom there had no way back short of rotating the phone.
       The stage itself goes further (touch-action: none, below). */
    touch-action: pan-x pan-y;
}

/* 16px is the smallest size iOS doesn't auto-zoom the page on focus for
   (belt and braces alongside lockDeckMobileViewportScale). */
html body.deck-mobile .deck-editor-ribbon input,
html body.deck-mobile .deck-mobile-menu-host input {
    font-size: 16px;
}

/* ---------- Top bar: Back ... + Present ---------- */

html body.deck-mobile .deck-editor-topbar {
    position: relative;
    flex-shrink: 0;
    flex-wrap: nowrap;
    gap: 10px;

    min-height: 36px;
    margin: 0 0 4px;
    padding: 0;

    border-bottom: none;
}

/* Title centred on the bar itself, not in whatever space is left
   between Back and the buttons (which pulled it off-centre). Taken out
   of the flex flow, so the "+" carries margin-left: auto to keep the
   buttons on the right. --deck-mobile-title-max is the room free on
   both sides of centre (syncDeckMobileTitleWidth in deck_detail.html),
   so a long title ellipsises instead of running under the buttons. */
html body.deck-mobile .deck-editor-title {
    position: absolute;
    top: 50%;
    left: 50%;

    max-width: var(--deck-mobile-title-max, 30%);

    font-size: 14px;
    text-align: center;

    transform: translate(-50%, -50%);
    pointer-events: none;
}

html body.deck-mobile .deck-mobile-add-button {
    margin-left: auto;
}

html body.deck-mobile .deck-editor-meta {
    display: none;
}

html body.deck-mobile .deck-mobile-add-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    width: 36px;
    height: 36px;
    padding: 0;

    background: #ffffff;
    border: 1px solid #e5e5e3;
    border-radius: 999px;

    color: #1f1f1f;

    cursor: pointer;
}

html body.deck-mobile .deck-mobile-add-button svg {
    width: 17px;
    height: 17px;
}

html body.deck-mobile .deck-mobile-add-button[aria-expanded="true"] {
    background: #f3f3f2;
}

/* Undo | Redo: one pill split in two, same height/border as the "+" */
html body.deck-mobile .deck-mobile-history {
    display: inline-flex;
    flex-shrink: 0;

    height: 36px;
    padding: 0 2px;

    background: #ffffff;
    border: 1px solid #e5e5e3;
    border-radius: 999px;

    box-sizing: border-box;
}

html body.deck-mobile .deck-mobile-history-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 100%;
    padding: 0;

    background: transparent;
    border: none;
    border-radius: 999px;

    color: #1f1f1f;

    cursor: pointer;
}

html body.deck-mobile .deck-mobile-history-button + .deck-mobile-history-button {
    box-shadow: inset 1px 0 0 #ececec;
    border-radius: 0 999px 999px 0;
}

html body.deck-mobile .deck-mobile-history-button:first-child {
    border-radius: 999px 0 0 999px;
}

html body.deck-mobile .deck-mobile-history-button:active:not(:disabled) {
    background: #f3f3f2;
}

html body.deck-mobile .deck-mobile-history-button:disabled {
    color: #c4c4c2;
    cursor: default;
}

html body.deck-mobile .deck-mobile-history-button svg {
    width: 16px;
    height: 16px;
}

/* Slide background: a round button showing the current slide's colour */
html body.deck-mobile .deck-mobile-bg-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    width: 36px;
    height: 36px;
    padding: 0;

    background: #ffffff;
    border: 1px solid #e5e5e3;
    border-radius: 999px;

    cursor: pointer;
}

html body.deck-mobile .deck-mobile-bg-button[aria-expanded="true"] {
    background: #f3f3f2;
}

html body.deck-mobile .deck-mobile-bg-swatch {
    width: 18px;
    height: 18px;

    border-radius: 6px;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}

/* Freehand cutouts need precise drawing a phone screen can't give - the
   tool stays desktop-only. */
html body.deck-mobile #ribbonImageCutout {
    display: none !important;
}

html body.deck-mobile .deck-present-button {
    padding: 8px 14px;
    font-size: 13px;
}

html body.deck-mobile .deck-present-button span {
    display: inline;
}

html body.deck-mobile .deck-mobile-add-menu {
    min-width: 180px;
}

/* ---------- Slide scrollbar (stands in for the thumbnail rail) ---------- */

html body.deck-mobile .deck-mobile-scrollbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;

    height: 18px;
    margin-bottom: 4px;

    touch-action: none;
    cursor: pointer;
}

.deck-mobile-scrollbar-track {
    position: relative;
    flex: 1 1 auto;

    height: 5px;

    background: #ececea;
    border-radius: 999px;
}

.deck-mobile-scrollbar-thumb {
    position: absolute;
    top: 0;
    bottom: 0;

    min-width: 16px;

    background: #1f1f1f;
    border-radius: 999px;

    transition: left 0.2s ease, width 0.2s ease;
}

.deck-mobile-scrollbar.is-scrubbing .deck-mobile-scrollbar-thumb {
    transition: none;
}

.deck-mobile-scrollbar-count {
    flex-shrink: 0;
    min-width: 40px;

    color: #777772;

    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

/* ---------- Styling ribbon (replaces the top bar while open) ---------- */

html body.deck-mobile .deck-editor-ribbon {
    display: none;
}

html body.deck-mobile.deck-mobile-styling .deck-editor-topbar,
html body.deck-mobile.deck-mobile-styling .deck-mobile-scrollbar {
    display: none;
}

html body.deck-mobile.deck-mobile-styling .deck-editor-ribbon {
    display: flex;
    flex-shrink: 0;

    margin: 0 0 6px;

    border-radius: 12px;
}

html body.deck-mobile .ribbon-row-tools,
html body.deck-mobile .ribbon-row-draw {
    display: none !important;
}

/* One horizontally-scrolling line instead of wrapping onto several rows.
   Safe to scroll here (unlike desktop, see .deck-editor-ribbon) because
   every one of this row's own dropdowns is re-anchored position: fixed
   below it on mobile (see the next rule), so overflow no longer clips
   them. */
html body.deck-mobile .ribbon-row-context {
    flex-wrap: nowrap;
    gap: 10px;

    min-height: 48px;
    padding: 7px 10px 7px 0;

    overflow-x: auto;
    overflow-y: hidden;

    border-top: none;
    border-radius: 12px;

    scrollbar-width: none;
}

html body.deck-mobile .ribbon-row-context::-webkit-scrollbar {
    display: none;
}

html body.deck-mobile .ribbon-row-context > * {
    flex-shrink: 0;
}

html body.deck-mobile .deck-mobile-ribbon-done {
    position: sticky;
    left: 0;
    z-index: 2;

    display: inline-flex;
    align-items: center;
    align-self: stretch;

    margin: -7px 0;
    padding: 0 14px 0 12px;

    background: #fafaf9;
    border: none;
    border-right: 1px solid #ececea;
    border-radius: 12px 0 0 12px;

    color: #1f1f1f;

    font-family: inherit;
    font-size: 13px;
    font-weight: 800;

    cursor: pointer;
}

/* Where an open context-row menu lives on mobile - see
   liftDeckMobileRibbonMenu (deck_detail.html). iOS Safari clips a
   position: fixed menu to any sideways-scrolling ancestor, so a menu
   left inside the scrolling ribbon row showed up cut off, looking like
   it sat behind the slide. */
html body.deck-mobile .deck-mobile-menu-host {
    position: static;
}

/* A menu nested inside another (e.g. the shadow/gradient colour pickers
   inside Effects) is position: fixed too, but still gets clipped by its
   parent menu's own scrolling - so while one is open, the parent stops
   scrolling and lets it show. */
html body.deck-mobile .ribbon-dropdown-menu:has(.ribbon-dropdown-menu.is-open:not(.ribbon-color-menu-inline)) {
    overflow: visible !important;
}

/* Left/top are set by positionDeckMobileRibbonMenus (deck_detail.html)
   to sit just under the ribbon, near their own toggle. transform: none
   beats the deckdFlyIn open animation's leftover transform (same reason
   as .ribbon-color-menu.is-open above) so nested fixed menus still
   anchor to the viewport. */
html body.deck-mobile #ribbonContextRow .ribbon-dropdown-menu:not(.ribbon-color-menu-inline),
html body.deck-mobile .deck-mobile-menu-host .ribbon-dropdown-menu:not(.ribbon-color-menu-inline) {
    position: fixed !important;
    right: auto !important;
    bottom: auto !important;

    max-width: calc(100vw - 24px) !important;
    max-height: calc(100dvh - var(--deck-mobile-ribbon-bottom, 60px) - 12px) !important;

    overflow-y: auto !important;

    transform: none !important;
}

html body.deck-mobile #ribbonShapeMenu,
html body.deck-mobile #ribbonLayoutMenu,
html body.deck-mobile #ribbonFavouriteMenu {
    position: fixed !important;
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    transform: none !important;
}

/* ---------- Stage: the slide fills the remaining screen ---------- */

html body.deck-mobile .deck-editor-body {
    flex: 1 1 auto;
    flex-direction: row;
    align-items: stretch;
    gap: 0;

    min-height: 0;
}

html body.deck-mobile .deck-editor-rail {
    display: none !important;
}

/* Invisible spacer mirroring the layer panel on the right (136px +
   its 8px margin), so the slide stays centred on the screen rather
   than shifted left by the panel. Hidden while presenting, when the
   stage takes the whole screen anyway. */
html body.deck-mobile .deck-editor-body::before {
    content: "";
    flex: 0 0 144px;
}

html body.deck-mobile .deck-editor-body:has(.deck-editor-stage.is-presenting)::before {
    display: none;
}

/* ---------- Layers: a slim column right of the slide ----------
   Same #deckLayerPanel as desktop (tap a row to select, drag its handle
   to reorder - SortableJS's forceFallback works with touch), just
   compact: no hint line, smaller rows and thumbs. */

html body.deck-mobile .deck-editor-layer-panel {
    flex: 0 0 136px;
    width: 136px;
    max-height: none;
    min-height: 0;
    margin-left: 8px;
    gap: 6px;
}

html body.deck-mobile .deck-layer-panel-header h2 {
    margin: 0;
    padding: 2px 4px 0;
    font-size: 12.5px;
    font-weight: 600;
    color: #5c5c5c;
}

html body.deck-mobile .deck-layer-panel-header p {
    display: none;
}

html body.deck-mobile .deck-layer-list {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    gap: 2px;
    padding-right: 2px;
}

html body.deck-mobile .deck-layer-row {
    gap: 6px;
    padding: 3px 4px 3px 2px;
    border-radius: 8px;
}

html body.deck-mobile .deck-layer-row-handle {
    width: 14px;
    height: 26px;
}

html body.deck-mobile .deck-layer-row-handle svg {
    width: 12px;
    height: 12px;
}

html body.deck-mobile .deck-layer-thumb {
    width: 26px;
    height: 26px;
    border-radius: 6px;
}

html body.deck-mobile .deck-layer-thumb-text {
    font-size: 6px;
}

html body.deck-mobile .deck-layer-thumb-shape {
    width: 16px;
    height: 16px;
}

html body.deck-mobile .deck-layer-row-label {
    font-size: 12px;
}

html body.deck-mobile .deck-layer-row-menu-toggle {
    width: 22px;
    height: 22px;
}

/* Background colour / designs: a small Colour | Designs switch at the top
   of both lifted menus (see openDeckMobileBgPanel). */
html body.deck-mobile .deck-mobile-bg-tabs {
    display: flex;
    margin: 6px 6px 8px;
    padding: 2px;
    border-radius: 8px;
    background: #f0f0f0;
}

html body.deck-mobile .deck-mobile-bg-tab {
    flex: 1 1 0;
    padding: 5px 10px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #5c5c5c;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
}

html body.deck-mobile .deck-mobile-bg-tab.is-active {
    background: #ffffff;
    color: #1f1f1f;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

/* container-type: size so the slide can size itself to whichever of the
   stage's width/height runs out first (see the .deck-slide rule below) -
   plain width:100% + aspect-ratio would overflow a short landscape
   screen vertically. touch-action: none hands every gesture on the
   canvas to initialiseDeckMobileEditor's own touch handling (drag,
   resize, swipe between slides) instead of page scroll/zoom. */
html body.deck-mobile .deck-editor-stage {
    flex: 1 1 auto;

    width: 100%;
    height: auto;
    min-height: 0;
    padding: 0;

    background: transparent;
    border-radius: 0;

    container-type: size;
    touch-action: none;
}

html body.deck-mobile .deck-editor-stage:not(.is-presenting) .deck-slide {
    width: min(100cqw, 100cqh * var(--deck-ratio-num, 1.777778));
    max-width: none;

    border-radius: 10px;
    box-shadow: 0 0 0 1px #ececea, 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* Presenting on a phone: the whole screen, edge to edge. The safe-area
   padding keeps the slide clear of the notch, rounded corners and home
   indicator (the page uses viewport-fit=cover, so a fixed inset: 0 box
   runs underneath all three) - cqw/cqh measure the padded content box,
   so the slide sizes itself to what's actually unobstructed. */
html body.deck-mobile .deck-editor-stage.is-presenting {
    /* Explicit 100dvh, not height: auto with inset: 0 - the two size
       the same, but only with this does iPhone Safari collapse its
       search bar while presenting (confirmed on a real iPhone; with
       height: auto the bar stayed put). */
    height: 100vh;
    height: 100dvh;
    padding:
        env(safe-area-inset-top, 0px)
        env(safe-area-inset-right, 0px)
        env(safe-area-inset-bottom, 0px)
        env(safe-area-inset-left, 0px);

    background: var(--deck-present-bg, #ffffff);
}

/* The page behind the presentation takes the same colour too (set by
   syncDeckPresentBackdrop in deck_detail.html), since Safari paints its
   status bar and toolbar areas with it - otherwise they show as white
   strips above and below the slide. */
html.deck-presenting-root,
html.deck-presenting-root body,
html.deck-presenting-root body.deck-mobile .deck-editor-page {
    background: var(--deck-present-bg, #ffffff) !important;
}

/* .deck-editor-page is position: fixed, which makes it a stacking
   context of its own - the stage's z-index only counts inside it, so
   lift the page itself above everything else (the portrait "turn
   sideways" card, toasts) for as long as a presentation is running. */
html body.deck-mobile .deck-editor-page:has(.deck-editor-stage.is-presenting) {
    z-index: 999999;
}

/* Turning the phone upright mid-presentation (e.g. passing it to
   someone) shows the slide letterboxed rather than the editor's
   "turn your phone sideways" card. */
html body.deck-mobile:has(.deck-editor-stage.is-presenting) .deck-mobile-rotate {
    display: none !important;
}

/* No hover on a phone - keep the exit button showing while presenting,
   pulled in from the notch/rounded corner, and quiet enough not to
   distract from the slide. */
html body.deck-mobile .deck-editor-stage.is-presenting .deck-present-exit {
    top: calc(10px + env(safe-area-inset-top, 0px));
    right: calc(10px + env(safe-area-inset-right, 0px));
    z-index: 2;

    width: 36px;
    height: 36px;

    /* A dark disc behind the white X so it stays visible on any slide
       colour, light or dark. */
    background: rgba(0, 0, 0, 0.35);

    opacity: 1;
    pointer-events: auto;
}

html body.deck-mobile .deck-editor-stage.is-presenting .deck-slide.is-active {
    /* 2px short of the screen on each axis, so the 1px outline below
       never lands off-screen (it used to vanish top and bottom in
       landscape, where the slide is full height). */
    --deck-present-slide-w: min(100cqw - 4px, (100cqh - 4px) * var(--deck-ratio-num, 1.777778));

    width: 100%;
    max-width: var(--deck-present-slide-w);

    /* Same rounding as the desktop slide (16px at its 780px design
       width), scaled to the presented size, with the content clipped to
       it - so the outline traces the slide's own rounded edge instead
       of drawing a square box around it. */
    border-radius: calc(var(--deck-present-slide-w) * 16 / 780);
    overflow: hidden;

    /* Hairline edge so the slide still reads as a slide against the
       matching backdrop (syncDeckPresentBackdrop). Mid-grey at partial
       opacity shows on light and dark slide colours alike; box-shadow
       rather than border so it doesn't eat into the slide's size, and
       it follows border-radius. */
    box-shadow: 0 0 0 1px rgba(128, 128, 128, 0.35);
}

/* Swipe feedback: the slide follows the finger a little while swiping,
   then the next one slides in from the side it came from. */
html body.deck-mobile .deck-slide.is-swipe-settling {
    transition: transform 0.2s ease;
}

html body.deck-mobile .deck-slide.deck-slide-enter-next {
    animation: deckMobileSlideEnterNext 0.24s ease-out;
}

html body.deck-mobile .deck-slide.deck-slide-enter-prev {
    animation: deckMobileSlideEnterPrev 0.24s ease-out;
}

@keyframes deckMobileSlideEnterNext {
    from { opacity: 0.4; transform: translateX(14%); }
    to { opacity: 1; transform: none; }
}

@keyframes deckMobileSlideEnterPrev {
    from { opacity: 0.4; transform: translateX(-14%); }
    to { opacity: 1; transform: none; }
}

/* ---------- Canva-style mini menu beside a selection ---------- */

html body.deck-mobile .deck-mobile-float-menu.is-visible {
    position: absolute;
    z-index: 1500;

    display: flex;
    align-items: center;
    gap: 2px;

    padding: 4px;

    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05), 0 10px 28px rgba(0, 0, 0, 0.16);
}

html body.deck-mobile .deck-editor-stage.is-touch-dragging .deck-mobile-float-menu,
html body.deck-mobile .deck-editor-stage.is-presenting .deck-mobile-float-menu {
    display: none;
}

.deck-mobile-float-menu button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;
    padding: 0;

    background: transparent;
    border: none;
    border-radius: 9px;

    color: #1f1f1f;

    font-family: inherit;

    cursor: pointer;
}

.deck-mobile-float-menu button:active,
.deck-mobile-float-menu button.is-active {
    background: #f3f3f2;
}

.deck-mobile-float-menu button svg {
    width: 18px;
    height: 18px;
}

.deck-mobile-float-menu .deck-mobile-float-delete {
    color: #b3392c;
}

.deck-mobile-float-menu-divider {
    width: 1px;
    height: 20px;
    margin: 0 2px;

    background: #ececea;
}

/* ---------- Portrait: ask for landscape ---------- */

@media (orientation: portrait) and (pointer: coarse) {
    html body.deck-mobile .deck-mobile-rotate {
        position: fixed;
        inset: 0;
        z-index: 3000;

        display: flex;
        align-items: center;
        justify-content: center;

        padding: 24px;

        background: #fafaf9;
    }
}

.deck-mobile-rotate-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;

    max-width: 300px;

    text-align: center;
}

.deck-mobile-rotate-card h2 {
    margin: 6px 0 0;

    color: #1f1f1f;

    font-size: 20px;
    font-weight: 800;
}

.deck-mobile-rotate-card p {
    margin: 0 0 10px;

    color: #777772;

    font-size: 14px;
}

.deck-mobile-rotate-icon {
    width: 44px;
    height: 44px;

    color: #1f1f1f;

    animation: deckMobileRotateHint 2.4s ease-in-out infinite;
}

@keyframes deckMobileRotateHint {
    0%, 30% { transform: rotate(0deg); }
    55%, 85% { transform: rotate(-90deg); }
    100% { transform: rotate(0deg); }
}

/* =========================================================================
   ACCOUNT DROPDOWN - quiet menu rows (logged-in only)
   =========================================================================
   Plain icon + label rows with a soft hover and hairline dividers, in
   place of the filled pill buttons. The logged-out Log in / Sign up
   CTAs keep their pill styling (.nav-dropdown-button) untouched. */

html body .site-navbar .nav-account-dropdown.nav-account-dropdown-menu {
    padding: 6px !important;
}

html body .nav-account-dropdown-menu .nav-profile-row {
    margin: 0 !important;
    padding: 8px 10px !important;
}

html body .nav-account-dropdown-menu .nav-profile-avatar {
    width: 34px !important;
    height: 34px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
}

html body .nav-account-dropdown-menu .nav-profile-row strong {
    font-size: 14px !important;
    font-weight: 600 !important;
}

html body .nav-account-dropdown-menu .nav-profile-row span {
    margin-top: 1px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
}

html body .nav-account-menu-divider {
    height: 1px;
    margin: 5px 6px;
    background: rgba(0, 0, 0, 0.08);
}

html body .nav-account-menu-item {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;

    width: 100% !important;
    padding: 7px 10px !important;

    border-radius: 8px !important;

    background: transparent !important;
    color: #1f1f1f !important;

    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
    text-decoration: none !important;

    transition: background-color 0.12s ease !important;
}

html body .nav-account-menu-item svg {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0 !important;
    color: #5f5f5f !important;
}

html body .nav-account-menu-item:hover,
html body .nav-account-menu-item:focus-visible {
    background: rgba(0, 0, 0, 0.05) !important;
    outline: none !important;
}

/* Logged-out variant: same quiet rows, plus a welcome header and one
   solid Sign up button so the primary action still stands out. */

html body .nav-account-menu-welcome {
    padding: 10px 10px 10px;
    text-align: left !important;
}

html body .nav-account-menu-welcome strong {
    display: block;
    color: #1f1f1f;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

html body .nav-account-menu-welcome span {
    display: block;
    margin-top: 3px;
    color: #8a8a8a;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.4;
}

html body .nav-account-menu-cta {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;

    width: calc(100% - 12px) !important;
    margin: 0 6px 6px !important;
    padding: 10px 12px !important;

    border: none !important;
    border-radius: 10px !important;

    background: #1f1f1f !important;
    color: #ffffff !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 6px 16px rgba(0, 0, 0, 0.12) !important;

    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;

    transition: background-color 0.12s ease, transform 0.12s ease !important;
}

html body .nav-account-menu-cta svg {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0 !important;
}

html body .nav-account-menu-cta:hover,
html body .nav-account-menu-cta:focus-visible {
    background: #333333 !important;
    outline: none !important;
}

html body .nav-account-menu-cta:active {
    transform: scale(0.98) !important;
}

html body button.nav-account-menu-item {
    border: none !important;
    cursor: pointer !important;
    text-align: left !important;
}

/* "Log out" is a POST form (see logout_view) - the form itself adds no
   box, so its button sits in the menu exactly like the links around it. */
html body .nav-account-logout-form {
    display: contents;
}

html body .nav-account-menu-item-hint {
    margin-right: -4px;
    color: #9a9a9a;
    font-size: 12px;
    font-weight: 500;
}

html body .nav-account-menu-item.nav-account-menu-login {
    justify-content: center !important;
}

/* =========================================================================
   COLLAGE EDITOR: PHONES / TABLETS (900px and narrower)
   =========================================================================
   The frame is sized to fit the screen (fitCollageFrameOnMobile in
   collage_detail.html) and the item panel stops sitting underneath it:
   it becomes a sheet that slides up over the bottom navbar when a slot
   is tapped, or "Add photos" on a blank collage (openCollageProductSheet),
   and slides away again once an item is picked, or on a tap outside it.
   The cards inside keep their own styling. */

.collage-sheet-backdrop,
.collage-sheet-handle,
.collage-sheet-only {
    display: none;
}

@media (max-width: 900px) {
    .collage-sheet-only {
        display: flex;
    }

    .collage-add-photos-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        padding: 0;
        border: none;
        border-radius: 8px;
        background: #1f1f1f;
        color: #ffffff;
        font-family: inherit;
        font-size: 13.5px;
        font-weight: 500;
        white-space: nowrap;
        cursor: pointer;
    }

    .collage-add-photos-button svg {
        width: 17px;
        height: 17px;
    }

    .collage-sheet-only .collage-layers-button {
        margin-left: 4px;
    }

    /* Cutouts are desktop-only (see openCollageImageCutoutTool and the
       free canvas's collageCutoutPhoneNotice). The selected photo's
       desktop instructions ("drag a side handle... double-click...")
       go too - they don't apply to touch, and the extra line made the
       toolbar grow a row on selection, shoving the collage down behind
       the bottom navbar. */
    html body #collageImageCutout,
    html body #collageImageHint {
        display: none !important;
    }

    /* "Select a photo to edit it" is the same height as the selected
       photo's action buttons that replace it, so the toolbar - and the
       collage under it - never shift when a photo is selected. */
    html body #collageEmptyHint.is-visible {
        display: inline-flex;
        align-items: center;
        min-height: 34px;
    }

    /* A free canvas's layer manager: the same bottom sheet as the item
       panel, opened from the toolbar's Layers button. */
    html body .collage-editor-layout > #collageLayerPanel {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        z-index: 1500;

        display: flex;
        flex-direction: column;
        width: auto;
        max-width: none;
        height: auto;
        max-height: min(60dvh, 520px);
        margin: 0;
        padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0px));
        border: none;
        border-radius: 20px 20px 0 0;
        background: #fafaf9;
        box-shadow: 0 -12px 40px rgba(31, 31, 31, 0.16);
        box-sizing: border-box;

        transform: translateY(105%);
        visibility: hidden;
        transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.28s;
    }

    html body .collage-editor-layout > #collageLayerPanel.is-sheet-open {
        transform: none;
        visibility: visible;
        transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s;
    }

    html body .collage-editor-layout > #collageLayerPanel .deck-layer-list {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        overflow-y: auto;
    }

    html body .collage-editor-frame,
    html body .collage-slot-selection-ring {
        margin: 0 auto;
    }

    .collage-sheet-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1490;
        background: rgba(31, 31, 31, 0.32);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.22s ease;
    }

    .collage-sheet-backdrop.is-visible {
        opacity: 1;
        pointer-events: auto;
    }

    /* Above the floating bottom navbar (z-index 1400) and its backdrop. */
    html body .collage-product-panel {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        z-index: 1500;

        display: flex;
        flex-direction: column;
        max-height: min(72dvh, 620px);
        padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0px));
        border: none;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -12px 40px rgba(31, 31, 31, 0.16);
        box-sizing: border-box;

        transform: translateY(105%);
        visibility: hidden;
        transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.28s;
    }

    html body .collage-product-panel.is-sheet-open {
        transform: none;
        visibility: visible;
        transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s;
    }

    /* Grab handle across the top; tapping it closes the sheet too. */
    .collage-sheet-handle {
        display: block;
        flex: none;
        width: 44px;
        height: 5px;
        margin: 2px auto 12px;
        padding: 0;
        border: none;
        border-radius: 999px;
        background: #d9d9d9;
        cursor: pointer;
    }

    /* The lists inside scroll within the sheet rather than setting their
       own fixed heights. */
    html body .collage-product-panel .collage-product-panel-grid,
    html body .collage-product-panel .collage-product-panel-boards-list {
        flex: 1 1 auto;
        min-height: 0;
        height: auto;
        max-height: none;
        overflow-y: auto;
    }

    /* Nothing scrolls behind the sheet while it's open. */
    body.collage-sheet-open {
        overflow: hidden;
    }
}

/* =========================================================================
   COLLAGE SLOTS: REPOSITION A PHOTO (pan / zoom)
   =========================================================================
   A filled slot shows two small buttons side by side in its corner -
   reposition and remove (x). Reposition puts that one slot into adjust
   mode (startCollageSlotAdjust in collage_detail.html): drag to move,
   pinch / scroll / +- to zoom, with a small Reset / Done bar over the
   bottom of the collage. */

.collage-slot-actions {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 2;

    display: flex;
    gap: 4px;

    opacity: 0;
    transition: opacity 0.15s ease;
}

.collage-editor-frame .collage-slot-button:hover .collage-slot-actions,
.collage-editor-frame .collage-slot-button:focus-visible .collage-slot-actions {
    opacity: 1;
}

/* Touch screens have no hover: show them on the selected slot instead. */
@media (hover: none) {
    .collage-editor-frame .collage-slot-button.is-active-slot .collage-slot-actions {
        opacity: 1;
    }
}

/* Both buttons share the remove button's look; inside the group they're
   laid out by flex rather than each pinned to the corner. */
.collage-slot-actions .collage-slot-action {
    position: static;
    opacity: 1;

    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;

    background: rgba(17, 17, 17, 0.65);
    border-radius: 50%;
    color: #ffffff;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease;
}

.collage-slot-actions .collage-slot-action:hover {
    background: rgba(17, 17, 17, 0.85);
}

.collage-slot-pan svg {
    width: 13px;
    height: 13px;
}

/* Adjusting: the slot being repositioned is outlined and takes the
   gestures; the buttons step aside so the whole photo can be grabbed. */
.collage-editor-frame .collage-slot-button.is-adjusting {
    z-index: 3;
    cursor: grab;
    touch-action: none;
}

.collage-editor-frame .collage-slot-button.is-adjusting:active {
    cursor: grabbing;
}

.collage-editor-frame .collage-slot-button.is-adjusting .collage-slot-inner {
    box-shadow: inset 0 0 0 2px #ffffff, 0 0 0 2px #1f1f1f;
}

.collage-editor-frame .collage-slot-button.is-adjusting .collage-slot-actions {
    display: none;
}

/* While one slot is being adjusted the others dim back slightly. */
.collage-editor-frame.is-adjusting .collage-slot-button:not(.is-adjusting) {
    opacity: 0.55;
    transition: opacity 0.15s ease;
}

.collage-adjust-bar {
    position: absolute;
    left: 50%;
    bottom: 12px;
    z-index: 20;
    transform: translateX(-50%);

    display: flex;
    align-items: center;
    gap: 8px;
    max-width: calc(100% - 24px);
    padding: 6px 6px 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 24px rgba(31, 31, 31, 0.18);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-sizing: border-box;
}

.collage-adjust-bar[hidden] {
    display: none;
}

.collage-adjust-bar-hint {
    overflow: hidden;
    color: #5c5c5c;
    font-size: 12.5px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.collage-adjust-bar-button {
    flex: none;
    height: 30px;
    padding: 0 12px;
    border: 1px solid #d9d9d9;
    border-radius: 999px;
    background: #ffffff;
    color: #1f1f1f;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.collage-adjust-bar-button.is-primary {
    border-color: #1f1f1f;
    background: #1f1f1f;
    color: #ffffff;
}

@media (max-width: 420px) {
    .collage-adjust-bar-hint {
        display: none;
    }
}

/* Desktop collage editor: the collage is sized by the screen
   (syncCollageEditorFrameHeight in collage_detail.html) and the item
   panel is set to the same height, so its lists fill the rest of it and
   scroll inside, rather than using their own fixed heights. */
@media (min-width: 901px) {
    html body .collage-product-panel {
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
    }

    html body .collage-product-panel .collage-product-panel-grid,
    html body .collage-product-panel .collage-product-panel-boards-list {
        flex: 1 1 auto;
        min-height: 0;
        height: auto;
        max-height: none;
    }

    html body .collage-editor-layout > #collageLayerPanel {
        box-sizing: border-box;
        max-height: none;
    }
}

/* Collage Draw mode on phones / tablets: the drawing's own actions get a
   row to themselves above the brush / size / colour row - bin, back,
   forward on the left, Finish and x on the right - and the collage's
   regular toolbar row steps aside while drawing, so the toolbar stays
   two rows tall and the collage under it doesn't move. */
@media (max-width: 900px) {
    html body #collageRibbon.is-draw-mode > .ribbon-row:not(.ribbon-row-draw) {
        display: none !important;
    }

    html body #collageDrawModeRow {
        flex-wrap: wrap !important;
        align-items: center;
        row-gap: 10px;
    }

    html body #collageDrawModeRow > .ribbon-group-right {
        order: -1;
        display: flex !important;
        flex: 0 0 100%;
        align-items: center;
        justify-content: flex-start;
        gap: 4px;
        margin: 0 !important;
    }

    html body #collageDrawModeRow > .ribbon-group-right > .ribbon-divider {
        display: none;
    }

    html body #collageDrawClearBtn { order: 1; }
    html body #collageDrawUndoBtn { order: 2; }
    html body #collageDrawRedoBtn { order: 3; }

    html body #collageDrawDoneBtn {
        order: 4;
        margin-left: auto !important;
    }

    html body #collageDrawCancelBtn { order: 5; }

    /* Brush, size and colour fit on one line below the actions: tighter
       gaps, and no "10px" readout (the slider shows the size). */
    html body #collageDrawModeRow {
        column-gap: 8px !important;
    }

    html body #collageDrawModeRow .deckd-draw-size-control input[type="range"] {
        width: 90px;
        min-width: 0;
    }

    html body #collageDrawSizeLabel {
        display: none;
    }
}

/* Free-canvas collage: moving, resizing and rotating are pointer-event
   drags (collage_detail.html), so on a touch screen the canvas's photos
   and the selection handles have to claim the gesture rather than let
   the browser scroll the page with it. */
.collage-editor-frame .collage-element,
.collage-editor-frame-wrap .slide-selection-overlay,
.collage-editor-frame-wrap .slide-selection-overlay * {
    touch-action: none;
}

/* Touch screens: the collage's resize / rotate handles are drawn a little
   bigger and each gets an invisible touch area well beyond its visible
   edge, so a fingertip can grab them (they're sized for a mouse). */
@media (pointer: coarse) {
    .collage-editor-frame-wrap .slide-selection-overlay .slide-element-resize-handle,
    .collage-editor-frame-wrap .slide-selection-overlay .slide-element-resize-handle-right,
    .collage-editor-frame-wrap .slide-selection-overlay .slide-element-resize-handle-left,
    .collage-editor-frame-wrap .slide-selection-overlay .slide-element-resize-handle-top,
    .collage-editor-frame-wrap .slide-selection-overlay .slide-element-resize-handle-bottom,
    .collage-editor-frame-wrap .slide-selection-overlay .slide-element-rotate-handle {
        scale: 1.4;
    }

    .collage-editor-frame-wrap .slide-selection-overlay .slide-element-resize-handle::after,
    .collage-editor-frame-wrap .slide-selection-overlay .slide-element-resize-handle-right::after,
    .collage-editor-frame-wrap .slide-selection-overlay .slide-element-resize-handle-left::after,
    .collage-editor-frame-wrap .slide-selection-overlay .slide-element-resize-handle-top::after,
    .collage-editor-frame-wrap .slide-selection-overlay .slide-element-resize-handle-bottom::after,
    .collage-editor-frame-wrap .slide-selection-overlay .slide-element-rotate-handle::after {
        content: "";
        position: absolute;
        inset: -12px;
        border-radius: 50%;
    }
}

/* "Add an item slide" picker on phones / small tablets (and the phone
   deck editor in landscape): its desktop grid is three fixed 273px
   columns (~860px), much wider than the screen, so it scrolled sideways
   as well as down and the cards felt loose. Here the card fits the
   screen, the grid fills it with as many even columns as fit and only
   scrolls up and down, and every card is the same shape (photo cropped
   to fill it) so rows line up. */
@media (max-width: 960px) {
    html body #deckProductPickerModal .deck-product-picker-modal-card {
        display: flex;
        flex-direction: column;
        width: min(640px, calc(100vw - 24px)) !important;
        max-width: none !important;
        max-height: calc(100dvh - 24px);
        padding: 18px !important;
        box-sizing: border-box;
    }

    html body #deckProductPickerModal .deck-product-picker-subtitle {
        margin-bottom: 12px;
    }

    html body #deckProductPickerModal .deck-product-picker-grid {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
        grid-auto-rows: auto;
        align-content: start;
        gap: 10px;
        padding: 0 2px 2px 0;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        touch-action: pan-y;
    }

    /* 4:5 by padding (padding-bottom is a % of the width) rather than
       aspect-ratio: the card's overflow: hidden lets the grid treat an
       aspect-ratio box as zero-height when sizing rows, so the rows just
       split the modal's height and cards spilled into the next row. */
    html body #deckProductPickerModal .deck-product-picker-card {
        width: auto;
        min-width: 0;
        height: 0;
        padding: 0 0 125%;
        aspect-ratio: auto;
        margin: 0;
        border-radius: 12px;
    }

    /* Pinned to the card rather than sizing it, so the card's own 4:5
       shape alone sets each grid row's height (with the photo in the
       flow, rows were sized from the photos and the next row overlapped
       the one above). */
    html body #deckProductPickerModal .deck-product-picker-card > img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        max-width: none;
        object-fit: cover;
    }
}

/* Phone landscape is wide but very short - keep the header compact. */
@media (max-height: 500px) {
    html body.deck-mobile #deckProductPickerModal .deck-product-picker-subtitle {
        display: none;
    }
}

/* ---------- Create collage: shape step ---------- */
.collage-create-step[hidden],
.deck-create-step[hidden] {
    display: none;
}

.collage-shape-choices {
    display: flex;
    justify-content: center;
    gap: 16px;

    padding: 4px;
}

.collage-shape-option {
    flex: 1 1 0;
    max-width: 170px;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;

    padding: 14px 8px 12px;

    background: #ffffff;
    border: 2px solid #ddddda;
    border-radius: 14px;

    font-family: inherit;
    cursor: pointer;

    transition: border-color 0.15s ease, background 0.15s ease;
}

.collage-shape-option:hover,
.collage-shape-option:focus-visible {
    background: #f7f7f6;
    border-color: #1f1f1f;
    outline: none;
}

.collage-shape-option-stage {
    height: 96px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 8px;
}

.collage-shape-option-shape {
    height: 100%;
    max-width: 100%;

    background: #f1f1ef;
    border: 2px solid #1f1f1f;
    border-radius: 8px;
}

.collage-shape-option strong {
    color: #1f1f1f;

    font-size: 14px;
    font-weight: 600;
}

.collage-shape-option-hint {
    color: #8a8a85;

    font-size: 11.5px;
    line-height: 1.25;
    text-align: center;
}

.collage-create-back {
    width: 26px;
    height: 26px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-right: 6px;
    padding: 0;

    background: #f1f1ef;
    border: none;
    border-radius: 50%;

    color: #1f1f1f;
    vertical-align: middle;
    cursor: pointer;
}

.collage-create-back svg {
    width: 15px;
    height: 15px;
}

/* The deck size step has four cards, so they wrap two by two. */
.deck-size-choices {
    flex-wrap: wrap;
}

.deck-size-choices .collage-shape-option {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
    max-width: none;
}

.deck-size-choices .collage-shape-option-stage {
    height: 64px;
}


/* Card titles (board tiles, deck and collage cards) use the landing page's
   display serif, Fraunces (loaded app-wide from fonts-landing.css). Only
   its 380/450 weights are shipped, so titles stay at 400 - a bolder weight
   would be a faked bold. */
:root {
    --card-title-font: 'Fraunces', 'Iowan Old Style', Georgia, serif;
}

.deckd-board-tile-title {
    font-family: var(--card-title-font);
    font-weight: 400;
}

/* The Instagram-style colour dropper (beginEyedropperSession and
   deckdPickColorFromStage in base.html): an upside-down teardrop whose point is the exact spot being
   sampled and whose round top is filled with that colour. The element is
   positioned with its bottom-centre on the sampled point (hence the
   negative margins) and holds no visuals itself: the drop is a rounded
   square turned 45deg (::before) so one sharp corner points straight
   down at that spot. Fixed to the screen so the photo's edges can't clip
   it. */
html body .deckd-color-dropper {
    --dropper-color: #f3f3f3;

    position: fixed !important;
    z-index: 2147483000 !important;
    /* 48px = where the turned square's bottom corner lands:
       20px (half its size) + 20px x sqrt(2) */
    width: 40px !important;
    height: 48px !important;
    margin: -48px 0 0 -20px !important;
    cursor: grab !important;
    touch-action: none !important;
    transform-origin: 50% 100% !important;
    transition: transform 0.12s ease !important;
}

html body .deckd-color-dropper::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 40px !important;
    height: 40px !important;
    border: 3px solid #ffffff !important;
    border-radius: 50% 50% 0 50% !important;
    background: var(--dropper-color) !important;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.1) !important;
    box-sizing: border-box !important;
    transform: rotate(45deg) !important;
}

/* Grows a little while dragged, from its point, so the sampled spot
   doesn't move */
html body .deckd-color-dropper.is-dragging {
    cursor: grabbing !important;
    transform: scale(1.12) !important;
}

/* Instruction pill for the deck/collage eyedropper (deckdPickColorFromStage
   in base.html), fixed to the top of the screen. Taps pass through. */
html body .deckd-stage-eyedropper-hint {
    position: fixed !important;
    top: 72px !important;
    left: 50% !important;
    z-index: 2147482000 !important;
    padding: 6px 12px !important;
    border-radius: 999px !important;
    background: rgba(31, 31, 31, 0.82) !important;
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    transform: translateX(-50%) !important;
    pointer-events: none !important;
}

/* While the teardrop is out, the stage takes a crosshair and no scrolling */
html body .is-picking-stage-color,
html body .is-picking-stage-color * {
    cursor: crosshair !important;
    touch-action: none !important;
}
