/* Todos — isolated site. Slate/HPW look. Do not leak into the kiosk. */

body.todos-app {
  --todos-bg: #f8fafc;
  --todos-card: #ffffff;
  --todos-ink: #0f172a;
  --todos-muted: #64748b;
  --todos-line: #e2e8f0;
  --todos-accent: #0f172a;
  --todos-accent-soft: #f1f5f9;
  --todos-danger: #b42318;
  --todos-radius: 12px;
  --todos-shadow: 0 1px 2px rgb(15 23 42 / 0.06);
  background: var(--todos-bg);
  color: var(--todos-ink);
  height: auto;
  min-height: 100%;
  overscroll-behavior: auto;
}

.todos-sr-only,
.todos-app .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.todos-shell {
  width: min(72rem, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.todos-top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgb(255 255 255 / 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--todos-line);
}

.todos-top-inner {
  width: min(72rem, calc(100% - 32px));
  margin: 0 auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
}

.todos-brand {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.025em;
  color: var(--todos-ink);
  text-decoration: none;
  line-height: 1.2;
}

.todos-top-simple .todos-top-inner {
  min-height: 56px;
}

.todos-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--todos-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--todos-shadow);
  cursor: pointer;
}

.todos-menu-bars,
.todos-menu-bars::before,
.todos-menu-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--todos-ink);
  border-radius: 999px;
  position: relative;
}

.todos-menu-bars::before,
.todos-menu-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.todos-menu-bars::before { top: -6px; }
.todos-menu-bars::after { top: 6px; }

.todos-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.todos-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--todos-muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
}

.todos-tab:link,
.todos-tab:visited {
  color: var(--todos-muted);
  background: transparent;
}

.todos-tab.is-active,
.todos-tab.is-active:link,
.todos-tab.is-active:visited {
  background: var(--todos-accent-soft);
  color: var(--todos-ink);
}

.todos-tab-logout {
  color: var(--todos-danger);
}

.todos-app .muted {
  color: var(--todos-muted);
}

.todos-app .page-card,
.todos-card {
  background: var(--todos-card);
  border: 1px solid var(--todos-line);
  border-radius: 16px;
  box-shadow: var(--todos-shadow);
}

.todos-app .page-card {
  padding: 22px;
}

.todos-app .page-head {
  margin-bottom: 4px;
}

.todos-pills {
  display: flex;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 16px;
  padding: 4px;
  border: 1px solid var(--todos-line);
  border-radius: 999px;
  background: var(--todos-accent-soft);
  box-shadow: var(--todos-shadow);
}

.todos-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--todos-muted);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.todos-pill:link,
.todos-pill:visited {
  color: var(--todos-muted);
}

.todos-pill.is-active,
.todos-pill.is-active:link,
.todos-pill.is-active:visited {
  background: #fff;
  color: var(--todos-ink);
  box-shadow: var(--todos-shadow);
}

.todos-pill:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgb(15 23 42 / 0.12);
}

@media (hover: hover) {
  .todos-pill:hover:not(.is-active) {
    color: var(--todos-ink);
  }
}

.todos-app .page-title,
.todos-title {
  margin: 0;
  font-size: clamp(26px, 5vw, 32px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--todos-ink);
}

.todos-lede {
  margin: 8px 0 20px;
  color: var(--todos-muted);
  font-size: 15px;
  line-height: 1.5;
}

.todos-label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #475569;
}

