        :root {
            --bg-top: #f8fbfc;
            --bg-bottom: #fbf8f5;
            --ink: #1f2a37;
            --ink-soft: #4f5d75;
            --primary: #0f766e;
            --primary-deep: #115e59;
            --accent: #f97316;
            --panel: rgba(255, 255, 255, 0.92);
            --line: rgba(15, 118, 110, 0.18);
            --shadow: 0 10px 24px rgba(31, 42, 55, 0.08);
        }

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

        body {
            font-family: "Sora", sans-serif;
            color: var(--ink);
            min-height: 100vh;
            background:
                radial-gradient(circle at 14% 16%, rgba(15, 118, 110, 0.07) 0, transparent 36%),
                radial-gradient(circle at 84% 12%, rgba(249, 115, 22, 0.08) 0, transparent 32%),
                radial-gradient(circle at 78% 86%, rgba(14, 165, 233, 0.06) 0, transparent 38%),
                linear-gradient(145deg, var(--bg-top), var(--bg-bottom));
            overflow-x: hidden;
        }

        body[data-theme="dark"] {
            --bg-top: #0b1220;
            --bg-bottom: #111827;
            --ink: #e5e7eb;
            --ink-soft: #94a3b8;
            --panel: rgba(15, 23, 42, 0.74);
            --line: rgba(148, 163, 184, 0.24);
            --shadow: 0 16px 34px rgba(2, 6, 23, 0.55);
            background:
                radial-gradient(circle at 14% 16%, rgba(45, 212, 191, 0.13) 0, transparent 38%),
                radial-gradient(circle at 84% 12%, rgba(251, 146, 60, 0.12) 0, transparent 34%),
                radial-gradient(circle at 78% 86%, rgba(56, 189, 248, 0.1) 0, transparent 38%),
                linear-gradient(145deg, var(--bg-top), var(--bg-bottom));
        }

        body[data-theme="dark"] .grain {
            opacity: 0.08;
        }

        body[data-theme="dark"] .brand {
            color: #e5e7eb;
            background: rgba(15, 23, 42, 0.72);
            border-color: rgba(148, 163, 184, 0.28);
            box-shadow: 0 8px 18px rgba(2, 6, 23, 0.42);
        }

        body[data-theme="dark"] .user-badge {
            background: rgba(15, 23, 42, 0.78);
            color: #d1fae5;
            border-color: rgba(148, 163, 184, 0.24);
        }

        body[data-theme="dark"] .quick-nav > .user-menu:not(:last-child) .nav-trigger {
            background: linear-gradient(140deg, color-mix(in srgb, var(--chip-a) 35%, #0f172a 65%), color-mix(in srgb, var(--chip-b) 42%, #020617 58%));
            color: #e2e8f0;
            border-color: rgba(148, 163, 184, 0.28);
        }

        body[data-theme="dark"] .user-dropdown {
            background: #0f172a;
            border-color: rgba(148, 163, 184, 0.28);
            box-shadow: 0 16px 30px rgba(2, 6, 23, 0.55);
        }

        body[data-theme="dark"] .quick-nav > .user-menu:not(:last-child) .user-dropdown {
            background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.96));
            border: 1px solid rgba(100, 116, 139, 0.34);
            box-shadow: 0 20px 36px rgba(2, 6, 23, 0.58);
        }

        body[data-theme="dark"] .menu-link,
        body[data-theme="dark"] .menu-btn {
            color: #e5e7eb;
        }

        body[data-theme="dark"] .menu-title,
        body[data-theme="dark"] .quick-nav > .user-menu:not(:last-child) .menu-title {
            color: #94a3b8;
        }

        body[data-theme="dark"] .menu-link:hover,
        body[data-theme="dark"] .menu-btn:hover {
            background: rgba(30, 41, 59, 0.72);
        }

        body[data-theme="dark"] .quick-nav > .user-menu:not(:last-child) .menu-link:hover {
            background: rgba(30, 41, 59, 0.72);
        }

        body[data-theme="dark"] .card {
            background: rgba(15, 23, 42, 0.68);
            box-shadow: 0 10px 20px rgba(2, 6, 23, 0.38);
        }

        body[data-theme="dark"] .theme-switch {
            background: rgba(15, 23, 42, 0.78);
            border-color: rgba(148, 163, 184, 0.3);
            color: #e2e8f0;
            box-shadow: 0 8px 16px rgba(2, 6, 23, 0.45);
        }

        .page {
            position: relative;
            min-height: 100vh;
            padding: 24px;
        }

        .grain {
            position: absolute;
            inset: 0;
            opacity: 0.12;
            background-image: radial-gradient(rgba(31, 42, 55, 0.08) 0.7px, transparent 0.7px);
            background-size: 3px 3px;
            pointer-events: none;
        }

        header {
            position: relative;
            max-width: 1100px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
            z-index: 30;
        }

        .brand-group {
            display: inline-flex;
            align-items: center;
            gap: 10px;
        }

        .brand-actions {
            display: inline-flex;
            align-items: center;
        }

        .brand {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            font-weight: 800;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            color: var(--ink);
            text-decoration: none;
            padding: 9px 14px;
            border-radius: 999px;
            border: 1px solid rgba(17, 94, 89, 0.2);
            background: rgba(255, 255, 255, 0.76);
            box-shadow: 0 10px 22px rgba(15, 118, 110, 0.15);
            transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
        }

        .brand:hover {
            transform: translateY(-1px);
            box-shadow: 0 14px 26px rgba(15, 118, 110, 0.2);
            filter: saturate(1.04);
        }

        .brand-dot {
            width: 14px;
            height: 14px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--primary), var(--accent));
            box-shadow: 0 0 0 6px rgba(15, 118, 110, 0.12);
        }

        .brand-logo {
            width: 50px;
            height: 50px;
            object-fit: contain;
            border-radius: 4px;
            flex-shrink: 0;
        }

        .login-btn {
            text-decoration: none;
            color: #ffffff;
            font-weight: 700;
            letter-spacing: 0.01em;
            padding: 11px 18px;
            border-radius: 999px;
            background: linear-gradient(120deg, var(--primary), var(--primary-deep));
            box-shadow: 0 5px 14px rgba(15, 118, 110, 0.18);
            transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
        }

        .login-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 18px rgba(15, 118, 110, 0.22);
            filter: saturate(1.01);
        }

        .auth-actions {
            display: inline-flex;
            align-items: center;
            gap: 10px;
        }

        .theme-switch {
            border: 1px solid rgba(17, 94, 89, 0.24);
            background: rgba(255, 255, 255, 0.82);
            border-radius: 999px;
            padding: 6px 10px 6px 8px;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            color: var(--primary-deep);
            font-weight: 700;
            font-size: 0.8rem;
            transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
            box-shadow: 0 6px 14px rgba(15, 118, 110, 0.14);
        }

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

        .theme-switch-track {
            width: 42px;
            height: 22px;
            border-radius: 999px;
            background: rgba(148, 163, 184, 0.5);
            position: relative;
            border: 1px solid rgba(100, 116, 139, 0.34);
        }

        .theme-switch-thumb {
            position: absolute;
            top: 2px;
            left: 2px;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: #ffffff;
            box-shadow: 0 1px 4px rgba(15, 23, 42, 0.28);
            transition: transform 180ms ease;
        }

        .theme-switch.is-dark .theme-switch-track {
            background: linear-gradient(120deg, #0f766e, #0ea5e9);
            border-color: rgba(14, 165, 233, 0.45);
        }

        .theme-switch.is-dark .theme-switch-thumb {
            transform: translateX(20px);
        }

        .quick-nav {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
            justify-content: flex-end;
        }

        .quick-nav > .user-menu:not(:last-child) {
            --chip-a: #14b8a6;
            --chip-b: #0f766e;
            --chip-glow: rgba(15, 118, 110, 0.24);
        }

        .quick-nav > .user-menu:nth-child(1) {
            --chip-a: #0ea5e9;
            --chip-b: #2563eb;
            --chip-glow: rgba(37, 99, 235, 0.24);
        }

        .quick-nav > .user-menu:nth-child(2) {
            --chip-a: #06b6d4;
            --chip-b: #0f766e;
            --chip-glow: rgba(8, 145, 178, 0.24);
        }

        .quick-nav > .user-menu:nth-child(3) {
            --chip-a: #f59e0b;
            --chip-b: #ea580c;
            --chip-glow: rgba(234, 88, 12, 0.24);
        }

        .quick-nav > .user-menu:nth-child(4) {
            --chip-a: #22c55e;
            --chip-b: #15803d;
            --chip-glow: rgba(21, 128, 61, 0.24);
        }

        .quick-nav > .user-menu:nth-child(5) {
            --chip-a: #f97316;
            --chip-b: #dc2626;
            --chip-glow: rgba(220, 38, 38, 0.24);
        }

        .user-menu {
            position: relative;
            z-index: 40;
        }

        .user-badge {
            padding: 10px 14px;
            border-radius: 999px;
            border: 1px solid rgba(17, 94, 89, 0.22);
            background: rgba(255, 255, 255, 0.78);
            color: var(--primary-deep);
            font-weight: 700;
            font-size: 0.9rem;
        }

        .user-trigger {
            border: 1px solid rgba(17, 94, 89, 0.22);
            cursor: pointer;
            transition: transform 150ms ease;
        }

        .nav-trigger {
            min-width: 94px;
            text-align: center;
            font-size: 0.82rem;
            padding: 9px 12px;
        }

        .quick-nav > .user-menu:not(:last-child) .nav-trigger {
            border: 1px solid rgba(255, 255, 255, 0.42);
            background: linear-gradient(140deg, color-mix(in srgb, var(--chip-a) 22%, #ffffff 78%), color-mix(in srgb, var(--chip-b) 15%, #ffffff 85%));
            color: #0f172a;
            box-shadow: 0 10px 22px var(--chip-glow);
            font-weight: 800;
            letter-spacing: 0.01em;
        }

        .quick-nav > .user-menu:not(:last-child) .nav-trigger:hover {
            transform: translateY(-2px);
            box-shadow: 0 14px 24px var(--chip-glow);
            filter: saturate(1.08);
        }

        .quick-nav > .user-menu:not(:last-child) .user-dropdown {
            border: 1px solid color-mix(in srgb, var(--chip-b) 36%, #dbe5e8 64%);
            box-shadow: 0 20px 36px color-mix(in srgb, var(--chip-glow) 65%, rgba(15, 23, 42, 0.12) 35%);
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 252, 0.95));
        }

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

        .user-dropdown {
            position: absolute;
            right: 0;
            top: calc(100% + 10px);
            min-width: 170px;
            border-radius: 12px;
            border: 1px solid rgba(15, 118, 110, 0.18);
            background: #ffffff;
            box-shadow: 0 16px 30px rgba(31, 42, 55, 0.15);
            padding: 8px;
            opacity: 0;
            visibility: hidden;
            transform: translateY(-4px);
            transition: all 160ms ease;
            z-index: 9999;
        }

        .user-menu:hover .user-dropdown,
        .user-menu:focus-within .user-dropdown {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .menu-link,
        .menu-btn {
            width: 100%;
            display: block;
            text-align: left;
            padding: 10px 12px;
            border-radius: 8px;
            color: #1f2937;
            font-weight: 600;
            font-size: 0.9rem;
            text-decoration: none;
            border: none;
            background: transparent;
            cursor: pointer;
        }

        .menu-link:hover,
        .menu-btn:hover {
            background: #eef6f5;
        }

        .menu-title {
            padding: 8px 12px 6px;
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: #64748b;
            font-weight: 700;
        }

        .quick-nav > .user-menu:not(:last-child) .menu-title {
            color: color-mix(in srgb, var(--chip-b) 78%, #334155 22%);
            font-weight: 800;
        }

        .quick-nav > .user-menu:not(:last-child) .menu-link:hover {
            background: color-mix(in srgb, var(--chip-a) 18%, #eff6ff 82%);
        }

        main {
            position: relative;
            z-index: 1;
            max-width: 1100px;
            margin: 72px auto 0;
            display: grid;
            grid-template-columns: 1.15fr 0.85fr;
            gap: 30px;
        }

        .hero {
            background: var(--panel);
            border: 1px solid var(--line);
            border-radius: 26px;
            padding: 42px;
            box-shadow: var(--shadow);
            backdrop-filter: blur(5px);
            animation: rise 640ms ease both;
        }

        .hero-slider {
            display: grid;
            grid-template-columns: auto 1fr auto;
            align-items: center;
            gap: 12px;
        }

        .hero-content {
            min-height: 290px;
        }

        .hero-nav {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            border: 1px solid rgba(15, 118, 110, 0.3);
            background: rgba(255, 255, 255, 0.86);
            color: #0f766e;
            font-weight: 900;
            font-size: 1.5rem;
            cursor: pointer;
            box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
        }

        .hero-links {
            margin-top: 16px;
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        .hero-link {
            text-decoration: none;
            font-size: 0.84rem;
            font-weight: 700;
            color: #0f766e;
            border: 1px solid rgba(15, 118, 110, 0.28);
            border-radius: 999px;
            padding: 8px 12px;
            background: rgba(255, 255, 255, 0.86);
        }

        .hero-indicator {
            margin-top: 14px;
            font-size: 0.82rem;
            color: var(--ink-soft);
            text-align: center;
        }

        body[data-theme="dark"] .hero-nav {
            background: rgba(15, 23, 42, 0.84);
            color: #99f6e4;
            border-color: rgba(148, 163, 184, 0.32);
        }

        body[data-theme="dark"] .hero-link {
            background: rgba(15, 23, 42, 0.72);
            color: #99f6e4;
            border-color: rgba(45, 212, 191, 0.32);
        }

        .eyebrow {
            display: inline-block;
            font-size: 0.78rem;
            font-weight: 700;
            color: var(--primary);
            letter-spacing: 0.12em;
            text-transform: uppercase;
            margin-bottom: 16px;
        }

        h1 {
            font-size: clamp(2rem, 4.4vw, 3.8rem);
            line-height: 1.06;
            letter-spacing: -0.03em;
            margin-bottom: 16px;
        }

        p {
            color: var(--ink-soft);
            line-height: 1.8;
            font-size: 1.02rem;
            max-width: 44ch;
        }

        .cards {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 14px;
            animation: rise 760ms ease both;
        }

        .card {
            background: rgba(255, 255, 255, 0.78);
            border: 1px solid var(--line);
            border-radius: 20px;
            padding: 18px 20px;
            box-shadow: 0 8px 16px rgba(31, 42, 55, 0.06);
            transition: transform 180ms ease;
        }

        .card-link {
            display: block;
            text-decoration: none;
            color: inherit;
        }

        .card:hover {
            transform: translateY(-3px);
        }

        .card h2 {
            font-size: 1rem;
            margin-bottom: 8px;
            color: var(--ink);
        }

        .card p {
            font-size: 0.92rem;
            line-height: 1.6;
        }

        .chat-fab {
            position: fixed;
            right: 22px;
            bottom: 22px;
            width: 58px;
            height: 58px;
            border-radius: 50%;
            border: 1px solid rgba(15, 118, 110, 0.22);
            background: linear-gradient(140deg, #0f766e, #0ea5e9);
            color: #ffffff;
            font-size: 1.4rem;
            cursor: pointer;
            box-shadow: 0 14px 26px rgba(15, 118, 110, 0.34);
            z-index: 1200;
            transition: transform 160ms ease, box-shadow 160ms ease;
        }

        .chat-fab:hover {
            transform: translateY(-2px);
            box-shadow: 0 18px 30px rgba(15, 118, 110, 0.4);
        }

        .chat-overlay {
            position: fixed;
            right: 22px;
            bottom: 90px;
            width: min(760px, calc(100vw - 24px));
            height: min(560px, calc(100vh - 120px));
            background: rgba(255, 255, 255, 0.97);
            border: 1px solid rgba(15, 118, 110, 0.2);
            border-radius: 16px;
            box-shadow: 0 20px 38px rgba(15, 23, 42, 0.24);
            backdrop-filter: blur(4px);
            overflow: hidden;
            z-index: 1200;
            display: flex;
            flex-direction: column;
            opacity: 0;
            transform: translateY(8px) scale(0.98);
            pointer-events: none;
            transition: opacity 170ms ease, transform 170ms ease;
        }

        .chat-overlay.is-open {
            opacity: 1;
            transform: translateY(0) scale(1);
            pointer-events: auto;
        }

        .policy-consent-overlay[hidden] {
            display: none;
        }

        .policy-consent-overlay {
            position: fixed;
            inset: 0;
            z-index: 1500;
        }

        .policy-consent-backdrop {
            position: absolute;
            inset: 0;
            background: rgba(15, 23, 42, 0.62);
            backdrop-filter: blur(10px);
        }

        .policy-consent-dialog {
            position: relative;
            z-index: 1;
            width: min(1040px, calc(100vw - 24px));
            max-height: calc(100vh - 32px);
            margin: 16px auto;
            padding: 24px;
            display: grid;
            grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
            gap: 18px;
            border: 1px solid var(--line);
            border-radius: 24px;
            background: rgba(255, 255, 255, 0.96);
            box-shadow: 0 24px 60px rgba(15, 23, 42, 0.3);
        }

        .policy-consent-copy {
            display: grid;
            align-content: start;
            gap: 12px;
        }

        .policy-consent-eyebrow {
            max-width: none;
            font-size: 0.78rem;
            font-weight: 800;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            color: var(--primary);
        }

        .policy-consent-copy h2 {
            margin: 0;
            font-size: clamp(1.4rem, 2.2vw, 2rem);
            line-height: 1.15;
        }

        .policy-consent-reason {
            max-width: none;
            font-size: 0.95rem;
            line-height: 1.7;
        }

        .policy-consent-summary {
            margin: 0;
            padding-left: 18px;
            display: grid;
            gap: 8px;
            color: var(--ink-soft);
            font-size: 0.9rem;
        }

        .policy-consent-viewer-shell {
            min-height: 0;
            display: grid;
            grid-template-rows: auto minmax(320px, 1fr);
            gap: 10px;
        }

        .policy-consent-tabs {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        .policy-tab,
        .policy-secondary-btn {
            width: auto;
            margin: 0;
            padding: 10px 14px;
            border: 1px solid rgba(15, 118, 110, 0.2);
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.9);
            color: var(--primary-deep);
            font-weight: 700;
            cursor: pointer;
        }

        .policy-tab.is-active {
            background: linear-gradient(120deg, var(--primary), var(--primary-deep));
            color: #ffffff;
            border-color: transparent;
        }

        .policy-consent-frame {
            width: 100%;
            min-height: 0;
            height: 100%;
            border: 1px solid var(--line);
            border-radius: 18px;
            background: #ffffff;
        }

        .policy-consent-form {
            grid-column: 1 / -1;
            display: grid;
            gap: 12px;
            padding-top: 6px;
        }

        .policy-consent-check {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            color: var(--ink-soft);
            font-weight: 600;
        }

        .policy-consent-check input {
            width: 16px;
            height: 16px;
            margin: 0;
        }

        .policy-consent-actions {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }

        .policy-consent-message {
            max-width: none;
            font-size: 0.88rem;
            color: var(--ink-soft);
        }

        .policy-consent-message.is-error {
            color: #dc2626;
        }

        body[data-theme="dark"] .policy-consent-dialog {
            background: rgba(15, 23, 42, 0.96);
            box-shadow: 0 24px 60px rgba(2, 6, 23, 0.58);
        }

        body[data-theme="dark"] .policy-tab,
        body[data-theme="dark"] .policy-secondary-btn {
            background: rgba(15, 23, 42, 0.9);
            color: #e2e8f0;
            border-color: rgba(148, 163, 184, 0.26);
        }

        body[data-theme="dark"] .policy-consent-frame {
            background: #0f172a;
            border-color: rgba(148, 163, 184, 0.24);
        }

        .chat-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            padding: 12px 14px;
            background: linear-gradient(135deg, rgba(15, 118, 110, 0.98), rgba(14, 165, 233, 0.92));
            color: #ffffff;
        }

        @media (max-width: 920px) {
            .policy-consent-dialog {
                grid-template-columns: 1fr;
            }

            .policy-consent-viewer-shell {
                grid-template-rows: auto minmax(280px, 52vh);
            }
        }

        @media (max-width: 640px) {
            .policy-consent-dialog {
                width: calc(100vw - 16px);
                margin: 8px auto;
                padding: 16px;
                border-radius: 18px;
            }

            .policy-consent-actions > * {
                flex: 1 1 100%;
            }
        }

        .chat-title {
            font-size: 0.95rem;
            font-weight: 800;
            letter-spacing: 0.02em;
        }

        .chat-head-close {
            width: 30px;
            height: 30px;
            border: none;
            border-radius: 8px;
            color: #ffffff;
            background: rgba(15, 23, 42, 0.22);
            font-size: 1rem;
            cursor: pointer;
        }

        .chat-shell {
            flex: 1;
            min-height: 0;
            display: grid;
            grid-template-columns: 230px 1fr;
        }

        .chat-sidebar {
            border-right: 1px solid rgba(15, 118, 110, 0.12);
            background: linear-gradient(180deg, rgba(240, 253, 250, 0.94), rgba(236, 253, 245, 0.88));
            padding: 10px;
            overflow-y: auto;
        }

        .chat-side-group {
            margin-bottom: 12px;
        }

        .chat-side-title {
            font-size: 0.72rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: #0f766e;
            font-weight: 800;
            margin: 6px 4px;
        }

        .chat-room-list {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .chat-room-btn {
            width: 100%;
            border: 1px solid rgba(15, 118, 110, 0.16);
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.92);
            color: #1f2937;
            text-align: left;
            padding: 8px 10px;
            cursor: pointer;
            transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
        }

        .chat-room-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 6px 12px rgba(15, 23, 42, 0.08);
        }

        .chat-room-btn.is-active {
            background: linear-gradient(135deg, rgba(15, 118, 110, 0.14), rgba(14, 165, 233, 0.16));
            border-color: rgba(14, 165, 233, 0.4);
        }

        .chat-room-name {
            display: block;
            font-size: 0.86rem;
            font-weight: 700;
            line-height: 1.25;
        }

        .chat-room-meta {
            display: block;
            margin-top: 2px;
            color: #64748b;
            font-size: 0.74rem;
        }

        .chat-side-empty {
            padding: 8px 10px;
            border-radius: 10px;
            border: 1px dashed rgba(15, 118, 110, 0.2);
            color: #64748b;
            font-size: 0.8rem;
            background: rgba(255, 255, 255, 0.68);
        }

        .chat-main {
            min-width: 0;
            display: flex;
            flex-direction: column;
            background: rgba(255, 255, 255, 0.92);
        }

        .chat-main-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            padding: 10px 12px;
            border-bottom: 1px solid rgba(15, 118, 110, 0.14);
            background: rgba(248, 250, 252, 0.9);
        }

        .chat-room-title {
            font-size: 0.9rem;
            font-weight: 800;
            color: #0f172a;
            letter-spacing: 0.01em;
        }

        .chat-user-badge {
            border: 1px solid rgba(15, 118, 110, 0.24);
            border-radius: 999px;
            padding: 5px 10px;
            font-size: 0.78rem;
            color: #0f766e;
            background: rgba(240, 253, 250, 0.92);
            white-space: nowrap;
        }

        .chat-list {
            flex: 1;
            padding: 12px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 8px;
            background:
                radial-gradient(circle at 84% 10%, rgba(14, 165, 233, 0.08), transparent 36%),
                radial-gradient(circle at 14% 90%, rgba(15, 118, 110, 0.07), transparent 32%),
                rgba(255, 255, 255, 0.92);
        }

        .chat-msg {
            align-self: flex-start;
            max-width: 90%;
            border-radius: 12px;
            border: 1px solid rgba(15, 118, 110, 0.14);
            background: #ffffff;
            padding: 8px 10px;
            box-shadow: 0 3px 10px rgba(15, 23, 42, 0.06);
        }

        .chat-msg.me {
            align-self: flex-end;
            background: #ecfeff;
            border-color: rgba(14, 165, 233, 0.24);
        }

        .chat-msg-name {
            font-size: 0.72rem;
            font-weight: 800;
            color: #0f766e;
            margin-bottom: 3px;
        }

        .chat-msg-text {
            font-size: 0.88rem;
            color: #1f2a37;
            line-height: 1.4;
            word-break: break-word;
        }

        .chat-form {
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 8px;
            padding: 10px;
            border-top: 1px solid rgba(15, 118, 110, 0.14);
            background: rgba(248, 250, 252, 0.95);
        }

        .chat-input {
            width: 100%;
            border: 1px solid rgba(15, 118, 110, 0.24);
            border-radius: 10px;
            padding: 10px 12px;
            font-family: inherit;
            font-size: 0.9rem;
            outline: none;
        }

        .chat-input:focus {
            border-color: rgba(15, 118, 110, 0.46);
            box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
        }

        .chat-send-btn {
            border: none;
            border-radius: 10px;
            padding: 0 14px;
            background: linear-gradient(140deg, #0f766e, #0ea5e9);
            color: #ffffff;
            font-weight: 700;
            cursor: pointer;
        }

        .chat-empty {
            margin: auto;
            text-align: center;
            color: #64748b;
            font-size: 0.88rem;
        }

        body[data-theme="dark"] .chat-overlay {
            background: rgba(15, 23, 42, 0.94);
            border-color: rgba(148, 163, 184, 0.3);
            box-shadow: 0 20px 38px rgba(2, 6, 23, 0.62);
        }

        body[data-theme="dark"] .chat-sidebar {
            background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.9));
            border-color: rgba(148, 163, 184, 0.28);
        }

        body[data-theme="dark"] .chat-main,
        body[data-theme="dark"] .chat-main-head,
        body[data-theme="dark"] .chat-form,
        body[data-theme="dark"] .chat-input {
            background: rgba(15, 23, 42, 0.82);
            color: #e5e7eb;
            border-color: rgba(148, 163, 184, 0.28);
        }

        body[data-theme="dark"] .chat-room-title {
            color: #e2e8f0;
        }

        body[data-theme="dark"] .chat-user-badge {
            color: #99f6e4;
            background: rgba(2, 6, 23, 0.72);
            border-color: rgba(45, 212, 191, 0.34);
        }

        body[data-theme="dark"] .chat-side-title {
            color: #99f6e4;
        }

        body[data-theme="dark"] .chat-room-btn {
            background: rgba(15, 23, 42, 0.9);
            border-color: rgba(148, 163, 184, 0.24);
            color: #e2e8f0;
        }

        body[data-theme="dark"] .chat-room-btn.is-active {
            background: linear-gradient(135deg, rgba(30, 58, 138, 0.52), rgba(8, 145, 178, 0.42));
            border-color: rgba(56, 189, 248, 0.46);
        }

        body[data-theme="dark"] .chat-room-meta,
        body[data-theme="dark"] .chat-side-empty {
            color: #94a3b8;
        }

        body[data-theme="dark"] .chat-list {
            background:
                radial-gradient(circle at 84% 10%, rgba(14, 165, 233, 0.1), transparent 36%),
                radial-gradient(circle at 14% 90%, rgba(45, 212, 191, 0.1), transparent 32%),
                rgba(2, 6, 23, 0.68);
        }

        body[data-theme="dark"] .chat-msg {
            background: rgba(15, 23, 42, 0.9);
            border-color: rgba(148, 163, 184, 0.26);
        }

        body[data-theme="dark"] .chat-msg.me {
            background: rgba(12, 74, 110, 0.78);
            border-color: rgba(56, 189, 248, 0.32);
        }

        body[data-theme="dark"] .chat-msg-text {
            color: #e5e7eb;
        }

        body[data-theme="dark"] .chat-empty {
            color: #94a3b8;
        }

        @keyframes rise {
            from {
                opacity: 0;
                transform: translateY(12px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @media (max-width: 920px) {
            main {
                grid-template-columns: 1fr;
                margin-top: 48px;
            }

            .hero {
                padding: 30px;
            }
        }

        @media (max-width: 720px) {
            main {
                margin-top: 34px;
                gap: 20px;
            }

            .hero {
                padding: 24px;
                border-radius: 22px;
            }

            .hero-slider {
                grid-template-columns: repeat(2, auto);
                row-gap: 14px;
                justify-content: space-between;
            }

            .hero-content {
                order: -1;
                grid-column: 1 / -1;
                min-height: auto;
            }

            .chat-main-head {
                align-items: flex-start;
                flex-wrap: wrap;
            }

            .chat-form {
                grid-template-columns: 1fr;
            }

            .chat-send-btn {
                min-height: 44px;
            }
        }

        @media (max-width: 540px) {
            .page {
                padding: 14px;
            }

            .hero {
                border-radius: 20px;
                padding: 20px;
            }

            .hero-links > * {
                flex: 1 1 calc(50% - 8px);
                text-align: center;
            }

            .chat-fab {
                right: 14px;
                bottom: 14px;
                width: 54px;
                height: 54px;
            }

            .chat-overlay {
                left: 12px;
                right: 12px;
                bottom: 76px;
                width: auto;
                height: min(78vh, calc(100vh - 100px));
            }

            .chat-shell {
                grid-template-columns: 1fr;
                grid-template-rows: 180px 1fr;
            }

            .chat-sidebar {
                border-right: none;
                border-bottom: 1px solid rgba(15, 118, 110, 0.12);
            }

            .chat-side-group {
                margin-bottom: 8px;
            }

            .chat-room-list {
                display: grid;
                grid-auto-flow: column;
                grid-auto-columns: minmax(130px, 1fr);
                overflow-x: auto;
                padding-bottom: 4px;
            }

            .chat-user-badge {
                white-space: normal;
            }
        }
