/* ============================================================
   ARCScribe — Dark Metallic Void Theme
   Silver lightning aesthetic over Simple Morph base
   ============================================================ */

/* Override Simple Morph Variables → Silver/Chrome */
:root {
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', Consolas, monospace;

    --bg-primary: #050507;
    --bg-secondary: #0a0a0f;
    --bg-tertiary: #0d0d14;
    --bg-accent: #0f0f18;
    --bg-card: rgba(255, 255, 255, 0.04);

    --text-primary: #e8e8ec;
    --text-secondary: rgba(255, 255, 255, 0.75);
    --text-muted: rgba(255, 255, 255, 0.45);

    /* Silver/Chrome accents */
    --accent-primary: #b8c4d0;
    --accent-secondary: #8892a0;
    --accent-chrome: #d4d8dc;
    --accent-lightning: #c8d4e2;

    --gradient-primary: linear-gradient(135deg, #8892a0 0%, #b8c4d0 50%, #687078 100%);
    --gradient-secondary: linear-gradient(135deg, #687078 0%, #b8c4d0 100%);
    --gradient-text: linear-gradient(135deg, #c0c0c0, #e8e8e8, #808080, #e8e8e8);
    --gradient-metal: linear-gradient(135deg, #a0a8b0, #d8dce0, #787880, #c0c8d0, #a0a8b0);

    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-bg-strong: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --glass-shadow-strong: 0 16px 64px rgba(0, 0, 0, 0.6);
}

/* Body background override */
body {
    background: var(--bg-primary);
    background-attachment: fixed;
    font-family: var(--font-family);
}

/* Override grid background to be darker/subtler */
body::before {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.5;
}

body::after {
    background: radial-gradient(circle, rgba(184, 196, 208, 0.05) 0%, transparent 70%);
    filter: blur(100px);
}

/* ============================================================
   LIGHTNING CANVAS
   ============================================================ */
#lightning-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 1; /* FORCED MAX VISIBILITY */
}

/* ============================================================
   SVG ICON (Replacing Emoji)
   ============================================================ */
.arc-bolt-icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
}

.inline-icon {
    width: 16px;
    height: 16px;
    margin-right: 4px;
}

/* ============================================================
   TOAST
   ============================================================ */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(20, 20, 25, 0.95);
    border: 1px solid rgba(184, 196, 208, 0.3);
    color: var(--accent-chrome);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.9rem;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    box-shadow: 0 0 20px rgba(184, 196, 208, 0.15);
    letter-spacing: 0.5px;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================================================
   NAVBAR OVERRIDE
   ============================================================ */
.navbar {
    background: rgba(5, 5, 7, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.arc-logo {
    background: var(--gradient-metal) !important;
    font-size: 1.1rem;
    border-radius: 6px !important;
    box-shadow: 0 0 10px rgba(184, 196, 208, 0.15);
}

.brand-text {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 1px;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-accent {
    font-weight: 400;
    opacity: 0.7;
}

.navbar-nav a::after {
    background: var(--accent-primary);
}

/* ============================================================
   HERO
   ============================================================ */
.hero-section {
    text-align: center;
    padding: 8rem 0 5rem;
    background: radial-gradient(ellipse at 50% 30%, rgba(184, 196, 208, 0.04) 0%, transparent 60%);
    border-radius: 0;
    margin: 0;
    position: relative;
    overflow: hidden;
}

.hero-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border: 1px solid rgba(184, 196, 208, 0.15);
    border-radius: 50px;
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--accent-primary);
    margin-bottom: 2rem;
    text-transform: uppercase;
    background: rgba(184, 196, 208, 0.03);
}

.hero-title {
    font-size: 5rem;
    font-weight: 700;
    letter-spacing: 4px;
    margin-bottom: 1rem;
    background: var(--gradient-metal);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: metalShift 6s ease-in-out infinite;
    text-transform: uppercase;
    line-height: 1.1;
}

.hero-accent {
    font-weight: 300;
    letter-spacing: 6px;
}

@keyframes metalShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-subtitle {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    color: var(--text-muted);
    line-height: 1.8;
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================================
   ARC BUTTONS
   ============================================================ */
.arc-btn {
    background: var(--gradient-primary) !important;
    border: 1px solid rgba(184, 196, 208, 0.2) !important;
    color: #fff !important;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.arc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(184, 196, 208, 0.25);
}

.arc-btn-ghost {
    background: transparent !important;
    border: 1px solid rgba(184, 196, 208, 0.15) !important;
    color: var(--accent-primary) !important;
}

.arc-btn-ghost:hover {
    background: rgba(184, 196, 208, 0.05) !important;
    border-color: rgba(184, 196, 208, 0.3) !important;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.arc-section {
    padding: 5rem 0;
    position: relative;
}

.arc-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(184, 196, 208, 0.1), transparent);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.2rem;
    margin-bottom: 0.75rem;
}

.section-description {
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto;
    font-weight: 300;
}

/* ============================================================
   THE VAULT — Symbol Grid
   ============================================================ */
.vault-tabs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

.vault-tab {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    min-height: auto;
    font-weight: 500;
}

.vault-tab:hover {
    background: rgba(184, 196, 208, 0.06);
    border-color: rgba(184, 196, 208, 0.15);
    color: var(--text-secondary);
    transform: none;
    box-shadow: none;
}

.vault-tab.active {
    background: rgba(184, 196, 208, 0.1);
    border-color: rgba(184, 196, 208, 0.3);
    color: var(--accent-chrome);
    box-shadow: 0 0 12px rgba(184, 196, 208, 0.1);
}

.vault-search-wrap {
    max-width: 400px;
    margin: 0 auto 2rem;
    padding: 0 1rem;
}

.vault-search {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    text-align: center;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.vault-search:focus {
    border-color: rgba(184, 196, 208, 0.2) !important;
    box-shadow: 0 0 15px rgba(184, 196, 208, 0.05) !important;
}

.symbol-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
    gap: 6px;
    padding: 0 1rem;
    max-width: 800px;
    margin: 0 auto;
    min-height: 200px;
}

.symbol-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    color: var(--text-secondary);
    user-select: none;
}

.symbol-cell:hover {
    background: rgba(184, 196, 208, 0.08);
    border-color: rgba(184, 196, 208, 0.2);
    transform: scale(1.15);
    z-index: 2;
    box-shadow: 0 0 15px rgba(184, 196, 208, 0.12);
    color: var(--text-primary);
}

.symbol-cell:active {
    transform: scale(0.95);
}

.symbol-cell.copied {
    background: rgba(184, 196, 208, 0.15);
    border-color: rgba(184, 196, 208, 0.4);
    animation: symbolPulse 0.4s ease-out;
}

@keyframes symbolPulse {
    0% { box-shadow: 0 0 0 0 rgba(184, 196, 208, 0.4); }
    100% { box-shadow: 0 0 0 12px rgba(184, 196, 208, 0); }
}

.vault-counter {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

/* ============================================================
   THE LAB — Symbol Mixer
   ============================================================ */
.lab-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

.lab-panel {
    padding: 1.5rem;
    border-radius: 12px;
}

.lab-panel h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    margin-top: 0;
}

.lab-input {
    text-align: center;
    font-size: 2rem !important;
    padding: 0.75rem !important;
    background: rgba(0, 0, 0, 0.3) !important;
    border-color: rgba(184, 196, 208, 0.1) !important;
}

.lab-quick-base {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 0.75rem;
    justify-content: center;
}

.lab-quick-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-secondary);
    transition: all 0.15s ease;
    min-height: auto;
    padding: 0;
}

