:root {
    --bg: #07110c;
    --bg-soft: #0d1913;
    --panel: rgba(17, 31, 24, 0.9);
    --panel-strong: rgba(12, 23, 18, 0.96);
    --panel-border: rgba(105, 184, 143, 0.18);
    --field: #12231b;
    --field-focus: #183126;
    --text: #eef5ff;
    --muted: #9bb8aa;
    --accent: #42d392;
    --accent-strong: #24b06f;
    --accent-soft: rgba(66, 211, 146, 0.2);
    --success: #6cf0a9;
    --warning: #ffd166;
    --danger: #ff6d76;
    --gold: #d9ff7a;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    --radius-xl: 26px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --scrollbar-track: rgba(11, 21, 16, 0.88);
    --scrollbar-track-border: rgba(84, 142, 113, 0.14);
    --scrollbar-thumb: linear-gradient(180deg, rgba(118, 205, 160, 0.88), rgba(61, 151, 108, 0.96));
    --scrollbar-thumb-border: rgba(209, 255, 229, 0.18);
    --scrollbar-thumb-hover: linear-gradient(180deg, rgba(138, 230, 182, 0.94), rgba(72, 178, 124, 0.98));
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background:
        radial-gradient(circle at top left, rgba(66, 211, 146, 0.18), transparent 28%),
        radial-gradient(circle at top right, rgba(178, 255, 110, 0.14), transparent 22%),
        linear-gradient(180deg, #06100b 0%, #07110c 100%);
    color: var(--text);
    font-family: "Bahnschrift", "Segoe UI Variable Text", "Trebuchet MS", sans-serif;
}

body {
    padding: 20px;
    padding-top: calc(20px + env(safe-area-inset-top));
    padding-right: calc(20px + env(safe-area-inset-right));
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    padding-left: calc(20px + env(safe-area-inset-left));
}

@media (hover: hover) and (pointer: fine) {
    html,
    body,
    * {
        scrollbar-width: thin;
        scrollbar-color: rgba(104, 194, 148, 0.9) var(--scrollbar-track);
    }

    *::-webkit-scrollbar {
        width: 12px;
        height: 12px;
    }

    *::-webkit-scrollbar-track {
        background: var(--scrollbar-track);
        border: 1px solid var(--scrollbar-track-border);
        border-radius: 999px;
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
    }

    *::-webkit-scrollbar-thumb {
        background: var(--scrollbar-thumb);
        border: 2px solid rgba(7, 17, 12, 0.9);
        border-radius: 999px;
        box-shadow: inset 0 1px 0 var(--scrollbar-thumb-border), 0 6px 16px rgba(0, 0, 0, 0.24);
    }

    *::-webkit-scrollbar-thumb:hover {
        background: var(--scrollbar-thumb-hover);
    }

    *::-webkit-scrollbar-corner {
        background: transparent;
    }
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
    border: 0;
}

img {
    max-width: 100%;
    display: block;
}

.app-shell {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 20px;
    min-height: calc(100vh - 40px);
}

.glass-card {
    background: linear-gradient(180deg, rgba(18, 32, 25, 0.96), rgba(12, 21, 16, 0.94));
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    position: relative;
}

.glass-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 38%);
    pointer-events: none;
}

.sidebar,
.workspace {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.sidebar {
    position: sticky;
    top: 20px;
    align-self: start;
    height: calc(100vh - 40px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    max-height: calc(100vh - 40px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
}

.brand-card,
.side-panel,
.log-card,
.form-card,
.identity-card,
.source-card,
.preview-card {
    padding: 20px;
}

.brand-card {
    position: static;
    overflow: visible;
}

.brand-navigator {
    display: grid;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(66, 211, 146, 0.12);
    position: relative;
    z-index: 1;
}

.side-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
}

.brand-card::after {
    content: "";
    position: absolute;
    inset: auto -60px -60px auto;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(66, 211, 146, 0.24), transparent 62%);
    pointer-events: none;
}

.brand-card::before {
    content: "";
    position: absolute;
    inset: auto auto -70px -70px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(190, 255, 132, 0.16), transparent 64%);
    pointer-events: none;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--accent);
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.brand-card h1,
.panel-head h2,
.panel-head h3,
.identity-copy h3 {
    margin: 2px 0 8px;
    font-size: 38px;
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.brand-card h1 {
    font-size: 32px;
    line-height: 1.05;
}

.identity-bio {
    margin: 12px 0 0;
    max-width: 520px;
    line-height: 1.45;
    color: var(--muted);
    white-space: pre-wrap;
    word-break: break-word;
}

.lead,
.hero-meta,
.panel-note,
.muted-line,
.modal-copy {
    color: var(--muted);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.brand-card .hero-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-items: stretch;
}

.brand-card .hero-actions .btn {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 0 10px;
    justify-content: center;
    text-align: center;
    font-size: 14px;
    line-height: 1.1;
}

.section-grid-spam .hero-actions {
    margin-top: 20px;
}

.section-grid-spam .hero-actions .btn {
    min-width: 136px;
}

.btn {
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    transition: transform 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: default;
    transform: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: white;
    font-weight: 700;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.035);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-secondary.danger {
    border-color: rgba(255, 109, 118, 0.34);
    color: #ffd7da;
}

.panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.panel-head.compact {
    margin-top: 28px;
    padding-top: 6px;
}

.count-badge,
.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 13px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
}

.count-badge {
    min-width: 42px;
    background: var(--accent-soft);
    border-color: rgba(66, 211, 146, 0.36);
}

#accountCountBadge {
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

#accountCountBadge.is-zero {
    color: var(--muted);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: none;
}

#accountCountBadge.is-unread {
    color: #ffe8ee;
    background: rgba(255, 82, 108, 0.18);
    border-color: rgba(255, 82, 108, 0.42);
    box-shadow: 0 12px 24px rgba(255, 82, 108, 0.18);
}

.status-pill.muted {
    color: var(--muted);
}

.status-pill.success {
    color: #dbffe9;
    background: rgba(79, 219, 140, 0.14);
    border-color: rgba(79, 219, 140, 0.28);
}

.status-pill.warning {
    color: #ffe3af;
    background: rgba(255, 190, 85, 0.14);
    border-color: rgba(255, 190, 85, 0.3);
}

.status-pill.error {
    color: #ffd4d8;
    background: rgba(255, 109, 118, 0.14);
    border-color: rgba(255, 109, 118, 0.3);
}

.status-premium {
    color: #f0ffd3;
    background: rgba(201, 255, 110, 0.14);
    border-color: rgba(201, 255, 110, 0.28);
}

.account-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
}

