/* Workout Tracker Pro - Frontend Styles */
:root {
    --wtp-gold: #eac996;
    --wtp-gold-light: #f5e6cc;
    --wtp-brown: #937f68;
    --wtp-brown-light: #d4c4b0;
    --wtp-blue: #7cb6e4;
    --wtp-blue-dark: #4188be;
    --wtp-green: #5e8300;
    --wtp-green-light: #e8f0d4;
    --wtp-yellow: #d4a843;
    --wtp-yellow-light: #faf3e0;
    --wtp-red: #c45c4a;
    --wtp-gray-50: #faf8f5;
    --wtp-gray-100: #f5f0ea;
    --wtp-gray-200: #e8e0d6;
    --wtp-gray-300: #d4c9bc;
    --wtp-gray-400: #b0a494;
    --wtp-gray-500: #8a7d6b;
    --wtp-gray-600: #6b5f4f;
    --wtp-gray-700: #4a4237;
    --wtp-gray-900: #2d2924;
    --wtp-radius: 14px;
    --wtp-shadow: 0 1px 3px rgba(45,41,36,.08), 0 1px 2px rgba(45,41,36,.05);
    --wtp-shadow-md: 0 4px 12px rgba(45,41,36,.1);
}

.wtp-app {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 860px;
    margin: 0 auto;
    color: var(--wtp-gray-900);
    direction: ltr;
}
.wtp-error { color: var(--wtp-red); padding: 12px; background: #fce8e5; border-radius: 8px; }

/* ── Minimalist Line Icons (CSS-based) ── */
.wtp-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    flex-shrink: 0;
}
.wtp-icon-dumbbell::before { content: ""; display: block; width: 14px; height: 3px; background: currentColor; border-radius: 1px; position: relative; }
.wtp-icon-dumbbell::after { content: ""; display: block; width: 3px; height: 10px; background: currentColor; border-radius: 1px; position: absolute; left: 2px; top: -3.5px; box-shadow: 7px 0 0 currentColor; }

