:root {
  --bg: #0a0a0a;
  --card: #171717;
  --border: #262626;
  --text: #e5e5e5;
  --muted: #a3a3a3;
  --accent: #dc2626;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  line-height: 1.5;
  font-size: 16px;
}

a {
  color: var(--accent);
}

.wrap {
  max-width: 28rem;
  margin: 0 auto;
  padding: 1.25rem;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem 1.25rem;
}

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.sub {
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

input,
select,
textarea,
button {
  width: 100%;
  padding: 0.75rem 0.875rem;
  border-radius: 0.625rem;
  border: 1px solid #333;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 0.875rem;
}

button,
.btn {
  cursor: pointer;
  font-weight: 600;
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

button.secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.row > * {
  flex: 1;
  min-width: 8rem;
}

.msg {
  font-size: 0.875rem;
  margin-top: 0.75rem;
  color: var(--muted);
}

.msg.err {
  color: #f87171;
}

.msg.ok {
  color: #4ade80;
}

nav.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

nav.top a {
  font-size: 0.875rem;
}

.task {
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
  font-size: 0.9375rem;
}

.task:last-child {
  border-bottom: none;
}

.task-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.task-head > div:first-child {
  flex: 1;
  min-width: 0;
}

button.task-remove {
  width: auto;
  flex-shrink: 0;
  padding: 0.35rem 0.65rem;
  margin-bottom: 0;
  font-size: 0.8125rem;
}

.deadline-preview {
  margin-top: 0.35rem;
  margin-bottom: 0.875rem;
  min-height: 1.25rem;
}

.toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  max-width: min(90vw, 20rem);
  padding: 0.75rem 1.125rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.badge {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
