/* ChatGPTi — светлая тема по умолчанию */
:root {
    --bg: #f4f5f7;
    --bg-2: #eef0f3;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f2f5;
    --border: #e2e5ea;
    --text: #1a1c22;
    --text-muted: #5f6574;
    --accent: #22c55e;
    --accent-dim: #16a34a;
    --accent-glow: rgba(34, 197, 94, 0.25);
    --green-soft: #34d399;
    --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --radius: 14px;
    --radius-sm: 10px;
}

/* Совместимость: класс lk-theme-light больше не нужен, но оставляем как alias */
.lk-page.lk-theme-light {
    --bg: #f4f5f7;
    --bg-2: #eef0f3;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f2f5;
    --border: #e2e5ea;
    --text: #1a1c22;
    --text-muted: #5f6574;
}

/* Тёмная тема (включается переключателем в ЛК) */
.lk-page.lk-theme-dark {
    --bg: #0d0e12;
    --bg-2: #13141a;
    --bg-card: #1a1b22;
    --bg-card-hover: #22232d;
    --border: #2a2b35;
    --text: #e8e9ec;
    --text-muted: #8b8d99;
}

.lk-page.lk-theme-dark .header {
    background: rgba(13, 14, 18, 0.85);
}
.lk-page.lk-theme-dark .header:hover {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 18px;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* Анимации появления */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes lineRun {
    0%, 100% { left: 0; }
    50% { left: calc(100% - 56px); }
}

.animate-in {
    animation: fadeUp 0.7s ease-out forwards;
    opacity: 0;
}
.animate-in.delay-1 { animation-delay: 0.1s; }
.animate-in.delay-2 { animation-delay: 0.2s; }
.animate-in.delay-3 { animation-delay: 0.35s; }
.animate-in.delay-4 { animation-delay: 0.5s; }

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}
.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dim) 100%);
    color: #fff;
    box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px var(--accent-glow);
}
.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}
.btn-outline:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-2px);
}
.btn-ghost {
    background: transparent;
    color: var(--text-muted);
}
.btn-ghost:hover {
    color: var(--accent);
}
.btn-lg {
    padding: 16px 32px;
    font-size: 1.15rem;
}

/* Шапка */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(244, 245, 247, 0.95);
    backdrop-filter: blur(14px);
    transition: box-shadow 0.3s ease;
}
.header:hover {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
}
.header-auth {
    display: flex;
    align-items: center;
    gap: 12px;
}
@media (min-width: 769px) {
    .header-auth {
        gap: 24px;
    }
    .header-auth .btn-outline {
        margin-right: 16px;
        padding-right: 32px;
        border-right: 1px solid var(--border);
    }
    .header-auth .header-theme-toggle {
        margin-left: 16px;
    }
}
.header-auth .btn-auth {
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius);
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.header-auth .btn-outline {
    border: 1px solid var(--border);
    color: var(--text-muted);
    background: transparent;
}
.header-auth .btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.header-auth .btn-primary {
    background: var(--accent);
    color: #fff;
    border: 1px solid var(--accent);
}
.header-auth .btn-primary:hover {
    opacity: 0.95;
    background: var(--green-soft);
    border-color: var(--green-soft);
}
.header-tg-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--text-muted);
    border-radius: var(--radius);
    transition: color 0.2s, background 0.2s;
}
.header-tg-link:hover {
    color: #0088cc;
    background: rgba(0, 136, 204, 0.1);
}
.header-tg-icon {
    display: block;
}
.header-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.2s, border-color 0.2s;
}
.header-theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.header-theme-toggle .lk-theme-icon {
    display: none;
}
.header-theme-toggle .lk-theme-icon--sun {
    display: inline;
}
.lk-page.lk-theme-light .header-theme-toggle .lk-theme-icon--sun {
    display: none;
}
.lk-page.lk-theme-light .header-theme-toggle .lk-theme-icon--moon {
    display: inline;
}
.header-inner .nav {
    justify-content: flex-end;
    gap: 8px;
}
.logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: color 0.2s ease;
}
.logo:hover {
    color: var(--accent);
}
.logo--img {
    display: flex;
    align-items: center;
}
.logo--img .logo-img {
    display: block;
    width: auto;
    height: 64px;
    max-height: 240px;
    max-width: 600px;
    object-fit: contain;
    object-position: left center;
}
@media (min-width: 769px) {
    .logo--img .logo-img {
        height: 88px;
    }
}
@media (min-width: 1024px) {
    .logo--img .logo-img {
        height: 120px;
    }
}
.logo--img:hover .logo-img {
    opacity: 0.9;
}
.nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.nav a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: color 0.2s, background 0.2s;
}
.nav a:hover {
    color: var(--accent);
    background: rgba(34, 197, 94, 0.08);
}

