/* ==========================================================
   学习班报名 · 样式
   ========================================================== */

:root {
  --ink: #232a26;
  --muted: #707a73;
  --green-900: #0e3a30;
  --green-800: #14483b;
  --green-700: #1c5a4a;
  --green-600: #266d59;
  --green-500: #2f7d68;
  --green-tint: #e9f2ee;
  --gold: #b8894a;
  --paper: #f4f0e7;
  --card: #fffdf9;
  --line: #e6e0d3;
  --line-strong: #d8d1c1;
  --danger: #b0452f;
  --danger-tint: #fbecea;
  --shadow-sm: 0 2px 8px rgba(20, 56, 46, 0.06);
  --shadow-md: 0 12px 34px rgba(20, 56, 46, 0.12);
  --radius: 16px;
  --font: "PingFang SC", "HarmonyOS Sans SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: #e8e2d4;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: 16px;
  color: inherit;
}

.page {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--paper);
  box-shadow: 0 0 60px rgba(20, 56, 46, 0.14);
  padding-bottom: 110px;
  overflow: hidden;
}

.page.is-done { padding-bottom: 28px; }

/* ---------------- 顶部 ---------------- */

.hero {
  position: relative;
  padding: calc(34px + env(safe-area-inset-top)) 24px 52px;
  background: linear-gradient(158deg, #0f3d33 0%, #1a5546 52%, #24695a 100%);
  color: #fff;
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero__glow--a {
  width: 260px;
  height: 260px;
  top: -130px;
  right: -70px;
  background: radial-gradient(circle, rgba(216, 178, 110, 0.32), transparent 68%);
}

.hero__glow--b {
  width: 320px;
  height: 320px;
  bottom: -230px;
  left: -110px;
  background: radial-gradient(circle, rgba(120, 200, 170, 0.22), transparent 70%);
}

.hero__inner { position: relative; z-index: 1; max-width: 460px; margin: 0 auto; }


.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.72);
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 137, 74, 0.22);
}

.hero__title {
  margin: 0 0 8px;
  font-size: 27px;
  line-height: 1.3;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-wrap: balance;
}

.hero__sub {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.76);
  max-width: 30em;
  text-wrap: pretty;
}

.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.9);
}

.chip strong { font-weight: 650; color: #fff; }

.chip--gold { background: rgba(184, 137, 74, 0.22); border-color: rgba(216, 178, 110, 0.35); }

.chip--share {
  background: transparent;
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.72);
}

/* ---------------- 卡片 ---------------- */

.sheet {
  position: relative;
  margin: -30px 12px 0;
  padding: 22px 18px 10px;
  background: var(--card);
  border-radius: 22px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.notice {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: #f6f1e4;
  border: 1px solid #ece2c9;
}

.notice p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: #6d5a35;
  white-space: pre-wrap;
}

.notice__icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  font-style: italic;
  line-height: 18px;
  text-align: center;
  font-family: Georgia, serif;
}

.banner {
  padding: 12px 14px;
  margin-bottom: 16px;
  border-radius: 12px;
  font-size: 14px;
  background: #f3f0e8;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  text-align: center;
}

.banner--closed {
  background: var(--danger-tint);
  border: 1px solid #f0d3cc;
  color: var(--danger);
  font-weight: 600;
}

.draft-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #eef4ef;
  border: 1px solid #d8e5db;
  color: #3d6355;
  font-size: 13px;
  line-height: 1.5;
}

.draft-bar button {
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #c3d6c9;
  background: #fff;
  color: #3d6355;
  font-size: 12.5px;
  font-weight: 600;
}

/* ---------------- 表单 ---------------- */

.form { display: block; }

.field {
  margin-bottom: 20px;
}

.field__label {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 600;
  color: #2b332e;
  letter-spacing: 0.01em;
}

.field__req {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 6px;
  background: #fbeee9;
  color: #b4492e;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
}

.field__optional {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 6px;
  background: #f3f2ec;
  font-size: 12px;
  font-weight: 400;
  color: #9a9d95;
}

.field__help {
  margin: 0 0 8px;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
}

