@charset "UTF-8";
/*!
 * css/style.css — 恒洁 × 谢英凯 广州设计周 H5 现场报名页样式
 *
 * 适配方案：750px 设计稿 → rem（1rem = 设计稿 100px）
 *   html 的 font-size 用 vw 动态换算，宽屏（>=560px）封顶，
 *   这样所有 rem 数值在不同屏宽下等比缩放，无需写多套媒体查询。
 * 主容器 .page 最宽 560px 居中，桌面/微信平板下不会拉得过宽。
 */

/* ========== 0. 变量与重置 ========== */
:root {
  /* 取色自设计稿：按钮与背景主色 */
  --c-navy: #173e83;
  --c-navy-deep: #14346f;
  --c-blue: #2968ae;
  --c-blue-light: #4d8fc7;
  --c-page: #f2f8fc;
  --c-text: #16325c;
  --c-text-sub: #6b87a8;
  --c-line: #e2edf6;
  --c-field-bg: #f4f8fc;
  --c-danger: #e8503a;
  --c-danger-bg: #fdece8;
  --c-mask: rgba(11, 33, 66, 0.55);
}

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

html {
  /* 750 设计稿：1rem = 100 设计稿 px */
  font-size: 13.3333vw;
  -webkit-text-size-adjust: 100%;
}

@media (min-width: 560px) {
  html {
    /* 560px 为最大内容宽度，折算后 1rem = 74.6667px */
    font-size: 74.6667px;
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--c-text);
  background: var(--c-page);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 统一处理 hidden（很多元素默认 display:flex，需要强制生效） */
[hidden] {
  display: none !important;
}

button,
input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: 0;
  outline: 0;
  background: none;
}

button {
  cursor: pointer;
}

img {
  display: block;
  border: 0;
}

/* ========== 1. 页面容器 ========== */
.page {
  position: relative;
  width: 100%;
  /* 7.5rem = 750 设计稿整宽；在 560px 以上视口，1rem = 74.6667px，
     即最大宽度锁定在 560px，符合“max-width 560px 居中”的要求 */
  max-width: 7.5rem;
  margin: 0 auto;
  background: var(--c-page);
  min-height: 100vh;
  overflow: hidden;
}

/* ========== 2. 主视觉区（整页背景长图 + 叠加按钮） ========== */
.hero {
  position: relative;
  width: 100%;
  font-size: 0; /* 消除 img 底部行内间隙 */
}

.hero-bg {
  width: 100%;
  height: auto;
  display: block;
  /* 背景图自带主视觉与展会信息，禁止被选中拖拽，避免误触 */
  -webkit-user-drag: none;
  user-select: none;
}

/*
 * 按钮定位说明：
 *   背景图为 750 x 1624，图内「展馆图」底部约 y=710，「展会信息」标题顶部约 y=985，
 *   两者之间是 275 设计稿 px 的空白带（中心 y≈847.5，即 52.2%）。
 *   按钮图 687 x 168（占宽 91.6%），高度占背景图 10.34%，
 *   因此按钮 top = 52.2% - 10.34% / 2 ≈ 47%。
 *   用百分比定位，保证任意屏宽下按钮始终落在空白带内。
 */
.hero-actions {
  position: absolute;
  top: 47%;
  left: 4.2%;
  width: 91.6%;
}

.hero-btn {
  display: block;
  width: 100%;
  padding: 0;
  background: transparent;
  line-height: 0;
  border-radius: 0.16rem;
  transition: opacity 0.25s ease, transform 0.15s ease;
  opacity: 0; /* 初始化时隐藏，拉完状态再淡入，避免按钮「跳变」 */
}

.hero-btn.is-ready {
  opacity: 1;
}

.hero-btn:active {
  transform: scale(0.98);
}

.hero-btn img {
  width: 100%;
  height: auto;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

/* ========== 3. 轻提示 Toast ========== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.2rem;
  z-index: 1200;
  max-width: 5.2rem;
  padding: 0.2rem 0.34rem;
  border-radius: 0.36rem;
  background: rgba(15, 33, 60, 0.88);
  color: #fff;
  font-size: 0.26rem;
  line-height: 1.45;
  text-align: center;
  transform: translate(-50%, 0.2rem);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  word-break: break-all;
}

.toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ========== 4. 通用弹窗（报名成功 / 已核销） ========== */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-mask);
  padding: 0.4rem;
  animation: mask-in 0.2s ease;
}

