:root {
  --bg: #faf6ee; --surface: #fffdf8; --ink: #1d1b16; --muted: #6b6558; --line: #e3dccb;
  --accent: #b3341f; --accent-ink: #fff; --ok: #2f7a4d; --warn-bg: #fff3c4; --warn-ink: #5a4500;
  --radius: 14px; --shadow: 0 1px 2px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.06);
}
:root[data-theme="dark"] {
  --bg: #15130f; --surface: #1f1c16; --ink: #f1ece0; --muted: #a79f8d; --line: #35302a;
  --accent: #e0553f; --accent-ink: #1a0a06; --ok: #6cc08b; --warn-bg: #4a3d0a; --warn-ink: #ffe9a0;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15130f; --surface: #1f1c16; --ink: #f1ece0; --muted: #a79f8d; --line: #35302a;
    --accent: #e0553f; --accent-ink: #1a0a06; --ok: #6cc08b; --warn-bg: #4a3d0a; --warn-ink: #ffe9a0;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.55 Georgia, "Iowan Old Style", "Times New Roman", serif;
}
h1, h2, h3, .btn, label, .tag, nav a { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
h1 { font-size: 2rem; line-height: 1.15; margin: .4em 0 .3em; letter-spacing: -.01em; }
h2 { font-size: 1.3rem; margin: 1.6em 0 .5em; }
h3 { font-size: 1.05rem; margin: 1em 0 .3em; }
p { margin: .6em 0; }
a { color: var(--accent); }
.wrap { max-width: 680px; margin: 0 auto; padding: 0 16px 56px; }
header.top { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { font: 700 1.05rem system-ui, sans-serif; text-decoration: none; color: var(--ink); }
.brand span { color: var(--accent); }
.icon-btn {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px;
  min-width: 44px; min-height: 44px; font-size: 1.1rem; cursor: pointer;
}
.tag { display: inline-block; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); font-weight: 700; }
.lead { font-size: 1.1rem; color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin: 16px 0; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; }
.steps li::before {
  content: counter(s); flex: 0 0 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font: 700 .95rem system-ui, sans-serif;
}
details { border-top: 1px solid var(--line); padding: 10px 0; }
details:first-of-type { border-top: 0; }
summary { cursor: pointer; font: 600 1rem system-ui, sans-serif; min-height: 32px; }
details ol { margin: .5em 0 0; padding-left: 1.2em; }
.drop {
  display: block; border: 2px dashed var(--line); border-radius: var(--radius); padding: 22px 14px; text-align: center;
  cursor: pointer; background: var(--bg);
}
.drop:focus-within, .drop.over { border-color: var(--accent); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.fname { font-weight: 700; word-break: break-all; }
.checks { display: grid; gap: 4px; margin: 14px 0; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; font: .95rem/1.4 system-ui, sans-serif; cursor: pointer; }
.check input { flex: 0 0 24px; width: 24px; height: 24px; margin: 0; accent-color: var(--accent); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 0; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 1rem;
  cursor: pointer; text-decoration: none;
}
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.block { width: 100%; }
.row { display: grid; gap: 10px; margin-top: 12px; }
.error { color: var(--accent); font: 600 .95rem system-ui, sans-serif; margin: 10px 0 0; }
.hint { color: var(--muted); font: .88rem/1.4 system-ui, sans-serif; }
.bar { height: 14px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 14px 0 6px; }
.bar > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.pick { display: grid; gap: 10px; margin-top: 12px; }
.phases { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; font-family: system-ui, sans-serif; }
.phases li { display: flex; gap: 10px; align-items: center; color: var(--muted); }
.phases li::before { content: "○"; }
.phases li.doing { color: var(--ink); font-weight: 700; }
.phases li.doing::before { content: "◔"; color: var(--accent); }
.phases li.done::before { content: "●"; color: var(--ok); }
.closed { border-color: var(--accent); }
.banner { background: var(--warn-bg); color: var(--warn-ink); border: 2px solid var(--warn-ink); border-radius: var(--radius); padding: 12px 16px; margin: 8px 0 18px; font: 600 .95rem/1.4 system-ui, sans-serif; }
footer { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 16px; color: var(--muted); font: .85rem/1.5 system-ui, sans-serif; }
footer a { margin-right: 14px; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (min-width: 640px) { h1 { font-size: 2.6rem; } .row.two { grid-template-columns: 1fr 1fr; } }
