/* ========================================
   FlippinGridz - Main Stylesheet
   Playful, Enthusiastic, Helpful, Engaging
   ======================================== */

@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css');

/* ========== Icon spacing (Instagram/Facebook-style) ========== */
.nav-menu a i.fa-solid,
.nav-menu a i.fa-regular,
.nav-menu a i.fa-brands,
.btn i.fa-solid,
.btn i.fa-regular,
.action-btn i {
    margin-right: 0.4em;
    opacity: 0.95;
}
.nav-menu a:only-child i,
.btn.icon-only i { margin-right: 0; }
.btn.icon-only { padding: 0.6rem 0.9rem; }
.tile-stats span i { margin-right: 0.25em; }
.tile-action-btn i { margin-right: 0.35em; }
.dashboard-tab i { margin-right: 0.4em; }
.content-section h2 i { margin-right: 0.35em; }
.action-card h3 i { margin-right: 0.35em; }
h1 i.fa-solid, h1 i.fa-regular { margin-right: 0.35em; }
.close-modal i { font-size: 1.25em; }

/* HOT TODAY grid card: square crop; if 0027.png is a 2-up composite, left half matches other grid tiles */
.hot-today-thumb {
    aspect-ratio: 1;
    border-radius: 16px;
    overflow: hidden;
    background: var(--cloud-white, #f5f5f5);
    margin-bottom: 1rem;
}
.hot-today-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left center;
    display: block;
}
/* Standalone art (0028.png): centre in the square */
.hot-today-thumb--solo img {
    object-position: center center;
}

/* ========== CSS Variables (Brand Colors) ========== */
:root {
    /* Primary Colors */
    --patch-pink: #FF4F89;
    --sky-pop-blue: #4DA8FF;
    --sunny-square-yellow: #FFD447;
    --mint-pop: #55E6A5;
    
    /* Pastel / Softer variants (bright, not in-your-face) */
    --pastel-pink: #FFB8D0;
    --pastel-blue: #A8D4FF;
    --pastel-yellow: #FFE9A8;
    --pastel-mint: #B8F5D8;
    --pastel-lavender: #E0D4F7;
    --pastel-peach: #FFD9C4;
    
    /* Neutral Colors */
    --soft-charcoal: #373737;
    --slate-grey: #555;
    --cloud-white: #F9F9F9;
    
    /* Additional Colors */
    --white: #FFFFFF;
    --black: #000000;
    
    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --font-secondary: 'Outfit', sans-serif;
    
    /* Section spacing - lots of white space */
    --section-padding: 5rem 2rem;
    --section-padding-lg: 6rem 2rem;
    --container-max: 1200px;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-xxl: 3rem;

    /* Grid (5 columns across on desktop) */
    --grid-columns-desktop: 5;
    --grid-columns-tablet: 4;
    --grid-columns-mobile: 2;
    --grid-gap: 2px;
    --tile-size-desktop: 120px;
    --tile-size-tablet: 128px;
}

/* ========== Google Fonts Import ========== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700&display=swap');

/* ========== Reset & Base Styles ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background-color: var(--cloud-white);
    color: var(--soft-charcoal);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
}

/* ========== Typography ========== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    color: var(--soft-charcoal);
    line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    color: var(--slate-grey);
    margin-bottom: var(--spacing-md);
}

a {
    color: var(--sky-pop-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--patch-pink);
}

/* ========== Header & Navigation ========== */
.header {
    background-color: var(--white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: var(--spacing-md) 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-secondary);
    font-size: 1.75rem;
    color: var(--patch-pink);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.logo-img {
    height: 80px;
    width: auto;
    display: block;
    object-fit: contain;
    transition: transform 0.3s ease;
}
.logo:hover .logo-img {
    transform: scale(1.05);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--patch-pink), var(--sky-pop-blue));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    transition: transform 0.3s ease;
}
.logo:hover .logo-icon {
    transform: rotate(-6deg) scale(1.05);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

.nav-menu > li {
    margin: 0;
}
.nav-menu li a {
    padding: 0.5rem 0.25rem;
}
.nav-menu a {
    color: var(--soft-charcoal);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--patch-pink);
}

.nav-dropdown {
    position: relative;
}
.nav-dropdown:hover .nav-dropdown-menu {
    display: block;
}
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-radius: 12px;
    list-style: none;
    padding: var(--spacing-sm);
    min-width: 200px;
    max-height: min(70vh, 460px);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    z-index: 1001;
    margin-top: var(--spacing-xs);
}
.nav-dropdown-menu--wide {
    min-width: 280px;
}
.nav-dropdown-menu li a {
    display: block;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 8px;
    color: var(--soft-charcoal);
}
.nav-dropdown-menu li a:hover {
    background: var(--pastel-pink);
    color: var(--soft-charcoal);
}
.nav-dropdown-menu li a.nav-join-cta {
    margin-top: 0.35rem;
    text-align: center;
    white-space: normal;
    line-height: 1.25;
    font-size: 0.85rem;
}
.nav-dropdown-menu li a.nav-join-cta:hover {
    background: var(--patch-pink);
    color: white;
}

