:root {
  --ink: #16161d;
  --paper: #f2f1ee;
  --card: #ffffff;
  --accent: #8a1c2b;       /* oxblood */
  --accent-weak: #f3e1e2;
  --muted: #6a6a75;
  --border: #e3ddd4;
  --amber: #9a6a12;
  --amber-bg: #f8ecca;
  --shadow: 0 1px 2px rgba(20, 20, 30, .05), 0 6px 18px rgba(20, 20, 30, .06);
  --serif: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --sans: system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ---- Header ---- */
.site-header {
  background: var(--ink);
  color: var(--paper);
  padding: 28px 0 24px;
  border-bottom: 3px solid var(--accent);
}
.site-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(28px, 5vw, 40px);
  letter-spacing: .08em;
  margin: 0;
}
.site-tagline { margin: 4px 0 0; color: #b9b7c2; font-size: 14px; letter-spacing: .02em; }

/* ---- Layout ---- */
.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  padding-top: 28px;
  padding-bottom: 48px;
  align-items: start;
}
@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; gap: 20px; }
}

/* ---- Filters ---- */
.filters {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 16px;
}
@media (max-width: 760px) { .filters { position: static; } }

.field { margin-bottom: 16px; }
.field > label { display: block; font-weight: 700; font-size: 13px; margin-bottom: 6px; letter-spacing: .03em; }
.field small { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }

.field input[type="number"],
.field input[type="search"],
.field select {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fcfbf9;
  color: var(--ink);
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-weak);
}

.tag-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.tagmode { font-size: 11px; color: var(--muted); display: flex; gap: 8px; }
.tagmode label { display: inline-flex; align-items: center; gap: 3px; cursor: pointer; }

.tag-list { display: flex; flex-wrap: wrap; gap: 6px; max-height: 220px; overflow-y: auto; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  background: #fcfbf9;
  transition: all .12s;
}
.chip input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.chip input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-weak); }

.reset {
  width: 100%;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fcfbf9;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}
.reset:hover { border-color: var(--accent); color: var(--accent); }

/* ---- Results ---- */
.results-head {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 14px; min-height: 24px;
}
.count { font-weight: 700; font-size: 15px; }
.status { color: var(--muted); font-size: 13px; }

.results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.empty { color: var(--muted); padding: 40px 0; text-align: center; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform .12s, box-shadow .12s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(20,20,30,.06), 0 12px 28px rgba(20,20,30,.1); }

.thumb { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #efece6; display: block; }
.thumb--empty { display: flex; align-items: center; justify-content: center; color: #b7b1a6; font-size: 12px; }

.card-body { padding: 14px 15px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.card-title { font-family: var(--serif); font-weight: 600; font-size: 17px; margin: 0; line-height: 1.35; }
.circle { margin: 0; color: var(--muted); font-size: 12px; }

.badge-unreviewed {
  flex-shrink: 0;
  background: var(--amber-bg);
  color: var(--amber);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
}

.stats { display: flex; gap: 8px; flex-wrap: wrap; }
.stat {
  font-size: 13px; font-weight: 700;
  padding: 3px 10px; border-radius: 6px;
  background: #f4f1ec; color: var(--ink);
}
.stat--players { background: var(--accent); color: #fff; }

.meta { margin: 0; font-size: 12px; color: var(--muted); }
.desc {
  margin: 2px 0 0; font-size: 13px; color: #45454e;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.tag { font-size: 11px; color: var(--accent); background: var(--accent-weak); padding: 2px 8px; border-radius: 4px; }

.booth-link {
  margin-top: auto; padding-top: 6px;
  font-size: 13px; font-weight: 700; color: var(--accent); text-decoration: none;
}
.booth-link:hover { text-decoration: underline; }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--border); padding: 20px 0; color: var(--muted); font-size: 12px; }
.site-footer code { background: #e9e5de; padding: 1px 6px; border-radius: 4px; font-size: 12px; }
