/*
 * PLANNER.CSS v2 - Trainingsplan User-Ansicht
 * Matches the Fokus Pro cyber aesthetic
 */

/* ===========================
   PLAN HEADER (Name + Description)
   =========================== */
.plan-header-block {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(59, 130, 246, 0.05) 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 18px;
    position: relative;
    overflow: hidden;
}

.plan-header-block::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--c-primary), var(--c-accent, #3b82f6));
    border-radius: 4px 0 0 4px;
}

.plan-header-name {
    font-family: var(--font-tech), 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--c-primary);
    letter-spacing: 0.08em;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.plan-header-desc {
    font-size: 0.8rem;
    color: var(--c-text-sec);
    line-height: 1.5;
    margin: 0;
}

/* ===========================
   WEEK NAVIGATION
   =========================== */
.planner-week-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.plan-nav-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--c-text-main);
    width: 38px;
    height: 38px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.plan-nav-btn:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--c-primary);
    color: var(--c-primary);
    transform: scale(1.05);
}

.plan-week-label {
    font-family: var(--font-tech), 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--c-text-sec);
    text-align: center;
    letter-spacing: 0.05em;
    flex: 1;
}

/* ===========================
   PLANNER GRID
   =========================== */
.planner-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ===========================
   DAY CARD
   =========================== */
.plan-day-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.25s ease;
}

.plan-day-card.plan-today {
    background: rgba(16, 185, 129, 0.06);
    border-color: rgba(16, 185, 129, 0.25);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.07);
}

.plan-day-card.plan-past {
    opacity: 0.5;
}

.plan-day-card.plan-rest {
    opacity: 0.35;
}

/* ===========================
   DAY CARD HEADER
   =========================== */
.plan-day-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.plan-day-name {
    font-family: var(--font-tech), 'JetBrains Mono', monospace;
    font-size: 1rem;
    font-weight: 800;
    color: var(--c-text-main);
    min-width: 28px;
}

.plan-today .plan-day-name {
    color: var(--c-primary);
}

.plan-day-date {
    font-family: var(--font-tech), 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    color: var(--c-text-sec);
}

.plan-today-badge {
    margin-left: auto;
    background: var(--c-primary);
    color: #000;
    font-family: var(--font-tech), 'JetBrains Mono', monospace;
    font-size: 0.5rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

.plan-day-total {
    font-family: var(--font-tech), 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--c-text-dim);
    opacity: 0.7;
}

/* Day Note from coach */
.plan-day-note {
    margin: 8px 16px 0;
    padding: 7px 10px;
    background: rgba(59, 130, 246, 0.07);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 7px;
    font-size: 0.72rem;
    color: rgba(148, 163, 184, 0.9);
    font-style: italic;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
}

.plan-day-note i {
    color: rgba(59, 130, 246, 0.6);
    margin-top: 1px;
    flex-shrink: 0;
}

/* ===========================
   EXERCISE ENTRIES
   =========================== */
.plan-exercises {
    padding: 8px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.plan-ex-entry {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 9px;
    padding: 10px 12px;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.plan-ex-entry:hover {
    background: rgba(255, 255, 255, 0.06);
}

.plan-ex-entry .ex-num {
    font-family: var(--font-tech), 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--c-text-dim);
    min-width: 20px;
    padding-top: 1px;
}

.plan-ex-body {
    flex: 1;
    min-width: 0;
}

.plan-ex-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--c-text-main);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.plan-ex-tags {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* Duration Pill */
.plan-ex-duration {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    font-family: var(--font-tech), 'JetBrains Mono', monospace;
    font-size: 0.58rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 5px;
}

.plan-ex-duration i {
    font-size: 0.55rem;
}

/* Category Pill */
.plan-ex-cat {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-tech), 'JetBrains Mono', monospace;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 5px;
    letter-spacing: 0.04em;
}

/* Exercise Comment */
.plan-ex-comment {
    margin-top: 5px;
    font-size: 0.7rem;
    color: var(--c-text-sec);
    font-style: italic;
    opacity: 0.8;
    display: flex;
    align-items: flex-start;
    gap: 5px;
    line-height: 1.4;
}

.plan-ex-comment i {
    font-size: 0.6rem;
    opacity: 0.6;
    margin-top: 1px;
    flex-shrink: 0;
}

/* ===========================
   REST DAY
   =========================== */
.plan-rest-label {
    padding: 12px 16px;
    font-family: var(--font-tech), 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: var(--c-text-dim);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.08em;
}

/* ===========================
   EMPTY & LOADING STATES
   =========================== */
.planner-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 50px 20px;
    color: var(--c-text-dim);
    gap: 14px;
}

.planner-empty i {
    font-size: 2.5rem;
    opacity: 0.4;
}

.planner-empty p {
    font-size: 0.85rem;
    color: var(--c-text-sec);
    margin: 0;
}

.planner-empty small {
    font-size: 0.7rem;
    color: var(--c-text-dim);
    opacity: 0.7;
}

.planner-loading {
    text-align: center;
    padding: 40px;
    font-size: 1.5rem;
    color: var(--c-primary);
}

.planner-error {
    text-align: center;
    padding: 30px;
    color: var(--c-danger);
    font-size: 0.8rem;
}

/* ===========================
   NAV DOCK - 6 COLUMN
   =========================== */
.nav-items.six-col {
    grid-template-columns: repeat(6, 1fr);
}

.nav-items.six-col .dock-btn .btn-label {
    font-size: 0.5rem;
}

.nav-items.six-col .btn-icon {
    font-size: 1.05rem;
}

/* =====================================================
   PLANNER v4 – TODAY VIEW + TOGGLE + CLICKABLE EX
   ===================================================== */

/* ── PLANNER HEADER (title + toggle button) ─────────── */
.planner-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
}

.planner-header-left {
    flex: 1;
    min-width: 0;
}

.planner-header-left h2 {
    margin: 0 0 6px;
    font-size: 1.4rem;
    letter-spacing: 0.08em;
}

/* Toggle Button */
.plan-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 10px 16px;
    color: rgba(148, 163, 184, 0.8);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.22s;
    white-space: nowrap;
    flex-shrink: 0;
}

.plan-toggle-btn i {
    font-size: 0.9rem;
}

.plan-toggle-btn:hover {
    background: rgba(16, 185, 129, 0.12);
    border-color: var(--c-primary);
    color: var(--c-primary);
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.2);
}

/* ── TODAY VIEW CONTAINER ───────────────────────────── */
.planner-today-view {
    animation: pt-fadein 0.28s ease;
}

@keyframes pt-fadein {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Plan meta banner */
.pt-meta-block {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(59, 130, 246, 0.06));
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 16px;
}

.pt-meta-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--c-primary);
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 4px;
}

.pt-meta-desc {
    font-size: 0.82rem;
    color: rgba(148, 163, 184, 0.85);
    line-height: 1.5;
    margin: 0;
}

/* Today header block */
.pt-today-header {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-left: 3px solid var(--c-primary);
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 14px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.pt-today-header::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 40%;
    background: linear-gradient(270deg, rgba(16, 185, 129, 0.04), transparent);
    pointer-events: none;
}

.pt-today-day {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.6rem;
    font-weight: 900;
    color: white;
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 3px;
}

.pt-today-date {
    font-size: 0.78rem;
    color: rgba(148, 163, 184, 0.65);
    margin-bottom: 8px;
}

