:root {
  font-family: "Segoe UI", "Malgun Gothic", sans-serif;
  color: #263c30;
  background: #f5f4ee;
  font-synthesis: none;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input { font: inherit; }
button { cursor: pointer; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 26px; }
#current-date { font-size: 13px; color: #566651; }
.clock { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
#current-time { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.theme-toggle { min-height: 44px; padding: 10px 14px; border: 1px solid #dce2d9; border-radius: 10px; background: #fff; color: #385c48; font-size: 13px; }
.theme-toggle:hover { background: #eaf0e5; }
.app { width: min(100% - 40px, 640px); margin: 88px auto 40px; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 1.6px; color: #68816c; }
h1 { margin: 18px 0 10px; font-size: clamp(34px, 7vw, 46px); letter-spacing: -2px; }
h1 span { color: #d49450; }
.intro { color: #778077; margin: 0 0 32px; font-size: 15px; }
.card { background: #fff; padding: 30px; border: 1px solid #e4e8df; border-radius: 22px; box-shadow: 0 12px 40px #273d3006; }
label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.input-row { display: flex; gap: 10px; }
input[type="text"] { min-width: 0; width: 100%; border: 1px solid #dce2d9; border-radius: 10px; background: #fafbf8; padding: 14px; color: #263c30; }
input::placeholder { color: #949c94; }
.add-button { flex-shrink: 0; border: 0; border-radius: 10px; background: #385c48; color: white; padding: 0 20px; font-weight: 600; }
.add-button span { margin-left: 10px; font-size: 20px; font-weight: 400; }
.add-button:hover { background: #294735; }
:focus-visible { outline: 3px solid #c78b42; outline-offset: 3px; }
.list-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 32px; padding-bottom: 16px; border-bottom: 1px solid #edf0e9; }
h2 { font-size: 14px; margin: 0; }
#todo-count { color: #7b867b; font-size: 12px; }
ul { list-style: none; padding: 0; margin: 0; }
.todo-item { display: flex; align-items: center; gap: 12px; padding: 15px 0; border-bottom: 1px solid #edf0e9; }
.todo-label { display: flex; align-items: center; flex: 1; min-width: 0; gap: 12px; margin: 0; font-size: 15px; font-weight: 400; cursor: pointer; }
.todo-label input { flex-shrink: 0; width: 20px; height: 20px; accent-color: #385c48; cursor: pointer; }
.todo-text { overflow-wrap: anywhere; line-height: 1.6; }
.completed .todo-text { text-decoration: line-through; color: #939b94; }
.delete-button { flex-shrink: 0; min-height: 44px; border: 0; border-radius: 8px; background: transparent; color: #9a7065; padding: 8px 10px; font-size: 12px; }
.delete-button:hover { background: #fbefeb; color: #a43b27; }
.empty-state { text-align: center; padding: 40px 0 30px; color: #879184; }
.empty-icon { display: inline-grid; place-items: center; border: 1px solid #dce4d6; border-radius: 50%; width: 44px; height: 44px; font-size: 22px; color: #809877; background: #f5f8f0; }
.empty-state p { margin: 16px 0 8px; color: #566651; font-size: 15px; }
.empty-state > span:last-child { font-size: 13px; }
[hidden] { display: none !important; }
.status { font-size: 12px; line-height: 1.6; color: #687b63; margin: 16px 0 0; }
.status:empty { display: none; }
.status.error { color: #a43b27; }
footer { text-align: center; font-size: 12px; color: #879184; padding-top: 22px; }
@media (max-width: 480px) {
  .app { width: calc(100% - 28px); margin-top: 42px; }
  .card { padding: 22px 18px; border-radius: 18px; }
  .add-button { padding: 0 16px; }
  .add-button span { display: none; }
  .eyebrow { font-size: 10px; letter-spacing: 1px; }
  input[type="text"] { font-size: 16px; }
  .todo-label { min-height: 44px; }
  .list-heading { flex-wrap: wrap; }
}

/* 기존 배치를 유지하고 다크모드에 필요한 색상만 변경합니다. */
:root[data-theme="dark"] { color-scheme: dark; color: #e1e9e2; background: #18231e; }
[data-theme="dark"] .card { background: #223129; border-color: #405247; }
[data-theme="dark"] input[type="text"] { background: #19261f; border-color: #526459; color: #e1e9e2; }
[data-theme="dark"] input::placeholder { color: #a1b1a4; }
[data-theme="dark"] .theme-toggle { background: #223129; border-color: #526459; color: #d5e6d3; }
[data-theme="dark"] .theme-toggle:hover { background: #354b3c; }
[data-theme="dark"] .eyebrow,
[data-theme="dark"] .intro,
[data-theme="dark"] #current-date,
[data-theme="dark"] #todo-count,
[data-theme="dark"] footer,
[data-theme="dark"] .empty-state,
[data-theme="dark"] .status { color: #afc1b1; }
[data-theme="dark"] .list-heading,
[data-theme="dark"] .todo-item { border-color: #405247; }
[data-theme="dark"] .add-button { background: #a8cfb1; color: #182c20; }
[data-theme="dark"] .add-button:hover { background: #c0dfc6; }
[data-theme="dark"] .todo-label input { accent-color: #a8cfb1; }
[data-theme="dark"] .completed .todo-text { color: #a4b0a7; }
[data-theme="dark"] .delete-button,
[data-theme="dark"] .status.error { color: #f0b7a7; }
[data-theme="dark"] .delete-button:hover { background: #4a322d; }
[data-theme="dark"] .empty-icon { background: #2c4031; color: #bad1b4; border-color: #526459; }
[data-theme="dark"] .empty-state p { color: #c6d8bf; }
