* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --bg: #050505;
    --surface: #0f0f0f;
    --surface-2: #1a1a1a;
    --border: #2a2a2a;
    --primary: #ffffff;
    --accent: #777777;
    --accent-2: #444444;
    --success: #4ade80;
    --danger: #f87171;
    --warn: #fbbf24;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--primary);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ========== ЭКРАНЫ ========== */
.screen {
    display: none;
    width: 100%;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px 20px 100px;
    background: var(--bg);
}

.screen.active {
    display: flex;
    flex-direction: column;
}

/* ========== ВХОД ========== */
#login-screen {
    justify-content: center;
    align-items: center;
    padding-bottom: 24px;
}

.orbits-container {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.orbit {
    position: absolute;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50%;
    animation: rotate linear infinite;
}

.orbit-1 {
    width: 220px;
    height: 220px;
    animation-duration: 18s;
}

.orbit-2 {
    width: 300px;
    height: 180px;
    animation-duration: 24s;
    animation-direction: reverse;
}

.orbit-3 {
    width: 340px;
    height: 340px;
    animation-duration: 32s;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.login-content {
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.logo {
    font-size: 38px;
    font-weight: 250;
    letter-spacing: 3px;
    color: var(--primary);
}

.tagline {
    font-size: 13px;
    color: var(--accent);
    margin-bottom: 32px;
    letter-spacing: 0.5px;
}

/* ========== ЛОГО НА ГЛАВНОМ ========== */
.logo-img {
    height: 110px;
    width: auto;
    object-fit: contain;
}

/* ========== КНОПКИ ========== */
.btn-primary {
    width: 240px;
    padding: 16px;
    background: var(--primary);
    color: var(--bg);
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, opacity 0.2s;
}

.btn-primary:active {
    transform: scale(0.97);
}

.btn-secondary {
    width: 240px;
    padding: 14px;
    background: transparent;
    color: var(--primary);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 30px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: rgba(255,255,255,0.6);
}

.btn-add {
    width: 32px;
    height: 32px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--primary);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.btn-add:hover {
    background: var(--border);
}

.btn-back, .btn-finish {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 8px 16px;
    color: var(--primary);
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-back:hover, .btn-finish:hover {
    background: var(--surface-2);
}

/* ========== НАСТРОЙКА ========== */
.setup-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
    max-width: 400px;
    width: 100%;
    align-self: center;
}

.setup-title {
    font-size: 28px;
    font-weight: 300;
    margin-bottom: 4px;
}

.setup-subtitle {
    color: var(--accent);
    font-size: 15px;
    margin-bottom: 8px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 13px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-group input,
.input-group textarea,
.input-group select {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
    color: var(--primary);
    font-size: 16px;
    outline: none;
    font-family: inherit;
    resize: none;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
    border-color: rgba(255,255,255,0.4);
}

/* ========== ГЛАВНЫЙ ========== */
#home-screen {
    padding-top: 20px;
}

.home-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.logo-small {
    font-size: 22px;
    font-weight: 300;
    font-style: italic;
    letter-spacing: 1px;
}

.today-stats {
    text-align: right;
}

.today-label {
    font-size: 11px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.today-time {
    font-size: 20px;
    font-weight: 600;
    margin-top: 2px;
}

.today-goal {
    font-size: 12px;
    color: var(--accent);
}

.greeting {
    font-size: 28px;
    font-weight: 300;
    line-height: 1.25;
    margin-bottom: 28px;
}

/* Карточки */
.practice-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 16px;
}

.practice-title {
    font-size: 18px;
    margin-bottom: 18px;
    font-weight: 400;
}

.btn-continue {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 30px;
    padding: 12px 28px;
    color: var(--primary);
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-continue:hover {
    border-color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.03);
}

.play-icon {
    font-size: 11px;
}

/* Статистика */
.stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 11px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 36px;
    font-weight: 600;
    line-height: 1;
}

.stat-unit {
    font-size: 11px;
    color: var(--accent);
    margin-top: 4px;
    margin-bottom: 14px;
}

.week-chart {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    height: 44px;
    margin-bottom: 8px;
}

.bar {
    flex: 1;
    background: linear-gradient(to top, var(--accent-2), var(--accent));
    border-radius: 3px;
    min-height: 4px;
    transition: height 0.5s ease;
}

.week-days {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: var(--accent);
}

/* Цель */
.goal-type {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 4px;
}

.goal-date {
    font-size: 12px;
    color: var(--accent);
    margin-bottom: 18px;
}

.progress-dots {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.25);
    transition: all 0.3s;
}

.dot.filled {
    background: var(--primary);
    border-color: var(--primary);
}

.goal-remaining {
    font-size: 11px;
    color: var(--accent);
    margin-top: auto;
}

/* Произведения */
.works-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 18px;
    margin-bottom: 16px;
}

