/* Pomodoro - Clean Minimal Design System */

:root {
    --color-background-primary: #0f1f1c;
    --color-background-secondary: #142e28;
    --color-background-tertiary: #1c3d35;
    --color-text-primary: #f0faf7;
    --color-text-secondary: #9db8ae;
    --color-text-tertiary: #5f7d73;
    --color-border-tertiary: rgba(40, 90, 75, 0.4);
    --color-border-secondary: rgba(40, 90, 75, 0.6);
    --color-border-primary: rgba(40, 90, 75, 0.8);
    --color-surface-light: #234d40;
    --border-radius-md: 8px;
    --border-radius-sm: 6px;
    --border-radius-lg: 12px;
    --font-sans: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;

    --pomodoro-color: #F42A41;
    --short-break-color: #FCA5A5;
    --long-break-color: #C0C0C0;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--color-background-secondary);
    color: var(--color-text-primary);
    min-height: 100vh;
    min-width: 320px;
    line-height: 1.6;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    caret-color: transparent;
    overflow-x: hidden;
}

input, textarea, [contenteditable="true"] {
    -webkit-user-select: text;
    -moz-user-select: text;
    user-select: text;
    caret-color: auto;
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* App Wrapper */
.app-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header - Minimal Topnav */
.app-header {
    width: 100%;
    background: var(--color-background-primary);
    border-bottom: 0.5px solid var(--color-border-tertiary);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content-wrapper {
    max-width: 360px;
    width: 100%;
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 7px;
}

.header-text {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text-primary);
}

.header-logo {
    width: 24px;
    height: 24px;
}

/* Header Navigation - Desktop */
.header-nav {
    display: flex;
    align-items: center;
    gap: 2px;
}

.header-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 8px;
    font-size: 16px;
    font-weight: 400;
    color: #fff;
    text-decoration: none;
    border-radius: var(--border-radius-md);
    border: none;
    background: transparent;
    cursor: pointer;
    transition: background 0.15s;
}

.nav-icon {
    font-size: 14px;
    line-height: 1;
}

.nav-icon-logo {
    width: 24px;
    height: 24px;
    vertical-align: middle;
}

.header-nav a:hover {
    background: var(--color-background-secondary);
}

.header-nav a.active {
    background: var(--color-background-secondary);
    color: var(--pomodoro-color);
    font-weight: 500;
}

.header-nav {
    border-left: 0.5px solid var(--color-border-tertiary);
    padding-left: 8px;
}

/* Mobile Bottom Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-background-primary);
    border-top: 0.5px solid var(--color-border-tertiary);
    z-index: 100;
    padding: 6px 0;
    padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
}

.mobile-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex: 1;
    padding: 4px 0;
    text-decoration: none;
    color: #fff;
    transition: color 0.15s;
}

.mobile-tab.active {
    color: #fff;
}

.mobile-tab-icon {
    font-size: 18px;
    line-height: 1;
}

.mobile-tab-icon-logo {
    width: 28px;
    height: 28px;
}

.mobile-tab-label {
    font-size: 10px;
    font-weight: 500;
}

/* Main Content Area */
.app-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 360px;
    margin: 0 auto;
    width: 100%;
    padding: 14px 12px;
}

.app-container {
    max-width: 100%;
    margin: 0 auto;
    flex: 1;
}

