:root {
    --bg-color: #121212;
    --paper-color: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --accent-color: #FF0000;
    --accent-hover: #cc0000;
    --success-color: #4caf50;
    --font-heading: 'Black Ops One', cursive, sans-serif;
    --font-body: 'Roboto', sans-serif;
    --nav-height: 60px;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    height: 100vh;
    overflow: hidden;
    /* App-like feel */
    display: flex;
    flex-direction: column;
}

#app {
    flex: 1;
    overflow-y: auto;
    position: relative;
    padding-bottom: calc(var(--nav-height) + 20px);
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2rem;
    color: var(--accent-color);
    text-align: center;
    margin-top: 1rem;
}

h2 {
    font-size: 1.5rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
    line-height: 1.5;
}

button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 12px 20px;
    font-family: var(--font-heading);
    font-size: 1rem;
    cursor: pointer;
    text-transform: uppercase;
    width: 100%;
    margin-bottom: 1rem;
    border-radius: 4px;
    transition: background 0.2s;
}

button:active {
    transform: scale(0.98);
}

button.secondary {
    background-color: var(--paper-color);
    border: 1px solid var(--text-secondary);
}

button.finish-btn {
    background-color: var(--success-color);
}

button.fire-btn {
    background-color: #ff5722;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 87, 34, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 87, 34, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 87, 34, 0);
    }
}

input,
select {
    width: 100%;
    padding: 12px;
    margin-bottom: 1rem;
    background-color: var(--paper-color);
    border: 1px solid #333;
    color: white;
    font-family: var(--font-body);
    font-size: 1rem;
    border-radius: 4px;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--accent-color);
}

.ghost-glow {
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.6), inset 0 0 10px rgba(255, 0, 0, 0.2);
    animation: pulse-border 1.5s infinite;
}

@keyframes pulse-border {
    0% {
        box-shadow: 0 0 10px rgba(255, 0, 0, 0.4);
    }

    50% {
        box-shadow: 0 0 20px rgba(255, 0, 0, 0.8), inset 0 0 10px rgba(255, 0, 0, 0.3);
    }

    100% {
        box-shadow: 0 0 10px rgba(255, 0, 0, 0.4);
    }
}

/* Screens */
.screen {
    display: none;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Login */
#login-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    text-align: center;
}

/* Onboarding */
.step {
    margin-bottom: 20px;
}

.step label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-secondary);
}

/* War Room (Dashboard) */
.streak-card {
    background-color: var(--paper-color);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
    border: 1px solid #333;
}

.streak-count {
    font-size: 3rem;
    font-family: var(--font-heading);
    color: var(--accent-color);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 20px;
}

.day-col {
    text-align: center;
}

.day-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.day-toggle {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: bold;
}

.day-toggle.workout {
    background-color: var(--accent-color);
}

.day-toggle.rest {
    background-color: var(--success-color);
    color: #000;
}

.day-toggle.missed {
    border: 1px solid var(--accent-color);
    background: transparent;
    color: var(--accent-color);
}

/* Workout Player */
.exercise-card {
    background-color: var(--paper-color);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid var(--accent-color);
}

.exercise-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}

.exercise-title {
    font-weight: bold;
    font-size: 1.1rem;
}

.muscle-tag {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.ghost-stats {
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 10px;
    font-style: italic;
}

.input-row {
    display: flex;
    gap: 10px;
}

.set-label {
    width: 40px;
    display: flex;
    align-items: center;
    font-weight: bold;
    color: var(--accent-color);
}

.timer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(18, 18, 18, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.timer-count {
    font-size: 6rem;
    font-family: var(--font-heading);
    color: var(--accent-color);
}

/* The Lab */
.utility-card {
    background: var(--paper-color);
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
}

.version {
    text-align: center;
    color: #444;
    margin-top: 2rem;
    font-size: 0.8rem;
}

/* Navigation */
#navbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background-color: var(--paper-color);
    display: flex;
    border-top: 1px solid #333;
    z-index: 100;
}

#navbar.hidden {
    transform: translateY(100%);
    transition: transform 0.3s;
}

.nav-btn {
    flex: 1;
    background: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin: 0;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.nav-btn.active {
    color: var(--accent-color);
    border-top: 2px solid var(--accent-color);
}

/* Utilities */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

/* --- Wizard Styles --- */

.wizard-screen {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
    position: absolute;
    /* For sliding */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-color);
}

.wizard-step {
    display: none;
    flex-direction: column;
    height: 100%;
    justify-content: center;
}

.wizard-step.active {
    display: flex;
    animation: slideInRight 0.3s forwards;
}

.wizard-step.exit {
    animation: slideOutLeft 0.3s forwards;
}

/* Animations */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

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

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(-50px);
    }
}

