/* ===== THEME SYSTEM ===== */
:root {
    --font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Cormorant Garamond', Georgia, serif;
}

[data-theme="dark"] {
    --bg: #09090b;
    --bg-2: #111113;
    --bg-3: #18181b;
    --bg-4: #1e1e22;
    --border: #27272a;
    --border-2: #333338;
    --text: #fafafa;
    --text-2: #a1a1aa;
    --text-3: #71717a;
    --accent: #f59e0b;
    --accent-hover: #d97706;
    --accent-bg: rgba(245, 158, 11, 0.08);
    --accent-border: rgba(245, 158, 11, 0.2);
    --user-bg: #1a1a2e;
    --user-border: #2a2a3a;
    --green: #22c55e;
    --blue: #3b82f6;
    --red: #ef4444;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    --glow: 0 0 80px rgba(245, 158, 11, 0.04);
    --sidebar-bg: #0e0e12;
    --home-shadow-primary: rgba(245, 158, 11, 0.10);
    --home-shadow-secondary: rgba(255, 255, 255, 0.04);
    --home-shadow-tertiary: rgba(245, 158, 11, 0.03);
}

[data-theme="light"] {
    --bg: #ffffff;
    --bg-2: #fbf7f1;
    --bg-3: #f5eee4;
    --bg-4: #efe4d6;
    --border: #e6d8c7;
    --border-2: #d8c2ab;
    --text: #1f1711;
    --text-2: #6d5a48;
    --text-3: #9a846d;
    --accent: #c78327;
    --accent-hover: #a96518;
    --accent-bg: rgba(199, 131, 39, 0.08);
    --accent-border: rgba(199, 131, 39, 0.22);
    --user-bg: #f9f1e6;
    --user-border: #e5cfb7;
    --green: #16a34a;
    --blue: #2563eb;
    --red: #dc2626;
    --card-shadow: 0 8px 26px rgba(122, 91, 48, 0.08);
    --glow: none;
    --sidebar-bg: #f8f1e7;
    --home-shadow-primary: rgba(215, 164, 83, 0.16);
    --home-shadow-secondary: rgba(191, 140, 73, 0.08);
    --home-shadow-tertiary: rgba(255, 244, 226, 0.9);
}

[data-theme="midnight"] {
    --bg: #0b1120;
    --bg-2: #111827;
    --bg-3: #1a2332;
    --bg-4: #1f2b3d;
    --border: #1e3050;
    --border-2: #2a4060;
    --text: #e2e8f0;
    --text-2: #94a3b8;
    --text-3: #64748b;
    --accent: #38bdf8;
    --accent-hover: #0ea5e9;
    --accent-bg: rgba(56, 189, 248, 0.08);
    --accent-border: rgba(56, 189, 248, 0.2);
    --user-bg: #132040;
    --user-border: #1e3560;
    --green: #34d399;
    --blue: #60a5fa;
    --red: #f87171;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    --glow: 0 0 80px rgba(56, 189, 248, 0.04);
    --sidebar-bg: #080e1a;
    --home-shadow-primary: rgba(56, 189, 248, 0.14);
    --home-shadow-secondary: rgba(96, 165, 250, 0.08);
    --home-shadow-tertiary: rgba(14, 165, 233, 0.05);
}

[data-theme="warm"] {
    --bg: #1c1917;
    --bg-2: #221f1b;
    --bg-3: #292524;
    --bg-4: #302c28;
    --border: #3d3530;
    --border-2: #4a403a;
    --text: #fef3c7;
    --text-2: #c8a97a;
    --text-3: #8a7560;
    --accent: #f97316;
    --accent-hover: #ea580c;
    --accent-bg: rgba(249, 115, 22, 0.08);
    --accent-border: rgba(249, 115, 22, 0.2);
    --user-bg: #2a2218;
    --user-border: #3d3225;
    --green: #4ade80;
    --blue: #60a5fa;
    --red: #fb7185;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    --glow: 0 0 80px rgba(249, 115, 22, 0.04);
    --sidebar-bg: #151210;
    --home-shadow-primary: rgba(249, 115, 22, 0.14);
    --home-shadow-secondary: rgba(251, 191, 36, 0.07);
    --home-shadow-tertiary: rgba(249, 115, 22, 0.04);
}

/* ===== BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    min-height: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 12%, var(--home-shadow-primary), transparent 30%),
        radial-gradient(circle at 12% 24%, var(--home-shadow-secondary), transparent 22%),
        radial-gradient(circle at 82% 18%, var(--home-shadow-tertiary), transparent 24%);
    z-index: 0;
}

[data-theme="light"] body {
    background:
        linear-gradient(180deg, #fffdfa 0%, #fbf6ef 42%, #f8f1e7 100%);
}

.hidden {
    display: none !important;
}

/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    z-index: 200;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    display: flex;
    flex-direction: column;
}

[data-theme="light"] .sidebar {
    background: linear-gradient(180deg, rgba(250, 243, 234, 0.98), rgba(246, 236, 223, 0.98));
    border-right-color: rgba(181, 133, 71, 0.16);
    box-shadow: 10px 0 30px rgba(120, 88, 46, 0.06);
}

.sidebar.open {
    transform: translateX(0);
}

/* Push main content when sidebar is open (desktop) */
.navbar,
.main-content,
.input-bar {
    transition: margin-left 0.25s ease;
}

.sidebar.open~.navbar,
.sidebar.open~.main-content,
.sidebar.open~.input-bar {
    margin-left: 280px;
}

/* Overlay — only visible on mobile */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 199;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    display: none;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 63px;
    padding: 0 20px;
    box-sizing: border-box;
    border-bottom: 1px solid var(--border);
}

[data-theme="light"] .sidebar-header,
[data-theme="light"] .sidebar-footer {
    border-color: rgba(181, 133, 71, 0.14);
}

.sidebar-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

.sidebar-close {
    background: none;
    border: none;
    color: var(--text-3);
    cursor: pointer;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
}

.sidebar-close:hover {
    color: var(--text);
}

.sidebar-new-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px;
    padding: 10px 14px;
    background: var(--accent-bg);
    border: 1px dashed var(--accent-border);
    color: var(--accent);
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.15s;
}

.sidebar-new-btn:hover {
    background: var(--accent);
    color: #000;
    border-style: solid;
}

[data-theme="light"] .sidebar-new-btn {
    background: rgba(199, 131, 39, 0.08);
    border-color: rgba(199, 131, 39, 0.2);
    color: #aa6c1d;
}

.chat-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 8px;
}

.chat-list::-webkit-scrollbar {
    width: 4px;
}