.account-item {
    width: 100%;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: inherit;
    text-align: left;
    transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.account-item:disabled {
    opacity: 1;
}

.account-item:hover {
    transform: translateY(-1px);
    border-color: rgba(66, 211, 146, 0.28);
}

.account-item.active {
    background: linear-gradient(180deg, rgba(66, 211, 146, 0.14), rgba(66, 211, 146, 0.06));
    border-color: rgba(66, 211, 146, 0.34);
}

.account-item.has-problem {
    background: linear-gradient(180deg, rgba(255, 91, 107, 0.09), rgba(255, 159, 91, 0.05));
    border-color: rgba(255, 91, 107, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.account-item.has-problem:hover {
    border-color: rgba(255, 118, 132, 0.34);
}

.account-item.has-problem.active {
    background: linear-gradient(180deg, rgba(255, 91, 107, 0.16), rgba(255, 159, 91, 0.08));
    border-color: rgba(255, 118, 132, 0.38);
}

.account-item.is-disabled,
.account-item.is-disabled:hover {
    cursor: not-allowed;
    transform: none;
    background: linear-gradient(180deg, rgba(255, 91, 107, 0.12), rgba(255, 159, 91, 0.06));
    border-color: rgba(255, 118, 132, 0.34);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.015);
}

.account-item.is-disabled .account-title,
.account-item.is-disabled .account-subtitle,
.account-item.is-disabled .account-runtime {
    color: rgba(255, 234, 238, 0.9);
}

.account-title-row,
.account-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.account-title {
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-unread-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(255, 91, 107, 0.16);
    border: 1px solid rgba(255, 91, 107, 0.3);
    color: #ffd9de;
    font-size: 12px;
    font-weight: 800;
}

.account-subtitle,
.account-runtime {
    color: var(--muted);
    font-size: 13px;
    margin-top: 6px;
}

.account-subtitle.status-copy,
.account-runtime.status-copy {
    color: rgba(255, 232, 236, 0.82);
}

.workspace {
    min-width: 0;
}

.workspace-deck {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: start;
}

.section-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    min-width: 0;
}

.section-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-weight: 700;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.section-tab:hover {
    transform: translateY(-1px);
    border-color: rgba(66, 211, 146, 0.18);
}

.section-tab.is-active {
    color: #effff7;
    background: linear-gradient(135deg, rgba(66, 211, 146, 0.24), rgba(66, 211, 146, 0.08));
    border-color: rgba(66, 211, 146, 0.28);
    box-shadow: inset 0 0 0 1px rgba(66, 211, 146, 0.18);
}

.section-tab.has-unread {
    border-color: rgba(255, 91, 107, 0.22);
}

.section-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    flex: 0 0 auto;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.section-tab.has-unread .section-tab-badge {
    background: rgba(255, 91, 107, 0.18);
    border-color: rgba(255, 91, 107, 0.34);
    color: #ffdbe0;
    box-shadow: 0 0 0 1px rgba(255, 91, 107, 0.08);
}

.section-tab-badge.is-muted {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--muted);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.mini-panel {
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.orb-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.orb-card {
    padding: 14px;
    border-radius: 16px;
    background:
        linear-gradient(160deg, rgba(66, 211, 146, 0.12), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(66, 211, 146, 0.14);
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.orb-card:hover {
    transform: translateY(-2px);
    border-color: rgba(66, 211, 146, 0.24);
}

.orb-card span {
    display: block;
    font-size: 12px;
    color: var(--muted);
}

.orb-card strong {
    display: block;
    margin-top: 6px;
}

.spark-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.spark-chip {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(66, 211, 146, 0.1);
    border: 1px solid rgba(66, 211, 146, 0.16);
    color: #dfffee;
    font-size: 13px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.section-stage {
    display: grid;
    gap: 18px;
    min-width: 0;
    min-height: 0;
}

.workspace-section {
    display: none;
    animation: section-enter 0.24s ease;
}

.workspace-section.is-active {
    display: block;
}

.inbox-layout {
    display: grid;
    grid-template-columns: minmax(320px, 0.88fr) minmax(0, 1.12fr);
    gap: 20px;
    align-items: stretch;
    min-height: 0;
}

.inbox-sidebar-card,
.inbox-thread-card {
    height: calc(110vh - 150px);
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 20px;
}

.inbox-sidebar-card {
    background:
        radial-gradient(circle at top left, rgba(66, 211, 146, 0.1), transparent 34%),
        linear-gradient(180deg, rgba(20, 37, 29, 0.98), rgba(11, 20, 16, 0.96));
}

.inbox-thread-card {
    background:
        radial-gradient(circle at top right, rgba(66, 211, 146, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(17, 31, 25, 0.99), rgba(9, 17, 14, 0.98));
}

.inbox-side-head {
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.inbox-side-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    align-self: center;
    margin-top: 2px;
    flex-shrink: 0;
}

.inbox-add-chat-btn {
    min-width: 42px !important;
    width: 42px;
    height: 42px;
    padding: 0 !important;
    border-radius: 16px;
    font-size: 24px;
    line-height: 1;
}

.inbox-side-head > div {
    min-width: 0;
    flex: 1 1 auto;
}

.inbox-side-head h3 {
    margin: 4px 0 0;
    font-size: 28px;
    line-height: 1.02;
}

.inbox-side-head .panel-note {
    margin: 14px 0 0;
    max-width: 40ch;
    color: rgba(204, 221, 213, 0.76);
    font-size: 14px;
    line-height: 1.55;
}

.inbox-thread-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.inbox-thread-head-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

.inbox-thread-identity {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1 1 auto;
}

.inbox-thread-avatar,
.inbox-chat-avatar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #f0fff7;
    font-weight: 800;
    letter-spacing: 0.03em;
    border: 1px solid rgba(66, 211, 146, 0.16);
    background:
        radial-gradient(circle at 30% 28%, rgba(100, 255, 180, 0.24), transparent 34%),
        linear-gradient(180deg, rgba(31, 61, 46, 0.98), rgba(18, 31, 25, 0.98));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-origin: border-box;
    background-clip: padding-box;
    isolation: isolate;
    -webkit-backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    backface-visibility: hidden;
    transform: translateZ(0);
    contain: paint;
    overflow: hidden;
}

.inbox-thread-avatar {
    width: 56px;
    height: 56px;
    border-radius: 20px;
    font-size: 20px;
}

.inbox-thread-avatar.is-empty {
    opacity: 0.7;
}

.inbox-thread-avatar.has-image,
.inbox-chat-avatar.has-image,
.inbox-message-avatar.has-image {
    color: transparent;
}

.inbox-thread-avatar.is-online::after,
.inbox-chat-avatar.is-online::after,
.inbox-message-avatar.is-online::after {
    content: "";
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 11px;
    height: 11px;
    border-radius: 999px;
    background: #48e09a;
    border: 2px solid rgba(12, 24, 19, 0.98);
    box-shadow: 0 0 0 1px rgba(72, 224, 154, 0.18);
}

.inbox-thread-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.inbox-thread-copy h3 {
    margin: 0;
    font-size: 30px;
    line-height: 0.98;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inbox-thread-subline {
    margin: 0;
    color: rgba(194, 211, 203, 0.74);
    font-size: 14px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inbox-thread-subline.is-live,
.inbox-chat-meta.is-live,
.inbox-chat-preview.is-live {
    color: rgba(120, 239, 182, 0.96);
}

.inbox-thread-menu-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.inbox-thread-menu-btn {
    min-width: 44px !important;
    width: 44px;
    height: 44px;
    padding: 0 !important;
    border-radius: 16px;
    font-size: 22px;
    line-height: 1;
}

.inbox-thread-menu-btn.is-open {
    border-color: rgba(66, 211, 146, 0.38);
    box-shadow: 0 0 0 1px rgba(66, 211, 146, 0.16);
}

.inbox-thread-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    display: grid;
    gap: 6px;
    padding: 10px;
    border-radius: 18px;
    border: 1px solid rgba(66, 211, 146, 0.16);
    background:
        radial-gradient(circle at top right, rgba(66, 211, 146, 0.14), transparent 42%),
        linear-gradient(180deg, rgba(20, 35, 28, 0.99), rgba(10, 18, 15, 0.98));
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
    z-index: 30;
}

.inbox-thread-menu.hidden {
    display: none;
}

.inbox-thread-menu-item {
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
    color: #eef7f2;
    font: inherit;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.inbox-thread-menu-item:hover {
    transform: translateY(-1px);
}

.inbox-thread-menu-item.warning:hover {
    background: rgba(245, 188, 74, 0.12);
    border-color: rgba(245, 188, 74, 0.28);
}

.inbox-thread-menu-item.danger {
    color: #ffd8d8;
}

.inbox-thread-menu-item.danger:hover {
    background: rgba(255, 95, 95, 0.12);
    border-color: rgba(255, 95, 95, 0.28);
}

.inbox-message-menu {
    position: fixed;
    top: 24px;
    left: 24px;
    min-width: 240px;
    max-width: min(320px, calc(100vw - 24px));
    max-height: min(68vh, calc(100vh - 24px));
    display: grid;
    gap: 8px;
    padding: 10px;
    border-radius: 18px;
    border: 1px solid rgba(66, 211, 146, 0.16);
    background:
        radial-gradient(circle at top right, rgba(66, 211, 146, 0.14), transparent 42%),
        linear-gradient(180deg, rgba(20, 35, 28, 0.99), rgba(10, 18, 15, 0.98));
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.36);
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: 80;
}

.inbox-message-menu.hidden {
    display: none;
}

.inbox-message-menu-preview {
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(238, 247, 242, 0.84);
    font-size: 13px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.inbox-message-menu-item {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
    color: #eef7f2;
    font: inherit;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.inbox-message-menu-item:hover {
    transform: translateY(-1px);
    background: rgba(66, 211, 146, 0.08);
    border-color: rgba(66, 211, 146, 0.22);
}

.inbox-message-menu-item.danger {
    color: #ffd8d8;
    border-color: rgba(255, 95, 95, 0.18);
    background: rgba(255, 95, 95, 0.04);
}

.inbox-message-menu-item.danger:hover {
    background: rgba(255, 95, 95, 0.12);
    border-color: rgba(255, 95, 95, 0.28);
}

.inbox-message-bubble.is-menu-target {
    border-color: rgba(66, 211, 146, 0.3);
    box-shadow: 0 0 0 1px rgba(66, 211, 146, 0.14);
}

.inbox-message-bubble.is-reply-target {
    border-color: rgba(109, 225, 171, 0.42);
    box-shadow: 0 0 0 1px rgba(109, 225, 171, 0.18), 0 18px 36px rgba(0, 0, 0, 0.22);
}

.inbox-chat-list,
.inbox-message-list {
    display: grid;
    gap: 12px;
}

.inbox-chat-list {
    flex: 1 1 auto;
    overflow-y: auto;
    align-content: start;
    padding-right: 4px;
}

.inbox-chat-item {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    width: 100%;
    min-height: 104px;
    padding: 12px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.024), rgba(255, 255, 255, 0.012));
    color: inherit;
    text-align: left;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.inbox-chat-item:hover {
    transform: translateY(-1px);
    border-color: rgba(66, 211, 146, 0.18);
    background: linear-gradient(180deg, rgba(66, 211, 146, 0.08), rgba(255, 255, 255, 0.02));
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.15);
}

.inbox-chat-item.active {
    border-color: rgba(66, 211, 146, 0.28);
    background: linear-gradient(180deg, rgba(66, 211, 146, 0.14), rgba(255, 255, 255, 0.025));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 14px 28px rgba(0, 0, 0, 0.18);
    position: relative;
}

.inbox-chat-item.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 14px;
    bottom: 14px;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--accent), rgba(91, 255, 158, 0.55));
}

.inbox-chat-avatar {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    font-size: 18px;
}

.inbox-chat-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
    padding-top: 2px;
    align-content: start;
}

.inbox-search-modal-card {
    width: min(640px, calc(100vw - 32px));
    display: grid;
    gap: 16px;
}

.inbox-search-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.inbox-search-results {
    display: grid;
    gap: 10px;
    max-height: min(54vh, 520px);
    overflow-y: auto;
    padding-right: 4px;
}

.inbox-search-item {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    width: 100%;
    min-height: 84px;
    padding: 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.012));
    color: inherit;
    text-align: left;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.inbox-search-item:hover {
    transform: translateY(-1px);
    border-color: rgba(66, 211, 146, 0.18);
    background: linear-gradient(180deg, rgba(66, 211, 146, 0.08), rgba(255, 255, 255, 0.02));
}

.inbox-search-copy {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.inbox-search-empty {
    padding: 18px 16px;
    border-radius: 18px;
    border: 1px dashed rgba(255, 255, 255, 0.08);
    color: rgba(196, 216, 206, 0.72);
    background: rgba(255, 255, 255, 0.02);
}

.inbox-chat-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.inbox-chat-title-row strong {
    font-size: 17px;
    line-height: 1.15;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inbox-chat-side {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.inbox-chat-stamp {
    color: rgba(180, 198, 188, 0.62);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.inbox-chat-meta,
.inbox-chat-preview {
    color: var(--muted);
    line-height: 1.35;
}

.inbox-chat-meta {
    font-size: 13px;
}

.inbox-chat-preview {
    display: block;
    overflow: hidden;
    overflow-wrap: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inbox-unread-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(255, 91, 107, 0.18);
    border: 1px solid rgba(255, 91, 107, 0.34);
    color: #ffd9de;
    font-size: 12px;
    font-weight: 800;
}

.inbox-message-list {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    padding: 22px 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-content: stretch;
    scroll-behavior: smooth;
    background:
        radial-gradient(circle at top right, rgba(66, 211, 146, 0.1), transparent 26%),
        radial-gradient(circle at bottom left, rgba(87, 162, 120, 0.09), transparent 24%),
        linear-gradient(180deg, rgba(19, 34, 27, 0.95), rgba(8, 15, 12, 0.94));
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 28px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.inbox-message {
    display: flex;
    width: 100%;
    align-items: flex-end;
    gap: 10px;
}

.inbox-message.in {
    justify-content: flex-start;
}

.inbox-message.out {
    justify-content: flex-end;
}

.inbox-message-bubble {
    position: relative;
    isolation: isolate;
    min-width: 110px;
    max-width: min(72%, 560px);
    padding: 12px 16px 10px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.014));
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.16);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.inbox-message-bubble > * {
    position: relative;
    z-index: 1;
}

.inbox-message-menu-trigger {
    display: none;
    position: absolute;
    top: -16px;
    right: 12px;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(66, 211, 146, 0.2);
    background: linear-gradient(180deg, rgba(18, 34, 27, 0.98), rgba(11, 20, 16, 0.98));
    color: rgba(238, 247, 242, 0.92);
    font: inherit;
    font-size: 22px;
    line-height: 1;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.22);
    cursor: pointer;
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
    z-index: 4;
}

.inbox-message-menu-trigger:hover {
    border-color: rgba(66, 211, 146, 0.34);
    background: linear-gradient(180deg, rgba(27, 50, 39, 0.99), rgba(13, 24, 19, 0.99));
}

.inbox-message-avatar {
    position: relative;
    width: 36px;
    height: 36px;
    margin-bottom: 4px;
    border-radius: 14px;
    border: 1px solid rgba(66, 211, 146, 0.14);
    background:
        radial-gradient(circle at 30% 28%, rgba(100, 255, 180, 0.2), transparent 34%),
        linear-gradient(180deg, rgba(31, 61, 46, 0.98), rgba(18, 31, 25, 0.98));
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(240, 255, 247, 0.96);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    isolation: isolate;
    -webkit-backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    backface-visibility: hidden;
    transform: translateZ(0);
    contain: paint;
    flex: 0 0 auto;
}

.inbox-message:hover .inbox-message-bubble,
.inbox-message:focus-within .inbox-message-bubble {
    transform: translateY(-1px);
    border-color: rgba(66, 211, 146, 0.14);
    box-shadow: 0 22px 38px rgba(0, 0, 0, 0.22);
}

.inbox-message.in .inbox-message-bubble {
    border-bottom-left-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.042), rgba(255, 255, 255, 0.02));
}

.inbox-message.out .inbox-message-bubble {
    border-bottom-right-radius: 22px;
    background: linear-gradient(180deg, rgba(52, 130, 89, 0.85), rgba(39, 96, 67, 0.92));
    border-color: rgba(100, 238, 163, 0.22);
}

.inbox-message.in .inbox-message-bubble::after,
.inbox-message.out .inbox-message-bubble::after {
    content: none;
    display: none;
}

.inbox-message-body {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-size: 16px;
    line-height: 1.52;
    color: rgba(244, 249, 246, 0.96);
}

.inbox-service-message {
    display: flex;
    justify-content: center;
    padding: 2px 0 4px;
}

.inbox-service-pill {
    max-width: min(84%, 520px);
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(212, 224, 217, 0.82);
    font-size: 13px;
    line-height: 1.35;
    text-align: center;
    white-space: pre-wrap;
    word-break: break-word;
}

.inbox-message-reply-preview {
    display: grid;
    gap: 3px;
    width: 100%;
    margin: 0 0 10px;
    padding: 9px 10px 8px;
    border: 1px solid rgba(66, 211, 146, 0.16);
    border-left: 3px solid rgba(86, 230, 164, 0.9);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.038);
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.inbox-message-reply-preview strong {
    font-size: 12px;
    line-height: 1.2;
    color: rgba(141, 244, 191, 0.96);
}

.inbox-message-reply-preview span {
    font-size: 13px;
    line-height: 1.35;
    color: rgba(231, 241, 236, 0.82);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inbox-message-reply-preview.is-out {
    border-color: rgba(168, 255, 212, 0.22);
    border-left-color: rgba(218, 255, 234, 0.94);
    background: rgba(255, 255, 255, 0.07);
}

.inbox-message-reply-preview.is-out strong {
    color: rgba(235, 255, 243, 0.96);
}

.inbox-message-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.inbox-message-reaction {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(236, 245, 240, 0.92);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

.inbox-message-reaction.chosen {
    border-color: rgba(66, 211, 146, 0.32);
    background: rgba(66, 211, 146, 0.12);
    color: rgba(208, 255, 228, 0.98);
}

.inbox-message-sender {
    margin: -2px 0 8px;
    font-size: 13px;
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: rgba(120, 239, 182, 0.96);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.inbox-link-stack {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.inbox-link-card {
    display: grid;
    gap: 5px;
    width: 100%;
    padding: 12px 13px;
    border-radius: 16px;
    border: 1px solid rgba(88, 219, 154, 0.18);
    background: linear-gradient(180deg, rgba(36, 63, 49, 0.98), rgba(18, 33, 26, 0.98));
    color: inherit;
    text-align: left;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.inbox-link-card:hover {
    transform: translateY(-1px);
    border-color: rgba(110, 243, 175, 0.28);
    background: linear-gradient(180deg, rgba(42, 80, 61, 0.98), rgba(20, 39, 30, 0.98));
}

.inbox-message.out .inbox-link-card {
    background: linear-gradient(180deg, rgba(63, 144, 100, 0.34), rgba(39, 98, 67, 0.4));
    border-color: rgba(122, 255, 188, 0.22);
}

.inbox-link-card-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(136, 245, 189, 0.96);
}

.inbox-link-card-url {
    font-size: 14px;
    line-height: 1.35;
    color: rgba(242, 249, 245, 0.96);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inbox-link-card-cta {
    font-size: 12px;
    line-height: 1.3;
    color: rgba(196, 216, 206, 0.74);
}

.inbox-message-media {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 14px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.inbox-message.out .inbox-message-media {
    background: rgba(83, 198, 131, 0.14);
    border-color: rgba(83, 198, 131, 0.2);
}

.inbox-message-media-label {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(214, 241, 225, 0.94);
}

.inbox-message-media-meta {
    font-size: 13px;
    line-height: 1.45;
    color: rgba(220, 232, 226, 0.72);
    word-break: break-word;
}

.inbox-message-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
    margin-top: 8px;
}

.inbox-message-time {
    flex: 0 0 auto;
    color: rgba(228, 241, 235, 0.58);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.inbox-message.out .inbox-message-time {
    margin-left: auto;
}

.inbox-message-status {
    flex: 0 0 auto;
    color: rgba(228, 241, 235, 0.64);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -0.08em;
    white-space: nowrap;
}

.inbox-message-status.is-read {
    color: #7fd1ff;
}

.inbox-message-actions {
    display: none !important;
}

.inbox-day-divider {
    display: flex;
    justify-content: center;
    margin: 4px 0 2px;
}

.inbox-day-divider span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(16, 28, 22, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(206, 221, 214, 0.76);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.inbox-message.is-new .inbox-message-bubble {
    animation: inbox-message-enter 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.inbox-message.is-new .inbox-message-avatar {
    animation: inbox-avatar-enter 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.inbox-mini-btn {
    min-height: 32px;
    padding: 0 12px;
    font-size: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    border-color: rgba(255, 255, 255, 0.06);
    transform: translateY(2px);
    transition: transform 0.18s ease;
}

.inbox-message:hover .inbox-mini-btn,
.inbox-message:focus-within .inbox-mini-btn {
    transform: translateY(0);
}

@media (hover: hover) and (pointer: fine) {
    .inbox-message-menu-trigger {
        display: inline-flex;
    }

    .inbox-message:hover .inbox-message-menu-trigger,
    .inbox-message:focus-within .inbox-message-menu-trigger,
    .inbox-message-bubble.is-menu-target .inbox-message-menu-trigger {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
}

.inbox-composer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

@media (min-width: 861px) {
    .inbox-chat-list,
    .inbox-message-list {
        display: grid;
        gap: 4px;
    }
}

.inbox-composer-shell {
    padding: 10px 12px 8px;
    border-radius: 24px;
    border: 1px solid rgba(66, 211, 146, 0.12);
    background: linear-gradient(180deg, rgba(18, 34, 27, 0.98), rgba(11, 20, 16, 0.98));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.inbox-reply-bar {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: 16px;
    border: 1px solid rgba(66, 211, 146, 0.12);
    background: linear-gradient(180deg, rgba(66, 211, 146, 0.08), rgba(255, 255, 255, 0.02));
}

.inbox-reply-bar.hidden {
    display: none;
}

.inbox-reply-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
    flex: 1 1 auto;
}

.inbox-reply-copy strong {
    font-size: 13px;
    line-height: 1.2;
    color: #eef7f2;
}

.inbox-reply-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inbox-reply-dismiss-btn {
    min-width: 40px !important;
    width: 40px;
    height: 40px;
    padding: 0 !important;
    border-radius: 14px;
    font-size: 24px;
    line-height: 1;
    flex: 0 0 auto;
}

.inbox-composer textarea {
    min-height: 48px;
    max-height: 48px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    line-height: 1.5;
    resize: none;
    overflow-y: auto;
}

.inbox-composer textarea:focus {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.inbox-composer-actions {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.inbox-composer-actions .btn {
    min-width: 156px;
    min-height: 48px;
}

.inbox-emoji-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.inbox-emoji-btn {
    min-width: 48px !important;
    width: 48px;
    min-height: 48px !important;
    padding: 0;
    font-size: 22px;
    line-height: 1;
}

.inbox-emoji-btn.is-open {
    border-color: rgba(66, 211, 146, 0.28);
    background: rgba(66, 211, 146, 0.12);
}

.inbox-emoji-panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    width: 252px;
    padding: 10px;
    border-radius: 20px;
    border: 1px solid rgba(66, 211, 146, 0.16);
    background: linear-gradient(180deg, rgba(18, 34, 27, 0.98), rgba(11, 20, 16, 0.98));
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.24);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    z-index: 20;
}

.inbox-emoji-panel.hidden {
    display: none;
}

.inbox-emoji-option {
    min-height: 44px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text);
    font-size: 22px;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.inbox-emoji-option:hover {
    transform: translateY(-1px);
    background: rgba(66, 211, 146, 0.1);
    border-color: rgba(66, 211, 146, 0.22);
}

.inbox-empty {
    padding: 20px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px dashed rgba(255, 255, 255, 0.08);
    color: var(--muted);
}

#inboxThreadMeta {
    flex: 0 0 auto;
    max-width: min(100%, 220px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#inboxThreadTitle {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 980px) {
    .inbox-layout {
        grid-template-columns: 1fr;
    }

    .inbox-thread-head {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .inbox-thread-head-actions {
        width: 100%;
        justify-content: space-between;
    }

    .inbox-side-actions {
        width: 100%;
        justify-content: space-between;
    }

    .inbox-search-controls {
        grid-template-columns: 1fr;
    }

    .inbox-thread-menu {
        left: auto;
        right: 0;
        min-width: min(280px, calc(100vw - 56px));
        max-width: min(280px, calc(100vw - 24px));
    }

    .inbox-message-menu {
        min-width: min(220px, calc(100vw - 24px));
        max-width: min(280px, calc(100vw - 24px));
        border-radius: 22px;
        padding: 12px;
    }

    .inbox-message-menu-preview {
        font-size: 14px;
    }

    .inbox-message-menu-item {
        min-height: 50px;
        font-size: 15px;
    }

    .inbox-thread-copy h3,
    .inbox-side-head h3 {
        white-space: normal;
    }

    .inbox-thread-subline {
        white-space: normal;
    }

    .inbox-message-bubble {
        max-width: 100%;
    }

    .inbox-message-avatar {
        width: 32px;
        height: 32px;
        border-radius: 12px;
    }

    #inboxThreadMeta {
        margin-left: 0;
        max-width: 100%;
    }

    .ios-install-modal-card {
        width: 100%;
        padding: 18px;
        border-radius: 22px;
    }
}

@keyframes inbox-message-enter {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes inbox-avatar-enter {
    from {
        opacity: 0;
        transform: translateY(6px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes section-enter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-grid {
    display: grid;
    gap: 18px;
}

.edit-profile-stack {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    gap: 18px;
    align-items: start;
}

.identity-card {
    grid-column: 1;
    grid-row: 1;
}

.source-card {
    grid-column: 2;
    grid-row: 1;
}

.profile-editor-card {
    grid-column: 1;
    grid-row: 2;
}

.avatar-editor-card {
    grid-column: 2;
    grid-row: 2;
    align-self: stretch;
}

.profile-editor-card,
.avatar-editor-card {
    display: flex;
    flex-direction: column;
}

.avatar-editor-card .upload-preview {
    margin-top: auto;
}

.privacy-card,
.favorites-card {
    grid-column: 1 / -1;
}

.section-grid-profile,
.section-grid-spam {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

.spammer-grid {
    grid-template-columns: minmax(0, 1fr);
}

.spammer-shell {
    display: grid;
    gap: 18px;
}

.settings-shell {
    display: grid;
    gap: 18px;
}

.spammer-hero-card {
    padding: 22px 24px;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
    gap: 18px;
    overflow: hidden;
}

.spammer-hero-card::after {
    content: "";
    position: absolute;
    right: -40px;
    bottom: -60px;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    background:
        radial-gradient(circle, rgba(66, 211, 146, 0.2), rgba(66, 211, 146, 0.02) 58%, transparent 70%);
    pointer-events: none;
}

.spammer-hero-copy,
.spammer-hero-stats {
    position: relative;
    z-index: 1;
}

.spammer-hero-copy h2 {
    margin: 4px 0 8px;
    font-size: clamp(28px, 3vw, 38px);
    letter-spacing: -0.03em;
}

.spammer-hero-copy .helper-text {
    max-width: 720px;
    font-size: 14px;
}

.spammer-hero-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.spammer-hero-stat {
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(66, 211, 146, 0.14);
    background:
        linear-gradient(180deg, rgba(30, 54, 41, 0.92), rgba(15, 27, 21, 0.94));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.spammer-hero-stat span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.spammer-hero-stat strong {
    display: block;
    margin-top: 8px;
    font-size: 30px;
    letter-spacing: -0.04em;
}

.spammer-grid {
    align-items: start;
}

.spammer-control-card,
.spammer-preview-card {
    min-height: 100%;
}

.spammer-clusters {
    display: grid;
    gap: 14px;
}

.spammer-cluster {
    padding: 16px;
    border-radius: 20px;
    border: 1px solid rgba(66, 211, 146, 0.11);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.015));
}

.spammer-cluster-head {
    margin-bottom: 14px;
}

.spammer-cluster-head h4,
.spammer-inline-head h4 {
    margin: 4px 0 0;
    font-size: 20px;
}

.spammer-inline-head {
    margin-top: 0;
    margin-bottom: 14px;
    padding-top: 0;
}

.spammer-toggle-grid {
    margin-bottom: 0;
}

.spammer-auto-reply-cluster textarea {
    min-height: 132px;
}

.spammer-senders-cluster {
    background:
        linear-gradient(180deg, rgba(18, 41, 30, 0.95), rgba(15, 28, 22, 0.95));
}

.spammer-chip-list .account-chip {
    min-height: 58px;
    align-items: center;
    border-color: rgba(66, 211, 146, 0.12);
    background: rgba(255, 255, 255, 0.025);
}

.spammer-chip-list .account-chip:hover {
    border-color: rgba(66, 211, 146, 0.22);
    background: rgba(66, 211, 146, 0.07);
}

.spammer-runtime-grid {
    margin-top: 14px;
}

.spammer-table-card {
    padding: 20px;
}

.spammer-table-wrap {
    overflow-x: auto;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.025);
}

.spammer-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.spammer-table th,
.spammer-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.spammer-table th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.03);
}

.spammer-table tbody tr:hover {
    background: rgba(66, 211, 146, 0.05);
}

.spammer-table-sub {
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted);
}

.spammer-table-empty {
    text-align: center;
    color: var(--muted);
}

.identity-top {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.avatar-frame {
    position: relative;
    width: 210px;
    height: 210px;
    border-radius: 42px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background:
        radial-gradient(circle at 30% 30%, rgba(66, 211, 146, 0.18), transparent 42%),
        linear-gradient(180deg, #15261f, #101c17);
    flex-shrink: 0;
}

.avatar-frame img,
.avatar-fallback {
    width: 100%;
    height: 100%;
}

.avatar-frame img {
    object-fit: cover;
    display: none;
}

.avatar-frame.has-image img {
    display: block;
}

.avatar-frame.has-image .avatar-fallback {
    display: none;
}

.avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: 800;
    color: var(--accent);
}

.inline-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.identity-details,
.runtime-metrics,
.preview-summary {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.runtime-metrics,
.preview-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.detail-row,
.metric-box {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.045);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.detail-row {
    display: grid;
    gap: 4px;
}

.detail-row span,
.metric-box span {
    color: var(--muted);
    font-size: 13px;
}

.detail-row strong,
.metric-box strong {
    overflow-wrap: anywhere;
}

.source-preview {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.55;
    color: #e4fff2;
}

.detail-row:hover,
.metric-box:hover,
.upload-preview:hover,
.source-box:hover {
    transform: translateY(-2px);
    border-color: rgba(66, 211, 146, 0.18);
    background: rgba(255, 255, 255, 0.04);
}

.field-grid {
    display: grid;
    gap: 16px;
}

.field-grid.two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-grid.single-column {
    grid-template-columns: minmax(0, 1fr);
}

.field-block {
    display: grid;
    gap: 8px;
}

.forward-privacy-field {
    display: none;
}

.field-block span {
    color: var(--muted);
    font-size: 14px;
}

input[type="text"],
input[type="number"],
input[type="file"],
textarea,
select {
    width: 100%;
    min-height: 48px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--field);
    color: var(--text);
    padding: 12px 14px;
    outline: none;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.photo-input-native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.photo-picker-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 60px;
    padding: 12px 14px;
    border-radius: 18px;
    border: 1px solid rgba(66, 211, 146, 0.12);
    background: linear-gradient(180deg, rgba(20, 40, 30, 0.98), rgba(14, 27, 21, 0.98));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.photo-picker-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(66, 211, 146, 0.18);
    background: linear-gradient(180deg, rgba(66, 211, 146, 0.18), rgba(66, 211, 146, 0.08));
    color: #e9fff4;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.photo-picker-trigger:hover {
    transform: translateY(-1px);
    border-color: rgba(66, 211, 146, 0.28);
    background: linear-gradient(180deg, rgba(66, 211, 146, 0.24), rgba(66, 211, 146, 0.1));
}

.photo-picker-meta {
    color: var(--muted);
    font-size: 13px;
    text-align: right;
    overflow-wrap: anywhere;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    border-color: rgba(66, 211, 146, 0.36);
    background: var(--field-focus);
    box-shadow: 0 0 0 4px rgba(66, 211, 146, 0.08);
}

.status-line {
    margin: 2px 0 0;
    font-size: 14px;
}

.status-line.neutral {
    color: var(--muted);
}

.status-line.success {
    color: var(--success);
}

.status-line.error {
    color: var(--danger);
}

.upload-preview,
.source-box {
    margin-top: 14px;
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.settings-card textarea {
    min-height: 220px;
}

.settings-preview-card {
    min-height: 100%;
}

.web-app-card {
    display: grid;
    gap: 16px;
}

.web-app-status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.web-app-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.web-app-actions {
    margin-top: 0;
}

.web-app-actions .btn {
    min-width: 180px;
}

.web-app-hint-box {
    margin-top: 0;
}

.settings-state-stack {
    display: grid;
    gap: 14px;
}

.settings-state-block {
    display: grid;
    gap: 10px;
}

.settings-state-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.settings-state-head strong {
    font-size: 15px;
}

.settings-state-list {
    display: grid;
    gap: 10px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 4px;
}

.settings-state-item,
.settings-state-empty {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.settings-state-empty {
    color: var(--muted);
}

.settings-state-item-copy {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.settings-state-item-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.settings-state-item-title-row strong {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-state-item-meta {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.settings-how-it-works {
    margin-top: 16px;
}

.upload-preview {
    display: flex;
    align-items: center;
    min-height: 58px;
}

.upload-preview span {
    color: #dfece5;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.toggle-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 8px;
}

.join-toggle-grid {
    margin-top: 16px;
    margin-bottom: 18px;
    padding-bottom: 8px;
}

.join-toggle-grid .toggle-chip {
    min-height: 54px;
}

.toggle-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text);
}

.toggle-chip input {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

.chip-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

#joinAccountSelection {
    margin-top: 10px;
}

.join-actions {
    margin-top: 24px;
    padding-top: 14px;
    border-top: 1px solid rgba(66, 211, 146, 0.1);
}

.account-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    width: 100%;
    padding: 0 14px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.025));
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.015);
}

.account-chip span {
    overflow-wrap: anywhere;
    line-height: 1.25;
}

.account-chip:hover {
    border-color: rgba(66, 211, 146, 0.24);
    background: linear-gradient(180deg, rgba(66, 211, 146, 0.1), rgba(255, 255, 255, 0.02));
}

.account-chip input {
    accent-color: var(--accent);
}

.target-list {
    min-height: 240px;
    max-height: 420px;
    overflow-y: auto;
    margin-top: 16px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    white-space: pre-wrap;
    line-height: 1.55;
}

.target-list.empty {
    color: var(--muted);
}

.activity-log {
    min-height: 250px;
    max-height: 360px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.log-row {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.log-body {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.log-meta {
    display: flex;
    flex-wrap: nowrap;
    flex-shrink: 0;
    gap: 8px;
    align-items: center;
}

.log-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #c8f7dc;
    background: rgba(66, 211, 146, 0.09);
    border: 1px solid rgba(66, 211, 146, 0.18);
}

.log-badge.account {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
}

.log-time {
    color: var(--muted);
    font-size: 12px;
}

.log-message {
    min-width: 0;
    flex: 1 1 auto;
    overflow-wrap: anywhere;
}

.log-row.info .log-message {
    color: var(--text);
}

.log-row.success .log-message {
    color: #d9ffea;
}

.log-row.warning .log-message {
    color: #ffe2ac;
}

.log-row.error .log-message {
    color: #ffd3d7;
}

.toast-stack {
    position: fixed;
    right: 20px;
    bottom: 20px;
    right: calc(20px + env(safe-area-inset-right));
    bottom: calc(20px + env(safe-area-inset-bottom));
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 260px;
    max-width: 360px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(11, 20, 15, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow);
}

.toast-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.toast-message {
    white-space: pre-wrap;
    line-height: 1.45;
}

.toast.success {
    border-color: rgba(79, 219, 140, 0.24);
}

.toast.warning {
    border-color: rgba(255, 190, 85, 0.24);
}

.toast.error {
    border-color: rgba(255, 109, 118, 0.24);
}

.modal-shell {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    padding-top: calc(20px + env(safe-area-inset-top));
    padding-right: calc(20px + env(safe-area-inset-right));
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    padding-left: calc(20px + env(safe-area-inset-left));
    background: rgba(6, 10, 16, 0.72);
    backdrop-filter: blur(14px);
    z-index: 100;
}

.modal-shell.hidden {
    display: none;
}

.modal-card {
    width: min(480px, 100%);
    padding: 22px;
}

.inbox-link-modal-card {
    width: min(520px, 100%);
}

.inbox-link-modal-preview {
    display: grid;
    gap: 10px;
    padding: 16px 18px;
    border-radius: 20px;
    border: 1px solid rgba(88, 219, 154, 0.14);
    background:
        radial-gradient(circle at top right, rgba(66, 211, 146, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(22, 39, 31, 0.98), rgba(13, 24, 19, 0.98));
}

.inbox-link-modal-meta,
.inbox-link-modal-link,
.inbox-link-modal-note {
    margin: 0;
}

.inbox-link-modal-meta {
    color: rgba(237, 245, 240, 0.92);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
}

.inbox-link-modal-link {
    color: rgba(152, 222, 189, 0.82);
    font-size: 13px;
    line-height: 1.45;
    word-break: break-all;
}

.inbox-link-modal-note {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.ios-install-modal-card {
    width: min(520px, 100%);
}

.notification-prompt-modal-card {
    width: min(520px, 100%);
}

.ios-install-steps {
    display: grid;
    gap: 12px;
    margin: 18px 0 16px;
}

.notification-prompt-points {
    display: grid;
    gap: 12px;
    margin: 18px 0 16px;
}

.ios-install-step {
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(88, 219, 154, 0.12);
    background:
        radial-gradient(circle at top right, rgba(66, 211, 146, 0.1), transparent 28%),
        linear-gradient(180deg, rgba(22, 39, 31, 0.98), rgba(13, 24, 19, 0.98));
}

.notification-prompt-point {
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(88, 219, 154, 0.12);
    background:
        radial-gradient(circle at top right, rgba(66, 211, 146, 0.1), transparent 28%),
        linear-gradient(180deg, rgba(22, 39, 31, 0.98), rgba(13, 24, 19, 0.98));
}

.ios-install-step strong {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    letter-spacing: 0.01em;
}

.notification-prompt-point strong {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    letter-spacing: 0.01em;
}

.ios-install-step p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.notification-prompt-point p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.ios-install-hint {
    margin: 0 0 18px;
    color: rgba(219, 235, 225, 0.82);
    font-size: 13px;
    line-height: 1.5;
}

.notification-prompt-hint {
    margin: 0 0 18px;
    color: rgba(219, 235, 225, 0.82);
    font-size: 13px;
    line-height: 1.5;
}

@media (max-width: 1260px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
        max-height: none;
    }

    .brand-card {
        position: static;
    }

    .account-list {
        max-height: 360px;
    }

    .inbox-layout {
        grid-template-columns: 1fr;
    }

    .inbox-sidebar-card,
    .inbox-thread-card {
        height: auto;
        min-height: 0;
    }

    .section-grid-overview,
    .section-grid-profile,
    .section-grid-spam {
        grid-template-columns: 1fr;
    }

    .edit-profile-stack {
        grid-template-columns: 1fr;
    }

    .identity-card,
    .source-card,
    .profile-editor-card,
    .avatar-editor-card,
    .privacy-card,
    .favorites-card {
        grid-column: auto;
        grid-row: auto;
    }

    .spammer-hero-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    body {
        padding: 14px;
        padding-top: calc(14px + env(safe-area-inset-top));
        padding-right: calc(14px + env(safe-area-inset-right));
        padding-bottom: calc(14px + env(safe-area-inset-bottom));
        padding-left: calc(14px + env(safe-area-inset-left));
    }

    .field-grid.two-columns,
    .toggle-grid,
    .runtime-metrics,
    .preview-summary {
        grid-template-columns: 1fr;
    }

    .chip-list {
        grid-template-columns: 1fr;
    }

    .section-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .section-tab {
        width: 100%;
        min-width: 0;
        flex: 0 1 auto;
    }
}

@media (max-width: 430px) {
    body {
        padding: 12px;
        padding-top: calc(12px + env(safe-area-inset-top));
        padding-right: calc(12px + env(safe-area-inset-right));
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
        padding-left: calc(12px + env(safe-area-inset-left));
    }

    .app-shell,
    .sidebar,
    .workspace,
    .workspace-deck,
    .section-stage,
    .section-grid,
    .edit-profile-stack,
    .spammer-shell {
        gap: 14px;
    }

    .sidebar {
        gap: 18px;
    }

    .brand-card,
    .side-panel,
    .log-card,
    .form-card,
    .identity-card,
    .source-card,
    .preview-card,
    .spammer-table-card,
    .inbox-sidebar-card,
    .inbox-thread-card,
    .modal-card {
        padding: 16px;
        border-radius: 22px;
    }

    .brand-card {
        padding-bottom: 18px;
    }

    .brand-card::before,
    .brand-card::after {
        display: none;
    }

    .brand-card h1,
    .panel-head h2,
    .panel-head h3,
    .identity-copy h3 {
        font-size: 28px;
        line-height: 1.04;
    }

    .spammer-hero-copy h2,
    .inbox-thread-copy h3,
    .inbox-side-head h3 {
        font-size: 24px;
        line-height: 1.05;
    }

    .panel-head,
    .settings-state-head,
    .settings-state-item-title-row,
    .inbox-side-head,
    .inbox-thread-head {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .panel-head > .btn,
    .panel-head > .status-pill,
    .panel-head > .count-badge,
    .settings-state-head > .status-pill,
    .inbox-thread-head-actions > .status-pill {
        align-self: flex-start;
    }

    .brand-card .hero-actions {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        gap: 8px;
    }

    .hero-actions > .btn {
        width: 100%;
        flex: 1 1 100%;
    }

    .brand-card .hero-actions .btn {
        min-height: 44px;
        padding: 10px 12px;
    }

    .section-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: visible;
        padding-bottom: 0;
    }

    .section-tab {
        min-height: 48px;
        flex: 0 1 auto;
        width: 100%;
        padding: 10px 12px;
        font-size: 14px;
    }

    .brand-navigator {
        margin-top: 16px;
        padding-top: 16px;
    }

    .web-app-status-grid {
        grid-template-columns: 1fr;
    }

    .web-app-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .web-app-actions .btn {
        min-width: 0;
    }

    .status-pill,
    .count-badge {
        min-height: 30px;
        padding: 0 10px;
        font-size: 12px;
    }

    .account-list {
        max-height: 300px;
    }

    .account-item {
        padding: 12px;
        border-radius: 16px;
    }

    .account-title-row,
    .account-meta-row {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .identity-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .identity-copy {
        display: grid;
        justify-items: center;
        width: 100%;
    }

    .inline-pills {
        justify-content: center;
    }

    .avatar-frame {
        width: 138px;
        height: 138px;
        border-radius: 32px;
    }

    .photo-picker-shell {
        flex-direction: column;
        align-items: stretch;
    }

    .photo-picker-meta {
        text-align: left;
    }

    .spammer-hero-card {
        padding: 18px;
        gap: 14px;
    }

    .spammer-hero-card::after {
        display: none;
    }

    .spammer-hero-copy .helper-text {
        max-width: none;
        font-size: 13px;
        line-height: 1.55;
    }

    .spammer-hero-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .spammer-hero-stat {
        padding: 14px;
        border-radius: 16px;
    }

    .spammer-hero-stat strong {
        font-size: 24px;
    }

    .spammer-hero-stat span {
        font-size: 11px;
        letter-spacing: 0.1em;
    }

    .spammer-cluster {
        padding: 14px;
        border-radius: 18px;
    }

    .spammer-cluster-head,
    .spammer-inline-head {
        margin-bottom: 12px;
    }

    .spammer-cluster-head h4,
    .spammer-inline-head h4 {
        font-size: 18px;
        line-height: 1.15;
    }

    .toggle-grid,
    .join-toggle-grid {
        gap: 8px;
    }

    .toggle-chip,
    .account-chip {
        min-height: 0;
        padding: 12px 14px;
        border-radius: 16px;
        align-items: flex-start;
    }

    .toggle-chip input,
    .account-chip input {
        margin-top: 2px;
        flex: 0 0 auto;
    }

    .spammer-chip-list .account-chip {
        min-height: 0;
        padding: 12px 14px;
        align-items: flex-start;
    }

    .spammer-control-card .hero-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 16px;
    }

    .spammer-control-card .hero-actions .btn {
        min-width: 0;
    }

    .spammer-table-wrap {
        overflow: visible;
        border: 0;
        background: transparent;
    }

    .spammer-table {
        min-width: 0;
        display: block;
    }

    .spammer-table thead {
        display: none;
    }

    .spammer-table tbody {
        display: grid;
        gap: 10px;
    }

    .spammer-table tbody tr {
        display: grid;
        gap: 10px;
        padding: 14px;
        border-radius: 18px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.02));
    }

    .spammer-table td {
        display: grid;
        grid-template-columns: minmax(0, 104px) minmax(0, 1fr);
        gap: 10px;
        align-items: start;
        padding: 0;
        border-bottom: 0;
        overflow-wrap: anywhere;
    }

    .spammer-table td::before {
        color: var(--muted);
        font-size: 11px;
        font-weight: 800;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .spammer-table td:nth-child(1)::before {
        content: "Account";
    }

    .spammer-table td:nth-child(2)::before {
        content: "Status";
    }

    .spammer-table td:nth-child(3)::before {
        content: "Cycle";
    }

    .spammer-table td:nth-child(4)::before {
        content: "Sent";
    }

    .spammer-table td:nth-child(5)::before {
        content: "Skipped";
    }

    .spammer-table td:nth-child(6)::before {
        content: "Errors";
    }

    .spammer-table td:nth-child(7)::before {
        content: "Next";
    }

    .spammer-table-empty {
        display: block !important;
        padding: 2px 0;
        text-align: center;
    }

    .spammer-table-empty::before {
        content: none !important;
    }

    .spammer-table-sub {
        margin-top: 2px;
        font-size: 11px;
    }

    .inbox-sidebar-card,
    .inbox-thread-card {
        gap: 14px;
    }

    .inbox-layout {
        gap: 12px;
    }

    .inbox-sidebar-card {
        min-height: 320px;
        max-height: min(46dvh, 430px);
    }

    .inbox-thread-card {
        height: calc(100dvh - 164px);
        max-height: calc(100dvh - 164px);
        min-height: 0;
        padding: 12px;
        border-radius: 24px;
    }

    .inbox-side-actions,
    .inbox-thread-head-actions {
        width: 100%;
        justify-content: space-between;
    }

    .inbox-thread-identity {
        gap: 12px;
        align-items: flex-start;
    }

    .inbox-thread-avatar,
    .inbox-chat-avatar,
    .inbox-search-item .inbox-chat-avatar {
        width: 48px;
        height: 48px;
        border-radius: 16px;
        font-size: 16px;
    }

    .inbox-chat-list {
        gap: 10px;
        padding-right: 2px;
    }

    .inbox-chat-item,
    .inbox-search-item {
        grid-template-columns: 48px minmax(0, 1fr);
        min-height: auto;
        gap: 10px;
        padding: 12px;
        border-radius: 18px;
        align-items: start;
        grid-auto-flow: row;
    }

    .inbox-chat-copy,
    .inbox-search-copy {
        gap: 8px;
        min-height: 0;
        grid-auto-rows: min-content;
    }

    .inbox-chat-title-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
        gap: 8px;
    }

    .inbox-chat-title-row strong {
        display: -webkit-box;
        font-size: 17px;
        line-height: 1.16;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: normal;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .inbox-chat-title-row .status-pill {
        justify-self: start;
        align-self: start;
        min-height: 30px;
        padding: 0 10px;
        font-size: 12px;
        line-height: 1;
    }

    .inbox-chat-side {
        justify-content: flex-start;
        flex-wrap: wrap;
        width: 100%;
        min-width: 0;
        gap: 8px;
        row-gap: 6px;
    }

    .inbox-chat-meta {
        font-size: 12px;
        line-height: 1.28;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .inbox-chat-preview {
        display: -webkit-box;
        min-height: 0;
        font-size: 12px;
        line-height: 1.32;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: normal;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .inbox-message-list {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        padding: 12px 10px 8px;
        border-radius: 22px;
    }

    .inbox-composer {
        flex: 0 0 auto;
        margin-top: 6px;
        padding-top: 6px;
    }

    .inbox-message {
        gap: 8px;
    }

    .inbox-message-bubble {
        min-width: 0;
        max-width: calc(100% - 44px);
        padding: 10px 12px 8px;
        border-radius: 18px;
    }

    .inbox-message-body {
        font-size: 15px;
    }

    .inbox-message-reply-preview {
        margin-bottom: 8px;
        padding: 8px 9px 7px;
        border-radius: 12px;
    }

    .inbox-message-reply-preview span {
        font-size: 12px;
    }

    .inbox-message-sender,
    .inbox-link-card-url {
        font-size: 12px;
    }

    .inbox-composer-shell {
        padding: 10px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom));
        border-radius: 20px;
    }

    .inbox-message-menu {
        min-width: 0;
        width: min(248px, calc(100vw - 24px));
        max-width: calc(100vw - 24px);
        max-height: min(34dvh, 240px);
        gap: 6px;
        padding: 8px;
        border-radius: 16px;
    }

    .inbox-message-menu-preview {
        display: none;
    }

    .inbox-message-menu-item {
        min-height: 42px;
        padding: 0 12px;
        border-radius: 12px;
        font-size: 14px;
    }

    .inbox-composer textarea {
        min-height: 78px;
        max-height: 156px;
    }

    .inbox-composer-actions {
        display: grid;
        grid-template-columns: 48px minmax(0, 1fr);
        align-items: stretch;
        gap: 8px;
        margin-top: 8px;
    }

    .inbox-composer-actions .btn {
        min-height: 44px;
    }

    .inbox-emoji-wrap {
        width: 48px;
    }

    .inbox-emoji-panel {
        left: 0;
        right: auto;
        width: min(280px, calc(100vw - 40px));
    }

    .target-list,
    .settings-state-list,
    .activity-log {
        max-height: 280px;
    }

    .log-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .log-body,
    .log-meta {
        flex-wrap: wrap;
    }

    .toast-stack {
        left: calc(12px + env(safe-area-inset-left));
        right: calc(12px + env(safe-area-inset-right));
        bottom: calc(12px + env(safe-area-inset-bottom));
    }

    .toast {
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    .modal-shell {
        padding: 12px;
        padding-top: calc(12px + env(safe-area-inset-top));
        padding-right: calc(12px + env(safe-area-inset-right));
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
        padding-left: calc(12px + env(safe-area-inset-left));
    }

    .modal-card,
    .ios-install-modal-card,
    .notification-prompt-modal-card,
    .inbox-link-modal-card,
    .inbox-search-modal-card {
        width: 100%;
        padding: 18px;
        border-radius: 22px;
    }

    .ios-install-step {
        padding: 12px 14px;
        border-radius: 16px;
    }

    .notification-prompt-point {
        padding: 12px 14px;
        border-radius: 16px;
    }
}
