/* ==========================================================================
   超级少年寒假营 · 报名与收费
   风格：与 super.boyaqijing.com 一致 —— 水泥灰底 + 黑色大字 + 唯一强调色橙
   移动优先；断点：平板 ≥ 640px，电脑 ≥ 1024px
   ========================================================================== */
:root {
  --paper: #e6e6e3;
  --paper-hi: #f1f1ee;      /* 输入框 / 浮层 */
  --ink: #000;
  --muted: #6a6a66;
  --rule: #cacac5;
  --signal: #ff5a00;        /* 唯一强调色 */
  --signal-weak: #f7b38c;
  --signal-deep: #c24400;
  --signal-tint: rgba(255, 90, 0, 0.12);
  --turn-muted: #5a2400;    /* 橙底上的弱化文字 */
  --danger: #c4231a;
  --danger-tint: rgba(196, 35, 26, 0.08);
  --radius: 6px;
  --gutter: 22px;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --num: "DIN Condensed", "Bahnschrift Condensed", "Roboto Condensed", "Arial Narrow", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
/* 细网格：下方清晰、向上淡出 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.045) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(to top, #000 15%, transparent 80%);
  mask-image: linear-gradient(to top, #000 15%, transparent 80%);
}
/* 右下角橙色柔光 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: radial-gradient(ellipse 80% 40% at 92% 100%, rgba(255, 90, 0, 0.13), transparent 70%);
}
a { color: var(--ink); }
h1, h2, h3, p { margin: 0; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 布局 ---------- */
.wrap {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) var(--gutter) calc(40px + env(safe-area-inset-bottom));
}
.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 26px;
}
.brand { color: var(--ink); font-size: 15px; font-weight: 700; letter-spacing: 0.08em; text-decoration: none; }
.brand span { margin-left: 8px; color: var(--muted); font-weight: 400; letter-spacing: 0; font-size: 13px; }
.toplink { color: var(--muted); font-size: 13px; text-decoration: none; padding: 4px 0; }
.toplink:hover { color: var(--ink); }