.input,
.textarea,
.select {
  display: block;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffefb;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
  appearance: none;
  -webkit-appearance: none;
}

.input::placeholder,
.textarea::placeholder {
  color: #b6b3a8;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--green-500);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(47, 125, 104, 0.13);
}

.textarea {
  min-height: 104px;
  resize: vertical;
}

.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1.5 7 7.5 13 1.5' fill='none' stroke='%23707a73' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  color: var(--ink);
}

.select:invalid { color: #b6b3a8; }

.field.is-error .input,
.field.is-error .textarea,
.field.is-error .select {
  border-color: var(--danger);
  background: #fffafa;
  box-shadow: 0 0 0 3px rgba(176, 69, 47, 0.1);
}

.field__error {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--danger);
  display: flex;
  align-items: center;
  gap: 4px;
}

.field__error::before {
  content: "!";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  flex: 0 0 auto;
}

/* 选项胶囊 */
.options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.opt {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffefb;
  color: #4b524c;
  font-size: 15px;
  cursor: pointer;
  user-select: none;
  transition: all 0.16s ease;
  -webkit-tap-highlight-color: transparent;
}

.opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.opt:active { transform: scale(0.97); }

.opt.is-checked {
  border-color: var(--green-500);
  background: var(--green-tint);
  color: var(--green-800);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--green-500);
}

.opt--box { border-radius: 11px; }

.opt--box.is-checked::after {
  content: "✓";
  font-size: 12px;
  color: var(--green-600);
}

.field.is-error .opt { border-color: #e9c9c1; }

/* ---------------- 按钮 ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 14px;
  padding: 13px 22px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: scale(0.985); }

.btn--primary {
  background: linear-gradient(135deg, #1f6151, #2b7a63);
  color: #fff;
  box-shadow: 0 8px 20px rgba(31, 97, 81, 0.26);
}

.btn--primary:disabled {
  opacity: 0.6;
  box-shadow: none;
}

.btn--ghost {
  background: transparent;
  color: var(--green-700);
  border: 1px solid var(--line-strong);
}

.btn--danger {
  background: var(--danger-tint);
  color: var(--danger);
  border: 1px solid #efd0c8;
}

.btn--block { width: 100%; }

/* ---------------- 底部提交 ---------------- */

.submit-bar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 560px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--paper) 62%, rgba(244, 240, 231, 0));
  z-index: 20;
  transition: transform 0.25s ease;
}

.submit-bar .btn {
  width: 100%;
  height: 52px;
  font-size: 16.5px;
  letter-spacing: 0.06em;
}

.privacy {
  margin: 18px 2px 6px;
  font-size: 12px;
  line-height: 1.6;
  color: #9b9d94;
  text-align: center;
}

/* ---------------- 骨架屏 ---------------- */

.skeleton { padding-top: 4px; }

