:root {
  color-scheme: light;
  --paper: #fbfbfa;
  --surface: #ffffff;
  --ink: #424241;
  --soft-ink: #626260;
  --muted: #a0a09d;
  --faint: #deded9;
  --line: #ecece8;
  --today: #454543;
  --focus: #419fff;
  --danger: #f06d76;
  --green: #cfe7d7;
  --yellow: #fff08a;
  --blue: #dbe9f4;
  --rose: #f6d2d8;
  --shadow: 0 18px 55px rgba(38, 38, 36, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100%;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(251, 251, 250, 0.99) 34rem),
    var(--paper);
  color: var(--ink);
  font-size: 16px;
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.icon-sprite {
  display: none;
}

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

.app-shell {
  min-height: 100vh;
  padding: 1.35rem clamp(1rem, 3vw, 2.2rem) 5rem;
}

.topbar {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) 2.4rem 2.4rem;
  align-items: center;
  gap: 0.8rem;
  width: min(100%, 104rem);
  min-height: 3rem;
  margin: 0 auto;
}

.today-jump,
.icon-button {
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.today-jump {
  height: 2rem;
  padding: 0 0.8rem;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-size: 0.87rem;
  font-weight: 750;
}

.today-jump:hover,
.today-jump:focus-visible {
  background: var(--today);
  outline: none;
}

.calendar-widget {
  position: relative;
  justify-self: start;
  display: inline-grid;
  grid-template-columns: auto 2rem 2rem;
  align-items: center;
  gap: 0.12rem;
}

.calendar-toggle {
  min-width: 3.1rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 750;
}

.calendar-toggle:hover,
.calendar-toggle:focus-visible,
.calendar-toggle[aria-expanded="true"] {
  background: rgba(66, 66, 65, 0.07);
  outline: none;
}

.calendar-popover {
  position: absolute;
  top: calc(100% + 0.55rem);
  left: 0;
  display: none;
  width: 18.2rem;
  padding: 0.95rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
  z-index: 52;
}

.calendar-popover.is-open {
  display: grid;
  gap: 0.95rem;
}

.calendar-popover header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2rem 2rem;
  align-items: center;
  gap: 0.15rem;
}

.calendar-popover strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 750;
  text-align: center;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.24rem;
}

.calendar-weekday,
.calendar-grid button {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
}

.calendar-weekday {
  color: var(--soft-ink);
  font-size: 0.73rem;
  font-weight: 700;
}

.calendar-grid button {
  position: relative;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--soft-ink);
  cursor: pointer;
  font-weight: 650;
}

.calendar-grid button:hover,
.calendar-grid button:focus-visible {
  background: rgba(66, 66, 65, 0.07);
  outline: none;
}

.calendar-grid .is-weekend {
  color: var(--danger);
}

.calendar-grid .is-outside-month {
  color: rgba(160, 160, 157, 0.36);
}

.calendar-grid .is-today {
  box-shadow: 0 0 0 2px var(--today) inset;
}

.calendar-grid .is-selected {
  background: var(--ink);
  color: white;
}

.calendar-grid .has-tasks::after {
  content: "";
  position: absolute;
  bottom: 0.22rem;
  width: 0.18rem;
  height: 0.18rem;
  border-radius: 50%;
  background: currentColor;
}

.icon-button {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  padding: 0;
  border-radius: 50%;
}

.icon-button:hover,
.icon-button:focus-visible {
  background: rgba(66, 66, 65, 0.07);
  outline: none;
}

.icon-button svg,
.task button svg,
.new-task-form svg,
.trash-dock svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sync-status {
  grid-column: 4;
  justify-self: end;
  position: relative;
  width: 2.35rem;
  height: 2.35rem;
  color: var(--muted);
  opacity: 0;
  pointer-events: none;
  transition: color 160ms ease, opacity 160ms ease;
}

.sync-status[data-status="checking"],
.sync-status[data-status="syncing"],
.sync-status[data-status="pending"],
.sync-status[data-status="offline"] {
  opacity: 1;
  pointer-events: auto;
}

.sync-status[data-status="pending"] {
  color: #b68a1f;
}

.sync-status[data-status="offline"] {
  color: #d17833;
}

.sync-status[data-status="syncing"] {
  color: var(--soft-ink);
}

.sync-status .sync-icon-off {
  display: none;
}

.sync-status[data-status="offline"] .sync-icon-cloud {
  display: none;
}

.sync-status[data-status="offline"] .sync-icon-off {
  display: block;
}