.pt-today-copy {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.pt-today-stats {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.pt-today-stat {
    min-width: 72px;
    padding: 9px 10px;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.18);
    text-align: center;
}

.pt-today-stat strong,
.pt-today-stat span {
    display: block;
    font-family: 'JetBrains Mono', monospace;
}

.pt-today-stat strong {
    color: var(--c-primary);
    font-size: 1rem;
    line-height: 1;
}

.pt-today-stat span {
    color: var(--c-text-dim);
    font-size: 0.5rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-top: 5px;
}

.pt-today-total {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 6px;
    padding: 3px 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--c-primary);
    letter-spacing: 0.06em;
}

@media (max-width: 480px) {
    .pt-today-header {
        align-items: flex-end;
        gap: 10px;
    }

    .pt-today-day {
        font-size: 1.25rem;
    }

    .pt-today-date {
        margin-bottom: 0;
    }

    .pt-today-stat {
        min-width: 58px;
        padding: 8px 7px;
    }
}

/* Coach note for today */
.pt-day-coach-note {
    background: rgba(59, 130, 246, 0.07);
    border: 1px solid rgba(59, 130, 246, 0.18);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.8rem;
    color: rgba(148, 163, 184, 0.85);
    font-style: italic;
    margin-bottom: 14px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.pt-day-coach-note i {
    color: #3b82f6;
    margin-top: 2px;
    flex-shrink: 0;
}

/* Exercise card list */
.pt-ex-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ── EXERCISE CARDS (today view) ────────────────────── */
.pt-ex-card {
    position: relative;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(5, 12, 28, 0.7);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.pt-ex-clickable {
    cursor: pointer;
}

.pt-ex-clickable:hover {
    transform: translateY(-2px) scale(1.005);
    border-color: var(--pt-col, var(--c-primary));
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 24px rgba(16, 185, 129, 0.15);
}

.pt-ex-clickable:active {
    transform: translateY(0) scale(0.998);
}

/* Cover image (full-width blurred top) */
.pt-ex-cover {
    height: 110px;
    background-size: cover;
    background-position: center;
    position: relative;
    flex-shrink: 0;
}

.pt-ex-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.1) 0%,
            rgba(5, 12, 28, 0.95) 100%);
}

/* Content area */
.pt-ex-content {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

/* Top row: number + category + duration + xp */
.pt-ex-top {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.pt-ex-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.58rem;
    font-weight: 800;
    color: var(--pt-col, var(--c-primary));
    letter-spacing: 0.1em;
    opacity: 0.8;
}

.pt-ex-cat {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.54rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 5px;
    letter-spacing: 0.06em;
    background: var(--pt-bg, rgba(16, 185, 129, 0.1));
    color: var(--pt-col, var(--c-primary));
}

.pt-ex-dur {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    font-weight: 600;
    color: rgba(245, 158, 11, 0.85);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.pt-ex-xp {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.56rem;
    font-weight: 700;
    color: rgba(148, 163, 184, 0.5);
    display: flex;
    align-items: center;
    gap: 3px;
}

.pt-ex-xp i {
    color: #f59e0b;
    font-size: 0.5rem;
}

/* Exercise title */
.pt-ex-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.05rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

/* Coach comment */
.pt-ex-comment {
    font-size: 0.76rem;
    color: rgba(148, 163, 184, 0.7);
    font-style: italic;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.4;
}

.pt-ex-comment i {
    color: rgba(59, 130, 246, 0.6);
    margin-top: 2px;
    flex-shrink: 0;
}

/* CTA line */
.pt-ex-cta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    font-weight: 800;
    color: var(--pt-col, var(--c-primary));
    letter-spacing: 0.08em;
    opacity: 0.7;
    transition: opacity 0.18s;
}

.pt-ex-card:hover .pt-ex-cta {
    opacity: 1;
}

.pt-ex-cta .fa-chevron-right {
    margin-left: auto;
    font-size: 0.55rem;
    transition: transform 0.18s;
}

.pt-ex-card:hover .pt-ex-cta .fa-chevron-right {
    transform: translateX(3px);
}

/* Left accent bar */
.pt-ex-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 3px;
    background: var(--pt-col, var(--c-primary));
    opacity: 0.6;
    transition: opacity 0.2s;
}

.pt-ex-card:hover::before {
    opacity: 1;
}

/* ── REST DAY (today view) ──────────────────────────── */
.pt-rest-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    gap: 12px;
}

.pt-rest-icon {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: rgba(148, 163, 184, 0.4);
    margin-bottom: 4px;
    animation: pt-float 3s ease-in-out infinite;
}

@keyframes pt-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.pt-rest-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.6rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.1em;
}

.pt-rest-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    color: rgba(148, 163, 184, 0.35);
    letter-spacing: 0.05em;
}

.pt-rest-tip {
    font-size: 0.8rem;
    color: rgba(148, 163, 184, 0.5);
    max-width: 260px;
    line-height: 1.5;
    margin: 0;
}

/* ── WEEK GRID CLICKABLE EXERCISES ──────────────────── */
.plan-ex-clickable {
    cursor: pointer;
    transition: background 0.18s, padding-left 0.18s;
}

.plan-ex-clickable:hover {
    background: rgba(255, 255, 255, 0.04);
    padding-left: 14px;
}

.plan-ex-arrow {
    font-size: 0.6rem;
    color: rgba(148, 163, 184, 0.3);
    align-self: center;
    transition: transform 0.18s, color 0.18s;
    flex-shrink: 0;
    margin-left: auto;
}

.plan-ex-clickable:hover .plan-ex-arrow {
    transform: translateX(3px);
    color: var(--c-primary);
}

/* Make plan-ex-entry flex so arrow goes to the right */
.plan-ex-entry {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-left: 3px solid var(--c-primary);
    border-radius: 0 8px 8px 0;
    background: rgba(255, 255, 255, 0.02);
    gap: 8px;
    transition: background 0.18s;
}


/* =====================================================
   PLAN MODE – TIMER INTEGRATION STYLES
   ===================================================== */

/* ── MODE SWITCH (Freestyle / Plan) ─────────────────── */
.timer-mode-switch {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 4px;
    width: max-content;
    max-width: max-content !important;
    flex-wrap: nowrap;
}

.tms-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    border-radius: 7px;
    padding: 7px 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    color: rgba(148, 163, 184, 0.6);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.tms-btn i {
    font-size: 0.75rem;
}

.tms-btn.active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--c-primary);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
}

.tms-btn[data-tmode="plan"].active {
    background: rgba(139, 92, 246, 0.18);
    color: #a78bfa;
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.2);
}

.tms-btn.tms-disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.tms-btn:hover:not(.active):not(.tms-disabled) {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
}

/* ── PLAN MODE REACTOR GLOW ─────────────────────────── */
.plan-mode-reactor .reactor-hud::before {
    content: 'PLAN MODE';
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    color: #a78bfa;
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.6);
}

/* ── PLAN MODE PANEL ────────────────────────────────── */
#plan-mode-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: pm-fadein 0.25s ease;
}

@keyframes pm-fadein {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Progress row */
.pm-progress-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pm-progress-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    font-weight: 700;
    color: #a78bfa;
    letter-spacing: 0.06em;
}

.pm-progress-track {
    height: 4px;
    background: rgba(139, 92, 246, 0.15);
    border-radius: 4px;
    overflow: hidden;
}

.pm-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
    border-radius: 4px;
    transition: width 0.5s ease;
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
}

/* Plan mode mode-bar */
.pm-mode-bar {
    margin: 0;
}

/* ── EXERCISE SELECTION LIST ────────────────────────── */
.pm-ex-select-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.58rem;
    font-weight: 700;
    color: rgba(148, 163, 184, 0.5);
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.pm-ex-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
}

.pm-ex-list::-webkit-scrollbar {
    width: 3px;
}

