:root {
  font-family: ui-sans-serif, system-ui, sans-serif;
  --bg: #f4eee4;
  --ink: #1c140c;
  --muted: #6b5748;
  --red: #9b1c1c;
  --red-dark: #6e1010;
  --gold: #c4a574;
  --line: #e2d3bf;
  --card: #fffdf8;
  --held: #1d4ed8;
  --sold: #9b1c1c;
  --reserved: #b45309;
  --ok: #166534;
}
* { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.45; }
a { color: var(--red); }
.top {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 16px; background: #3b0f0f; color: #fff; position: sticky; top: 0; z-index: 20;
}
.top a { color: #fff; text-decoration: none; }
.brand { font-weight: 800; letter-spacing: .02em; }
.top nav { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.top nav a { padding: 8px 10px; border-radius: 8px; font-size: 14px; }
.top nav a:hover, .top nav a.is-on { background: rgba(255,255,255,.12); }
.admin-nav {
  display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 16px;
  background: #5a1a1a; border-bottom: 1px solid #7a2a2a;
}
.admin-nav a, .admin-nav button {
  color: #f7e7d3; text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: 14px;
  background: transparent; border: 0; min-height: 0;
}
.admin-nav a.is-on, .admin-nav a:hover, .admin-nav button:hover { background: #7a2a2a; color: #fff; }
.admin-nav form { margin: 0; }
main { max-width: 1120px; margin: 0 auto; padding: 16px; }
.flash { background: #fff3e0; border: 1px solid #e7c9a0; color: var(--red-dark); padding: 10px 14px; border-radius: 10px; list-style: none; }
h1 { font-size: 1.35rem; margin: 0 0 12px; }
h2 { font-size: 1.05rem; margin: 20px 0 8px; }
.muted { color: var(--muted); font-size: 14px; }
.card, aside, .prose {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px;
}
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0 18px; }
.stat { display: block; text-decoration: none; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.stat strong { display: block; font-size: 1.6rem; }
.stat span { color: var(--muted); font-size: 13px; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.board-page { display: grid; grid-template-columns: 1.5fr .85fr; gap: 16px; align-items: start; }
.desk { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.sticky { position: sticky; top: 64px; }
.board-wrap { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.board-stack { display: flex; flex-direction: column; gap: 14px; }
.board-wrap img, .board-img { width: 100%; display: block; }
.sold-x {
  position: absolute; transform: translate(-50%,-50%); background: var(--sold); color: #fff;
  font-size: 11px; padding: 3px 7px; border-radius: 6px; white-space: nowrap; pointer-events: none; z-index: 1;
}
.sold-x.reserved { background: var(--reserved); }
.tap-board { cursor: crosshair; }
.mark-edit .sold-x { pointer-events: auto; cursor: pointer; }
label { display: block; margin: 10px 0; font-size: 14px; color: var(--muted); }
input, select {
  width: 100%; padding: 10px 12px; margin-top: 4px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; font: inherit; color: var(--ink);
}
.num { font-size: 1.6rem; letter-spacing: .28em; text-align: center; font-variant-numeric: tabular-nums; }
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--red); color: #fff; border: 0; padding: 10px 14px; border-radius: 10px;
  text-decoration: none; cursor: pointer; font: inherit; min-height: 44px;
}
button:hover, .btn:hover { background: var(--red-dark); }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: #f6efe6; }
.btn-danger { background: #fff; color: var(--red); border: 1px solid #e8b4b4; }
.btn-danger:hover { background: #fdecec; }
.btn-wide { width: 100%; }
.err { color: var(--red); margin: 8px 0 0; }
.tag {
  display: inline-block; font-size: 12px; padding: 3px 8px; border-radius: 999px;
  background: #efe6d8; color: var(--ink); white-space: nowrap;
}
.tag-open, .tag-paid, .tag-ok { background: #dcfce7; color: var(--ok); }
.tag-sold, .tag-won { background: #fee2e2; color: var(--sold); }
.tag-held, .tag-due { background: #dbeafe; color: var(--held); }
.tag-reserved { background: #ffedd5; color: var(--reserved); }
.tag-closed, .tag-expired, .tag-rejected, .tag-released { background: #eee; color: #555; }
.ticket { font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: .06em; }
.qr svg, .qr-img { width: 200px; height: auto; display: block; background: #fff; border-radius: 12px; }
.proof-img { max-width: 100%; height: auto; display: block; margin: 8px 0; border: 1px solid var(--line); border-radius: 10px; }
input[type="radio"], input[type="file"], input[type="checkbox"] { width: auto; }
.steps { display: grid; gap: 10px; }
.step { display: grid; grid-template-columns: 32px 1fr; gap: 10px; align-items: start; }
.step b { width: 32px; height: 32px; border-radius: 50%; background: #3b0f0f; color: #fff; display: grid; place-items: center; }
.pay-box { max-width: 440px; margin: 0 auto; }
.dock {
  position: sticky; bottom: 0; z-index: 15; display: none;
  background: #fff; border-top: 1px solid var(--line); padding: 10px 16px;
  justify-content: space-between; align-items: center; gap: 10px;
}
.hint { font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.board-toolbar { margin: 0 0 10px; }
.copy-box { margin-top: 6px; }
@media (max-width: 860px) {
  .board-page, .desk, .stats { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .dock { display: flex; }
  main { padding: 12px 12px 72px; }
  .top nav a { padding: 8px; }
  .sold-x { font-size: 6px; padding: 1px 3px; border-radius: 3px; }
}
