:root {
    /* Base Palette */
    --bg-page: #0a0a0d;
    --bg-card: #15151b;
    --bg-nested: #1c1c23;
    --border-card: rgba(255, 255, 255, 0.10);
    
    /* Text Colors */
    --text-primary: #f5f5f7;
    --text: var(--text-primary);
    --text-secondary: #a3a3ad;
    --text-muted: #9ca3af;
    --text-tertiary: var(--text-muted);
    
    /* Type Accents: Strength */
    --strength-accent: #E8643A;
    --strength-bg: rgba(238, 108, 63, 0.12);
    --strength-border: rgba(238, 108, 63, 0.35);
    
    /* Type Accents: Bag */
    --bag-accent: #d99a3d;
    --bag-bg: rgba(217, 154, 61, 0.12);
    --bag-border: rgba(217, 154, 61, 0.35);
    
    /* Type Accents: Technical */
    --technical-accent: #2dd4d4;
    --technical-bg: rgba(45, 212, 212, 0.12);
    --technical-border: rgba(45, 212, 212, 0.35);
    
    /* Type Accents: Rest */
    --rest-accent: #8b8fa3;
    --rest-bg: rgba(139, 143, 163, 0.12);
    --rest-border: rgba(139, 143, 163, 0.35);

    /* Fonts */
    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'ui-monospace', 'SFMono-Regular', Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

    /* Spacing */
    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 20px;
    --sp-6: 24px;
    --sp-8: 32px;
    --sp-12: 48px;

    /* Radii */
    --radius-card: 16px;
    --radius-pill: 999px;
    --radius-inner: 8px;
}

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

body {
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-family: var(--font-ui);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.global-header-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(10, 10, 10, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: env(safe-area-inset-top);
    box-sizing: border-box;
}
.global-header-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.global-header-inner.is-home {
    max-width: 1440px;
}
@media (min-width: 768px) {
    .global-header-inner.is-home {
        padding: 14px 32px;
    }
}

#app-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: calc(70px + env(safe-area-inset-top)) var(--sp-4) var(--sp-12) var(--sp-4);
}

#app-container.is-home {
    max-width: 1440px;
}

@media (min-width: 768px) {
    #app-container {
        padding: calc(70px + var(--sp-8) + env(safe-area-inset-top)) var(--sp-8) var(--sp-12) var(--sp-8);
    }
}

/* Typography Utilities */
.text-mono {
    font-family: var(--font-mono);
    font-weight: 700;
}
.warmup-duration {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.label-small {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.title-page {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}
.title-card {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}
.text-sec {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Layout Utilities */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }

/* Global Header */
.app-header {
  background: transparent;
  border-bottom: none;
  width: 100%;
}
.header-left {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}
.header-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--strength-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.header-icon-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}
.header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.header-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--strength-accent);
  letter-spacing: -0.01em;
  line-height: 1;
}
.header-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.header-info-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
}
.header-info-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 44px;
  min-height: 44px;
}
.header-info-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}
.header-pills {
    display: flex;
    gap: var(--sp-2);
}
.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 500;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.2s;
}
.pill:hover {
    background: var(--bg-nested);
}
.pill-accent {
    background: var(--strength-bg);
    border-color: var(--strength-border);
    color: var(--strength-accent);
}
.pill-accent .dot {
    width: 6px;
    height: 6px;
    background-color: var(--strength-accent);
    border-radius: 50%;
}

/* Home: Top Row */
.home-top-row {
    margin-bottom: var(--sp-6);
}
.top-stats {
    display: flex;
    gap: var(--sp-3);
    flex-wrap: wrap;
    margin-top: var(--sp-3);
}
.stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    background: var(--bg-nested);
    border: 1px solid var(--border-card);
    font-size: 14px;
    font-weight: 400;
    white-space: nowrap;
}
.stat-pill svg { width: 14px; height: 14px; flex-shrink: 0; }
.stat-pill.type-strength { color: var(--text-secondary); border-color: var(--border-card); }
.stat-pill.type-strength svg { fill: var(--strength-accent); }
.stat-pill.type-bag { color: var(--text-secondary); border-color: var(--border-card); }
.stat-pill.type-bag svg { fill: var(--bag-accent); }
.stat-pill.type-technical { color: var(--text-secondary); border-color: var(--border-card); }
.stat-pill.type-technical svg { fill: var(--technical-accent); }

/* Buttons */
.btn-primary {
    background-color: var(--strength-accent);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: transform 0.1s cubic-bezier(0.2, 0, 0.2, 1), opacity 0.1s ease;
}
.btn-primary:active {
    transform: scale(0.96);
    opacity: 0.8;
}
.btn-primary svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}
.btn-text {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
}
.btn-text:hover {
    color: var(--text-primary);
}
.btn-nav {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    color: var(--text-secondary);
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    min-height: 44px;
    min-width: 80px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}
.btn-nav:hover {
    color: var(--text-primary);
    border-color: rgba(255,255,255,0.15);
}

