@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('./fonts/inter-latin-wght-normal.woff2') format('woff2'); }
body { font-family: 'Inter', sans-serif; background-color: #111315; }
        
        ::-webkit-scrollbar { width: 6px; height: 6px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: #333; border-radius: 10px; }
        ::-webkit-scrollbar-thumb:hover { background: #555; }
        
        .task-checkbox, .note-checkbox {
            appearance: none; width: 20px; height: 20px; border: 2px solid #555; border-radius: 50%;
            outline: none; cursor: pointer; transition: all 0.2s; position: relative; display: flex;
            align-items: center; justify-content: center; background-color: rgba(0,0,0,0.3);
        }
        .note-checkbox { border-radius: 4px; }
        .task-checkbox:checked, .note-checkbox:checked { background-color: #B2FF05; border-color: #B2FF05; }
        .task-checkbox:checked::after, .note-checkbox:checked::after {
            content: ''; width: 10px; height: 10px;
            background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23000" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>');
            background-size: contain; background-repeat: no-repeat;
        }
        .strike-through { text-decoration: line-through; color: #6B7280; }
        .project-item { transition: all 0.2s ease; }

        .dragging { opacity: 0.5; border: 2px dashed #B2FF05; }
        .drag-over { border-bottom: 2px solid #B2FF05; padding-bottom: 2px; }
        
        @keyframes pulse-border {
            0% { box-shadow: 0 0 0 0 rgba(178, 255, 5, 0.4); }
            70% { box-shadow: 0 0 0 10px rgba(178, 255, 5, 0); }
            100% { box-shadow: 0 0 0 0 rgba(178, 255, 5, 0); }
        }
        .timer-active { animation: pulse-border 2s infinite; border-color: #B2FF05 !important; }
        
        .loader {
            border: 3px solid rgba(255,255,255,0.1); border-top: 3px solid #000;
            border-radius: 50%; width: 20px; height: 20px; animation: spin 1s linear infinite;
        }
        @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

        /* Notes Grid */
        .masonry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; align-items: start; }
        .note-card { break-inside: avoid; transition: transform 0.2s, box-shadow 0.2s; }
        .note-card:hover .note-hover-actions { opacity: 1; }
        .note-hover-actions { opacity: 0; transition: opacity 0.2s; }
        .selected-note { border-color: #B2FF05 !important; box-shadow: 0 0 0 1px #B2FF05; }
        
        #saveIndicator { opacity: 0; transition: opacity 0.3s; }
        .show-save { opacity: 1 !important; }

/* Production polish */
html { color-scheme: dark; }
body { min-height: 100dvh; overflow-x: hidden; }
button, input, textarea, select { font: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 2px solid #B2FF05;
    outline-offset: 2px;
}
.mobile-nav { padding-bottom: max(0.5rem, env(safe-area-inset-bottom)); }
#syncModeIndicator[data-state="saving"] { opacity: 0.85; }
#syncModeIndicator[data-state="offline"] { background: rgba(234,179,8,.1); }
#syncModeIndicator[data-state="error"] { background: rgba(239,68,68,.08); }

@media (max-width: 767px) {
    #view-split #split-details-panel { display: none; }
    #view-split.mobile-detail-open #project-list-panel { display: none; }
    #view-split.mobile-detail-open #split-details-panel { display: flex; width: 100%; min-height: 100%; }
    #project-list-panel { border-right: 0; padding-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* PIN access and portable backups use the existing Life OS palette. */
.auth-eyebrow { color: #b2ff05; font-size: 10px; letter-spacing: .16em; font-weight: 700; margin-bottom: 12px; }
.auth-footnote { color: #7d8490; font-size: 11px; text-align: center; margin-top: 28px; }
.pin-field { position: relative; }
.pin-field input { padding-right: 68px; letter-spacing: .14em; }
.pin-field input::placeholder { letter-spacing: 0; color: #737b88; }
.pin-field button { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: #a4acb9; font-size: 12px; padding: 8px 0; }
button:disabled { cursor: wait; opacity: .65; }
.header-tool { display: inline-flex; align-items: center; justify-content: center; gap: 7px; background: #1a1d24; color: #a4acb9; border: 1px solid #2a303c; border-radius: 12px; padding: 10px; font-size: 12px; transition: color .15s, border-color .15s; }
.header-tool:hover { color: #b2ff05; border-color: #556338; }
.data-panel { width: min(100%, 640px); max-height: 90dvh; overflow-y: auto; background: #1a1d24; border: 1px solid #303641; border-radius: 28px; padding: 28px; box-shadow: 0 30px 100px #0008; color: #e5e7eb; }
.data-heading, .history-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.data-heading h2 { font-size: 24px; font-weight: 700; }
.data-heading .auth-eyebrow { margin-bottom: 5px; }
.data-intro { font-size: 14px; color: #9ca3af; line-height: 1.7; margin: 18px 0; }
.backup-actions { display: flex; gap: 12px; }
.backup-primary, .backup-secondary { padding: 12px 18px; border-radius: 12px; font-size: 13px; font-weight: 700; cursor: pointer; text-align: center; }
.backup-primary { background: #b2ff05; color: #101216; }
.backup-secondary { border: 1px solid #444c5a; background: #23262f; }
.backup-note { font-size: 11px; color: #929aa8; line-height: 1.65; margin: 12px 0 20px; }
.history-heading { margin-top: 24px; }
.history-heading h3 { font-size: 15px; font-weight: 600; }
.history-heading button { font-size: 12px; color: #b2ff05; }
.history-list { color: #9ca3af; font-size: 13px; }
.history-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-top: 1px solid #2b303b; }
.history-row strong, .history-row span { display: block; }
.history-row strong { font-size: 13px; color: #e5e7eb; margin-bottom: 4px; }
.history-row span { font-size: 11px; }
.history-row button { padding: 6px 12px; border: 1px solid #404956; border-radius: 9px; color: #b2ff05; font-size: 11px; }
.noscript-message { position: fixed; z-index: 200; inset: 0; display: grid; place-items: center; background: #111315; color: white; }
#confirmModal { z-index: 95; }
.group:focus-within > .group-hover\:visible { visibility: visible; opacity: 1; }
.group:focus-within > .group-hover\:block { display: block; }
@media (min-width: 768px) and (max-width: 1023px) {
    #mainNav { display: none; }
    #mobileNav { display: block; }
    #appContainer { padding-bottom: 6rem; }
}
@media (max-width: 767px) {
    #appContainer > header { flex-wrap: wrap; gap: 10px; }
    #pomodoroWidget { bottom: 88px; left: 12px; right: 12px; gap: 8px; padding: 12px; }
    #pomodoroWidget #pomoTaskTitle { max-width: 105px; }
    #pomodoroWidget #pomoTimerDisplay { margin-left: auto; font-size: 22px; }
    #noteModal > div { padding: 18px; }
    #noteModal > div > div:first-child { flex-wrap: wrap; gap: 12px; }
    #noteModal > div > div:first-child > div:first-child { width: 100%; }
    .data-panel { padding: 22px; border-radius: 22px; }
    .backup-actions { flex-wrap: wrap; }
    .backup-actions > * { flex: 1; }
}

/* Installed-app chrome and touch surfaces. */
:root { --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px); --nav-height: 76px; }
html { -webkit-tap-highlight-color: transparent; }
button, a, summary, label, input, select { touch-action: manipulation; }
button:disabled { cursor: default; }
body.has-dialog { overflow: hidden; }
.mobile-screen-heading, .phone-header-menu, .task-more-button, .task-mobile-meta { display: none; }
.category-select { min-width: 0; max-width: 100%; background: #23262f; border: 1px solid #374151; color: #d1d5db; border-radius: 12px; padding: 10px 32px 10px 12px; font-size: 13px; cursor: pointer; }
#projectCategorySelect { flex: 1; width: 100%; }
.install-inline { display: block; color: #b2ff05; font-size: 13px; margin: 16px auto 0; padding: 10px 12px; min-height: 44px; }
.install-inline.hidden { display: none; }
.app-update { display: flex; align-items: center; gap: 12px; border: 1px solid #405427; border-radius: 14px; background: #202c18; color: #e7eddf; padding: 10px 14px; font-size: 13px; flex-shrink: 0; }
.app-update.hidden { display: none; }
.app-update > span { flex: 1; }
.app-update button { color: #b2ff05; font-weight: 600; min-height: 40px; padding: 4px 8px; }
.app-sheet { position: fixed; inset: 0; z-index: 85; display: flex; align-items: flex-end; justify-content: center; padding: 24px; background: #050709b8; backdrop-filter: blur(8px); }
.app-sheet.hidden { display: none; }
#installModal { z-index: 130; }
.sheet-panel { width: min(100%, 480px); background: #1a1d24; border: 1px solid #343b46; border-radius: 28px; padding: 14px 22px 22px; max-height: 90dvh; overflow-y: auto; box-shadow: 0 24px 80px #0006; }
.sheet-handle { height: 4px; width: 36px; background: #49505b; border-radius: 9px; margin: 0 auto 16px; }
.sheet-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.sheet-heading h2 { font-size: 20px; font-weight: 650; color: #f4f6f8; line-height: 1.4; overflow-wrap: anywhere; }
.sheet-heading .header-tool { min-height: 44px; min-width: 44px; flex-shrink: 0; }
.sheet-menu { display: flex; flex-direction: column; }
.sheet-menu > button { min-height: 58px; padding: 14px 4px; border-bottom: 1px solid #303641; display: flex; align-items: center; justify-content: space-between; gap: 16px; text-align: left; font-size: 15px; color: #e4e8ee; }
.sheet-menu > button:hover { color: #b2ff05; }
.sheet-menu > button.hidden { display: none; }
.sheet-footnote { color: #8c96a6; line-height: 1.65; font-size: 12px; margin-top: 20px; }
.task-due-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #a4afbd; font-size: 14px; padding: 10px 0; }
.task-due-label input { min-height: 46px; min-width: 0; width: 170px; background: #23262f; border: 1px solid #414b5b; border-radius: 12px; color: #f1f4f8; padding: 8px 10px; font-size: 16px; }
.task-move-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.task-move-controls button { min-height: 46px; border: 1px solid #3b4350; border-radius: 12px; color: #e1e6ed; font-size: 14px; }
.task-move-controls button:disabled { opacity: .3; }
.sheet-danger { color: #ff9292; font-weight: 600; width: 100%; min-height: 48px; margin-top: 14px; border-radius: 12px; background: #ef44440d; }
.install-app-identity { display: flex; align-items: center; gap: 14px; margin: 16px 0 20px; }
.install-app-identity img { border-radius: 18px; }
.install-app-identity strong, .install-app-identity span { display: block; }
.install-app-identity strong { color: #f3f5f7; font-size: 18px; margin-bottom: 5px; }
.install-app-identity span { color: #98a4b4; font-size: 13px; }
#installInstructions { color: #d0d8e2; font-size: 15px; line-height: 1.75; }
.install-done { display: block; width: 100%; margin-top: 24px; min-height: 48px; }
.mobile-nav-items { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; }
.mobile-nav-item { min-width: 0; min-height: 64px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 3px; padding: 5px 2px; border-radius: 16px; color: #909bad; font-size: 10px; font-weight: 550; }
.mobile-nav-icon { display: grid; place-items: center; width: 48px; height: 30px; border-radius: 12px; }
.mobile-nav-item.is-active { color: #c5ff48; }
.mobile-nav-item.is-active .mobile-nav-icon { background: #b2ff0515; }
.project-context summary { cursor: pointer; list-style: none; }
.project-context summary::-webkit-details-marker { display: none; }
.project-context summary::after { content: '+'; color: #95a0b0; font-size: 17px; margin-left: 12px; }
.project-context[open] summary::after { content: '−'; }
#workspaceViews, #view-split, #split-details-panel, #project-list-panel, #view-notes { min-width: 0; }
@media (hover: none) {
    .note-hover-actions { opacity: 1; }
    .task-item:hover { background: inherit; }
}
@media (max-width: 1023px) {
    .app-header .desktop-tool { display: none; }
    .phone-header-menu { display: inline-flex; min-width: 44px; min-height: 44px; }
    #mainNav { display: none; }
    #mobileNav { display: block; border-color: #303641; background: #14181ff5; padding: 7px 8px max(7px, var(--safe-bottom)); }
    #pomodoroWidget { bottom: calc(var(--nav-height) + var(--safe-bottom) + 10px); }
}
@media (max-width: 767px) {
    html, body { height: 100%; height: 100dvh; overflow: hidden; overscroll-behavior-y: none; }
    #appContainer { height: 100dvh; height: var(--visual-height, 100dvh); min-height: 0; max-height: 100dvh; padding: calc(12px + var(--safe-top)) 14px calc(var(--nav-height) + var(--safe-bottom) + 8px); gap: 13px; overflow: hidden; }
    #appContainer.hidden { display: none; }
    #appContainer > .app-header { flex-wrap: nowrap; gap: 8px; padding: 0 2px; min-height: 44px; }
    .app-header > div:first-child { gap: 8px; min-width: 0; }
    .app-header h1 { font-size: 18px; letter-spacing: -.02em; white-space: nowrap; }
    .app-header > div:first-child > svg { color: #b2ff05; width: 22px; height: 22px; flex-shrink: 0; }
    #syncModeIndicator { margin-left: 3px; max-width: 96px; min-height: 32px; font-size: 9px; padding: 6px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .mobile-screen-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 3px; gap: 10px; flex-shrink: 0; }
    .mobile-screen-heading p { color: #8f9bab; font-size: 9px; font-weight: 650; letter-spacing: .13em; margin-bottom: 4px; }
    .mobile-screen-heading h2 { font-size: 27px; line-height: 1.2; letter-spacing: -.035em; font-weight: 700; color: #f4f6f9; }
    .mobile-heading-add { display: grid; place-items: center; background: #b2ff05; color: #111315; width: 46px; height: 46px; border-radius: 16px; font-size: 28px; font-weight: 400; flex-shrink: 0; }
    body.project-detail .mobile-screen-heading { display: none; }
    #workspaceMetrics { display: none; }
    body[data-tab="dashboard"] #workspaceMetrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; padding: 0; }
    #workspaceMetrics > div { border-radius: 15px; padding: 11px 8px; min-width: 0; box-shadow: none; background: #1a1e26; border-color: #303641; }
    #workspaceMetrics p { font-size: 8px; line-height: 1.4; letter-spacing: 0; font-weight: 500; min-height: 22px; color: #9eabba; }
    #workspaceMetrics h2 { font-size: 22px; line-height: 1.3; }
    #workspaceMetrics > div > div:not(:has(h2)) { display: none; }
    #workspaceMetrics > div:last-child { padding: 11px 8px; }
    #workspaceViews { flex: 1; min-height: 0; border-radius: 22px; background: #111315; box-shadow: none; overflow: hidden; }
    #view-dashboard, #view-timeline, #view-notes { padding: 2px 1px 16px; height: 100%; min-height: 0; overscroll-behavior-y: contain; scrollbar-width: none; }
    #view-dashboard > div:first-child { gap: 13px; margin-bottom: 14px; }
    #view-dashboard > div:first-child > div, #dashboardGrid > div { padding: 18px; border-radius: 20px; border-color: #303641; box-shadow: none; }
    #view-dashboard h3 { font-size: 16px; }
    #dailyFocusList > div { align-items: flex-start; gap: 8px; padding: 11px 8px; }
    #dailyFocusList > div > div { min-width: 0; padding-top: 6px; }
    #dailyFocusList h4 { overflow-wrap: anywhere; }
    #dailyFocusList button { min-height: 44px; min-width: 40px; display: grid; place-items: center; }
    #heatmapContainer { gap: 6px; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 5px; }
    #heatmapContainer > div { flex-shrink: 0; }
    #dashboardGrid { gap: 12px; }
    #view-split { height: 100%; min-height: 0; padding: 0; gap: 0; }
    #project-list-panel { height: 100%; width: 100%; padding: 0; }
    #project-list-panel > div:first-child { display: none; }
    #project-list-panel > div:nth-child(2) { padding: 0 2px; margin-bottom: 13px; gap: 8px; }
    #projectList { padding: 0 1px 16px; overscroll-behavior-y: contain; }
    .project-item { border-radius: 20px; padding: 17px; background: #1a1e26; border-color: #303641; min-height: 118px; }
    .project-item > div:first-of-type > div:first-child { min-width: 0; }
    .project-item h4 { font-size: 16px; line-height: 1.45; overflow-wrap: anywhere; }
    #split-details-panel { height: 100%; min-height: 0 !important; overflow-y: auto; overscroll-behavior-y: contain; padding: 0 1px 8px; border-radius: 0; background: transparent; box-shadow: none; }
    #split-details-panel > * { flex-shrink: 0; }
    #split-details-panel > button:first-child { align-self: flex-start; padding: 10px 14px; min-height: 44px; margin-bottom: 14px; border-radius: 13px; }
    #split-details-panel > div:nth-child(2) { margin-bottom: 16px; gap: 8px; }
    #split-details-panel > div:nth-child(2) > div:first-child { min-width: 0; padding-right: 0; }
    #projectTitleInput { max-width: 100%; width: 100%; min-width: 0; font-size: 24px; line-height: 1.4; margin: 0; padding: 0; }
    #split-details-panel > div:nth-child(2) button { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; }
    .project-metrics { gap: 7px; margin-bottom: 12px; }
    .project-metrics > div { padding: 11px 10px; border-radius: 14px; }
    .project-metrics > div > span:first-child { font-size: 9px; letter-spacing: 0; margin-bottom: 6px; }
    .project-metrics span.text-2xl { font-size: 22px; }
    .project-metrics + div { margin-bottom: 14px; }
    .project-context { padding: 11px 13px; border-radius: 15px; margin-bottom: 16px; }
    .project-context summary { min-height: 26px; margin-bottom: 0; }
    .project-context[open] summary { margin-bottom: 12px; }
    .project-context textarea { min-height: 110px; font-size: 16px; line-height: 1.6; }
    .project-task-list { flex-grow: 1; overflow: visible; margin-bottom: 12px; padding-top: 12px; }
    .task-item { position: relative; padding: 9px 5px; display: grid; grid-template-columns: 40px minmax(0,1fr) 44px; gap: 0 6px; border-bottom: 1px solid #292f3a; border-radius: 0; align-items: center; }
    .task-item > .task-checkbox { grid-column: 1; width: 28px; height: 28px; margin: 8px 6px; }
    .task-item > span { grid-column: 2; font-size: 15px; line-height: 1.5; min-height: 44px; display: flex; align-items: center; overflow-wrap: anywhere; }
    .task-more-button { grid-column: 3; display: grid; place-items: center; min-width: 44px; min-height: 44px; color: #a7b3c4; font-size: 26px; border-radius: 12px; }
    .task-mobile-meta { display: flex; flex-wrap: wrap; grid-column: 2 / 4; gap: 9px; color: #8f9bab; font-size: 10px; padding-bottom: 6px; }
    .task-mobile-meta:empty { display: none; }
    .task-focus-label { color: #d2c18a; }
    .task-actions-desktop { display: none; }
    #newTaskForm { position: sticky; bottom: -8px; z-index: 3; margin-top: 8px; padding: 12px; border-radius: 18px; gap: 9px; background: #232833; border-color: #424c5c; box-shadow: 0 -8px 14px #111315aa; }
    #newTaskInput { font-size: 16px; min-height: 40px; padding: 6px 2px; }
    #newTaskForm > div:last-child { padding: 0; gap: 10px; }
    #newTaskDate { font-size: 14px; min-height: 44px; width: 0; min-width: 0; flex: 1; background: #191e27; border-radius: 11px; }
    #newTaskForm button { min-height: 44px; min-width: 76px; border-radius: 12px; }
    #view-timeline > div:first-child { flex-wrap: wrap; gap: 10px; margin: 0 0 16px; }
    #view-timeline > div:first-child h2 { display: none; }
    #timelineProjectFilter { width: 100%; min-height: 46px; font-size: 16px; border-radius: 14px; }
    #timelineContainer { min-width: 0; }
    #timelineContainer button { min-height: 44px; min-width: 44px; }
    #timelineContainer input.task-checkbox { width: 28px; height: 28px; }
    #view-notes > div:first-child { gap: 10px; margin-bottom: 18px; }
    #view-notes > div:first-child > h2 { display: none; }
    #view-notes > div:first-child > div { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 9px; width: 100%; }
    #noteSearch { width: 100%; grid-column: 1 / -1; min-height: 48px; font-size: 16px; border-radius: 15px; }
    .category-select, #noteSort { font-size: 14px; min-height: 46px; width: 100%; }
    #view-notes button[onclick="window.openNoteModal()"] { display: none; }
    #bulkDeleteNotesBtn { grid-column: 1 / -1; min-height: 46px; }
    .masonry-grid { grid-template-columns: minmax(0,1fr); gap: 12px; }
    .note-card { min-width: 0; padding: 18px; border-radius: 20px; border-color: #303641; }
    .note-card > h4, .note-card > div:nth-of-type(3), .note-card > div:last-child { padding-left: 34px; }
    .note-card h4 { min-height: 26px; font-size: 16px; margin-bottom: 9px; }
    .note-card .note-hover-actions { top: 7px; left: 7px; width: 44px; height: 44px; display: grid; place-items: center; opacity: 1; }
    .note-card .note-checkbox { width: 26px; height: 26px; }
    #authView { overflow-y: auto; padding: calc(20px + var(--safe-top)) 18px calc(20px + var(--safe-bottom)); height: var(--visual-height, 100dvh); align-items: center; }
    #authView > div { padding: 27px 23px; border-radius: 27px; flex-shrink: 0; }
    #authPin { min-height: 54px; font-size: 18px; }
    #authSubmitBtn { min-height: 52px; border-radius: 14px; font-size: 15px; }
    #pinVisibility { min-width: 44px; min-height: 44px; right: 10px; }
    #noteModal { top: var(--visual-top, 0px); bottom: auto; height: var(--visual-height, 100dvh); padding: 0; background: #1a1d24; }
    #noteModal > div { width: 100%; height: 100%; max-height: none; padding: calc(12px + var(--safe-top)) 18px calc(16px + var(--safe-bottom)); border: 0; border-radius: 0; box-shadow: none; }
    #noteModal > div > div:first-child { flex-wrap: wrap; gap: 10px; margin-bottom: 15px; padding-bottom: 13px; }
    #noteModal > div > div:first-child > div:first-child { order: 2; width: 100%; display: flex; gap: 8px; }
    #noteModal > div > div:first-child > div:last-child { order: 1; width: 100%; justify-content: space-between; }
    #noteEditorCategory { min-height: 44px; font-size: 16px; width: 100%; padding: 8px 10px; }
    #noteModal button { min-height: 44px; }
    #notePinBtn, #deleteNoteButton { width: 44px; display: grid; place-items: center; }
    #noteTypeToggleBtn { font-size: 12px; padding: 8px; }
    #doneNoteButton { min-width: 83px; border-radius: 12px; }
    #noteEditorTitle { font-size: 24px; min-height: 44px; margin-bottom: 14px; }
    #noteContentArea { min-height: 100px; }
    #noteEditorContent { font-size: 16px; line-height: 1.7; padding: 0 2px 20px; }
    #noteListItemsContainer input[type="text"] { min-width: 0; width: 0; min-height: 46px; font-size: 16px; }
    #noteListItemsContainer input[type="checkbox"] { width: 26px; height: 26px; }
    #noteListItemsContainer button { min-width: 40px; }
    #projectModal, #dataModal, .app-sheet { top: var(--visual-top, 0px); bottom: auto; height: var(--visual-height, 100dvh); padding: 0; align-items: flex-end; }
    #projectModal > div, .data-panel, .sheet-panel { width: 100%; max-width: 100%; max-height: calc(var(--visual-height, 100dvh) - var(--safe-top) - 12px); border-radius: 26px 26px 0 0; padding: 20px 22px calc(22px + var(--safe-bottom)); border-width: 1px 0 0; overflow-y: auto; }
    #projectModal input, #projectModal select { min-height: 48px; font-size: 16px; }
    #projectModal button { min-height: 46px; border-radius: 13px; }
    #projectModalTitle { font-size: 22px; margin-bottom: 20px; }
    #projectModal .grid-cols-2 { gap: 10px; }
    #projectModal .relative.group { min-width: 0; }
    #confirmModal { height: var(--visual-height, 100dvh); top: var(--visual-top, 0px); bottom: auto; padding: 20px; }
    #confirmModal > div { padding: 25px 22px; border-radius: 24px; }
    #confirmModal button { min-height: 48px; }
    #confirmTitle { font-size: 21px; }
    #confirmMessage { margin-bottom: 24px; }
    .history-row button { min-height: 44px; min-width: 72px; }
    .backup-actions > * { min-height: 48px; }
    #pomodoroWidget { left: 14px; right: 14px; padding: 10px 12px; gap: 8px; border-radius: 18px; background: #1d2531; border-color: #4b596d; }
    #pomodoroWidget #pomoTaskTitle { max-width: 108px; }
    #pomodoroWidget #pomoModeText { font-size: 10px; }
    #pomodoroWidget #pomoTimerDisplay { font-size: 22px; margin-left: auto; }
    #pomodoroWidget button { min-width: 44px; min-height: 44px; }
    body.has-dialog #pomodoroWidget, body.keyboard-open #pomodoroWidget { display: none; }
    body.keyboard-open #mobileNav, body.keyboard-open .mobile-screen-heading { display: none; }
    body.keyboard-open #appContainer { padding-bottom: 10px; }
    body.keyboard-open #authView { align-items: flex-start; }
    body.keyboard-open #noteModal > div { padding-top: 10px; padding-bottom: 12px; }
    body.keyboard-open #noteModal > div > div:first-child { gap: 5px; margin-bottom: 8px; padding-bottom: 8px; }
    body.keyboard-open #noteEditorTitle { margin-bottom: 7px; }
    body.keyboard-open .project-metrics { display: none; }
    body.keyboard-open .project-metrics + div { display: none; }
    #mobileNav { padding-bottom: max(7px, var(--safe-bottom)); }
    [role="dialog"] { overscroll-behavior-y: contain; }
}
@media (max-width: 359px) {
    #appContainer { padding-left: 10px; padding-right: 10px; }
    #syncModeIndicator { max-width: 78px; }
    #noteModal > div { padding-left: 13px; padding-right: 13px; }
    #noteTypeToggleBtn { font-size: 11px; }
    .sheet-panel, .data-panel, #projectModal > div { padding-left: 17px; padding-right: 17px; }
    #pomodoroWidget #pomoTaskTitle { max-width: 80px; }
}

.task-check-hit { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer; }
@media (max-width: 767px) {
    .task-check-hit { min-width: 44px; min-height: 44px; }
    .task-check-hit .task-checkbox { width: 28px; height: 28px; margin: 0; }
    .task-item > .task-check-hit { grid-column: 1; min-width: 40px; }
}

/* Everplan feature surfaces: native dialog, shared controls, and mobile sheet. */
.ep-dialog{color:#e5e7eb;background:#17191c;border:1px solid #34383d;border-radius:24px;padding:0;width:min(820px,calc(100vw - 32px));max-width:none;max-height:min(86vh,900px);max-height:min(86dvh,900px);box-shadow:0 26px 90px #0009;overflow:hidden;margin:auto;position:fixed;inset:0;z-index:90}
.ep-dialog::backdrop{background:#000a;backdrop-filter:blur(3px)}
.ep-shell{display:flex;flex-direction:column;max-height:inherit;min-height:0}.ep-dialog-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:20px 24px;border-bottom:1px solid #303237;flex-shrink:0}.ep-dialog-header h2{font-size:20px;font-weight:700;margin:0;color:#fff;letter-spacing:-.02em}.ep-body{overflow:auto;overscroll-behavior:contain;min-height:0;padding:20px 24px;display:flex;flex-direction:column;gap:14px;scrollbar-width:thin}.ep-body>*{flex-shrink:0}.ep-btn,.ep-task-detail{border:1px solid #3c4147;background:#22252a;color:#ddd;padding:8px 12px;border-radius:10px;font-size:12px;font-weight:650;line-height:1.25;white-space:nowrap;cursor:pointer;text-align:center}.ep-btn:hover,.ep-task-detail:hover{border-color:#818a76;color:white}.ep-btn:focus-visible,.ep-task-detail:focus-visible,.ep-body input:focus-visible,.ep-body textarea:focus-visible,.ep-body select:focus-visible,.ep-project-category select:focus-visible{outline:2px solid #b2ff05;outline-offset:2px}.ep-primary{background:#b2ff05;color:#151813;border-color:#b2ff05}.ep-primary:hover{background:#c4ff47;color:#131713}.ep-danger{color:#fca5a5}.ep-muted,.ep-error{font-size:12px;line-height:1.6;color:#a2a7b0;overflow-wrap:anywhere;margin:0}.ep-error{color:#fca5a5}.ep-field{display:flex;flex-direction:column;gap:6px;font-size:12px;color:#b8bdc4;font-weight:650;min-width:0}.ep-field input,.ep-field textarea,.ep-field select,.ep-category-select,.ep-project-category select,.ep-command-input{width:100%;background:#101214;color:#eceff1;border:1px solid #383d43;border-radius:10px;padding:10px 12px;outline:none;min-width:0;font-size:14px;font-weight:400;line-height:1.45;color-scheme:dark}.ep-field input[type=color]{height:42px;padding:5px;max-width:100px}.ep-field textarea{resize:vertical;min-height:76px;max-height:48vh}.ep-field select,.ep-category-select,.ep-project-category select{cursor:pointer}.ep-category-select{font-size:12px;padding:7px;max-width:100%}.ep-field input[data-focus],.ep-command-input{font-size:16px}.ep-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.ep-inline{display:flex;align-items:flex-end;gap:8px}.ep-inline>.ep-field{flex:1}.ep-list{display:flex;flex-direction:column;gap:6px;min-width:0}.ep-list>strong{font-size:13px;color:#d9dde1;margin-bottom:6px}.ep-record{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;border:1px solid #30343a;background:#1b1e22;padding:11px 12px;border-radius:12px;font-size:14px;overflow-wrap:anywhere}.ep-record[hidden]{display:none!important}.ep-record>div:first-child,.ep-record>span:first-child{min-width:0;overflow-wrap:anywhere}.ep-record small,.ep-command-result small,.ep-preview-row small{display:block;font-size:11px;color:#9ba2ad;font-weight:400;margin-top:3px}.ep-record .ep-actions{flex-shrink:0;max-width:62%;justify-content:flex-end}.ep-dot{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:5px}.ep-preview-row{font-size:13px;border-bottom:1px solid #2b3036;padding:6px 0;overflow-wrap:anywhere}.ep-preview-row small{display:inline;margin-left:8px}.ep-file{position:relative;display:inline-block;cursor:pointer;overflow:hidden}.ep-file input{position:absolute;inset:0;opacity:0;width:100%;cursor:pointer}.ep-details{border:1px solid #34383d;border-radius:12px;padding:10px 12px}.ep-details summary{font-size:13px;cursor:pointer;color:#cdd2d7;font-weight:600}.ep-details[open]>.ep-field{margin-top:10px}.ep-checks{border:1px solid #363a42;border-radius:10px;padding:10px;display:flex;flex-direction:column;gap:7px;font-size:13px;max-height:190px;overflow:auto}.ep-checks legend{font-size:12px;color:#aab0b8;padding:0 5px}.ep-checks input,.ep-trash-check{accent-color:#b2ff05}.ep-command-result{display:flex;align-items:center;justify-content:space-between;gap:10px;text-align:left;padding:10px 12px;border:1px solid transparent;border-radius:9px;color:#e6e8ec;font-size:14px;min-width:0}.ep-command-result>span{min-width:0;overflow:hidden;text-overflow:ellipsis}.ep-command-result.selected,.ep-command-result:hover{background:#2a3032;border-color:#515849}.ep-command-result mark{background:#b2ff0530;color:#c6ff52}.ep-group{text-transform:uppercase;font-size:10px;letter-spacing:.08em;color:#8a929e;padding:9px 10px 0;font-weight:700}.ep-project-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:16px;flex-shrink:0}.ep-project-category{display:flex;align-items:center;gap:6px;color:#a7adb5;font-size:12px;min-width:0}.ep-project-category select{font-size:12px;max-width:150px;padding:6px 8px}.ep-project-description{max-height:88px;overflow:auto;margin:0 0 12px;white-space:pre-wrap}.ep-project-resources{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px}.ep-project-resources a{font-size:12px;color:#b2ff05;text-decoration:underline;max-width:100%;overflow-wrap:anywhere}.ep-task-detail{padding:5px 8px;font-size:10px}.ep-undo{position:fixed;z-index:160;bottom:max(80px,env(safe-area-inset-bottom));right:20px;background:#24292d;color:#fff;display:flex;gap:16px;align-items:center;padding:11px 14px;border:1px solid #495154;border-radius:12px;box-shadow:0 8px 30px #0007;font-size:13px}.ep-undo button{color:#b2ff05;font-weight:bold;padding:4px}.ep-gantt{display:flex;border:1px solid #363b42;border-radius:12px;overflow:hidden;min-width:0}.ep-gantt-labels{flex:0 0 150px;background:#1e2125;z-index:2;min-width:0}.ep-gantt-label{height:42px;display:flex;align-items:center;gap:4px;border-top:1px solid #30353c;padding-right:4px;overflow:hidden;font-size:12px;white-space:nowrap}.ep-gantt-label>button:last-child{overflow:hidden;text-overflow:ellipsis;text-align:left;flex:1;color:#ddd}.ep-gantt-label .ep-btn{padding:3px 5px}.ep-gantt-scroll{min-width:0;flex:1;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin}.ep-gantt-head{height:36px;padding:10px 8px;color:#aab0b9;font-size:11px;white-space:nowrap;border-bottom:1px solid #30353c}.ep-gantt-axis{position:relative;overflow:hidden;padding:0}.ep-gantt-tick{position:absolute;top:0;height:36px;border-left:1px solid #393f45;padding:10px 4px;overflow:hidden}.ep-gantt-canvas{position:relative;background:#121416}.ep-gantt-row{position:absolute;left:0;right:0;height:42px;border-bottom:1px solid #292d32}.ep-gantt-bar{position:absolute;top:9px;height:24px;border-radius:6px;background:#729540;color:#0b1206;font-size:10px;line-height:24px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:0 6px;cursor:grab;font-weight:700;touch-action:pan-x}.ep-gantt-bar.done{background:#b2ff05}.ep-gantt-bar.overdue{background:#e88989;color:#320e0e}.ep-gantt-bar.milestone{top:14px;height:15px;transform:rotate(45deg);border-radius:2px;padding:0;background:#d1e18f}.ep-resize{position:absolute;right:0;top:0;bottom:0;width:10px;cursor:ew-resize;background:#ffffff30;border-left:1px solid #ffffff50}.ep-deps{position:absolute;inset:0;pointer-events:none;overflow:visible}.ep-today{position:absolute;top:0;bottom:0;width:2px;background:#b2ff05;pointer-events:none;opacity:.85}.ep-dialog .ep-body .ep-actions .ep-field{min-width:120px}.ep-dialog .ep-body .ep-actions .ep-field select{padding:7px 9px}.ep-dialog .ep-body .ep-actions .ep-field input{padding:7px 9px}
@media(max-width:767px){.ep-dialog{width:100vw;max-width:100vw;max-height:90dvh;inset:auto 0 0;margin:0;border-radius:22px 22px 0 0;border-bottom:0}.ep-dialog-header{padding:15px 16px}.ep-dialog-header h2{font-size:18px}.ep-body{padding:14px 16px calc(18px + env(safe-area-inset-bottom));gap:12px}.ep-body .ep-field input,.ep-body .ep-field textarea,.ep-body .ep-field select,.ep-category-select{font-size:16px}.ep-btn{min-height:36px;padding:7px 10px}.ep-record{flex-wrap:wrap}.ep-record .ep-actions{max-width:100%;justify-content:flex-start}.ep-gantt-labels{flex-basis:112px}.ep-gantt-label{font-size:10px}.ep-project-tools{gap:6px}.ep-project-tools .ep-btn{min-height:30px;padding:6px 8px;font-size:11px}.ep-task-detail{min-height:30px}.ep-project-category select{max-width:128px}.ep-category-select{min-width:105px;width:100%}#epNoteLink{font-size:10px;min-height:28px;padding:4px 6px}.ep-undo{bottom:calc(72px + env(safe-area-inset-bottom));right:10px;left:10px;justify-content:space-between}}

.ep-note-save{font-size:10px;color:#9ba2ad;white-space:nowrap}.ep-dialog .ep-undo{position:sticky;bottom:12px;margin:8px 12px;right:auto;left:auto}