.works-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.works-title {
    font-size: 14px;
    font-weight: 500;
}

.work-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
}

.work-item:last-child {
    border-bottom: none;
}

.work-item.empty {
    color: var(--accent);
    cursor: default;
    justify-content: center;
    padding: 20px 0;
    font-size: 13px;
}

.work-item.selected {
    background: rgba(255,255,255,0.04);
    margin: 0 -12px;
    padding: 10px 12px;
    border-radius: 12px;
    border-bottom: none;
}

.work-arrow {
    color: var(--accent);
    font-size: 13px;
    width: 16px;
    text-align: center;
}

.work-info {
    flex: 1;
}

.work-name {
    font-size: 14px;
    font-weight: 500;
}

.work-composer {
    font-size: 12px;
    color: var(--accent);
    margin-top: 1px;
}

.work-time {
    font-size: 12px;
    color: var(--accent);
    white-space: nowrap;
}

/* ========== ЭКРАН ЗАНЯТИЯ ========== */
#timer-screen {
    justify-content: flex-start;
    align-items: center;
    padding-top: 20px;
}

.timer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 16px;
}

/* Селектор произведения */
.piece-selector {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 14px;
}

.piece-selector label {
    color: var(--accent);
    white-space: nowrap;
}

.piece-selector select {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 14px;
    color: var(--primary);
    font-size: 14px;
    outline: none;
}

/* Табы внутри занятия */
.session-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    justify-content: center;
    width: 100%;
}

.session-tab {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 8px 18px;
    color: var(--accent);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.session-tab.active {
    background: var(--surface);
    color: var(--primary);
    border-color: rgba(255,255,255,0.3);
}

.session-panel {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    flex: 1;
    gap: 0;
}

.session-panel.active {
    display: flex;
}

/* Таймер — оставляем центрирование только для него */
#session-timer {
    align-items: center;
}

/* Таймер */
.timer-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    margin-top: 10px;
}

.timer-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.timer-pulse {
    width: 24px;
    height: 24px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.6; }
}

.timer-value {
    font-size: 64px;
    font-weight: 200;
    font-variant-numeric: tabular-nums;
    letter-spacing: 2px;
}

.timer-controls {
    margin-top: 16px;
}

.btn-timer {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 14px 48px;
    color: var(--primary);
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-timer:hover {
    background: var(--border);
}

/* Запись и плеер */
.recorder-box {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.btn-rec {
    background: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
    border-radius: 30px;
    padding: 10px 28px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-rec:hover {
    background: rgba(248,113,113,0.1);
}

.btn-rec.active {
    background: var(--danger);
    color: var(--bg);
    animation: rec-pulse 1.5s infinite;
}

@keyframes rec-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.rec-status {
    font-size: 12px;
    color: var(--accent);
    height: 18px;
}

.audio-player {
    width: 100%;
    max-width: 320px;
}

.audio-player audio {
    width: 100%;
    height: 40px;
    border-radius: 20px;
}

/* Метроном в занятии */
#session-metro .metro-display {
    margin-top: 10px;
}

#session-metro .metro-bpm {
    font-size: 64px;
}

/* Тюнер в занятии */
#session-tuner .tuner-display {
    margin-top: 10px;
    padding: 24px;
}

#session-tuner {
    align-items: center;
    padding-top: 16px;
}

/* ========== ОЦЕНКА ========== */
#review-screen {
    justify-content: flex-start;
    padding-top: 60px;
}