.sync-status-dot {
  position: absolute;
  right: 0.36rem;
  bottom: 0.36rem;
  width: 0.34rem;
  height: 0.34rem;
  border-radius: 50%;
  background: currentColor;
  opacity: 0;
}

.sync-status[data-status="checking"] .sync-status-dot,
.sync-status[data-status="syncing"] .sync-status-dot,
.sync-status[data-status="pending"] .sync-status-dot {
  opacity: 1;
}

.sync-status[data-status="checking"] .sync-status-dot,
.sync-status[data-status="syncing"] .sync-status-dot {
  animation: syncPulse 1.2s ease-in-out infinite;
}

@keyframes syncPulse {
  0%,
  100% {
    opacity: 0.34;
    transform: scale(0.78);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }
}

.box-toggle {
  grid-column: 5;
  justify-self: end;
  width: 2.35rem;
  height: 2.35rem;
  color: var(--soft-ink);
}

.box-toggle svg {
  width: 1.22rem;
  height: 1.22rem;
  stroke-width: 2.15;
}

.board {
  display: grid;
  grid-template-columns: repeat(var(--visible-days, 5), minmax(11rem, 1fr));
  gap: clamp(1.25rem, 4vw, 4.5rem);
  align-items: start;
  width: min(100%, 104rem);
  margin: clamp(3.8rem, 8vh, 5.75rem) auto 0;
}

.day-column {
  min-width: 0;
  min-height: min(48rem, calc(100vh - 10rem));
}

.day-header {
  display: grid;
  justify-items: center;
  gap: 0.28rem;
  min-height: 4.65rem;
  color: var(--muted);
}

.weekday {
  min-height: 1rem;
  font-size: 0.72rem;
  font-weight: 650;
}

.date-number {
  display: grid;
  width: 2.12rem;
  height: 2.12rem;
  place-items: center;
  border: 1.8px solid transparent;
  border-radius: 50%;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.day-column.is-today .weekday,
.day-column.is-today .date-number {
  color: var(--today);
}

.day-column.is-today .date-number {
  border-color: var(--today);
}

.day-column.is-weekend .weekday,
.day-column.is-weekend .date-number {
  color: var(--danger);
}

.day-column.is-today.is-weekend .date-number {
  border-color: var(--danger);
}

.task-list {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 0.32rem;
  min-height: 11.5rem;
  padding: 0.45rem 0.1rem 1.1rem 1.25rem;
  border-radius: 0.45rem;
  transition: background 160ms ease, box-shadow 160ms ease;
}

.task-list.is-drop-target {
  background: rgba(65, 159, 255, 0.07);
  box-shadow: 0 0 0 1px rgba(65, 159, 255, 0.12) inset;
}

.task {
  position: relative;
  display: block;
  --tools-left: calc(100% + 0.2rem);
  --tools-bridge-width: calc(100% + 3rem);
  width: fit-content;
  max-width: 100%;
  border-radius: 0.18rem;
  color: var(--soft-ink);
  font-size: 0.87rem;
  cursor: grab;
  transition: opacity 130ms ease;
}

.task::after {
  content: "";
  position: absolute;
  top: -0.2rem;
  left: -2.25rem;
  z-index: 0;
  display: none;
  width: var(--tools-bridge-width);
  height: calc(100% + 0.4rem);
}

.task:hover::after,
.task:focus-visible::after,
.task.is-menu-open::after {
  display: block;
}

.task.is-editing::after {
  display: none;
}

.task-main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: start;
  width: fit-content;
  max-width: 100%;
  min-height: 1.45rem;
  padding: 0.08rem 0.28rem;
  border-radius: 0.18rem;
  background: transparent;
  transition: background 130ms ease, box-shadow 130ms ease;
}

.drag-ghost {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0.96;
  box-shadow: 0 14px 34px rgba(38, 38, 36, 0.16);
}

.drag-ghost .task-text {
  cursor: grabbing;
}

.task:hover .task-main,
.task.is-selected .task-main,
.task.is-menu-open .task-main {
  background: rgba(66, 66, 65, 0.06);
}

.task:focus-visible .task-main,
.task.is-selected .task-main,
.task.is-menu-open .task-main {
  outline: none;
  box-shadow: 0 0 0 1px rgba(66, 66, 65, 0.08);
}

.task:focus-visible {
  outline: none;
}

.task:active {
  cursor: grabbing;
}

.task.is-selected,
.task:focus-within {
  z-index: 2;
}