/* ========== Mobile / tablet navigation (hamburger) ========== */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 48px;
    height: 48px;
    padding: 0;
    border: none;
    border-radius: 12px;
    background: var(--cloud-white);
    cursor: pointer;
    color: var(--soft-charcoal);
    transition: background 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.nav-toggle:hover {
    background: var(--pastel-pink);
    color: var(--soft-charcoal);
}

.nav-toggle:focus-visible {
    outline: 2px solid var(--sky-pop-blue);
    outline-offset: 2px;
}

.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 3px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

body.nav-open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav-backdrop {
    display: none;
}

/* Hamburger + drawer: viewports where horizontal nav does not fit */
@media (max-width: 1100px) {
    .nav-toggle {
        display: flex;
    }

    .nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1001;
        background: rgba(55, 55, 55, 0.45);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s ease, visibility 0.25s ease;
    }

    body.nav-open .nav-backdrop {
        opacity: 1;
        visibility: visible;
    }

    body.nav-open {
        overflow: hidden;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        z-index: 1002;
        width: min(100%, 320px);
        max-width: 100vw;
        height: 100vh;
        height: 100dvh;
        margin: 0;
        padding: calc(5rem + env(safe-area-inset-top, 0)) 1.25rem 2rem;
        background: var(--white);
        box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: translateX(100%);
        transition: transform 0.28s ease;
    }

    body.nav-open .main-nav {
        transform: translateX(0);
    }

    .main-nav .nav-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
    }

    .main-nav .nav-menu > li {
        width: 100%;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }

    .main-nav .nav-menu > li > a,
    .main-nav .nav-menu > li > .btn {
        width: 100%;
        justify-content: flex-start;
        text-align: left;
        padding: 0.85rem 0;
        border-radius: 0;
        box-shadow: none;
    }

    .main-nav .nav-menu .btn {
        margin-top: 0.35rem;
        margin-bottom: 0.35rem;
        border-radius: 10px;
        justify-content: center;
        text-align: center;
    }

    .main-nav #userNav {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.5rem 0;
    }

    .main-nav #userNav.hidden {
        display: none !important;
    }

    .main-nav #userNav .btn {
        width: 100%;
    }

    .nav-dropdown:hover .nav-dropdown-menu {
        display: none;
    }

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

    .main-nav .nav-dropdown-menu {
        position: static;
        box-shadow: none;
        border-radius: 8px;
        margin: 0 0 0.5rem;
        max-height: min(50vh, 320px);
        padding: 0;
        background: var(--cloud-white);
    }

    .main-nav .nav-dropdown > a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
    }

    .main-nav .nav-dropdown > a::after {
        content: '\f078';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        font-size: 0.65rem;
        opacity: 0.55;
    }

    .main-nav .nav-dropdown.is-open > a::after {
        transform: rotate(180deg);
    }
}

/* ========== Buttons – App-wide ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    min-height: 44px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
    border: none;
    font-family: var(--font-primary);
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.btn:active {
    transform: scale(0.98);
}

.btn:focus-visible {
    outline: 2px solid var(--sky-pop-blue);
    outline-offset: 2px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--patch-pink) 0%, #e03d75 100%);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(255, 79, 137, 0.35);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #e03d75 0%, #c93566 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 79, 137, 0.4);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 10px rgba(255, 79, 137, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--sky-pop-blue) 0%, #2d96f0 100%);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(77, 168, 255, 0.35);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #2d96f0 0%, #1a7ad9 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(77, 168, 255, 0.45);
}

.btn-secondary:active {
    transform: translateY(0) scale(0.98);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--patch-pink);
    color: var(--patch-pink);
    box-shadow: none;
}

.btn-outline:hover {
    background: rgba(255, 79, 137, 0.08);
    border-color: var(--patch-pink);
    color: #e03d75;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 79, 137, 0.2);
}

.btn-outline:active {
    transform: translateY(0) scale(0.98);
}

/* Small button variant */
.btn-sm {
    padding: 0.5rem 1rem;
    min-height: 36px;
    font-size: 0.875rem;
    border-radius: 10px;
}

/* Button in nav – slightly smaller; spacing from .nav-menu gap */
.nav-menu .btn {
    padding: 0.5rem 1rem;
    min-height: 38px;
    font-size: 0.9rem;
}

/* ========== Grid Layout (Pinterest-like) ========== */
.grid-container {
    max-width: 1220px;
    margin: 0 auto;
    padding: var(--spacing-lg);
}

/* Grid page – 5 columns */
.grid-page-main {
    padding: 2rem 0 4rem;
    background: var(--cloud-white);
}

.grid-page-header {
    max-width: 1220px;
    margin: 0 auto 2rem;
    padding: 0 var(--spacing-lg);
}