/* Main Container - Index Page */
.main-container {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Responsive */
@media (min-width: 480px) {
    .app-content {
        max-width: 520px;
    }
    .header-content-wrapper {
        max-width: 520px;
    }
}

@media (min-width: 640px) {
    .app-content {
        max-width: 680px;
    }
    .header-content-wrapper {
        max-width: 680px;
    }
}

@media (min-width: 960px) {
    .app-content {
        max-width: 960px;
        padding: 0;
    }
    .header-content-wrapper {
        max-width: 960px;
        padding: 18px 20px;
    }
    .app-header {
        background: var(--color-background-secondary);
        border-bottom: none;
    }
    .header-title {
        gap: 8px;
    }
    .header-text {
        font-size: 16px;
    }
    .header-logo {
        width: 28px;
        height: 28px;
    }
}

/* Mobile: bottom nav, hide desktop nav */
@media (max-width: 767px) {
    .desktop-nav {
        display: none;
    }

    .mobile-nav {
        display: flex;
    }

    .header-action {
        display: none;
    }

    .task-input-hint {
        display: none;
    }

    .task-pane-card {
        background: transparent;
        border: none;
        border-radius: 0;
        padding: 0;
    }

    .app-content {
        padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
    }

    .header-content-wrapper {
        justify-content: center;
    }
}

/* Session Mode Tabs - Segmented Pill */
.mode-tabs {
    display: flex;
    gap: 2px;
    padding: 3px;
    margin: 12px 12px 0;
    border-radius: 99px;
    background: #ffffff0d;
}

.mode-tabs button {
    flex: 1;
    padding: 7px 4px;
    font-size: 13px;
    text-align: center;
    border-radius: 99px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--color-text-secondary);
    cursor: pointer;
    font-family: var(--font-sans);
    font-weight: normal;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.mode-tabs button:hover {
    color: var(--color-text-secondary);
}

.mode-tabs button.active {
    color: var(--color-text-primary);
    background: #142e28;
    border-color: #285a4b;
    font-weight: 600;
}

.mode-tabs button.active.pomodoro-active {
    border-color: var(--pomodoro-color);
}

.mode-tabs button.active.short-break-active {
    border-color: var(--short-break-color);
}

.mode-tabs button.active.long-break-active {
    border-color: var(--long-break-color);
}

/* Timer Card */
.timer-card {
    background-color: var(--color-background-primary);
    border: 1px solid #285a4b;
    border-radius: var(--border-radius-lg);
    margin: 0 12px 10px;
    overflow: hidden;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.timer-card.pomodoro-theme {
    background: linear-gradient(180deg, rgba(244, 42, 65, 0.12), var(--color-background-primary));
    border: 1px solid rgba(244, 42, 65, 0.3);
}

.timer-card.short-break-theme {
    background: linear-gradient(180deg, rgba(252, 165, 165, 0.12), var(--color-background-primary));
    border: 1px solid rgba(252, 165, 165, 0.3);
}

.timer-card.long-break-theme {
    background: linear-gradient(180deg, rgba(192, 192, 192, 0.12), var(--color-background-primary));
    border: 1px solid rgba(192, 192, 192, 0.3);
}

.card-top {
    padding: 20px 16px 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.timer-task-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #1c3d35;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    width: 100%;
}

.timer-task-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--pomodoro-color);
    flex-shrink: 0;
}

.timer-task-text {
    font-size: 13px;
    color: #9db8ae;
    font-family: var(--font-sans);
    flex: 1;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Circular Progress Ring */
.ring-area {
    position: relative;
    width: 160px;
    height: 160px;
    flex-shrink: 0;
}

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

.ring-bg {
    fill: none;
    stroke: #ffffff17;
    stroke-width: 12;
}

.ring-fill {
    fill: none;
    stroke: var(--pomodoro-color);
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.4s ease;
}

.ring-fill.short-break {
    stroke: var(--short-break-color);
}

.ring-fill.long-break {
    stroke: var(--long-break-color);
}

.timer-time {
    font-size: 34px;
    font-weight: 700;
    color: var(--color-text-primary);
    line-height: 1;
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    letter-spacing: -1px;
}

.timer-card.running.pomodoro-theme .timer-time { color: var(--pomodoro-color); }
.timer-card.running.short-break-theme .timer-time { color: var(--short-break-color); }
.timer-card.running.long-break-theme .timer-time { color: var(--long-break-color); }

.timer-mode-label {
    font-size: 13px;
    color: #5f7d73;
    letter-spacing: .1em;
    margin-top: 5px;
}

.timer-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

/* Active Task Indicator */
.active-task {
    font-size: 12px;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.active-task .task-dot {
    display: none;
}

.task-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--pomodoro-color);
    flex-shrink: 0;
}

.task-dot.short-break {
    background: var(--short-break-color);
}

.task-dot.long-break {
    background: var(--long-break-color);
}

/* Today Summary (inline in timer card) */
.pomo-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    margin-bottom: 7px;
    width: 100%;
}

.pomo-left {
    display: flex;
    align-items: center;
    gap: 3px;
}

.pomo-emoji {
    font-size: 16px;
    line-height: 1;
}

.pomo-num {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text-primary);
    line-height: 1;
}

.pomo-sub {
    font-size: 11px;
    color: var(--color-text-tertiary);
}

.pomo-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pomo-focus-time {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text-primary);
}

.pomo-focus-label {
    font-size: 11px;
    color: var(--color-text-tertiary);
}

.progress-bar {
    height: 4px;
    background: var(--color-surface-light);
    border-radius: 2px;
    margin-bottom: 10px;
    overflow: hidden;
    width: 100%;
}

.progress-bar-fill {
    height: 100%;
    background: var(--pomodoro-color);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Timer Controls */
.timer-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.ctrl-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.ctrl-trailing {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ibtn {
    width: 44px;
    height: 44px;
    border-radius: 99px;
    border: 1px solid #285a4b;
    background: #ffffff0a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 17px;
    padding: 0;
}

.ibtn:hover {
    background: var(--color-surface-light);
}

.ibtn.lg {
    width: 62px;
    height: 62px;
    border: none;
    color: white;
    font-size: 22px;
}

.ibtn.lg.pomodoro {
    background: var(--pomodoro-color);
    box-shadow: 0 4px 18px rgba(244,42,65,.45);
}

.ibtn.lg.short-break {
    background: var(--short-break-color);
    box-shadow: 0 4px 18px rgba(252,165,165,.45);
}

.ibtn.lg.long-break {
    background: var(--long-break-color);
    box-shadow: 0 4px 18px rgba(192,192,192,.45);
}

.ibtn.lg:hover {
    opacity: 0.9;
}

.task-hint {
    font-size: 13px;
    color: var(--color-text-tertiary);
    margin: 0;
}

/* Card Footer */
.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px 22px;
}

.card-footer.idle {
    padding: 12px 20px 22px;
}

.ends-at {
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--color-text-tertiary);
    font-family: var(--font-mono);
}

