/*
 * Программа 6c+ → 7b (раздел program-advanced): обзор, день, блок с видео, питание, самочувствие, оплата.
 * Все правила внутри .v2-adv / .v2-adv-*, цвета — токены ui-v2 (светлая и тёмная темы).
 */

.v2-adv .v2-stack {
    gap: 12px;
}

.v2-adv-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.v2-adv-title {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v2-adv-top-spacer {
    width: 44px;
}

.v2-adv-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: 1px solid var(--c-line);
    border-radius: 13px;
    background: var(--c-surface);
    color: var(--c-text);
    cursor: pointer;
}

.v2-adv-icon-btn.is-plain {
    border-color: transparent;
    background: transparent;
    color: var(--c-text-dim);
}

.v2-adv-muted {
    color: var(--c-text-dim);
    font-size: 13px;
}

.v2-adv-strong {
    font-size: 15px;
    font-weight: 600;
}

.v2-adv-strong.is-lg {
    font-size: 16px;
}

.v2-adv-h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 800;
    line-height: 1.15;
}

.v2-adv-h3 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
}

.v2-adv-h3.is-ok {
    color: #16a34a;
}

.v2-adv-lead {
    margin: 0;
    color: var(--c-text-dim);
    font-size: 14px;
    line-height: 1.5;
}

.v2-adv-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
}

.v2-adv-col {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    text-align: left;
}

.v2-adv-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.v2-adv-headrow {
    display: flex;
    align-items: center;
    gap: 16px;
}

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

.v2-adv-grid3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.v2-adv-bottom {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
}

.v2-adv-bottom .v2-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: none;
    width: 100%;
}

.v2-adv-hint {
    color: var(--c-text-dim);
    font-size: 13px;
    text-align: center;
}

/* Карточка в каталоге */
.v2-adv-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
}

.v2-adv-card::after {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: var(--c-accent-soft);
    pointer-events: none;
}

.v2-adv-card > * {
    position: relative;
    z-index: 1;
}

.v2-adv-card-top {
    align-items: center;
    /* на узком телефоне длинная плашка («Пробный период: день 3 из 7») уходит на следующую строку целиком */
    flex-wrap: wrap;
    row-gap: 8px;
}

.v2-adv-card-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
}

.v2-adv-grade {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 999px;
    background: var(--c-accent);
    color: var(--c-accent-ink);
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 800;
}

.v2-adv-pill {
    white-space: nowrap;
    padding: 5px 11px;
    border-radius: 999px;
    background: var(--c-surface-2);
    color: var(--c-text-dim);
    font-size: 12px;
    font-weight: 600;
}

.v2-adv-pill.is-info {
    background: rgba(44, 116, 201, 0.12);
    color: #2c74c9;
}

.v2-adv-pill.is-warn {
    background: rgba(180, 83, 9, 0.12);
    color: #b45309;
}

.v2-adv-pill.is-ok {
    background: rgba(22, 163, 74, 0.12);
    color: #15803d;
}

html[data-ui-theme='dark'] .v2-adv-pill.is-info {
    color: #7fb3ee;
}

html[data-ui-theme='dark'] .v2-adv-pill.is-warn {
    color: #f3a35b;
}

html[data-ui-theme='dark'] .v2-adv-pill.is-ok {
    color: #4ade80;
}

.v2-adv-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 16px;
    background: var(--c-surface-2);
}

.v2-adv-bar {
    height: 8px;
    border-radius: 999px;
    background: var(--c-track);
    overflow: hidden;
}

.v2-adv-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--c-accent);
}

.v2-adv-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.v2-adv-actions .v2-btn {
    min-height: 48px;
    font-size: 15px;
}

/* Анкета */
.v2-adv-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
}

.v2-adv-steps > div {
    height: 4px;
    border-radius: 999px;
    background: var(--c-track);
}

.v2-adv-steps > div.is-on {
    background: var(--c-accent);
}

.v2-adv-fieldset {
    margin: 0;
    padding: 0;
    border: 0;
}