.grid-page-header h1 {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
}

.grid-page-desc {
    color: var(--slate-grey);
    font-size: 1.1rem;
}

.grid-container.grid-5col {
    max-width: 1400px;
}

.flippin-grid.grid-5col {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    width: 100%;
}

@media (max-width: 1200px) {
    .flippin-grid.grid-5col {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .flippin-grid.grid-5col {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .flippin-grid.grid-5col {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .flippin-grid.grid-5col {
        grid-template-columns: 1fr;
    }
}

.flippin-grid {
    display: grid;
    grid-template-columns: repeat(var(--grid-columns-desktop), 1fr);
    gap: var(--grid-gap);
    width: 100%;
}

/* Grid Cell/Tile */
.grid-cell {
    aspect-ratio: 1 / 1;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 8px;
    background-color: var(--cloud-white);
    display: flex;
    flex-direction: column;
}

.grid-cell:hover {
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Media fills upper area; caption strip stays visible below (not clipped) */
.grid-cell-media {
    position: relative;
    flex: 1;
    min-height: 0;
    width: 100%;
    background: linear-gradient(135deg, var(--mint-pop), var(--sky-pop-blue));
}

.grid-cell-media img,
.grid-cell-media video,
.grid-cell-media iframe.tile-modal-video-embed {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tile-video-play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    font-size: 1rem;
}

.grid-cell--flipped .grid-cell-media {
    filter: grayscale(0.85) brightness(0.72);
}

.grid-cell--flipped .grid-cell-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(40, 40, 40, 0.28);
    z-index: 3;
    pointer-events: none;
}

.tile-flipped-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 7;
    background: rgba(30, 30, 30, 0.82);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
}

.tile-modal-media-wrap iframe.tile-modal-video-embed {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: inherit;
}

.grid-cell-media img {
    transition: opacity 0.2s ease;
}

.grid-cell.tile-image-loading .grid-cell-media img:not(.tile-image-loaded) {
    opacity: 0.35;
}

.grid-cell .grid-cell-media img.tile-image-loaded {
    opacity: 1;
}

.grid-cell-media .tile-overlay {
    z-index: 5;
}

.grid-cell-media .zone-badge {
    z-index: 6;
}

.grid-cell-placeholder {
    background: linear-gradient(135deg, var(--mint-pop), var(--sky-pop-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
}

.grid-scroll-sentinel {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 72px;
    padding: 1rem 0 2rem;
}

.grid-scroll-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--slate-grey);
    font-size: 0.9rem;
}

.grid-scroll-loading .spinner {
    width: 36px;
    height: 36px;
}

/* Zone Badges */
.zone-badge {
    position: absolute;
    top: var(--spacing-xs);
    right: var(--spacing-xs);
    background-color: rgba(255, 255, 255, 0.95);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.zone-badge.brand-showcase {
    color: var(--patch-pink);
}

.zone-badge.trending {
    color: var(--sunny-square-yellow);
    background-color: rgba(255, 212, 71, 0.2);
}

.zone-badge.griddy-pick {
    color: var(--sky-pop-blue);
}

.zone-badge.shuffle-zone {
    color: var(--soft-charcoal);
    background-color: rgba(255, 212, 71, 0.35);
}

/* ========== Grid Page – TikTok-style Vertical Feed (white theme) ========== */
body.grid-tiktok {
    background: #f5f5f5;
    overflow: hidden;
}

.grid-tiktok .header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: linear-gradient(180deg, rgba(255,255,255,0.97) 0%, rgba(255,255,255,0) 100%);
    padding: 0.75rem 1rem;
    box-shadow: none;
}

.grid-tiktok .header .nav-container {
    max-width: 100%;
}

@media (min-width: 1101px) {
    .grid-tiktok .header .nav-menu > li:not(:last-child):not(:nth-last-child(2)) {
        display: none;
    }
}

.grid-tiktok .header .logo span {
    color: var(--soft-charcoal);
}

.grid-tiktok .header .nav-menu a {
    color: var(--soft-charcoal);
}

.grid-tiktok .tiktok-feed-wrap {
    padding-top: 56px;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
}

.grid-tiktok .tiktok-feed {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.grid-tiktok .tiktok-slide {
    position: relative;
    min-height: 100vh;
    width: 100%;
    flex-shrink: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    background: #fff;
    cursor: pointer;
}

.grid-tiktok .tiktok-slide-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.grid-tiktok .tiktok-slide-media img,
.grid-tiktok .tiktok-slide-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.grid-tiktok .tiktok-slide-media video {
    background: #e8e8e8;
}

.grid-tiktok .tiktok-slide-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.5) 0%, transparent 40%, transparent 60%, rgba(0,0,0,0.2) 100%);
    pointer-events: none;
}