/* Today Banner */
.today-banner {
    background: linear-gradient(135deg, rgba(238, 108, 63, 0.15) 0%, rgba(238, 108, 63, 0.05) 100%);
    border: 1px solid var(--strength-border);
    border-radius: var(--radius-card);
    padding: var(--sp-5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--sp-8);
}
.banner-icon {
    width: 40px;
    height: 40px;
    background: var(--strength-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: var(--sp-4);
    flex-shrink: 0;
}
.banner-icon svg { fill: #fff; width: 20px; height: 20px; }

/* Grid Layout */
.section-header {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: var(--sp-4);
    margin-top: var(--sp-8);
}
.days-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-4);
    margin-bottom: var(--sp-8);
}
@media (max-width: 768px) {
    .days-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .days-grid { grid-template-columns: 1fr; }
}

/* Generic Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-card);
    padding: var(--sp-4);
    display: flex;
    flex-direction: column;
}
.day-card {
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.2s ease;
}

@keyframes dayCardEnter {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: no-preference) {
    .day-card {
        animation: dayCardEnter 0.35s cubic-bezier(0.2, 0.2, 0, 1) backwards;
    }
}
.day-card:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.day-card:active {
    transform: scale(0.97);
    box-shadow: none;
}
.day-card.is-current {
    border: 1px solid var(--strength-accent);
    box-shadow: 0 0 0 1px var(--strength-accent);
}

.day-card.type-strength { background: linear-gradient(145deg, var(--strength-bg) 0%, var(--bg-card) 60%); }
.day-card.type-bag { background: linear-gradient(145deg, var(--bag-bg) 0%, var(--bg-card) 60%); }
.day-card.type-technical { background: linear-gradient(145deg, var(--technical-bg) 0%, var(--bg-card) 60%); }
.day-card.type-rest { background: linear-gradient(145deg, var(--rest-bg) 0%, var(--bg-card) 60%); }

.card-icon-box {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-inner);
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-icon-box svg { width: 16px; height: 16px; }

.day-card .card-icon-box {
    background: transparent !important;
    border: 1px solid var(--border-card);
}

.type-strength .card-icon-box { background: var(--strength-bg); color: var(--strength-accent); }
.type-strength .card-icon-box svg { fill: var(--strength-accent); }
.type-bag .card-icon-box { background: var(--bag-bg); color: var(--bag-accent); }
.type-bag .card-icon-box svg { fill: var(--bag-accent); }
.type-technical .card-icon-box { background: var(--technical-bg); color: var(--technical-accent); }
.type-technical .card-icon-box svg { fill: var(--technical-accent); }
.type-rest .card-icon-box { background: var(--rest-bg); color: var(--rest-accent); }
.type-rest .card-icon-box svg { fill: var(--rest-accent); }

/* Badges */
.type-badge {
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.type-badge svg { width: 10px; height: 10px; }
.type-strength .type-badge { background: var(--strength-bg); border: 1px solid var(--strength-border); color: var(--strength-accent); fill: var(--strength-accent); }
.type-bag .type-badge { background: var(--bag-bg); border: 1px solid var(--bag-border); color: var(--bag-accent); fill: var(--bag-accent); }
.type-technical .type-badge { background: var(--technical-bg); border: 1px solid var(--technical-border); color: var(--technical-accent); fill: var(--technical-accent); }
.type-rest .type-badge { background: var(--rest-bg); border: 1px solid var(--rest-border); color: var(--rest-accent); fill: var(--rest-accent); }

.card-footer {
    margin-top: auto;
    padding-top: var(--sp-4);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-secondary);
}

/* Rest & Recovery Banner (Days 6 & 7) */
.rest-recovery-banner {
    grid-column: span 3;
    background: var(--rest-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid var(--rest-accent);
    border-radius: var(--radius-card);
    min-height: 90px;
    padding: 20px 24px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    cursor: default;
    box-sizing: border-box;
}

.rest-banner-left {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.rest-icon-box {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 8px;
    background: var(--rest-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}

.rest-banner-text {
    min-width: 0;
}

.rest-banner-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 2px;
}

.rest-banner-subtitle {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
    line-height: 1.4;
}

.rest-pill-badge {
    margin-left: auto;
    flex-shrink: 0;
    background: var(--rest-bg);
    border: 1px solid var(--rest-border);
    color: var(--rest-accent);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .rest-recovery-banner {
        grid-column: span 1;
        min-height: 80px;
        padding: 16px 20px;
    }
}

@media (max-width: 480px) {
    .rest-recovery-banner {
        grid-column: 1 / -1;
        min-height: 80px;
        padding: 16px;
        gap: 12px;
    }
    .rest-banner-title {
        font-size: 15px;
    }
    .rest-banner-subtitle {
        font-size: 12px;
    }
}

.locked-card {
    opacity: 0.5;
    background: var(--bg-card);
    border: 1px dashed var(--border-card);
    margin-bottom: var(--sp-8);
}
.goal-card {
    margin-bottom: var(--sp-8);
}

/* Detail Pages */
.nav-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: var(--sp-6);
}
.nav-indicator {
    font-size: 14px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    min-width: 36px;
    text-align: center;
}

.day-header-card {
    margin-bottom: var(--sp-4);
}
.day-header-card .type-badge {
    padding: 6px 12px;
    font-size: 11px;
}

/* Callouts */
.callout {
    background: var(--bg-card);
    border-radius: var(--radius-inner);
    padding: var(--sp-4);
    display: flex;
    gap: var(--sp-3);
    margin-bottom: var(--sp-6);
    border-left: 4px solid transparent;
}
.callout svg { flex-shrink: 0; width: 18px; height: 18px; }
.callout-text { font-size: 14px; color: var(--text-primary); }

.callout.type-strength { background: var(--strength-bg); border-left-color: var(--strength-accent); }
.callout.type-strength svg { fill: var(--strength-accent); }
.callout.type-bag { background: var(--bag-bg); border-left-color: var(--bag-accent); }
.callout.type-bag svg { fill: var(--bag-accent); }
.callout.type-technical { background: var(--technical-bg); border-left-color: var(--technical-accent); }
.callout.type-technical svg { fill: var(--technical-accent); }
.callout.type-rest { background: var(--rest-bg); border-left-color: var(--rest-accent); }
.callout.type-rest svg { fill: var(--rest-accent); }

/* Content Section Header */
.content-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--sp-4);
}
.content-header-row .right-actions {
    display: flex;
    gap: var(--sp-4);
    align-items: center;
}
.time-pill {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
}
.time-pill.type-technical { color: var(--technical-accent); }
.time-pill.type-bag { color: var(--bag-accent); }
.time-pill.type-strength { color: var(--strength-accent); }
.time-pill svg { width: 12px; height: 12px; fill: currentColor; }
.session-duration-stat { margin-bottom: var(--sp-3); }