.pm-ex-list::-webkit-scrollbar-track {
    background: transparent;
}

.pm-ex-list::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 2px;
}

.pm-ex-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-left: 3px solid var(--pm-col, #8b5cf6);
    background: rgba(255, 255, 255, 0.02);
    transition: background 0.18s;
}

.pm-ex-item.pm-ex-done {
    opacity: 0.45;
    border-left-color: var(--c-primary);
}

.pm-ex-item.pm-ex-open:hover {
    background: rgba(139, 92, 246, 0.06);
}

.pm-ex-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.pm-ex-item-check {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1.5px solid var(--pm-col, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    font-weight: 800;
    color: var(--pm-col, #8b5cf6);
    flex-shrink: 0;
}

.pm-ex-item.pm-ex-done .pm-ex-item-check {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--c-primary);
    color: var(--c-primary);
}

.pm-ex-item-info {
    flex: 1;
    min-width: 0;
}

.pm-ex-item-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pm-ex-item-meta {
    display: flex;
    gap: 8px;
    margin-top: 2px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.56rem;
    color: rgba(148, 163, 184, 0.55);
}

.pm-ex-start-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1.5px solid var(--pm-col, #8b5cf6);
    background: rgba(139, 92, 246, 0.12);
    color: #a78bfa;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.pm-ex-start-btn:hover {
    background: rgba(139, 92, 246, 0.25);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.3);
    transform: scale(1.08);
}

/* ── ACTIVE EXERCISE CARD ───────────────────────────── */
.pm-active-card {
    background: rgba(139, 92, 246, 0.06);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: pm-fadein 0.2s ease;
}

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

.pm-active-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.52rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #a78bfa;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    padding: 2px 8px;
    border-radius: 4px;
    animation: pm-pulse 2s ease-in-out infinite;
}

@keyframes pm-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.3);
    }

    50% {
        box-shadow: 0 0 0 4px rgba(139, 92, 246, 0);
    }
}

.pm-active-cat {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.54rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 5px;
}

.pm-active-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    font-weight: 800;
    color: white;
    line-height: 1.2;
}

.pm-active-comment {
    font-size: 0.74rem;
    color: rgba(148, 163, 184, 0.65);
    font-style: italic;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.pm-active-comment i {
    color: rgba(139, 92, 246, 0.5);
    margin-top: 2px;
}

/* Countdown bar */
.pm-countdown-bar-wrap {
    height: 5px;
    background: rgba(139, 92, 246, 0.12);
    border-radius: 5px;
    overflow: hidden;
}

.pm-countdown-bar {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
    border-radius: 5px;
    transition: width 1s linear;
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
}

.pm-countdown-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    font-weight: 700;
    color: #a78bfa;
    text-align: center;
    letter-spacing: 0.06em;
}

/* Action buttons */
.pm-active-actions {
    display: flex;
    gap: 8px;
    margin-top: 2px;
}

.pm-btn-detail {
    flex: 1;
    padding: 9px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 8px;
    color: #a78bfa;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.pm-btn-detail:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: #a78bfa;
}

.pm-btn-done {
    flex: 1;
    padding: 9px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 8px;
    color: var(--c-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.pm-btn-done:hover {
    background: rgba(16, 185, 129, 0.22);
    border-color: var(--c-primary);
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.2);
}

/* ── AUX CONTROLS (warmup/pause in plan mode) ───────── */
.pm-aux-btn .activator-bg {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(167, 139, 250, 0.2)) !important;
}

/* ── ALL DONE STATE ─────────────────────────────────── */
.pm-all-done {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    text-align: center;
}

.pm-all-done-icon {
    width: 52px;
    height: 52px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #f59e0b;
    animation: pm-float 3s ease-in-out infinite;
}

.pm-all-done-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 800;
    color: #f59e0b;
    letter-spacing: 0.06em;
}

.pm-all-done-sub {
    font-size: 0.74rem;
    color: rgba(148, 163, 184, 0.6);
    margin: 0;
}


/* ── CUSTOM EXERCISE DROPDOWN ───────────────────────── */
#pm-dropdown-wrap {
    position: relative;
    display: flex;
    justify-content: center;
}

.pm-custom-select {
    position: relative;
    user-select: none;
    width: auto;
    display: inline-block;
}

/* Trigger row — compact pill */
.pm-custom-selected {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.35);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.15);
    max-width: 220px;
}

.pm-custom-selected:hover {
    background: rgba(139, 92, 246, 0.22);
    border-color: #a78bfa;
    box-shadow: 0 0 16px rgba(139, 92, 246, 0.35);
}

/* Pulse when no exercise selected */
.pm-custom-selected.pm-no-ex {
    animation: pm-pill-pulse 2s ease-in-out infinite;
}

@keyframes pm-pill-pulse {

    0%,
    100% {
        box-shadow: 0 0 8px rgba(139, 92, 246, 0.15);
    }

    50% {
        box-shadow: 0 0 18px rgba(139, 92, 246, 0.45);
    }
}

.pm-csel-icon {
    color: #a78bfa;
    font-size: 0.65rem;
    flex-shrink: 0;
}

.pm-csel-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    font-weight: 700;
    color: #c4b5fd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.04em;
    max-width: 140px;
}

.pm-csel-arrow {
    color: #a78bfa;
    font-size: 0.5rem;
    flex-shrink: 0;
    transition: transform 0.2s;
}

/* Disabled state */
.pm-csel-disabled .pm-custom-selected {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* New top dropdown container (now below timer) */
#pm-top-dropdown-wrap {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    margin-bottom: 24px;
    z-index: 100;
    position: relative;
}

/* Enlarge the timer ONLY in plan mode */
#tab-dashboard.plan-mode-active .timer-reactor {
    margin-top: 10px;
    /* shift down slightly */
    transform: scale(1.50);
    /* make it 50% larger */
    transform-origin: top center;
    margin-bottom: 50px;
    /* add space below */
}

/* Options list */
.pm-custom-options {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 200;
    background: rgba(13, 18, 35, 0.97);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(139, 92, 246, 0.1);
    animation: pm-dropdown-open 0.18s ease;
    max-height: 220px;
    overflow-y: auto;
}

.pm-custom-options::-webkit-scrollbar {
    width: 3px;
}

.pm-custom-options::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 2px;
}

@keyframes pm-dropdown-open {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Option items */
.pm-opt-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.pm-opt-item:hover {
    background: rgba(139, 92, 246, 0.12);
}

.pm-opt-placeholder {
    color: rgba(148, 163, 184, 0.4);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    padding: 9px 14px;
    cursor: default;
}

.pm-opt-placeholder:hover {
    background: transparent;
}

.pm-opt-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 6px currentColor;
}

.pm-opt-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pm-opt-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.74rem;
    font-weight: 700;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pm-opt-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.56rem;
    color: rgba(148, 163, 184, 0.5);
    letter-spacing: 0.04em;
}

.pm-opt-dur {
    color: rgba(148, 163, 184, 0.3);
    font-size: 0.7rem;
    flex-shrink: 0;
}

/* ── PLAN ACTIVATOR (lila) ──────────────────────────── */
.pm-activator .pm-activator-bg {
    background: linear-gradient(135deg, #7c3aed, #6d28d9) !important;
}

/* ── EXERCISE SCROLL LIST ───────────────────────────── */
.pm-ex-scroll-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 180px;
    overflow-y: auto;
    padding-right: 2px;
}

.pm-ex-scroll-list::-webkit-scrollbar {
    width: 3px;
}

.pm-ex-scroll-list::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 2px;
}

.pm-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--pm-col, #8b5cf6);
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: background 0.15s;
}

