/* 学生签合同的页面：手机优先（微信里打开最多），平板、电脑也一样能用 */
:root {
  --bg: #EEF4FB; --panel: #fff; --primary: #1E5FA8; --primary-soft: #E3ECFA; --text: #123049; --muted: #5B7086; --faint: #8A9BAE;
  --border: #CBDCEF; --ok: #1E7A34; --ok-soft: #E5F3E8; --bad: #B03A2E; --bad-soft: #F7E6E4; --warn: #B0790F; --warn-soft: #FBF0DD;
  --font: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom); }
h1, h2, h3, p { margin: 0; }
button { font-family: inherit; }
.top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: #fff; border-bottom: 1px solid #E1EAF4; position: sticky; top: 0; z-index: 5; }
.logo { height: 30px; width: auto; }
.top-tx { display: flex; flex-direction: column; line-height: 1.25; }
.top-tx b { font-size: 16px; }
.top-tx span { font-size: 12px; color: var(--muted); }
main { max-width: 860px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.card { background: var(--panel); border-radius: 14px; padding: 18px 16px; box-shadow: 0 1px 2px rgba(18, 48, 73, .05), 0 6px 16px rgba(18, 48, 73, .06); }
.center { text-align: center; }
.card h2 { font-size: 19px; margin-bottom: 6px; }
.card p { color: var(--muted); }
.big-ic { font-size: 44px; line-height: 1; margin-bottom: 10px; }
.spin { width: 30px; height: 30px; border: 3px solid var(--primary-soft); border-top-color: var(--primary); border-radius: 50%; margin: 10px auto; animation: sp 0.9s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
.btn { appearance: none; border: none; border-radius: 10px; padding: 12px 18px; font-size: 16px; font-weight: 700; cursor: pointer; min-height: 46px; }
.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:disabled { background: #B7C6D6; cursor: not-allowed; }
.btn.ghost { background: var(--primary-soft); color: var(--primary); }
.btn.block { width: 100%; }
.btn.small { padding: 8px 14px; font-size: 14px; min-height: 38px; }
.code-in { width: 100%; max-width: 260px; margin: 14px auto 6px; display: block; font-size: 28px; letter-spacing: 12px; text-align: center; padding: 10px;
  border: 2px solid var(--border); border-radius: 12px; outline: none; font-family: inherit; color: var(--text); background: #fff; }
.code-in.name { letter-spacing: 2px; font-size: 22px; }
.code-in:focus { border-color: var(--primary); }
.err { color: var(--bad); font-weight: 700; min-height: 24px; margin-top: 4px; }
.who { font-size: 15px; }
.who b { font-size: 17px; }
.steps { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; color: var(--muted); }
.steps span { background: #F2F6FB; border-radius: 999px; padding: 2px 10px; }
.steps .on { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.steps .done { background: var(--ok-soft); color: var(--ok); font-weight: 700; }
.tabs { display: flex; gap: 8px; overflow-x: auto; position: sticky; top: 55px; z-index: 4; background: var(--bg); padding: 6px 0; margin: -6px 0; }
.tab { flex: none; border: 1px solid var(--border); background: #fff; color: var(--muted); border-radius: 999px; padding: 7px 14px; font-size: 14px; font-weight: 700; cursor: pointer; }
.tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.tab .ck { margin-left: 4px; }
.pages { display: flex; flex-direction: column; gap: 10px; }
.pg { background: #fff; border-radius: 6px; box-shadow: 0 1px 4px rgba(18, 48, 73, .15); overflow: hidden; position: relative; }
.pg img { display: block; width: 100%; height: auto; min-height: 120px; background: #fff; }
.pg-no { position: absolute; right: 8px; bottom: 6px; font-size: 11px; color: var(--faint); background: rgba(255, 255, 255, .85); padding: 0 6px; border-radius: 6px; }
.read-tip { text-align: center; font-size: 13px; color: var(--muted); padding: 4px 0 2px; }
.read-tip.ok { color: var(--ok); font-weight: 700; }
.next-ct { margin-top: 4px; }
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.agree input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--primary); }
.agree.off { color: var(--faint); cursor: not-allowed; }
.todo { font-size: 13px; color: var(--warn); margin: 8px 0 0 32px; }
.bar { position: sticky; bottom: 0; z-index: 4; margin: 0 -16px; display: flex; align-items: center; gap: 10px; justify-content: space-between;
  background: #fff; border-top: 1px solid #E1EAF4; box-shadow: 0 -2px 10px rgba(18, 48, 73, .06); padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); font-size: 14px; color: var(--muted); }
.bar .btn { flex: none; }
@media (min-width: 700px) { .bar { margin: 0 -24px; padding-left: 24px; padding-right: 24px; } }
.preview-sig { background: #fff; border: 1px dashed var(--border); border-radius: 10px; padding: 10px; text-align: center; margin: 12px 0; }
.preview-sig img { max-width: 100%; max-height: 120px; }
.sum { font-size: 14px; color: var(--muted); margin: 8px 0 14px; }
.sum b { color: var(--text); }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row .btn { flex: 1 1 140px; }
.dl-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; text-align: left; }
.dl-it { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #E1EAF4; border-radius: 10px; }
.dl-it span { flex: 1; font-weight: 700; word-break: break-all; }
.dl-it a { text-decoration: none; }
.wx-tip { font-size: 13px; color: var(--warn); background: var(--warn-soft); border-radius: 10px; padding: 8px 12px; margin-top: 12px; text-align: left; }
.fine { font-size: 12px; color: var(--faint); text-align: center; }

/* 签字板（2026-11-01 质检：inset 老一点的 iOS / 安卓微信不认，写成 top/right/bottom/left） */
.pad { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 50; background: #fff; display: flex; flex-direction: column; touch-action: none; }
.pad[hidden] { display: none; }
.pad-head { padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top)); display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; border-bottom: 1px solid #E1EAF4; }
.pad-title { font-size: 16px; font-weight: 700; }
.pad-title em { font-style: normal; color: var(--primary); margin-left: 6px; }
.pad-rot { font-size: 13px; color: var(--muted); }
.pad-area { flex: 1; position: relative; background: #FCFDFE; }
.pad-area canvas { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.pad-line { position: absolute; left: 8%; right: 8%; bottom: 30%; border-bottom: 2px dashed #D5E0EC; pointer-events: none; }
.pad-hint { position: absolute; left: 0; right: 0; top: 40%; text-align: center; font-size: 28px; color: #D5E0EC; font-weight: 700; pointer-events: none; }
.pad-foot { display: flex; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid #E1EAF4; }
.pad-foot .btn { flex: 1; }
@media (orientation: landscape) { .pad-rot { display: none; } .pad-head { padding-top: 8px; padding-bottom: 8px; } }
@media (min-width: 700px) { main { padding: 24px; } .card { padding: 22px 24px; } }
