:root {
  --bg: #121212;
  --card: #1a1a1f;
  --text: #e8e8e8;
  --muted: #888;
  --accent: #ff9800;
  --border: #333;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, sans-serif;
  min-height: 100vh;
}
.page {
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}
.head { margin-bottom: 18px; }
.back {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}
.back:hover { color: var(--accent); }
h1 {
  margin: 10px 0 6px;
  font-size: 1.45rem;
  font-weight: 600;
}
.sub {
  margin: 0;
  color: #ffb74d;
  font-size: 0.88rem;
  line-height: 1.4;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 16px 20px;
}
.desc {
  margin: 0 0 16px;
  color: #ccc;
  font-size: 0.92rem;
  line-height: 1.55;
}
.desc p { margin: 0 0 0.75em; }
.desc p:last-child { margin-bottom: 0; }
.desc ul {
  margin: 0.35em 0 0.85em;
  padding-left: 1.25em;
}
.desc li { margin: 0.25em 0; }
.desc strong { color: #ffb74d; }
.qr-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.qr-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #141418;
  cursor: pointer;
}
.qr-item:hover { border-color: var(--accent); }
.qr-item img {
  width: 100%;
  max-width: 160px;
  aspect-ratio: 1;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
}
.qr-label {
  font-size: 0.82rem;
  color: var(--muted);
}
.btn-spirit {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 152, 0, 0.55);
  border-radius: 10px;
  background: rgba(255, 152, 0, 0.16);
  color: #ffb74d;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.btn-spirit:hover { background: rgba(255, 152, 0, 0.28); }
.btn-spirit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.toast {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #24301c;
  border: 1px solid #4a6a30;
  color: #c8e6a0;
  font-size: 0.9rem;
  text-align: center;
}
.btn-back-lottery {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #4a6a30;
  background: #2a3d1c;
  color: #d4f0a8;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  font-family: inherit;
}
.btn-back-lottery:hover {
  background: #354d24;
  color: #e8ffc0;
}
.btn-back-lottery.hidden {
  display: none !important;
}
.wall {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.wall-title {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  color: #ddd;
}
.donor-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.donor-tag,
.anonymous-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #121216;
  color: #ddd;
  text-decoration: none;
  font-size: 0.82rem;
}
.anonymous-tag { cursor: default; }
.tier-diamond { border-color: #7ec8ff; color: #b3e5fc; }
.tier-gold { border-color: #ffd54f; color: #ffe082; }
.tier-medal { border-color: #ffab91; color: #ffccbc; }
.foot {
  margin-top: 20px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
}
.foot a { color: var(--accent); }
.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal.hidden { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}
.modal-card {
  position: relative;
  z-index: 1;
  width: min(360px, 92vw);
  padding: 16px;
  background: #17171c;
  border: 1px solid #444;
  border-radius: 14px;
  text-align: center;
}
.modal-card img {
  width: 100%;
  background: #fff;
  border-radius: 10px;
}
.modal-label {
  margin: 10px 0 0;
  color: #ccc;
  font-size: 0.9rem;
}
.modal-x {
  position: absolute;
  top: 8px;
  right: 10px;
  border: none;
  background: transparent;
  color: #aaa;
  font-size: 1.4rem;
  cursor: pointer;
}
@media (max-width: 420px) {
  .qr-row { grid-template-columns: 1fr; }
}
