/* ============================================================
   电力系技术协会 · 招新 H5 样式
   ------------------------------------------------------------
   视觉方向：亮色科技风（浅底 + 白卡片 + 深色文字 + 饱和强调色）
     背景 #F1F5FA
     主色（主按钮/激活态/关键数字）：蓝 #3B5BDB
     强调（实底/图标）：玫红 #E0485F ／ 青绿点缀 #0E9E8F
     面板：白卡片 + 细边框 + 柔和阴影（浅色玻璃质感）

   设计原则：
     1. 移动优先（Mobile First），所有尺寸基于小屏设计
     2. 触摸友好：可点击元素最小 48px
     3. 适配刘海屏：使用 env(safe-area-inset-*)
     4. 无障碍：正文对比度 ≥ 4.5:1（深底上用亮色文字）
     5. 入场动效统一由 js/ui-motion.js（anime.js）驱动，
        CSS 不预设 opacity:0，避免脚本失效时页面空白
   ============================================================ */

/* ------------------------------------------------------------
   1. 设计令牌（Design Tokens）
   ------------------------------------------------------------ */
:root {
  /* ---------- 品牌渐变（装饰用）---------- */
  --grad-from: #3b5bdb;
  --grad-to: #4c63d2;
  --grad: linear-gradient(135deg, #3B5BDB 0%, #4C63D2 100%);
  /*
    载白字的深色渐变：两端与白色对比度均 ≥ 4.5:1，
    仅用于「实底 + 白字」的元素（主按钮 / 激活态 / 徽标）
  */
  --grad-deep: linear-gradient(135deg, #232A6B 0%, #3B5BDB 100%);
  --grad-soft: #EEF3FF;

  /* ---------- 纯色 ---------- */
  --c-primary: #3b5bdb;                       /* 主色（蓝）*/
  --c-primary-soft: #eaf0ff;                  /* 主色浅底 */
  --c-accent: #e0485f;                        /* 强调（玫红，实底/图标）*/
  --c-accent-soft: #fdecef;
  --c-mint: #0e9e8f;                          /* 青绿点缀（描边/图标）*/
  --c-blue: #4c63d2;                          /* 蓝（装饰描边）*/
  --c-cyan: #0e9e8f;                          /* 青绿点缀（同族）*/
  --c-pink: #e0485f;                          /* 必填星号 */

  /* ---------- 文字色 ---------- */
  --c-primary-text: #2f4bc0;                  /* 主色文字（7.27:1）*/
  --c-accent-text: #c13a50;                   /* 告警/强调文字（5.27:1）*/
  --c-on-accent: #ffffff;                     /* 实底上的白字 */
  --c-on-deep: #ffffff;                       /* 深色渐变实底上的白字 */

  /* ---------- 中性色（文字对 --c-surface 对比度均 ≥ 4.5:1）---------- */
  --c-bg: #f1f5fa;                            /* 页面底色（浅冷灰）*/
  --c-bg-2: #e8eff7;
  --c-surface: #ffffff;                       /* 卡片/面板底（正文 15.97:1）*/
  --c-surface-2: #f7fafd;
  --c-glass: rgba(255, 255, 255, 0.72);       /* 浅色玻璃面板填充 */
  --c-glass-2: rgba(255, 255, 255, 0.9);
  --c-border: #e2e9f3;                        /* 常规描边 */
  --c-border-strong: rgba(59, 91, 219, 0.35); /* 强调描边 */

  --c-text: #14213d;                          /* 主文字（15.97:1）*/
  --c-text-2: #48586f;                        /* 次要文字（7.24:1）*/
  --c-text-3: #64748b;                        /* 提示文字（4.76:1）*/

  /* ---------- 语义色（文字对同色系浅底均 ≥ 4.5:1）---------- */
  --c-pending: #1f4fa8;
  --c-pending-bg: #e7efff;
  --c-pass: #0b6b5e;
  --c-pass-bg: #e1f7f2;
  --c-admit: #0f6b46;
  --c-admit-bg: #e3f7e9;
  --c-fail: #b3261e;
  --c-fail-bg: #fce9e7;

  /* ---------- 阴影 / 发光（浅色主题用柔和阴影）---------- */
  --shadow-sm: 0 1px 2px rgba(20, 33, 61, 0.08);
  --shadow-md: 0 6px 20px rgba(20, 33, 61, 0.1);
  --shadow-lg: 0 18px 44px rgba(20, 33, 61, 0.14);
  --shadow-glow: 0 8px 24px rgba(59, 91, 219, 0.18);
  --glow-blue: 0 0 0 1px rgba(59, 91, 219, 0.25), 0 8px 24px rgba(59, 91, 219, 0.16);
  --inset-glow: inset 0 1px 0 rgba(255, 255, 255, 0.6);

  /* ---------- 间距刻度 ---------- */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;

  /* ---------- 圆角 ---------- */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-full: 999px;

  /* ---------- 布局尺寸 ---------- */
  --topbar-h: 52px;
  --tabbar-h: 58px;

  /* ---------- 安全区（刘海屏 / 挖孔屏，横屏时左右也有）---------- */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);

  /* 内容区左右内边距（随屏幕宽度变化，见文件末尾断点） */
  --pad-x: var(--sp-4);
}

/* ------------------------------------------------------------
   2. 基础重置
   ------------------------------------------------------------ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei',
    'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--c-text);
  background-color: var(--c-bg);

  /*
    移动端高度：优先用动态视口单位 dvh，
    避免 iOS/安卓地址栏收展时 100vh 计算偏差导致的底部留白或跳动
  */
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

/*
  科技感背景（浅色）：
    第 1 层 —— 顶部蓝色径向光晕（氛围）
    第 2 层 —— 圆点网格（科技感来源，透明度极低）
  用固定定位的伪元素绘制，替代 background-attachment: fixed
  （后者在 iOS 上兼容性差、滚动时会抖动）
*/
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 50% -10%, rgba(59, 91, 219, 0.1) 0%, transparent 45%),
    radial-gradient(circle at 100% 0%, rgba(14, 158, 143, 0.09) 0%, transparent 40%),
    radial-gradient(circle, rgba(59, 91, 219, 0.07) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 22px 22px;
  background-repeat: no-repeat, no-repeat, repeat;
}

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

