
:root {
  color-scheme: dark;

  --background: #090a0c;
  --surface: #17181c;
  --surface-solid: #202126;
  --input-background: #202126;

  --text: #f5f5f7;
  --secondary-text: #a0a1a8;
  --muted-text: #70727b;

  --border: rgba(255, 255, 255, 0.09);
  --segment-background: rgba(255, 255, 255, 0.07);

  --accent: #0a84ff;
  --accent-pressed: #409cff;
  --danger: #ff453a;

  --card-shadow: none;
  --composer-shadow:
    0 -8px 32px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.3);

  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", Arial, sans-serif;
}


* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--background);
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--background);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

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

.app {
  width: min(100%, 680px);
  margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) 16px 292px;
}

.app-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding-inline: 4px;
}


h1 {
  margin: 0;
  font-size: clamp(32px, 10vw, 42px);
  line-height: 1;
  letter-spacing: -0.045em;
}

.status-text {
  flex-shrink: 0;
  margin: 0 0 3px;
  color: var(--secondary-text);
  font-size: 12px;
  line-height: 1.4;
  text-align: right;
}

.filters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-bottom: 18px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--segment-background);
}

.filter {
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--secondary-text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 100ms ease;
}

.filter:active {
  transform: scale(0.98);
}

.filter.active {
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.todo-section {
  min-height: 220px;
}

.todo-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.todo-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
  min-height: 74px;
  padding: 12px 7px 12px 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.todo-item:active {
  transform: scale(0.99);
}

.check-button {
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 2px solid #c7c7cc;
  border-radius: 50%;
  background: transparent;
  color: #ffffff;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 100ms ease;
}

.check-button:active {
  transform: scale(0.88);
}

.todo-item.completed .check-button {
  border-color: var(--accent);
  background: var(--accent);
}

.todo-content {
  min-width: 0;
}

.todo-title {
  display: block;
  color: var(--text);
  font-size: 16px;
  font-weight: 550;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.todo-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
  min-height: 16px;
  line-height: 1;
}

.priority-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  font-size: 11px;
  line-height: 1;
}

.created-date {
  color: var(--muted-text);
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
  user-select: none;
}

.todo-item.completed {
  opacity: 0.55;
}

.todo-item.completed .todo-title {
  color: var(--secondary-text);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.delete-button {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted-text);
  font-size: 27px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  transition:
    color 150ms ease,
    background 150ms ease,
    transform 100ms ease;
}

.delete-button:active {
  transform: scale(0.9);
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  color: var(--danger);
}

.empty-state {
  padding: 56px 24px;
  text-align: center;
}

.empty-state[hidden] {
  display: none;
}

.empty-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  font-size: 26px;
  font-weight: 700;
}

.empty-title {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
}

.empty-description {
  max-width: 260px;
  margin: 7px auto 0;
  color: var(--secondary-text);
  font-size: 13px;
  line-height: 1.55;
}

.message {
  min-height: 20px;
  margin: 14px 4px 0;
  color: var(--danger);
  font-size: 13px;
  text-align: center;
}

.composer-wrapper {
  position: fixed;
  z-index: 20;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 14px 12px max(10px, env(safe-area-inset-bottom));
  background: linear-gradient(
    to bottom,
    transparent,
    var(--background) 26%,
    var(--background) 100%
  );
}

.todo-form {
  width: min(calc(100% - 8px), 648px);
  margin: 0 auto;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--composer-shadow);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.todo-input {
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  border: 0;
  border-radius: 14px;
  outline: none;
  background: var(--input-background);
  color: var(--text);
  font-size: 16px;
}

.todo-input::placeholder {
  color: var(--secondary-text);
}

.todo-input:focus {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent);
}

.composer-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 8px;
  margin-top: 8px;
}

.priority-field {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 13px;
  background: var(--input-background);
}

.priority-field-label {
  margin-right: auto;
  color: var(--secondary-text);
  font-size: 13px;
  font-weight: 500;
}