.grid-tiktok .tiktok-slide-actions {
    position: absolute;
    right: 12px;
    bottom: 100px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.grid-tiktok .tiktok-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--soft-charcoal);
    cursor: pointer;
    padding: 0;
    font-size: 0.8rem;
    text-shadow: 0 1px 2px rgba(255,255,255,0.8);
    transition: transform 0.2s ease;
}

.grid-tiktok .tiktok-action-btn:hover {
    transform: scale(1.1);
}

.grid-tiktok .tiktok-action-btn.tiktok-action-add {
    text-decoration: none;
}

.grid-tiktok a.tiktok-action-btn .tiktok-action-icon {
    background: var(--pastel-mint);
    color: var(--soft-charcoal);
}

.grid-tiktok .tiktok-action-btn .tiktok-action-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.grid-tiktok .tiktok-action-btn.love.active .tiktok-action-icon {
    background: var(--patch-pink);
    color: #fff;
}

.grid-tiktok .tiktok-slide-info {
    position: absolute;
    left: 16px;
    right: 80px;
    bottom: 24px;
    z-index: 10;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

.grid-tiktok .tiktok-slide-caption {
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.grid-tiktok .tiktok-slide-username {
    font-size: 0.85rem;
    opacity: 0.95;
    font-weight: 600;
}

.grid-tiktok .tiktok-zone-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 10;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255,255,255,0.9);
    color: var(--soft-charcoal);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.grid-tiktok .tiktok-feed .loading,
.grid-tiktok .tiktok-feed .empty-grid-msg {
    min-height: 100vh;
    background: #f5f5f5;
    color: var(--soft-charcoal);
}

.grid-tiktok .tiktok-feed .empty-grid-msg a {
    color: var(--patch-pink);
}

.grid-tiktok .footer {
    display: none;
}

/* Tile Overlay (on hover) */
.tile-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--spacing-md);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.grid-cell:hover .tile-overlay {
    opacity: 1;
}

/* Hide stats overlay until the tile image has loaded */
.grid-cell:not(:has(.tile-image-loaded)) .tile-overlay {
    opacity: 0 !important;
    pointer-events: none;
}

.tile-stats {
    display: flex;
    gap: var(--spacing-md);
    color: var(--white);
    font-size: 0.875rem;
    font-weight: 500;
}

.tile-stats span {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin: 5px;
}

.tile-action-btn {
    margin-top: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.95);
    color: var(--patch-pink);
    padding: 0.5rem 1rem;
    margin: 5px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.tile-action-btn:hover {
    background: var(--patch-pink);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(255, 79, 137, 0.4);
}

/* ========== Tile Modal/Overlay (Click to Enlarge) ========== */
.tile-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(26, 26, 32, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    overflow-y: auto;
    padding: 1.5rem;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.tile-modal.active {
    display: flex;
    opacity: 1;
}

.tile-modal-content {
    position: relative;
    background: var(--white);
    border-radius: 20px;
    max-width: 1100px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 300px;
    max-height: 88vh;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08);
    animation: tileModalIn 0.3s ease;
}
.tile-modal-front {
    display: contents;
}
.tile-modal-back {
    padding: 1rem;
    overflow: auto;
}
.fgz-modal-back-wrap {
    max-width: 560px;
    margin: 0 auto;
}