.session-dots {
    display: flex;
    align-items: center;
    gap: 5px;
}

.sd {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    flex-shrink: 0;
}

.sd.filled {
    background: var(--pomodoro-color);
}

.sd.current {
    background: var(--pomodoro-color);
}

.header-action {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #285a4b;
    background: transparent;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    color: #fff;
    padding: 0;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}

.header-action:hover {
    background: var(--color-background-tertiary);
    color: #fff;
}

.footer-divider {
    width: 0.5px;
    height: 20px;
    background: var(--color-border-tertiary);
}

.shortcut-trigger {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 16px;
    color: var(--color-text-tertiary);
    cursor: pointer;
    border: none;
    background: transparent;
    font-family: var(--font-sans);
    padding: 0;
}

.shortcut-trigger:hover .kbd {
    border-color: var(--color-border-primary);
    color: var(--color-text-secondary);
}

.kbd {
    font-size: 11px;
    font-family: var(--font-mono);
    background: var(--color-background-primary);
    border: 0.5px solid var(--color-border-secondary);
    border-radius: 5px;
    padding: 2px 5px;
    color: var(--color-text-secondary);
}

.kbd-hint {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--color-text-tertiary);
}

/* Task Card */
.tasks-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-pane-card {
    background-color: var(--color-background-primary);
    border: 1px solid #285a4b;
    border-radius: var(--border-radius-lg);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Add Task Form */
.add-task-section {
    margin-top: 0;
}

.add-task-form {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: var(--color-background-primary);
    border: 1px solid #285a4b;
    border-radius: 10px;
}

.task-pane-card .add-task-form {
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}

.add-task-form .task-input {
    background: #ffffff0d;
    border: 1px solid #285a4b;
    border-radius: 6px;
    padding: 9px 11px;
    padding-right: 130px;
    transition: background 0.15s, border-color 0.15s;
}

.add-task-form .task-input:focus {
    background: #00000038;
    border-color: var(--pomodoro-color);
}

.task-input-wrap {
    position: relative;
    flex: 1;
}

.task-input-wrap .task-input {
    width: 100%;
    padding-right: 130px;
}

.task-input-hint {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: var(--color-text-tertiary);
    pointer-events: none;
    white-space: nowrap;
}

.btn-more {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #ffffff0d;
    border: 1px solid #285a4b;
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    padding: 9px 10px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s;
}

.btn-more svg {
    width: 11px;
    height: 11px;
    color: #fff;
    transition: transform 0.15s;
}

.btn-more:hover {
    border-color: var(--color-border-primary);
    color: var(--color-text-primary);
}

.btn-add-text {
    background: var(--pomodoro-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    padding: 9px 15px;
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity 0.15s;
}

.btn-add-text:hover {
    opacity: 0.9;
}

.btn-add-text:disabled {
    opacity: 0.4;
    cursor: default;
}

.task-indent {
    flex-shrink: 0;
}

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

.add-subtask-form .task-input {
    font-size: 14px;
    padding: 6px 10px;
}

.schedule-agenda {
    padding: 0;
    margin: 0;
}

.sched-nav {
    display: none;
}

.sched-nav-btn {
    background: transparent;
    color: #fff;
    border: none;
    padding: 0;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.sched-nav-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.sched-window {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.sched-empty {
    color: var(--color-text-tertiary);
    font-size: 13px;
    padding: 8px 0;
}

.sched-days {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sched-day {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.day-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 4px;
}

.day-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #a78bfa;
    color: var(--color-background-secondary);
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.day-badge.empty {
    background: transparent;
    border: 1px solid #285a4b;
    color: var(--color-text-tertiary);
}

.day-weekday-full,
.day-weekday-short {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-primary);
    text-transform: capitalize;
}

.day-header.empty .day-weekday-full,
.day-header.empty .day-weekday-short {
    color: var(--color-text-tertiary);
}

.day-weekday-short {
    display: none;
}

.day-count-full,
.day-count-short {
    font-size: 10px;
    font-family: var(--font-mono);
    color: var(--color-text-tertiary);
}

.day-count-short {
    display: none;
}

.day-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.day-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    font-size: 14px;
}

.day-item.done .item-title {
    text-decoration: line-through;
    color: var(--color-text-tertiary);
}

.day-check {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--color-border-primary);
    flex-shrink: 0;
    cursor: pointer;
    background: transparent;
    padding: 0;
    transition: all 0.15s;
}

.day-check:hover {
    border-color: var(--pomodoro-color);
}

.day-check.completed {
    background: var(--pomodoro-color);
    border-color: var(--pomodoro-color);
}

.day-item .item-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.day-item .item-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.item-edit-btn {
    background: none;
    border: none;
    padding: 2px;
    color: var(--color-text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
}

.item-edit-btn:hover {
    color: var(--color-text-primary);
}

.day-edit {
    padding: 4px 0;
}

.day-edit .task-edit-panel {
    margin: 0;
}

.day-subitem {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 0 2px 28px;
    font-size: 13px;
    color: var(--color-text-secondary);
}

.day-subitem .subtask-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.day-subitem.subtask-nested {
    padding-left: 46px;
}

.day-subtask-form {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 0 2px 28px;
}

.day-subtask-form .subtask-input {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    padding: 4px 8px;
    border: 1px solid var(--color-border-primary);
    border-radius: 4px;
    background: transparent;
    color: inherit;
}

.day-subtask-form .subtask-btn {
    width: 22px;
    height: 22px;
    border: 1px solid var(--color-border-primary);
    background: transparent;
    color: inherit;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.day-subtask-form .subtask-btn.add:hover {
    background: var(--color-background-secondary);
}

.day-subtask-form .subtask-btn.cancel:hover {
    background: var(--color-background-secondary);
}

.day-empty {
    color: var(--color-text-tertiary);
    font-size: 11px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.capsule {
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 9999px;
    background: rgba(244, 42, 65, 0.18);
    color: var(--pomodoro-color);
}

.gtag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 2px 5px;
    border-radius: 4px;
    background: rgba(66, 133, 244, 0.18);
    line-height: 0;
}

.gtag svg {
    display: block;
}

.task-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    border-radius: 6px;
}

.row-toggle {
    width: 12px;
    height: 12px;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: transform 0.15s, color 0.15s;
    flex-shrink: 0;
    transform: rotate(90deg);
}

.row-toggle:hover {
    color: var(--color-text-primary);
}

.row-toggle.collapsed {
    transform: rotate(0deg);
}

.collapse-spacer {
    width: 12px;
    flex-shrink: 0;
}

.task-checkbox {
    width: 16px;
    height: 16px;
    border-radius: 5px;
    border: 1.5px solid #5f7d73;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    background: transparent;
    padding: 0;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.task-checkbox:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(244, 42, 65, 0.2);
}

.task-checkbox:hover {
    border-color: var(--color-border-primary);
}

.task-checkbox.completed {
    background: #FCA5A5;
    border-color: #FCA5A5;
}

.task-items {
    display: flex;
    flex-direction: column;
}

.task-text {
    font-size: 13px;
    color: var(--color-text-primary);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-text.completed {
    color: var(--color-text-tertiary);
    text-decoration: line-through;
}

.task-pomo-count {
    font-size: 11px;
    color: var(--color-text-tertiary);
    flex-shrink: 0;
    font-family: var(--font-mono);
}

.task-badge {
    font-size: 12px;
    flex-shrink: 0;
    line-height: 1;
}

.task-scheduled {
    opacity: 0.7;
}

.task-row.selected {
    background: rgba(244, 42, 65, 0.12);
}

/* Task actions (delete, uncomplete) */
.task-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.task-action-btn {
    width: 22px;
    height: 22px;
    border: none;
    background: #ffffff0f;
    color: #fff;
    cursor: pointer;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    padding: 0;
    transition: background 0.15s, color 0.15s;
}

.task-action-btn:hover {
    background: var(--color-background-secondary);
    color: #fff;
}

.task-action-btn.delete {
    background: #F42A411f;
    color: #fff;
}

.task-action-btn.delete:hover {
    color: #fff;
    background: rgba(163, 45, 45, 0.12);
}

.task-input {
    flex: 1;
    padding: 10px 12px;
    background: var(--color-surface-light);
    border: 1px solid #285a4b;
    border-radius: var(--border-radius-md);
    color: var(--color-text-primary);
    font-size: 13px;
    font-family: var(--font-sans);
}

.task-input:focus {
    outline: none;
    border-color: var(--color-border-primary);
}

.task-input::placeholder {
    color: var(--color-text-tertiary);
}

.btn-icon-small {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: var(--border-radius-md);
    font-size: 16px;
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.btn-icon-small.btn-add {
    background: var(--pomodoro-color);
    color: white;
}

.btn-icon-small.btn-add:hover {
    opacity: 0.9;
}

.btn-icon-small.btn-cancel {
    background: var(--color-surface-light);
    color: #fff;
    border: 1px solid #285a4b;
}

.btn-icon-small.btn-cancel:hover {
    background: var(--color-background-tertiary);
}

/* Completed Section */
.completed-section {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #285a4b;
}

.completed-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    background: none;
    border: none;
    padding: 8px 4px 0;
    cursor: pointer;
    color: #fff;
    transition: color 0.15s;
}

.completed-toggle:hover {
    color: #fff;
}

.completed-caret {
    transition: transform 0.15s;
    transform: rotate(90deg);
    flex-shrink: 0;
}

.completed-caret.collapsed {
    transform: rotate(0deg);
}

.completed-label {
    font-size: 11px;
    font-weight: 600;
}

.completed-count {
    font-size: 11px;
    font-family: var(--font-mono);
}

/* Task Edit Panel */
.task-edit-panel {
    padding: 12px;
    background: #ffffff0a;
    border: 1px solid #285a4b;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tep-title {
    font-size: 9px;
    letter-spacing: 1.4px;
    color: var(--color-text-tertiary);
    font-family: var(--font-mono);
}

.tep-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tep-collapse {
    display: flex;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.tep-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
}

.tep-label {
    font-size: 9px;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-family: var(--font-mono);
}

.tep-select,
.tep-input {
    padding: 9px 10px;
    background: #00000038;
    border: 1px solid #285a4b;
    border-radius: var(--border-radius-sm);
    color: var(--color-text-primary);
    font-size: 13px;
    font-family: var(--font-sans);
    flex: 1;
    min-width: 0;
}

.tep-select option {
    background: #0f1f1c;
    color: #ffffff;
}

.tep-select option[disabled] {
    color: #5f7d73;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.tep-input[type="date"] {
    font-family: var(--font-sans);
    color-scheme: dark;
}

.tep-input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
}

.tep-input-name {
    border-color: var(--pomodoro-color);
}

.tep-input-sm {
    width: 60px;
    flex: none;
    text-align: center;
}

.tep-unit {
    font-size: 13px;
    color: var(--color-text-tertiary);
    flex-shrink: 0;
}

.tep-weekdays {
    flex-wrap: wrap;
}

.tep-weekday-btns {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.tep-weekday-btn {
    flex: 1;
    height: 30px;
    border: 1px solid #285a4b;
    border-radius: var(--border-radius-sm);
    background: #00000038;
    color: #fff;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.15s;
}

.tep-weekday-btn.active {
    background: var(--pomodoro-color);
    border-color: var(--pomodoro-color);
    color: white;
    font-weight: 600;
}

.tep-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 12px;
    border: 1px solid #285a4b;
    border-radius: var(--border-radius-sm);
    background: #00000038;
    color: #fff;
    font-size: 12px;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.15s;
}

.tep-toggle.active {
    background: var(--pomodoro-color);
    border-color: var(--pomodoro-color);
    color: white;
}

.tep-toggle-label {
    font-size: 12px;
}

.tep-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 4px;
}

.tep-save-btn {
    height: 38px;
    background: var(--pomodoro-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: opacity 0.15s;
}

.tep-save-btn:hover {
    opacity: 0.9;
}

.tep-cancel-btn {
    height: 38px;
    background: transparent;
    color: #fff;
    border: 1px solid #285a4b;
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: background 0.15s;
}

.tep-cancel-btn:hover {
    background: var(--color-background-tertiary);
}

/* Consent Modal */
.consent-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 16px;
}

.consent-modal {
    background-color: var(--color-background-primary);
    border-radius: var(--border-radius-lg);
    border: 1px solid #285a4b;
    max-width: 400px;
    width: 100%;
    overflow: hidden;
}

.consent-body {
    padding: 18px 16px 0;
    text-align: center;
}

.consent-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(244, 42, 65, 0.15);
    border: 0.5px solid rgba(244, 42, 65, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 9px;
    font-size: 16px;
}

.consent-header h2 {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text-primary);
    margin-bottom: 3px;
}

.consent-message {
    color: var(--color-text-secondary);
    font-size: 16px;
    margin-bottom: 13px;
}

.consent-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.btn-option {
    width: 100%;
    padding: 12px;
    border-radius: var(--border-radius-md);
    border: 1px solid #285a4b;
    background: var(--color-surface-light);
    cursor: pointer;
    font-family: var(--font-sans);
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.15s;
}

.btn-option:hover {
    background: var(--color-background-tertiary);
}

.btn-option.default {
    border-color: var(--pomodoro-color);
    background: rgba(244, 42, 65, 0.07);
}

.btn-option.default:hover {
    background: rgba(244, 42, 65, 0.13);
}

.option-label {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text-primary);
}