/* Expandable Content Cards */
.item-list {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
}
.item-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-card);
    overflow: hidden;
}
.item-header {
    width: 100%;
    background: transparent;
    border: none;
    font-family: inherit;
    text-align: left;
    padding: var(--sp-4);
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
}
.item-header-content {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    flex: 1;
}
.item-header-top {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}
.item-title-wrap {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
}

/* Numbered Badges */
.num-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}
.type-strength { --accent-color: var(--strength-accent); --checked-bg: rgba(238, 108, 63, 0.05); }
.type-bag { --accent-color: var(--bag-accent); --checked-bg: rgba(217, 154, 61, 0.05); }
.type-technical { --accent-color: var(--technical-accent); --checked-bg: rgba(45, 212, 212, 0.05); }
.type-rest { --accent-color: var(--rest-accent); --checked-bg: rgba(139, 143, 163, 0.05); }
.type-warmup { --accent-color: var(--strength-accent); --checked-bg: rgba(238, 108, 63, 0.05); }

.type-strength .num-badge { background: var(--strength-accent); color: #000; }
.type-bag .num-badge { background: var(--bag-accent); color: #000; }
.type-technical .num-badge { background: var(--technical-accent); color: #000; }
.type-rest .num-badge { background: var(--rest-accent); color: #000; }
.type-warmup .num-badge { background: var(--strength-accent); color: #000; }

.item-chevron {
    color: var(--text-muted);
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.item-chevron svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}
.item-card.expanded .item-chevron {
    transform: rotate(90deg);
}

/* Stats Row inside Cards */
.item-stats {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    flex-wrap: wrap;
}
.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-primary);
}
.stat-item svg { fill: var(--text-muted); width: 14px; height: 14px; }
.stat-item-label {
    color: var(--text-muted);
    font-family: var(--font-ui);
    font-weight: 400;
}
.stat-divider {
    width: 1px;
    height: 12px;
    background: var(--border-card);
}

/* Expanded Content */
.item-content {
    display: none;
    padding: 0 var(--sp-4) var(--sp-4) var(--sp-4);
}
.item-card.expanded .item-content {
    display: block;
}

.item-content-section {
    margin-bottom: var(--sp-4);
}
.item-content-section:last-child {
    margin-bottom: 0;
}
.item-content-section p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: var(--sp-1);
}
.item-callout {
    border-radius: var(--radius-inner);
    padding: 12px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
}
.item-callout svg { flex-shrink: 0; width: 16px; height: 16px; margin-top: 2px; }

.type-strength .item-callout { background: var(--strength-bg); border: 1px solid var(--strength-border); color: var(--strength-accent); }
.type-strength .item-callout svg { fill: var(--strength-accent); }
.type-bag .item-callout { background: var(--bag-bg); border: 1px solid var(--bag-border); color: var(--bag-accent); }
.type-bag .item-callout svg { fill: var(--bag-accent); }
.type-technical .item-callout { background: var(--technical-bg); border: 1px solid var(--technical-border); color: var(--technical-accent); }
.type-technical .item-callout svg { fill: var(--technical-accent); }

/* Muscle Tags */
.muscle-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
    margin-top: var(--sp-2);
}
.muscle-tag {
    background: var(--bg-nested);
    border: 1px solid var(--border-card);
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    color: var(--text-secondary);
}
/* ─── Warmup Hybrid — Day 1 numbered-badge / right-checkbox layout ─── */
.warmup-hybrid-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-3);
    background: var(--bg-nested);
    border-radius: var(--radius-inner);
    border: 1px solid var(--border-card);
    transition: border-color 0.2s, background 0.2s, opacity 0.2s;
}
.warmup-hybrid-row.checked {
    border-color: var(--accent-color, var(--success));
    background: var(--checked-bg, rgba(255, 255, 255, 0.04));
    opacity: 0.65;
}
.warmup-hybrid-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-color, var(--text-muted));
    flex-shrink: 0;
}
.warmup-hybrid-row.checked .warmup-hybrid-num {
    background: var(--accent-color, var(--success));
    color: #000;
}
.warmup-hybrid-content {
    flex: 1;
    min-width: 0;
}
.warmup-hybrid-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.warmup-hybrid-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.warmup-hybrid-stat-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: 3px;
    font-size: 12px;
    line-height: 1.4;
    flex-wrap: wrap;
}
.warmup-hybrid-stat {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-color, var(--text-muted));
    flex-shrink: 0;
}
.warmup-hybrid-dot {
    color: var(--text-muted);
    opacity: 0.5;
    font-size: 11px;
}
.warmup-hybrid-cue {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
}