.priority-select {
  min-width: 78px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.add-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 13px;
  background: var(--accent);
  color: #ffffff;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
  transition:
    background 150ms ease,
    transform 100ms ease,
    opacity 150ms ease;
}

.add-button:active {
  transform: scale(0.97);
  background: var(--accent-pressed);
}

.add-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

@media (hover: hover) {
  .todo-item:hover {
    transform: translateY(-1px);
  }

  .delete-button:hover {
    background: color-mix(in srgb, var(--danger) 10%, transparent);
    color: var(--danger);
  }
}

@media (min-width: 600px) {
  .app {
    padding-inline: 24px;
  }

  .composer-wrapper {
    padding-inline: 20px;
  }
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
}

.toolbar .filters {
  margin-bottom: 0;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bulk-open-button {
  min-height: 48px;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--accent);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.bulk-open-button:active,
.delete-all-button:active {
  transform: scale(0.97);
}

.delete-all-button {
  min-height: 48px;
  padding: 0 15px;
  border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--border));
  border-radius: 14px;
  background: color-mix(in srgb, var(--danger) 9%, var(--surface));
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.bulk-sheet {
  position: relative;
  z-index: 1;
  width: min(100%, 680px);
  max-height: calc(100dvh - 24px);
  padding: 8px 16px max(18px, env(safe-area-inset-bottom));
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 24px 24px 0 0;
  background: var(--background);
  box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.22);
  animation: sheet-in 180ms ease-out;
}

.sheet-handle {
  width: 38px;
  height: 5px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: var(--muted-text);
  opacity: 0.55;
}

.bulk-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.bulk-header h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.bulk-header p {
  margin: 5px 0 0;
  color: var(--secondary-text);
  font-size: 13px;
}

.modal-close-button {
  display: grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--input-background);
  color: var(--secondary-text);
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}

.bulk-input {
  display: block;
  width: 100%;
  min-height: min(38vh, 320px);
  padding: 14px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 16px;
  outline: none;
  background: var(--input-background);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 15px;
  line-height: 1.65;
}

.bulk-input::placeholder {
  color: var(--muted-text);
}

.bulk-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.bulk-help {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}

.bulk-help span {
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--secondary-text);
  font-size: 12px;
}

.bulk-message {
  min-height: 20px;
  margin: 10px 2px 0;
  color: var(--danger);
  font-size: 13px;
}

.bulk-submit-button {
  width: 100%;
  min-height: 50px;
  margin-top: 7px;
  border: 0;
  border-radius: 15px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.bulk-submit-button:active {
  transform: scale(0.985);
  background: var(--accent-pressed);
}

.bulk-submit-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

body.modal-open {
  overflow: hidden;
}

@keyframes sheet-in {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 390px) {
  .toolbar {
    grid-template-columns: 1fr;
  }

  .toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bulk-open-button {
    width: 100%;
    min-height: 42px;
  }
}
.header-status { text-align: right; }
.sync-status { margin: 3px 0 0; color: var(--muted-text); font-size: 11px; }
.todo-edit-button { width: 100%; padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; font: inherit; }
.todo-item.pending { border-style: dashed; }
.pending-label { color: var(--muted-text); font-size: 11px; }
.edit-form { display: grid; gap: 14px; }
.edit-input { width: 100%; min-height: 52px; padding: 0 15px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-solid); color: var(--text); }
.edit-sheet { padding-bottom: max(22px, env(safe-area-inset-bottom)); }

/* 完了済みの折りたたみ */
.completed-section-header {
  margin-top: 8px;
  list-style: none;
}

.completed-toggle {
  display: flex;
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--secondary-text);
  font-weight: 650;
  cursor: pointer;
}

.collapse-chevron {
  width: 15px;
  color: var(--muted-text);
  font-size: 22px;
  line-height: 1;
}

