:root {
  --bg: #0f172a;
  --bg2: #131c30;
  --panel: #1a2438;
  --panel2: #202c44;
  --card: #243150;
  --ink: #eef2fb;
  --muted: #93a1bd;
  --line: #2c3a58;
  --accent: #34d399;
  --accent-ink: #052e22;
  --shadow: 0 2px 6px rgba(0,0,0,.3), 0 12px 28px -14px rgba(0,0,0,.6);
}
/* ===== 3-way theme (Light/Dark/System) — base :root above = native DARK. Opposite (light) WCAG-aware auto-generated (contrast-solving ink/accent vs worst-case surface). ===== */
:root[data-theme="light"]{
  --bg: #f4f4f6;
  --bg2: #f5f5f7;
  --panel: #f6f7f8;
  --panel2: #f8f9fa;
  --card: #fafafb;
  --ink: #264da3;
  --muted: #5a6e94;
  --line: rgba(0,0,0,0.10);
  --accent: #1b7a57;
  --accent-ink: #ffffff;
}












* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Noto Sans KR", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(900px 500px at 90% -10%, #1b2c4a 0%, transparent 55%),
    var(--bg);
  color: var(--ink); line-height: 1.5; min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Header */
.site {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 22px; height: 22px; border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), #22d3ee);
  box-shadow: 0 0 0 4px rgba(52,211,153,.15);
}
.brand-name { font-family: "Sora", sans-serif; font-weight: 700; font-size: 20px; letter-spacing: -.01em; }
.progress-wrap { display: flex; align-items: center; gap: 10px; min-width: 200px; flex: 1; max-width: 320px; }
.progress-track { flex: 1; height: 8px; background: var(--panel2); border-radius: 99px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), #22d3ee); border-radius: 99px; transition: width .35s ease; }
.progress-pct { font-family: "Sora", sans-serif; font-weight: 600; font-size: 13px; color: var(--muted); min-width: 36px; text-align: right; }

/* Composer */
.composer {
  display: flex; gap: 8px; padding: 16px 22px; flex-wrap: wrap; align-items: center;
}
.title-input {
  flex: 1; min-width: 200px; border: 1px solid var(--line); background: var(--panel);
  color: var(--ink); border-radius: 10px; padding: 11px 14px; font-family: inherit; font-size: 15px; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.title-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(52,211,153,.18); }
.title-input::placeholder { color: #6b7a99; }
.select {
  border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  border-radius: 10px; padding: 11px 12px; font-family: inherit; font-size: 14px; outline: none; cursor: pointer;
}
.btn {
  font-family: "Sora", sans-serif; font-weight: 600; font-size: 14px; cursor: pointer;
  border-radius: 10px; padding: 11px 18px; border: none; transition: transform .08s ease, filter .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.07); }

/* Board */
.board {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  padding: 8px 22px 40px; align-items: start;
}
@media (max-width: 720px) { .board { grid-template-columns: 1fr; } }

.col {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 120px;
  transition: background .15s ease, border-color .15s ease;
}
.col.drop { background: var(--panel2); border-color: var(--accent); }
.col-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px; }
.col-dot { width: 9px; height: 9px; border-radius: 50%; }
.col-title { font-family: "Sora", sans-serif; font-weight: 600; font-size: 14px; }
.col-count {
  margin-left: auto; font-size: 12px; color: var(--muted); background: var(--panel2);
  border-radius: 99px; padding: 2px 9px; font-weight: 600;
}
.col-list { display: flex; flex-direction: column; gap: 8px; min-height: 8px; }

/* Card */
.task {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 12px; box-shadow: var(--shadow); cursor: grab;
  animation: pop .2s ease backwards;
}
.task:active { cursor: grabbing; }
.task.dragging { opacity: .4; }
.task.done .task-title { text-decoration: line-through; color: var(--muted); }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } }

.task-top { display: flex; align-items: flex-start; gap: 8px; }
.prio-bar { width: 4px; align-self: stretch; border-radius: 4px; flex-shrink: 0; }
.prio-high { background: #f87171; } .prio-mid { background: #fbbf24; } .prio-low { background: #64748b; }
.task-title { flex: 1; font-size: 14px; line-height: 1.45; word-break: break-word; }
.task-meta { display: flex; align-items: center; gap: 6px; margin-top: 9px; }
.proj-badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.task-actions { margin-left: auto; display: flex; gap: 2px; }
.icon-btn {
  background: none; border: none; cursor: pointer; color: var(--muted); font-family: inherit;
  font-size: 13px; padding: 3px 6px; border-radius: 6px; line-height: 1; transition: all .12s ease;
}
.icon-btn:hover { background: var(--panel2); color: var(--ink); }
.icon-btn.del:hover { color: #f87171; }
/* Touch: HTML5 drag-and-drop doesn't fire on touch, so these ◀▶✕ buttons are
   the ONLY way to move/delete tasks on phones — they must be real tap targets. */
@media (pointer: coarse) {
  .task-actions { gap: 4px; }
  .icon-btn { min-width: 44px; min-height: 44px; padding: 10px; display: inline-flex; align-items: center; justify-content: center; }
}

.col-empty { color: #5b6a89; font-size: 12.5px; text-align: center; padding: 14px 0; font-style: italic; }

/* Footer */
.site-foot {
  display: flex; align-items: center; gap: 12px; padding: 4px 22px 30px; color: #6b7a99; font-size: 12.5px;
}
.link-btn { background: none; border: none; color: #6b7a99; cursor: pointer; font-family: inherit; font-size: 12.5px; text-decoration: underline; margin-left: auto; }
.link-btn:hover { color: #f87171; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px);
  background: var(--accent); color: var(--accent-ink); padding: 11px 20px; border-radius: 99px;
  font-weight: 700; font-size: 13.5px; opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 50;
  box-shadow: 0 12px 30px -8px rgba(0,0,0,.5);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* i18n language switcher — 항상 다크 테마이므로 런타임 기본값을 어두운 톤으로 덮어쓴다. */
.site .i18n-switch {
  --i18n-switch-bg: rgba(255, 255, 255, 0.07);
  --i18n-switch-border: rgba(255, 255, 255, 0.16);
  --i18n-switch-fg: rgba(255, 255, 255, 0.92);
  --i18n-switch-active-bg: rgba(52, 211, 153, 0.22);
  --i18n-switch-active-fg: var(--accent);
  --i18n-switch-menu-bg: var(--panel);
  --i18n-switch-menu-border: var(--line);
  --i18n-switch-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}


/* light-mode override for hardcoded body background (refinement) */
:root[data-theme="light"] body{ background: var(--bg); }