.review-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    width: 100%;
    max-width: 400px;
    align-self: center;
}

.review-time {
    font-size: 52px;
    font-weight: 200;
    font-variant-numeric: tabular-nums;
}

.review-piece {
    font-size: 16px;
    color: var(--accent);
    margin-top: -16px;
}

.rating-group {
    width: 100%;
    text-align: center;
}

.rating-group label {
    display: block;
    font-size: 13px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.rating-stars {
    display: flex;
    justify-content: center;
    gap: 12px;
    font-size: 32px;
    cursor: pointer;
}

.rating-stars span {
    color: var(--accent-2);
    transition: color 0.2s, transform 0.15s;
}

.rating-stars span:hover,
.rating-stars span.active {
    color: var(--warn);
    transform: scale(1.1);
}

/* ========== СООБЩЕСТВО ========== */
.community-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    justify-content: center;
}

.comm-tab {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 10px 24px;
    color: var(--accent);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.comm-tab.active {
    background: var(--surface);
    color: var(--primary);
    border-color: rgba(255,255,255,0.3);
}

.comm-panel {
    display: none;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 20px;
}

.comm-panel.active {
    display: flex;
}

/* Лента */
.feed-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 18px;
}

.feed-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.feed-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    flex-shrink: 0;
}

.feed-meta {
    flex: 1;
}

.feed-name {
    font-size: 15px;
    font-weight: 500;
}

.feed-time {
    font-size: 12px;
    color: var(--accent);
    margin-top: 2px;
}

.feed-stats {
    display: flex;
    gap: 14px;
    margin-bottom: 10px;
}

.feed-stat {
    font-size: 13px;
    color: var(--accent);
}

.feed-works {
    margin-bottom: 10px;
}

.feed-work {
    font-size: 13px;
    color: var(--primary);
    margin-bottom: 4px;
}

.feed-note {
    font-size: 14px;
    color: var(--accent);
    font-style: italic;
    line-height: 1.4;
    margin-bottom: 10px;
    padding-left: 12px;
    border-left: 2px solid var(--border);
}

.feed-ratings {
    display: flex;
    gap: 14px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--accent);
}

.feed-actions {
    display: flex;
    gap: 16px;
}

.feed-actions button {
    background: transparent;
    border: none;
    color: var(--accent);
    font-size: 14px;
    cursor: pointer;
    transition: color 0.2s;
    padding: 4px 0;
}

.feed-actions button:hover {
    color: var(--primary);
}

.feed-actions button.liked {
    color: var(--success);
}

/* Рейтинг */
.rating-title {
    text-align: center;
    font-size: 20px;
    font-weight: 300;
    margin-bottom: 16px;
    margin-top: 10px;
}

.rating-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rating-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px 16px;
}

.rating-item.top {
    border-color: rgba(255,255,255,0.15);
}

.rating-item.you {
    background: rgba(255,255,255,0.03);
    border-style: dashed;
}

.rating-place {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.rating-item.top .rating-place {
    background: var(--primary);
    color: var(--bg);
}

.rating-info {
    flex: 1;
}

.rating-name {
    font-size: 15px;
    font-weight: 500;
}

.rating-detail {
    font-size: 12px;
    color: var(--accent);
    margin-top: 2px;
}

.rating-time {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.rating-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
}

/* ========== МЕТРОНОМ (общие) ========== */
.metro-display {
    text-align: center;
    margin-top: 20px;
}

.metro-bpm {
    font-size: 80px;
    font-weight: 200;
    line-height: 1;
}

.metro-label {
    font-size: 14px;
    color: var(--accent);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.metro-visual {
    width: 200px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.metro-pendulum {
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.3;
    transition: opacity 0.05s;
}

.metro-pendulum.beat {
    opacity: 1;
    transform: scale(1.3);
}

.metro-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 320px;
    padding: 0 20px;
    margin-top: 10px;
}

.metro-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--primary);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.metro-btn:hover {
    background: var(--surface-2);
}

.metro-controls input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    outline: none;
}

.metro-controls input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
}