.chat-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

.chat-list-empty {
    text-align: center;
    color: var(--text-3);
    font-size: 0.8rem;
    padding: 30px 16px;
}

.chat-list-item {
    padding: 10px 14px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    position: relative;
    border-left: 3px solid transparent;
}

.chat-list-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(4px);
    border-color: rgba(255, 255, 255, 0.1);
}

.chat-list-item.active {
    background: linear-gradient(90deg, var(--accent-bg) 0%, transparent 100%);
    border-left-color: var(--accent);
    border-color: var(--accent-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

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

.chat-item-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.01em;
}

.chat-delete-btn {
    opacity: 0;
    transform: scale(0.8) translateX(10px);
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: #ef4444;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.chat-list-item:hover .chat-delete-btn {
    opacity: 1;
    transform: scale(1) translateX(0);
}

.chat-delete-btn:hover {
    background: #ef4444;
    color: #fff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--border);
}

.clear-all-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 8px 12px;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-3);
    border-radius: 8px;
    font-size: 0.75rem;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.15s;
}

.clear-all-btn:hover {
    border-color: var(--red);
    color: var(--red);
}

/* ===== NAVBAR ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: color-mix(in srgb, var(--bg), transparent 25%);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
}

[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.35);
    /* Switched to pure white with lower opacity */
    border-bottom-color: rgba(181, 133, 71, 0.08);
    box-shadow:
        0 4px 20px rgba(133, 101, 56, 0.03),
        inset 0 -1px 0 rgba(255, 255, 255, 0.4);
}

.nav-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.42rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.03em;
    color: var(--accent);
    text-decoration: none;
}

[data-theme="light"] .nav-brand {
    color: #aa6c1d;
}

.nav-icon {
    width: 20px;
    height: 20px;
    color: var(--accent);
}

.nav-justice {
    width: 24px;
    height: 24px;
    padding: 4px;
    border-radius: 999px;
    background:
        radial-gradient(circle at 28% 28%, rgba(255, 255, 255, 0.46), transparent 35%),
        linear-gradient(180deg, rgba(214, 179, 106, 0.18), rgba(214, 179, 106, 0.08));
    border: 1px solid rgba(214, 179, 106, 0.24);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        0 8px 18px rgba(214, 179, 106, 0.14);
    flex: none;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-btn,
.theme-btn,
.new-chat-btn {
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
}

.menu-btn {
    background: none;
    color: var(--text-2);
    width: 36px;
    height: 36px;
}

.theme-btn {
    background: var(--bg-3);
    border: 1px solid var(--border);
    color: var(--text-2);
    width: 34px;
    height: 34px;
}

[data-theme="light"] .menu-btn,
[data-theme="light"] .theme-btn {
    background: rgba(176, 127, 66, 0.08);
    border-color: rgba(176, 127, 66, 0.18);
    color: #7b5a37;
}

.menu-btn:hover,
.theme-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-bg);
}

.new-chat-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(214, 179, 106, 0.12);
    border: 1px solid rgba(214, 179, 106, 0.24);
    color: var(--accent);
    padding: 7px 14px;
    border-radius: 9px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: none;
}

.new-chat-btn:hover {
    border-color: rgba(214, 179, 106, 0.38);
    color: var(--accent-hover);
    background: rgba(214, 179, 106, 0.16);
}

[data-theme="light"] .new-chat-btn {
    background: rgba(199, 131, 39, 0.1);
    border-color: rgba(199, 131, 39, 0.22);
    color: #aa6c1d;
}

[data-theme="light"] .new-chat-btn:hover {
    background: rgba(199, 131, 39, 0.16);
    border-color: rgba(199, 131, 39, 0.28);
    color: #8d5918;
}

/* Language Selector */
.lang-selector {
    position: relative;
    flex: 0 0 138px;
}

.lang-selector select {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.lang-dropdown-btn {
    background: var(--bg-3);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 6px 10px;
    border-radius: 9px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.15s;
    padding-right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 138px;
    box-sizing: border-box;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

#langDropdownLabel {
    flex: 1;
    min-width: 0;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lang-dropdown-btn:hover {
    border-color: var(--accent);
}

.lang-dropdown-btn:focus,
.lang-selector.open .lang-dropdown-btn {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 72%, transparent);
}

.lang-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 100%;
    box-sizing: border-box;
    background: rgba(17, 20, 29, 0.96);
    border: 1px solid color-mix(in srgb, var(--accent) 72%, transparent);
    border-radius: 12px;
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    padding: 8px;
    display: none;
    z-index: 80;
    max-height: 320px;
    overflow-y: auto;
    scrollbar-width: none;
}

.lang-dropdown-menu::-webkit-scrollbar {
    display: none;
}

.lang-selector.open .lang-dropdown-menu {
    display: block;
}