@keyframes mask-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal {
  position: relative;
  width: 100%;
  max-width: 6.4rem; /* 640 设计稿 px，约屏宽 85% */
  max-height: 92vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.44rem 0.42rem 0.36rem;
  border-radius: 0.32rem;
  background: #fff;
  text-align: center;
  box-shadow: 0 0.2rem 0.6rem rgba(9, 30, 60, 0.22);
  animation: modal-in 0.26s cubic-bezier(0.22, 0.68, 0.4, 1);
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(0.3rem) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-close {
  position: absolute;
  top: 0.16rem;
  right: 0.16rem;
  width: 0.66rem;
  height: 0.66rem;
  font-size: 0.44rem;
  line-height: 0.62rem;
  color: #9aabc0;
  font-weight: 300;
  border-radius: 50%;
}

.modal-close:active {
  background: #f1f5f9;
}

.modal-title {
  font-size: 0.38rem;
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: 0.01rem;
  padding: 0 0.5rem;
}

.modal-sub {
  margin-top: 0.12rem;
  font-size: 0.26rem;
  color: var(--c-text-sub);
  line-height: 1.5;
}

/* 二维码卡片 */
.qr-wrap {
  position: relative;
  margin: 0.3rem auto 0;
  width: 4.1rem;
  padding: 0.24rem;
  border-radius: 0.2rem;
  background: #fff;
  border: 1px solid var(--c-line);
  box-shadow: 0 0.06rem 0.2rem rgba(23, 62, 131, 0.08);
}

.qr-box {
  width: 3.62rem;
  height: 3.62rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: filter 0.2s ease, opacity 0.2s ease;
}

.qr-box canvas,
.qr-box table {
  display: block;
  max-width: 100%;
}

.qr-code-text {
  margin-top: 0.14rem;
  font-size: 0.24rem;
  letter-spacing: 0.02rem;
  color: var(--c-text-sub);
  word-break: break-all;
}

/* 已核销：二维码置灰 + 中央徽标 */
.qr-wrap.is-verified .qr-box {
  filter: grayscale(1);
  opacity: 0.32;
}

.qr-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  padding: 0.12rem 0.28rem;
  border-radius: 0.1rem;
  background: rgba(23, 62, 131, 0.94);
  color: #fff;
  font-size: 0.32rem;
  font-weight: 700;
  letter-spacing: 0.06rem;
  white-space: nowrap;
  box-shadow: 0 0.06rem 0.2rem rgba(9, 30, 60, 0.25);
}

.modal-time {
  margin-top: 0.2rem;
  font-size: 0.25rem;
  color: var(--c-navy);
}

.modal-tip {
  margin-top: 0.22rem;
  font-size: 0.24rem;
  color: #93a6bb;
  line-height: 1.5;
}

/* 主按钮（我知道了 / 提交报名 共用） */
.btn-primary {
  display: block;
  width: 100%;
  height: 0.92rem;
  border-radius: 0.46rem;
  background: linear-gradient(96deg, var(--c-navy) 0%, var(--c-blue) 100%);
  color: #fff;
  font-size: 0.32rem;
  font-weight: 600;
  letter-spacing: 0.02rem;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.btn-primary:active {
  transform: scale(0.985);
  opacity: 0.92;
}

.btn-primary[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.modal-btn {
  margin-top: 0.34rem;
}

/* ========== 5. 底部弹层（报名表单 / 城市选择） ========== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: var(--c-mask);
  animation: mask-in 0.2s ease;
}

.sheet {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 7.5rem; /* 750 设计稿整宽（= 560px 上限） */
  max-height: 90vh;
  background: #fff;
  border-radius: 0.32rem 0.32rem 0 0;
  animation: sheet-in 0.28s cubic-bezier(0.22, 0.68, 0.4, 1);
  overflow: hidden;
}

@keyframes sheet-in {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.sheet-head {
  position: relative;
  flex: 0 0 auto;
  height: 1.08rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--c-line);
}

.sheet-head h2 {
  font-size: 0.32rem;
  font-weight: 600;
  color: var(--c-text);
}

.sheet-close {
  position: absolute;
  top: 0;
  right: 0.1rem;
  width: 0.88rem;
  height: 1.08rem;
  font-size: 0.46rem;
  font-weight: 300;
  color: #9aabc0;
  line-height: 1;
}

.sheet-body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.24rem 0.4rem 0.1rem;
}