/* Hero */
.hero {
    position: relative;
    padding: 100px 0 120px;
    text-align: center;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(34, 197, 94, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 50%, rgba(34, 197, 94, 0.06) 0%, transparent 45%),
        radial-gradient(ellipse 50% 30% at 20% 80%, rgba(34, 197, 94, 0.05) 0%, transparent 45%);
    pointer-events: none;
}
.hero-title {
    display: inline-block;
    position: relative;
    padding-bottom: 28px;
    font-size: clamp(2.5rem, 6vw, 4rem);
    white-space: nowrap;
    font-weight: 800;
    margin: 0 0 16px;
    letter-spacing: -0.03em;
    line-height: 1.15;
    background: linear-gradient(180deg, var(--text) 0%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-title::after {
    content: '';
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 14px;
    width: 56px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--green-soft));
    border-radius: 2px;
    -webkit-text-fill-color: initial;
    animation: lineRun 5s ease-in-out infinite;
}
.hero-lead {
    font-size: 1.65rem;
    color: var(--accent);
    margin: 0 0 16px;
    font-weight: 600;
}
.hero-desc {
    max-width: 660px;
    margin: 0 auto 40px;
    color: var(--text-muted);
    font-size: 1.2rem;
    line-height: 1.7;
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin-bottom: 64px;
}
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 56px;
    flex-wrap: wrap;
}
.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 36px;
    background: rgba(26, 27, 34, 0.6);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.3s ease;
}
.stat:hover {
    border-color: rgba(34, 197, 94, 0.4);
    box-shadow: 0 0 24px rgba(34, 197, 94, 0.08);
    transform: translateY(-4px);
}
.stat-num {
    font-size: 2.9rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -0.02em;
}
.stat-label {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Секции */
.section {
    padding: 80px 0;
}
.section-title {
    font-size: 1.9rem;
    font-weight: 700;
    text-align: center;
    margin: 0 0 12px;
    letter-spacing: -0.02em;
    color: var(--text);
}
.section-desc {
    text-align: center;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto 48px;
    font-size: 1.05rem;
}

/* Карточки фич */
.section-features {
    background: var(--bg);
}
.section-cta-top {
    text-align: center;
    margin: 0 0 36px;
}
.section-cta-top .btn {
    margin: 0;
    padding: 18px 40px;
    font-size: 1.2rem;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all 0.35s ease;
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--green-soft));
    opacity: 0;
    transition: opacity 0.3s ease;
}
.feature-card:hover {
    border-color: rgba(34, 197, 94, 0.35);
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
.feature-card:hover::before {
    opacity: 1;
}
.feature-card h3 {
    margin: 0 0 10px;
    font-size: 1.2rem;
    color: var(--text);
}
.feature-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Как это работает */
.section-how {
    background: var(--bg);
}
.how-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}
.how-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all 0.35s ease;
}
.how-block:hover {
    border-color: rgba(34, 197, 94, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}
.how-block h3 {
    margin: 0 0 6px;
    font-size: 1.22rem;
    color: var(--text);
}
.how-sub {
    color: var(--accent);
    font-size: 0.9rem;
    margin: 0 0 14px;
    font-weight: 500;
}
.how-block p {
    color: var(--text-muted);
    margin: 0 0 14px;
    font-size: 0.95rem;
    line-height: 1.6;
}
.how-block ul {
    margin: 0;
    padding-left: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}
.how-block li {
    margin-bottom: 6px;
}

/* Шаги */
.section-steps {
    background: var(--bg);
}
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}
.step {
    text-align: center;
    padding: 28px 24px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: all 0.35s ease;
}
.step:hover {
    border-color: rgba(34, 197, 94, 0.35);
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}
.step-num {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}
.step h3 {
    margin: 0 0 10px;
    font-size: 1.12rem;
    color: var(--text);
}
.step p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* MCP */
.section-mcp {
    background: var(--bg);
}
.mcp-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
    max-width: 720px;
    margin: 0 auto;
}
.mcp-item {
    padding: 16px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    text-align: center;
    transition: all 0.3s ease;
}
.mcp-item:hover {
    border-color: rgba(34, 197, 94, 0.5);
    color: var(--accent);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.1);
}
@media (max-width: 700px) {
    .mcp-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
}

/* Тарифы */
.section-pricing {
    background: var(--bg);
}
.pricing-placeholder {
    text-align: center;
    padding: 56px 24px;
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    transition: border-color 0.3s ease;
}
.pricing-placeholder:hover {
    border-color: rgba(34, 197, 94, 0.3);
}

/* FAQ */
.section-faq {
    background: var(--bg);
}
.faq-list {
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.faq-item {
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.faq-item:hover {
    border-color: rgba(34, 197, 94, 0.4);
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.15);
}
.faq-item[open] {
    border-color: rgba(34, 197, 94, 0.35);
    border-radius: 24px;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.1);
}
.faq-item summary {
    padding: 18px 28px;
    cursor: pointer;
    font-weight: 600;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text);
    transition: color 0.25s ease;
}
.faq-item summary:hover {
    color: var(--accent);
}
.faq-item summary::-webkit-details-marker {
    display: none;
}
.faq-item summary::after {
    content: '+';
    font-size: 1.25rem;
    color: var(--accent);
    margin-left: 12px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}
.faq-item[open] summary::after {
    content: '−';
}
.faq-item p {
    margin: 0 28px 22px;
    padding: 0 0 4px;
    color: var(--text-muted);
    font-size: 0.98rem;
    line-height: 1.6;
}

/* CTA */
.section-cta {
    background: var(--bg);
    text-align: center;
}
.cta-note {
    margin-top: 20px;
}
.cta-note a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}
.cta-note a:hover {
    text-decoration: underline;
}

/* Футер */
.footer {
    padding: 56px 0 28px;
    background: var(--bg);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 36px;
}
.footer-contacts p,
.footer-legal p {
    margin: 0 0 10px;
    font-size: 0.95rem;
    color: var(--text-muted);
}
.footer a {
    color: var(--accent);
    text-decoration: none;
}
.footer a:hover {
    text-decoration: underline;
    color: var(--green-soft);
}
.footer-links {
    text-align: center;
    margin: 0 0 10px;
}
.footer-copy {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0 0 10px;
    text-align: center;
    padding-left: 8%;
}
.footer-disclaimer,
.footer-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.85;
    margin: 0;
}
.footer-disclaimer {
    white-space: nowrap;
}
@media (max-width: 640px) {
    .footer-disclaimer {
        white-space: normal;
    }
}
.footer-tg {
    text-align: center;
    margin: 20px 0 0;
}
.footer-tg-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: color 0.2s, transform 0.2s;
}
.footer-tg-link:hover {
    color: #0088cc;
    transform: scale(1.08);
}
.footer-tg-icon {
    display: block;
}

/* Формы входа/регистрации */
.auth-page {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}
.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}
.auth-card h1 {
    margin: 0 0 8px;
    font-size: 1.75rem;
    text-align: center;
    color: var(--text);
}
.auth-card .auth-sub {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0 0 28px;
}
.auth-form .form-group {
    margin-bottom: 20px;
}
.auth-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.auth-form input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.auth-form input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}
.auth-form .btn-submit {
    width: 100%;
    margin-top: 8px;
    padding: 14px;
    font-size: 1rem;
}
.auth-form .auth-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 20px;
}
.auth-form .auth-success,
.auth-card .auth-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: var(--green-soft);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 20px;
}
.auth-card .auth-success a {
    color: var(--accent);
    text-decoration: underline;
}
.auth-forgot-wrap {
    margin-bottom: 8px;
}
.auth-forgot-link {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: none;
}
.auth-forgot-link:hover {
    color: var(--accent);
}
.auth-links {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}
.auth-links a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.95rem;
}
.auth-links a:hover {
    text-decoration: underline;
}
.auth-links-line {
    display: block;
    margin-top: 10px;
}

