/* Approved preservation-led refinement, applied after the deployed themes. */
:root, .dark { --evolve-row-border: 210 5% 23%; --evolve-row-hover: 210 7.14% 16.47%; }
.task-row {
  background: hsl(var(--card) / .78);
  border-color: hsl(var(--evolve-row-border) / .68);
  box-shadow: inset 0 1px hsl(var(--glass-highlight) / .12);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: background-color .15s, border-color .15s;
  padding: 12px 14px; border-radius: 14px;
}
.task-row:hover { transform: none; background: hsl(var(--evolve-row-hover)); border-color: hsl(var(--evolve-row-border)); box-shadow: none; }
.evolve-task-description { font-size: 13px; line-height: 1.5; margin-top: 4px; }
.evolve-inline-add { border: 1px dashed hsl(var(--border)); box-shadow:none; background:transparent; }
.evolve-inline-add:hover { background:hsl(var(--secondary) / .4); }
.sidebar-item { position:relative; }
.sidebar-item.active::before { position:absolute; left:3px; width:3px; box-shadow:none; }
.sidebar-item.active > :last-child:not(:first-child) { color:inherit !important; }
.evolve-sidebar > div { box-shadow:0 10px 30px hsl(213 30% 25% / .07); }
.evolve-sort { width:180px; min-width:180px; gap:8px; }
.evolve-sort-label { flex:1; text-align:left; white-space:nowrap; }
.atmosphere-panel { padding:16px 18px; box-shadow:inset 0 1px hsl(var(--glass-highlight) / .25); border-color:hsl(var(--border) / .65); background:linear-gradient(120deg,hsl(var(--glass-surface-strong) / .8),hsl(var(--card) / .5)); }
.atmosphere-panel::before { opacity:.35; box-shadow:none; }
.atmosphere-glyph { width:34px; height:34px; box-shadow:none; }
.atmosphere-panel .load-track { display:none; }
main h1 { font-family:var(--font-serif); font-size:24px; line-height:1.3; letter-spacing:-.02em; }
.evolve-page-heading { margin:20px 28px 16px; padding:16px 18px; border:1px solid hsl(var(--border) / .65); border-radius:var(--glass-large-radius); background:hsl(var(--card) / .55); gap:16px; }
main > div > div:first-child:not(.tasks-page) h1 > span:first-child { font-family:var(--font-sans); font-size:18px; }
.evolve-detail-backdrop { background:hsl(var(--background) / .38); backdrop-filter:blur(2px); }
.task-document { max-width:500px; }
.document-chip[aria-pressed="true"] { box-shadow:inset 0 0 0 1px currentColor; font-weight:700; }
.document-chip[aria-pressed="true"]::after { content:'✓'; margin-left:3px; }
/* Glass defines position:relative late in the deployed stylesheet. Restore primitive positioning. */
[role="dialog"].glass-material-large { position:fixed; }
.evolve-dialog-close { position:absolute; inset:12px 12px auto auto; width:32px; height:32px; display:grid; place-items:center; padding:0; }
[role="dialog"] > div:first-child { padding-right:32px; }
.evolve-field { display:flex; flex-direction:column; gap:6px; font-size:12px; color:hsl(var(--muted-foreground)); }
.evolve-field input,.evolve-field textarea { color:hsl(var(--foreground)); }
[role="dialog"] { max-height:calc(100dvh - 32px); overflow-y:auto; }
.evolve-habit-heading,.evolve-habit-row { display:grid; grid-template-columns:minmax(160px,1fr) 444px 32px; align-items:center; gap:12px; padding:12px; }
.evolve-habit-heading { margin-bottom:6px; }
.evolve-habit-heading-label { font-size:13px; font-weight:600; }
.evolve-habit-name { grid-column:1; grid-row:1; }
.evolve-habit-row > .flex.gap-1 { grid-column:2; grid-row:1; }
.evolve-habit-record { grid-column:1; grid-row:2; margin-left:42px; }
.evolve-habit-delete { grid-column:3; grid-row:1; min-width:32px; min-height:32px; opacity:.7; }
.evolve-habit-empty { opacity:1; }
.evolve-habit-empty > div { border-color:hsl(var(--muted-foreground) / .65); }
.dark .evolve-habit-empty > div { border-color:hsl(var(--muted-foreground) / .8) !important; }
.evolve-habit-row button:disabled { cursor:default; }
.evolve-habit-row button:not(:disabled)[data-testid^="habit-check"] { outline:1px solid hsl(var(--muted-foreground) / .6); outline-offset:1px; }
.evolve-week-switch { display:flex; align-items:center; justify-content:space-between; gap:8px; font-weight:400; font-size:12px; }
.evolve-week-switch button { width:40px; height:40px; border:1px solid hsl(var(--border)); border-radius:10px; font-size:18px; }
.evolve-week-switch button:disabled { opacity:.3; }
button:focus-visible,a:focus-visible,[role="button"]:focus-visible { outline:2px solid hsl(var(--ring)); outline-offset:3px; }
.dark .task-row { border-color:hsl(var(--evolve-row-border) / .65); background:hsl(var(--card) / .84); box-shadow:none; backdrop-filter:none; -webkit-backdrop-filter:none; }
.dark .task-row:hover { background:hsl(var(--evolve-row-hover)); border-color:hsl(var(--evolve-row-border)); }
.dark .atmosphere-panel { background:hsl(var(--card) / .55); border-color:hsl(var(--border) / .5); box-shadow:none; backdrop-filter:none; -webkit-backdrop-filter:none; }
.dark .atmosphere-panel::before { display:none; }
.dark .atmosphere-glyph { background:hsl(var(--secondary)); border-color:hsl(var(--border)); }
.dark .task-document,.dark [role="dialog"].glass-material-large { background:hsl(var(--card) / .98); }
@media(max-width:1100px) and (min-width:768px) {
  .evolve-habit-heading,.evolve-habit-row { grid-template-columns:minmax(0,1fr) 32px; }
  .evolve-habit-heading > .flex.gap-1,.evolve-habit-row > .flex.gap-1 { grid-column:1 / -1; grid-row:2; justify-self:end; }
  .evolve-habit-delete { grid-column:2; }
  .evolve-habit-record { grid-row:3; }
}
@media(max-width:767px) {
  main h1 { font-size:22px; }
  .evolve-page-heading { margin:16px; padding:14px; flex-wrap:wrap; }
  .evolve-habits > div:first-child > div:first-child { gap:8px; flex-wrap:wrap; }
  .evolve-sort { width:174px; min-width:174px; }
  .task-document { max-width:100%; }
  .atmosphere-panel { padding:14px; }
  .evolve-habits > div { padding-left:16px; padding-right:16px; }
  .evolve-habit-heading,.evolve-habit-row { grid-template-columns:minmax(0,1fr) 36px; gap:8px; padding:12px; }
  .evolve-habit-heading-label { grid-column:1 / -1; }
  .evolve-habit-heading-label > span { display:none; }
  .evolve-habit-heading > .flex.gap-1,.evolve-habit-row > .flex.gap-1 { grid-column:1 / -1; grid-row:2; display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:2px; width:100%; }
  .evolve-habit-heading > .flex.gap-1 > div { width:auto; }
  .evolve-habit-row > .flex.gap-1 > button { width:100%; height:40px; }
  .evolve-habit-delete { grid-column:2; width:36px; height:40px; }
  .evolve-habit-record { grid-row:3; }
  .evolve-habit-name .truncate { white-space:normal; overflow:visible; }
  .document-chip { min-height:40px; }
  [role="dialog"] { width:calc(100% - 24px); }
  .evolve-field input,.evolve-field textarea { font-size:16px; }
}
@media(prefers-reduced-motion:reduce) { .task-row { animation:none; transition:none; } }