/* Warmup V2 (Day 5 Refactor) */
/* ─── Warmup V2 — Day 5 responsive card layout ─── */

/* ── Desktop default: side-by-side row ── */
.warmup-v2-row {
    background: var(--bg-nested);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-inner);
    padding: var(--sp-3) var(--sp-3) var(--sp-3) calc(var(--sp-3) + 6px);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--sp-3);
    position: relative;
}

/* Accent bar on left edge */
.warmup-v2-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: var(--radius-inner) 0 0 var(--radius-inner);
    background-color: var(--accent-color);
}
.warmup-v2-row.checked {
    background: var(--checked-bg);
    border-color: var(--success);
}
.warmup-v2-row.checked::before {
    background-color: var(--success);
}
.warmup-v2-row.checked .warmup-v2-icon-box {
    background: rgba(34, 197, 94, 0.12);
    color: var(--success);
}
.warmup-v2-row.checked .warmup-v2-duration {
    color: var(--success);
}

/* Main content area (band1 + band2 stacked, sits left of the button on desktop) */
.warmup-v2-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}

/* Band 1 — icon + title + duration in one horizontal row */
.warmup-v2-band1 {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--sp-2);
}

.warmup-v2-icon-box {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 10px;
    background: rgba(232, 100, 58, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    flex-shrink: 0;
}
.warmup-v2-icon-box svg {
    width: 24px;
    height: 24px;
}

.warmup-v2-header-line {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 5px;
    flex-wrap: nowrap;
    flex: 1;
    min-width: 0;
}
.warmup-v2-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    flex-shrink: 0;
}
.warmup-v2-dot {
    color: var(--text-tertiary);
    font-size: 13px;
    flex-shrink: 0;
}
.warmup-v2-duration {
    font-weight: 600;
    font-size: 13px;
    color: var(--accent-color);
    flex-shrink: 0;
    white-space: nowrap;
}

/* Band 2 — description, sits below band1, still takes full main-column width */
.warmup-v2-band2 {
    width: 100%;
}
.warmup-v2-cue {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

/* Band 3 — START button, pill on desktop (right of row) */
.warmup-v2-band3 {
    flex-shrink: 0;
}
.btn-play-full {
    /* desktop: normal pill button, inherits .btn-play sizing */
}

/* ── Mobile ≤480px: switch to full 3-band stacked layout ── */
@media (max-width: 480px) {
    .warmup-v2-row {
        flex-direction: column;
        align-items: stretch;
        gap: var(--sp-2);
        padding: var(--sp-3) var(--sp-3) var(--sp-3) calc(var(--sp-3) + 6px);
    }
    .warmup-v2-band3 {
        width: 100%;
        margin-top: 2px;
    }
    .btn-play-full {
        width: 100%;
        justify-content: center;
    }
}



.warmup-v2-tip-card {
    background: var(--bg-nested);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-inner);
    padding: var(--sp-4);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--sp-3);
    margin-top: var(--sp-2);
}

.warmup-v2-tip-icon {
    color: var(--accent-color);
    flex-shrink: 0;
}
.warmup-v2-tip-icon svg {
    width: 24px;
    height: 24px;
}

.warmup-v2-tip-content h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.warmup-v2-tip-content p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Nested Lists (Combinations & Drills) */
.nested-list {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    margin-top: var(--sp-2);
}
.nested-row {
    background: var(--bg-nested);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-inner);
    padding: var(--sp-3) var(--sp-4);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    font-size: 14px;
}
.nested-row.checked {
    border-color: var(--accent-color, var(--success));
    background: var(--checked-bg, rgba(255, 255, 255, 0.04));
    opacity: 0.65;
}
.nested-actions {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    flex-shrink: 0;
}
@media (max-width: 480px) {
    .nested-row:has(.btn-play) {
        flex-wrap: wrap;
    }
    .nested-row:has(.btn-play) .nested-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 4px;
    }
}
.nested-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}
.type-bag .nested-icon { background: var(--bag-accent); color: #000; }
.type-technical .nested-icon { background: var(--technical-accent); color: #000; }
.type-technical .nested-icon svg { width: 14px; height: 14px; fill: #000; }

/* Rest Day List */
.rest-list {
    list-style: none;
}
.rest-list li {
    padding: var(--sp-3) 0;
    border-bottom: 1px solid var(--border-card);
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: var(--sp-3);
}
.rest-list li:last-child {
    border-bottom: none;
}
.rest-list li::before {
    content: "•";
    color: var(--rest-accent);
    font-size: 18px;
    line-height: 14px;
}

/* About Page */
.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-card);
    padding: var(--sp-5);
    margin-bottom: var(--sp-4);
}
.about-header {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    margin-bottom: var(--sp-2);
}
.about-header svg { width: 18px; height: 18px; fill: var(--text-secondary); }
.about-title { font-size: 16px; font-weight: 700; }
.about-p { font-size: 14px; color: var(--text-secondary); margin-bottom: var(--sp-2); line-height: 1.6; }
.about-list {
    list-style: none;
    margin-top: var(--sp-3);
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
}
.about-list li {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-3);
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}
.about-list-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.about-list-icon svg { width: 16px; height: 16px; fill: var(--strength-accent); }
.about-list-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--strength-bg);
    color: var(--strength-accent);
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.about-list-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--strength-accent);
    margin-top: 8px;
    flex-shrink: 0;
}
.about-rule-title {
    font-weight: 700;
    color: var(--text-primary);
    display: block;
}
.about-rule-highlight {
    color: var(--strength-accent);
    display: block;
    margin-bottom: 4px;
    font-weight: 700;
}
.about-pill-req {
    background: var(--strength-bg);
    color: var(--strength-accent);
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid var(--strength-border);
}
.about-pill-opt {
    background: var(--bg-page);
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid var(--border-card);
}