.option-duration {
    font-size: 16px;
    color: var(--color-text-tertiary);
}

.option-chevron {
    color: var(--color-text-tertiary);
    font-size: 16px;
}

.consent-footer {
    padding: 12px;
    border-top: 1px solid #285a4b;
    background: var(--color-surface-light);
}

.auto-continue-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 16px;
    color: var(--color-text-tertiary);
    margin-bottom: 5px;
}

.spinner {
    width: 14px;
    height: 14px;
    border: 2px solid var(--color-border-secondary);
    border-top-color: var(--pomodoro-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.consent-progress-track {
    height: 4px;
    background: var(--color-surface-light);
    border-radius: 2px;
    overflow: hidden;
}

.consent-progress-fill {
    height: 100%;
    background: var(--pomodoro-color);
    border-radius: 2px;
    transition: width 1s linear;
}

/* Loading Screen */
.loading-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: var(--color-background-secondary);
}

.loading-spinner {
    width: 160px;
    height: 160px;
}

.loading-spinner .ls-ring {
    stroke-dasharray: 465;
    stroke-dashoffset: 465;
    animation: ls-draw-ring 3s infinite;
}

.loading-spinner .ls-short {
    stroke-dasharray: 32;
    stroke-dashoffset: 32;
    animation: ls-draw-short 3s infinite;
}

.loading-spinner .ls-long {
    stroke-dasharray: 77;
    stroke-dashoffset: 77;
    animation: ls-draw-long 3s infinite;
}

@keyframes ls-draw-ring {
    0% { stroke-dashoffset: 465; }
    25%, 100% { stroke-dashoffset: 0; }
}

@keyframes ls-draw-short {
    0%, 25% { stroke-dashoffset: 32; }
    50%, 100% { stroke-dashoffset: 0; }
}

@keyframes ls-draw-long {
    0%, 50% { stroke-dashoffset: 77; }
    75%, 100% { stroke-dashoffset: 0; }
}

.loading-text {
    margin-top: 16px;
    font-size: 13px;
    color: var(--color-text-tertiary);
    letter-spacing: 0.5px;
}

/* Section Error */
.section-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    color: var(--color-text-tertiary);
    gap: 0.75rem;
}

