/**
 * Focus Timer
 * Consistent with NottyPepe Design System (Comfortaa font, dark slate surfaces, and emerald accent)
 */

:root {
    /* NottyPepe Base Tokens */
    --theme-bg: #090b0e;
    --theme-surface: #11151c;
    --theme-surface-hover: #19202b;
    --theme-border: #222c3d;
    --theme-border-highlight: #2f3d54;
    --theme-accent: #10b981;
    --theme-accent-dim: rgba(16, 185, 129, 0.12);
    --theme-accent-glow: rgba(16, 185, 129, 0.35);
    --theme-text: #f0f6fc;
    --theme-text-muted: #8b98a9;
    --theme-font-head: 'Comfortaa', -apple-system, sans-serif;
    --theme-font-body: 'Comfortaa', -apple-system, sans-serif;
    --theme-font-digits: 'Comfortaa', monospace, sans-serif;
    --theme-radius: 12px;
}

/* AMOLED Pure Black Mode */
body.amoled-mode {
    --theme-bg: #000000;
    --theme-surface: #000000;
    --theme-surface-hover: #0a0a0a;
    --theme-border: #1a1a1a;
    --theme-border-highlight: #262626;
    background-color: #000000 !important;
}

body.amoled-mode .bg-overlay {
    display: none;
}

/* ==========================================================================
   Navigation Extras
   ========================================================================== */
.btn-pwa-install {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--theme-surface-hover);
    color: var(--theme-text);
    border: 1px solid var(--theme-border);
    padding: 6px 12px;
    border-radius: 6px;
    font-family: var(--theme-font-body);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-pwa-install:hover {
    border-color: var(--theme-accent);
    color: var(--theme-accent);
}

/* ==========================================================================
   Primary Focus Hub Card
   ========================================================================== */
.focus-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 580px;
    margin: 0 auto 24px;
    padding: 24px;
}

@media (max-width: 480px) {
    .focus-card {
        padding: 18px 14px;
    }
}

.focus-card-header {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 18px;
}

.focus-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-nav-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    max-width: 100%;
}

.btn-card-nav {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #0b0d12;
    border: 1px solid var(--theme-border);
    color: var(--theme-text-muted);
    padding: 6px 10px;
    border-radius: 6px;
    font-family: var(--theme-font-body);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

.btn-card-nav:hover {
    color: var(--theme-accent);
    background: var(--theme-surface-hover);
    border-color: var(--theme-border-highlight);
}

.btn-card-nav:active {
    transform: scale(0.96);
}

@media (max-width: 480px) {
    .focus-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .card-nav-actions {
        width: 100%;
        justify-content: flex-start;
    }
    .btn-card-nav {
        padding: 6px 8px;
        font-size: 0.74rem;
    }
}

/* ==========================================================================
   Mode Switcher (Dual: Pomodoro & Free Flow)
   ========================================================================== */
.mode-pill-container {
    display: flex;
    background: #090b0e;
    padding: 4px;
    border-radius: var(--theme-radius);
    border: 1px solid var(--theme-border);
    gap: 6px;
    width: 100%;
    max-width: 440px;
    margin-bottom: 12px;
}

body.amoled-mode .mode-pill-container {
    background: #050505;
    border-color: #1a1a1a;
}

.mode-pill-container.shake {
    animation: pill-container-shake 0.35s ease;
}

@keyframes pill-container-shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

.mode-pill {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--theme-text-muted);
    font-family: var(--theme-font-body);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mode-pill:hover {
    color: var(--theme-text);
    background: rgba(255, 255, 255, 0.04);
}

.mode-pill.active {
    background: var(--theme-surface);
    color: var(--theme-accent);
    border-color: var(--theme-border-highlight);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    font-weight: 700;
}

/* Pomodoro Customization Helper Banner */
.pomodoro-tip-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 440px;
    background: #0d1117;
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    padding: 6px 12px;
    margin-bottom: 16px;
    font-size: 0.78rem;
    color: var(--theme-text-muted);
    transition: all 0.2s ease;
}

body.amoled-mode .pomodoro-tip-banner {
    background: #050505;
}

.tip-content {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.tip-icon {
    font-size: 0.85rem;
}

.tip-text {
    line-height: 1.3;
}

.btn-tip-link {
    background: transparent;
    border: none;
    color: var(--theme-accent);
    font-family: var(--theme-font-body);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    padding: 0;
}

.btn-tip-link:hover {
    color: #ffffff;
}

.btn-close-tip {
    background: transparent;
    border: none;
    color: var(--theme-text-muted);
    font-size: 0.8rem;
    padding: 2px 6px;
    cursor: pointer;
    border-radius: 4px;
    line-height: 1;
}

.btn-close-tip:hover {
    color: var(--theme-text);
}

/* ==========================================================================
   Visual Timer Stage (Circle, Bar, Minimal, Wave)
   ========================================================================== */
.timer-stage {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 6px 0 20px;
}

.circle-timer-wrap {
    position: relative;
    width: 270px;
    height: 270px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.circle-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 7;
}

body.amoled-mode .circle-bg {
    stroke: #141414;
}

.circle-progress {
    fill: none;
    stroke: var(--theme-accent);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 753.98; /* 2 * PI * 120 */
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.8s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.3s;
    filter: drop-shadow(0 0 8px var(--theme-accent-glow));
}

.circle-inner-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 2;
    padding: 10px;
    width: 100%;
}