.v2-adv-fieldset > legend {
    margin-bottom: 8px;
    padding: 0;
}

.v2-adv-seg {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.v2-adv-seg.is-grades {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
}

.v2-adv-seg.is-pills {
    display: flex;
    flex-wrap: wrap;
}

.v2-adv-choice {
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--c-line);
    border-radius: 12px;
    background: var(--c-surface);
    color: var(--c-text-dim);
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.v2-adv-seg.is-pills .v2-adv-choice {
    border-radius: 999px;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
}

.v2-adv-choice.is-on {
    border-color: var(--c-accent);
    background: var(--c-accent);
    color: var(--c-accent-ink);
}

.v2-adv-checks {
    padding: 4px 16px;
}

.v2-adv-check {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 50px;
    font-size: 14px;
    border-bottom: 1px solid var(--c-line);
    cursor: pointer;
}

.v2-adv-check:last-child {
    border-bottom: 0;
}

.v2-adv-check input,
.v2-adv-task input {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    accent-color: var(--c-accent-text);
}

.v2-adv-input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--c-line-strong);
    border-radius: 12px;
    background: var(--c-surface);
    color: var(--c-text);
    font: inherit;
}

.v2-adv-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.v2-adv-field.is-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 14px;
}

.v2-adv-input-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: 128px;
    flex-shrink: 0;
}

.v2-adv-list {
    margin: 0;
    padding-left: 20px;
    color: var(--c-text);
    font-size: 14px;
    line-height: 1.55;
}

/* Подсказки и предупреждения */
.v2-adv-note {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    background: var(--c-surface-2);
    font-size: 13px;
    line-height: 1.45;
}

.v2-adv-note > svg {
    flex-shrink: 0;
    margin-top: 1px;
}

.v2-adv-note.is-warn {
    background: rgba(180, 83, 9, 0.1);
    color: #7a3a05;
}

.v2-adv-note.is-danger {
    background: rgba(226, 74, 44, 0.1);
    color: #8a2412;
}

.v2-adv-note.is-info {
    background: rgba(44, 116, 201, 0.1);
    color: #1d4f8a;
}

.v2-adv-note.is-ok {
    background: rgba(22, 163, 74, 0.1);
    color: #14532d;
}

html[data-ui-theme='dark'] .v2-adv-note.is-warn {
    color: #f6c08a;
}

html[data-ui-theme='dark'] .v2-adv-note.is-danger {
    color: #ffb4a3;
}

html[data-ui-theme='dark'] .v2-adv-note.is-info {
    color: #a9cdf5;
}

html[data-ui-theme='dark'] .v2-adv-note.is-ok {
    color: #a7f3c0;
}

/* Кольцо прогресса */
.v2-adv-ring {
    position: relative;
    flex-shrink: 0;
}

.v2-adv-ring-track {
    stroke: var(--c-track);
}

.v2-adv-ring-value {
    stroke: var(--c-accent);
}

html[data-ui-theme='dark'] .v2-adv-ring-value {
    stroke: var(--c-accent-text);
}

.v2-adv-ring-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
}

/* Обзор */
.v2-adv-phases {
    display: grid;
    gap: 4px;
}

.v2-adv-phases > div {
    height: 6px;
    border-radius: 999px;
    background: var(--c-track);
}

.v2-adv-phases > div.is-on {
    background: var(--c-accent);
}

.v2-adv-phases.is-labels {
    color: var(--c-text-dim);
    font-size: 11px;
}

.v2-adv-phases.is-labels > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v2-adv-phases.is-labels > span.is-current {
    color: var(--c-accent-text);
    font-weight: 600;
}

