/* ==========================================================================
   TryLa Mobile Redesign - Premium Fashion App Experience
   All styles scoped to @media (max-width: 767px) unless noted
   ========================================================================== */

/* --- Phase 7: Design System Variables (global) --- */
:root {
    /* New Surfaces */
    --bg-primary: #0f1219;
    --bg-secondary: #161b26;
    --bg-tertiary: #1e2433;
    --bg-glass: rgba(22, 27, 38, 0.92);

    /* New Text */
    --text-primary: #f0f2f5;
    --text-secondary: #8b95a8;
    --text-tertiary: #5a6478;

    /* Accent */
    --accent-primary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #8b5cf6, #d946ef);
    --accent-glow: 0 0 20px rgba(139, 92, 246, 0.3);

    /* Category Colors */
    --cat-tops: #6366f1;
    --cat-bottoms: #ec4899;
    --cat-one-pieces: #f59e0b;
    --cat-auto: #8b95a8;

    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-medium: rgba(255, 255, 255, 0.12);

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 24px;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;

    /* Safe area */
    --safe-bottom: env(safe-area-inset-bottom, 0px);

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --duration-fast: 150ms;
    --duration-normal: 300ms;
}


/* ==========================================================================
   Phase 1A: Bottom Navigation Bar
   ========================================================================== */

/* Hidden by default (desktop + not logged in) */
.mobile-bottom-nav {
    display: none;
}

/* Also hide sheet elements when not logged in */
.bottom-sheet-overlay,
.bottom-sheet {
    /* Already display:none by default in their rules */
}

@media (max-width: 767px) {
    /* Prevent horizontal scroll on mobile */
    html, body {
        overflow-x: hidden !important;
    }

    /* display is controlled by JS (set to flex when user logs in) */
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 64px;
        padding-bottom: var(--safe-bottom);
        background: var(--bg-glass);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border-top: 1px solid var(--border-subtle);
        /* display: flex — set by JS in applyInitialActiveTab() */
        justify-content: space-around;
        align-items: center;
        z-index: 1100;
        transition: transform var(--duration-normal) var(--ease-out);
    }

    .mobile-bottom-nav.nav-hidden {
        transform: translateY(100%);
    }

    .mobile-bottom-nav .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        color: var(--text-tertiary);
        font-size: 0.6rem;
        font-weight: 600;
        text-decoration: none;
        padding: 6px 0;
        min-width: 56px;
        transition: color var(--duration-fast);
        -webkit-tap-highlight-color: transparent;
        position: relative;
    }

    .mobile-bottom-nav .nav-item i {
        font-size: 1.2rem;
        transition: transform var(--duration-fast);
    }

    .mobile-bottom-nav .nav-item.active {
        color: var(--accent-primary);
    }

    .mobile-bottom-nav .nav-item.active i {
        transform: scale(1.1);
    }

    /* Active indicator dot */
    .mobile-bottom-nav .nav-item.active::before {
        content: '';
        position: absolute;
        top: 0;
        width: 20px;
        height: 3px;
        background: var(--accent-primary);
        border-radius: 0 0 3px 3px;
    }
}


/* ==========================================================================
   Phase 1B: Header Simplification
   ========================================================================== */