.timer-mode-tag {
    font-family: var(--theme-font-head);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--theme-accent);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.timer-digits {
    font-family: var(--theme-font-digits);
    font-size: 3.3rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--theme-text);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 16px var(--theme-accent-dim);
}

.timer-status-caption {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--theme-text-muted);
    margin-top: 6px;
    max-width: 220px;
}

/* Linear Progress Bar */
.linear-progress-wrap {
    display: none;
    width: 220px;
    margin-top: 14px;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.linear-progress-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
}

.linear-progress-bar {
    height: 100%;
    width: 100%;
    background: var(--theme-accent);
    border-radius: 999px;
    box-shadow: 0 0 8px var(--theme-accent);
    transition: width 0.5s ease;
}

.linear-progress-pct {
    font-family: var(--theme-font-body);
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--theme-accent);
}

/* Wave Meter */
.wave-progress-wrap {
    display: none;
    margin-top: 14px;
}

.wave-segments {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 20px;
}

.wave-segment {
    width: 6px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.wave-segment.active {
    background: var(--theme-accent);
    height: 18px;
    box-shadow: 0 0 8px var(--theme-accent);
}

/* Display Styles Rules on Main Stage */
.timer-stage.progress-style-bar .circle-svg {
    display: none;
}
.timer-stage.progress-style-bar .linear-progress-wrap {
    display: flex;
}

.timer-stage.progress-style-wave .circle-svg {
    display: none;
}
.timer-stage.progress-style-wave .wave-progress-wrap {
    display: flex;
}

.timer-stage.progress-style-minimal .circle-svg,
.timer-stage.progress-style-minimal .linear-progress-wrap,
.timer-stage.progress-style-minimal .wave-progress-wrap {
    display: none;
}
.timer-stage.progress-style-minimal .timer-digits {
    font-size: 3.6rem;
    animation: gentleBreathe 4s infinite ease-in-out;
}

@keyframes gentleBreathe {
    0%, 100% { opacity: 0.95; }
    50% { opacity: 1; text-shadow: 0 0 20px var(--theme-accent-glow); }
}

/* Free Flow Mode Layout */
.timer-stage.mode-freeflow-active .circle-svg,
.timer-stage.mode-freeflow-active .linear-progress-wrap,
.timer-stage.mode-freeflow-active .wave-progress-wrap {
    display: none !important;
}

.timer-stage.mode-freeflow-active .circle-timer-wrap {
    width: 100%;
    max-width: 440px;
    height: auto;
    padding: 24px 20px;
    background: #090b0e;
    border: 1px solid var(--theme-border);
    border-radius: var(--theme-radius);
}

body.amoled-mode .timer-stage.mode-freeflow-active .circle-timer-wrap {
    background: #050505;
    border-color: #1a1a1a;
}

/* ==========================================================================
   Task & Checklist Focus Manager
   ========================================================================== */
.task-manager-container {
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

/* Active Focus Target Banner */
.active-focus-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #0d1218;
    border: 1px solid var(--theme-border);
    border-radius: 10px;
    padding: 10px 14px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

body.amoled-mode .active-focus-banner {
    background: #050505;
    border-color: #1a1a1a;
}

.active-focus-banner.has-focus,
.active-focus-banner.has-target {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.45);
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.14);
}

.active-focus-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.focus-target-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-accent);
    flex-shrink: 0;
    width: 22px;
    height: 22px;
}

.active-focus-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 1px;
}

.active-focus-label {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: var(--theme-accent);
    text-transform: uppercase;
}

.active-focus-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--theme-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-clear-active-focus {
    background: transparent;
    border: 1px solid transparent;
    color: var(--theme-text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.btn-clear-active-focus:hover {
    color: #ff4d6d;
    background: rgba(255, 77, 109, 0.12);
    border-color: rgba(255, 77, 109, 0.25);
}

/* Checklist Section with Retractable Collapsible Header */
.checklist-section {
    background: #0d1218;
    border: 1px solid var(--theme-border);
    border-radius: 10px;
    padding: 10px 14px;
    transition: all 0.2s ease;
}

body.amoled-mode .checklist-section {
    background: #050505;
    border-color: #1a1a1a;
}

.checklist-header-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    border: none;
    padding: 2px 0;
    color: inherit;
    font-family: var(--theme-font-body);
    cursor: pointer;
    user-select: none;
    outline: none;
    transition: color 0.15s ease;
}

.checklist-header-toggle:hover .checklist-title {
    color: var(--theme-text);
}

.checklist-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checklist-chevron {
    color: var(--theme-text-muted);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.15s ease;
    flex-shrink: 0;
}

.checklist-section.is-collapsed .checklist-chevron {
    transform: rotate(-90deg);
}

.checklist-title {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--theme-text-muted);
    transition: color 0.15s ease;
}