.task.is-dragging {
  opacity: 0.28;
}

.task.is-editing,
.task.is-editing:active {
  cursor: text;
}

.task.is-complete {
  color: var(--muted);
}

.task.is-complete .task-text {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(98, 98, 96, 0.55);
}

.task[data-color="green"] .task-main {
  background: var(--green);
}

.task[data-color="yellow"] .task-main {
  background: var(--yellow);
}

.task[data-color="blue"] .task-main {
  background: var(--blue);
}

.task[data-color="rose"] .task-main {
  background: var(--rose);
}

.task[data-color]:not([data-color="none"]).is-selected .task-main,
.task[data-color]:not([data-color="none"]).is-menu-open .task-main {
  box-shadow: 0 0 0 1px rgba(66, 66, 65, 0.11), 0 10px 26px rgba(38, 38, 36, 0.08);
}

.task.is-complete .done-button {
  color: white;
  background: var(--ink);
  border-color: var(--ink) !important;
}

.task button {
  display: grid;
  width: 1rem;
  height: 1rem;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.task .star-button {
  position: absolute;
  top: 0.19rem;
  left: -1.05rem;
  z-index: 1;
  margin-top: 0;
  color: transparent;
}

.task:hover .star-button,
.task:focus-within .star-button,
.task.is-selected .star-button,
.star-button.is-active {
  color: #f1d33b;
}

.task.is-starred .star-button {
  color: #f1d33b;
}

.star-button svg {
  width: 0.94rem;
  height: 0.94rem;
  fill: none;
  stroke: currentColor;
}

.star-button.is-active svg,
.task.is-starred .star-button svg {
  fill: currentColor;
}

.task .done-button {
  position: absolute;
  top: 0.2rem;
  left: -2.05rem;
  z-index: 1;
  width: 0.9rem;
  height: 0.9rem;
  margin-top: 0;
  border: 1.3px solid transparent !important;
  border-radius: 50%;
  color: transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease, border-color 120ms ease, background 120ms ease;
}

.task:hover .done-button,
.task:focus-within .done-button,
.task.is-selected .done-button,
.task.is-menu-open .done-button {
  border-color: rgba(160, 160, 157, 0.54) !important;
  opacity: 1;
  pointer-events: auto;
}

.task .done-button:hover,
.task .done-button:focus-visible {
  color: var(--soft-ink);
}

.done-button svg {
  width: 0.72rem;
  height: 0.72rem;
  stroke-width: 3;
}

.task-text {
  display: block;
  min-width: 0;
  width: fit-content;
  max-width: 100%;
  min-height: 1.18rem;
  padding: 0 0.08rem 0.03rem;
  border-radius: 0.12rem;
  overflow-wrap: anywhere;
  outline: none;
  line-height: 1.3;
  cursor: grab;
}

.task.is-editing .task-text {
  min-width: min(11rem, 56vw);
  cursor: text;
}

.task.is-editing .task-text:focus {
  box-shadow: 0 0 0 2px rgba(65, 159, 255, 0.18);
}

.task-tools {
  position: absolute;
  left: var(--tools-left);
  top: -0.1rem;
  z-index: 2;
  display: none;
  grid-template-columns: 1.2rem 1.2rem;
  align-items: center;
  gap: 0.08rem;
  width: max-content;
  max-width: min(16rem, calc(100vw - 2rem));
  margin: 0;
  padding: 0.08rem;
  border: 1px solid var(--line);
  border-radius: 0.28rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 28px rgba(38, 38, 36, 0.08);
}

.task:hover .task-tools,
.task:focus-visible .task-tools,
.task.is-menu-open .task-tools {
  display: grid;
}

.task.is-editing .task-tools {
  display: none;
}

.task-tools button {
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
}

.task-tools .menu-row,
.task-tools .color-option,
.task-tools .repeat-option {
  display: grid;
  width: 100%;
  height: auto;
  border-radius: 0.32rem;
}

.task-tools svg {
  width: 0.88rem;
  height: 0.88rem;
}

.task-tools button:hover,
.task-tools button:focus-visible {
  background: rgba(66, 66, 65, 0.07);
  outline: none;
}

.task-menu {
  position: absolute;
  top: calc(100% + 0.32rem);
  left: var(--menu-left, 0);
  display: none;
  width: 13.4rem;
  gap: 0.08rem;
  padding: 0.48rem;
  border: 1px solid var(--line);
  border-radius: 0.32rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.task.is-menu-open .task-menu {
  display: grid;
}

.menu-row {
  display: grid;
  grid-template-columns: 1.05rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.42rem;
  width: 100%;
  min-height: 1.64rem;
  height: auto;
  justify-content: stretch;
  padding: 0 0.42rem;
  border: 0;
  border-radius: 0.32rem;
  background: transparent;
  color: var(--soft-ink);
  cursor: pointer;
  font-size: 0.8rem;
  justify-items: start;
  text-align: left;
}

.menu-row:hover,
.menu-row:focus-visible {
  background: rgba(66, 66, 65, 0.06);
  outline: none;
}

.menu-row svg {
  width: 0.92rem !important;
  height: 0.92rem !important;
  justify-self: center;
}

.star-menu-button.is-active {
  color: #d8b900 !important;
}

.star-menu-button.is-active svg {
  fill: currentColor;
}

.menu-label {
  justify-self: start;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-menu kbd,
.repeat-option kbd,
.color-option kbd {
  display: inline-grid;
  min-width: 1.36rem;
  height: 1.18rem;
  place-items: center;
  padding: 0 0.26rem;
  border-radius: 0.42rem;
  background: rgba(66, 66, 65, 0.07);
  color: var(--muted);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  justify-self: end;
  align-self: center;
  text-align: center;
  line-height: 1;
}

.menu-row.delete-button {
  color: var(--danger) !important;
}

.menu-row.delete-button kbd {
  background: rgba(240, 109, 118, 0.14);
  color: var(--danger);
}

.task .color-green {
  color: var(--green);
}

.task .color-yellow {
  color: var(--yellow);
}

.task .color-blue {
  color: var(--blue);
}

.task .color-rose {
  color: var(--rose);
}

.delete-button {
  color: var(--danger) !important;
}

.highlight-group,
.repeat-group {
  position: relative;
}

.color-menu,
.repeat-menu {
  position: absolute;
  top: 0;
  left: calc(100% + 0.4rem);
  display: none;
  width: 11.4rem;
  gap: 0.08rem;
  padding: 0.48rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.highlight-group:hover .color-menu,
.highlight-group:focus-within .color-menu,
.task.is-color-open .color-menu,
.repeat-group:hover .repeat-menu,
.repeat-group:focus-within .repeat-menu,
.task.is-repeat-open .repeat-menu {
  display: grid;
}

.color-option,
.repeat-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.42rem;
  width: 100%;
  min-height: 1.64rem;
  height: auto;
  justify-content: stretch;
  padding: 0 0.42rem;
  border-radius: 0.32rem;
  border: 0;
  background: transparent;
  color: var(--soft-ink);
  cursor: pointer;
  font-size: 0.8rem;
  justify-items: start;
  text-align: left;
}

.color-option {
  grid-template-columns: 1rem minmax(0, 1fr) auto;
}

.repeat-option span,
.color-option span {
  justify-self: start;
  text-align: left;
}

.color-option kbd,
.repeat-option kbd {
  justify-self: end;
}

.color-swatch {
  width: 0.86rem;
  height: 0.86rem;
  border: 1px solid rgba(66, 66, 65, 0.16);
  border-radius: 50%;
  background: currentColor;
}

.color-swatch.no-color {
  background:
    linear-gradient(135deg, transparent calc(50% - 1px), #d86c75 50%, transparent calc(50% + 1px)),
    #ffffff;
}

.color-option.is-active .color-swatch {
  box-shadow: 0 0 0 2px rgba(66, 66, 65, 0.2);
}

.color-option:hover,
.color-option:focus-visible,
.color-option.is-active,
.repeat-option:hover,
.repeat-option:focus-visible,
.repeat-option.is-active {
  background: rgba(66, 66, 65, 0.07);
  outline: none;
}

.new-task-form {
  display: none;
  grid-template-columns: 1.25rem minmax(0, 1fr);
  gap: 0.16rem;
  align-items: center;
  width: 100%;
  min-height: 1.9rem;
  padding: 0.12rem 0.2rem;
  border-radius: 0.45rem;
  color: rgba(160, 160, 157, 0.72);
  cursor: text;
}

.new-task-form:focus-within {
  background: rgba(65, 159, 255, 0.05);
  color: var(--focus);
}

.new-task-form label {
  min-width: 0;
}

.new-task-form input {
  width: 100%;
  min-height: 1.75rem;
  padding: 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  font-size: 0.87rem;
  line-height: 1.3;
  outline: none;
}

.new-task-form input:focus {
  border-bottom-color: rgba(65, 159, 255, 0.38);
}

.day-actions {
  display: none;
}

.day-add-button {
  display: grid;
  width: 1.85rem;
  height: 1.85rem;
  place-items: center;
  margin: 0.25rem 0 0 1.25rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(160, 160, 157, 0.7);
  cursor: pointer;
}

.day-add-button:hover,
.day-add-button:focus-visible {
  background: rgba(66, 66, 65, 0.06);
  color: var(--focus);
  outline: none;
}

.day-add-button svg {
  width: 1.08rem;
  height: 1.08rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.day-nav-button {
  display: none;
}

.trash-dock {
  position: fixed;
  top: clamp(5.2rem, 11vh, 8rem);
  left: 50%;
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border: 2px solid rgba(240, 109, 118, 0.8);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  color: var(--danger);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -0.4rem) scale(0.9);
  transition: opacity 160ms ease, transform 160ms ease, color 160ms ease, border-color 160ms ease;
  backdrop-filter: blur(16px);
  z-index: 45;
}

.trash-dock.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}

.trash-dock.is-drop-target {
  border-color: var(--danger);
  background: rgba(240, 109, 118, 0.1);
  transform: translate(-50%, 0) scale(1.12);
}

.completed-shelf {
  position: fixed;
  left: clamp(1rem, 3vw, 2.2rem);
  bottom: 7.8rem;
  display: grid;
  gap: 0.32rem;
  justify-items: start;
  max-width: 26rem;
  padding-left: 1.35rem;
  color: rgba(160, 160, 157, 0.58);
  z-index: 1;
}

.completed-shelf.is-empty {
  display: none;
}

.completed-item {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 0.87rem;
  line-height: 1.3;
  text-align: left;
  text-decoration: line-through;
}

.completed-item:hover,
.completed-item:focus-visible {
  color: var(--soft-ink);
  outline: none;
}

.undo-toast {
  position: fixed;
  left: 50%;
  bottom: 2.8rem;
  display: inline-grid;
  grid-template-columns: minmax(0, auto) auto;
  align-items: center;
  gap: 0.85rem;
  width: max-content;
  max-width: calc(100vw - 2rem);
  padding: 0.28rem 0.5rem;
  border: 0;
  border-radius: 0.12rem;
  background: rgba(246, 246, 244, 0.96);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.25;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 0.35rem);
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 50;
}

.undo-toast.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.undo-message {
  display: block;
  overflow: hidden;
  max-width: min(28rem, calc(100vw - 6rem));
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.undo-message-part.is-note {
  color: var(--muted);
  font-weight: 650;
}

.undo-message-part.is-item {
  color: var(--soft-ink);
  font-weight: 760;
}

.undo-toast button {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  white-space: nowrap;
}

.undo-toast button:hover,
.undo-toast button:focus-visible {
  color: var(--ink);
  outline: none;
}

.undo-toast svg,
.box-form svg,
.box-item svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.composer-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  z-index: 65;
}

.composer-overlay[hidden] {
  display: none;
}

.composer-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(251, 251, 250, 0.72);
  cursor: default;
  backdrop-filter: blur(4px);
}

.task-composer {
  position: relative;
  display: grid;
  width: min(34rem, calc(100vw - 2rem));
  gap: 0.8rem;
  padding: 1.65rem 1.75rem 1.35rem;
  border: 1px solid rgba(236, 236, 232, 0.86);
  border-radius: 0.6rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 58px rgba(38, 38, 36, 0.12);
}

.composer-date {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  text-transform: uppercase;
}

.task-composer textarea {
  width: 100%;
  min-height: 5rem;
  resize: vertical;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1.32;
  outline: none;
}

.task-composer textarea::placeholder {
  color: rgba(98, 98, 96, 0.66);
}

.composer-hint {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.composer-actions {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.35rem;
  align-items: center;
}

.composer-actions button {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 0.34rem;
  min-height: 2.1rem;
  padding: 0 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  background: white;
  color: var(--soft-ink);
  cursor: pointer;
  font-size: 0.87rem;
  font-weight: 700;
}

.composer-actions button:hover,
.composer-actions button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(65, 159, 255, 0.12);
}

.composer-cancel {
  justify-self: end;
}

.composer-add,
.composer-aside {
  border-color: transparent !important;
  background: #2ecb79 !important;
  color: white !important;
}

.composer-actions kbd {
  color: inherit;
  font: inherit;
  font-size: 0.74rem;
  opacity: 0.78;
}

.pairing-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  z-index: 70;
}