.pm-list-item:hover:not(.pm-list-done) {
    background: rgba(139, 92, 246, 0.07);
}

.pm-list-item.pm-list-done {
    opacity: 0.4;
    border-left-color: #10b981;
    cursor: default;
}

.pm-list-item.pm-list-active {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.3);
    border-left-color: #a78bfa;
}

.pm-list-indicator {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid var(--pm-col, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pm-list-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    font-weight: 800;
    color: var(--pm-col, #8b5cf6);
}

.pm-list-check {
    color: #10b981;
    font-size: 0.7rem;
}

.pm-list-item.pm-list-done .pm-list-indicator {
    border-color: #10b981;
}

.pm-list-info {
    flex: 1;
    min-width: 0;
}

.pm-list-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pm-list-meta {
    display: flex;
    gap: 8px;
    margin-top: 2px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.54rem;
    color: rgba(148, 163, 184, 0.5);
    align-items: center;
}

.pm-list-category {
    color: var(--pm-col, #8b5cf6);
    font-weight: 700;
}

.pm-done-tag {
    color: #10b981 !important;
    font-weight: 700;
}

.pm-list-link {
    color: rgba(139, 92, 246, 0.4);
    font-size: 0.65rem;
    flex-shrink: 0;
}

.pm-list-empty {
    text-align: center;
    padding: 16px;
    color: rgba(148, 163, 184, 0.4);
    font-size: 0.75rem;
}


/* =====================================================
   PLAN MODE – MOBILE OPTIMIZATIONS
   (Timer-Seite: Plan-Modus auf kleinen Bildschirmen)
   ===================================================== */

/* ── Kleine Geräte ≤ 430px (Standard-Smartphones) ─── */
@media (max-width: 430px) {

    /* Mode-Switch Buttons kompakter */
    .tms-btn {
        padding: 6px 9px;
        font-size: 0.55rem;
        gap: 4px;
    }

    .tms-btn i {
        font-size: 0.68rem;
    }

    /* Plan Mode Panel: weniger Abstand zwischen Elementen */
    #plan-mode-panel {
        gap: 8px;
    }

    /* Progress-Label etwas kleiner */
    .pm-progress-label {
        font-size: 0.58rem;
    }

    /* Mode-Bar kompakter */
    .pm-mode-bar .mode-btn {
        padding: 10px 0;
        font-size: 0.65rem;
    }

    /* Dropdown kompakter */
    .pm-custom-selected {
        padding: 9px 12px;
    }

    .pm-csel-label {
        font-size: 0.66rem;
    }

    /* Start-Button etwas flacher */
    .pm-activator.btn-activator {
        height: 60px;
    }

    .pm-activator .activator-content {
        font-size: 0.95rem;
        gap: 8px;
    }

    /* Übungsliste: mehr Platz nutzen */
    .pm-ex-scroll-list {
        max-height: 200px;
    }

    /* Aktive Übungskarte kompakter */
    .pm-active-card {
        padding: 12px 14px;
        gap: 6px;
    }

    .pm-active-title {
        font-size: 0.9rem;
    }

    .pm-active-comment {
        font-size: 0.7rem;
    }

    .pm-btn-detail,
    .pm-btn-done {
        padding: 8px;
        font-size: 0.56rem;
    }

    /* Aktions-Buttons nebeneinander kompakt */
    .pm-active-actions {
        gap: 6px;
        margin-top: 0;
    }
}

/* ── Sehr kleine Geräte ≤ 375px (iPhone SE etc.) ────── */
@media (max-width: 375px) {

    /* Mode-Switch noch kompakter */
    .tms-btn {
        padding: 5px 7px;
        font-size: 0.5rem;
        letter-spacing: 0.04em;
    }

    /* Plan Mode Panel: noch enger */
    #plan-mode-panel {
        gap: 6px;
    }

    /* Dropdown-Trigger schmaler */
    .pm-custom-selected {
        padding: 8px 10px;
        gap: 7px;
    }

    .pm-csel-label {
        font-size: 0.62rem;
    }

    /* Übungsliste etwas weniger hoch damit alles reinpasst */
    .pm-ex-scroll-list {
        max-height: 160px;
    }

    /* Start-Button */
    .pm-activator.btn-activator {
        height: 56px;
    }

    .pm-activator .activator-content {
        font-size: 0.88rem;
        letter-spacing: 1px;
    }

    .pm-activator .activator-text {
        display: inline;
        /* Immer sichtbar */
    }

    /* Aktive Karte */
    .pm-active-card {
        padding: 10px 12px;
        gap: 5px;
    }

    .pm-active-title {
        font-size: 0.85rem;
    }

    /* Progress Label & Balken */
    .pm-progress-label {
        font-size: 0.54rem;
        gap: 5px;
    }
}

/* ── Niedrige Bildschirmhöhe ≤ 700px (z.B. iPhone SE landscape / kompakte Phones) */
@media (max-height: 700px) {

    /* Dashboard-Grid: Abstand zwischen Timer und Controls stark reduzieren */
    .dashboard-grid {
        gap: 12px !important;
    }

    /* Timer-Reactor im Plan-Modus deutlich kleiner */
    .plan-mode-reactor .timer-reactor,
    #plan-mode-panel~.section-center .timer-reactor {
        width: 200px;
        height: 200px;
    }

    /* Generell den Timer kleiner machen wenn Plan Mode aktiv
       (wird per JS-Klasse gesteuert – auch ohne Klasse absichern) */
    .plan-mode-reactor {
        transform: scale(0.82);
        transform-origin: center top;
        margin-bottom: -28px;
        /* Negativer Margin kompensiert den scale-Whitespace */
    }

    /* Plan Panel: maximalen vertikalen Platz ausnutzen */
    #plan-mode-panel {
        gap: 7px;
    }

    /* Übungsliste: scrollbarer auf kleinen Screens */
    .pm-ex-scroll-list {
        max-height: 150px;
    }

    /* Mode-Bar etwas flacher */
    .pm-mode-bar .mode-btn {
        padding: 9px 0;
    }

    /* Start-Button flacher */
    .pm-activator.btn-activator {
        height: 56px;
    }

    /* Progress-Row kompakter */
    .pm-progress-row {
        gap: 4px;
    }

    /* Aktive Übungskarte kompakter */
    .pm-active-card {
        padding: 10px 14px;
        gap: 5px;
    }

    .pm-countdown-bar-wrap {
        height: 4px;
    }
}

/* ── Sehr niedrige Höhe ≤ 600px (Landscape kleine Phones) */
@media (max-height: 600px) {

    .dashboard-grid {
        gap: 8px !important;
    }

    /* Timer stark reduzieren */
    .plan-mode-reactor {
        transform: scale(0.7);
        margin-bottom: -44px;
    }

    /* Plan Mode Panel: wenig Gap, kompakt */
    #plan-mode-panel {
        gap: 5px;
    }

    /* Übungsliste kleiner */
    .pm-ex-scroll-list {
        max-height: 120px;
    }

    /* Progress nur Balken, Label ausblenden */
    .pm-progress-label {
        display: none;
    }

    /* Mode-Bar flacher */
    .pm-mode-bar .mode-btn {
        padding: 7px 0;
        font-size: 0.6rem;
    }

    /* Dropdown Trigger */
    .pm-custom-selected {
        padding: 7px 10px;
    }

    /* Start-Button */
    .pm-activator.btn-activator {
        height: 50px;
    }

    .pm-activator .activator-content {
        font-size: 0.85rem;
    }

    /* Aktive Karte sehr kompakt */
    .pm-active-card {
        padding: 8px 12px;
        gap: 4px;
    }

    .pm-active-title {
        font-size: 0.82rem;
    }

    .pm-active-comment {
        display: none;
        /* Kommentar bei sehr kleinen Screens ausblenden */
    }

    .pm-btn-detail,
    .pm-btn-done {
        padding: 6px;
        font-size: 0.54rem;
    }
}

