:root {
  --paper: #f6f1e8;
  --ink: #1c2430;
  --ink-soft: #5c6570;
  --bronze: #8b693a;
  --bronze-soft: #c4a574;
  --line: #ddd4c6;
  --white: #fff;
  --danger: #8a3b2b;
  --sheet: #fffdf8;
}
*,
*::before,
*::after { box-sizing: border-box; }
html {
  margin: 0;
  padding: 0;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  padding: 0;
  background: #efe6d8;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.page {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--paper);
  box-shadow: 0 0 60px rgba(139, 105, 58, 0.12);
  overflow-x: hidden;
}
.wrap { max-width: 560px; margin: 0 auto; padding: 28px 20px calc(48px + env(safe-area-inset-bottom, 0px)); }

/* ----- 选场页：头图 + 底部圆角托板 ----- */
.home { background: #efe6d8; }
.home .hero {
  position: relative;
  z-index: 2;
  width: 100%;
  aspect-ratio: 3840 / 1792;
  background-color: #f3eadc;
  background-image: url("hero-poster.jpg");
  background-repeat: no-repeat;
  background-position: top center;
  background-size: 100% auto;
}
.home .sheet {
  position: relative;
  z-index: 1;
  margin-top: 0;
  background-color: #f7eee6;
  background-image: url("frame-bg.jpg");
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: cover;
  border-radius: 0;
  padding: 28px 20px calc(28% + env(safe-area-inset-bottom, 0px));
  box-shadow: none;
  min-height: calc(100dvh - (min(100vw, 560px) * 1792 / 3840));
}
.section-title {
  margin: 0 0 8px;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #3a2a16;
}
.home .note,
.note {
  text-align: center;
  color: var(--ink-soft);
  font-size: 14px;
  margin: 0 0 22px;
  line-height: 1.7;
}
.venue-buttons {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.venue-buttons li { margin: 0; }
.venue-btn {
  display: block;
  text-decoration: none;
  text-align: center;
  background: rgba(255, 253, 248, 0.94);
  color: var(--ink);
  border: 1px solid rgba(196, 165, 116, 0.55);
  border-radius: 16px;
  padding: 14px 16px 15px;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(139, 105, 58, 0.12);
  -webkit-tap-highlight-color: rgba(139, 105, 58, 0.12);
  transition: transform 0.18s ease, background 0.18s ease;
}
.venue-btn-name {
  display: block;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.4;
}
.venue-btn-theme {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.5;
  color: var(--ink-soft);
}
.venue-theme {
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 16px 12px;
}
.venue-btn:active {
  background: #efe8dc;
  border-color: var(--bronze);
  transform: scale(0.97);
}

/* ----- 分会场页 ----- */
.venue { background: #f7eee6; }
.venue .page {
  background-color: #f7eee6;
  background-image: url("frame-bg.jpg");
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: cover;
  padding: 12px 0 calc(18% + env(safe-area-inset-bottom, 0px));
}
.venue-head {
  text-align: center;
  padding: 28px 24px 8px;
}
.kicker {
  color: #3a2a16;
  letter-spacing: 0.14em;
  font-size: 24px;
  font-weight: 800;
  text-align: center;
  margin: 0 0 10px;
}
.venue .venue-theme {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.6;
  color: #3a2a16;
  margin: 0 20px 8px;
}
h1 {
  font-size: 26px;
  font-weight: 800;
  text-align: center;
  margin: 0 0 10px;
  letter-spacing: 0.04em;
  line-height: 1.35;
}
.lead { text-align: center; font-size: 16px; margin: 0 0 10px; color: var(--ink); }
.join-hint-extra {
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  margin: 0 24px 14px;
  line-height: 1.6;
}
.join-hint {
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #3a2a16;
  margin: 12px 20px 8px;
  line-height: 1.45;
}
.card {
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid rgba(221, 212, 198, 0.8);
  border-radius: 20px;
  padding: 20px 14px 22px;
  text-align: center;
  margin: 8px 16px 0;
  box-shadow: 0 8px 28px rgba(139, 105, 58, 0.10);
  overflow: visible;
}
.card.qr-card {
  background: #fafafa;
  padding: 0;
  overflow: hidden;
  position: relative;
  aspect-ratio: 1 / 1;
  width: min(56vw, 232px);
  margin: 8px auto 28px;
}
.qr-card #qr-missing,
.qr-card #qr-hint {
  padding: 16px 14px 20px;
  margin: 0;
}
.venue,
.venue .page,
.venue .card {
  -webkit-touch-callout: default;
  -webkit-user-select: auto;
  user-select: auto;
}
.qr-link {
  display: block;
  width: min(92vw, 360px);
  margin: 8px auto 12px;
  background: #fff;
  -webkit-touch-callout: default !important;
  -webkit-user-select: auto;
  user-select: auto;
}
.qr {
  width: 140.625%;
  max-width: none;
  height: auto;
  margin: 0;
  position: absolute;
  left: -20.3125%;
  top: -73.4375%;
  display: block;
  cursor: default;
  background: #fafafa;
  padding: 0;
  border-radius: 0;
  -webkit-touch-callout: default !important;
  -webkit-user-select: auto;
  user-select: auto;
  pointer-events: auto;
  -webkit-user-drag: auto;
}
.qr-open {
  display: block;
  margin: 8px auto 12px;
  max-width: min(86vw, 320px);
  color: var(--bronze);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  -webkit-tap-highlight-color: rgba(139, 105, 58, 0.12);
}
.badge {
  display: inline-block;
  border: 1px solid var(--bronze-soft);
  color: var(--bronze);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 3px 10px;
  margin-bottom: 12px;
  border-radius: 999px;
}
.full-title { color: var(--danger); font-size: 22px; }
.others {
  list-style: none;
  padding: 0 20px;
  margin: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.others li { margin: 0; }
.muted { color: var(--ink-soft); font-size: 13px; text-align: center; }
.venue .cap-note { margin: 18px 24px 0; font-size: 13px; }
.hidden { display: none; }
.loading { text-align: center; color: var(--ink-soft); margin-top: 80px; }

/* leftover / admin */
footer {
  margin-top: 28px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 12px;
}
.rule {
  width: 72px;
  height: 2px;
  background: var(--bronze);
  margin: 16px auto 22px;
  border: 0;
}
.admin {
  background: #efe6d8;
}
.admin .page {
  background-color: #f7eee6;
  background-image: url("frame-bg.jpg");
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: cover;
  padding: 12px 0 calc(18% + env(safe-area-inset-bottom, 0px));
}
.admin .wrap {
  max-width: 560px;
  padding: 24px 20px calc(28px + env(safe-area-inset-bottom, 0px));
}
.admin h1 {
  font-size: 22px;
  letter-spacing: 0.14em;
  color: #3a2a16;
}
.admin-card {
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid rgba(196, 165, 116, 0.55);
  border-radius: 20px;
  padding: 20px 16px 22px;
  margin: 0 0 14px;
  box-shadow: 0 8px 28px rgba(139, 105, 58, 0.10);
}
.admin-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.14em;
  color: #3a2a16;
}
.admin-label,
.admin-form label {
  display: block;
  margin: 12px 0 6px;
  color: var(--ink-soft);
  font-size: 14px;
}
.admin-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(196, 165, 116, 0.55);
  border-radius: 16px;
  padding: 12px 14px;
  min-height: 48px;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.94);
  -webkit-appearance: none;
  appearance: none;
}
.admin-input:focus {
  outline: none;
  border-color: var(--bronze);
  box-shadow: 0 0 0 3px rgba(139, 105, 58, 0.15);
}
.admin-toolbar,
.admin-actions {
  display: flex;
  gap: 10px;
  margin: 14px 0 0;
}
.admin-toolbar {
  margin: 0 0 14px;
}
.admin-action {
  flex: 1;
  width: auto;
  margin: 0;
  min-height: 48px;
  cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: rgba(139, 105, 58, 0.12);
}
.admin #login-panel .admin-action {
  width: 100%;
  margin-top: 16px;
}
.admin-secondary {
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  background: rgba(255, 253, 248, 0.86);
}
.admin-status {
  margin: 0 0 8px;
  color: var(--ink);
  text-align: center;
  font-size: 15px;
}
.admin-msg {
  text-align: center;
  margin: 8px 0 14px;
  color: var(--ink-soft);
  font-size: 14px;
}
.admin-error { color: var(--danger); }
.admin-form { margin-top: 8px; }
@media (max-width: 380px) {
  .admin-actions { flex-direction: column; }
}

.join-group {
  max-width: min(86vw, 320px);
  margin: 8px auto 14px;
  background: #8b693a;
  color: #fffdf8;
  border-color: #8b693a;
}
.join-group:active {
  background: #6f532c;
  color: #fffdf8;
  border-color: #6f532c;
}

.join-group-fallback {
  display: block;
  max-width: min(86vw, 320px);
  margin: 0 auto 16px;
  text-align: center;
  font-size: 15px;
  line-height: 1.6;
  color: #8b693a;
  text-decoration: underline;
  -webkit-tap-highlight-color: rgba(139, 105, 58, 0.25);
}