.lang-dropdown-option {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-weight: 600;
    text-align: left;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.lang-dropdown-option:hover,
.lang-dropdown-option.is-active {
    background: color-mix(in srgb, var(--accent) 18%, transparent);
    color: #fff;
}

[data-theme="light"] .lang-dropdown-btn {
    background-color: rgba(255, 253, 249, 0.96);
    border-color: rgba(176, 127, 66, 0.18);
    color: #2f2419;
}

[data-theme="light"] .lang-dropdown-btn:focus,
[data-theme="light"] .lang-selector.open .lang-dropdown-btn {
    border-color: #c78327;
    box-shadow: 0 0 0 1px rgba(199, 131, 39, 0.7);
}

[data-theme="light"] .lang-dropdown-menu {
    background: rgba(255, 250, 243, 0.96);
    border-color: rgba(199, 131, 39, 0.72);
    box-shadow: 0 22px 44px rgba(133, 101, 56, 0.16);
}

[data-theme="light"] .lang-dropdown-option {
    color: #2f2419;
}

[data-theme="light"] .lang-dropdown-option:hover,
[data-theme="light"] .lang-dropdown-option.is-active {
    background: rgba(199, 131, 39, 0.16);
    color: #8d5918;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

[data-theme="light"] .main-content {
    background: transparent;
}

/* ===== WELCOME ===== */
.welcome-screen {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 150px 20px 20px;
    min-height: auto;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.welcome-screen::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("https://upload.wikimedia.org/wikipedia/commons/5/55/Emblem_of_India.svg");
    background-repeat: no-repeat;
    background-position: center 38%;
    background-size: min(27vw, 260px);
    opacity: 0.11;
    filter: brightness(0) saturate(100%) invert(72%) sepia(26%) saturate(1040%) hue-rotate(356deg) brightness(96%) contrast(96%);
    pointer-events: none;
    z-index: 0;
}

[data-theme="light"] .welcome-screen::before {
    opacity: 0.16;
    filter: brightness(0) saturate(100%) invert(48%) sepia(42%) saturate(980%) hue-rotate(10deg) brightness(93%) contrast(93%);
}

[data-theme="dark"] .welcome-screen::before {
    opacity: 0.1;
    filter: brightness(0) saturate(100%) invert(80%) sepia(18%) saturate(690%) hue-rotate(356deg) brightness(100%) contrast(95%);
}

[data-theme="midnight"] .welcome-screen::before {
    opacity: 0.11;
    filter: brightness(0) saturate(100%) invert(72%) sepia(20%) saturate(1180%) hue-rotate(171deg) brightness(99%) contrast(97%);
}

[data-theme="warm"] .welcome-screen::before {
    opacity: 0.13;
    filter: brightness(0) saturate(100%) invert(79%) sepia(30%) saturate(760%) hue-rotate(338deg) brightness(101%) contrast(98%);
}

.welcome-inner {
    width: min(100%, 1180px);
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-rows: min-content;
    gap: 24px;
    align-items: start;
    justify-items: center;
    text-align: center;
    padding: 26px 22px 28px;
    position: relative;
    z-index: 1;
}

[data-theme="light"] .welcome-inner {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 26px 20px;
}

.welcome-inner>* {
    min-width: 0;
}

.hero-badge {
    justify-self: center;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 20px 9px 12px;
    border-radius: 999px;
    position: relative;
    background: transparent;
    border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    color: var(--text);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    overflow: hidden;
}

/* Pulsing live dot */
.hero-badge::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    flex-shrink: 0;
    animation: badge-dot-pulse 2.2s ease-in-out infinite;
}

/* Shimmer sweep */
.hero-badge::after {
    content: "";
    position: absolute;
    top: 0;
    left: -80%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.1),
            transparent);
    animation: badge-shimmer 4s ease-in-out infinite;
    pointer-events: none;
}

[data-theme="light"] .hero-badge::after {
    background: linear-gradient(90deg,
            transparent,
            rgba(199, 131, 39, 0.16),
            rgba(255, 255, 255, 0.35),
            rgba(199, 131, 39, 0.12),
            transparent);
}

@keyframes badge-dot-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 6px var(--accent);
    }

    50% {
        opacity: 0.55;
        transform: scale(1.4);
        box-shadow: 0 0 14px var(--accent), 0 0 24px var(--accent-bg);
    }
}

@keyframes badge-shimmer {
    0% {
        left: -80%;
    }

    60%,
    100% {
        left: 160%;
    }
}

[data-theme="light"] .hero-badge {
    background: transparent;
    border-color: rgba(181, 133, 71, 0.16);
    color: #2f2419;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.welcome-inner h1 {
    font-family: var(--font-display);
    font-size: clamp(3.1rem, 5.2vw, 5.6rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    margin-bottom: 0;
    max-width: none;
    text-wrap: nowrap;
    white-space: nowrap;
}

.hero-sub {
    font-size: clamp(1rem, 1.35vw, 1.14rem);
    color: var(--text-2);
    max-width: 760px;
    margin: 4px 0 0;
    line-height: 1.4;
}

[data-theme="light"] .hero-sub {
    color: #6b5a4b;
}

.hero-promise {
    padding: 10px 16px;
    border-radius: 14px;
    border: 1px solid rgba(245, 158, 11, 0.22);
    background: rgba(245, 158, 11, 0.08);
    color: #f7deb1;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 4px;
}

[data-theme="light"] .hero-promise {
    background: transparent;
    border-color: rgba(207, 154, 78, 0.22);
    color: #b77a21;
    box-shadow: none;
}

.trust-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 760px;
    margin-top: 2px;
}

.trust-pill {
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 700;
}

[data-theme="light"] .trust-pill {
    background: transparent;
    border-color: rgba(181, 133, 71, 0.28);
    color: #2f2419;
    box-shadow: none;
}

.mini-stats {
    display: none;
}

.mini-stat {
    display: none;
}

.chips-section {
    margin-bottom: 0;
    width: 100%;
    padding: 6px 0 6px;
    border: none;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    position: relative;
    overflow: visible;
    isolation: isolate;
}

.chips-label {
    color: var(--text-3);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 16px;
    text-align: center;
}