.subtasks-count-pill {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--theme-text);
}

.subtasks-pct {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--theme-accent);
}

.checklist-collapse-body {
    display: flex;
    flex-direction: column;
    margin-top: 10px;
    transition: opacity 0.2s ease;
}

.checklist-section.is-collapsed .checklist-collapse-body {
    display: none;
}

.subtasks-progress-bar-wrap {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 10px;
}

.subtasks-progress-bar {
    height: 100%;
    background: var(--theme-accent);
    border-radius: 9999px;
    transition: width 0.25s ease;
}

.subtasks-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 190px;
    overflow-y: auto;
    margin-bottom: 10px;
    padding-right: 2px;
}

.subtask-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 6px 10px;
    transition: all 0.15s ease;
    cursor: pointer;
}

.subtask-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
}

.subtask-item.active-focus {
    background: rgba(16, 185, 129, 0.12);
    border-color: var(--theme-accent);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.subtask-item.completed {
    opacity: 0.55;
}

.subtask-item.completed .subtask-title {
    text-decoration: line-through;
    color: var(--theme-text-muted);
}

.subtask-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 17px;
    height: 17px;
    border: 1.5px solid var(--theme-border-highlight);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    display: grid;
    place-content: center;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.subtask-checkbox:checked {
    background: var(--theme-accent);
    border-color: var(--theme-accent);
}

.subtask-checkbox:checked::before {
    content: "✓";
    font-size: 11px;
    font-weight: 900;
    color: #0b0f14;
    line-height: 1;
}

.subtask-title {
    flex: 1;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--theme-text);
    word-break: break-word;
}

/* Set Focus Target Button in Task List */
.btn-set-focus,
.btn-set-focus-target {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: #11151c;
    border: 1px solid var(--theme-border);
    color: var(--theme-text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    font-family: var(--theme-font-body);
    padding: 3px 8px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-set-focus:hover,
.btn-set-focus-target:hover {
    color: var(--theme-accent);
    border-color: var(--theme-accent);
    background: rgba(16, 185, 129, 0.12);
}

.btn-set-focus.is-active,
.subtask-item.active-focus .btn-set-focus,
.subtask-item.active-focus .btn-set-focus-target {
    background: var(--theme-accent);
    color: #0b0f14;
    border-color: var(--theme-accent);
    font-weight: 800;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.35);
}

.btn-set-focus.is-active:hover,
.subtask-item.active-focus .btn-set-focus:hover,
.subtask-item.active-focus .btn-set-focus-target:hover {
    background: #22c55e;
    color: #0b0f14;
}

.btn-delete-subtask {
    background: transparent;
    border: none;
    color: var(--theme-text-muted);
    font-size: 0.85rem;
    padding: 2px 4px;
    cursor: pointer;
    border-radius: 4px;
    opacity: 0.45;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.subtask-item:hover .btn-delete-subtask {
    opacity: 1;
}

.btn-delete-subtask:hover {
    color: #ff4d6d;
    background: rgba(255, 77, 109, 0.12);
}

.subtask-add-form {
    display: flex;
    gap: 8px;
}

.subtask-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--theme-border);
    border-radius: 6px;
    padding: 8px 10px;
    color: var(--theme-text);
    font-size: 16px;
    font-family: var(--theme-font-body);
    outline: none;
    transition: border-color 0.2s ease;
}

.subtask-input:focus {
    border-color: var(--theme-accent);
}

.btn-add-subtask {
    background: var(--theme-accent);
    color: #0b0f14;
    border: none;
    border-radius: 6px;
    padding: 0 12px;
    height: 36px;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: var(--theme-font-head);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: opacity 0.2s ease, transform 0.1s ease;
    white-space: nowrap;
}

.btn-add-subtask:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.btn-add-subtask:active {
    transform: translateY(0);
}

.timer-controls-dock {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 440px;
    margin-bottom: 22px;
}

.timer-controls-dock .btn-primary {
    flex: 1.4;
    height: 48px;
}

.timer-controls-dock .btn-secondary {
    flex: 1;
    height: 48px;
}

/* ==========================================================================
   Integrated Compact Ambient Player (Inside Focus Hub Card)
   ========================================================================== */
.card-ambient-player {
    width: 100%;
    max-width: 440px;
    background: #0d1117;
    border: 1px solid var(--theme-border);
    border-radius: var(--theme-radius);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

body.amoled-mode .card-ambient-player {
    background: #050505;
    border-color: #1a1a1a;
}

.ambient-player-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.ambient-sound-selector-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #0b0d12;
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    padding: 2px 8px;
    position: relative;
}

body.amoled-mode .ambient-sound-selector-wrap {
    background: #000000;
    border-color: #1a1a1a;
}

.ambient-indicator-icon {
    color: var(--theme-accent);
    display: flex;
    align-items: center;
}

