/*
 * Time (/time-monitor). 2026-11 mobile-first rebuild.
 * Written for a 360px phone held in one hand, then widened. Uses the ui.css tokens.
 * Rules: every target is at least 44px, every input is 16px (no iOS zoom),
 * nothing scrolls sideways, the main action lives in the thumb zone.
 */
.tm,
.tm-dock,
.tm-sheet,
.tm-toast {
  --c0: #0ea5e9; --c0-deep: #0369a1; --c0-ink: #7dd3fc;
  --c1: #10b981; --c1-deep: #047857; --c1-ink: #6ee7b7;
  --c2: #8b5cf6; --c2-deep: #6d28d9; --c2-ink: #c4b5fd;
  --c3: #f59e0b; --c3-deep: #b45309; --c3-ink: #fcd34d;
  --c4: #f43f5e; --c4-deep: #be123c; --c4-ink: #fda4af;
  --c5: #06b6d4; --c5-deep: #0e7490; --c5-ink: #67e8f9;
  --c6: #ec4899; --c6-deep: #be185d; --c6-ink: #f9a8d4;
  --c7: #f97316; --c7-deep: #c2410c; --c7-ink: #fdba74;
  --c8: #a855f7; --c8-deep: #7e22ce; --c8-ink: #d8b4fe;
  --c9: #14b8a6; --c9-deep: #0f766e; --c9-ink: #5eead4;
  --c10: #3b82f6; --c10-deep: #1d4ed8; --c10-ink: #93c5fd;
  --c11: #64748b; --c11-deep: #334155; --c11-ink: #cbd5e1;
  --c12: #818cf8; --c12-deep: #4f46e5; --c12-ink: #c7d2fe;
  font-family: var(--ui-font);
  color: var(--ui-ink);
}
.tm-c0 { --c: var(--c0); --c-deep: var(--c0-deep); --c-ink: var(--c0-ink); }
.tm-c1 { --c: var(--c1); --c-deep: var(--c1-deep); --c-ink: var(--c1-ink); }
.tm-c2 { --c: var(--c2); --c-deep: var(--c2-deep); --c-ink: var(--c2-ink); }
.tm-c3 { --c: var(--c3); --c-deep: var(--c3-deep); --c-ink: var(--c3-ink); }
.tm-c4 { --c: var(--c4); --c-deep: var(--c4-deep); --c-ink: var(--c4-ink); }
.tm-c5 { --c: var(--c5); --c-deep: var(--c5-deep); --c-ink: var(--c5-ink); }
.tm-c6 { --c: var(--c6); --c-deep: var(--c6-deep); --c-ink: var(--c6-ink); }
.tm-c7 { --c: var(--c7); --c-deep: var(--c7-deep); --c-ink: var(--c7-ink); }
.tm-c8 { --c: var(--c8); --c-deep: var(--c8-deep); --c-ink: var(--c8-ink); }
.tm-c9 { --c: var(--c9); --c-deep: var(--c9-deep); --c-ink: var(--c9-ink); }
.tm-c10 { --c: var(--c10); --c-deep: var(--c10-deep); --c-ink: var(--c10-ink); }
.tm-c11 { --c: var(--c11); --c-deep: var(--c11-deep); --c-ink: var(--c11-ink); }
.tm-c12 { --c: var(--c12); --c-deep: var(--c12-deep); --c-ink: var(--c12-ink); }

.tm *,
.tm-dock *,
.tm-sheet * { box-sizing: border-box; }

.tm {
  max-width: 640px;
  margin: 0 auto;
  padding: 12px 16px 104px; /* room for the dock */
}
.tm [hidden],
.tm-sheet [hidden],
.tm-sheet[hidden] { display: none !important; }

.tm-visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.tm-muted { color: var(--ui-muted); font-size: 0.92rem; line-height: 1.5; margin: 0 0 12px; }
.tm svg,
.tm-dock svg,
.tm-sheet svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* The floating share button would sit on top of the dock, and this page is personal. */
@media (max-width: 767.98px) {
  body.tm-page #universalMobileShareTrigger { display: none !important; }
}

/* ───────────── Top: title + range ───────────── */
.tm-top { margin-bottom: 12px; }
.tm-top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tm-title { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; margin: 0; color: var(--ui-ink); line-height: 1.2; }
.tm-top-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px;
  color: var(--ui-accent); font-weight: 700; font-size: 0.92rem; text-decoration: none;
}
.tm-top-link:hover { color: #7dd3fc; }

.tm-seg {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  margin-top: 8px; padding: 4px;
  background: var(--ui-surface); border: 1px solid var(--ui-line); border-radius: 999px;
}
.tm-seg-btn {
  min-height: 44px; border: 0; border-radius: 999px; background: transparent;
  color: var(--ui-muted); font: inherit; font-weight: 700; font-size: 0.95rem; cursor: pointer;
}
.tm-seg-btn[aria-selected="true"] { background: var(--ui-accent); color: var(--ui-accent-ink); }

/* ───────────── Inline section jump nav ───────────── */
.tm-inline-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 4px 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.tm-inline-nav::-webkit-scrollbar { display: none; }
.tm-inline-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--ui-line);
  background: var(--ui-surface);
  color: var(--ui-ink);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color 0.15s ease, transform 0.12s ease;
}
.tm-inline-nav-link:hover { border-color: var(--ui-accent); color: var(--ui-ink); }
.tm-inline-nav-link:active { transform: scale(0.98); }
.tm-inline-nav-link:focus-visible { outline: 2px solid var(--ui-accent); outline-offset: 2px; }
.tm-inline-nav-link.is-freedom {
  border-color: rgba(52, 211, 153, 0.48);
  background: rgba(16, 185, 129, 0.14);
  color: #6ee7b7;
}

/* ───────────── Stepper (day, week, month) ───────────── */
.tm-stepper { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; gap: 8px; margin-bottom: 12px; }
.tm-step {
  width: 48px; height: 48px; display: inline-grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--ui-line); background: var(--ui-surface);
  color: var(--ui-ink); cursor: pointer; text-decoration: none; padding: 0;
}
.tm-step:hover { color: var(--ui-ink); border-color: var(--ui-line-strong); }
.tm-step[aria-disabled="true"],
.tm-step:disabled { opacity: 0.35; pointer-events: none; }
.tm-step-label {
  position: relative; min-height: 48px; margin: 0;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 1.02rem; color: var(--ui-ink); text-align: center;
  border-radius: 999px; cursor: pointer;
}
.tm-step-label svg { width: 18px; height: 18px; color: var(--ui-muted); }
.tm-step-static { cursor: default; }
/* The native date control covers the label, so one tap opens the phone's own picker. */
.tm-date-input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer; font-size: 16px; border: 0; padding: 0;
}
.tm-date-input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.tm-step-label:focus-within { outline: 2px solid var(--ui-accent); outline-offset: 2px; }

/* ───────────── Hero ───────────── */
.tm-hero {
  background: linear-gradient(160deg, var(--ui-surface-2), var(--ui-surface));
  border: 1px solid var(--ui-line); border-radius: var(--ui-radius);
  padding: 18px 16px; margin-bottom: 12px;
}
.tm-hero.is-due { border-color: var(--ui-accent); box-shadow: 0 0 0 3px var(--ui-accent-soft); }
.tm-hero-kicker { margin: 0 0 4px; color: var(--ui-muted); font-size: 0.88rem; font-weight: 600; min-height: 1.3em; }
.tm-hero.is-due .tm-hero-kicker { color: var(--ui-accent); }
.tm-hero-title { margin: 0 0 14px; font-size: 1.45rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; color: var(--ui-ink); text-wrap: balance; }
.tm-progress { position: relative; height: 10px; border-radius: 999px; background: rgba(148, 163, 184, 0.18); overflow: visible; margin-bottom: 20px; }
.tm-progress-fill { position: relative; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--ui-accent), #34d399); transition: width 0.55s var(--ease, cubic-bezier(0.16, 1, 0.3, 1)); overflow: hidden; }
.tm-progress-fill::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.38), transparent); transform: translateX(-100%); animation: tmSheen 2.4s ease-in-out infinite; }
.tm-progress.is-milestone .tm-progress-fill { animation: tmMilestonePulse 0.65s var(--ease, cubic-bezier(0.16, 1, 0.3, 1)); }
.tm-progress-tick { position: absolute; top: 0; bottom: 0; width: 1.5px; background: rgba(255, 255, 255, 0.32); pointer-events: none; }
.tm-progress-tick i { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: var(--text-xs, 0.75rem); font-weight: 600; color: var(--ui-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
@keyframes tmSheen { 0% { transform: translateX(-100%); } 55%, 100% { transform: translateX(120%); } }
@keyframes tmMilestonePulse { 0% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.6); } 100% { box-shadow: 0 0 0 10px rgba(56, 189, 248, 0); } }
.tm-hero-sub { margin: 8px 0 0; color: var(--ui-muted); font-size: 0.9rem; }
.tm-cta.tm-cta-inline { display: none; margin-top: 16px; }