/* =============================================================================
   Two-line task row (Group A), badge labels (Group D), task-secondary wrapper
   ============================================================================= */

.task-secondary {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.repeat-badge,
.schedule-badge,
.paused-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 9px;
    font-family: var(--font-mono, monospace);
    line-height: 1;
}

.repeat-badge {
    background: rgba(167, 139, 250, 0.18);
    color: #a78bfa;
}

.schedule-badge {
    background: rgba(192, 192, 192, 0.18);
    color: #5dade2;
}

.paused-badge {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    background: #ffffff0f;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.google-badge {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    background: #ffffff0f;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.badge-icon {
    flex-shrink: 0;
}

.badge-label {
    white-space: nowrap;
}

.delete-confirm {
    background: var(--color-background-primary);
    border: 1px solid #285a4b;
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}

.delete-confirm-title {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
}

.delete-confirm-body {
    color: var(--color-text-secondary);
    font-size: 12px;
    line-height: 1.5;
}

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

.delete-confirm-cancel {
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid #285a4b;
    background: transparent;
    color: var(--color-text-secondary);
    font-size: 12px;
    cursor: pointer;
    font-family: var(--font-sans);
}

.delete-confirm-cancel:hover {
    background: var(--color-background-secondary);
}

.delete-confirm-go {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    background: var(--pomodoro-color);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-sans);
}