.completed-count {
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--segment-background);
  color: var(--secondary-text);
  font-size: 12px;
}

/* スワイプ操作 */
.todo-item {
  position: relative;
  display: block;
  min-height: 74px;
  padding: 0;
  overflow: hidden;
  touch-action: pan-y;
}

.todo-item-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 36px 42px;
  align-items: center;
  gap: 8px;
  min-height: 74px;
  padding: 12px 5px 12px 14px;
  border-radius: inherit;
  background: var(--surface);
  transition: transform 180ms ease;
}

.todo-item-inner.swiping {
  transition: none;
}

.swipe-action {
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  display: flex;
  width: 100px;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 750;
}

.swipe-complete-action {
  left: 0;
  justify-content: flex-start;
  padding-left: 22px;
  background: #34c759;
}

.swipe-delete-action {
  right: 0;
  justify-content: flex-end;
  padding-right: 22px;
  background: var(--danger);
}

/* 手動並び替え */
.drag-handle {
  display: grid;
  width: 36px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted-text);
  font-size: 23px;
  line-height: 1;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.drag-handle:active {
  cursor: grabbing;
  background: var(--segment-background);
}

.todo-item.dragging {
  z-index: 20;
  opacity: 0.9;
}

.todo-item.dragging-active {
  transform: scale(1.015);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

body.is-reordering {
  user-select: none;
}

/* Undo */
.undo-toast {
  position: fixed;
  z-index: 120;
  left: 50%;
  bottom: calc(148px + env(safe-area-inset-bottom));
  display: flex;
  width: min(calc(100% - 32px), 520px);
  min-height: 52px;
  padding: 9px 10px 9px 15px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface-solid) 94%, transparent);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translate(-50%, 14px);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.undo-toast[hidden] {
  display: none;
}

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