.sheet-foot {
  flex: 0 0 auto;
  padding: 0.2rem 0.4rem calc(0.28rem + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid #f2f6fa;
}

/* 表单字段 */
.field {
  padding: 0.16rem 0 0.2rem;
  border-bottom: 1px solid #f1f5f9;
}

.field:last-child {
  border-bottom: 0;
}

.field-label {
  display: block;
  font-size: 0.27rem;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 0.14rem;
}

.field-label i {
  font-style: normal;
  color: var(--c-danger);
  margin-left: 0.04rem;
}

.field-input {
  width: 100%;
  height: 0.88rem;
  padding: 0 0.24rem;
  border-radius: 0.14rem;
  background: var(--c-field-bg);
  font-size: 0.3rem;
  color: var(--c-text);
  transition: box-shadow 0.15s ease, background 0.15s ease;
}

.field-input::placeholder {
  color: #a9bacd;
  font-size: 0.28rem;
}

.field-input:focus {
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--c-blue);
}

.field-input.is-error {
  box-shadow: inset 0 0 0 1px var(--c-danger);
  background: #fef7f5;
}

/* 选择器样式字段 */
.field-picker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 0.88rem;
  padding: 0 0.24rem;
  border-radius: 0.14rem;
  background: var(--c-field-bg);
  text-align: left;
}

.field-picker .picker-value {
  font-size: 0.3rem;
  color: var(--c-text);
}

.field-picker .picker-value.is-placeholder {
  color: #a9bacd;
  font-size: 0.28rem;
}

.field-picker .picker-arrow {
  font-size: 0.34rem;
  color: #b6c6d8;
  transform: rotate(90deg);
  line-height: 1;
}

/* 设计类型单选 */
.radio-list {
  display: flex;
  flex-direction: column;
  gap: 0.14rem;
}

.radio-item {
  display: flex;
  align-items: center;
  min-height: 0.84rem;
  padding: 0.12rem 0.24rem;
  border-radius: 0.14rem;
  background: var(--c-field-bg);
  border: 1px solid transparent;
  font-size: 0.28rem;
  color: var(--c-text);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.radio-item input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-dot {
  flex: 0 0 auto;
  width: 0.36rem;
  height: 0.36rem;
  margin-right: 0.18rem;
  border-radius: 50%;
  border: 1.5px solid #c3d3e4;
  position: relative;
  background: #fff;
}

.radio-dot::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.18rem;
  height: 0.18rem;
  border-radius: 50%;
  background: var(--c-blue);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.15s ease;
}

.radio-item.is-checked {
  border-color: var(--c-blue);
  background: #edf5fd;
}

.radio-item.is-checked .radio-dot {
  border-color: var(--c-blue);
}

.radio-item.is-checked .radio-dot::after {
  transform: translate(-50%, -50%) scale(1);
}

/* ========== 6. 城市选择弹层 ========== */
.sheet-area .sheet-head {
  justify-content: space-between;
  padding: 0 0.28rem;
}

.sheet-area .sheet-head h2 {
  font-size: 0.3rem;
}

.sheet-cancel,
.sheet-ok {
  font-size: 0.28rem;
  padding: 0 0.1rem;
  height: 1.08rem;
  line-height: 1.08rem;
}

.sheet-cancel {
  color: var(--c-text-sub);
}

.sheet-ok {
  color: var(--c-blue);
  font-weight: 600;
}

.sheet-ok[disabled] {
  color: #b9c9da;
}

.area-cols {
  display: flex;
  height: 8rem;
  max-height: 56vh;
  border-top: 0;
}

.area-col {
  flex: 1 1 50%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(0.2rem + env(safe-area-inset-bottom));
}

.area-col + .area-col {
  border-left: 1px solid #f1f5f9;
}

.area-item {
  padding: 0 0.24rem;
  height: 0.86rem;
  line-height: 0.86rem;
  font-size: 0.28rem;
  color: var(--c-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.area-item.is-active {
  color: var(--c-blue);
  font-weight: 600;
  background: #f0f7fe;
}

.area-empty {
  padding: 0.6rem 0.2rem;
  text-align: center;
  font-size: 0.26rem;
  color: #a9bacd;
}

/* ========== 7. 二维码渲染兜底 ========== */
.qrcode-error {
  font-size: 0.24rem;
  color: var(--c-text-sub);
  text-align: center;
  padding: 0.6rem 0.1rem;
}
