/* =========================================================
   妇转私一日实战营 · 桂林附二院专场 — 竖版签到页
   米白宣纸 / 深蓝紫 / 暖金 / 紫色兰花（无水墨）
   ========================================================= */

:root {
  --paper: #F6F0E6;
  --paper-light: #FFFDF8;
  --purple: #30235F;
  --purple-soft: rgba(48, 35, 95, .58);
  --purple-faint: rgba(48, 35, 95, .34);
  --orchid: #7B5EA7;
  --orchid-soft: #A98CC8;
  --gold: #C99A3D;
  --ink: #2A2438;
  --error: #9A4A4A;
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.page {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 1;
  transition: opacity .42s ease, transform .42s ease;
}

.page.is-leaving { opacity: 0; transform: scale(1.008); }

/* ---------- BackgroundArtwork ---------- */
.artwork {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 12%, rgba(123, 94, 167, .075), transparent 50%),
    radial-gradient(circle at 10% 88%, rgba(201, 154, 61, .055), transparent 48%),
    var(--paper);
}

/* 桌面端把装饰收进竖版画面内，保持竖版构图 */
@media (min-width: 700px) {
  .artwork {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 480px;
    box-shadow: 0 0 60px rgba(48, 35, 95, .05);
  }
}

.artwork__orchid {
  position: absolute;
  pointer-events: none;
}

.artwork__orchid--top {
  width: 290px;
  top: -46px;
  right: -64px;
  transform: rotate(6deg);
}

.artwork__orchid--bottom {
  width: 236px;
  bottom: -62px;
  left: -70px;
  transform: rotate(184deg);
}

.orchid-svg { display: block; width: 100%; height: 100%; }

/* 主视觉图替换：assets/hero.png 存在时隐藏 SVG */
.artwork__orchid.has-image .orchid-svg { display: none; }
.artwork__orchid.has-image {
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.artwork__ring {
  position: absolute;
  border: 1px solid rgba(201, 154, 61, .32);
  border-radius: 50%;
}

.artwork__ring--outer {
  width: 280px;
  height: 280px;
  top: 11%;
  right: -86px;
}

.artwork__ring--inner {
  width: 204px;
  height: 204px;
  top: calc(11% + 38px);
  right: -48px;
  border-color: rgba(201, 154, 61, .20);
}

.artwork__sun {
  position: absolute;
  width: 132px;
  height: 132px;
  top: calc(11% + 74px);
  right: -12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 154, 61, .16), rgba(201, 154, 61, .035) 62%, transparent 72%);
}

/* ---------- 竖版主体 ---------- */
.layout {
  position: relative;
  z-index: 1;
  width: min(100%, 480px);
  height: 100%;
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(22px, 4.2vh, 42px);
  transition: transform .25s ease;
}

/* 桌面端竖版画框 */
@media (min-width: 700px) {
  .layout {
    border-left: 1px solid rgba(201, 154, 61, .13);
    border-right: 1px solid rgba(201, 154, 61, .13);
  }
}

/* ---------- 活动信息 ---------- */
.brand {
  width: 100%;
  text-align: center;
}

.brand__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: clamp(16px, 2.8vh, 28px);
}

.brand__mark-line {
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.brand__mark-line:last-child {
  transform: rotate(180deg);
}

.brand__mark-text {
  font-size: 11px;
  letter-spacing: .3em;
  color: var(--purple-soft);
}

.brand__title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(40px, 11vw, 62px);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: .07em;
  color: var(--purple);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .55);
}

.brand__title-line { display: block; }

.brand__rule {
  width: 58px;
  height: 1px;
  margin: clamp(14px, 2.4vh, 22px) auto clamp(12px, 2vh, 18px);
  background: linear-gradient(90deg, rgba(201, 154, 61, .15), var(--gold), rgba(201, 154, 61, .15));
}

.brand__subtitle {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(21px, 5.6vw, 28px);
  font-weight: 500;
  letter-spacing: .16em;
  color: var(--purple);
}

.brand__desc {
  margin: clamp(12px, 2vh, 18px) 0 0;
  font-family: var(--serif);
  font-size: clamp(12px, 3.3vw, 15px);
  line-height: 1.7;
  letter-spacing: .09em;
  color: var(--purple-soft);
}

/* ---------- CheckinForm ---------- */
.card {
  width: 100%;
  padding: clamp(26px, 3.6vh, 36px) clamp(22px, 6vw, 32px) clamp(20px, 2.8vh, 28px);
  background: rgba(255, 253, 248, .90);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(201, 154, 61, .20);
  border-radius: 16px;
  box-shadow:
    0 18px 48px rgba(48, 35, 95, .10),
    0 2px 8px rgba(48, 35, 95, .035);
}

.card__header { text-align: center; }

.card__emblem {
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
}

.card__emblem svg { width: 100%; height: 100%; }

.card__title {
  margin: 0;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: .16em;
  color: var(--purple);
}

.card__subtitle {
  margin: 8px 0 clamp(20px, 3vh, 28px);
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--purple-faint);
}

.field { margin-bottom: 16px; }

.field__label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--purple);
}

.field__control { position: relative; }

.field__input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(48, 35, 95, .17);
  border-radius: 9px;
  outline: none;
  background: rgba(255, 255, 255, .76);
  color: var(--purple);
  font-family: var(--sans);
  font-size: 16px;
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}

.field__input::placeholder { color: rgba(48, 35, 95, .34); }
.field__input:hover { border-color: rgba(48, 35, 95, .28); }