.lab-quick-btn:hover {
    background: rgba(184, 196, 208, 0.08);
    border-color: rgba(184, 196, 208, 0.2);
    transform: none;
    box-shadow: none;
}

.lab-marks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
    gap: 4px;
    max-height: 200px;
    overflow-y: auto;
}

.lab-mark {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.15s ease;
    color: var(--text-secondary);
    min-height: auto;
    padding: 0;
}

.lab-mark:hover {
    background: rgba(184, 196, 208, 0.08);
    border-color: rgba(184, 196, 208, 0.2);
    transform: none;
    box-shadow: none;
}

.lab-mark.active {
    background: rgba(184, 196, 208, 0.12);
    border-color: rgba(184, 196, 208, 0.3);
    box-shadow: 0 0 8px rgba(184, 196, 208, 0.1);
}

.lab-result-panel {
    text-align: center;
}

.lab-result {
    font-size: 4rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(184, 196, 208, 0.08);
    border-radius: 12px;
    margin-bottom: 1rem;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    word-break: break-all;
    transition: all 0.3s ease;
}

.lab-result-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.lab-history {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-top: 0.5rem;
}

.lab-history-item {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.15s ease;
}

.lab-history-item:hover {
    background: rgba(184, 196, 208, 0.08);
    border-color: rgba(184, 196, 208, 0.2);
}