/* Wizard Components */
.wiz-question {
    font-size: 1.8rem;
    font-family: var(--font-heading);
    color: var(--accent-color);
    margin-bottom: 2rem;
    text-align: left;
    line-height: 1.2;
}

.wiz-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 2rem;
}

.wiz-option-card {
    background: var(--paper-color);
    border: 1px solid #333;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: bold;
    text-transform: uppercase;
}

.wiz-option-card.selected {
    border-color: var(--accent-color);
    background-color: rgba(255, 0, 0, 0.1);
    color: var(--accent-color);
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.2);
}

/* Slider */
.slider-container {
    margin: 2rem 0;
    text-align: center;
}

input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    background: transparent;
    padding: 0;
    margin: 10px 0;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    margin-top: -10px;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    background: #333;
    border-radius: 2px;
}

.slider-val {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--accent-color);
    margin-top: 10px;
}

/* Weekly View Preview */
.week-preview {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    background: var(--paper-color);
    padding: 10px;
    border-radius: 4px;
}

.wp-day {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #333;
    font-size: 0.7rem;
    color: #777;
}

.wp-day.active {
    background: var(--accent-color);
    color: white;
}

.wiz-nav {
    margin-top: auto;
    display: flex;
    gap: 10px;
}

/* ═══════════════════════════════════════════════════════════════════
   PHASE 2 — WAR ROOM COMPLETE OVERHAUL
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Shared utility kept from Phase 1 ────────────────────────────── */
.timer-count {
    font-size: 3.5rem;
    font-family: var(--font-heading);
    color: var(--accent-color);
    line-height: 1;
}

.set-prev {
    background: #2a2a2a;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

details summary::-webkit-details-marker {
    display: none;
}

details summary::marker {
    display: none;
}

details[open] summary {
    color: var(--text-primary);
}

.wizard-screen {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: calc(100vh - var(--nav-height));
    padding: 20px;
    background: var(--bg-color);
}

.wizard-step {
    padding-top: 15px;
}

/* ─── WAR ROOM LAYOUT ──────────────────────────────────────────────── */
#war-room.screen.active {
    padding: 0;
    /* let sections control their own padding */
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ─── WEEK STRIP WRAPPER ───────────────────────────────────────────── */
.wr-strip-wrapper {
    background: var(--paper-color);
    padding: 16px 16px 12px;
    border-bottom: 1px solid #222;
}

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

.wr-strip-title {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.wr-strip-badge {
    font-size: 0.68rem;
    background: #111;
    color: var(--text-secondary);
    padding: 3px 8px;
    border-radius: 3px;
    border: 1px solid #333;
    letter-spacing: 1px;
}

/* ─── HORIZONTAL WEEK STRIP ────────────────────────────────────────── */
.week-strip {
    display: flex;
    flex-direction: row;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;

    /* Hide scrollbar across browsers */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.week-strip::-webkit-scrollbar {
    display: none;
}

/* ─── EACH DAY NODE ────────────────────────────────────────────────── */
.wk-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex: 0 0 calc(14.28% - 4px);
    /* exactly 1/7 with gap */
    min-width: 42px;
    max-width: 52px;
    scroll-snap-align: center;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    padding: 2px 0;
    border-radius: 10px;
    transition: transform 0.15s;
}

.wk-node:active {
    transform: scale(0.88);
}

.wk-node:focus {
    outline: none;
}

.wk-node:focus-visible {
    outline: 2px solid var(--accent-color);
    border-radius: 10px;
}

/* Day name (MON, TUE…) */
.wk-day-name {
    font-size: 0.6rem;
    font-family: var(--font-heading);
    color: var(--text-secondary);
    letter-spacing: 1px;
    line-height: 1;
}

/* The circle itself */
.wk-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #161616;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, opacity 0.2s;
    position: relative;
}

.wk-circle-inner {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1;
}

/* Movement label (PUSH, PULL…) */
.wk-move-label {
    font-size: 0.5rem;
    font-family: var(--font-heading);
    letter-spacing: 0.8px;
    color: var(--text-secondary);
    text-align: center;
    text-transform: uppercase;
    min-height: 8px;
    line-height: 1;
    white-space: nowrap;
}

/* ── State variants ─────────────────────────────────────────────── */

/* Past (non-training) */
.wk-node.past .wk-circle {
    opacity: 0.3;
    border-color: #333;
}

.wk-node.past .wk-day-name,
.wk-node.past .wk-move-label {
    opacity: 0.3;
}

/* TODAY */
.wk-node.today .wk-circle {
    border-color: var(--success-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.18), 0 0 16px rgba(76, 175, 80, 0.25);
    background: rgba(76, 175, 80, 0.05);
}

.wk-node.today .wk-circle-inner {
    color: var(--success-color);
    font-size: 0.9rem;
}

.wk-node.today .wk-day-name {
    color: var(--success-color);
}

/* DONE (completed workout) */
.wk-node.done .wk-circle {
    border-color: var(--accent-color);
    background: rgba(255, 0, 0, 0.1);
}

.wk-node.done .wk-circle-inner {
    color: var(--accent-color);
    font-size: 1rem;
}

/* REST */
.wk-node.rest .wk-circle {
    border-color: #4caf50;
    background: rgba(76, 175, 80, 0.07);
}

.wk-node.rest .wk-circle-inner {
    font-size: 0.85rem;
    color: #4caf50;
}

/* MISSED */
.wk-node.missed .wk-circle {
    border-color: #FFC107;
    background: rgba(255, 193, 7, 0.12);
    animation: missed-pulse 2.5s ease-in-out infinite;
}

.wk-node.missed .wk-circle-inner {
    color: #FFC107;
    font-size: 1rem;
}

.wk-node.missed .wk-day-name {
    color: #FFC107;
}

@keyframes missed-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }

    50% {
        box-shadow: 0 0 0 5px rgba(255, 193, 7, 0.2);
    }
}