/* ───────────── Buttons ───────────── */
.tm-cta {
  width: 100%; min-height: 54px; padding: 0 20px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; background: var(--ui-accent); color: var(--ui-accent-ink);
  font: inherit; font-weight: 800; font-size: 1.05rem; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.tm-cta:hover { background: #7dd3fc; }
.tm-cta:active { transform: scale(0.985); }
.tm-cta svg { stroke-width: 2.6; }
.tm-btn {
  min-height: 48px; padding: 0 18px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; border: 1px solid var(--ui-line-strong); background: transparent;
  color: var(--ui-ink); font: inherit; font-weight: 700; font-size: 0.95rem;
  text-decoration: none; cursor: pointer; touch-action: manipulation;
}
.tm-btn:hover { color: var(--ui-ink); background: rgba(255, 255, 255, 0.05); }
.tm-btn-accent { background: var(--ui-accent); border-color: var(--ui-accent); color: var(--ui-accent-ink); }
.tm-btn-accent:hover { background: #7dd3fc; color: var(--ui-accent-ink); }
.tm-btn-danger { color: #fca5a5; border-color: rgba(248, 113, 113, 0.45); }
.tm-btn-danger:hover { color: #fecaca; background: rgba(248, 113, 113, 0.1); }
.tm-btn-danger-solid { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.tm-btn-danger-solid:hover { background: #991b1b; color: #fff; }
.tm-link-btn {
  min-height: 44px; padding: 0 2px; border: 0; background: none;
  display: inline-flex; align-items: center;
  color: var(--ui-accent); font: inherit; font-weight: 700; font-size: 0.92rem;
  text-decoration: none; cursor: pointer;
}
.tm-link-btn:hover { color: #7dd3fc; }
.tm-icon-btn {
  width: 44px; height: 44px; flex-shrink: 0; display: inline-grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--ui-line); background: rgba(255, 255, 255, 0.04);
  color: var(--ui-ink); cursor: pointer; padding: 0;
}
.tm-icon-btn svg { width: 20px; height: 20px; }
.tm-actions { display: flex; flex-direction: column; gap: 10px; }
.tm-actions form { margin: 0; display: flex; flex-direction: column; gap: 10px; }

.tm :focus-visible,
.tm-dock :focus-visible,
.tm-sheet :focus-visible { outline: 2px solid var(--ui-accent); outline-offset: 2px; }

/* ───────────── Cards ───────────── */
.tm-card {
  background: var(--ui-surface); border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius); padding: 16px; margin-bottom: 12px;
}
.tm-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; min-height: 44px; }
.tm-h2 { font-size: 1.08rem; font-weight: 800; letter-spacing: -0.01em; margin: 0; color: var(--ui-ink); line-height: 1.3; }
.tm-card > .tm-h2 { margin-bottom: 12px; }
.tm-h2-spaced { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--ui-line); }
.tm-count { color: var(--ui-muted); font-size: 0.88rem; font-weight: 600; text-align: right; }
.tm-note { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 0; color: var(--ui-muted); font-size: 0.86rem; line-height: 1.45; }
.tm-swatch-est { width: 18px; height: 12px; margin-top: 4px; border-radius: 3px; flex-shrink: 0; background: var(--c1); opacity: 0.3; }
.tm-estimate-banner {
  padding: 12px 14px;
  border-radius: var(--ui-radius-sm, 10px);
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.22);
}
.tm-estimate-banner-body strong {
  display: block;
  color: var(--ui-ink);
  font-size: 0.88rem;
  margin-bottom: 2px;
}
.tm-day-proj-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #7dd3fc;
  vertical-align: middle;
}
.tm-save-state { min-height: 1.3em; margin: 8px 0 0; font-size: 0.86rem; font-weight: 600; color: var(--ui-go); }
.tm-save-state.is-error { color: var(--ui-stop); }

/* ───────────── Day bar (Living Day Horizon) ───────────── */
.tm-daybar-cues { display: flex; justify-content: space-between; margin-bottom: var(--space-1, 4px); color: var(--ui-muted); font-size: var(--text-xs, 0.75rem); font-weight: 600; letter-spacing: 0.02em; }
.tm-daybar-wrap { position: relative; padding-top: var(--space-2, 8px); }
.tm-daybar { display: flex; height: 48px; border-radius: var(--radius-md, 12px); overflow: hidden; background: rgba(148, 163, 184, 0.12); touch-action: pan-y; cursor: ew-resize; user-select: none; }
.tm-seg-block { flex: 1 1 0; min-width: 0; background: var(--c); transform-origin: bottom; }
.tm-seg-block.is-wave { animation: tmDayWave 0.35s var(--ease, cubic-bezier(0.16, 1, 0.3, 1)) both; }
.tm-seg-block.is-est { opacity: 0.3; }
.tm-seg-block.is-edge { box-shadow: inset 2px 0 0 var(--ui-surface); }
.tm-now { position: absolute; top: 2px; bottom: -4px; width: 2px; margin-left: -1px; background: #fff; border-radius: 2px; pointer-events: none; z-index: 2; }
.tm-now::before { content: ''; position: absolute; top: -3px; left: -4px; width: 10px; height: 10px; border-radius: 50%; background: #fff; animation: tmNowPulse 2.2s ease-in-out infinite; }
.tm-daybar-scrubber { position: absolute; top: -32px; transform: translateX(-50%); padding: 4px 10px; border-radius: 999px; background: rgba(15, 23, 42, 0.94); border: 1px solid rgba(148, 163, 184, 0.35); color: #f8fafc; font-size: var(--text-xs, 0.75rem); font-weight: 700; white-space: nowrap; pointer-events: none; z-index: 5; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); }
.tm-daybar-scrubber[hidden] { display: none; }
@keyframes tmDayWave { from { opacity: 0; transform: scaleY(0.4); } to { opacity: 1; transform: scaleY(1); } }
@keyframes tmNowPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.55); } 50% { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0); } }
.tm-axis { display: flex; justify-content: space-between; margin-top: 6px; color: var(--ui-muted); font-size: 0.75rem; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ───────────── Block editor ───────────── */
.tm-editor { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--ui-line); }
.tm-paint { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 12px; }
.tm-paint-btn {
  min-height: 48px; padding: 4px 2px; border-radius: 12px; cursor: pointer;
  border: 2px solid transparent; background: var(--c-deep); color: #fff;
  font: inherit; font-size: 0.78rem; font-weight: 700;
}
.tm-paint-btn[aria-checked="true"] { border-color: #fff; box-shadow: 0 0 0 2px var(--c); }
.tm-slots { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.tm-slot {
  min-height: 44px; padding: 0; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--c-deep); color: #fff;
  font: inherit; font-size: 0.78rem; font-weight: 700; font-variant-numeric: tabular-nums;
  touch-action: manipulation;
}
.tm-slot.is-est { background: transparent; box-shadow: inset 0 0 0 2px var(--c-deep); color: var(--c-ink); }

/* ───────────── Totals ───────────── */
.tm-totals { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
.tm-card > .tm-totals:first-of-type { margin-top: 16px; }
.tm-total { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: baseline; }
.tm-total-name { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.95rem; min-width: 0; }
.tm-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex-shrink: 0; }
.tm-total-value { display: flex; flex-direction: column; align-items: flex-end; font-weight: 800; font-size: 0.95rem; font-variant-numeric: tabular-nums; color: var(--c-ink); text-align: right; }
.tm-total-val-row { display: flex; align-items: baseline; gap: 6px; }
.tm-total-num { font-weight: 800; font-size: 0.95rem; }
.tm-total-sub { color: var(--ui-muted); font-weight: 600; font-size: 0.82rem; }
.tm-total-breakdown { display: inline-flex; align-items: center; gap: 4px; font-size: 0.74rem; font-weight: 600; line-height: 1.25; margin-top: 2px; }
.tm-tag-logged { color: #38bdf8; }
.tm-tag-sep { color: var(--ui-muted); font-weight: 400; }
.tm-tag-est { color: #94a3b8; opacity: 0.88; }
.tm-track { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: rgba(148, 163, 184, 0.14); overflow: hidden; display: flex; }
.tm-track-fill { display: block; height: 100%; width: 0; background: var(--c); transition: width 0.55s var(--ease, cubic-bezier(0.16, 1, 0.3, 1)); }
.tm-track-fill.tm-track-conf { border-radius: 999px 0 0 999px; }
.tm-track-fill.tm-track-est {
  opacity: 0.45;
  border-radius: 0 999px 999px 0;
  background-image: repeating-linear-gradient(
    -45deg,
    var(--c),
    var(--c) 4px,
    rgba(255, 255, 255, 0.22) 4px,
    rgba(255, 255, 255, 0.22) 8px
  );
}
.tm-totals.is-revealed .tm-track-fill { width: var(--tm-fill-w, 0%); }

.tm-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.tm-stat { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--ui-line); border-radius: var(--ui-radius-sm); padding: 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tm-stat-label { color: var(--ui-muted); font-size: 0.8rem; font-weight: 700; }
.tm-stat-value { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--ui-ink); }
.tm-stat-hint { color: var(--ui-muted); font-size: 0.8rem; line-height: 1.35; }
.tm-stat.is-good .tm-stat-value { color: var(--ui-go); }
.tm-stat.is-low .tm-stat-value { color: var(--ui-warn); }

/* ───────────── Check-in list ───────────── */
.tm-entries { list-style: none; margin: 0; padding: 0; }
.tm-entry { display: grid; grid-template-columns: 4px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--ui-line); }
.tm-entry:first-child { border-top: 0; padding-top: 0; }
.tm-entry:last-child { padding-bottom: 0; }
.tm-entry-bar { align-self: stretch; border-radius: 4px; background: var(--c); }
.tm-entry-body { min-width: 0; }
.tm-entry-title { font-weight: 700; font-size: 1rem; overflow-wrap: anywhere; }
.tm-entry-meta { color: var(--ui-muted); font-size: 0.86rem; margin-top: 2px; font-variant-numeric: tabular-nums; }
.tm-entry-del { color: var(--ui-muted); border-color: transparent; background: transparent; }
.tm-entry-del:hover { color: #fca5a5; }
.tm-entry-confirm { grid-column: 2 / -1; display: flex; gap: 8px; }
.tm-entry-confirm .tm-btn { flex: 1; min-height: 44px; padding: 0 12px; }
.tm-empty { margin: 0; padding: 8px 0 4px; color: var(--ui-muted); font-size: 0.95rem; line-height: 1.5; }

/* ───────────── Insights ───────────── */
.tm-insights { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tm-insight { padding: 12px 14px; border-radius: var(--ui-radius-sm); background: rgba(255, 255, 255, 0.03); border-left: 3px solid var(--ui-accent); }
.tm-insight.is-success { border-left-color: var(--ui-go); }
.tm-insight.is-warning { border-left-color: var(--ui-warn); }
.tm-insight strong { display: block; font-size: 0.95rem; font-weight: 700; color: var(--ui-ink); }
.tm-insight p { margin: 4px 0 0; color: var(--ui-muted); font-size: 0.9rem; line-height: 1.5; }
.tm-unlock { display: flex; align-items: center; gap: 14px; }
.tm-unlock-dots { display: flex; gap: 6px; flex-shrink: 0; }
.tm-unlock-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ui-line-strong); }
.tm-unlock-dots i.is-on { background: var(--ui-accent); border-color: var(--ui-accent); }
.tm-unlock p { margin: 0; color: var(--ui-muted); font-size: 0.92rem; line-height: 1.45; }

/* ───────────── Fold (private note) ───────────── */
.tm-fold > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; cursor: pointer; }
.tm-fold > summary::-webkit-details-marker { display: none; }
.tm-fold-hint { color: var(--ui-muted); font-size: 0.86rem; font-weight: 600; }
.tm-textarea {
  width: 100%; margin-top: 12px; padding: 12px; border-radius: var(--ui-radius-sm);
  border: 1px solid var(--ui-line-strong); background: var(--ui-bg-deep); color: var(--ui-ink);
  font: inherit; font-size: 16px; line-height: 1.5; resize: vertical;
}
.tm-textarea::placeholder { color: #7c8aa3; }

/* ───────────── Week ───────────── */
.tm-legend { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--ui-muted); font-size: 0.82rem; font-weight: 600; }
.tm-legend li { display: inline-flex; align-items: center; gap: 6px; }

.tm-plan { list-style: none; margin: 0; padding: 0; }
.tm-plan-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--ui-line); }
.tm-plan-row:first-child { border-top: 0; padding-top: 0; }
.tm-plan-name { font-weight: 700; font-size: 0.95rem; }
.tm-plan-meta { grid-column: 1; color: var(--ui-muted); font-size: 0.84rem; font-variant-numeric: tabular-nums; }
.tm-pill { grid-row: 1 / span 2; grid-column: 2; padding: 6px 10px; border-radius: 999px; font-size: 0.82rem; font-weight: 800; font-variant-numeric: tabular-nums; background: rgba(148, 163, 184, 0.14); color: var(--ui-ink); white-space: nowrap; }
.tm-pill.is-over { background: rgba(251, 191, 36, 0.16); color: var(--ui-warn); }
.tm-pill.is-under { background: var(--ui-accent-soft); color: var(--ui-accent); }
.tm-pill.is-short { background: rgba(248, 113, 113, 0.16); color: #fca5a5; }
.tm-pill.is-even { background: rgba(52, 211, 153, 0.14); color: var(--ui-go); }
.tm-alert { margin: 12px 0 0; padding: 12px 14px; border-radius: var(--ui-radius-sm); background: rgba(248, 113, 113, 0.1); border: 1px solid rgba(248, 113, 113, 0.35); color: #fecaca; font-size: 0.9rem; line-height: 1.5; }

/* ───────────── Month ───────────── */
.tm-stack { display: flex; height: 16px; border-radius: 999px; overflow: hidden; background: rgba(148, 163, 184, 0.1); }
.tm-stack span { background: var(--c); }

/* ───────────── Ring chart (shared with /time-tracker) ───────────── */
.tm-ringrow { display: grid; gap: 16px; margin-top: 18px; align-items: center; }
.tm-ringrow .tm-totals { margin-top: 0; }
.tm-ring { position: relative; width: 184px; max-width: 60%; aspect-ratio: 1; margin: 0 auto; }
.tm .tm-ring svg,
.tm.tm-ring svg { width: 100%; height: 100%; display: block; fill: none; stroke-width: 13; stroke-linecap: round; }
.tm-ring-track { stroke: rgba(148, 163, 184, 0.14); }
.tm-ring-arc { stroke: var(--c); transition: stroke-dasharray 0.55s var(--ease, cubic-bezier(0.16, 1, 0.3, 1)), stroke-dashoffset 0.55s var(--ease, cubic-bezier(0.16, 1, 0.3, 1)), opacity 0.25s ease; }
.tm-ring-arcs { transform: rotate(-90deg); transform-origin: 50px 50px; }
.tm-ring-arcs.is-first { animation: tmRingIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes tmRingIn { from { transform: rotate(-220deg); opacity: 0; } to { transform: rotate(-90deg); opacity: 1; } }
.tm-ring-centre { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; }
.tm-ring-centre strong { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--ui-ink); }
.tm-ring-centre span { margin-top: 2px; color: var(--ui-muted); font-size: 0.78rem; font-weight: 600; }
.tm-ring.is-over .tm-ring-centre strong { color: var(--ui-stop); }
.tm-ring.is-under .tm-ring-centre strong { color: var(--ui-warn); }

/* ───────────── Stacked bar chart with axis (shared) ───────────── */
.tm-chart { padding-top: 8px; }
.tm-chart-top { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 6px; height: 184px; }
.tm-chart-axis, .tm-chart-plot { position: relative; }
.tm-chart-axis span { position: absolute; right: 0; transform: translateY(-50%); color: var(--ui-muted); font-size: 0.68rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tm-chart-line { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--ui-line); }
.tm-chart-line.is-base { border-top: 1px solid var(--ui-line-strong); }
.tm-chart-target-line { position: absolute; left: 0; right: 0; border-top: 1.5px dashed rgba(14, 165, 233, 0.55); pointer-events: none; z-index: 1; }
.tm-chart-target-tag { position: absolute; right: 4px; top: -18px; font-size: 0.65rem; font-weight: 700; color: #38bdf8; background: rgba(15, 23, 42, 0.78); padding: 1px 6px; border-radius: 999px; white-space: nowrap; }
.tm-chart-popover { position: absolute; top: 6px; transform: translateX(-50%); min-width: 170px; max-width: 230px; padding: 8px 10px; border-radius: var(--radius-md, 12px); background: rgba(15, 23, 42, 0.94); border: 1px solid rgba(148, 163, 184, 0.3); color: #f8fafc; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.42); backdrop-filter: blur(8px); pointer-events: none; z-index: 6; font-size: var(--text-xs, 0.75rem); }
.tm-chart-popover[hidden] { display: none; }
.tm-chart-popover-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-bottom: 4px; margin-bottom: 4px; border-bottom: 1px solid rgba(148, 163, 184, 0.22); font-weight: 700; }
.tm-chart-popover-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.tm-chart-popover-list li { display: flex; align-items: center; gap: 6px; }
.tm-chart-popover-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #cbd5e1; }
.tm-chart-popover-val { font-weight: 700; font-variant-numeric: tabular-nums; color: #f8fafc; }
.tm-chart-cols { position: absolute; inset: 0; display: grid; gap: 6px; padding: 0 2px; }
.tm-chart-col { height: 100%; display: flex; align-items: flex-end; justify-content: center; text-decoration: none; border-radius: 6px; }
.tm-chart-stack { width: 100%; max-width: 64px; height: 100%; display: flex; flex-direction: column-reverse; transform-origin: bottom; }
.tm-chart-stack span { flex-shrink: 0; background: var(--c); }
.tm-chart-stack span:last-child { border-radius: 6px 6px 0 0; }
.tm-chart-col.is-empty .tm-chart-stack { border: 1.5px dashed var(--ui-line-strong); border-bottom: 0; border-radius: 6px 6px 0 0; opacity: 0.55; }
a.tm-chart-col:hover .tm-chart-stack { filter: brightness(1.12); }
.tm-chart-names { display: grid; gap: 6px; padding: 0 2px; margin: 8px 0 0 38px; }
.tm-chart-name { text-align: center; color: var(--ui-muted); font-size: 0.74rem; font-weight: 700; line-height: 1.25; min-width: 0; }
.tm-chart-name b { display: block; color: var(--ui-ink); font-size: 0.9rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.tm-chart-name.is-today, .tm-chart-name.is-today b { color: var(--ui-accent); }
@media (prefers-reduced-motion: no-preference) {
  .tm-chart-stack { animation: tmBarGrow 0.55s cubic-bezier(0.22, 1, 0.36, 1) both; }
}
@keyframes tmBarGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@media (min-width: 560px) {
  .tm-ringrow { grid-template-columns: 184px minmax(0, 1fr); gap: 24px; }
  .tm-ring { max-width: none; }
  .tm-chart-top { height: 220px; }
}
@media (prefers-reduced-motion: reduce) { .tm-ring-arcs.is-first { animation: none; } }

/* ───────────── Segmented radio choice ───────────── */
.tm-choice { display: grid; gap: 6px; }
.tm-choice-4 { grid-template-columns: repeat(4, 1fr); }
.tm-choice-item { position: relative; margin: 0; cursor: pointer; }
.tm-choice-item input,
.tm-chip input,
.tm-tile input,
.tm-energy-item input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tm-choice-item span {
  min-height: 48px; display: flex; align-items: center; justify-content: center; text-align: center;
  border-radius: var(--ui-radius-sm); border: 1px solid var(--ui-line-strong);
  font-weight: 700; font-size: 0.9rem; color: var(--ui-ink);
}
.tm-choice-item input:checked + span { background: var(--ui-accent); border-color: var(--ui-accent); color: var(--ui-accent-ink); }
.tm-choice-item input:focus-visible + span,
.tm-chip input:focus-visible + span,
.tm-tile input:focus-visible + .tm-tile-face,
.tm-energy-item input:focus-visible + .tm-energy-face { outline: 2px solid var(--ui-accent); outline-offset: 2px; }

/* ───────────── Dock (phones) ───────────── */
.tm-dock {
  position: fixed; left: 0; right: 0; z-index: 1020;
  bottom: calc(var(--ui-tab-h) + env(safe-area-inset-bottom, 0px));
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: transform;
  padding: 20px 16px 12px;
  background: linear-gradient(to bottom, rgba(11, 19, 43, 0), var(--ui-bg) 42%);
  pointer-events: none;
}
.tm-dock .tm-cta { pointer-events: auto; max-width: 608px; margin: 0 auto; display: flex; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); }
.tm-dock.is-due .tm-cta { animation: tmNudge 1.6s ease-in-out 2; }
@keyframes tmNudge {
  0%, 100% { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 0 0 rgba(56, 189, 248, 0.55); }
  50% { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 0 12px rgba(56, 189, 248, 0); }
}

/* ───────────── Check-in sheet ───────────── */
.tm-sheet { position: fixed; inset: 0; z-index: 1060; display: flex; align-items: flex-end; justify-content: center; }
.tm-sheet-backdrop { position: absolute; inset: 0; background: rgba(3, 8, 20, 0.72); opacity: 0; transition: opacity 0.22s ease; }
.tm-sheet-panel {
  position: relative; width: 100%; max-width: 560px;
  max-height: 94vh; max-height: min(94dvh, 820px);
  display: flex; flex-direction: column;
  background: var(--ui-surface); border: 1px solid var(--ui-line-strong); border-bottom: 0;
  border-radius: 22px 22px 0 0; box-shadow: 0 -18px 48px rgba(0, 0, 0, 0.55);
  transform: translateY(100%); transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  outline: none; will-change: transform;
}
.tm-sheet.is-open .tm-sheet-backdrop { opacity: 1; }
.tm-sheet.is-open .tm-sheet-panel { transform: translateY(0); }
.tm-sheet-panel.is-dragging { transition: none; }
.tm-sheet-grip { padding: 8px 16px 4px; touch-action: none; flex-shrink: 0; }
.tm-sheet-handle { display: block; width: 40px; height: 5px; margin: 0 auto 6px; border-radius: 999px; background: var(--ui-line-strong); }
.tm-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tm-sheet-title { margin: 0; font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; color: var(--ui-ink); }
.tm-sheet-form { display: flex; flex-direction: column; min-height: 0; margin: 0; }
.tm-sheet-body { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 8px 16px 8px; min-height: 0; }
.tm-sheet-foot {
  flex-shrink: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--ui-line); background: var(--ui-surface);
  display: flex; flex-direction: column; align-items: stretch;
}
.tm-sheet-status { margin: 0; font-size: 0.9rem; font-weight: 600; color: var(--ui-stop); }
.tm-sheet-status:not(:empty) { margin-bottom: 8px; }
.tm-overlap-box {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--ui-radius-sm);
  border: 1px solid rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.12);
  color: var(--ui-ink);
  font-size: 0.88rem;
  line-height: 1.45;
}
.tm-overlap-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  min-height: 44px;
  font-weight: 700;
  cursor: pointer;
}
.tm-overlap-check input { width: 20px; height: 20px; accent-color: var(--ui-accent); flex-shrink: 0; }
.tm-chip-more {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px dashed var(--ui-line-strong);
  background: transparent;
  color: var(--ui-accent);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.tm-snooze { justify-content: center; color: var(--ui-muted); font-weight: 600; margin-top: 2px; }
.tm-snooze:hover { color: var(--ui-ink); }

.tm-field { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
.tm-field legend {
  float: none; width: auto; padding: 0; margin: 0 0 10px;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 1.05rem; font-weight: 800; letter-spacing: -0.015em;
  color: var(--ui-ink, #f8fafc);
}
.tm-field legend::before {
  content: ""; width: 4px; height: 16px; border-radius: 999px;
  background: linear-gradient(180deg, #38bdf8 0%, #6366f1 100%);
  flex-shrink: 0;
}

.tm-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tm-tile { position: relative; margin: 0; cursor: pointer; }
.tm-tile-face {
  min-height: 68px; padding: 8px 2px; border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border: 2px solid var(--ui-line); background: rgba(255, 255, 255, 0.03);
  color: var(--ui-ink); font-size: 0.76rem; font-weight: 700; text-align: center;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}
.tm-tile-face i { font-size: 1.15rem; color: var(--c-ink); }
.tm-tile input:checked + .tm-tile-face { background: var(--c-deep); border-color: var(--c); color: #fff; }
.tm-tile input:checked + .tm-tile-face i { color: #fff; }

.tm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tm-chip { position: relative; margin: 0; cursor: pointer; }
.tm-chip span {
  min-height: 44px; padding: 0 14px; border-radius: 999px;
  display: inline-flex; align-items: center;
  border: 1.5px solid var(--ui-line-strong); background: transparent;
  color: var(--ui-ink); font-size: 0.92rem; font-weight: 600; white-space: nowrap;
}
.tm-chip input:checked + span { background: var(--c-deep, var(--ui-accent)); border-color: var(--c, var(--ui-accent)); color: #fff; font-weight: 700; }
#tmSpans .tm-chip input:checked + span,
#tmDayParts .tm-chip input:checked + span { background: var(--ui-accent); border-color: var(--ui-accent); color: var(--ui-accent-ink); }

.tm-dayparts { margin-top: 8px; }
.tm-daypart-suggest {
  margin-top: 12px; padding: 14px; border-radius: 14px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08) 0%, rgba(99, 102, 241, 0.05) 100%);
}
.tm-daypart-label {
  margin: 0 0 10px; display: flex; align-items: center; gap: 8px;
  font-size: 0.92rem; font-weight: 800; letter-spacing: -0.01em;
  color: var(--ui-ink, #f8fafc); line-height: 1.35;
}
.tm-daypart-label::before {
  content: ""; width: 8px; height: 8px; border-radius: 999px;
  background: #38bdf8; box-shadow: 0 0 8px rgba(56, 189, 248, 0.7);
  flex-shrink: 0;
}
.tm-suggest-btn {
  min-height: 44px; padding: 0 14px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--ui-line-strong); background: transparent;
  color: var(--ui-ink); font: inherit; font-size: 0.88rem; font-weight: 600;
  white-space: nowrap; flex-shrink: 0; cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease, transform 0.1s ease;
}
.tm-suggest-btn:active { transform: scale(0.98); }
.tm-suggest-btn:focus-visible { outline: 2px solid var(--ui-accent); outline-offset: 2px; }
.tm-suggest-btn.is-active {
  background: var(--c-deep, var(--ui-accent)); border-color: var(--c, var(--ui-accent));
  color: #fff; font-weight: 700;
}
.tm-suggest-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: var(--c, var(--ui-accent));
}
.tm-suggest-btn.is-active .tm-suggest-dot { background: #fff; }
.tm-suggest-conf {
  font-size: var(--text-xs, 0.75rem); font-weight: 700; opacity: 0.85;
  padding: 2px 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.1);
}

.tm-gap-card { border-color: var(--ui-line-strong); }
.tm-gap-sub { margin: 4px 0 0; font-size: var(--text-sm, 0.875rem); }
.tm-gap-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 28px; padding: 0 10px; border-radius: 999px;
  background: var(--ui-accent-soft); color: var(--ui-accent);
  font-size: var(--text-xs, 0.75rem); font-weight: 800; white-space: nowrap; flex-shrink: 0;
}
.tm-gap-list { display: flex; flex-direction: column; gap: var(--space-3, 12px); margin-top: var(--space-2, 8px); }
.tm-gap-item {
  padding: var(--space-3, 12px); border-radius: var(--radius-md, 14px);
  border: 1px solid var(--ui-line); background: rgba(255, 255, 255, 0.025);
  display: flex; flex-direction: column; gap: var(--space-2, 8px);
}
.tm-gap-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-2, 8px); flex-wrap: wrap;
}
.tm-gap-time {
  font-size: var(--text-base, 1rem); font-weight: 800; color: var(--ui-ink);
  font-variant-numeric: tabular-nums;
}
.tm-gap-dur {
  font-size: var(--text-sm, 0.875rem); font-weight: 600; color: var(--ui-muted); margin-left: 6px;
}
.tm-gap-fill-btn {
  min-height: 44px; min-width: 44px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--ui-accent); background: var(--ui-accent-soft);
  color: var(--ui-accent); font: inherit; font-size: var(--text-sm, 0.875rem); font-weight: 700;
  white-space: nowrap; flex-shrink: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.tm-gap-fill-btn:active { transform: scale(0.98); }
.tm-gap-fill-btn:focus-visible { outline: 2px solid var(--ui-accent); outline-offset: 2px; }
.tm-gap-chips { display: flex; flex-wrap: wrap; gap: var(--space-2, 8px); }
.tm-gap-reason {
  margin: 0; font-size: var(--text-xs, 0.75rem); color: var(--ui-muted); font-weight: 600;
}
.tm-gap-empty {
  margin: 0; padding: var(--space-2, 8px) 0; color: var(--ui-muted);
  font-size: var(--text-sm, 0.875rem); font-weight: 600;
}
.tm-page .pwa-banner {
  background: var(--ui-surface); color: var(--ui-ink); border-color: var(--ui-line-strong);
}
.tm-page .pwa-title,
.tm-page .pwa-desc {
  color: var(--ui-ink);
}

.tm-custom { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.tm-time {
  display: flex; flex-direction: column; gap: 6px; margin: 0;
  color: var(--ui-ink, #f8fafc); font-size: 0.92rem; font-weight: 800;
  letter-spacing: 0.01em; min-width: 0;
}
.tm-time input {
  box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0;
  min-height: 48px; padding: 0 12px; border-radius: var(--ui-radius-sm);
  border: 1px solid var(--ui-line-strong); background: var(--ui-bg-deep); color: var(--ui-ink);
  font: inherit; font-size: 16px; font-weight: 700; color-scheme: dark;
}
.tm-when { margin: 10px 0 0; min-height: 1.4em; color: var(--ui-muted); font-size: 0.92rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.tm-when b { color: var(--ui-ink); font-weight: 800; }
.tm-when-banner {
  margin: 0 0 10px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.08);
  color: var(--ui-ink);
  font-size: 0.96rem;
}
.tm-daypart-suggest-top {
  margin-top: 0;
  margin-bottom: 12px;
}
.tm-split-trigger-wrap {
  margin-top: 14px;
}
.tm-split-toggle-btn {
  min-height: 44px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fef3c7;
  background: rgba(245, 158, 11, 0.16);
  border: 1.5px solid #fbbf24;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.15);
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.tm-split-toggle-btn:hover {
  color: #ffffff;
  background: rgba(245, 158, 11, 0.28);
  border-color: #fcd34d;
}
.tm-split-toggle-btn:active {
  transform: scale(0.98);
}
.tm-split-toggle-btn[aria-expanded="true"] {
  background: #b45309;
  border-color: #fbbf24;
  color: #ffffff;
}
.tm-split-box {
  margin-top: 10px;
  padding: 14px;
  border-radius: 12px;
  border: 1.5px solid rgba(56, 189, 248, 0.45);
  background: rgba(15, 23, 42, 0.72);
}
.tm-split-intro {
  margin: 0 0 10px;
  font-size: 0.84rem;
  color: #cbd5e1;
}
.tm-split-grid {
  display: grid;
  gap: 10px;
}
.tm-split-activity-input {
  background: var(--ui-bg-deep, #020617);
  border: 1.5px solid rgba(148, 163, 184, 0.55);
  color: #f8fafc;
}
.tm-split-activity-input::placeholder {
  color: #cbd5e1;
  opacity: 0.9;
}
.tm-split-select {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  border-radius: 8px;
  padding: 6px 10px;
  background: var(--ui-bg-deep, #020617);
  color: var(--ui-ink, #f8fafc);
  border: 1.5px solid rgba(148, 163, 184, 0.45);
  font: inherit;
}

.tm-energy { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.tm-energy-item { position: relative; margin: 0; cursor: pointer; }
.tm-energy-face {
  min-height: 64px; padding: 8px 2px; border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  border: 2px solid var(--ui-line); background: rgba(255, 255, 255, 0.03);
  color: var(--ui-ink); font-size: 0.74rem; font-weight: 700;
}
.tm-energy-bars { display: flex; align-items: flex-end; gap: 2px; height: 16px; }
.tm-energy-bars i { width: 4px; border-radius: 2px; background: rgba(148, 163, 184, 0.35); }
.tm-energy-bars i:nth-child(1) { height: 5px; }
.tm-energy-bars i:nth-child(2) { height: 8px; }
.tm-energy-bars i:nth-child(3) { height: 11px; }
.tm-energy-bars i:nth-child(4) { height: 14px; }
.tm-energy-bars i:nth-child(5) { height: 16px; }
.tm-e1 { --e-bar: #ef4444; --e-bg: #dc2626; --e-border: #ef4444; --e-ink: #ffffff; }
.tm-e2 { --e-bar: #f97316; --e-bg: #c2410c; --e-border: #f97316; --e-ink: #ffffff; }
.tm-e3 { --e-bar: #f59e0b; --e-bg: #b45309; --e-border: #f59e0b; --e-ink: #ffffff; }
.tm-e4 { --e-bar: #22c55e; --e-bg: #15803d; --e-border: #22c55e; --e-ink: #ffffff; }
.tm-e5 { --e-bar: #16a34a; --e-bg: #14532d; --e-border: #22c55e; --e-ink: #ffffff; }
.tm-e1 .tm-energy-bars i:nth-child(-n+1),
.tm-e2 .tm-energy-bars i:nth-child(-n+2),
.tm-e3 .tm-energy-bars i:nth-child(-n+3),
.tm-e4 .tm-energy-bars i:nth-child(-n+4),
.tm-e5 .tm-energy-bars i:nth-child(-n+5) { background: var(--e-bar); }
.tm-energy-item .tm-energy-face { border-color: color-mix(in srgb, var(--e-border, var(--ui-line)) 38%, transparent); }
.tm-energy-item input:checked + .tm-energy-face { background: var(--e-bg); border-color: var(--e-border); color: var(--e-ink); }
.tm-energy-item input:checked + .tm-energy-face .tm-energy-bars i { background: rgba(255, 255, 255, 0.28); }
.tm-e1 input:checked + .tm-energy-face .tm-energy-bars i:nth-child(-n+1),
.tm-e2 input:checked + .tm-energy-face .tm-energy-bars i:nth-child(-n+2),
.tm-e3 input:checked + .tm-energy-face .tm-energy-bars i:nth-child(-n+3),
.tm-e4 input:checked + .tm-energy-face .tm-energy-bars i:nth-child(-n+4),
.tm-e5 input:checked + .tm-energy-face .tm-energy-bars i:nth-child(-n+5) { background: var(--e-ink); }

/* ───────────── Toast ───────────── */
.tm-toast {
  position: fixed; left: 16px; right: 16px; z-index: 10050;
  bottom: calc(var(--ui-tab-h) + 92px + env(safe-area-inset-bottom, 0px));
  margin: 0 auto; width: fit-content; max-width: min(520px, calc(100vw - 32px));
  padding: 12px 18px; border-radius: 999px;
  background: #f1f5f9; color: #0b132b; font-weight: 700; font-size: 0.92rem; text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.tm-toast.is-on { opacity: 1; transform: translateY(0); }

body.tm-sheet-open { overflow: hidden; }

/* ───────────── Small phones ───────────── */
@media (max-width: 359.98px) {
  .tm { padding-left: 12px; padding-right: 12px; }
  .tm-tile-face, .tm-energy-face { font-size: 0.68rem; }
  .tm-choice-item span { font-size: 0.82rem; }
  .tm-chart-name { font-size: 0.66rem; }
}

/* ───────────── Wider screens ───────────── */
@media (min-width: 560px) {
  .tm-actions { flex-direction: row; flex-wrap: wrap; }
  .tm-actions form { flex-direction: row; flex-wrap: wrap; }
  .tm-slots { grid-template-columns: repeat(8, 1fr); }
  .tm-confirm { flex-basis: 100%; }
}
@media (min-width: 768px) {
  .tm { padding: 28px 16px 56px; max-width: 720px; }
  .tm-title { font-size: 2.1rem; }
  .tm-dock { display: none; }
  .tm-cta.tm-cta-inline { display: inline-flex; width: auto; min-width: 220px; }
  .tm-hero { padding: 24px; }
  .tm-card { padding: 20px; }
  .tm-slots { grid-template-columns: repeat(12, 1fr); }
  .tm-sheet { align-items: center; padding: 24px; }
  .tm-sheet-panel { border-radius: 22px; border-bottom: 1px solid var(--ui-line-strong); max-height: min(88dvh, 820px); transform: translateY(24px); opacity: 0; transition: transform 0.2s ease, opacity 0.2s ease; }
  .tm-sheet.is-open .tm-sheet-panel { opacity: 1; }
  .tm-sheet-handle { display: none; }
  .tm-sheet-grip { padding-top: 16px; touch-action: auto; }
  .tm-toast { bottom: calc(var(--ui-tab-h) + 16px + env(safe-area-inset-bottom, 0px)); }
}
.tm-day-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}
@media (min-width: 992px) {
  .tm {
    max-width: 1240px;
    padding: 32px 24px 64px;
  }
  .tm-day-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 20px;
    align-items: stretch;
    margin-bottom: 20px;
  }
  #tmDayGrid {
    grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  }
  .tm-day-grid > .tm-card {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
  }
  .tm-toast { bottom: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .tm-sheet-panel, .tm-sheet-backdrop, .tm-toast, .tm-progress-fill, .tm-track-fill, .tm-tile-face { transition: none !important; }
  .tm-dock.is-due .tm-cta { animation: none; }
  .tm-cta:active { transform: none; }
}

/* ───────────── Weekly plan (/time-tracker) ───────────── */
.tp-lead { margin: 4px 0 0; }
.tp-ring { margin-bottom: 8px; }
.tp-rows { list-style: none; margin: 8px 0 0; padding: 0; }
.tp-row { padding: 14px 0 10px; border-top: 1px solid var(--ui-line); }
.tp-row:first-child { border-top: 0; }
.tp-row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.tp-row-head label { margin: 0; cursor: pointer; }
.tp-row-value { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tp-row-value strong { font-size: 1.15rem; font-weight: 800; color: var(--c-ink); }
.tp-row-value span { margin-left: 8px; color: var(--ui-muted); font-size: 0.82rem; font-weight: 600; }
.tp-row-ctrl, .tp-num-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 10px; align-items: center; margin-top: 6px; }
.tp-row-hint { margin: 4px 0 0; color: var(--ui-muted); font-size: 0.82rem; line-height: 1.4; }
.tp-step {
  width: 44px; height: 44px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--ui-line-strong); background: rgba(255, 255, 255, 0.04); color: var(--ui-ink);
  font: inherit; font-size: 1.35rem; font-weight: 700; line-height: 1; touch-action: manipulation;
}
.tp-step:active { background: rgba(255, 255, 255, 0.12); }
.tp-range { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; margin: 0; padding: 0; background: transparent; cursor: pointer; touch-action: pan-y; }
.tp-range::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: linear-gradient(to right, var(--c) var(--fill, 50%), rgba(148, 163, 184, 0.2) var(--fill, 50%)); }
.tp-range::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: -11px; border-radius: 50%; background: #fff; border: 4px solid var(--c); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45); }
.tp-range::-moz-range-track { height: 8px; border-radius: 999px; background: rgba(148, 163, 184, 0.2); }
.tp-range::-moz-range-progress { height: 8px; border-radius: 999px; background: var(--c); }
.tp-range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 4px solid var(--c); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45); }
.tp-fit { margin: 8px 0 14px; padding: 14px; border-radius: var(--ui-radius-sm); background: rgba(251, 191, 36, 0.1); border: 1px solid rgba(251, 191, 36, 0.35); display: grid; gap: 10px; }
.tp-fit p { margin: 0; color: #fde68a; font-size: 0.92rem; line-height: 1.45; }
.tm-insight.is-danger { border-left-color: var(--ui-stop); }
.tm-insight.is-info { border-left-color: var(--ui-accent); }
#tpGuard { margin-top: 6px; }
.tp-gap { margin-top: 14px; }
.tp-wide { width: 100%; }
.tp-plan-row .tp-plan-msg { grid-column: 1 / -1; margin: 4px 0 0; color: var(--ui-muted); font-size: 0.86rem; line-height: 1.45; }
.tp-num {
  width: 100%; min-height: 52px; padding: 0 12px; text-align: center; border-radius: var(--ui-radius-sm);
  border: 1px solid var(--ui-line-strong); background: var(--ui-bg-deep); color: var(--ui-ink);
  font: inherit; font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield;
}
.tp-num::-webkit-outer-spin-button, .tp-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tp-result { margin-top: 18px; padding: 16px; border-radius: var(--ui-radius-sm); border: 1px solid var(--ui-line-strong); background: rgba(255, 255, 255, 0.03); }
.tp-result.is-hazardous { border-color: rgba(248, 113, 113, 0.55); background: rgba(248, 113, 113, 0.08); }
.tp-result.is-liberating { border-color: rgba(52, 211, 153, 0.5); background: rgba(52, 211, 153, 0.07); }
.tp-result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.tp-result-head .tm-pill { grid-row: auto; grid-column: auto; }
.tp-result-title { margin: 0 0 6px; font-size: 1.2rem; font-weight: 800; letter-spacing: -0.01em; color: var(--ui-ink); }
.tp-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0 0; }
.tp-facts div { padding: 10px 12px; border-radius: var(--ui-radius-sm); border: 1px solid var(--ui-line); min-width: 0; }
.tp-facts dt { color: var(--ui-muted); font-size: 0.78rem; font-weight: 700; }
.tp-facts dd { margin: 2px 0 0; font-size: 0.98rem; font-weight: 800; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tp-facts dd.is-bad { color: #fca5a5; }
.tp-facts dd.is-good { color: var(--ui-go); }
.tp-hist { list-style: none; margin: 14px 0 0; padding: 0; }
.tp-hist li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--ui-line); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.tp-hist li span:last-child { color: var(--ui-muted); font-weight: 600; white-space: nowrap; }
@media (min-width: 768px) {
  .tp-ring { margin-bottom: 16px; }
}
.tm-auth-gate {
  border-color: rgba(56, 189, 248, 0.45);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(15, 23, 42, 0.92));
  margin-bottom: 16px;
}
.tm-auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #7dd3fc;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.tm-auth-lead {
  margin: 8px 0 10px;
  color: var(--ui-ink);
  font-size: 0.95rem;
  line-height: 1.5;
}
.tm-auth-privacy {
  margin: 0 0 16px;
  padding-left: 18px;
  color: var(--ui-muted);
  font-size: 0.88rem;
  line-height: 1.5;
  display: grid;
  gap: 6px;
}
.tm-auth-gate .tm-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
.tm-auth-gate.is-highlight {
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.55);
  transition: box-shadow 0.25s ease;
}

/* ───────────── Interactive Bar Charts (Day / Week / Month) ───────────── */
.tm-bar-card-head {
  flex-wrap: wrap;
}
.tm-bar-pills {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  overflow-x: auto;
}
.tm-bar-pill {
  min-height: 44px;
  min-width: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--ui-line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ui-muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.tm-bar-pill:hover {
  color: var(--ui-ink);
  background: rgba(255, 255, 255, 0.08);
}
.tm-bar-pill:active {
  transform: scale(0.98);
}
.tm-bar-pill.is-active {
  background: var(--ui-accent-soft);
  border-color: var(--ui-accent);
  color: var(--ui-ink);
}
.tm-bar-canvas-wrap {
  position: relative;
  width: 100%;
  height: auto;
  margin-top: var(--space-3, 12px);
}
.tm-bento-root {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3, 12px);
  min-width: 0;
  max-width: 100%;
}
.tm-bento-ribbon {
  display: flex;
  gap: 3px;
  height: 44px;
  padding: 4px;
  min-width: 0;
  max-width: 100%;
  border-radius: var(--radius-md, 12px);
  background: rgba(148, 163, 184, 0.12);
  overflow: hidden;
}
.tm-bento-seg {
  min-width: 12px;
  min-height: 36px;
  border: 0;
  padding: 0;
  border-radius: 6px;
  cursor: pointer;
  transition: transform var(--motion-fast, 150ms) var(--ease, cubic-bezier(0.16, 1, 0.3, 1)), opacity var(--motion-fast, 150ms) ease, filter var(--motion-fast, 150ms) ease;
}
.tm-bento-seg:first-child { border-top-left-radius: 9px; border-bottom-left-radius: 9px; }
.tm-bento-seg:last-child { border-top-right-radius: 9px; border-bottom-right-radius: 9px; }
.tm-bento-seg.is-unfilled {
  background: repeating-linear-gradient(
    -45deg,
    rgba(148, 163, 184, 0.16),
    rgba(148, 163, 184, 0.16) 5px,
    rgba(148, 163, 184, 0.28) 5px,
    rgba(148, 163, 184, 0.28) 10px
  );
  border: 1px dashed rgba(148, 163, 184, 0.45);
}
.tm-bento-seg.is-highlighted {
  transform: scaleY(1.08);
  filter: brightness(1.14);
  box-shadow: 0 0 0 2px #fff;
}
.tm-bento-seg.is-dimmed { opacity: 0.42; }
.tm-bento-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2, 8px);
  min-width: 0;
}
.tm-bento-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  padding: 10px 12px;
  min-width: 0;
  min-height: var(--tap-min, 44px);
  border-radius: var(--radius-md, 12px);
  border: 1px solid var(--ui-line);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: border-color var(--motion-fast, 150ms) ease, background var(--motion-fast, 150ms) ease;
}
.tm-bento-row.is-highlighted {
  border-color: var(--ui-accent);
  background: rgba(56, 189, 248, 0.09);
}
.tm-bento-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3, 12px);
}
.tm-bento-name {
  display: flex;
  align-items: center;
  gap: var(--space-2, 8px);
  min-width: 0;
  flex: 1 1 auto;
}
.tm-bento-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tm-bento-dot.is-unfilled {
  background: transparent;
  border: 1.5px dashed rgba(148, 163, 184, 0.6);
}
.tm-bento-label {
  font-size: var(--text-sm, 0.875rem);
  font-weight: 600;
  color: var(--ui-ink);
  min-width: 0;
  overflow-wrap: anywhere;
}
.tm-bento-val {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: var(--text-sm, 0.875rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--ui-ink);
  white-space: nowrap;
  flex-shrink: 0;
}
.tm-bento-pct {
  font-size: var(--text-xs, 0.75rem);
  font-weight: 600;
  color: var(--ui-muted);
}
.tm-bento-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  overflow: hidden;
}
.tm-bento-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  transition: width 0.55s var(--ease, cubic-bezier(0.16, 1, 0.3, 1));
}
.tm-bento-fill.is-unfilled {
  background: rgba(148, 163, 184, 0.45);
}
.tm-bento-root.is-revealed .tm-bento-fill {
  width: var(--tm-fill-w, 0%);
}
.tm-bar-empty {
  margin-top: 8px;
  padding: 24px 16px;
  text-align: center;
  border: 1px dashed var(--ui-line-strong);
  border-radius: 12px;
  color: var(--ui-muted);
  font-size: 0.92rem;
  display: grid;
  gap: 12px;
  justify-items: center;
}
.tm-bar-empty[hidden] {
  display: none;
}