.undo-text {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.undo-button {
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

@media (max-width: 390px) {
  .todo-item-inner {
    grid-template-columns: 32px minmax(0, 1fr) 32px 38px;
    gap: 6px;
  }

  .delete-button {
    width: 38px;
  }
}


/* Bottom toolbar layout */
.composer-wrapper .toolbar {
  width: min(calc(100% - 8px), 648px);
  margin: 9px auto 0;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.composer-wrapper .toolbar .filters {
  margin: 0;
}

.undo-toast {
  bottom: calc(258px + env(safe-area-inset-bottom));
}

@media (max-width: 390px) {
  .app {
    padding-bottom: 342px;
  }

  .composer-wrapper .toolbar {
    gap: 7px;
  }

  .composer-wrapper .toolbar-actions > button {
    flex: 1;
  }

  .undo-toast {
    bottom: calc(310px + env(safe-area-inset-bottom));
  }
}


/* Mobile collapsible bottom controls */
.composer-toggle {
  display: none;
}

.composer-panel {
  display: block;
}

@media (max-width: 599px) {
  .composer-wrapper {
    padding-top: 8px;
  }

  .composer-toggle {
    display: flex;
    width: min(calc(100% - 8px), 648px);
    min-height: 46px;
    margin: 0 auto;
    padding: 0 14px;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--card-shadow);
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
  }

  .composer-toggle-icon {
    font-size: 20px;
    line-height: 1;
  }

  .composer-toggle-label {
    flex: 1;
    text-align: left;
  }

  .composer-toggle-chevron {
    color: var(--secondary-text);
    font-size: 17px;
  }

  .composer-panel {
    max-height: 290px;
    overflow: hidden;
    opacity: 1;
    transform: translateY(0);
    transition: max-height 200ms ease, opacity 150ms ease, transform 200ms ease;
  }

  .composer-panel .todo-form {
    margin-top: 8px;
  }

  .composer-wrapper.is-collapsed .composer-panel {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
  }

  .app {
    padding-bottom: 92px;
    transition: padding-bottom 200ms ease;
  }

  body.composer-expanded .app {
    padding-bottom: 342px;
  }

  .undo-toast {
    bottom: calc(72px + env(safe-area-inset-bottom));
  }

  body.composer-expanded .undo-toast {
    bottom: calc(310px + env(safe-area-inset-bottom));
  }
}


/* v2.9 refined dark task cards */
:root {
  color-scheme: dark;
  --background: #090a0c;
  --surface: #17181c;
  --surface-solid: #202126;
  --input-background: #202126;
  --text: #f5f5f7;
  --secondary-text: #a0a1a8;
  --muted-text: #70727b;
  --border: rgba(255, 255, 255, 0.09);
  --segment-background: rgba(255, 255, 255, 0.07);
  --accent: #0a84ff;
  --danger: #ff453a;
  --priority-high: #ff5a5f;
  --priority-medium: #ffd60a;
  --priority-low: #30d158;
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.todo-item {
  --priority-color: var(--priority-medium);
  border-color: var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

.todo-item.priority-1 { --priority-color: var(--priority-high); }
.todo-item.priority-2 { --priority-color: var(--priority-medium); }
.todo-item.priority-3 { --priority-color: var(--priority-low); }

.todo-item-inner {
  min-height: 72px;
  padding: 11px 7px 11px 17px;
  border-radius: inherit;
  background: var(--surface);
}

.todo-item-inner::before {
  position: absolute;
  inset: 10px auto 10px 0;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: var(--priority-color);
  content: "";
}

.check-button {
  width: 30px;
  height: 30px;
  border: 2px solid color-mix(in srgb, var(--priority-color) 58%, #72747d);
  background: transparent;
  color: var(--priority-color);
  font-size: 18px;
  font-weight: 650;
  line-height: 1;
}

.check-button:hover {
  border-color: var(--priority-color);
  background: color-mix(in srgb, var(--priority-color) 8%, transparent);
}

.todo-item.completed {
  opacity: 1;
}

.todo-item.completed .todo-item-inner {
  background: #121317;
}

.todo-item.completed .check-button {
  border-color: var(--priority-color);
  background: color-mix(in srgb, var(--priority-color) 10%, transparent);
  color: var(--priority-color);
}

.todo-title {
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.005em;
}

.todo-meta {
  gap: 6px;
  margin-top: 5px;
}

.priority-icon {
  display: none !important;
}

.created-date {
  color: var(--secondary-text);
  font-size: 12.5px;
  font-weight: 450;
  letter-spacing: 0.015em;
}

.todo-item.completed .todo-title {
  color: #85878f;
  text-decoration-color: #686a72;
  text-decoration-thickness: 1px;
}

.todo-item.completed .created-date {
  color: #666871;
}

.drag-handle {
  color: #6f717a;
  font-size: 21px;
  opacity: 0.78;
}

.drag-handle:hover {
  background: rgba(255, 255, 255, 0.055);
  color: #a0a2aa;
  opacity: 1;
}

.delete-button {
  color: #6f717a;
  font-size: 0;
  opacity: 0.76;
}

.delete-button svg {
  width: 20px;
  height: 20px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.delete-button:hover {
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  color: var(--danger);
  opacity: 1;
}

.todo-item.pending {
  border-style: solid;
}

.pending-label {
  color: #777983;
  font-size: 11px;
}

@media (hover: hover) {
  .todo-item:hover {
    border-color: rgba(255, 255, 255, 0.14);
    background: #1b1c20;
  }

  .todo-item:hover .todo-item-inner {
    background: #1b1c20;
  }

  .todo-item.completed:hover .todo-item-inner {
    background: #15161a;
  }
}


/* v2.10 flat compact task cards */
.todo-item {
  min-height: 64px;
  overflow: hidden;
  border: 1px solid #2b2b2f;
  border-radius: 4px;
  background: #18181b;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.todo-item-inner {
  min-height: 64px;
  padding: 8px 7px 8px 14px;
  border-radius: 3px;
  background: #18181b;
}

.todo-item-inner::before {
  inset: 0 auto 0 0;
  width: 3px;
  border-radius: 0;
}

/* Swipe colors stay completely hidden until an actual touch swipe begins. */
.swipe-action {
  top: 1px;
  bottom: 1px;
  opacity: 0;
  border-radius: 3px;
  transition: opacity 80ms linear;
}

.todo-item.is-swiping .swipe-action {
  opacity: 1;
}

.check-button {
  width: 26px;
  height: 26px;
  border-width: 2px;
  background: transparent;
  font-size: 15px;
}

.check-button:hover {
  background: transparent;
}

.todo-item.completed .todo-item-inner,
.todo-item.completed:hover .todo-item-inner {
  background: #141417;
}

.todo-item.completed .check-button {
  background: transparent;
}

.todo-title {
  font-size: 16px;
  font-weight: 550;
  line-height: 1.25;
}

.todo-meta {
  margin-top: 3px;
}

.created-date {
  font-size: 12px;
}

.drag-handle {
  height: 38px;
  border-radius: 4px;
  opacity: 0.42;
}

.delete-button {
  width: 38px;
  height: 38px;
  border-radius: 4px;
  color: #8e8e93;
  font-size: 25px;
  font-weight: 300;
  line-height: 1;
  opacity: 0.35;
}

.delete-button:hover {
  background: transparent;
  color: var(--danger);
  opacity: 1;
}

@media (hover: hover) {
  .todo-item:hover {
    border-color: #3a3a40;
    background: #18181b;
    box-shadow: none;
  }

  .todo-item:hover .todo-item-inner {
    background: #18181b;
  }

  .todo-item.completed:hover .todo-item-inner {
    background: #141417;
  }
}

/* v2.11 definitive card surface fix */
.todo-item,
.todo-item:hover,
.todo-item:active,
.todo-item.pending,
.todo-item.completed {
  overflow: hidden !important;
  border: 1px solid #2b2b2f !important;
  border-radius: 4px !important;
  background: #18181b !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.todo-item-inner,
.todo-item:hover .todo-item-inner,
.todo-item:active .todo-item-inner {
  z-index: 2;
  min-height: 64px !important;
  border-radius: 3px !important;
  background: #18181b !important;
  box-shadow: none !important;
}

.todo-item.completed,
.todo-item.completed:hover,
.todo-item.completed:active,
.todo-item.completed .todo-item-inner,
.todo-item.completed:hover .todo-item-inner,
.todo-item.completed:active .todo-item-inner {
  background: #141417 !important;
}

/* Do not keep colored swipe layers painted behind normal cards. */
.swipe-action,
.swipe-complete-action,
.swipe-delete-action {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  border-radius: 0 !important;
}

.todo-item.is-swiping .swipe-action {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.todo-item.is-swiping .swipe-complete-action {
  background: #248a3d !important;
}

.todo-item.is-swiping .swipe-delete-action {
  background: #c9342f !important;
}

.todo-item-inner::before {
  inset: 0 auto 0 0 !important;
  width: 3px !important;
  border-radius: 0 !important;
  background: var(--priority-color) !important;
}

.delete-button {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 25px !important;
  font-weight: 300 !important;
}

/* v2.12: square task cards */
.todo-list {
  gap: 6px !important;
}

.todo-item,
.todo-item:hover,
.todo-item:active,
.todo-item.pending,
.todo-item.completed,
.todo-item-inner,
.todo-item:hover .todo-item-inner,
.todo-item:active .todo-item-inner,
.todo-item.completed .todo-item-inner,
.todo-item.completed:hover .todo-item-inner,
.todo-item.completed:active .todo-item-inner,
.todo-item::before,
.todo-item::after,
.todo-item-inner::before,
.todo-item-inner::after,
.swipe-action {
  border-radius: 0 !important;
}


/* v2.13 final: dark-only, no eyebrow */
.app-header > div:first-child {
  display: flex;
  align-items: center;
}