/* Persistent Viewport Frame */
.viewport-frame {
    position: fixed;
    inset: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-card);
    pointer-events: none;
    z-index: 9999;
    box-sizing: border-box;
}

/* Phase 2 Timer UI */
.timer-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-4);
}
.timer-modal.hidden {
    display: none;
}
.timer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(4px);
}
.timer-card {
    position: relative;
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-card);
    padding: var(--sp-6);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
}
.timer-card.rest-mode {
    margin-top: auto;
    margin-bottom: var(--sp-4);
}
.timer-card.round-mode {
    border: 2px solid var(--accent-color);
}
.timer-card.round-mode.rest-color {
    border-color: #6366f1; /* distinct rest color */
}
.timer-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-right: 70px;
}
.timer-header h3 {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.timer-header h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}
.btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    border: none;
    border-radius: var(--radius-card);
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text);
}

.timer-display {
    font-family: monospace;
    font-size: 64px;
    font-weight: 700;
    text-align: center;
    line-height: 1;
}
.timer-display.giant {
    font-size: 80px;
}
.work-color { color: var(--accent-color); }
.rest-color { color: #6366f1; }

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: var(--text-primary);
    transition: width 0.1s linear;
}
.progress-bar-fill.work-color { background: var(--accent-color, var(--strength-accent)); }
.progress-bar-fill.rest-color { background: #6366f1; }

/* Phase progress bar — per-exercise drain, shown below session-total bar */
.phase-progress-bar-bg {
    opacity: 0.55;
}

.timer-actions {
    display: flex;
    gap: var(--sp-3);
}
.timer-actions > button {
    flex: 1;
}
.round-title {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    color: var(--text);
}
.timer-cue {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.5;
    background: rgba(255,255,255,0.05);
    padding: var(--sp-3);
    border-radius: var(--radius-card);
}

/* Phase 2 Logging & Dashboard UI */
.dashboard {
    margin-bottom: var(--sp-6);
}
.dash-stats {
    display: flex;
    gap: var(--sp-3);
}
.dash-stat {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-card);
    padding: var(--sp-4);
    text-align: center;
}
.dash-stat .stat-val {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}
.dash-stat .stat-lbl {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.set-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    padding: var(--sp-3);
    background: var(--bg-nested);
    border-radius: var(--radius-inner);
    margin-bottom: var(--sp-2);
    border: 1px solid var(--border-card);
}
.set-row.checked {
    border-color: var(--accent-color, var(--success));
    background: var(--checked-bg, rgba(255, 255, 255, 0.04));
    opacity: 0.65;
}
.set-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-color, var(--text-muted));
    flex-shrink: 0;
}
.set-row.checked .set-num,
.nested-row.checked .set-num {
    background: var(--accent-color, var(--success));
    color: #000;
}
.set-input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.input-val {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-card);
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
    padding: 4px 0;
    font-family: inherit;
    width: 100%;
}
.input-val:focus {
    outline: none;
    border-bottom-color: var(--accent-color);
}
.input-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.btn-check {
    width: 32px;
    height: 32px;
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}
.btn-check::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 44px;
    min-height: 44px;
}
.btn-check svg {
    width: 16px;
    height: 16px;
}
.btn-check.checked {
    background: var(--accent-color, var(--success));
    border-color: var(--accent-color, var(--success));
    color: #000;
}

.nested-row.interactive {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-4);
    border-radius: var(--radius-card);
}
.nested-row.interactive:hover {
    background: rgba(255,255,255,0.05);
}
.play-icon {
    color: var(--accent-color);
}


/* Dashboard & Progress */
.dashboard { margin-top: var(--sp-6); margin-bottom: var(--sp-6); }
.dashboard-stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); margin-bottom: var(--sp-4); }
.stat-card { padding: var(--sp-4); text-align: center; }
.stat-value { font-size: 24px; font-weight: 700; font-family: var(--font-mono); margin-bottom: 4px; color: var(--text-primary); }
.dashboard-card { padding: var(--sp-4); margin-bottom: var(--sp-4); }