.metro-toggle {
    width: 200px;
    margin-top: 10px;
}

.metro-tap {
    text-align: center;
    margin-top: 16px;
}

.tap-hint {
    font-size: 12px;
    color: var(--accent);
    margin-top: 8px;
    height: 18px;
}

/* ========== ТЮНЕР (общие) ========== */
.tuner-display {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 32px;
    width: 100%;
    max-width: 340px;
    text-align: center;
    margin-top: 10px;
}

.tuner-note {
    font-size: 64px;
    font-weight: 300;
    line-height: 1;
}

.tuner-freq {
    font-size: 16px;
    color: var(--accent);
    margin-top: 8px;
}

.tuner-meter {
    width: 100%;
    height: 6px;
    background: var(--surface-2);
    border-radius: 3px;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

.tuner-bar {
    width: 4px;
    height: 100%;
    background: var(--success);
    border-radius: 2px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    transition: left 0.1s, background 0.2s;
}

.tuner-center {
    position: absolute;
    left: 50%;
    top: 0;
    width: 2px;
    height: 100%;
    background: rgba(255,255,255,0.3);
    transform: translateX(-50%);
}

.tuner-cents {
    font-size: 14px;
    color: var(--accent);
}

.tuner-strings {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 16px;
}

.tuner-string {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.tuner-string:hover {
    background: var(--surface-2);
    border-color: rgba(255,255,255,0.3);
}

.tuner-tuning {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--accent);
    margin-top: 16px;
}

.tuner-tuning select {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 12px;
    color: var(--primary);
    font-size: 14px;
    outline: none;
}

/* ========== ПРОФИЛЬ ========== */
.profile-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 30px;
    gap: 14px;
}

.profile-avatar {
    margin-bottom: 10px;
}

.avatar-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 300;
    font-style: italic;
}

.profile-name {
    font-size: 28px;
    font-weight: 300;
}

.profile-goal,
.profile-goal-name {
    font-size: 15px;
    color: var(--accent);
}

.profile-goal span,
.profile-goal-name span {
    color: var(--primary);
}

/* ========== ЗАГОЛОВКИ ЭКРАНОВ ========== */
.screen-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 0;
    margin-bottom: 16px;
    position: relative;
}

.screen-header h3 {
    font-size: 18px;
    font-weight: 400;
}

.screen-header .btn-back {
    position: absolute;
    left: 0;
}

/* ========== ИНДИКАТОР СЕССИИ ========== */
.session-indicator {
    position: fixed;
    top: 12px;
    right: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    z-index: 1000;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s;
}

.session-indicator:active {
    opacity: 0.8;
}

.session-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
    flex-shrink: 0;
}

/* Кнопка отмены занятия */
.btn-cancel-session {
    background: transparent;
    border: none;
    color: var(--accent);
    font-size: 13px;
    cursor: pointer;
    margin-top: 16px;
    padding: 8px 16px;
    transition: color 0.2s;
}

.btn-cancel-session:hover {
    color: var(--danger);
}

/* ========== НИЖНЕЕ МЕНЮ ========== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    background: rgba(5,5,5,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    padding: 10px 0 28px;
    z-index: 100;
}

.nav-item {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 11px;
    cursor: pointer;
    padding: 6px 10px;
    transition: color 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.nav-item.active {
    color: var(--primary);
}

/* Скроллбар */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

/* ========== АВАТАР ========== */
.avatar-upload {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.avatar-circle-img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.home-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    flex-shrink: 0;
}

.greeting-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.greeting-row .greeting {
    margin-bottom: 0;
}

.home-header-left {
    display: flex;
    align-items: center;
}

/* input file styling */
input[type="file"] {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px 14px;
    color: var(--primary);
    font-size: 14px;
    width: 100%;
}

/* ========== РЕДАКТИРОВАНИЕ ПРОФИЛЯ ========== */
.profile-edit-form {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.profile-edit-form .input-group {
    gap: 6px;
}

.profile-edit-form .input-group label {
    font-size: 12px;
}

.profile-edit-form .input-group input {
    padding: 12px 14px;
    font-size: 15px;
}

/* ========== ДЕТАЛИ ПРОИЗВЕДЕНИЯ ========== */
.piece-detail-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 10px;
}