/* ── Plan Mode: Control-Bereich bekommt mehr Breite auf Mobile */
@media (max-width: 430px) {

    /* Sicherstellen dass Panel volle Breite nutzt */
    #plan-mode-panel,
    #freestyle-controls {
        width: 100%;
    }

    /* section-bottom füllt die volle Breite */
    .section-bottom {
        width: 100%;
        max-width: 100%;
    }

    /* Dash-section maximal breit */
    .dash-section {
        max-width: 100%;
    }

    /* Reset Button nicht zu groß */
    .btn-reset-mini {
        width: 46px;
        height: 60px;
    }
}


/* =====================================================
   PLAN TAB – MOBILE OVERHAUL v2
   Fixes abgeschnittene Elemente, schlechtes Layout auf
   kleinen Screens (≤ 480px / ≤ 390px / ≤ 360px)
   ===================================================== */

/* ── Basis: Overflow-Schutz ──────────────────────────── */
#tab-planner {
    overflow-x: hidden;
}

/* Robustes vertikales Scrollen statt Flex-Spalte:
   verhindert, dass dynamisch geladener Inhalt unten abgeschnitten wird
   und der Bereich vorzeitig "begrenzt" wirkt. */
#tab-planner.tab-content.active {
    display: block;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#tab-planner * {
    box-sizing: border-box;
}

#tab-planner .content-padding {
    padding-left: 14px;
    padding-right: 14px;
    padding-bottom: 28px;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    /* Inhaltsbereich füllt mindestens die volle Höhe -> keine tote Leerfläche */
    min-height: 100%;
}

/* Alle wichtigen Planner-Blöcke: nie breiter als der Screen */
#planner-view-today,
#planner-view-week,
.planner-today-view,
.pt-ex-list,
.planner-grid,
.pt-meta-block,
.pt-today-header,
.pt-day-coach-note,
.pt-ex-card,
.plan-day-card {
    max-width: 100%;
    overflow-x: hidden;
}

/* ── PLANNER HEADER: verhindert Abschneiden ──────────── */
.planner-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: nowrap;
    width: 100%;
    min-width: 0;
}

.planner-header-left {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.planner-header-left h2 {
    margin: 0 0 4px;
    font-size: 1.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Toggle-Button: nie abschneiden, kompakt */
.plan-toggle-btn {
    flex-shrink: 0;
    min-width: 0;
    padding: 9px 13px;
    font-size: 0.58rem;
    gap: 6px;
    border-radius: 9px;
    white-space: nowrap;
}

/* ── TODAY VIEW ───────────────────────────────────────── */
.planner-today-view {
    width: 100%;
}

.pt-meta-block {
    padding: 12px 14px;
    margin-bottom: 12px;
    border-radius: 12px;
}

.pt-meta-name {
    font-size: 0.68rem;
    flex-wrap: wrap;
    gap: 5px;
}

.pt-meta-desc {
    font-size: 0.78rem;
    line-height: 1.45;
}

.pt-today-header {
    padding: 13px 15px;
    margin-bottom: 12px;
    border-radius: 11px;
}

.pt-today-day {
    font-size: 1.35rem;
}

.pt-today-date {
    font-size: 0.72rem;
    margin-bottom: 6px;
}

/* ── EXERCISE CARDS (Today View) ─────────────────────── */
.pt-ex-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.pt-ex-card {
    width: 100%;
    min-width: 0;
    border-radius: 12px;
}

.pt-ex-cover {
    height: 90px;
}

.pt-ex-content {
    padding: 12px 14px 14px;
    gap: 7px;
}

.pt-ex-top {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-width: 0;
}

.pt-ex-title {
    font-size: 0.95rem;
    line-height: 1.25;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.pt-ex-comment {
    font-size: 0.72rem;
    line-height: 1.4;
    word-break: break-word;
}

/* ── WEEK VIEW ───────────────────────────────────────── */
#planner-view-week {
    width: 100%;
    min-width: 0;
}

.planner-week-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    width: 100%;
}

.plan-week-label {
    font-size: 0.6rem;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

.plan-nav-btn {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.planner-grid {
    display: flex;
    flex-direction: column;
    gap: 9px;
    width: 100%;
}

.plan-day-card {
    width: 100%;
    min-width: 0;
    border-radius: 12px;
}

.plan-day-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 13px 9px;
    flex-wrap: nowrap;
    min-width: 0;
    overflow: hidden;
}

.plan-day-name {
    font-size: 0.9rem;
    flex-shrink: 0;
}

.plan-day-date {
    font-size: 0.58rem;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plan-today-badge {
    font-size: 0.48rem;
    padding: 2px 7px;
    flex-shrink: 0;
    margin-left: auto;
}

.plan-day-total {
    font-size: 0.56rem;
    flex-shrink: 0;
}

.plan-exercises {
    padding: 7px 10px 10px;
    gap: 6px;
}

.plan-ex-entry {
    padding: 9px 10px;
    gap: 7px;
    min-width: 0;
    border-radius: 0 7px 7px 0;
}

.plan-ex-body {
    flex: 1;
    min-width: 0;
}

.plan-ex-title {
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.plan-ex-tags {
    flex-wrap: wrap;
    gap: 4px;
}

.plan-ex-duration {
    font-size: 0.54rem;
    padding: 2px 6px;
}

.plan-ex-cat {
    font-size: 0.52rem;
    padding: 2px 6px;
}

.plan-day-note {
    margin: 6px 10px 0;
    padding: 6px 9px;
    font-size: 0.68rem;
    border-radius: 7px;
}

/* ── SMARTPHONE: ≤ 480px ─────────────────────────────── */
@media (max-width: 480px) {

    #tab-planner .content-padding {
        padding-left: 12px;
        padding-right: 12px;
    }

    .planner-header {
        margin-bottom: 14px;
    }

    .planner-header-left h2 {
        font-size: 1.1rem;
    }

    .plan-toggle-btn {
        padding: 8px 11px;
        font-size: 0.55rem;
        gap: 5px;
    }

    .pt-ex-cover {
        height: 80px;
    }

    .pt-ex-content {
        padding: 11px 12px 13px;
    }

    .pt-ex-title {
        font-size: 0.9rem;
    }

    .plan-day-header {
        padding: 9px 12px 8px;
    }

    .plan-exercises {
        padding: 6px 9px 9px;
    }

    .plan-ex-entry {
        padding: 8px 9px;
    }
}

/* ── KLEIN: ≤ 390px (iPhone 14/15 Pro, Pixel 7) ─────── */
@media (max-width: 390px) {

    #tab-planner .content-padding {
        padding-left: 10px;
        padding-right: 10px;
    }

    .planner-header-left h2 {
        font-size: 1rem;
        letter-spacing: 0.06em;
    }

    /* Toggle-Button: nur Icon anzeigen, Label verstecken */
    #planner-toggle-label {
        display: none;
    }

    .plan-toggle-btn {
        padding: 9px 12px;
    }

    .plan-toggle-btn i {
        font-size: 1rem;
    }

    .pt-today-header {
        padding: 11px 13px;
    }

    .pt-today-day {
        font-size: 1.2rem;
    }

    .pt-today-date {
        font-size: 0.68rem;
    }

    .pt-ex-cover {
        height: 72px;
    }

    .pt-ex-content {
        padding: 10px 12px 12px;
        gap: 6px;
    }

    .pt-ex-title {
        font-size: 0.85rem;
    }

    .pt-ex-comment {
        font-size: 0.68rem;
    }

    .pt-ex-cta {
        font-size: 0.58rem;
    }

    .plan-day-name {
        font-size: 0.85rem;
        min-width: 22px;
    }

    .plan-ex-title {
        font-size: 0.75rem;
    }

    .pt-rest-title {
        font-size: 1.3rem;
    }

    .pt-rest-sub {
        font-size: 0.58rem;
    }

    .pt-rest-tip {
        font-size: 0.75rem;
        max-width: 220px;
    }
}

/* ── SEHR KLEIN: ≤ 360px (ältere Android-Phones) ─────── */
@media (max-width: 360px) {

    #tab-planner .content-padding {
        padding-left: 8px;
        padding-right: 8px;
    }

    .planner-header-left h2 {
        font-size: 0.95rem;
    }

    .pt-meta-block {
        padding: 10px 12px;
    }

    .pt-meta-name {
        font-size: 0.62rem;
    }

    .pt-meta-desc {
        font-size: 0.72rem;
    }

    .pt-today-day {
        font-size: 1.1rem;
    }

    .pt-ex-cover {
        height: 64px;
    }

    .pt-ex-title {
        font-size: 0.82rem;
    }

    .pt-ex-comment {
        display: none;
    }

    .plan-day-header {
        padding: 8px 10px;
        gap: 6px;
    }

    .plan-exercises {
        padding: 5px 8px 8px;
    }

    .plan-ex-entry {
        padding: 7px 8px;
        gap: 6px;
    }

    .plan-ex-title {
        font-size: 0.72rem;
    }

    .plan-nav-btn {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }

    .plan-week-label {
        font-size: 0.55rem;
    }
}


