:root {
  color-scheme: dark;
  font-family: "SF Pro Display", "SF Pro Text", -apple-system, "Helvetica Neue", system-ui, sans-serif;
  background: #0c0a1e;
  color: #e8e2f8;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --safe-left: max(14px, env(safe-area-inset-left));
  --safe-right: max(14px, env(safe-area-inset-right));
  --safe-top: max(14px, env(safe-area-inset-top));
  --safe-bottom: max(14px, env(safe-area-inset-bottom));
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: #0c0a1e;
  font-weight: 300;
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.shell {
  display: grid;
  grid-template-columns: 3fr 4fr 3fr;
  grid-template-rows: minmax(0, 1fr);
  gap: 10px;
  height: 100vh;
  padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
  overflow: hidden;
}

.topbar,
.now-card,
.section-heading,
.task-column-head,
.project-main,
.project-title,
.project-actions,
.task,
.flow-check {
  display: flex;
  align-items: center;
}

.topbar {
  display: grid;
  grid-template-rows: 24px minmax(0, 1fr);
  align-items: stretch;
  min-width: 0;
  gap: 6px;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
}

.eyebrow {
  margin-bottom: 2px;
  color: #8b93a3;
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
}

h2,
h3,
strong {
  font-weight: 400;
}

.now-card {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 10px 112px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent), rgba(15, 18, 26, 0.86) 84%), rgba(15, 18, 26, 0.9));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent), transparent 68%), 0 18px 54px rgba(0, 0, 0, 0.24);
}

.now-card-right {
  display: contents;
}

.now-card-right .countdown {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 104px;
  transform: translateY(-50%);
}

.now-card-right .next-chip {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 104px;
  transform: translateY(-50%);
}

.clock-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 100%;
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(15, 18, 26, 0.78);
  color: #f5f3ee;
  text-align: center;
}

.clock-card strong {
  font-size: 1.56rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  color: #f5f3ee;
}

.clock-card span,
.clock-card small {
  overflow: hidden;
  max-width: 100%;
  font-size: 0.52rem;
  color: #8f98a9;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clock-card small {
  color: #b4bdcc;
  font-size: 0.58rem;
  text-transform: none;
  letter-spacing: 0;
}

.clock-card i {
  position: absolute;
  top: 7px;
  right: 7px;
  color: #8f98a9;
  font-size: 0.62rem;
  font-style: normal;
}

.resize-handle {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;
  z-index: 4;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: ns-resize;
}

.resize-handle::before {
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 34px;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  content: "";
  transform: translateX(-50%);
}

.resize-handle:hover::before {
  background: rgba(245, 243, 238, 0.52);
}

.now-copy {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  gap: 3px;
  min-width: 0;
  max-width: 100%;
  text-align: center;
}

.now-copy p {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: color-mix(in srgb, var(--accent), white 10%);
  font-size: 0.66rem;
  font-weight: 400;
  text-transform: uppercase;
  white-space: nowrap;
}

.now-copy h2 {
  margin-top: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.04rem;
  letter-spacing: 0;
  text-align: center;
}

.now-copy span,
.countdown span {
  color: #98a0af;
  font-size: 0.58rem;
}

.now-copy > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.countdown {
  display: grid;
  align-content: center;
  gap: 1px;
  min-width: 0;
  padding: 3px 7px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.055);
  text-align: left;
}

.countdown strong {
  display: block;
  font-size: 0.96rem;
  font-weight: 400;
  letter-spacing: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button,
.mini-button,
.fab,
.ghost-icon {
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.075);
  color: #f5f3ee;
  font-weight: 300;
}

.icon-button {
  width: 34px;
  height: 34px;
  font-size: 1rem;
}

.mini-button {
  width: 26px;
  height: 26px;
  padding: 0;
  font-size: 0.75rem;
}

.mini-button.active {
  border-color: rgba(245, 243, 238, 0.55);
  background: rgba(245, 243, 238, 0.14);
}

.zoom-button {
  position: relative;
  background: rgba(255, 255, 255, 0.045);
}

.zoom-button span {
  position: relative;
  width: 13px;
  height: 13px;
  border: 1.4px solid currentColor;
  border-radius: 999px;
}

.zoom-button span::before,
.zoom-button span::after {
  position: absolute;
  content: "";
  background: currentColor;
}

.zoom-button span::before {
  top: 50%;
  left: 3px;
  width: 5px;
  height: 1.2px;
  transform: translateY(-50%);
}

.zoom-in span::after {
  top: 3px;
  left: 50%;
  width: 1.2px;
  height: 5px;
  transform: translateX(-50%);
}

.zoom-button::after {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 5px;
  height: 1.4px;
  border-radius: 999px;
  background: currentColor;
  content: "";
  transform: rotate(45deg);
}

select,
option,
input {
  color: #f5f3ee;
  background: #151923;
  color-scheme: dark;
}

select {
  appearance: none;
  height: 26px;
  min-width: 72px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  padding: 0 18px 0 7px;
  font-size: 0.7rem;
  background-image: linear-gradient(45deg, transparent 50%, #98a0af 50%), linear-gradient(135deg, #98a0af 50%, transparent 50%);
  background-position: calc(100% - 10px) 10px, calc(100% - 6px) 10px;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
}

.right-pane,
.project,
.task-board {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(15, 18, 26, 0.78);
}

.left-pane {
  display: grid;
  grid-template-rows: 92px minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
}

.right-pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 6px;
  min-height: 0;
  padding: 6px;
}

.side-pane {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 8px;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.side-top-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(92px, 0.72fr);
  gap: 8px;
  min-height: 82px;
}

.habit-shell {
  position: relative;
  min-height: 72px;
  padding-bottom: 10px;
  overflow: visible;
}

.middle-pane {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.inspiration-shell {
  position: relative;
  height: var(--inspiration-height, 139px);
  min-height: 96px;
}

.section-heading h2,
.timeblock-head h2 {
  font-size: 0.78rem;
  font-weight: 400;
}

.timeblock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.timeblock-tools {
  display: flex;
  align-items: center;
  gap: 5px;
}

.schedule-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.schedule-switcher button {
  min-width: 0;
  height: 26px;
  padding: 0 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.045);
  color: #8f98a9;
  font-size: 0.56rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-switcher button.active {
  border-color: rgba(110, 231, 183, 0.36);
  background: rgba(110, 231, 183, 0.12);
  color: #d8fff0;
}

.timeline-scroll {
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.timeline {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 7px;
  min-height: calc(820px * var(--timeline-zoom, 1));
  height: 100%;
  overflow: visible;
}

.time-ruler,
.time-grid {
  position: relative;
  min-height: 0;
  height: 100%;
}

.time-ruler span {
  position: absolute;
  right: 0;
  color: #737b8b;
  font-size: 0.62rem;
  font-weight: 400;
  transform: translateY(-50%);
}

.time-grid {
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.time-grid > span {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.045);
}

.time-block-wrap {
  position: absolute;
  left: 7px;
  right: 7px;
  min-height: 23px;
  overflow: visible;
}

.time-block {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 6px;
  min-height: 23px;
  padding: 4px 8px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent), transparent 58%);
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent), rgba(16, 20, 29, 0.95) 86%);
  color: inherit;
  text-align: left;
  transition: transform 140ms ease, border-color 140ms ease;
}

.time-block:hover {
  transform: translateY(-1px);
}

.block-resize-handle {
  position: absolute;
  left: 10px;
  right: 34px;
  z-index: 4;
  height: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  opacity: 0;
  cursor: ns-resize;
}

.block-resize-handle.top {
  top: -5px;
}

.block-resize-handle.bottom {
  bottom: -5px;
}

.time-block-wrap:hover .block-resize-handle {
  opacity: 1;
}

.block-resize-handle::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 42px;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  transform: translate(-50%, -50%);
}

.block-delete-button {
  position: absolute;
  top: 50%;
  right: 6px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(248, 113, 113, 0.28);
  border-radius: 6px;
  background: rgba(248, 113, 113, 0.14);
  color: #fecaca;
  font-size: 0.74rem;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 140ms ease;
}

.time-block-wrap:hover .block-delete-button {
  opacity: 1;
}
.time-block-wrap:hover .time-block small {
  opacity: 0;
}

.time-block.current {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent), transparent 24%), 0 14px 40px color-mix(in srgb, var(--accent), transparent 82%);
}

.time-block strong,
.time-block span,
.time-block time,
.time-block small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.time-block strong {
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}

.time-block time {
  color: #c7ceda;
  font-size: 0.62rem;
  font-weight: 400;
  text-align: left;
  white-space: nowrap;
}

.time-block small {
  color: color-mix(in srgb, var(--accent), white 22%);
  font-size: 0.62rem;
  text-align: right;
  white-space: nowrap;
}

.hover-line {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 5;
  height: 2px;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.68);
}

.hover-line.hidden {
  display: none;
}

.hover-line::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  transform: translate(-35%, -50%);
}

.hover-line span {
  position: absolute;
  left: 50%;
  top: 4px;
  transform: translateX(-50%);
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.95);
  color: #10131a;
  font-size: 0.62rem;
  white-space: nowrap;
}

.notification-shell {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
}

.notification-shell.show {
  display: grid;
}

.notification-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.42);
}

.notification-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
  place-items: center;
  width: min(390px, calc(100vw - 28px));
  min-height: 160px;
  padding: 16px 18px 14px;
  border: 1px solid color-mix(in srgb, var(--notification-accent), transparent 58%);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(20, 24, 34, 0.98), rgba(13, 16, 24, 0.97));
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.42), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  text-align: center;
}

.notification-card strong {
  overflow: hidden;
  color: #f5f3ee;
  font-size: 1.03rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-card span {
  overflow: hidden;
  color: #c0c8d6;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-card small {
  overflow: hidden;
  color: color-mix(in srgb, var(--notification-accent), white 18%);
  font-size: 1.22rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--notification-accent), transparent 78%);
  pointer-events: none;
}

.now-line {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 4;
  height: 1px;
  pointer-events: none;
  background: rgba(239, 68, 68, 0.85);
  box-shadow: 0 0 6px 1px rgba(239, 68, 68, 0.45);
}

.now-line.muted {
  opacity: 0.26;
}

.now-line::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 0 5px 1px rgba(239, 68, 68, 0.55);
  transform: translate(-30%, -50%);
}

.now-line span {
  position: absolute;
  left: 50%;
  top: 4px;
  transform: translateX(-50%);
  padding: 2px 6px;
  border-radius: 6px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.62rem;
  white-space: nowrap;
}

.section-heading {
  flex: 0 0 auto;
  justify-content: space-between;
  margin-bottom: 0;
}

input[type="checkbox"] {
  width: 13px;
  height: 13px;
  accent-color: #6ee7b7;
}

.task-board {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 6px;
  min-height: 0;
  padding: 8px;
  overflow: auto;
}

.task-column {
  display: grid;
  grid-template-rows: 24px auto;
  gap: 4px;
  min-width: 0;
  min-height: 0;
  padding: 6px;
  overflow: visible;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  flex: 0 0 auto;
}

.task-column.collapsed {
  grid-template-rows: 24px;
  flex: 0 0 36px;
  cursor: pointer;
}

.task-column.collapsed:hover {
  background: rgba(255, 255, 255, 0.055);
}

.task-column[draggable="true"] {
  cursor: grab;
}

.task-column.dragging {
  opacity: 0.58;
}

.task-column.drag-over {
  border-color: rgba(245, 243, 238, 0.38);
  background: rgba(255, 255, 255, 0.065);
}

.task-column-work {
  grid-row: auto;
  min-height: 0;
}

.task-column-study {
  grid-row: auto;
  min-height: 0;
}

.task-column-personal {
  grid-row: auto;
  min-height: 0;
}

.task-column-uncategorized {
  grid-row: auto;
  min-height: 0;
}

.full-row {
  grid-column: 1 / -1;
}

.time-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.repeat-weekly-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  column-gap: 14px;
  margin-top: 2px;
  padding-top: 2px;
}

.repeat-row-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 8px;
}

.repeat-weekly-row input {
  width: 14px;
  height: 14px;
}

.repeat-weekly-row strong {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
}

.repeat-weekly-row small {
  display: block;
  color: #8891a1;
  font-size: 0.56rem;
  line-height: 1.2;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 2px;
}

.checkbox-row input {
  width: 13px;
  height: 13px;
}

.task-column-head {
  justify-content: space-between;
  gap: 8px;
}

.task-column h2 {
  color: var(--category);
  font-size: 0.68rem;
  font-weight: 400;
}

.task-column h2 span {
  color: #8f98a9;
  font-size: 0.56rem;
}

.category-task-list {
  display: grid;
  align-content: start;
  gap: 2px;
  overflow: visible;
}

.empty-task-drop {
  width: 100%;
  height: 26px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
  color: #8f98a9;
  font-size: 0.62rem;
}

.task-board {
  align-content: start;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  height: 100%;
}

.task-column {
  min-height: 0;
}

.project-zone {
  display: grid;
  grid-template-rows: 28px auto auto minmax(0, 1fr);
  gap: 6px;
  min-height: 0;
  padding: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(15, 18, 26, 0.78);
}

.project-zone-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-zone-head h2 {
  color: #8f98a9;
  font-size: 0.74rem;
  font-weight: 400;
}

.habits-card {
  display: grid;
  grid-template-rows: 24px 18px auto;
  gap: 5px;
  min-height: 0;
  padding: 8px 12px 10px;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(15, 18, 26, 0.78);
}

.inspiration-card {
  display: grid;
  grid-template-rows: 24px minmax(0, 1fr);
  gap: 6px;
  height: 100%;
  min-height: 0;
  padding: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(15, 18, 26, 0.78);
}

.inspiration-card header {
  display: flex;
  align-items: center;
  gap: 5px;
  justify-content: flex-end;
}

.inspiration-card blockquote {
  display: grid;
  align-content: center;
  gap: 5px;
  height: 100%;
  min-height: 0;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
}

.inspiration-card blockquote p {
  color: #d6a526;
  font-size: 0.9rem;
  font-style: italic;
  line-height: 1.25;
}

.inspiration-card cite {
  color: #b98b1f;
  font-size: 0.58rem;
  font-style: italic;
}

.affirmation-list {
  display: grid;
  gap: 4px;
  align-content: start;
  height: 100%;
  min-height: 0;
  overflow: auto;
}

.affirmation-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  padding: 2px 4px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  font-family: Georgia, "Times New Roman", serif;
}

.affirmation-row [data-delete-affirmation] {
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.affirmation-row:hover [data-delete-affirmation],
.affirmation-row:focus-within [data-delete-affirmation] {
  opacity: 1;
  pointer-events: auto;
}

.affirmation-row span {
  overflow: hidden;
  color: #d6a526;
  font-size: 0.72rem;
  font-style: italic;
  text-overflow: ellipsis;
  white-space: nowrap;
  outline: none;
}

.scripture-list {
  display: grid;
  gap: 6px;
  align-content: start;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.scripture-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: start;
  gap: 2px 6px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  font-family: Georgia, "Times New Roman", serif;
}

.scripture-text {
  grid-column: 1;
  grid-row: 1;
  color: #cbd5e1;
  font-size: 0.74rem;
  font-style: italic;
  line-height: 1.35;
  outline: none;
  overflow-wrap: anywhere;
}

.scripture-ref {
  grid-column: 1;
  grid-row: 2;
  color: #94a3b8;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  outline: none;
  overflow-wrap: anywhere;
}

.scripture-actions {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.scripture-row:hover .scripture-actions,
.scripture-row:focus-within .scripture-actions {
  opacity: 1;
  pointer-events: auto;
}

.habit-subtabs {
  display: flex;
  gap: 4px;
  overflow: auto;
}

.habit-subtabs button {
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #8f98a9;
  font-size: 0.56rem;
}

.habit-subtabs button.active {
  border-color: rgba(110, 231, 183, 0.36);
  background: rgba(110, 231, 183, 0.12);
  color: #d8fff0;
}

.habit-chart-nav {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 8px;
}

.habit-chart-nav .task-icon {
  width: 24px;
  height: 20px;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: #cfd6e2;
  font-size: 0.82rem;
}

.habit-chart-nav .task-icon:hover {
  background: rgba(255, 255, 255, 0.11);
  color: #f5f3ee;
}

.habit-chart-nav strong {
  overflow: hidden;
  color: #cfd6e2;
  font-size: 0.6rem;
  font-weight: 400;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-stats {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 6px;
  min-height: 0;
}

.stat-card {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 15px 21px 10px;
  align-items: center;
  gap: 1px;
  min-width: 0;
  height: 60px;
  padding: 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.035);
}

.stat-card span {
  overflow: hidden;
  color: #aab2c1;
  font-size: 0.6rem;
  line-height: 1;
  align-self: center;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.stat-card strong {
  grid-column: 1 / -1;
  align-self: end;
  color: var(--stat);
  font-size: 1.24rem;
  font-weight: 500;
  line-height: 1;
  text-align: center;
}

.stat-card small {
  grid-column: 1 / -1;
  align-self: start;
  overflow: hidden;
  color: #7f8796;
  font-size: 0.5rem;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-card.done {
  --stat: #91e7b9;
}

.stat-card.need {
  --stat: #93c5fd;
}

.stat-card.focus {
  --stat: #c4b5fd;
}
.stat-card.focus strong {
  font-size: 1.1rem !important;
  white-space: nowrap !important;
}

.habit-list {
  display: grid;
  gap: 4px;
  min-height: 0;
  overflow: auto;
}

.habit-head-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.habit-row {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) 20px 20px;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  padding: 2px 4px;
  border-radius: 6px;
  color: #d7dce5;
  font-size: 0.66rem;
}

.habit-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  outline: none;
}

.habit-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.habit-row.done {
  background: rgba(110, 231, 183, 0.1);
  color: #ddfff2;
}

.habit-consistency {
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 0;
  overflow: visible;
  --habit-cell: 15px;
  --habit-gap: 3px;
}

.habit-track {
  display: grid;
  grid-template-columns: minmax(56px, 74px) minmax(0, 1fr) 36px 18px 18px;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 19px;
}

.habit-track strong {
  overflow: hidden;
  color: #d7dce5;
  font-size: 0.58rem;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: text;
  outline: none;
}

.habit-track strong[contenteditable="true"] {
  color: #f5f3ee;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 5px;
  padding: 1px 3px;
}

.habit-track div {
  display: grid;
  grid-template-columns: repeat(var(--habit-days), minmax(0, 1fr));
  align-items: center;
  justify-items: center;
  justify-content: center;
  justify-self: center;
  gap: var(--habit-gap);
  width: min(100%, calc((var(--habit-days) * var(--habit-cell)) + ((var(--habit-days) - 1) * var(--habit-gap))));
  min-width: 0;
}

.habit-consistency.week {
  --habit-cell: 24px;
  --habit-gap: 5px;
}

.habit-consistency.week .habit-track div {
  width: min(100%, max(132px, calc((var(--habit-days) * var(--habit-cell)) + ((var(--habit-days) - 1) * var(--habit-gap)))));
}

.habit-consistency.month {
  --habit-cell: 12px;
  --habit-gap: 2px;
}

.habit-track div span {
  display: grid;
  place-items: center;
  min-width: 0;
  color: #7f8796;
  font-size: 0.48rem;
  text-align: center;
}

.habit-date-labels {
  margin-bottom: -1px;
}

.habit-date-labels span {
  min-height: 9px;
  line-height: 1;
}

.habit-date-labels span.today {
  color: #f5f3ee;
  font-size: 0.58rem;
}

.habit-date-labels strong,
.habit-date-labels small {
  min-height: 1px;
}

.habit-track div button {
  width: 100%;
  height: 18px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
}

.habit-track [data-delete-habit] {
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.habit-track:hover [data-delete-habit],
.habit-track:focus-within [data-delete-habit] {
  opacity: 1;
  pointer-events: auto;
}

.habit-track div button.today {
  outline: 1px solid rgba(245, 243, 238, 0.8);
  outline-offset: 1px;
  background: rgba(245, 243, 238, 0.16);
}

.habit-track div span.done,
.habit-track div button.done {
  background: linear-gradient(180deg, rgba(110, 231, 183, 0.96), rgba(110, 231, 183, 0.28));
}

.habit-track div button.failed {
  background: linear-gradient(180deg, rgba(248, 113, 113, 0.96), rgba(248, 113, 113, 0.28));
}

.habit-track div button.done.today {
  box-shadow: 0 0 0 2px rgba(110, 231, 183, 0.16);
}

.habit-track div button.failed.today {
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.16);
}

.habit-track small {
  color: #8f98a9;
  font-size: 0.5rem;
  text-align: right;
}

.journal-button {
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.habit-track:hover .journal-button,
.habit-track:focus-within .journal-button {
  opacity: 1;
  pointer-events: auto;
}

.journal-button.active {
  color: #6ee7b7;
  border-color: rgba(110, 231, 183, 0.25);
  background: rgba(110, 231, 183, 0.08);
}

.project-zone-actions,
.modal-tools {
  display: flex;
  align-items: center;
  gap: 5px;
}

.project-tabs {
  display: flex;
  gap: 4px;
  overflow: auto;
  padding-bottom: 2px;
}

.project-subtabs {
  min-height: 22px;
}

.project-tabs button {
  min-width: 0;
  height: 22px;
  padding: 0 8px;
  border: 1px solid color-mix(in srgb, var(--tab-color), transparent 72%);
  border-radius: 999px;
  background: color-mix(in srgb, var(--tab-color), rgba(255, 255, 255, 0.035) 92%);
  color: color-mix(in srgb, var(--tab-color), white 28%);
  font-size: 0.56rem;
  white-space: nowrap;
}

.project-tabs button.active {
  border-color: color-mix(in srgb, var(--tab-color), white 28%);
  background: color-mix(in srgb, var(--tab-color), rgba(255, 255, 255, 0.08) 78%);
  color: #f5f3ee;
}

.projects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  gap: 6px;
  min-height: 0;
  overflow: auto;
}

.project {
  position: relative;
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  min-height: 94px;
  padding: 6px;
  transition: border-color 140ms ease, background 140ms ease;
}

.project.dragging {
  opacity: 0.48;
}

.project-main {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 6px;
  min-width: 0;
  padding-right: 40px;
  cursor: pointer;
}

.project-main:hover {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
}

.project-main img,
.project-thumb {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 8px;
}

.project-main img {
  object-fit: cover;
}

.project-thumb {
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.065);
  color: #f5f3ee;
  font-size: 0.62rem;
}

.project-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.project-title h3 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.68rem;
}

.project-name {
  font-weight: 500;
  color: #f5f3ee;
}

.project-age {
  color: color-mix(in srgb, var(--accent), white 20%);
  font-size: 0.52rem;
  white-space: nowrap;
}

.project-age-floating {
  position: absolute;
  bottom: 6px;
  right: 6px;
  z-index: 1;
}

.project-main p {
  margin-top: 1px;
  color: #8f98a9;
  font-size: 0.56rem;
}