.ambient-compact-select {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--theme-text);
    font-family: var(--theme-font-body);
    font-size: 16px;
    font-weight: 600;
    padding: 6px 20px 6px 0;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238b98a9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat !important;
    background-position: right 2px center !important;
    background-size: 14px 14px !important;
}

.btn-ambient-compact-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #0b0d12;
    border: 1px solid var(--theme-border);
    color: var(--theme-text-muted);
    padding: 8px 12px;
    border-radius: 8px;
    font-family: var(--theme-font-body);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-ambient-compact-toggle:hover {
    color: var(--theme-text);
    border-color: var(--theme-border-highlight);
}

.btn-ambient-compact-toggle.playing {
    border-color: var(--theme-accent);
    color: var(--theme-accent);
    background: var(--theme-accent-dim);
}

.audio-wave-bars {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 12px;
}

.audio-wave-bars span {
    width: 2px;
    height: 4px;
    background: currentColor;
    border-radius: 1px;
    transition: height 0.2s;
}

.btn-ambient-compact-toggle.playing .audio-wave-bars span:nth-child(1) {
    animation: waveBar 0.9s infinite ease-in-out;
}
.btn-ambient-compact-toggle.playing .audio-wave-bars span:nth-child(2) {
    animation: waveBar 0.9s infinite ease-in-out 0.2s;
}
.btn-ambient-compact-toggle.playing .audio-wave-bars span:nth-child(3) {
    animation: waveBar 0.9s infinite ease-in-out 0.4s;
}

@keyframes waveBar {
    0%, 100% { height: 3px; }
    50% { height: 12px; }
}

.ambient-player-bottom {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volume-slider-label {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--theme-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ambient-slider-container {
    flex: 1;
    display: flex;
    align-items: center;
}

/* Thick Beautifully Rounded Slider */
.thick-sound-slider {
    width: 100%;
    height: 10px;
    -webkit-appearance: none;
    appearance: none;
    background: #0b0d12;
    border-radius: 999px;
    outline: none;
    cursor: pointer;
    border: 1px solid var(--theme-border);
    transition: all 0.2s;
}

body.amoled-mode .thick-sound-slider {
    background: #111111;
    border-color: #222222;
}

.thick-sound-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--theme-accent);
    box-shadow: 0 0 8px var(--theme-accent-glow);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.thick-sound-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.thick-sound-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--theme-accent);
    box-shadow: 0 0 8px var(--theme-accent-glow);
    border: none;
    cursor: pointer;
}

.volume-badge {
    font-family: var(--theme-font-body);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--theme-accent);
    min-width: 34px;
    text-align: right;
}

/* ==========================================================================
   Session History & Analytics Deck
   ========================================================================== */
.history-card {
    max-width: 580px;
    margin: 0 auto;
    padding: 24px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.history-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.history-icon-badge {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--theme-accent-dim);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-accent);
}

.history-sub {
    font-size: 0.8rem;
    color: var(--theme-text-muted);
    margin: 2px 0 0;
}

.btn-clear-history {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid var(--theme-border);
    color: var(--theme-text-muted);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-family: var(--theme-font-body);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-clear-history:hover {
    color: #ff4d6d;
    border-color: rgba(255, 77, 109, 0.4);
    background: rgba(255, 77, 109, 0.06);
}

.history-stats-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
    background: #0d1117;
    border: 1px solid var(--theme-border);
    border-radius: var(--theme-radius);
    padding: 12px;
}

body.amoled-mode .history-stats-bar {
    background: #050505;
    border-color: #1a1a1a;
}

.history-stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 4px;
}

.stat-number {
    font-family: var(--theme-font-head);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--theme-accent);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--theme-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.history-log-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 4px;
}

.history-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px 12px;
    color: var(--theme-text-muted);
    gap: 8px;
}

.history-empty-state p {
    font-size: 0.84rem;
    margin: 0;
    max-width: 320px;
    line-height: 1.5;
}

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #0d1117;
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    transition: all 0.2s ease;
}

body.amoled-mode .history-item {
    background: #050505;
    border-color: #1a1a1a;
}

.history-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.history-tag-badge {
    font-family: var(--theme-font-body);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
}

.history-tag-badge.focus {
    background: var(--theme-accent-dim);
    color: var(--theme-accent);
    border: 1px solid var(--theme-accent-dim);
}