button,a,.task-row,[role="button"] { transition:transform .16s cubic-bezier(.2,.8,.2,1),background-color .16s ease,border-color .16s ease,color .16s ease; }
button:active:not(:disabled),a:active,.task-row:active { transform:translateY(1px) scale(.985); }
.task-row.completed { animation:mechanical-settle .34s cubic-bezier(.2,.8,.2,1); }
@keyframes mechanical-settle { 0%{transform:translateY(1px) scale(.985)} 60%{transform:translateY(-1px) scale(1.005)} 100%{transform:none} }
@media(prefers-reduced-motion:reduce){.task-row.completed{animation:none}}

/* Shared content modules, deliberately separate from their heading panels. */
.focus-panel { width:100%; max-width:680px; margin-bottom:24px; padding:20px; border:1px solid hsl(var(--primary) / .35); border-radius:18px; background:hsl(var(--card)); }
.focus-panel-heading,.focus-current,.focus-controls { display:flex; align-items:center; gap:12px; }
.focus-panel-heading { justify-content:space-between; margin-bottom:18px; }
.focus-panel-heading h2,.focus-stats h2 { font-size:18px; font-weight:600; }
.focus-panel-heading span,.focus-note,.focus-current p,.focus-stats p { color:hsl(var(--muted-foreground)); font-size:13px; line-height:1.6; }
.focus-current { justify-content:space-between; margin-bottom:16px; }
.focus-current h3 { font-size:17px; font-weight:500; overflow-wrap:anywhere; }
.focus-clock { font-size:34px; font-variant-numeric:tabular-nums; white-space:nowrap; color:hsl(var(--primary)); }
.focus-button { min-height:44px; padding:9px 15px; border:1px solid hsl(var(--border)); border-radius:10px; background:hsl(var(--secondary)); font:inherit; font-size:14px; white-space:nowrap; }
.focus-button.primary { background:hsl(var(--primary)); color:hsl(var(--primary-foreground)); border-color:transparent; font-weight:600; }
.focus-button:disabled { opacity:.45; cursor:not-allowed; }
.focus-button:not(:disabled):hover { filter:brightness(1.1); }
.focus-picker { display:flex; align-items:end; gap:12px; }
.focus-picker label { flex:1; min-width:0; }
.focus-panel label,.focus-stats label { display:flex; flex-direction:column; gap:6px; font-size:13px; color:hsl(var(--muted-foreground)); }
.focus-panel :is(input,select),.focus-stats input { min-height:44px; border:1px solid hsl(var(--input)); border-radius:10px; background:hsl(var(--background)); color:hsl(var(--foreground)); padding:8px 12px; min-width:0; max-width:100%; font-size:16px; }
.focus-panel select { width:100%; }
.focus-error { color:#f18196; font-size:13px; margin-top:10px; }
.focus-error .focus-button { margin-left:10px; }
.focus-reminder { margin-top:18px; padding-top:18px; border-top:1px solid hsl(var(--border)); }
.focus-reminder p { margin:6px 0 12px; }
.focus-reminder form { display:flex; flex-wrap:wrap; align-items:end; gap:10px; }
.focus-dock { position:fixed; z-index:40; bottom:16px; right:20px; left:320px; max-width:750px; margin-left:auto; padding:12px 16px; display:flex; align-items:center; gap:16px; border:1px solid hsl(var(--primary)/.4); border-radius:14px; background:hsl(var(--popover)); box-shadow:0 6px 24px #0005; }
.focus-dock a { min-width:0; flex:1; }
.focus-dock a span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; }
.focus-dock strong { color:hsl(var(--primary)); font-variant-numeric:tabular-nums; }
.has-focus-dock main { padding-bottom:100px; }
.focus-stats { overflow-y:auto; flex:1; padding:20px 28px 40px; }
.focus-stats>.evolve-page-heading { margin:0 0 24px; }
.focus-period { display:flex; gap:16px; margin-bottom:12px; }
.focus-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin:24px 0 32px; }
.focus-metrics dt { font-size:13px; color:hsl(var(--muted-foreground)); }
.focus-metrics dd { font-size:28px; font-variant-numeric:tabular-nums; margin-top:6px; }
.focus-analysis { border-top:1px solid hsl(var(--border)); border-bottom:1px solid hsl(var(--border)); padding:24px 0; margin-bottom:28px; }
.focus-analysis .focus-button { margin-top:12px; }
.focus-summary { white-space:pre-wrap; margin:20px 0; }
.focus-groups { margin-top:20px; }
.focus-groups li { display:flex; justify-content:space-between; gap:20px; padding:8px 0; }
.focus-groups li>span:last-child { color:hsl(var(--muted-foreground)); }
.focus-results article { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(150px,230px); align-items:center; gap:20px; padding:16px 0; border-bottom:1px solid hsl(var(--border)); }
.focus-results h3 { overflow-wrap:anywhere; }
.focus-result-time { font-variant-numeric:tabular-nums; font-size:14px; }
.focus-category-edit { display:flex; gap:6px; }
.focus-category-edit input { width:100%; }
@media(min-width:1024px) {
  .focus-panel { display:grid; grid-template-columns:120px minmax(0,1fr); align-items:center; gap:12px 18px; padding:14px 16px; margin-bottom:16px; border-radius:12px; border-color:hsl(var(--border)); }
  .focus-panel.has-session { grid-template-columns:120px minmax(0,1fr); }
  .focus-panel-heading { display:block; margin:0; }
  .focus-panel-heading h2 { font-size:14px; }
  .focus-panel-heading span { display:block; margin-top:3px; font-size:12px; }
  .focus-current { min-width:0; margin:0; gap:16px; }
  .focus-current > div { min-width:0; }
  .focus-current h3 { font-size:14px; line-height:1.4; }
  .focus-current p { font-size:12px; margin-top:3px; }
  .focus-clock { font-size:24px; }
  .focus-panel > .focus-controls { grid-column:2; gap:6px; flex-wrap:wrap; }
  .focus-panel .focus-button { padding:8px 12px; font-size:13px; }
  .focus-picker { align-items:center; }
  .focus-picker label { flex-direction:row; align-items:center; gap:10px; font-size:12px; }
  .focus-picker select { flex:1; width:0; font-size:14px; }
  .focus-panel > :is(.focus-note,.focus-error,.focus-reminder) { grid-column:1 / -1; margin-top:0; }
  .focus-panel .focus-reminder { padding-top:12px; }
}
@media(max-width:767px) {
  .focus-panel { padding:16px; }
  .focus-current { flex-direction:column; align-items:start; gap:8px; }
  .focus-clock { font-size:36px; }
  .focus-picker { flex-direction:column; align-items:stretch; }
  .focus-controls { flex-wrap:wrap; }
  .focus-dock { left:10px; right:10px; bottom:calc(10px + env(safe-area-inset-bottom)); padding:10px; gap:8px; }
  .focus-dock .focus-controls { flex-wrap:nowrap; gap:6px; }
  .focus-dock .focus-button { padding:8px 10px; }
  .focus-stats { padding:16px; }
  .focus-metrics { grid-template-columns:1fr; gap:16px; }
  .focus-metrics>div { display:flex; justify-content:space-between; align-items:center; }
  .focus-metrics dd { font-size:24px; margin:0; }
  .focus-period { gap:10px; }
  .focus-period label { min-width:0; flex:1; }
  .focus-results article { grid-template-columns:1fr auto; gap:10px; }
  .focus-category-edit { grid-column:1 / -1; }
}
.evolve-long-content { max-width:1100px; padding:20px 28px 32px; margin:0 auto; }
.evolve-long-content > .evolve-page-heading { margin:0 0 24px; }
.evolve-review,.evolve-settings { max-width:920px; }
.evolve-review [data-testid^="review-step-"] { background:hsl(var(--card)); border-color:hsl(var(--border)); }
.evolve-review [data-testid^="review-step-"]:has([aria-pressed="true"]) { border-color:#83b89e66; }
.evolve-review [data-testid^="review-step-"] > div:first-child { min-height:56px; }
.evolve-review [data-testid^="review-step-"] button:focus-visible { outline-offset:4px; }
.evolve-settings :is([role="switch"],[role="slider"]) { flex-shrink:0; }
.evolve-stats .tabular-nums { font-variant-numeric:tabular-nums; }
.evolve-board-scroll { padding:0 28px 24px; scrollbar-width:thin; scrollbar-color:hsl(var(--muted-foreground)) transparent; }
.evolve-kanban [data-testid^="kanban-col-"] { width:284px; background:hsl(var(--card) / .65) !important; border:1px solid hsl(var(--border)); border-radius:18px; }
.evolve-kanban [data-testid^="kanban-col-"] > div:first-child { min-height:48px; padding:12px 14px; }
/* These two legacy surfaces use !important in the deployed bundle. */
.evolve-kanban [draggable="true"] { background:hsl(var(--secondary) / .5) !important; border-radius:12px !important; box-shadow:none; }
.evolve-matrix [data-testid^="quadrant-"] { background:hsl(var(--card)); border-width:1px; border-top-width:3px; border-radius:16px; }
.evolve-matrix [data-testid^="eisenhower-task-"] { min-height:48px; }

.evolve-notes-desktop,.evolve-calendar-desktop { margin:16px 24px; height:calc(100% - 32px); border:1px solid hsl(var(--border)); border-radius:18px; background:hsl(var(--card) / .82); backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px); }
.evolve-notes-desktop .evolve-note-folders { width:164px; background:hsl(var(--card)); }
.evolve-notes-desktop .evolve-note-list { width:236px; background:hsl(var(--background) / .5); }
.evolve-note-editor { background:hsl(var(--card)); }
.evolve-note-editor > div:first-child,.evolve-note-list > div:first-child,.evolve-note-folders > div:first-child { min-height:52px; }
.evolve-note-editor input[aria-label="Заголовок заметки"] { font-family:var(--font-serif); font-size:22px; line-height:1.45; padding:20px 24px 12px; background:transparent; }
.evolve-note-editor textarea { padding:12px 24px 32px; line-height:1.8; background:transparent; }
.evolve-note-list [class~="text-muted-foreground/60"],.evolve-note-list [class~="text-muted-foreground/40"],.evolve-note-folders [class~="text-muted-foreground/40"] { color:hsl(var(--muted-foreground)); }
.evolve-note-folders .group:focus-within button,.evolve-note-folders .group:hover button { opacity:1; }
.evolve-calendar-month { width:340px; background:hsl(var(--card)); }
.evolve-calendar-day { flex:1; min-width:0; width:auto; background:hsl(var(--background) / .3); }
.evolve-calendar-day > div:first-child { min-height:64px; }
.evolve-calendar-day > div:nth-child(2) { padding:20px 24px; }
.evolve-calendar-day textarea { min-height:180px; line-height:1.7; }
.evolve-calendar-month button[aria-pressed],.evolve-calendar-mobile button[aria-pressed] { min-height:42px; }
.evolve-calendar-month [class~="text-muted-foreground/50"],.evolve-calendar-mobile [class~="text-muted-foreground/50"] { color:hsl(var(--muted-foreground)); }
.evolve-calendar-month button[aria-current="date"]:not([aria-pressed="true"]) { box-shadow:inset 0 0 0 1px hsl(var(--primary) / .55); }
@media(min-width:768px) and (max-width:1099px) {
  .evolve-notes-desktop,.evolve-calendar-desktop { display:none; }
  .evolve-notes-mobile,.evolve-calendar-mobile { display:flex; }
}
@media(max-width:767px) {
  .evolve-long-content { padding:16px 16px 28px; }
  .evolve-long-content > .evolve-page-heading { margin:0 0 20px; }
  .evolve-board-scroll { padding:0 16px 20px; }
  .evolve-kanban [data-testid^="kanban-col-"] { width:calc(100vw - 48px); max-width:320px; }
  .evolve-page-heading h1 { overflow-wrap:anywhere; }
  .evolve-settings section > .p-5 { padding:16px; }
  .evolve-settings .grid-cols-2 { grid-template-columns:minmax(0,1fr); }
  .evolve-note-editor input[aria-label="Заголовок заметки"] { padding:16px 18px 10px; }
  .evolve-note-editor textarea { padding:10px 18px 24px; font-size:16px; }
  .evolve-note-folders .group button { opacity:1; }
  .evolve-calendar-day > div:nth-child(2) { padding:16px; }
  .evolve-calendar-day textarea { font-size:16px; }
}