/* Circadian Energy & Focus Profiler Card */
.tm-circadian-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
  color: var(--c0-deep, #0369a1);
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.28);
}
.tm-circadian-desc {
  margin: 0 0 12px;
  font-size: 0.875rem;
  line-height: 1.5;
}
.tm-circadian-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
@media (max-width: 480px) {
  .tm-circadian-metrics {
    grid-template-columns: 1fr;
  }
}
.tm-circadian-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px;
  border-radius: 12px;
  background: var(--ui-bg, rgba(15, 23, 42, 0.03));
  border: 1px solid var(--ui-line, rgba(15, 23, 42, 0.1));
}
.tm-circadian-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ui-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.tm-circadian-val {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ui-ink);
  white-space: nowrap;
}
.tm-circadian-sub {
  font-size: 0.75rem;
  color: var(--ui-muted);
}
.tm-circadian-chart-wrap {
  position: relative;
  margin: 8px 0 12px;
  padding: 10px 8px 6px;
  border-radius: var(--radius-md, 12px);
  border: 1px solid var(--ui-line, rgba(15, 23, 42, 0.1));
  touch-action: pan-y;
  cursor: crosshair;
  user-select: none;
}
.tm-circadian-readout {
  position: absolute;
  top: -14px;
  transform: translateX(-50%);
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #f8fafc;
  font-size: var(--text-xs, 0.75rem);
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  z-index: 4;
}
.tm-circadian-readout[hidden] { display: none; }
.tm .tm-circadian-svg,
.tm-circadian-svg {
  display: block;
  width: 100%;
  height: 80px;
  overflow: visible;
}
.tm-circadian-line {
  stroke-dasharray: 1200;
  stroke-dashoffset: 0;
  animation: tmWaveDraw 0.9s var(--ease, cubic-bezier(0.16, 1, 0.3, 1)) both;
}
.tm-circadian-area {
  animation: tmWaveFade 0.7s ease both;
}
.tm-circadian-crosshair {
  stroke: rgba(248, 250, 252, 0.55);
  stroke-width: 1.5;
  stroke-dasharray: 3 3;
}
.tm-circadian-dot {
  fill: #10b981;
  stroke: #ffffff;
  stroke-width: 2;
}
@keyframes tmWaveDraw { from { stroke-dashoffset: 1200; } to { stroke-dashoffset: 0; } }
@keyframes tmWaveFade { from { opacity: 0; } to { opacity: 1; } }
.tm-circadian-axis {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--ui-muted);
  margin-top: 4px;
}
.tm-circadian-advisory {
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ui-ink);
  background: rgba(16, 185, 129, 0.08);
  border-left: 3px solid var(--c1, #10b981);
}