.history-tag-badge.break {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.history-tag-badge.freeflow {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.history-item-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.history-task-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--theme-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-time-stamp {
    font-size: 0.74rem;
    color: var(--theme-text-muted);
}

.history-item-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.history-duration-badge {
    font-family: var(--theme-font-body);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--theme-text);
    background: rgba(255, 255, 255, 0.04);
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
}

.btn-delete-session {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--theme-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.btn-delete-session:hover {
    color: #ff4d6d;
    background: rgba(255, 77, 109, 0.1);
    border-color: rgba(255, 77, 109, 0.3);
}

.btn-delete-session.confirm-pending {
    color: #ff4d6d;
    background: rgba(255, 77, 109, 0.2);
    border-color: #ff4d6d;
    animation: pulse-danger-tap 1s infinite alternate ease-in-out;
}

@keyframes pulse-danger-tap {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

/* ==========================================================================
   Fullscreen Zen HUD Overlay (Supports All Progress Styles)
   ========================================================================== */
.zen-hud {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--theme-bg);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 32px 24px;
}

body.amoled-mode .zen-hud {
    background: #000000;
}

.zen-topbar {
    width: 100%;
    max-width: 600px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.zen-mode-badge {
    font-family: var(--theme-font-head);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--theme-accent);
}

.btn-exit-zen {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--theme-surface);
    border: 1px solid var(--theme-border);
    color: var(--theme-text);
    padding: 8px 16px;
    border-radius: 8px;
    font-family: var(--theme-font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-exit-zen:hover {
    border-color: var(--theme-accent);
    color: var(--theme-accent);
}

.zen-center-stage {
    display: flex;
    align-items: center;
    justify-content: center;
}

.zen-circle-wrap {
    position: relative;
    width: 320px;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zen-circle-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.zen-circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 8;
}

.zen-circle-progress {
    fill: none;
    stroke: var(--theme-accent);
    stroke-width: 9;
    stroke-linecap: round;
    stroke-dasharray: 879.64; /* 2 * PI * 140 */
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.8s ease;
    filter: drop-shadow(0 0 10px var(--theme-accent-glow));
}

.zen-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    z-index: 2;
}

.zen-task-tag {
    display: none;
}

.zen-digits {
    font-family: var(--theme-font-digits);
    font-size: 4.2rem;
    font-weight: 700;
    color: var(--theme-text);
    line-height: 1.1;
    text-shadow: 0 0 20px var(--theme-accent-dim);
}

.zen-status-caption {
    display: none;
}

/* Zen Linear Bar */
.zen-linear-progress-wrap {
    display: none;
    width: 260px;
    margin-top: 16px;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* Zen Wave Meter */
.zen-wave-progress-wrap {
    display: none;
    margin-top: 16px;
}

/* Zen Progress Style Dynamic Switching */
.zen-hud.progress-style-circle .zen-circle-svg {
    display: block;
}
.zen-hud.progress-style-circle .zen-linear-progress-wrap,
.zen-hud.progress-style-circle .zen-wave-progress-wrap {
    display: none;
}

.zen-hud.progress-style-bar .zen-circle-svg {
    display: none;
}
.zen-hud.progress-style-bar .zen-linear-progress-wrap {
    display: flex;
}

.zen-hud.progress-style-wave .zen-circle-svg {
    display: none;
}
.zen-hud.progress-style-wave .zen-wave-progress-wrap {
    display: flex;
}

.zen-hud.progress-style-minimal .zen-circle-svg,
.zen-hud.progress-style-minimal .zen-linear-progress-wrap,
.zen-hud.progress-style-minimal .zen-wave-progress-wrap {
    display: none;
}
.zen-hud.progress-style-minimal .zen-digits {
    font-size: 4.8rem;
}

.zen-hud.mode-freeflow-active .zen-circle-svg,
.zen-hud.mode-freeflow-active .zen-linear-progress-wrap,
.zen-hud.mode-freeflow-active .zen-wave-progress-wrap {
    display: none !important;
}

.zen-bottom-controls {
    display: flex;
    gap: 16px;
}

.zen-bottom-controls .btn-primary,
.zen-bottom-controls .btn-secondary {
    padding: 12px 28px;
    font-size: 0.95rem;
}

/* ==========================================================================
   Modals & Dialogs (NottyPepe Tool Design)
   ========================================================================== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}

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

.modal-card {
    background: var(--theme-surface);
    border: 1px solid var(--theme-border-highlight);
    border-radius: var(--theme-radius);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.modal-card-sm {
    max-width: 400px;
}

body.amoled-mode .modal-card {
    background: #000000;
    border-color: #222222;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid var(--theme-border);
}

.modal-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--theme-text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.15s;
}

.btn-close-modal:hover {
    color: var(--theme-text);
    background: var(--theme-surface-hover);
}

.modal-body {
    padding: 20px 22px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 22px;
    border-top: 1px solid var(--theme-border);
    background: #090b0e;
}

body.amoled-mode .modal-footer {
    background: #050505;
}

.btn-modal-danger {
    background: #ff4d6d;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-family: var(--theme-font-head);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-modal-danger:hover {
    background: #e63956;
}

.clear-confirm-text {
    font-size: 0.9rem;
    color: var(--theme-text-muted);
    line-height: 1.5;
    margin: 0;
}

/* ==========================================================================
   Easy Settings Components (Presets, Steppers, Progress Options)
   ========================================================================== */
.settings-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 1-Tap Preset Chips Grid */
.preset-chips-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

@media (max-width: 480px) {
    .preset-chips-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.preset-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 6px;
    background: #0b0d12;
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preset-chip:hover {
    background: var(--theme-surface-hover);
    border-color: var(--theme-border-highlight);
}

.preset-chip.active {
    background: var(--theme-accent-dim);
    border-color: var(--theme-accent);
}

.preset-chip-title {
    font-family: var(--theme-font-head);
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--theme-text);
}

.preset-chip.active .preset-chip-title {
    color: var(--theme-accent);
}

.preset-chip-sub {
    font-size: 0.72rem;
    color: var(--theme-text-muted);
    margin-top: 2px;
}

/* Easy Stepper Inputs */
.settings-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

@media (max-width: 480px) {
    .settings-grid-3 {
        grid-template-columns: 1fr;
    }
}

.settings-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 480px) {
    .settings-grid-2 {
        grid-template-columns: 1fr;
    }
}

.setting-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stepper-input-wrap {
    display: flex;
    align-items: center;
    background: #0b0d12;
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    overflow: hidden;
}

body.amoled-mode .stepper-input-wrap {
    background: #000000;
    border-color: #1a1a1a;
}

.btn-stepper {
    width: 36px;
    height: 38px;
    background: transparent;
    border: none;
    color: var(--theme-text-muted);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.btn-stepper:hover {
    color: var(--theme-accent);
    background: rgba(255, 255, 255, 0.05);
}

.stepper-input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    color: var(--theme-text);
    font-family: var(--theme-font-digits);
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    outline: none;
    padding: 6px 0;
    -moz-appearance: textfield;
}

.stepper-input::-webkit-outer-spin-button,
.stepper-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Progress Display Style Selector Cards */
.progress-style-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

@media (max-width: 480px) {
    .progress-style-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.style-card-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 6px;
    background: #0b0d12;
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.style-card-option:hover {
    border-color: var(--theme-border-highlight);
    background: var(--theme-surface-hover);
}

.style-card-option.active {
    background: var(--theme-accent-dim);
    border-color: var(--theme-accent);
}

.style-icon-preview {
    color: var(--theme-text-muted);
    margin-bottom: 6px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.style-card-option.active .style-icon-preview {
    color: var(--theme-accent);
}

.style-card-name {
    font-family: var(--theme-font-head);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--theme-text);
}

.style-card-desc {
    font-size: 0.7rem;
    color: var(--theme-text-muted);
    margin-top: 2px;
    text-align: center;
}

/* Toggle Switch Row */
.toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: #0d1117;
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    cursor: pointer;
}

body.amoled-mode .toggle-row {
    background: #050505;
    border-color: #1a1a1a;
}

.toggle-title {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--theme-text);
}

.toggle-sub {
    font-size: 0.76rem;
    color: var(--theme-text-muted);
    margin-top: 2px;
}

.toggle-checkbox {
    width: 20px;
    height: 20px;
    accent-color: var(--theme-accent);
    cursor: pointer;
}

/* Theme Color Dots */
.theme-picker-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.theme-color-dots {
    display: flex;
    gap: 10px;
}

.color-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
}