/* OAuth — только иконки, без текста */
.auth-oauth-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-bottom: 20px;
}
.auth-oauth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.auth-oauth-btn:hover {
    border-color: var(--text-muted);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}
.auth-oauth-btn .auth-oauth-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    flex-shrink: 0;
    overflow: visible;
}
.auth-oauth-btn .auth-oauth-icon svg {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    display: block;
    flex-shrink: 0;
}
.auth-oauth-divider {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 28px 0 20px;
}
.auth-card .auth-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* Личный кабинет */
body.account-page {
    min-height: 100vh;
}
.account-header .header-inner {
    max-width: 1200px;
}
.account-wrap {
    position: relative;
}
.account-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.account-trigger:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}
.account-avatar,
.account-dropdown-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--green-soft));
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
}
.account-avatar--logo,
.account-dropdown-avatar--logo {
    padding: 0;
    background: transparent;
    overflow: hidden;
}
.account-avatar--logo .account-avatar-img,
.account-dropdown-avatar--logo .account-dropdown-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.account-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 280px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    z-index: 200;
    overflow: hidden;
}
.account-dropdown[hidden] {
    display: none !important;
}
.account-dropdown-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
}
.account-dropdown-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.account-dropdown-name {
    font-size: 1rem;
    color: var(--text);
}
.account-dropdown-email {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.account-dropdown-divider {
    height: 1px;
    background: var(--border);
}
.account-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.2s;
}
.account-dropdown-item:hover {
    background: var(--bg-card-hover);
}
.account-dropdown-item--logout:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}
.account-dropdown-icon {
    font-size: 1.1rem;
    opacity: 0.9;
}
.account-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 150;
}
.account-overlay[hidden] {
    display: none !important;
}

.account-main {
    padding: 48px 0 80px;
}
@media (min-width: 769px) {
    .account-main {
        padding-top: 8px;
        padding-bottom: 60px;
    }
}
.account-welcome .container {
    max-width: 720px;
}
.account-title {
    font-size: 1.85rem;
    font-weight: 700;
    margin: 0 0 10px;
    color: var(--text);
    letter-spacing: -0.02em;
}
.account-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin: 0 0 36px;
}
.account-settings-container {
    max-width: 720px;
    width: 100%;
}
.account-msg {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    font-size: 0.95rem;
}
.account-msg--success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: var(--accent);
}
.account-msg--error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}
.settings-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 24px;
    overflow: hidden;
}
.settings-block-title {
    margin: 0;
    padding: 18px 20px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
}
.settings-block-inner {
    padding: 20px;
}
.settings-form .form-group {
    margin-bottom: 18px;
}
.settings-form .form-group:last-of-type {
    margin-bottom: 20px;
}
.settings-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.settings-value {
    display: block;
    font-size: 1rem;
    color: var(--text);
}
.settings-field--readonly {
    margin-bottom: 20px;
}
.settings-form .form-control {
    width: 100%;
    padding: 10px 14px;
    font-size: 1rem;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-sizing: border-box;
}
.settings-form .form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}
.settings-form .form-control--select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}
.settings-form .btn {
    margin-top: 4px;
}
.account-back {
    margin: 32px 0 0;
}
.account-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}
.account-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    transition: all 0.25s ease;
}
.account-card:hover {
    border-color: rgba(34, 197, 94, 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.account-card--active {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}
.account-card-icon {
    font-size: 1.75rem;
}
.account-card-title {
    font-weight: 600;
    font-size: 1.1rem;
}
.account-card-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.account-home {
    margin: 0;
}

/* ЛК — боковая панель + чат (как на макете) */
.lk-page {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
}
.lk-page:not(.main-page) {
    display: flex;
}
.lk-page.main-page {
    display: block;
}
.lk-sidebar {
    width: 280px;
    min-width: 280px;
    min-height: 100vh;
    height: 100vh;
    background: var(--bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    font-family: var(--font);
}
@media (min-width: 769px) {
    .lk-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        height: 100%;
        min-height: 0;
        z-index: 50;
    }
    body.lk-page:not(.main-page) .lk-main {
        margin-left: 280px;
    }
}
.lk-sidebar-top {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 20px 20px 24px;
}
.lk-sidebar-nav-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    margin: 0 -20px;
    padding: 0 20px;
    scrollbar-width: thin;
    scrollbar-color: #4a4a4a var(--bg);
}
.lk-sidebar-nav-wrap::-webkit-scrollbar {
    width: 8px;
}
.lk-sidebar-nav-wrap::-webkit-scrollbar-track {
    background: var(--bg);
}
.lk-sidebar-nav-wrap::-webkit-scrollbar-thumb {
    background: #4a4a4a;
    border-radius: 4px;
}
.lk-sidebar-nav-wrap::-webkit-scrollbar-thumb:hover {
    background: #5a5a5a;
}
.lk-sidebar ::-webkit-scrollbar {
    width: 8px;
}
.lk-sidebar ::-webkit-scrollbar-track {
    background: var(--bg-2);
}
.lk-sidebar ::-webkit-scrollbar-thumb {
    background: #4a4a4a;
    border-radius: 4px;
}
.lk-sidebar ::-webkit-scrollbar-thumb:hover {
    background: #5a5a5a;
}
.lk-sidebar {
    scrollbar-width: thin;
    scrollbar-color: #4a4a4a var(--bg);
}
.lk-sidebar-top .lk-sidebar-logo {
    flex-shrink: 0;
}
.lk-sidebar-logo {
    display: block;
    margin-bottom: 16px;
    text-align: center;
}
.lk-sidebar-logo .lk-logo-img {
    display: block;
    width: auto;
    height: 96px;
    max-width: 100%;
    max-height: 220px;
    margin: 0 auto;
    object-fit: contain;
}
@media (min-width: 1024px) {
    .lk-sidebar-logo .lk-logo-img {
        height: 140px;
    }
}
.lk-topbar-logo {
    display: flex;
    align-items: center;
    height: 40px;
}
.lk-topbar-logo-img {
    display: block;
    width: auto;
    height: 52px;
    max-height: 100px;
    max-width: 380px;
    object-fit: contain;
}
@media (min-width: 1024px) {
    .lk-topbar-logo-img {
        height: 68px;
    }
}
.lk-sidebar-top .lk-balance-round {
    flex-shrink: 0;
}
.lk-balance-round {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    margin-bottom: 32px;
    padding: 10px 14px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid rgba(34, 197, 94, 0.4);
}
.lk-balance-round .lk-balance-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}
.lk-balance-round .lk-balance-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    border-radius: 999px;
    border: 1px solid var(--accent);
    background: transparent;
    transition: color 0.2s, opacity 0.2s, border-color 0.2s, background 0.2s;
}
.lk-balance-round .lk-balance-btn:hover {
    opacity: 0.95;
    background: rgba(34, 197, 94, 0.1);
    border-color: var(--green-soft);
}