/* ── Plan Header ── */
.wtp-plan-header {
    background: linear-gradient(135deg, var(--wtp-red) 0%, var(--wtp-gold) 100%);
    color: #fff;
    border-radius: var(--wtp-radius);
    padding: 28px 28px 20px;
    margin-bottom: 20px;
}
.wtp-plan-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.wtp-plan-name { margin: 0 0 6px; font-size: 22px; font-weight: 700; color: #fff; }
.wtp-plan-description { margin: 6px 0 16px; font-size: 14px; opacity: .85; }
.wtp-week-badge { background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.3); color: #fff; padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.wtp-overall-progress { margin-top: 16px; }
.wtp-progress-label { font-size: 13px; opacity: .85; margin-bottom: 6px; }
.wtp-progress-sub { font-size: 12px; opacity: .7; margin-top: 4px; }
.wtp-progress-bar { height: 6px; background: rgba(255,255,255,.2); border-radius: 10px; overflow: hidden; }
.wtp-progress-fill { height: 100%; background: var(--wtp-gray-900); border-radius: 10px; transition: width .5s ease; }

/* ── Session Tabs ── */
.wtp-session-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 2px;
}
.wtp-session-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 20px;
    border: 1px solid var(--wtp-gray-200);
    background: #fff;
    border-radius: 10px;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
    font-size: 14px;
    font-family: inherit;
}
.wtp-session-tab:hover { border-color: var(--wtp-brown); background: var(--wtp-gold-light); }
.wtp-session-tab.active { background: var(--wtp-gray-900); color: #fff; border-color: var(--wtp-gray-900); }
.wtp-tab-name { font-weight: 600; }
.wtp-tab-label { font-size: 11px; opacity: .75; }
.wtp-tab-done { font-size: 16px; }

/* ── Session Panel ── */
.wtp-session-panel { display: none; }
.wtp-session-panel.active { display: block; }
.wtp-session-info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    background: var(--wtp-gray-50);
    border: 1px solid var(--wtp-gray-200);
    border-radius: 10px;
    padding: 10px 16px;
    margin-bottom: 16px;
    font-size: 13px;
}
.wtp-session-info-left { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.wtp-info-day { background: var(--wtp-gold-light); color: var(--wtp-brown); padding: 3px 10px; border-radius: 20px; font-weight: 600; border: 1px solid var(--wtp-brown); }
.wtp-info-focus { background: var(--wtp-yellow-light); color: #7a5c1a; padding: 3px 10px; border-radius: 20px; border: 1px solid var(--wtp-yellow); }
.wtp-session-progress-mini { display: flex; align-items: center; gap: 10px; color: var(--wtp-gray-600); font-weight: 600; }
.wtp-session-progress-mini .wtp-mini-bar {
    width: 80px;
    height: 4px;
    background: var(--wtp-gray-200);
    border-radius: 10px;
    overflow: hidden;
}
.wtp-session-progress-mini .wtp-mini-fill {
    height: 100%;
    background: var(--wtp-green);
    border-radius: 10px;
    transition: width .5s ease;
}
.wtp-no-exercises-msg { text-align: center; padding: 40px; color: var(--wtp-gray-500); }

/* ── Exercise Cards ── */
.wtp-exercises-list { display: flex; flex-direction: column; gap: 12px; }

.wtp-exercise-card {
    background: #fff;
    border: 1px solid var(--wtp-gray-200);
    border-radius: var(--wtp-radius);
    box-shadow: var(--wtp-shadow);
    display: flex;
    gap: 0;
    overflow: hidden;
    transition: all .2s;
    position: relative;
}
.wtp-exercise-card:hover { box-shadow: var(--wtp-shadow-md); }
.wtp-exercise-card.completed {
    background: var(--wtp-green-light);
    border-color: #b8d48a;
}
.wtp-exercise-card.completed .wtp-ex-content { opacity: .75; }

/* Number badge */
.wtp-ex-number {
    background: var(--wtp-brown);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    width: 36px;
    min-width: 36px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 18px;
    border-radius: var(--wtp-radius) 0 0 var(--wtp-radius);
}
.wtp-exercise-card.completed .wtp-ex-number { background: var(--wtp-green); }

/* Content */
.wtp-ex-content { flex: 1; padding: 16px; overflow: hidden; min-width: 0; }

.wtp-ex-top-row { display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; margin-bottom: 10px; }
.wtp-ex-info { flex: 1; min-width: 0; }
.wtp-ex-title { margin: 0 0 8px; font-size: 17px; font-weight: 700; color: var(--wtp-gray-900); }

.wtp-ex-targets { display: flex; gap: 6px; flex-wrap: wrap; }
.wtp-target-pill {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
}
.wtp-target-pill.sets  { background: #f0ebe3; color: var(--wtp-brown);border: 1px solid var(--wtp-brown); }
.wtp-target-pill.reps  { background: #eef4fa; color: var(--wtp-blue-dark); border: 1px solid  var(--wtp-blue-dark);}
.wtp-target-pill.weight{ background: var(--wtp-yellow-light); color: #7a5c1a; border: 1px solid var(--wtp-yellow);}
.wtp-target-pill.rest  { background: var(--wtp-green-light); color: var(--wtp-green); border: 1px solid var(--wtp-green);  }

/* Media */
.wtp-ex-media { display: flex; gap: 8px; align-items: flex-start; flex-shrink: 0; }
.wtp-ex-photo {
    width: 80px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform .2s;
    border: 2px solid var(--wtp-gray-200);
}
.wtp-ex-photo:hover { transform: scale(1.05); }
.wtp-ex-photo.wtp-photo-expanded {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%) scale(1);
    width: auto;
    height: auto;
    max-width: 90vw;
    max-height: 85vh;
    z-index: 99999;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
    border: 3px solid #fff;
}

/* YouTube button */
.wtp-yt-btn {
    position: relative;
    display: block;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #f5e0e0;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: transform .2s;
    background: #000;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
}
.wtp-yt-btn-landscape { width: 100px; height: 70px; }
.wtp-yt-btn-short { width: 50px; height: 88px; }
.wtp-yt-btn:hover { transform: scale(1.06); }
.wtp-yt-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}
.wtp-yt-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(196, 92, 74, .92);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    padding-left: 2px;
    pointer-events: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* History Button */
.wtp-history-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--wtp-brown);
    background: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
    color: var(--wtp-brown);
}
.wtp-history-btn:hover {
    background: var(--wtp-gold-light);
    transform: scale(1.1);
}

/* Notes */
.wtp-ex-notes-row {
    font-size: 13px;
    color: var(--wtp-gray-600);
    background: var(--wtp-gray-50);
    border-left: 3px solid var(--wtp-yellow);
    padding: 8px 12px;
    border-radius: 0 6px 6px 0;
    margin-bottom: 10px;
}
.wtp-notes-icon { margin-right: 6px; }

/* ================================================================ */
/* COMPACT MINIMALIST LOG ROW — single line, tight spacing          */
/* ================================================================ */
.wtp-log-row { margin-top: 8px; }

.wtp-log-compact {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    background: var(--wtp-gray-50);
    border: 1px solid var(--wtp-gray-200);
    border-radius: 10px;
    padding: 10px 12px;
}

.wtp-log-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.wtp-log-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--wtp-gray-400);
    text-transform: uppercase;
    letter-spacing: .04em;
    line-height: 1;
}