.project-actions {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 0;
  opacity: 0;
  transition: opacity 140ms ease;
}

.project:hover .project-actions {
  opacity: 1;
}

.project-actions .mini-button {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  font-size: 0.58rem;
  background: rgba(8, 10, 15, 0.58);
}

.stats-card {
  display: grid;
  grid-template-rows: 34px minmax(0, 1fr);
  gap: 7px;
  min-height: 0;
  height: 100%;
  padding: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(15, 18, 26, 0.78);
}

.stats-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stats-head strong {
  display: block;
  font-size: 1.05rem;
  line-height: 0.9;
}

.segmented {
  display: flex;
  gap: 3px;
  padding: 3px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.segmented button {
  width: auto;
  height: 22px;
  padding: 0 7px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #8f98a9;
  font-size: 0.62rem;
}

.segmented button.active {
  background: rgba(245, 243, 238, 0.14);
  color: #f5f3ee;
}

.stacked-chart {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(16px, 1fr);
  align-items: end;
  gap: 5px;
  min-height: 0;
}

.chart-column {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 13px;
  align-items: end;
  gap: 3px;
  min-width: 0;
  height: 100%;
}

.chart-bar {
  position: relative;
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-start;
  align-self: end;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.055);
}

.chart-bar span {
  flex: 0 0 auto;
  min-height: 4px;
  background: var(--segment);
}

.chart-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 8;
  display: grid;
  gap: 3px;
  min-width: 128px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(8, 10, 15, 0.96);
  color: #dbe2ef;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(4px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.chart-bar:hover {
  overflow: visible;
}

.chart-bar:hover .chart-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.chart-tooltip strong {
  font-size: 0.66rem;
}

.chart-tooltip small {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #98a0af;
  font-size: 0.58rem;
}

.chart-tooltip i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--segment);
}

.chart-column small {
  overflow: hidden;
  color: #7b8495;
  font-size: 0.55rem;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-legend {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  overflow: hidden;
}

.stats-legend span {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  color: #8f98a9;
  font-size: 0.56rem;
  white-space: nowrap;
}

.stats-legend span::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--segment);
}

.task-list {
  display: grid;
  gap: 2px;
}

.project .task-list {
  gap: 1px;
}

.project .task {
  min-height: 16px;
  padding: 1px 2px;
  border-left-width: 1px;
  font-size: 0.58rem;
}

.project .task input {
  width: 10px;
  height: 10px;
}

.task {
  gap: 5px;
  min-width: 0;
  min-height: 18px;
  padding: 2px 3px;
  border-radius: 6px;
  color: #cfd5df;
  font-size: 0.7rem;
}

.task:hover {
  background: rgba(255, 255, 255, 0.055);
}

.task [data-delete-task] {
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.task:hover [data-delete-task],
.task:focus-within [data-delete-task] {
  opacity: 1;
  pointer-events: auto;
}

.task.important {
  background: rgba(250, 204, 21, 0.1);
  box-shadow: inset 2px 0 0 rgba(250, 204, 21, 0.82);
}

.task.overdue {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.14);
  color: #fecaca;
}

.task[draggable="true"] {
  cursor: grab;
}

.task.dragging,
.project.dragging {
  opacity: 0.48;
}

.task span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-project-name {
  margin-right: 4px;
  color: var(--project-accent, #8f98a9);
  font-weight: 500;
}

.task-subcategory-name {
  max-width: 64px;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #cfd6e2;
  font-size: 0.55rem;
}

.task-title {
  cursor: text;
  outline: none;
}

.task-title:focus {
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
}

.task small {
  margin-left: auto;
  overflow: hidden;
  color: #7b8495;
  font-size: 0.58rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-date-input {
  width: 58px;
  height: 18px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 5px;
  padding: 0 2px;
  background: rgba(255, 255, 255, 0.045);
  color: #8f98a9;
  font-size: 0.56rem;
}

.task-date-input.complete-date {
  color: #8ecfb0;
}

.task-icon.danger {
  margin-left: auto;
}

.task-date-input::-webkit-calendar-picker-indicator {
  display: none;
}

.task small + small {
  margin-left: 0;
}

.task-date {
  flex: 0 0 auto;
  color: #8f98a9;
}

.task-age {
  flex: 0 0 auto;
  color: #f87171;
  font-weight: 400;
}

.task.overdue .task-date,
.task.overdue .task-age,
.task.overdue small {
  color: #fecaca;
}

.task-icon {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #8f98a9;
  font-size: 0.66rem;
}

.task-icon:hover {
  background: rgba(255, 255, 255, 0.075);
  color: #f5f3ee;
}

.task-icon.star.active {
  color: #facc15;
}
.task-icon.star.active svg,
.task-icon.star.active svg path {
  fill: #facc15;
  stroke: #facc15;
}

.next-chip {
  display: grid;
  gap: 1px;
  min-width: 0;
  padding: 3px 7px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.045);
}

.next-chip span {
  color: #8f98a9;
  font-size: 0.58rem;
  text-transform: uppercase;
  text-align: right;
}

.next-chip strong {
  overflow: hidden;
  font-size: 0.694rem;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}

.next-chip small {
  overflow: hidden;
  color: #7f8796;
  font-size: 0.56rem;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.countdown {
  justify-content: stretch;
}

.countdown strong {
  font-size: 0.98rem;
}

.stopwatch-card {
  position: fixed;
  bottom: auto;
  z-index: 22;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 210px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(13, 16, 24, 0.92);
  backdrop-filter: blur(12px);
  cursor: grab;
  user-select: none;
  touch-action: none;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
}

.stopwatch-card.dragging {
  cursor: grabbing;
  border-color: rgba(110, 231, 183, 0.35);
}

.stopwatch-card.running {
  border-color: rgba(110, 231, 183, 0.42);
  background: linear-gradient(135deg, rgba(110, 231, 183, 0.16), rgba(13, 16, 24, 0.94));
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.38), 0 0 32px rgba(110, 231, 183, 0.16);
}

.stopwatch-card strong {
  display: block;
  font-size: 1.55rem;
  font-weight: 300;
  line-height: 1;
}

.stopwatch-actions {
  display: flex;
  gap: 6px;
}

.stopwatch-actions button {
  cursor: pointer;
}

.task.done {
  opacity: 0.58;
}

.task.done span {
  color: #747d8e;
  text-decoration: none;
}

.task-more {
  width: max-content;
  min-height: 18px;
  padding: 1px 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: #8f98a9;
  font-size: 0.64rem;
  cursor: pointer;
}

.task-more:hover {
  color: #f5f3ee;
  background: rgba(255, 255, 255, 0.075);
}

.fab-rail {
  position: fixed;
  right: calc(var(--safe-right) + 14px);
  bottom: calc(var(--safe-bottom) + 14px);
  z-index: 20;
  display: grid;
  gap: 7px;
}

.fab {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(245, 243, 238, 0.95);
  color: #111827;
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
}

.fab.primary {
  background: #6ee7b7;
  color: #06291b;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(5, 7, 12, 0.72);
  backdrop-filter: blur(14px);
}

.flow-panel,
.edit-panel,
.quick-panel {
  width: min(820px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(13, 16, 24, 0.97);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.5);
}

.edit-panel {
  width: min(660px, 100%);
  padding: 12px;
}

.quick-panel {
  width: min(520px, 100%);
  padding: 10px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-header.compact {
  padding: 8px;
}

.modal-header.icon-only {
  justify-content: flex-end;
  padding: 0 0 6px;
  border-bottom: 0;
}

.modal-header h2 {
  font-size: 1rem;
  font-weight: 400;
}

.ghost-icon {
  width: 30px;
  height: 30px;
}

.flow-body {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 250px;
  gap: 10px;
  padding: 12px;
}

.flow-checklist {
  display: grid;
  gap: 6px;
}

.flow-check {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 8px;
  min-height: 42px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.flow-check:has(input:checked) {
  border-color: rgba(110, 231, 183, 0.38);
  background: rgba(110, 231, 183, 0.12);
}

.flow-check > span {
  color: #6ee7b7;
}

.flow-check strong {
  font-size: 0.78rem;
}

.flow-check small {
  grid-column: 3;
  margin-top: -4px;
  color: #8f98a9;
  font-size: 0.66rem;
  line-height: 1.35;
}

.flow-detail {
  display: grid;
  align-content: center;
  gap: 10px;
  min-height: 0;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.breath-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.breath-orb {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border: 1px solid color-mix(in srgb, var(--breath, #6ee7b7), transparent 35%);
  border-radius: 999px;
  background: radial-gradient(circle, color-mix(in srgb, var(--breath, #6ee7b7), transparent 72%), rgba(147, 197, 253, 0.05));
  color: #f5f3ee;
  cursor: pointer;
}

.breath-orb.ready {
  --breath: #6ee7b7;
}

.breath-orb.inhale {
  --breath: #38bdf8;
}

.breath-orb.hold {
  --breath: #c4b5fd;
}

.breath-orb.exhale {
  --breath: #fbbf24;
}

.breath-orb.complete {
  --breath: #6ee7b7;
}

.breath-card.active .breath-orb.inhale {
  animation: breatheIn 4s ease-in-out infinite;
}

.breath-card.active .breath-orb.exhale {
  animation: breatheOut 6s ease-in-out infinite;
}

.breath-orb span {
  max-width: 88px;
  font-size: 1.65rem;
  line-height: 1;
  overflow-wrap: anywhere;
}

.breath-orb.complete span {
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.breath-card small {
  display: block;
  margin: 2px 0 8px;
  color: #8f98a9;
  font-size: 0.72rem;
}

#breathCycle {
  margin-top: 4px;
  color: #c7ceda;
}

.flow-footer,
.edit-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 2px 2px;
}

.flow-footer {
  justify-content: center;
}

.lets-go-button {
  display: grid;
  place-items: center;
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: #6ee7b7;
  color: #06291b;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 10px;
}

.quick-grid {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 96px 116px 34px 34px 34px;
  align-items: center;
  gap: 4px;
  padding: 0 2px 2px;
}

.quick-grid.has-project {
  grid-template-columns: minmax(160px, 1fr) 96px 116px 34px 34px 34px;
}

/* Task creator new layout */
.quick-task-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 2px;
}

.quick-task-title-wrap {
  position: relative;
}

.quick-task-title {
  width: 100%;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0 10px;
  background: rgba(8, 18, 36, 0.72);
  color: #f5f3ee;
  font-size: 0.82rem;
}

.quick-task-title:focus {
  outline: 1px solid rgba(110, 231, 183, 0.36);
  border-color: rgba(110, 231, 183, 0.36);
}

.quick-task-controls {
  display: flex;
  align-items: center;
  gap: 5px;
}

.quick-task-select {
  height: 32px;
  min-width: 80px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0 18px 0 7px;
  background: rgba(8, 18, 36, 0.72);
  color: #f5f3ee;
  font-size: 0.7rem;
  flex: 0 0 auto;
}

.quick-task-project-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  min-width: 80px;
  max-width: 150px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(8, 18, 36, 0.72);
  color: #8f98a9;
  font-size: 0.68rem;
  text-align: left;
  overflow: hidden;
  flex: 1 1 0;
  min-width: 0;
}

.quick-task-project-btn.has-project {
  border-color: color-mix(in srgb, var(--project-color, #6ee7b7), transparent 52%);
  color: color-mix(in srgb, var(--project-color, #6ee7b7), white 22%);
}

.quick-task-project-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-task-project-placeholder {
  color: #616b7a;
  font-size: 0.68rem;
}

.quick-task-est {
  width: 72px;
  height: 32px;
  flex: 0 0 72px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0 4px 0 8px;
  background: rgba(8, 18, 36, 0.72);
  color: #f5f3ee;
  font-size: 0.7rem;
  text-align: left;
}

.quick-task-est::-webkit-inner-spin-button {
  opacity: 1;
  height: 26px;
  cursor: pointer;
}

/* Project picker dropdown */
.project-picker-dropdown {
  position: fixed;
  z-index: 200;
  display: flex;
  flex-direction: column;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(12, 16, 26, 0.99);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.64);
  padding: 4px;
}

.project-picker-item {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 5px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #cfd6e2;
  font-size: 0.72rem;
  text-align: left;
  cursor: pointer;
}

.project-picker-item:hover,
.project-picker-item.focused {
  background: rgba(255, 255, 255, 0.07);
  color: #f5f3ee;
}

.project-picker-item .project-picker-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--project-color, #6ee7b7);
}

.project-picker-item span:nth-child(2) {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-picker-item small {
  color: #616b7a;
  font-size: 0.6rem;
  white-space: nowrap;
  margin-left: auto;
}

.project-picker-empty {
  padding: 10px 12px;
  color: #616b7a;
  font-size: 0.68rem;
}

/* Fix icon-button icon centering in task creator */
.quick-task-controls .icon-button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(17, 31, 54, 0.72);
  color: #aebdd1;
}

.quick-task-controls .icon-button svg {
  display: block;
}

.quick-task-controls .icon-button:hover {
  background: rgba(28, 48, 78, 0.82);
  color: #f8fafc;
}

.quick-task-controls .star-toggle.active {
  color: #facc15;
  border-color: rgba(250, 204, 21, 0.25);
  background: rgba(250, 204, 21, 0.1);
}

.quick-task-controls .icon-button[type="submit"] {
  border-color: rgba(110, 231, 183, 0.22);
  background: rgba(110, 231, 183, 0.1);
  color: #6ee7b7;
}

.quick-task-controls .icon-button[type="submit"]:hover {
  background: rgba(110, 231, 183, 0.18);
}

.star-toggle.active {
  color: #facc15;
  background: rgba(250, 204, 21, 0.13);
}

.project-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 110px;
  gap: 8px;
  padding: 10px 2px 8px;
}

.project-form-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.project-form-grid .wide {
  grid-column: 1 / -1;
}

.project-color-panel {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.project-color-panel > span {
  color: #8f98a9;
  font-size: 0.68rem;
}

.project-color-actions {
  display: grid;
  grid-template-columns: 34px;
  align-items: center;
}

.project-color-preview {
  width: 34px;
  height: 34px;
  border: 1px solid color-mix(in srgb, var(--project-color), white 14%);
  border-radius: 8px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--project-color), white 10%), var(--project-color));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.project-color-picker {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.project-form-grid span {
  color: #8f98a9;
  font-size: 0.68rem;
}

.project-form-grid input,
.project-form-grid select {
  width: 100%;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0 9px;
}

.project-form-grid input[type="file"] {
  display: grid;
  align-items: center;
  padding: 7px 9px;
}

@media (max-width: 980px) {
  .project-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .project-color-panel {
    grid-column: 1 / -1;
  }
}

.quick-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.quick-grid .task-entry {
  grid-column: auto;
}

.quick-grid span {
  color: #8f98a9;
  font-size: 0.68rem;
}

.quick-grid input,
.quick-grid select {
  width: 100%;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0 9px;
}

.quick-grid input[name="title"]:focus {
  outline: 1px solid rgba(110, 231, 183, 0.36);
  border-color: rgba(110, 231, 183, 0.36);
}

.quick-project-pill {
  overflow: hidden;
  padding: 7px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: #98a0af;
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-tasks-panel {
  max-width: 380px;
}

.project-task-modal-list {
  display: grid;
  gap: 3px;
  max-height: min(294px, calc(100dvh - 180px));
  overflow: auto;
  padding-top: 6px;
}

.project-task-modal-row {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 5px;
  min-height: 18px;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.03);
  color: #d7dce5;
  font-size: 0.62rem;
}

.project-task-modal-row.done {
  opacity: 0.58;
}

.project-task-modal-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-task-modal-row small {
  color: #facc15;
  text-align: center;
}

.ptm-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
}

.ptm-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ptm-subs {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.ptm-sub {
  font-size: 0.54rem;
  color: rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
  padding: 1px 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.ptm-sub.done {
  text-decoration: line-through;
  opacity: 0.5;
}

.milestone-panel,
.journal-panel {
  width: min(540px, 100%);
}

.milestone-shell,
.journal-body {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.milestone-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.milestone-meta strong {
  color: #f5f3ee;
  font-size: 1.2rem;
}

.milestone-meta small {
  color: #8f98a9;
  font-size: 0.62rem;
}

.milestone-timeline {
  display: grid;
  gap: 8px;
  max-height: min(460px, calc(100dvh - 220px));
  overflow: auto;
  padding-right: 4px;
}

.milestone-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 18px;
  gap: 8px;
  align-items: center;
}

.milestone-rail {
  position: relative;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.milestone-dot {
  width: 10px;
  height: 10px;
  margin-top: 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent, #6ee7b7), white 10%);
}

.milestone-line {
  width: 2px;
  flex: 1 1 auto;
  min-height: 18px;
  margin-top: 2px;
  background: rgba(255, 255, 255, 0.12);
}

.milestone-fields {
  display: grid;
  gap: 6px;
}

.milestone-fields input,
.journal-field textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: #f5f3ee;
}

.milestone-fields input {
  height: 32px;
  padding: 0 9px;
}

.journal-field {
  display: grid;
  gap: 6px;
}

.journal-field span {
  color: #8f98a9;
  font-size: 0.68rem;
}

.journal-field textarea {
  min-height: 110px;
  padding: 10px;
  resize: vertical;
}

.journal-button {
  width: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  font-size: 0.46rem;
}

.edit-grid label {
  display: grid;
  gap: 5px;
}

.edit-grid span {
  color: #8f98a9;
  font-size: 0.68rem;
}

.edit-grid input,
.edit-grid select {
  width: 100%;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0 9px;
}

.editor-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 10px 0;
}

.settings-panel {
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(250px, 0.85fr) minmax(260px, 1fr);
  gap: 10px;
  padding: 10px 0 0;
}

.settings-section {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
}

.settings-section h3 {
  color: #8f98a9;
  font-size: 0.72rem;
}

.category-editor-list {
  display: grid;
  gap: 6px;
}

.category-editor-row,
.category-add-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 38px 26px;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 5px;
  border: 1px solid color-mix(in srgb, var(--category), transparent 72%);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.subcategory-editor {
  grid-column: 1 / -1;
  display: grid;
  gap: 5px;
  min-width: 0;
}

.subcategory-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.subcategory-pill {
  display: grid;
  grid-template-columns: minmax(54px, 1fr) 18px;
  align-items: center;
  gap: 3px;
  max-width: 132px;
  padding: 2px 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
}

.subcategory-pill input {
  height: 20px;
  border: 0;
  background: transparent;
  padding: 0 4px;
  font-size: 0.58rem;
}

.subcategory-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  gap: 5px;
}

.subcategory-add-row input {
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 7px;
  padding: 0 7px;
}

.category-editor-row[draggable="true"] {
  cursor: grab;
}

.category-editor-row.dragging {
  opacity: 0.55;
}

.category-editor-row.drag-over {
  border-color: rgba(245, 243, 238, 0.52);
  background: rgba(255, 255, 255, 0.075);
}

.category-editor-row > span {
  color: var(--category);
  text-align: center;
  font-size: 0.7rem;
}

.category-editor-row input,
.category-add-row input {
  min-width: 0;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 7px;
  padding: 0 7px;
}

.category-editor-row input[type="color"],
.category-add-row input[type="color"] {
  width: 38px;
  height: 28px;
  justify-self: center;
  padding: 2px;
}

.category-color-input {
  cursor: pointer;
  background: rgba(255, 255, 255, 0.055);
}

.category-editor-row .subcategory-pill input {
  height: 20px;
  border: 0;
  background: transparent;
  padding: 0 4px;
  font-size: 0.58rem;
}

.category-editor-row .subcategory-add-row input {
  height: 24px;
  padding: 0 7px;
}

#deleteBlockButton {
  font-size: 0.88rem;
}

.category-add-row {
  grid-template-columns: minmax(0, 1fr) 38px 26px;
}

.compact-list {
  grid-template-columns: 1fr;
  margin: 0;
}

.block-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 26px;
  gap: 5px;
  align-items: center;
}

.block-switch,
.editor-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  min-width: 0;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: #dbe2ef;
  text-align: left;
}

.block-switch.active,
.editor-list button.active {
  border-color: rgba(147, 197, 253, 0.65);
  background: rgba(147, 197, 253, 0.1);
}

.editor-list strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
}

.editor-list span,
.editor-list small {
  color: #8f98a9;
  font-size: 0.64rem;
}

.danger {
  color: #fecaca;
  background: rgba(248, 113, 113, 0.13);
}

.archive-card {
  position: fixed;
  right: calc(var(--safe-right) + 74px);
  bottom: calc(var(--safe-bottom) + 14px);
  z-index: 19;
  width: min(260px, calc(100vw - 120px - var(--safe-right)));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(13, 16, 24, 0.92);
  backdrop-filter: blur(12px);
}

.archive-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: #dbe2ef;
  font-size: 0.68rem;
}

.archive-toggle strong {
  color: #98a0af;
  font-size: 0.7rem;
}

.archive-list {
  display: grid;
  gap: 4px;
  max-height: 160px;
  overflow: auto;
  padding: 0 8px 8px;
}

.archive-task {
  display: grid;
  gap: 1px;
  padding: 5px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.045);
}

