*,
        *::before,
        *::after {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        :root {
            --brand: #6366f1;
            --brand-dark: #4f46e5;
            --brand-light: #eef2ff;
            --brand-glow: 0 0 0 3px rgba(99, 102, 241, .18);
            --ok: #10b981;
            --ok-bg: #ecfdf5;
            --ok-bd: #a7f3d0;
            --danger: #ef4444;
            --ink: #111827;
            --ink-2: #374151;
            --muted: #9ca3af;
            --line: #e5e7eb;
            --surface: #ffffff;
            --surface-2: #f9fafb;
            --shadow-sm: 0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .04);
            --shadow-md: 0 4px 16px rgba(0, 0, 0, .08);
            --shadow-lg: 0 20px 48px rgba(0, 0, 0, .12), 0 8px 20px rgba(0, 0, 0, .06);
        }

        body {
            font-family: 'Inter', system-ui, sans-serif;
            background: linear-gradient(160deg, #e9ecff 0%, #f0edff 40%, #e8faf4 100%);
            color: var(--ink);
            font-size: 14px;
            min-height: 100vh;
            overflow-x: hidden;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        body::before,
        body::after {
            content: '';
            position: fixed;
            border-radius: 50%;
            pointer-events: none;
            z-index: 0;
        }

        body::before {
            width: 680px;
            height: 680px;
            background: radial-gradient(circle, rgba(99, 102, 241, .22) 0%, transparent 65%);
            top: -240px;
            left: -200px;
        }

        body::after {
            width: 560px;
            height: 560px;
            background: radial-gradient(circle, rgba(16, 185, 129, .18) 0%, transparent 65%);
            bottom: -160px;
            right: -160px;
        }

        button,
        [role="button"] {
            -webkit-tap-highlight-color: transparent;
        }

        .page-wrap {
            max-width: 1100px;
            margin: 0 auto;
            padding: 0 20px 48px;
            position: relative;
            z-index: 1;
        }

        /*  HERO  */
        .hero {
            text-align: center;
            padding: 60px 0 44px;
        }

        .hero-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: linear-gradient(135deg, #eef2ff, #e0e7ff);
            color: var(--brand-dark);
            border: 1px solid #c7d2fe;
            border-radius: 99px;
            padding: 6px 18px;
            font-size: 12px;
            font-weight: 600;
            margin-bottom: 22px;
            letter-spacing: .04em;
            position: relative;
            overflow: hidden;
            box-shadow: 0 2px 12px rgba(99, 102, 241, .18);
        }

        .hero-badge::after {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 55%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent);
            animation: badgeShine 3.5s ease infinite;
        }

        @keyframes badgeShine {
            0% {
                left: -100%;
            }

            45% {
                left: 130%;
            }

            100% {
                left: 130%;
            }
        }

        .hero h1 {
            font-size: clamp(26px, 5vw, 48px);
            font-weight: 800;
            line-height: 1.12;
            color: var(--ink);
            margin-bottom: 14px;
            letter-spacing: -.5px;
        }

        .hero h1 .grad {
            background: linear-gradient(135deg, var(--brand), #a78bfa, #818cf8, var(--brand-dark), var(--brand));
            background-size: 250% auto;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            animation: gradShift 6s linear infinite;
        }

        @keyframes gradShift {
            to {
                background-position: 250% center;
            }
        }

        .hero-sub {
            font-size: 15px;
            color: var(--muted);
            max-width: 500px;
            margin: 0 auto 32px;
            line-height: 1.65;
        }

        /*  CREATOR BAR  */
        .creator-wrap {
            max-width: 820px;
            margin: 0 auto;
        }

        .creator-bar {
            display: flex;
            align-items: stretch;
            background: rgba(255, 255, 255, .92);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1.5px solid rgba(99, 102, 241, .2);
            border-radius: 20px;
            box-shadow: 0 8px 32px rgba(99, 102, 241, .14), 0 2px 8px rgba(0, 0, 0, .06), 0 0 0 6px rgba(99, 102, 241, .06);
            overflow: hidden;
            transition: border-color .2s, box-shadow .2s;
        }

        .creator-bar:focus-within {
            border-color: var(--brand);
            box-shadow: 0 8px 40px rgba(99, 102, 241, .22), 0 2px 8px rgba(0, 0, 0, .06), var(--brand-glow);
        }

        .creator-input {
            flex: 1;
            min-width: 180px;
            border: none;
            outline: none;
            padding: 15px 18px;
            font-size: 15px;
            font-family: inherit;
            color: var(--ink);
            background: transparent;
        }

        .creator-input::placeholder {
            color: var(--muted);
        }

        .creator-domain-wrap {
            display: flex;
            align-items: center;
            border-left: 1px solid var(--line);
            padding: 0 4px 0 12px;
            flex-shrink: 0;
        }

        .creator-at {
            font-size: 16px;
            font-weight: 500;
            color: var(--muted);
            user-select: none;
            margin-right: 2px;
        }

        .creator-domain {
            border: none;
            outline: none;
            padding: 15px 10px 15px 4px;
            font-size: 14px;
            font-family: inherit;
            font-weight: 600;
            color: var(--brand-dark);
            background: transparent;
            cursor: pointer;
            min-width: 140px;
            max-width: 220px;
        }

        .creator-divider {
            width: 1px;
            background: var(--line);
            margin: 10px 0;
            flex-shrink: 0;
        }

        .creator-actions {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 8px 10px;
            flex-shrink: 0;
        }

        .btn-create {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            background: var(--brand);
            color: #fff;
            border: none;
            border-radius: 10px;
            padding: 9px 20px;
            font-size: 13.5px;
            font-weight: 600;
            font-family: inherit;
            cursor: pointer;
            white-space: nowrap;
            transition: background .15s, box-shadow .15s, transform .1s;
            will-change: transform;
        }

        .btn-create:hover {
            background: var(--brand-dark);
            box-shadow: 0 4px 16px rgba(99, 102, 241, .4);
            transform: translateY(-1px);
        }

        .btn-create:active {
            transform: translateY(0);
        }

        .btn-create:disabled {
            opacity: .6;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }

        .btn-rand {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            height: 40px;
            background: var(--surface-2);
            color: var(--ink-2);
            border: 1px solid var(--line);
            border-radius: 10px;
            font-size: 15px;
            cursor: pointer;
            flex-shrink: 0;
            transition: background .15s, border-color .15s, color .15s, transform .3s;
        }

        .btn-rand:hover {
            background: var(--brand-light);
            border-color: #c7d2fe;
            color: var(--brand-dark);
            transform: rotate(180deg);
        }

        .btn-rand:disabled {
            opacity: .5;
            cursor: not-allowed;
            transform: none;
        }

        /*  FEATURE CHIPS  */
        .feature-chips {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            justify-content: center;
            margin-top: 22px;
        }

        .fchip {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            background: rgba(255, 255, 255, .82);
            border: 1px solid rgba(99, 102, 241, .18);
            border-radius: 99px;
            padding: 6px 15px;
            font-size: 12px;
            font-weight: 500;
            color: var(--ink-2);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            box-shadow: 0 2px 8px rgba(99, 102, 241, .08);
            animation: chipIn .45s ease both;
        }

        .fchip:nth-child(1) {
            animation-delay: .08s;
        }

        .fchip:nth-child(2) {
            animation-delay: .16s;
        }

        .fchip:nth-child(3) {
            animation-delay: .24s;
        }

        .fchip:nth-child(4) {
            animation-delay: .32s;
        }

        @keyframes chipIn {
            from {
                opacity: 0;
                transform: translateY(10px) scale(.94);
            }

            to {
                opacity: 1;
                transform: none;
            }
        }

        .fchip i {
            color: var(--brand);
            font-size: 13px;
        }

        /*  EMAIL STRIP  */
        .email-strip {
            background: linear-gradient(135deg, rgba(99, 102, 241, .09), rgba(99, 102, 241, .04));
            border: 1.5px solid #c7d2fe;
            border-left: 4px solid var(--brand);
            border-radius: 14px;
            padding: 14px 20px;
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
            box-shadow: 0 4px 24px rgba(99, 102, 241, .12), 0 1px 4px rgba(0, 0, 0, .04);
        }

        .es-live {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: var(--ok-bg);
            border: 1px solid var(--ok-bd);
            color: var(--ok);
            border-radius: 99px;
            padding: 3px 10px;
            font-size: 11px;
            font-weight: 700;
            flex-shrink: 0;
            white-space: nowrap;
        }

        .es-live-dot {
            width: 7px;
            height: 7px;
            background: var(--ok);
            border-radius: 50%;
            animation: livePulse 1.8s ease infinite;
        }

        @keyframes livePulse {

            0%,
            100% {
                opacity: 1;
                transform: scale(1);
            }

            50% {
                opacity: .5;
                transform: scale(.8);
            }
        }

        .es-addr {
            font-family: ui-monospace, 'Menlo', monospace;
            font-size: 15px;
            font-weight: 700;
            color: var(--brand-dark);
            flex: 1;
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .es-actions {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-shrink: 0;
        }

        .es-copy-btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: var(--brand);
            color: #fff;
            border: none;
            border-radius: 9px;
            padding: 8px 16px;
            font-size: 13px;
            font-weight: 600;
            font-family: inherit;
            cursor: pointer;
            transition: background .15s, box-shadow .15s;
            white-space: nowrap;
        }

        .es-copy-btn:hover {
            background: var(--brand-dark);
            box-shadow: 0 3px 12px rgba(99, 102, 241, .35);
        }

        .es-lock-btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: var(--surface);
            color: var(--ink-2);
            border: 1.5px solid var(--line);
            border-radius: 9px;
            padding: 8px 16px;
            font-size: 13px;
            font-weight: 600;
            font-family: inherit;
            cursor: pointer;
            transition: background .15s, border-color .15s, color .15s;
            white-space: nowrap;
        }

        .es-lock-btn:hover:not(:disabled) {
            background: #fef3c7;
            border-color: #f59e0b;
            color: #b45309;
        }

        .es-lock-btn.locked,
        .es-lock-btn:disabled {
            background: #fef3c7;
            border-color: #f59e0b;
            color: #b45309;
            cursor: default;
            opacity: .8;
        }

        .es-countdown {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            background: var(--surface);
            border: 1px solid var(--line);
            border-radius: 9px;
            padding: 8px 14px;
            font-size: 13px;
            font-weight: 600;
            color: var(--ink-2);
            white-space: nowrap;
            min-width: 78px;
        }

        .es-countdown i {
            color: var(--muted);
            font-size: 16px;
            line-height: 1;
        }

        /*  INBOX  */
        .inbox-wrap {
            display: flex;
            gap: 0;
            align-items: stretch;
            background: var(--surface);
            border: 1px solid rgba(99, 102, 241, .13);
            border-radius: 18px;
            box-shadow: 0 8px 36px rgba(0, 0, 0, .09), 0 2px 8px rgba(0, 0, 0, .05);
            overflow: hidden;
            position: sticky;
            top: 64px;
            max-height: calc(100vh - 80px);
        }

        .mail-list-panel {
            width: 300px;
            min-width: 280px;
            max-width: 300px;
            flex-shrink: 0;
            background: #fafbff;
            border-right: 1px solid var(--line);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .mlp-head {
            padding: 13px 14px;
            border-bottom: 1px solid var(--line);
            background: linear-gradient(135deg, #f0f3ff, #f5f7ff);
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-shrink: 0;
        }

        .mlp-title {
            display: flex;
            align-items: center;
            gap: 7px;
            font-size: 11.5px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: .07em;
            color: var(--ink-2);
        }

        .count-badge {
            background: var(--brand);
            color: #fff;
            border-radius: 99px;
            padding: 1px 8px;
            font-size: 11px;
            font-weight: 700;
            min-width: 22px;
            text-align: center;
        }

        .mlp-body {
            flex: 1;
            overflow-y: auto;
            padding: 8px;
            scrollbar-width: thin;
            scrollbar-color: var(--line) transparent;
        }

        .mlp-body::-webkit-scrollbar {
            width: 3px;
        }

        .mlp-body::-webkit-scrollbar-thumb {
            background: var(--line);
            border-radius: 4px;
        }

        /* Mail item */
        .mail-item {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            padding: 11px 12px;
            border-radius: 10px;
            margin-bottom: 4px;
            cursor: pointer;
            border: 1.5px solid transparent;
            transition: background .15s, border-color .15s, box-shadow .15s;
        }

        .mail-item:hover {
            background: #f4f6ff;
            border-color: #c7d2fe;
            transform: translateY(-1px);
            box-shadow: 0 4px 16px rgba(99, 102, 241, .1);
        }

        .mail-item.sel {
            background: var(--brand-light);
            border-color: var(--brand);
            box-shadow: 0 2px 12px rgba(99, 102, 241, .12);
        }

        .mail-avatar {
            width: 36px;
            height: 36px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            font-weight: 700;
            color: #fff;
            flex-shrink: 0;
        }

        .mail-content {
            flex: 1;
            min-width: 0;
        }

        .mail-item-subj {
            font-size: 13px;
            font-weight: 600;
            color: var(--ink);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            margin-bottom: 3px;
        }

        .mail-item-from {
            font-size: 11.5px;
            color: var(--muted);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .mail-item-time {
            font-size: 10.5px;
            color: var(--muted);
            flex-shrink: 0;
            margin-top: 2px;
            white-space: nowrap;
        }

        /* iBtn */
        .iBtn {
            width: 30px;
            height: 30px;
            border: 1px solid var(--line);
            border-radius: 7px;
            background: var(--surface);
            color: var(--ink-2);
            flex-shrink: 0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            padding: 0;
            transition: background .15s, border-color .15s, color .15s;
        }

        .iBtn:hover {
            background: var(--brand-light);
            border-color: #c7d2fe;
            color: var(--brand-dark);
        }

        .iBtn:active {
            transform: scale(.88);
            opacity: .75;
        }

        .iBtn:disabled {
            opacity: .45;
            cursor: not-allowed;
            transform: none;
        }

        .iBtn.spinning i {
            animation: iconSpin .7s linear infinite;
            display: inline-block;
            transform-origin: center;
        }

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

        /*  DETAIL PANEL  */
        .mail-detail-panel {
            flex: 1;
            min-width: 0;
            background: var(--surface);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .mdp-head {
            padding: 16px 20px 14px;
            border-bottom: 1px solid var(--line);
            background: linear-gradient(135deg, #f0f3ff, #f5f7ff);
            flex-shrink: 0;
        }

        .mdp-sender-row {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 10px;
        }

        .mdp-avatar {
            width: 40px;
            height: 40px;
            border-radius: 11px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 15px;
            font-weight: 700;
            color: #fff;
            flex-shrink: 0;
        }

        .mdp-head h5 {
            font-size: 15px;
            font-weight: 700;
            margin: 0;
            color: var(--ink);
            line-height: 1.35;
        }

        .mdp-body {
            flex: 1;
            overflow-y: auto;
            padding: 22px;
            scrollbar-width: thin;
            scrollbar-color: var(--line) transparent;
        }

        .mdp-body::-webkit-scrollbar {
            width: 3px;
        }

        .mdp-body::-webkit-scrollbar-thumb {
            background: var(--line);
            border-radius: 4px;
        }

        /*  EMPTY STATE  */
        .empty-state {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 40px 20px;
            color: var(--muted);
            text-align: center;
        }

        .eico {
            width: 56px;
            height: 56px;
            border-radius: 16px;
            background: var(--surface-2);
            border: 2px dashed var(--line);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 22px;
            margin-bottom: 14px;
        }

        .empty-state h4 {
            font-size: 14px;
            font-weight: 600;
            color: var(--ink-2);
            margin: 0 0 5px;
        }

        .empty-state p {
            font-size: 13px;
            margin: 0;
        }

        /*  LOADBAR  */
        .loadbar {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 2px;
            z-index: 9999;
            background: linear-gradient(90deg, var(--brand), #a5b4fc, var(--brand));
            background-size: 200%;
            animation: loadSlide 1.2s linear infinite;
            pointer-events: none;
        }

        @keyframes loadSlide {
            from {
                background-position: 0%
            }

            to {
                background-position: 200%
            }
        }

        /*  SPINNER  */
        .spinner-ring {
            width: 36px;
            height: 36px;
            border: 3px solid var(--line);
            border-top-color: var(--brand);
            border-radius: 50%;
            animation: spin .7s linear infinite;
        }

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

        /*  TOAST  */
        .toast-stack {
            position: fixed;
            bottom: 22px;
            right: 22px;
            z-index: 9998;
            display: flex;
            flex-direction: column-reverse;
            gap: 8px;
        }

        .toast-item {
            display: flex;
            align-items: center;
            gap: 9px;
            background: #1f2937;
            color: #f9fafb;
            border-radius: 10px;
            padding: 11px 16px;
            font-size: 13px;
            font-weight: 500;
            box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
            min-width: 220px;
            animation: tIn .22s ease both;
            will-change: opacity, transform;
        }

        @keyframes tIn {
            from {
                opacity: 0;
                transform: translateY(10px) scale(.95)
            }

            to {
                opacity: 1;
                transform: none
            }
        }

        .toast-item.ok {
            background: #065f46;
        }

        .toast-item.err {
            background: #991b1b;
        }

        /*  MAIL BODY  */
        .mail-html-body {
            font-size: 13px;
            line-height: 1.65;
        }

        .mail-html-body * {
            max-width: 100%;
        }

        .mail-html-body a {
            color: var(--brand);
        }

        /*  MOBILE BOTTOM SHEET  */
        .sheet-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, .45);
            z-index: 600;
            align-items: flex-end;
        }

        .sheet-overlay.open {
            display: flex;
            animation: bgIn .2s ease;
        }

        @keyframes bgIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        .sheet-panel {
            width: 100%;
            background: var(--surface);
            border-radius: 20px 20px 0 0;
            max-height: 90vh;
            display: flex;
            flex-direction: column;
            animation: sheetUp .26s cubic-bezier(.32, .72, 0, 1);
        }

        @keyframes sheetUp {
            from {
                transform: translateY(100%);
            }

            to {
                transform: translateY(0);
            }
        }

        .sheet-top {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 12px 16px 0;
            flex-shrink: 0;
            position: relative;
        }

        .sheet-drag-bar {
            width: 40px;
            height: 4px;
            background: var(--line);
            border-radius: 99px;
            margin-bottom: 10px;
        }

        .sheet-close-btn {
            position: absolute;
            right: 14px;
            top: 12px;
            width: 32px;
            height: 32px;
            border: 1px solid var(--line);
            border-radius: 8px;
            background: var(--surface-2);
            color: var(--ink-2);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 13px;
        }

        .sheet-head {
            padding: 2px 18px 14px;
            border-bottom: 1px solid var(--line);
            flex-shrink: 0;
        }

        .sheet-body {
            flex: 1;
            overflow-y: auto;
            padding: 16px 18px 32px;
            -webkit-overflow-scrolling: touch;
        }

        /*  RESPONSIVE  */
        @media (max-width: 640px) {
            .creator-bar {
                flex-direction: column;
            }

            .creator-input {
                border-bottom: 1px solid var(--line);
            }

            .creator-domain-wrap {
                border-left: none;
                border-bottom: 1px solid var(--line);
                padding: 0 14px;
            }

            .creator-divider {
                display: none;
            }

            .creator-actions {
                padding: 10px;
            }

            .btn-create {
                flex: 1;
                padding: 11px 16px;
            }

            .hero {
                padding: 28px 0 24px;
            }

            .hero h1 {
                font-size: 28px;
            }

            .hero-sub {
                font-size: 13.5px;
                margin-bottom: 24px;
            }
        }

        @media (max-width: 768px) {
            .page-wrap {
                padding: 0 14px 40px;
            }

            .inbox-wrap {
                flex-direction: column;
                position: static;
                max-height: none;
                border-radius: 14px;
            }

            .mail-list-panel {
                width: 100%;
                min-width: 0;
                max-width: none;
                border-right: none;
                border-bottom: 1px solid var(--line);
            }

            .mail-detail-panel {
                display: none;
            }

            .email-strip {
                gap: 8px;
            }

            .es-addr {
                font-size: 13.5px;
            }
        }

        @media (min-width: 769px) {
            .sheet-overlay {
                display: none !important;
            }
        }