.sk-line {
  height: 12px;
  width: 40%;
  border-radius: 6px;
  margin: 14px 0 10px;
  background: linear-gradient(90deg, #efeae0 25%, #f7f3ea 50%, #efeae0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

.sk-box {
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(90deg, #f2ede3 25%, #f9f5ed 50%, #f2ede3 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---------------- 成功页 ---------------- */

.success {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(14, 48, 40, 0.5);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: fadeIn 0.25s ease;
}

.success__card {
  width: 100%;
  max-width: 340px;
  background: var(--card);
  border-radius: 24px;
  padding: 32px 24px 22px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(10, 40, 33, 0.35);
  animation: pop 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.success__icon { margin: 0 auto 10px; width: 72px; height: 72px; }

.success__circle {
  stroke: var(--green-500);
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  animation: draw 0.6s ease forwards;
}

.success__check {
  stroke: var(--green-600);
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: draw 0.45s 0.35s ease forwards;
}

.success__title {
  margin: 4px 0 8px;
  font-size: 21px;
  font-weight: 650;
  color: var(--green-900);
}

.success__text {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  white-space: pre-wrap;
}

.success__no {
  margin: 0 0 20px;
  font-size: 13px;
  color: var(--muted);
}

.success__no strong {
  display: block;
  margin-top: 4px;
  font-size: 26px;
  letter-spacing: 0.12em;
  color: var(--green-800);
  font-variant-numeric: tabular-nums;
}

.success__actions {
  display: flex;
  gap: 10px;
}

.success__actions .btn { flex: 1; padding: 12px 10px; font-size: 14.5px; }

.success__hint {
  margin: 16px 0 0;
  font-size: 11.5px;
  color: #a5a79e;
}

/* 已报名面板 */

.done-panel {
  text-align: center;
  padding: 30px 12px 34px;
}

.done-panel__icon {
  width: 62px;
  height: 62px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--green-tint);
  color: var(--green-600);
  font-size: 30px;
  line-height: 62px;
  font-weight: 700;
}

.done-panel__icon--closed {
  background: #fdeeec;
  color: #c0392b;
}

.done-panel h2 {
  margin: 0 0 8px;
  font-size: 20px;
  color: var(--green-900);
}

.done-panel p {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--muted);
}

.done-panel strong {
  font-size: 19px;
  letter-spacing: 0.08em;
  color: var(--green-700);
}

.done-panel__hint { font-size: 12.5px !important; color: #a2a49c !important; }

.done-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 18px;
}

.done-panel .btn { margin-top: 18px; }
.done-panel__actions .btn { margin-top: 0; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop {
  from { opacity: 0; transform: translateY(14px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

/* ---------------- 轻提示 ---------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  z-index: 80;
  max-width: 86vw;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(28, 36, 31, 0.92);
  color: #fff;
  font-size: 13.5px;
  line-height: 1.5;
  text-align: center;
  animation: fadeIn 0.2s ease;
  pointer-events: none;
}

[hidden] { display: none !important; }

@media (min-width: 600px) {
  body { padding: 24px 0; }
  .page {
    border-radius: 28px;
    min-height: calc(100vh - 48px);
    overflow: visible;
  }
  .hero { border-radius: 28px 28px 0 0; }
  .success { border-radius: 28px; }
}

/* ---------------- 视频上传 ---------------- */
.upload {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.upload__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.upload__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px dashed var(--green-500);
  background: var(--green-tint);
  color: var(--green-800);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.upload__btn::before { content: "＋"; font-weight: 700; }
.upload__btn:active { background: #dcebe4; }
.upload__hint {
  font-size: 13px;
  color: var(--muted);
}
.upload__bar {
  position: relative;
  flex: 1 1 100%;
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.upload__bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green-600), var(--green-500));
  transition: width 0.2s ease;
}
.upload__preview {
  flex: 1 1 100%;
  border-radius: 14px;
  background: var(--paper);
  padding: 10px;
}
.upload__video {
  width: 100%;
  max-height: 280px;
  border-radius: 10px;
  background: #000;
  display: block;
}
.upload__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
  word-break: break-all;
}
.upload__ops { display: inline-flex; gap: 12px; flex: none; }
.upload__op {
  border: 0;
  background: none;
  padding: 4px 0;
  font-size: 13px;
  color: var(--green-700);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.upload__op--danger { color: var(--danger); }


.help-call {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 26px 0 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-size: 15px;
  color: var(--muted);
  text-decoration: none;
}

.help-call strong {
  font-size: 17px;
  color: var(--brand-700);
  letter-spacing: 0.02em;
}



.privacy--query {
  margin-top: 4px;
}
.privacy--query a {
  color: var(--green, #12443a);
  text-decoration: underline;
  text-underline-offset: 3px;
}


.banner--error {
  background: #fdeeec;
  color: #a33224;
  border: 1px solid #f3c6bd;
  margin-bottom: 14px;
  font-weight: 600;
  line-height: 1.6;
}


.banner--error .btn {
  margin-left: 10px;
  padding: 8px 14px;
  font-size: 14px;
  vertical-align: middle;
}


.hero__query {
  margin: 12px 0 0;
  font-size: 13.5px;
  font-weight: 400;
}

.hero__query a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.45);
  padding-bottom: 1px;
}


.candidate-box {
  margin: 20px 0 4px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}

.candidate {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
  cursor: pointer;
}

.candidate input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: #1f6b57;
  flex: 0 0 auto;
}
