/* ============================================================
   NGTV QUEST — Overrides
   Загружается ПОСЛЕ style.css, точечно улучшает
   ============================================================ */

/* Навбар — подписи читаемее */
.nav-label {
    font-family: 'Inter', var(--font-sys);
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.05em;
    line-height: 1.2;
}

/* Навбар — зона касания */
.nav-btn {
    min-height: 48px;
    padding: 6px 4px;
}

/* Glow активной кнопки — teal вместо mint */
.nav-btn.active .icon {
    filter: drop-shadow(0 0 5px rgba(14, 165, 170, 0.6));
}

/* Баланс в шапке — Inter для цифр */
.balance-display {
    font-family: 'Inter', var(--font-sys);
    font-variant-numeric: tabular-nums;
}

/* Карточки — чуть мягче скругления */
.tile-card,
.quest-card-new,
.card {
    border-radius: 16px;
}

/* Skeleton — наш стиль */
.skeleton {
    background: var(--surface-raised);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}
.skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.04) 50%,
        transparent
    );
    background-size: 200% 100%;
    animation: skeleton-sweep 1.6s ease-in-out infinite;
}
@keyframes skeleton-sweep {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* safe-area для navbar */
.bottom-nav {
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

/* Контент не перекрывается навбаром */
.content {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

/* Неактивные табы — читаемее */
.nav-btn {
    color: #6a7a8a;
}

/* Список квестов — контейнер не определён в style.css */
.quests-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 10px 14px;
}

/* Карточка квеста — фикс переполнения внутренних элементов */
.quest-card {
    min-width: 0;
    box-sizing: border-box;
}

.quest-card .quest-header {
    flex-wrap: wrap;
    gap: 6px;
}

.quest-card p,
.quest-card .quest-question,
.quest-card .quest-hint {
    overflow-wrap: anywhere;
    word-break: normal;
}

.quest-card .submit-btn {
    width: 100%;
    box-sizing: border-box;
}

/* Фикс сломанной раскладки карточек квестов */
.quest-card {
    display: block !important;
    min-width: 0;
}

.quest-card .quest-header {
    display: flex !important;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.quest-card .quest-num {
    display: block;
    font-size: 9px;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-bottom: 6px;
}

.quest-card p,
.quest-card .quest-question,
.quest-card .quest-hint,
.quest-card .quest-reward {
    display: block;
    width: 100%;
    max-width: 100%;
}

.quest-card .submit-btn,
.quest-card button {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 8px;
}

/* Flavor ID card — лейблы не обрезаются */
#flavorCard {
    overflow: visible;
}

#flavorBars {
    padding: 0 2px;
}

/* ============================================================
   ТАЙЛЫ ГЛАВНОГО ЭКРАНА — новый стиль
   ============================================================ */

.tiles-grid {
    gap: 8px;
    padding: 12px 14px 16px;
}

/* Сброс пиксельного стиля */
.tile {
    background: var(--surface-raised);
    border: 1px solid var(--border-default);
    border-radius: 16px;
    padding: 18px 12px 16px;
    min-height: 110px;
    box-shadow: none;
    transition: transform 120ms ease, background 120ms ease;
}

/* Убираем пиксельный уголок */
.tile::before {
    display: none;
}

/* Убираем все цветные ::after */
.tile::after {
    display: none;
}

.tile:active {
    transform: scale(0.96);
    background: var(--surface-overlay);
}

.tile:hover {
    box-shadow: none;
}

/* Иконка — убираем glow */
.tile-icon {
    font-size: 36px;
    margin-bottom: 10px;
    filter: none;
    line-height: 1;
}

/* Заголовок — Inter вместо пиксельного */
.tile-title {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.35;
    letter-spacing: 0;
}

.tile-sub {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
}

/* Цветовые варианты — чистые, без градиентов */
.tile-profile {
    border-color: rgba(123, 94, 167, 0.3);
    background: rgba(123, 94, 167, 0.06);
    box-shadow: none;
}

.tile-quests {
    border-color: var(--color-accent-border);
    background: var(--color-accent-subtle);
    box-shadow: none;
}

.tile-quests .tile-title {
    color: var(--color-accent-light);
}

.tile-daily {
    border-color: rgba(56, 189, 248, 0.25);
    background: rgba(56, 189, 248, 0.06);
    box-shadow: none;
}

.tile-raffle,
.tile-raffle-s2 {
    border-color: rgba(245, 158, 11, 0.25);
    background: rgba(245, 158, 11, 0.06);
    box-shadow: none;
}

.tile-raffle .tile-title,
.tile-raffle-s2 .tile-title {
    color: var(--text-primary);
}

.tile-donate {
    border-color: rgba(34, 197, 94, 0.25);
    background: rgba(34, 197, 94, 0.06);
    box-shadow: none;
}

.tile-mixer {
    border-color: rgba(232, 68, 68, 0.25);
    background: rgba(232, 68, 68, 0.06);
    box-shadow: none;
}

.tile-battle {
    border-color: rgba(251, 146, 60, 0.25);
    background: rgba(251, 146, 60, 0.06);
    box-shadow: none;
}

.tile-hookah-game {
    border-color: var(--border-default);
    background: var(--surface-raised);
}

.tile-venues {
    border-color: rgba(56, 189, 248, 0.25);
    background: rgba(56, 189, 248, 0.06);
}

.tile-news {
    border-color: var(--border-default);
    background: var(--surface-raised);
}

/* Заголовок приложения — Inter */
.app-title {
    font-family: 'Inter', system-ui, sans-serif !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    background-clip: unset !important;
    color: var(--text-primary) !important;
}

/* Навбар — stroke SVG иконки */
.nav-btn .icon {
    font-size: 0;
    line-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
}

.nav-btn .icon svg {
    width: 22px;
    height: 22px;
    display: block;
}

/* Навбар фон — чуть темнее с blur */
.bottom-nav {
    background: rgba(8, 16, 15, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Glow-линия — teal вместо mint/violet */
.bottom-nav::before {
    background: linear-gradient(90deg,
        transparent,
        rgba(14,165,170,0.4),
        rgba(123,94,167,0.3),
        transparent
    );
}

/* Profile tabs */
#profile-tab-main,
#profile-tab-ach,
#profile-tab-settings {
    transition: none;
}

/* Ачивки — SVG иконки */
.achievement-icon svg {
    width: 28px;
    height: 28px;
    display: block;
    margin: 0 auto;
}

.achievement-item.unlocked .achievement-icon svg {
    stroke: #0EA5AA;
}

.achievement-item.locked .achievement-icon svg {
    stroke: var(--text-muted);
    opacity: 0.5;
}

/* ============================================================
   ШАПКА — новый стиль
   ============================================================ */

.header {
    padding: 10px 16px 10px;
    background: var(--surface-raised);
    border-bottom: 1px solid var(--border-default);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header::after {
    display: none;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Аватар */
.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(14,165,170,0.12);
    border: 1.5px solid rgba(14,165,170,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #40c8cc;
    box-shadow: none;
    overflow: hidden;
    flex-shrink: 0;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar-placeholder svg {
    width: 18px;
    height: 18px;
}

/* Заголовок */
.app-title {
    font-family: 'Inter', system-ui, sans-serif !important;
    font-size: 17px !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    background-clip: unset !important;
    color: var(--text-primary) !important;
    margin: 0 !important;
}

/* Баланс */
.balance, #balance, .balance-display {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #40c8cc;
    background: rgba(14,165,170,0.1);
    border: 1px solid rgba(14,165,170,0.25);
    padding: 5px 12px;
    border-radius: 20px;
    box-shadow: none;
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
}

/* SVG иконки в тайлах */
.tile-icon {
    font-size: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.tile-icon svg {
    width: 32px;
    height: 32px;
    display: block;
}

.tile-quests .tile-icon { color: #0EA5AA; }
.tile-profile .tile-icon { color: #A07DD4; }
.tile-daily .tile-icon { color: #38BDF8; }
.tile-raffle .tile-icon,
.tile-raffle-s2 .tile-icon { color: #F59E0B; }
.tile-donate .tile-icon { color: #22C55E; }
.tile-battle .tile-icon { color: #F97316; }
.tile-mixer .tile-icon { color: #E879F9; }
.tile-venues .tile-icon { color: #38BDF8; }
.tile-news .tile-icon { color: #A3E635; }

/* ============================================================
   ШАПКИ ВНУТРЕННИХ ЭКРАНОВ — back-header
   ============================================================ */

.back-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px 10px;
    cursor: pointer;
    background: var(--surface-raised);
    border-bottom: 1px solid var(--border-default);
    position: sticky;
    top: 0;
    z-index: 10;
    -webkit-tap-highlight-color: transparent;
}

.back-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-default);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    color: var(--text-secondary);
    flex-shrink: 0;
    font-family: Inter, system-ui, sans-serif;
    box-shadow: none;
    min-height: 0;
    padding: 0;
}

.back-header h2 {
    font-family: 'Inter', system-ui, sans-serif !important;
    font-size: 17px !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    letter-spacing: -0.01em !important;
    margin: 0 !important;
    line-height: 1.3 !important;
}

/* Скелетон — новый стиль */
.skeleton-card {
    background: var(--surface-raised);
    border-radius: 14px;
    border: 1px solid var(--border-default);
    padding: 16px;
    margin: 0 14px 10px;
}

.skeleton-text.large {
    height: 16px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.skeleton-text {
    height: 12px;
    border-radius: 6px;
    margin-bottom: 8px;
    background: var(--surface-overlay);
    position: relative;
    overflow: hidden;
}

.skeleton-text::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
    background-size: 200% 100%;
    animation: skeleton-sweep 1.6s ease-in-out infinite;
}

/* ============================================================
   КВЕСТ ДНЯ — карточка
   ============================================================ */

.daily-card {
    background: var(--surface-raised) !important;
    border: 1px solid var(--border-default) !important;
    border-radius: 16px !important;
    box-shadow: none !important;
    text-align: center;
}

.daily-card h3 {
    font-family: 'Inter', system-ui, sans-serif !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: var(--text-primary) !important;
    letter-spacing: 0 !important;
    margin-bottom: 8px !important;
}

.daily-card p {
    font-family: 'Inter', system-ui, sans-serif !important;
    font-size: 14px !important;
    color: var(--text-secondary) !important;
    line-height: 1.55 !important;
}

.daily-card .quest-reward {
    font-family: 'Inter', system-ui, sans-serif !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #40c8cc !important;
}

.daily-card .quest-completed {
    font-family: 'Inter', system-ui, sans-serif !important;
    font-size: 14px !important;
    background: rgba(34,197,94,0.08) !important;
    border-radius: 10px !important;
    color: #22C55E !important;
    border: 1px solid rgba(34,197,94,0.2) !important;
}

/* Кнопка «Выполнить» */
.daily-card .btn {
    background: #0EA5AA !important;
    color: #04282a !important;
    border: none !important;
    border-radius: 12px !important;
    font-family: 'Inter', system-ui, sans-serif !important;
    font-weight: 600 !important;
    box-shadow: none !important;
}

/* Иконка квеста дня */
.quest-icon {
    font-size: 48px !important;
    margin: 8px 0 16px !important;
    filter: none !important;
}

/* Убираем пиксельное свечение с карточек */
.card {
    box-shadow: none !important;
}

/* Кнопки — глобальный Inter */
.btn, .submit-btn, button.btn {
    font-family: 'Inter', system-ui, sans-serif !important;
    letter-spacing: 0 !important;
}

.submit-btn {
    border-radius: 12px !important;
    font-weight: 500 !important;
}

/* ============================================================
   СЕЗОНЫ — карточки
   ============================================================ */

.seasons-list .season-card,
.season-card {
    background: var(--surface-raised) !important;
    border: 1px solid var(--border-default) !important;
    border-radius: 16px !important;
    box-shadow: none !important;
}

.season-card h3,
.season-header h3,
.season-card .season-title {
    font-family: 'Inter', system-ui, sans-serif !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    letter-spacing: 0 !important;
    line-height: 1.35 !important;
}

.season-card .season-dates,
.season-card p {
    font-family: 'Inter', system-ui, sans-serif !important;
    font-size: 12px !important;
    color: var(--text-muted) !important;
}

.season-card::before {
    background: #0EA5AA !important;
}

/* Прогресс-бар в сезонах */
.season-card .progress-bar,
.season-card [style*="background:#0"] {
    border-radius: 2px !important;
}

/* Бейдж прогресса */
.season-card .progress-badge,
.season-card [style*="border-radius:20px"] {
    font-family: 'Inter', system-ui, sans-serif !important;
    background: rgba(14,165,170,0.12) !important;
    color: #40c8cc !important;
    border: 1px solid rgba(14,165,170,0.25) !important;
}

/* Заголовок списка сезонов */
.seasons-list > h2,
[style*="Квесты сезонов"] {
    font-family: 'Inter', system-ui, sans-serif !important;
    font-size: 17px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
}

/* ============================================================
   МИКСОЛОГ — кнопки и секции
   ============================================================ */

/* Кнопки генерации */
[style*="background:linear-gradient(135deg,#667eea"],
[style*="background: linear-gradient(135deg, #667eea"] {
    background: #0EA5AA !important;
    border-radius: 12px !important;
    font-family: 'Inter', system-ui, sans-serif !important;
    font-weight: 600 !important;
}

/* Таблетки выбора (49/51, нетривиальный) */
[style*="background:#c4b5fd"],
[style*="background: #c4b5fd"] {
    background: #0EA5AA !important;
    color: #04282a !important;
    border-radius: 10px !important;
    font-family: 'Inter', system-ui, sans-serif !important;
}

/* Вкладки Мои миксы / Топ / Flavor ID */
[style*="border:1px solid #c4b5fd"],
[style*="border: 1px solid #c4b5fd"] {
    border-color: rgba(14,165,170,0.3) !important;
    border-radius: 10px !important;
    font-family: 'Inter', system-ui, sans-serif !important;
}

/* Активная вкладка */
[style*="background:#c4b5fd;color:#000"],
[style*="background: #c4b5fd; color: #000"] {
    background: rgba(14,165,170,0.12) !important;
    color: #40c8cc !important;
}

/* Лейблы секций (ГЕНЕРАЦИЯ, КОНТЕНТ) */
[style*="letter-spacing:0.08em"][style*="font-size:11px"],
[style*="font-size:10px"][style*="letter-spacing"] {
    font-family: 'Inter', system-ui, sans-serif !important;
    color: var(--text-muted) !important;
}

/* Инпут пожеланий */
[placeholder*="фруктовый"],
[placeholder*="например"] {
    font-family: 'Inter', system-ui, sans-serif !important;
    border-radius: 12px !important;
    background: var(--surface-overlay) !important;
    border: 1px solid var(--border-default) !important;
    color: var(--text-primary) !important;
}

/* ============================================================
   ЗАВЕДЕНИЯ
   ============================================================ */

.venues-list .venue-card,
[class*="venue"] {
    font-family: 'Inter', system-ui, sans-serif !important;
    border-radius: 14px !important;
}

/* Бейдж «Открыто» */
[style*="color:#4ade80"],
[style*="color: #4ade80"] {
    font-family: 'Inter', system-ui, sans-serif !important;
    background: rgba(34,197,94,0.1) !important;
    border-radius: 20px !important;
}

/* ============================================================
   ГЛОБАЛЬНО — убираем пиксельный шрифт везде кроме битвы
   ============================================================ */

.card h3,
.card p,
.card span:not(.quest-status),
.card div {
    font-family: 'Inter', system-ui, sans-serif;
}

/* Заголовки с эмодзи в шапках back-header */
.back-header h2 {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Розыгрыш */
.raffle-container { padding: 0 0 80px; }
.raffle-header h2 {
    font-family: 'Inter', system-ui, sans-serif !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
}
.raffle-timer {
    font-family: 'Inter', system-ui, sans-serif !important;
    font-size: 13px !important;
    background: rgba(14,165,170,0.08) !important;
    border: 1px solid rgba(14,165,170,0.25) !important;
    color: #40c8cc !important;
    border-radius: 10px !important;
}
.raffle-card { border-radius: 16px !important; }
.raffle-card h3 {
    font-family: 'Inter', system-ui, sans-serif !important;
    font-weight: 600 !important;
}

/* Донат */
.card h3 {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 600;
}

/* ============================================================
   РОЗЫГРЫШ — полный переопределение
   ============================================================ */

.raffle-header {
    background: var(--surface-raised) !important;
    border: 1px solid var(--border-accent) !important;
    box-shadow: none !important;
}

.raffle-header h2 {
    font-family: 'Inter', system-ui, sans-serif !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    letter-spacing: 0 !important;
    line-height: 1.3 !important;
}

.raffle-timer {
    font-family: 'Inter', system-ui, sans-serif !important;
    font-size: 13px !important;
    color: #40c8cc !important;
    background: rgba(14,165,170,0.08) !important;
    border: 1px solid rgba(14,165,170,0.25) !important;
    border-radius: 10px !important;
    padding: 6px 14px !important;
    display: inline-block !important;
}

.raffle-card h3 {
    font-family: 'Inter', system-ui, sans-serif !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    line-height: 1.3 !important;
    color: var(--text-primary) !important;
}

.raffle-icon {
    filter: none !important;
}

.chance-calculator {
    background: var(--surface-raised) !important;
    border: 1px solid var(--border-default) !important;
    box-shadow: none !important;
}

.chance-calculator h3 {
    font-family: 'Inter', system-ui, sans-serif !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    color: var(--text-muted) !important;
    line-height: 1.3 !important;
}

.chance-percent {
    font-family: 'Inter', system-ui, sans-serif !important;
    color: #40c8cc !important;
    font-variant-numeric: tabular-nums !important;
}

.chance-label {
    font-family: 'Inter', system-ui, sans-serif !important;
    color: var(--text-muted) !important;
}

.chance-value {
    font-family: 'Inter', system-ui, sans-serif !important;
    color: var(--text-primary) !important;
    font-variant-numeric: tabular-nums !important;
}

.winners-block {
    background: var(--surface-raised) !important;
    border: 1px solid var(--border-default) !important;
    border-radius: 14px !important;
    font-family: 'Inter', system-ui, sans-serif !important;
}

.prize-item,
.prize-card {
    border-radius: 14px !important;
    font-family: 'Inter', system-ui, sans-serif !important;
}

/* Кнопки бустов */
.boost-btn,
[class*="boost"] {
    border-radius: 12px !important;
    font-family: 'Inter', system-ui, sans-serif !important;
}

/* Убираем пиксельный звёздный фон */
#stars { display: none !important; }

/* Toast анимации */
@keyframes toast-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes toast-out {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-8px); }
}

/* ============================================================
   СВЕТЛАЯ ТЕМА
   ============================================================ */
body.light-theme {
    --surface-base: #f5f5f5;
    --surface-raised: #ffffff;
    --surface-overlay: #f0f0f0;
    --text-primary: #0f0f0f;
    --text-secondary: #333333;
    --text-muted: #777777;
    --border-default: rgba(0,0,0,0.1);
    --border-accent: rgba(14,165,170,0.3);
}

body.light-theme .header {
    background: #ffffff;
    border-color: rgba(0,0,0,0.08);
}

body.light-theme #content {
    background: #f5f5f5;
}

body.light-theme .back-header {
    background: #ffffff;
    border-color: rgba(0,0,0,0.08);
}

body.light-theme .card {
    background: #ffffff;
    border-color: rgba(0,0,0,0.08);
}

body.light-theme .tile {
    background: #ffffff;
    border-color: rgba(0,0,0,0.08);
}

body.light-theme .nav-bar,
body.light-theme nav {
    background: rgba(255,255,255,0.95);
    border-color: rgba(0,0,0,0.08);
}

/* Светлая тема — плитки */
body.light-theme .tile {
    background: #ffffff !important;
    border-color: rgba(0,0,0,0.08) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

body.light-theme .tile-title,
body.light-theme .tile .tile-title {
    color: #1a1a1a !important;
}

body.light-theme [style*="color:var(--text-secondary)"],
body.light-theme [style*="color:var(--text-muted)"] {
    color: #666 !important;
}

body.light-theme [style*="color:var(--text-primary)"] {
    color: #1a1a1a !important;
}

body.light-theme [style*="font-size:10px;color:var(--text-muted)"],
body.light-theme [style*="font-size:11px;font-weight:500;color:var(--text-secondary)"] {
    color: #666 !important;
}

/* Заголовки секций ИГРА / КОНТЕНТ */
body.light-theme [style*="text-transform:uppercase"][style*="letter-spacing"] {
    color: #999 !important;
}

/* Статистика hero */
body.light-theme [style*="background:rgba(14,165,170,0.07)"] {
    background: rgba(14,165,170,0.06) !important;
    border-color: rgba(14,165,170,0.25) !important;
}

body.light-theme [style*="background:var(--surface-raised)"] {
    background: #ffffff !important;
}

body.light-theme [style*="background:rgba(255,255,255,0.04)"],
body.light-theme [style*="background:rgba(255,255,255,0.03)"],
body.light-theme [style*="background:rgba(255,255,255,0.06)"] {
    background: #f8f8f8 !important;
}

body.light-theme .back-header h2 {
    color: #1a1a1a !important;
}

body.light-theme .app-title {
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

body.light-theme .nav-bar {
    background: rgba(255,255,255,0.97) !important;
}

body.light-theme body,
body.light-theme {
    background: #f5f5f7 !important;
    color: #1a1a1a !important;
}

/* Светлая тема — квесты */
body.light-theme .quest-card,
body.light-theme .season-card,
body.light-theme .card {
    background: #ffffff !important;
    color: #1a1a1a !important;
}

body.light-theme .quest-card *,
body.light-theme .season-card *,
body.light-theme .card * {
    color: inherit;
}

body.light-theme .quest-title,
body.light-theme .quest-description,
body.light-theme h3, 
body.light-theme h2 {
    color: #1a1a1a !important;
}

body.light-theme p,
body.light-theme div {
    color: #1a1a1a;
}

/* Квест статус бейджи */
body.light-theme .quest-status {
    color: inherit !important;
}

/* Светлая тема — общий фон контента */
body.light-theme #content {
    background: #f0f0f2 !important;
}

/* Все тёмные bg в светлой теме */
body.light-theme [style*="background:#0a0000"],
body.light-theme [style*="background:#1a1a2e"],
body.light-theme [style*="background:#111"],
body.light-theme [style*="background:#0d0d"] {
    background: #f0f0f2 !important;
    color: #1a1a1a !important;
}

/* Светлая тема — квестовые карточки */
body.light-theme .quest-card,
body.light-theme .season-card {
    background: #ffffff !important;
    border-color: rgba(0,0,0,0.08) !important;
}

body.light-theme .quest-title,
body.light-theme .quest-description,
body.light-theme .season-card h3 {
    color: #1a1a1a !important;
}

/* Светлая тема — убираем тёмные инлайн фоны */
body.light-theme .screen-container {
    background: #f0f0f2 !important;
}

/* Кнопки в светлой теме */
body.light-theme .btn,
body.light-theme .submit-btn {
    background: #0EA5AA !important;
    color: #ffffff !important;
}

/* Квесты — убираем пиксельный шрифт */
.quest-card,
.quest-card *,
.quest-header,
.quest-header *,
.quest-title,
.quest-description,
.quest-reward,
.quest-status,
.quest-number,
.season-card,
.season-card * {
    font-family: 'Inter', system-ui, sans-serif !important;
    letter-spacing: 0 !important;
}

.quest-number {
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
}

.quest-title {
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
}

/* Светлая тема — прогресс бар сезонов */
body.light-theme .season-card [style*="background:#0d"],
body.light-theme .season-card [style*="background:#1a"],
body.light-theme [style*="background:#0d"],
body.light-theme .progress-track {
    background: rgba(0,0,0,0.08) !important;
}

/* Бейджи статуса квеста в светлой теме */
body.light-theme .quest-status[style*="background"],
body.light-theme [style*="background:#1a3a"],
body.light-theme [style*="background:#2a1"] {
    background: rgba(34,197,94,0.12) !important;
    color: #166534 !important;
}

body.light-theme [style*="background:#3a1"],
body.light-theme [style*="color:#4f4"] {
    color: #166534 !important;
}

/* Светлая тема — принудительный фон контента */
body.light-theme #content > * {
    background-color: transparent;
}

body.light-theme #content {
    background: #f0f0f2 !important;
    color: #1a1a1a !important;
}

/* Все инлайн тёмные фоны через !important где можно */
body.light-theme .card,
body.light-theme .quest-card,
body.light-theme .season-card,
body.light-theme .leaderboard-item,
body.light-theme .raffle-card,
body.light-theme .mix-card,
body.light-theme .achievement-item,
body.light-theme .news-card {
    background: #ffffff !important;
    color: #1a1a1a !important;
    border-color: rgba(0,0,0,0.1) !important;
}

body.light-theme .card *,
body.light-theme .quest-card *,
body.light-theme .season-card *,
body.light-theme .news-card * {
    color: #1a1a1a !important;
}

body.light-theme .card [style*="color:#888"],
body.light-theme .card [style*="color: #888"],
body.light-theme .card [style*="color:#666"],
body.light-theme .card [style*="color:#aaa"],
body.light-theme .card [style*="color:#555"] {
    color: #666666 !important;
}

/* Поиск в новинках */
body.light-theme input[style*="background:#17171d"],
body.light-theme input[style*="background:#1a1a2e"] {
    background: #f0f0f2 !important;
    color: #1a1a1a !important;
    border-color: rgba(0,0,0,0.15) !important;
}

/* Прогресс треки */
body.light-theme [style*="background:rgba(255,255,255,0.07)"],
body.light-theme [style*="background:rgba(255,255,255,0.08)"] {
    background: rgba(0,0,0,0.1) !important;
}

/* Светлая тема — лента активности */
body.light-theme #feedList div {
    color: #1a1a1a !important;
    border-color: rgba(0,0,0,0.08) !important;
}

body.light-theme #feedList [style*="color:var(--text-primary)"],
body.light-theme #feedList [style*="color:var(--text-muted)"] {
    color: #1a1a1a !important;
}

/* Светлая тема — иконки ленты */
body.light-theme #feedList [style*="background:var(--surface-overlay)"] {
    background: rgba(0,0,0,0.06) !important;
}

body.light-theme #feedList svg {
    stroke: #555 !important;
}