.lk-topup-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.45);
    padding: 16px;
    box-sizing: border-box;
}
.lk-topup-modal[hidden] {
    display: none !important;
}
.lk-topup-modal-inner {
    position: relative;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 24px 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.lk-topup-close {
    position: absolute;
    top: 12px;
    right: 8px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    transition: color 0.2s;
    -webkit-tap-highlight-color: transparent;
    z-index: 1;
}
.lk-topup-close:hover {
    color: var(--text);
}
.lk-topup-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.25s ease;
    -webkit-tap-highlight-color: transparent;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dim) 100%);
    color: #fff;
    box-shadow: 0 4px 20px var(--accent-glow);
}
.lk-topup-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px var(--accent-glow);
}
.lk-topup-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}
.lk-topup-title {
    margin: 0 44px 6px 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
}
.lk-topup-desc {
    margin: 0 0 18px;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.lk-topup-form label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}
.lk-topup-form input[type="number"],
#topup-amount {
    width: 100%;
    padding: 12px 14px;
    font-size: 1rem;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}
.lk-topup-form input[type="number"]::-webkit-outer-spin-button,
.lk-topup-form input[type="number"]::-webkit-inner-spin-button,
#topup-amount::-webkit-outer-spin-button,
#topup-amount::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    pointer-events: none !important;
}
.lk-topup-form input[type="number"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.lk-topup-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
.lk-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 0;
}
/* Блоки инструментов (Canvas, Память, Проекты, Отложенные) — в стиле сайта, без белого фона */
.lk-canvas-wrap,
.lk-tool-wrap {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: 0;
    color: var(--text);
}
.lk-canvas-wrap textarea,
.lk-canvas-wrap input[type="text"],
.lk-tool-wrap input[type="text"],
.lk-tool-wrap input[type="datetime-local"],
.lk-tool-form input,
.lk-tool-form textarea {
    width: 100%;
    max-width: 100%;
    padding: 10px 14px;
    margin: 6px 0;
    box-sizing: border-box;
    font-size: 1rem;
    color: var(--text);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s;
}
.lk-canvas-wrap textarea:focus,
.lk-tool-wrap input:focus,
.lk-tool-form input:focus,
.lk-tool-form textarea:focus {
    border-color: rgba(34, 197, 94, 0.5);
}
.lk-canvas-wrap textarea,
.lk-tool-form textarea {
    min-height: 160px;
    resize: vertical;
}
.lk-tool-form textarea {
    min-height: 80px;
}
.lk-canvas-wrap .lk-tool-actions,
.lk-tool-form {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}
.lk-tool-actions .lk-chat-bar-btn {
    width: auto;
    min-width: 36px;
    padding: 0 14px;
    white-space: nowrap;
}
.lk-tool-form--stack {
    flex-direction: column;
    align-items: stretch;
}
.lk-tool-form--stack input,
.lk-tool-form--stack textarea {
    max-width: 400px;
}
.lk-tool-form input {
    flex: 1;
    min-width: 120px;
}
.lk-tool-list,
#lk-memory-list,
#lk-projects-list,
#lk-scheduled-list {
    color: var(--text);
    margin: 0 0 16px;
    padding: 0;
}
.lk-tool-list p,
#lk-memory-list p,
#lk-projects-list p,
#lk-scheduled-list p {
    margin: 0 0 10px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.95rem;
}
.lk-tool-list a,
#lk-projects-list a {
    color: var(--accent);
    text-decoration: none;
}
.lk-tool-list a:hover,
#lk-projects-list a:hover {
    text-decoration: underline;
}
.lk-tool-list button.lk-chat-bar-btn,
#lk-memory-list button.lk-chat-bar-btn {
    margin-left: 8px;
    padding: 6px 12px;
    font-size: 0.85rem;
}
.lk-memory-wrap {
    max-width: 560px;
    margin: 0 auto;
}
.lk-memory-form {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 10px 14px;
    align-items: center;
    margin-top: 16px;
}
.lk-memory-form .lk-memory-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    grid-column: 1;
}
.lk-memory-form input {
    grid-column: 2;
    min-width: 0;
}
.lk-memory-form .lk-memory-add-btn {
    grid-column: 1 / -1;
    justify-self: start;
    width: auto;
    min-width: 36px;
    padding: 0 18px;
    white-space: nowrap;
}
.lk-projects-wrap {
    max-width: 560px;
    margin: 0 auto;
}
.lk-projects-form {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 10px 14px;
    align-items: center;
    margin-top: 16px;
}
.lk-projects-form .lk-projects-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    grid-column: 1;
}
.lk-projects-form #lk-proj-name {
    grid-column: 2;
    min-width: 0;
}
.lk-projects-form .lk-projects-create-btn {
    grid-column: 1 / -1;
    justify-self: start;
    width: auto;
    min-width: 36px;
    padding: 0 18px;
    white-space: nowrap;
}
.lk-scheduled-wrap {
    max-width: 560px;
    margin: 0 auto;
}
.lk-scheduled-notice {
    font-size: 0.85rem;
    margin-top: -6px;
    margin-bottom: 16px;
}
.lk-scheduled-form {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 10px 14px;
    align-items: center;
    margin-top: 16px;
}
.lk-scheduled-form .lk-scheduled-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    grid-column: 1;
}
.lk-scheduled-form #lk-sched-time,
.lk-scheduled-form #lk-sched-msg {
    grid-column: 2;
    min-width: 0;
}
.lk-scheduled-form .lk-scheduled-add-btn {
    grid-column: 1 / -1;
    justify-self: start;
    width: auto;
    min-width: 36px;
    padding: 0 18px;
    white-space: nowrap;
}
.lk-tool-hint {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0 0 14px;
    line-height: 1.45;
}
.lk-tool-hint--center {
    text-align: center;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}
