/* 九月初九城隍庙会线上报名 - 前台样式 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: #f6f1e7;
  color: #3d2b1f;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: #a4262c; }

.page { max-width: 560px; margin: 0 auto; padding-bottom: 40px; }

/* 头部 */
.header {
  background: linear-gradient(160deg, #8c1f23 0%, #a4262c 55%, #c0392b 100%);
  color: #f7e6c3;
  padding: 34px 20px 26px;
  text-align: center;
  position: relative;
  border-bottom: 4px solid #d9a441;
}
.header::before, .header::after {
  content: "";
  position: absolute; top: 12px; bottom: 16px; width: 6px;
  border-radius: 3px;
  background: repeating-linear-gradient(#d9a441 0 14px, transparent 14px 22px);
}
.header::before { left: 14px; }
.header::after { right: 14px; }
.header .fest {
  display: inline-block;
  font-size: 12px; letter-spacing: 4px;
  border: 1px solid rgba(247,230,195,.55);
  border-radius: 20px;
  padding: 3px 14px;
  margin-bottom: 12px;
}
.header h1 { font-size: 26px; letter-spacing: 3px; font-weight: 700; text-shadow: 0 2px 6px rgba(0,0,0,.25); }
.header .sub { margin-top: 10px; font-size: 13px; opacity: .85; letter-spacing: 2px; }

/* 卡片 */
.card {
  background: #fff;
  border-radius: 10px;
  margin: 16px;
  padding: 18px 16px;
  box-shadow: 0 2px 10px rgba(140,60,40,.08);
  border: 1px solid #efe3cf;
}
.card h2 {
  font-size: 16px; color: #8c1f23; margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.card h2::before {
  content: ""; width: 4px; height: 16px; border-radius: 2px;
  background: linear-gradient(#a4262c, #d9a441);
}

/* 温馨提示 */
.tips { background: #fffaf0; }
.tips .tip-body { font-size: 14px; line-height: 1.9; color: #6b5138; word-break: break-all; }
.tips .tip-body .lnk { color: #a4262c; font-weight: bold; cursor: pointer; text-decoration: underline; }
.tips .tip-body .lnk:hover { color: #d9a441; }

/* 状态块（未开始/已截止） */
.state-box { text-align: center; padding: 34px 16px; }
.state-box .ico { font-size: 46px; margin-bottom: 12px; }
.state-box h2 { justify-content: center; font-size: 20px; }
.state-box p { color: #8a7a66; margin-top: 8px; font-size: 14px; }
.countdown {
  display: flex; justify-content: center; gap: 10px; margin: 18px 0 6px;
}
.countdown .cd-item {
  background: #8c1f23; color: #f7e6c3; border-radius: 8px;
  min-width: 64px; padding: 10px 6px;
}
.countdown .cd-item b { display: block; font-size: 24px; font-family: Georgia, serif; }
.countdown .cd-item span { font-size: 12px; opacity: .85; }
.btn {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none;
  background: linear-gradient(135deg, #a4262c, #c0392b);
  color: #fff; font-size: 16px; border-radius: 8px;
  padding: 12px 34px; letter-spacing: 2px;
  box-shadow: 0 3px 8px rgba(164,38,44,.35);
  transition: opacity .2s;
}
.btn:active { opacity: .8; }
.btn:disabled { background: #ccc; box-shadow: none; cursor: not-allowed; }
.btn-outline {
  background: #fff; color: #a4262c; border: 1px solid #a4262c; box-shadow: none;
}
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 6px; letter-spacing: 0; }
.btn-block { display: block; width: 100%; }

/* 表单 */
.form-item { margin-bottom: 14px; }
.form-item label { display: block; font-size: 14px; color: #6b5138; margin-bottom: 6px; }
.form-item label .req { color: #a4262c; margin-left: 2px; }
.form-item input, .form-item textarea, .form-item select {
  width: 100%; padding: 11px 12px; font-size: 15px;
  border: 1px solid #e0d3bb; border-radius: 8px; background: #fffdf8;
  color: #3d2b1f; outline: none;
  transition: border-color .2s;
}
.form-item input:focus, .form-item textarea:focus { border-color: #a4262c; }
.form-item .err-tip { color: #a4262c; font-size: 12px; margin-top: 4px; display: none; }
.code-row { display: flex; gap: 10px; }
.code-row input { flex: 1; }
.code-row .btn { white-space: nowrap; padding: 10px 14px; font-size: 14px; min-width: 118px; }

/* 摊位选择 */
.booth-list { display: flex; flex-direction: column; gap: 10px; }
.booth-item {
  display: flex; align-items: center; justify-content: space-between;
  border: 2px solid #e0d3bb; border-radius: 10px;
  padding: 13px 14px; cursor: pointer; background: #fffdf8;
  transition: all .2s; user-select: none;
}
.booth-item:hover { border-color: #d9a441; }
.booth-item.selected {
  border-color: #a4262c; background: #fdf3ef;
  box-shadow: 0 0 0 2px rgba(164,38,44,.15) inset;
}
.booth-item.disabled { border-style: dashed; background: #f4f2ee; cursor: not-allowed; opacity: .75; }
.booth-item .b-info b { font-size: 16px; color: #5d4030; }
.booth-item .b-info .b-desc { font-size: 12px; color: #a09077; margin-top: 3px; }
.booth-item .b-left { text-align: right; font-size: 12px; color: #8a7a66; min-width: 92px; }
.booth-item .b-left b { font-size: 17px; color: #a4262c; }
.booth-item.full .b-left b { color: #999; }
.booth-item .b-check {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid #d9c9a8; margin-left: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: transparent; font-size: 13px; font-weight: bold;
}
.booth-item.selected .b-check { border-color: #a4262c; background: #a4262c; color: #fff; }
.booth-total { margin-top: 10px; font-size: 13px; color: #8a7a66; text-align: right; }

/* 提交区 */
.submit-wrap { margin: 20px 16px 0; }
.agree-tip { text-align: center; font-size: 12px; color: #a08c72; margin-top: 12px; }

/* 成功结果 */
.result-ok { text-align: center; padding: 26px 12px; }
.result-ok .ico { font-size: 52px; }
.result-ok h2 { justify-content: center; }
.result-ok p { color: #6b5138; font-size: 14px; line-height: 1.9; margin-top: 10px; }
.result-ok .btn { margin-top: 18px; }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(40,20,10,.55);
  display: none; align-items: center; justify-content: center; z-index: 99;
  padding: 20px;
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff; border-radius: 12px; max-width: 640px; width: 100%;
  max-height: 86vh; display: flex; flex-direction: column;
  overflow: hidden; border-top: 4px solid #a4262c;
}
.modal .m-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid #f0e6d2;
}
.modal .m-head b { color: #8c1f23; font-size: 16px; }
.modal .m-close {
  border: 0; background: none; font-size: 22px; color: #999; cursor: pointer; line-height: 1;
}
.modal .m-body { padding: 16px; overflow-y: auto; font-size: 14px; line-height: 2; color: #5d4030; white-space: pre-wrap; }
.modal .m-body img { max-width: 100%; height: auto; display: block; margin: 0 auto; border-radius: 6px; }

/* 页脚 */
.footer { text-align: center; color: #b3a288; font-size: 12px; margin-top: 26px; padding: 0 16px; line-height: 2; }

/* 查询结果表 */
.q-result table { width: 100%; border-collapse: collapse; font-size: 14px; }
.q-result th, .q-result td { border: 1px solid #eee2cc; padding: 9px 10px; text-align: left; }
.q-result th { background: #faf3e3; color: #6b5138; white-space: nowrap; width: 96px; font-weight: normal; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; }
.badge.wait { background: #fff4d6; color: #9c7c1c; }
.badge.pass { background: #e6f4e8; color: #2e7d32; }
.badge.refuse { background: #fdecea; color: #a4262c; }
.booth-no-big {
  font-size: 26px; color: #a4262c; font-weight: bold; letter-spacing: 2px;
}

@media (min-width: 640px) {
  .header h1 { font-size: 32px; }
}