.gradient-text {
    background: linear-gradient(180deg, #f5d389, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="light"] .gradient-text {
    background: linear-gradient(180deg, #d7a24f, #bd741d);
    -webkit-background-clip: text;
    background-clip: text;
}

.chips-section {
    margin-bottom: 0;
}

.justice-figure {
    display: none;
}

.justice-figure svg,
.justice-figure img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.justice-balance {
    width: 100%;
    height: 100%;
    overflow: visible !important;
}

.justice-balance .scale-left,
.justice-balance .scale-right,
.justice-balance .scale-beam {
    will-change: transform;
    transform-box: view-box;
}

.scale-beam {
    transform-origin: 101.7px 21.5px;
    /* Precision fulcrum point */
    animation: beam-tilt 9s linear infinite;
    will-change: transform;
}

.scale-left {
    transform-origin: 46.5px 42.5px;
    /* Precision hinge point at the bottom of the hardware eye */
    animation: counter-balance 9s linear infinite;
    will-change: transform;
}

.scale-left-pan-piece {
    animation: left-pan-offset 9s linear infinite;
    will-change: transform;
}

.left-chain {
    transform-box: view-box;
    will-change: transform;
}

.left-chain-front {
    transform-origin: 44.5px 42.5px;
    animation: left-chain-stretch 9s linear infinite;
}

.left-chain-back {
    transform-origin: 48.5px 42.5px;
    animation: left-chain-stretch 9s linear infinite;
}

.scale-right-pan-piece {
    animation: right-pan-offset 9s linear infinite;
    will-change: transform;
}

.right-chain {
    transform-box: view-box;
    will-change: transform;
}

.right-chain-front {
    transform-origin: 155px 42.5px;
    animation: right-chain-stretch 9s linear infinite;
}

.right-chain-back {
    transform-origin: 159px 42.5px;
    animation: right-chain-stretch 9s linear infinite;
}

.scale-right {
    transform-origin: 157px 42.5px;
    /* Precision hinge point at the bottom of the hardware eye */
    animation: counter-balance 9s linear infinite;
    will-change: transform;
}

@keyframes beam-tilt {
    0% {
        transform: rotate(0deg);
    }

    12.5% {
        transform: rotate(4.2deg);
    }

    25% {
        transform: rotate(6deg);
    }

    37.5% {
        transform: rotate(4.2deg);
    }

    50% {
        transform: rotate(0deg);
    }

    62.5% {
        transform: rotate(-4.2deg);
    }

    75% {
        transform: rotate(-6deg);
    }

    87.5% {
        transform: rotate(-4.2deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

@keyframes counter-balance {
    0% {
        transform: rotate(0deg);
    }

    12.5% {
        transform: rotate(-4.2deg);
    }

    25% {
        transform: rotate(-6deg);
    }

    37.5% {
        transform: rotate(-4.2deg);
    }

    50% {
        transform: rotate(0deg);
    }

    62.5% {
        transform: rotate(4.2deg);
    }

    75% {
        transform: rotate(6deg);
    }

    87.5% {
        transform: rotate(4.2deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

@keyframes left-pan-offset {
    0% {
        transform: translateY(0);
    }

    12.5% {
        transform: translateY(-8px);
    }

    25% {
        transform: translateY(-12px);
    }

    37.5% {
        transform: translateY(-8px);
    }

    50% {
        transform: translateY(0);
    }

    62.5% {
        transform: translateY(8px);
    }

    75% {
        transform: translateY(12px);
    }

    87.5% {
        transform: translateY(8px);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes left-chain-stretch {
    0% {
        transform: scaleY(1);
    }

    12.5% {
        transform: scaleY(0.92);
    }

    25% {
        transform: scaleY(0.88);
    }

    37.5% {
        transform: scaleY(0.92);
    }

    50% {
        transform: scaleY(1);
    }

    62.5% {
        transform: scaleY(1.08);
    }

    75% {
        transform: scaleY(1.12);
    }

    87.5% {
        transform: scaleY(1.08);
    }

    100% {
        transform: scaleY(1);
    }
}

@keyframes right-pan-offset {
    0% {
        transform: translateY(0);
    }

    12.5% {
        transform: translateY(8px);
    }

    25% {
        transform: translateY(12px);
    }

    37.5% {
        transform: translateY(8px);
    }

    50% {
        transform: translateY(0);
    }

    62.5% {
        transform: translateY(-8px);
    }

    75% {
        transform: translateY(-12px);
    }

    87.5% {
        transform: translateY(-8px);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes right-chain-stretch {
    0% {
        transform: scaleY(1);
    }

    12.5% {
        transform: scaleY(1.08);
    }

    25% {
        transform: scaleY(1.12);
    }

    37.5% {
        transform: scaleY(1.08);
    }

    50% {
        transform: scaleY(1);
    }

    62.5% {
        transform: scaleY(0.92);
    }

    75% {
        transform: scaleY(0.88);
    }

    87.5% {
        transform: scaleY(0.92);
    }

    100% {
        transform: scaleY(1);
    }
}

@media (prefers-reduced-motion: reduce) {

    .scale-beam,
    .scale-left,
    .scale-right,
    .scale-left-pan-piece,
    .left-chain-front,
    .left-chain-back,
    .scale-right-pan-piece,
    .right-chain-front,
    .right-chain-back {
        animation: none;
    }
}

[data-theme="light"] .justice-figure {
    color: #8e6a42;
    opacity: 0.26;
    mix-blend-mode: multiply;
    filter: sepia(0.22) saturate(0.8) contrast(1.04) drop-shadow(0 18px 36px rgba(112, 86, 47, 0.12));
}

[data-theme="dark"] .justice-figure {
    color: #f7e7c0;
    opacity: 0.24;
}

[data-theme="midnight"] .justice-figure {
    color: #d4ecff;
    opacity: 0.22;
}

[data-theme="warm"] .justice-figure {
    color: #fde2b4;
    opacity: 0.22;
}

.chips-section>* {
    position: relative;
    z-index: 1;
}

.chips {
    --chips-gap: 14px;
    margin-top: 6px;
    display: block;
    width: 100%;
    min-height: auto;
    overflow: hidden;
    overflow-y: hidden;
    padding: 6px 6px 12px;
    scrollbar-width: none;
}

.chips::-webkit-scrollbar {
    display: none;
}

.chips-marquee {
    display: flex;
    align-items: stretch;
    gap: var(--chips-gap);
    width: max-content;
    animation: chips-marquee 28s linear infinite;
    will-change: transform;
}

.chips:hover .chips-marquee {
    animation-play-state: paused;
}

.chips-set {
    display: flex;
    align-items: stretch;
    gap: var(--chips-gap);
}

@keyframes chips-marquee {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(calc(-50% - (var(--chips-gap) / 2)));
    }
}

.chip {
    display: grid;
    grid-template-columns: 26px 1fr;
    align-items: center;
    gap: 10px;
    flex: 0 0 clamp(168px, 14vw, 204px);
    min-height: 62px;
    padding: 12px 14px;
    border-radius: 20px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-2);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    text-align: left;
    white-space: normal;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
}

[data-theme="light"] .chip {
    background: transparent;
    border: 1px solid rgba(181, 133, 71, 0.22);
    box-shadow: none;
}

[data-theme="light"] .chip:hover {
    background: transparent;
    border-color: var(--accent);
    box-shadow: none;
}



.chip-body {
    min-width: 0;
}

.chip:nth-child(n) {
    grid-column: auto;
    grid-row: auto;
    justify-self: stretch;
    width: auto;
    transform: none;
}

.chip:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: transparent;
    box-shadow: none;
    transform: translateY(-2px);
}

.chip svg {
    flex-shrink: 0;
}

.chip-label {
    font-size: 0.92rem;
    line-height: 1.18;
    font-weight: 700;
    color: var(--text);
}

.chip-icon {
    width: 26px;
    height: 26px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: var(--accent-bg);
    border: 1px solid var(--accent-border);
    color: var(--accent);
}

.chip:hover .chip-arrow {
    transform: translateX(2px);
    opacity: 1;
}

.mini-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--text-3);
    font-size: 0.8rem;
    width: 100%;
    margin-top: 132px;
    padding-bottom: 0;
}

.mini-stat {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 130px;
}

[data-theme="light"] .mini-stat {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(251, 245, 236, 0.96));
    border-color: rgba(181, 133, 71, 0.18);
    box-shadow:
        0 16px 34px rgba(120, 88, 46, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

[data-theme="light"] .mini-stat strong {
    color: #241a12;
}

[data-theme="light"] .mini-stat span {
    color: #9b7b58;
}

.mini-stat strong {
    color: var(--text);
    font-weight: 800;
}

.mini-stat span {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.7rem;
}

.mini-stat-dot {
    display: none;
}

/* ===== CHAT AREA ===== */
.chat-area {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px 20px 126px;
    scroll-behavior: smooth;
}

[data-theme="light"] .chat-messages {
    background: transparent;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

/* ===== SCROLL TO BOTTOM BUTTON ===== */
.scroll-bottom-btn {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background: var(--bg-3);
    border: 1px solid var(--border);
    color: var(--text-2);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
}

.scroll-bottom-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.scroll-bottom-btn:hover {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

/* ===== MESSAGES ===== */
.msg {
    max-width: 900px;
    margin: 0 auto 16px;
    animation: msgIn 0.25s ease;
}

@keyframes msgIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.msg-bubble {
    border-radius: 16px;
    padding: 16px 20px;
}

.msg-user {
    display: flex;
    justify-content: flex-end;
}

.user-bubble {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--user-bg) 92%, rgba(255, 255, 255, 0.08)), color-mix(in srgb, var(--user-bg) 84%, rgba(255, 255, 255, 0.02))),
        linear-gradient(145deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent 58%);
    border: 1px solid var(--user-border);
    max-width: 75%;
    border-radius: 16px 16px 4px 16px;
    box-shadow:
        0 16px 32px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.user-bubble::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 30%, transparent 72%, rgba(255, 255, 255, 0.03)),
        radial-gradient(circle at top right, color-mix(in srgb, var(--accent) 18%, transparent), transparent 42%);
    pointer-events: none;
}

.user-bubble-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.prompt-edit-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--user-border));
    background: color-mix(in srgb, var(--bg-1) 42%, transparent);
    color: color-mix(in srgb, var(--text) 70%, var(--accent));
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}

.prompt-edit-btn svg {
    width: 17px;
    height: 17px;
}

.prompt-edit-btn:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--accent) 68%, transparent);
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 12%, var(--bg-1));
}

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