.tile-modal-media-wrap {
    position: relative;
    min-height: 280px;
    max-height: 88vh;
    background: linear-gradient(145deg, #f8f9fa 0%, var(--cloud-white) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes tileModalIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.tile-modal-media-wrap .tile-modal-image,
.tile-modal-media-wrap video.tile-modal-image {
    width: 100%;
    height: 100%;
    min-height: 280px;
    max-height: 88vh;
    object-fit: contain;
    display: block;
}

.tile-modal-image {
    width: 100%;
    height: 100%;
    min-height: 280px;
    max-height: 88vh;
    object-fit: contain;
    display: block;
}

.tile-modal video.tile-modal-image {
    min-height: 280px;
    max-height: 88vh;
}

.tile-cell-caption {
    flex-shrink: 0;
    padding: 0.25rem 0.4rem;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--soft-charcoal, #333);
    background: rgba(255, 255, 255, 0.97);
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.tile-modal-field-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--slate-grey, #555);
    margin: 0 0 0.25rem;
}

.tile-modal-caption,
.tile-modal-description {
    font-size: 0.95rem;
    color: var(--soft-charcoal, #333);
    margin-bottom: 0.75rem;
}

.tile-modal-description {
    white-space: pre-wrap;
    word-break: break-word;
}

.tile-modal-sidebar {
    padding: 1.25rem 1rem;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-left: 1px solid rgba(0, 0, 0, 0.06);
    min-width: 0;
}

.tile-modal-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.tile-modal .action-btn {
    flex: none;
    padding: 0.7rem 0.9rem;
    min-height: 42px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.tile-modal .action-btn:active {
    transform: scale(0.97);
}

.tile-modal .action-btn.love {
    background: linear-gradient(135deg, #ffe5ec 0%, #ffd4e5 100%);
    color: #c2185b;
}

.tile-modal .action-btn.love.active {
    background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(233, 30, 99, 0.35);
}

.tile-modal .action-btn.share {
    background: linear-gradient(135deg, #e8f4fd 0%, #d1e9fa 100%);
    color: #1565c0;
}

.tile-modal .action-btn.follow {
    background: linear-gradient(135deg, var(--mint-pop) 0%, #2e7d5a 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(85, 230, 165, 0.35);
}

.tile-modal .action-btn.flip {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--sunny-square-yellow) 0%, #f5c842 100%);
    color: var(--soft-charcoal);
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(255, 212, 71, 0.4);
}

.tile-modal .action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.tile-modal .action-btn.love:hover { box-shadow: 0 6px 16px rgba(233, 30, 99, 0.25); }
.tile-modal .action-btn.share:hover { box-shadow: 0 6px 16px rgba(33, 150, 243, 0.2); }
.tile-modal .action-btn.follow:hover { box-shadow: 0 6px 16px rgba(85, 230, 165, 0.35); }
.tile-modal .action-btn.flip:hover { box-shadow: 0 6px 18px rgba(255, 212, 71, 0.45); }

.tile-modal-comments {
    flex: 1;
    overflow-y: auto;
    min-height: 80px;
}

.tile-modal-comments .comments-heading {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--slate-grey);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.75rem;
}

.comment-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.9rem;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
}

.comment-author {
    font-weight: 600;
    color: var(--soft-charcoal);
    font-size: 0.95rem;
}

.comment-edit-btn {
    background: none;
    border: none;
    color: var(--slate-grey);
    cursor: pointer;
    padding: 0.25rem 0.4rem;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: color 0.2s, background 0.2s;
}

.comment-edit-btn:hover {
    color: var(--patch-pink);
    background: rgba(255, 79, 137, 0.1);
}

.comment-edited {
    font-size: 0.8rem;
    color: var(--slate-grey);
    font-weight: normal;
}

.comments-empty {
    color: var(--slate-grey);
    font-size: 0.9rem;
    padding: 0.5rem 0;
}

.comment-edit-inline {
    margin-top: 0.25rem;
    max-width: 100%;
    min-width: 0;
}

.comment-edit-inline .comment-edit-input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 0.5rem 0.6rem;
    border: 2px solid var(--cloud-white);
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    resize: vertical;
    min-height: 56px;
    max-height: 120px;
    margin-bottom: 0.5rem;
    overflow-wrap: break-word;
}

.comment-edit-inline .comment-edit-input:focus {
    outline: none;
    border-color: var(--patch-pink);
}

.comment-edit-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.comment-edit-actions .btn { padding: 0.4rem 0.75rem; font-size: 0.9rem; }

.comment-text {
    color: var(--slate-grey);
    font-size: 0.9rem;
    line-height: 1.45;
}

.tile-modal .comment-form {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    max-width: 100%;
    min-width: 0;
}

.tile-modal .comment-form textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 0.6rem 0.85rem;
    border: 2px solid var(--cloud-white);
    border-radius: 12px;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    resize: vertical;
    min-height: 56px;
    max-height: 100px;
    margin-bottom: 0.75rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tile-modal .comment-form textarea:focus {
    outline: none;
    border-color: var(--patch-pink);
    box-shadow: 0 0 0 3px rgba(255, 79, 137, 0.15);
}

.tile-modal .comment-form .btn {
    width: 100%;
    padding: 0.65rem 1rem;
    font-weight: 600;
    border-radius: 12px;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: var(--soft-charcoal);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.close-modal:hover {
    background: var(--white);
    color: var(--patch-pink);
    transform: scale(1.05);
}

.close-modal:active {
    transform: scale(0.98);
}

/* ========== Tile Flip Animation ========== */
.tile-flip-container {
    position: relative;
    width: 100%;
    height: 100%;
    perspective: 1000px;
}

.tile-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.5s;
    transform-style: preserve-3d;
}

.tile-flip-container.flipped .tile-flip-inner {
    transform: rotateY(180deg);
}

.tile-front,
.tile-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 8px;
    overflow: hidden;
}

.tile-back {
    transform: rotateY(180deg);
    background-color: var(--white);
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.fgz-gift-card {
    width: 100%;
    max-height: 100%;
    overflow-y: auto;
    background: linear-gradient(155deg, #fff5fb 0%, #eaf8ff 55%, #fffbe8 100%);
    border: 2px solid rgba(255, 79, 137, 0.25);
    border-radius: 14px;
    padding: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    color: var(--soft-charcoal);
}
.fgz-gift-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.7rem;
}
.fgz-gift-logo {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid rgba(77, 168, 255, 0.4);
    background: #fff;
}
.fgz-gift-card h2 {
    margin: 0;
    font-size: 1.2rem;
}
.fgz-gift-card h3 {
    margin: 0.1rem 0 0;
    font-size: 1.02rem;
}
.fgz-gift-biz-desc,
.fgz-gift-desc,
.fgz-gift-card p {
    margin: 0.45rem 0;
    line-height: 1.45;
}
.fgz-promo-hint {
    color: var(--patch-pink);
    font-weight: 600;
    font-size: 0.9rem;
}
.fgz-no-gift-card {
    text-align: center;
}
.fgz-no-gift-griddy-wrap {
    margin-bottom: 0.35rem;
}
.fgz-no-gift-griddy-img {
    max-height: 140px;
    width: auto;
    max-width: 100%;
    display: block;
    margin: 0 auto;
    object-fit: contain;
    animation: griddy-float 3s ease-in-out infinite;
}
.showcase-view .showcase-terms {
    font-size: 0.92rem;
    line-height: 1.45;
    text-align: left;
    max-width: 100%;
}

/* ========== Responsive Design ========== */
@media (max-width: 1199px) {
    .flippin-grid {
        grid-template-columns: repeat(var(--grid-columns-tablet), 1fr);
    }
    
    .tile-modal-content {
        grid-template-columns: 1fr 280px;
    }
}

@media (max-width: 991px) and (min-width: 768px) {
    .flippin-grid:not(.grid-5col) {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .flippin-grid {
        grid-template-columns: repeat(var(--grid-columns-mobile), 1fr);
    }
    
    .tile-modal {
        padding: 0.75rem;
    }
    
    .tile-modal-content {
        grid-template-columns: 1fr;
        max-height: 95vh;
        border-radius: 16px;
    }
    
    .tile-modal-sidebar {
        border-left: none;
        border-top: 1px solid rgba(0, 0, 0, 0.06);
        padding: 1rem;
    }
    
    .tile-modal-media-wrap .tile-modal-image,
    .tile-modal-media-wrap video.tile-modal-image {
        min-height: 200px;
        max-height: 50vh;
    }
    
    .close-modal {
        top: 0.75rem;
        right: 0.75rem;
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

/* ========== Loading States ========== */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-xxl);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--cloud-white);
    border-top-color: var(--patch-pink);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== Homepage & Landing Sections ========== */
.page-section {
    padding: var(--section-padding);
    max-width: 100%;
}
.page-section--alt {
    background: var(--cloud-white);
}
.page-section--pastel-pink { background: var(--pastel-pink); }
.page-section--pastel-blue { background: var(--pastel-blue); }
.page-section--pastel-mint { background: var(--pastel-mint); }
.page-section--pastel-yellow { background: var(--pastel-yellow); }
.page-section--pastel-lavender { background: var(--pastel-lavender); }
.container-narrow {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}
.section-title {
    text-align: center;
    font-size: 2.25rem;
    margin-bottom: 3rem;
    color: var(--soft-charcoal);
}
.griddy-mascot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--patch-pink), var(--sky-pop-blue));
    border-radius: 20px;
    color: white;
    font-family: var(--font-secondary);
    font-size: 2rem;
    animation: griddy-bounce 2s ease-in-out infinite;
}
@keyframes griddy-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
.tile-hover-flip {
    transition: transform 0.4s ease;
}
.tile-hover-flip:hover {
    transform: rotateY(8deg) scale(1.02);
}
.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    justify-content: center;
    align-items: center;
}

