:root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--accent:#047857;--accent-strong:#065f46;--accent-soft:#ecfdf5;--bg:#f7f8f5;--ink:#111827;--muted:#64748b;--line:#dfe4dc;--panel:#fff;--danger:#b91c1c}*{box-sizing:border-box}body{background:var(--bg);min-width:320px;min-height:100vh;color:var(--ink);margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}button,input,textarea{font:inherit}button{background:var(--accent);color:#fff;cursor:pointer;border:0;border-radius:7px;min-height:42px;padding:0 18px;font-weight:700}button:hover:not(:disabled){background:var(--accent-strong)}button:disabled{cursor:not-allowed;opacity:.62}input,textarea{border:1px solid var(--line);width:100%;color:var(--ink);background:#fff;border-radius:7px}input{min-height:44px;padding:0 12px}textarea{resize:vertical;min-height:260px;padding:12px;line-height:1.55}input:focus,textarea:focus{border-color:var(--accent);outline:3px solid #04785724}label{color:var(--muted);gap:8px;font-size:14px;font-weight:700;display:grid}h1,h2,p{margin:0}h1{letter-spacing:0;font-size:clamp(28px,4vw,42px);line-height:1.08}h2{font-size:18px}pre{white-space:pre-wrap;word-break:break-word;font:inherit;margin:0}.boot-screen{text-align:center;min-height:100vh;color:var(--muted);place-content:center;gap:14px;display:grid}.app-shell{width:min(1180px,100vw - 32px);margin:0 auto;padding:22px 0 48px}.topbar{justify-content:space-between;align-items:center;gap:16px;min-height:52px;margin-bottom:38px;display:flex}.brand,.topbar-actions,.workspace-head,.panel-title{align-items:center;display:flex}.brand{gap:10px;font-size:22px;font-weight:800}.brand-mark{background:var(--accent);color:#fff;border-radius:8px;place-items:center;width:34px;height:34px;font-weight:900;display:inline-grid}.topbar-actions{flex-wrap:wrap;justify-content:flex-end;gap:12px}.api-host{color:var(--muted);font-size:13px}.network-pill{border:1px solid var(--line);min-height:28px;color:var(--muted);white-space:nowrap;background:#fff;border-radius:999px;align-items:center;gap:7px;padding:0 10px;font-size:12px;font-weight:800;display:inline-flex}.network-pill:before{content:"";background:currentColor;border-radius:999px;width:7px;height:7px}.network-pill.online{background:var(--accent-soft);color:var(--accent-strong);border-color:#bbf7d0}.network-pill.offline{color:var(--danger);background:#fef2f2;border-color:#fecaca}.network-pill.syncing{color:#1d4ed8;background:#eff6ff;border-color:#bfdbfe}.ghost-button{border:1px solid var(--line);color:var(--ink);background:#fff}.ghost-button:hover:not(:disabled){background:#f1f5f9}.wide{width:100%}.auth-layout{grid-template-columns:minmax(0,1fr) minmax(320px,420px);align-items:start;gap:42px;display:grid}.auth-copy{gap:16px;max-width:580px;display:grid}.auth-copy p:not(.eyebrow){color:var(--muted);line-height:1.7}.eyebrow{color:var(--accent);letter-spacing:0;text-transform:uppercase;font-size:13px;font-weight:800}.panel,.stat-panel{border:1px solid var(--line);background:var(--panel);border-radius:8px}.panel{padding:22px}.form-stack{gap:16px;display:grid}.notice{background:var(--accent-soft);color:var(--accent-strong);border:1px solid #bbf7d0;border-radius:7px;margin-top:16px;padding:12px 14px;font-size:14px;line-height:1.45}.notice.inline{margin:0}.workspace{gap:22px;display:grid}.workspace-head{justify-content:space-between;gap:16px}.workspace-head>div{gap:8px;display:grid}.workspace-actions{align-items:center;gap:10px;display:flex}.sync-hint{max-width:260px;color:var(--muted);font-size:12px;line-height:1.4}.stats-grid,.content-grid{gap:16px;display:grid}.stats-grid{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}.content-grid{grid-template-columns:repeat(3,minmax(0,1fr));align-items:start}.stat-panel{gap:8px;padding:18px;display:grid}.stat-panel span,.stat-panel small,.panel-title span{color:var(--muted);font-size:13px}.stat-panel strong{font-size:28px}.freshness-panel.ok{background:var(--accent-soft);border-color:#bbf7d0}.freshness-panel.warning{background:#fff7ed;border-color:#fed7aa}.freshness-panel.danger{background:#fef2f2;border-color:#fecaca}.freshness-panel.ok strong{color:var(--accent-strong)}.freshness-panel.warning strong{color:#9a3412}.freshness-panel.danger strong{color:var(--danger)}.sync-queue-panel{gap:14px;display:grid}.sync-queue-list{gap:12px;display:grid}.sync-queue-item{border:1px solid var(--line);background:#fff;border-radius:8px;gap:12px;padding:14px;display:grid}.sync-queue-item-head{justify-content:space-between;align-items:center;gap:12px;display:flex}.sync-queue-item-head>div{gap:4px;display:grid}.sync-queue-item-head span,.sync-queue-meta{color:var(--muted);font-size:13px}.sync-queue-preview{border:1px solid var(--line);color:#334155;background:#f8fafc;border-radius:7px;max-height:94px;padding:10px;line-height:1.5;overflow:auto}.sync-queue-meta{flex-wrap:wrap;gap:8px 14px;display:flex}.sync-queue-error{color:var(--danger)}.devices-panel,.device-section,.device-list,.session-list{gap:14px;display:grid}.subsection-title{justify-content:space-between;align-items:baseline;gap:12px;display:flex}.subsection-title span{color:var(--muted);font-size:13px}.device-item,.session-item{border:1px solid var(--line);background:#fff;border-radius:8px;gap:12px;padding:14px;display:grid}.device-item-head,.session-item-main,.device-actions,.session-actions,.pill-row{align-items:center;gap:10px;display:flex}.device-item-head,.session-item-main{justify-content:space-between}.device-item-head>div:first-child,.session-item-main>div:first-child{gap:4px;display:grid}.device-item-head span,.session-item-main span,.device-meta,.session-meta{color:var(--muted);font-size:13px}.device-meta,.session-meta{flex-wrap:wrap;gap:8px 14px;display:flex}.device-actions,.session-actions{justify-content:flex-end}.danger-button{color:var(--danger)}.danger-button:hover:not(:disabled){background:#fef2f2}.date-navigator{gap:16px;display:grid}.date-navigator-head{justify-content:space-between;align-items:center;gap:16px;display:flex}.date-navigator-head>div:first-child{gap:5px;display:grid}.date-navigator-head>div:first-child span,.date-loading{color:var(--muted);font-size:13px}.date-controls{flex-wrap:wrap;align-items:end;gap:10px;display:flex}.date-input-label{min-width:170px}.range-controls{flex-wrap:wrap;justify-content:space-between;align-items:end;gap:12px;padding-top:2px;display:flex}.range-presets,.range-custom{flex-wrap:wrap;align-items:end;gap:8px;display:flex}.range-presets>span{color:var(--muted);padding-bottom:12px;font-size:13px;font-weight:800}.range-custom label{min-width:150px}.range-custom button{min-height:44px}.range-validation{color:var(--danger);font-size:13px;font-weight:800}.month-calendar{border:1px solid var(--line);border-radius:8px;gap:12px;padding:14px;display:grid}.month-calendar-head{justify-content:space-between;align-items:center;gap:12px;display:flex}.month-calendar-head>div:first-child{gap:3px;display:grid}.month-calendar-head span{color:var(--ink);text-transform:capitalize;font-size:16px;font-weight:900}.month-calendar-head small{color:var(--muted);font-size:12px}.month-calendar-actions{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.month-weekdays,.month-grid{grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;display:grid}.month-weekdays span{color:var(--muted);text-align:center;text-transform:uppercase;font-size:11px;font-weight:900}.calendar-day{border:1px solid var(--line);min-height:52px;color:var(--ink);background:#fff;padding:7px;position:relative}.calendar-day:hover:not(:disabled),.calendar-day.selected{border-color:var(--accent);background:var(--accent-soft);color:var(--accent-strong)}.calendar-day.outside{color:var(--muted);background:#f8fafc}.calendar-day.today span{border-bottom:2px solid var(--accent)}.calendar-day.conflicted{color:var(--danger);background:#fef2f2;border-color:#fecaca}.calendar-day:after,.calendar-day:before{content:"";border-radius:999px;width:6px;height:6px;position:absolute;bottom:7px}.calendar-day:after{right:8px}.calendar-day:before{left:8px}.calendar-day.has-note:after{background:var(--accent)}.calendar-day.queued:before{background:#1d4ed8}.calendar-legend{flex-wrap:wrap;gap:8px 14px;display:flex}.calendar-legend span{color:var(--muted);align-items:center;gap:6px;font-size:12px;font-weight:800;display:inline-flex}.calendar-legend span:before{content:"";border-radius:999px;width:7px;height:7px}.legend-note:before{background:var(--accent)}.legend-queued:before{background:#1d4ed8}.legend-conflict:before{background:var(--danger)}.note-search{border:1px solid var(--line);border-radius:8px;gap:12px;padding:14px;display:grid}.note-search-head{justify-content:space-between;align-items:end;gap:12px;display:flex}.note-search-head>div:first-child{gap:3px;display:grid}.note-search-head span{color:var(--ink);font-size:15px;font-weight:900}.note-search-head small,.note-search-empty{color:var(--muted);font-size:12px}.note-search-input{min-width:min(100%,320px)}.note-search-actions{flex-wrap:wrap;align-items:end;gap:8px;display:flex}.note-search-actions button{min-height:44px}.note-search-list{gap:8px;display:grid}.note-search-item{border:1px solid var(--line);min-height:58px;color:var(--ink);text-align:left;background:#fff;justify-items:start;gap:4px;padding:10px 12px;display:grid}.note-search-item:hover:not(:disabled),.note-search-item.selected{border-color:var(--accent);background:var(--accent-soft);color:var(--accent-strong)}.note-search-item.queued{border-color:#bfdbfe}.note-search-item.conflicted{color:var(--danger);background:#fef2f2;border-color:#fecaca}.note-search-item span{font-size:13px;font-weight:900}.note-search-item small{color:var(--muted);line-height:1.35}.note-search-empty{line-height:1.5}.note-search-error,.note-search-hint{border-radius:7px;padding:10px 12px;font-size:13px;line-height:1.45}.note-search-error{color:var(--danger);background:#fef2f2;border:1px solid #fecaca}.note-search-hint{color:#1d4ed8;background:#eff6ff;border:1px solid #bfdbfe}.loaded-range{gap:10px;display:grid}.date-strip{gap:8px;padding-bottom:2px;display:flex;overflow-x:auto}.date-chip{border:1px solid var(--line);min-width:62px;min-height:58px;color:var(--ink);background:#fff;place-items:center;gap:2px;padding:7px 9px;display:grid;position:relative}.date-chip:hover:not(:disabled),.date-chip.selected{border-color:var(--accent);background:var(--accent-soft);color:var(--accent-strong)}.date-chip span{font-size:14px;font-weight:900}.date-chip small{color:var(--muted);text-transform:uppercase;font-size:11px;font-weight:800}.date-chip:after{content:"";background:0 0;border-radius:999px;width:6px;height:6px}.date-chip.has-note:after{background:var(--accent)}.date-chip.queued:after{background:#1d4ed8}.date-archive{border-top:1px solid var(--line);gap:10px;padding-top:14px;display:grid}.date-archive-title{flex-wrap:wrap;align-items:baseline;gap:8px;display:flex}.date-archive-title span{color:var(--ink);font-size:13px;font-weight:900}.date-archive-title small{color:var(--muted);font-size:12px}.archive-chip-list{flex-wrap:wrap;gap:8px;display:flex}.archive-chip{border:1px solid var(--line);min-height:34px;color:var(--ink);background:#fff;padding:0 12px;position:relative}.archive-chip:hover:not(:disabled),.archive-chip.selected{border-color:var(--accent);background:var(--accent-soft);color:var(--accent-strong)}.archive-chip.queued{color:#1d4ed8;background:#eff6ff;border-color:#bfdbfe}.panel-title{justify-content:space-between;gap:12px;margin-bottom:18px}.panel-title>div{gap:4px;display:grid}.editor-grid{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr) minmax(0,1fr)}.editor-panel{gap:14px;display:grid}.template-actions{flex-wrap:wrap;gap:10px;display:flex}.note-editor{color:#334155}.editor-footer{justify-content:space-between;align-items:center;gap:12px;display:flex}.editor-footer small{color:var(--muted)}.dirty-pill,.saved-pill,.pending-pill,.error-pill{white-space:nowrap;border-radius:999px;align-items:center;min-height:26px;padding:0 10px;font-size:12px;font-weight:800;display:inline-flex}.dirty-pill{color:#9a3412;background:#fff7ed}.saved-pill{background:var(--accent-soft);color:var(--accent-strong)}.pending-pill{color:#1d4ed8;background:#eff6ff}.error-pill{color:var(--danger);background:#fef2f2}.sync-error{color:var(--danger);background:#fef2f2;border:1px solid #fecaca;border-radius:7px;padding:10px 12px;font-size:13px;line-height:1.45}.conflict-box{color:var(--danger);background:#fef2f2;border:1px solid #fecaca;border-radius:7px;gap:10px;padding:12px;display:grid}.conflict-box p{color:#7f1d1d;line-height:1.45}.conflict-box pre{color:#334155;background:#fff;border:1px solid #fecaca;border-radius:6px;max-height:150px;padding:10px;line-height:1.6;overflow:auto}.conflicts-panel{gap:14px;display:grid}.empty-text{color:var(--muted);line-height:1.6}.conflict-list{gap:14px;display:grid}.conflict-item{border:1px solid var(--line);background:#fff;border-radius:8px;gap:14px;padding:16px;display:grid}.conflict-item-head,.conflict-actions{justify-content:space-between;align-items:center;gap:12px;display:flex}.conflict-item-head>div{gap:4px;display:grid}.conflict-item-head span,.conflict-columns span{color:var(--muted);font-size:13px}.conflict-columns{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;display:grid}.conflict-columns>div{gap:8px;display:grid}.conflict-columns pre{border:1px solid var(--line);color:#334155;background:#f8fafc;border-radius:7px;min-height:120px;max-height:220px;padding:10px;line-height:1.55;overflow:auto}.conflict-actions{justify-content:flex-end}@media (width<=860px){.app-shell{width:min(100vw - 24px,620px);padding-top:14px}.topbar,.workspace-head{flex-direction:column;align-items:flex-start}.auth-layout,.stats-grid,.content-grid,.editor-grid{grid-template-columns:1fr}.auth-layout{gap:24px}.editor-footer{flex-direction:column;align-items:stretch}.template-actions{flex-direction:column}.workspace-actions,.month-calendar-actions,.note-search-actions{flex-direction:column;align-items:stretch;width:100%}.sync-hint{max-width:none}.conflict-item-head,.sync-queue-item-head,.device-item-head,.session-item-main,.subsection-title,.date-navigator-head,.month-calendar-head,.note-search-head,.device-actions,.session-actions,.conflict-actions{flex-direction:column;align-items:stretch}.conflict-columns{grid-template-columns:1fr}}