.color-dot.active {
    border-color: #ffffff;
    transform: scale(1.15);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

.test-sound-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Help Features */
.help-feature-card {
    background: #0d1117;
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    padding: 12px 14px;
}

.help-feature-card h4 {
    margin: 0 0 4px;
    font-family: var(--theme-font-head);
    font-size: 0.9rem;
    color: var(--theme-text);
}

.help-feature-card p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--theme-text-muted);
    line-height: 1.5;
}

.shortcuts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    background: #0d1117;
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    padding: 12px;
}

.shortcut-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
}

.shortcut-desc {
    font-size: 0.84rem;
    color: var(--theme-text);
}

.shortcut-kbd {
    background: #090b0e;
    border: 1px solid var(--theme-border-highlight);
    border-radius: 6px;
    padding: 3px 8px;
    font-family: monospace;
    font-size: 0.78rem;
    color: var(--theme-accent);
}

/* Install Instructions */
.install-steps-box {
    background: #0d1117;
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    padding: 14px;
    font-size: 0.86rem;
    color: var(--theme-text-muted);
    line-height: 1.6;
}

.install-steps-box strong {
    color: var(--theme-text);
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    width: 90%;
    max-width: 440px;
}

.toast-msg {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #121820;
    color: var(--theme-text);
    border: 1px solid var(--theme-accent);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 16px var(--theme-accent-dim);
    padding: 10px 16px;
    border-radius: 9999px;
    font-size: 0.84rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    animation: toast-in 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
    text-align: left;
}

.toast-msg span {
    flex: 1;
    min-width: 0;
    word-break: normal;
    overflow-wrap: break-word;
    line-height: 1.35;
}

@media (max-width: 480px) {
    .toast-container {
        bottom: 16px;
        width: calc(100% - 32px);
    }
    .toast-msg {
        border-radius: 12px;
        padding: 9px 14px;
        font-size: 0.8rem;
    }
}

.toast-msg.toast-warning {
    border-color: #ffd166;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 16px rgba(255, 209, 102, 0.25);
}

.toast-msg.toast-success {
    border-color: #10b981;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 16px rgba(16, 185, 129, 0.3);
}

.toast-msg svg {
    flex-shrink: 0;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toast-out {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-8px) scale(0.95);
    }
}