/* =====================================================
   PLAN MODE AKTIV – TIMER-ANSICHT MOBILE FIX
   Klasse .plan-mode-active wird per JS auf #tab-dashboard gesetzt.
   Verhindert Abschneiden des Timers auf kleinen Screens.
   ===================================================== */

/* ── Dashboard in Plan Mode: scrollbar + kompakt ─────── */
#tab-dashboard.plan-mode-active {
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

#tab-dashboard.plan-mode-active .dashboard-grid {
    height: auto;
    /* Kein erzwungenes 100% mehr */
    min-height: 100%;
    justify-content: flex-start;
    align-items: center;
    gap: 16px;
    padding: 16px 14px 24px;
}

/* ── Timer Reactor kompakt (echte Größe, kein scale) ─── */
#tab-dashboard.plan-mode-active .timer-reactor {
    width: 220px;
    height: 220px;
    /* Override den alten transform:scale Ansatz */
    transform: none !important;
    margin-bottom: 0 !important;
}

/* Schriftgrößen im Timer anpassen */
#tab-dashboard.plan-mode-active .reactor-digits {
    font-size: 2.8rem;
}

#tab-dashboard.plan-mode-active .reactor-status {
    font-size: 0.72rem;
    letter-spacing: 3px;
    margin-bottom: 5px;
}

#tab-dashboard.plan-mode-active .reactor-meta {
    font-size: 0.65rem;
    padding: 3px 8px;
}

/* Den PLAN MODE Text über dem Timer */
#tab-dashboard.plan-mode-active .plan-mode-reactor .reactor-hud::before {
    font-size: 0.48rem;
    top: -22px;
    letter-spacing: 0.12em;
}

/* ── Section Bottom: volle Breite, kompakte Gaps ─────── */
#tab-dashboard.plan-mode-active .section-bottom {
    width: 100%;
    max-width: 420px;
    gap: 10px;
}

#tab-dashboard.plan-mode-active .section-center {
    gap: 8px;
}

/* ── Plan Mode Panel kompakter ───────────────────────── */
#tab-dashboard.plan-mode-active #plan-mode-panel {
    gap: 9px;
    width: 100%;
}

/* Progress Row */
#tab-dashboard.plan-mode-active .pm-progress-row {
    gap: 5px;
}

#tab-dashboard.plan-mode-active .pm-progress-label {
    font-size: 0.58rem;
}

/* Mode Bar flacher */
#tab-dashboard.plan-mode-active .pm-mode-bar .mode-btn {
    padding: 10px 0;
    font-size: 0.65rem;
}

/* Dropdown kompakter */
#tab-dashboard.plan-mode-active .pm-custom-selected {
    padding: 10px 13px;
}

#tab-dashboard.plan-mode-active .pm-csel-label {
    font-size: 0.68rem;
}

/* Start-Button normal hoch (nicht flacher machen) */
#tab-dashboard.plan-mode-active .pm-activator.btn-activator {
    height: 62px;
}

/* Übungsliste: begrenzte Höhe + scroll */
#tab-dashboard.plan-mode-active .pm-ex-scroll-list {
    max-height: 180px;
}

/* Mode Switch Bar oben */
#tab-dashboard.plan-mode-active .timer-mode-switch {
    /* Bleibt absolute positioniert, passt schon */
    width: max-content;
    max-width: max-content !important;
}

/* ── ≤ 430px Smartphones ────────────────────────────── */
@media (max-width: 430px) {

    #tab-dashboard.plan-mode-active .dashboard-grid {
        gap: 12px;
        padding: 12px 12px 20px;
    }

    #tab-dashboard.plan-mode-active .timer-reactor {
        width: 195px;
        height: 195px;
    }

    #tab-dashboard.plan-mode-active .reactor-digits {
        font-size: 2.5rem;
    }

    #tab-dashboard.plan-mode-active .reactor-status {
        font-size: 0.65rem;
        letter-spacing: 2.5px;
    }

    #tab-dashboard.plan-mode-active .pm-activator.btn-activator {
        height: 58px;
    }

    #tab-dashboard.plan-mode-active .pm-ex-scroll-list {
        max-height: 160px;
    }

    #tab-dashboard.plan-mode-active #plan-mode-panel {
        gap: 8px;
    }
}

/* ── ≤ 390px (iPhone 14 Pro, Pixel 7) ──────────────── */
@media (max-width: 390px) {

    #tab-dashboard.plan-mode-active .dashboard-grid {
        gap: 10px;
        padding: 10px 10px 18px;
    }

    #tab-dashboard.plan-mode-active .timer-reactor {
        width: 175px;
        height: 175px;
    }

    #tab-dashboard.plan-mode-active .reactor-digits {
        font-size: 2.2rem;
    }

    #tab-dashboard.plan-mode-active .reactor-status {
        font-size: 0.6rem;
        letter-spacing: 2px;
        margin-bottom: 3px;
    }

    #tab-dashboard.plan-mode-active .reactor-meta {
        font-size: 0.6rem;
    }

    #tab-dashboard.plan-mode-active .pm-mode-bar .mode-btn {
        padding: 9px 0;
        font-size: 0.6rem;
    }

    #tab-dashboard.plan-mode-active .pm-custom-selected {
        padding: 9px 11px;
    }

    #tab-dashboard.plan-mode-active .pm-csel-label {
        font-size: 0.64rem;
    }

    #tab-dashboard.plan-mode-active .pm-activator.btn-activator {
        height: 54px;
    }

    #tab-dashboard.plan-mode-active .pm-ex-scroll-list {
        max-height: 140px;
    }

    #tab-dashboard.plan-mode-active #plan-mode-panel {
        gap: 7px;
    }
}

