:root {
  --paper: #f6f1e7; --card: #fffdf8; --ink: #1f2430; --muted: #5f6672; --line: #e2d9c8;
  --navy: #2a4a3a; --accent: #2f6f4e; --gold: #e8b86d; --ok: #2f6f4e; --warn: #b5541b; --bad: #9c2f18;
  --bin-green: #2f6f4e; --bin-gold: #e8b86d; --bin-ink: #3a4556;
  --radius: 14px; --shadow: 0 1px 0 rgba(31,36,48,.04), 0 6px 18px rgba(31,36,48,.06);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--ink); background: var(--paper); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.opt { font-weight: 400; color: var(--muted); }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; max-width: 920px; margin: 0 auto; padding: 18px 18px 6px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand h1 { margin: 0; font-size: 1.5rem; letter-spacing: -.01em; font-family: Georgia, "Iowan Old Style", serif; }
.sub { margin: 0; color: var(--muted); font-size: .92rem; }
.top-actions { display: flex; gap: 8px; flex-wrap: wrap; }

main { max-width: 920px; margin: 0 auto; padding: 6px 18px 32px; }
.banner { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 8px 0 12px; padding: 10px 14px; border-radius: 12px; background: #e8f0ea; color: var(--accent); font-size: .93rem; }
.link { background: none; border: 0; padding: 0; min-height: 0; color: var(--accent); text-decoration: underline; font-weight: 600; cursor: pointer; }

.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 16px 18px; margin-bottom: 16px; }
.step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.step-head h2 { margin: 0; font-size: 1.1rem; font-family: Georgia, "Iowan Old Style", serif; }
.step-no { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 700; font-size: .9rem; flex: none; }
.step-aside { margin-left: auto; color: var(--muted); font-size: .86rem; text-align: right; }
.hint { color: var(--muted); font-size: .9rem; margin: 6px 0 4px; min-height: 1.3em; }
.empty { color: var(--muted); font-style: italic; margin: 8px 0; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }

button { cursor: pointer; border-radius: 10px; border: 1px solid transparent; padding: 9px 14px; min-height: 42px; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(47,111,78,.35); outline-offset: 2px; }
.primary { background: var(--accent); color: #fff; font-weight: 600; }
.primary:hover { background: #245a3e; }
.ghost { background: transparent; border-color: var(--line); }
.ghost:hover { background: #f1eadc; }
.sm { min-height: 34px; min-width: 34px; padding: 4px 9px; font-weight: 700; }
.danger { color: var(--bad); }
.gold-btn { background: var(--gold); color: #3a2e12; font-weight: 600; border-color: transparent; }
.gold-btn:hover { filter: brightness(.96); }

.field { margin: 0 0 12px; }
.field label, .label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 4px; }
input[type="text"], input[type="number"], input[type="date"], select {
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #fffefb; min-height: 40px; width: 100%; min-width: 0;
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  background: #fff; border: 1px solid var(--line); border-radius: 99px; min-height: 36px; padding: 5px 12px; font-size: .9rem; cursor: pointer;
}
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }

.msg { margin: 8px 0 0; font-size: .92rem; color: var(--muted); }
.msg.err { color: var(--bad); }

/* Tonight hero */
.hero {
  background: linear-gradient(145deg, #fffdf8 0%, #eef6f0 55%, #f8efd8 100%);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 18px 18px; margin-bottom: 16px;
}
.hero-kicker { margin: 0 0 4px; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--muted); }
.hero-title { margin: 0 0 10px; font-family: Georgia, "Iowan Old Style", serif; font-size: 1.55rem; line-height: 1.25; }
.hero-title .emph { color: var(--accent); }
.hero-bins { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.bin-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px;
  background: #fff; border: 1px solid var(--line); font-weight: 700; font-size: .95rem;
}
.bin-pill .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.bin-pill.green .dot, .dot.green { background: var(--bin-green); }
.bin-pill.gold .dot, .dot.gold { background: var(--bin-gold); }
.bin-pill.ink .dot, .dot.ink { background: var(--bin-ink); }
.hero-sub { margin: 10px 0 0; color: var(--muted); font-size: .92rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.hero.empty-hero { background: var(--card); }
.hero.empty-hero .hero-title { color: var(--muted); font-size: 1.25rem; font-weight: 400; }

/* Coming up */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.night {
  display: grid; grid-template-columns: 120px 1fr; gap: 10px; align-items: start;
  border: 1px solid var(--line); border-radius: 12px; background: #fffefb; padding: 10px 12px;
}
.night.is-today { box-shadow: inset 3px 0 0 var(--accent); background: #f3f8f4; }
.night.is-tomorrow { box-shadow: inset 3px 0 0 var(--gold); }
.night-date { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--navy); }
.night-date .wd { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.night-bins { display: flex; flex-wrap: wrap; gap: 6px; }
.night-bins .tag {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px;
  font-size: .82rem; font-weight: 600; background: #eef3ef; color: var(--accent);
}
.night-bins .tag .dot { width: 8px; height: 8px; border-radius: 50%; }

/* Bin cards */
.bins { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.card {
  border: 1px solid var(--line); border-radius: 12px; background: #fffefb; padding: 12px 14px; display: grid; gap: 8px;
}
.card-top { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.card-title { margin: 0; font-size: 1.05rem; font-weight: 700; font-family: Georgia, "Iowan Old Style", serif; flex: 1 1 160px; display: flex; align-items: center; gap: 8px; }
.card-meta { color: var(--muted); font-size: .88rem; margin: 0; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; font-size: .78rem; font-weight: 700;
  background: #eef3ef; color: var(--accent);
}
.badge.fort { background: #f8efd8; color: #6e4e12; }
.badge.weekly { background: #eef3ef; color: var(--accent); }
.card-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.card-actions button { min-height: 36px; padding: 6px 10px; font-size: .88rem; }

/* Put-out done state */
.done-note { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; background: #e8f0ea; color: var(--ok); font-weight: 600; font-size: .9rem; }

dialog { border: 1px solid var(--line); border-radius: 16px; padding: 0; width: min(520px, calc(100vw - 24px)); background: var(--card); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.2); }
dialog::backdrop { background: rgba(31,36,48,.35); }
.dlg { padding: 16px; }
.dlg-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.dlg-head h2 { margin: 0; font-size: 1.15rem; font-family: Georgia, "Iowan Old Style", serif; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 10; font-size: .92rem; box-shadow: var(--shadow); max-width: calc(100vw - 32px); }
.foot { color: var(--muted); font-size: .84rem; text-align: center; margin-top: 8px; }

.check-list { display: grid; gap: 6px; margin: 8px 0; }
.check-row { display: flex; align-items: center; gap: 8px; }
.check-row input { width: 18px; height: 18px; accent-color: var(--accent); }

@media (max-width: 640px) {
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .night { grid-template-columns: 1fr; }
  .brand h1 { font-size: 1.3rem; }
  .hero-title { font-size: 1.35rem; }
}