.archive-task span {
  overflow: hidden;
  font-size: 0.66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-task small,
.archive-list p {
  color: #7b8495;
  font-size: 0.58rem;
}

@keyframes breatheIn {
  from {
    transform: scale(0.84);
  }

  to {
    transform: scale(1.08);
  }
}

@keyframes breatheOut {
  from {
    transform: scale(1.08);
  }

  to {
    transform: scale(0.84);
  }
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(320px, 1fr) minmax(220px, 0.58fr) minmax(260px, 0.78fr);
    height: 100dvh;
    overflow: hidden;
    gap: 8px;
  }

  .flow-body {
    grid-template-columns: 1fr 220px;
  }

  .projects {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .left-pane {
    grid-template-rows: 88px minmax(0, 1fr);
  }

  .side-pane {
    grid-template-rows: auto var(--side-top, 140px) var(--habit-height, 150px) minmax(0, 1fr);
    gap: 6px;
  }
}

@media (max-width: 560px) {
  .shell {
    height: 100dvh;
    min-height: 100dvh;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(244px, 0.92fr) minmax(220px, 0.72fr) minmax(220px, 0.9fr);
    overflow: hidden;
    gap: 7px;
  }

  .topbar {
    grid-template-rows: 22px minmax(0, 1fr);
  }

  .brand {
    min-width: 94px;
  }

  h1 {
    font-size: 0.78rem;
  }

  .section-heading h2 {
    font-size: 0.68rem;
  }

  .flow-body {
    grid-template-columns: 1fr;
  }

  .left-pane {
    grid-template-rows: 76px minmax(0, 1fr);
    gap: 9px;
  }

  .right-pane {
    grid-template-rows: 24px 24px minmax(0, 1fr);
    gap: 5px;
    padding: 5px;
  }

  .side-pane {
    grid-template-rows: auto var(--side-top, 140px) var(--habit-height, 150px) minmax(0, 1fr);
    gap: 6px;
  }

  .now-card {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    padding: 9px 92px;
  }

  .now-copy {
    grid-template-columns: 1fr;
  }

  .countdown,
  .next-chip {
    grid-column: auto;
    grid-row: auto;
    width: 86px;
  }

  .schedule-switcher {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .timeline {
    min-height: 680px;
    grid-template-columns: 32px 1fr;
    gap: 5px;
  }

  .time-ruler span {
    font-size: 0.56rem;
  }

  .task-board {
    grid-template-rows: repeat(4, minmax(0, 1fr));
    gap: 5px;
    padding: 6px;
  }

  .projects,
  .editor-list,
  .edit-grid,
  .project-form-grid {
    grid-template-columns: 1fr;
  }

  .projects {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }

  .project {
    min-height: 80px;
    padding: 5px;
  }

  .project-main {
    grid-template-columns: 30px minmax(0, 1fr);
    padding-right: 36px;
  }

  .project-main img,
  .project-thumb {
    width: 30px;
    height: 30px;
  }

  .project-actions .mini-button {
    width: 20px;
    height: 20px;
  }

  .project .task {
    display: none;
  }

  .stats-card {
    grid-template-rows: 30px minmax(0, 1fr);
    padding: 7px;
  }

  .chart-tooltip {
    min-width: 108px;
  }

  .quick-grid {
    grid-template-columns: minmax(0, 1fr) 72px 84px 32px 32px 32px;
  }

  .quick-grid.has-project {
    grid-template-columns: minmax(0, 1fr) 72px 84px 32px 32px 32px;
  }

  .quick-project-pill {
    grid-column: 1 / -1;
  }

  .project-form-grid input,
  .project-form-grid select,
  .quick-grid input,
  .quick-grid select {
    height: 30px;
  }

  .time-block {
    grid-template-columns: minmax(74px, 1fr) minmax(58px, 0.7fr) 48px 30px;
    gap: 4px;
    padding-inline: 5px;
  }

  .time-block span {
    display: none;
  }

  .fab-rail {
    right: calc(var(--safe-right) + 10px);
    bottom: calc(var(--safe-bottom) + 10px);
  }

  .archive-card {
    right: calc(var(--safe-right) + 62px);
    bottom: calc(var(--safe-bottom) + 10px);
    width: min(220px, calc(100vw - 92px - var(--safe-right)));
  }

  .stopwatch-card {
    min-width: 184px;
    max-width: calc(100vw - 28px);
  }
}

/* Gradient color swatch picker */
.gradient-swatch-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
}

.gradient-swatch {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 7px;
  border: 2px solid transparent;
  background-color: var(--swatch);
  cursor: pointer;
  transition: transform 0.1s, border-color 0.1s;
  overflow: hidden;
}

.gradient-swatch::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.35) 0%, transparent 50%, rgba(0,0,0,0.2) 100%);
  border-radius: inherit;
}

.gradient-swatch:hover {
  transform: scale(1.12);
}

.gradient-swatch.active {
  border-color: rgba(255, 255, 255, 0.85);
  transform: scale(1.1);
}

.gradient-swatch.custom-swatch {
  background: conic-gradient(from 0deg, #ef4444, #f97316, #eab308, #6ee7b7, #a78bfa, #f4a6c0, #ec4899, #ef4444);
  color: transparent;
  font-size: 0;
}

/* Timeline drag selection overlay */
.timeline-selection {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 3;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 4px;
  pointer-events: none;
}

.timeline-selection.hidden {
  display: none;
}

/* Timezone picker options */
.tz-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #f5f3ee;
  font-size: 0.7rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.1s;
}

.tz-option:hover {
  background: rgba(255, 255, 255, 0.06);
}

.tz-option.active {
  background: rgba(110, 231, 183, 0.12);
  border-color: rgba(110, 231, 183, 0.3);
}

.tz-option small {
  color: #8f98a9;
  font-size: 0.62rem;
}

/* Overrides for the newer compact interactions */
.stat-card {
  cursor: pointer;
  appearance: none;
  font: inherit;
  text-align: inherit;
}

.stat-card.active {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
}

.stats-drill {
  display: grid;
  gap: 6px;
  min-height: 0;
}

.stats-drill-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: #d7dce5;
  font-size: 0.62rem;
}

.stats-drill-head small {
  color: #8f98a9;
}

.stats-drill-list {
  display: grid;
  gap: 4px;
  overflow: auto;
  padding: 4px 2px 8px;
  max-height: min(calc(100dvh - 120px), 520px);
}

.stats-drill-row {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 36px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.68rem;
}

.stats-drill-row.done {
  opacity: 0.55;
}

.stats-drill-check {
  width: 13px;
  height: 13px;
  accent-color: #6ee7b7;
  flex: 0 0 auto;
}

.stats-drill-done-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  justify-self: center;
}

.stats-drill-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.stats-drill-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #d7dce5;
}

.stats-drill-row small {
  color: #8f98a9;
  font-size: 0.56rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project {
  border-color: rgba(255, 255, 255, 0.07);
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.project:hover {
  border-color: color-mix(in srgb, var(--accent), white 18%);
  background: rgba(255, 255, 255, 0.04);
}

.project-actions {
  opacity: 0;
  pointer-events: none;
}

.project:hover .project-actions {
  opacity: 1;
  pointer-events: auto;
}

.project-age-floating {
  position: absolute;
  right: 8px;
  bottom: 6px;
  z-index: 1;
  color: color-mix(in srgb, var(--accent), white 16%);
  font-size: 0.54rem;
}

.task {
  transition: background 120ms ease, border-color 120ms ease;
}

.task:hover {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.08);
}

.task-age {
  flex: 0 0 auto;
  color: #8f98a9;
}

.task.overdue .task-age {
  color: #fecaca;
}

.task-title,
.habit-track strong {
  transition: background 120ms ease, box-shadow 120ms ease;
}

.task-title:focus,
.habit-track:hover {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.habit-track:hover {
  background: rgba(255, 255, 255, 0.035);
}

.habit-track div button:hover {
  outline: 1px solid rgba(255, 255, 255, 0.55);
  outline-offset: 1px;
}

.milestone-panel,
.journal-panel,
.habit-log-panel {
  width: min(640px, 100%);
}

.project-timeline-start {
  display: block;
  margin-top: 2px;
  color: #8f98a9;
  font-size: 0.62rem;
}

.milestone-shell,
.journal-body {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.milestone-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.milestone-meta strong {
  color: #f5f3ee;
  font-size: 1.2rem;
}

.milestone-meta small {
  color: #8f98a9;
  font-size: 0.62rem;
}

.milestone-timeline-viewport {
  min-height: 0;
  max-height: min(540px, calc(100dvh - 220px));
  overflow: auto;
  padding-right: 4px;
}

.milestone-timeline-canvas {
  position: relative;
  width: 100%;
  height: calc(var(--timeline-height, 480px) * var(--timeline-scale, 1));
  min-height: calc(var(--timeline-height, 480px) * var(--timeline-scale, 1));
}

.milestone-axis {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.3) 8%, rgba(255,255,255,0.18) 92%, transparent);
}

.milestone-now-marker {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  justify-items: center;
  gap: 4px;
  pointer-events: none;
}

.milestone-now-marker span {
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(248, 113, 113, 0.16);
  color: #fecaca;
  font-size: 0.48rem;
  text-transform: uppercase;
}

.milestone-now-marker i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #f87171;
  box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.5);
  animation: pulseDot 1.8s ease-out infinite;
}

.milestone-node {
  position: absolute;
  left: 0;
  right: 0;
  display: grid;
  align-items: center;
  min-height: 44px;
}

.milestone-rail {
  display: grid;
  align-items: center;
  width: 50%;
  gap: 8px;
}

.milestone-rail.left {
  grid-template-columns: minmax(0, 1fr) 28px;
  justify-self: start;
}

.milestone-rail.right {
  grid-template-columns: 28px minmax(0, 1fr);
  justify-self: end;
}

.milestone-card {
  display: grid;
  gap: 6px;
  padding: 6px 4px;
  border: none;
  border-radius: 6px;
  background: transparent;
}

.milestone-card input,
.journal-field textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: #f5f3ee;
}

.milestone-card input {
  height: 32px;
  padding: 0 9px;
}

.milestone-card small {
  color: #8f98a9;
  font-size: 0.58rem;
}

.milestone-connector {
  position: relative;
  display: block;
  height: 1px;
  background: rgba(255, 255, 255, 0.25);
}

.milestone-rail.left .milestone-connector::after,
.milestone-rail.right .milestone-connector::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent, #6ee7b7), white 10%);
  transform: translateY(-50%);
}

.milestone-rail.left .milestone-connector::after {
  right: -7px;
}

.milestone-rail.right .milestone-connector::after {
  left: -7px;
}

.milestone-delete {
  width: 18px;
  height: 18px;
  justify-self: end;
}

.journal-field {
  display: grid;
  gap: 6px;
}

.journal-field span {
  color: #8f98a9;
  font-size: 0.68rem;
}

.journal-field textarea {
  min-height: 110px;
  padding: 10px;
  resize: vertical;
}

.habit-log-list {
  display: grid;
  gap: 6px;
  max-height: min(420px, calc(100dvh - 190px));
  overflow: auto;
  padding: 2px 12px 12px;
}

.habit-log-row {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.habit-log-row.failed {
  border: 1px solid rgba(248, 113, 113, 0.22);
}

.habit-log-row.done {
  border: 1px solid rgba(110, 231, 183, 0.18);
}

.habit-log-row strong {
  color: #f5f3ee;
  font-size: 0.66rem;
}

.habit-log-row small {
  color: #8f98a9;
  font-size: 0.54rem;
}

.habit-log-row p {
  color: #d7dce5;
  font-size: 0.62rem;
  line-height: 1.4;
}

.journal-button {
  width: 18px;
  height: 18px;
}

.timeline-tooltip {
  pointer-events: none;
}

@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(248, 113, 113, 0); }
  100% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0); }
}

:root {
  font-family: Inter, Geist, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --app-serif: "Fraunces", "Playfair Display", Georgia, "Times New Roman", serif;
  --app-bg-a: #0d0820;
  --app-bg-b: #150d30;
  --app-bg-c: #1d1442;
  --app-surface: rgba(31, 22, 54, 0.62);
  --app-surface-strong: rgba(31, 22, 54, 0.86);
  --app-border: rgba(176, 156, 214, 0.18);
  --app-border-soft: rgba(214, 196, 248, 0.1);
  --app-lavender: #b9a3f7;
  --app-mint: #7ee8c4;
  --app-pink: #f4a6c0;
  --app-peach: #f7b58e;
  --app-blue: #b9a3f7;
  --app-blue-soft: #7ee8c4;
  --app-purple: #f4a6c0;
  --app-orange: #f7b58e;
  --app-success: #6ee7b7;
  --app-text: #f4eefc;
  --app-text-soft: #a99dc4;
  --app-aurora: linear-gradient(120deg, #b9a3f7 0%, #f4a6c0 42%, #f7b58e 64%, #7ee8c4 100%);
}

body {
  background:
    radial-gradient(720px 460px at 14% 6%, rgba(185, 163, 247, 0.3), transparent 60%),
    radial-gradient(680px 420px at 86% 10%, rgba(244, 166, 192, 0.24), transparent 60%),
    radial-gradient(620px 520px at 50% 108%, rgba(126, 232, 196, 0.16), transparent 62%),
    radial-gradient(520px 360px at 96% 78%, rgba(247, 181, 142, 0.12), transparent 60%),
    linear-gradient(165deg, var(--app-bg-a) 0%, var(--app-bg-b) 48%, var(--app-bg-c) 100%);
  color: var(--app-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

/* Elegant serif display for focal titles (meditation aesthetic) */
h1,
.now-copy h2,
#nowTitle,
.clock-card strong,
.proj-name,
.project-title h3,
.project-name,
.stats-head strong,
.auth-brand h1,
.modal-head h2,
.modal-title {
  font-family: var(--app-serif);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.now-copy h2,
#nowTitle {
  font-size: 1.02rem;
  letter-spacing: 0;
}

.inspiration-card blockquote p,
.affirmation-row span,
.scripture-text {
  font-family: var(--app-serif);
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
}

body::before {
  background:
    linear-gradient(90deg, rgba(167, 139, 250, 0.05), transparent 28%, transparent 72%, rgba(244, 166, 192, 0.05)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 12%, transparent 88%, rgba(255, 255, 255, 0.02));
  mix-blend-mode: screen;
}

body::after {
  background:
    radial-gradient(circle at 50% 0%, rgba(126, 232, 196, 0.12), transparent 22%),
    radial-gradient(circle at 50% 100%, rgba(167, 139, 250, 0.08), transparent 26%);
  opacity: 0.85;
}

.shell {
  gap: 14px;
}

::selection {
  background: rgba(167, 139, 250, 0.32);
  color: #fff;
}

.right-pane,
.project,
.task-board,
.project-zone,
.habits-card,
.inspiration-card,
.stats-card,
.quick-panel,
.clock-card,
.now-card,
.task-column,
.task,
.time-block,
.project-tabs button,
.segmented button,
.countdown,
.archive-card,
.archive-toggle,
.notification-card,
.habit-track,
.habit-log-row,
.project-task-modal-row,
.milestone-card {
  border-radius: 24px;
  border: 1px solid var(--app-border-soft);
  background: var(--app-surface);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.02) inset,
    0 18px 48px rgba(0, 0, 0, 0.32),
    0 0 40px rgba(167, 139, 250, 0.12);
}

.right-pane,
.project-zone,
.habits-card,
.inspiration-card,
.stats-card,
.task-board {
  border-color: rgba(176, 156, 214, 0.16);
}

.quick-panel {
  border-color: rgba(176, 156, 214, 0.18);
  background: linear-gradient(180deg, rgba(26, 18, 48, 0.95), rgba(17, 12, 34, 0.9));
}

.project-zone,
.stats-card,
.habits-card,
.inspiration-card,
.task-board {
  position: relative;
  overflow: hidden;
}

.project-zone::before,
.stats-card::before,
.habits-card::before,
.inspiration-card::before,
.task-board::before,
.right-pane::before,
.quick-panel::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 20%),
    radial-gradient(circle at 20% 0%, rgba(167, 139, 250, 0.12), transparent 26%),
    radial-gradient(circle at 100% 0%, rgba(244, 166, 192, 0.08), transparent 20%);
  opacity: 0.7;
}

.eyebrow,
.section-heading h2,
.timeblock-head h2,
.project-zone-head h2,
.habit-chart-nav strong,
.clock-card span,
.clock-card small,
.project-main p,
.task-column h2 span,
.habit-track small,
.task small,
.stats-drill-head small,
.chart-column small,
.archive-toggle strong,
.archive-toggle span,
.project-age,
.task-age,
.milestone-card small,
.habit-log-row small,
.journal-field span {
  color: var(--app-text-soft);
}

h1 {
  font-weight: 700;
}

h2,
h3 {
  font-weight: 600;
}

.section-heading h2,
.timeblock-head h2,
.project-zone-head h2,
.stats-card .eyebrow,
.habits-card .eyebrow,
.inspiration-card .eyebrow {
  color: var(--app-text-soft);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.mini-button,
.icon-button,
.fab,
.ghost-icon,
.task-icon,
.task-more,
.archive-toggle,
.segmented button,
.project-tabs button,
.schedule-switcher button,
.time-block,
.task-column,
.project,
.habit-track div button,
.habit-subtabs button,
.project-task-modal-row,
.habit-log-row,
.chart-bar,
.time-grid,
.timeline-scroll {
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease,
    background 220ms ease,
    color 220ms ease,
    opacity 220ms ease;
}

.icon-button,
.mini-button,
.fab,
.ghost-icon,
.task-icon,
.task-more {
  border-color: rgba(176, 156, 214, 0.2);
  background: rgba(32, 23, 56, 0.72);
  color: #ece6fb;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.24);
}

.icon-button:hover,
.mini-button:hover,
.fab:hover,
.ghost-icon:hover,
.task-icon:hover,
.task-more:hover {
  transform: translateY(-1px);
  border-color: rgba(126, 232, 196, 0.42);
  background: rgba(48, 38, 78, 0.88);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.34),
    0 0 18px rgba(167, 139, 250, 0.16);
}

.mini-button.active,
.segmented button.active,
.project-tabs button.active,
.habit-subtabs button.active {
  border-color: rgba(126, 232, 196, 0.55);
  background: linear-gradient(180deg, rgba(167, 139, 250, 0.32), rgba(167, 139, 250, 0.12));
  color: #fff;
  box-shadow: 0 0 0 1px rgba(126, 232, 196, 0.12) inset, 0 0 24px rgba(167, 139, 250, 0.18);
}

.now-card {
  border-color: rgba(126, 232, 196, 0.32);
  background:
    linear-gradient(180deg, rgba(26, 18, 48, 0.94), rgba(26, 18, 48, 0.8)),
    radial-gradient(circle at 50% 0%, rgba(167, 139, 250, 0.22), transparent 28%);
  box-shadow:
    0 0 0 1px rgba(126, 232, 196, 0.12) inset,
    0 22px 50px rgba(0, 0, 0, 0.3),
    0 0 36px rgba(167, 139, 250, 0.16);
}

.now-copy p,
.countdown strong,
.clock-card strong,
.clock-card small,
.notification-card strong,
.notification-card span,
.notification-card small {
  text-shadow: 0 0 18px rgba(167, 139, 250, 0.12);
}

.clock-card strong {
  font-size: 1.7rem;
  letter-spacing: 0.02em;
}

.clock-card i {
  color: #7ee8c4;
}

.time-grid {
  border: 1px solid rgba(176, 156, 214, 0.14);
  background:
    linear-gradient(180deg, rgba(26, 18, 48, 0.82), rgba(17, 12, 34, 0.86)),
    linear-gradient(90deg, rgba(167, 139, 250, 0.05), transparent 20%, transparent 80%, rgba(244, 166, 192, 0.05));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.time-grid > span {
  background: linear-gradient(90deg, rgba(126, 232, 196, 0.14), rgba(255, 255, 255, 0.05), rgba(244, 166, 192, 0.12));
}

.time-block {
  border-radius: 18px;
  border-color: color-mix(in srgb, var(--accent), rgba(176, 156, 214, 0.28) 48%);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent), rgba(26, 18, 48, 0.92) 84%), rgba(26, 18, 48, 0.96)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.22),
    0 0 28px color-mix(in srgb, var(--accent), transparent 82%);
}

.time-block:hover {
  transform: translateY(-2px);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.28),
    0 0 34px color-mix(in srgb, var(--accent), transparent 78%);
}

.time-block.current {
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent), transparent 35%) inset,
    0 18px 40px rgba(0, 0, 0, 0.28),
    0 0 42px color-mix(in srgb, var(--accent), transparent 72%);
}

.time-block strong {
  font-weight: 600;
}

.time-block span,
.time-block time,
.time-block small {
  color: rgba(230, 224, 246, 0.82);
}

.now-line {
  background: linear-gradient(90deg, rgba(126, 232, 196, 0), rgba(126, 232, 196, 1), rgba(126, 232, 196, 0));
  box-shadow: 0 0 18px rgba(126, 232, 196, 0.76);
}

.now-line::before,
.hover-line::before {
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.35);
}

.hover-line {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0));
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.42);
}

.hover-line span {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.95);
}

.task-column {
  padding: 10px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(26, 18, 48, 0.76), rgba(17, 12, 34, 0.88));
}

.task-column h2 {
  font-weight: 600;
}

.category-task-list {
  gap: 6px;
}

.task {
  border: 1px solid rgba(176, 156, 214, 0.16);
  background: rgba(32, 23, 56, 0.7);
}

.task:hover {
  border-color: rgba(126, 232, 196, 0.28);
  background: rgba(48, 38, 78, 0.82);
  box-shadow: 0 0 0 1px rgba(126, 232, 196, 0.08) inset, 0 10px 24px rgba(0, 0, 0, 0.22);
}

.task.done {
  background: rgba(32, 23, 56, 0.62);
}

.task.done span {
  color: rgba(230, 224, 246, 0.78);
}

.task.important {
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.18) inset;
}

.task.overdue {
  border-color: rgba(248, 113, 113, 0.28);
  background: rgba(127, 29, 29, 0.14);
}

.task-title {
  color: #fff;
}

.task-project-name {
  color: color-mix(in srgb, var(--project-accent, var(--app-blue)), white 12%);
}

.task-subcategory-name {
  border-color: rgba(126, 232, 196, 0.22);
  background: rgba(126, 232, 196, 0.08);
  color: #ece6fb;
}

.project-zone,
.stats-card,
.habits-card,
.inspiration-card,
.project,
.task-board,
.right-pane {
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.3),
    0 0 42px rgba(167, 139, 250, 0.1);
}

.project-zone-head h2,
.stats-head .eyebrow,
.project-title h3,
.task-column h2,
.project-main p,
.habits-card .eyebrow {
  color: rgba(255, 255, 255, 0.94);
}

.project-tabs,
.segmented {
  padding: 2px;
  border-radius: 999px;
  background: rgba(32, 23, 56, 0.6);
}

.project-tabs button,
.segmented button,
.habit-subtabs button,
.schedule-switcher button {
  border-radius: 999px;
  background: transparent;
}

.projects {
  gap: 12px;
}

.project {
  overflow: hidden;
  border-radius: 22px;
}

.project:hover {
  border-color: rgba(126, 232, 196, 0.34);
  box-shadow: 0 0 0 1px rgba(126, 232, 196, 0.12) inset, 0 18px 36px rgba(0, 0, 0, 0.32), 0 0 36px rgba(167, 139, 250, 0.12);
}

.project-main img,
.project-thumb {
  border: 1px solid rgba(176, 156, 214, 0.18);
  border-radius: 18px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02) inset, 0 10px 24px rgba(0, 0, 0, 0.24);
}

.project-main p {
  font-size: 0.64rem;
}

.project-actions .mini-button,
.project-zone-actions .mini-button {
  background: rgba(32, 23, 56, 0.9);
}

.project-age-floating {
  color: rgba(125, 211, 252, 0.8);
  font-weight: 500;
}

.stats-card,
.habits-card,
.inspiration-card,
.project-zone {
  padding: 12px;
}

.stats-card .today-stats {
  gap: 10px;
}

.stat-card {
  position: relative;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(32, 23, 56, 0.8), rgba(17, 12, 34, 0.9));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), 0 10px 24px rgba(0, 0, 0, 0.2);
}

.stat-card::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  content: "";
  pointer-events: none;
  background: linear-gradient(180deg, rgba(167, 139, 250, 0.14), transparent 52%);
  opacity: 0.7;
}

.stat-card strong {
  color: #fff;
  text-shadow: 0 0 18px rgba(167, 139, 250, 0.16);
}

.stats-drill {
  border-color: rgba(126, 232, 196, 0.16);
  background: rgba(32, 23, 56, 0.68);
}

