/* Drink Butler companion site: the device's warm dark theme, with a light variant. */
:root {
  --bg: #14110f;
  --surface: #1f1a17;
  --surface2: #2b2420;
  --divider: #3a312b;
  --text: #f3e9dc;
  --muted: #a8988a;
  --accent: #e3a548;
  --on-accent: #1a1410;
  --ok: #7dbe6e;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #faf6f0;
    --surface: #ffffff;
    --surface2: #f1e9de;
    --divider: #e2d6c6;
    --text: #231c16;
    --muted: #6f6255;
    --accent: #b0741f;
    --on-accent: #ffffff;
    --ok: #3f8a32;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
main { max-width: 760px; margin: 0 auto; padding: 24px 16px 64px; }
a { color: var(--accent); }
h1 { font-size: 30px; line-height: 1.2; margin: 8px 0 4px; }
h2 { font-size: 22px; margin: 40px 0 8px; padding-top: 16px; border-top: 1px solid var(--divider); }
h3 { font-size: 18px; margin: 24px 0 6px; }
p, li { color: var(--text); }
.muted { color: var(--muted); }
.kicker { color: var(--accent); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }
figure { margin: 16px 0; }
figure img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--divider); display: block; }
figcaption { color: var(--muted); font-size: 14px; margin-top: 6px; }
nav.toc { background: var(--surface); border: 1px solid var(--divider); border-radius: 12px; padding: 12px 16px; }
nav.toc ol { margin: 4px 0; padding-left: 22px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--divider); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
kbd { background: var(--surface2); border-radius: 6px; padding: 1px 7px; font: inherit; font-size: 15px; }
footer { margin-top: 48px; color: var(--muted); font-size: 14px; }

/* ---- Shopping list page ---- */
.list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.count { color: var(--muted); font-size: 15px; }
ul.items { list-style: none; margin: 16px 0; padding: 0; }
ul.items li { border-bottom: 1px solid var(--divider); }
ul.items label {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 4px; min-height: 56px; cursor: pointer;
}
ul.items input {
  appearance: none; -webkit-appearance: none; flex: none;
  width: 26px; height: 26px; margin: 1px 0 0; border-radius: 8px;
  border: 2px solid var(--muted); background: var(--surface);
  display: grid; place-content: center;
}
ul.items input:checked { background: var(--accent); border-color: var(--accent); }
ul.items input:checked::after { content: ""; width: 7px; height: 13px; margin-top: -3px; border: solid var(--on-accent); border-width: 0 3px 3px 0; transform: rotate(45deg); }
ul.items .name { font-size: 19px; }
ul.items .for { display: block; color: var(--muted); font-size: 14px; }
ul.items li.done .name { text-decoration: line-through; color: var(--muted); }
.note { color: var(--muted); font-style: italic; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0; }
button {
  font: inherit; font-size: 16px; border: 0; border-radius: 12px; padding: 12px 18px; min-height: 48px;
  background: var(--surface2); color: var(--text); cursor: pointer;
}
button.primary { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.toast { color: var(--ok); min-height: 1.5em; font-size: 15px; }
.empty { background: var(--surface); border: 1px solid var(--divider); border-radius: 12px; padding: 16px; }