.user-bubble .msg-text {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text);
}

.msg-ai {
    display: flex;
    justify-content: flex-start;
}

.ai-bubble {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03) 34%, rgba(255, 255, 255, 0.01) 100%),
        linear-gradient(145deg, color-mix(in srgb, var(--bg-1) 14%, transparent), color-mix(in srgb, var(--bg-3) 10%, transparent));
    border: 1px solid color-mix(in srgb, var(--border) 28%, rgba(255, 255, 255, 0.5));
    max-width: 90%;
    border-radius: 16px 16px 16px 4px;
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        inset 0 -1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(30px) saturate(190%);
    -webkit-backdrop-filter: blur(30px) saturate(190%);
}

.ai-bubble::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04) 18%, transparent 34%, transparent 74%, rgba(255, 255, 255, 0.04)),
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.12), transparent 36%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02) 28%, transparent 52%);
    opacity: 0.72;
    pointer-events: none;
}

.ai-bubble::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    background:
        radial-gradient(circle at top center, rgba(255, 255, 255, 0.08), transparent 48%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 18%, transparent 82%, rgba(255, 255, 255, 0.02));
    mix-blend-mode: screen;
    opacity: 0.46;
    pointer-events: none;
}

[data-theme="light"] .ai-bubble {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.045) 30%, rgba(255, 255, 255, 0.015) 100%),
        linear-gradient(145deg, rgba(255, 250, 244, 0.18), rgba(244, 232, 212, 0.06));
    border-color: rgba(181, 133, 71, 0.3);
    box-shadow:
        0 18px 40px rgba(181, 133, 71, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.38),
        inset 0 -1px 0 rgba(181, 133, 71, 0.06);
    backdrop-filter: blur(34px) saturate(185%);
    -webkit-backdrop-filter: blur(34px) saturate(185%);
}

[data-theme="light"] .ai-bubble::before {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.08) 18%, transparent 36%, transparent 74%, rgba(255, 245, 229, 0.12)),
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.2), transparent 36%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04) 30%, transparent 54%);
}

[data-theme="light"] .ai-bubble::after {
    background:
        radial-gradient(circle at top center, rgba(255, 255, 255, 0.18), transparent 50%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 20%, transparent 82%, rgba(223, 191, 145, 0.05));
    opacity: 0.8;
}

[data-theme="midnight"] .ai-bubble {
    border-color: rgba(82, 171, 214, 0.28);
    background:
        linear-gradient(180deg, rgba(173, 228, 255, 0.08), rgba(173, 228, 255, 0.02) 34%, rgba(255, 255, 255, 0.008) 100%),
        linear-gradient(145deg, rgba(8, 33, 56, 0.22), rgba(6, 21, 40, 0.12));
    box-shadow:
        0 18px 42px rgba(38, 131, 188, 0.18),
        inset 0 1px 0 rgba(137, 205, 241, 0.16);
}

[data-theme="warm"] .ai-bubble {
    border-color: rgba(223, 165, 94, 0.28);
    background:
        linear-gradient(180deg, rgba(255, 223, 179, 0.08), rgba(255, 223, 179, 0.02) 34%, rgba(255, 255, 255, 0.008) 100%),
        linear-gradient(145deg, rgba(63, 35, 10, 0.18), rgba(34, 18, 5, 0.1));
    box-shadow:
        0 18px 42px rgba(191, 126, 52, 0.18),
        inset 0 1px 0 rgba(255, 223, 179, 0.14);
}

[data-theme="light"] .user-bubble {
    background:
        linear-gradient(180deg, rgba(250, 241, 229, 0.96), rgba(245, 232, 211, 0.94)),
        linear-gradient(145deg, rgba(199, 131, 39, 0.06), transparent 58%);
    border-color: rgba(199, 131, 39, 0.22);
    box-shadow:
        0 18px 34px rgba(181, 133, 71, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

[data-theme="light"] .prompt-edit-btn {
    background: rgba(255, 255, 255, 0.48);
    border-color: rgba(199, 131, 39, 0.2);
    color: rgba(130, 92, 44, 0.92);
}

[data-theme="light"] .prompt-edit-btn:hover {
    background: rgba(255, 248, 237, 0.9);
    border-color: rgba(199, 131, 39, 0.4);
    color: rgba(176, 113, 27, 1);
}

.msg-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 12px;
}

.msg-time {
    background: var(--bg-3);
    color: var(--green);
    padding: 1px 7px;
    border-radius: 5px;
    font-size: 0.68rem;
    font-weight: 600;
    margin-left: 4px;
}

.ai-bubble .msg-text {
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--text);
}

.msg-text h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
    margin: 12px 0 4px;
}

.msg-text h2:first-child {
    margin-top: 0;
}

.msg-text h3 {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    margin: 10px 0 3px;
}