.wtp-log-inputs {
    display: flex;
    gap: 4px;
}

.wtp-log-inputs input,
.wtp-log-inputs select {
    padding: 5px 7px;
    border: 1px solid var(--wtp-gray-300);
    border-radius: 6px;
    font-size: 13px;
    width: 58px;
    color: var(--wtp-gray-900);
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    font-family: inherit;
    text-align: center;
}

.wtp-log-inputs input:focus,
.wtp-log-inputs select:focus {
    outline: none;
    border-color: var(--wtp-brown);
    box-shadow: 0 0 0 2px rgba(147,127,104,.1);
}

.wtp-log-inputs select {
    width: 52px;
    padding-right: 3px;
    font-size: 12px;
    max-height: 36px;
}

.wtp-log-divider {
    font-size: 14px;
    color: var(--wtp-gray-400);
    font-weight: 700;
    padding-bottom: 5px;
    align-self: flex-end;
}

.wtp-log-notes-group {
    flex: 1;
    min-width: 120px;
}

.wtp-log-notes-group input {
    width: 100%;
    text-align: left;
    padding: 5px 10px;
    border-color: #b7bbc0;
    color: #3a3e44;
    font-size: 14px;
}

/* Rest Timer — inline with log row */
.wtp-rest-timer-wrap {
    margin-top: 8px;
}
.wtp-rest-timer-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--wtp-gray-100);
    border: 1px solid var(--wtp-gray-300);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--wtp-gray-700);
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}
.wtp-rest-timer-btn:hover {
    background: var(--wtp-gold-light);
    border-color: var(--wtp-gold);
    color: var(--wtp-brown);
}
.wtp-rest-timer-btn.wtp-rest-active {
    background: var(--wtp-yellow-light);
    border-color: var(--wtp-yellow);
    color: var(--wtp-yellow);
    animation: wtp-pulse 1s infinite;
}
.wtp-rest-timer-btn.wtp-rest-done {
    background: var(--wtp-green-light);
    border-color: var(--wtp-green);
    color: var(--wtp-green);
}
@keyframes wtp-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
.wtp-rest-display {
    font-variant-numeric: tabular-nums;
    min-width: 36px;
    display: inline-block;
    text-align: center;
}