.lk-nav-sep {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 12px auto 6px;
    flex-shrink: 0;
}
.lk-nav-sep-dot {
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.5);
    animation: lk-nav-sep-pulse 2s ease-in-out infinite;
}
.lk-nav-sep-dot:nth-child(2) { animation-delay: 0.2s; }
@keyframes lk-nav-sep-pulse {
    0%, 100% {
        background-color: rgba(34, 197, 94, 0.4);
        box-shadow: 0 0 0 transparent;
    }
    50% {
        background-color: rgba(34, 197, 94, 0.9);
        box-shadow: 0 0 6px rgba(34, 197, 94, 0.4);
    }
}
.lk-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 999px;
    border: 1px solid rgba(34, 197, 94, 0.35);
    font-size: 0.86rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    white-space: nowrap;
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
}
.lk-nav-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}
.lk-nav-soon {
    font-size: 0.62rem;
    color: var(--accent);
    margin-left: auto;
    font-weight: 700;
    text-transform: lowercase;
    flex-shrink: 0;
    background: rgba(34, 197, 94, 0.1);
    padding: 2px 5px;
    border-radius: 6px;
    line-height: 1;
    position: relative;
    z-index: 1;
}
.lk-nav-item:hover {
    color: var(--accent);
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.6);
}
.lk-nav-item--active {
    color: var(--accent);
    background: rgba(34, 197, 94, 0.16);
    border-color: var(--accent);
}
.lk-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    opacity: 0.85;
}
.lk-nav-icon svg {
    width: 18px;
    height: 18px;
}
.lk-nav-item:hover .lk-nav-icon,
.lk-nav-item--active .lk-nav-icon {
    color: var(--accent);
    opacity: 1;
}
.lk-balance-round .lk-balance-btn .lk-nav-icon {
    color: var(--text-muted);
}
.lk-balance-round .lk-balance-btn:hover .lk-nav-icon {
    color: var(--accent);
}
.lk-sidebar-block {
    flex: 1 1 auto;
    min-height: 0;
    padding: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.lk-sidebar-block .lk-sidebar-title {
    flex-shrink: 0;
}
.lk-sidebar-block .lk-history-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}
.lk-sidebar-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 14px;
}
.lk-history-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.lk-history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.2s, color 0.2s;
}
.lk-history-item:hover {
    color: var(--text);
    background: var(--bg-card);
}
.lk-history-item--active {
    color: var(--accent);
    background: rgba(34, 197, 94, 0.12);
}
.lk-history-icon {
    font-size: 1rem;
    opacity: 0.85;
    flex-shrink: 0;
}
.lk-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 24px;
    z-index: 10;
}
.lk-topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.lk-topbar-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 1.2rem;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
}
.lk-topbar-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.lk-theme-toggle {
    cursor: pointer;
    font-size: 1.2rem;
}
.lk-theme-toggle .lk-theme-icon {
    display: none;
}
.lk-theme-toggle .lk-theme-icon--sun {
    display: inline;
}
.lk-page.lk-theme-light .lk-theme-toggle .lk-theme-icon--sun {
    display: none;
}
.lk-page.lk-theme-light .lk-theme-toggle .lk-theme-icon--moon {
    display: inline;
}
.lk-account-wrap {
    position: relative;
}
.lk-account-wrap--top {
    position: relative;
    z-index: 200;
}
.lk-account-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.2s;
    text-align: left;
}
.lk-account-trigger:hover {
    border-color: var(--accent);
}
.lk-account-trigger--icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
}
.lk-account-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--green-soft));
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.lk-account-trigger--icon .lk-account-avatar {
    width: 36px;
    height: 36px;
    font-size: 1rem;
}
.lk-account-avatar--logo {
    padding: 0;
    background: transparent;
    overflow: hidden;
}
.lk-account-avatar--logo .lk-account-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.lk-account-trigger--icon .lk-account-avatar--logo {
    width: 52px;
    height: 52px;
}
.lk-account-dropdown-avatar--logo {
    padding: 0;
    background: transparent;
    overflow: hidden;
}
.lk-account-dropdown-avatar--logo .lk-account-dropdown-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.lk-account-email {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-muted);
}
.lk-account-arrow {
    color: var(--text-muted);
    font-size: 0.7rem;
}
.lk-account-dropdown {
    position: absolute;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    z-index: 201;
    overflow: hidden;
}
.lk-account-dropdown--down {
    top: calc(100% + 8px);
    right: 0;
    min-width: 260px;
}
.lk-account-dropdown[hidden] {
    display: none !important;
}
.lk-account-dropdown-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
}
.lk-account-dropdown-head strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text);
}
.lk-account-dropdown-email {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.lk-account-dropdown-divider {
    height: 1px;
    background: var(--border);
}
.lk-account-dropdown-item {
    display: block;
    padding: 12px 16px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s;
}
.lk-account-dropdown-item:hover {
    background: var(--bg-card-hover);
}
.lk-account-dropdown-item--logout:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

.lk-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}
@media (min-width: 1024px) {
    .lk-main {
        max-width: none;
    }
}
.lk-main-bg {
    position: absolute;
    inset: 0;
    background: transparent;
    pointer-events: none;
}
.lk-chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px;
    overflow-y: auto;
    position: relative;
    z-index: 1;
}
.lk-welcome {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    text-align: center;
}
.lk-welcome-greeting {
    margin: 0 0 8px;
    font-size: 1.1rem;
    color: var(--accent);
    font-weight: 500;
}
.lk-welcome-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 12px;
    letter-spacing: -0.02em;
    text-align: center;
}
.lk-welcome-desc {
    margin: 12px 0 0;
    max-width: 36em;
    padding: 14px 18px;
    line-height: 1.55;
    font-size: 0.95rem;
    color: var(--text-muted);
    background: rgba(34, 197, 94, 0.06);
    border-left: 3px solid rgba(34, 197, 94, 0.45);
    border-radius: 0 8px 8px 0;
    box-sizing: border-box;
    text-align: center;
}
.lk-messages {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
}
.lk-msg {
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: 0.98rem;
    line-height: 1.5;
    max-width: 85%;
}
.lk-msg--user {
    align-self: flex-end;
    background: var(--accent);
    color: #fff;
}
.lk-msg--bot {
    align-self: flex-start;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
}
.lk-msg-text {
    display: block;
    margin-bottom: 0.5em;
}
.lk-msg-text:last-child { margin-bottom: 0; }
.lk-msg-img-wrap {
    margin-top: 8px;
    border-radius: var(--radius);
    overflow: hidden;
    max-width: 100%;
}
.lk-msg-img {
    display: block;
    max-width: 320px;
    max-height: 320px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
}
.lk-chat-bar-wrap {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    margin-top: auto;
    padding: 20px 24px;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
}
.lk-chat-bar {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.2s;
}
.lk-chat-bar:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}
.lk-chat-bar-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.2s, background 0.2s;
}
.lk-chat-bar-btn:hover {
    color: var(--accent);
    background: rgba(34, 197, 94, 0.1);
}
.lk-chat-bar-history-btn {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: #9ca3af;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}
.lk-chat-bar-history-btn:hover {
    color: #d1d5db;
    background: rgba(255, 255, 255, 0.06);
}
.lk-chat-bar-history-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}
.lk-chat-bar-history-icon svg {
    width: 14px;
    height: 14px;
}
.lk-chat-recent-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    margin-bottom: 8px;
    max-height: 280px;
    overflow-y: auto;
    background: var(--bg-card, #1a1d24);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    z-index: 50;
}
.lk-chat-recent-dropdown-title {
    padding: 10px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border);
}
.lk-chat-recent-list {
    list-style: none;
    margin: 0;
    padding: 6px 0;
}
.lk-chat-recent-item {
    display: block;
    width: 100%;
    padding: 10px 14px;
    text-align: left;
    font-size: 0.9rem;
    color: var(--text);
    background: none;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 0;
}
.lk-chat-recent-item:hover {
    background: rgba(255, 255, 255, 0.06);
}
.lk-chat-recent-item--active {
    background: rgba(34, 197, 94, 0.12);
    color: var(--accent);
}
.lk-chat-recent-item--empty {
    color: var(--text-muted);
    cursor: default;
    font-size: 0.85rem;
}
.lk-chat-form {
    flex: 1;
    min-width: 0;
}
.lk-chat-input {
    width: 100%;
    padding: 10px 0;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 1rem;
    outline: none;
}
.lk-chat-input::placeholder {
    color: var(--text-muted);
}
.lk-chat-bar-send {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s, opacity 0.2s;
}
.lk-chat-bar-send-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}
.lk-chat-bar-send-icon svg {
    width: 20px;
    height: 20px;
}
.lk-chat-bar-send:hover {
    color: var(--accent);
    opacity: 0.9;
}
.lk-chat-bar-send:focus {
    outline: none;
}
.lk-file-selected-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: none;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
/* Подсказка стоимости над формой (как на странице «Новый чат») */
.lk-chat-bar-cost {
    margin: 0 auto 8px;
    max-width: 800px;
    width: 100%;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: right;
    padding-right: 4px;
    opacity: 0;
    animation: lk-cost-fade-in 0.5s ease-out forwards;
}
@keyframes lk-cost-fade-in {
    from {
        opacity: 0;
        transform: translateX(24px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
/* Аудио в текст: иконка выбора файла и скрытый input */
.lk-att-file-input {
    position: fixed !important;
    left: -9999px !important;
    top: 0 !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    font-size: 0 !important;
    pointer-events: none !important;
}
.lk-att-file-trigger {
    cursor: pointer;
    flex-shrink: 0;
}
.lk-att-icon {
    display: inline-block;
    font-size: 1.2rem;
    line-height: 1;
}
.lk-att-icon-file { font-style: normal; }
.lk-att-icon-mic { font-style: normal; }
.lk-chat-form.lk-att-form {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}
.lk-att-form-placeholder {
    flex: 1;
    min-width: 0;
    padding: 10px 0;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-muted);
    pointer-events: none;
    text-align: left;
}

/* При отправке скрываем поле и кнопку +, стрелка остаётся сверху над формой */
.lk-chat-bar--sending .lk-chat-form,
.lk-chat-bar--sending .lk-chat-bar-btn {
    display: none !important;
}
.lk-chat-bar--sending .lk-chat-bar-send {
    margin-left: auto;
}
.lk-chat-bar-select {
    padding: 8px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
}
.lk-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 50;
}
.lk-overlay[hidden] {
    display: none !important;
}

/* Генерация фото — блок при chat.php#photo */
.lk-photo-area[hidden] {
    display: none !important;
}
.lk-photo-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 24px;
    overflow-y: auto;
}
.lk-photo-section {
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.lk-photo-mode {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}
.lk-photo-mode:last-of-type {
    border-bottom: none;
}
.lk-photo-mode-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}
.lk-photo-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.lk-photo-input {
    width: 100%;
    padding: 12px 14px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-sizing: border-box;
}
.lk-photo-input:focus {
    outline: none;
    border-color: var(--accent);
}
.lk-photo-input::placeholder {
    color: var(--text-muted);
}
.lk-photo-upload {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.lk-photo-upload-input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
}
.lk-photo-upload-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.lk-photo-upload-label:hover {
    border-color: var(--accent);
    background: rgba(34, 197, 94, 0.06);
}
.lk-photo-upload-text {
    color: var(--text-muted);
    font-size: 0.95rem;
}
.lk-photo-upload-label:hover .lk-photo-upload-text {
    color: var(--accent);
}
.lk-photo-upload-preview {
    max-width: 280px;
    max-height: 180px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
}
.lk-photo-upload-preview-img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 180px;
    object-fit: contain;
}
.lk-photo-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.lk-photo-tab {
    padding: 10px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.lk-photo-tab:hover {
    color: var(--text);
    border-color: rgba(34, 197, 94, 0.4);
}
.lk-photo-tab--active {
    color: var(--accent);
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.35);
}
.lk-photo-model {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.lk-photo-model-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}
.lk-photo-model-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.lk-photo-ref {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.lk-photo-ref-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}
.lk-photo-ref-upload {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.lk-photo-ref-upload:hover {
    border-color: var(--accent);
    background: rgba(34, 197, 94, 0.06);
}
.lk-photo-ref-input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
}
.lk-photo-ref-text {
    color: var(--text-muted);
    font-size: 0.9rem;
}
.lk-photo-ref-action {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 500;
}
.lk-photo-ref-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.lk-photo-prompt-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.lk-photo-prompt-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
}
.lk-photo-prompt {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.95rem;
    line-height: 1.5;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.2s;
}
.lk-photo-prompt:focus {
    outline: none;
    border-color: var(--accent);
}
.lk-photo-prompt::placeholder {
    color: var(--text-muted);
}
.lk-photo-prompt-counter {
    font-size: 0.8rem;
    color: var(--text-muted);
    align-self: flex-end;
}
.lk-photo-prompt-hint {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.lk-photo-inspire {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.lk-photo-inspire-link {
    color: var(--accent);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
}
.lk-photo-inspire-link:hover {
    text-decoration: underline;
}
.lk-photo-inspire-desc {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.lk-photo-options {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}
.lk-photo-option-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.lk-photo-option-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.lk-photo-select {
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
}
.lk-photo-res {
    font-size: 0.9rem;
    color: var(--text);
}
.lk-photo-res em {
    color: var(--text-muted);
    font-style: normal;
    font-weight: 400;
}
.lk-photo-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.lk-photo-summary-count,
.lk-photo-summary-credits {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.lk-photo-summary-count strong,
.lk-photo-summary-credits strong {
    color: var(--text);
}
.lk-photo-bar-wrap {
    margin-bottom: 1.5rem;
}
.lk-photo-form {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.2s;
}
.lk-photo-form:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}
.lk-photo-input {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    background: var(--bg);
    color: var(--text);
}
.lk-photo-input::placeholder {
    color: var(--text-muted);
}
.lk-photo-submit-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--accent), var(--green-soft));
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 0.98rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s;
}
.lk-photo-submit-btn:hover:not(:disabled) {
    opacity: 0.95;
}
.lk-photo-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}
.lk-photo-submit {
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--accent), var(--green-soft));
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}
.lk-photo-submit:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}
.lk-photo-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}
.lk-photo-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 1rem;
    margin-left: auto;
    margin-right: auto;
    padding: 28px 24px;
    background: var(--bg-secondary, rgba(0,0,0,0.04));
    border-radius: 12px;
    border: 1px solid var(--border);
    max-width: 320px;
}
.lk-photo-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent, #0ea5e9);
    border-radius: 50%;
    animation: lk-spin 0.9s linear infinite;
}
.lk-photo-loading-text { font-size: 1rem; font-weight: 500; color: var(--text); }
.lk-photo-loading-hint { font-size: 0.85rem; color: var(--text-muted); }
@keyframes lk-spin { to { transform: rotate(360deg); } }
.lk-photo-error {
    margin-top: 1rem;
    padding: 1rem;
    color: var(--error, #c00);
    font-size: 0.95rem;
}
.lk-notokens-block {
    margin-top: 1rem;
    padding: 24px 20px;
    border-radius: 12px;
    text-align: center;
    max-width: 340px;
}
.lk-notokens-block-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}
.lk-notokens-block-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 16px 0;
    line-height: 1.3;
}
.lk-notokens-block--green {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12) 0%, rgba(22, 163, 74, 0.08) 100%);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: var(--text);
}
.lk-notokens-block--green .lk-notokens-block-title {
    color: #22c55e;
}
.lk-notokens-block-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    border: none;
    border-radius: 10px;
    font-size: 0.98rem;
    font-weight: 600;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.1s, opacity 0.2s;
}
.lk-notokens-block--green .lk-notokens-block-btn {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
}
.lk-notokens-block--green .lk-notokens-block-btn:hover {
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.45);
    opacity: 0.95;
}
.lk-notokens-block-btn:active {
    transform: scale(0.98);
}
.lk-photo-notokens {
    margin-top: 1rem;
    padding: 24px 20px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08) 0%, rgba(59, 130, 246, 0.06) 100%);
    border: 1px solid rgba(14, 165, 233, 0.25);
    border-radius: 12px;
    text-align: center;
    max-width: 340px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    align-self: center;
}
.lk-photo-notokens-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}
.lk-photo-notokens-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 6px 0;
    text-align: center;
    width: 100%;
}
.lk-photo-notokens-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0 0 16px 0;
    line-height: 1.4;
    text-align: center;
    width: 100%;
}
.lk-photo-notokens-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.4);
    transition: box-shadow 0.2s, transform 0.1s, opacity 0.2s;
}
.lk-photo-notokens-btn:hover {
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.5);
    opacity: 0.95;
}
.lk-photo-notokens-btn:active {
    transform: scale(0.98);
}
.lk-photo-notokens-btn .lk-notokens-btn-icon {
    width: 18px;
    height: 18px;
    opacity: 0.95;
}