/* 移动端：交给浏览器处理触摸手势，去掉 300ms 点击延迟与双击缩放误触 */
button,
input,
select,
textarea,
label,
a {
  touch-action: manipulation;
}

/* ------------------------------------------------------------
   3. 顶部导航栏
   ------------------------------------------------------------ */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding-top: var(--safe-top);
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
  height: calc(var(--topbar-h) + var(--safe-top));
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
}

/* 底部渐变细线：品牌识别度最高的细节 */
.topbar::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--grad);
  opacity: 0.9;
}

.topbar__inner {
  height: var(--topbar-h);
  padding: 0 var(--sp-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
}

/* 品牌标识：渐变竖条 */
.topbar__logo {
  width: 8px;
  height: 18px;
  border-radius: 2px;
  background: var(--grad);
  box-shadow: 0 0 10px rgba(59, 91, 219, 0.35);
  display: inline-block;
}

.topbar__name {
  font-size: 13px;
  color: var(--c-primary-text);
  font-weight: 600;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.topbar__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--c-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  /* 与右侧身份区共存：占满剩余空间并右对齐，避免挤压 */
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
}

/* ------------------------------------------------------------
   当前登录身份 + 退出（顶栏右侧）
   ------------------------------------------------------------ */
.topbar__user {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* 注意：本元素一旦设置 display，必须显式处理 hidden 状态 */
.topbar__user[hidden] {
  display: none;
}

.topbar__user-name {
  max-width: 88px;
  font-size: 12px;
  font-weight: 600;
  color: var(--c-primary-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar__logout {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  background: var(--c-surface-2);
  color: var(--c-text-2);
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.topbar__logout:active,
.topbar__logout:hover {
  border-color: var(--c-border-strong);
  color: var(--c-primary-text);
  background: var(--c-primary-soft);
}

/* ------------------------------------------------------------
   4. 内容区
   ------------------------------------------------------------ */
.viewport {
  padding: calc(var(--topbar-h) + var(--safe-top) + var(--sp-4))
    calc(var(--pad-x) + var(--safe-right))
    calc(var(--tabbar-h) + var(--safe-bottom) + var(--sp-6))
    calc(var(--pad-x) + var(--safe-left));
  max-width: 640px;
  margin: 0 auto;
}

/* 视图容器：入场动画交给 ui-motion.js，CSS 不再预设隐藏 */
.view {
  will-change: transform;
}

.view[hidden] {
  display: none;
}

/* ------------------------------------------------------------
   5. 主视觉区（首页顶部）
   ------------------------------------------------------------ */
.hero {
  position: relative;
  text-align: center;
  padding: var(--sp-6) var(--sp-4) var(--sp-5);
  margin-bottom: var(--sp-4);
  border-radius: var(--r-lg);
  background: var(--c-surface);
  border: 1px solid transparent;
  /* 渐变描边：底图裁剪实现，比纯色描边更有质感 */
  background-image: linear-gradient(var(--c-surface), var(--c-surface)), var(--grad);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: var(--shadow-md), var(--inset-glow);
  overflow: hidden;
}

/* 顶部渐变光带 */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 90px;
  background: var(--grad-soft);
  pointer-events: none;
}

.hero__dept {
  position: relative;
  font-size: 12px;
  letter-spacing: 3px;
  font-weight: 600;
  color: var(--c-primary-text);
  margin-bottom: var(--sp-2);
}

.hero__title {
  position: relative;
  font-size: 24px;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.35;
  margin-bottom: var(--sp-2);
  /* 逐字动画时字符需成为独立行内块 */
  white-space: normal;
}

.hero__title .char {
  display: inline-block;
  will-change: transform, opacity;
}

.hero__slogan {
  position: relative;
  font-size: 13px;
  color: var(--c-text-2);
}

/* 强调线：渐变短横线 */
.hero__rule {
  position: relative;
  width: 46px;
  height: 3px;
  border-radius: 2px;
  background: var(--grad);
  box-shadow: 0 0 12px rgba(59, 91, 219, 0.35);
  margin: var(--sp-4) auto;
}

/* ------------------------------------------------------------
   6. 面板（卡片容器，玻璃质感）
   ------------------------------------------------------------ */
.panel {
  background: var(--c-glass);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-5) var(--sp-4);
  margin-bottom: var(--sp-4);
  box-shadow: var(--shadow-sm), var(--inset-glow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  /* 允许面板被压缩到比内容更窄，避免长文案把整块撑出屏幕 */
  min-width: 0;
}

/* fieldset 用作分组时需去掉浏览器默认边框 */
fieldset.panel {
  border: 1px solid var(--c-border);
  /*
    关键：fieldset 的 UA 默认 min-inline-size 为 min-content，
    不覆盖会导致内部不可换行文案把整组撑宽、页面出现横向滚动
  */
  min-inline-size: 0;
  min-width: 0;
}

.panel__title {
  font-size: 15px;
  font-weight: 600;
  /* 标题左侧加渐变竖条，形成统一的区块识别 */
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--c-text);
  margin-bottom: var(--sp-3);
  float: none;
  padding: 0;
}

.panel__title::before {
  content: '';
  width: 3px;
  height: 15px;
  border-radius: 2px;
  background: var(--grad);
  box-shadow: 0 0 8px rgba(59, 91, 219, 0.4);
  flex-shrink: 0;
}

.panel__text {
  font-size: 14px;
  color: var(--c-text-2);
  line-height: 1.85;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ------------------------------------------------------------
   7. 信息列表
   ------------------------------------------------------------ */
.info-list {
  list-style: none;
}

.info-list__item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--c-border);
}

.info-list__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.info-list__label {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--c-text-3);
}

.info-list__value {
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text);
  text-align: right;
  word-break: break-word;
  min-width: 0;
}

