/* Arcor - Navidad Regalo 落地页样式（按 390px 移动端实测值复刻） */
:root {
  --blue: #226eb1;
  --blue-deep: #1d5f99;
  --head-bg: #e9ecef;
  --head-fg: #0d6efd;
  --ink: #000;
  --page-max: 390px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  background: #f5f5f5;
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  font-size: 16px;
  line-height: 24px;
}

img { border: 0; vertical-align: middle; }

.page {
  position: relative;
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding-top: 58px;
  background: #fff;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---------- 顶部 logo 条（固定） ---------- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 58px;
  background: #fff;
  z-index: 99;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--page-max);
  height: 100%;
  margin: 0 auto;
  padding: 8px;
}

.logo-cell {
  display: flex;
  align-items: center;
  flex: 1 1 0;
  min-width: 0;
}

.logo-cell.is-center { justify-content: center; }
.logo-cell.is-right { justify-content: flex-end; }

.logo-cell img { display: block; width: 40px; height: 40px; }
.logo-cell img.logo-brand { width: 59px; height: 40px; }

/* ---------- 蓝色标题条 ---------- */
.titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px;
  min-height: 34px;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  line-height: 18px;
}

.titlebar-left {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.titlebar-date { flex: 0 0 auto; white-space: nowrap; }

/* ---------- 主内容 ---------- */
.content { padding: 8px; }

.card {
  display: flex;
  flex-direction: column;
  padding: 8px;
}

.stage { display: flex; flex-direction: column; padding: 8px; }
.stage[hidden] { display: none; }

.h2 {
  font-size: 24px;
  line-height: 1.2;
  font-weight: 700;
  margin: 0 0 8px;
}

.brand {
  font-size: 16px;
  line-height: 24px;
  margin: 0 0 12px;
}

.desc {
  font-size: 16px;
  line-height: 24px;
  margin: 0 0 12px;
}

.hero {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* ---------- 问卷 ---------- */
.quiz {
  display: flex;
  flex-direction: column;
  padding: 8px;
}

.q-text {
  font-size: 16px;
  line-height: 24px;
  margin: 0 0 12px;
}

.q-index { font-weight: 700; }

.q-options { display: flex; flex-direction: column; }

.opt {
  display: block;
  width: 90%;
  min-height: 40px;
  margin: 0 auto 12px;
  padding: 4.4px 12px;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-size: 16px;
  line-height: 24px;
  text-align: center;
  border: 2px solid #f0f0f0;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .74);
  cursor: pointer;
  user-select: none;
  transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.opt:active { background: var(--blue-deep); }

/* ---------- 校验 ---------- */
.verify-title { margin: 0 0 12px; line-height: 36px; }

.spinner {
  width: 43px;
  height: 43px;
  margin: 24px auto;
  border: 4px solid #e6e9ef;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spinloader 2s linear infinite;
}

@keyframes spinloader { to { transform: rotate(360deg); } }

.verify-line {
  font-size: 13.6px;
  line-height: 20.4px;
  margin: 0 0 12px;
}

.verify-line[hidden] { display: none; }

/* ---------- 礼盒 ---------- */
.boxes {
  display: grid;
  grid-template-columns: repeat(3, 96px);
  gap: 27px 19px;
  justify-content: center;
  padding: 8px 0 4px;
}

.box {
  position: relative;
  width: 96px;
  height: 69px;
  cursor: pointer;
  transition: transform .2s ease-in-out;
}

.box:active { transform: scale(.94); }

.box img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.box .box-trophy {
  left: 50%;
  top: 50%;
  width: 45px;
  height: 33px;
  transform: translate(-50%, -50%);
}

.box.is-open .box-trophy { animation: pop .35s ease-out; }

@keyframes pop {
  0% { transform: translate(-50%, -50%) scale(.4); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* ---------- 领奖 ---------- */
.gift-prize {
  font-size: 16px;
  line-height: 24px;
  margin: 0 0 12px;
}

.gift-steps {
  margin: 0 0 16px;
  padding-left: 22px;
  font-size: 16px;
  line-height: 24px;
}

.gift-steps li { margin: 0 0 8px; }

.wa-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  background: #25d366;
  color: #fff;
  font: inherit;
  font-size: 16px;
  line-height: 24px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.wa-btn:active { background: #1eb257; }

.gift-note {
  margin: 16px 0 8px;
  font-size: 16px;
  line-height: 24px;
  text-align: center;
}

.bar-wrap {
  height: 12px;
  background: #e9ecef;
  border-radius: 6px;
  overflow: hidden;
}

.bar {
  width: 0;
  height: 100%;
  background: var(--blue);
  border-radius: 6px;
  transition: width .3s ease-in-out;
}

.gift-count {
  margin: 8px 0 16px;
  font-size: 16px;
  line-height: 24px;
  text-align: center;
}

.btn-continue {
  display: block;
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  background: var(--blue);
  color: #fff;
  font-size: 16px;
  line-height: 24px;
  text-align: center;
  text-decoration: none;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.btn-continue:active { background: var(--blue-deep); }

/* ---------- 评论 ---------- */
.comments { padding: 16px; }

.comments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 8px;
  margin: 0 0 12px;
  background: var(--head-bg);
  color: var(--head-fg);
  font-size: 16px;
  line-height: 24px;
}

.comments-head-cell { display: flex; flex: 1 1 0; align-items: center; }
.comments-head-cell.is-right { justify-content: flex-end; }

.comment {
  display: flex;
  margin: 0 0 13px;
}

.comment-avatar {
  flex: 0 0 60px;
  width: 60px;
  height: 59px;
  display: flex;
  align-items: flex-start;
}

.comment-avatar img { display: block; width: 59px; height: 59px; }

.comment-body {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 8px;
}

.comment-name {
  font-size: 13.6px;
  line-height: 20.4px;
  font-weight: 700;
  margin: 0 0 12px;
}

.comment-text {
  font-size: 13.6px;
  line-height: 20.4px;
  margin: 0 0 12px;
}

.comment-meta {
  display: flex;
  align-items: center;
  margin: 0 0 12px;
}

.comment-meta svg { display: block; width: 14px; height: 14px; fill: none; stroke: #000; }

.comment-meta .meta-dislike { margin-left: 19.2px; }

.comment-time {
  margin-left: 48px;
  font-size: 16px;
  line-height: 24px;
}

.comment-time span {
  font-size: 13.6px;
  line-height: 20.4px;
}

/* ---------- 页脚 ---------- */
.foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px;
  background: var(--blue);
  color: #fff;
}

.foot div { font-size: 13.6px; line-height: 20.4px; text-align: center; }

/* ---------- 弹窗 ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 19.5px;
  background: rgba(0, 0, 0, .4);
}

.modal[hidden] { display: none; }

.modal-card {
  width: 351px;
  max-width: 100%;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 24px 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 16px 0 rgba(0, 0, 0, .15);
}

.modal-img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto 16px;
}

.modal-img.is-trophy {
  width: 275px;
  max-width: 100%;
}

.modal-card h3 {
  margin: 0 0 16px;
  padding: 12px 24px 0;
  color: #1f2937;
  font-size: 24px;
  line-height: 28.8px;
  font-weight: 600;
  text-align: center;
}

.modal-body {
  margin: 0 0 8px;
  padding: 8px 24px;
  font-size: 16px;
  line-height: 24px;
  text-align: center;
}

.modal-body p { margin: 0 0 12px; }
.modal-body p:last-child { margin-bottom: 0; }
.modal-body .modal-note { font-weight: 700; }

.btn-ok {
  display: block;
  width: calc(100% - 48px);
  min-height: 38px;
  margin: 0 auto;
  padding: 10px 20px;
  background: var(--blue);
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: normal;
  text-align: center;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  transition: background .2s;
}

.btn-ok:active { background: var(--blue-deep); }

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 6s; }
  .bar, .box, .opt, .btn-ok { transition: none; }
}