/* ───────────── Activity-First Input & Entry Actions ───────────── */
.tm-activity-search-wrap {
  margin-bottom: 10px;
}
.tm-activity-input {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--ui-line-strong, rgba(148, 163, 184, 0.35));
  background: rgba(15, 23, 42, 0.65);
  color: #f8fafc;
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.tm-activity-input::placeholder {
  color: #94a3b8;
}
.tm-activity-input:focus {
  outline: none;
  border-color: var(--c0, #0ea5e9);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.25);
}
.tm-activity-suggestions {
  margin-bottom: 12px;
}
.tm-auto-pillar {
  margin-top: 8px;
}
.tm-auto-pillar-label {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ui-ink, #f8fafc);
  margin-bottom: 8px;
}
.tm-cat-manage-pill {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.42);
  background: rgba(56, 189, 248, 0.14);
  color: #e0f2fe;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease, transform 0.1s ease;
}
.tm-cat-manage-pill i { color: #38bdf8; font-size: 0.88rem; }
.tm-cat-manage-pill:hover { background: rgba(56, 189, 248, 0.22); border-color: rgba(56, 189, 248, 0.65); }
.tm-cat-manage-pill:active { transform: scale(0.98); }
.tm-cat-manage-pill:focus-visible { outline: 2px solid var(--ui-accent); outline-offset: 2px; }
.tm-tiles-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
@media (min-width: 560px) {
  .tm-tiles-compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.tm-tiles-compact .tm-tile-face {
  min-height: 44px;
  padding: 8px 10px;
  flex-direction: row;
  justify-content: flex-start;
  gap: 8px;
  font-size: 0.78rem;
  line-height: 1.2;
  text-align: left;
  white-space: normal;
}
.tm-tiles-compact .tm-tile-face i {
  flex-shrink: 0;
}
.tm-tiles-compact .tm-tile-face span {
  min-width: 0;
  overflow-wrap: break-word;
}
.tm-entry-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tm-entry-edit {
  color: var(--ui-muted);
  border-color: transparent;
  background: transparent;
}
.tm-entry-edit:hover {
  color: #7dd3fc;
}
.tm-gap-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tm-gap-confirm-btn {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(16, 185, 129, 0.55);
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.12s ease, background-color 0.15s ease;
}
.tm-gap-confirm-btn:hover {
  background: rgba(16, 185, 129, 0.28);
}
.tm-gap-confirm-btn:active {
  transform: scale(0.98);
}
.tm-gap-confirm-btn:focus-visible {
  outline: 2px solid var(--c1, #10b981);
  outline-offset: 2px;
}

/* ───────────── 168h Intra-Day Pacing & Course Correction Card ───────────── */
.tm-pacing-sub {
  margin: 2px 0 0;
  font-size: 0.84rem;
}
.tm-pacing-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.tm-pacing-row {
  display: grid;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--ui-line);
}
.tm-pacing-row:first-child {
  padding-top: 4px;
  border-top: 0;
}
.tm-pacing-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tm-pacing-row-head .tm-pill {
  flex-shrink: 0;
  white-space: nowrap;
}
.tm-pacing-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  overflow: visible;
}
.tm-pacing-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--c);
  transition: width 0.55s var(--ease, cubic-bezier(0.16, 1, 0.3, 1));
}
.tm-pacing-list.is-revealed .tm-pacing-fill {
  width: var(--tm-fill-w, 0%);
}
.tm-pacing-marker {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 3px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: #ffffff;
  box-shadow: 0 0 0 1.5px rgba(15, 23, 42, 0.9);
  pointer-events: none;
  transition: left 0.35s ease;
  animation: tmPacingPulse 2.4s ease-in-out infinite;
}
@keyframes tmPacingPulse {
  0%, 100% { box-shadow: 0 0 0 1.5px rgba(15, 23, 42, 0.9); }
  50% { box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.55); }
}
.tm-pacing-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  font-size: 0.8rem;
  color: var(--ui-muted);
  font-variant-numeric: tabular-nums;
}
.tm-pacing-meta strong {
  color: var(--ui-ink);
  font-weight: 700;
}
.tm-pacing-foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--ui-line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}
.tm-pacing-legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--ui-muted);
}
.tm-pacing-tick-key {
  display: inline-block;
  width: 3px;
  height: 12px;
  border-radius: 2px;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.85);
}
@media (prefers-reduced-motion: reduce) {
  .tm-progress-fill,
  .tm-track-fill,
  .tm-ring-arc,
  .tm-bento-seg,
  .tm-bento-fill,
  .tm-pacing-fill {
    transition: none !important;
  }
  .tm-progress-fill::after,
  .tm-progress.is-milestone .tm-progress-fill,
  .tm-seg-block.is-wave,
  .tm-now::before,
  .tm-circadian-line,
  .tm-circadian-area,
  .tm-pacing-marker {
    animation: none !important;
  }
}