.todos-form,
.todos-field {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.todos-field { min-width: 0; }

.todos-app .form-input,
.todos-app .form-select,
.todos-app .form-textarea {
  min-height: 48px;
  border-radius: 12px;
  border-color: #e2e8f0;
  box-shadow: var(--todos-shadow);
}

.todos-app .form-textarea {
  min-height: 112px;
  resize: vertical;
}

.todos-app .form-input:focus,
.todos-app .form-select:focus {
  outline: none;
  border-color: #cbd5e1;
  box-shadow: 0 0 0 3px rgb(15 23 42 / 0.08);
}

.todos-btn,
.todos-app .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #fff;
  color: var(--todos-ink);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.todos-btn-primary,
.todos-app .btn-primary {
  background: var(--todos-accent);
  color: #fff;
}

.todos-btn-secondary,
.todos-app .btn-secondary {
  border-color: var(--todos-line);
  box-shadow: var(--todos-shadow);
  background: #fff;
  color: var(--todos-ink);
}

.todos-app .btn-ghost {
  background: transparent;
  color: var(--todos-muted);
}

.todos-app .btn-danger {
  background: transparent;
  color: var(--todos-danger);
}

.todos-btn-block { width: 100%; }

.todos-btn:disabled,
.todos-app .btn:disabled,
.todos-app .btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.todos-app .form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.todos-app .form-errors,
.todos-errors {
  padding: 12px 14px;
  border-radius: 12px;
  background: #fef3f2;
  color: var(--todos-danger);
  font-weight: 650;
}

.todos-dash-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.todos-dash-card {
  --todos-dash-wash: #fff;
  --todos-dash-line: var(--todos-line);
  --todos-dash-ink: var(--todos-ink);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 88px;
  padding: 16px;
  border: 1px solid var(--todos-dash-line);
  border-radius: 16px;
  background: var(--todos-dash-wash);
  box-shadow: var(--todos-shadow);
  text-decoration: none;
  color: inherit;
}

.todos-dash-card.is-incomplete {
  --todos-dash-wash: #fff1f2;
  --todos-dash-line: #fda4af;
  --todos-dash-ink: #9f1239;
}

.todos-dash-card.is-today {
  --todos-dash-wash: #fff7ed;
  --todos-dash-line: #fdba74;
  --todos-dash-ink: #9a3412;
}

.todos-dash-card.is-week {
  --todos-dash-wash: #eff6ff;
  --todos-dash-line: #93c5fd;
  --todos-dash-ink: #1e40af;
}

.todos-dash-card.is-upcoming {
  --todos-dash-wash: #f5f3ff;
  --todos-dash-line: #c4b5fd;
  --todos-dash-ink: #5b21b6;
}

.todos-dash-card.is-ideas {
  --todos-dash-wash: #f0fdf4;
  --todos-dash-line: #86efac;
  --todos-dash-ink: #166534;
}

.todos-dash-card.is-follow {
  --todos-dash-wash: #fdf4ff;
  --todos-dash-line: #e9d5ff;
  --todos-dash-ink: #6b21a8;
}

.todos-dash-card.is-places {
  --todos-dash-wash: #f0fdfa;
  --todos-dash-line: #5eead4;
  --todos-dash-ink: #0f766e;
}

.todos-dash-card:active,
.todos-dash-card:focus-visible {
  border-color: var(--todos-dash-ink);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--todos-dash-ink) 18%, transparent);
  outline: none;
}

@media (hover: hover) {
  .todos-dash-card:hover {
    border-color: var(--todos-dash-ink);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--todos-dash-ink) 18%, transparent);
  }

  .todos-tab:hover { background: var(--todos-accent-soft); color: var(--todos-ink); }
  .todos-tab-logout:hover { background: #fef3f2; color: var(--todos-danger); }
}

.todos-dash-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--todos-dash-ink);
}

.todos-progress {
  display: flex;
  align-items: center;
  gap: 12px;
}

.todos-progress-track {
  flex: 1;
  min-width: 0;
  height: 10px;
  border-radius: 999px;
  background: var(--todos-line);
  overflow: hidden;
}

.todos-progress-track.is-empty {
  background: #e2e8f0;
}

.todos-progress-track.is-not-started {
  background: #94a3b8;
}

.todos-progress-track.is-started {
  background: #fde68a;
}

.todos-progress-track.is-done {
  background: #86efac;
}

.todos-progress-fill {
  display: block;
  height: 100%;
  width: var(--todos-progress, 0%);
  border-radius: 999px;
  background: var(--todos-accent);
}

.todos-progress-track.is-not-started .todos-progress-fill {
  background: #64748b;
}

.todos-progress-track.is-started .todos-progress-fill {
  background: #d97706;
}

.todos-progress-track.is-done .todos-progress-fill {
  background: #16a34a;
}

