* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --green: #3D6B52;
  --green-deep: #2C5240;
  --green-light: #EAF2EC;
  --gold: #B8944D;
  --gold-light: #FBF6EA;
  --ink: #22302A;
  --ink-2: #4A5A52;
  --ink-3: #8A9A92;
  --line: #E2E8E4;
  --bg: #F4F6F4;
  --white: #fff;
  --warn-bg: #FFF8E6;
  --warn-bd: #E8C27D;
  --warn-tx: #8A6410;
  --red: #C0392B;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 520px; margin: 0 auto; padding: 0 16px 40px; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(150deg, var(--green) 0%, var(--green-deep) 100%);
  color: #fff;
  padding: 30px 20px 26px;
  margin: 0 -16px 18px;
  border-radius: 0 0 20px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(184,148,77,.22), transparent 70%);
  top: -70px; right: -60px;
  border-radius: 50%;
}
.hero .tag {
  display: inline-block;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.28);
  color: #F5E6C8;
  font-size: 12px;
  padding: 3px 11px;
  border-radius: 20px;
  letter-spacing: .5px;
  margin-bottom: 12px;
  position: relative;
}
.hero h1 {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: .5px;
  margin-bottom: 10px;
  position: relative;
}
.hero .match {
  font-size: 15px;
  color: #DCE8E0;
  margin-bottom: 4px;
  position: relative;
}
.hero .meta {
  font-size: 12.5px;
  color: #B6CBBE;
  position: relative;
}
.hero .stock {
  margin-top: 16px;
  font-size: 13px;
  color: #E8F0EA;
  background: rgba(0,0,0,.16);
  display: inline-block;
  padding: 5px 15px;
  border-radius: 20px;
  position: relative;
}
.hero .stock b { color: #FFD98A; font-size: 17px; font-weight: 700; margin: 0 2px; }

/* ---------- 已领完状态 ---------- */
.hero .stock.out {
  background: rgba(192,57,43,.30);
  border: 1px solid rgba(255,120,105,.5);
  color: #FFE2DD;
  font-weight: 600;
}
.hero .stock.out b { color: #FFB4A6; }

.soldout-banner {
  background: linear-gradient(135deg, #C0392B 0%, #9B2C20 100%);
  color: #fff;
  border-radius: 13px;
  padding: 18px 18px 16px;
  margin-bottom: 16px;
  text-align: center;
}
.soldout-banner .ico { font-size: 30px; line-height: 1; margin-bottom: 8px; }
.soldout-banner h3 { font-size: 18px; font-weight: 700; letter-spacing: .5px; margin-bottom: 6px; }
.soldout-banner p { font-size: 13.5px; color: #FFE2DD; line-height: 1.6; }

/* 表单整体置灰、不可交互 */
.card.locked { position: relative; }
.card.locked .field,
.card.locked #submitBtn { opacity: .5; pointer-events: none; filter: grayscale(.35); }
.card.locked .locked-hint {
  display: block;
  background: #FDECEA;
  border: 1px solid #F0BDB5;
  color: #A93226;
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 13px;
  text-align: center;
  margin-bottom: 14px;
  font-weight: 600;
}
.card .locked-hint { display: none; }
.btn.btn-dead {
  background: #B9C3BD !important;
  cursor: not-allowed;
}

/* ---------- 警示块 ---------- */
.notice {
  background: var(--warn-bg);
  border: 1px solid var(--warn-bd);
  border-radius: 13px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.notice-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--warn-tx);
  margin-bottom: 9px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.notice ol { list-style: none; counter-reset: n; }
.notice ol li {
  counter-increment: n;
  font-size: 13px;
  color: #7A5A20;
  line-height: 1.75;
  padding-left: 20px;
  position: relative;
  margin-bottom: 5px;
}
.notice ol li:last-child { margin-bottom: 0; }
.notice ol li::before {
  content: counter(n) ".";
  position: absolute;
  left: 0;
  font-weight: 700;
  color: var(--gold);
}
.notice em {
  font-style: normal;
  color: var(--red);
  font-weight: 700;
}

/* ---------- 卡片 / 表单 ---------- */
.card {
  background: var(--white);
  border-radius: 15px;
  padding: 20px 18px;
  box-shadow: 0 2px 12px rgba(34,48,42,.06);
  margin-bottom: 16px;
}
.card h2 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 3px;
  color: var(--ink);
}
.card .sub {
  font-size: 12.5px;
  color: var(--ink-3);
  margin-bottom: 18px;
}

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 7px;
}
.field label i { color: var(--red); font-style: normal; margin-left: 2px; }
.field input {
  width: 100%;
  height: 46px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 0 14px;
  font-size: 16px;
  color: var(--ink);
  background: #FAFBFA;
  transition: .18s;
  font-family: inherit;
}
.field input:focus {
  outline: none;
  border-color: var(--green);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(61,107,82,.09);
}
.field input.err { border-color: var(--red); background: #FFF7F6; }
.field .tip {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 6px;
  min-height: 17px;
  line-height: 1.45;
}

.btn {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-deep) 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: .18s;
  font-family: inherit;
  letter-spacing: .5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .62; cursor: not-allowed; }

.spinner {
  width: 15px; height: 15px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 找回入口 ---------- */
.find-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 15px;
  flex-wrap: wrap;
}
.find-text { font-size: 13px; color: var(--ink-3); }
.find-btn {
  background: none;
  border: none;
  color: var(--green);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-family: inherit;
  padding: 3px 2px;
}

/* ---------- 弹窗 ---------- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(20,30,25,.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
  backdrop-filter: blur(2px);
}
.modal.on { display: flex; }
.modal-box {
  background: #fff;
  border-radius: 17px;
  padding: 26px 22px 22px;
  width: 100%;
  max-width: 340px;
  position: relative;
  animation: pop .22s ease-out;
}
@keyframes pop {
  from { opacity: 0; transform: scale(.94) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-close {
  position: absolute;
  top: 11px; right: 15px;
  font-size: 26px;
  color: #C8D2CC;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
}
.modal-ico { font-size: 36px; text-align: center; margin-bottom: 9px; }
.modal-box h3 { font-size: 17px; text-align: center; margin-bottom: 7px; }
.modal-sub { font-size: 13px; color: var(--ink-3); text-align: center; line-height: 1.65; margin-bottom: 18px; }
.modal-box input {
  width: 100%;
  height: 46px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 0 14px;
  font-size: 16px;
  background: #FAFBFA;
  font-family: inherit;
  transition: .18s;
}
.modal-box input:focus {
  outline: none;
  border-color: var(--green);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(61,107,82,.09);
}
.modal-box input.err { border-color: var(--red); background: #FFF7F6; }
.modal-tip {
  font-size: 12.5px;
  color: var(--red);
  text-align: center;
  margin-top: 10px;
  min-height: 18px;
  line-height: 1.5;
}

/* ---------- Toast ---------- */
.mask {
  position: fixed;
  inset: 0;
  background: rgba(20,30,25,.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
  backdrop-filter: blur(2px);
}
.mask.on { display: flex; }
.toast {
  background: #fff;
  border-radius: 17px;
  padding: 28px 24px 22px;
  width: 100%;
  max-width: 320px;
  text-align: center;
  animation: pop .22s ease-out;
}
.toast .ico { font-size: 44px; margin-bottom: 12px; }
.toast h3 { font-size: 18px; margin-bottom: 8px; }
.toast p { font-size: 13.5px; color: var(--ink-3); line-height: 1.65; margin-bottom: 20px; }
.toast .go {
  display: block;
  height: 46px;
  line-height: 46px;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-deep) 100%);
  color: #fff;
  border-radius: 11px;
  text-decoration: none;
  font-size: 15.5px;
  font-weight: 600;
}

/* ---------- 关闭态 ---------- */
.closed-box {
  background: #fff;
  border-radius: 15px;
  padding: 40px 24px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(34,48,42,.06);
}
.closed-box .ico { font-size: 48px; margin-bottom: 14px; }
.closed-box h2 { font-size: 18px; margin-bottom: 9px; }
.closed-box p { font-size: 13.5px; color: var(--ink-3); line-height: 1.7; }

/* ---------- 页脚 ---------- */
.foot {
  text-align: center;
  font-size: 11.5px;
  color: #A8B5AE;
  margin-top: 22px;
  line-height: 1.8;
}

/* ---------- 门票页 ---------- */
.ticket-page { max-width: 520px; margin: 0 auto; padding: 0 16px 40px; }

.alert-top {
  background: var(--warn-bg);
  border: 1px solid var(--warn-bd);
  border-radius: 13px;
  padding: 14px 16px;
  margin: 16px 0;
}
.alert-top .at-head {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--warn-tx);
  margin-bottom: 7px;
}
.alert-top .at-body { font-size: 13px; color: #7A5A20; line-height: 1.75; }
.alert-top .at-red {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 5px;
  margin: 4px 0;
}

.seat-card {
  background: linear-gradient(150deg, var(--green) 0%, var(--green-deep) 100%);
  color: #fff;
  border-radius: 17px;
  padding: 24px 20px;
  text-align: center;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(44,82,64,.2);
}
.seat-card .lbl { font-size: 12.5px; color: #B6CBBE; letter-spacing: 1px; margin-bottom: 7px; }
.seat-card .seat {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #FFE8B8;
  margin-bottom: 8px;
}
.seat-card .where { font-size: 12.5px; color: #C6D8CC; }

.ticket-img {
  width: 100%;
  border-radius: 13px;
  display: block;
  box-shadow: 0 3px 14px rgba(34,48,42,.12);
  cursor: zoom-in;
  background: #fff;
}
.img-hint {
  text-align: center;
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 9px;
}

.rows { margin-top: 6px; }
.row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  gap: 14px;
}
.row:last-child { border-bottom: none; }
.row .k { font-size: 13.5px; color: var(--ink-3); flex-shrink: 0; }
.row .v {
  font-size: 14px;
  color: var(--ink);
  font-weight: 600;
  text-align: right;
  word-break: break-all;
}
.row .v.hl { color: var(--gold); font-size: 15.5px; letter-spacing: .8px; }

.qr-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20,30,25,.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 20px;
  flex-direction: column;
  gap: 16px;
}
.qr-overlay.on { display: flex; }
.qr-overlay img { max-width: 100%; max-height: 78vh; border-radius: 10px; background: #fff; }
.qr-overlay .close-hint { color: #C6D8CC; font-size: 13px; }