.v2-adv-week {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.v2-adv-wd {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-height: 74px;
    padding: 8px 0;
    border: 1px solid var(--c-line);
    border-radius: 14px;
    background: var(--c-surface);
    color: var(--c-text);
    cursor: pointer;
}

.v2-adv-wd.is-rest {
    background: var(--c-surface-2);
    color: var(--c-text-dim);
}

.v2-adv-wd.is-done {
    color: var(--c-accent-text);
}

.v2-adv-wd.is-today {
    border-color: var(--c-accent);
    background: var(--c-accent);
    color: var(--c-accent-ink);
}

.v2-adv-wd.is-locked {
    opacity: 0.55;
}

.v2-adv-wd-name {
    font-size: 11px;
    font-weight: 500;
}

.v2-adv-wd-num {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
}

.v2-adv-wd-kind {
    font-size: 10px;
    font-weight: 600;
    text-align: center;
}

.v2-adv-today,
.v2-adv-tile {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    color: var(--c-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.v2-adv-tile {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 14px;
    border-radius: 16px;
}

.v2-adv-play {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: var(--c-accent);
    color: var(--c-accent-ink);
}

.v2-adv-kind {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--c-surface-2);
    color: var(--c-text-dim);
    font-size: 12px;
    font-weight: 600;
}

.v2-adv-kind.is-small {
    padding: 3px 9px;
    font-size: 11px;
}

.v2-adv-kind.is-boulder {
    background: rgba(217, 99, 26, 0.14);
    color: #b4470a;
}

.v2-adv-kind.is-lead {
    background: rgba(44, 116, 201, 0.12);
    color: #2c74c9;
}

html[data-ui-theme='dark'] .v2-adv-kind.is-boulder {
    color: #ff9f5e;
}

html[data-ui-theme='dark'] .v2-adv-kind.is-lead {
    color: #7fb3ee;
}

.v2-adv-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}

/* День */
.v2-adv-block {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px;
    border: 1px solid var(--c-line);
    border-radius: 16px;
    background: var(--c-surface);
    box-shadow: var(--shadow-card);
    color: var(--c-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.v2-adv-block.is-done {
    border-color: var(--c-accent);
}

.v2-adv-thumb {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 80px;
    height: 52px;
    border-radius: 11px;
    overflow: hidden;
    background: var(--c-surface-2);
}

.v2-adv-thumb.is-ready {
    background: linear-gradient(135deg, #1a2740, #28203a 60%, #0f2a24);
}

.v2-adv-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.v2-adv-thumb-play {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--c-accent);
    color: var(--c-accent-ink);
}

.v2-adv-thumb-len {
    position: absolute;
    right: 4px;
    bottom: 4px;
    padding: 1px 5px;
    border-radius: 5px;
    background: rgba(10, 11, 13, 0.85);
    color: #f5f7fa;
    font-size: 10px;
    font-weight: 600;
}

.v2-adv-thumb-soon {
    color: var(--c-text-dim);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
}

.v2-adv-count {
    flex-shrink: 0;
    color: var(--c-text-dim);
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
}

.v2-adv-done {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--c-accent);
    color: var(--c-accent-ink);
}

/* Блок и видео */
.v2-adv-video {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 18px;
    overflow: hidden;
    background: #0a0b0d;
}

.v2-adv-video iframe,
.v2-adv-video video {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.v2-adv-video.is-soon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    border: 1.5px dashed var(--c-line-strong);
    background: var(--c-surface-2);
    text-align: center;
}

.v2-adv-video-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--c-line);
    border-radius: 13px;
    background: var(--c-surface);
    color: var(--c-text-dim);
}

.v2-adv-video-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    border: 0;
    padding: 0;
    background: linear-gradient(135deg, #1a2740, #28203a 60%, #0f2a24);
    cursor: pointer;
}

.v2-adv-video-poster img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.v2-adv-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin: -26px 0 0 -26px;
    border-radius: 50%;
    background: #d8fb50;
    color: #12160a;
}