/* 胶囊标签（同参考站「9–18 岁」） */
.kicker {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 99px;
  background: var(--signal-tint);
  color: var(--signal-deep);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.bar { display: block; width: 32px; height: 3px; background: var(--signal); margin: 18px 0; }
.section-label { font-size: 13px; color: var(--muted); letter-spacing: 0.08em; margin-bottom: 12px; }

/* 引言块：左侧橙色竖线 */
.lead-block { padding-left: 14px; border-left: 3px solid var(--signal); color: var(--muted); font-size: 14px; line-height: 1.8; }
.lead-block b { display: block; color: var(--ink); font-size: 16px; font-weight: 600; margin-bottom: 4px; }

/* ---------- 区块（扁平：顶部黑线代替卡片） ---------- */
.card { border-top: 2px solid var(--ink); padding: 18px 0 6px; }
.card + .card { margin-top: 30px; }
.card-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.card-title h2 { font-size: 20px; font-weight: 800; }
.card-title span { color: var(--muted); font-size: 13px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 12px 22px;
  border: 1.5px solid var(--signal);
  border-radius: var(--radius);
  background: var(--signal);
  color: var(--ink);
  font: 700 17px/1.2 var(--sans);
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s, opacity 0.15s;
}
.btn:hover { background: #ff6d1f; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn.dark { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn.dark:hover { background: #222; }
.btn.quiet, .btn.ghost { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn.quiet:hover, .btn.ghost:hover { background: rgba(0, 0, 0, 0.06); }
.btn.danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn.danger:hover { background: var(--danger-tint); }
.btn.sm { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.btn .arrow { font-weight: 400; }

/* ---------- 表单 ---------- */
.field { display: block; margin-bottom: 20px; }
.field > .label { display: block; font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 8px; line-height: 1.5; }
.field > .label b, .req { color: var(--signal); font-weight: 700; }
.field small, .hint { display: block; color: var(--muted); font-size: 13px; font-weight: 400; margin: -4px 0 8px; }
.field .num { font-family: var(--num); font-weight: 700; font-size: 19px; color: var(--signal); margin-right: 6px; vertical-align: -1px; }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper-hi);
  color: var(--ink);
  font: 16px/1.5 var(--sans); /* ≥16px：防止 iOS 聚焦放大 */
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
select {
  padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 20px) 22px, calc(100% - 15px) 22px;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
select:invalid { color: #8f8f8a; }
select option { color: var(--ink); }
textarea { min-height: 108px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #9a9a95; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); background-color: #f7f7f5; box-shadow: 0 0 0 3px rgba(255, 90, 0, 0.22); }
.field.invalid input:not(.extra), .field.invalid select, .field.invalid textarea { border-color: var(--danger); background-color: #f6ecea; }
.field .err { display: none; color: var(--danger); font-size: 13px; margin-top: 6px; }
.field.invalid .err { display: block; }
.field .extra { margin-top: 8px; }
.counter { float: right; color: #9a9a95; font: 400 14px var(--num); margin-top: 3px; }

.agree {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
}
.agree input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--signal); flex: none; }
.agree.invalid { border-color: var(--danger); color: var(--danger); }

.form-error { color: var(--danger); font-size: 14px; min-height: 20px; margin: 12px 0; }
.form-error:empty { margin: 4px 0; }

/* ---------- 首页：一屏显示 ---------- */
.home {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1280px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) var(--gutter) 0;
}
.home .topbar { margin-bottom: clamp(12px, 3vh, 36px); }
.home-body { flex: 1; display: flex; flex-direction: column; }

/* 字号同时受屏宽和屏高约束，矮屏手机也能一屏放下 */
.hero h1 { margin: clamp(8px, 1.8vh, 18px) 0 0; line-height: 1.05; }
.hero .name { display: block; font-size: min(17vw, 9vh, 104px); font-weight: 800; letter-spacing: 0.01em; }
.hero .sub { display: block; margin-top: clamp(4px, 1vh, 10px); font-size: min(6.2vw, 3.6vh, 34px); font-weight: 400; color: var(--muted); letter-spacing: 0.5em; }
.hero .bar { margin: clamp(10px, 2.2vh, 20px) 0; }
.hero .slogan { font-size: min(4.8vw, 2.7vh, 22px); font-weight: 700; line-height: 1.6; }

/* 成长柱：三步报名流程 */
.growth { margin: clamp(14px, 3.5vh, 44px) 0 clamp(16px, 3vh, 32px); }
.growth-bars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-items: end; height: clamp(110px, 24vh, 240px); padding-top: 34px; border-bottom: 1.5px solid var(--ink); }
.growth-bars i { position: relative; display: block; height: var(--h); border-radius: 6px 6px 0 0; background: var(--signal-weak); transform-origin: bottom; animation: grow 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: calc(var(--i) * 0.15s + 0.2s); }
.growth-bars i.top { background: var(--signal); box-shadow: 0 0 40px rgba(255, 90, 0, 0.35); }
.growth-bars i.top::before { content: ""; position: absolute; left: 50%; top: -30px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 7px rgba(255, 90, 0, 0.2); }
.growth-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; list-style: none; margin: 10px 0 0; padding: 0; text-align: center; }
.growth-steps li b { display: block; font-size: 14px; font-weight: 700; }
.growth-steps li span { display: block; color: var(--muted); font-size: 12px; line-height: 1.5; margin-top: 2px; }
.growth-steps li:last-child b { color: var(--signal-deep); }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* 报名条：橙色，手机上贴底通栏 */
.enroll {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 16px;
  margin: auto calc(var(--gutter) * -1) 0;
  padding: 16px var(--gutter) calc(16px + env(safe-area-inset-bottom));
  background: var(--signal);
  color: var(--ink);
}
.enroll-price span { display: block; font-size: 13px; font-weight: 600; color: var(--turn-muted); }
.price { font-family: var(--num); font-size: clamp(40px, 11vw, 60px); font-weight: 700; line-height: 1; letter-spacing: 0; }
.price small { font-family: var(--sans); font-size: 14px; font-weight: 600; color: var(--turn-muted); margin-left: 4px; }
.price.tbd { font-family: var(--sans); font-size: 22px; font-weight: 800; }
.price-ph { display: inline-block; width: 3em; height: 0.62em; margin-left: 4px; border-radius: 4px; background: rgba(0, 0, 0, 0.12); vertical-align: 0.05em; }
.enroll .btn { min-width: 132px; background: var(--ink); border-color: var(--ink); color: var(--paper); }
.enroll .btn:hover { background: #222; }
.enroll .btn.is-disabled { opacity: 0.45; pointer-events: none; }
.closed-note { grid-column: 1 / -1; margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--turn-muted); }

/* ---------- 进度：圆点连线（同参考站时间轴） ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 26px; padding: 0; list-style: none; text-align: center; font-size: 13px; color: var(--muted); }
.steps li { position: relative; padding-top: 26px; }
.steps li::before { content: ""; position: absolute; top: 4px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--rule); z-index: 1; }
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 8px; left: 50%; width: 100%; height: 2px; background: var(--rule); }
.steps li.done, .steps li.cur { color: var(--ink); }
.steps li.done::before, .steps li.cur::before { background: var(--signal); }
.steps li.done::after { background: var(--signal) !important; }
.steps li.cur { font-weight: 700; }
.steps li.cur::before { width: 14px; height: 14px; top: 2px; margin-left: -7px; box-shadow: 0 0 0 6px rgba(255, 90, 0, 0.2); }

/* ---------- 报名页 ---------- */
.page-title h1 { font-size: clamp(30px, 8vw, 40px); font-weight: 800; line-height: 1.2; }
.page-title p { color: var(--muted); font-size: 14px; margin-top: 8px; }
.summary { margin: 0 0 24px; border-top: 1px solid var(--rule); }
.summary .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 15px; font-weight: 600; }
.summary .row strong { font-family: var(--num); font-size: 28px; font-weight: 700; line-height: 1; }
.summary .row strong.hl { color: var(--signal); }
.notice { margin-bottom: 34px; }
.info-grid { display: grid; gap: 0 18px; }
.form-actions .btn { width: 100%; }
.after-note { margin-top: 12px; text-align: center; color: var(--muted); font-size: 13px; }

/* ---------- 支付页 ---------- */
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 99px; font-size: 13px; font-weight: 700; background: rgba(0, 0, 0, 0.07); color: var(--muted); white-space: nowrap; }
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pill.pending { background: var(--signal-tint); color: var(--signal-deep); }
.status-pill.paid { background: var(--ink); color: var(--paper); }
.status-pill.paid::before { background: var(--signal); }