.adherence-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.adherence-box { aspect-ratio: 1; border-radius: 4px; background: var(--bg-nested); }
.adherence-box.active { background: var(--strength-accent); }

.chart-wrapper { position: relative; height: 120px; width: 100%; margin-top: var(--sp-4); }
.chart-empty { padding: var(--sp-6); text-align: center; color: var(--text-muted); font-size: 13px; font-style: italic; background: var(--bg-nested); border-radius: 8px; }
.chart-legend { display: flex; justify-content: center; gap: var(--sp-4); margin-top: var(--sp-4); }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-secondary); text-transform: uppercase; }
.legend-color { width: 8px; height: 8px; border-radius: 50%; }

.progression-banner { background: var(--bg-card); border-left: 4px solid var(--strength-accent); padding: var(--sp-4); border-radius: 8px; margin-bottom: var(--sp-4); }

/* Video Modal */
.video-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85); z-index: 100000;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    box-sizing: border-box;
}
.video-modal-card {
    background: var(--bg-card); border-radius: var(--radius-card);
    border: 1px solid rgba(255, 255, 255, 0.07);
    width: 100%; max-width: 400px;
    /* Constrain to viewport so video never pushes below the fold */
    max-height: 90vh;
    overflow: hidden;
    display: flex; flex-direction: column;
    /* Relative so the close button can be absolutely positioned */
    position: relative;
}
.video-modal-title { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 2px; }
.video-modal-subtitle { font-size: 11px; letter-spacing: 0.05em; color: var(--text-muted); text-transform: uppercase; }
/* Close button: fixed overlay in top-right corner of the card */
.btn-close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    /* Ensure it's always tappable */
    -webkit-tap-highlight-color: transparent;
}
.btn-close-modal:hover { background: rgba(0, 0, 0, 0.9); }
.video-container {
    width: 100%; position: relative;
    background: #000;
    /* Fill remaining card height; for short videos this is the bottleneck */
    flex: 1 1 auto;
    min-height: 0;
}
/* For 9:16 Shorts: use a fixed max-height so it never overflows */
.video-container.format-short {
    padding-bottom: min(177.77%, calc(90vh - 32px));
}
/* Standard 16:9 */
.video-container.format-regular { padding-bottom: 56.25%; }
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.video-modal-footer {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    padding: 10px 16px;
    flex-shrink: 0;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
}

/* Ghost Button */
.btn-ghost {
    background: transparent; border: 1px solid currentColor; color: inherit;
    padding: 8px 16px; border-radius: 20px; font-size: 13px; font-weight: 600;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    cursor: pointer; transition: all 0.2s ease;
}
.btn-ghost:hover { background: rgba(255,255,255,0.05); }

/* Demo button (inline with drill rows) */
.btn-demo {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-muted);
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    gap: 4px;
    cursor: pointer;
    flex-shrink: 0;
    margin: 0;
    transition: all 0.2s ease;
}
.btn-demo:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* YouTube-style Play Video Button next to exercise name */
.btn-demo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 15px;
    border-radius: 4px;
    background: #ff0000;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    vertical-align: middle;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
.btn-demo-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 44px;
    min-height: 44px;
}
.btn-demo-icon svg {
    margin-left: 1px;
    fill: currentColor;
}
.btn-demo-icon:hover {
    background: var(--accent-color, var(--strength-accent));
    border-color: var(--accent-color, var(--strength-accent));
    color: #000;
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
.btn-demo-icon:active {
    transform: scale(0.95);
}

/* Day-type specific hover states for play demo icon */
.type-strength .btn-demo-icon:hover,
.btn-demo-icon.type-strength:hover {
    background: var(--strength-accent);
    border-color: var(--strength-accent);
    color: #000;
}
.type-bag .btn-demo-icon:hover,
.btn-demo-icon.type-bag:hover {
    background: var(--bag-accent);
    border-color: var(--bag-accent);
    color: #000;
}
.type-technical .btn-demo-icon:hover,
.btn-demo-icon.type-technical:hover {
    background: var(--technical-accent);
    border-color: var(--technical-accent);
    color: #000;
}
.type-rest .btn-demo-icon:hover,
.btn-demo-icon.type-rest:hover {
    background: var(--rest-accent);
    border-color: var(--rest-accent);
    color: #000;
}

/* Toast Notification */
.toast-notification {
    position: fixed; 
    bottom: calc(24px + env(safe-area-inset-bottom)); 
    left: 50%; 
    transform: translate(-50%, 20px);
    width: calc(100% - 48px);
    max-width: 340px;
    background: rgba(30, 30, 30, 0.95); 
    border-left: 3px solid var(--accent-color);
    color: #ffffff; 
    padding: 16px 20px; 
    border-radius: 12px;
    font-size: 14px; 
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0,0,0,0.8);
    z-index: 9999; 
    opacity: 0; 
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    text-align: left;
}
.toast-notification.show { 
    opacity: 1; 
    transform: translate(-50%, 0);
}


/* Warm-up Block Styles */
.warmup-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-card);
    overflow: hidden;
}
.warmup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 44px;
    cursor: pointer;
    padding: 0;
    margin-bottom: 0;
}
.warmup-label {
    font-size: 13px;
    letter-spacing: 0.08em;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}
