:root {
  --bg: #f6f4ef;
  --card: #ffffff;
  --ink: #2b2b26;
  --muted: #8a877d;
  --accent: #3d5a40;
  --danger: #a4442f;
  --radius: 14px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, system-ui, sans-serif;
  font-size: 17px;
  padding-bottom: env(safe-area-inset-bottom);
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 4px;
}
h1 { font-size: 22px; margin: 0; }
h2 { font-size: 16px; color: var(--muted); margin: 20px 4px 8px; text-transform: uppercase; letter-spacing: .04em; }
main { padding: 8px 16px 40px; max-width: 560px; margin: 0 auto; }
.center { display: grid; place-items: center; min-height: 100dvh; }
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  margin: 8px 0;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  border: none;
  display: block;
  text-decoration: none;
  color: inherit;
}
.login { width: min(92vw, 360px); text-align: center; }
.login h1 { margin-bottom: 12px; }
input, button {
  font: inherit;
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #ddd8cc;
  margin: 5px 0;
  background: #fff;
}
input#search {
  font-size: 19px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 2px solid var(--accent);
  margin-top: 10px;
}
button {
  background: var(--accent);
  color: #fff;
  border: none;
  font-weight: 600;
  cursor: pointer;
}
button.danger { background: var(--danger); }
button.ghost, a.ghost {
  background: transparent;
  color: var(--accent);
  border: none;
  width: auto;
  padding: 8px 10px;
  text-decoration: none;
  font-weight: 600;
}
.small { font-size: 15px; }
.row { display: flex; gap: 8px; }
.box-row { display: flex; align-items: center; gap: 12px; }
.box-badge {
  flex: 0 0 auto;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  border-radius: 999px;
}
.box-info { flex: 1; min-width: 0; }
.qr-link { color: var(--accent); font-weight: 600; text-align: center; }
.taken summary { color: var(--muted); }
.taken-tag { color: #b0813a; font-size: 14px; font-weight: 600; }
.move-form { display: flex; gap: 6px; flex: 1; }
.move-form select { flex: 1; padding: 10px; border-radius: 10px; border: 1px solid #ddd8cc; font: inherit; background: #fff; }
.move-form button, .row form button.ghost { width: auto; }
.row form { flex: 1; }
.muted { color: var(--muted); font-size: 15px; }
.err { color: var(--danger); }
.hit { display: block; padding: 10px 4px; color: inherit; text-decoration: none; border-bottom: 1px solid #eee9dd; }
.hit:last-child { border-bottom: none; }
.add-item { display: flex; gap: 8px; align-items: center; }
.add-item input { margin: 0; }
.add-item button { width: auto; margin: 0; padding: 12px 18px; }
details summary { cursor: pointer; font-weight: 600; padding: 2px 0; list-style: none; }
details summary::-webkit-details-marker { display: none; }
.list { padding: 2px 14px; }
.item-row { border-bottom: 0.5px solid #e4e0d4; }
.item-row:last-child { border-bottom: none; }
.item-row summary { font-weight: 400; padding: 12px 0; }
.item-row form { padding-bottom: 10px; }
details[open] summary { margin-bottom: 8px; }
