:root {
  --bg: #1a1410;
  --panel: #261c16;
  --ink: #f3e6d4;
  --muted: #b9a48d;
  --line: #3d2e24;
  --accent: #c45c26;
  --owned: #3d7a4a;
  --wanted: #b8860b;
  --danger: #b54a3c;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

body {
  padding-bottom: 88px;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

h1,
h2,
p {
  margin: 0;
}

.top {
  padding: 18px 16px 10px;
}

.eyebrow {
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 11px;
}

.top h1 {
  font-size: 28px;
  font-weight: 700;
  margin-top: 4px;
}

.sub {
  color: var(--muted);
  margin-top: 4px;
  font-size: 14px;
}

.screen {
  display: none;
  padding: 0 16px 24px;
}

.screen.active {
  display: block;
}

.search {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 14px;
  font-size: 18px;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  margin: 10px 0 16px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
}

.card h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.meta {
  color: var(--muted);
  font-size: 13px;
}

.stamp {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 2px 8px;
  margin-bottom: 8px;
}

.stamp.owned {
  color: #8fd19a;
}

.stamp.wanted {
  color: #e6c35c;
}

.stamp.none {
  color: var(--muted);
}

.row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.btn {
  appearance: none;
  border: 0;
  background: var(--accent);
  color: #fff8ef;
  border-radius: 999px;
  padding: 10px 14px;
  min-height: 44px;
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}

.btn.danger {
  background: var(--danger);
}

.btn.wide {
  width: 100%;
}

form {
  display: grid;
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  background: #1a1410;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}

textarea {
  min-height: 72px;
  resize: vertical;
}

.nav {
  position: fixed;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 15;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 6px;
  background: #120e0b;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 8px;
}

.nav button {
  background: transparent;
  border: 0;
  color: var(--muted);
  min-height: 52px;
  border-radius: 12px;
}

.nav button.active {
  background: var(--panel);
  color: var(--ink);
}

[hidden] {
  display: none !important;
}

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login .card {
  width: min(420px, 100%);
}

.empty {
  color: var(--muted);
  padding: 18px 4px;
}

.count {
  float: right;
  color: var(--muted);
  font-size: 13px;
}

.people {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.member-list {
  display: grid;
  gap: 8px;
}

.who-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.who-bar {
  margin-top: 12px;
  max-width: 280px;
}

.want-menu {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  padding: 8px 12px;
}

.want-menu summary {
  cursor: pointer;
  color: var(--muted);
}

.want-people {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.want-tick {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
}

.want-tick input {
  width: 22px;
  height: 22px;
  accent-color: var(--wanted);
}

.filter-chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 12px;
  min-height: 40px;
}

.filter-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff8ef;
}

.identify {
  display: grid;
  gap: 10px;
  margin-bottom: 8px;
}

.pick {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  text-align: left;
  background: #1a1410;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  color: inherit;
}

.pick img {
  width: 44px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  background: #120e0b;
  flex-shrink: 0;
}

.overlay {
  position: fixed;
  inset: 0;
  background: #120e0bcc;
  display: grid;
  place-items: end center;
  padding: 12px 12px 96px;
  z-index: 20;
}

.overlay[hidden] {
  display: none;
}

.overlay .card {
  width: min(520px, 100%);
  max-height: 80vh;
  overflow: auto;
}

.wanters {
  margin: 8px 0;
  color: var(--muted);
  font-size: 14px;
}