/* ───────────── Seven Days: Small Multiples + Horizontal Spotlight ───────────── */
.tm-legend-interactive {
  gap: var(--space-2, 8px);
}
.tm-legend-btn,
.tm-legend-reset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--ui-line);
  background: transparent;
  color: var(--ui-ink);
  font-size: var(--text-xs, 0.75rem);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: opacity var(--motion-fast, 150ms) ease, border-color var(--motion-fast, 150ms) ease, background var(--motion-fast, 150ms) ease, transform var(--motion-fast, 150ms) ease;
}
.tm-legend-btn:active,
.tm-legend-reset:active {
  transform: scale(0.98);
}
.tm-legend-btn:focus-visible,
.tm-legend-reset:focus-visible,
.tm-sm-row:focus-visible,
.tm-hbar-seg:focus-visible,
.tm-hbar-day:focus-visible {
  outline: 2px solid var(--ui-accent);
  outline-offset: 2px;
}
.tm-legend-btn.is-active {
  border-color: var(--c, var(--ui-accent));
  background: var(--ui-accent-soft);
}
.tm-legend-btn.is-dimmed {
  opacity: 0.45;
}
.tm-legend-reset {
  color: var(--ui-accent);
  border-color: var(--ui-accent);
}

.tm-sm-wrap {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: var(--space-4, 16px);
  align-items: center;
  padding-top: var(--space-2, 8px);
}
.tm-sm-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-3, 12px);
  border-radius: var(--radius-md, 12px);
  border: 1px solid var(--ui-line);
  background: rgba(148, 163, 184, 0.06);
}
.tm-sm-ring-box {
  position: relative;
  width: 108px;
  height: 108px;
}
.tm-sm-ring {
  width: 100%;
  height: 100%;
  display: block;
}
.tm-ring-arc.is-dimmed {
  opacity: 0.2 !important;
}
.tm-sm-hint {
  margin: var(--space-2, 8px) 0 0;
  font-size: var(--text-xs, 0.75rem);
  color: var(--ui-muted);
  text-align: center;
  line-height: 1.3;
}
.tm-sm-matrix {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.tm-sm-head {
  display: grid;
  grid-template-columns: minmax(96px, 132px) minmax(0, 1fr) 72px;
  gap: var(--space-3, 12px);
  padding: 0 var(--space-2, 8px) var(--space-1, 4px);
  font-size: var(--text-xs, 0.75rem);
  font-weight: 600;
  color: var(--ui-muted);
}
.tm-sm-head-right {
  text-align: right;
}
.tm-sm-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  text-align: center;
}
.tm-sm-days .is-today {
  color: var(--ui-accent);
  font-weight: 800;
}
.tm-sm-row {
  display: grid;
  grid-template-columns: minmax(96px, 132px) minmax(0, 1fr) 72px;
  gap: var(--space-3, 12px);
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 6px var(--space-2, 8px);
  border-radius: var(--radius-sm, 8px);
  border: 1px solid transparent;
  background: transparent;
  color: var(--ui-ink);
  text-align: left;
  cursor: pointer;
  transition: opacity var(--motion-fast, 150ms) ease, background var(--motion-fast, 150ms) ease, border-color var(--motion-fast, 150ms) ease, transform var(--motion-fast, 150ms) ease;
}
.tm-sm-row:active {
  transform: scale(0.99);
}
.tm-sm-row.is-focused {
  background: rgba(148, 163, 184, 0.1);
  border-color: var(--c, var(--ui-accent));
}
.tm-sm-row.is-dimmed {
  opacity: 0.32;
}
@media (hover: hover) {
  .tm-sm-row:hover {
    background: rgba(148, 163, 184, 0.08);
  }
}
.tm-sm-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.tm-sm-label {
  font-size: var(--text-xs, 0.75rem);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tm-sm-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  align-items: end;
  height: 28px;
}
.tm-sm-bar-slot {
  height: 100%;
  display: flex;
  align-items: flex-end;
}
.tm-sm-bar-fill {
  width: 100%;
  border-radius: 3px;
  background: var(--c);
  transition: height 0.25s ease;
}
.tm-sm-bar-fill.is-zero {
  background: var(--ui-line-strong);
  opacity: 0.4;
}
.tm-sm-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.tm-sm-stat strong {
  font-size: var(--text-xs, 0.75rem);
  font-weight: 700;
}
.tm-sm-stat span {
  font-size: 0.7rem;
  color: var(--ui-muted);
}