.delete-confirm-go:hover {
    opacity: 0.9;
}

.undo-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--deep-blue, #1c3d35);
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 200;
    max-width: 90vw;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.undo-toast-msg {
    color: #fff;
    font-size: 12px;
    font-family: var(--font-sans);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.undo-toast-btn {
    padding: 5px 12px;
    border-radius: 6px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    font-family: var(--font-sans);
}

.undo-toast-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.error-toast {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(244, 42, 65, 0.95);
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 200;
    max-width: 90vw;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.error-toast-msg {
    color: #fff;
    font-size: 12px;
    font-family: var(--font-sans);
    line-height: 1.3;
}

/* =============================================================================
   Desktop/mobile visibility toggle (Groups G, I)
   ============================================================================= */

.mobile-only {
    display: block;
}

.desktop-only {
    display: none;
}

/* =============================================================================
   Desktop Today Summary strip (Group G)
   ============================================================================= */

.timer-pane-summary {
    display: flex;
    gap: 0;
    padding: 10px 14px;
    background: var(--color-surface-dark, #0f1f1c);
    border: 1px solid #285a4b;
    border-radius: 10px;
}

.summary-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    gap: 2px;
}

.summary-val {
    font-size: 18px;
    color: var(--color-text-primary);
    font-weight: 700;
    font-family: var(--font-mono);
}

.summary-lbl {
    font-size: 10px;
    color: var(--color-text-tertiary);
}

/* =============================================================================
   Session Log (Group G)
   ============================================================================= */

.session-log {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--color-surface-dark, #0f1f1c);
    border: 1px solid #285a4b;
    border-radius: 10px;
    padding: 10px 14px;
    overflow: hidden;
    min-height: 0;
}

.session-log-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.session-log-title {
    font-size: 12px;
    color: var(--color-text-primary);
    font-weight: 600;
}

.session-log-count {
    font-size: 10px;
    color: var(--color-text-tertiary);
    font-family: var(--font-mono);
}

.session-log-items {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 0;
}

.session-log-items:not(:has(.session-log-row)) {
    overflow-y: hidden;
}

.session-log-empty {
    color: var(--color-text-tertiary);
    font-size: 12px;
    text-align: center;
    padding: 8px 0;
    margin: auto 0;
}

.session-log-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.session-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--pomodoro-color);
    flex-shrink: 0;
}

