* { box-sizing: border-box; margin: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.45;
  padding: 26px 22px 60px;
}

main, .topbar, .site-foot { max-width: var(--content-max); margin: 0 auto; }

.mono-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Header ── */
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.logo-tile {
  width: 34px; height: 34px; border: 2px solid var(--ink); border-radius: 10px;
  background: var(--accent-liv); color: #fff; font-weight: 800; font-size: 17px;
  display: grid; place-items: center; box-shadow: 2.5px 2.5px 0 var(--ink);
}
.wordmark h1 { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; line-height: 1.1; }

/* ── Cards ── */
.card {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--r-card);
  margin-bottom: 22px;
  overflow: hidden;
}
.card.quiet { background: var(--card-soft); border-width: 1.5px; box-shadow: var(--shadow-ambient); }
.card-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 15px 20px 13px; border-bottom: 1px solid var(--line-soft);
}
.card-head h2 { font-size: 16px; font-weight: 700; }

/* ── Countdown heroes ── */
.countdowns { display: grid; gap: 22px; margin-bottom: 22px; }
@media (min-width: 640px) { .countdowns.two-up { grid-template-columns: 1fr 1fr; } }
.count-card { padding: 18px 20px 20px; }
.count-card.liv { box-shadow: 6px 6px 0 var(--accent-liv); }
.count-card.move { box-shadow: 6px 6px 0 var(--accent-move); }
.count-card .mono-label { display: block; margin-bottom: 6px; }
.count-card h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.4px; margin-bottom: 14px; }
.count-digits { display: flex; gap: 14px; font-family: var(--font-mono); }
.count-digits .unit { text-align: center; }
.count-digits .num { font-size: 30px; font-weight: 600; letter-spacing: -1px; display: block; }
.count-digits .lab { font-size: 10px; color: var(--text-3); letter-spacing: .12em; text-transform: uppercase; }
.count-date { margin-top: 12px; font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }
.count-done { font-family: var(--font-mono); font-size: 18px; font-weight: 600; letter-spacing: .06em; padding: 8px 0; }
.home-chip {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--ink); border-radius: var(--r-pill);
  background: var(--tint-liv); padding: 7px 14px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .08em;
}

/* ── Add rows / inputs ── */
.add-row { display: flex; gap: 10px; padding: 14px 20px 6px; }
.add-row input {
  flex: 1; border: 1.5px solid var(--line); border-radius: var(--r-row);
  background: var(--card); padding: 9px 12px; font-family: var(--font-display); font-size: 14px;
}
.add-row input:focus { outline: none; border-color: var(--ink); }
.pill-btn {
  border: 2px solid var(--ink); border-radius: var(--r-pill); background: var(--ink); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 13.5px; padding: 8px 18px;
  cursor: pointer; box-shadow: var(--shadow-press);
}
.pill-btn:active { transform: translate(2px, 2px); box-shadow: none; }

/* ── To-do list ── */
.todo-list { list-style: none; padding: 8px 12px 14px; }
.todo-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 8px; border-bottom: 1px solid var(--line-faint); cursor: pointer;
}
.todo-row:last-child { border-bottom: none; }
.todo-check {
  width: 19px; height: 19px; flex: none; border: 2px solid var(--ink); border-radius: 6px;
  display: grid; place-items: center; font-size: 12px; color: #fff; background: transparent;
}
.todo-row.done { opacity: .45; }
.todo-row.done .todo-check { background: var(--ink); }
.todo-row.done .todo-text { text-decoration: line-through; }
.todo-text { flex: 1; }
.who-chip {
  flex: none; width: 20px; height: 20px; border-radius: var(--r-pill);
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  display: grid; place-items: center; border: 1.5px solid var(--ink);
}
.who-chip.lucas { background: var(--tint-move); }
.who-chip.liv { background: var(--tint-liv); }
.row-del {
  flex: none; border: none; background: none; color: var(--muted);
  font-size: 15px; cursor: pointer; padding: 2px 6px;
}
.row-del:hover { color: var(--ink); }

/* ── Wish grid ── */
.wish-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; padding: 14px 20px 18px; }
@media (min-width: 560px) { .wish-grid { grid-template-columns: repeat(3, 1fr); } }
.wish-card {
  border: 1.5px solid var(--ink); border-radius: var(--r-tile, 12px); background: var(--card);
  overflow: hidden; display: flex; flex-direction: column; position: relative;
}
.wish-img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--track); }
.wish-fallback {
  width: 100%; aspect-ratio: 1; display: grid; place-items: center;
  background: var(--track); font-weight: 800; font-size: 34px; color: var(--text-3);
}
.wish-meta { padding: 9px 11px 11px; }
.wish-title { font-size: 13px; font-weight: 700; line-height: 1.25; word-break: break-word; }
.wish-site { font-family: var(--font-mono); font-size: 10px; color: var(--text-3); margin-top: 3px; text-transform: uppercase; letter-spacing: .08em; }
.wish-actions { display: flex; gap: 8px; align-items: center; padding: 0 11px 10px; }
.wish-actions button {
  border: 1.5px solid var(--line); border-radius: var(--r-pill); background: var(--card-soft);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; padding: 3px 9px; cursor: pointer;
}
.wish-card.bought { opacity: .75; }
.wish-card .who-chip { position: absolute; top: 8px; right: 8px; }
.wish-owned { padding: 0 20px 16px; }
.wish-owned summary { cursor: pointer; }
.wish-card.pending { opacity: .6; }

/* ── Pins ── */
.pins-grid { columns: 2; gap: 14px; padding: 14px 20px 18px; }
@media (min-width: 560px) { .pins-grid { columns: 3; } }
.pin-card { break-inside: avoid; margin-bottom: 14px; display: block; border: 1.5px solid var(--ink); border-radius: 12px; overflow: hidden; }
.pin-card img { width: 100%; display: block; }

/* ── Overlays ── */
.overlay {
  position: fixed; inset: 0; background: rgba(246, 241, 231, .96);
  display: grid; place-items: center; z-index: 40;
}
.overlay-card {
  background: var(--card); border: 2px solid var(--ink); border-radius: var(--r-card);
  box-shadow: 6px 6px 0 var(--accent-liv); padding: 26px 28px; text-align: center;
  display: grid; gap: 14px; min-width: 260px;
}
.overlay-card h2 { font-size: 18px; font-weight: 800; }
.overlay-card input {
  border: 2px solid var(--ink); border-radius: var(--r-row); padding: 10px 12px;
  font-family: var(--font-mono); font-size: 20px; text-align: center; letter-spacing: .3em;
}
.overlay-card.shake { animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-7px); } 75% { transform: translateX(7px); } }
.who-row { display: flex; gap: 12px; justify-content: center; }
.pill-btn.who.liv-btn, .pill-btn[data-who="liv"] { background: var(--accent-liv); }
.pill-btn[data-who="lucas"] { background: var(--accent-move); }

/* ── Footer, toast, offline ── */
.site-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 34px; }
.linkish { border: none; background: none; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); cursor: pointer; text-decoration: underline; }
#toast-root { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 50; display: grid; gap: 8px; }
.toast {
  background: var(--ink); color: #fff; border-radius: var(--r-pill);
  padding: 9px 16px; font-size: 13px; display: flex; gap: 12px; align-items: center;
  box-shadow: var(--shadow-ambient);
}
.toast button { border: none; background: none; color: #FFD84D; font-weight: 700; cursor: pointer; font-size: 13px; }
.offline-stamp { color: var(--accent-move); }
[hidden] { display: none !important; }