.tm-hbar-list {
  display: grid;
  gap: var(--space-2, 8px);
  padding-top: var(--space-2, 8px);
}
.tm-hbar-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 48px;
  gap: var(--space-3, 12px);
  align-items: center;
  min-height: 44px;
}
.tm-hbar-day {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 44px;
  text-decoration: none;
  color: var(--ui-muted);
  font-size: var(--text-xs, 0.75rem);
  font-weight: 600;
  line-height: 1.15;
}
.tm-hbar-date {
  color: var(--ui-ink);
  font-size: var(--text-sm, 0.875rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.tm-hbar-row.is-today .tm-hbar-day,
.tm-hbar-row.is-today .tm-hbar-date {
  color: var(--ui-accent);
}
.tm-hbar-track {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 32px;
  padding: 3px;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid var(--ui-line);
  background: rgba(148, 163, 184, 0.08);
  overflow: hidden;
}
.tm-hbar-track.is-empty {
  justify-content: center;
  border-style: dashed;
  border-color: var(--ui-line-strong);
  background: transparent;
}
.tm-hbar-empty-txt {
  font-size: var(--text-xs, 0.75rem);
  color: var(--ui-muted);
}
.tm-hbar-seg {
  height: 100%;
  min-width: 4px;
  border: 0;
  padding: 0;
  border-radius: 5px;
  background: var(--c);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: opacity var(--motion-fast, 150ms) ease, filter var(--motion-fast, 150ms) ease;
}
.tm-hbar-seg.is-dimmed {
  opacity: 0.2;
}
.tm-hbar-seg-lbl {
  font-size: 0.7rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(15, 23, 42, 0.55);
}
.tm-hbar-val {
  text-align: right;
  font-size: var(--text-xs, 0.75rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ui-ink);
  white-space: nowrap;
}
.tm-hbar-val.is-muted {
  color: var(--ui-muted);
}
.tm-hbar-val.is-focused {
  color: var(--c, var(--ui-accent));
}

@media (max-width: 639px) {
  .tm-sm-wrap {
    grid-template-columns: 1fr;
  }
  .tm-sm-summary {
    flex-direction: row;
    gap: var(--space-3, 12px);
    justify-content: flex-start;
  }
  .tm-sm-hint {
    margin-top: 0;
    text-align: left;
  }
  .tm-sm-head,
  .tm-sm-row {
    grid-template-columns: minmax(84px, 108px) minmax(0, 1fr) 60px;
    gap: var(--space-2, 8px);
  }
}

/* Seven days: Spinning hero ring + day selector */
.tm-wring-layout {
  display: grid;
  grid-template-columns: 204px minmax(0, 1fr);
  gap: var(--space-6, 24px);
  align-items: center;
  margin-top: var(--space-3, 12px);
}
.tm-wring-hero {
  display: flex;
  justify-content: center;
  align-items: center;
}
.tm-wring-circle {
  width: 196px;
  max-width: 100%;
}
.tm-wring-side {
  display: flex;
  flex-direction: column;
  gap: var(--space-3, 12px);
  min-width: 0;
}
.tm-wring-days {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2, 8px);
}
.tm-wring-day {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 var(--space-3, 12px);
  border-radius: var(--radius-md, 12px);
  border: 1px solid var(--ui-line);
  background: transparent;
  color: var(--ui-ink);
  font-size: var(--text-xs, 0.75rem);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}
.tm-wring-day:active:not(:disabled) {
  transform: scale(0.98);
}
.tm-wring-day:focus-visible {
  outline: 2px solid var(--ui-accent);
  outline-offset: 2px;
}
.tm-wring-day.is-today:not(.is-active) {
  border-color: var(--ui-accent);
  color: var(--ui-accent);
}
.tm-wring-day.is-active {
  background: var(--ui-accent);
  border-color: var(--ui-accent);
  color: #ffffff;
}
.tm-wring-day.is-empty {
  opacity: 0.45;
  cursor: not-allowed;
}
.tm-wring-day-num {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.tm-wring-cats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: var(--space-2, 8px);
}
.tm-wring-cat-btn {
  width: 100%;
  min-height: 44px;
  padding: 8px var(--space-3, 12px);
  border-radius: var(--radius-md, 12px);
  border: 1px solid var(--ui-line);
  background: rgba(148, 163, 184, 0.06);
  color: var(--ui-ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2, 8px);
  font-size: var(--text-xs, 0.75rem);
  cursor: pointer;
  transition: opacity 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}
.tm-wring-cat-btn:active {
  transform: scale(0.98);
}
.tm-wring-cat-btn:focus-visible {
  outline: 2px solid var(--ui-accent);
  outline-offset: 2px;
}
.tm-wring-cat-btn.is-active {
  border-color: var(--c, var(--ui-accent));
  background: rgba(148, 163, 184, 0.14);
}
.tm-wring-cat-btn.is-dimmed {
  opacity: 0.35;
}
.tm-wring-cat-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.tm-wring-cat-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tm-wring-cat-val {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ui-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.tm-wring-empty {
  width: 100%;
  padding: var(--space-4, 16px) 0;
  text-align: center;
}
@media (max-width: 639px) {
  .tm-bar-pills {
    flex-wrap: wrap;
    max-width: 100%;
  }
  .tm-wring-layout {
    grid-template-columns: 1fr;
    gap: var(--space-4, 16px);
  }
  .tm-wring-cats {
    grid-template-columns: 1fr;
  }
}

/* ───────────── Preact + Signals Interactive Island ───────────── */
.tm-seg-block.is-dimmed { opacity: 0.22; filter: grayscale(0.5); transition: opacity 0.16s ease; }
.tm-seg-block.is-highlighted { outline: 2px solid #ffffff; outline-offset: -2px; z-index: 2; }
.tm-entry.is-dimmed { opacity: 0.35; transition: opacity 0.16s ease; }

.tm-preact-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.tm-preact-filter-pill {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1.5px solid var(--ui-line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ui-ink, #f8fafc);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease, transform 0.1s ease;
}
.tm-preact-filter-pill:active { transform: scale(0.98); }
.tm-preact-filter-pill:focus-visible { outline: 2px solid var(--ui-accent); outline-offset: 2px; }
.tm-preact-filter-pill.is-active {
  background: rgba(56, 189, 248, 0.18);
  border-color: var(--pill-c, #38bdf8);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}
.tm-preact-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--pill-c, #38bdf8);
  flex-shrink: 0;
}
.tm-preact-hours {
  font-size: 0.78rem;
  color: var(--ui-muted);
  font-variant-numeric: tabular-nums;
}
.tm-preact-clear-btn {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.12);
  color: #e0f2fe;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
}
.tm-preact-curve-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tm-preact-point-readout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--ui-line);
  background: rgba(255, 255, 255, 0.03);
}
.tm-preact-point-time {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ui-muted);
  font-variant-numeric: tabular-nums;
}
.tm-preact-point-title {
  flex: 1;
  min-width: 120px;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--ui-ink, #f8fafc);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tm-preact-svg {
  width: 100%;
  height: auto;
  display: block;
}
.tm-preact-empty {
  padding: 14px;
  border-radius: 12px;
  border: 1px dashed var(--ui-line-strong);
  text-align: center;
}
.tm-preact-roi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
@media (max-width: 639px) {
  .tm-preact-roi-grid { grid-template-columns: 1fr; }
}
.tm-preact-roi-col {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--ui-line);
  background: rgba(255, 255, 255, 0.025);
}
.tm-preact-subhead {
  margin: 0 0 10px;
  font-size: 0.88rem;
  font-weight: 800;
}
.tm-preact-subhead.is-boost { color: #6ee7b7; }
.tm-preact-subhead.is-drain { color: #fca5a5; }
.tm-preact-roi-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tm-preact-roi-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tm-preact-roi-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ui-ink, #f8fafc);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tm-preact-reclaim-box {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(56, 189, 248, 0.28);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08) 0%, rgba(99, 102, 241, 0.06) 100%);
}
.tm-preact-reclaim-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.tm-preact-reclaim-label {
  font-size: 0.92rem;
  color: var(--ui-ink, #f8fafc);
}
.tm-preact-reclaim-impact {
  font-size: 0.92rem;
  font-weight: 800;
  color: #7dd3fc;
  font-variant-numeric: tabular-nums;
}
.tm-preact-slider {
  width: 100%;
  min-height: 44px;
  accent-color: #38bdf8;
  cursor: pointer;
}
.tm-preact-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 6px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ui-muted);
}
.tm-preact-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.tm-preact-cal-pad { min-height: 44px; }
.tm-preact-cal-cell {
  min-height: 44px;
  min-width: 44px;
  padding: 4px 2px;
  border-radius: 10px;
  border: 1px solid var(--ui-line);
  background: rgba(255, 255, 255, 0.025);
  color: var(--ui-ink, #f8fafc);
  font: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  transition: transform 0.1s ease, border-color 0.14s ease;
}
.tm-preact-cal-cell:disabled { opacity: 0.35; cursor: not-allowed; }
.tm-preact-cal-cell:not(:disabled):active { transform: scale(0.96); }
.tm-preact-cal-cell:focus-visible { outline: 2px solid var(--ui-accent); outline-offset: 2px; }
.tm-preact-cal-cell.is-lvl-1 { background: rgba(56, 189, 248, 0.12); border-color: rgba(56, 189, 248, 0.28); }
.tm-preact-cal-cell.is-lvl-2 { background: rgba(56, 189, 248, 0.24); border-color: rgba(56, 189, 248, 0.45); }
.tm-preact-cal-cell.is-lvl-3 { background: rgba(56, 189, 248, 0.38); border-color: rgba(56, 189, 248, 0.65); }
.tm-preact-cal-cell.is-lvl-4 { background: rgba(16, 185, 129, 0.32); border-color: rgba(16, 185, 129, 0.7); }
.tm-preact-cal-cell.is-selected { box-shadow: 0 0 0 2px #f8fafc; }
.tm-preact-cal-num { font-size: 0.82rem; font-weight: 800; line-height: 1; }
.tm-preact-cal-sub { font-size: 0.68rem; font-weight: 700; color: #e0f2fe; font-variant-numeric: tabular-nums; }
.tm-preact-slot-strip {
  display: flex;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--ui-line);
  margin-bottom: 12px;
}
.tm-preact-slot-seg {
  height: 100%;
  transition: opacity 0.16s ease;
}
.tm-preact-slot-seg.is-dimmed {
  opacity: 0.2;
}
.tm-preact-reclaim-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.tm-preact-week-context {
  font-size: 0.82rem;
  color: #cbd5e1;
}
.tm-preact-compound-card {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(15, 23, 42, 0.65);
  color: #e0f2fe;
  font-size: 0.85rem;
}