.chart-bar {
  border: 1px solid rgba(176, 156, 214, 0.12);
  background: rgba(32, 23, 56, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.chart-bar span {
  box-shadow: 0 0 14px color-mix(in srgb, var(--segment), transparent 42%);
  filter: saturate(1.15);
}

.chart-tooltip {
  border: 1px solid rgba(176, 156, 214, 0.18);
  background: rgba(12, 8, 26, 0.92);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
}

.chart-tooltip strong {
  color: #fff;
}

.project-task-modal-row,
.habit-track,
.habit-log-row,
.milestone-card {
  background: rgba(32, 23, 56, 0.72);
}

.habit-track {
  border-color: rgba(176, 156, 214, 0.14);
}

.habit-track:hover {
  border-color: rgba(126, 232, 196, 0.24);
  box-shadow: 0 0 0 1px rgba(126, 232, 196, 0.08) inset, 0 10px 24px rgba(0, 0, 0, 0.2);
}

.habit-track div button {
  border-color: rgba(176, 156, 214, 0.12);
  background: rgba(30, 22, 52, 0.8);
}

.habit-track div button.done {
  background: rgba(110, 231, 183, 0.9);
  box-shadow: 0 0 16px rgba(110, 231, 183, 0.22);
}

.habit-track div button.failed {
  background: rgba(248, 113, 113, 0.9);
  box-shadow: 0 0 16px rgba(248, 113, 113, 0.22);
}

.habit-track small {
  color: rgba(176, 156, 214, 0.9);
}

.habit-track:hover .journal-button,
.habit-track:focus-within .journal-button {
  box-shadow: 0 0 16px rgba(167, 139, 250, 0.18);
}

.inspiration-card blockquote {
  text-shadow: 0 0 20px rgba(245, 158, 11, 0.08);
}

.inspiration-card blockquote p,
.affirmation-row span,
.affirmation-row {
  color: #f7d46a;
}

.affirmation-row {
  border: 1px solid rgba(245, 158, 11, 0.12);
  background: rgba(20, 20, 30, 0.38);
}

.timeline-scroll,
.milestone-timeline-viewport {
  scrollbar-color: rgba(126, 232, 196, 0.6) rgba(32, 23, 56, 0.3);
}

.timeline-scroll::-webkit-scrollbar,
.milestone-timeline-viewport::-webkit-scrollbar,
.habit-log-list::-webkit-scrollbar,
.category-task-list::-webkit-scrollbar,
.projects::-webkit-scrollbar,
.affirmation-list::-webkit-scrollbar,
.task-board::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.timeline-scroll::-webkit-scrollbar-thumb,
.milestone-timeline-viewport::-webkit-scrollbar-thumb,
.habit-log-list::-webkit-scrollbar-thumb,
.category-task-list::-webkit-scrollbar-thumb,
.projects::-webkit-scrollbar-thumb,
.affirmation-list::-webkit-scrollbar-thumb,
.task-board::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(126, 232, 196, 0.55), rgba(244, 166, 192, 0.55));
  background-clip: padding-box;
}

.timeline-scroll::-webkit-scrollbar-track,
.milestone-timeline-viewport::-webkit-scrollbar-track,
.habit-log-list::-webkit-scrollbar-track,
.category-task-list::-webkit-scrollbar-track,
.projects::-webkit-scrollbar-track,
.affirmation-list::-webkit-scrollbar-track,
.task-board::-webkit-scrollbar-track {
  background: rgba(32, 23, 56, 0.2);
}

body {
  font-weight: 400;
  line-height: 1.45;
}

.shell {
  gap: 14px;
}

.right-pane,
.project,
.task-board,
.project-zone,
.habits-card,
.inspiration-card,
.stats-card,
.quick-panel,
.clock-card,
.now-card,
.task-column,
.task,
.time-block,
.project-tabs button,
.segmented button,
.countdown,
.archive-card,
.archive-toggle,
.notification-card,
.habit-track,
.habit-log-row,
.project-task-modal-row,
.milestone-card {
  border-radius: 24px;
}

.icon-button,
.mini-button,
.fab,
.ghost-icon,
.task-icon,
.task-more {
  border-radius: 14px;
}

.project-zone,
.stats-card,
.habits-card,
.inspiration-card,
.task-board {
  padding: 16px;
}

.project {
  padding: 14px;
}

.task-column {
  padding: 12px;
}

.task {
  min-height: 34px;
  border-color: rgba(176, 156, 214, 0.14);
  background: rgba(32, 23, 56, 0.72);
}

.task:hover {
  border-color: rgba(126, 232, 196, 0.28);
  background: rgba(48, 38, 78, 0.82);
}

.category-task-list {
  gap: 8px;
}

.project-main img,
.project-thumb {
  border-radius: 20px;
}

.project-zone,
.stats-card,
.habits-card,
.inspiration-card {
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.3),
    0 0 42px rgba(167, 139, 250, 0.1);
}

.stats-card .today-stats {
  gap: 12px;
}

.stat-card {
  border-radius: 20px;
}

.habit-track {
  padding: 6px 8px;
  border-radius: 18px;
}

.habit-track div button {
  border-radius: 5px;
}

.project-tabs button,
.segmented button,
.habit-subtabs button,
.schedule-switcher button {
  padding-inline: 12px;
  height: 26px;
}

.project-tabs button,
.segmented button {
  border-radius: 999px;
}

.project-actions .mini-button {
  border-radius: 10px;
}

.quick-panel {
  border-radius: 28px;
}

.milestone-card,
.habit-log-row,
.project-task-modal-row {
  border-radius: 18px;
}

.stats-drill,
.chart-bar,
.habit-log-panel,
.project-timeline-viewport,
.milestone-timeline-viewport {
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
}

.clock-card strong {
  font-size: 1.72rem;
}

.clock-card span,
.clock-card small {
  color: rgba(176, 156, 214, 0.82);
}

/* Popup corner clipping fix */
.modal-backdrop,
.notification-shell,
.quick-panel,
.notification-card,
.chart-tooltip,
.time-block,
.task,
.project-task-modal-row,
.habit-log-row,
.milestone-card,
.stats-drill,
.archive-card,
.archive-toggle {
  border-radius: 24px;
}

.quick-panel,
.notification-card,
.chart-tooltip,
.archive-card,
.stats-drill,
.project-task-modal-row,
.habit-log-row,
.milestone-card {
  overflow: hidden;
  background-clip: padding-box;
  isolation: isolate;
}

.quick-panel::before,
.notification-card::before,
.chart-tooltip::before,
.archive-card::before,
.stats-drill::before,
.project-task-modal-row::before,
.habit-log-row::before,
.milestone-card::before,
.time-block::before,
.task::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
}

.quick-panel > *,
.notification-card > *,
.chart-tooltip > *,
.archive-card > *,
.stats-drill > *,
.project-task-modal-row > *,
.habit-log-row > *,
.milestone-card > * {
  position: relative;
  z-index: 1;
}

.quick-panel,
.notification-card,
.chart-tooltip,
.archive-card,
.stats-drill,
.project-task-modal-row,
.habit-log-row,
.milestone-card {
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
}

.modal-backdrop {
  overflow: hidden;
}

/* Outer dashboard cards own the clip, so inner surfaces can't leak square corners */
.right-pane,
.project-zone,
.stats-card,
.habits-card,
.inspiration-card,
.task-board,
.project,
.archive-card {
  position: relative;
  overflow: hidden;
  background-clip: padding-box;
  isolation: isolate;
}

.right-pane::before,
.project-zone::before,
.stats-card::before,
.habits-card::before,
.inspiration-card::before,
.task-board::before,
.project::before,
.archive-card::before {
  border-radius: inherit;
}

.right-pane > *,
.project-zone > *,
.stats-card > *,
.habits-card > *,
.inspiration-card > *,
.task-board > *,
.project > *,
.archive-card > * {
  position: relative;
  z-index: 1;
}

.right-pane,
.project-zone,
.stats-card,
.habits-card,
.inspiration-card,
.task-board,
.project,
.archive-card {
  border-radius: 24px;
}

/* Dense dashboard tuning: project cards and middle task list */
.projects {
  align-items: stretch;
  gap: 8px;
}

.projects > .project {
  height: 100%;
  min-height: 144px;
  padding: 12px;
  gap: 8px;
}

.projects > .project .project-main {
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 8px;
  padding-right: 48px;
  align-items: start;
}

.projects > .project .project-main > div,
.projects > .project .project-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.projects > .project .project-main img,
.projects > .project .project-thumb {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.projects > .project .project-title {
  display: block;
  min-width: 0;
}

.projects > .project .project-title h3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
  line-height: 1.15;
  font-size: 0.88rem;
}

.projects > .project .project-main p {
  margin-top: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.62rem;
  line-height: 1.15;
}

.projects > .project .task-list {
  gap: 4px;
  min-width: 0;
}

.projects > .project .task {
  min-height: 20px;
  padding: 4px 8px;
  gap: 4px;
  border-radius: 8px;
  font-size: 0.62rem;
}

.projects > .project .task input {
  width: 12px;
  height: 12px;
}

.projects > .project .task span {
  min-width: 0;
}

.projects > .project .task-more {
  height: 22px;
  border-radius: 8px;
  font-size: 0.6rem;
}

.projects > .project .project-actions {
  top: 12px;
  right: 12px;
  gap: 8px;
}

.projects > .project .project-actions .mini-button {
  width: 24px;
  height: 24px;
  border-radius: 8px;
}

.projects > .project .project-age-floating {
  right: 12px;
  bottom: 12px;
  font-size: 0.58rem;
}

.task-board {
  gap: 8px;
}

.task-board .task-column {
  padding: 8px;
  gap: 8px;
  grid-template-rows: 30px minmax(0, 1fr);
  border-radius: 16px;
}

.task-board .task-column.collapsed {
  flex-basis: 34px;
}

.task-board .task-column-head {
  min-height: 30px;
}

.task-board .task-column h2 {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.66rem;
}

.task-board .task-column h2 span {
  flex: 0 0 auto;
  font-size: 0.54rem;
}

.task-board .category-task-list {
  gap: 4px;
}

.task-board .task {
  min-height: 30px;
  padding: 8px 12px;
  gap: 8px;
  border-radius: 12px;
  font-size: 0.72rem;
  box-shadow: none;
}

.task-board .task:hover {
  box-shadow: none;
}

.task-board .task > * {
  min-width: 0;
}

.task-board .task-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.task-board .task-project-name,
.task-board .task-subcategory-name,
.task-board .task small,
.task-board .task-date-input {
  flex: 0 0 auto;
}

.task-board .task-subcategory-name {
  max-width: 70px;
  padding: 2px 8px;
  line-height: 1.15;
}

.task-board .task-date-input {
  width: 56px;
  height: 18px;
}

.task-board .task-icon {
  width: 16px;
  height: 16px;
}

.task-board .empty-task-drop {
  height: 26px;
  font-size: 0.6rem;
}

.task-board .task [data-delete-task] {
  margin-left: auto;
}

.task-board .task small {
  line-height: 1;
}

.task-board .task-project-name,
.task-board .task-subcategory-name,
.task-board .task small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-board .task {
  background: rgba(32, 23, 56, 0.68);
  border-color: rgba(176, 156, 214, 0.12);
}

.task-board .task.important {
  box-shadow: inset 2px 0 0 rgba(250, 204, 21, 0.7);
}

.task-board .task.done {
  background: rgba(32, 23, 56, 0.58);
}

/* Overflow safety net for dense labels and tabs */
.projects > .project,
.projects > .project *,
.task-board,
.task-board *,
.project-tabs button,
.project-subtabs button,
.habit-subtabs button,
.schedule-switcher button {
  min-width: 0;
}

.projects > .project .project-title h3,
.projects > .project .project-main p,
.task-board .task-title,
.task-board .task-project-name,
.task-board .task-subcategory-name,
.task-board .task small,
.task-board .task-date-input,
.task-board .task-column h2,
.project-tabs button,
.project-subtabs button,
.habit-subtabs button,
.schedule-switcher button {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Global design-system consistency pass */
:root {
  --radius-main: 16px;
  --radius-nested: 12px;
  --radius-control: 8px;
  --border-default: 1px solid rgba(255, 255, 255, 0.08);
  --border-hover: 1px solid rgba(126, 232, 196, 0.20);
  --border-active: 1px solid rgba(126, 232, 196, 0.35);
  --shadow-small: 0 8px 20px rgba(0, 0, 0, 0.16);
  --shadow-medium: 0 18px 48px rgba(0, 0, 0, 0.28);
  --shadow-large: 0 26px 72px rgba(0, 0, 0, 0.36);
}

.right-pane,
.project-zone,
.stats-card,
.habits-card,
.inspiration-card,
.task-board,
.now-card,
.clock-card,
.archive-card {
  border-radius: var(--radius-main);
  border: var(--border-default);
  box-shadow: var(--shadow-medium);
}

.project,
.task-column,
.task,
.habit-row,
.habit-track:not(.habit-date-labels),
.project-task-modal-row,
.habit-log-row,
.milestone-card,
.stat-card,
.stats-drill-row,
.chart-tooltip {
  border-radius: var(--radius-nested);
  border: var(--border-default);
  box-shadow: var(--shadow-small);
}

.quick-panel,
.project-tasks-panel,
.milestone-panel,
.habit-log-panel,
.stats-drill-panel,
.notification-card {
  border-radius: var(--radius-main);
  border: var(--border-default);
  box-shadow: var(--shadow-large);
}

.project-tabs,
.segmented,
.habit-subtabs,
.schedule-switcher {
  border-radius: var(--radius-nested);
}

.project-tabs button,
.segmented button,
.habit-subtabs button,
.schedule-switcher button,
.mini-button,
.icon-button,
.ghost-icon,
.task-icon,
.task-more,
.fab,
.archive-toggle {
  border-radius: var(--radius-control);
  border: var(--border-default);
  box-shadow: none;
}

.project-tabs button.active,
.segmented button.active,
.habit-subtabs button.active,
.schedule-switcher button.active {
  border-color: rgba(126, 232, 196, 0.35);
}

.project-main img,
.project-thumb {
  border-radius: var(--radius-nested);
}

.project {
  min-width: 0;
  overflow: hidden;
}

.project .task-list,
.task-board,
.category-task-list,
.habit-list,
.habit-consistency,
.stats-drill-list,
.project-task-modal-list,
.habit-log-list {
  min-width: 0;
}

.project .task {
  padding: 4px 8px;
  gap: 4px;
  align-items: center;
  min-width: 0;
  border-color: rgba(255, 255, 255, 0.08);
}

.task-board .task,
.habit-row,
.habit-track:not(.habit-date-labels),
.project-task-modal-row,
.habit-log-row,
.stats-drill-row {
  padding: 8px 12px;
  gap: 8px;
  align-items: center;
  min-width: 0;
  border-color: rgba(255, 255, 255, 0.08);
}

.project:hover,
.task-column:hover,
.task:hover,
.habit-row:hover,
.habit-track:not(.habit-date-labels):hover,
.project-task-modal-row:hover,
.habit-log-row:hover,
.stats-drill-row:hover {
  border-color: rgba(126, 232, 196, 0.20);
  box-shadow: var(--shadow-small);
}

.project:active,
.task:active,
.habit-row:active,
.habit-track:not(.habit-date-labels):active,
.project-task-modal-row:active,
.habit-log-row:active,
.stats-drill-row:active {
  border-color: rgba(126, 232, 196, 0.35);
}

.project .task.done,
.task-board .task.done {
  opacity: 0.56;
}

.project .task.done:hover,
.task-board .task.done:hover {
  opacity: 0.72;
}

.now-line {
  background: #ef4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
}

.now-line::before {
  background: #ef4444;
}

.now-line span {
  background: #ef4444;
}

.task-icon,
.mini-button,
.icon-button,
.ghost-icon,
.task-more,
.fab {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  font-size: 0.78rem;
  line-height: 1;
}

.mini-button,
.icon-button,
.ghost-icon,
.task-more {
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
}

.project-actions .mini-button {
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
}

.task-icon svg,
.mini-button svg,
.icon-button svg,
.ghost-icon svg,
.fab svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.75;
}

.project-tabs button,
.segmented button,
.habit-subtabs button,
.schedule-switcher button,
.task-more,
.mini-button,
.icon-button,
.ghost-icon,
.task-icon {
  background: rgba(32, 23, 56, 0.72);
}

.project .task span,
.task-board .task-title,
.task-board .task-project-name,
.task-board .task-subcategory-name,
.task-board .task small,
.project-main p,
.project-title h3,
.habit-track strong,
.habit-track small,
.stats-drill-row span,
.stats-drill-row small,
.project-task-modal-row span,
.project-task-modal-row small,
.habit-log-row strong,
.habit-log-row small,
.habit-log-row p {
  min-width: 0;
}

.project-main p,
.project-title h3,
.task-board .task-title,
.task-board .task-project-name,
.task-board .task-subcategory-name,
.task-board .task small,
.habit-track strong,
.habit-track small,
.project-task-modal-row span,
.project-task-modal-row small,
.habit-log-row strong,
.habit-log-row small,
.stats-drill-row span,
.stats-drill-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-tabs,
.segmented,
.habit-subtabs,
.schedule-switcher {
  padding: 2px;
  background: rgba(32, 23, 56, 0.62);
  border: var(--border-default);
}

.project-tabs button,
.segmented button,
.habit-subtabs button,
.schedule-switcher button {
  padding-inline: 10px;
  height: 24px;
  font-size: 0.65rem;
}

.habit-date-labels,
.habits-card .habit-date-labels {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 12px !important;
}

.habit-track div button {
  border-radius: 8px;
}

.habit-consistency {
  gap: 6px;
}

.habits-card .habit-track:not(.habit-date-labels) {
  min-height: 38px;
}

.habits-card .habit-track strong {
  font-size: 0.6rem;
  line-height: 1.1;
}

.habits-card .habit-track div {
  gap: 4px;
}

.habits-card .habit-track div button {
  width: 24px;
  height: 24px;
}

.habits-card .habit-date-labels {
  display: grid;
  grid-template-columns: minmax(68px, 92px) minmax(0, 1fr) 34px 18px 18px;
  gap: 4px;
  align-items: center;
  min-height: 24px;
  margin-bottom: 4px;
}

.habits-card .habit-date-labels:hover,
.habits-card .habit-date-labels:focus-within {
  box-shadow: none !important;
  background: transparent !important;
  border: 0 !important;
}

.habits-card .habit-date-labels span {
  font-size: 0.55rem;
}

.habits-card .habit-date-labels strong,
.habits-card .habit-date-labels small {
  display: none;
}

.habit-track:hover,
.habit-track:focus-within {
  box-shadow: var(--shadow-small);
}

.task-board .task:hover,
.project .task:hover,
.project:hover {
  box-shadow: none;
}

.project .task {
  min-height: 20px;
  border-radius: 8px;
}

/* Final density pass and visual fixes */
.right-pane .projects > .project {
  padding: 12px;
  min-height: 144px;
  gap: 8px;
  align-content: start;
}

.right-pane .projects > .project .project-main {
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 8px;
  padding-right: 48px;
  align-items: start;
}

.right-pane .projects > .project .project-main > div,
.right-pane .projects > .project .project-copy {
  min-width: 0;
}

.right-pane .projects > .project .project-main img,
.right-pane .projects > .project .project-thumb {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.right-pane .projects > .project .project-title {
  display: block;
  min-width: 0;
}

.right-pane .projects > .project .project-name {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
  line-height: 1.12;
  font-size: 0.86rem;
}

.right-pane .projects > .project .project-main p {
  margin-top: 0;
  font-size: 0.6rem;
  line-height: 1.15;
}

.right-pane .projects > .project .task-list {
  gap: 4px;
  min-width: 0;
}

.right-pane .projects > .project .task {
  min-height: 20px;
  padding: 4px 8px;
  gap: 4px;
  border-radius: 8px;
  font-size: 0.62rem;
}

.right-pane .projects > .project .task input {
  width: 12px;
  height: 12px;
}

.right-pane .projects > .project .task span {
  min-width: 0;
}

.right-pane .projects > .project .project-actions {
  top: 12px;
  right: 12px;
  gap: 8px;
}

.right-pane .projects > .project .project-actions .mini-button {
  width: 24px;
  height: 24px;
}

.right-pane .projects > .project .project-age-floating {
  right: 12px;
  bottom: 12px;
  font-size: 0.58rem;
}

.task.done {
  opacity: 0.56;
}

.task.done:hover,
.task.done:focus-within {
  opacity: 0.72;
}

.now-line {
  background: #ef4444;
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.86);
}

.now-line::before {
  background: #ef4444;
}

.now-line span {
  background: #ef4444;
}

.habits-card .habit-consistency {
  gap: 4px;
}

.habits-card .habit-date-labels {
  display: grid;
  grid-template-columns: minmax(68px, 92px) minmax(0, 1fr) 34px 18px 18px;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  margin-bottom: 4px;
  padding: 0;
  background: transparent !important;
  border: 0 !important;
  border-radius: 12px !important;
  box-shadow: none !important;
}

.habits-card .habit-date-labels:hover {
  background: transparent !important;
  box-shadow: none !important;
}

.habits-card .habit-date-labels strong,
.habits-card .habit-date-labels small {
  display: none;
}