/* ========== Imagery & Animations ========== */
/* Hero with subtle animated gradient */
.hero-section {
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%, rgba(255,255,255,0.08) 100%);
    animation: hero-shimmer 8s ease-in-out infinite;
    pointer-events: none;
}
@keyframes hero-shimmer {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.02); }
}
/* Floating tile shapes in hero (decorative) */
.hero-tiles-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}
.hero-tiles-bg span {
    position: absolute;
    border-radius: 12px;
    background: rgba(255,255,255,0.25);
    animation: float-tile 12s ease-in-out infinite;
}
.hero-tiles-bg span:nth-child(1) { width: 60px; height: 60px; top: 15%; left: 10%; animation-delay: 0s; }
.hero-tiles-bg span:nth-child(2) { width: 40px; height: 40px; top: 70%; left: 85%; animation-delay: -2s; }
.hero-tiles-bg span:nth-child(3) { width: 50px; height: 50px; top: 40%; right: 15%; animation-delay: -4s; }
.hero-tiles-bg span:nth-child(4) { width: 35px; height: 35px; bottom: 25%; left: 20%; animation-delay: -6s; }
.hero-tiles-bg span:nth-child(5) { width: 45px; height: 45px; top: 80%; left: 50%; animation-delay: -8s; }
@keyframes float-tile {
    0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.4; }
    33% { transform: translate(8px, -10px) rotate(5deg); opacity: 0.7; }
    66% { transform: translate(-5px, 6px) rotate(-3deg); opacity: 0.5; }
}
/* Section entrance (use .animate-on-scroll on section) */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}
/* Stagger children (use .stagger-children and delay on kids) */
.stagger-children > * {
    opacity: 0;
    transform: translateY(16px);
    animation: stagger-in 0.5s ease forwards;
}
.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(7) { animation-delay: 0.35s; }
.stagger-children > *:nth-child(8) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(9) { animation-delay: 0.45s; }
.stagger-children > *:nth-child(10) { animation-delay: 0.5s; }
@keyframes stagger-in {
    to { opacity: 1; transform: translateY(0); }
}
/* Griddy mascot – gentle float + wiggle */
.griddy-mascot {
    animation: griddy-float 3s ease-in-out infinite;
}
@keyframes griddy-float {
    0%, 100% { transform: translateY(0) rotate(-1deg); }
    50% { transform: translateY(-8px) rotate(1deg); }
}
/* CTA row – consistent spacing */
.cta-row .btn {
    margin: 0.35rem;
}
/* Card / tile gentle hover lift */
.card-lift {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.card-lift:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.1);
}
/* Hero content fade-in on load */
.hero-content-inner {
    animation: hero-fade-in 1s ease-out;
}
@keyframes hero-fade-in {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
/* Hero mascot image (AI asset) */
.hero-griddy-img {
    width: 160px;
    height: 160px;
    margin: 0 auto 1.5rem;
    display: block;
    border-radius: 24px;
    object-fit: contain;
    animation: griddy-float 3s ease-in-out infinite;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.12));
}
/* Decorative section image */
.section-deco-img {
    max-width: 280px;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
    animation: griddy-float 4s ease-in-out infinite;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .hero-section::before,
    .hero-tiles-bg span,
    .griddy-mascot,
    .hero-griddy-img,
    .section-deco-img,
    .tile-hover-flip:hover,
    .card-lift:hover { animation: none; }
    .hero-section::before { opacity: 0.5; }
    .animate-on-scroll { opacity: 1; transform: none; }
    .stagger-children > * { opacity: 1; transform: none; animation: none; }
}