.order-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.order-id { color: var(--muted); font: 13px var(--mono); }
.kv { display: grid; grid-template-columns: 84px 1fr; margin: 0; font-size: 15px; }
.kv dt, .kv dd { padding: 11px 0; border-bottom: 1px solid var(--rule); }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); font-weight: 600; word-break: break-all; }
.amount-row { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 0 4px; }
.amount-row span { font-size: 15px; font-weight: 600; }
.amount-row strong { font-family: var(--num); font-size: 52px; font-weight: 700; line-height: 1; color: var(--signal); }
.amount-row strong small { font-size: 24px; margin-right: 2px; }
.countdown { margin-top: 14px; padding: 8px 0 8px 12px; border-left: 3px solid var(--signal); color: var(--signal-deep); font-size: 14px; }
.countdown.expired { border-color: var(--danger); color: var(--danger); }
.pay-box { display: grid; gap: 12px; }
.pay-method { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper-hi); }
.wx-icon { width: 36px; height: 36px; flex: none; border-radius: 8px; background: #07c160; display: grid; place-items: center; }
.wx-icon svg { width: 22px; height: 22px; }
.pay-method b { display: block; font-size: 16px; }
.pay-method span { color: var(--muted); font-size: 13px; }
.pay-tip { color: var(--muted); font-size: 13px; text-align: center; line-height: 1.75; margin-top: 4px; }
.qr-box { display: grid; justify-items: center; gap: 12px; padding: 20px 14px; border-radius: var(--radius); background: #fff; text-align: center; }
.qr-box img { width: 220px; height: 220px; image-rendering: pixelated; }
.qr-box p { font-size: 14px; color: #333; line-height: 1.7; }
.qr-box b { color: var(--signal-deep); }

.result { text-align: center; padding: 36px 0 30px; }
.result .mark { width: 72px; height: 72px; margin: 0 auto 20px; border-radius: 50%; display: grid; place-items: center; font-size: 34px; font-weight: 700; background: var(--signal); color: var(--ink); box-shadow: 0 0 0 10px rgba(255, 90, 0, 0.16); }
.result.muted .mark { background: var(--rule); color: var(--muted); box-shadow: none; }
.result h2 { font-size: 28px; font-weight: 800; }
.result p { color: var(--muted); font-size: 15px; margin: 12px auto 0; line-height: 1.8; max-width: 460px; }
.result .kv { max-width: 460px; margin: 26px auto 0; text-align: left; border-top: 1px solid var(--rule); }
.result .btn { margin-top: 26px; }

.loading { text-align: center; color: var(--muted); padding: 70px 0; }
.spinner { width: 28px; height: 28px; margin: 0 auto 12px; border: 3px solid var(--rule); border-top-color: var(--signal); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.banner { padding: 10px 12px 10px 14px; border-left: 3px solid var(--signal); background: var(--signal-tint); color: var(--signal-deep); font-size: 14px; line-height: 1.65; margin-bottom: 16px; border-radius: 0 var(--radius) var(--radius) 0; }
.banner.err { border-color: var(--danger); background: var(--danger-tint); color: var(--danger); }
.banner.ok { border-color: var(--ink); background: rgba(0, 0, 0, 0.06); color: var(--ink); }

/* ---------- 查询页 ---------- */
.result-list { border-top: 1px solid var(--rule); margin-top: 26px; }
.result-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
.result-item:hover b { color: var(--signal-deep); }
.result-item b { display: block; font-size: 16px; }
.result-item small { color: var(--muted); font-size: 12px; font-family: var(--mono); }

/* ---------- 提示 ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); z-index: 100;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: calc(100% - 32px); padding: 11px 18px; border-radius: var(--radius);
  background: var(--ink); color: var(--paper); font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--danger); color: #fff; }

/* ---------- 平板 ---------- */
@media (min-width: 640px) {
  :root { --gutter: 32px; }
  .wrap { padding-top: max(28px, env(safe-area-inset-top)); }
  .info-grid { grid-template-columns: 1fr 1fr; }
  .enroll { margin: auto 0 clamp(24px, 4vh, 40px); padding: 22px 28px; border-radius: 10px; }
  .growth-bars, .growth-steps { gap: 16px; }
  .growth-bars { height: clamp(160px, 32vh, 400px); }
  .hero .name { font-size: min(17vw, 10vh, 140px); }
  .hero .sub { font-size: min(6.2vw, 4vh, 44px); }
  .form-actions { display: flex; justify-content: flex-end; }
  .form-actions .btn { width: auto; min-width: 260px; }
  .after-note { text-align: right; }
}

/* ---------- 电脑 ---------- */
@media (min-width: 1024px) {
  :root { --gutter: 56px; }
  .wrap.wide { max-width: 1280px; }
  .wrap.mid { max-width: 980px; }
  .home-body { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto; column-gap: clamp(48px, 6vw, 104px); padding-bottom: clamp(28px, 6vh, 64px); }
  .hero { grid-column: 1; grid-row: 1; align-self: center; }
  .hero .name { font-size: min(8.5vw, 13vh, 128px); }
  .hero .sub { font-size: min(2.8vw, 4.2vh, 40px); }
  .hero .slogan { font-size: min(1.8vw, 3vh, 24px); }
  .enroll { grid-column: 1; grid-row: 2; margin: 0; }
  .growth { grid-column: 2; grid-row: 1 / span 2; align-self: end; margin: 0; }
  .growth-bars { height: clamp(280px, 60vh, 560px); gap: 20px; }
  .growth-steps { gap: 20px; }
  .growth-steps li b { font-size: 16px; }
  .growth-steps li span { font-size: 13px; }
  .apply-grid { display: grid; grid-template-columns: 360px 1fr; gap: 64px; align-items: start; }
  .apply-grid > aside { position: sticky; top: 28px; }
  .apply-grid .steps { margin-bottom: 30px; }
  .pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
  .pay-grid .card + .card { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; }
}