.warmup-header-duration {
    font-size: 13px;
    font-family: monospace;
    color: var(--text-secondary);
}
.warmup-chevron {
    transition: transform 0.2s ease;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}
.warmup-chevron svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}
.warmup-chevron.expanded {
    transform: rotate(90deg);
}
.warmup-list {
    display: flex;
    flex-direction: column;
}
.warmup-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.warmup-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.warmup-row.checked {
    border-bottom-color: var(--success);
    background: var(--checked-bg);
}
.warmup-info {
    flex: 1;
    padding-right: var(--sp-3);
}
.warmup-title-row {
    display: flex;
    align-items: baseline;
    gap: var(--sp-2);
    margin-bottom: 4px;
}
.warmup-name {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}
.warmup-duration, .warmup-reps {
    font-family: monospace;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-secondary);
}

/* Common action button styles */
.btn-large {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #111;
    background: var(--text-primary);
    border: none;
    border-radius: var(--radius-inner);
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s ease;
}
.btn-large:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,255,255,0.2);
}

/* Complete Session Footer Button */
.btn-complete-session {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 18px 24px;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #ffffff;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-inner);
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.30);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-complete-session:hover {
    background: linear-gradient(135deg, #34d399 0%, #059669 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(16, 185, 129, 0.45);
}
.btn-complete-session:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.25);
}
.btn-complete-session svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

.btn-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 12px 16px;
    min-height: 44px;
    border-radius: 24px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    margin: 0;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(8px);
}
.btn-play:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.btn-play:active {
    transform: translateY(1px);
}
.btn-play .play-icon svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* Type specific hover accents for play button */
.btn-play.type-bag:hover {
    border-color: var(--bag-accent);
    color: var(--bag-accent);
    background: var(--bag-bg);
}
.btn-play.type-strength:hover {
    border-color: var(--strength-accent);
    color: var(--strength-accent);
    background: var(--strength-bg);
}
.btn-play.type-technical:hover {
    border-color: var(--technical-accent);
    color: var(--technical-accent);
    background: var(--technical-bg);
}
.btn-play.type-rest:hover {
    border-color: var(--rest-accent);
    color: var(--rest-accent);
    background: var(--rest-bg);
}

.btn-icon { color: var(--text-secondary); }

.warmup-cue {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}
.warmup-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.warmup-duration-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-color);
    margin: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

/* Timer Flash Overlay for Switch Sides */
.timer-display.flash-overlay {
    position: relative;
    color: transparent !important;
}
.timer-display.flash-overlay::after {
    content: attr(data-flash);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-primary);
    font-size: clamp(32px, 8vw, 48px);
    font-weight: 800;
    white-space: nowrap;
    animation: flashScale 0.5s ease-out;
}
@keyframes flashScale {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* About / Back Button */
.back-to-week-btn {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    min-height: 48px;
    width: auto;
    max-width: 260px;
    background-color: var(--strength-accent);
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, filter 0.2s;
}
.back-to-week-btn:active {
    transform: scale(0.96);
    filter: brightness(0.9);
}


/* ── Day nav (day view) ── */
.nav-day {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  gap: 8px;
  padding: 14px 16px;
  box-sizing: border-box;
}

/* Back button — ‹ Week */
.nav-back-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--strength-accent);
  font-size: 16px;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 0;
  min-width: 64px;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.nav-back-btn:active {
  opacity: 0.6;
}

.nav-back-btn:hover {
  color: var(--strength-accent);
}

/* Center day title */
.nav-day-title {
  flex: 1;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 8px;
}

/* Prev/Next arrow buttons */
.nav-day-arrows {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.nav-arrow-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.15s ease;
  position: relative;
}
.nav-arrow-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 44px;
  min-height: 44px;
}

.nav-arrow-btn:active {
  opacity: 0.6;
  transform: scale(0.94);
}

.nav-arrow-btn:disabled {
  opacity: 0.25;
  cursor: default;
  pointer-events: none;
}



/* Hide old inline nav bar */
.nav-row {
  display: none !important;
}

/* =====================================================================
   Quick Sessions — Horizontal Scroll Section
   ===================================================================== */

/* Section wrapper sits just below the day-card grid */
.qs-section {
    /* Bleed the scroll container to the full viewport width while keeping
       the header text aligned with the rest of the page content.          */
    overflow: hidden; /* prevent the scroll container from widening the page */
}

/* Section header */
.qs-header {
    padding: 0 var(--sp-4);
    margin-bottom: 12px;
}
.qs-header-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}
.qs-header-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 3px;
}

/* Horizontal scrollable row (Mobile default) */
.qs-scroll-container {
    display: flex;
    flex-direction: row;
    gap: 12px;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    /* Left padding aligns first card with page content.
       Right padding gives breathing room after last card and creates
       the natural peek on the right edge.                            */
    padding: 8px var(--sp-4) 24px var(--sp-4);
    /* Hide scrollbar everywhere */
    scrollbar-width: none;          /* Firefox */
    -ms-overflow-style: none;       /* IE / Edge */
}
.qs-scroll-container::-webkit-scrollbar {
    display: none;                  /* Chrome / Safari / Opera */
}