/* Модалка подарка — всегда на весь экран по центру, не участвует в flex */
.lk-gift-modal {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.55);
    box-sizing: border-box;
}
.lk-gift-modal[hidden] { display: none !important; }
.lk-gift-modal-inner {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: calc(100% - 48px);
    max-width: 380px;
    padding: 40px 32px 32px;
    text-align: center;
    background: linear-gradient(160deg, #0d3320 0%, #0f2819 50%, #0a1f14 100%);
    border: 1px solid rgba(34, 197, 94, 0.35);
    border-radius: 16px;
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(34, 197, 94, 0.1);
    box-sizing: border-box;
}
.lk-gift-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    font-size: 1.4rem;
    line-height: 1;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}
.lk-gift-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}
.lk-gift-icon {
    display: block;
    font-size: 3rem;
    margin: 0 auto 14px;
    text-align: center;
}
.lk-gift-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 auto 10px;
    color: #e8f5e9;
    text-align: center;
}
.lk-gift-text {
    font-size: 1rem;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.5;
    text-align: center;
}
.lk-gift-text strong {
    color: #6ee7b7;
}
.lk-page.lk-theme-light .lk-gift-modal-inner {
    background: linear-gradient(160deg, #0d3320 0%, #0f2819 50%, #0a1f14 100%);
    border-color: rgba(34, 197, 94, 0.4);
}
.lk-photo-result {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}
.lk-photo-result .lk-msg {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}
.lk-photo-result .lk-msg--bot {
    line-height: 1.55;
    white-space: pre-wrap;
    word-wrap: break-word;
}
.lk-photo-result .lk-msg--bot .lk-msg-paragraph {
    margin: 0 0 0.6em;
}
.lk-photo-result .lk-msg--bot .lk-msg-paragraph:last-child {
    margin-bottom: 0;
}
.lk-photo-result .lk-msg--bot strong {
    font-weight: 600;
}
.lk-photo-result .lk-photo-loading {
    align-self: center;
}
.lk-photo-result-wrap {
    position: relative;
    display: inline-block;
    max-width: 360px;
    overflow: visible;
}
.lk-photo-result-img {
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 400px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    display: block;
    vertical-align: top;
}
.lk-photo-download {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border-radius: 50%;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    -webkit-tap-highlight-color: transparent;
    z-index: 10;
}
.lk-photo-download:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.05);
}
.lk-photo-download svg {
    width: 22px;
    height: 22px;
}
@media (max-width: 768px) {
    .lk-photo-result-wrap {
        overflow: visible;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .lk-photo-download {
        position: static;
        width: auto;
        min-width: 48px;
        height: 48px;
        padding: 0 20px;
        gap: 8px;
        border-radius: var(--radius-sm);
        z-index: 20;
        background: rgba(34, 197, 94, 0.9);
        color: #fff;
        font-size: 0.95rem;
        font-weight: 600;
    }
    .lk-photo-download svg {
        width: 22px;
        height: 22px;
        flex-shrink: 0;
    }
    .lk-photo-download::after {
        content: 'Скачать';
    }
}
.lk-photo-title {
    margin: 0 0 8px;
    font-size: 1.35rem;
    color: var(--text);
}
.lk-photo-intro {
    margin: 0 0 20px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Все страницы ЛК (чат, фото, видео и т.д.): топбар от сайдбара до правого края, кнопки в угол */
body.lk-page:not(.main-page) .lk-topbar {
    position: fixed !important;
    top: 0 !important;
    left: 280px !important;
    right: 0 !important;
    width: auto !important;
    height: 56px !important;
    justify-content: flex-end !important;
    padding-right: 24px !important;
    background: var(--bg) !important;
    z-index: 65 !important;
}
body.lk-page:not(.main-page) .lk-main {
    padding-top: 56px !important;
}
body.lk-page:not(.main-page) .lk-topbar-right {
    position: absolute !important;
    right: 24px !important;
    top: 0 !important;
    bottom: 0 !important;
    display: flex !important;
    align-items: center !important;
}
@media (max-width: 768px) {
    body.lk-page:not(.main-page) .lk-topbar {
        left: 0 !important;
    }
}

.lk-burger {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 70;
    width: 44px;
    height: 44px;
    padding: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: border-color 0.2s;
}
.lk-burger span {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
}
.lk-burger:hover {
    border-color: var(--accent);
}

@media (max-width: 768px) {
    .lk-burger {
        display: flex;
        z-index: 75;
        top: 8px;
        left: 12px;
    }
    .lk-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 60;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }
    .lk-sidebar.is-open {
        transform: translateX(0);
    }
    .lk-sidebar .lk-sidebar-top {
        padding-top: 48px;
    }
    .lk-topbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 65;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        padding-left: 56px;
    }
    .lk-main {
        min-width: 0;
        padding-top: 56px;
    }
    .lk-topbar-btn,
    .lk-account-trigger--icon {
        min-width: 44px;
        min-height: 44px;
        -webkit-tap-highlight-color: transparent;
    }
    .lk-theme-toggle {
        -webkit-tap-highlight-color: transparent;
    }
    .lk-welcome,
    .lk-welcome-title {
        text-align: center;
    }
    .lk-sidebar .lk-nav-item {
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 700px) {
    .hero-title {
        white-space: normal;
    }
}

@media (max-width: 600px) {
    .header-inner {
        flex-wrap: wrap;
        gap: 12px;
    }
    /* Главная: логотип и плашка в одной строке как на десктопе */
    .lk-page.main-page .header .header-inner {
        flex-wrap: nowrap;
        gap: 10px;
        min-height: 56px;
        padding: 0 12px;
    }
    .lk-page.main-page .header .logo--img .logo-img {
        height: 56px;
        max-height: 140px;
        max-width: 360px;
        width: auto;
    }
    .lk-page.main-page .header .header-inner {
        justify-content: space-between;
    }
    .lk-page.main-page .header-auth {
        gap: 6px;
        flex-shrink: 0;
    }
    .lk-page.main-page .header-auth .btn-auth {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    .lk-page.main-page .header-tg-link,
    .lk-page.main-page .header-theme-toggle {
        width: 36px;
        height: 36px;
    }
    .header-inner .nav {
        flex: none;
        margin: 0;
        width: auto;
        justify-content: flex-end;
    }
    .hero {
        padding: 64px 0 80px;
    }
    .hero-actions {
        flex-direction: column;
    }
    .hero-actions .btn {
        width: 100%;
        max-width: 280px;
    }
    .hero-stats {
        gap: 16px;
    }
    .stat {
        padding: 20px 28px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
}