.v2-adv-video-len {
    position: absolute;
    left: 14px;
    bottom: 12px;
    color: #f5f7fa;
    font-size: 13px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.v2-adv-video-offline {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #14171c;
    color: #f5f7fa;
}

.v2-adv-btn-dark {
    flex: none;
    min-height: 44px;
    border-color: rgba(255, 255, 255, 0.12);
    background: #1b1f27;
    color: #f5f7fa;
    font-size: 14px;
}

.v2-adv-video-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.v2-adv-chapters {
    display: flex;
    flex: 1;
    gap: 6px;
    min-width: 0;
    overflow-x: auto;
}

.v2-adv-chapter {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--c-line);
    border-radius: 999px;
    background: var(--c-surface);
    color: var(--c-text);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.v2-adv-chapter.is-on {
    border-color: var(--c-accent);
    background: var(--c-accent);
    color: var(--c-accent-ink);
}

.v2-adv-tabs {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 4px;
    padding: 4px;
    border-radius: 14px;
    background: var(--c-surface-2);
}

.v2-adv-tab {
    min-height: 40px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--c-text-dim);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.v2-adv-tab.is-on {
    background: var(--c-surface);
    color: var(--c-text);
    box-shadow: var(--shadow-card);
}

.v2-adv-tabpanel {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.v2-adv-tasks {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.v2-adv-task {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--c-line);
    border-radius: 14px;
    background: var(--c-surface);
    font-size: 14px;
    line-height: 1.45;
    cursor: pointer;
}

.v2-adv-task.is-done {
    color: var(--c-text-dim);
}

.v2-adv-task-n {
    flex-shrink: 0;
    width: 18px;
    color: var(--c-text-dim);
    font-family: var(--font-display);
    font-weight: 700;
}

/* Питание */
.v2-adv-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--c-line);
    border-radius: 14px;
    background: var(--c-surface);
}

.v2-adv-meals {
    display: flex;
    flex-direction: column;
    padding: 4px 16px;
}

.v2-adv-meal {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 12px 0;
    border-bottom: 1px solid var(--c-line);
}

.v2-adv-meals .v2-adv-meal:has(> svg) {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.v2-adv-meal:last-child {
    border-bottom: 0;
}

.v2-adv-disclaimer {
    margin: 0;
    color: var(--c-text-dim);
    font-size: 12px;
    line-height: 1.5;
}

/* Оплата */
.v2-adv-hero {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.v2-adv-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
}

/* Шторка самочувствия */
.v2.v2-adv-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    max-width: none;
    margin: 0;
    padding: 0;
    border-radius: 0;
    background: rgba(10, 11, 13, 0.55);
}

.v2-adv-sheet {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 480px;
    max-height: 92vh;
    max-height: 92dvh; /* видимая высота: на телефоне 92vh уходит под панель браузера */
    overflow-y: auto;
    padding: 10px 20px calc(24px + env(safe-area-inset-bottom));
    border-radius: 24px 24px 0 0;
    background: var(--c-bg);
}

.v2-adv-grip {
    align-self: center;
    width: 40px;
    height: 4px;
    border-radius: 999px;
    background: var(--c-line-strong);
}

.v2-adv-rpe {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 4px;
}