.msg-text strong {
    color: var(--text);
    font-weight: 700;
}

.msg-text ul,
.msg-text ol {
    margin: 3px 0;
    padding-left: 20px;
}

.msg-text li {
    margin: 1px 0;
    color: var(--text-2);
    font-size: 0.88rem;
    line-height: 1.55;
}

.msg-text li strong {
    color: var(--text);
}

.msg-text p {
    margin: 0 0 5px;
}

.msg-text p:last-child {
    margin-bottom: 0;
}

/* Message Actions */
.msg-actions {
    display: flex;
    gap: 4px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.msg-action-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-3);
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.15s;
}

.msg-action-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.msg-action-btn.copied {
    border-color: var(--green);
    color: var(--green);
}

/* Typing cursor */
.msg-text.typing::after {
    content: '';
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--accent);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: blink 0.6s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Sources */
.msg-sources {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.sources-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.sources-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sources-links a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    color: var(--blue);
    padding: 4px 10px;
    border-radius: 7px;
    font-size: 0.73rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sources-links a:hover {
    border-color: var(--blue);
    background: rgba(59, 130, 246, 0.06);
}

.fade-in {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading */
.loading-area {
    padding: 4px 0;
}

.loading-dots {
    display: flex;
    gap: 5px;
    padding: 4px 0;
}

.loading-dots span {
    width: 7px;
    height: 7px;
    background: var(--accent);
    border-radius: 50%;
    animation: bounce 1.2s infinite;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.15s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes bounce {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.3;
    }

    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

.loading-label {
    font-size: 0.78rem;
    color: var(--text-3);
    margin-top: 6px;
}

.error-toast {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 13px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
}

/* ===== INPUT BAR ===== */
.input-bar {
    position: sticky;
    bottom: 0;
    z-index: 50;
    background: transparent;
    border-top: none;
    flex-shrink: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.home-mode .main-content {
    flex: 1;
    overflow: hidden;
    position: relative;
}

body.home-mode .welcome-screen {
    flex: 1;
    min-height: 100%;
    overflow: hidden;
    /* padding-top: 10px; */
    padding-bottom: 160px;
    /* align-items: flex-start; */
}

body.home-mode .input-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    background: transparent;
    border-top: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

[data-theme="light"] .input-bar {
    background: transparent;
    box-shadow: none;
}

.input-bar-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 38px 20px 14px;
}

.input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 8px 8px 8px 20px;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.input-wrap:focus-within {
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(255, 255, 255, 0.05);
    box-shadow:
        0 15px 50px rgba(245, 158, 11, 0.1),
        inset 0 1px 1px rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .input-wrap {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(252, 247, 240, 0.98));
    border-color: rgba(181, 133, 71, 0.22);
    box-shadow:
        0 18px 34px rgba(120, 88, 46, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

[data-theme="light"] .input-wrap:focus-within {
    border-color: #c78327;
    box-shadow:
        0 22px 42px rgba(199, 131, 39, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

[data-theme="light"] .input-wrap textarea {
    color: #2a2016;
}

.input-wrap:focus-within {
    border-color: var(--accent);
    box-shadow: 0 20px 44px rgba(245, 158, 11, 0.12);
}

.input-wrap textarea {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 0.96rem;
    font-family: var(--font);
    padding: 8px 0;
    resize: none;
    outline: none;
    line-height: 1.5;
    max-height: 150px;
}

.input-wrap textarea::placeholder {
    color: var(--text-3);
}

[data-theme="light"] .input-wrap textarea::placeholder {
    color: #947d67;
}

[data-theme="light"] .input-wrap button {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    box-shadow: 0 8px 20px rgba(180, 83, 9, 0.25), inset 0 2px 2px rgba(255, 255, 255, 0.4);
}

[data-theme="light"] .input-wrap button:hover:not(:disabled) {
    box-shadow: 0 12px 28px rgba(180, 83, 9, 0.35);
}

[data-theme="light"] .input-hint {
    color: #826f5c;
}

.input-wrap button {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    border: none;
    color: #fff;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex-shrink: 0;
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.3),
        inset 0 2px 2px rgba(255, 255, 255, 0.4);
}

.input-wrap button::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.input-wrap button:hover:not(:disabled) {
    transform: translateY(-3px) rotate(5deg) scale(1.1);
    box-shadow:
        0 12px 25px rgba(0, 0, 0, 0.4),
        inset 0 2px 2px rgba(255, 255, 255, 0.5);
}

.input-wrap button:hover:not(:disabled)::before {
    opacity: 1;
}

.input-wrap button:active:not(:disabled) {
    transform: translateY(1px) scale(0.92);
}

.input-wrap button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(1);
}

.loader {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.5s linear infinite;
}

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

.input-hint {
    font-size: 0.74rem;
    color: var(--text-3);
    text-align: center;
    margin-top: 10px;
    line-height: 1.4;
}

/* Add breathing room between header and hero badge on desktop */
@media (min-width: 769px) {
    .welcome-screen {
        padding-top: 148px;
    }

    .hero-badge {
        margin-top: 60px;
    }

    /* Explicit gap between suggestion chips and ask input area */
    .chips-section {
        margin-bottom: 48px;
    }

    /* Keep ask bar clearly above legal footer */
    body.home-mode .input-bar {
        bottom: 74px;
    }

    .support-legal-footer {
        margin-top: 108px;
    }
}

.legal-inline-link {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    margin-left: 8px;
    padding: 2px 6px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
}

.legal-inline-link:hover {
    text-decoration: none;
    background: color-mix(in srgb, var(--accent) 22%, transparent);
}

.legal-inline-sep {
    margin: 0 6px;
    color: var(--text-3);
}

.support-legal-footer {
    margin-top: 74px;
    padding: 12px 14px 16px;
    border-top: 1px solid rgba(245, 158, 11, 0.16);
    color: #8f97a8;
    font-size: 0.9rem;
    text-align: center;
    line-height: 1.5;
    position: relative;
    z-index: 5;
    background: var(--bg);
}

.support-legal-footer .legal-inline-link {
    margin-left: 8px;
    margin-right: 8px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #f5f5f5;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-footer-links {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    white-space: nowrap;
}

.support-legal-footer .legal-inline-link:hover {
    color: #ffd08a;
    background: transparent;
}

.support-link-btn {
    text-decoration: none;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {

    html,
    body {
        height: 100%;
        min-height: 100dvh;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .main-content {
        flex: 1;
        overflow: hidden;
    }

    .welcome-screen {
        min-height: auto;
    }

    .welcome-screen::before {
        background-size: min(68vw, 420px);
        background-position: center 34%;
    }

    /* Sidebar overlays on mobile, doesn't push content */
    .sidebar.open~.navbar,
    .sidebar.open~.main-content,
    .sidebar.open~.input-bar {
        margin-left: 0;
    }

    /* Sidebar overlay full screen */
    .sidebar {
        width: 280px;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
    }

    /* Reduce gap between top Support button and Chat History row */
    .sidebar>a.sidebar-new-btn:first-child {
        margin: 8px 12px 4px;
    }

    .sidebar-header {
        height: 56px;
    }

    .sidebar-overlay {
        display: block;
    }

    .sidebar-overlay.open {
        opacity: 1;
        pointer-events: auto;
    }

    .chat-list-item {
        padding: 12px 14px;
        transform: none !important;
    }

    .chat-delete-btn {
        opacity: 1;
        transform: scale(1) translateX(0);
    }

    .welcome-screen {
        padding: 24px 12px 8px;
        align-items: flex-start;
        justify-content: flex-start;
        min-height: auto;
        flex: 0 0 auto;
    }

    .welcome-inner,
    [data-theme="light"] .welcome-inner {
        grid-template-columns: 1fr;
        gap: 10px;
        max-width: 100%;
        padding: 26px 20px 0;
    }

    .hero-badge,
    .welcome-inner h1,
    .hero-sub,
    .hero-promise,
    .trust-strip,
    .mini-stats,
    .chips-section {
        grid-column: 1;
        grid-row: auto;
    }

    .welcome-inner h1 {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .welcome-inner h1 {
        white-space: normal;
        text-wrap: balance;
        margin-top: 0;
    }

    .hero-sub {
        font-size: 0.94rem;
        max-width: 100%;
        padding: 0;
        line-height: 1.2;
        margin-top: 0;
    }

    .hero-badge {
        font-size: 0.66rem;
        padding: 7px 12px;
        margin-bottom: 0;
        white-space: nowrap;
        letter-spacing: 0.16em;
    }

    .hero-promise {
        width: 100%;
        max-width: min(100%, 430px);
        margin-top: 4px;
        padding: 12px 16px;
        text-align: center;
    }

    .trust-strip {
        display: grid;
        grid-template-columns: repeat(2, max-content);
        justify-content: center;
        gap: 8px;
        width: 100%;
        max-width: 100%;
        margin-top: 6px;
    }

    .trust-pill {
        justify-self: center;
        padding: 10px 15px;
        border-width: 1.4px;
        border-color: rgba(108, 82, 49, 0.34);
    }

    .trust-pill:nth-child(3) {
        grid-column: 1 / -1;
    }

    .chips {
        --chips-gap: 8px;
        display: block;
        min-height: auto;
        margin-top: 4px;
        overflow: hidden;
        padding: 4px 2px 0;
    }

    .chip {
        flex: 0 0 min(78vw, 240px);
        min-height: 52px;
        padding: 10px 12px;
        transform: none !important;
        border-width: 1.4px;
        border-color: rgba(108, 82, 49, 0.34);
    }

    .chip:nth-child(n) {
        grid-column: auto;
        grid-row: auto;
        justify-self: stretch;
        width: auto;
    }

    .justice-figure {
        top: 16px;
        width: min(78vw, 360px);
        height: min(78vw, 460px);
        opacity: 0.13;
    }

    .chat-area {
        min-height: calc(100dvh - 136px);
        overflow: hidden;
    }

    .chat-messages {
        padding: 16px 12px 220px;
        overflow-y: auto;
    }

    .user-bubble {
        max-width: 90%;
    }

    .prompt-edit-btn {
        width: 32px;
        height: 32px;
    }

    .ai-bubble {
        max-width: 98%;
    }

    .msg-bubble {
        padding: 12px 14px;
    }

    .input-bar {
        position: fixed;
        bottom: 10px;
        left: 0;
        right: 0;
        z-index: 100;
        background: transparent;
        border-top: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .chat-area {
        position: relative;
        min-height: calc(100dvh - 136px);
        overflow: hidden;
    }

    .chat-area::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 120px;
        background: linear-gradient(to top, var(--bg) 20%, transparent);
        pointer-events: none;
        z-index: 2;
    }

    body.home-mode .input-bar {
        position: fixed;
        bottom: 74px;
        left: 0;
        right: 0;
        z-index: 110;
    }

    .input-bar-inner {
        padding: 6px 12px 8px;
    }

    body.home-mode .main-content {
        flex: 1;
        overflow: hidden;
        padding-bottom: 0;
    }

    body.home-mode {
        overflow: hidden;
    }

    body.home-mode .input-bar {
        position: fixed;
        z-index: 110;
        background: transparent;
        border-top: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    body.home-mode .input-bar-inner {
        max-width: min(100%, 430px);
        padding: 8px 12px 14px;
    }

    .support-legal-footer {
        margin-top: 0;
        font-size: 0.78rem;
        padding: 10px 10px 14px;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 109;
    }

    .support-legal-footer > span:first-child {
        display: block;
        margin-bottom: 2px;
    }

    .support-legal-footer .legal-inline-link,
    .support-legal-footer .legal-inline-sep,
    .support-legal-footer .legal-footer-links {
        white-space: nowrap;
    }

    .support-legal-footer .legal-footer-links {
        display: inline-flex;
        font-size: 0.95em;
    }

    .input-wrap {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 6px 6px 6px 14px;
        border-radius: 20px;
    }

    .input-wrap textarea {
        padding: 6px 0;
        font-size: 0.92rem;
    }

    .input-wrap button {
        width: 40px;
        height: 40px;
        border-radius: 50%;
    }

    .mini-stats {
        gap: 10px;
        font-size: 0.72rem;
        flex-wrap: wrap;
        margin-top: 86px;
        padding-bottom: 4px;
    }

    .mini-stat {
        min-width: calc(50% - 5px);
        flex: 1 1 130px;
    }

    .mini-stat-dot {
        display: none;
    }

    [data-theme="light"] .hero-badge {
        background: transparent;
        border-color: rgba(181, 133, 71, 0.16);
        color: #111827;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    [data-theme="light"] .hero-sub {
        color: #676c76;
    }

    [data-theme="light"] .hero-promise {
        background: rgba(255, 255, 255, 0.03);
        border-color: rgba(199, 131, 39, 0.2);
        color: #8f744f;
        box-shadow: none;
    }

    [data-theme="light"] .trust-pill {
        background: rgba(255, 255, 255, 0.03);
        border-color: rgba(28, 35, 50, 0.08);
        box-shadow: none;
    }
}

@media (max-width: 480px) {
    .welcome-inner h1 {
        font-size: 1.95rem;
        line-height: 1.12;
        white-space: normal;
    }

    .hero-sub {
        font-size: 0.88rem;
        max-width: 100%;
    }

    .hero-promise {
        padding: 11px 14px;
        font-size: 0.74rem;
        line-height: 1.45;
    }

    .trust-strip {
        gap: 10px;
    }

    .trust-pill {
        padding: 11px 16px;
        font-size: 0.78rem;
    }

    .nav-brand {
        font-size: 0.95rem;
    }

    .nav-icon {
        width: 18px;
        height: 18px;
    }

    .new-chat-btn {
        display: none;
    }

    .menu-btn {
        width: 32px;
        height: 32px;
    }

    .theme-btn {
        width: 32px;
        height: 32px;
    }

    .chip {
        font-size: 0.7rem;
        padding: 9px 10px;
    }

    .justice-figure {
        top: 20px;
        width: min(84vw, 280px);
        height: min(84vw, 360px);
        opacity: 0.11;
    }

    .mini-stats {
        margin-top: 62px;
    }

    .msg-action-btn {
        font-size: 0.65rem;
        padding: 4px 8px;
    }

    .mini-stat {
        min-width: 100%;
    }
}

.mini-stat {
    min-width: 100%;
}

.site-footer {
    width: 100%;
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg-2) 86%, transparent);
}

.site-footer-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.site-footer-copy {
    margin: 0;
    color: var(--text-3);
    font-size: 0.78rem;
}

.site-footer-links {
    display: flex;
    gap: 16px;
    align-items: center;
}

.site-footer-links a {
    color: var(--text-2);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.site-footer-links a:hover {
    color: var(--accent);
    border-color: var(--accent);
}

@media (max-width: 768px) {
    .site-footer-inner {
        padding: 12px 14px;
        flex-direction: column;
        align-items: flex-start;
    }
}
}

bottom: 110px;
left: 50%;
transform: translateX(-50%);
z-index: 10000;
display: flex;
flex-direction: column;
gap: 10px;
pointer-events: none;
width: auto;
max-width: 90vw;
}

.toast {
    background: rgba(15, 12, 8, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    padding: 10px 20px;
    border-radius: 14px;
    font-size: 0.88rem;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(245, 158, 11, 0.2);
    animation: toast-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    pointer-events: auto;
    text-align: center;
    white-space: nowrap;
}

[data-theme="light"] .toast {
    background: rgba(255, 255, 255, 0.95);
    color: #2a2016;
    border-color: rgba(181, 133, 71, 0.3);
    box-shadow: 0 10px 30px rgba(120, 88, 46, 0.15);
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.toast.hiding {
    animation: toast-out 0.3s ease forwards;
}

@keyframes toast-out {
    to {
        opacity: 0;
        transform: translateY(-20px) scale(0.9);
    }
}

@media (max-width: 768px) {
    .toast-container {
        bottom: 90px;
    }
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(6, 10, 18, 0.54);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.modal-card {
    width: min(100%, 420px);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(18, 23, 35, 0.96), rgba(12, 16, 26, 0.94));
    border: 1px solid rgba(245, 158, 11, 0.22);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
    padding: 20px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.modal-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.modal-close {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.18s ease;
}

.modal-close:hover {
    color: var(--accent);
    border-color: var(--accent);
}

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

.share-opt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 104px;
    padding: 14px 12px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    color: var(--text);
    text-decoration: none;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.share-opt:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--accent) 60%, transparent);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

.share-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.share-icon.wa {
    background: linear-gradient(180deg, #27d367, #128c7e);
}

.share-icon.tg {
    background: linear-gradient(180deg, #3aa9ff, #1d72d8);
}

.share-icon.x {
    background: linear-gradient(180deg, #2a2f39, #0f1115);
}

.share-icon.cp {
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.24), rgba(245, 158, 11, 0.12));
    color: var(--accent);
    border: 1px solid rgba(245, 158, 11, 0.18);
}

[data-theme="light"] .modal-overlay {
    background: rgba(97, 73, 40, 0.16);
}

[data-theme="light"] .modal-card {
    background: linear-gradient(180deg, rgba(255, 252, 247, 0.95), rgba(250, 243, 234, 0.94));
    border-color: rgba(199, 131, 39, 0.24);
    box-shadow: 0 28px 60px rgba(120, 88, 46, 0.18);
}

[data-theme="light"] .modal-close {
    background: rgba(255, 255, 255, 0.5);
    color: #7a5a33;
    border-color: rgba(199, 131, 39, 0.18);
}

[data-theme="light"] .share-opt {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 248, 241, 0.55));
    border-color: rgba(199, 131, 39, 0.16);
    color: #2a2016;
}

[data-theme="light"] .share-opt:hover {
    border-color: rgba(199, 131, 39, 0.32);
    box-shadow: 0 14px 28px rgba(120, 88, 46, 0.12);
}

@media (max-width: 768px) {
    .modal-overlay {
        padding: 16px;
        align-items: flex-end;
    }

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

    .share-options {
        gap: 10px;
    }

    .share-opt {
        min-height: 92px;
        border-radius: 16px;
    }
}

.mini-stat {
    min-width: 100%;
}
}

/* Tablet: keep ask bar visible above footer area */
@media (min-width: 769px) and (max-width: 1100px) {
    body.home-mode .input-bar {
        position: fixed !important;
        left: 0;
        right: 0;
        bottom: 92px !important;
        z-index: 120;
    }

    .input-bar-inner {
        max-width: 860px;
        padding: 8px 18px 12px;
    }

    body.home-mode .main-content {
        overflow: visible;
    }

    .support-legal-footer {
        margin-top: 138px;
    }
}

/* Tablet gap tuning (includes 768px devices) */
@media (min-width: 768px) and (max-width: 1100px) {
    body.home-mode .input-bar {
        bottom: 50px !important;
    }

    .support-legal-footer {
        margin-top: 98px !important;
    }

    .welcome-screen {
        overflow: visible;
    }

    .welcome-screen::before {
        margin-top: 0;
        background-size: min(30vw, 560px);
        background-position: center 40%;
        opacity: 0.30;
    }

    [data-theme="dark"] .welcome-screen::before {
        opacity: 0.34;
        filter: brightness(0) saturate(100%) invert(86%) sepia(18%) saturate(760%) hue-rotate(356deg) brightness(103%) contrast(96%);
    }

    [data-theme="light"] .welcome-screen::before {
        opacity: 0.30;
    }
}