.pd-composer {
    font-size: 16px;
    color: var(--accent);
    margin-top: -8px;
}

.pd-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.pd-stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
}

.pd-stat-value {
    font-size: 28px;
    font-weight: 600;
    line-height: 1;
}

.pd-stat-label {
    font-size: 12px;
    color: var(--accent);
    margin-top: 6px;
}

.pd-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
}

.pd-section label {
    display: block;
    font-size: 12px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.pd-section textarea {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    color: var(--primary);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

.pd-sessions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pd-session-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.pd-session-item:last-child {
    border-bottom: none;
}

.pd-session-date {
    color: var(--accent);
    font-size: 12px;
}

.pd-session-time {
    font-weight: 500;
}

.pd-empty {
    color: var(--accent);
    font-size: 13px;
    text-align: center;
    padding: 16px 0;
}

/* ========== ЗАМЕТКИ В ТАЙМЕРЕ ========== */
.piece-notes-box {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 16px;
    margin-bottom: 12px;
}

.piece-notes-label {
    font-size: 11px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.piece-notes-text {
    font-size: 13px;
    line-height: 1.5;
    color: var(--primary);
    max-height: 80px;
    overflow-y: auto;
}

.piece-notes-text:empty::before {
    content: "Нет заметок";
    color: var(--accent);
    font-style: italic;
}


/* ========== ЦЕНТРИРОВАННОЕ ЛОГО ========== */
.logo-center {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
    margin-top: 8px;
}

.logo-img-big {
    height: 160px;
    width: auto;
    object-fit: contain;
}

/* ========== ТОСТ-УВЕДОМЛЕНИЕ ========== */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px 28px;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
    z-index: 3000;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 1;
    pointer-events: none;
    white-space: nowrap;
}

.toast.hidden {
    transform: translateX(-50%) translateY(-80px);
    opacity: 0;
}


/* ========== ПРИВЕТСТВИЕ + КРУГ ========== */
.greeting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    gap: 16px;
}

.greeting-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
}

.greeting {
    font-size: 28px;
    font-weight: 300;
    line-height: 1.25;
    margin-bottom: 0;
}

.today-circle-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.today-circle {
    position: relative;
    width: 72px;
    height: 72px;
}

.circle-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.circle-svg circle {
    fill: none;
    stroke-width: 6;
    stroke-linecap: round;
}

.circle-bg {
    stroke: var(--border);
    stroke-dasharray: 6 4;
}

.circle-progress {
    stroke: var(--primary);
    transition: stroke-dashoffset 0.6s ease;
}

.circle-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
}