/* ------------------------------------------------------------
   8. 表单
   ------------------------------------------------------------ */
.field {
  margin-bottom: var(--sp-5);
}

.field:last-child {
  margin-bottom: 0;
}

.field__label {
  display: block;
  font-size: 13.5px;
  color: var(--c-text);
  margin-bottom: var(--sp-2);
  font-weight: 500;
}

.required {
  color: var(--c-accent-text);
  font-style: normal;
}

.field__input {
  width: 100%;
  /* 16px 可避免 iOS Safari 聚焦时自动放大页面 */
  font-size: 16px;
  min-height: 48px;
  padding: 12px var(--sp-4);
  border-radius: var(--r-md);
  border: 1px solid var(--c-border);
  background: var(--c-surface-2);
  color: var(--c-text);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.field__input::placeholder {
  color: var(--c-text-3);
}

/* 聚焦态：主色描边 + 柔和外发光 */
.field__input:focus {
  outline: none;
  background: var(--c-surface);
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(59, 91, 219, 0.16);
}

.field__input--area {
  resize: vertical;
  min-height: 110px;
  line-height: 1.7;
}

/* select 箭头 */
select.field__input {
  background-image: linear-gradient(45deg, transparent 50%, var(--c-primary) 50%),
    linear-gradient(135deg, var(--c-primary) 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% + 2px),
    calc(100% - 15px) calc(50% + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 40px;
}

select.field__input option {
  background: var(--c-surface);
  color: var(--c-text);
}

.field__error {
  font-size: 12.5px;
  color: var(--c-accent-text);
  margin-top: var(--sp-2);
}

.field__error:empty {
  display: none;
}

.field__hint {
  font-size: 12px;
  color: var(--c-text-3);
  margin-top: var(--sp-2);
}

.field__counter {
  font-size: 12px;
  color: var(--c-text-3);
  text-align: right;
  margin-top: var(--sp-1);
}

/* ---------- 单选按钮组（高考类型）---------- */
.radio-group {
  display: flex;
  gap: var(--sp-3);
}

.radio-card {
  flex: 1;
  position: relative;
  cursor: pointer;
}

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

.radio-card__box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px var(--sp-3);
  text-align: center;
  font-size: 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--c-border);
  background: var(--c-surface-2);
  color: var(--c-text-2);
  transition: all 0.2s;
}