/* ==========================================================================
   Header Nav Badge & Subtasks Checklist
   ========================================================================== */
.badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--theme-accent);
    color: #0b0f14;
    font-size: 0.68rem;
    font-weight: 800;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 9999px;
    line-height: 1;
    margin-left: 4px;
}

/* ==========================================================================
   Daily Goal Ring & Analytics Hub
   ========================================================================== */
.history-analytics-hub {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 12px;
    margin-bottom: 16px;
}

@media (max-width: 640px) {
    .history-analytics-hub {
        grid-template-columns: 1fr;
    }
}

.daily-goal-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--theme-border);
    border-radius: 12px;
    padding: 12px 14px;
}

.goal-ring-wrap {
    position: relative;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.goal-ring-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.goal-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 6;
}

.goal-ring-progress {
    fill: none;
    stroke: var(--theme-accent);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 201.06; /* 2 * PI * 32 */
    stroke-dashoffset: 201.06;
    transition: stroke-dashoffset 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.goal-pct-text {
    position: absolute;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--theme-text);
    font-family: var(--theme-font-body);
}

.goal-text-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.goal-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.goal-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--theme-text-muted);
}

.goal-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--theme-text-muted);
}

.goal-badge.achieved {
    background: rgba(16, 185, 129, 0.2);
    color: var(--theme-accent);
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.goal-progress-numbers {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.goal-current {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--theme-text);
}

.goal-divider {
    font-size: 0.85rem;
    color: var(--theme-text-muted);
}

.goal-target {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--theme-text-muted);
}

/* History Stats Bar & Stat Boxes */
.history-stats-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

@media (max-width: 480px) {
    .history-stats-bar {
        grid-template-columns: 1fr;
    }
}

.history-stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--theme-border);
    border-radius: 12px;
    padding: 10px 8px;
    text-align: center;
    transition: all 0.2s ease;
}

.history-stat-box:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--theme-border-highlight);
}

.history-stat-box .stat-number {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--theme-text);
    font-family: var(--theme-font-head);
    line-height: 1.2;
}

.history-stat-box .stat-label {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--theme-text-muted);
    text-transform: uppercase;
    margin-top: 3px;
}

/* ==========================================================================
   24-Hour Interactive Timeline Visualizer
   ========================================================================== */
.daily-timeline-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--theme-border);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.timeline-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 6px;
}

.timeline-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--theme-text-muted);
}

.timeline-legend {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    color: var(--theme-text-muted);
}

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

.legend-dot.focus { background: var(--theme-accent); }
.legend-dot.freeflow { background: #00f0ff; }
.legend-dot.break { background: #ffd166; }

.timeline-bar-container {
    width: 100%;
}

.timeline-blocks-track {
    position: relative;
    width: 100%;
    height: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 6px;
}

.timeline-empty-notice {
    text-align: center;
    padding: 6px 10px;
    font-size: 0.72rem;
    color: var(--theme-text-muted);
    line-height: 1.35;
    word-break: normal;
    white-space: normal;
    width: 100%;
    box-sizing: border-box;
    display: none;
}

.timeline-empty-notice.visible {
    display: block;
}

.timeline-block,
.timeline-block-seg {
    position: absolute;
    top: 0;
    height: 100%;
    border-radius: 3px;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.timeline-block:hover,
.timeline-block-seg:hover {
    transform: scaleY(1.2);
    filter: brightness(1.2);
    z-index: 5;
}

.timeline-block.focus,
.timeline-block-seg.focus { background: var(--theme-accent); }
.timeline-block.freeflow,
.timeline-block-seg.freeflow { background: #00f0ff; }
.timeline-block.break,
.timeline-block-seg.break { background: #ffd166; }

.timeline-hour-markers {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--theme-text-muted);
    opacity: 0.75;
}

/* ==========================================================================
   Data & Portability Suite
   ========================================================================== */
.history-export-suite {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--theme-border);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.export-suite-title {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--theme-text-muted);
    margin-bottom: 10px;
}

.export-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 8px;
}

.btn-export-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #0d1218;
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--theme-text);
    font-size: 0.78rem;
    font-weight: 700;
    font-family: var(--theme-font-body);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
    user-select: none;
}

body.amoled-mode .btn-export-action {
    background: #050505;
    border-color: #1a1a1a;
}

.btn-export-action:hover {
    background: rgba(16, 185, 129, 0.12);
    border-color: var(--theme-accent);
    color: var(--theme-accent);
    transform: translateY(-1px);
}

.btn-export-action:active {
    transform: translateY(0);
}

.btn-import-label {
    margin: 0;
    user-select: none;
}

/* ==========================================================================
   Guided Breathing Retreat Modal
   ========================================================================== */
.breathe-modal-card {
    max-width: 480px;
    background: #0c1015;
    border: 1px solid var(--theme-border);
    border-radius: 16px;
}

body.amoled-mode .breathe-modal-card {
    background: #050505;
    border-color: #1a1a1a;
}

.breathe-body-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 0;
}

.breathe-mode-pills {
    display: flex;
    gap: 6px;
    background: #07090c;
    border: 1px solid var(--theme-border);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 24px;
}

