:root {
  --status-success: #16816d;
  --status-error: #c34e4e;
  font-family: Inter, system-ui, sans-serif;
  color: #17212b;
  background: #eef5f0;
  overscroll-behavior-y: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100dvh;
  overscroll-behavior-y: none;
  -webkit-user-select: none;
  user-select: none;
  background:
    radial-gradient(circle at 8% 8%, #bee8d6 0, transparent 34rem),
    radial-gradient(circle at 92% 18%, #d4e7f4 0, transparent 37rem),
    radial-gradient(circle at 70% 95%, #f5e4d2 0, transparent 36rem),
    linear-gradient(145deg, #f7fbf8, #eaf3ef 55%, #f6f1eb);
}
input,
textarea,
[contenteditable='true'] {
  -webkit-user-select: text;
  user-select: text;
}
[hidden] {
  display: none !important;
}
.auth-dialog {
  width: min(720px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 28px;
  padding: 0;
  color: #17212b;
  background: rgba(255, 255, 255, 0.42);
  box-shadow:
    0 24px 80px rgba(35, 78, 59, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(28px) saturate(1.5);
  -webkit-backdrop-filter: blur(28px) saturate(1.5);
}
.auth-dialog::backdrop {
  background: #193a304d;
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}
.auth-dialog-content {
  padding: clamp(24px, 5vw, 48px);
}
.auth-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.auth-dialog h1 {
  font-size: clamp(34px, 6vw, 52px);
}
.auth-intro {
  margin: 0 0 28px;
  color: #687670;
  line-height: 1.6;
}
.auth-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.auth-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  min-height: 220px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.35);
  box-shadow:
    0 8px 32px rgba(35, 78, 59, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  transition:
    background-color 200ms ease,
    border-color 200ms ease,
    box-shadow 200ms ease;
}
:root:not([data-theme='dark']) .auth-option:hover {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow:
    0 12px 36px rgba(35, 78, 59, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}
.auth-option h2 {
  font-size: 20px;
}
.auth-option > p:not(.eyebrow) {
  margin: 10px 0 20px;
  color: #687670;
  line-height: 1.5;
}
.auth-option .button {
  margin-top: auto;
}
.auth-status {
  min-height: 24px;
  margin: 20px 0 0;
  line-height: 1.5;
}
.shell {
  width: min(1280px, calc(100% - 32px));
  margin: auto;
  padding: 64px 0 80px;
}
.hero {
  padding: 12px 8px 24px;
}
.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.theme-toggle {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #ffffffdb;
  border-radius: 14px;
  background: #ffffffa8;
  color: #245548;
  box-shadow:
    0 6px 18px #29564014,
    inset 0 1px #ffffffdb;
  cursor: pointer;
  transition:
    background-color 150ms,
    transform 150ms,
    box-shadow 150ms;
}
.theme-toggle:hover {
  background: #ffffffe6;
  transform: translateY(-2px);
  box-shadow: 0 9px 22px #29564024;
}
.theme-toggle:focus-visible {
  outline: 3px solid #79c9a8;
  outline-offset: 2px;
}
.theme-icon {
  width: 21px;
  height: 21px;
}
.theme-icon--sun {
  display: none;
}
:root[data-theme='dark'] .theme-icon--moon {
  display: none;
}
:root[data-theme='dark'] .theme-icon--sun {
  display: block;
}
.hero-title {
  margin: 0 0 6px;
  color: #17212b;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.2;
}
.eyebrow {
  margin: 0 0 12px;
  color: #16816d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.15em;
}
h1 {
  max-width: 700px;
  margin: 0 0 16px;
  font-size: clamp(40px, 8vw, 76px);
  line-height: 1;
  letter-spacing: -0.06em;
}
h1 span {
  color: #16816d;
}
form,
.list-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.api-endpoint {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  color: #687670;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.api-url-label {
  color: #16816d;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
label {
  color: #687670;
  font-size: 13px;
  font-weight: 700;
}
input {
  min-width: 0;
  border: 1px solid #dbe5de;
  border-radius: 11px;
  padding: 12px 14px;
  background: #ffffffb8;
  color: inherit;
  font: inherit;
  outline: none;
}
input:focus {
  border-color: #16816d;
  box-shadow: 0 0 0 4px #16816d22;
}
.button {
  border: 0;
  border-radius: 11px;
  padding: 12px 16px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}
.button:disabled {
  cursor: wait;
  opacity: 0.6;
}
.primary {
  background: #17212b;
  color: #fff;
}
.secondary {
  background: #e2eee8;
  color: #245548;
}
.logout-button {
  flex-shrink: 0;
  border: 1px solid #0f5548;
  background: #176856;
  color: #fff;
  box-shadow: 0 4px 12px #17685626;
}
.logout-button:hover {
  background: #0f5548;
}
.logout-button:focus-visible {
  outline: 3px solid #79c9a8;
  outline-offset: 3px;
}
.panel {
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 24px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.25);
  box-shadow:
    0 12px 40px rgba(35, 78, 59, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
}
.composer {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 24px;
  align-items: end;
}
h2 {
  margin: 0;
  font-size: 24px;
}
form input {
  flex: 1;
  width: 100%;
}
.list-panel {
  margin-top: 18px;
}
.list-header {
  justify-content: space-between;
}
.search-form {
  margin: 24px;
}
.search-form label {
  white-space: nowrap;
}
.search-form input {
  flex: 1;
}
#message {
  color: #16816d;
}
#message:empty {
  display: none;
}
.kanban-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.kanban-column {
  min-width: 0;
  min-height: 240px;
  padding: 16px;
  border: 1px solid #ffffffb3;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 1px #ffffff9c;
  transition:
    background-color 150ms,
    border-color 150ms;
}
.kanban-column.is-drop-target {
  border-color: #16816d;
  background: #e5f3ec;
}
.column-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.column-heading h3 {
  margin: 0;
  font-size: 16px;
}
.column-count {
  min-width: 28px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #e2eee8;
  color: #245548;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}
.column-cards {
  display: grid;
  align-content: start;
  gap: 10px;
}
.priority-group + .priority-group {
  margin-top: 20px;
}
.priority-group {
  min-height: 58px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 4px;
  transition:
    background-color 150ms,
    border-color 150ms;
}
.priority-group.is-group-target {
  border-color: #16816d;
  background: #e5f3ec;
}
.priority-group-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: #56645e;
}
.priority-group-heading h4 {
  margin: 0;
  font-size: 13px;
}
.priority-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #929da0;
}
.priority-high {
  background: #e18c38;
}
.priority-medium {
  background: #408fca;
}
.priority-low {
  background: #929da0;
}
.todo {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border: 1px solid #ffffffd4;
  border-radius: 15px;
  background: #ffffffe0;
  cursor: grab;
  touch-action: pan-y;
  margin-block: 0;
  transition:
    margin-block-start 220ms cubic-bezier(0.2, 0.75, 0.25, 1),
    margin-block-end 220ms cubic-bezier(0.2, 0.75, 0.25, 1);
  box-shadow:
    0 6px 20px #29564014,
    inset 0 1px #ffffffd9;
}
.todo:active {
  cursor: grabbing;
}
.todo.is-dragging {
  opacity: 0.5;
}
.todo.is-drop-before,
.todo.is-drop-after {
  position: relative;
}

.todo.is-drop-before::before,
.todo.is-drop-after::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: #16816d;
  border-radius: 999px;
  pointer-events: none;
}

.todo.is-drop-before::before {
  top: -7px;
}
.todo.is-drop-after::after {
  bottom: -7px;
}
.touch-drag-preview {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  transform: translate(-50%, -50%);
  opacity: 0.92;
  box-shadow: 0 18px 36px #17212b40;
}
.todo-details {
  min-width: 0;
}
.todo-title {
  margin: 0;
  font-weight: 750;
  overflow-wrap: anywhere;
}
.todo-title-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.todo-rank {
  flex: 0 0 1.5em;
  color: #16816d;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}
.todo-meta {
  margin: 6px 0 0;
  color: #89958f;
  font-size: 12px;
}
.todo-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.todo-actions .button {
  padding: 9px 12px;
}
:root[data-theme='dark'] {
  --status-success: #73cbb0;
  --status-error: #ff9494;
  color-scheme: dark;
  color: #e9f0eb;
  background: #111a18;
}
:root[data-theme='dark'] body {
  background:
    radial-gradient(circle at 8% 8%, #20473d, transparent 34rem),
    radial-gradient(circle at 90% 2%, #19382f, transparent 34rem), #111a18;
}
:root[data-theme='dark'] .panel,
:root[data-theme='dark'] .auth-dialog,
:root[data-theme='dark'] .todo {
  border-color: #344840;
  background: #1d2925de;
  color: #e9f0eb;
  box-shadow:
    0 18px 50px #00000026,
    inset 0 1px #ffffff0d;
}
:root[data-theme='dark'] .auth-dialog {
  box-shadow:
    0 28px 90px #00000061,
    inset 0 1px #ffffff0d;
}
:root[data-theme='dark'] .auth-dialog {
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
}
:root[data-theme='dark'] .panel {
  backdrop-filter: blur(22px) saturate(1.25);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
}
:root[data-theme='dark'] .auth-option {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
:root[data-theme='dark'] .kanban-column,
:root[data-theme='dark'] .auth-option {
  border-color: #344840;
  background: #17221ed9;
  box-shadow: inset 0 1px #ffffff0d;
}
:root[data-theme='dark'] .kanban-column.is-drop-target,
:root[data-theme='dark'] .priority-group.is-group-target {
  border-color: #55b99e;
  background: #234139;
}
:root[data-theme='dark'] .hero-title,
:root[data-theme='dark'] .priority-group-heading,
:root[data-theme='dark'] .todo-rank {
  color: #e9f0eb;
}
:root[data-theme='dark'] .auth-intro,
:root[data-theme='dark'] .auth-option > p:not(.eyebrow),
:root[data-theme='dark'] .api-endpoint,
:root[data-theme='dark'] label,
:root[data-theme='dark'] .todo-meta {
  color: #b2c5ba;
}
:root[data-theme='dark'] input {
  border-color: #4b6256;
  background: #17221e;
  color: #e9f0eb;
}
:root[data-theme='dark'] .secondary,
:root[data-theme='dark'] .column-count {
  background: #29483e;
  color: #d4efe3;
}
:root[data-theme='dark'] .primary {
  background: #73cbb0;
  color: #10231d;
}
:root[data-theme='dark'] .theme-toggle {
  border-color: #52675bb3;
  background: #20372fc9;
  color: #d4efe3;
  box-shadow: 0 6px 18px #00000029;
}
:root[data-theme='dark'] .theme-toggle:hover {
  background: #2d4b3fe0;
}
:root[data-theme='dark'] .eyebrow,
:root[data-theme='dark'] .api-url-label,
:root[data-theme='dark'] h1 span {
  color: #73cbb0;
}
@media (max-width: 680px) {
  .shell {
    padding-top: 32px;
  }
  .hero-top {
    align-items: flex-start;
    flex-direction: column;
  }
  .composer {
    grid-template-columns: 1fr;
  }
  .auth-options {
    grid-template-columns: 1fr;
  }
  .auth-option {
    min-height: 0;
  }
  .auth-option .button {
    margin-top: 0;
  }
  .todo {
    align-items: flex-start;
  }
  .kanban-board {
    grid-auto-columns: minmax(260px, 80%);
    grid-auto-flow: column;
    grid-template-columns: none;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
  }
  .kanban-column {
    scroll-snap-align: start;
  }
}

@media (max-width: 680px), (max-height: 500px) and (pointer: coarse) {
  .auth-dialog {
    scrollbar-width: none;
  }
  .auth-dialog::-webkit-scrollbar {
    display: none;
  }
}

@media (max-height: 500px) and (pointer: coarse) {
  .auth-dialog {
    width: calc(100% - 16px);
  }
  .auth-dialog-content {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .todo {
    transition: none;
  }
}