/* Individual card */
.qs-card {
    flex: 0 0 160px;          /* never grow or shrink */
    width: 160px;
    height: 160px;
    border-radius: 16px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    cursor: pointer;
    position: relative;
    /* Smooth press animation */
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.15s ease;
    -webkit-user-select: none;
    user-select: none;
}
.qs-card:active {
    transform: scale(0.94);
    box-shadow: none;
}
/* Hover glow on non-touch devices */
@media (hover: hover) {
    .qs-card:hover {
        border-color: rgba(255, 255, 255, 0.16);
        transform: translateY(-2px);
    }
}

/* Card content */
.qs-card-emoji {
    font-size: 28px;
    line-height: 1;
    display: block;
    margin-bottom: 6px;
}
.qs-boxer-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    display: inline-block;
    vertical-align: middle;
}
.qs-card-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
    margin-bottom: 2px;
}
.qs-card-duration {
    font-size: 12px;
    color: var(--text-muted);
}

/* Focus pill — pinned to the bottom of the card */
.qs-pill {
    position: absolute;
    bottom: 10px;
    left: 12px;
    right: auto;
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    font-size: 10px;
    font-weight: 600;
    text-transform: capitalize;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 24px);
}
/* Pill colour variants matching the accent system */
.qs-pill-amber {
    background: rgba(217, 154, 61, 0.18);
    color: var(--bag-accent);
}
.qs-pill-orange {
    background: rgba(238, 108, 63, 0.18);
    color: var(--strength-accent);
}
.qs-pill-cyan {
    background: rgba(45, 212, 212, 0.18);
    color: var(--technical-accent);
}
.qs-pill-red {
    background: rgba(239, 68, 68, 0.18);
    color: #f87171;
}
.qs-pill-teal {
    background: rgba(20, 184, 166, 0.18);
    color: #2dd4bf;
}

/* Quick Session card type gradients — reuse day card accent system */
.qs-card.qs-type-bag {
    background: linear-gradient(145deg, var(--bag-bg) 0%, var(--bg-card) 60%);
    border-left: 3px solid var(--bag-accent);
}
.qs-card.qs-type-strength {
    background: linear-gradient(145deg, var(--strength-bg) 0%, var(--bg-card) 60%);
    border-left: 3px solid var(--strength-accent);
}
.qs-card.qs-type-technical {
    background: linear-gradient(145deg, var(--technical-bg) 0%, var(--bg-card) 60%);
    border-left: 3px solid var(--technical-accent);
}
.qs-card.qs-type-rest {
    background: linear-gradient(145deg, var(--rest-bg) 0%, var(--bg-card) 60%);
    border-left: 3px solid var(--rest-accent);
}
.qs-card.qs-type-bag {
    background: linear-gradient(145deg, var(--bag-bg) 0%, var(--bg-card) 60%);
    border-left: 3px solid var(--bag-accent);
}

/* Quick Sessions Desktop Responsive Grid (screen width ≥ 768px) */
@media (min-width: 768px) {
    .qs-section {
        overflow: visible;
    }
    .qs-header {
        padding: 0;
    }
    .qs-scroll-container {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        gap: 12px;
        width: 100%;
        overflow-x: visible;
        padding: 8px 0 24px 0;
    }
    .qs-card {
        flex: none;
        width: auto;
        height: auto;
        aspect-ratio: 1 / 1;
        padding: 16px;
    }
    .qs-card-emoji {
        font-size: 40px;
        margin-bottom: 8px;
    }
    .qs-boxer-icon {
        width: 40px;
        height: 40px;
    }
    .qs-card-title {
        font-size: 16px;
        font-weight: 700;
        line-height: 1.25;
        margin-bottom: 4px;
    }
    .qs-card-duration {
        font-size: 13px;
    }
    .qs-pill {
        bottom: 14px;
        left: 16px;
        max-width: calc(100% - 32px);
    }
}

/* =====================================================================
   Quick Sessions — Phase 2 Styles
   ===================================================================== */

@keyframes countdownPulse {
    0% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; text-shadow: 0 0 20px rgba(238, 108, 63, 0.4); }
    100% { transform: scale(1); opacity: 1; }
}

.qs-cooldown-complete {
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    color: var(--bag-accent); /* Amber */
    padding: var(--sp-6) 0;
    margin-bottom: var(--sp-8);
}

/* Shadow Boxing Round Detail Instructions */
.shadow-round-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.shadow-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 4px;
    margin-bottom: 8px;
}
.shadow-bullets {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    text-align: left;
}
.shadow-bullets li {
    margin-bottom: 3px;
}

/* Accessibility Focus Ring (Keyboard navigation only) */
button:focus-visible,
[role="button"]:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
.day-card:focus-visible {
    outline: 2px solid var(--strength-accent) !important;
    outline-offset: 2px !important;
}

/* ==========================================
   PWA UPDATE BANNER
   ========================================== */
#update-banner {
    position: fixed;
    bottom: calc(env(safe-area-inset-bottom) + 16px);
    left: 16px;
    right: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    display: none;
    flex-direction: column;
    gap: 12px;
    animation: slideUp 0.3s ease-out;
}

#update-banner h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
}

#update-banner p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.4;
}

.update-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.update-actions button {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.btn-update-later {
    background: transparent;
    border: 1px solid var(--border-card);
    color: var(--text-muted);
}

.btn-update-now {
    background: var(--primary);
    border: none;
    color: white;
}

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

