/* ── Practice page ───────────────────────────────── */

.tc-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2em 0.75em;
    border-radius: var(--radius-round);
    font-size: 0.7rem;
    font-weight: var(--font-weight-7);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    width: fit-content;
}

.tc-calm       { background: rgba(99,102,241,0.12); color: var(--indigo-8); }
.tc-sleep      { background: rgba(124,58,237,0.12); color: var(--violet-8); }
.tc-focus      { background: rgba(14,165,233,0.12); color: var(--sky-8); }
.tc-energy     { background: rgba(249,115,22,0.12); color: var(--orange-8); }
.tc-foundation { background: rgba(16,185,129,0.12); color: #065f46; }
.tc-balance    { background: rgba(139,92,246,0.12); color: var(--violet-8); }

/* Layout */
.practice-shell {
    display: grid;
    gap: var(--size-5);
}

/* Technique picker */
.technique-picker {
    display: flex;
    flex-wrap: wrap;
    gap: var(--size-2);
    padding: var(--size-4) var(--size-5);
    align-items: center;
}

.tp-item {
    display: flex;
    align-items: center;
    gap: var(--size-2);
    padding: var(--size-2) var(--size-3);
    border-radius: var(--radius-3);
    text-decoration: none;
    color: var(--site-text-muted);
    font-size: 0.9rem;
    font-weight: var(--font-weight-5);
    transition: background 0.15s, color 0.15s;
}

.tp-item:hover {
    background: var(--gray-1);
    color: var(--site-text);
}

.tp-active {
    background: var(--gray-1);
    color: var(--site-text);
    font-weight: var(--font-weight-7);
}

.tp-name {
    white-space: nowrap;
}

/* Main area */
.practice-main {
    display: grid;
    grid-template-columns: minmax(280px, 380px) 1fr;
    gap: var(--size-5);
    align-items: start;
}

/* Info card */
.info-card {
    padding: var(--size-6);
    gap: var(--size-4);
}

.info-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--size-3);
}

.info-title {
    margin: var(--size-2) 0 0;
    font-size: 1.4rem;
    line-height: 1.2;
}

.info-duration {
    font-size: 0.85rem;
    font-weight: var(--font-weight-7);
    color: var(--site-text-muted);
    background: var(--gray-1);
    padding: 0.3em 0.7em;
    border-radius: var(--radius-round);
    white-space: nowrap;
}

.info-desc {
    margin: 0;
    color: var(--site-text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

.info-tip {
    display: flex;
    gap: var(--size-3);
    align-items: flex-start;
    padding: var(--size-3) var(--size-4);
    background: rgba(99,102,241,0.05);
    border-radius: var(--radius-3);
    border-left: 3px solid var(--indigo-4);
}

.tip-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 0.1em; }

.info-tip p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--site-text-muted);
    line-height: 1.65;
}

.phase-legend {
    display: flex;
    flex-wrap: wrap;
    gap: var(--size-2);
}

.phase-pill {
    padding: 0.3em 0.8em;
    border-radius: var(--radius-round);
    font-size: 0.8rem;
    font-weight: var(--font-weight-5);
}

.phase-in   { background: rgba(99,102,241,0.1); color: var(--indigo-8); }
.phase-hold { background: rgba(249,115,22,0.1); color: var(--orange-8); }
.phase-out  { background: rgba(16,185,129,0.1); color: #065f46; }

/* Visualiser */
.visualiser-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--size-6) 0;
}

.visualiser {
    position: relative;
    width: 360px;
    height: 360px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Progress ring SVG */
.progress-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    pointer-events: none;
}

.pr-track {
    fill: none;
    stroke: var(--gray-2);
    stroke-width: 4;
}

.pr-fill {
    fill: none;
    stroke: var(--indigo-5);
    stroke-width: 4;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear, stroke 0.5s;
}

/* Breath rings */
.breath-orb-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 220px;
    height: 220px;
}

.breath-rings {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.br {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid rgba(99,102,241,0.2);
    transition: width 0.4s ease, height 0.4s ease, opacity 0.4s ease;
}

.br-1 { width: 220px; height: 220px; }
.br-2 { width: 170px; height: 170px; border-color: rgba(139,92,246,0.25); }
.br-3 { width: 120px; height: 120px; border-color: rgba(99,102,241,0.3); }

/* Orb */
.breath-orb {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--indigo-5), var(--violet-6));
    box-shadow: 0 0 40px rgba(99,102,241,0.35);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--size-1);
    transition: width 1s ease, height 1s ease, box-shadow 1s ease, background 0.5s;
    position: relative;
    z-index: 1;
    cursor: default;
    user-select: none;
}

