:root {
  --bg: #faf7f2; --surface: #fff; --text: #1f2430; --muted: #6b7280; --line: #e7e1d6;
  --accent: #2f6f5e; --accent-ink: #fff; --accent-soft: #e3f1ec; --warn: #b45309; --danger: #b42318;
  --hi: #fde8e4; --med: #fff3d6; --lo: #e6f0fa;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171c; --surface: #1d2128; --text: #eceff4; --muted: #9aa3b2; --line: #2c323c;
    --accent: #5fbfa4; --accent-ink: #0b1a15; --accent-soft: #1d3a31;
    --hi: #3a2220; --med: #3a3220; --lo: #1f2c3a;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 5; }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; }
nav a { margin-left: 16px; color: var(--muted); text-decoration: none; font-weight: 500; padding: 6px 2px; }
nav a.on { color: var(--accent); border-bottom: 2px solid var(--accent); }
.banner { background: var(--med); color: var(--text); padding: 8px 16px; font-size: .9rem; text-align: center; }
main { max-width: 860px; margin: 0 auto; padding: 20px 16px 64px; }
h1 { font-size: 1.6rem; margin: .2em 0 .1em; }
h2 { font-size: 1.15rem; margin: 1.4em 0 .5em; }
.sub { color: var(--muted); margin: 0 0 18px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-align: left; cursor: pointer; color: inherit; font: inherit; display: flex; flex-direction: column; gap: 6px; text-decoration: none; transition: transform .1s, box-shadow .1s; }
.tile:hover, .tile:focus-visible { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.08); outline: none; }
.tile .emoji { font-size: 2rem; }
.tile .name { font-weight: 650; }
.tile .desc { color: var(--muted); font-size: .9rem; }
.tile.add { border-style: dashed; align-items: center; justify-content: center; color: var(--accent); min-height: 130px; }
.tag { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 12px 0; }
label { display: block; font-weight: 600; margin: 14px 0 6px; }
input[type=text], input[type=number], textarea, select { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; }
textarea { min-height: 90px; resize: vertical; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
button.btn, a.btn { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 10px; padding: 11px 18px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block; }
button.btn.ghost, a.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
button.btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
button.btn:disabled { opacity: .55; cursor: progress; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 22px; text-align: center; color: var(--muted); cursor: pointer; background: var(--surface); }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.thumb { position: relative; }
.thumb img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.thumb button { position: absolute; top: -6px; right: -6px; border-radius: 50%; width: 24px; height: 24px; border: 0; background: var(--danger); color: #fff; cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--accent-soft); color: var(--text); border-radius: 999px; padding: 3px 10px; font-size: .8rem; }
.res-card h3 { margin: 0; font-size: 1.1rem; }
.res-card .subline { color: var(--muted); font-size: .9rem; margin: 2px 0 8px; }
.res-card ul { margin: 4px 0 10px; padding-left: 20px; }
.res-card .lbl { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: 8px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 12px; margin: 8px 0; cursor: pointer; }
.check.high { background: var(--hi); } .check.medium { background: var(--med); } .check.low { background: var(--lo); }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--accent); }
.check.done .t { text-decoration: line-through; opacity: .55; }
.check .m { color: var(--muted); font-size: .85rem; }
.progress { height: 8px; background: var(--line); border-radius: 8px; overflow: hidden; margin: 8px 0 14px; }
.progress > i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .25s; }
.step { display: flex; gap: 12px; }
.step .n { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; }
.err { background: var(--hi); color: var(--danger); border-radius: 10px; padding: 10px 14px; margin: 12px 0; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
.muted { color: var(--muted); }
.hint { font-size: .85rem; color: var(--muted); margin-top: 4px; }