/* 选中态：主色描边 + 淡渐变底 */
.radio-card input:checked + .radio-card__box {
  border-color: var(--c-primary);
  background: var(--c-primary-soft);
  color: var(--c-text);
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(59, 91, 219, 0.35), 0 0 16px rgba(59, 91, 219, 0.14);
}

/* ---------- 文件选择器 ---------- */
.file-picker__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.file-picker {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 48px;
  padding: 14px var(--sp-4);
  border-radius: var(--r-md);
  border: 1px dashed var(--c-border-strong);
  background: var(--c-surface-2);
  cursor: pointer;
  transition: all 0.2s;
  min-width: 0;
}

.file-picker:active {
  background: var(--c-primary-soft);
}

.file-picker__icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  background: var(--grad-deep);
  color: var(--c-on-deep);
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 0 14px rgba(59, 91, 219, 0.25);
}

.file-picker__text {
  font-size: 13.5px;
  color: var(--c-text-2);
  line-height: 1.45;
  /* 允许在窄屏换行（扩展名列表较长），不换行会撑破容器 */
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.file-picker.has-file {
  border-style: solid;
  border-color: var(--c-primary);
  background: var(--c-primary-soft);
}

.file-picker.has-file .file-picker__text {
  color: var(--c-text);
  font-weight: 500;
}

/* ------------------------------------------------------------
   9. 按钮
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 48px;
  padding: 0 var(--sp-5);
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: transform 0.12s, opacity 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

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

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

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

/* 主按钮：深色渐变实底 + 白字（对比度达标） */
.btn--primary {
  background: var(--grad-deep);
  color: var(--c-on-accent);
  box-shadow: var(--shadow-glow);
}

.btn--primary:active {
  box-shadow: 0 4px 12px rgba(59, 91, 219, 0.24);
}

/* 次要按钮：浅蓝底 + 主色描边 + 主色文字 */
.btn--ghost {
  background: var(--c-primary-soft);
  border: 1.5px solid var(--c-border-strong);
  color: var(--c-primary-text);
}

/* 快捷操作区 */
.quick-actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}

.form-actions__tip {
  font-size: 12px;
  color: var(--c-text-3);
  text-align: center;
  line-height: 1.6;
}

/* ------------------------------------------------------------
   10. 底部标签栏
   ------------------------------------------------------------ */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  padding-bottom: var(--safe-bottom);
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--c-border);
  box-shadow: 0 -2px 16px rgba(20, 33, 61, 0.08);
}

.tabbar__item {
  flex: 1;
  min-height: 48px;
  height: var(--tabbar-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--c-text-3);
  transition: color 0.2s;
  position: relative;
}

.tabbar__item.is-active {
  color: var(--c-primary-text);
}

/* 选中项：顶部渐变短横线 */
.tabbar__item.is-active::before {
  content: '';
  position: absolute;
  top: 0;
  width: 26px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--grad);
  box-shadow: 0 0 10px rgba(59, 91, 219, 0.45);
}

.tabbar__icon {
  font-size: 17px;
  line-height: 1;
}

.tabbar__label {
  font-size: 12px;
  font-weight: 500;
}

/* ------------------------------------------------------------
   11. 查询结果卡片
   ------------------------------------------------------------ */
.result-card {
  position: relative;
  background: var(--c-glass);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-5) var(--sp-4);
  margin-bottom: var(--sp-4);
  box-shadow: var(--shadow-md), var(--inset-glow);
  overflow: hidden;
}