.today-label-below {
    font-size: 11px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========== РАЗВОРАЧИВАЕМЫЕ ЗАМЕТКИ СЕССИЙ ========== */
.pd-session-note {
    font-size: 13px;
    color: var(--accent);
    line-height: 1.5;
    margin-top: 8px;
    padding: 10px 12px;
    background: var(--bg);
    border-radius: 10px;
}

.pd-session-note.collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pd-session-note-toggle {
    font-size: 12px;
    color: var(--accent-2);
    margin-top: 6px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
}

.pd-session-note-toggle:hover {
    color: var(--primary);
}


/* ========== ДЕЙСТВИЯ С ПРОИЗВЕДЕНИЕМ ========== */
.pd-actions-row {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.pd-actions-row .btn-secondary {
    flex: 1;
    width: auto;
    padding: 12px;
    font-size: 13px;
}

.btn-danger {
    border-color: rgba(248,113,113,0.4);
    color: var(--danger);
}

.btn-danger:hover {
    border-color: var(--danger);
    background: rgba(248,113,113,0.08);
}

.pd-edit-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.pd-edit-actions button {
    flex: 1;
    width: auto;
    padding: 12px;
    font-size: 14px;
}

/* Auth form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 320px;
    margin: 20px auto;
}
.auth-form input {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
    color: var(--primary);
    font-size: 15px;
    width: 100%;
}
.auth-form input:focus {
    border-color: var(--accent-2);
    outline: none;
}
.btn-link {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 13px;
    margin-top: 12px;
    cursor: pointer;
}
.btn-link:hover {
    color: var(--primary);
}
.auth-error {
    color: var(--danger);
    font-size: 13px;
    margin-top: 10px;
    min-height: 18px;
}

.feed-loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--accent);
    font-size: 14px;
}

.feed-loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--accent);
    font-size: 14px;
}

/* ========== НОВЫЕ СТИЛИ РЕАКЦИЙ ========== */

.feed-reactions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.reaction-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.reaction-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.reaction-btn.active-fire {
    background: rgba(255, 87, 34, 0.25);
    border-color: #ff5722;
    color: #ff5722;
}

.reaction-btn.active-like {
    background: rgba(76, 175, 80, 0.25);
    border-color: #4caf50;
    color: #4caf50;
}

.reaction-btn.active-trophy {
    background: rgba(255, 193, 7, 0.25);
    border-color: #ffc107;
    color: #ffc107;
}

.reaction-count {
    font-size: 12px;
    font-weight: 600;
    min-width: 16px;
    text-align: center;
}

@media (max-width: 480px) {
    .feed-reactions {
        gap: 6px;
    }

    .reaction-btn {
        padding: 5px 10px;
        font-size: 13px;
    }
}

/* ========== МОДАЛЬНОЕ ОКНО ЦЕЛЕЙ ========== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2000;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal-sheet {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 28px 28px 0 0;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    padding: 0 20px 40px;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    will-change: transform;
}

.modal-overlay.open .modal-sheet {
    transform: translateY(0);
}

.modal-handle {
    width: 36px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 14px auto 0;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 400;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--accent);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    color: var(--primary);
    border-color: rgba(255,255,255,0.3);
}

/* Список целей */
.goals-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.goal-item {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: border-color 0.2s;
}

.goal-item.active-goal {
    border-color: rgba(255,255,255,0.25);
}

.goal-item-left {
    flex: 1;
    min-width: 0;
}

.goal-item-name {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.goal-item-date {
    font-size: 12px;
    color: var(--accent);
    margin-bottom: 6px;
}

.goal-item-days {
    font-size: 12px;
    color: var(--accent);
}

.goal-item-days.soon {
    color: var(--warn);
}

.goal-item-days.passed {
    color: var(--accent-2);
    text-decoration: line-through;
}

.goal-item-notes {
    font-size: 13px;
    color: var(--accent);
    line-height: 1.4;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.goal-item-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.goal-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--accent);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.goal-action-btn:hover {
    background: var(--surface);
    color: var(--primary);
    border-color: rgba(255,255,255,0.3);
}

.goal-action-btn.delete:hover {
    border-color: var(--danger);
    color: var(--danger);
}

.goal-set-active-btn {
    font-size: 11px;
    color: var(--accent);
    background: transparent;
    border: 1px dashed var(--border);
    border-radius: 12px;
    padding: 4px 10px;
    cursor: pointer;
    margin-top: 6px;
    transition: all 0.2s;
    white-space: nowrap;
}

.goal-set-active-btn:hover {
    color: var(--primary);
    border-color: rgba(255,255,255,0.3);
}

.goal-badge-active {
    font-size: 10px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    padding: 2px 8px;
    color: var(--primary);
    margin-top: 4px;
    display: inline-block;
    letter-spacing: 0.3px;
}

.goals-empty {
    text-align: center;
    padding: 24px 0 8px;
    color: var(--accent);
    font-size: 14px;
}

/* Форма цели */
.goal-form {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.goal-form-title {
    font-size: 14px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    margin-bottom: 2px;
}

.goal-form .input-group {
    gap: 6px;
}

.goal-form .input-group label {
    font-size: 12px;
}

.goal-form .input-group input,
.goal-form .input-group textarea {
    padding: 12px 14px;
    font-size: 15px;
    border-radius: 12px;
}

.goal-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.goal-form-actions .btn-primary {
    padding: 13px;
    font-size: 15px;
    border-radius: 14px;
}

.goal-form-actions .btn-secondary {
    width: auto;
    padding: 13px 20px;
    font-size: 14px;
    border-radius: 14px;
}

/* ========== МЕТРОНОМ: РАЗМЕР И АКЦЕНТЫ ========== */
.metro-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.metro-controls input[type="range"] {
    flex: 1;
}

.metro-signature {
    margin-top: 4px;
}

.metro-signature-label,
.metro-beats-row > .metro-signature-label {
    font-size: 11px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.metro-signature-btns {
    display: flex;
    gap: 8px;
}

.metro-sig-btn {
    flex: 1;
    padding: 8px 0;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--accent);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.metro-sig-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
    font-weight: 600;
}

.metro-beats-row {
    margin-top: 14px;
}

.metro-beat-dots {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.metro-beat-dot {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 2px solid var(--border);
    color: var(--accent);
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}

.metro-beat-dot.accent {
    border-color: rgba(255,255,255,0.5);
    color: var(--primary);
}

.metro-beat-dot.active {
    background: var(--surface);
    transform: scale(1.15);
    border-color: var(--accent);
}

.metro-beat-dot.active.accent {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
    transform: scale(1.2);
}

/* Пульсация маятника при акценте */
.metro-pendulum.accent {
    background: var(--primary) !important;
}

/* ========== МЕТРОНОМ: размер такта и акценты ========== */
.metro-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}
.metro-controls input[type="range"] {
    flex: 1;
}
.metro-signature, .metro-beats-row {
    margin-top: 14px;
}
.metro-sig-label {
    font-size: 11px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.metro-sig-btns {
    display: flex;
    gap: 8px;
}
.metro-sig-btn {
    flex: 1;
    padding: 9px 0;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--accent);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.18s;
}
.metro-sig-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
    font-weight: 600;
}
.metro-beat-dots {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.metro-beat-dot {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 2px solid var(--border);
    color: var(--accent);
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}
.metro-beat-dot.accent {
    border-color: rgba(255,255,255,0.5);
    color: var(--primary);
}
.metro-beat-dot.active {
    transform: scale(1.15);
    background: var(--surface);
}
.metro-beat-dot.active.accent {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
    transform: scale(1.2);
}
.metro-pendulum.accent {
    background: var(--primary) !important;
}

/* ========== ТЮНЕР: выбор A4 ========== */
.tuner-reference {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.tuner-reference label {
    font-size: 13px;
    color: var(--accent);
    white-space: nowrap;
}
.tuner-reference select {
    flex: 1;
    padding: 10px 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--primary);
    font-size: 14px;
}

/* ================================================
   МЕТРОНОМ — новый дизайн (mn-*)
   ================================================ */

#session-metro {
    flex-direction: column;
    gap: 20px;
    padding: 4px 0 24px;
}

#session-metro.active {
    display: flex;
}

/* --- Верхняя строка: BPM + Размер такта --- */
.mn-top-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.mn-bpm-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex: 1;
}

.mn-bpm-value {
    font-size: 64px;
    font-weight: 700;
    line-height: 1;
    color: var(--primary);
    text-align: center;
    letter-spacing: -2px;
}

.mn-bpm-label {
    font-size: 11px;
    color: var(--accent);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
}

.mn-tap-btn {
    margin-top: 8px;
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--accent);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.mn-tap-btn:active { background: var(--surface-2); color: var(--primary); }

.mn-sig-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 90px;
}