/* Check Button */
.wtp-ex-check-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 12px;
    background: var(--wtp-gray-50);
    border-left: 1px solid var(--wtp-gray-200);
    min-width: 70px;
}
.wtp-exercise-card.completed .wtp-ex-check-wrap { background: var(--wtp-green-light); border-left-color: #b8d48a; }

.wtp-check-btn {
    width: auto;
    height: auto;
    border: none;
    background: transparent;
    padding: 0!important;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    line-height: 1;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    color: var(--wtp-gray-400);
}
.wtp-check-btn:hover { border-color: var(--wtp-green); background: var(--wtp-green-light); transform: scale(1.1); color: var(--wtp-green); }
.wtp-check-btn.done { background: var(--wtp-green-light); border-color: var(--wtp-green); color: var(--wtp-green); }
.wtp-check-btn.loading { opacity: .5; pointer-events: none; }

.wtp-completed-label { font-size: 11px; font-weight: 700; color: var(--wtp-green); text-transform: uppercase; }
.wtp-completed-log { font-size: 11px; color: var(--wtp-gray-600); text-align: center; max-width: 70px; word-break: break-word; }
.wtp-edit-log-btn {
    font-size: 11px;
    background: none;
    border: 1px solid var(--wtp-gray-300);
    border-radius: 4px;
    padding: 2px 6px;
    cursor: pointer;
    color: var(--wtp-gray-600);
    font-family: inherit;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}
.wtp-edit-log-btn:hover { background: var(--wtp-gray-100); }

/* Session Complete Row */
.wtp-session-complete-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    padding: 16px;
    background: var(--wtp-gray-50);
    border-radius: 10px;
    border: 1px solid var(--wtp-gray-200);
}
.wtp-mark-all-btn {
    padding: 10px 20px;
    background: var(--wtp-green);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
    font-family: inherit;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}
.wtp-mark-all-btn:hover { background: #4a6b00; }
.wtp-all-done-msg { color: var(--wtp-green); font-weight: 700; font-size: 16px; }

/* ================================================================ */
/* History Modal                                                        */
/* ================================================================ */
.wtp-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(45,41,36,.5);
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}
.wtp-history-modal {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    max-width: 720px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(45,41,36,.2);
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
    box-sizing: border-box;
}
.wtp-history-modal h3 {
    margin: 0 0 16px;
    font-size: 17px;
    padding-right: 30px;
}
.wtp-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--wtp-gray-500);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all .2s;
    line-height: 1;
    padding: 0;
}
.wtp-modal-close:hover {
    background: var(--wtp-gray-100);
    color: var(--wtp-gray-900);
}
.wtp-loading, .wtp-no-history {
    text-align: center;
    padding: 30px;
    color: var(--wtp-gray-500);
}

/* History Table */
.wtp-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.wtp-history-table th {
    background: var(--wtp-gray-100);
    padding: 10px 8px;
    text-align: left;
    font-weight: 600;
    color: var(--wtp-gray-700);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.wtp-history-table td {
    padding: 8px;
    border-bottom: 1px solid var(--wtp-gray-100);
    vertical-align: middle;
}
.wtp-history-table tr:hover {
    background: var(--wtp-gray-50);
}

/* History action buttons */
.wtp-history-actions {
    display: flex;
    gap: 4px;
}
.wtp-history-edit-btn,
.wtp-history-delete-btn {
    background: none;
    border: 1px solid var(--wtp-gray-300);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
    transition: all .2s;
}
.wtp-history-edit-btn { color: var(--wtp-brown); }
.wtp-history-edit-btn:hover { background: var(--wtp-gold-light); border-color: var(--wtp-gold); }
.wtp-history-delete-btn { color: var(--wtp-red); }
.wtp-history-delete-btn:hover { background: #fce8e5; border-color: var(--wtp-red); }

/* Inline edit form in history */
.wtp-history-edit-form {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}
.wtp-history-edit-form input,
.wtp-history-edit-form select {
    padding: 4px 6px;
    border: 1px solid var(--wtp-gray-300);
    border-radius: 4px;
    font-size: 12px;
    font-family: inherit;
    width: 60px;
}
.wtp-history-edit-form input[type="text"] { width: 100px; }
.wtp-history-edit-form .wtp-save-edit-btn {
    background: var(--wtp-green);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
}
.wtp-history-edit-form .wtp-cancel-edit-btn {
    background: var(--wtp-gray-100);
    color: var(--wtp-gray-600);
    border: 1px solid var(--wtp-gray-300);
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
}

/* History Tabs */
.wtp-history-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--wtp-gray-200);
    padding-bottom: 8px;
}
.wtp-history-tab {
    padding: 8px 16px;
    background: none;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--wtp-gray-500);
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}
.wtp-history-tab:hover {
    background: var(--wtp-gray-100);
    color: var(--wtp-gray-700);
}
.wtp-history-tab.active {
    background: var(--wtp-gray-900);
    color: #fff;
}
.wtp-history-panel {
    display: none;
}
.wtp-history-panel.active {
    display: block;
}
#wtp-history-graph-panel {
    min-height: 300px;
    position: relative;
}
#wtp-progress-chart {
    max-height: 350px;
}

