/* ==========================================================================
           1. GLOBAL RESET & TOUCH DEFAULTS
           ========================================================================== */
        * {
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
        }

        /* ==========================================================================
           2. CSS CUSTOM PROPERTIES
           - Dark neutral defaults; the edge inlines the brand values (functions/lib/theme.js)
             and applyThemeColors() sets the same values at runtime.
           ========================================================================== */
        :root {
            color-scheme: dark;
            --bg-start: #2a2f36;
            --bg-end: #111418;
            --theme-top: #090c11;
            --bg-top-blend: #1d2128;
            --in-oklab: ;
            --card-bg-start: rgba(24, 27, 32, 0.92);
            --card-bg-end: rgba(14, 16, 20, 0.96);
            --card-spotlight: rgba(148, 163, 184, 0.08);
            --btn-start: #3a4350;
            --btn-end: #262c35;
        }

        @supports (background: linear-gradient(in oklab, white, black)) {
            :root {
                --in-oklab: in oklab;
            }
        }

        @supports (color: color-mix(in oklab, white, black)) {
            :root {
                --theme-top: color-mix(in oklab, var(--bg-start) 12%, #070b14);
                --bg-top-blend: color-mix(in oklab, var(--bg-start) 62%, #070b14);
            }
        }

        html {
            color-scheme: dark;
            background-color: var(--theme-top, #070b14);
        }

        body {
            font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            margin: 0;
            padding: 1.25rem 1rem;
            padding: max(1.25rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1.25rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
            min-height: 100vh;
            min-height: 100dvh;
            display: flex;
            align-items: center;
            justify-content: center;
            background-color: var(--theme-top, #070b14);
            background-image:
                radial-gradient(110% 60% at 50% 38%, color-mix(in oklab, var(--bg-start) 38%, transparent) 0%, transparent 72%),
                linear-gradient(175deg var(--in-oklab), var(--theme-top, #070b14) 0%, var(--bg-top-blend, var(--bg-start)) 24%, var(--bg-start) 52%, var(--bg-end) 100%);
            color: #f8fafc;
            -webkit-font-smoothing: antialiased;
        }

        /* ==========================================================================
           3. CARD CONTAINER & CLOAKING STATE
           ========================================================================== */
        .card {
            position: relative;
            overflow: hidden;
            background: 
                radial-gradient(120% 55% at 50% 0%, var(--card-spotlight) 0%, transparent 70%),
                linear-gradient(165deg, var(--card-bg-start) 0%, var(--card-bg-end) 100%);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            max-width: 440px;
            width: 100%;
            padding: 1.9rem 1.5rem 1.5rem 1.5rem;
            border-radius: 24px;
            border: 1px solid rgba(255, 255, 255, 0.11);
            box-shadow: 
                0 26px 52px rgba(0, 0, 0, 0.6),
                0 6px 16px rgba(0, 0, 0, 0.38),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
            text-align: center;
            opacity: 1;
            transform: translateY(0) scale(1);
            transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
        }

        /* Initial hidden state prior to parameter validation */
        .card.cloak {
            visibility: hidden;
            opacity: 0;
            transform: translateY(16px) scale(0.97);
            transition: none;
        }

        /* Child element transition delays on uncloak */
        .card > * {
            opacity: 1;
            transform: translateY(0);
            transition: opacity 0.4s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
        }
        .card.cloak > * {
            opacity: 0;
            transform: translateY(10px);
            transition: none;
        }
        .card > *:nth-child(1) { transition-delay: 0.03s; }
        .card > *:nth-child(2) { transition-delay: 0.08s; }
        .card > *:nth-child(3) { transition-delay: 0.13s; }
        .card > *:nth-child(4) { transition-delay: 0.18s; }
        .card > *:nth-child(5) { transition-delay: 0.22s; }

        /* ==========================================================================
           4. STATUS BADGE & INDICATOR ANIMATION
           ========================================================================== */
        .slip-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.45rem;
            background: rgba(16, 185, 129, 0.13);
            color: #34d399;
            border: 1px solid rgba(52, 211, 153, 0.28);
            box-shadow: 0 2px 10px rgba(16, 185, 129, 0.12);
            font-size: 0.72rem;
            font-weight: 800;
            letter-spacing: 0.09em;
            text-transform: uppercase;
            padding: 0.36rem 0.8rem;
            border-radius: 9999px;
            margin-bottom: 0.9rem;
            user-select: none;
        }
        .slip-badge-dot {
            width: 7px;
            height: 7px;
            background-color: #10b981;
            border-radius: 50%;
            box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
            animation: dot-pulse 4s infinite;
        }
        .card.is-generic .slip-badge {
            background: var(--brand-pill-bg, rgba(96, 165, 250, 0.16));
            color: #f8fafc;
            border-color: var(--brand-pill-border, rgba(96, 165, 250, 0.36));
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
        }
        .card.is-generic .slip-badge-dot {
            background-color: var(--brand-pill-dot, var(--bg-start));
            box-shadow: 0 0 8px var(--brand-pill-dot, var(--bg-start));
        }
        @keyframes dot-pulse {
            0% {
                transform: scale(1);
                opacity: 1;
                animation-timing-function: cubic-bezier(0.22, 0.05, 0.45, 0.95);
            }
            52.5% {
                transform: scale(1.35);
                opacity: 0.55;
                animation-timing-function: cubic-bezier(0.55, 0.05, 0.78, 1.05);
            }
            100% {
                transform: scale(1);
                opacity: 1;
            }
        }

        /* ==========================================================================
           4b. FANDUEL & KALSHI DETECTION BANNERS
           ========================================================================== */
        .fanduel-banner {
            display: flex; align-items: center; justify-content: center; width: 100%;
            background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
            border: 1px solid rgba(255, 255, 255, 0.9);
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), 0 0 16px rgba(20, 147, 255, 0.28), inset 0 1px 0 rgba(255, 255, 255, 1);
            border-radius: 14px; padding: 0.75rem 1rem; margin-bottom: 1.15rem; user-select: none;
            transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
        }
        .fanduel-logo-img { width: 75%; max-width: 75%; height: auto; object-fit: contain; display: block; }
        .kalshi-banner {
            display: flex; align-items: center; justify-content: center; gap: 0.65rem; width: 100%;
            background: linear-gradient(135deg, #06281e 0%, #093d2d 100%);
            border: 1px solid rgba(16, 185, 129, 0.45);
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), 0 0 18px rgba(16, 185, 129, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.14);
            border-radius: 14px; padding: 0.7rem 1rem; margin-bottom: 1.15rem; user-select: none;
        }
        .kalshi-banner-wordmark {
            font-size: 1.55rem; font-weight: 900; letter-spacing: -0.04em; color: #10b981; line-height: 1;
            text-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
        }
        .kalshi-banner-tag {
            font-size: 0.64rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
            color: #a7f3d0; background: rgba(16, 185, 129, 0.18); border: 1px solid rgba(52, 211, 153, 0.32);
            padding: 0.22rem 0.55rem; border-radius: 999px;
        }
        .button-kalshi-symbol {
            display: inline-flex; align-items: center; justify-content: center;
            width: 1.3em; height: 1.3em; border-radius: 6px;
            background: rgba(255, 255, 255, 0.2); border: 1px solid rgba(255, 255, 255, 0.36);
            font-size: 0.92em; font-weight: 900; line-height: 1; color: #ffffff; flex-shrink: 0;
        }
        .card.is-kalshi-banner .button::before,
        .card.is-kalshi-banner .button::after {
            background: linear-gradient(135deg, #059669 0%, #047857 100%);
        }

        /* ==========================================================================
           5. HEADLINE & DYNAMIC IMAGE
           ========================================================================== */
        h1 {
            margin: 0;
            font-size: 1.6rem;
            font-weight: 800;
            line-height: 1.25;
            letter-spacing: -0.025em;
            background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
            word-break: break-word;
        }
        .hero-image {
            display: block;
            width: auto;
            max-width: 100%;
            height: auto;
            max-height: 45dvh;
            object-fit: contain;
            border-radius: 14px;
            padding: 5px;
            background: rgba(0, 0, 0, 0.4);
            margin: 0.8rem auto;
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: 
                0 14px 30px rgba(0, 0, 0, 0.5),
                0 4px 10px rgba(0, 0, 0, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.06);
        }
        .hero-image-loading {
            aspect-ratio: 4 / 5;
            width: 100%;
            max-height: 45dvh;
            background: linear-gradient(
                110deg,
                rgba(15, 23, 42, 0.65) 25%,
                rgba(30, 41, 59, 0.85) 37%,
                rgba(15, 23, 42, 0.65) 63%
            );
            background-size: 200% 100%;
            animation: hero-skeleton-shimmer 1.4s ease infinite;
        }
        @keyframes hero-skeleton-shimmer {
            0% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }
        @media (max-height: 700px) {
            .card { padding: 1.2rem 1.4rem; }
            .fanduel-banner, .kalshi-banner { margin-bottom: 0.8rem; }
            .hero-image, .hero-image-loading { max-height: 40dvh; margin: 0.6rem auto; }
        }

        /* ==========================================================================
           5b. IMESSAGE-STYLE RICH LINK PREVIEW CARD (GENERIC SLIPS WITHOUT PHOTO)
           ========================================================================== */
        .imessage-preview-card {
            display: flex;
            flex-direction: column;
            width: 100%;
            margin: 1rem 0 0.2rem 0;
            border-radius: 20px;
            overflow: hidden;
            text-decoration: none;
            text-align: left;
            background: var(--card-bg-end);
            border: 1px solid rgba(255, 255, 255, 0.15);
            box-shadow: 0 16px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.1);
            transition: transform 0.16s ease, border-color 0.16s ease;
        }
        .imessage-preview-card:hover,
        .imessage-preview-card:focus-visible { border-color: var(--brand-pill-border, rgba(255, 255, 255, 0.28)); transform: translateY(-1px); }
        .imessage-media-wrap {
            width: 100%; overflow: hidden; background: #000000;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08); display: flex; align-items: center; justify-content: center;
        }
        .imessage-og-image { width: 100%; height: auto; max-height: 260px; object-fit: contain; display: block; }
        .imessage-meta-bar {
            padding: 0.88rem 1rem 0.94rem 1rem;
            background:
                radial-gradient(120% 100% at 0% 0%, var(--brand-pill-bg, rgba(96, 165, 250, 0.16)) 0%, transparent 70%),
                linear-gradient(180deg, var(--card-bg-start) 0%, var(--card-bg-end) 100%);
            display: flex; flex-direction: column; gap: 0.26rem;
        }
        .imessage-domain-row { display: inline-flex; align-items: center; gap: 0.4rem; min-width: 0; }
        .imessage-favicon { width: 15px; height: 15px; border-radius: 4px; object-fit: contain; flex-shrink: 0; }
        .imessage-fallback-globe { display: inline-flex; align-items: center; justify-content: center; color: #94a3b8; flex-shrink: 0; }
        .imessage-domain {
            font-size: 0.72rem; font-weight: 700; letter-spacing: 0.03em; text-transform: lowercase;
            color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        }
        .imessage-title {
            font-size: 0.96rem; font-weight: 700; color: #f8fafc; line-height: 1.3;
            display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
        }

        /* ==========================================================================
           6. PRIMARY ACTION BUTTON
           - z-index -2 (.button::before): Blurred gradient underglow layer.
           - z-index -1 (.button::after): Opaque gradient surface and inset borders.
           - z-index  0 (.button-shimmer): Clipped container for shimmer animation.
           ========================================================================== */
        .button {
            position: relative;
            isolation: isolate;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            color: #ffffff;
            padding: 17px 24px;
            text-decoration: none;
            border-radius: 14px;
            font-size: 1.25rem;
            font-weight: 800;
            letter-spacing: 0.025em;
            text-transform: uppercase;
            margin-top: 1.3rem;
            user-select: none;
            touch-action: manipulation;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
            transition: transform 0.1s ease, filter 0.1s ease;
            text-align: center;
        }
        .button-content {
            position: relative;
            z-index: 1;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.55rem;
            line-height: 1.2;
        }
        .button-symbol {
            width: 1.25em;
            height: 1.25em;
            min-width: 1.25em;
            min-height: 1.25em;
            flex-shrink: 0;
            display: inline-block;
            vertical-align: middle;
            object-fit: contain;
            filter: brightness(0) invert(1) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
        }

        .button::before {
            content: "";
            position: absolute;
            inset: 0;
            border-radius: inherit;
            background: linear-gradient(135deg, var(--btn-start) 0%, var(--btn-end) 100%);
            z-index: -2;
            pointer-events: none;
            transform: translateY(3.24px);
            filter: blur(4.86px);
            opacity: 0.45;
            animation: pulse-glow 5s infinite ease-in-out;
        }

        .button::after {
            content: "";
            position: absolute;
            inset: 0;
            border-radius: inherit;
            background: linear-gradient(135deg, var(--btn-start) 0%, var(--btn-end) 100%);
            box-shadow: 
                inset 0 1px 0 rgba(255, 255, 255, 0.45),
                inset 0 -2px 0 rgba(0, 0, 0, 0.22);
            z-index: -1;
            pointer-events: none;
        }

        @keyframes pulse-glow {
            0%, 100% {
                transform: translateY(3.24px);
                filter: blur(4.86px);
                opacity: 0.45;
            }
            50% {
                transform: translateY(4.32px);
                filter: blur(7.56px);
                opacity: 0.75;
            }
        }

        .button-shimmer {
            position: absolute;
            inset: 0;
            border-radius: inherit;
            overflow: hidden;
            pointer-events: none;
            z-index: 0;
        }
        .button-shimmer::after {
            content: "";
            position: absolute;
            top: 0;
            left: -120%;
            width: 60%;
            height: 100%;
            background: linear-gradient(
                90deg,
                transparent,
                rgba(255, 255, 255, 0.32),
                transparent
            );
            transform: skewX(-25deg);
            animation: shimmer 10.5s infinite;
        }
        @keyframes shimmer {
            0% { left: -120%; }
            11.67%, 100% { left: 150%; }
        }

        .button:active {
            transform: scale(0.97);
            filter: brightness(0.93);
        }

        /* ==========================================================================
           7. FOOTER
           ========================================================================== */
        .footer {
            margin-top: 1.85rem;
            padding-top: 1.3rem;
            border-top: 2px dashed rgba(255, 255, 255, 0.11);
            text-align: center;
            font-size: 0.75rem;
            color: #94a3b8;
            line-height: 1.45;
        }
        .footer-title {
            font-weight: 700;
            margin: 0 0 0.3rem 0;
            color: #cbd5e1;
            letter-spacing: 0.06em;
        }
        .footer-states {
            margin: 0 0 0.5rem 0;
        }
        .footer-disclaimer {
            margin: 0;
            font-weight: 700;
            color: #e2e8f0;
        }

        /* ==========================================================================
           8. DEVELOPER INTERFACE, URL BUILDER & DOCS MODAL (?dev=true)
           ========================================================================== */
        .dev-container {
            position: fixed;
            bottom: 1.25rem;
            left: 1.25rem;
            bottom: max(1.25rem, env(safe-area-inset-bottom));
            left: max(1.25rem, env(safe-area-inset-left));
            z-index: 1000;
            display: none;
        }
        .dev-container.visible {
            display: block;
        }
        .hamburger-btn {
            width: 48px;
            height: 48px;
            border-radius: 14px;
            background: rgba(15, 23, 42, 0.92);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border: 1px solid rgba(255, 255, 255, 0.15);
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
            color: #f8fafc;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            padding: 0;
            touch-action: manipulation;
            transition: transform 0.15s ease, background 0.15s ease;
        }
        .hamburger-btn:active { transform: scale(0.94); }
        .hamburger-btn svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
        .dev-panel {
            position: absolute; bottom: 58px; left: 0; width: min(320px, calc(100vw - 2.5rem)); max-height: calc(100dvh - 5.5rem);
            overflow-y: auto; background: rgba(15, 23, 42, 0.96); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 16px; padding: 1rem 1.1rem;
            box-shadow: 0 18px 38px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.12);
            opacity: 0; pointer-events: none; transform: translateY(10px) scale(0.96); transform-origin: bottom left;
            transition: opacity 0.2s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
        }
        .dev-panel.open { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
        @media (max-width: 480px) { .dev-panel { width: calc(100vw - 32px); max-height: 60dvh; overflow-y: auto; } }
        .dev-panel-title {
            margin: 0 0 0.85rem 0; font-size: 0.85rem; font-weight: 800; letter-spacing: 0.08em;
            text-transform: uppercase; color: #f8fafc; border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding-bottom: 0.5rem;
        }
        .builder-field { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.7rem; }
        .builder-label { font-size: 0.74rem; font-weight: 700; color: #cbd5e1; display: flex; justify-content: space-between; align-items: center; }
        .builder-label-param { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.68rem; font-weight: 500; color: #64748b; }
        .builder-input {
            width: 100%; background: rgba(9, 13, 24, 0.75); border: 1px solid rgba(255, 255, 255, 0.14);
            border-radius: 8px; padding: 0.48rem 0.6rem; color: #f8fafc; font-family: inherit; font-size: 0.78rem; outline: none; transition: border-color 0.15s ease;
        }
        .builder-input:focus { border-color: #60a5fa; }
        .builder-input::placeholder { color: #475569; }
        .picker-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 0.6rem;
            margin-top: 0.2rem;
            margin-bottom: 0.85rem;
            padding-top: 0.65rem;
            border-top: 1px solid rgba(255, 255, 255, 0.08);
        }
        .picker-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: rgba(9, 13, 24, 0.55);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 10px;
            padding: 0.4rem 0.55rem;
        }
        .picker-info {
            display: flex;
            flex-direction: column;
            gap: 0.12rem;
        }
        .picker-label {
            font-size: 0.72rem;
            font-weight: 700;
            color: #cbd5e1;
        }
        .picker-hex {
            font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
            font-size: 0.68rem;
            color: #94a3b8;
        }
        .color-input {
            -webkit-appearance: none;
            appearance: none;
            width: 32px;
            height: 32px;
            border: none;
            border-radius: 8px;
            background: none;
            cursor: pointer;
            padding: 0;
            flex-shrink: 0;
        }
        .color-input::-webkit-color-swatch-wrapper {
            padding: 0;
        }
        .color-input::-webkit-color-swatch {
            border: 2px solid rgba(255, 255, 255, 0.25);
            border-radius: 8px;
        }
        .color-input::-moz-color-swatch {
            border: 2px solid rgba(255, 255, 255, 0.25);
            border-radius: 8px;
        }
        .builder-output {
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            padding-top: 0.7rem;
        }
        .builder-output-label {
            display: block;
            font-size: 0.7rem;
            font-weight: 800;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            color: #94a3b8;
            margin-bottom: 0.35rem;
        }
        .builder-url-link {
            display: block;
            background: rgba(9, 13, 24, 0.85);
            border: 1px solid rgba(96, 165, 250, 0.3);
            border-radius: 8px;
            padding: 0.5rem 0.6rem;
            font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
            font-size: 0.7rem;
            line-height: 1.4;
            color: #60a5fa;
            text-decoration: underline;
            word-break: break-all;
            max-height: 4.8rem;
            overflow-y: auto;
        }
        .docs-btn {
            width: 100%;
            margin-top: 0.75rem;
            padding: 0.55rem 0.75rem;
            border-radius: 8px;
            background: rgba(59, 130, 246, 0.14);
            border: 1px solid rgba(96, 165, 250, 0.35);
            color: #93c5fd;
            font-family: inherit;
            font-size: 0.74rem;
            font-weight: 800;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            cursor: pointer;
            touch-action: manipulation;
            transition: transform 0.1s ease, background 0.15s ease;
        }
        .docs-btn:active {
            transform: scale(0.97);
            background: rgba(59, 130, 246, 0.24);
        }

        /* Documentation Viewer Modal */
        .docs-modal {
            position: fixed;
            inset: 0;
            z-index: 2000;
            background: rgba(2, 6, 23, 0.78);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 1.25rem;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.2s ease;
        }
        .docs-modal.open {
            opacity: 1;
            pointer-events: auto;
        }
        .docs-modal-card {
            width: 100%;
            max-width: 720px;
            max-height: 85dvh;
            background: rgba(15, 23, 42, 0.98);
            border: 1px solid rgba(255, 255, 255, 0.15);
            border-radius: 18px;
            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.65);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .docs-modal-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.9rem 1.15rem;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            background: rgba(9, 13, 24, 0.6);
        }
        .docs-modal-title {
            font-size: 0.82rem;
            font-weight: 800;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: #f8fafc;
        }
        .docs-close-btn {
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.12);
            color: #cbd5e1;
            width: 30px;
            height: 30px;
            border-radius: 8px;
            font-size: 1.1rem;
            line-height: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            padding: 0;
            touch-action: manipulation;
        }
        .docs-close-btn:active {
            transform: scale(0.93);
        }
        .docs-viewer {
            margin: 0;
            padding: 1.1rem 1.15rem;
            overflow-y: auto;
            font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
            font-size: 0.72rem;
            line-height: 1.5;
            color: #cbd5e1;
            white-space: pre-wrap;
            word-break: break-word;
            text-align: left;
        }

        /* ==========================================================================
           10. IOS / MOBILE RESPONSIVENESS & TOUCH ENHANCEMENTS
           ========================================================================== */
        @media (max-width: 768px) {
            .builder-input {
                font-size: 16px; /* Prevents iOS WebKit automatic focus zoom */
            }
        }

        /* ==========================================================================
           11. REDUCED MOTION
           ========================================================================== */
        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after {
                animation: none !important;
                transition: none !important;
                scroll-behavior: auto !important;
            }
        }