.todos-progress-count {
  flex-shrink: 0;
  min-width: 1.25em;
  color: var(--todos-muted);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.todos-progress.is-not-started .todos-progress-count { color: #475569; }
.todos-progress.is-started .todos-progress-count { color: #b45309; }
.todos-progress.is-done .todos-progress-count { color: #15803d; }

.todos-dash-stat {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.todos-dash-snip {
  margin: 0;
  color: var(--todos-muted);
  font-size: 14px;
  line-height: 1.4;
}

.todos-dash-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.todos-dash-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.todos-dash-list li.is-done .todos-dash-item-title {
  color: var(--todos-muted);
  text-decoration: line-through;
}

.todos-dash-item-title {
  min-width: 0;
  overflow-wrap: anywhere;
}

.todos-dash-when {
  flex-shrink: 0;
  color: var(--todos-dash-ink, var(--todos-ink));
  font-weight: 800;
}

.todos-dash-when.is-overdue {
  color: var(--todos-danger);
}

.todos-plan,
.todos-add,
.todos-event-add {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--todos-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--todos-shadow);
}

.todos-add-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.todos-add-action {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

.todos-add-action .btn {
  width: auto;
  min-width: 3.75rem;
  min-height: 48px;
  padding-inline: 14px;
  flex-shrink: 0;
}

.todos-add-fields-inline {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.todos-add-fields-inline .field:first-child {
  grid-column: 1 / -1;
}

.todos-add-fields-3.todos-add-fields-inline .field:nth-child(-n+2) {
  grid-column: 1 / -1;
}

.todos-add-fields-movies.todos-add-fields-inline {
  grid-template-columns: 5.75rem minmax(0, 1fr) auto;
}

.todos-add-fields-movies.todos-add-fields-inline .field:first-child {
  grid-column: 1 / -1;
}

.todos-add-fields-movies.todos-add-fields-inline .field:nth-child(n+2) {
  grid-column: auto;
}

.todos-plan-actions {
  display: flex;
  justify-content: flex-end;
}

.todos-plan-actions .btn {
  width: auto;
  min-width: 6.5rem;
}

.todos-inline-link {
  color: var(--todos-ink);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.todos-history-jump {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--todos-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--todos-shadow);
}

.todos-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.todos-history-day {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 72px;
  padding: 14px 16px;
  border: 1px solid var(--todos-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--todos-shadow);
  text-decoration: none;
  color: inherit;
}

.todos-history-day:active,
.todos-history-day:focus-visible {
  border-color: #cbd5e1;
  box-shadow: 0 0 0 3px rgb(15 23 42 / 0.08);
  outline: none;
}

@media (hover: hover) {
  .todos-history-day:hover {
    border-color: #cbd5e1;
    box-shadow: 0 0 0 3px rgb(15 23 42 / 0.08);
  }
}

.todos-history-day-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 12px;
}

.todos-history-weekday {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.todos-history-date {
  margin: 0;
  color: var(--todos-muted);
  font-size: 14px;
  font-weight: 600;
}

.todos-history-stat {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.todos-history-snip {
  margin: 0;
  color: var(--todos-muted);
  font-size: 14px;
  line-height: 1.4;
}

.todos-history-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.todos-plan-readonly .todos-plan-body {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
}

.todos-plan-readonly .todos-plan-body p {
  margin: 0 0 0.6em;
}

.todos-plan-readonly .todos-plan-body p:last-child {
  margin-bottom: 0;
}

.todos-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.todos-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--todos-line);
}

.todos-row.is-done .todos-row-title {
  color: var(--todos-muted);
  text-decoration: line-through;
}

.todos-toggle-form { margin: 2px 0 0; }

.todos-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.todos-app .checkbox {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #fff;
}

.todos-app .checkbox.on {
  background: var(--todos-ink);
  border-color: transparent;
}

.todos-row-body {
  flex: 1;
  min-width: 0;
}

.todos-row-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.todos-row-meta {
  margin: 4px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--todos-muted);
  font-size: 13px;
  line-height: 1.35;
}

.todos-row-date.is-overdue { color: var(--todos-danger); font-weight: 700; }

.todos-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex-shrink: 0;
}

.todos-row-btn {
  min-height: 40px;
  padding: 0 12px;
  font-size: 14px;
}

.todos-empty { margin: 8px 0 16px; }

.todos-incomplete {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid #fecdd3;
}

.todos-incomplete-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #9f1239;
}

.todos-done { margin-top: 16px; }

.todos-done-summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: var(--todos-ink);
  padding: 8px 0;
}

.todos-follow-wrap {
  margin-top: 4px;
  overflow-x: auto;
}

.todos-follow-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.todos-follow-table th,
.todos-follow-table td {
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--todos-line);
}