.pairing-overlay[hidden] {
  display: none;
}

.pairing-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(251, 251, 250, 0.76);
  cursor: default;
  backdrop-filter: blur(4px);
}

.pairing-overlay.is-login .pairing-backdrop {
  background: var(--paper);
  backdrop-filter: none;
}

.pairing-card {
  position: relative;
  display: grid;
  width: min(28rem, calc(100vw - 2rem));
  gap: 0.75rem;
  padding: 1.45rem;
  border: 1px solid rgba(236, 236, 232, 0.9);
  border-radius: 0.6rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 58px rgba(38, 38, 36, 0.12);
}

.pairing-kicker {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
  text-transform: uppercase;
}

.pairing-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.2rem;
}

.pairing-card p {
  margin: 0 0 0.25rem;
  color: var(--soft-ink);
  font-size: 0.88rem;
  line-height: 1.4;
}

.pairing-card label {
  display: grid;
  gap: 0.28rem;
  color: var(--soft-ink);
  font-size: 0.76rem;
  font-weight: 700;
}

.pairing-card input {
  width: 100%;
  min-height: 2.35rem;
  border: 1px solid var(--line);
  border-radius: 0.42rem;
  background: white;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  padding: 0 0.65rem;
  outline: none;
}

.pairing-card input:focus {
  border-color: rgba(65, 159, 255, 0.42);
  box-shadow: 0 0 0 3px rgba(65, 159, 255, 0.12);
}