/* FUTURE (with scheduled workout) */
.wk-node.future .wk-circle {
    border-color: #333;
}

.wk-node.future .wk-circle-inner {
    color: #555;
}

/* ─── STRIP LEGEND ─────────────────────────────────────────────────── */
.wr-strip-legend {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.6rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
    font-family: var(--font-heading);
}

.legend-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ─── MISSION HERO CARD ────────────────────────────────────────────── */
.mission-hero-card-mini {
    margin: 8px 12px;
    border-radius: 8px;
    padding: 10px 12px;
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.hero-btn-mini {
    padding: 8px 14px;
    font-size: 0.8rem;
    font-family: var(--font-heading);
    letter-spacing: 1px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

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

/* OLD HERO CARD (keep for legacy) */
.mission-hero-card {
    margin: 8px 14px 14px;
    border-radius: 10px;
    padding: 10px 14px;
    position: relative;
    overflow: hidden;
    /* border-left set inline per movement colour */
    transition: box-shadow 0.3s;
}

/* Background glow blob */
.hero-glow-blob {
    position: absolute;
    top: -30%;
    right: -20%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.mission-hero-card>* {
    position: relative;
    z-index: 1;
}

/* Top row: date + streak */
.hero-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
}

.hero-date-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    letter-spacing: 2px;
    font-family: var(--font-heading);
    margin-bottom: 2px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: #666;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.hero-streak {
    font-size: 0.72rem;
    font-family: var(--font-heading);
    color: var(--accent-color);
    letter-spacing: 1px;
    text-align: right;
    white-space: nowrap;
}

/* Focus block */
.hero-focus-block {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    border-radius: 7px;
    padding: 8px 10px;
    margin-bottom: 10px;
}

.hero-focus-emoji {
    font-size: 2.2rem;
    line-height: 1;
    flex-shrink: 0;
}

.hero-focus-label {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    line-height: 1.1;
    margin-bottom: 4px;
    text-transform: uppercase;
    /* color set inline */
}

.hero-focus-muscles {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Action zone */
.hero-action-zone {
    display: flex;
    flex-direction: column;
}

.hero-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.5;
}

.hero-btn {
    width: 100%;
    margin-bottom: 0;
    border-radius: 6px;
}

.hero-done-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    letter-spacing: 2px;
    padding: 8px 14px;
    border-radius: 4px;
    margin-bottom: 10px;
    text-align: center;
}

/* ─── QUICK ACTION BUTTONS ─────────────────────────────────────────── */
.wr-quick-actions {
    display: flex;
    gap: 10px;
    padding: 0 16px 16px;
}

.qa-btn {
    flex: 1;
    font-size: 0.75rem;
    padding: 10px 8px;
    margin: 0;
}

/* ─── MODAL SYSTEM ──────────────────────────────────────────────────── */

/* Full-screen dark backdrop */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 500;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

/* Bottom sheet */
.modal-sheet {
    background: #181818;
    border-radius: 20px 20px 0 0;
    padding: 16px 20px 32px;
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;

    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.modal-sheet::-webkit-scrollbar {
    display: none;
}

/* Drag handle */
.modal-handle {
    width: 36px;
    height: 4px;
    background: #333;
    border-radius: 2px;
    margin: 0 auto 18px;
    flex-shrink: 0;
}

/* Slide-up animation */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

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

.slide-up {
    animation: slideUp 0.3s cubic-bezier(0.32, 0.72, 0, 1) forwards;
}

/* Modal header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 14px;
    flex-shrink: 0;
}

.modal-eyebrow {
    font-size: 0.68rem;
    font-family: var(--font-heading);
    letter-spacing: 2px;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--text-primary);
    line-height: 1.1;
}

.modal-close-btn {
    width: auto;
    background: #2a2a2a;
    padding: 7px 12px;
    font-size: 0.8rem;
    margin: 0;
    border-radius: 6px;
    flex-shrink: 0;
}

/* Focus badge inside modal */
.modal-focus-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    flex-shrink: 0;
}