.breath-phase-label {
    color: white;
    font-size: 0.8rem;
    font-weight: var(--font-weight-7);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    line-height: 1;
}

.breath-count {
    color: rgba(255,255,255,0.85);
    font-size: 2rem;
    font-weight: var(--font-weight-9);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

/* Session timer below visualiser */
.session-timer {
    margin-top: var(--size-5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

#timerDisplay {
    font-size: 1.6rem;
    font-weight: var(--font-weight-8);
    font-variant-numeric: tabular-nums;
    color: var(--site-text);
}

.timer-label {
    font-size: 0.75rem;
    color: var(--site-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Controls */
.controls {
    display: flex;
    gap: var(--size-3);
    margin-top: var(--size-4);
}

.ctrl-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--size-2);
    padding: 0.65rem 1.4rem;
    border: 1px solid transparent;
    border-radius: var(--radius-round);
    font: inherit;
    font-weight: var(--font-weight-7);
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

.ctrl-start {
    background: linear-gradient(135deg, var(--indigo-6), var(--violet-7));
    color: white;
    box-shadow: 0 4px 18px rgba(99,102,241,0.4);
}

.ctrl-start:hover { background: linear-gradient(135deg, var(--indigo-7), var(--violet-8)); transform: translateY(-1px); }

.ctrl-pause {
    background: var(--orange-1);
    color: var(--orange-9);
    border-color: var(--orange-3);
}

.ctrl-pause:hover { background: var(--orange-2); }

.ctrl-reset {
    background: var(--gray-1);
    color: var(--site-text-muted);
    border-color: var(--site-border);
}

.ctrl-reset:hover { background: var(--gray-2); }

/* Cycle info */
.cycle-info {
    margin-top: var(--size-3);
    font-size: 0.82rem;
    color: var(--site-text-muted);
    letter-spacing: 0.05em;
}

/* Session complete overlay */
.session-complete {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--size-3);
    background: rgba(255,255,255,0.92);
    border-radius: 50%;
    text-align: center;
    padding: var(--size-5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

.session-complete h3 { margin: 0; font-size: 1.2rem; }
.session-complete p  { margin: 0; color: var(--site-text-muted); font-size: 0.85rem; }

/* Sound toggle */
.sound-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    margin-top: var(--size-3);
    padding: 0.35rem 0.9rem;
    border: 1px solid var(--site-border);
    border-radius: var(--radius-round);
    background: transparent;
    color: var(--site-text-muted);
    font: inherit;
    font-size: 0.78rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    letter-spacing: 0.04em;
}

.sound-toggle:hover {
    background: var(--gray-1);
    color: var(--site-text);
    border-color: var(--gray-4);
}

.sound-toggle[aria-pressed="true"] {
    border-color: rgba(99,102,241,0.35);
    color: var(--indigo-7);
    background: rgba(99,102,241,0.06);
}

.sound-toggle.sound-off {
    opacity: 0.55;
    border-color: var(--site-border);
    background: transparent;
    color: var(--site-text-muted);
}

.sound-icon { font-size: 1em; line-height: 1; }
.sound-label { font-weight: var(--font-weight-6); }

/* Keyboard hint */
.sound-toggle::after {
    content: 'M';
    font-size: 0.65em;
    opacity: 0.4;
    margin-left: 0.3em;
    font-family: monospace;
    border: 1px solid currentColor;
    border-radius: 3px;
    padding: 0 3px;
    line-height: 1.4;
}

/* Responsive */
@media (max-width: 800px) {
    .practice-main {
        grid-template-columns: 1fr;
    }

    .visualiser-wrap { padding: var(--size-4) 0; }
    .visualiser { width: 300px; height: 300px; }
    .breath-orb-wrap { width: 180px; height: 180px; }
    .br-1 { width: 180px; height: 180px; }
    .br-2 { width: 140px; height: 140px; }
    .br-3 { width: 100px; height: 100px; }
    .breath-orb { width: 110px; height: 110px; }
}
