:root {
  color-scheme: light;
  --ink: #202b41;
  --muted: #667185;
  --purple: #3868e6;
  --purple-dark: #244bb9;
  --purple-soft: #eaf0ff;
  --paper: #f6f7f8;
  --card: #fff;
  --coral: #ff985f;
  --line: #e8edf3;
  --shadow: 0 16px 42px rgba(28, 45, 76, .10);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; padding: env(safe-area-inset-top) 18px env(safe-area-inset-bottom);
  color: var(--ink); background: radial-gradient(ellipse at 88% 0%, #ffead7 0, transparent 23rem), radial-gradient(ellipse at 0% 26%, #e9f0ff 0, transparent 25rem), var(--paper);
  font-family: ui-rounded, "SF Pro Rounded", "Avenir Next", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

.app-frame { width: min(100%, 520px); margin: 0 auto; padding-bottom: 30px; }
.topbar { height: 64px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; color: inherit; }
.brand-icon { width: 39px; height: 39px; border-radius: 14px; display: grid; place-items: center; color: white; background: linear-gradient(145deg, #628cf4, #315ed1 72%, #2048b1); font-size: 22px; box-shadow: 0 7px 17px #315ed140; transform: rotate(-6deg); }
.brand strong { display: block; font-size: 16px; letter-spacing: -.035em; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .13em; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.icon-button { width: 44px; height: 44px; border: 1px solid #fff; border-radius: 14px; color: var(--ink); background: rgba(255,255,255,.8); box-shadow: 0 3px 14px #4935740b; font-size: 19px; cursor: pointer; }
.icon-button:active { transform: scale(.94); }
.is-syncing { animation: spin .8s linear infinite; }

.welcome-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 0 2px 14px; }
.eyebrow { margin: 0 0 4px; color: var(--muted); font-size: 9px; line-height: 1.3; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
.welcome-row h1 { margin: 0; font-size: 27px; line-height: 1; letter-spacing: -.055em; }
.countdown-pill { display: flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid #fff; border-radius: 14px; background: rgba(255,255,255,.75); white-space: nowrap; }
.countdown-sparkle { color: #f0a838; font-size: 16px; }
.countdown-pill strong { display: block; font-size: 15px; line-height: 1; letter-spacing: -.04em; }
.countdown-pill small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; }

.pet-card { position: relative; height: 250px; overflow: hidden; display: grid; place-items: center; margin-bottom: 14px; border: 1px solid #fff; border-radius: 29px; background: linear-gradient(112deg, #172746 0%, #254a90 55%, #3361bd 100%); box-shadow: 0 18px 42px rgba(30,57,107,.18); isolation: isolate; }
.pet-card::before, .pet-card::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; }
.pet-card::before { width: 285px; height: 285px; top: -187px; left: -102px; background: rgba(152,190,255,.12); }
.pet-card::after { width: 270px; height: 270px; right: -105px; bottom: -192px; background: rgba(255,159,86,.29); }
.pet-button { position: absolute; z-index: 2; left: 2%; bottom: 0; width: 52%; height: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; }
.pet-button:focus-visible { outline: 3px solid #ffc06d; outline-offset: -7px; border-radius: 25px; }
.pet-art { position: absolute; z-index: 1; bottom: -5px; left: 50%; width: 100%; max-width: 245px; height: auto; transform: translateX(-50%); filter: drop-shadow(0 15px 12px rgba(2,12,31,.26)); animation: floaty 4s ease-in-out infinite; pointer-events: none; }
.pet-bubble { position: absolute; z-index: 3; top: 50%; right: 5%; width: 43%; padding: 15px 14px 13px; transform: translateY(-50%); border: 1px solid rgba(255,255,255,.6); border-radius: 18px; color: #202d48; background: rgba(255,255,255,.96); box-shadow: 0 12px 30px rgba(8,19,43,.19); }
.pet-bubble::before { content: ""; position: absolute; top: 50%; left: -7px; width: 14px; height: 14px; transform: translateY(-50%) rotate(45deg); border-radius: 2px; background: #fff; }
.pet-kicker { position: relative; display: block; margin-bottom: 8px; color: #4468b2; font-size: 8px; line-height: 1.2; font-weight: 900; letter-spacing: .12em; }
.pet-bubble p { position: relative; min-height: 48px; margin: 0; font-size: 14px; line-height: 1.3; font-weight: 790; letter-spacing: -.035em; overflow-wrap: anywhere; }
.pet-orbit { position: absolute; z-index: 0; border: 1px solid rgba(255,255,255,.6); border-radius: 50%; pointer-events: none; }
.orbit-one { width: 214px; height: 214px; left: 7%; border-color: rgba(181,209,255,.22); }
.orbit-two { width: 270px; height: 270px; left: 1%; border-style: dashed; border-color: rgba(181,209,255,.15); opacity: .62; transform: rotate(-16deg); }
.pet-card.is-celebrating .pet-art { animation: celebrate .72s cubic-bezier(.2,.8,.2,1); }
.pet-card.is-celebrating::after { animation: glow-pop .75s ease-out; }
.pet-card.is-petted .pet-art { animation: pet-bounce .68s cubic-bezier(.2,.85,.2,1); }

.focus-card { position: relative; padding: 17px; border: 1px solid rgba(100,77,141,.08); border-radius: 24px; background: rgba(255,255,255,.94); box-shadow: 0 10px 28px rgba(54,39,85,.065); }
.hero-task-card { display: grid; gap: 14px; }
.hero-task-top { display: flex; justify-content: space-between; align-items: center; min-height: 24px; }
.focus-status { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 800; }
.focus-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #a3a0aa; }
.focus-status.is-today { color: var(--purple-dark); }
.focus-status.is-today::before { background: #a07af4; box-shadow: 0 0 0 4px #efe8ff; }
.focus-status.is-overdue { color: #a13c48; }
.focus-status.is-overdue::before { background: #f07880; box-shadow: 0 0 0 4px #ffebec; }
.hero-link { display: grid; place-items: center; width: 44px; height: 44px; color: #355db9; border-radius: 12px; background: #edf2ff; text-decoration: none; font-size: 16px; }
.hero-link:active { transform: scale(.94); }
.hero-task-title { margin: 0; color: var(--ink); font-size: 20px; line-height: 1.24; font-weight: 780; letter-spacing: -.04em; }
.mission-label { margin: -8px 0 -9px; color: #667185; font-size: 8px; font-weight: 900; letter-spacing: .13em; }
.hero-check { min-height: 46px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 15px; color: #fff; background: linear-gradient(100deg, #4678ee, #315ed1 70%, #274fb9); box-shadow: 0 8px 17px #315ed132; font-size: 13px; font-weight: 850; cursor: pointer; transition: transform .18s, box-shadow .18s; }
.hero-check:hover { box-shadow: 0 10px 22px #315ed140; transform: translateY(-1px); }
.hero-check:active { transform: scale(.985); }
.check-glyph { width: 18px; height: 18px; display: grid; place-items: center; border: 1.5px solid #ffffffa8; border-radius: 50%; font-size: 12px; line-height: 1; }
.hero-empty { min-height: 118px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 17px; font-weight: 750; letter-spacing: -.03em; }
.hero-empty span:first-child { color: #edaa44; font-size: 22px; }
.nudge-card { min-height: 47px; display: flex; align-items: center; gap: 9px; padding: 9px 14px; margin: 8px 2px 0; color: #56647c; }
.nudge-spark { display: grid; place-items: center; width: 24px; height: 24px; flex: 0 0 24px; border-radius: 9px; color: #bc7d1f; background: #fff0d6; font-size: 13px; }
.nudge-card p { margin: 0; color: inherit; font-size: 12px; line-height: 1.35; font-weight: 680; letter-spacing: -.012em; opacity: 1; transform: translateY(0); transition: opacity .2s ease, transform .2s ease; }
.nudge-card p.is-changing { opacity: 0; transform: translateY(3px); }
.all-tasks-button { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: flex-start; gap: 9px; margin-top: 9px; padding: 12px 4px; border: 0; color: #615a6f; background: transparent; font-size: 12px; font-weight: 800; text-align: left; cursor: pointer; }
.all-tasks-button:active { color: var(--purple); }
.all-tasks-count { min-width: 21px; height: 21px; display: grid; place-items: center; border-radius: 50%; color: var(--purple-dark); background: #eee8fb; font-size: 10px; }
.all-tasks-arrow { margin-left: auto; color: #9f96ae; font-size: 15px; }

.tasks-section { padding: 19px; margin-top: 14px; border: 1px solid rgba(100,77,141,.08); border-radius: 24px; background: white; box-shadow: 0 10px 28px rgba(54,39,85,.05); scroll-margin-top: 16px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-heading h2 { margin: 0; font-size: 21px; line-height: 1.1; letter-spacing: -.04em; }
.section-heading .eyebrow { margin-bottom: 5px; }
.tasks-heading { margin-bottom: 14px; }
.tasks-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid #f0edf2; }
.area-select-wrap select { appearance: none; max-width: 140px; padding: 8px 28px 8px 10px; border: 1px solid #ede8f2; border-radius: 11px; color: var(--purple-dark); background-color: #faf8fc; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='m2 3 3 3 3-3' fill='none' stroke='%237650dc' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; font-size: 10px; font-weight: 800; cursor: pointer; }
.task-summary { margin: 0; color: var(--muted); font-size: 10px; text-align: right; }
.task-groups { display: grid; gap: 18px; padding-top: 15px; }
.task-group-title { display: flex; align-items: center; gap: 7px; margin: 0 0 8px; color: #667185; font-size: 9px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.task-group-title::after { content: ""; height: 1px; flex: 1; background: #f0edf2; }
.task-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.task-row { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; align-items: start; gap: 8px; padding: 11px 10px; border: 1px solid #f1edf4; border-radius: 15px; background: #fff; transition: background .16s, transform .16s; }
.task-row:hover { background: #fdfbff; transform: translateY(-1px); }
.task-check { width: 44px; height: 44px; margin: 0; padding: 0; border: 1.5px solid #d9cde9; border-radius: 12px; color: #fff; background: #fff; display: grid; place-items: center; font-size: 16px; cursor: pointer; }
.task-check:active { transform: scale(.91); }
.task-content { min-width: 0; }
.task-title { margin: 0; color: #494353; font-size: 12px; line-height: 1.42; font-weight: 700; }
.task-detail { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.task-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.badge { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 99px; color: #626e83; background: #f5f2f8; font-size: 9px; font-weight: 800; }
.badge.priority-high, .badge.due-overdue { color: #95434e; background: #fff0f0; }
.badge.priority-medium { color: #77541e; background: #fff6e7; }
.badge.due-today { color: #6849ba; background: #f0e8fb; }
.task-open-link { width: 44px; height: 44px; display: grid; place-items: center; color: #355db9; text-decoration: none; font-size: 16px; }
.task-open-link:hover { color: var(--purple); }
.empty-state { padding: 25px 18px 12px; text-align: center; }
.empty-heart { color: #e9aa4f; font-size: 29px; }
.empty-state h3 { margin: 8px 0 4px; font-size: 15px; }
.empty-state p { margin: 0; color: var(--muted); font-size: 11px; }
.error-state { margin-top: 13px; padding: 12px; border-radius: 14px; color: #9c4f58; background: #fff2f1; font-size: 11px; line-height: 1.5; }
.text-button { padding: 6px 0; border: 0; color: var(--purple-dark); background: transparent; font-size: 11px; font-weight: 800; cursor: pointer; }

.login-screen { min-height: calc(100vh - 100px); display: grid; place-items: center; padding: 15px 0 40px; }
.login-card { width: min(100%, 430px); padding: 25px; border: 1px solid rgba(100,77,141,.08); border-radius: 28px; background: white; box-shadow: var(--shadow); text-align: center; }
.login-pet { display: block; width: 144px; margin: -8px auto 3px; }
.login-card h1 { margin: 0; font-size: 31px; letter-spacing: -.05em; }
.login-copy { max-width: 330px; margin: 9px auto 22px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.login-card form { text-align: left; }
.login-card label { display: block; margin-bottom: 7px; font-size: 11px; font-weight: 800; }
.password-row { display: flex; gap: 8px; }
.password-row input { flex: 1; min-width: 0; padding: 12px; border: 1px solid #e8e1ef; border-radius: 13px; outline: 0; color: var(--ink); background: #fcfbfd; }
.password-row input:focus { border-color: #bda8df; box-shadow: 0 0 0 3px #f2ecfa; }
.button { padding: 12px 15px; border: 0; border-radius: 13px; font-size: 11px; font-weight: 850; cursor: pointer; transition: transform .16s, box-shadow .16s; }
.button:active { transform: scale(.97); }
.button-primary { color: white; background: linear-gradient(135deg, #4678ee, #315ed1); box-shadow: 0 7px 16px rgba(49,94,209,.22); }
.button-soft { color: var(--purple-dark); background: #f1eafb; }
.form-error { min-height: 16px; margin: 8px 0 0; color: #99434e; font-size: 11px; }
.setup-note { margin-top: 9px; padding: 11px 13px; border-radius: 14px; color: #816a44; background: #fff7e8; font-size: 11px; line-height: 1.45; text-align: left; }

.settings-dialog { width: min(calc(100% - 28px), 460px); padding: 0; border: 0; border-radius: 25px; color: var(--ink); box-shadow: 0 30px 90px rgba(40,29,60,.25); }
.settings-dialog::backdrop { background: rgba(48,38,65,.28); backdrop-filter: blur(4px); }
.dialog-top { display: flex; align-items: flex-start; justify-content: space-between; padding: 21px 21px 13px; border-bottom: 1px solid #f2edf5; }
.dialog-top h2 { margin: 0; font-size: 20px; letter-spacing: -.03em; }
.dialog-top .eyebrow { margin-bottom: 5px; }
.close-dialog { width: 34px; height: 34px; padding: 0; box-shadow: none; background: #f5f1f8; font-size: 24px; line-height: 1; }
.settings-content { padding: 8px 21px 21px; }
.setting-row { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 14px 0; }
.setting-row strong, .setting-field strong { font-size: 12px; }
.setting-row p { max-width: 255px; margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.switch { position: relative; width: 45px; height: 27px; flex: 0 0 auto; }
.switch input { width: 0; height: 0; opacity: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: #ddd7e4; transition: .2s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: white; box-shadow: 0 2px 5px #0002; transition: .2s; }
.switch input:checked + span { background: #886bc2; }
.switch input:checked + span::after { transform: translateX(18px); }
.setting-field { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-top: 1px solid #f2edf5; }
.setting-field small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.setting-field input { padding: 7px 8px; border: 1px solid #e9e2ef; border-radius: 11px; color: var(--purple-dark); background: #fcfbfd; font-size: 13px; }
.wide-button { width: 100%; margin-top: 9px; }
.settings-help, .settings-status { margin: 10px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; text-align: center; }
.settings-divider { margin: 17px 0 7px; border-top: 1px solid #f2edf5; }
.logout-button { display: block; margin: 0 auto; color: #9a6677; }
.settings-status { min-height: 15px; color: var(--purple-dark); }
.toast { position: fixed; z-index: 10; bottom: calc(20px + env(safe-area-inset-bottom)); left: 50%; max-width: calc(100% - 30px); padding: 11px 16px; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; border-radius: 99px; color: white; background: #382e4a; box-shadow: 0 10px 28px #20162b30; font-size: 11px; text-align: center; transition: .22s ease; }
.toast.visible { transform: translate(-50%, 0); opacity: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@keyframes floaty { 0%,100% { translate: 0 0; } 50% { translate: 0 -7px; } }
@keyframes pet-bounce { 0%,100% { transform: translateX(-50%) scale(1); } 26% { transform: translateX(-50%) translateY(-18px) rotate(-6deg) scale(1.06); } 54% { transform: translateX(-50%) translateY(2px) rotate(5deg) scale(.98); } 76% { transform: translateX(-50%) translateY(-5px) rotate(-2deg); } }
@keyframes celebrate { 0% { transform: translateX(-50%) scale(1); } 32% { transform: translateX(-50%) translateY(-16px) rotate(-5deg) scale(1.06); } 65% { transform: translateX(-50%) translateY(1px) rotate(4deg) scale(.98); } 100% { transform: translateX(-50%) scale(1); } }
@keyframes glow-pop { 0% { opacity: .35; transform: scale(.8); } 100% { opacity: 1; transform: scale(1.15); } }
@keyframes spin { to { rotate: 360deg; } }

@media (max-width: 540px) {
  body { padding-right: 13px; padding-left: 13px; }
  .topbar { height: 59px; margin-bottom: 11px; }
  .welcome-row { margin-bottom: 12px; }
  .welcome-row h1 { font-size: 25px; }
  .pet-card { height: 224px; margin-bottom: 12px; border-radius: 25px; }
  .pet-button { left: -4%; width: 55%; }
  .pet-art { width: 100%; bottom: -2px; }
  .pet-bubble { right: 4%; width: 45%; padding: 12px 11px 11px; border-radius: 16px; }
  .pet-kicker { font-size: 7px; margin-bottom: 6px; }
  .pet-bubble p { min-height: 46px; font-size: 12px; }
  .orbit-one { width: 189px; height: 189px; left: 3%; }
  .orbit-two { width: 239px; height: 239px; left: -2%; }
  .focus-card { padding: 15px; border-radius: 21px; }
  .hero-task-card { gap: 12px; }
  .hero-task-title { font-size: 19px; }
  .hero-check { min-height: 44px; }
  .all-tasks-button { margin-top: 5px; padding: 11px 3px; }
  .tasks-section { padding: 16px; border-radius: 21px; }
  .tasks-heading h2 { font-size: 19px; }
  .tasks-toolbar { gap: 5px; }
  .area-select-wrap select { max-width: 124px; padding-left: 8px; font-size: 9px; }
  .task-summary { font-size: 9px; }
  .password-row { flex-direction: column; }
  .password-row .button { width: 100%; }
}

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

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #edf2fc;
  --muted: #9aa9bf;
  --purple: #83a7ff;
  --purple-dark: #adc3ff;
  --purple-soft: #1d2a42;
  --paper: #10151e;
  --card: #1a2230;
  --line: #303b4e;
  --shadow: 0 18px 46px rgba(0, 0, 0, .24);
}

:root[data-theme="dark"] body {
  background: radial-gradient(ellipse at 88% 0%, #2a2225 0, transparent 23rem), radial-gradient(ellipse at 0% 26%, #182844 0, transparent 25rem), var(--paper);
}
:root[data-theme="dark"] .icon-button,
:root[data-theme="dark"] .countdown-pill,
:root[data-theme="dark"] .focus-card,
:root[data-theme="dark"] .tasks-section,
:root[data-theme="dark"] .login-card,
:root[data-theme="dark"] .settings-dialog {
  border-color: #2c3748;
  color: var(--ink);
  background: #1a2230;
}
:root[data-theme="dark"] .countdown-pill { background: rgba(26,34,48,.86); }
:root[data-theme="dark"] .pet-bubble {
  border-color: rgba(200,216,245,.24);
  color: #edf2fc;
  background: rgba(24,33,48,.96);
}
:root[data-theme="dark"] .pet-bubble::before { background: #182130; }
:root[data-theme="dark"] .pet-kicker { color: #a9c4ff; }
:root[data-theme="dark"] .nudge-card { color: #c1cee1; }
:root[data-theme="dark"] .nudge-spark { color: #ffd18a; background: #403321; }
:root[data-theme="dark"] .focus-status.is-today { color: #c1adff; }
:root[data-theme="dark"] .focus-status.is-today::before { background: #b396ff; box-shadow: 0 0 0 4px #382f54; }
:root[data-theme="dark"] .focus-status.is-overdue { color: #ffb1b5; }
:root[data-theme="dark"] .focus-status.is-overdue::before { background: #ff8089; box-shadow: 0 0 0 4px #462930; }
:root[data-theme="dark"] .hero-link,
:root[data-theme="dark"] .all-tasks-count { color: #c3d3ff; background: #263653; }
:root[data-theme="dark"] .all-tasks-button { color: #c3cde0; }
:root[data-theme="dark"] .tasks-toolbar,
:root[data-theme="dark"] .dialog-top,
:root[data-theme="dark"] .setting-field,
:root[data-theme="dark"] .settings-divider { border-color: #2b3545; }
:root[data-theme="dark"] .area-select-wrap select,
:root[data-theme="dark"] .setting-field input,
:root[data-theme="dark"] .password-row input {
  border-color: #39465b;
  color: #d9e3f6;
  background-color: #151c28;
}
:root[data-theme="dark"] .area-select-wrap select { color: #c3d3ff; }
:root[data-theme="dark"] .area-select-wrap select option { color: #edf2fc; background: #151c28; }
:root[data-theme="dark"] .task-group-title { color: #aab7cb; }
:root[data-theme="dark"] .task-group-title::after { background: #2e394b; }
:root[data-theme="dark"] .task-row { border-color: #2a3546; background: #1d2635; }
:root[data-theme="dark"] .task-row:hover { background: #222e40; }
:root[data-theme="dark"] .task-check { border-color: #4a5870; color: #fff; background: #182130; }
:root[data-theme="dark"] .task-title { color: #e1e8f5; }
:root[data-theme="dark"] .badge { color: #c0ccde; background: #2b3545; }
:root[data-theme="dark"] .badge.priority-high,
:root[data-theme="dark"] .badge.due-overdue { color: #ffbdc2; background: #482b34; }
:root[data-theme="dark"] .badge.priority-medium { color: #ffd693; background: #443523; }
:root[data-theme="dark"] .badge.due-today { color: #d0c2ff; background: #382f50; }
:root[data-theme="dark"] .task-open-link { color: #b5caff; }
:root[data-theme="dark"] .button-soft,
:root[data-theme="dark"] .close-dialog { color: #c5d4fa; background: #293750; }
:root[data-theme="dark"] .settings-dialog::backdrop { background: rgba(0,0,0,.58); }
:root[data-theme="dark"] .switch span { background: #465267; }
:root[data-theme="dark"] .switch span::after { background: #eaf0fb; }
:root[data-theme="dark"] .form-error,
:root[data-theme="dark"] .error-state { color: #ffb5b8; background: #3d252d; }
:root[data-theme="dark"] .setup-note { color: #f5d49e; background: #3a3022; }
:root[data-theme="dark"] .settings-status { color: #bfd0ff; }
:root[data-theme="dark"] .logout-button { color: #e09dae; }
:root[data-theme="dark"] .theme-toggle { color: #ffd58e; }
button:disabled { cursor: wait; opacity: .78; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) { color-scheme: dark; }
}
