/* ══════════════════════════════════════════════════
   TRAINING MODE — Full-screen dark training view
══════════════════════════════════════════════════ */

.training-overlay {
    position: fixed;
    inset: 0;
    z-index: 5000;
    background: #0F172A;
    display: flex;
    flex-direction: column;
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.training-overlay.active { opacity: 1; }

/* ── Top Bar ─────────────────────────── */
.t-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 0;
    flex-shrink: 0;
}
.t-close {
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; color: rgba(255,255,255,0.5);
    border: none; cursor: pointer;
}

/* Timer */
.timer-row { display: flex; align-items: center; gap: 6px; }
.timer-pill {
    display: flex; align-items: center; gap: 6px;
    border: 1px solid rgba(255,255,255,0.12); border-radius: 8px;
    padding: 6px 11px; cursor: pointer; background: none;
    font-family: inherit;
}
.timer-pill.on { background: rgba(0,217,163,0.12); border-color: rgba(0,217,163,0.30); }
.timer-val { font-size: 13px; font-weight: 700; color: #00D9A3; font-variant-numeric: tabular-nums; }
.timer-lbl { font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.38); }
.timer-reset {
    font-size: 11px; font-weight: 600; color: rgba(255,255,255,0.28);
    padding: 2px; background: none; border: none; cursor: pointer;
    font-family: inherit; display: none;
}

/* ── Progress ────────────────────────── */
.t-prog { padding: 10px 20px 0; flex-shrink: 0; }
.t-prog-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.t-prog-lbl { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.30); }
.t-all-btn {
    display: flex; align-items: center; gap: 5px;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.09);
    border-radius: 8px; padding: 5px 10px;
    font-size: 11px; font-weight: 600; color: rgba(255,255,255,0.38);
    cursor: pointer; font-family: inherit;
}
.t-dots { display: flex; gap: 4px; }
.tdot { flex: 1; height: 3px; border-radius: 99px; background: rgba(255,255,255,0.10); transition: background 0.3s; }
.tdot.on { background: #00D9A3; }

/* ── Main Slide ──────────────────────── */
.t-main { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 0 28px; overflow: hidden; }
.t-slide { transition: opacity 0.20s ease, transform 0.20s ease; }
.t-phase { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #00D9A3; margin-bottom: 8px; }
.t-exnum { font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.20); margin-bottom: 4px; }
.t-name { font-size: 28px; font-weight: 900; color: white; line-height: 1.08; letter-spacing: -0.8px; margin-bottom: 18px; }
@media (min-width: 768px) { .t-name { font-size: 33px; } }
.t-chips { display: flex; gap: 9px; margin-bottom: 16px; flex-wrap: wrap; }
.t-chip {
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.09);
    border-radius: 12px; padding: 10px 13px; min-width: 60px;
}
.t-chip-v { font-size: 19px; font-weight: 800; color: white; }
.t-chip-k { font-size: 10px; font-weight: 700; color: rgba(255,255,255,0.30); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 1px; }
.t-desc { font-size: 13px; line-height: 1.65; color: rgba(255,255,255,0.38); margin-bottom: 16px; }
.t-detail-btn {
    display: flex; align-items: center; gap: 8px; width: 100%;
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px; padding: 11px 14px;
    font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.38);
    cursor: pointer; font-family: inherit;
}
.t-detail-btn .arr { margin-left: auto; color: rgba(255,255,255,0.18); }