.habits-card .habit-track:not(.habit-date-labels) {
  grid-template-columns: minmax(68px, 92px) minmax(0, 1fr) 34px 18px 18px;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(32, 23, 56, 0.52);
  border: 1px solid rgba(176, 156, 214, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.habits-card .habit-track:not(.habit-date-labels):hover {
  background: rgba(32, 23, 56, 0.62);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.habits-card .habit-track strong {
  line-height: 1.1;
  font-size: 0.6rem;
}

.habits-card .habit-track div {
  gap: 4px;
  align-items: center;
}

.habits-card .habit-track div button {
  width: 24px;
  height: 24px;
  border-radius: 8px;
}

.habits-card .habit-track small {
  font-size: 0.52rem;
}

.habits-card .habit-track [data-delete-habit],
.habits-card .journal-button {
  width: 18px;
  height: 18px;
}

/* Unified product design system */
:root {
  --ds-radius-sm: 4px;
  --ds-radius-control: 8px;
  --ds-radius-nested: 12px;
  --ds-radius-card: 16px;
  --ds-border: 1px solid rgba(255, 255, 255, 0.08);
  --ds-border-hover: rgba(126, 232, 196, 0.20);
  --ds-border-active: rgba(126, 232, 196, 0.35);
  --ds-surface-card: rgba(8, 18, 36, 0.78);
  --ds-surface-nested: rgba(15, 27, 48, 0.64);
  --ds-surface-control: rgba(17, 31, 54, 0.72);
  --ds-shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.16);
  --ds-shadow-md: 0 12px 32px rgba(0, 0, 0, 0.24);
  --ds-shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.34);
}

body {
  letter-spacing: 0;
}

.now-card,
.right-pane,
.inspiration-card,
.task-board,
.stats-card,
.clock-card,
.habits-card,
.project-zone,
.archive-card,
.stopwatch-card {
  border: var(--ds-border);
  border-radius: var(--ds-radius-card);
  background: var(--ds-surface-card);
  box-shadow: var(--ds-shadow-md);
}

.now-card {
  padding-top: 12px;
  padding-bottom: 12px;
}

.right-pane,
.inspiration-card,
.stats-card,
.habits-card,
.project-zone {
  gap: 8px;
}

.right-pane {
  padding: 8px;
}

.task-column,
.project,
.stat-card,
.countdown,
.next-chip,
.habit-track:not(.habit-date-labels),
.project-task-modal-row,
.habit-log-row,
.stats-drill-row,
.milestone-card,
.flow-check,
.settings-section,
.block-row,
.archive-task {
  border: var(--ds-border);
  border-radius: var(--ds-radius-nested);
  background: var(--ds-surface-nested);
  box-shadow: var(--ds-shadow-sm);
}

.quick-panel,
.edit-panel,
.notification-card {
  border: var(--ds-border);
  border-radius: var(--ds-radius-card);
  background: rgba(8, 18, 36, 0.94);
  box-shadow: var(--ds-shadow-lg);
}

.chart-tooltip,
.stats-drill,
.project-color-panel,
.project-timeline-viewport,
.milestone-timeline-viewport,
.journal-body {
  border: var(--ds-border);
  border-radius: var(--ds-radius-nested);
  background: rgba(10, 22, 42, 0.92);
  box-shadow: var(--ds-shadow-lg);
}

.project-tabs,
.project-subtabs,
.segmented,
.habit-subtabs,
.schedule-switcher {
  gap: 4px;
  padding: 4px;
  border: var(--ds-border);
  border-radius: var(--ds-radius-control);
  background: rgba(8, 18, 36, 0.54);
  box-shadow: none;
}

.project-tabs button,
.project-subtabs button,
.segmented button,
.habit-subtabs button,
.schedule-switcher button {
  height: 24px;
  padding: 0 8px;
  border: var(--ds-border);
  border-radius: var(--ds-radius-control);
  background: transparent;
  box-shadow: none;
  font-size: 0.64rem;
  font-weight: 500;
}

.project-tabs button:hover,
.project-subtabs button:hover,
.segmented button:hover,
.habit-subtabs button:hover,
.schedule-switcher button:hover {
  border-color: var(--ds-border-hover);
  background: rgba(126, 232, 196, 0.06);
  box-shadow: none;
}

.project-tabs button.active,
.project-subtabs button.active,
.segmented button.active,
.habit-subtabs button.active,
.schedule-switcher button.active {
  border-color: var(--ds-border-active);
  background: rgba(167, 139, 250, 0.14);
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.14);
}

button,
.mini-button,
.icon-button,
.ghost-icon,
.task-icon,
.task-more,
.fab,
.archive-toggle,
.tz-option {
  border-radius: var(--ds-radius-control);
}

.mini-button,
.icon-button,
.ghost-icon,
.task-icon,
.task-more {
  display: inline-grid;
  place-items: center;
  border: var(--ds-border);
  background: var(--ds-surface-control);
  box-shadow: none;
  color: #aebdd1;
}

.mini-button:hover,
.icon-button:hover,
.ghost-icon:hover,
.task-icon:hover,
.task-more:hover,
.tz-option:hover {
  border-color: var(--ds-border-hover);
  background: rgba(28, 48, 78, 0.82);
  box-shadow: none;
  color: #f8fafc;
  transform: none;
}

.mini-button.active,
.icon-button.active,
.task-icon.active,
.fab.primary {
  border-color: var(--ds-border-active);
  color: #bfdbfe;
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.16);
}

.mini-button.danger,
.icon-button.danger,
.task-icon.danger,
.block-delete-button {
  border-color: rgba(248, 113, 113, 0.18);
  background: rgba(127, 29, 29, 0.16);
  color: #fca5a5;
}

.ui-icon {
  display: block;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  pointer-events: none;
}

.mini-button .ui-icon,
.task-icon .ui-icon {
  width: 14px;
  height: 14px;
}

.fab .ui-icon {
  width: 18px;
  height: 18px;
}

.icon-count {
  font-size: 0.58rem;
  font-variant-numeric: tabular-nums;
}

input:not([type="checkbox"]):not([type="color"]):not([type="range"]),
select,
textarea {
  border: var(--ds-border);
  border-radius: var(--ds-radius-control);
  background: rgba(8, 18, 36, 0.72);
  box-shadow: none;
  color: #e5edf8;
}

input:not([type="checkbox"]):not([type="color"]):not([type="range"]):hover,
select:hover,
textarea:hover {
  border-color: var(--ds-border-hover);
}

input:not([type="checkbox"]):not([type="color"]):not([type="range"]):focus,
select:focus,
textarea:focus,
[contenteditable="true"]:focus {
  border-color: var(--ds-border-active);
  outline: none;
  box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.12);
}

input[type="checkbox"] {
  border-radius: var(--ds-radius-sm);
  accent-color: #7ee8c4;
}

.task-subcategory-name,
.subcategory-pill,
.status-badge,
.task-age,
.project-age,
.notification-kind {
  border-radius: var(--ds-radius-control);
}

.task-column,
.task-board .task-column {
  border-radius: var(--ds-radius-nested);
  box-shadow: none;
}

.task {
  border: var(--ds-border);
  border-radius: var(--ds-radius-nested);
  background: rgba(15, 27, 48, 0.56);
  box-shadow: none;
}

.task:hover {
  border-color: var(--ds-border-hover);
  background: rgba(22, 38, 64, 0.72);
  box-shadow: none;
}

.task.important,
.task-board .task.important {
  border-left-color: rgba(245, 158, 11, 0.56);
  box-shadow: none;
}

.task.overdue {
  border-color: rgba(248, 113, 113, 0.30);
  box-shadow: none;
}

.time-block {
  border: var(--ds-border);
  border-radius: var(--ds-radius-nested);
  background: color-mix(in srgb, var(--accent), rgba(10, 22, 42, 0.92) 88%);
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--accent), transparent 20%), var(--ds-shadow-sm);
}

.time-block:hover {
  border-color: var(--ds-border-hover);
  box-shadow: inset 3px 0 0 var(--accent), var(--ds-shadow-sm);
}

.time-block.current {
  border-color: var(--ds-border-active);
  box-shadow: inset 3px 0 0 var(--accent), 0 0 14px color-mix(in srgb, var(--accent), transparent 74%);
}

.block-resize-handle::before {
  border-radius: var(--ds-radius-sm);
}

.block-delete-button {
  width: 24px;
  height: 24px;
  border-radius: var(--ds-radius-control);
  box-shadow: none;
}

.project {
  border-radius: var(--ds-radius-nested);
  box-shadow: none;
}

.project:hover {
  border-color: var(--ds-border-hover);
  box-shadow: none;
}

.project-main {
  padding-right: 0 !important;
}

.project-actions {
  padding: 4px;
  border-radius: var(--ds-radius-nested);
  background: rgba(8, 18, 36, 0.92);
}

.project-main img,
.project-thumb {
  border-radius: var(--ds-radius-control);
  box-shadow: none;
}

.habit-track:not(.habit-date-labels),
.habits-card .habit-track:not(.habit-date-labels) {
  grid-template-columns: minmax(64px, 80px) minmax(0, 1fr) 40px 20px 20px 20px !important;
  border: var(--ds-border);
  border-radius: var(--ds-radius-nested);
  box-shadow: none !important;
}

.habit-date-labels {
  grid-template-columns: minmax(64px, 80px) minmax(0, 1fr) 40px 20px 20px 20px !important;
  border: 0 !important;
  border-radius: var(--ds-radius-control) !important;
  background: transparent !important;
  box-shadow: none !important;
}

.habit-track div button {
  border: var(--ds-border);
  border-radius: var(--ds-radius-control);
  box-shadow: none;
}

.habit-track div button:hover {
  border-color: var(--ds-border-hover);
  outline: 0;
  box-shadow: none;
}

.habit-track div button.done,
.habit-track div button.failed {
  box-shadow: none;
}

.stat-card,
.countdown,
.next-chip {
  border-radius: var(--ds-radius-nested);
  box-shadow: none;
}

.stat-card:hover {
  border-color: var(--ds-border-hover);
  box-shadow: none;
}

.now-line {
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.55);
}

.hover-line {
  box-shadow: none;
}

.resize-handle,
.milestone-axis,
.milestone-connector {
  border-radius: var(--ds-radius-sm);
}

.modal-backdrop {
  border-radius: 0;
}

@media (max-width: 900px) {
  .now-card,
  .right-pane,
  .inspiration-card,
  .task-board,
  .stats-card,
  .clock-card,
  .habits-card,
  .project-zone {
    border-radius: var(--ds-radius-card);
  }
}

.habits-card .habit-track:hover [data-delete-habit],
.habits-card .habit-track:focus-within [data-delete-habit],
.habits-card .habit-track:hover .journal-button,
.habits-card .habit-track:focus-within .journal-button {
  opacity: 1;
}

#nowLineTime {
  border-radius: var(--ds-radius-sm);
}

/* ── User layout fixes ───────────────────────────────────────── */