.mn-sig-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mn-sig-label {
    font-size: 10px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* mn-sig-select удалён, используются mn-sig-btn */

/* --- Кольцо (SVG) + кнопка Play --- */
.mn-circle-wrap {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mn-ring {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    transform: rotate(-90deg);
    overflow: visible;
}

.mn-ring-track {
    fill: none;
    stroke: var(--surface-2);
    stroke-width: 3;
}

/* Вспышка кольца */
.mn-ring-flash {
    fill: none;
    stroke: transparent;
    stroke-width: 5;
    stroke-dasharray: 630;
    stroke-dashoffset: 0;
    transition: stroke 0.05s;
}

.mn-ring-flash.mn-ring-beat {
    stroke: #ffffff;
    animation: mn-flash 0.25s ease-out forwards;
}

.mn-ring-flash.mn-ring-accent {
    stroke: #22c55e;
    animation: mn-flash 0.30s ease-out forwards;
}

@keyframes mn-flash {
    0%   { opacity: 1; stroke-width: 6; }
    100% { opacity: 0; stroke-width: 3; }
}

/* Кнопка Play / Pause */
.mn-play-btn {
    position: relative;
    z-index: 10;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 2.5px solid var(--border);
    color: var(--primary);
    font-size: 26px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
}
.mn-play-btn:active {
    background: var(--primary);
    color: var(--bg);
}

.mn-play-icon { display: flex; align-items: center; justify-content: center; }

/* --- Слайдер темпа --- */
.mn-tempo-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.mn-delta-btn {
    width: 38px;
    height: 34px;
    border-radius: 4px;
    background: transparent;
    border: none;
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.15s;
    flex-shrink: 0;
}
.mn-delta-btn:active { color: var(--primary); }

.mn-sig-btns {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mn-sig-btn {
    padding: 6px 10px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.mn-sig-btn.mn-sig-active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--bg);
}

.mn-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 3px;
    border-radius: 2px;
    background: var(--border);
    outline: none;
}
.mn-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
}
.mn-slider::-moz-range-thumb {
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    cursor: pointer;
}

