/* Shared comfort preferences for desktop, mobile web and installed web apps. */
:root { color-scheme: light; }
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink:#f1f5f9; --muted:#cbd5e1; --cream:#0f172a; --paper:#1e293b;
  --line:#334155; --green:#38bdf8; --green-dark:#7dd3fc; --white:#1e293b;
  --coral:#f2a38e; --sun:#e8c982; --sky:#38bdf8;
  --surface:#263449; --warm:#39352b; --accent-ink:#0f172a;
  --sticker-paper:#1e293b; --sticker-ink:#c3ad82;
  --selected:#1e3a5f; --selected-line:#38bdf8; --field-line:#475569;
  --shadow:0 12px 36px #0005;
}
:root[data-theme="dark"] body { background:var(--cream); color:var(--ink); }
:root[data-theme="dark"] .welcome { background:radial-gradient(circle at 85% 14%,rgba(56,189,248,0.12) 0,transparent 45%),#0b1322; }
:root[data-theme="dark"] .join-screen { background:radial-gradient(circle at 30% 20%,rgba(56,189,248,0.12),transparent 35%),#0b1322; }
:root[data-theme="dark"] .app-shell { background-color:#162429; background-image:none; }
:root[data-theme="dark"] .topbar,
:root[data-theme="dark"] .app-shell .topbar,
:root[data-theme="dark"] .bottom-nav,
:root[data-theme="dark"] .mobile-drawer { background:var(--paper); border-color:var(--line); }
:root[data-theme="dark"] .app-shell .view:not(.notebook-view),
:root[data-theme="dark"] .modal,
:root[data-theme="dark"] #detailDialog>#taskDetail { background-color:var(--paper); border-color:var(--line); box-shadow:0 4px 0 #0c1519,0 12px 32px #0003; }
:root[data-theme="dark"] #detailDialog { background:#162429; border-color:var(--line); }
:root[data-theme="dark"] #taskDetail::after { background:radial-gradient(circle at 6px 6px,#162429 0 4px,#42585e 4px 5px,transparent 5px) 0 0/12px 74px repeat-y; }
:root[data-theme="dark"] .board-hero { background:linear-gradient(125deg,var(--paper),#293f34); }
:root[data-theme="dark"] .notebook-paper .board-hero { background:transparent; }
:root[data-theme="dark"] :is(.secondary-button,.sample-task,.person-card,.template-card,.timeline article,.share-options button,.board-stats span,.quick-add,.notebook-search input,.notebook-paper .board-owner-actions button,.catchup-boards button) { background:var(--paper); color:var(--ink); border-color:var(--line); }
:root[data-theme="dark"] :is(input,textarea,select),
:root[data-theme="dark"] .modal :is(input,textarea,select),
:root[data-theme="dark"] #taskDetail .comment-form textarea { background:var(--cream); color:var(--ink); border-color:#708a91; }
:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder { color:#aebfc1; opacity:1; }
:root[data-theme="dark"] :is(.primary-button,.done-button,.plan-badge),
:root[data-theme="dark"] .task-actions .done-button,
:root[data-theme="dark"] .detail-task-actions .done-button { background:var(--green); color:var(--accent-ink); }
:root[data-theme="dark"] :is(.primary-button,.done-button):hover { background:#7dd3fc; }
:root[data-theme="dark"] :is(.danger-button,.form-error) { color:#f2a38e!important; }
:root[data-theme="dark"] .danger-button { background:#432f2d; }
:root[data-theme="dark"] :is(.getting-started,.activation-nudge,.trial-card,.task-conversation,.comment,.qr-wrap,.invite-preview,.notebook-updates,.feature-tip,.support-contact) { background:var(--surface); }
:root[data-theme="dark"] :is(.view-toggle,.modal-close,.suggestions button,.reopen-button,.notebook-paper .quick-add,.notebook-paper .board-stats span) { background:var(--surface); color:var(--ink); }
:root[data-theme="dark"] :is(.view-toggle button.active,.desktop-nav a.active,.bottom-nav a.active,.task-filters button[aria-pressed=true],.new-note,.update-count,.board-update-badge,.notebook-paper .board-stats button) { background:var(--selected); color:var(--green-dark); border-color:var(--selected-line); }
:root[data-theme="dark"] :is(.pinned-note,.catchup-strip,.task-note-preview,.detail-head .task-context-note) { background:var(--surface); color:var(--ink); }
:root[data-theme="dark"] .recovery-warning { background:var(--warm); color:var(--ink); }
:root[data-theme="dark"] :is(.pinned-note p:not(.kicker),.pinned-note .kicker,.notebook-hint,.notebook-quiet,.device-note,.feed-link,.notebook-feed time,.notebook-footer,.notebook-section-head .kicker,.mobile-task-helper,.board-description-mobile summary,.earlier-updates summary,.lede,.use-cases) { color:var(--muted); }
:root[data-theme="dark"] :is(.kicker,.step-label,.thanks,.task-sub .needs-help) { color:#f2a38e; }
:root[data-theme="dark"] :is(.legal-card a,.legal-nav a,.legal-nav button,.mobile-detail-back,.mobile-board-back,.mobile-help-link) { color:var(--green); }
:root[data-theme="dark"] .analytics-choice { background:var(--paper); border-color:var(--line); }
:root[data-theme="dark"] .toast { background:#e7efde; color:#17231b; }
:root[data-theme="dark"] .toast button { color:#184b35; }
:root[data-theme="dark"] :is(.avatar-button,.tiny-avatar,.people-stack i,.pill,.float-note,.network-notice,.celebration,.task-spark,.help-button,.hero-add button,.completed-stamp,.sample-task button,.task-check.done) { color:#17271e; }
:root[data-theme="dark"] .completed-stamp { background:#c7e2bb; }
:root[data-theme="dark"] .task-card.completed { opacity:1; }
:root[data-theme="dark"] .task-card.completed :is(.task-name,.task-sub) { color:var(--muted); }
:root[data-theme="dark"] .task-card.is-mine:not(.completed) .your-task-label { color:#e8c982; }
:root[data-theme="dark"] .empty-panel { background:var(--paper); border-color:var(--line); }
:root[data-theme="dark"] .utility-menu button { background:var(--paper); }
:root[data-theme="dark"] .utility-menu button:hover { background:var(--surface); }
:root[data-theme="dark"] .character-limit { color:#e8c982; }
:root[data-theme="dark"] .character-limit.at-limit { color:#f2a38e; }
:root[data-theme="dark"] [data-sticker-color="paper"] { --sticker-paper:#273337; --sticker-ink:#bea774; }
:root[data-theme="dark"] [data-sticker-color="yellow"] { --sticker-paper:#39352b; --sticker-ink:#ca9c35; }
:root[data-theme="dark"] [data-sticker-color="mint"] { --sticker-paper:#293f34; --sticker-ink:#7ea66b; }
:root[data-theme="dark"] [data-sticker-color="blue"] { --sticker-paper:#293b49; --sticker-ink:#709bc1; }
:root[data-theme="dark"] [data-sticker-color="rose"] { --sticker-paper:#403137; --sticker-ink:#c68b87; }
:root[data-theme="dark"] [data-sticker-color="lavender"] { --sticker-paper:#373249; --sticker-ink:#a58dbd; }
:root[data-theme="dark"] :is(.task-card,.notebook-paper .task-card,.task-card.is-mine,#taskDetail .detail-head) { background:var(--sticker-paper,#273337); border-color:var(--line); border-left-color:var(--sticker-ink,#bea774); }
:root[data-theme="dark"] .modal .sticker-option { border-color:var(--line); }
:root[data-theme="dark"] .sticker-option:has(input:checked) { border-color:var(--green-dark); }
/* Complete surfaces: every workspace panel uses the same calm, layered palette. */
:root[data-theme="dark"] :is(.notebook-paper,.notebook-updates,.catchup-strip,.board-card,.event-group,.saved-template-card,.template-preview,.template-sharing,.sticker-settings,#taskDetail .task-conversation,#taskDetail .comment,.notebook-feed li,.updates-preview li) { border-color:var(--line); }
:root[data-theme="dark"] .notebook-paper { box-shadow:0 5px 0 #0c1519,0 12px 30px #0003; }
:root[data-theme="dark"] .notebook-paper::before { background:#b77e7559; }
:root[data-theme="dark"] .notebook-paper::after { background:radial-gradient(circle at center,var(--cream) 0 5px,var(--line) 5px 6px,transparent 7px) center top/13px 74px repeat-y; }
:root[data-theme="dark"] :is(.app-shell .view:not(.notebook-view),.notebook-layout,#taskDetail)::before { background:linear-gradient(#53686c,#35494e); border-color:#70858a; box-shadow:0 3px 0 #0c151980; }
:root[data-theme="dark"] :is(.task-card::after,.pinned-note::before) { background:#b5ac8666; }
:root[data-theme="dark"] .notebook-paper .board-hero { border-color:var(--line); box-shadow:none; }
:root[data-theme="dark"] :is(.invite-people,.turn-taking,.turn-summary,.email-row,.event-access-note,.event-context,.checkout-notice) { background:var(--surface); border-color:var(--line); color:var(--ink); }
:root[data-theme="dark"] :is(.turn-summary li,.email-row-actions button,.add-email-button,.round-check,.task-card.turn-waiting .round-check) { background:var(--paper); border-color:var(--field-line); color:var(--ink); }
:root[data-theme="dark"] :is(.comment-button,.notebook-paper .task-actions .comment-button) { background:#30434d; color:#d3e5ef; }
:root[data-theme="dark"] :is(.help-button,.notebook-paper .task-actions .help-button,.detail-task-actions button,.mobile-add-task button) { background:var(--selected); border-color:var(--selected-line); color:#d5edc9; }
:root[data-theme="dark"] :is(.quick-add button,.round-check.checked,.bottom-nav button:nth-child(3)) { background:var(--green); color:var(--accent-ink); border-color:var(--paper); }
:root[data-theme="dark"] :is(.task-actions .done-button,.detail-task-actions .done-button):hover { background:#cbe9ba; color:var(--accent-ink); }
:root[data-theme="dark"] :is(.utility-menu button:hover,.utility-menu button:focus-visible,.mobile-drawer a:hover,.mobile-drawer a:focus-visible,.mobile-drawer a[aria-current="page"],.feature-tip:hover) { background:var(--selected); color:var(--green); }
:root[data-theme="dark"] :is(.task-card.turn-waiting,.task-note-preview:hover) { background:var(--surface); }
:root[data-theme="dark"] .task-card.is-mine:not(.completed) .task-title-text { background:linear-gradient(177deg,transparent 12%,#655832 12%,#655832 88%,transparent 88%); color:#fff0c4; }
:root[data-theme="dark"] .completed-stamp { background:#293f34; color:#c6e2b9; border-color:#729b72; }
:root[data-theme="dark"] :is(.celebration,.network-notice) { background:var(--warm); color:var(--ink); }
:root[data-theme="dark"] :is(.board-progress,.mobile-board-progress) { background:var(--surface); accent-color:var(--green); }
:root[data-theme="dark"] :is(.board-progress,.mobile-board-progress)::-webkit-progress-bar { background:var(--surface); }
:root[data-theme="dark"] :is(.board-progress,.mobile-board-progress)::-webkit-progress-value { background:var(--green); }
:root[data-theme="dark"] :is(.board-progress,.mobile-board-progress)::-moz-progress-bar { background:var(--green); }
:root[data-theme="dark"] :is(.feed-dot,.unread-update .feed-dot,.notebook-footer span) { color:var(--green); }
:root[data-theme="dark"] :is(.bottom-nav a,.modal .character-limit) { color:var(--muted); }
:root[data-theme="dark"] .modal .character-limit.at-limit { color:var(--coral); }
:root[data-theme="dark"] .bottom-nav a.active { color:var(--green); }
:root[data-theme="dark"] :is(.people-stack i,.avatar-button) { border-color:var(--surface); }
:root[data-theme="dark"] :is(.hero-board,.join-card) { border-color:var(--line); box-shadow:12px 16px 0 #0c1519; }
:root[data-theme="dark"] .welcome-copy h1 em { color:var(--coral); }
:root[data-theme="dark"] .use-cases { border-color:var(--line); }
:root[data-theme="dark"] :is(.board-cover,.board-header-cover,.cover-option-image,.empty-illustration) { filter:brightness(.78) saturate(.8); }
:root[data-theme="dark"] .skip-link { background:var(--paper); color:var(--ink); }
:root[data-theme="dark"] :is(button,a,input,textarea,select,summary):focus-visible { outline-color:var(--green); }
:root[data-theme="dark"] :is(input[type=checkbox],input[type=radio]) { accent-color:var(--green); }
:root[data-theme="dark"] :is(.task-card .task-spark,.notebook-paper .task-spark) { background:var(--surface); color:var(--muted); border-color:var(--field-line); }
:root[data-theme="dark"] .task-card.completed .task-spark { background:var(--selected); color:var(--green); border-color:var(--selected-line); }
.quiet-mode *, .quiet-mode *::before, .quiet-mode *::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
.quiet-mode .party-streamers { display:none; }
.quiet-mode :is(.primary-button,.board-card):hover { transform:none; }
@media print {
  :root[data-theme="dark"] { color-scheme:light; --ink:#10221b; --muted:#52635a; --paper:#ffffff; --cream:#fff; --green-dark:#184b35; }
  :root[data-theme="dark"] .poster { background:#fff; color:#10221b; }
}