@media (max-width: 767px) {
    /* Simplified header: just logo + credits */
    .user-header {
        padding: 10px 16px !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        background: var(--bg-glass) !important;
        backdrop-filter: blur(24px) !important;
        -webkit-backdrop-filter: blur(24px) !important;
        border-bottom: 1px solid var(--border-subtle) !important;
        gap: 0 !important;
        position: relative !important;
    }

    /* Hide email/name/mobile logout/mobile language */
    .user-header .user-details-group {
        display: none !important;
    }

    /* Center logo - absolutely positioned to be truly centered */
    .user-header h1 {
        position: absolute !important;
        left: 0 !important;
        right: 0 !important;
        font-size: 1.8rem !important;
        margin: 0 !important;
        text-align: center !important;
        pointer-events: none !important;
        background: var(--accent-gradient);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    /* Header actions: show only credits */
    .user-header .header-actions {
        order: 3 !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 0 !important;
    }

    .header-actions .logout-desktop {
        display: none !important;
    }

    .header-actions .language-switcher-desktop,
    .user-header .header-actions .language-switcher-desktop {
        display: none !important;
    }

    /* Credits display: compact pill */
    .header-actions .credits-display-desktop {
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
        background: rgba(139, 92, 246, 0.15) !important;
        padding: 6px 12px !important;
        border-radius: 20px !important;
        border: 1px solid rgba(139, 92, 246, 0.25) !important;
        font-size: 0.85rem !important;
    }

    .header-actions .credits-display-desktop .credits-label {
        display: none !important;
    }

    .header-actions .credits-display-desktop #user-credits-value {
        font-size: 1rem !important;
        font-weight: 800 !important;
        padding: 0 !important;
    }

    /* Hide default star, use coin icon after the number */
    .header-actions .credits-display-desktop #user-credits-value::before {
        display: none !important;
    }

    .header-actions .credits-display-desktop #user-credits-value::after {
        content: '\f51e' !important; /* fa-coins */
        font-family: 'Font Awesome 6 Free' !important;
        font-weight: 900 !important;
        color: #facc15 !important;
        margin-left: 6px !important;
    }

    /* Hide top tab navigation — replaced by bottom nav */
    .tab-navigation {
        display: none !important;
    }

    /* Contain tall tabs within viewport so body doesn't scroll */
    #dashboard-tab-content,
    #shares-tab-content,
    #tryon-tab-content {
        max-height: calc(100vh - 72px - 65px);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    /* Prevent tryon form horizontal scroll + give card borders breathing room */
    #tryon-form {
        overflow-x: hidden !important;
        padding-left: 4px !important;
        padding-right: 4px !important;
        box-sizing: border-box !important;
    }

    /* Fashn API count - hide in header to declutter */
    .user-header .user-details-group p .fashn-count,
    .user-header p span:nth-child(2) {
        display: none !important;
    }
}


/* ==========================================================================
   Phase 1C: "More" Bottom Sheet
   ========================================================================== */

.bottom-sheet-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1200;
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-out);
}

.bottom-sheet-overlay.active {
    display: block;
    opacity: 1;
}

.bottom-sheet {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    z-index: 1250;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform var(--duration-normal) var(--ease-out);
    padding-bottom: var(--safe-bottom);
}

.bottom-sheet.active {
    display: block;
    transform: translateY(0);
}

.sheet-handle {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    margin: 10px auto 6px;
}

.sheet-content {
    padding: 8px 20px 20px;
}

.sheet-user-info {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    color: white;
    flex-shrink: 0;
}

.sheet-user-info .user-name {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.sheet-user-info .user-credits-label {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 2px;
}

.sheet-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 8px 0;
}

.sheet-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: background var(--duration-fast);
    border: none;
    background: none;
    width: 100%;
    cursor: pointer;
    text-align: right;
}

[dir="ltr"] .sheet-item {
    text-align: left;
}

.sheet-item:hover,
.sheet-item:active {
    background: rgba(255, 255, 255, 0.05);
}