.evolve-task-toolbar { flex-wrap: wrap; }

.priority-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: auto;
  min-width: 0;
  max-width: 100%;
}

.priority-toolbar > .priority-button {
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 9px;
  background: transparent;
  font-size: 12px;
}

@media (max-width: 767px), (pointer: coarse) {
  .priority-toolbar > .priority-button { min-height: 44px; }
}

@media (max-width: 479px) {
  .priority-toolbar { flex-basis: 100%; margin-left: 0; }
}

.priority-toolbar .priority-active {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid hsl(var(--primary) / .48);
  border-radius: 999px;
  background: hsl(var(--primary) / .12);
  color: hsl(var(--primary));
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .01em;
}

.priority-muted,.priority-error-inline { font-size: 13px; }
.priority-muted { color: hsl(var(--muted-foreground)); }
.priority-error-inline,.priority-error { color: hsl(var(--primary)); }

.priority-button {
  min-width: 44px;
  min-height: 44px;
  padding: 9px 15px;
  border: 1px solid hsl(var(--border));
  border-radius: 11px;
  background: hsl(var(--secondary));
  color: hsl(var(--foreground));
  font: inherit;
  font-size: 14px;
  line-height: 1.3;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}

.priority-button.primary {
  border-color: transparent;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-weight: 700;
}