/* ================================================================ */
/* Phase & Rotation Bar                                               */
/* ================================================================ */
.wtp-phase-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding: 8px 14px;
    background: rgba(255,255,255,.15);
    border-radius: 8px;
    font-size: 13px;
    flex-wrap: wrap;
}
.wtp-phase-name {
    font-weight: 700;
    color: #fff;
}
.wtp-phase-targets {
    color: rgba(255,255,255,.85);
}
.wtp-rotation-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 13px;
    color: rgba(255,255,255,.85);
}
.wtp-rotation-label {
    font-weight: 600;
}
.wtp-rotation-pattern {
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.2);
    font-weight: 600;
}
.wtp-rotation-pattern.active {
    background: var(--wtp-brown);
    color: #fff;
    border-color: var(--wtp-gray-600);
}

/* ================================================================ */
/* YouTube Modal                                                      */
/* ================================================================ */
#wtp-yt-modal.wtp-yt-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(45, 41, 36, 0.82);
    z-index: 2147483647;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    animation: wtp-fade-in .18s ease;
}
@keyframes wtp-fade-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes wtp-slide-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.wtp-yt-modal-box {
    background: #111;
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.7);
    animation: wtp-slide-up .22s ease;
}
.wtp-yt-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 16px;
    background: #1c1c1c;
    flex-shrink: 0;
}
.wtp-yt-modal-title {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wtp-yt-modal-close {
    background: transparent;
    border: none;
    color: #999;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    flex-shrink: 0;
    transition: color .15s, background .15s;
    font-family: inherit;
}
.wtp-yt-modal-close:hover { color: #fff; background: rgba(255,255,255,.12); }
.wtp-yt-modal-embed {
    width: 100%;
    background: #000;
    overflow: hidden;
    flex-shrink: 0;
}
.wtp-yt-modal-embed iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: none;
}

/* ================================================================ */
/* Mobile Responsive                                                  */
/* ================================================================ */
@media (max-width: 600px) {
    .wtp-plan-header { padding: 20px; }
    .wtp-plan-name { font-size: 18px; }
    .wtp-ex-top-row { flex-direction: column; }
    .wtp-ex-media { flex-direction: row; flex-wrap: wrap; }

    /* Compact log on mobile */
    .wtp-log-compact {
        gap: 6px;
        padding: 8px;
    }
    .wtp-log-inputs input,
    .wtp-log-inputs select {
        width: 50px;
        font-size: 12px;
        padding: 4px 5px;
    }
    .wtp-log-inputs select {
        width: 46px;
    }
    .wtp-log-divider {
        display: none;
    }
    .wtp-log-notes-group {
        min-width: 100%;
        flex-basis: 100%;
    }
    .wtp-log-notes-group input {
        width: 100%;
    }

    .wtp-ex-check-wrap { min-width: 60px; padding: 12px 8px; }
    .wtp-check-btn { width: 42px; height: 42px; font-size: 18px; }
    .wtp-history-btn { width: 36px; height: 36px; font-size: 16px; }

    .wtp-history-modal {
        padding: 16px;
        max-height: 90vh;
        margin: 8px;
    }
    .wtp-history-table {
        font-size: 12px;
    }
    .wtp-history-table th,
    .wtp-history-table td {
        padding: 6px 4px;
    }
}

/* Prevent body scroll when modal is open */
body.wtp-modal-open {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* iOS Safari Hardware Acceleration */
#wtp-yt-modal.wtp-yt-modal-overlay,
.wtp-yt-modal-box,
.wtp-modal-overlay {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Mobile tap fixes */
.wtp-check-btn,
.wtp-session-tab,
.wtp-mark-all-btn,
.wtp-yt-btn,
.wtp-yt-modal-close,
.wtp-edit-log-btn,
.wtp-history-btn,
.wtp-history-tab,
.wtp-modal-close,
.wtp-rest-timer-btn,
.wtp-history-edit-btn,
.wtp-history-delete-btn {
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}

/* Mobile YouTube Fixes */
@media (max-width: 600px) {
    #wtp-yt-modal.wtp-yt-modal-overlay {
        padding: 8px;
        align-items: flex-start;
        padding-top: 40px;
    }
    .wtp-yt-modal-box {
        max-height: 90vh;
        width: 100%;
    }
    .wtp-yt-modal-embed {
        min-height: 200px;
    }
}
/* Add these new rules */
.wtp-mini-counts {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--wtp-gray-600);
    font-weight: 600;
}
.wtp-mini-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--wtp-gray-400);
    margin-right: 2px;
}
.wtp-mini-bar-today {
    width: 80px;
    height: 4px;
    background: var(--wtp-gray-200);
    border-radius: 10px;
    overflow: hidden;
}