.pairing-status {
  min-height: 1.15rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.35;
}

.pairing-actions {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 0.4rem;
  align-items: center;
}

.pairing-actions button {
  min-height: 2.2rem;
  padding: 0 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.38rem;
  background: white;
  color: var(--soft-ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 750;
}

.pairing-actions button:hover,
.pairing-actions button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(65, 159, 255, 0.12);
}

.pairing-cancel {
  justify-self: start;
}

.pairing-deny {
  color: #f16472 !important;
}

.pairing-approve {
  border-color: transparent !important;
  background: #2ecb79 !important;
  color: white !important;
}

.box-drawer {
  position: fixed;
  top: 0;
  right: 0;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 0.85rem;
  width: min(24rem, calc(100vw - 1rem));
  height: 100vh;
  padding: 1.35rem;
  border-left: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: -20px 0 45px rgba(38, 38, 36, 0.08);
  opacity: 0;
  pointer-events: none;
  transform: translateX(100%);
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 55;
}

.box-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.box-drawer header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2rem;
  align-items: start;
  gap: 1rem;
}

.drawer-kicker {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}

.box-drawer h2 {
  margin: 0.1rem 0 0;
  color: var(--ink);
  font-size: 1rem;
}

.box-form,
.box-item {
  display: grid;
  grid-template-columns: 1.2rem minmax(0, 1fr);
  align-items: center;
  gap: 0.35rem;
  font-size: 0.87rem;
  line-height: 1.3;
}