/* ============================================================
   THE FORGE — Fancy Text
   ============================================================ */
.forge-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 1rem;
}

.forge-input-wrap {
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.forge-input-wrap textarea {
    background: rgba(0, 0, 0, 0.3) !important;
    border-color: rgba(184, 196, 208, 0.08) !important;
    font-size: 1.1rem;
    resize: none;
    min-height: auto;
}

.forge-styles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.forge-style-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    min-height: auto;
}

.forge-style-btn:hover {
    background: rgba(184, 196, 208, 0.06);
    border-color: rgba(184, 196, 208, 0.15);
    color: var(--text-secondary);
    transform: none;
    box-shadow: none;
}

.forge-output-wrap {
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
}

.forge-output {
    font-size: 1.5rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(184, 196, 208, 0.08);
    border-radius: 8px;
    margin-bottom: 1rem;
    word-break: break-all;
    line-height: 2;
    color: var(--text-primary);
    min-height: 60px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.arc-footer {
    text-align: center;
    padding: 4rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    margin-top: 3rem;
}

.footer-brand {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-copy {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: rgba(184, 196, 208, 0.15);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(184, 196, 208, 0.25);
}

/* ============================================================
   COOKIE CONSENT BANNER
   ============================================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.97);
    border-top: 1px solid rgba(184, 196, 208, 0.1);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    z-index: 9998;
    backdrop-filter: blur(20px);
    flex-wrap: wrap;
}

.cookie-banner p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.cookie-banner a {
    color: var(--accent-chrome);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ============================================================
   AD CONTAINERS
   ============================================================ */
.ad-container {
    max-width: 750px;
    margin: 0 auto;
    padding: 1rem;
    text-align: center;
    position: relative;
    min-height: 10px; /* collapses when empty, expands with ad */
}

/* Subtle separator line before each ad */
.ad-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(184, 196, 208, 0.06), transparent);
}

/* Sticky bottom ad slot */
.ad-sticky {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(5, 5, 7, 0.96);
    border-top: 1px solid rgba(184, 196, 208, 0.07);
    padding: 0.4rem;
    text-align: center;
    z-index: 9000;
    backdrop-filter: blur(12px);
}

/* ============================================================
   SEO PAGES — Content Styles
   ============================================================ */
.seo-content {
    max-width: 750px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.seo-content h2 {
    font-size: 1.6rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
}

.seo-content p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-weight: 300;
    margin-bottom: 1.2rem;
}

