:root {
  --bg: #17313a;
  --card: #1e3d47;
  --text: #f3ede4;
  --accent: #ffb7d5;
  --accent2: #ffd166;
  --muted: #9db4bc;
  --danger: #ff8080;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 20px;
}

button {
  font: inherit;
  border: 0;
  border-radius: 12px;
  padding: 10px 18px;
  background: var(--accent2);
  color: #222;
  cursor: pointer;
}

button.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--muted);
}

input, textarea {
  font: inherit;
  border: 1px solid var(--muted);
  border-radius: 10px;
  padding: 10px 14px;
  background: #142932;
  color: var(--text);
  width: 100%;
}

.lock {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  z-index: 10;
}

.lock[hidden] { display: none; }

.lock-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(360px, 90vw);
  text-align: center;
}

.topbar, .datebar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  flex-wrap: wrap;
}

.brand { font-size: 26px; font-weight: 800; color: var(--accent); }
.spacer { flex: 1; }

.tabs { display: flex; gap: 8px; }

.tab {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--muted);
}

.tab.active { background: #4353ff; color: #fff; border-color: #4353ff; }

.date-label { color: var(--muted); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 20px;
  padding: 10px 24px 40px;
}

.card {
  background: var(--card);
  border-radius: 18px;
  padding: 22px 26px;
}

.card h2 { margin: 0 0 14px; color: var(--accent); font-size: 26px; }

.note { white-space: pre-wrap; font-size: 24px; line-height: 1.6; min-height: 40px; }

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

.items li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  flex-wrap: wrap;
}

.items li.done { opacity: 0.45; text-decoration: line-through; }
.items .due { color: var(--accent2); }
.items .memo { color: var(--danger); }
.items .sub { color: var(--muted); }
.items .pts { margin-left: auto; font-weight: 800; color: var(--accent2); }

.items .icon {
  background: transparent;
  border: 1px solid var(--muted);
  padding: 2px 10px;
  border-radius: 8px;
  color: var(--text);
}

.stack { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.row { display: flex; gap: 10px; align-items: center; }
.chk { display: flex; gap: 8px; align-items: center; color: var(--muted); }

.edit-only { display: none !important; }
body.editing .edit-only { display: flex !important; }
body.editing button.edit-only { display: inline-block !important; }
body.editing #edit-toggle { background: var(--accent); color: #222; border: 0; }

.error { color: var(--danger); }
.banner { padding: 0 24px; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #000c;
  padding: 12px 22px;
  border-radius: 12px;
}

.empty { color: var(--muted); }