/* ========== Utility Classes ========== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.hidden { display: none !important; }

/* ========== Responsive page grids & layout (shared across pages) ========== */
.responsive-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.responsive-grid-3--tight {
    gap: 1rem;
}

@media (max-width: 900px) {
    .responsive-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .responsive-grid-3 {
        grid-template-columns: 1fr;
    }
}

.responsive-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (max-width: 560px) {
    .responsive-grid-2 {
        grid-template-columns: 1fr;
    }
}

.responsive-grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 2rem;
}

.responsive-grid-auto-md {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 2rem;
}

.responsive-grid-auto-tight {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 2rem;
}

.responsive-grid-auto-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: 1.5rem;
}

.responsive-grid-auto-xs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    gap: 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    gap: 2rem;
}
@media (min-width: 1100px) {
    .footer-grid {
        grid-template-columns: 1.4fr repeat(4, 1fr);
    }
}

.responsive-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 2rem;
}

.grids-showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr));
    gap: 1.5rem;
}

.form-grid-2-cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(min(100%, 240px), 1fr));
    gap: 0.45rem 1rem;
}

@media (max-width: 640px) {
    .form-grid-2-cols {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    :root {
        --section-padding: 3rem 1.25rem;
        --section-padding-lg: 3.5rem 1.25rem;
    }

    .nav-container {
        padding-left: var(--spacing-md);
        padding-right: var(--spacing-md);
    }

    .section-title {
        font-size: 1.85rem;
        margin-bottom: 2rem;
    }

    .page-section {
        padding: var(--section-padding);
    }
}

@media (max-width: 1100px) {
    .logo-img {
        height: 56px;
    }

    .footer .logo-img {
        height: 64px;
    }
}

body.nav-open .nav-toggle {
    gap: 0;
}

body.nav-open .nav-toggle-bar:nth-child(1) {
    transform: translateY(4.5px) rotate(45deg);
}

body.nav-open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-4.5px) rotate(-45deg);
}

/* Password field with show/hide eye */
.password-input-wrap {
    position: relative;
    width: 100%;
    display: block;
}
.password-input-wrap input {
    padding-right: 2.75rem !important;
    width: 100%;
    box-sizing: border-box;
}
.password-toggle-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0.35rem;
    cursor: pointer;
    color: var(--slate-grey);
    font-size: 1.1rem;
    line-height: 1;
    opacity: 0.7;
}
.password-toggle-btn:hover {
    opacity: 1;
    color: var(--soft-charcoal);
}
.card-lift-content{
    padding: 0 2rem 2rem 2rem;
}