/* ── ≤ 360px (ältere Phones) ────────────────────────── */
@media (max-width: 360px) {

    #tab-dashboard.plan-mode-active .dashboard-grid {
        gap: 8px;
        padding: 8px 8px 16px;
    }

    #tab-dashboard.plan-mode-active .timer-reactor {
        width: 155px;
        height: 155px;
    }

    #tab-dashboard.plan-mode-active .reactor-digits {
        font-size: 1.9rem;
    }

    #tab-dashboard.plan-mode-active .reactor-status {
        font-size: 0.55rem;
        letter-spacing: 2px;
    }

    #tab-dashboard.plan-mode-active .pm-progress-label {
        display: none;
    }

    #tab-dashboard.plan-mode-active .pm-mode-bar .mode-btn {
        padding: 8px 0;
        font-size: 0.58rem;
    }

    #tab-dashboard.plan-mode-active .pm-activator.btn-activator {
        height: 50px;
    }

    #tab-dashboard.plan-mode-active .pm-activator .activator-content {
        font-size: 0.85rem;
        gap: 7px;
    }

    #tab-dashboard.plan-mode-active .pm-ex-scroll-list {
        max-height: 115px;
    }

    #tab-dashboard.plan-mode-active #plan-mode-panel {
        gap: 6px;
    }

    #tab-dashboard.plan-mode-active .btn-reset-mini {
        width: 42px;
        height: 50px;
    }
}

/* ── Niedrige Bildschirmhöhe ≤ 700px: Timer noch kleiner */
@media (max-height: 700px) {

    #tab-dashboard.plan-mode-active .timer-reactor {
        width: 170px !important;
        height: 170px !important;
        transform: none !important;
        margin-bottom: 0 !important;
    }

    #tab-dashboard.plan-mode-active .reactor-digits {
        font-size: 2.1rem;
    }

    #tab-dashboard.plan-mode-active .dashboard-grid {
        gap: 10px !important;
    }

    #tab-dashboard.plan-mode-active .pm-ex-scroll-list {
        max-height: 130px;
    }
}

/* ── Sehr niedrige Höhe ≤ 600px ─────────────────────── */
@media (max-height: 600px) {

    #tab-dashboard.plan-mode-active .timer-reactor {
        width: 140px !important;
        height: 140px !important;
    }

    #tab-dashboard.plan-mode-active .reactor-digits {
        font-size: 1.7rem;
    }

    #tab-dashboard.plan-mode-active .reactor-status {
        display: none;
    }

    #tab-dashboard.plan-mode-active .reactor-meta {
        font-size: 0.55rem;
    }

    #tab-dashboard.plan-mode-active .dashboard-grid {
        gap: 6px !important;
    }

    #tab-dashboard.plan-mode-active .pm-ex-scroll-list {
        max-height: 100px;
    }

    #tab-dashboard.plan-mode-active .pm-progress-label {
        display: none;
    }
}


/* =====================================================
   PLAN MODE – ACCORDION ÜBUNGSLISTE
   ===================================================== */

/* Accordion Wrapper */
.pm-ex-accordion {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Toggle Button */
.pm-ex-acc-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.22);
    border-radius: 10px;
    color: rgba(148, 163, 184, 0.75);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.pm-ex-acc-btn i:first-child {
    color: #a78bfa;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.pm-ex-acc-btn span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pm-ex-acc-icon {
    color: #a78bfa;
    font-size: 0.6rem;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.pm-ex-acc-btn:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: #a78bfa;
    color: white;
}

/* Accordion offen */
.pm-ex-acc-btn.pm-acc-open {
    border-radius: 10px 10px 0 0;
    border-bottom-color: transparent;
    background: rgba(139, 92, 246, 0.12);
    color: #a78bfa;
}

.pm-ex-acc-btn.pm-acc-open .pm-ex-acc-icon {
    transform: rotate(180deg);
}

/* Übungsliste geschlossen */
.pm-ex-scroll-list.pm-acc-closed {
    display: none !important;
}

/* Übungsliste offen */
.pm-ex-scroll-list.pm-acc-open {
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid rgba(139, 92, 246, 0.22);
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 6px 0 4px;
    background: rgba(5, 10, 22, 0.8);
    animation: pm-fadein 0.2s ease;
}

.pm-ex-scroll-list.pm-acc-open::-webkit-scrollbar {
    width: 3px;
}

.pm-ex-scroll-list.pm-acc-open::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.35);
    border-radius: 2px;
}

/* ── Innere Items bekommen etwas Padding ─────────────── */
.pm-ex-scroll-list.pm-acc-open .pm-list-item {
    margin: 0 6px;
    border-radius: 8px;
}

/* =====================================================
   PLAN MODE AKTIV – TIMER POSITION FIX
   Verhindert Abschneiden durch den absolut positionierten
   Mode-Switch (top:14px, Höhe ~42px → braucht ~70px Platz)
   ===================================================== */

/* PLAN MODE label über dem Timer ausblenden –
   redundant wenn PLAN-Button schon highlighted ist */
#tab-dashboard.plan-mode-active .plan-mode-reactor .reactor-hud::before {
    display: none;
}

/* Dashboard-Grid bekommt oben genug Luft */
#tab-dashboard.plan-mode-active .dashboard-grid {
    padding-top: 72px !important;
}

@media (max-width: 430px) {
    #tab-dashboard.plan-mode-active .dashboard-grid {
        padding-top: 68px !important;
    }
}

@media (max-width: 390px) {
    #tab-dashboard.plan-mode-active .dashboard-grid {
        padding-top: 64px !important;
    }

    .pm-ex-scroll-list.pm-acc-open {
        max-height: 220px;
    }
}

@media (max-width: 360px) {
    #tab-dashboard.plan-mode-active .dashboard-grid {
        padding-top: 60px !important;
    }

    .pm-ex-scroll-list.pm-acc-open {
        max-height: 180px;
    }
}


/* =====================================================
   PLAN MODE – RECHTECK-TIMER (Balken als Umrandung)
   Im Plan Mode wird aus dem runden Reaktor eine breite,
   flache Karte. Der Fortschritt läuft als leuchtende Linie
   um den Rand (abgerundetes Rechteck, gleiche stroke-Logik
   wie der Kreis via pathLength="816").
   Freestyle bleibt unverändert der Kreis.
   ===================================================== */

/* Rechteck-SVG ist standardmäßig (Freestyle) ausgeblendet */
.reactor-svg-rect {
    display: none;
}

/* ── Plan Mode aktiv: Kreis aus, Rechteck an ─────────── */
#tab-dashboard.plan-mode-active .reactor-svg {
    display: none !important;
}

#tab-dashboard.plan-mode-active .reactor-svg-rect {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    /* keine -90deg Rotation wie beim Kreis */
    filter: drop-shadow(0 0 24px rgba(139, 92, 246, 0.25));
    overflow: visible;
}

/* ── Container: breite, hohe Karte ───────────────────── */
#tab-dashboard.plan-mode-active .timer-reactor {
    width: 100% !important;
    max-width: 460px;
    height: 200px !important;
    min-height: 200px;
    transform: none !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border-radius: 26px;
    background:
        radial-gradient(ellipse at 50% 40%, rgba(139, 92, 246, 0.10), rgba(5, 10, 22, 0.35) 70%);
}

/* ── Rand-Linien (Track + Fortschritt) ───────────────── */
.rect-track-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 3;
}

.rect-track-fill {
    fill: none;
    stroke-width: 4.5;
    stroke-linecap: round;
    stroke-dasharray: 816;
    /* = pathLength im SVG, passt zur Kreis-Logik */
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}

/* ── HUD im Rechteck mittig (Ziffern + Übungsname) ───── */
#tab-dashboard.plan-mode-active .reactor-digits {
    font-size: 4.4rem;
    margin-bottom: 6px;
}