.sheet-item i {
    width: 22px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.sheet-item-danger {
    color: #ef4444;
}

.sheet-item-danger i {
    color: #ef4444;
}


/* ==========================================================================
   Phase 2: Gallery Cards Redesign
   ========================================================================== */

@media (max-width: 767px) {
    /* Gallery grid */
    #gallery.image-gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        padding: 0 12px calc(160px + var(--safe-bottom)) !important;
    }

    /* Card container */
    .image-container {
        background: var(--bg-secondary) !important;
        border-radius: var(--radius-lg) !important;
        border: 1px solid var(--border-subtle) !important;
        padding: 0 !important;
        overflow: hidden !important;
        transition: transform var(--duration-fast);
    }

    .image-container:active {
        transform: scale(0.97);
    }

    /* Image */
    .image-card-content {
        position: relative !important;
        min-height: auto !important;
        max-height: none !important;
    }

    .image-container .image-card-content img {
        width: 100% !important;
        aspect-ratio: 3/4 !important;
        object-fit: cover !important;
        border-radius: 0 !important;
        max-height: none !important;
        display: block;
    }

    /* Category badge overlay */
    .image-container .image-category-label {
        position: absolute !important;
        bottom: 8px !important;
        right: 8px !important;
        padding: 3px 10px !important;
        border-radius: 20px !important;
        font-size: 0.65rem !important;
        font-weight: 700 !important;
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;
        background: rgba(0, 0, 0, 0.55) !important;
        color: white !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        z-index: 2;
        line-height: 1.3;
        max-width: 80%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    [dir="ltr"] .image-container .image-category-label {
        right: auto !important;
        left: 8px !important;
    }

    /* Action buttons row */
    .image-container .image-actions {
        display: flex !important;
        justify-content: space-around !important;
        padding: 6px 4px !important;
        gap: 3px !important;
        flex-direction: row !important;
        background: var(--bg-secondary);
    }

    .image-container .image-actions button {
        flex: 1 !important;
        padding: 10px 4px !important;
        border-radius: var(--radius-sm) !important;
        background: rgba(255, 255, 255, 0.04) !important;
        border: none !important;
        color: var(--text-secondary) !important;
        font-size: 0 !important; /* Hide text nodes */
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0 !important;
        width: auto !important;
        transition: background var(--duration-fast);
    }

    .image-container .image-actions button i {
        font-size: 0.95rem !important; /* Restore icon size */
    }

    .image-container .image-actions button:active {
        background: rgba(255, 255, 255, 0.1) !important;
    }

    /* Upload section styling */
    .upload-gallery-redesign-wrapper {
        padding: 12px !important;
    }
}


/* ==========================================================================
   Phase 3: Try-On Flow — Dark Immersive Cards
   ========================================================================== */

@media (max-width: 767px) {
    /* Dark step cards */
    .stepper-step .tryon-step-card {
        background: var(--bg-secondary) !important;
        border: 1px solid var(--border-medium) !important;
        border-radius: var(--radius-lg) !important;
        padding: 20px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        color: var(--text-primary) !important;
    }

    .stepper-step .tryon-step-card h3,
    .stepper-step .tryon-step-card .step-title,
    .stepper-step .tryon-step-card .card-header {
        color: var(--text-primary) !important;
        background: var(--bg-tertiary) !important;
    }

    .stepper-step .tryon-step-card label {
        color: var(--text-secondary) !important;
    }

    /* Step action area - dark background */
    .stepper-step .tryon-step-card .step-actions,
    .stepper-step .step-actions {
        background: var(--bg-secondary) !important;
        border-top: 1px solid var(--border-subtle);
    }

    /* Input fields inside try-on - dark */
    .stepper-step .tryon-step-card input[type="text"],
    .stepper-step .tryon-step-card input[type="file"],
    .stepper-step .tryon-step-card textarea {
        background: var(--bg-tertiary) !important;
        color: var(--text-primary) !important;
        border: 1px solid var(--border-medium) !important;
        border-radius: var(--radius-sm) !important;
    }

    /* Upload area - dark themed */
    .stepper-step .image-upload-box,
    .stepper-step .image-preview-box,
    .stepper-step .model-image-upload-area,
    .stepper-step .garment-image-upload-area {
        background: rgba(255, 255, 255, 0.03) !important;
        border: 2px dashed var(--border-medium) !important;
        border-radius: var(--radius-md) !important;
        min-height: 220px !important;
        color: var(--text-tertiary) !important;
    }

    /* Select/dropdown dark theme */
    .stepper-step select,
    .tryon-redesign-wrapper select {
        background: var(--bg-tertiary) !important;
        color: var(--text-primary) !important;
        border: 1px solid var(--border-medium) !important;
        border-radius: var(--radius-sm) !important;
        padding: 10px !important;
    }

    /* CTA Buttons in try-on */
    .stepper-button-next,
    .stepper-button-prev,
    #tryon-submit-btn {
        width: 100% !important;
        padding: 14px !important;
        background: var(--accent-gradient) !important;
        border: none !important;
        border-radius: var(--radius-md) !important;
        color: white !important;
        font-size: 1rem !important;
        font-weight: 700 !important;
        margin-top: 12px !important;
    }

    /* Processing overlay */
    #tryon-processing-indicator {
        background: var(--bg-glass) !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
        border-radius: var(--radius-lg) !important;
        border: 1px solid var(--border-subtle) !important;
    }
}


/* ==========================================================================
   Phase 4: Results Gallery Cards
   ========================================================================== */