/* Share tile overlay */
.share-tile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10002;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.share-tile-overlay.open {
    display: flex;
}
.share-tile-panel {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.share-tile-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.share-platform-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.share-platform-btn:hover {
    background: var(--cloud-white);
    border-color: var(--patch-pink);
}
.share-platform-btn i {
    font-size: 1rem;
}

/* ========== Homepage discover doors & local regions ========== */
.home-region-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
}
.home-region-list li {
    background: white;
    border-radius: 999px;
    padding: 0.65rem 1.25rem;
    font-weight: 600;
    color: var(--soft-charcoal);
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}
.discover-doors {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 1.5rem;
    max-width: 880px;
    margin: 0 auto 1.5rem;
}
.discover-door {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--soft-charcoal);
    border-radius: 24px;
    padding: 2.25rem 2rem;
    min-height: 220px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.08);
    border: 3px solid transparent;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.discover-door--local {
    background: linear-gradient(160deg, var(--pastel-mint) 0%, white 70%);
}
.discover-door--interests {
    background: linear-gradient(160deg, var(--pastel-pink) 0%, white 70%);
}
.discover-door:hover {
    border-color: var(--sky-pop-blue);
}
.discover-door-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    color: var(--slate-grey);
}
.discover-door p {
    font-size: 1.15rem;
    line-height: 1.45;
    margin: 0 0 auto;
    flex: 1;
}
.discover-door-cta {
    display: inline-block;
    margin-top: 1.5rem;
    font-weight: 700;
    color: var(--patch-pink);
}
.discover-doors-links {
    text-align: center;
    margin: 0;
    color: var(--slate-grey);
}
.discover-doors-links a {
    color: var(--soft-charcoal);
    font-weight: 600;
    text-decoration: none;
    margin: 0 0.35rem;
}
.discover-doors-links a:hover {
    color: var(--patch-pink);
}

/* ========== Regional Grids page ========== */
.regional-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(3rem, 7vw, 5rem) clamp(1rem, 3vw, 2rem) clamp(2.5rem, 5vw, 3.5rem);
    background: linear-gradient(135deg, var(--pastel-mint) 0%, var(--pastel-blue) 45%, var(--pastel-lavender) 100%);
    text-align: center;
}
.regional-hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.35;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.7) 0 18%, transparent 19%),
        radial-gradient(circle at 80% 20%, rgba(255,184,208,0.45) 0 14%, transparent 15%),
        radial-gradient(circle at 70% 75%, rgba(255,255,255,0.55) 0 22%, transparent 23%),
        radial-gradient(circle at 15% 80%, rgba(168,212,255,0.5) 0 16%, transparent 17%);
    pointer-events: none;
}
.regional-hero-title {
    margin: 0 0 0.75rem;
    font-size: clamp(2.25rem, 5vw, 3.25rem);
    color: var(--soft-charcoal);
}
.regional-hero-intro {
    margin: 0 auto;
    max-width: 720px;
    color: var(--slate-grey);
    font-size: 1.1rem;
    line-height: 1.55;
}
.regional-main {
    padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 3vw, 2rem) 4rem;
    background: var(--cloud-white);
    min-height: 40vh;
}
.regional-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 1.75rem;
}
.regional-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(0,0,0,0.08);
    border: 3px solid transparent;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.regional-card:hover {
    border-color: currentColor;
}
.regional-card--coast { --regional-accent: #2A9D8F; color: var(--regional-accent); }
.regional-card--newcastle { --regional-accent: #4DA8FF; color: var(--regional-accent); }
.regional-card--lake { --regional-accent: #7B68C8; color: var(--regional-accent); }
.regional-card--illawarra { --regional-accent: #E86A8A; color: var(--regional-accent); }
.regional-card-media {
    height: 160px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
/* Placeholder gradients — swap for background-image when region photos are ready */
.regional-card-media--coast {
    background-image: linear-gradient(135deg, #B8F5D8 0%, #A8D4FF 55%, #FFE9A8 100%);
}
.regional-card-media--newcastle {
    background-image: linear-gradient(135deg, #A8D4FF 0%, #E0D4F7 55%, #FFB8D0 100%);
}
.regional-card-media--lake {
    background-image: linear-gradient(135deg, #E0D4F7 0%, #B8F5D8 55%, #A8D4FF 100%);
}
.regional-card-media--illawarra {
    background-image: linear-gradient(135deg, #FFB8D0 0%, #FFD9C4 55%, #FFE9A8 100%);
}
.regional-card-body {
    padding: 1.75rem 1.75rem 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.regional-card-body h2 {
    margin: 0 0 0.75rem;
    font-size: 1.5rem;
    color: inherit;
}
.regional-card-body p {
    margin: 0 0 1.25rem;
    color: var(--slate-grey);
    line-height: 1.55;
    flex: 1;
}
.regional-flip-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    padding: 0.7rem 1.25rem;
    border-radius: 999px;
    background: var(--soft-charcoal);
    color: #fff !important;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.regional-card:hover .regional-flip-cta,
.regional-card:focus-visible .regional-flip-cta {
    /* Use region accent — never currentColor (that was white-on-white) */
    background: var(--regional-accent, var(--soft-charcoal));
    color: #fff !important;
    transform: translateX(4px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.regional-card:focus-visible {
    outline: 3px solid var(--regional-accent, var(--sky-pop-blue));
    outline-offset: 3px;
}

