:root {
  --bg: #faf6f0; --card: #ffffff; --text: #2b2420; --muted: #8a7f76; --line: #ece4d9;
  --accent: #c2562b; --accent-soft: #f7e3d8; --ok: #5b8a3c; --ok-soft: #e6f0dc;
  --radius: 16px;
  --serif: "Lora", Georgia, serif; --sans: "Inter", -apple-system, system-ui, sans-serif;
}
:root.dark {
  --bg: #1b1714; --card: #26201c; --text: #f1e9e1; --muted: #a2968b; --line: #3a312b;
  --accent: #e8794a; --accent-soft: #3d2a20; --ok: #8fbf6a; --ok-soft: #26321d;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--sans); }
main { max-width: 640px; margin: 0 auto; padding: 16px 16px 96px; }
h1 { font: 600 26px/1.2 var(--serif); margin: 4px 0 8px; }
h2 { font: 600 19px/1.3 var(--serif); margin: 28px 0 12px; }
h3 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 8px; }
a { color: var(--accent); }
.loading, .error { padding: 48px 0; text-align: center; color: var(--muted); }
.meta { color: var(--muted); font-size: 14px; margin: 2px 0; }

.list { display: grid; gap: 12px; margin-top: 12px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; cursor: pointer; }
.tile:active { transform: scale(.99); }
.tile .kind { font-size: 12px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.tile .name { font: 600 18px/1.3 var(--serif); margin: 4px 0; }
.tile .sub { color: var(--muted); font-size: 14px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 16px; }
.ing { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.ing:last-child { border-bottom: 0; }
.box { flex: none; width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line); margin-top: 1px; display: grid; place-items: center; color: #fff; font-size: 14px; }
.done .box { background: var(--ok); border-color: var(--ok); }
.done .label { color: var(--muted); text-decoration: line-through; }

.step { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.step:last-child { border-bottom: 0; }
.num { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 600; display: grid; place-items: center; font-size: 14px; }
.step.done .num { background: var(--ok-soft); color: var(--ok); }
.step .t { font-weight: 600; }
.step .s { color: var(--muted); font-size: 14px; margin-top: 2px; }
.step.done .t { color: var(--muted); }
.chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); margin-left: 6px; vertical-align: 1px; }

.focus .counter { color: var(--muted); font-size: 14px; font-weight: 500; }
.focus .title { font: 600 28px/1.25 var(--serif); margin: 6px 0 16px; }
.focus .summary { font-size: 21px; line-height: 1.45; font-weight: 500; }
.focus .details { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 17px; }
.focus .details ul { padding-left: 20px; margin: 8px 0; }
.focus .details p { margin: 0 0 12px; }
.row { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.btn { flex: 1; border: 0; border-radius: 14px; padding: 14px; font: 600 16px var(--sans); background: var(--accent-soft); color: var(--accent); cursor: pointer; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn:disabled { opacity: .4; }

.notes p { margin: 0 0 10px; }
.notes ul { padding-left: 20px; }

#timers { position: sticky; top: 0; z-index: 5; display: flex; gap: 8px; flex-wrap: wrap; padding: 0 16px; max-width: 640px; margin: 0 auto; }
#timers:not(:empty) { padding-top: 10px; padding-bottom: 6px; background: var(--bg); }
.timer { background: var(--accent); color: #fff; border-radius: 99px; padding: 6px 12px; font-size: 14px; font-weight: 600; cursor: pointer; }
.timer.over { background: var(--ok); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .6; } }
.foot { color: var(--muted); font-size: 12px; text-align: center; margin-top: 32px; }