@media (max-width: 767px) {
    /* Results grid */
    #my-results-gallery {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        padding: 0 12px calc(160px + var(--safe-bottom)) !important;
    }

    /* Result card */
    #my-results-gallery .tryon-result-card {
        background: var(--bg-secondary) !important;
        border-radius: var(--radius-lg) !important;
        border: 1px solid var(--border-subtle) !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    #my-results-gallery .tryon-result-card:active {
        transform: scale(0.97);
        transition: transform var(--duration-fast);
    }

    /* Result image */
    #my-results-gallery .tryon-result-card .result-image-wrapper img {
        width: 100% !important;
        aspect-ratio: 3/4 !important;
        object-fit: cover !important;
        display: block !important;
    }

    /* Metadata row */
    #my-results-gallery .tryon-result-card .result-info {
        padding: 6px 10px !important;
    }

    #my-results-gallery .tryon-result-card .result-info p {
        font-size: 0.7rem !important;
        color: var(--text-secondary) !important;
        margin: 2px 0 !important;
    }

    /* Fix status badge */
    .fix-status-badge.pending { background: rgba(245,158,11,0.2); color: #f59e0b; }
    .fix-status-badge.completed { background: rgba(34,197,94,0.2); color: #22c55e; }

    /* Actions row - icon only, horizontal */
    #my-results-gallery .tryon-result-card .tryon-result-card-actions {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-around !important;
        padding: 6px 4px !important;
        gap: 3px !important;
        border-top: 1px solid var(--border-subtle) !important;
    }

    #my-results-gallery .tryon-result-card .tryon-result-card-actions button {
        flex: 1 !important;
        padding: 10px 4px !important;
        border-radius: var(--radius-sm) !important;
        background: rgba(255, 255, 255, 0.04) !important;
        border: none !important;
        color: var(--text-secondary) !important;
        font-size: 0 !important; /* Hide text nodes */
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0 !important;
    }

    #my-results-gallery .tryon-result-card .tryon-result-card-actions button i {
        font-size: 0.95rem !important; /* Restore icon size */
    }
}


/* ==========================================================================
   Phase 5: Fixes Tab — Cards Instead of Table
   ========================================================================== */

@media (max-width: 767px) {
    /* Hide table structure on mobile */
    #my-fixes-tab-content table thead {
        display: none !important;
    }

    #my-fixes-tab-content table,
    #my-fixes-tab-content table tbody {
        display: block !important;
        width: 100% !important;
    }

    #my-fixes-tab-content table tr {
        display: flex !important;
        flex-direction: row !important;
        background: var(--bg-secondary) !important;
        border-radius: var(--radius-lg) !important;
        border: 1px solid var(--border-subtle) !important;
        padding: 12px !important;
        margin-bottom: 10px !important;
        gap: 12px !important;
        align-items: flex-start !important;
    }

    #my-fixes-tab-content table td {
        display: block !important;
        border: none !important;
        padding: 2px 0 !important;
        font-size: 0.8rem !important;
        color: var(--text-secondary) !important;
    }

    /* Thumbnail cell */
    #my-fixes-tab-content table td:first-child {
        flex-shrink: 0 !important;
        width: 70px !important;
    }

    #my-fixes-tab-content table td:first-child img {
        width: 70px !important;
        height: 70px !important;
        object-fit: cover !important;
        border-radius: var(--radius-sm) !important;
    }

    /* Info cells grouped */
    #my-fixes-tab-content table td:nth-child(2),
    #my-fixes-tab-content table td:nth-child(3),
    #my-fixes-tab-content table td:nth-child(4),
    #my-fixes-tab-content table td:nth-child(5) {
        font-size: 0.75rem !important;
    }

    /* Status badges */
    #my-fixes-tab-content .status-pending {
        color: #f59e0b !important;
        font-weight: 700;
    }

    #my-fixes-tab-content .status-completed {
        color: #22c55e !important;
        font-weight: 700;
    }

    /* Fix card inner elements - dark theme */
    #my-fixes-tab-content .comparison-thumb {
        background: var(--bg-tertiary) !important;
    }

    #my-fixes-tab-content .placeholder {
        background: var(--bg-tertiary) !important;
        color: var(--text-tertiary) !important;
    }

    #my-fixes-tab-content .status-tag.pending {
        background: rgba(245, 158, 11, 0.15) !important;
        color: #f59e0b !important;
        border: 1px solid rgba(245, 158, 11, 0.3) !important;
    }

    #my-fixes-tab-content .status-tag.completed {
        background: rgba(34, 197, 94, 0.15) !important;
        color: #22c55e !important;
        border: 1px solid rgba(34, 197, 94, 0.3) !important;
    }

    /* Row summary grid - full width in card layout */
    #my-fixes-tab-content .main-content-cell {
        width: 100% !important;
    }

    #my-fixes-tab-content .row-summary-grid {
        color: var(--text-secondary) !important;
    }

    #my-fixes-tab-content .grid-item label,
    #my-fixes-tab-content .grid-item .label {
        color: var(--text-tertiary) !important;
    }
}