.box-form {
  color: var(--muted);
}

.box-form input {
  width: 100%;
  min-height: 2rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-size: inherit;
  outline: none;
}

.box-list {
  display: grid;
  align-content: start;
  gap: 0.3rem;
  overflow: auto;
  border-radius: 0.35rem;
  transition: background 160ms ease, box-shadow 160ms ease;
}

.box-list.is-drop-target {
  background: rgba(65, 159, 255, 0.07);
  box-shadow: 0 0 0 1px rgba(65, 159, 255, 0.12) inset;
}

.box-item {
  grid-template-columns: minmax(0, 1fr) auto auto;
  min-height: 1.85rem;
  padding: 0.16rem 0;
  color: var(--soft-ink);
  cursor: grab;
  transition: opacity 130ms ease;
}

.box-item span {
  overflow-wrap: anywhere;
}

.box-item.is-dragging {
  opacity: 0.28;
}

.box-item button {
  height: 1.45rem;
  border: 0;
  border-radius: 0.28rem;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
}

.box-item button:hover,
.box-item button:focus-visible {
  background: rgba(66, 66, 65, 0.07);
  color: var(--ink);
  outline: none;
}

.box-delete-button {
  display: grid;
  width: 1.8rem;
  place-items: center;
  color: var(--danger) !important;
}

