/*
 * Новый интерфейс (ui_v2): главный экран «Сегодня» (три состояния). Правила действуют только внутри .v2-home
 * и берут цвета из токенов ui-v2.css; макеты: HomeTrial / HomeActive / HomeReturn.
 */

.v2-home .v2-stack { gap: 14px; }

/* Шапка: знак, приветствие, переключатель темы */
.v2-home-head { display: flex; align-items: center; gap: 12px; }
.v2-home-tile { flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px; background: #171717; display: flex; align-items: center; justify-content: center; }
.v2-home-tile img { display: block; width: 28px; height: 28px; }
.v2-home-head-text { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.v2-home-head-actions { flex-shrink: 0; }
.v2-home-caption { font-size: 13px; color: var(--c-text-dim); }
.v2-home-caption::first-letter { text-transform: uppercase; }
.v2-home-title { margin: 0; font-family: var(--font-display); font-size: 22px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; overflow-wrap: anywhere; }
.v2-home-streak {
    display: inline-flex; align-items: center; gap: 6px; min-height: 28px; margin-top: 4px; padding: 0 12px;
    border-radius: 14px; background: #171717; color: #fff; font-size: 13px; font-weight: 800;
}
.v2-home-streak svg { color: #dff86b; }

/* Главная карточка дня */
.v2-home-hero { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: 28px; background: #171717; color: #fff; }
.v2-home-hero.is-light { background: var(--c-surface); color: var(--c-text); border: 2px solid var(--c-text); }
.v2-home-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #dff86b; }
.v2-home-hero.is-light .v2-home-eyebrow { color: var(--c-text-dim); }
.v2-home-eyebrow.is-ink { color: #171717; }
.v2-home-hero-title { font-family: var(--font-display); font-size: 26px; line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.v2-home-hero-meta { font-size: 14px; color: #d4d6d0; }
.v2-home-hero-text { font-size: 14px; line-height: 1.45; color: #d4d6d0; }
.v2-home-hero.is-light .v2-home-hero-text { color: var(--c-text-dim); }
.v2-home-hero .v2-home-btn { margin-top: 6px; }

/* Кнопки */
.v2-home-btn {
    display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; padding: 0 16px;
    border: 0; border-radius: 16px; font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; text-align: center;
}
.v2-home-btn.is-lime { min-height: 56px; border-radius: 20px; background: var(--c-accent); color: #12160a; font-size: 17px; }
.v2-home-btn.is-ghost { border: 1px solid var(--c-line-strong); background: var(--c-surface-2); color: var(--c-text); }
.v2-home-btn.is-dark { background: #171717; color: #fff; }
.v2-home-row .v2-home-btn, .v2-home-slot-row .v2-home-btn { width: auto; flex-shrink: 0; min-height: 44px; border-radius: 22px; padding: 0 16px; font-size: 14px; }

/* Карточки блоков */
.v2-home-card { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.v2-home-h2 { margin: 0; font-family: var(--font-display); font-size: 17px; font-weight: 800; }
.v2-home-text { font-size: 14px; line-height: 1.45; color: var(--c-text-dim); }
.v2-home-sub { font-size: 13px; line-height: 1.35; color: var(--c-text-dim); }
.v2-home-pill { padding: 5px 12px; border-radius: 12px; background: var(--c-accent); color: #12160a; font-size: 13px; font-weight: 800; white-space: nowrap; }
.v2-home-pill.is-soft { background: var(--c-surface-2); color: var(--c-text); padding: 5px 10px; }

/* Шкалы: дни и прогресс */
.v2-home-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.v2-home-days span { height: 8px; border-radius: 4px; background: var(--c-track); }
.v2-home-days span.is-on { background: #171717; }
html[data-ui-theme='dark'] .v2-home-days span.is-on { background: var(--c-accent); }
.v2-home-days.is-week span.is-today { background: var(--c-accent); border: 2px solid var(--c-text); box-sizing: border-box; }
.v2-home-days.is-week span.is-today.is-on { background: #171717; }
.v2-home-bar { height: 8px; border-radius: 4px; background: var(--c-track); }
.v2-home-bar span { display: block; height: 8px; border-radius: 4px; background: var(--c-flame); }

/* Неделя: кольцо и полоска */
.v2-home-week { flex-direction: row; align-items: center; gap: 16px; }
.v2-home-ring { flex-shrink: 0; }
.v2-home-week-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.v2-home-week-body .v2-home-days { margin-top: 8px; }

/* Задание дня */
.v2-home-quest { display: flex; align-items: center; gap: 12px; }
.v2-home-quest-body { flex: 1; min-width: 0; }
.v2-home-quest-title { font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.v2-home-check { flex-shrink: 0; width: 36px; height: 36px; box-sizing: border-box; border-radius: 12px; border: 2px solid var(--c-line-strong); display: flex; align-items: center; justify-content: center; }
.v2-home-check.is-done { background: var(--c-accent); border-color: transparent; color: #12160a; }

/* Две карточки «Спросить AI» и «Живой тренер» */
.v2-home-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.v2-home-mini {
    display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 44px; padding: 16px; text-align: left;
    font: inherit; color: var(--c-text); cursor: pointer;
}
.v2-home-mini-title { font-size: 16px; font-weight: 800; }
.v2-home-mini-icon { flex-shrink: 0; width: 40px; height: 40px; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.v2-home-mini-icon.is-dark { background: #171717; color: #dff86b; }
.v2-home-mini-icon.is-lime { background: var(--c-accent); color: #12160a; }
.v2-home-mini-icon.is-soft { width: 44px; height: 44px; background: var(--c-surface-2); color: var(--c-text); }

/* Строки: запись, выезд, лента */
.v2-home-row { flex-direction: row; align-items: center; gap: 12px; padding: 16px 18px; }
.v2-home-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.v2-home-row-title { font-size: 16px; font-weight: 800; overflow-wrap: anywhere; }
.v2-home-slot-row { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; border-radius: 16px; background: var(--c-surface-2); }
.v2-home-link { width: 100%; text-align: left; font: inherit; color: var(--c-text); cursor: pointer; border: 1px solid var(--c-line); }
.v2-home-feed { width: 100%; min-height: 44px; text-align: left; font: inherit; color: var(--c-text); cursor: pointer; gap: 4px; padding: 14px 18px; }
.v2-home-feed-text { font-size: 14px; line-height: 1.35; }

/* Продающий блок (единственный) */
.v2-home-sell { display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: 24px; background: var(--c-accent); color: #12160a; }
.v2-home-sell-title { font-family: var(--font-display); font-size: 20px; line-height: 1.2; font-weight: 800; }
.v2-home-sell-text { font-size: 14px; line-height: 1.4; }
.v2-home-sell .v2-home-btn { margin-top: 4px; }

/* Мягкая плашка возвращения */
.v2-home-note { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 24px; background: #171717; color: #fff; }
.v2-home-note-text { font-size: 13px; line-height: 1.35; color: #d4d6d0; }

.v2-home-slot { min-width: 0; }

@media (max-width: 360px) {
    .v2-home-two { grid-template-columns: 1fr; }
    .v2-home-hero-title { font-size: 23px; }
}

/* Бонус дня: строка в карточке задания и карточка возвращения */
.v2-home-bonus-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 4px; }
.v2-home-bonus-text { flex: 1; min-width: 0; font-size: 13px; line-height: 1.35; color: var(--c-text-dim); overflow-wrap: anywhere; }
.v2-home-pill.is-dark { background: #171717; color: #dff86b; }
.v2-home-bonus .v2-row-between { gap: 8px; }

/* Видео на главной: ряд вертикальных роликов и кнопка «Выложить пролаз» */
.v2-home-videos { display: flex; flex-direction: column; gap: 10px; }
.v2-vrail-all { min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--c-text-dim); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.v2-vrail { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x proximity; scrollbar-width: none; }
.v2-vrail::-webkit-scrollbar { display: none; }
.v2-vrail-card { position: relative; flex: 0 0 120px; aspect-ratio: 9 / 16; overflow: hidden; border: 0; border-radius: 18px; padding: 0; background: linear-gradient(160deg, #2b3340, #12151a); color: #f5f7fa; cursor: pointer; scroll-snap-align: start; }
.v2-vrail-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.v2-vrail-play { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(10, 11, 13, 0.55); transform: translate(-50%, -50%); }
.v2-vrail-play svg { width: 18px; height: 18px; }
.v2-vrail-name { position: absolute; right: 8px; bottom: 8px; left: 8px; overflow: hidden; font-size: 12px; font-weight: 700; text-align: left; text-overflow: ellipsis; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7); white-space: nowrap; }
.v2-vrail-empty { padding: 18px; border-radius: 18px; background: var(--c-surface-2, rgba(128, 128, 128, 0.12)); font-size: 14px; line-height: 1.4; color: var(--c-text-dim); }
.v2-home-videos .v2-row-between { align-items: center; }

/* Витрина путешествий: горизонтальная лента фото-карточек (макет: вариант A) */
.v2-travels { display: flex; flex-direction: column; gap: 6px; }
.v2-travels .v2-row-between { align-items: center; }
.v2-travels-all { display: inline-flex; flex: none; align-items: center; min-height: 44px; white-space: nowrap; font-size: 14px; font-weight: 600; color: var(--c-accent-text, var(--c-text)); text-decoration: none; }
.v2-travels-rail {
    display: flex; gap: 12px; margin: 0 -16px; padding: 2px 16px 4px;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px;
    overscroll-behavior-x: contain; scrollbar-width: none;
}
.v2-travels-rail::-webkit-scrollbar { display: none; }
.v2-travel { position: relative; flex: none; width: min(250px, 72vw); border-radius: 24px; overflow: hidden; background: var(--c-surface, #fff); color: var(--c-text, #171717); scroll-snap-align: start; }
.v2-travel-link { display: block; color: inherit; text-decoration: none; }
.v2-travel-media { position: relative; display: block; height: 150px; overflow: hidden; background: #2a2a2a; }
.v2-travel-photo, .v2-travel-ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.v2-travel-date { position: absolute; left: 14px; top: 14px; max-width: calc(100% - 76px); padding: 5px 10px; border-radius: 12px; background: #dff86b; color: #171717; font-size: 12px; font-weight: 800; line-height: 1.25; }
.v2-travel-panel { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px 16px; }
.v2-travel-place { font-size: 12px; font-weight: 700; color: var(--c-text-dim, #5b6068); }
.v2-travel-title { font-family: var(--v2-heading, inherit); font-weight: 800; font-size: 17px; line-height: 1.2; overflow-wrap: anywhere; }
.v2-travel-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; margin-top: 8px; }
.v2-travel-level { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; font-weight: 700; }
.v2-travel-level-word { overflow-wrap: break-word; } /* anywhere рвал «Средн|ий» на 320px, хотя цена могла уйти на следующую строку */
.v2-travel-dots { display: flex; gap: 3px; flex: none; }
.v2-travel-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--c-line-strong, #cfd0cb); }
.v2-travel-dots i.is-on { background: var(--c-text, #171717); }
.v2-travel-price { font-family: var(--v2-heading, inherit); font-weight: 800; font-size: 15px; white-space: nowrap; }
.v2-travel-seats { margin-top: 6px; font-size: 13px; color: var(--c-text-dim, #5b6068); }
.v2-travel-fav { position: absolute; right: 6px; top: 6px; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.92); color: #171717; cursor: pointer; }
.v2-travel-fav.is-on { background: #dff86b; }
.v2-travel-fav.is-on svg { fill: currentColor; }
.v2-travel-fav[disabled] { opacity: 0.6; cursor: progress; }
.v2-travel-link:focus-visible, .v2-travel-fav:focus-visible, .v2-travels-all:focus-visible { outline: 3px solid var(--c-text, #171717); outline-offset: 2px; }

/* Строка «Сообщать о новых выездах» под лентой путешествий */
.v2-travels-alert { display: flex; align-items: center; gap: 12px; min-height: 56px; margin-top: 8px; padding: 6px 8px 6px 16px; box-sizing: border-box; border: 1px solid var(--c-line, rgba(20, 23, 28, 0.09)); border-radius: 24px; background: var(--c-surface, #fff); color: var(--c-text); font-size: 14px; font-weight: 600; text-decoration: none; }
.v2-travels-alert-icon { display: flex; flex: none; color: var(--c-accent-text, var(--c-text)); }
.v2-travels-alert-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.v2-travels-alert-chevron { padding-right: 8px; color: var(--c-text-dim, #5b636d); }
.v2-travels-alert-main { flex: 1; min-height: 44px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.v2-travels-alert-off { flex: none; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--c-surface-2, #f2f4f1); color: var(--c-text); font: inherit; font-size: 13px; cursor: pointer; }
.v2-travels-alert button[disabled] { opacity: 0.6; cursor: progress; }
.v2-travels-alert:focus-visible, .v2-travels-alert button:focus-visible { outline: 3px solid var(--c-primary, #d8fb50); outline-offset: -3px; }

/* Блок «Путешествия» без ближайших выездов */
.v2-travels-empty { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 24px; background: #12160a; color: #fff; }
.v2-travels-empty-icon { display: flex; align-items: center; justify-content: center; flex: none; width: 48px; height: 48px; border-radius: 50%; background: #d8fb50; color: #12160a; }
.v2-travels-empty-body { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: #c9d1c0; }
.v2-travels-empty-body b { font-family: var(--v2-heading, inherit); font-size: 16px; font-weight: 800; color: #fff; }