/* 1. Schedule switcher: individual free-floating tags, no shared frame */
.schedule-switcher {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 4px !important;
  padding: 0 !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* 2. Task columns: expand to content, no inner scroll */
.task-board .task-column {
  grid-template-rows: 30px auto !important;
  overflow: visible !important;
  flex: 0 0 auto !important;
}
.task-board .task-column.collapsed {
  grid-template-rows: 30px !important;
  flex: 0 0 34px !important;
}
.task-board .category-task-list {
  overflow: visible !important;
}

/* 3. Habit card: full content visible, no inner scroll */
.side-pane {
  grid-template-rows: auto var(--side-top, 140px) auto minmax(0, 1fr) !important;
}
.habit-shell {
  overflow: visible !important;
}
.habits-card {
  grid-template-rows: 24px 18px auto !important;
  max-height: none !important;
  overflow: visible !important;
}
.habit-consistency {
  overflow: visible !important;
}
/* Project zone must still scroll if habit section is large */
.project-zone {
  overflow: auto !important;
}

/* 4. Project cards: correct layout with 3 tasks + age at bottom-right */
.projects > .project,
.right-pane .projects > .project {
  padding-bottom: 28px !important;
}
.project-age-floating,
.projects > .project .project-age-floating,
.right-pane .projects > .project .project-age-floating {
  position: absolute !important;
  right: 12px !important;
  bottom: 10px !important;
  z-index: 2 !important;
}
/* Buttons hidden by default, show on hover */
.project-actions {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 140ms ease !important;
}
.project:hover .project-actions {
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* ── Project card header: single row [avatar+title | actions] ── */
.project-header {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 6px !important;
  min-width: 0 !important;
}

.project-header-left {
  display: flex !important;
  align-items: flex-start !important;
  gap: 8px !important;
  min-width: 0 !important;
  flex: 1 1 0 !important;
  cursor: pointer !important;
}

.project-header-left:hover {
  opacity: 0.9 !important;
}

.project-header .project-copy {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  min-width: 0 !important;
}

.project-header .project-name {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 0.82rem !important;
  font-weight: 500 !important;
  color: #f5f3ee !important;
  line-height: 1.15 !important;
  margin: 0 !important;
}

.project-header .project-category-label {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 0.58rem !important;
  color: #8f98a9 !important;
  line-height: 1.2 !important;
  margin: 0 !important;
}

/* Actions sit flush to top-right; reserve space so content never shifts */
.project-header .project-actions {
  position: static !important;
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  /* keep layout space even when invisible */
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 1 !important;
  transition: visibility 0s 140ms !important;
}

.project:hover .project-header .project-actions,
.project:focus-within .project-header .project-actions {
  visibility: visible !important;
  pointer-events: auto !important;
  transition-delay: 0s !important;
}

/* Neutralise the old absolute-position rules for .project-actions */
.project-header .project-actions button {
  pointer-events: auto !important;
}

/* ══════════════════════════════════════════════════════════════ */
/* REWRITE — clean layout for all rewritten sections             */
/* ══════════════════════════════════════════════════════════════ */

/* ── 1. Timeblocks: hide section title ── */
.timeblock-head h2 { display: none !important; }

/* ── 2. Past timeblocks: dim blocks above the now-line ── */
.time-block-wrap.past { opacity: 0.5 !important; transition: opacity 200ms ease !important; }

/* ── 3. Task group: scroll when >10 tasks ── */
.task-board .task-column[data-scrollable] .category-task-list {
  max-height: 240px !important;
  overflow-y: auto !important;
}

/* ── 4. Project card — full rewrite ── */
.proj-card {
  display: flex !important;
  flex-direction: column !important;
  height: 164px !important;
  padding: 14px !important;
  border-radius: 20px !important;
  overflow: hidden !important;
  min-width: 0 !important;
  position: relative !important;
  /* reset old rules */
  padding-bottom: 14px !important;
}

/* header: 3-column grid */
.proj-head {
  display: grid !important;
  grid-template-columns: 44px minmax(0,1fr) auto !important;
  gap: 10px !important;
  align-items: center !important;
  flex-shrink: 0 !important;
}

/* avatar cell */
.proj-avatar-cell {
  width: 44px !important;
  height: 44px !important;
  flex-shrink: 0 !important;
  cursor: pointer !important;
}
.proj-avatar-cell img,
.proj-avatar-cell .project-thumb {
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
  object-fit: cover !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* title + category */
.proj-copy {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  min-width: 0 !important;
  overflow: hidden !important;
  cursor: pointer !important;
}
.proj-name {
  font-size: 14px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  margin: 0 !important;
  line-height: 1.2 !important;
}
.proj-cat {
  font-size: 12px !important;
  color: var(--ds-text-muted, #8f98a9) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  margin: 0 !important;
  line-height: 1.2 !important;
}

/* actions: hidden until hover */
.proj-actions {
  display: flex !important;
  gap: 6px !important;
  flex-shrink: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
.proj-actions button {
  width: 28px !important;
  height: 28px !important;
  border-radius: 10px !important;
  pointer-events: auto !important;
}
.proj-card:hover .proj-actions,
.proj-card:focus-within .proj-actions {
  visibility: visible !important;
  pointer-events: auto !important;
}

/* task body */
.proj-body {
  margin-top: 12px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  overflow: hidden !important;
  flex: 1 !important;
  min-height: 0 !important;
}
.proj-task {
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 10px !important;
  border-radius: 10px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
  cursor: pointer !important;
}
.proj-task span {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  flex: 1 !important;
  font-size: 12px !important;
}
.proj-more {
  height: 28px !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
  opacity: 0.6 !important;
  text-align: left !important;
  cursor: pointer !important;
  background: none !important;
  border: none !important;
  color: inherit !important;
}

/* footer: day counter bottom-right */
.proj-footer {
  margin-top: auto !important;
  display: flex !important;
  justify-content: flex-end !important;
  flex-shrink: 0 !important;
  padding-top: 4px !important;
}
.proj-age {
  font-size: 11px !important;
  opacity: 0.5 !important;
}

/* project grid */
.projects {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
  gap: 12px !important;
}

/* ── 5a. Task board: scrollable container ── */
.task-board {
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* ── 5. Task board rows: fixed-column grid ── */
/* cols: checkbox | star | title | sub-toggle | project | est | date | actions */
.task-board .tb-row,
.done-today-list .tb-row {
  height: auto !important;
  min-height: 30px !important;
  padding: 4px 8px !important;
  border-radius: 10px !important;
  display: grid !important;
  grid-template-columns: 16px 16px minmax(0,1fr) 44px 60px 72px !important;
  gap: 5px 16px !important;
  align-items: center !important;
  overflow: visible !important;
}
.tb-est-col {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
}
.tb-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 2px !important;
}
.task-board .tb-row .task-icon.star {
  width: 16px !important;
  height: 16px !important;
  flex-shrink: 0 !important;
}
.task-icon.no-ring,
.task-icon.no-ring:hover,
.task-board .tb-row .task-icon.star.no-ring,
.task-board .tb-row .task-icon.star.no-ring:hover {
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  border: none !important;
  outline: none !important;
}
.tb-title-wrap {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  gap: 1px !important;
}
.tb-title-row {
  display: flex !important;
  align-items: center !important;
  min-width: 0 !important;
  gap: 2px !important;
}
.task-board .tb-row .tb-proj,
.done-today-list .tb-row .tb-proj {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 9px !important;
  opacity: 0.5 !important;
  text-align: left !important;
}
.task-board .tb-row .tb-cat {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 10px !important;
  opacity: 0.45 !important;
  text-align: right !important;
}
.task-board .tb-row .tb-title,
.done-today-list .tb-row .tb-title {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  line-height: 1.3 !important;
}
/* Date column: custom label over hidden native picker */
.task-board .tb-row .tb-date-wrap,
.done-today-list .tb-row .tb-date-wrap {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  min-width: 0 !important;
  overflow: hidden !important;
  cursor: pointer !important;
}
.task-board .tb-row .tb-date-wrap span,
.done-today-list .tb-row .tb-date-wrap span {
  font-size: 10px !important;
  opacity: 0.42 !important;
  white-space: nowrap !important;
  pointer-events: none !important;
}
.task-board .tb-row .tb-date-wrap .tb-date,
.done-today-list .tb-row .tb-date-wrap .tb-date {
  position: absolute !important;
  inset: 0 !important;
  opacity: 0 !important;
  width: 100% !important;
  height: 100% !important;
  cursor: pointer !important;
}
/* Relative age label */
.task-board .tb-row .tb-status {
  font-size: 9px !important;
  opacity: 0.4 !important;
}
.task-board .tb-row .tb-status {
  font-size: 11px !important;
  text-align: right !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* ── 6. Habit section: columns set via CSS var so inline style survives !important ── */
.habit-consistency .habit-track {
  display: grid !important;
  grid-template-columns: var(--htc, 110px 1fr 72px) !important;
  gap: var(--htcgap, 6px) !important;
  align-items: center !important;
  min-height: 32px !important;
}

/* The cell grid inside each row — aligns with header */
.habit-consistency .habit-track > div {
  display: grid !important;
  grid-template-columns: repeat(var(--habit-days, 7), minmax(0, 1fr)) !important;
  gap: 4px !important;
  align-items: center !important;
}

/* Each cell (button or span) */
.habit-consistency .habit-track > div > button,
.habit-consistency .habit-track > div > span {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  aspect-ratio: 1 !important;
  min-width: 0 !important;
  font-size: 10px !important;
  border-radius: 5px !important;
}

/* Header row: no border, muted text */
.habit-track.habit-date-labels {
  border: none !important;
  background: none !important;
  box-shadow: none !important;
  min-height: 24px !important;
}
/* Restore strong to block so it occupies grid column 1 (prevents first label shifting left) */
.habits-card .habit-consistency .habit-track.habit-date-labels > strong {
  display: block !important;
  visibility: hidden !important;
  min-width: 0 !important;
  overflow: hidden !important;
}
.habit-track.habit-date-labels > div > span {
  color: var(--ds-text-muted, #8f98a9) !important;
  font-size: 10px !important;
  font-weight: 400 !important;
  text-align: center !important;
}

/* streak/percent column */
.habit-track > small {
  font-size: 11px !important;
  white-space: nowrap !important;
  text-align: right !important;
}

/* habit title: truncate */
.habit-track > strong {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

/* ══════════════════════════════════════════════════════════════ */
/* ROUND 4 FIXES                                                 */
/* ══════════════════════════════════════════════════════════════ */

/* ── Timeblock topbar: switcher + tools on one row ── */
.timeblock-topbar {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 6px 8px !important;
  flex-shrink: 0 !important;
}
.timeblock-topbar .schedule-switcher {
  flex: 1 !important;
  padding: 0 !important;
}
.timeblock-topbar .timeblock-tools {
  display: flex !important;
  gap: 4px !important;
  flex-shrink: 0 !important;
}

/* ── Project cards: smaller, true 3-column grid ── */
.projects {
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 8px !important;
}
.proj-card {
  height: 148px !important;
  padding: 10px !important;
  padding-bottom: 10px !important;
}
.proj-head {
  grid-template-columns: 36px minmax(0,1fr) !important;
  gap: 8px !important;
}
.proj-avatar-cell,
.proj-avatar-cell img,
.proj-avatar-cell .project-thumb {
  width: 36px !important;
  height: 36px !important;
  border-radius: 10px !important;
}
.proj-name { font-size: 12px !important; }
.proj-cat  { font-size: 10px !important; }
.proj-body { margin-top: 8px !important; gap: 4px !important; }
.proj-task {
  height: 26px !important;
  min-height: 26px !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 6px !important;
  border-radius: 6px !important;
}
.proj-task span { font-size: 11px !important; }
.proj-more {
  height: 22px !important;
  padding: 0 6px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  letter-spacing: 1px !important;
  line-height: 1 !important;
}
.proj-footer { padding-top: 2px !important; }
.proj-age   { font-size: 10px !important; }

/* ── Task board: checked tasks more transparent ── */
.task-board .task.done,
.task-board .tb-row.done { opacity: 0.3 !important; }

/* ── Task board: delete/focus button hover-only ── */
.task-board .tb-row .tb-delete,
.done-today-list .tb-row .tb-delete {
  visibility: hidden !important;
  pointer-events: none !important;
  flex-shrink: 0 !important;
}
.task-board .tb-row:hover .tb-delete,
.done-today-list .tb-row:hover .tb-delete {
  visibility: visible !important;
  pointer-events: auto !important;
}
.task-board .tb-row .tb-spent,
.done-today-list .tb-row .tb-spent {
  font-size: 10px !important;
  color: #5b8cff !important;
  opacity: 0.85 !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}
.task-board .tb-row .tb-focus,
.done-today-list .tb-row .tb-focus {
  visibility: hidden !important;
  pointer-events: none !important;
  flex-shrink: 0 !important;
  color: #5b8cff !important;
}
.task-board .tb-row:hover .tb-focus,
.done-today-list .tb-row:hover .tb-focus {
  visibility: visible !important;
  pointer-events: auto !important;
}
.task-board .tb-row .tb-focus:hover,
.done-today-list .tb-row .tb-focus:hover { color: #8b5bff !important; }

/* Subtask toggle button */
.task-board .tb-row .tb-sub-toggle,
.done-today-list .tb-row .tb-sub-toggle {
  display: flex !important;
  align-items: center !important;
  gap: 2px !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  cursor: pointer !important;
  color: rgba(255,255,255,0.4) !important;
  font-size: 9px !important;
  min-width: 0 !important;
}
.task-board .tb-row .tb-sub-toggle,
.done-today-list .tb-row .tb-sub-toggle {
  visibility: hidden !important;
  pointer-events: none !important;
}
.task-board .tb-row:hover .tb-sub-toggle,
.task-board .tb-row .tb-sub-toggle.open,
.task-board .tb-row .tb-sub-toggle.has,
.done-today-list .tb-row:hover .tb-sub-toggle,
.done-today-list .tb-row .tb-sub-toggle.open,
.done-today-list .tb-row .tb-sub-toggle.has {
  visibility: visible !important;
  pointer-events: auto !important;
}
.task-board .tb-row .tb-sub-toggle.has,
.done-today-list .tb-row .tb-sub-toggle.has { color: rgba(255,255,255,0.62) !important; }
.task-board .tb-row .tb-sub-toggle svg,
.done-today-list .tb-row .tb-sub-toggle svg { transition: transform 0.15s ease !important; }
.task-board .tb-row .tb-sub-toggle.open svg,
.done-today-list .tb-row .tb-sub-toggle.open svg { transform: rotate(180deg) !important; }
.task-board .tb-row .tb-sub-toggle i,
.done-today-list .tb-row .tb-sub-toggle i { font-style: normal !important; }

/* Subtask panel */
.task-board .subtask-panel {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 2px 12px !important;
  padding: 4px 8px 6px 40px !important;
  margin: -2px 0 4px !important;
}
.task-board .subtask-row {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  height: 20px !important;
}
.task-board .subtask-row .subtask-title {
  flex: 1 !important;
  font-size: 11px !important;
  color: rgba(255,255,255,0.75) !important;
  outline: none !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}
.task-board .subtask-row.done .subtask-title {
  text-decoration: line-through !important;
  opacity: 0.45 !important;
}
.task-board .subtask-row .task-icon {
  visibility: hidden !important;
  flex-shrink: 0 !important;
}
.task-board .subtask-row:hover .task-icon { visibility: visible !important; }
.task-board .subtask-add {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  grid-column: 1 / -1 !important;
}
.task-board .subtask-add input {
  flex: 1 !important;
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 6px !important;
  padding: 3px 8px !important;
  font-size: 12px !important;
  color: #fff !important;
}

/* ── Focus feature: setup + timer modal ── */
.focus-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 6, 12, 0.9);
  backdrop-filter: blur(4px);
}
.focus-backdrop-active { background: rgba(2, 3, 8, 0.92); }
.focus-setup,
.focus-timer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 34px 40px;
  min-width: 360px;
  max-width: 90vw;
  border-radius: 18px;
  background: rgba(15, 18, 26, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  text-align: center;
}
.focus-eyebrow {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.focus-task-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
}
.focus-project {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  color: var(--accent, #8f98a9);
  background: color-mix(in srgb, var(--accent, #8f98a9) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, #8f98a9) 40%, transparent);
}

/* Project star + Focus tab */
.proj-star.active { color: #ffce54 !important; }
.proj-star.active svg { fill: #ffce54 !important; }
.proj-star:hover { color: #ffce54 !important; }
.project-tabs .focus-tab {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.project-tabs .focus-tab svg { display: block !important; }
.project-tabs .focus-tab.active {
  color: #ffce54 !important;
}
.project-tabs .focus-tab.active svg { fill: #ffce54 !important; }
.focus-setup-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}
.focus-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.6);
  text-align: left;
}
.focus-field input {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 1rem;
}
.focus-preset-row {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.focus-preset {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: 0.82rem;
}
.focus-preset.active {
  background: linear-gradient(90deg, #5b8cff, #8b5bff);
  border-color: transparent;
  color: #fff;
}
.focus-setup-actions,
.focus-timer-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  width: 100%;
}
.focus-clock {
  font-size: 4.4rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: #fff;
  line-height: 1;
}
.focus-timer.over .focus-clock,
.focus-timer.over .focus-eyebrow { color: #ff453a; }
.focus-timer.over { border-color: rgba(255, 69, 58, 0.5); }
.focus-total {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
}
.focus-timer.paused .focus-clock { opacity: 0.45; }
.primary-button {
  padding: 10px 22px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(90deg, #5b8cff, #8b5bff);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.danger-button {
  padding: 10px 22px;
  border-radius: 10px;
  border: 1px solid rgba(255, 69, 58, 0.5);
  background: rgba(255, 69, 58, 0.16);
  color: #ff6b61;
  font-weight: 600;
  cursor: pointer;
}
.ghost-button {
  padding: 10px 22px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
}

/* ── Task board: group header vertical centering + hover add ── */
.task-column-head {
  display: flex !important;
  align-items: center !important;
  height: 30px !important;
}
.task-column-head .mini-button {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 120ms ease !important;
}
.task-column:hover .task-column-head .mini-button,
.task-column:focus-within .task-column-head .mini-button {
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* ── Habit: flat grid — beat the !important .habit-track:not(.habit-date-labels) design rule ── */
.habits-card .habit-consistency .habit-track,
.habits-card .habit-consistency .habit-track:not(.habit-date-labels) {
  grid-template-columns: var(--htc, 110px 1fr 72px) !important;
  gap: var(--htcgap, 6px) !important;
  padding: 2px 0 !important;
  border-radius: 6px !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}
/* cell buttons: fill their grid column */
.habit-track .habit-cell {
  aspect-ratio: 1 !important;
  border-radius: 5px !important;
  min-width: 0 !important;
  width: 100% !important;
}
/* header label spans */
.habit-track .habit-cell-label {
  display: block !important;
  text-align: center !important;
  font-size: 9px !important;
  color: var(--ds-text-muted, #8f98a9) !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  min-width: 0 !important;
  max-width: 100% !important;
}
/* meta column: stack streak + action buttons */
.habit-track-meta {
  display: flex !important;
  align-items: center !important;
  gap: 3px !important;
  justify-content: flex-end !important;
  overflow: hidden !important;
}
.habit-track-meta small {
  font-size: 10px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  color: var(--ds-text-muted, #8f98a9) !important;
}
/* month view: zero-out button minimum so 1fr can compress to available space */
.habit-consistency.month .habit-track .habit-cell {
  min-width: 0 !important;
  min-height: 0 !important;
  width: auto !important;
  height: auto !important;
  aspect-ratio: 1 !important;
}
.habit-consistency.month .habit-track .habit-cell-label {
  min-width: 0 !important;
  font-size: 8px !important;
}

/* ── Project zone: relative so archive+fab are contained ── */
.project-zone {
  position: relative !important;
  padding-bottom: 70px !important;
}

/* ── Archive: inside project-zone, above FABs ── */
.archive-card {
  position: absolute !important;
  left: 16px !important;
  right: 78px !important;
  bottom: 18px !important;
  width: auto !important;
  z-index: 5 !important;
  border-radius: 999px !important;
  /* unset fixed positioning */
  top: auto !important;
}
.archive-card.open {
  border-radius: 12px !important;
  bottom: 18px !important;
}
.archive-toggle {
  height: 38px !important;
  border-radius: 999px !important;
  padding: 0 14px !important;
}

/* ── FAB stack: bottom-right corner (countdown zone) ── */
.fab-rail {
  position: fixed !important;
  right: 12px !important;
  left: auto !important;
  bottom: 12px !important;
  display: flex !important;
  flex-direction: row !important;
  gap: 8px !important;
  align-items: center !important;
  z-index: 200 !important;
  top: auto !important;
}
/* Both FABs: identical 46×46 circular */
.fab-rail .fab {
  width: 46px !important;
  height: 46px !important;
  min-width: 46px !important;
  min-height: 46px !important;
  border-radius: 999px !important;
  flex-shrink: 0 !important;
  aspect-ratio: 1 / 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  transform: none !important;
}
.fab-rail .fab svg {
  width: 20px !important;
  height: 20px !important;
  stroke-width: 2px !important;
  display: block !important;
  margin: 0 !important;
  transform: none !important;
  flex-shrink: 0 !important;
}

/* ══════════════════════════════════════════════════════════════ */
/* ROUND 5 FIXES                                                 */
/* ══════════════════════════════════════════════════════════════ */

/* ── Project card: single-row ultra-compact ── */
.proj-body { display: none !important; }
.proj-card {
  height: 32px !important;
  padding: 0 8px !important;
  cursor: pointer !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 6px !important;
}
/* Single row: head fills available space, footer inline */
.proj-head {
  flex: 1 !important;
  min-width: 0 !important;
  align-items: center !important;
  grid-template-columns: 20px minmax(0,1fr) auto !important;
  gap: 5px !important;
}
.proj-footer {
  flex-shrink: 0 !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}
.proj-avatar-cell,
.proj-avatar-cell img,
.proj-avatar-cell .project-thumb {
  width: 20px !important;
  height: 20px !important;
  border-radius: 5px !important;
}
.proj-name { font-size: 11px !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; }
/* Sub-category on its own line, smaller */
.proj-cat {
  display: flex !important;
  flex-direction: column !important;
  line-height: 1.2 !important;
  gap: 0 !important;
  min-width: 0 !important;
  overflow: hidden !important;
}
.proj-cat-main {
  font-size: 9px !important;
  opacity: 0.5 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.proj-cat-sub {
  font-size: 8px !important;
  opacity: 0.35 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
/* proj-copy: stack name + cat compactly */
.proj-copy {
  min-width: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
}
.proj-badge {
  font-size: 8px !important;
  padding: 1px 4px !important;
}
.proj-age { font-size: 8px !important; opacity: 0.35 !important; }

/* ── Habit: week cells closer, month cells narrower ── */
/* Week: tighter gap between cells */
.habit-consistency.week .habit-track {
  --htcgap: 6px 3px !important;
}
/* Month: even tighter and narrower */
.habit-consistency.month .habit-track {
  --htcgap: 6px 1px !important;
}
.habit-consistency.month .habit-track .habit-cell {
  max-width: 10px !important;
  max-height: 10px !important;
}
.proj-head {
  align-items: flex-start !important;
}
.proj-badge {
  font-size: 9px !important;
  font-weight: 600 !important;
  opacity: 0.55 !important;
  background: rgba(255,255,255,0.07) !important;
  border-radius: 999px !important;
  padding: 2px 5px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  align-self: flex-start !important;
}
.proj-head {
  grid-template-columns: 28px minmax(0,1fr) auto !important;
  gap: 6px !important;
}
.proj-avatar-cell,
.proj-avatar-cell img,
.proj-avatar-cell .project-thumb {
  width: 28px !important;
  height: 28px !important;
  border-radius: 8px !important;
}

/* ── Clock card: hide settings icon ── */
.clock-card i { display: none !important; }

/* ── Habit cells: smaller, fixed max-size ── */
.habit-consistency.week .habit-track .habit-cell {
  max-width: 22px !important;
  max-height: 22px !important;
  justify-self: center !important;
}
.habit-consistency.month .habit-track .habit-cell {
  max-width: 14px !important;
  max-height: 14px !important;
  justify-self: center !important;
}
.habit-consistency.week .habit-track .habit-cell-label {
  font-size: 9px !important;
  text-align: center !important;
}
.habit-consistency.month .habit-track .habit-cell-label {
  font-size: 7px !important;
  text-align: center !important;
}
/* Habit cell colors: done = accent, failed = red, default = muted */
.habit-cell.done {
  background: var(--accent, var(--ds-primary, #5b8cff)) !important;
  opacity: 1 !important;
}
.habit-cell.failed {
  background: var(--ds-danger, #e05050) !important;
  opacity: 0.8 !important;
}
.habit-cell:not(.done):not(.failed) {
  background: rgba(255,255,255,0.07) !important;
}
.habit-cell.today:not(.done):not(.failed) {
  background: rgba(255,255,255,0.14) !important;
  outline: 1.5px solid rgba(255,255,255,0.3) !important;
}

/* ── Project card: day counter bottom-left, actions bottom-right ── */
.proj-footer {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-top: auto !important;
  padding-top: 4px !important;
}
.proj-footer .proj-actions {
  visibility: hidden !important;
  pointer-events: none !important;
  display: flex !important;
  gap: 6px !important;
}
.proj-card:hover .proj-footer .proj-actions,
.proj-card:focus-within .proj-footer .proj-actions {
  visibility: visible !important;
  pointer-events: auto !important;
}
/* Remove actions from the head (they are now in footer) */
.proj-head .proj-actions { display: none !important; }

/* ── Stats drill panel: taller + scrollable ── */
.stats-drill-panel {
  max-height: min(80dvh, 600px) !important;
  display: flex !important;
  flex-direction: column !important;
}
.stats-drill-list {
  overflow-y: auto !important;
  flex: 1 !important;
  min-height: 0 !important;
}

/* ── FAB: both buttons same dark/glass style ── */
.fab-rail .fab,
.fab-rail .fab.primary {
  background: rgba(255,255,255,0.08) !important;
  color: #e8eaf0 !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4) !important;
  backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
}
.fab-rail .fab:hover,
.fab-rail .fab.primary:hover {
  background: rgba(255,255,255,0.14) !important;
}

/* ── Archive: in middle pane, looks like a task group ── */
.archive-card {
  position: static !important;
  left: auto !important; right: auto !important; bottom: auto !important; top: auto !important;
  border-radius: 10px !important;
  width: auto !important;
  z-index: auto !important;
  overflow: hidden !important;
  margin-top: 8px !important;
  background: rgba(15,18,26,0.6) !important;
}
.archive-toggle {
  height: 30px !important;
  border-radius: 0 !important;
  padding: 0 10px !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  cursor: pointer !important;
}
.archive-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  padding: 4px 8px !important;
  max-height: 200px !important;
  overflow-y: auto !important;
}
.archive-task {
  height: 28px !important;
  padding: 0 6px !important;
  border-radius: 6px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  font-size: 12px !important;
  gap: 8px !important;
}
.archive-task span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.archive-task small { flex-shrink: 0; font-size: 10px; opacity: 0.5; }
.archive-task .archive-delete { visibility: hidden; pointer-events: none; flex-shrink: 0; }
.archive-task:hover .archive-delete { visibility: visible; pointer-events: auto; }

/* ── Project-zone: no extra padding (archive is gone from here) ── */
.project-zone { padding-bottom: 0 !important; }

/* ── Project modal tabs ── */
.proj-modal-tabs {
  display: flex !important;
  gap: 4px !important;
  padding: 0 16px 8px !important;
  border-bottom: 1px solid rgba(255,255,255,0.07) !important;
}
.proj-modal-tabs button {
  font-size: 12px !important;
  font-weight: 500 !important;
  padding: 4px 10px !important;
  border-radius: 6px !important;
  background: none !important;
  border: none !important;
  opacity: 0.5 !important;
  cursor: pointer !important;
  transition: opacity 120ms !important;
}
.proj-modal-tabs button.active {
  opacity: 1 !important;
  background: rgba(255,255,255,0.08) !important;
}
.project-modal-panel {
  width: 380px !important;
  height: min(88dvh, 760px) !important;
  max-height: 88dvh !important;
  display: flex !important;
  flex-direction: column !important;
}
.project-modal-panel .project-task-modal-list {
  overflow-y: auto !important;
  flex: 1 !important;
  min-height: 0 !important;
}
.project-modal-panel .milestone-shell {
  flex: 1 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  padding: 8px 16px !important;
}

/* ── New milestone timeline v2 ── */
.milestone-shell {
  flex: 1 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  min-height: 0 !important;
  position: relative !important;
}
.milestone-timeline-viewport {
  position: relative !important;
  width: 100% !important;
}
/* Central axis */
.milestone-axis {
  position: absolute !important;
  left: 50% !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 2px !important;
  transform: translateX(-50%) !important;
  background: rgba(255,255,255,0.1) !important;
  border-radius: 999px !important;
}
/* Now line */
.milestone-now-line {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  z-index: 3 !important;
}
.milestone-now-label {
  font-size: 10px !important;
  font-weight: 700 !important;
  color: #ef4444 !important;
  background: rgba(239,68,68,0.12) !important;
  padding: 1px 6px !important;
  border-radius: 4px !important;
}
/* Red pulse dot */
.milestone-pulse-red {
  display: inline-block !important;
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  background: #ef4444 !important;
  box-shadow: 0 0 0 0 rgba(239,68,68,0.6) !important;
  animation: ms-pulse-red 2s infinite !important;
  flex-shrink: 0 !important;
}
@keyframes ms-pulse-red {
  0%   { box-shadow: 0 0 0 0 rgba(239,68,68,0.6); }
  70%  { box-shadow: 0 0 0 7px rgba(239,68,68,0); }
  100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}
/* Milestone nodes */
.milestone-node2 {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  display: flex !important;
  align-items: center !important;
  transform: translateY(-50%) !important;
}
.milestone-node2.left {
  flex-direction: row-reverse !important;
}
.milestone-node2.right {
  flex-direction: row !important;
}
.milestone-dot2 {
  position: absolute !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,0.35) !important;
  border: 1.5px solid rgba(255,255,255,0.5) !important;
  z-index: 2 !important;
  flex-shrink: 0 !important;
}
.milestone-node2.past .milestone-dot2 {
  background: rgba(255,255,255,0.12) !important;
  border-color: rgba(255,255,255,0.2) !important;
}
.milestone-arm {
  width: calc(50% - 16px) !important;
  height: 1px !important;
  background: rgba(255,255,255,0.15) !important;
  flex-shrink: 0 !important;
}
/* Created milestone: plain label, no box, click to edit */
.milestone-label2 {
  width: calc(50% - 24px) !important;
  padding: 2px 4px !important;
  background: transparent !important;
  border: none !important;
  cursor: pointer !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 1px !important;
}
.milestone-node2.left .milestone-label2 { align-items: flex-end !important; text-align: right !important; }
.milestone-node2.right .milestone-label2 { align-items: flex-start !important; text-align: left !important; }
.milestone-label2:hover .milestone-title2 { opacity: 0.85 !important; }
.milestone-title2 {
  font-size: 11px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
}
.milestone-date2 {
  font-size: 9px !important;
  opacity: 0.45 !important;
}
.milestone-node2.past .milestone-title2 {
  opacity: 0.5 !important;
}
/* Inline edit (shown on click) */
.milestone-edit2 {
  width: calc(50% - 24px) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  padding: 6px !important;
  border-radius: 8px !important;
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.14) !important;
  z-index: 4 !important;
}
.milestone-edit2 input[type="text"],
.milestone-edit2 input[type="date"] {
  font-size: 11px !important;
  width: 100% !important;
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  border-radius: 5px !important;
  padding: 3px 6px !important;
  color: inherit !important;
}
.milestone-edit2-actions {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}
.milestone-empty-note {
  position: absolute !important;
  left: 0 !important; right: 0 !important;
  text-align: center !important;
  top: 60px !important;
  font-size: 12px !important;
  opacity: 0.4 !important;
}
/* Add milestone popup */
.milestone-add-popup {
  position: absolute !important;
  right: 16px !important;
  top: 56px !important;
  z-index: 20 !important;
  background: var(--ds-surface-2, #1a1d26) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  border-radius: 12px !important;
  padding: 14px !important;
  width: 260px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}
.milestone-add-popup form {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}
.milestone-add-heading {
  font-size: 12px !important;
  font-weight: 700 !important;
  margin: 0 0 2px !important;
  opacity: 0.9 !important;
}
.milestone-field {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
}
.milestone-field > span {
  font-size: 10px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  opacity: 0.5 !important;
}
.milestone-add-popup .mini-button.primary {
  background: var(--accent, var(--ds-primary, #5b8cff)) !important;
  color: #fff !important;
  border-color: transparent !important;
}
.milestone-add-popup .mini-button.ghost {
  background: transparent !important;
  opacity: 0.7 !important;
}
.milestone-add-popup input[type="text"],
.milestone-add-popup input[type="date"] {
  width: 100% !important;
  font-size: 12px !important;
  padding: 5px 8px !important;
  border-radius: 6px !important;
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  color: inherit !important;
}
.milestone-start-check {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 11px !important;
  opacity: 0.7 !important;
  cursor: pointer !important;
}
.milestone-add-actions {
  display: flex !important;
  gap: 6px !important;
  justify-content: flex-end !important;
}

/* ══════════════════════════════════════════════════════════════ */
/* ROUND G — PROJECT CARDS GRID (authoritative, supersedes above) */
/* ══════════════════════════════════════════════════════════════ */

/* Project zone as flex column so body fills remaining height */
.project-zone {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}
.project-zone > .project-zone-head,
.project-zone > .project-tabs { flex: 0 0 auto !important; }

/* Projects body: single column */
.project-zone-body {
  flex: 1 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
.projects-column {
  min-width: 0 !important;
  min-height: 0 !important;
  height: 100% !important;
  overflow-y: auto !important;
}

/* Bottom region: Chores (left, full height) + Projects (top-right) + Countdown (bottom-right) */
.side-bottom-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) !important;
  grid-template-areas: "projects" !important;
  gap: 10px !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
/* Time Gone (habit) + Chores side by side */
.habit-chores-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 220px) !important;
  gap: 10px !important;
  align-items: stretch !important;
}
.habit-chores-row .habit-col,
.habit-chores-row .chores-col {
  min-width: 0 !important;
  min-height: 0 !important;
  display: flex !important;
}
.habit-chores-row .habit-col > .habits-card,
.habit-chores-row .chores-col > .chores-card {
  flex: 1 !important;
  min-width: 0 !important;
}
.side-bottom-chores { grid-area: chores !important; min-height: 0 !important; overflow: hidden !important; display: flex !important; }
.side-bottom-projects { grid-area: projects !important; min-height: 0 !important; min-width: 0 !important; overflow: hidden !important; display: flex !important; }
.side-bottom-countdown { grid-area: countdown !important; min-width: 0 !important; display: flex !important; }
.side-bottom-projects > .project-zone { flex: 1 !important; min-width: 0 !important; min-height: 0 !important; }
.side-bottom-chores > .chores-card,
.side-bottom-countdown > .countdown-card { flex: 1 !important; min-width: 0 !important; }

/* Cards share the standard surface/style */
.chores-card,
.countdown-card {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  min-height: 0 !important;
  padding: 8px 12px 10px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 8px !important;
  background: rgba(15, 18, 26, 0.78) !important;
}
.countdown-card { max-height: 190px !important; }
.chores-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}
.chores-head h2 {
  margin: 0 !important;
  font-size: 11px !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  opacity: 0.55 !important;
}
.chore-add-form input {
  width: 100% !important;
  font-size: 12px !important;
  padding: 6px 8px !important;
  border-radius: 8px !important;
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  color: inherit !important;
}
.chores-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  overflow-y: auto !important;
  min-height: 0 !important;
}
.chore-row {
  display: grid !important;
  grid-template-columns: auto minmax(0,1fr) auto !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 4px 6px !important;
  border-radius: 8px !important;
  background: transparent !important;
  cursor: pointer !important;
}
.chore-row:hover { background: rgba(255,255,255,0.04) !important; }
.chore-text {
  font-size: 12px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  cursor: text !important;
}
.chore-text:hover { opacity: 0.8 !important; }
.chore-row.done .chore-text {
  opacity: 0.4 !important;
  text-decoration: line-through !important;
}
.chore-edit-input {
  font-size: 12px !important;
  width: 100% !important;
  padding: 2px 6px !important;
  border-radius: 6px !important;
  background: rgba(255,255,255,0.07) !important;
  border: 1px solid rgba(255,255,255,0.16) !important;
  color: inherit !important;
}
.chore-del {
  background: transparent !important;
  border: none !important;
  opacity: 0 !important;
  cursor: pointer !important;
  color: var(--ds-danger, #e05050) !important;
  display: flex !important;
}
.chore-row:hover .chore-del { opacity: 0.7 !important; }

/* Neat grid: fill columns, keep cards readable */
.projects {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
  align-content: start !important;
  align-items: stretch !important;
  grid-auto-rows: 88px !important;
}

/* Compact card: two rows (head + footer) that auto-size to content, ~30% shorter */
.proj-card {
  height: auto !important;
  min-height: 0 !important;
  align-self: start !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 2px !important;
  padding: 5px 8px !important;
  cursor: pointer !important;
}

/* Head: avatar | stacked copy | badge */
.proj-head {
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 7px !important;
}
.proj-avatar-cell,
.proj-avatar-cell img,
.proj-avatar-cell .project-thumb {
  width: 22px !important;
  height: 22px !important;
  border-radius: 6px !important;
}
.proj-copy {
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  overflow: hidden !important;
}
.proj-name {
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.proj-cat {
  display: flex !important;
  flex-direction: column !important;
  line-height: 1.2 !important;
  gap: 0 !important;
  min-width: 0 !important;
  overflow: hidden !important;
}
.proj-cat-main {
  font-size: 9px !important;
  opacity: 0.55 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.proj-cat-sub {
  font-size: 8px !important;
  opacity: 0.4 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.proj-badge {
  align-self: center !important;
  justify-self: end !important;
  font-size: 9px !important;
  font-weight: 600 !important;
  opacity: 0.6 !important;
  background: rgba(255,255,255,0.08) !important;
  border-radius: 999px !important;
  padding: 1px 6px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

/* Footer: day-count left, hover actions right */
.proj-footer {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}
.proj-age { font-size: 8px !important; opacity: 0.4 !important; }
.proj-footer .proj-actions {
  display: flex !important;
  gap: 6px !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
.proj-card:hover .proj-footer .proj-actions,
.proj-card:focus-within .proj-footer .proj-actions {
  visibility: visible !important;
  pointer-events: auto !important;
}
.proj-head .proj-actions { display: none !important; }

/* ══════════════════════════════════════════════════════════════ */
/* ROUND G — HABIT CELLS (authoritative)                          */
/* ══════════════════════════════════════════════════════════════ */

.habit-consistency .habit-track {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

/* WEEK: cells sit close together */
.habit-consistency.week .habit-track {
  --htcgap: 5px 2px !important;
}
.habit-consistency.week .habit-track .habit-cell,
.habit-consistency.week .habit-track .habit-cell-label {
  max-width: 20px !important;
  justify-self: center !important;
}
.habit-consistency.week .habit-track .habit-cell {
  height: 20px !important;
  max-height: 20px !important;
}

/* MONTH: very narrow cells, minimal gap, no overflow */
.habit-consistency.month .habit-track {
  --htcgap: 5px 1px !important;
}
.habit-consistency.month .habit-track .habit-cell,
.habit-consistency.month .habit-track .habit-cell-label {
  max-width: 9px !important;
  justify-self: center !important;
}
.habit-consistency.month .habit-track .habit-cell {
  height: 9px !important;
  max-height: 9px !important;
}

/* Uniform themed cell styling (green = done, red = failed) */
.habit-cell {
  width: 100% !important;
  border: none !important;
  border-radius: 3px !important;
  padding: 0 !important;
  aspect-ratio: 1 / 1 !important;
  transition: background 0.12s ease, opacity 0.12s ease !important;
}
.habit-cell:not(.done):not(.failed) {
  background: rgba(255,255,255,0.06) !important;
  opacity: 1 !important;
}
.habit-cell.done {
  background: #34c759 !important;
  opacity: 1 !important;
}
.habit-cell.failed {
  background: #ff453a !important;
  opacity: 1 !important;
}
.habit-cell.today:not(.done):not(.failed) {
  background: rgba(255,255,255,0.12) !important;
  outline: 1.5px solid rgba(255,255,255,0.35) !important;
  outline-offset: -1px !important;
}

/* ══════════════════════════════════════════════════════════════ */
/* ROUND H — Chores/Countdown headers, Time Gone, Countdown        */
/* ══════════════════════════════════════════════════════════════ */

/* Headers match the eyebrow style of other cards */
.chores-head,
.countdown-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex: 0 0 auto !important;
}
.chores-head h2,
.countdown-head h2 {
  margin: 0 !important;
  color: rgba(255, 255, 255, 0.94) !important;
  font-size: 0.74rem !important;
  font-weight: 400 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
  opacity: 1 !important;
}

/* ── Habit card tabbed header ── */
.habits-card-tabbed { grid-template-rows: 24px minmax(0, 1fr) !important; }
.habit-card-tabs { flex: 0 0 auto !important; }

/* ── Time Gone bars ── */
.timegone-body {
  display: flex !important;
  flex-direction: column !important;
  gap: 9px !important;
  padding: 6px 2px 2px !important;
  overflow-y: auto !important;
  min-height: 0 !important;
}
.timegone-row { display: flex !important; flex-direction: column !important; gap: 3px !important; }
.timegone-row-top {
  display: flex !important;
  justify-content: space-between !important;
  align-items: baseline !important;
}
.timegone-label {
  font-size: 11px !important;
  font-weight: 600 !important;
  opacity: 0.8 !important;
}
.timegone-meta { font-size: 10px !important; opacity: 0.45 !important; }
.timegone-bar {
  height: 5px !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,0.08) !important;
  overflow: hidden !important;
}
.timegone-bar > i {
  display: block !important;
  height: 100% !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, #5b8cff, #8b5bff) !important;
}
.timegone-row.life .timegone-bar > i {
  background: linear-gradient(90deg, #ff9f43, #ff453a) !important;
}

/* ── Life settings popup ── */
.life-settings {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  margin-top: 6px !important;
  padding: 10px !important;
  border-radius: 10px !important;
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
}
.life-field { display: flex !important; flex-direction: column !important; gap: 3px !important; }
.life-field > span {
  font-size: 10px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  opacity: 0.5 !important;
}
.life-field input {
  font-size: 12px !important;
  padding: 5px 8px !important;
  border-radius: 6px !important;
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  color: inherit !important;
}
.life-settings-actions { display: flex !important; justify-content: flex-end !important; gap: 6px !important; }

/* ── Countdown ── */
.countdown-add-form {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  flex: 0 0 auto !important;
}
.countdown-add-form input {
  font-size: 12px !important;
  padding: 6px 8px !important;
  border-radius: 8px !important;
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  color: inherit !important;
}
.countdown-add-actions { display: flex !important; justify-content: flex-end !important; gap: 6px !important; }
.countdown-list {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)) !important;
  gap: 8px !important;
  overflow-y: auto !important;
  min-height: 0 !important;
  align-content: start !important;
}
.countdown-item {
  position: relative !important;
  aspect-ratio: 1 / 1 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  gap: 2px !important;
  padding: 8px 6px !important;
  border-radius: 12px !important;
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  overflow: hidden !important;
}
.countdown-num {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  line-height: 1 !important;
}
.countdown-num strong {
  font-size: 30px !important;
  font-weight: 700 !important;
  color: #5b8cff !important;
}
.countdown-item.past .countdown-num strong { color: rgba(255,255,255,0.35) !important; }
.countdown-num small {
  font-size: 8px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  opacity: 0.45 !important;
  margin-top: 3px !important;
}
.countdown-info { min-width: 0 !important; width: 100% !important; display: flex !important; flex-direction: column !important; align-items: center !important; gap: 1px !important; }
.countdown-title {
  font-size: 11px !important;
  font-weight: 600 !important;
  max-width: 100% !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.countdown-date {
  font-size: 8px !important;
  opacity: 0.4 !important;
}
/* Edit button: bottom-right, reveal on hover */
.countdown-edit {
  position: absolute !important;
  bottom: 4px !important;
  right: 4px !important;
  background: transparent !important;
  border: none !important;
  opacity: 0 !important;
  cursor: pointer !important;
  color: rgba(255,255,255,0.7) !important;
  display: flex !important;
}
.countdown-item:hover .countdown-edit { opacity: 0.8 !important; }
.countdown-del {
  background: transparent !important;
  border: none !important;
  cursor: pointer !important;
  color: var(--ds-danger, #e05050) !important;
  display: flex !important;
  opacity: 0.8 !important;
}
/* Edit mode card */
.countdown-item.editing {
  justify-content: center !important;
  gap: 5px !important;
  padding: 8px !important;
}
.countdown-edit-title,
.countdown-edit-date {
  width: 100% !important;
  font-size: 10px !important;
  padding: 3px 5px !important;
  border-radius: 6px !important;
  background: rgba(255,255,255,0.07) !important;
  border: 1px solid rgba(255,255,255,0.14) !important;
  color: inherit !important;
}
.countdown-edit-actions {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
}

/* ══════════════════════════════════════════════════════════════ */
/* ROUND I — Kill leftover project-card height/padding (high spec)  */
/* The older `.projects > .project { padding-bottom:28px; min-height:144px }` */
/* rules out-specify `.proj-card`, so re-assert with `.projects > .project.proj-card`. */
/* ══════════════════════════════════════════════════════════════ */
.projects > .project.proj-card {
  height: 100% !important;
  min-height: 0 !important;
  align-self: stretch !important;
  padding: 8px !important;
  gap: 2px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
}
.projects > .project.proj-card .proj-footer {
  position: static !important;
  margin-top: auto !important;
  padding-top: 0 !important;
}
/* The old absolute age chip is unused in the proj-card markup */
.projects > .project.proj-card .proj-age { position: static !important; }

/* ── Milestone list timeline (replaces canvas layout) ── */
.milestone-panel { width: min(420px, 100%) !important; }

.ms-list {
  display: flex;
  flex-direction: column;
  padding: 8px 16px 16px;
  max-height: min(378px, calc(100dvh - 160px));
  overflow-y: auto;
  overflow-x: hidden;
}

.ms-row,
.ms-now-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0 10px;
  position: relative;
}

/* Vertical connecting line via spine */
.ms-spine {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 3px;
}
.ms-spine::after {
  content: "";
  flex: 1;
  width: 1px;
  background: rgba(255,255,255,0.15);
  min-height: 12px;
  margin-top: 4px;
}
.ms-row:last-child .ms-spine::after,
.ms-now-row:last-child .ms-spine::after {
  display: none;
}

/* Dots */
.ms-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.12);
  flex-shrink: 0;
}
.ms-row.past .ms-dot {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
}
.ms-row.future .ms-dot {
  background: color-mix(in srgb, var(--accent, #6ee7b7) 60%, transparent);
  border-color: color-mix(in srgb, var(--accent, #6ee7b7) 80%, white);
}
.ms-now-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.2);
}

/* Content */
.ms-body {
  display: grid;
  gap: 3px;
  padding-bottom: 14px;
}
.ms-title-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: #f5f3ee;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0 2px 2px;
  width: 100%;
  outline: none;
}
.ms-title-input:focus {
  border-bottom-color: rgba(255,255,255,0.3);
}
.ms-row.past .ms-title-input {
  color: rgba(255,255,255,0.45);
}
.ms-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ms-date-input {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 0.62rem;
  padding: 0;
  outline: none;
  cursor: pointer;
}
.ms-now-label {
  font-size: 0.64rem;
  font-weight: 700;
  color: #ef4444;
  padding: 2px 0 14px;
  letter-spacing: 0.02em;
}

/* ══════════════════════════════════════════════════════════════ */
/* ROUND J — Chores/Countdown unify, habit month grid, popup size  */
/* ══════════════════════════════════════════════════════════════ */

/* 1. Chores + Countdown headers: same eyebrow style as other cards */
.chores-head h2,
.countdown-head h2 {
  margin: 0 !important;
  color: #8b93a3 !important;
  font-size: 0.58rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  opacity: 1 !important;
}
.chores-card,
.countdown-card {
  padding: 8px !important;
  gap: 7px !important;
}
/* Countdown tiles: same surface tone as stat cards */
.countdown-item {
  border-radius: 8px !important;
  background: rgba(255,255,255,0.045) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
}
.countdown-num strong { font-size: 24px !important; }

/* 2+3. Habit cells: fixed sizes, no overlap, hover highlight */
.habit-consistency.week .habit-track .habit-cell,
.habit-consistency.week .habit-track .habit-cell-label {
  width: 18px !important;
  max-width: 18px !important;
  justify-self: center !important;
}
.habit-consistency.week .habit-track .habit-cell {
  height: 18px !important;
  max-height: 18px !important;
}
.habit-consistency.month .habit-track .habit-cell,
.habit-consistency.month .habit-track .habit-cell-label {
  width: 8px !important;
  max-width: 8px !important;
  min-width: 0 !important;
  justify-self: center !important;
}
.habit-consistency.month .habit-track .habit-cell {
  height: 8px !important;
  max-height: 8px !important;
  border-radius: 2px !important;
}
.habit-cell {
  cursor: pointer !important;
  transition: transform 0.1s ease, filter 0.1s ease, background 0.12s ease !important;
}
.habit-cell:hover {
  transform: scale(1.35) !important;
  filter: brightness(1.5) !important;
  z-index: 2 !important;
  position: relative !important;
}
.habit-cell:not(.done):not(.failed):hover {
  background: rgba(255,255,255,0.22) !important;
}

/* 4. Habit meta: log button never clipped */
.habit-track-meta {
  overflow: visible !important;
  flex-shrink: 0 !important;
  justify-content: flex-end !important;
  gap: 2px !important;
}
/* Month view is tight: hide streak text, keep buttons */
.habit-consistency.month .habit-track-meta small { display: none !important; }
.habit-track-meta .journal-button {
  visibility: visible !important;
  opacity: 0.55 !important;
  pointer-events: auto !important;
}
.habit-track:hover .habit-track-meta .journal-button { opacity: 1 !important; }

/* 5. Project popup: compact height, content-driven */
.project-modal-panel {
  height: auto !important;
  max-height: min(72dvh, 560px) !important;
}
.project-modal-panel .ms-list {
  flex: 1 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
}

/* Final pass: timeblock days, middle tasks, habits, projects, project popup */
.timeblock-topbar .schedule-switcher {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.timeblock-topbar .schedule-switcher::before,
.timeblock-topbar .schedule-switcher::after {
  display: none !important;
}

.timeblock-topbar .schedule-switcher button {
  flex: 0 0 auto !important;
  border-radius: 8px !important;
}

.middle-pane .task-board {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  align-content: start !important;
}

.task-board .task-column {
  height: auto !important;
  min-height: fit-content !important;
  flex: 0 0 auto !important;
}

.task-board .task-column .category-task-list {
  max-height: none !important;
  overflow: visible !important;
}

.side-pane,
.habit-shell,
.habit-col,
.habits-card,
.habits-card .habit-consistency,
.habits-card .timegone-body {
  overflow: visible !important;
  max-height: none !important;
}

.project-zone .projects {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  grid-auto-rows: 132px !important;
  gap: 10px !important;
}

.project-zone .projects > .project.proj-card {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
  gap: 10px !important;
  height: 176px !important;
  min-height: 176px !important;
  padding: 12px !important;
  border-radius: 12px !important;
  align-self: stretch !important;
}

.project-zone .projects > .project.proj-card .proj-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: start !important;
  gap: 8px !important;
}

.project-zone .projects > .project.proj-card .proj-main-hit {
  display: grid !important;
  grid-template-columns: 40px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  color: inherit !important;
  text-align: left !important;
  cursor: pointer !important;
}

.project-zone .projects > .project.proj-card .proj-avatar-cell,
.project-zone .projects > .project.proj-card .proj-avatar-cell img,
.project-zone .projects > .project.proj-card .proj-avatar-cell .project-thumb {
  width: 40px !important;
  height: 40px !important;
  border-radius: 10px !important;
}

.project-zone .projects > .project.proj-card .proj-copy {
  min-width: 0 !important;
  gap: 2px !important;
}

.project-zone .projects > .project.proj-card .proj-name {
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  white-space: normal !important;
  overflow: hidden !important;
  line-height: 1.2 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

.project-zone .projects > .project.proj-card .proj-cat {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  gap: 4px !important;
}

.project-zone .projects > .project.proj-card .proj-cat-main,
.project-zone .projects > .project.proj-card .proj-cat-sub {
  font-size: 10px !important;
  white-space: nowrap !important;
}

.project-zone .projects > .project.proj-card .proj-actions {
  display: flex !important;
  gap: 6px !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 140ms ease !important;
}

.project-zone .projects > .project.proj-card:hover .proj-actions,
.project-zone .projects > .project.proj-card:focus-within .proj-actions {
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.project-zone .projects > .project.proj-card .proj-body {
  display: grid !important;
  gap: 6px !important;
  align-content: start !important;
  min-height: 0 !important;
}

.project-zone .projects > .project.proj-card .proj-task,
.project-zone .projects > .project.proj-card .proj-empty,
.project-zone .projects > .project.proj-card .proj-more {
  min-height: 28px !important;
  border-radius: 8px !important;
}

.project-zone .projects > .project.proj-card .proj-task {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  padding: 0 10px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  color: inherit !important;
  text-align: left !important;
}

.project-zone .projects > .project.proj-card .proj-task.done {
  opacity: 0.45 !important;
}

.project-zone .projects > .project.proj-card .proj-task span,
.project-zone .projects > .project.proj-card .proj-empty,
.project-zone .projects > .project.proj-card .proj-more {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 11px !important;
}

.project-zone .projects > .project.proj-card .proj-empty {
  display: flex !important;
  align-items: center !important;
  padding: 0 10px !important;
  color: rgba(255, 255, 255, 0.45) !important;
  background: rgba(255, 255, 255, 0.03) !important;
}

.project-zone .projects > .project.proj-card .proj-more {
  display: flex !important;
  align-items: center !important;
  padding: 0 4px !important;
  background: transparent !important;
  border: 0 !important;
  color: rgba(255, 255, 255, 0.6) !important;
  cursor: pointer !important;
}

.project-zone .projects > .project.proj-card .proj-footer {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: end !important;
  margin-top: auto !important;
}

.project-zone .projects > .project.proj-card .proj-age {
  font-size: 10px !important;
  opacity: 0.55 !important;
}

.stats-drill-panel {
  width: min(440px, calc(100vw - 32px)) !important;
}

.stats-drill-row {
  min-height: 44px !important;
  align-items: center !important;
}

.stats-drill-check {
  width: 16px !important;
  height: 16px !important;
}

.project-modal-panel {
  width: min(560px, calc(100vw - 32px)) !important;
  height: min(82dvh, 760px) !important;
  max-height: min(82dvh, 760px) !important;
}

.project-modal-panel .modal-header {
  position: relative !important;
  overflow: visible !important;
}

.project-modal-panel .project-task-modal-list,
.project-modal-panel .project-notes-panel,
.project-modal-panel .ms-list {
  flex: 1 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
}

.project-notes-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
  padding: 16px !important;
}

.project-note-card {
  display: grid !important;
  gap: 8px !important;
  min-width: 0 !important;
}

.project-note-card span {
  font-size: 10px !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: rgba(255, 255, 255, 0.48) !important;
}

.project-note-card textarea {
  width: 100% !important;
  min-height: 128px !important;
  resize: vertical !important;
  padding: 10px 12px !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: inherit !important;
}

.milestone-add-popup {
  top: calc(100% + 8px) !important;
  right: 12px !important;
  left: auto !important;
  width: min(320px, calc(100vw - 56px)) !important;
  padding: 14px !important;
  border-radius: 12px !important;
  z-index: 30 !important;
}

.milestone-add-popup input[type="text"],
.milestone-add-popup input[type="date"] {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
}

/* Project cards: header top, age bottom-left, actions bottom-right, no task preview */
.project-zone .projects > .project.proj-card {
  grid-template-rows: auto 1fr auto !important;
  height: 132px !important;
  min-height: 132px !important;
}

.project-zone .projects > .project.proj-card .proj-head {
  grid-template-columns: minmax(0, 1fr) !important;
}

.project-zone .projects > .project.proj-card .proj-footer {
  justify-content: space-between !important;
  align-items: end !important;
  gap: 8px !important;
}

.project-zone .projects > .project.proj-card .proj-actions {
  margin-left: auto !important;
}

.project-zone .projects > .project.proj-card .proj-body {
  display: none !important;
}

/* Project popup: compact tasks */
.project-modal-panel .project-task-modal-list {
  padding: 12px 16px 16px !important;
  display: grid !important;
  gap: 6px !important;
  align-content: start !important;
}

.project-modal-panel .project-task-modal-row {
  min-height: 32px !important;
  padding: 6px 10px !important;
  border-radius: 10px !important;
  display: grid !important;
  grid-template-columns: 16px minmax(0, 1fr) 14px !important;
  align-items: center !important;
  gap: 8px !important;
}

.project-modal-panel .project-task-modal-row input[type="checkbox"] {
  width: 14px !important;
  height: 14px !important;
}

.project-modal-panel .ptm-title-wrap {
  min-width: 0 !important;
  display: grid !important;
  gap: 2px !important;
}

.project-modal-panel .ptm-title {
  font-size: 12px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.project-modal-panel .ptm-subs {
  display: flex !important;
  gap: 4px !important;
  flex-wrap: wrap !important;
}

.project-modal-panel .ptm-sub {
  font-size: 9px !important;
  line-height: 1.1 !important;
  opacity: 0.52 !important;
}

/* Note tab: one single field */
.project-modal-panel .project-notes-panel {
  padding: 16px !important;
}

.project-modal-panel .project-note-card.single {
  display: block !important;
}

.project-modal-panel .project-note-card.single textarea {
  min-height: 320px !important;
  width: 100% !important;
}

/* Milestone add inline */
.project-modal-panel .ms-row-form {
  align-items: start !important;
}

.project-modal-panel .ms-row-form .ms-body {
  padding-bottom: 14px !important;
}

.project-modal-panel .ms-row-form .ms-meta {
  flex-wrap: wrap !important;
  gap: 6px !important;
}

.project-modal-panel .milestone-start-check.inline {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  font-size: 10px !important;
  opacity: 0.68 !important;
}

/* ══════════════════════════════════════════════════════════════ */
/* ROUND K — New layout: no habit/inspiration, default schedule    */
/* ══════════════════════════════════════════════════════════════ */

/* Chores + Countdown side by side in side pane */
.side-chores-countdown {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 8px !important;
  min-height: 0 !important;
}
.side-chores-countdown > .chores-card,
.side-chores-countdown > .countdown-card {
  min-width: 0 !important;
  min-height: 0 !important;
  max-height: 200px !important;
}

/* Middle pane: task board fills all space (no inspiration shell) */
.middle-pane .task-board {
  height: 100% !important;
}

/* Default schedule tab: visually distinct */
[data-schedule-key="default"] {
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
}
[data-schedule-key="default"].active {
  background: rgba(110, 231, 183, 0.15) !important;
  color: #6ee7b7 !important;
  border-color: rgba(110, 231, 183, 0.3) !important;
}

/* ============================================================
   REDESIGN THEME — Smart Home inspired
   Deep indigo background · Glassmorphism · Purple-blue palette
   ============================================================ */

/* Background gradient */
body {
  background: radial-gradient(ellipse 120% 80% at 20% 10%, rgba(88,60,180,0.22) 0%, transparent 60%),
              radial-gradient(ellipse 80% 60% at 80% 80%, rgba(56,100,220,0.18) 0%, transparent 55%),
              #0c0a1e !important;
}

/* ---------- Global text ---------- */
body, .shell {
  color: #e2dcf5;
}

/* ---------- Cards & panels ---------- */
.right-pane,
.task-board,
.stats-card,
.habits-card,
.habits-card-tabbed,
.inspiration-card,
.project-zone,
.clock-card {
  background: rgba(255,255,255,0.045) !important;
  border-color: rgba(255,255,255,0.07) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
}

/* ---------- Now card ---------- */
.now-card {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent), rgba(14,10,34,0.82) 70%),
    rgba(14,10,34,0.92)
  ) !important;
  border-color: color-mix(in srgb, var(--accent), transparent 52%) !important;
  box-shadow: 0 0 60px color-mix(in srgb, var(--accent), transparent 72%),
              0 24px 64px rgba(0,0,0,0.38) !important;
}

/* ---------- Buttons ---------- */
.icon-button,
.mini-button,
.ghost-icon {
  background: rgba(255,255,255,0.07) !important;
  border-color: rgba(255,255,255,0.09) !important;
  color: #c5bef0 !important;
  border-radius: 10px !important;
}

.icon-button:hover,
.mini-button:hover,
.ghost-icon:hover {
  background: rgba(255,255,255,0.13) !important;
  border-color: rgba(255,255,255,0.16) !important;
  color: #f0ecff !important;
}

.mini-button.active,
.icon-button.active {
  background: rgba(124,108,248,0.22) !important;
  border-color: rgba(124,108,248,0.42) !important;
  color: #b8aeff !important;
}

/* ---------- Schedule switcher ---------- */
.schedule-switcher button {
  background: rgba(255,255,255,0.04) !important;
  border-color: rgba(255,255,255,0.07) !important;
  color: #9187c8 !important;
  border-radius: 8px !important;
}
.schedule-switcher button.active {
  background: rgba(124,108,248,0.2) !important;
  border-color: rgba(124,108,248,0.4) !important;
  color: #ccc5ff !important;
}

/* ---------- Segmented controls ---------- */
.segmented {
  background: rgba(255,255,255,0.04) !important;
}
.segmented button {
  color: #8880b8 !important;
}
.segmented button.active {
  background: rgba(124,108,248,0.24) !important;
  color: #e0daff !important;
}

/* ---------- Task board ---------- */
.task-column {
  background: rgba(255,255,255,0.03) !important;
}
.task-column.drag-over {
  background: rgba(124,108,248,0.09) !important;
  border-color: rgba(124,108,248,0.28) !important;
}
.task-column h2 {
  font-weight: 500 !important;
  letter-spacing: 0.01em !important;
}
.task {
  color: #ccc6f0 !important;
  border-radius: 8px !important;
}
.task:hover {
  background: rgba(255,255,255,0.06) !important;
}
.task.important {
  background: rgba(250,204,21,0.08) !important;
  box-shadow: inset 2px 0 0 rgba(250,204,21,0.7) !important;
}

/* ---------- Timeblock ---------- */
.time-grid {
  background: rgba(255,255,255,0.025) !important;
  border-radius: 10px !important;
}
.time-grid > span {
  background: rgba(255,255,255,0.035) !important;
}
.time-block {
  border-radius: 10px !important;
}
.time-block.current {
  box-shadow: 0 0 0 1px var(--accent),
              0 0 28px color-mix(in srgb, var(--accent), transparent 64%) !important;
}

/* ---------- Project zone ---------- */
.project {
  background: rgba(255,255,255,0.04) !important;
  border-color: rgba(255,255,255,0.07) !important;
  border-radius: 12px !important;
}
.project:hover {
  background: rgba(255,255,255,0.07) !important;
}
.project-tabs button {
  border-radius: 999px !important;
}
.project-tabs button.active {
  background: color-mix(in srgb, var(--tab-color), rgba(255,255,255,0.06) 88%) !important;
}

/* ---------- Stat cards ---------- */
.stat-card {
  background: rgba(255,255,255,0.04) !important;
  border-color: rgba(255,255,255,0.07) !important;
  border-radius: 10px !important;
}

/* ---------- Habit cells ---------- */
.habit-track div button {
  background: rgba(255,255,255,0.05) !important;
  border-radius: 5px !important;
}
.habit-track div button.today {
  outline-color: rgba(180,165,255,0.6) !important;
  background: rgba(180,165,255,0.14) !important;
}
.habit-track div button.done {
  background: linear-gradient(180deg, rgba(124,108,248,0.9), rgba(91,141,254,0.5)) !important;
}

/* ---------- FAB ---------- */
.fab {
  border-radius: 999px !important;
  box-shadow: 0 12px 36px rgba(0,0,0,0.42) !important;
}
.fab.primary {
  background: linear-gradient(135deg, #7c6ff8, #5b8dfe) !important;
  color: #fff !important;
  box-shadow: 0 12px 36px rgba(91,141,254,0.38) !important;
}

/* ---------- Modals ---------- */
.modal-backdrop {
  background: rgba(8,6,24,0.7) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
}
.flow-panel,
.edit-panel,
.quick-panel {
  background: rgba(18,14,42,0.96) !important;
  border-color: rgba(255,255,255,0.1) !important;
  border-radius: 20px !important;
  box-shadow: 0 32px 96px rgba(0,0,0,0.6),
              inset 0 1px 0 rgba(255,255,255,0.08) !important;
  backdrop-filter: blur(24px) !important;
}
.modal-header {
  border-bottom-color: rgba(255,255,255,0.07) !important;
}
.modal-header h2 {
  color: #e8e2f8 !important;
}

/* ---------- Inputs & selects ---------- */
input:not([type="checkbox"]):not([type="color"]):not([type="range"]),
select,
textarea {
  background: rgba(255,255,255,0.055) !important;
  border-color: rgba(255,255,255,0.1) !important;
  color: #e2dcf5 !important;
  border-radius: 10px !important;
}
input:focus,
select:focus,
textarea:focus {
  border-color: rgba(124,108,248,0.5) !important;
  outline-color: rgba(124,108,248,0.3) !important;
  box-shadow: 0 0 0 3px rgba(124,108,248,0.12) !important;
}

/* ---------- Quick task creator ---------- */
.quick-task-title {
  background: rgba(255,255,255,0.055) !important;
  border-color: rgba(255,255,255,0.1) !important;
  color: #e8e2f8 !important;
  border-radius: 12px !important;
  font-size: 0.9rem !important;
}
.quick-task-title:focus {
  border-color: rgba(124,108,248,0.5) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(124,108,248,0.14) !important;
}
.quick-task-select,
.quick-task-est {
  background: rgba(255,255,255,0.055) !important;
  border-color: rgba(255,255,255,0.1) !important;
  color: #e2dcf5 !important;
  border-radius: 10px !important;
}
.quick-task-project-btn {
  background: rgba(255,255,255,0.055) !important;
  border-color: rgba(255,255,255,0.1) !important;
  border-radius: 10px !important;
}
.quick-task-project-btn.has-project {
  background: rgba(124,108,248,0.14) !important;
  border-color: rgba(124,108,248,0.35) !important;
}
.quick-task-controls .icon-button[type="submit"] {
  background: rgba(124,108,248,0.2) !important;
  border-color: rgba(124,108,248,0.45) !important;
  color: #c4b8ff !important;
}
.quick-task-controls .icon-button[type="submit"]:hover {
  background: rgba(124,108,248,0.32) !important;
}
.star-toggle.active,
.quick-task-controls .star-toggle.active {
  color: #facc15 !important;
  border-color: rgba(250,204,21,0.3) !important;
  background: rgba(250,204,21,0.1) !important;
}

/* ---------- Project picker dropdown ---------- */
.project-picker-dropdown {
  background: rgba(14,10,34,0.98) !important;
  border-color: rgba(255,255,255,0.1) !important;
  border-radius: 14px !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7),
              inset 0 1px 0 rgba(255,255,255,0.08) !important;
  backdrop-filter: blur(24px) !important;
}
.project-picker-item {
  border-radius: 9px !important;
  color: #ccc6f0 !important;
}
.project-picker-item:hover,
.project-picker-item.focused {
  background: rgba(124,108,248,0.15) !important;
  color: #e8e2f8 !important;
}

/* ---------- Now line ---------- */
.now-line {
  background: rgba(167,139,250,0.9) !important;
  box-shadow: 0 0 8px 2px rgba(167,139,250,0.42) !important;
}
.now-line::before {
  background: #a78bfa !important;
  box-shadow: 0 0 6px 2px rgba(167,139,250,0.5) !important;
}
.now-line span {
  background: #a78bfa !important;
}

/* ---------- Clock card ---------- */
.clock-card strong {
  color: #e8e2f8 !important;
  letter-spacing: -0.02em !important;
}

/* ---------- Countdown / next chip ---------- */
.countdown {
  background: rgba(255,255,255,0.045) !important;
  border-radius: 10px !important;
}
.next-chip {
  background: rgba(255,255,255,0.045) !important;
  border-radius: 10px !important;
}

/* ---------- Eyebrow labels ---------- */
.eyebrow {
  color: #7b72b8 !important;
  letter-spacing: 0.14em !important;
}

/* ---------- Empty drop zone ---------- */
.empty-task-drop {
  border-color: rgba(124,108,248,0.2) !important;
  background: rgba(124,108,248,0.04) !important;
  color: #7b72b8 !important;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(124,108,248,0.28);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(124,108,248,0.48);
}

/* ---------- Task more button ---------- */
.task-more {
  border-color: rgba(255,255,255,0.07) !important;
  background: rgba(255,255,255,0.04) !important;
  color: #7b72b8 !important;
  border-radius: 999px !important;
}
.task-more:hover {
  background: rgba(255,255,255,0.08) !important;
  color: #e2dcf5 !important;
}

/* ---------- Archive toggle ---------- */
.archive-toggle {
  border-color: rgba(255,255,255,0.07) !important;
  background: rgba(255,255,255,0.03) !important;
  border-radius: 10px !important;
}

/* ---------- Chart bars ---------- */
.chart-bar {
  background: rgba(255,255,255,0.05) !important;
  border-radius: 8px !important;
}
.chart-tooltip {
  background: rgba(10,8,28,0.98) !important;
  border-color: rgba(255,255,255,0.1) !important;
  border-radius: 10px !important;
}

/* ---------- Flow panel ---------- */
.flow-check {
  background: rgba(255,255,255,0.04) !important;
  border-color: rgba(255,255,255,0.07) !important;
  border-radius: 12px !important;
}
.flow-check:has(input:checked) {
  border-color: rgba(124,108,248,0.38) !important;
  background: rgba(124,108,248,0.1) !important;
}
.flow-check > span {
  color: #a78bfa !important;
}
.lets-go-button {
  background: linear-gradient(135deg, #7c6ff8, #5b8dfe) !important;
  color: #fff !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 24px rgba(91,141,254,0.32) !important;
}

/* ---------- Notification card ---------- */
.notification-card {
  background: linear-gradient(180deg, rgba(18,14,42,0.99), rgba(12,9,30,0.98)) !important;
  border-color: color-mix(in srgb, var(--notification-accent), transparent 52%) !important;
  border-radius: 20px !important;
  box-shadow: 0 28px 72px rgba(0,0,0,0.56),
              inset 0 0 0 1px rgba(255,255,255,0.05) !important;
}

/* ---------- tb-est badge ---------- */
.task-board .tb-row .tb-est,
.done-today-list .tb-row .tb-est {
  color: #9187c8 !important;
  background: rgba(124,108,248,0.12) !important;
  border-radius: 5px !important;
  font-size: 10px !important;
  padding: 1px 5px !important;
  white-space: nowrap !important;
}

/* ---------- Done Today section ---------- */
.done-today-section {
  margin: 12px 0 0 !important;
  border-radius: 14px !important;
  background: rgba(255,255,255,0.025) !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  overflow: hidden !important;
}
.done-today-head {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 8px 12px !important;
  border-bottom: 1px solid rgba(255,255,255,0.06) !important;
}
.done-today-head h3 {
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: rgba(255,255,255,0.45) !important;
  flex: 1 !important;
}
.done-today-check {
  font-size: 13px !important;
  color: #7c6ff8 !important;
}
.done-today-count {
  font-size: 11px !important;
  font-weight: 600 !important;
  color: rgba(255,255,255,0.3) !important;
  background: rgba(255,255,255,0.08) !important;
  border-radius: 10px !important;
  padding: 1px 7px !important;
}
.done-today-list {
  padding: 4px 6px 6px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}
.done-today-list .tb-row {
  opacity: 0.45 !important;
  transition: opacity 0.15s !important;
}
.done-today-list .tb-row:hover {
  opacity: 0.75 !important;
}
.done-today-list .task-wrap {
  list-style: none !important;
}

/* ---------- Habit journal / log modal ---------- */
.habit-journal-panel,
.habit-log-panel {
  background: rgba(14,10,34,0.97) !important;
  border-color: rgba(255,255,255,0.09) !important;
  border-radius: 16px !important;
}

/* ---------- Auth / Login ---------- */
.auth-shell {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(900px 600px at 16% -8%, rgba(185, 163, 247, 0.26), transparent 58%),
    radial-gradient(820px 560px at 100% 6%, rgba(244, 166, 192, 0.2), transparent 58%),
    radial-gradient(760px 620px at 50% 116%, rgba(126, 232, 196, 0.16), transparent 60%),
    linear-gradient(165deg, #0d0820, #150d30 50%, #1d1442);
  overflow: auto;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 32px 28px;
  border-radius: 26px;
  background: rgba(31, 22, 54, 0.74);
  border: 1px solid rgba(214, 196, 248, 0.12);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), 0 0 60px rgba(185, 163, 247, 0.12);
  backdrop-filter: blur(22px) saturate(140%);
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--app-serif);
  font-size: 1.65rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.5px;
  color: #e8e2f8;
}

.auth-logo .logo-heart {
  color: #b9a3f7;
  filter: drop-shadow(0 2px 8px rgba(185, 163, 247, 0.45));
}

.auth-logo .logo-letter {
  position: relative;
  top: -1px;
}

.auth-brand h1 {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.auth-brand p {
  margin: 0;
  font-size: 0.86rem;
  color: rgba(232, 226, 248, 0.6);
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
  color: rgba(232, 226, 248, 0.7);
}

.auth-field input {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 6, 20, 0.6);
  color: #e8e2f8;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.auth-field input:focus {
  border-color: rgba(110, 231, 183, 0.6);
}

.auth-submit {
  margin-top: 6px;
  padding: 13px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(120deg, #b9a3f7, #f4a6c0 52%, #7ee8c4);
  color: #2a1640;
  font-size: 0.98rem;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(185, 163, 247, 0.28);
  transition: opacity 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
}

.auth-submit:hover { opacity: 0.92; }
.auth-submit:active { transform: translateY(1px); }
.auth-submit:disabled { opacity: 0.55; cursor: default; }

.auth-switch {
  margin: 4px 0 0;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(232, 226, 248, 0.6);
}

.auth-switch button {
  background: none;
  border: none;
  color: #6ee7b7;
  font-weight: 600;
  padding: 0 4px;
}

.auth-error {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(248, 113, 113, 0.14);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #fca5a5;
  font-size: 0.82rem;
}

.auth-notice {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(110, 231, 183, 0.12);
  border: 1px solid rgba(110, 231, 183, 0.3);
  color: #6ee7b7;
  font-size: 0.82rem;
}

.fab.fab-logout {
  background: rgba(245, 243, 238, 0.12);
  color: #e8e2f8;
  font-size: 1.05rem;
}
.fab.fab-logout:hover {
  background: rgba(248, 113, 113, 0.22);
  color: #fca5a5;
}

/* AI insight ("strict supervisor") trigger + modal */
.stats-head-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ai-insight-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent), transparent 55%);
  background: color-mix(in srgb, var(--accent), rgba(15, 18, 26, 0.92) 86%);
  color: color-mix(in srgb, var(--accent), white 24%);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.ai-insight-trigger:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent), rgba(15, 18, 26, 0.92) 76%);
}
.ai-insight-trigger .ui-icon {
  width: 13px;
  height: 13px;
}

.insight-panel .insight-body {
  padding: 12px 2px 4px;
  min-height: 120px;
}
.insight-text {
  display: grid;
  gap: 11px;
}
.insight-text p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: color-mix(in srgb, #e8edf5, var(--accent) 6%);
}
.insight-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 26px 8px;
  text-align: center;
}
.insight-status p {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(230, 224, 246, 0.78);
}
.insight-error-text {
  color: #fca5a5 !important;
}
.insight-spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid color-mix(in srgb, var(--accent), transparent 72%);
  border-top-color: var(--accent);
  animation: insight-spin 0.8s linear infinite;
}
@keyframes insight-spin {
  to { transform: rotate(360deg); }
}

/* ===== AI Summary card (top of side pane) ===== */
.ai-summary-card {
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--accent), rgba(176, 156, 214, 0.26) 52%);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent), rgba(12, 16, 24, 0.92) 86%), rgba(12, 16, 24, 0.95));
  padding: 12px 14px;
  margin-bottom: 12px;
}
.ai-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ai-summary-title {
  display: flex;
  align-items: center;
  gap: 6px;
  color: color-mix(in srgb, var(--accent), white 22%);
}
.ai-summary-title .eyebrow { margin: 0; }
.ai-summary-tools {
  display: flex;
  align-items: center;
  gap: 4px;
}
.ai-summary-stamp {
  font-size: 0.62rem;
  color: rgba(176, 156, 214, 0.7);
  margin-right: 2px;
}
.ai-summary-body { margin-top: 8px; min-height: 28px; }
.ai-summary-text {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: rgba(230, 224, 246, 0.92);
}
.ai-summary-empty {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(176, 156, 214, 0.72);
}

/* ===== AI Settings modal ===== */
.ai-settings-body {
  display: grid;
  gap: 14px;
  padding: 12px 2px 4px;
}
.ai-field {
  display: grid;
  gap: 6px;
  font-size: 0.78rem;
  color: rgba(203, 213, 225, 0.85);
}
.ai-field > span small {
  font-weight: 400;
  color: rgba(176, 156, 214, 0.7);
}
.ai-provider-seg { width: 100%; }
.ai-provider-seg button { flex: 1; }
.ai-input {
  width: 100%;
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #e8edf5;
  font-size: 0.88rem;
}
.ai-input:focus {
  outline: none;
  border-color: var(--accent);
}
.ai-hint {
  margin: 0;
  font-size: 0.7rem;
  line-height: 1.45;
  color: rgba(176, 156, 214, 0.7);
}
.ai-settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 2px;
}

/* ===== Floating chat ===== */
.ai-chat-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #5b8cff, #8b5bff);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(91, 92, 255, 0.4);
  z-index: 60;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ai-chat-fab:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 16px 38px rgba(91, 92, 255, 0.5);
}
.ai-chat-panel {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: min(380px, calc(100vw - 32px));
  height: min(560px, calc(100vh - 44px));
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(13, 17, 25, 0.98);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  z-index: 61;
  overflow: hidden;
}
.ai-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ai-chat-title {
  display: flex;
  align-items: center;
  gap: 7px;
  color: color-mix(in srgb, #8b9bff, white 8%);
}
.ai-chat-title strong { font-size: 0.92rem; }
.ai-chat-thread {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-empty {
  margin: auto 4px;
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.5;
  color: rgba(176, 156, 214, 0.7);
}
.chat-msg { display: flex; }
.chat-msg.user { justify-content: flex-end; }
.chat-msg.assistant { justify-content: flex-start; }
.chat-bubble {
  max-width: 80%;
  padding: 9px 12px;
  border-radius: 13px;
  font-size: 0.85rem;
  line-height: 1.5;
  white-space: normal;
  word-break: break-word;
}
.chat-msg.user .chat-bubble {
  background: linear-gradient(135deg, #5b8cff, #7b6bff);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-msg.assistant .chat-bubble {
  background: rgba(255, 255, 255, 0.06);
  color: #e8edf5;
  border-bottom-left-radius: 4px;
}
.chat-typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.chat-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(176, 156, 214, 0.7);
  animation: chat-blink 1.2s infinite ease-in-out;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes chat-blink {
  0%, 80%, 100% { opacity: 0.25; }
  40% { opacity: 1; }
}
.ai-chat-input {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.ai-chat-input input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #e8edf5;
  font-size: 0.88rem;
}
.ai-chat-input input:focus { outline: none; border-color: #6b8bff; }
.ai-chat-input .primary-button {
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-hint code {
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 5px;
  border-radius: 5px;
  font-size: 0.92em;
}

/* AI Insight card — strict coach, bullet list */
.ai-insight-card {
  border-color: color-mix(in srgb, var(--accent), rgba(148, 163, 184, 0.2) 42%);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent), transparent 80%) inset,
    0 14px 40px rgba(0, 0, 0, 0.28);
}
.ai-insight-card .ai-summary-body {
  max-height: 34vh;
  overflow-y: auto;
}
.ai-insight-content {
  font-size: 0.84rem;
  line-height: 1.5;
  color: rgba(226, 232, 240, 0.94);
}
.ai-insight-content p { margin: 0; }
.ai-insight-content p + p,
.ai-insight-content p + ul,
.ai-insight-content p + ol,
.ai-insight-content ul + p,
.ai-insight-content ol + p { margin-top: 7px; }
.ai-insight-content strong { font-weight: 700; color: #fff; }
.ai-insight-content em { font-style: italic; }
.ai-insight-content ul {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  gap: 7px;
}
.ai-insight-content ul li {
  position: relative;
  padding-left: 17px;
}
.ai-insight-content ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent), transparent 55%);
}
.ai-insight-content ol {
  margin: 6px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

/* Markdown formatting inside AI chat bubbles */
.chat-bubble p { margin: 0; }
.chat-bubble p + p,
.chat-bubble p + ul,
.chat-bubble p + ol,
.chat-bubble ul + p,
.chat-bubble ol + p { margin-top: 7px; }
.chat-bubble strong { font-weight: 700; }
.chat-bubble em { font-style: italic; }
.chat-bubble ul,
.chat-bubble ol {
  margin: 6px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
}
.chat-bubble ul { list-style: disc; }
.chat-bubble ol { list-style: decimal; }
.chat-bubble li { line-height: 1.45; }

/* PROJECTS panel: force the whole block to a square; even card grid */
.side-bottom-projects {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  min-height: 0 !important;
}
.side-bottom-projects > .project-zone {
  aspect-ratio: 1 / 1 !important;
  width: 100% !important;
  height: auto !important;
  max-height: 100% !important;
  align-self: flex-start !important;
}