/* Exercise list in preview modal */
.modal-ex-list {
    flex: 1;
}

.modal-section-label {
    font-size: 0.65rem;
    font-family: var(--font-heading);
    color: #555;
    letter-spacing: 2px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.preview-ex-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #1e1e1e;
}

.preview-ex-row:last-child {
    border-bottom: none;
}

.preview-ex-name {
    font-size: 0.9rem;
    color: var(--text-primary);
    flex: 1;
}

.preview-ex-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
    white-space: nowrap;
    margin-left: 10px;
}

.modal-footer-note {
    font-size: 0.78rem;
    color: #555;
    text-align: center;
    margin-top: 16px;
    line-height: 1.5;
    font-style: italic;
    flex-shrink: 0;
}

/* ─── PLAN MODAL — Day Cards ──────────────────────────────────────── */
.plan-cards-scroll {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.plan-day-card {
    background: #111;
    border-radius: 8px;
    padding: 12px 14px;
    /* border-left set inline */
}

.plan-day-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.plan-day-abbr {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 2px;
    min-width: 28px;
}

.plan-day-focus {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    flex: 1;
    /* color set inline */
}

.plan-day-count {
    font-size: 0.7rem;
    color: #555;
    background: #1e1e1e;
    padding: 2px 7px;
    border-radius: 3px;
}

.plan-ex-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.plan-ex-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid #1a1a1a;
}

.plan-ex-row:last-child {
    border-bottom: none;
}

.plan-ex-name {
    font-size: 0.82rem;
    color: #ccc;
    flex: 1;
}

.plan-ex-badge {
    font-size: 0.7rem;
    font-family: var(--font-heading);
    color: #555;
    background: #1e1e1e;
    padding: 2px 6px;
    border-radius: 3px;
    white-space: nowrap;
    margin-left: 8px;
}

/* ─── WORKOUT OVERLAY (PHASE 3) ────────────────────────────────── */
.workout-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-color);
    z-index: 1000;
    overflow-y: auto;
    padding-bottom: 20px;
}

/* Workout input fields styling */
.workout-overlay input[type="number"] {
    background: #0a0a0a;
    border: 2px solid #333;
    border-radius: 8px;
    transition: border-color 0.3s;
}

.workout-overlay input[type="number"]:focus {
    border-color: var(--accent-color);
    outline: none;
}

/* Workout progress bar */
.workout-progress {
    height: 4px;
    background: #1e1e1e;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 20px;
}

.workout-progress-fill {
    height: 100%;
    background: var(--accent-color);
    transition: width 0.4s ease;
}

/* Exercise GIF Integration */
.ex-gif-container {
    width: 100%;
    max-height: 220px;
    background: #0a0a0a;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #333;
    position: relative;
}

.ex-gif-container img {
    max-width: 100%;
    max-height: 220px;
    object-fit: contain;
    animation: fadeIn 0.5s ease;
}

.iron-gif-container {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, margin-top 0.3s;
    background: #000;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.iron-gif-container.open {
    max-height: 200px;
    margin-top: 15px;
    border: 1px solid #444;
}

.iron-gif-container img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
}

.loading-pulse {
    animation: pulse-bg 1.5s infinite;
    background: #1a1a1a;
}

@keyframes pulse-bg {
    0% {
        background-color: #0a0a0a;
    }

    50% {
        background-color: #1a1a1a;
    }

    100% {
        background-color: #0a0a0a;
    }
}

/* ── TACTICAL LANGUAGE TOGGLE ── */
.tactical-toggle-container {
    padding: 10px 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.tactical-toggle {
    width: 70px;
    height: 36px;
    background: #111;
    border: 2px solid #333;
    border-radius: 18px;
    position: relative;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.8), 0 0 10px rgba(0, 0, 0, 0.5);
    transition: border-color 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tactical-toggle.vi {
    border-color: #ffcc00;
    /* Goldish for Vietnam star */
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.8), 0 0 15px rgba(255, 204, 0, 0.3);
}

.tactical-handle {
    width: 28px;
    height: 28px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), inset 0 -2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55), background-color 0.3s;
    /* Heavy mechanical snap feel */
}

/* Base state (English / US) */
.tactical-toggle.en .tactical-handle {
    transform: translateX(0);
    background: #e0e0e0;
}

.tactical-toggle.en .tactical-handle::after {
    content: '🇺🇸';
}

/* Toggled state (Vietnamese / VN) */
.tactical-toggle.vi .tactical-handle {
    transform: translateX(34px);
    background: #ff2222;
    /* Red background for VN */
}

.tactical-toggle.vi .tactical-handle::after {
    content: '🇻🇳';
}