.v2-adv-rpe-btn {
    min-height: 44px;
    padding: 0;
    border: 1px solid var(--c-line);
    border-radius: 10px;
    background: var(--c-surface);
    color: var(--c-text);
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.v2-adv-rpe-btn.is-on {
    border-color: var(--c-accent);
    background: var(--c-accent);
    color: var(--c-accent-ink);
}

.v2-adv-zone {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    padding: 0 4px 0 14px;
    border: 1px solid var(--c-line);
    border-radius: 14px;
    background: var(--c-surface);
    font-size: 14px;
}

.v2-adv-stepper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.v2-adv-stepper button {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 11px;
    background: var(--c-surface-2);
    color: var(--c-text);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 380px) {
    .v2-adv-seg.is-grades {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .v2-adv-rpe {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.v2-adv-details summary {
    min-height: 32px;
    padding-top: 6px;
    font-weight: 600;
    cursor: pointer;
}

.v2-adv-details .v2-adv-list,
.v2-adv-details .v2-adv-text {
    margin-top: 6px;
    color: inherit;
    font-size: 13px;
}

.v2-adv .v2-row-between > .v2-adv-kind {
    flex-shrink: 0;
    white-space: nowrap;
}

/* Возврат после перерыва */
.v2-adv-return { border: 2px solid var(--c-accent); }
.v2-adv-return .v2-adv-headrow { align-items: center; }
.v2-adv-return-icon {
    flex: none; width: 40px; height: 40px; border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    background: var(--c-accent); color: var(--c-accent-ink);
}
.v2-adv-return .v2-adv-actions { grid-template-columns: 1fr; }

/* Итоги недели */
.v2-adv-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.v2-adv-stats .v2-adv-stat { padding: 10px; background: var(--c-surface-2); border-color: transparent; }
.v2-adv-stats .v2-adv-stat b { font-family: var(--font-display); font-size: 17px; font-weight: 800; }
.v2-adv-summary.is-warn { border: 1px solid rgba(180, 83, 9, 0.35); }
.v2-adv-summary.is-ok { border: 1px solid rgba(22, 163, 74, 0.35); }

/* Тесты: выбор недели и прогресс */
.v2-adv-chip {
    min-width: 48px; min-height: 40px; padding: 0 12px; border-radius: 999px; cursor: pointer;
    border: 1px solid var(--c-line-strong); background: var(--c-surface); color: var(--c-text);
    font: inherit; font-size: 14px; font-weight: 600;
}
.v2-adv-chip.is-done { color: var(--c-accent-text); }
.v2-adv-chip.is-on { background: var(--c-text); border-color: var(--c-text); color: var(--c-surface); }
.v2-adv-chip:focus-visible { outline: 2px solid var(--c-accent-text); outline-offset: 2px; }
.v2-adv-progress { display: flex; flex-direction: column; padding: 6px 14px; }
.v2-adv-progress-row {
    display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: baseline;
    padding: 10px 0; border-top: 1px solid var(--c-line); font-size: 13px; line-height: 1.35;
}
.v2-adv-progress-row.is-head { border-top: 0; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c-text-dim); }
.v2-adv-progress-row small { font-size: 11px; color: var(--c-text-dim); }
.v2-adv-delta.is-up { color: #16a34a; font-weight: 700; }
.v2-adv-delta.is-down { color: #b45309; font-weight: 700; }
html[data-ui-theme='dark'] .v2-adv-delta.is-up { color: #4ade80; }
html[data-ui-theme='dark'] .v2-adv-delta.is-down { color: #fb923c; }

/* Журнал проектов */
.v2-adv-tile.is-wide { width: 100%; text-align: left; }
.v2-adv-note.is-link { width: 100%; border: 0; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.v2-adv-goal-steps { display: flex; gap: 8px; flex-wrap: wrap; }
.v2-adv-goal-step {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
    background: var(--c-surface-2); color: var(--c-text-dim); font-family: var(--font-display); font-weight: 800; font-size: 14px;
}
.v2-adv-goal-step.is-on { background: var(--c-accent); color: var(--c-accent-ink); }
.v2-adv-project.is-sent { border: 1px solid rgba(22, 163, 74, 0.35); }
.v2-adv-project.is-dropped { opacity: 0.75; }
.v2-adv-addproject > summary { cursor: pointer; font-weight: 700; min-height: 32px; display: flex; align-items: center; }
.v2-adv-addproject[open] > summary { margin-bottom: 10px; }
.v2-adv-toggle {
    min-height: 48px; border-radius: 14px; cursor: pointer; border: 2px dashed var(--c-line-strong);
    background: var(--c-surface); color: var(--c-text); font: inherit; font-size: 15px; font-weight: 700;
}
.v2-adv-toggle.is-on { border-style: solid; border-color: var(--c-accent); background: var(--c-accent); color: var(--c-accent-ink); }

/* Таймер висов и интервалов */
.v2-adv-timer-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px; text-align: left; }
.v2-adv-timer-btn small { font-size: 12px; font-weight: 600; color: var(--c-text-dim); font-family: var(--font-sans); }
.v2.v2-adv-timer {
    position: fixed; inset: 0; z-index: 1100; display: flex; flex-direction: column; gap: 18px;
    padding: calc(16px + env(safe-area-inset-top)) 20px calc(20px + env(safe-area-inset-bottom));
    background: var(--c-bg); color: var(--c-text);
}
.v2-adv-timer-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; }
.v2-adv-timer-phase { font-family: var(--font-display); font-size: 26px; font-weight: 800; }
.v2-adv-timer-clock { font-family: var(--font-display); font-size: clamp(88px, 28vw, 160px); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.v2-adv-timer-count { font-size: 16px; font-weight: 600; color: var(--c-text-dim); }
.v2-adv-timer-bar { height: 8px; border-radius: 999px; background: var(--c-track); overflow: hidden; }
.v2-adv-timer-bar > span { display: block; height: 100%; border-radius: 999px; background: var(--c-accent-text); transition: width 0.2s linear; }
.v2-adv-timer .v2-adv-actions .v2-btn { min-height: 60px; font-size: 17px; }
.v2.v2-adv-timer[data-phase='work'] { background: #d8fb50; color: #12160a; }
.v2.v2-adv-timer[data-phase='work'] .v2-adv-timer-count,
.v2.v2-adv-timer[data-phase='work'] .v2-adv-muted { color: rgba(18, 22, 10, 0.7); }
.v2.v2-adv-timer[data-phase='work'] .v2-adv-timer-bar { background: rgba(18, 22, 10, 0.15); }
.v2.v2-adv-timer[data-phase='work'] .v2-adv-timer-bar > span { background: #12160a; }
.v2.v2-adv-timer[data-phase='setRest'] .v2-adv-timer-phase { color: var(--c-accent-text); }
@media (prefers-reduced-motion: reduce) { .v2-adv-timer-bar > span { transition: none; } }
.v2-adv-task-wrap { display: flex; flex-direction: column; gap: 6px; }
.v2-adv-task-timer {
    align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; margin-left: 44px; padding: 0 12px;
    border: 1px solid var(--c-line-strong); border-radius: 999px; background: var(--c-surface); color: var(--c-text);
    font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}

/* Переход на программу для новичков */
.v2-adv-link {
    align-self: center; min-height: 44px; padding: 0 8px; border: 0; background: none; cursor: pointer;
    font: inherit; font-size: 14px; font-weight: 600; color: var(--c-text-dim); text-decoration: underline;
}

/* Перенос тренировки */
.v2-adv-swap-opt {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 60px; padding: 10px 14px;
    border: 1px solid var(--c-line-strong); border-radius: 16px; background: var(--c-surface); color: var(--c-text);
    font: inherit; text-align: left; cursor: pointer;
}
.v2-adv-swap-opt.is-off { cursor: default; opacity: 0.6; background: var(--c-surface-2); }
.v2-adv-swap-opt:not(.is-off):focus-visible { outline: 2px solid var(--c-accent-text); outline-offset: 2px; }

/* Питание: приём пищи с отметкой, цели приёма, счётчик воды, ограничения */
.v2-adv-meal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    cursor: pointer;
}

.v2-adv-meal-eat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.v2-adv-meal-eat input {
    width: 22px;
    height: 22px;
    accent-color: var(--c-accent-text);
}

.v2-adv-meal-goal {
    color: var(--c-accent-text);
    font-size: 12px;
    font-weight: 700;
}

.v2-adv-water {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.v2-adv-water-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.v2-adv-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.v2-adv-chip {
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--c-line-strong);
    border-radius: 22px;
    background: var(--c-surface);
    color: var(--c-text);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.v2-adv-chip.is-on {
    border-color: transparent;
    background: var(--c-accent);
    color: var(--c-accent-ink);
}

.v2-adv-notes {
    color: var(--c-text-dim);
    font-size: 12px;
}

/* Список покупок: длинный список прокручивается внутри шторки */
.v2-adv-sheet.v2-adv-shop {
    max-height: 88vh;
    overflow-y: auto;
}