.breathe-pill {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 7px;
    padding: 6px 14px;
    color: var(--theme-text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    font-family: var(--theme-font-body);
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.breathe-pill:hover {
    color: var(--theme-text);
    background: rgba(255, 255, 255, 0.05);
}

.breathe-pill.active {
    background: var(--theme-accent);
    color: #0b0f14;
    border-color: var(--theme-accent);
    font-weight: 800;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.35);
}

.breathe-stage-wrap {
    position: relative;
    width: 220px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.breathe-circle-outer {
    position: absolute;
    width: 196px;
    height: 196px;
    border-radius: 50%;
    border: 2px dashed rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.breathe-circle-inner {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.12);
    border: 2px solid var(--theme-accent);
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.2), inset 0 0 16px rgba(16, 185, 129, 0.1);
    transform: scale(1);
    will-change: transform;
    pointer-events: none;
}

.breathe-circle-inner.inhale {
    transform: scale(2.2);
    background: rgba(16, 185, 129, 0.22);
    border-color: var(--theme-accent);
    box-shadow: 0 0 24px rgba(16, 185, 129, 0.35), inset 0 0 20px rgba(16, 185, 129, 0.18);
}

.breathe-circle-inner.hold-full,
.breathe-circle-inner.hold {
    transform: scale(2.2);
    background: rgba(16, 185, 129, 0.22);
    border-color: var(--theme-accent);
    box-shadow: 0 0 24px rgba(16, 185, 129, 0.35), inset 0 0 20px rgba(16, 185, 129, 0.18);
}

.breathe-circle-inner.exhale {
    transform: scale(1);
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.6);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.15), inset 0 0 10px rgba(16, 185, 129, 0.08);
}

.breathe-circle-inner.hold-empty {
    transform: scale(1);
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.6);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.15), inset 0 0 10px rgba(16, 185, 129, 0.08);
}

.breathe-live-text-wrap {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.breathe-instruction {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.breathe-seconds-counter {
    font-size: 2.2rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1;
    margin: 4px 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
    font-family: var(--theme-font-body);
}

.breathe-cycle-caption {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--theme-text-muted);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.breathe-guidance-sub {
    font-size: 0.82rem;
    color: var(--theme-text-muted);
    max-width: 320px;
    line-height: 1.4;
    min-height: 24px;
    text-align: center;
}

/* ==========================================================================
   Distraction Parking Lot Modal
   ========================================================================== */
.parking-modal-card {
    max-width: 520px;
}

.parking-intro {
    font-size: 0.82rem;
    color: var(--theme-text-muted);
    line-height: 1.4;
    margin-bottom: 14px;
}

.parking-input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.parking-input-row .form-input {
    flex: 1;
}

.parking-items-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 240px;
    overflow-y: auto;
    margin-bottom: 10px;
}

.parking-item,
.parking-item-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    padding: 8px 12px;
    transition: all 0.15s ease;
}

.parking-item:hover,
.parking-item-row:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--theme-border-highlight);
}

.parking-item.done .parking-item-text,
.parking-item.completed .parking-item-text,
.parking-item.completed .parking-text,
.parking-item-row.done .parking-item-text {
    text-decoration: line-through;
    color: var(--theme-text-muted);
    opacity: 0.6;
}

.parking-checkbox,
.parking-item-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--theme-border-highlight);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    display: grid;
    place-content: center;
    flex-shrink: 0;
}

.parking-checkbox:checked,
.parking-item-checkbox:checked {
    background: var(--theme-accent);
    border-color: var(--theme-accent);
}

.parking-checkbox:checked::before,
.parking-item-checkbox:checked::before {
    content: "✓";
    font-size: 11px;
    font-weight: 900;
    color: #0b0f14;
    line-height: 1;
}

.parking-item-text,
.parking-text {
    flex: 1;
    font-size: 0.84rem;
    color: var(--theme-text);
    word-break: break-word;
}

.parking-item-time,
.parking-timestamp {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--theme-text-muted);
    flex-shrink: 0;
}

.btn-delete-parking,
.btn-delete-parking-item {
    background: transparent;
    border: none;
    color: var(--theme-text-muted);
    font-size: 0.9rem;
    padding: 2px 6px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.btn-delete-parking:hover,
.btn-delete-parking-item:hover {
    color: #ff004d;
    background: rgba(255, 0, 77, 0.1);
}

.parking-empty {
    text-align: center;
    padding: 24px 12px;
    color: var(--theme-text-muted);
    font-size: 0.82rem;
    background: rgba(255, 255, 255, 0.01);
    border-radius: 8px;
    border: 1px dashed var(--theme-border);
}

.parking-footer {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

/* ==========================================================================
   Mobile Safari Anti-Zoom Rules
   ========================================================================== */
@media screen and (max-width: 850px) {
    .subtask-input,
    .ambient-compact-select,
    .stepper-input,
    .form-input,
    .form-select,
    input,
    select,
    textarea {
        font-size: 16px !important;
    }
}