#tab-dashboard.plan-mode-active .reactor-status {
    font-size: 0.78rem;
    letter-spacing: 3px;
    margin-bottom: 8px;
}

#tab-dashboard.plan-mode-active .reactor-meta {
    font-size: 0.68rem;
    margin-top: 6px;
}

/* ── Responsive: Kartenhöhe + Ziffern feinjustieren ──── */
@media (max-width: 430px) {
    #tab-dashboard.plan-mode-active .timer-reactor {
        height: 184px !important;
        min-height: 184px;
    }
    #tab-dashboard.plan-mode-active .reactor-digits {
        font-size: 3.9rem;
    }
}

@media (max-width: 390px) {
    #tab-dashboard.plan-mode-active .timer-reactor {
        height: 172px !important;
        min-height: 172px;
    }
    #tab-dashboard.plan-mode-active .reactor-digits {
        font-size: 3.5rem;
    }
}

@media (max-width: 360px) {
    #tab-dashboard.plan-mode-active .timer-reactor {
        height: 160px !important;
        min-height: 160px;
    }
    #tab-dashboard.plan-mode-active .reactor-digits {
        font-size: 3.1rem;
    }
}

@media (max-height: 700px) {
    #tab-dashboard.plan-mode-active .timer-reactor {
        width: 100% !important;
        height: 162px !important;
        min-height: 162px;
        transform: none !important;
        margin: 0 auto !important;
    }
    #tab-dashboard.plan-mode-active .reactor-digits {
        font-size: 3.3rem;
    }
}

@media (max-height: 600px) {
    #tab-dashboard.plan-mode-active .timer-reactor {
        width: 100% !important;
        height: 134px !important;
        min-height: 134px;
    }
    #tab-dashboard.plan-mode-active .reactor-digits {
        font-size: 2.7rem;
    }
    /* reactor-status bleibt hier sichtbar (Rechteck hat Platz) */
    #tab-dashboard.plan-mode-active .reactor-status {
        display: flex;
        font-size: 0.62rem;
        margin-bottom: 4px;
    }
}

/* ── Übungs-Dropdown: FESTE Breite (springt nicht mehr) ──
   WICHTIG: .section-center hat align-items:center -> Kinder
   schrumpfen auf Inhaltsbreite. Daher MUSS der Wrapper auf
   volle Breite gezwungen werden, sonst kollabiert jede %-Breite
   auf die Textbreite. */
#tab-dashboard.plan-mode-active #pm-top-dropdown-wrap {
    width: 100% !important;
    align-self: stretch !important;
    display: flex !important;
    justify-content: center !important;
}

#tab-dashboard.plan-mode-active .pm-custom-select {
    display: block !important;
    width: 300px !important;
    max-width: 100% !important;
    flex: none !important;
    /* feste Pixelbreite -> unabhängig vom Übungsnamen */
}

#tab-dashboard.plan-mode-active .pm-custom-selected {
    display: flex !important;
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
    justify-content: flex-start;
}

#tab-dashboard.plan-mode-active .pm-csel-label {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: none !important;
    text-align: center !important;
    /* langer Name wird abgeschnitten statt Breite zu sprengen */
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Pfeil immer ganz rechts */
#tab-dashboard.plan-mode-active .pm-csel-arrow {
    margin-left: auto;
    flex-shrink: 0;
}

/* ── Start-Button gesperrt, wenn keine Übung gewählt ──── */
.pm-activator.btn-activator.pm-start-locked {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(0.7);
}

.pm-activator.btn-activator.pm-start-locked:hover {
    transform: none;
}

/* Compact plan rows retain the exercise catalogue's logo/badge language. */
.pt-ex-list,
.plan-exercises {
    gap: 9px;
}

.plan-compact-exercise {
    width: 100%;
    min-width: 0;
    min-height: 108px;
    padding: 12px 13px;
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    background: rgba(13, 22, 40, 0.66);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
    cursor: pointer;
    transition: transform 0.18s, border-color 0.18s, background 0.18s;
}

.plan-compact-exercise::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--c-primary);
    opacity: 0.72;
}

.plan-compact-exercise:hover {
    transform: translateY(-2px);
    border-color: rgba(16, 185, 129, 0.42);
    background: rgba(17, 29, 48, 0.82);
}

.plan-compact-logo {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    background-color: #fff;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    position: relative;
}

.plan-compact-logo span {
    position: absolute;
    top: -6px;
    left: -6px;
    min-width: 23px;
    height: 23px;
    padding: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: var(--c-primary);
    color: #03120d;
    font-family: var(--font-tech);
    font-size: 0.58rem;
    font-weight: 900;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.25);
}

.plan-compact-body {
    min-width: 0;
}

.plan-compact-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.plan-compact-title {
    min-width: 0;
    color: #fff;
    font-size: 0.98rem;
    font-weight: 850;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plan-compact-badges {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.plan-compact-badges .ex-cat-badge {
    font-size: 0.5rem;
    padding: 3px 6px;
}

.plan-compact-badges .ex-key-mission-badge {
    font-size: 0.5rem;
    margin: 0;
    padding: 3px 5px;
}

.plan-compact-teaser {
    margin-top: 6px;
    color: var(--c-text-sec);
    font-size: 0.72rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.plan-compact-note {
    margin-top: 5px;
    color: #60a5fa;
    font-size: 0.65rem;
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.plan-compact-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 7px;
    color: var(--c-text-dim);
    font-family: var(--font-tech);
    font-size: 0.58rem;
    font-weight: 750;
    white-space: nowrap;
}

.plan-compact-meta .duration {
    color: #f59e0b;
}

.plan-compact-meta .plan-koin-pill {
    color: #f59e0b;
    font-size: inherit;
}

.plan-compact-arrow {
    color: var(--c-primary);
    font-size: 0.7rem;
    opacity: 0.7;
}

.plan-compact-exercise-week {
    min-height: 92px;
    padding: 10px 11px;
    grid-template-columns: 56px minmax(0, 1fr) 14px;
    gap: 10px;
    border-radius: 11px;
}

.plan-compact-exercise-week .plan-compact-logo {
    width: 56px;
    height: 56px;
    border-radius: 9px;
}

.plan-compact-exercise-week .plan-compact-title {
    font-size: 0.86rem;
}

.plan-compact-exercise-week .plan-compact-teaser {
    font-size: 0.66rem;
    -webkit-line-clamp: 1;
}

.plan-compact-exercise-week .plan-compact-note {
    display: none;
}

.plan-compact-exercise-week .plan-compact-meta {
    margin-top: 5px;
    gap: 6px;
    font-size: 0.53rem;
}

@media (max-width: 480px) {
    .plan-compact-exercise {
        min-height: 100px;
        padding: 10px;
        grid-template-columns: 60px minmax(0, 1fr) 14px;
        gap: 10px;
    }

    .plan-compact-logo {
        width: 60px;
        height: 60px;
        border-radius: 10px;
    }

    .plan-compact-title-row {
        display: block;
    }

    .plan-compact-badges {
        margin-top: 4px;
    }

    .plan-compact-teaser {
        margin-top: 5px;
        font-size: 0.68rem;
        -webkit-line-clamp: 1;
    }

    .plan-compact-note {
        display: none;
    }

    .plan-compact-meta {
        gap: 6px;
        margin-top: 6px;
        font-size: 0.54rem;
    }

    .plan-compact-exercise-week {
        min-height: 84px;
        grid-template-columns: 48px minmax(0, 1fr) 12px;
    }

.plan-compact-exercise-week .plan-compact-logo {
    width: 48px;
    height: 48px;
}
}