@media (max-width: 860px) {
  .app-shell {
    padding-inline: 1rem;
  }

  .topbar {
    grid-template-columns: auto auto 1fr 2.4rem 2.4rem;
    gap: 0.55rem;
  }

  .board {
    grid-auto-columns: minmax(16rem, 78vw);
    grid-auto-flow: column;
    grid-template-columns: none;
    gap: 1.25rem;
    width: calc(100vw - 2rem);
    margin-top: 3.2rem;
    overflow-x: auto;
    padding: 0 0.1rem 2rem;
    scroll-snap-type: x mandatory;
  }

  .day-column {
    scroll-snap-align: start;
  }

  .calendar-popover {
    left: -3.15rem;
  }
}

@media (max-width: 720px) {
  .app-shell {
    min-height: 100dvh;
    padding: 1rem 0.85rem 4.5rem;
  }

  .topbar,
  .board {
    width: min(100%, 34rem);
  }

  .topbar {
    min-height: 3.25rem;
    gap: 0.45rem;
  }

  .today-jump {
    height: 2.75rem;
    padding-inline: 1rem;
    font-size: 1.05rem;
  }

  .calendar-widget {
    grid-template-columns: auto 2.75rem 2.75rem;
    gap: 0.05rem;
  }

  .calendar-toggle {
    min-width: 3.4rem;
    height: 2.75rem;
    font-size: 1.05rem;
  }

  .icon-button {
    width: 2.75rem;
    height: 2.75rem;
  }

  .icon-button svg,
  .box-toggle svg {
    width: 1.34rem;
    height: 1.34rem;
  }

  .box-toggle {
    width: 2.75rem;
    height: 2.75rem;
  }

  .sync-status {
    width: 2.75rem;
    height: 2.75rem;
  }

  .board {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-flow: row;
    grid-auto-columns: auto;
    gap: 0;
    margin-top: 1.6rem;
    overflow: visible;
    padding: 0 0 7.5rem;
    scroll-snap-type: none;
  }

  .day-column {
    min-height: calc(100dvh - 9rem);
    scroll-snap-align: none;
  }

  .day-header {
    min-height: 5.95rem;
    margin-bottom: 0.7rem;
  }

  .weekday {
    font-size: 0.86rem;
  }

  .date-number {
    width: 2.65rem;
    height: 2.65rem;
    border-width: 2px;
    font-size: 1.1rem;
  }

  .task-list {
    min-height: calc(100dvh - 21rem);
    gap: 0.62rem;
    padding-left: 3.85rem;
  }

  .task {
    font-size: 1.12rem;
  }

  .task-main {
    min-height: 1.82rem;
    padding: 0.1rem 0.36rem 0.12rem;
  }

  .task[data-color]:not([data-color="none"]) {
    margin-block: 0.06rem;
  }

  .task[data-color]:not([data-color="none"]) .task-main {
    padding-block: 0.16rem;
  }

  .task-text {
    min-height: 1.38rem;
    line-height: 1.32;
  }

  .task .done-button,
  .task .star-button {
    top: 50%;
    width: 2.75rem;
    height: 2.75rem;
    transform: translateY(-50%);
  }

  .task .done-button {
    left: -3.8rem;
    border: 0 !important;
  }

  .task.is-complete .done-button {
    border-color: transparent !important;
    background: transparent;
    color: transparent;
  }

  .task .star-button {
    left: -2.05rem;
  }

  .task .done-button::before {
    content: "";
    display: block;
    width: 1.05rem;
    height: 1.05rem;
    border: 1.5px solid rgba(160, 160, 157, 0.5);
    border-radius: 50%;
  }

  .task.is-complete .done-button::before {
    border-color: var(--ink);
    background: var(--ink);
  }

  .done-button svg {
    display: none;
  }

  .star-button svg {
    width: 1.28rem;
    height: 1.28rem;
  }

  .task-tools {
    grid-template-columns: 2.75rem 2.75rem;
    gap: 0.08rem;
    padding: 0.12rem;
    border-radius: 0.48rem;
  }

  .task-tools button {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.38rem;
  }

  .task-tools svg {
    width: 1.34rem;
    height: 1.34rem;
  }

  .menu-row,
  .color-option,
  .repeat-option {
    min-height: 2.75rem;
    padding-inline: 0.72rem;
    gap: 0.62rem;
    font-size: 1rem;
  }

  .menu-row {
    grid-template-columns: 1.15rem minmax(0, 1fr);
  }

  .color-option {
    grid-template-columns: 1rem minmax(0, 1fr);
  }

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

  .task-menu kbd,
  .repeat-option kbd,
  .color-option kbd,
  .composer-actions kbd {
    display: none;
  }

  .day-actions {
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr) 3rem minmax(0, 1fr) 3rem;
    align-items: center;
    width: min(100%, 24rem);
    margin: 1.55rem auto 0;
  }

  .day-add-button,
  .day-nav-button {
    display: grid;
    width: 3rem;
    height: 3rem;
    margin: 0;
    place-items: center;
    border-radius: 50%;
    border: 2px solid rgba(160, 160, 157, 0.58);
    background: transparent;
    color: rgba(98, 98, 96, 0.76);
    cursor: pointer;
  }

  .day-previous-button {
    grid-column: 1;
  }

  .day-add-button {
    grid-column: 3;
  }

  .day-next-button {
    grid-column: 5;
  }

  .day-add-button:hover,
  .day-add-button:focus-visible,
  .day-nav-button:hover,
  .day-nav-button:focus-visible {
    background: rgba(66, 66, 65, 0.06);
    color: var(--focus);
    outline: none;
  }

  .day-add-button svg,
  .day-nav-button svg {
    width: 1.36rem;
    height: 1.36rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .completed-shelf {
    position: static;
    width: min(100%, 34rem);
    max-width: none;
    margin: -5.25rem auto 0;
    padding-left: 3.85rem;
  }

  .completed-item {
    min-height: 2.75rem;
    font-size: 1.02rem;
  }

  .undo-toast {
    bottom: 1rem;
  }

  .calendar-popover {
    left: 0;
  }

  .composer-overlay {
    align-items: start;
    padding-top: max(5rem, env(safe-area-inset-top));
  }

  .task-composer {
    width: min(100%, 34rem);
    padding: 1.25rem;
  }

  .task-composer textarea {
    font-size: 1.28rem;
  }

  .composer-actions {
    grid-template-columns: 0.95fr 1.1fr 0.9fr;
    gap: 0.45rem;
  }

  .composer-actions button {
    min-height: 2.75rem;
    padding-inline: 0.5rem;
    font-size: 0.98rem;
  }

  .pairing-overlay {
    align-items: start;
    padding-top: max(5rem, env(safe-area-inset-top));
  }

  .pairing-card {
    width: min(100%, 28rem);
    padding: 1.25rem;
  }

  .pairing-actions {
    grid-template-columns: 1fr 1fr;
  }

  .pairing-actions button,
  .pairing-cancel {
    justify-self: stretch;
  }
}