/* ================================================================ */
/* Week Navigation                                                      */
/* ================================================================ */
.wtp-week-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding: 10px 16px;
    background: rgba(255,255,255,.12);
    border-radius: 10px;
    flex-wrap: wrap;
}
.wtp-week-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255,255,255,.2);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}
.wtp-week-nav-btn:hover {
    background: rgba(255,255,255,.35);
    border-color: rgba(255,255,255,.5);
}
.wtp-week-nav-btn.wtp-week-disabled {
    opacity: .35;
    cursor: not-allowed;
    pointer-events: none;
}
.wtp-week-nav-current {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #fff;
}
.wtp-week-nav-label {
    font-size: 12px;
    opacity: .7;
}
.wtp-week-nav-week {
    font-size: 15px;
    font-weight: 700;
}
.wtp-week-nav-historical {
    font-size: 11px;
    opacity: .7;
    background: rgba(255,255,255,.15);
    padding: 2px 8px;
    border-radius: 20px;
}
.wtp-week-back-to-current {
    text-align: center;
    margin-top: 8px;
}
.wtp-week-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,.85);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    padding: 4px 12px;
    background: rgba(255,255,255,.1);
    border-radius: 20px;
    transition: all .2s;
}
.wtp-week-back-link:hover {
    background: rgba(255,255,255,.25);
    color: #fff;
}

/* ================================================================ */
/* Last Session Hint                                                    */
/* ================================================================ */
.wtp-last-session-hint {
    font-size: 12px;
    color: var(--wtp-gray-500);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.wtp-last-session-hint svg {
    color: var(--wtp-brown);
    flex-shrink: 0;
}
.wtp-last-session-hint strong {
    color: var(--wtp-brown);
    font-weight: 700;
}
.wtp-last-session-hint span {
    color: var(--wtp-gray-400);
    font-size: 11px;
}
.wtp-exercise-card.completed .wtp-last-session-hint {
    opacity: 0.7;
}

/* ================================================================ */
/* History Date Edit Input                                              */
/* ================================================================ */
.wtp-history-edit-form .wtp-edit-date {
    width: 130px;
    padding: 4px 6px;
    border: 1px solid var(--wtp-gray-300);
    border-radius: 4px;
    font-size: 12px;
    font-family: inherit;
    color: var(--wtp-gray-900);
}

/* Mobile week nav */
@media (max-width: 600px) {
    .wtp-week-nav {
        gap: 8px;
        padding: 8px 12px;
    }
    .wtp-week-nav-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    .wtp-week-nav-week {
        font-size: 13px;
    }
}