/* Done slide */
.t-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.t-done-icon {
    width: 68px; height: 68px; border-radius: 50%;
    background: linear-gradient(135deg, #00D9A3 0%, #6366F1 100%);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; margin-bottom: 4px;
}
.t-done-title { font-size: 28px; font-weight: 900; color: white; letter-spacing: -0.8px; }
.t-done-sub { font-size: 13px; color: rgba(255,255,255,0.38); }
.t-done-stats { display: flex; gap: 12px; margin-top: 10px; }
.t-done-stat { background: rgba(255,255,255,0.06); border-radius: 16px; padding: 13px 18px; min-width: 80px; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.t-done-sv { font-size: 22px; font-weight: 800; color: white; }
.t-done-sk { font-size: 10px; font-weight: 700; color: rgba(255,255,255,0.28); text-transform: uppercase; letter-spacing: 0.08em; }

/* ── Footer ──────────────────────────── */
.t-footer { padding: 10px 20px 26px; flex-shrink: 0; display: flex; flex-direction: column; gap: 8px; }
.t-hint { text-align: center; font-size: 10px; font-weight: 600; color: rgba(255,255,255,0.13); letter-spacing: 0.08em; text-transform: uppercase; }
.t-note-btn {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px; padding: 9px;
    font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.28);
    cursor: pointer; font-family: inherit;
}
.t-nav { display: flex; gap: 8px; }
.t-prev {
    width: 50px; height: 50px; border-radius: var(--r-lg);
    background: rgba(255,255,255,0.06) !important; border: 1px solid rgba(255,255,255,0.09) !important;
    font-size: 20px; color: rgba(255,255,255,0.4) !important;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
}
.t-prev:disabled { opacity: 0.20; cursor: default; }
.t-next {
    flex: 1; height: 50px; border-radius: 16px;
    font-size: 14px; font-weight: 700; color: #0F172A;
    background: #00D9A3; border: none; cursor: pointer;
    font-family: inherit;
}
.t-next.grad { background: linear-gradient(135deg, #00D9A3 0%, #6366F1 100%); color: white; }
.t-next.light { background: white; color: #0F172A; }

/* ── Bottom Sheets ───────────────────── */
.t-sheet-ov {
    position: fixed; inset: 0; z-index: 5100;
    background: rgba(15,23,42,0.6); backdrop-filter: blur(4px);
    display: flex; flex-direction: column; justify-content: flex-end;
    opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.t-sheet-ov.open { opacity: 1; pointer-events: all; }
.t-sheet-box {
    background: #1E293B; border-radius: 24px 24px 0 0;
    max-height: 80%; overflow-y: auto; padding-bottom: 36px;
    transform: translateY(20px);
    transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
}
.t-sheet-ov.open .t-sheet-box { transform: translateY(0); }
.sh-handle { display: flex; justify-content: center; padding: 12px 0 6px; }
.sh-bar { width: 36px; height: 4px; background: rgba(255,255,255,0.12); border-radius: 99px; }
.sh-inner { padding: 4px 20px 0; }
.sh-title-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.sh-title { font-size: 18px; font-weight: 800; color: white; letter-spacing: -0.3px; line-height: 1.2; }
.sh-close {
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; color: rgba(255,255,255,0.45); flex-shrink: 0;
    border: none; cursor: pointer;
}

/* Detail sheet */
.sh-chips { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.sh-chip { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.09); border-radius: 12px; padding: 9px 12px; }
.sh-chip .cv { font-size: 17px; font-weight: 800; color: white; }
.sh-chip .ck { font-size: 10px; font-weight: 700; color: rgba(255,255,255,0.30); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 2px; }
.sh-body { font-size: 13px; line-height: 1.65; color: rgba(255,255,255,0.48); margin-bottom: 16px; }
.sh-tips { background: rgba(0,217,163,0.06); border: 1px solid rgba(0,217,163,0.14); border-radius: 12px; padding: 13px 14px; }
.sh-tips-hdr { font-size: 10px; font-weight: 700; color: #00D9A3; text-transform: uppercase; letter-spacing: 0.10em; margin-bottom: 9px; }
.sh-tip { display: flex; gap: 8px; margin-bottom: 7px; }
.sh-tip:last-child { margin-bottom: 0; }
.sh-tip-arr { color: #00D9A3; font-size: 12px; margin-top: 1px; flex-shrink: 0; }
.sh-tip-txt { font-size: 13px; line-height: 1.5; color: rgba(255,255,255,0.52); }

/* Overview sheet */
.ov-btn {
    display: flex; align-items: center; gap: 10px;
    background: transparent; border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px; padding: 11px 12px; width: 100%;
    margin-bottom: 7px; text-align: left; cursor: pointer;
    font-family: inherit; transition: background 0.15s, border-color 0.15s;
}
.ov-btn.curr { background: rgba(0,217,163,0.08); border-color: rgba(0,217,163,0.22); }
.ov-dot {
    width: 26px; height: 26px; border-radius: 50%;
    background: rgba(255,255,255,0.07);
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.28); flex-shrink: 0;
}
.ov-dot.done { background: #00D9A3; color: #0F172A; font-size: 13px; }
.ov-dot.curr { background: rgba(0,217,163,0.18); color: #00D9A3; }
.ov-n { font-size: 13px; font-weight: 700; color: white; margin-bottom: 1px; }
.ov-n.done { color: rgba(255,255,255,0.30); }
.ov-p { font-size: 11px; color: rgba(255,255,255,0.24); }

/* Note sheet */
.sh-note {
    width: 100%; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.10);
    border-radius: 12px; padding: 13px; color: white;
    font-family: inherit; font-size: 14px; line-height: 1.6;
    resize: none; min-height: 110px; outline: none;
}
.sh-note:focus { border-color: rgba(0,217,163,0.38); }
.sh-save {
    width: 100%; background: linear-gradient(135deg, #00D9A3 0%, #6366F1 100%);
    border-radius: 12px; padding: 14px; font-size: 14px; font-weight: 700;
    color: white; margin-top: 10px; border: none; cursor: pointer;
    font-family: inherit;
}

/* Safe area for mobile */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .t-footer { padding-bottom: calc(26px + env(safe-area-inset-bottom)); }
}