/* ==========================================================================
   Phase 6: Modals → Bottom Sheets
   ========================================================================== */

@media (max-width: 767px) {
    /* Transform all modals to bottom sheets */
    .modal {
        align-items: flex-end !important;
        padding: 0 !important;
    }

    .modal-dialog {
        position: relative !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0 !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
        padding: 16px 20px calc(20px + var(--safe-bottom)) !important;
        background: var(--bg-secondary) !important;
        border: none !important;
        border-top: 1px solid var(--border-medium) !important;
        animation: slideUp var(--duration-normal) var(--ease-out) !important;
    }

    /* Handle bar on bottom sheets */
    .modal-dialog::before {
        content: '' !important;
        display: block !important;
        width: 40px !important;
        height: 4px !important;
        background: rgba(255, 255, 255, 0.15) !important;
        border-radius: 2px !important;
        margin: 0 auto 14px !important;
    }

    /* Modal close button */
    .modal-close-btn,
    .modal .close-btn {
        position: absolute !important;
        top: 16px !important;
        left: 16px !important;
        background: rgba(255, 255, 255, 0.08) !important;
        border: none !important;
        border-radius: 50% !important;
        width: 36px !important;
        height: 36px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: var(--text-secondary) !important;
        font-size: 1.1rem !important;
        z-index: 10;
    }

    [dir="ltr"] .modal-close-btn,
    [dir="ltr"] .modal .close-btn {
        left: auto !important;
        right: 16px !important;
    }

    /* Image modal - full screen (no .modal-dialog wrapper) */
    #imageModal {
        align-items: center !important;
        justify-content: center !important;
        background: rgba(0, 0, 0, 0.95) !important;
        padding: 0 !important;
    }

    #imageModal .modal-content {
        max-width: 100vw !important;
        max-height: 90vh !important;
        object-fit: contain !important;
        border-radius: 0 !important;
        margin: 0 auto !important;
    }

    #imageModal .modal-close {
        position: absolute !important;
        top: 16px !important;
        right: 16px !important;
        z-index: 10 !important;
        color: white !important;
        font-size: 1.5rem !important;
        cursor: pointer !important;
        background: rgba(255, 255, 255, 0.15) !important;
        border-radius: 50% !important;
        width: 36px !important;
        height: 36px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0.8; }
    to { transform: translateY(0); opacity: 1; }
}


/* ==========================================================================
   Phase 8: FAB Repositioning (above bottom nav)
   ========================================================================== */

@media (max-width: 767px) {
    /* Upload FAB */
    .upload-fab-button {
        bottom: calc(80px + var(--safe-bottom)) !important;
    }

    /* WhatsApp FAB */
    .whatsapp-fab {
        bottom: calc(80px + var(--safe-bottom)) !important;
    }

    /* Advanced share FAB - small pill next to upload + */
    .advanced-share-fab-button {
        display: flex !important;
        width: 44px !important;
        height: 44px !important;
        bottom: calc(90px + var(--safe-bottom)) !important;
        right: auto !important;
        left: calc(50% + 44px) !important;
        border-radius: 50% !important;
        font-size: 0.95rem !important;
        padding: 0 !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 2px 12px rgba(139, 92, 246, 0.3) !important;
    }

    /* Accessibility widget (UserWay) */
    .uwy,
    .userway_buttons_wrapper {
        bottom: calc(80px + var(--safe-bottom)) !important;
    }
}


/* ==========================================================================
   General Mobile Polish
   ========================================================================== */

@media (max-width: 767px) {
    /* Smooth scrolling */
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    /* Typography scale */
    body {
        font-size: 15px;
    }

    h2 {
        font-size: 1.35rem;
        font-weight: 700;
        border-bottom-color: var(--border-subtle);
    }

    h3 {
        font-size: 1.1rem;
        font-weight: 600;
    }

    /* Button base improvements */
    button {
        -webkit-tap-highlight-color: transparent;
    }

    /* Scrollbar thin */
    ::-webkit-scrollbar {
        width: 3px;
        height: 3px;
    }

    ::-webkit-scrollbar-thumb {
        background: var(--accent-primary);
        border-radius: 3px;
    }

    ::-webkit-scrollbar-track {
        background: transparent;
    }
}