.priority-button:not(:disabled):hover { border-color: hsl(var(--primary) / .65); background-color: hsl(var(--secondary) / .8); }
.priority-button.primary:not(:disabled):hover { filter: brightness(1.08); }
.priority-button:not(:disabled):active { transform: translateY(1px); }
.priority-button:disabled { opacity: .48; cursor: not-allowed; }
.priority-button:focus-visible { outline: 2px solid hsl(var(--primary)); outline-offset: 3px; }

.priority-dialog {
  box-sizing: border-box;
  width: min(720px, calc(100vw - 32px));
  max-width: 720px;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid hsl(var(--border));
  border-radius: 20px;
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  color-scheme: dark;
  box-shadow: 0 24px 90px rgb(0 0 0 / .6), 0 0 0 1px rgb(255 255 255 / .025) inset;
}

.priority-dialog::backdrop {
  background: rgb(9 10 13 / .76);
  backdrop-filter: blur(5px);
}

.priority-dialog-shell { display: flex; max-height: calc(100dvh - 32px); flex-direction: column; }
.priority-dialog-header { display: flex; flex: 0 0 auto; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px 17px; border-bottom: 1px solid hsl(var(--border)); }
.priority-eyebrow { margin: 0 0 5px; color: hsl(var(--primary)); font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.priority-dialog-header h2 { margin: 0; font-family: var(--font-serif, Georgia, serif); font-size: 24px; line-height: 1.25; letter-spacing: -.02em; }
.priority-close { flex: 0 0 44px; width: 44px; padding: 0; font-size: 25px; line-height: 1; }
.priority-dialog-scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px 24px 22px; scrollbar-width: thin; scrollbar-color: hsl(var(--muted-foreground)) transparent; }
.priority-dialog-footer { flex: 0 0 auto; padding: 12px 24px 15px; border-top: 1px solid hsl(var(--border)); color: hsl(var(--muted-foreground)); font-size: 12px; line-height: 1.5; }

.priority-intro { margin: 0 0 18px; color: hsl(var(--foreground)); font-size: 14px; line-height: 1.6; }
.priority-field { display: flex; flex-direction: column; gap: 8px; color: hsl(var(--foreground)); font-size: 13px; font-weight: 600; }
.priority-field textarea,.priority-question textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 108px;
  resize: vertical;
  padding: 12px 14px;
  border: 1px solid hsl(var(--input));
  border-radius: 12px;
  outline: none;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font: inherit;
  font-size: 16px;
  line-height: 1.55;
}
.priority-field textarea::placeholder,.priority-question textarea::placeholder { color: hsl(var(--muted-foreground)); }
.priority-field textarea:focus,.priority-question textarea:focus { border-color: hsl(var(--primary)); box-shadow: 0 0 0 2px hsl(var(--primary) / .2); }
.priority-field textarea:disabled,.priority-question textarea:disabled { opacity: .6; }
.priority-counter { align-self: flex-end; color: hsl(var(--muted-foreground)); font-size: 12px; font-weight: 400; }
.priority-disclosure { margin: 17px 0 0; padding: 13px 15px; border: 1px solid hsl(var(--border)); border-radius: 12px; background: hsl(var(--secondary) / .45); }
.priority-disclosure summary { min-height: 24px; color: hsl(var(--primary)); font-size: 13px; font-weight: 650; cursor: pointer; }
.priority-disclosure p { margin: 10px 0 0; color: hsl(var(--muted-foreground)); font-size: 13px; line-height: 1.6; }
.priority-disclosure p + p { margin-top: 7px; }
.priority-candidate-count,.priority-context-counts { margin: 14px 0 0; color: hsl(var(--muted-foreground)); font-size: 13px; line-height: 1.5; }
.priority-context-counts { padding: 11px 13px; border-left: 3px solid hsl(var(--primary)); background: hsl(var(--secondary) / .5); }
.priority-notice { margin: 0 0 16px; padding: 11px 13px; border: 1px solid hsl(var(--primary) / .4); border-radius: 10px; background: hsl(var(--primary) / .09); color: hsl(var(--primary)); font-size: 13px; line-height: 1.5; }
.priority-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 20px; }
.priority-actions .primary { margin-right: 2px; }