/* 顶部渐变条标识这是结果卡片 */
.result-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad);
}

.result-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-3);
  padding-bottom: var(--sp-4);
  margin-bottom: var(--sp-4);
  border-bottom: 1px solid var(--c-border);
}

.result-card__code {
  font-family: 'SF Mono', Consolas, monospace;
  font-size: 15px;
  font-weight: 600;
  color: var(--c-text);
  letter-spacing: 1px;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* 状态标签 */
.status-tag {
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: var(--r-full);
  font-size: 12.5px;
  font-weight: 600;
}

.status-tag--pending {
  background: var(--c-pending-bg);
  color: var(--c-pending);
  box-shadow: inset 0 0 0 1px rgba(31, 79, 168, 0.28);
}

.status-tag--progress {
  background: var(--c-pass-bg);
  color: var(--c-pass);
  box-shadow: inset 0 0 0 1px rgba(11, 107, 94, 0.28);
}

.status-tag--success {
  background: var(--c-admit-bg);
  color: var(--c-admit);
  box-shadow: inset 0 0 0 1px rgba(15, 107, 70, 0.28);
}

.status-tag--fail {
  background: var(--c-fail-bg);
  color: var(--c-fail);
  box-shadow: inset 0 0 0 1px rgba(179, 38, 30, 0.28);
}

/* 状态说明条：左侧渐变竖条 */
.status-hint {
  position: relative;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  background: var(--grad-soft);
  font-size: 13.5px;
  color: var(--c-text-2);
  line-height: 1.75;
  margin-bottom: var(--sp-4);
}

.status-hint::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: var(--r-md) 0 0 var(--r-md);
  background: var(--grad);
}

/* ------------------------------------------------------------
   12. 通知列表
   ------------------------------------------------------------ */
.notice-item {
  position: relative;
  background: var(--c-glass);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  margin-bottom: var(--sp-3);
  box-shadow: var(--shadow-sm), var(--inset-glow);
}

/* 置顶通知：左侧渐变竖条 + 更强阴影 */
.notice-item--top {
  box-shadow: var(--shadow-md);
  padding-left: calc(var(--sp-4) + 3px);
}

.notice-item--top::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: var(--r-lg) 0 0 var(--r-lg);
  background: var(--grad);
}

.notice-item__head {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
}

.notice-item__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--c-text);
  flex: 1;
  word-break: break-word;
}

.notice-item__tag {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: var(--r-sm);
  background: var(--grad-deep);
  color: var(--c-on-deep);
  font-size: 10.5px;
  font-weight: 700;
}

.notice-item__time {
  font-size: 11.5px;
  color: var(--c-text-3);
  margin-bottom: var(--sp-2);
}

.notice-item__content {
  font-size: 13.5px;
  color: var(--c-text-2);
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ------------------------------------------------------------
   13. 空状态与提示
   ------------------------------------------------------------ */
.empty {
  text-align: center;
  padding: var(--sp-8) var(--sp-4);
  color: var(--c-text-3);
  font-size: 13.5px;
}

.empty__icon {
  font-size: 32px;
  margin-bottom: var(--sp-3);
  opacity: 0.4;
}

.alert {
  padding: var(--sp-4);
  border-radius: var(--r-md);
  font-size: 13.5px;
  line-height: 1.7;
  margin-bottom: var(--sp-4);
}

.alert--error {
  background: var(--c-fail-bg);
  border: 1px solid rgba(179, 38, 30, 0.25);
  color: var(--c-fail);
}

.alert--info {
  background: var(--c-bg-2);
  border: 1px solid var(--c-border);
  color: var(--c-text-2);
}

/* ------------------------------------------------------------
   14. Toast 轻提示
   ------------------------------------------------------------
   居中不依赖 transform，避免与 anime.js 的 translate 动画冲突
   ------------------------------------------------------------ */
.toast {
  position: fixed;
  left: calc(var(--sp-4) + var(--safe-left));
  right: calc(var(--sp-4) + var(--safe-right));
  margin: 0 auto;
  width: fit-content;
  max-width: 80vw;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 20px);
  padding: 11px 20px;
  border-radius: var(--r-full);
  background: rgba(20, 33, 61, 0.94);
  border: 1px solid var(--c-border-strong);
  color: #fff;
  font-size: 13.5px;
  text-align: center;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  box-shadow: var(--shadow-lg);
}