.session-time {
    font-size: 11px;
    color: var(--color-text-tertiary);
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
    font-family: var(--font-mono);
}

.session-task {
    flex: 1;
    font-size: 12px;
    color: var(--color-text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.session-dur {
    font-size: 11px;
    color: var(--color-text-tertiary);
    flex-shrink: 0;
    font-family: var(--font-mono);
}

/* =============================================================================
   Split timer pane responsive (Groups G, I, A)
   ============================================================================= */

@media (min-width: 900px) {
    .app-wrapper {
        height: 100vh;
        overflow: hidden;
    }

    .app-content {
        flex: 1;
        overflow-y: auto;
        padding: 0;
        max-width: 100%;
    }

    .main-container {
        height: 100%;
        overflow: hidden;
    }

    .timer-split {
        height: 100%;
        overflow: hidden;
    }

    .split-timer {
        display: flex;
        flex-direction: column;
        gap: 10px;
        height: 100%;
        overflow: hidden;
    }

    .split-tasks {
        height: 100%;
        min-height: 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .tasks-section {
        flex: 1;
        min-height: 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .task-card {
        flex: 1;
        min-height: 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .task-items {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
    }

    .add-task-section {
        flex-shrink: 0;
    }

    .schedule-agenda {
        flex: 1;
        min-height: 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .sched-nav {
        flex-shrink: 0;
    }

    .sched-days {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
    }

    .mobile-only {
        display: none !important;
    }

    .desktop-only {
        display: block;
    }

    .timer-pane-summary {
        display: flex;
    }

    .session-log-wrap {
        flex: 1;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    .session-log {
        display: flex;
    }

    .task-row {
        flex-wrap: nowrap;
    }
}

.sticky-timer-bar {
    display: none;
}

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

.stb-ring svg {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(-90deg);
}

.stb-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.12);
    stroke-width: 4;
}

.stb-ring-fill {
    fill: none;
    stroke: var(--pomodoro-color);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: calc(2 * 3.14159 * 14);
    transition: stroke-dashoffset 0.3s;
}

.stb-ring-fill.short-break {
    stroke: var(--short-break-color);
}

.stb-ring-fill.long-break {
    stroke: var(--long-break-color);
}

.stb-time {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
    font-family: var(--font-mono);
    line-height: 1;
}

.sticky-timer-bar.running.pomodoro-theme .stb-time { color: var(--pomodoro-color); }
.sticky-timer-bar.running.short-break-theme .stb-time { color: var(--short-break-color); }
.sticky-timer-bar.running.long-break-theme .stb-time { color: var(--long-break-color); }

.stb-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.stb-task {
    font-size: 11px;
    color: var(--color-text-tertiary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stb-pause {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    border: none;
    background: var(--pomodoro-color);
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    padding: 0;
}

.stb-pause:active {
    opacity: 0.8;
}

.stb-pause:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.sticky-timer-bar.short-break-theme .stb-pause {
    background: var(--short-break-color);
}

.sticky-timer-bar.long-break-theme .stb-pause {
    background: var(--long-break-color);
}

@media (max-width: 899px) {
    .mode-tabs {
        display: none;
    }

    .header-action {
        display: none;
    }

    .task-row {
        flex-wrap: wrap;
    }

    .task-pomo-count {
        order: 1;
    }

    .task-secondary {
        order: 2;
        flex-basis: 100%;
        justify-content: flex-start;
        padding-left: 28px;
    }

    .task-actions {
        margin-left: auto;
    }

    .badge-label {
        display: inline;
    }

    .task-input-hint {
        display: none;
    }

    .task-input-wrap .task-input,
    .add-task-form .task-input {
        padding-right: 11px;
    }

    .btn-add-text {
        padding: 9px 12px;
        white-space: nowrap;
    }

    .desktop-only {
        display: none !important;
    }

    .tasks-section {
        margin-top: 10px;
    }

    .timer-pane-summary,
    .session-log {
        display: none !important;
    }

    .day-weekday-full {
        display: none;
    }

    .day-weekday-short {
        display: inline;
    }

    .day-count-full {
        display: none;
    }

    .day-count-short {
        display: inline;
    }

    .sticky-timer-bar {
        display: flex;
        flex-direction: column;
        padding: 0;
        gap: 0;
        background: var(--color-surface-dark, #0f1f1c);
        border: 1px solid rgba(244, 42, 65, 0.3);
        border-radius: 8px;
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .stb-tabs {
        display: flex;
        gap: 0;
    }

    .stb-tab {
        flex: 1;
        padding: 8px 0;
        border: none;
        background: transparent;
        font-size: 12px;
        font-weight: 400;
        color: rgba(255, 255, 255, 0.3);
        cursor: pointer;
        font-family: var(--font-sans);
        border-bottom: 2px solid transparent;
        text-align: center;
    }

    .stb-tab.act {
        color: #9db8ae;
        font-weight: 600;
        border-bottom-color: var(--pomodoro-color);
    }

    .stb-tab.act.sb {
        border-bottom-color: var(--short-break-color);
    }

    .stb-tab.act.lb {
        border-bottom-color: var(--long-break-color);
    }

    .stb-body {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 9px 11px;
    }

    .sticky-timer-bar.short-break-theme {
        border-color: rgba(252, 165, 165, 0.3);
    }

    .sticky-timer-bar.long-break-theme {
        border-color: rgba(192, 192, 192, 0.3);
    }
}

/* Responsive */
@media (max-width: 480px) {
    .header-content-wrapper {
        padding: 7px 9px;
    }
    .mode-tabs button {
        padding: 8px 0;
        font-size: 13px;
    }
    .task-card {
        margin: 0 8px 8px;
    }
    .step-btn {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }
    .tog {
        width: 44px;
        height: 24px;
        border-radius: 12px;
    }
    .tog-k {
        width: 18px;
        height: 18px;
        top: 2px;
        left: 2px;
    }
    .tog.on .tog-k {
        left: 22px;
    }
    .consent-modal {
        max-width: 100%;
        margin: 0 8px;
    }
    .btn-option {
        padding: 14px 12px;
    }
    .tep-input-sm {
        width: 50px;
    }
}

/* =============================================================================
   Console layout — timer and task list share the screen on wide viewports.
   Below the breakpoint this is a plain column, identical to the stacked layout,
   so the mobile composition is unchanged.
   ============================================================================= */

.timer-split {
    display: flex;
    flex-direction: column;
}

@media (min-width: 900px) {
    .timer-split {
        display: grid;
        grid-template-columns: 520px minmax(0, 1fr);
        gap: 14px;
        align-items: stretch;
        padding: 18px 20px;
    }

    .completed-toggle {
        padding: 8px 8px 0;
    }

    .day-header {
        gap: 10px;
        padding: 6px 0;
    }

    .day-badge {
        width: 28px;
        height: 28px;
    }

    .day-weekday-full,
    .day-weekday-short {
        font-size: 13px;
    }

    .sched-days {
        gap: 10px;
    }

    .sched-nav {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 8px 0;
    }

    .sched-day {
        gap: 4px;
    }

    .btn-more {
        gap: 5px;
        padding: 9px 11px;
    }

    .btn-more svg {
        width: 12px;
        height: 12px;
    }

    .btn-add-text {
        padding: 9px 16px;
    }

    /* The panes own the gutters now, so the children drop their own margins. */
    .timer-split .mode-tabs {
        margin: 0;
        padding: 3px;
    }

    .timer-split .timer-card,
    .timer-split .task-card {
        margin: 0;
    }

    .split-tasks {
        min-width: 0;
    }

    .header-title {
        gap: 8px;
    }

    .header-text {
        font-size: 16px;
    }

    .header-logo {
        width: 28px;
        height: 28px;
    }

    .task-edit-panel {
        padding: 13px 14px;
        gap: 9px;
        border: 1px solid #285a4b;
        border-radius: 8px;
    }

    .tep-row {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }

    .tep-label {
        font-size: 12px;
        text-transform: none;
        letter-spacing: 0;
        min-width: 74px;
        flex-shrink: 0;
    }

    .tep-select,
    .tep-input {
        padding: 8px 10px;
        font-size: 12px;
    }

    .tep-input[type="date"] {
        font-family: var(--font-mono);
    }

    .tep-weekday-btns {
        gap: 5px;
    }

    .tep-weekday-btn {
        flex: none;
        width: 30px;
        height: 26px;
    }

    .tep-actions {
        flex-direction: row;
        justify-content: flex-end;
    }

    .tep-save-btn {
        height: auto;
        padding: 8px 18px;
        font-size: 12px;
    }

    .tep-cancel-btn {
        height: auto;
        padding: 8px 16px;
        font-size: 12px;
    }

    .tep-toggle {
        width: 38px;
        height: 26px;
        padding: 0;
        font-size: 14px;
    }

    .tep-toggle-label {
        display: none;
    }

    .tep-collapse {
        display: none;
    }

    .tep-header {
        display: block;
    }
}

@media (min-width: 1200px) {
    .app-content,
    .header-content-wrapper {
        max-width: 1100px;
    }
}