.priority-memory-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 22px 0 11px; }
.priority-memory-heading h3,.priority-history h3 { margin: 0; color: hsl(var(--foreground)); font-size: 16px; line-height: 1.35; }
.priority-memory-heading p { margin: 3px 0 0; color: hsl(var(--muted-foreground)); font-size: 12px; line-height: 1.5; }
.priority-memory-facts { display: grid; gap: 10px; }
.priority-memory-fact { min-width: 0; padding: 13px; border: 1px solid hsl(var(--border)); border-radius: 13px; background: hsl(var(--secondary) / .3); }
.priority-memory-fact-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; color: hsl(var(--foreground)); font-size: 12px; font-weight: 650; }
.priority-memory-date,.priority-memory-expired { color: hsl(var(--muted-foreground)); font-size: 11px; font-weight: 500; text-align: right; }
.priority-memory-fact-question { margin: 0 0 9px; color: hsl(var(--muted-foreground)); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.priority-memory-fact textarea { min-height: 70px; }
.priority-memory-fact-actions { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 10px; }
.priority-memory-scope { flex: 1 1 200px; max-width: 280px; }
.priority-memory-scope select { box-sizing: border-box; width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid hsl(var(--input)); border-radius: 10px; background: hsl(var(--background)); color: hsl(var(--foreground)); font: inherit; font-size: 14px; }
.priority-memory-scope select:focus-visible { outline: 2px solid hsl(var(--primary)); outline-offset: 2px; }
.priority-memory-remove { min-height: 44px; }
.priority-empty-memory,.priority-memory-guidance { margin: 10px 0 0; color: hsl(var(--muted-foreground)); font-size: 13px; line-height: 1.55; }
.priority-memory-status { margin: 13px 0 0; padding: 10px 12px; border-left: 3px solid hsl(var(--primary)); background: hsl(var(--secondary) / .45); color: hsl(var(--foreground)); font-size: 13px; line-height: 1.5; }
.priority-history { margin-top: 22px; padding-top: 17px; border-top: 1px solid hsl(var(--border)); }
.priority-history h3 { margin-bottom: 10px; }
.priority-history-list { display: grid; gap: 8px; }
.priority-history-entry { border: 1px solid hsl(var(--border)); border-radius: 11px; background: hsl(var(--secondary) / .3); }
.priority-history-entry summary { min-height: 24px; padding: 11px 13px; color: hsl(var(--foreground)); font-size: 13px; line-height: 1.5; cursor: pointer; }
.priority-history-content { padding: 0 13px 13px; }
.priority-history-label { margin: 11px 0 4px; color: hsl(var(--muted-foreground)); font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.priority-history-copy { margin: 0; color: hsl(var(--foreground)); font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; }
.priority-history-facts { display: grid; gap: 6px; margin: 5px 0 0; padding-left: 20px; color: hsl(var(--foreground)); font-size: 13px; line-height: 1.5; }
.priority-history-facts li { padding-left: 2px; }
.priority-history-facts small { display: block; color: hsl(var(--muted-foreground)); font-size: 11px; }
.priority-history-facts .priority-history-fact-question { margin: 0 0 2px; font-size: 12px; }
.priority-history-answers { display: grid; gap: 9px; }
.priority-history-question { margin: 0 0 3px; color: hsl(var(--foreground)); font-size: 13px; font-weight: 650; line-height: 1.5; }
.priority-history-more { margin-top: 10px; }
.priority-saved-memory > p { overflow-wrap: anywhere; white-space: pre-wrap; }
.priority-saved-facts { display: grid; gap: 8px; margin: 10px 0; padding-left: 20px; color: hsl(var(--foreground)); font-size: 13px; line-height: 1.5; }
.priority-saved-facts small { display: block; color: hsl(var(--muted-foreground)); font-size: 11px; }

.priority-question-list { display: grid; gap: 14px; }
.priority-question { padding: 15px; border: 1px solid hsl(var(--border)); border-radius: 13px; background: hsl(var(--card)); }
.priority-question label { display: block; color: hsl(var(--foreground)); font-size: 15px; font-weight: 650; line-height: 1.5; }
.priority-question p { margin: 6px 0 11px; color: hsl(var(--muted-foreground)); font-size: 13px; line-height: 1.5; }
.priority-question textarea { min-height: 76px; font-weight: 400; }
.priority-question .priority-counter { display: block; margin-top: 5px; text-align: right; }

.priority-ranking { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: priority-rank; }
.priority-ranking li { display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: start; gap: 11px; padding: 14px; border: 1px solid hsl(var(--border)); border-radius: 13px; background: hsl(var(--secondary) / .45); counter-increment: priority-rank; }
.priority-ranking li::before { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; background: hsl(var(--primary) / .16); color: hsl(var(--primary)); content: counter(priority-rank); font-size: 14px; font-weight: 700; }
.priority-ranking strong { display: block; overflow-wrap: anywhere; color: hsl(var(--foreground)); font-size: 14px; line-height: 1.5; }
.priority-ranking p { margin: 4px 0 0; color: hsl(var(--muted-foreground)); font-size: 13px; line-height: 1.55; }
.priority-summary { margin: 16px 0 0; padding: 13px 15px; border-left: 3px solid hsl(var(--primary)); background: hsl(var(--secondary) / .45); color: hsl(var(--foreground)); font-size: 13px; line-height: 1.65; white-space: pre-wrap; }
.priority-error { margin: 16px 0 0; font-size: 13px; line-height: 1.5; }

@media (max-width: 767px) {
  .priority-toolbar { gap: 8px; }
  .priority-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 16px; }
  .priority-dialog-shell { max-height: calc(100dvh - 16px); }
  .priority-dialog-header { padding: 17px 16px 14px; }
  .priority-dialog-header h2 { font-size: 21px; }
  .priority-dialog-scroll { padding: 16px 16px 20px; }
  .priority-dialog-footer { padding: 11px 16px calc(13px + env(safe-area-inset-bottom)); }
  .priority-actions { gap: 8px; }
  .priority-actions .primary { width: 100%; }
  .priority-memory-fact { padding: 11px; }
  .priority-memory-fact-top { align-items: flex-start; flex-direction: column; gap: 3px; }
  .priority-memory-date,.priority-memory-expired { text-align: left; }
  .priority-memory-fact-actions { align-items: stretch; flex-direction: column; gap: 9px; }
  .priority-memory-scope { max-width: none; flex: none; }
  .priority-memory-remove { align-self: flex-start; }
  .priority-ranking li { grid-template-columns: 32px minmax(0, 1fr); gap: 9px; padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .priority-button { transition: none; }
}

/* Shell layer: palettes, live background, grouped navigation, phone layout. Loaded after evolve.css. */

/* ---------- Palettes (dark only). Neodyme is the default and lives in theme.css. ---------- */
html[data-palette="arctic"] {
  --background:212 26% 6.5%; --foreground:200 32% 94%;
  --card:212 22% 10.5%; --card-border:212 15% 21%; --popover:212 20% 14.5%; --popover-border:212 16% 26%;
  --primary:196 74% 62%; --primary-hover:196 74% 70%; --primary-foreground:212 26% 6.5%;
  --secondary:212 20% 15%; --secondary-border:hsl(212 16% 25%); --muted:212 20% 13%; --muted-foreground:205 13% 67%; --muted-border:hsl(212 16% 22%);
  --border:212 15% 21%; --input:212 15% 25%; --sidebar-bg:212 26% 8.5%;
  --glass-highlight:200 30% 80%; --glass-rim:212 15% 23%; --glass-frost:200 30% 80%;
  --evolve-row-border:212 15% 21%; --evolve-row-hover:212 20% 15%;
  --glow-1:196 88% 52%; --glow-2:226 74% 56%; --glow-3:168 64% 44%;
}
html[data-palette="malachite"] {
  --background:158 22% 6%; --foreground:150 24% 93%;
  --card:158 16% 10%; --card-border:158 11% 20%; --popover:158 14% 14%; --popover-border:158 11% 25%;
  --primary:152 54% 56%; --primary-hover:152 54% 65%; --primary-foreground:158 22% 6%;
  --secondary:158 14% 14.5%; --secondary-border:hsl(158 11% 24%); --muted:158 14% 12.5%; --muted-foreground:150 9% 66%; --muted-border:hsl(158 11% 21%);
  --border:158 11% 20%; --input:158 11% 24%; --sidebar-bg:158 22% 8%;
  --glass-highlight:150 24% 80%; --glass-rim:158 11% 22%; --glass-frost:150 24% 80%;
  --evolve-row-border:158 11% 20%; --evolve-row-hover:158 14% 14.5%;
  --glow-1:152 70% 42%; --glow-2:186 62% 38%; --glow-3:84 52% 44%;
}
html[data-palette="amethyst"] {
  --background:262 24% 7%; --foreground:270 28% 94%;
  --card:262 18% 11%; --card-border:262 13% 22%; --popover:262 16% 15%; --popover-border:262 13% 27%;
  --primary:266 74% 74%; --primary-hover:266 74% 81%; --primary-foreground:262 24% 7%;
  --secondary:262 16% 15.5%; --secondary-border:hsl(262 13% 26%); --muted:262 16% 13.5%; --muted-foreground:268 10% 68%; --muted-border:hsl(262 13% 23%);
  --border:262 13% 22%; --input:262 13% 26%; --sidebar-bg:262 24% 9%;
  --glass-highlight:270 28% 82%; --glass-rim:262 13% 24%; --glass-frost:270 28% 82%;
  --evolve-row-border:262 13% 22%; --evolve-row-hover:262 16% 15.5%;
  --glow-1:266 80% 62%; --glow-2:318 66% 52%; --glow-3:226 72% 58%;
}
html[data-palette="copper"] {
  --background:20 16% 6.5%; --foreground:30 32% 93%;
  --card:20 12% 10.5%; --card-border:20 9% 21%; --popover:20 11% 14.5%; --popover-border:20 9% 26%;
  --primary:24 80% 60%; --primary-hover:24 80% 68%; --primary-foreground:20 16% 6.5%;
  --secondary:20 11% 15%; --secondary-border:hsl(20 9% 25%); --muted:20 11% 13%; --muted-foreground:26 9% 66%; --muted-border:hsl(20 9% 22%);
  --border:20 9% 21%; --input:20 9% 25%; --sidebar-bg:20 16% 8.5%;
  --glass-highlight:30 32% 80%; --glass-rim:20 9% 23%; --glass-frost:30 32% 80%;
  --evolve-row-border:20 9% 21%; --evolve-row-hover:20 11% 15%;
  --glow-1:22 92% 52%; --glow-2:348 70% 46%; --glow-3:42 90% 52%;
}

/* ---------- Background ---------- */
/* Flat: the palette's own background colour, no gradients, glow, grid or grain (the animated background was removed on purpose). */
html.dark #root > div { background:transparent; }
/* The stock stylesheet draws diagonal stripes and a grid on body::before/::after (and a grain layer); all of them are switched off. */
html.dark body::before, html.dark body::after, html.dark #root::after, html.dark .tasks-page::before { display:none; }
/* The stock stylesheet squeezes every animation to 1ms with !important under "reduce motion" (Windows' "Show animations: off" sets it),
   which froze the button micro-motion, the completion tick and the day ring. Keep them alive, just short. */
@media(prefers-reduced-motion:reduce) {
  html.dark :is(button,a,.task-row,[role="button"]) { transition-duration:.16s !important; }
  .task-row.completed > button[aria-pressed="true"] svg, .task-row.completed > button[aria-pressed="true"] svg path, .task-row.completed .evo-title, .evo-ring-bar { animation-duration:.35s !important; }
  .evo-ring-bar { transition-duration:.5s !important; }
}

/* ---------- Drag and drop ---------- */
/* The stock appear animation used fill-mode "both", so its last keyframe (transform/opacity) outranked dnd-kit's inline transform forever:
   with animations on, rows could not move at all while sorting. Its end state equals the natural state, so only the fill after the end is dropped. */
.task-row { animation-fill-mode:backwards; }
/* Task list (dnd-kit sortable moves the real row with a transform): the held row lifts, sticks to the pointer without easing and the rest step back. */
.task-row.evo-dragging { position:relative; z-index:50; transition:none !important; cursor:grabbing;
  background:hsl(var(--popover)) !important; border-color:hsl(var(--primary) / .85) !important;
  box-shadow:0 24px 50px -14px #000c, 0 0 0 1px hsl(var(--primary) / .55), 0 0 34px -6px hsl(var(--primary) / .55) !important; }
.task-row.evo-dragging > div.cursor-grab { opacity:1 !important; }
.task-row.evo-dragging > div.cursor-grab svg { color:hsl(var(--primary)); }
body:has(.task-row.evo-dragging) { cursor:grabbing; user-select:none; -webkit-user-select:none; }
body:has(.task-row.evo-dragging) .task-row:not(.evo-dragging) { opacity:.7; }
body:has(.task-row.evo-dragging) main { overflow-x:hidden; }
/* The grab handle is faintly visible all the time on desktop; before it only appeared on hover, so it was not obvious that rows can be dragged. */
@media(hover:hover) and (pointer:fine) { html.dark .task-row > div:first-child.cursor-grab { opacity:.38; } }
/* Kanban uses the browser's own drag (a ghost of the card follows the cursor): mark the source card and make the target column unmistakable. */
[data-testid^="kanban-card-"] { cursor:grab; }
[data-testid^="kanban-card-"][class*="scale-95"] { opacity:.35 !important; outline:2px dashed hsl(var(--primary) / .7); outline-offset:-2px; }
[data-testid^="kanban-col-"][class*="border-primary/30"] { background:hsl(var(--primary) / .12) !important; box-shadow:inset 0 0 0 2px hsl(var(--primary) / .6), 0 0 28px -8px hsl(var(--primary) / .5); }

/* ---------- Grouped navigation ---------- */
.sidebar-item.w-full > span.flex-1 { text-align:left; }
.evo-nav-divider { height:1px; margin:12px 10px 8px; background:hsl(var(--border) / .5); }
.evo-nav-title { padding:2px 12px 6px; font-size:10px; font-weight:700; letter-spacing:.16em; text-transform:uppercase; color:hsl(var(--muted-foreground) / .8); }
.evo-nav-title-first { padding-top:8px; }
.evo-swatch-dot { width:15px; height:15px; border-radius:50%; flex-shrink:0; box-shadow:0 0 10px hsl(var(--primary) / .45), inset 0 1px 1px #fff5; }
.evo-palettes { display:grid; gap:6px; padding:6px 2px 10px; }
.evo-palette { display:grid; grid-template-columns:30px minmax(0,1fr); column-gap:12px; align-items:center; text-align:left; padding:9px 12px; border-radius:14px; border:1px solid hsl(var(--border) / .6); background:hsl(var(--card) / .55); }
.evo-palette[aria-checked="true"] { border-color:hsl(var(--primary) / .7); background:hsl(var(--primary) / .1); }
.evo-palette-chip { grid-row:1 / 3; width:30px; height:30px; border-radius:50%; background:radial-gradient(circle at 30% 28%, #fff7, transparent 55%), var(--chip); box-shadow:0 0 16px color-mix(in srgb, var(--chip) 55%, transparent); }
.evo-palette-name { font-size:13px; font-weight:600; color:hsl(var(--foreground)); }
.evo-palette-note { font-size:11px; color:hsl(var(--muted-foreground)); }

/* ---------- Day ring, completion tick, keyboard ---------- */
.evo-ring { position:relative; display:inline-grid; place-items:center; width:52px; height:52px; flex-shrink:0; margin:-4px; }
.evo-ring > svg { position:absolute; inset:0; width:100%; height:100%; transform:rotate(-90deg); overflow:visible; }
.evo-ring > .atmosphere-glyph { position:relative; }
.evo-ring-track { fill:none; stroke:hsl(var(--foreground) / .1); stroke-width:3; }
.evo-ring-bar { fill:none; stroke:hsl(var(--primary)); stroke-width:3; stroke-linecap:round; filter:drop-shadow(0 0 4px hsl(var(--primary) / .55)); transition:stroke-dashoffset .9s cubic-bezier(.34,1.56,.64,1), stroke .3s; animation:evo-ring-in .9s cubic-bezier(.34,1.56,.64,1); }
.evo-ring-full .evo-ring-bar { stroke:#34d399; filter:drop-shadow(0 0 6px #34d39999); transition-timing-function:cubic-bezier(.2,.8,.2,1); animation-timing-function:cubic-bezier(.2,.8,.2,1); }
@keyframes evo-ring-in { from { stroke-dashoffset:151; } }
/* Completion: the check draws itself, then the title fades to done and the row settles (mechanical-settle in evolve.css). */
.task-row.completed > button[aria-pressed="true"] svg { animation:evo-pop .38s cubic-bezier(.34,1.56,.64,1); }
.task-row.completed > button[aria-pressed="true"] svg path { stroke-dasharray:10; stroke-dashoffset:10; animation:evo-tick .3s .12s cubic-bezier(.2,.8,.2,1) forwards; }
.task-row.completed .evo-title { animation:evo-strike .45s ease-out; }
@keyframes evo-pop { from { transform:scale(.55); } }
@keyframes evo-tick { to { stroke-dashoffset:0; } }
@keyframes evo-strike { from { text-decoration-color:transparent; color:hsl(var(--foreground)); } }
/* Keyboard cursor (J/K) and the "?" help sheet. */
.task-row.evo-cursor { outline:2px solid hsl(var(--primary) / .7); outline-offset:-2px; box-shadow:0 0 0 4px hsl(var(--primary) / .12); }
.evo-keys-hint { width:22px; height:22px; border-radius:7px; font:700 12px/1 ui-monospace,SFMono-Regular,Menlo,monospace; color:hsl(var(--muted-foreground)); border:1px solid hsl(var(--border)); }
.evo-keys-hint:hover { color:hsl(var(--foreground)); border-color:hsl(var(--primary) / .6); }
.evo-keys { position:fixed; inset:0; z-index:90; display:grid; place-items:center; background:hsl(var(--background) / .55); backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); animation:evo-fade .18s ease-out; }
.evo-keys-card { width:min(440px,92vw); padding:22px 24px; border-radius:20px; background:hsl(var(--popover)); border:1px solid hsl(var(--popover-border)); box-shadow:0 30px 80px #0008; animation:evo-pop .3s cubic-bezier(.2,.8,.2,1); }
.evo-keys-title { font-weight:700; font-size:15px; margin-bottom:14px; }
.evo-keys dl { display:grid; grid-template-columns:auto 1fr; gap:9px 16px; margin:0; align-items:center; }
.evo-keys dt, .evo-keys dd { margin:0; }
.evo-keys dd { font-size:13px; color:hsl(var(--muted-foreground)); }
.evo-keys kbd { display:inline-block; font:600 11.5px/1 ui-monospace,SFMono-Regular,Menlo,monospace; padding:5px 7px; border-radius:7px; background:hsl(var(--secondary)); border:1px solid hsl(var(--border)); box-shadow:0 1px 0 hsl(var(--border)); color:hsl(var(--foreground)); white-space:nowrap; }
@keyframes evo-fade { from { opacity:0; } }

/* ---------- Phone layout ---------- */
.evo-mobile-header, .evo-tabbar { display:none; }
@media(max-width:767px) {
  html, body { overscroll-behavior-y:none; -webkit-tap-highlight-color:transparent; }
  body { touch-action:manipulation; }
  html.dark #root > div { height:100dvh; }
  /* Blur is expensive on phones: keep it only for the two bars. */
  html.dark :is(.glass,.glass-material-small,.glass-material-medium,.glass-material-large) { backdrop-filter:none; -webkit-backdrop-filter:none; background:hsl(var(--card) / .9); }

  .evo-mobile-header {
    display:flex; align-items:center; justify-content:space-between; height:calc(52px + env(safe-area-inset-top,0px)); padding:env(safe-area-inset-top,0px) 14px 0 18px;
    background:hsl(var(--background) / .7); backdrop-filter:blur(18px) saturate(1.3); -webkit-backdrop-filter:blur(18px) saturate(1.3); border-bottom:1px solid hsl(var(--border) / .45);
  }
  .evo-brand { display:flex; align-items:center; gap:10px; font-size:15px; font-weight:650; letter-spacing:-.01em; }
  .evo-header-actions { display:flex; gap:2px; }
  .evo-header-actions button { width:44px; height:44px; display:grid; place-items:center; border-radius:14px; color:hsl(var(--muted-foreground)); }
  .evo-header-actions button:active { background:hsl(var(--secondary)); }

  .evo-tabbar {
    flex-shrink:0; display:grid; grid-template-columns:1fr 1fr auto 1fr 1fr; align-items:end; gap:2px; padding:6px 8px calc(6px + env(safe-area-inset-bottom,0px));
    background:hsl(var(--sidebar-bg) / .82); backdrop-filter:blur(22px) saturate(1.35); -webkit-backdrop-filter:blur(22px) saturate(1.35); border-top:1px solid hsl(var(--border) / .6);
  }
  .evo-tabbar > a { display:block; text-decoration:none; }
  .evo-tab { display:flex; flex-direction:column; align-items:center; gap:3px; width:100%; min-height:52px; padding:5px 2px; border:0; background:none; border-radius:16px; color:hsl(var(--muted-foreground)); font-size:10.5px; font-weight:600; letter-spacing:.01em; }
  .evo-tab.active { color:hsl(var(--primary)); }
  .evo-tab-icon { position:relative; display:grid; place-items:center; width:52px; height:30px; border-radius:15px; transition:background-color .25s, transform .25s cubic-bezier(.2,.8,.2,1); }
  .evo-tab.active .evo-tab-icon { background:hsl(var(--primary) / .16); }
  .evo-tab:active .evo-tab-icon { transform:scale(.9); }
  .evo-tab-badge { position:absolute; top:-5px; right:3px; min-width:17px; height:17px; padding:0 5px; border-radius:9px; background:hsl(var(--primary)); color:hsl(var(--primary-foreground)); font:700 10px/17px var(--font-sans); font-style:normal; text-align:center; }
  .evo-fab { width:58px; height:58px; margin:-20px 6px 0; display:grid; place-items:center; border:0; border-radius:21px; background:hsl(var(--primary)); color:hsl(var(--primary-foreground)); box-shadow:0 10px 26px hsl(var(--primary) / .38), 0 0 0 5px hsl(var(--background)); transition:transform .22s cubic-bezier(.2,.8,.2,1); }
  .evo-fab:active:not(:disabled) { transform:scale(.9) rotate(90deg); }

  /* Page headings */
  main { scroll-padding-bottom:24px; }
  .evolve-page-heading { margin:12px 14px; padding:12px 14px; gap:10px; }
  main h1 { font-size:21px; }
  .tasks-page { padding-left:14px; padding-right:14px; }

  /* Task rows: full-width titles, swipe right to complete, swipe left for actions. */
  .task-row { position:relative; overflow:hidden; display:flex; align-items:flex-start; gap:10px; padding:14px 14px 14px 12px; border-radius:18px; touch-action:pan-y; min-height:64px; }
  .task-row > div:first-child { display:none; }
  /* Long press on a row reveals the drag handles (reorder mode); the pill or a route change leaves it. */
  body.evo-reorder .task-row > div:first-child.cursor-grab { display:grid; place-items:center; width:40px; height:44px; margin:-10px -2px -10px -12px; opacity:1 !important; border-radius:12px; background:hsl(var(--primary) / .14); }
  body.evo-reorder .task-row > div:first-child.cursor-grab svg { width:20px; height:20px; color:hsl(var(--primary)); }
  body.evo-reorder .task-row { outline:1px dashed hsl(var(--primary) / .45); outline-offset:-1px; }
  .evo-reorder-pill { position:fixed; left:50%; bottom:calc(78px + env(safe-area-inset-bottom,0px)); transform:translateX(-50%); z-index:60; padding:11px 18px; border-radius:999px; font-size:13px; font-weight:700; background:hsl(var(--primary)); color:hsl(var(--primary-foreground)); box-shadow:0 10px 30px hsl(var(--primary) / .4); animation:evo-fade .2s ease-out; }
  /* The tab bar already has the big "+" button. */
  [data-testid="button-add-task-page"], .evo-keys-hint { display:none; }
  .task-row > button[aria-pressed] { flex:none; width:44px; height:44px; margin:-10px -6px -10px -10px; display:grid; place-items:center; }
  .task-row > button[aria-pressed] svg { width:24px; height:24px; }
  .task-row > button[aria-label^="Свернуть"], .task-row > button[aria-label^="Развернуть"] { width:36px; height:36px; margin:-6px -8px -6px -8px; }
  .task-row > div.flex-1 { min-width:0; padding-top:1px; }
  .task-row .text-sm.font-medium { font-size:15.5px; line-height:1.35; }
  .task-row .evolve-task-description { font-size:13px; line-height:1.45; -webkit-line-clamp:2; }
  .task-row > :not(.evo-tray) { transform:translateX(var(--evo-dx,0px)); transition:transform .3s cubic-bezier(.2,.8,.2,1); }
  .task-row[data-swipe] > :not(.evo-tray) { transition:none; }
  .task-row.evo-open { --evo-dx:-140px; }
  .task-row::before { content:"Готово"; position:absolute; inset:0; display:flex; align-items:center; padding-left:20px; font-size:13px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:hsl(var(--primary-foreground)); background:hsl(var(--primary)); opacity:0; transition:opacity .15s; pointer-events:none; }
  .task-row[data-swipe="peek"]::before { opacity:.28; }
  .task-row[data-swipe="done"]::before { opacity:1; }
  .task-row > .evo-tray { position:absolute; top:0; right:0; bottom:0; display:flex; align-items:center; gap:6px; padding:0 10px 0 30px; opacity:0 !important; pointer-events:none; transform:translateX(30px) !important; background:linear-gradient(90deg, transparent, hsl(var(--card)) 34%); transition:opacity .2s, transform .3s cubic-bezier(.2,.8,.2,1); }
  .task-row.evo-open > .evo-tray, .task-row[data-swipe="more"] > .evo-tray { opacity:1 !important; pointer-events:auto; transform:none !important; }
  .evo-tray button { width:44px; height:44px; display:grid; place-items:center; border-radius:14px; background:hsl(var(--secondary)); }
  .evo-tray button svg { width:18px; height:18px; }
  .evolve-inline-add { min-height:56px; border-radius:18px; }

  /* Toolbars: one horizontally scrollable row instead of wrapping buttons. */
  .evolve-task-toolbar { overflow-x:auto; flex-wrap:nowrap; scrollbar-width:none; margin-left:-2px; padding:2px; }
  .evolve-task-toolbar::-webkit-scrollbar { display:none; }
  .evolve-task-toolbar > * { flex-shrink:0; }

  /* Dialogs become bottom sheets; the add-task form stays top-anchored so the keyboard never covers it. */
  [role="dialog"]:not(.add-task-dialog-content) {
    left:0 !important; right:0 !important; top:auto !important; bottom:0 !important; width:100% !important; max-width:100% !important;
    transform:none !important; border-radius:26px 26px 0 0 !important; max-height:92dvh; padding-bottom:calc(20px + env(safe-area-inset-bottom,0px));
    animation:evo-sheet-in .34s cubic-bezier(.2,.9,.25,1) both !important;
  }
  [role="dialog"].add-task-dialog-content[data-state] {
    left:12px !important; right:12px !important; width:auto !important; max-width:none !important; transform:none !important; border-radius:22px !important;
    animation:evo-sheet-down .3s cubic-bezier(.2,.9,.25,1) both !important;
  }
  @keyframes evo-sheet-in { from { translate:0 100%; } to { translate:0 0; } }
  @keyframes evo-sheet-down { from { translate:0 -24px; opacity:0; } to { translate:0 0; opacity:1; } }
  .task-document { max-width:100%; }

  /* Controls sized for thumbs; 16px inputs stop iOS zoom-on-focus. */
  input, textarea, select, [role="combobox"] { font-size:16px; }
  .sidebar-item { min-height:44px; }
  .evolve-sort { width:auto; min-width:164px; flex:none; }
  .task-row .flex.items-center.gap-1\.5 { align-items:flex-start; }
  .task-row .flex.items-center.gap-1\.5 > span.rounded-full { margin-top:.55em; }
  .evolve-settings .flex.items-center.gap-2.pt-2.border-t { flex-wrap:wrap; }
  .evolve-kanban [data-testid^="kanban-col-"] { scroll-snap-align:center; }
  .evolve-board-scroll { scroll-snap-type:x mandatory; }
}
@media(prefers-reduced-motion:reduce) {
  [role="dialog"] { animation:none !important; }
  .task-row > :not(.evo-tray), .evo-tab-icon, .evo-fab { transition:none; }
}

/* ---------- Unused timer leftovers and noisy emoji ---------- */
main span:has(> svg.lucide-timer) { display:none; }
.evolve-kanban [data-testid^="kanban-col-"] > div:first-child > div > span:first-child,
.evolve-kanban .evolve-page-heading h1 > span:first-child { filter:grayscale(1) brightness(1.35); opacity:.85; }