/* --- Громкость --- */
.mn-volume-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mn-vol-icon { font-size: 17px; flex-shrink: 0; }
.mn-vol-value {
    font-size: 12px;
    color: var(--accent);
    min-width: 34px;
    text-align: right;
    flex-shrink: 0;
}

/* --- Акценты --- */
.mn-accents-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mn-block-label {
    font-size: 11px;
    color: var(--accent);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.mn-hint {
    font-size: 10px;
    opacity: 0.5;
    text-transform: none;
    font-weight: 400;
    letter-spacing: 0;
}

.mn-beat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.mn-beat-dot {
    aspect-ratio: 1;
    min-height: 52px;
    border-radius: 10px;
    background: var(--surface-2);
    border: 2px solid var(--border);
    color: var(--accent);
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    user-select: none;
}

/* Акцент — белая обводка */
.mn-beat-dot.mn-beat-accent {
    border-color: rgba(255,255,255,0.55);
    color: var(--primary);
}

/* Пульс при проигрывании — активный удар */
.mn-beat-dot.mn-beat-active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--bg);
    transform: scale(1.08);
}

/* Активный акцентный удар — зелёный */
.mn-beat-dot.mn-beat-accent.mn-beat-active {
    background: #22c55e;
    border-color: #22c55e;
    color: #000;
}

.mn-beat-dot:active { transform: scale(0.93); }

/* --- Марафон --- */
.mn-marathon-block {
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}

.mn-marathon-header {
    width: 100%;
    padding: 14px 16px;
    background: var(--surface-2);
    border: none;
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
}
.mn-marathon-header:active { background: var(--surface); }

.mn-chevron {
    font-size: 11px;
    transition: transform 0.3s;
    opacity: 0.6;
}

.mn-marathon-body {
    display: none;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    background: var(--surface);
    border-top: 1px solid var(--border);
}
.mn-marathon-body.mn-open { display: flex; }

.mn-marathon-params {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.mn-mparam {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: var(--surface-2);
    border-radius: 10px;
    padding: 12px 8px;
}

.mn-mparam-label {
    font-size: 10px;
    color: var(--accent);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.4px;
}

.mn-mparam-ctrl {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mn-mparam-ctrl button {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--primary);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.15s;
}
.mn-mparam-ctrl button:active { background: var(--primary); color: var(--bg); }

.mn-mparam-ctrl span {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    min-width: 36px;
    text-align: center;
}

.mn-mparam-unit {
    font-size: 10px;
    color: var(--accent);
}

.mn-marathon-status {
    font-size: 12px;
    color: var(--accent);
    text-align: center;
    min-height: 16px;
}

.mn-marathon-go {
    width: 100%;
    padding: 13px;
    font-size: 14px;
    font-weight: 700;
}