.todos-follow-table thead th {
  font-size: 13px;
  font-weight: 700;
  color: var(--todos-muted);
  letter-spacing: 0.01em;
}

.todos-follow-section.is-category-band,
.todos-follow-item.is-category-band { --follow-category-wash: #eef5fb; --follow-category-ink: #3d5f7a; }
.todos-follow-section.is-category-actor,
.todos-follow-item.is-category-actor { --follow-category-wash: #f8eef3; --follow-category-ink: #7a4a62; }
.todos-follow-section.is-category-author,
.todos-follow-item.is-category-author { --follow-category-wash: #eef6ef; --follow-category-ink: #3f6a4a; }
.todos-follow-section.is-category-director,
.todos-follow-item.is-category-director { --follow-category-wash: #eaf6f3; --follow-category-ink: #2f6b5e; }
.todos-follow-section.is-category-comedian,
.todos-follow-item.is-category-comedian { --follow-category-wash: #f3eef8; --follow-category-ink: #5a4a7a; }
.todos-follow-section.is-category-influencer,
.todos-follow-item.is-category-influencer { --follow-category-wash: #f8f3e8; --follow-category-ink: #6b5a30; }
.todos-follow-section.is-category-podcast,
.todos-follow-item.is-category-podcast { --follow-category-wash: #f8eee8; --follow-category-ink: #7a4e3a; }
.todos-follow-section.is-category-tech-person,
.todos-follow-item.is-category-tech-person { --follow-category-wash: #f6efe8; --follow-category-ink: #6b4e38; }
.todos-follow-section.is-category-sports,
.todos-follow-item.is-category-sports { --follow-category-wash: #f6f0e4; --follow-category-ink: #6b5428; }
.todos-follow-section.is-category-performance,
.todos-follow-item.is-category-performance { --follow-category-wash: #f6ebe4; --follow-category-ink: #6e4a30; }
.todos-follow-section.is-category-theater,
.todos-follow-item.is-category-theater { --follow-category-wash: #e8f2ee; --follow-category-ink: #2f5c4e; }

.todos-follow-section th {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--follow-category-ink);
  background: var(--follow-category-wash);
  border-bottom: 1px solid color-mix(in srgb, var(--follow-category-ink) 14%, var(--todos-line));
}

.todos-follow-item td {
  background: color-mix(in srgb, var(--follow-category-wash) 42%, #fff);
}

.todos-follow-name {
  display: inline-block;
  font-size: 16px;
  font-weight: 700;
  color: var(--todos-ink);
  text-decoration: none;
}

.todos-follow-name:hover,
.todos-follow-name:focus-visible,
.todos-follow-date:hover,
.todos-follow-date:focus-visible {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.todos-follow-notes {
  margin: 4px 0 0;
  color: var(--todos-muted);
  font-size: 13px;
  line-height: 1.35;
}

.todos-follow-date-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.todos-follow-date {
  color: var(--todos-ink);
  font-weight: 600;
  text-decoration: none;
}

.todos-follow-action {
  text-align: right;
  white-space: nowrap;
  width: 1%;
}

.todos-follow-add {
  min-height: 40px;
  padding: 0 12px;
  font-size: 14px;
}

.todos-interest {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: var(--todos-accent-soft);
  color: var(--todos-ink);
}

.todos-interest.is-high,
.todos-interest.is-strong { background: #fde8d0; color: #9a4d00; }
.todos-interest.is-medium { background: #e0f2fe; color: #075985; }
.todos-interest.is-low,
.todos-interest.is-mild { background: #eef1f4; color: #5c6770; }

.todos-form-page { margin-top: 8px; }

.todos-auth {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.todos-auth-card { width: min(420px, 100%); padding: 28px 22px; }

.todos-auth-card .todos-title { margin-bottom: 8px; }

.todos-auth-card .todos-lede {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 15px;
}

.todos-auth-links {
  margin: 4px 0 0;
  text-align: center;
}

.todos-auth-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  color: var(--todos-muted);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.todos-impersonation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--todos-accent-soft);
  border: 1px solid var(--todos-line);
  font-size: 15px;
  font-weight: 600;
}

.todos-impersonation-text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 10px;
  min-width: 0;
}

.todos-impersonation-label { font-weight: 800; }
.todos-impersonation-name { word-break: break-all; }

.todos-flashes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }

.todos-flash {
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 650;
}

.todos-flash-notice { background: #ecfdf3; color: #166534; }
.todos-flash-alert { background: #fef3f2; color: var(--todos-danger); }

.todos-streaks {
  margin: 0 0 20px;
  padding: 14px;
  border: 1px solid var(--todos-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--todos-shadow);
}

.todos-streaks-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.todos-streaks-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.todos-streaks-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 8px;
}

.todos-streak-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.todos-streak-toggle-form {
  margin: 0;
  display: flex;
  justify-content: center;
}

.todos-streak-toggle,
.todos-streak-add {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.todos-streak-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 3px solid #f87171;
  background: #fff;
  color: #f87171;
  box-shadow: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.todos-streak-toggle.is-done .todos-streak-circle {
  background: #fff;
  border-color: #4ade80;
  color: #22c55e;
}

.todos-streak-circle-add {
  background: #fff;
  border: 3px dashed #94a3b8;
  color: #64748b;
  box-shadow: none;
}

.todos-streak-toggle:focus-visible .todos-streak-circle,
.todos-streak-add:focus-visible .todos-streak-circle {
  box-shadow: 0 0 0 3px rgb(15 23 42 / 0.16);
}

.todos-streak-toggle:focus-visible,
.todos-streak-add:focus-visible {
  outline: none;
}

.todos-streak-glyph {
  display: block;
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
}

.todos-streak-circle:has(.todos-streak-count) .todos-streak-glyph {
  width: 26px;
  height: 26px;
}

.todos-streak-count {
  margin-top: 3px;
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.todos-streak-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  max-width: 100%;
  color: var(--todos-ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}

.todos-streak-name:focus-visible {
  outline: none;
  border-radius: 6px;
  box-shadow: 0 0 0 3px rgb(15 23 42 / 0.12);
}

@media (hover: hover) {
  .todos-streak-toggle:hover .todos-streak-circle {
    background: #fff7f7;
    border-color: #ef4444;
    color: #ef4444;
  }

  .todos-streak-toggle.is-done:hover .todos-streak-circle {
    background: #f0fdf4;
    border-color: #22c55e;
    color: #16a34a;
    box-shadow: 0 0 0 3px rgb(74 222 128 / 0.22);
  }

  .todos-streak-add:hover .todos-streak-circle-add {
    border-color: #0f172a;
    color: #0f172a;
  }

  .todos-streak-name:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
  }
}

.todos-streak-icons {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.todos-streak-icon-choice {
  position: relative;
  display: flex;
  justify-content: center;
  cursor: pointer;
}

.todos-streak-icon-choice input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.todos-streak-icon-swatch {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid #e2e8f0;
  background: #f8fafc;
  color: #0f172a;
  box-shadow: var(--todos-shadow);
}

.todos-streak-icon-swatch .todos-streak-glyph {
  width: 24px;
  height: 24px;
}

.todos-streak-icon-choice:has(input:checked) .todos-streak-icon-swatch {
  border-color: #0f172a;
  background: #0f172a;
  color: #fff;
}

.todos-streak-icon-choice:has(input:focus-visible) .todos-streak-icon-swatch {
  box-shadow: 0 0 0 3px rgb(15 23 42 / 0.16);
}

.todos-streak-freq {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.todos-streak-freq-option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--todos-shadow);
  cursor: pointer;
  font-size: 15px;
  font-weight: 650;
}

.todos-streak-freq-option input {
  appearance: none;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin: 0;
  border: 2px solid #94a3b8;
  border-radius: 50%;
  background: #fff;
  box-shadow: none;
}

.todos-streak-freq-option input:checked {
  border-color: #0f172a;
  background: #0f172a;
  box-shadow: inset 0 0 0 3px #fff;
}

.todos-streak-freq-option:has(input:checked) {
  border-color: #0f172a;
  background: #f8fafc;
}

.todos-streak-freq-option:has(input:focus-visible) {
  box-shadow: 0 0 0 3px rgb(15 23 42 / 0.12);
}

.todos-streak-weekdays,
.todos-streak-times {
  display: none;
  margin-top: 12px;
}

.todos-streak-form:has(#streak_frequency_kind_weekdays:checked) .todos-streak-weekdays,
.todos-streak-form:has(#streak_frequency_kind_times_per_week:checked) .todos-streak-times {
  display: block;
}

.todos-streak-hint {
  margin: 0 0 8px;
  color: var(--todos-muted);
  font-size: 13px;
  font-weight: 600;
}

.todos-streak-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.todos-streak-chip {
  position: relative;
  display: inline-flex;
}

.todos-streak-chip input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.todos-streak-chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 14px;
  font-weight: 750;
  box-shadow: var(--todos-shadow);
}

.todos-streak-chip:has(input:checked) span {
  border-color: #0f172a;
  background: #0f172a;
  color: #fff;
}

.todos-streak-chip:has(input:focus-visible) span {
  box-shadow: 0 0 0 3px rgb(15 23 42 / 0.16);
}

@media (min-width: 720px) {
  .todos-streaks-grid {
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  }

  .todos-streak-circle {
    width: 84px;
    height: 84px;
  }

  .todos-streak-icons {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .todos-add-fields {
    grid-template-columns: 1.4fr 1fr;
    align-items: end;
  }

  .todos-add-fields-3 {
    grid-template-columns: 1.3fr 0.9fr 1fr;
  }

  .todos-add-fields-inline {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
  }

  .todos-add-fields-3.todos-add-fields-inline {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr) minmax(0, 1fr) auto;
  }

  .todos-add-fields-movies.todos-add-fields-inline {
    grid-template-columns: minmax(0, 1.4fr) 6.5rem minmax(0, 1fr) auto;
  }

  .todos-add-fields-inline .field:first-child,
  .todos-add-fields-3.todos-add-fields-inline .field:nth-child(-n+2),
  .todos-add-fields-movies.todos-add-fields-inline .field:first-child,
  .todos-add-fields-movies.todos-add-fields-inline .field:nth-child(n+2) {
    grid-column: auto;
  }
}

@media (max-width: 900px) {
  .todos-menu-btn { display: inline-flex; }

  .todos-nav {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    padding: 10px;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    border: 1px solid var(--todos-line);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgb(15 23 42 / 0.08);
  }

  .todos-nav.is-open { display: flex; }

  .todos-tab {
    justify-content: flex-start;
    min-height: 48px;
    border-radius: 12px;
  }
}

@media (max-width: 700px) {
  .todos-dash-grid { grid-template-columns: 1fr; }

  .todos-row {
    flex-wrap: wrap;
  }

  .todos-row-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .todos-row-btn {
    min-height: 44px;
    flex: 1 1 auto;
  }

  .todos-follow-table thead {
    display: none;
  }

  .todos-follow-table tr.todos-follow-section {
    display: block;
    margin: 16px 0 8px;
    border: 0;
    border-radius: 12px;
    overflow: hidden;
    background: transparent;
  }

  .todos-follow-table tr.todos-follow-section:first-child {
    margin-top: 0;
  }

  .todos-follow-table tr.todos-follow-section th {
    display: block;
    padding: 8px 12px;
    border-bottom: 0;
  }

  .todos-follow-table tr.todos-follow-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "name action"
      "dates dates";
    margin-bottom: 10px;
    border: 1.5px solid color-mix(in srgb, var(--follow-category-ink) 12%, var(--todos-line));
    border-radius: 16px;
    background: color-mix(in srgb, var(--follow-category-wash) 48%, #fff);
    overflow: hidden;
  }

  .todos-follow-table tr.todos-follow-item td {
    display: block;
    border-bottom: 0;
    background: transparent;
  }

  .todos-follow-who { grid-area: name; }
  .todos-follow-dates { grid-area: dates; padding-top: 0; }
  .todos-follow-action {
    grid-area: action;
    width: auto;
    padding-left: 8px;
  }

  .todos-follow-add { min-height: 44px; }
}

@media (max-width: 520px) {
  .todos-shell,
  .todos-top-inner { width: min(100% - 24px, 72rem); }

  .todos-pills { width: 100%; }
  .todos-pill { flex: 1; padding-inline: 10px; }

  .todos-streak-circle {
    width: 70px;
    height: 70px;
  }

  .todos-streak-icons {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