@media (hover: none) {
  .task:hover .task-tools,
  .task:focus-visible .task-tools {
    display: none;
  }

  .task.is-selected:not(.is-editing) .task-tools,
  .task.is-menu-open:not(.is-editing) .task-tools {
    display: grid;
  }

  .task:hover .done-button {
    opacity: 0;
    pointer-events: none;
  }

  .task.is-selected:not(.is-editing) .done-button,
  .task.is-menu-open:not(.is-editing) .done-button,
  .task:focus-within .done-button {
    opacity: 1;
    pointer-events: auto;
  }

  .task.is-editing .task-tools {
    display: none;
  }

  .task.is-editing .done-button {
    opacity: 0;
    pointer-events: none;
  }
}

@media (max-width: 520px) {
  .topbar {
    grid-template-columns: auto auto 1fr 2.4rem 2.4rem;
  }

  .today-jump {
    padding-inline: 0.65rem;
  }

  .board {
    grid-auto-columns: minmax(15rem, 88vw);
  }

  .task-tools {
    left: auto;
    right: 0;
    top: calc(100% + 0.2rem);
    grid-template-columns: 2.75rem 2.75rem;
    margin-left: 0;
  }

  .task-menu {
    right: auto;
    left: 0;
  }

  .color-menu,
  .repeat-menu {
    position: static;
    width: 100%;
    margin-top: 0.16rem;
    box-shadow: none;
  }

  .calendar-popover {
    left: -2.75rem;
    width: min(18.2rem, calc(100vw - 2rem));
  }

  .task-composer {
    padding: 1.25rem;
  }

  .task-composer textarea {
    font-size: 1.15rem;
  }

  .composer-actions {
    grid-template-columns: 0.95fr 1.1fr 0.9fr;
  }

  .composer-actions button,
  .composer-cancel {
    justify-self: stretch;
    justify-content: center;
  }

  .pairing-actions {
    grid-template-columns: 1fr;
  }

  .pairing-actions button,
  .pairing-cancel {
    justify-self: stretch;
  }
}