.field__input:focus {
  border-color: rgba(201, 154, 61, .9);
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 0 0 3px rgba(201, 154, 61, .13);
}

.field.is-error .field__input {
  border-color: rgba(154, 74, 74, .6);
  box-shadow: 0 0 0 3px rgba(154, 74, 74, .07);
}

.field__error {
  min-height: 17px;
  margin: 5px 0 0 2px;
  font-size: 12px;
  line-height: 17px;
  color: var(--error);
  opacity: 0;
  transition: opacity .2s ease;
}

.field.is-error .field__error { opacity: 1; }

.form__notice {
  display: none;
  margin: -2px 0 14px;
  padding: 10px 12px;
  border-left: 2px solid rgba(154, 74, 74, .55);
  border-radius: 4px;
  background: rgba(154, 74, 74, .055);
  color: #8C4040;
  font-size: 12px;
  line-height: 1.6;
}

.form__notice.is-visible {
  display: block;
  animation: notice-in .28s ease both;
}

@keyframes notice-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.submit-btn {
  position: relative;
  width: 100%;
  height: 52px;
  margin-top: 2px;
  border: none;
  border-radius: 9px;
  background: var(--purple);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .14em;
  cursor: pointer;
  overflow: hidden;
  transition: background .25s ease, transform .2s ease, box-shadow .25s ease, opacity .2s ease;
}

.submit-btn:hover:not(:disabled) {
  background: #3B2C70;
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(48, 35, 95, .22);
}

.submit-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(48, 35, 95, .18);
}

.submit-btn:disabled { cursor: not-allowed; opacity: .78; }
.submit-btn__label { vertical-align: middle; }

.submit-btn__spinner {
  display: none;
  width: 15px;
  height: 15px;
  margin-left: 9px;
  vertical-align: middle;
  border: 2px solid rgba(246, 240, 230, .35);
  border-top-color: var(--paper);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.submit-btn.is-loading .submit-btn__spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.card__note {
  margin: 14px 0 0;
  text-align: center;
  font-size: 11px;
  letter-spacing: .08em;
  color: rgba(48, 35, 95, .38);
}

/* ---------- SuccessModal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility .35s ease;
}

.modal.is-open { opacity: 1; visibility: visible; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(246, 240, 230, .84);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal__panel {
  position: relative;
  width: min(390px, 88vw);
  padding: 42px 30px 34px;
  text-align: center;
  overflow: hidden;
  background: #FFFDF8;
  border: 1px solid rgba(201, 154, 61, .34);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(48, 35, 95, .18);
  transform: scale(.92) translateY(12px);
  opacity: 0;
  transition: transform .45s cubic-bezier(.2, .8, .25, 1), opacity .45s ease;
}

.modal.is-open .modal__panel {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal__halo {
  position: absolute;
  left: 50%;
  top: -70px;
  width: 260px;
  height: 260px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(201, 154, 61, .17), transparent 68%);
  pointer-events: none;
}

.modal__icon {
  position: relative;
  width: 66px;
  height: 66px;
  margin: 0 auto 18px;
  animation: icon-in .6s .1s ease both;
}

.modal__icon svg { width: 100%; height: 100%; }

@keyframes icon-in {
  from { opacity: 0; transform: scale(.7) rotate(-8deg); }
  to   { opacity: 1; transform: scale(1) rotate(0); }
}

.modal__title {
  position: relative;
  margin: 0;
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 600;
  letter-spacing: .18em;
  color: var(--purple);
}

.modal__welcome {
  position: relative;
  margin: 14px 0 0;
  font-size: 16px;
  letter-spacing: .06em;
  color: var(--purple);
}

.modal__welcome span { font-weight: 600; color: #A77B26; }

.modal__hint {
  position: relative;
  margin: 9px 0 0;
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--purple-faint);
}

.modal__progress {
  position: relative;
  height: 2px;
  margin: 24px 0 20px;
  border-radius: 2px;
  background: rgba(48, 35, 95, .08);
  overflow: hidden;
}

.modal__progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--gold);
}

.modal.is-open .modal__progress span {
  animation: progress-fill var(--progress-duration, 2000ms) linear forwards;
}

@keyframes progress-fill { to { width: 100%; } }

.modal__action {
  position: relative;
  height: 44px;
  padding: 0 28px;
  border: 1px solid rgba(48, 35, 95, .32);
  border-radius: 8px;
  background: transparent;
  color: var(--purple);
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: .12em;
  cursor: pointer;
  transition: border-color .25s ease, color .25s ease, background .25s ease;
}

.modal__action:hover {
  border-color: var(--gold);
  color: #A77B26;
  background: rgba(201, 154, 61, .06);
}

.modal__action:active { transform: translateY(1px); }

/* ---------- 小屏 / 矮屏适配 ---------- */
@media (max-height: 700px) {
  .layout { gap: 14px; padding: 14px 24px; }
  .brand__mark { margin-bottom: 10px; }
  .brand__title { font-size: clamp(34px, 9.5vw, 48px); }
  .brand__rule { margin: 10px auto 8px; }
  .brand__desc { margin-top: 8px; }
  .card { padding-top: 20px; padding-bottom: 18px; }
  .card__subtitle { margin-bottom: 14px; }
  .field { margin-bottom: 10px; }
  .field__input { height: 48px; }
  .submit-btn { height: 48px; }
  .artwork__orchid--top { width: 240px; top: -60px; }
}

/* 移动端软键盘弹起：整体上移，避免输入框被遮挡 */
body.keyboard-open .layout { transform: translateY(-58px); }
