/* ========== 全局设计语言：浅色科技 + 玻璃拟态 ========== */
:root {
  --primary: #2563eb;
  --primary-2: #06b6d4;
  --accent: #7c3aed;
  --ink: #0f2247;
  --ink-2: #51638a;
  --ink-3: #8a98b8;
  --bg: #eef3fb;
  --card: rgba(255, 255, 255, .72);
  --card-solid: #ffffff;
  --line: rgba(37, 99, 235, .12);
  --ok: #10b981;
  --warn: #f59e0b;
  --err: #ef4444;
  --radius: 18px;
  --shadow: 0 18px 50px -18px rgba(37, 99, 235, .35);
  --shadow-sm: 0 8px 24px -12px rgba(15, 34, 71, .25);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(6, 182, 212, .18), transparent 60%),
    radial-gradient(900px 700px at -10% 110%, rgba(124, 58, 237, .14), transparent 60%),
    linear-gradient(160deg, #f4f8ff 0%, #eaf1fb 45%, #f0f7ff 100%);
  background-attachment: fixed;
  min-height: 100vh;
  touch-action: manipulation;
}
button { font-family: inherit; cursor: pointer; border: none; }
input, textarea, select { font-family: inherit; }
a { color: inherit; text-decoration: none; }

/* 玻璃卡片 */
.glass {
  background: var(--card);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* 主按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px 18px; border-radius: 14px;
  font-size: 15px; font-weight: 600; color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--primary-2));
  box-shadow: 0 12px 26px -10px rgba(37, 99, 235, .55);
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.ghost {
  background: rgba(37, 99, 235, .08); color: var(--primary);
  box-shadow: none; border: 1px solid var(--line);
}
.btn.danger { background: linear-gradient(120deg, #ef4444, #f97316); box-shadow: 0 12px 26px -10px rgba(239, 68, 68, .5); }
.btn.sm { width: auto; padding: 8px 14px; font-size: 13px; border-radius: 10px; }

/* 表单 */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 7px; font-weight: 600; }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 15px; font-size: 16px; color: var(--ink);
  background: rgba(255, 255, 255, .85);
  border: 1.5px solid var(--line); border-radius: 13px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}
.field textarea { resize: none; min-height: 92px; }

/* 徽章 */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.ok { background: rgba(16, 185, 129, .12); color: #059669; }
.badge.wait { background: rgba(245, 158, 11, .14); color: #d97706; }
.badge.err { background: rgba(239, 68, 68, .12); color: #dc2626; }
.badge.blue { background: rgba(37, 99, 235, .12); color: var(--primary); }
.badge.gray { background: rgba(138, 152, 184, .16); color: var(--ink-2); }

/* Toast */
#toast-wrap { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
  padding: 12px 22px; border-radius: 12px; font-size: 14px; font-weight: 600; color: #fff;
  box-shadow: var(--shadow); animation: toastIn .3s cubic-bezier(.2, .9, .3, 1.3);
  max-width: 88vw;
}
.toast.ok { background: linear-gradient(120deg, #10b981, #06b6d4); }
.toast.err { background: linear-gradient(120deg, #ef4444, #f97316); }
.toast.info { background: linear-gradient(120deg, #2563eb, #7c3aed); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-16px) scale(.92); } to { opacity: 1; transform: none; } }

/* 弹窗 / 底部抽屉 */
.mask { position: fixed; inset: 0; background: rgba(15, 34, 71, .4); backdrop-filter: blur(4px); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; padding-bottom: calc(20px + env(safe-area-inset-bottom)); animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0; } }
.sheet {
  width: 100%; max-width: 420px; max-height: 86vh; max-height: 86dvh; overflow-y: auto;
  background: #fff; border-radius: 22px; padding: 22px;
  animation: sheetUp .28s cubic-bezier(.2, .9, .3, 1.15);
}
@keyframes sheetUp { from { transform: translateY(40px) scale(.96); opacity: 0; } to { opacity: 1; transform: none; } }
.modal {
  background: #fff; border-radius: 20px; padding: 26px; width: 100%; max-width: 460px;
  max-height: 86vh; overflow-y: auto; animation: sheetUp .25s;
}
.modal h3 { margin-bottom: 14px; font-size: 18px; }

/* 页脚（主办方与技术支持信息） */
.page-footer { text-align: center; font-size: 11.5px; color: var(--ink-3); line-height: 1.9; padding: 20px 16px 8px; }
.page-footer a { color: var(--ink-3); text-decoration: none; }
.page-footer a:hover { color: var(--primary); }
/* 备案信息行 */
.gov-records { margin-top: 8px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 16px; }
.gov-records img { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }

/* 空状态 */
.empty { text-align: center; padding: 48px 20px; color: var(--ink-3); font-size: 14px; }
.empty .emoji { font-size: 42px; display: block; margin-bottom: 10px; }

/* 进度条 */
.progress { height: 8px; border-radius: 99px; background: rgba(37, 99, 235, .1); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--primary), var(--primary-2)); transition: width .6s cubic-bezier(.2,.9,.3,1); }

/* 骨架闪光 */
@keyframes shimmer { 0% { background-position: -300px 0; } 100% { background-position: 300px 0; } }

/* 手机端容器（桌面访问时居中呈现手机画幅） */
.phone-shell { width: 100%; max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; position: relative; }
@media (min-width: 520px) {
  .phone-shell { margin: 22px auto; min-height: calc(100vh - 44px); border-radius: 30px; overflow: hidden; box-shadow: 0 40px 90px -30px rgba(15, 34, 71, .45); background: rgba(255,255,255,.5); }
}