.toast.is-show {
  opacity: 1;
}

/* ------------------------------------------------------------
   15. 加载遮罩
   ------------------------------------------------------------ */
.loading {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  background: rgba(241, 245, 250, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.loading[hidden] {
  display: none;
}

/* 加载圈使用渐变描边 */
.loading__spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid rgba(59, 91, 219, 0.18);
  border-top-color: var(--c-primary);
  border-right-color: var(--c-mint);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading__text {
  font-size: 13.5px;
  color: var(--c-text-2);
}

/* ------------------------------------------------------------
   16. 弹窗
   ------------------------------------------------------------ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  padding: calc(var(--sp-5) + var(--safe-top)) calc(var(--sp-5) + var(--safe-right))
    calc(var(--sp-5) + var(--safe-bottom)) calc(var(--sp-5) + var(--safe-left));
  /*
    可滚动居中：内容比屏幕矮时自动居中，
    比屏幕高（如横屏小屏）时从顶部开始并可滚动，避免弹窗被裁切
  */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal[hidden] {
  display: none;
}

.modal__mask {
  position: absolute;
  inset: 0;
  background: rgba(20, 33, 61, 0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal__box {
  position: relative;
  width: 100%;
  max-width: 340px;
  /* 配合 .modal 的 flex 容器实现「短则居中、长则滚动」 */
  margin: auto;
  padding: var(--sp-6) var(--sp-5) var(--sp-5);
  border-radius: var(--r-lg);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-lg), var(--inset-glow);
  text-align: center;
}

/* 成功图标：深色渐变圆底 + 白色 SVG 描边勾选 */
.modal__icon {
  position: relative;
  width: 54px;
  height: 54px;
  margin: 0 auto var(--sp-4);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--grad-deep);
  color: var(--c-on-deep);
  font-size: 26px;
  font-weight: 700;
  box-shadow: var(--shadow-glow);
}

/* 原有文字勾选隐藏，由 SVG 描边动画替代线条更精致 */
.modal__icon-text {
  display: none;
}

.modal__icon .check {
  width: 34px;
  height: 34px;
  display: block;
}

.modal__icon .check__circle {
  fill: none;
  stroke: rgba(255, 255, 255, 0.4);
  stroke-width: 3;
}

.modal__icon .check__path {
  fill: none;
  stroke: var(--c-on-deep);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.modal__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: var(--sp-2);
}

.modal__text {
  font-size: 13px;
  color: var(--c-text-2);
  line-height: 1.7;
  margin-bottom: var(--sp-4);
}

/* 报名编号展示：浅蓝底 + 主色描边 + 主色文字 */
.modal__code {
  font-family: 'SF Mono', Consolas, monospace;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 3px;
  padding: var(--sp-3);
  margin-bottom: var(--sp-4);
  border-radius: var(--r-md);
  border: 1.5px dashed var(--c-border-strong);
  background: var(--c-primary-soft);
  color: var(--c-primary-text);
  word-break: break-all;
}

.modal__code > span {
  color: var(--c-primary-text);
}

.modal__box .btn {
  margin-bottom: var(--sp-2);
}

.modal__box .btn:last-child {
  margin-bottom: 0;
}

/* ------------------------------------------------------------
   17. 响应式断点（手机优先）
   ------------------------------------------------------------ */

/* 小屏手机（≤360px，如 iPhone SE、老款安卓） */
@media (max-width: 360px) {
  :root {
    --pad-x: var(--sp-3);
  }

  .hero__title {
    font-size: 21px;
  }

  .panel {
    padding: var(--sp-4) var(--sp-3);
  }

  .info-list__label {
    font-size: 12.5px;
  }

  .radio-group {
    gap: var(--sp-2);
  }
}

/* 大屏手机（≥414px，如 iPhone Plus / Pro Max）：标题适当放大 */
@media (min-width: 414px) {
  .hero__title {
    font-size: 26px;
  }
}

/* 平板 / 桌面：内容居中，左右留出更多呼吸空间 */
@media (min-width: 641px) {
  :root {
    --pad-x: var(--sp-5);
  }
}

/* 横屏且高度很小：压缩上下留白，避免内容被挤压 */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    padding: var(--sp-4) var(--sp-4) var(--sp-3);
  }

  .hero__rule {
    margin: var(--sp-3) auto;
  }

  .modal__box {
    padding: var(--sp-4);
  }
}

/* 尊重用户的「减少动画」偏好（无障碍） */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