.seo-content ol {
    color: var(--text-secondary);
    line-height: 2;
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.seo-content a {
    color: var(--accent-chrome);
    text-decoration: underline;
    text-decoration-color: rgba(184, 196, 208, 0.3);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s;
}

.seo-content a:hover {
    text-decoration-color: var(--accent-chrome);
}

.seo-grid {
    margin-bottom: 2rem;
    min-height: auto;
}

.seo-examples {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.seo-example {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.seo-example:hover {
    background: rgba(184, 196, 208, 0.06);
}

.seo-example-text {
    font-size: 1.5rem;
    letter-spacing: 4px;
    color: var(--text-primary);
    min-width: 120px;
}

.seo-example-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============================================================
   RESPONSIVE — NUCLEAR MOBILE OVERRIDE
   Overrides BOTH simple-morph.css AND inline styles.
   Every rule uses !important to win all specificity wars.
   ============================================================ */

/* === GLOBAL MOBILE SAFETY NET === */
@media (max-width: 768px) {
    /* Prevent ANY horizontal scroll on the entire page */
    html {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    body {
        display: block !important;
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
        padding: 3rem 0 0 0 !important;
        margin: 0 !important;
    }

    /* Kill the grid system entirely on mobile */
    body > * {
        grid-column: unset !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }

    /* Force ALL main containers to respect viewport */
    main, section, header, footer, div {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* === NAVBAR === */
    .navbar {
        width: 100% !important;
        max-width: 100vw !important;
    }

    .navbar-container {
        padding: 0 0.5rem !important;
        gap: 0 !important;
        flex-wrap: nowrap !important;
    }

    .navbar-brand {
        flex-shrink: 0 !important;
    }

    .brand-text {
        font-size: 0.9rem !important;
    }

    /* CRITICAL: Override simple-morph hiding the navbar */
    .navbar-nav {
        display: flex !important;
        flex: 1 !important;
        min-width: 0 !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .navbar-nav ul {
        display: flex !important;
        gap: 0.15rem !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
    }

    .navbar-nav ul::-webkit-scrollbar {
        display: none !important;
    }

    .navbar-nav a {
        font-size: 0.65rem !important;
        white-space: nowrap !important;
        padding: 0.25rem 0.4rem !important;
    }

    .navbar-nav a::after {
        display: none !important;
    }

    .lang-toggle {
        margin-left: 0.25rem !important;
        flex-shrink: 0 !important;
    }

    .lang-btn {
        font-size: 0.6rem !important;
        padding: 0.2rem 0.35rem !important;
    }

    /* Hide mobile menu toggle since we show nav inline */
    .mobile-menu-toggle {
        display: none !important;
    }

    /* === HERO === */
    .hero-section {
        padding: 5rem 1rem 2rem !important;
        margin: 0 !important;
        border-radius: 0 !important;
        width: 100% !important;
    }

    .hero-badge {
        font-size: 0.55rem !important;
        letter-spacing: 1px !important;
        padding: 0.3rem 0.75rem !important;
    }

    .hero-title {
        font-size: 2.4rem !important;
        letter-spacing: 1px !important;
        word-break: break-word !important;
    }

    .hero-accent {
        letter-spacing: 2px !important;
    }

    .hero-subtitle {
        font-size: 0.85rem !important;
        padding: 0 0.5rem !important;
        max-width: 100% !important;
    }

    .hero-buttons {
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.75rem !important;
    }

    .hero-stats {
        gap: 1.5rem !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
    }

    .stat-num {
        font-size: 1.3rem !important;
    }

    /* === BUTTONS === */
    .arc-btn, .arc-btn-ghost {
        width: 90% !important;
        max-width: 280px !important;
        justify-content: center !important;
        padding: 0.65rem 1rem !important;
        font-size: 0.85rem !important;
    }

    /* === SECTIONS === */
    .arc-section {
        padding: 2.5rem 0.75rem !important;
        width: 100% !important;
    }

    .section-header {
        padding: 0 0.5rem !important;
    }

    .section-header h2 {
        font-size: 1.6rem !important;
    }

    .section-description {
        padding: 0 0.5rem !important;
        font-size: 0.85rem !important;
        max-width: 100% !important;
    }

    /* === THE VAULT === */
    .vault-search-wrap {
        max-width: 100% !important;
        padding: 0 0.75rem !important;
    }

    .vault-tabs {
        display: flex !important;
        gap: 4px !important;
        justify-content: flex-start !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        flex-wrap: nowrap !important;
        padding: 0 0.75rem 8px !important;
    }

    .vault-tabs::-webkit-scrollbar {
        display: none !important;
    }

    .vault-tab {
        padding: 0.4rem 0.7rem !important;
        font-size: 0.65rem !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }

    .symbol-grid {
        grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)) !important;
        gap: 4px !important;
        padding: 0 0.5rem !important;
        max-width: 100% !important;
    }

    .symbol-cell {
        font-size: 1.15rem !important;
    }

    /* === THE LAB === */
    .lab-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
        padding: 0 0.5rem !important;
        max-width: 100% !important;
    }

    .lab-panel {
        padding: 1rem !important;
        width: 100% !important;
    }

    .lab-input {
        font-size: 1.5rem !important;
    }

    .lab-result {
        font-size: 2.5rem !important;
        min-height: 70px !important;
        padding: 1rem !important;
    }

    .lab-marks-grid {
        grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)) !important;
    }

    .lab-result-actions {
        flex-wrap: wrap !important;
    }

    /* === THE FORGE === */
    .forge-container {
        padding: 0 0.5rem !important;
        max-width: 100% !important;
    }

    .forge-input-wrap {
        padding: 1rem !important;
    }

    .forge-input-wrap textarea {
        font-size: 0.95rem !important;
    }

    .forge-styles {
        gap: 4px !important;
        justify-content: center !important;
    }

    .forge-style-btn {
        padding: 0.35rem 0.55rem !important;
        font-size: 0.65rem !important;
    }

    .forge-output {
        font-size: 1rem !important;
        padding: 1rem !important;
        line-height: 1.8 !important;
        word-break: break-all !important;
    }

    /* === THE FRAMES === */
    .frames-grid,
    #frames-grid,
    [id="frames-grid"] {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
        max-width: 100% !important;
    }

    /* === AD CONTAINERS === */
    .ad-container {
        max-width: 100% !important;
        padding: 0.5rem !important;
    }

    .ad-sticky {
        padding: 0.25rem !important;
    }

    /* === FOOTER === */
    .arc-footer {
        padding: 2.5rem 1rem !important;
        width: 100% !important;
    }

    .arc-footer nav {
        gap: 0.75rem !important;
        flex-wrap: wrap !important;
    }

    .arc-footer a {
        font-size: 0.8rem !important;
    }

    /* === COOKIE BANNER === */
    .cookie-banner {
        padding: 0.75rem 1rem !important;
        gap: 0.5rem !important;
        flex-direction: column !important;
        text-align: center !important;
    }

    /* === TOAST === */
    .toast {
        bottom: 4rem !important;
        font-size: 0.8rem !important;
        padding: 0.5rem 1rem !important;
        max-width: 90vw !important;
    }

    /* === LIGHTNING CANVAS — reduce on mobile for performance === */
    #lightning-canvas {
        opacity: 0.4 !important;
    }

    /* === KILL ALL SIMPLE-MORPH DECORATIONS THAT COULD OVERFLOW === */
    body::before {
        display: none !important;
    }

    body::after {
        display: none !important;
    }
}

/* === TOUCH DEVICE OPTIMIZATIONS === */
@media (hover: none) and (pointer: coarse) {
    .symbol-cell {
        min-width: 44px !important;
        min-height: 44px !important;
    }

    .lab-quick-btn {
        width: 44px !important;
        height: 44px !important;
        font-size: 1.2rem !important;
    }

    .lab-mark {
        min-width: 40px !important;
        min-height: 40px !important;
    }

    .vault-tab {
        min-height: 36px !important;
    }

    .forge-style-btn {
        min-height: 36px !important;
    }

    /* Disable hover effects on touch (prevents sticky hover on iOS) */
    .symbol-cell:hover {
        transform: none !important;
        box-shadow: none !important;
    }

    .card:hover, .morph-hover:hover, .morph-lift:hover {
        transform: none !important;
        box-shadow: none !important;
    }

    .arc-btn:hover {
        transform: none !important;
    }
}
