/* tzc_sign 共享样式 —— 2026-09-21 与跑步助手统一为水彩画风
 * （设计 token 与 running-web/frontend/style.css 完全对齐：
 *   纸感底色 #faf8f5 / 蓝灰 #4a6fa5 / 水彩杏青玫沙
 *   大圆角 · 衬线标题 · 柔和阴影 · 颜料晕开式悬停）
 * 类名与结构保持不变，仅替换视觉层。 */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* 关键：hidden 属性必须永远赢过任何 display 规则，
   否则 .modal-backdrop { display:flex } 会让弹窗一打开页面就盖在最上面 */
[hidden] { display: none !important; }

:root {
  color-scheme: light;
  --paper: #faf8f5;
  --panel: rgba(255, 255, 255, .75);
  --panel-solid: #fdfcf9;
  --line: rgba(74, 111, 165, .16);
  --blue-line: rgba(74, 111, 165, .2);
  --text: #3c4a5c;
  --ink-strong: #2f3d4f;
  --muted: #8b96a6;
  --blue: #4a6fa5;
  --peach: #e8a87c;
  --teal: #85cdca;
  --rose: #c38d94;
  --sand: #d4a373;
  --green: #4f948b;
  --gold: #a5814e;
  --red: #b96b78;
  --warn: #a5814e;
  --danger-bg: rgba(195, 141, 148, .38);
  --input-bg: rgba(255, 255, 255, .6);
  --input-line: rgba(74, 111, 165, .2);
  --shadow: 0 4px 20px rgba(74, 111, 165, .12);
  --shadow-bloom: 0 10px 32px rgba(74, 111, 165, .2);
  --radius: 16px;
  --radius-lg: 24px;
  --serif: Georgia, "Times New Roman", "Noto Serif SC", "Songti SC", "SimSun", serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

body {
  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-weight: 400;
  color: var(--text);
  background-color: var(--paper);
  background-image:
    radial-gradient(620px 420px at 12% -4%, rgba(120, 160, 214, .20), transparent 60%),
    radial-gradient(560px 400px at 96% 10%, rgba(163, 199, 238, .24), transparent 62%),
    radial-gradient(720px 520px at 50% 118%, rgba(196, 216, 244, .18), transparent 65%),
    radial-gradient(420px 320px at 78% 46%, rgba(138, 175, 222, .10), transparent 60%);
  background-attachment: fixed;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  /* 下方留白比上方多，卡片视觉重心略高于正中，比纯居中更稳 */
  padding: 24px 20px 56px;
}
/* 卡片靠 auto 外边距垂直居中；内容超高时自动贴顶，仍可完整滚动，不会被裁切 */
body > .card { margin-block: auto; }
/* 管理端是长表格页，保持顶部对齐 */
body.wide { justify-content: flex-start; padding: 24px 18px 48px; }
body.wide > .card { margin-block: 0; }

.card {
  background: var(--panel);
  backdrop-filter: blur(8px);
  border: 1px solid var(--input-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  width: 100%; max-width: 420px; padding: 30px 32px 26px;
  color: var(--text);
}
.card.wide { max-width: 1180px; }

h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: 24px; text-align: center; color: var(--ink-strong);
  margin-bottom: 4px;
}
.sub { text-align: center; color: var(--muted); font-size: 12px; margin-bottom: 20px; font-weight: 300; }

.head-bar { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.head-bar h1 { text-align: left; }
.head-bar .sub { text-align: left; margin-bottom: 0; }
.head-actions { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; padding-top: 6px; }
.head-actions a { font-size: 13px; color: var(--blue); text-decoration: none; white-space: nowrap; }
.head-actions a:hover { text-decoration: underline; opacity: .75; }
.link-btn {
  flex: 0 0 auto; background: none; border: none; padding: 0;
  font-size: 13px; color: var(--blue); cursor: pointer; font-family: inherit;
  white-space: nowrap;
}
.link-btn:hover:not(:disabled) { text-decoration: underline; opacity: 1; }

.field { margin-bottom: 12px; }
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; letter-spacing: .06em; }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=search] {
  width: 100%; padding: 10px 14px; border: 1px solid var(--input-line); border-radius: var(--radius);
  font-size: 14px; outline: none; transition: all .4s var(--ease);
  background: var(--input-bg); color: var(--ink-strong);
}
input:focus, select:focus {
  border-color: rgba(74, 111, 165, .45);
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 4px 20px rgba(74, 111, 165, .15);
}
input:hover, select:hover { border-color: rgba(74, 111, 165, .35); }
input[type=date]::-webkit-calendar-picker-indicator { opacity: .6; cursor: pointer; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--blue); }
select {
  width: 100%; padding: 10px 14px; border: 1px solid var(--input-line); border-radius: var(--radius);
  font-size: 14px; outline: none; background: var(--input-bg); color: var(--ink-strong);
}
.row { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.row.tight { margin-top: 0; }
.loc-row { margin-top: 14px; }

button {
  flex: 1; padding: 10px 0; border: 1px solid transparent; border-radius: var(--radius); font-size: 15px;
  cursor: pointer; color: var(--text); font-weight: 400; font-family: inherit; white-space: nowrap;
  letter-spacing: .02em;
  transition: all .4s var(--ease);
}
button:hover:not(:disabled) { transform: scale(1.02); box-shadow: var(--shadow-bloom); }
button:active:not(:disabled) { transform: scale(.99); transition-duration: .15s; }
button:disabled { opacity: .5; cursor: not-allowed; }
.btn-save {
  color: var(--blue); background: rgba(255, 255, 255, .6); border-color: var(--input-line);
  box-shadow: 0 2px 10px rgba(74, 111, 165, .06);
}
.btn-save:hover:not(:disabled) { background: rgba(255, 255, 255, .85); }
.btn-query {
  color: #fdfcf9;
  background: linear-gradient(135deg, rgba(74, 111, 165, .92), rgba(93, 127, 176, .88));
  box-shadow: var(--shadow);
}
.btn-sign {
  color: #fdfcf9;
  background: linear-gradient(135deg, #5b8ccb, #3f6398);
  box-shadow: 0 4px 20px rgba(74, 111, 165, .24);
}
.btn-plain {
  color: var(--blue); background: rgba(255, 255, 255, .6); border-color: var(--input-line);
}
.btn-plain:hover:not(:disabled) { background: rgba(255, 255, 255, .85); }
.btn-danger { color: #6e3a44; background: var(--danger-bg); border-color: rgba(185, 107, 120, .35); }
.btn-mini { flex: 0 0 auto; padding: 6px 14px; font-size: 13px; border-radius: 12px; }

/* 提建议入口：整行大按钮（a 标签要自己补 display/padding，不能只靠 button 的基础样式） */
.msg-entry {
  display: block; width: 100%; box-sizing: border-box; margin-top: 14px;
  padding: 11px 0; text-align: center; text-decoration: none;
  color: var(--blue); background: rgba(255, 255, 255, .65);
  border: 1px solid var(--input-line); border-radius: var(--radius);
  font-size: 15px; letter-spacing: .02em; transition: all .4s var(--ease);
}
.msg-entry:hover { background: rgba(255, 255, 255, .9); box-shadow: var(--shadow-bloom); transform: scale(1.02); }
.msg-entry:active { transform: scale(.99); }

.sms-panel {
  margin-top: 16px; padding: 14px; border: 1px dashed rgba(74, 111, 165, .3); border-radius: var(--radius);
  background: rgba(255, 255, 255, .45); display: none;
}
.sms-panel .sms-title { font-size: 13px; color: var(--blue); margin-bottom: 10px; font-family: var(--serif); }
.captcha-row { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.captcha-row img {
  width: 130px; height: 44px; border: 1px solid var(--input-line); border-radius: 12px;
  cursor: pointer; object-fit: cover; background: #fff;
}
.captcha-row button {
  flex: 1; padding: 9px 0; font-size: 13px;
  color: var(--blue); background: rgba(255, 255, 255, .6); border-color: var(--input-line);
}
.captcha-row button:hover:not(:disabled) { background: rgba(255, 255, 255, .85); }
.sms-send-row { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.sms-send-row input { flex: 1; }
.sms-send-row button {
  flex: 0 0 auto; padding: 9px 14px; font-size: 13px; color: #fdfcf9; white-space: nowrap;
  background: linear-gradient(135deg, rgba(74, 111, 165, .92), rgba(93, 127, 176, .88));
}
.sms-send-row .btn-verify {
  color: #fdfcf9;
  background: linear-gradient(135deg, #5b8ccb, #3f6398);
}

.status {
  margin-top: 12px; background: rgba(255, 255, 255, .55); border: 1px solid var(--line);
  border-radius: 14px; padding: 11px 14px; min-height: 0;
  font-size: 13px; line-height: 1.7; color: var(--ink-strong); white-space: pre-wrap;
  word-break: break-word; font-family: inherit;
}
.status.ok { color: var(--green); background: rgba(79, 148, 139, .08); border-color: rgba(79, 148, 139, .25); }
.status.err { color: var(--red); background: rgba(185, 107, 120, .08); border-color: rgba(185, 107, 120, .25); }
.status.sign-raw { color: #98a2b0; }
.note { margin-top: 14px; font-size: 12px; color: var(--muted); line-height: 1.6; font-weight: 300; }
.tip { color: var(--gold); }

/* ---- 管理后台 ---- */
.wide .sub { margin-bottom: 18px; }
.tabs {
  display: flex; gap: 6px; margin: 18px 0 14px; flex-wrap: wrap; padding: 6px;
  border: 1px solid var(--input-line); border-radius: var(--radius);
  background: rgba(255, 255, 255, .45);
}
.tabs button {
  flex: 0 0 auto; padding: 8px 18px; font-size: 14px; border-radius: 12px;
  background: transparent; color: var(--muted);
}
.tabs button.active {
  color: #fdfcf9;
  background: linear-gradient(135deg, rgba(74, 111, 165, .85), rgba(133, 205, 202, .6));
  box-shadow: var(--shadow);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px;
  margin-bottom: 18px;
}
.stat {
  background: linear-gradient(150deg, rgba(255, 255, 255, .8), rgba(255, 255, 255, .5));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
  transition: all .4s var(--ease);
}
.stat:hover { box-shadow: var(--shadow); transform: scale(1.02); }
.stat small { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.stat strong {
  font-family: var(--serif); font-weight: 500; font-size: 22px;
  color: var(--blue); font-variant-numeric: tabular-nums;
}
.stat em { font-style: italic; font-size: 12px; color: var(--muted); margin-left: 4px; }

.section-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin: 22px 0 10px; flex-wrap: wrap;
}
.section-head h2 { font-family: var(--serif); font-weight: 500; font-size: 16px; color: var(--ink-strong); }
.section-head .hint { font-size: 12px; color: var(--muted); font-weight: 300; }

.toolbar {
  display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap;
  background: rgba(255, 255, 255, .5); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; margin-bottom: 14px;
}
.toolbar .tb { display: flex; flex-direction: column; gap: 5px; min-width: 130px; }
.toolbar .tb.grow { flex: 1; min-width: 180px; }
.toolbar label { margin: 0; font-size: 12px; color: var(--muted); }
.toolbar button { flex: 0 0 auto; padding: 9px 16px; font-size: 14px; }

.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255, 255, 255, .45); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid rgba(74, 111, 165, .08); vertical-align: middle; }
th {
  background: rgba(250, 248, 245, .95); color: var(--muted); font-weight: 400;
  letter-spacing: .08em; white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
td { color: var(--ink-strong); }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background-color .4s var(--ease); }
tbody tr:hover { background: rgba(133, 205, 202, .14); }
td.mono { font-family: Consolas, monospace; font-size: 12px; }
td.wrap { max-width: 320px; white-space: pre-wrap; word-break: break-all; }
td.actions { white-space: nowrap; }
td.actions button {
  flex: 0 0 auto; padding: 5px 12px; font-size: 12px; margin-right: 4px; border-radius: 12px;
  color: var(--blue); background: rgba(255, 255, 255, .6); border-color: var(--input-line);
}
td.actions button.danger, td.actions button.btn-danger { color: #6e3a44; background: var(--danger-bg); border-color: rgba(185, 107, 120, .35); }

.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 11px;
  font-weight: 400; white-space: nowrap; letter-spacing: .04em;
  background: rgba(255, 255, 255, .6); color: var(--blue); border: 1px solid var(--line);
}
.badge.ok {
  color: #3d5a4e; border-color: transparent;
  background: linear-gradient(135deg, rgba(133, 205, 202, .8), rgba(133, 205, 202, .55));
}
.badge.err {
  color: #6e3a44; border-color: transparent;
  background: linear-gradient(135deg, rgba(195, 141, 148, .7), rgba(195, 141, 148, .45));
}
.badge.warn {
  color: #6b4d33; border-color: transparent;
  background: linear-gradient(135deg, rgba(212, 163, 115, .6), rgba(232, 168, 124, .45));
}
.badge.plain { background: rgba(74, 111, 165, .12); color: var(--text); border-color: transparent; }

.pager { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.pager button {
  flex: 0 0 auto; padding: 7px 16px; font-size: 13px; color: #fdfcf9;
  background: linear-gradient(135deg, rgba(74, 111, 165, .92), rgba(93, 127, 176, .88));
}
.pager .page-info { font-size: 13px; color: var(--muted); }

.empty { padding: 26px; text-align: center; color: var(--muted); font-size: 13px; font-weight: 300; }
.inline-form {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px;
  align-items: end; background: rgba(255, 255, 255, .45); border: 1px dashed rgba(74, 111, 165, .25);
  border-radius: var(--radius); padding: 14px; margin-bottom: 14px;
}
.inline-form label { margin: 0; }
.inline-form .span-all { grid-column: 1 / -1; }
.inline-form button { padding: 9px 0; font-size: 14px; }
.check { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); }
.check input { width: auto; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: linear-gradient(135deg, rgba(91, 140, 203, .95), rgba(63, 99, 152, .9));
  color: #fdfcf9; padding: 10px 20px; border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(74, 111, 165, .3);
  font-size: 13px; font-weight: 400; opacity: 0; pointer-events: none;
  transition: opacity .4s var(--ease);
  max-width: 80vw; text-align: center; z-index: 99;
}
.toast.show { opacity: 1; }
.toast.err {
  background: linear-gradient(135deg, rgba(195, 141, 148, .9), rgba(195, 141, 148, .7));
  color: #6e3a44; box-shadow: 0 4px 20px rgba(195, 141, 148, .35);
}

/* ---- 模态弹窗（密码输入等）---- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(63, 77, 94, .28); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50;
}
.modal-card {
  min-width: 0;
  background: var(--panel-solid);
  border: 1px solid var(--input-line); border-radius: var(--radius-lg); box-shadow: var(--shadow-bloom);
  width: 100%; max-width: 380px; padding: 22px 24px 24px; color: var(--text);
  animation: modalIn .25s var(--ease);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(.96) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 16px;
}
.modal-head h2 { font-family: var(--serif); font-weight: 500; font-size: 17px; color: var(--ink-strong); }
.kicker {
  display: block; font-size: 11px; letter-spacing: .22em; color: var(--blue);
  margin-bottom: 4px; font-family: var(--serif); font-style: italic;
}
.modal-form .row { display: flex; }
.modal-form button { flex: 1; }
.modal-note { margin: 0 0 14px; font-size: 12px; color: var(--muted); font-weight: 300; line-height: 1.8; }

/* ---- 签到首页：跑步助手跳转按钮 + 公告（与 running-web 合并部署）---- */
/* 功能开关未就绪前，先隐藏「按开关显示」的控件（.flag-ui），避免被关掉的按钮一闪而过。
   JS 拿到开关后给 <html> 加上 flags-ready。 */
html:not(.flags-ready) .flag-ui { display: none !important; }
.run-link {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; padding: 0;
  border-radius: 50%;
  font-size: 19px; line-height: 1;
  text-decoration: none;
  color: #3f6398; background: #e8f0fb;
  border: 1px solid rgba(74, 111, 165, .22);
  box-shadow: 0 4px 12px rgba(74, 111, 165, .14);
}
.run-link:hover { transform: scale(1.02); box-shadow: 0 10px 32px rgba(74, 111, 165, .24); }
.run-link:active { transform: scale(.99); }
.run-link-icon { font-size: 15px; }
/* 没登录签到时的占位提示：告诉用户按钮为什么不在 */
.run-hint { flex: 0 0 auto; align-self: flex-start; margin-top: 8px; font-size: 12px; color: var(--muted); font-weight: 300; }

.ann-box {
  margin-top: 18px; border: 1px solid rgba(74, 111, 165, .22); border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(120, 160, 214, .14), rgba(255, 255, 255, .52) 60%);
  padding: 12px 16px 10px;
}
.ann-head {
  display: flex; align-items: center; gap: 6px; margin-bottom: 8px;
  font-size: 13px; color: #4a6fa5; font-family: var(--serif); font-style: italic; letter-spacing: .08em;
}
.ann-icon { font-size: 14px; }
.ann-list { display: flex; flex-direction: column; gap: 6px; }
.ann-item {
  border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .55); overflow: hidden;
}
.ann-item summary {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  cursor: pointer; font-size: 13px; color: var(--ink-strong); list-style: none; user-select: none;
}
.ann-item summary::-webkit-details-marker { display: none; }
.ann-item summary::after {
  content: '▸'; color: var(--muted); font-size: 12px; flex: 0 0 auto;
  transition: transform .4s var(--ease);
}
.ann-item[open] summary::after { transform: rotate(90deg); }
.ann-item-title {
  flex: 1; font-weight: 400; color: var(--blue); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ann-item time {
  flex: 0 0 auto; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.ann-item-body {
  margin-top: 8px; padding: 0 12px 10px; border-top: 1px dashed var(--line);
  font-size: 12.5px; color: var(--text); line-height: 1.7; font-weight: 300;
  white-space: pre-wrap; word-break: break-all;
}

/* ---------- 留言板 ---------- */
.msg-box { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.msg-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
  font-size: 13px; color: var(--blue); font-weight: 400;
}
.msg-head .msg-icon { font-size: 14px; }
.msg-head .btn-mini { margin-left: auto; }
.msg-form { display: flex; flex-direction: column; gap: 8px; }
.msg-form textarea {
  width: 100%; box-sizing: border-box; min-height: 56px; resize: vertical;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--input-bg); color: var(--text);
  font-family: inherit; font-size: 13px; line-height: 1.6; font-weight: 300;
  transition: border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.msg-form textarea:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(74, 111, 165, .10);
}
.msg-actions { display: flex; align-items: center; gap: 10px; }
.msg-hint { flex: 1; font-size: 11.5px; color: var(--muted); font-weight: 300; }
.msg-actions .btn-save { flex: 0 0 auto; }
.msg-actions .btn-save[disabled] { opacity: .5; cursor: not-allowed; }
.msg-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.msg-item {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: rgba(255, 255, 255, .55);
}
.msg-item.is-mine { border-color: rgba(74, 111, 165, .38); background: rgba(74, 111, 165, .06); }
.msg-meta {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
  font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.msg-meta .msg-who { color: var(--blue); font-weight: 400; }
.msg-body { font-size: 12.5px; color: var(--text); line-height: 1.7; font-weight: 300; white-space: pre-wrap; word-break: break-word; }
.msg-reply {
  margin-top: 8px; padding: 8px 10px; border-radius: 10px;
  background: rgba(232, 168, 124, .12); font-size: 12px; color: var(--text);
  line-height: 1.7; white-space: pre-wrap; word-break: break-word;
}
.msg-reply b { color: var(--gold); font-weight: 400; }
.msg-empty { font-size: 12px; color: var(--muted); text-align: center; padding: 10px 0; font-weight: 300; }

@media (max-width: 640px) {
  body { padding: 12px; }
  .card { padding: 24px 20px 22px; }
  .card.wide { padding: 20px 14px 28px; }
  .toolbar .tb, .toolbar .tb.grow { min-width: 100%; }
}

/* 密码旁的问号提示 */
.hint-dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; min-width: 18px; margin-left: 6px; padding: 0;
  border: 1px solid #9db0cd;
  border-radius: 50%;
  font-size: 12px; line-height: 18px; font-weight: 600;
  color: #6b86ad; background: #fff;
  cursor: pointer; vertical-align: middle;
}
.hint-dot:active { background: #6b86ad; }


/* 屏幕上方飘出的轻提示（几秒后消失） */
.top-toast {
  position: fixed; top: 24px; left: 50%; transform: translate(-50%, -12px);
  z-index: 9999;
  padding: 11px 22px;
  font-size: 14px; line-height: 1.4;
  color: #3d5475; background: #fff;
  border: 1px solid #d7e1f0; border-radius: 999px;
  box-shadow: 0 10px 28px rgba(74, 111, 165, .18);
  opacity: 0; transition: opacity .3s ease, transform .3s ease;
  pointer-events: none;
}
.top-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 我的邀请码：一整块可点击复制的胶囊 */
.invite-code-pill {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px;
  font-family: inherit;
  color: #3d5475; background: #f4f8ff;
  border: 1px dashed #b9cde8; border-radius: 12px;
  cursor: pointer;
}
.invite-code-pill strong {
  font-size: 19px; letter-spacing: 3px; font-weight: 700; color: #2f4d78;
}
.invite-code-pill span { font-size: 12px; color: #7b91ad; }
.invite-code-pill:active { background: #e9f1fd; }

/* 自动签到扣积分的浮窗气泡：跟着按钮定位，箭头朝下 */
.fee-bubble {
  position: fixed; z-index: 9998;
  transform: translate(-50%, -100%) scale(.96);
  transform-origin: bottom center;
  max-width: min(78vw, 320px);
  padding: 10px 14px;
  color: #3d5475; background: #fff;
  border: 1px solid #d7e1f0; border-radius: 12px;
  box-shadow: 0 10px 28px rgba(74, 111, 165, .18);
  font-size: 13px; line-height: 1.45; font-weight: 400;
  text-align: center;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
/* 两行气泡：第一行主文案，第二行扣费说明（字号略小、颜色略淡） */
.fee-bubble-sub {
  display: block; margin-top: 3px;
  font-size: 12px; color: #7b91ad; font-weight: 300;
}
.fee-bubble::after {
  content: ''; position: absolute; left: 50%; bottom: -7px;
  width: 12px; height: 12px; margin-left: -6px;
  background: #fff; border-right: 1px solid #d7e1f0; border-bottom: 1px solid #d7e1f0;
  transform: rotate(45deg);
}
.fee-bubble.show { opacity: 1; transform: translate(-50%, -100%) scale(1); }

/* 签到：主操作，尺寸与「登录」按钮完全一致（只换配色） */
.sign-row { margin: 12px 0 2px; }
.sign-row .btn-sign { width: 100%; }
.btn-sign {
  color: #fdfcf9;
  background: linear-gradient(135deg, #5b8ccb, #3f6398);
  border-color: transparent;
  box-shadow: none;
}
.btn-sign:hover:not(:disabled) {
  background: linear-gradient(135deg, #5285c6, #38588a);
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(74, 111, 165, .26);
}
.btn-sign:disabled {
  color: #a9bccb;
  background: #f3f6f9;
  border-color: #e6ecf3;
  box-shadow: none;
}

/* 登录后左上角的「姓名 · 学号」 */
.who-line {
  margin: 4px 0 2px;
  font-size: 13.5px; letter-spacing: .02em;
  color: #5b6b80;
}

/* 公告图片 */
.ann-item-img {
  display: block; width: 100%; height: auto;
  margin-top: 10px; border-radius: 10px;
  border: 1px solid var(--input-line);
}

/* 公告逐条样式 */
.ann-step-count {
  margin: 6px 0 0; font-size: 12.5px; color: #8b9bb0; letter-spacing: .04em;
}
.ann-step-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin-bottom: 8px;
}
.ann-step-head strong { font-size: 16px; color: #2f3d50; font-weight: 600; }
.ann-step-head time { font-size: 12px; color: #9aa8bb; }

/* ============================================================
   2026-11-18 签到首页：登录后直接把积分展示在页面里
   与跑步助手的积分中心共用同一套视觉（白卡 + 蓝色主按钮）
   ============================================================ */
.points-inline { margin: 0 0 12px; }
.points-inline[hidden] { display: none !important; }
/* 积分条固定两行：上面余额、下面整排操作，按钮再多也不会挤压余额 */
.pi-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 13px 15px;
  border: 1px solid rgba(74, 111, 165, .16);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(74, 111, 165, .08), rgba(178, 208, 240, .20));
}
.pi-top { display: flex; align-items: baseline; flex-wrap: wrap; gap: 9px; min-width: 0; }
/* 数字与单位绑成一个整体，绝不与其他元素叠压；旧的 .pi-tip 角标已废弃移除 */
.pi-figure { display: inline-flex; align-items: baseline; gap: 3px; min-width: 0; }
.pi-unit { font-size: 13px; color: #7b8798; font-weight: 300; }
/* 领积分按钮固定在积分行右侧（即「兑换」正上方），窄屏自动换行不压数字 */
.pi-top .pi-claim {
  margin-left: auto; flex: 0 0 auto; align-self: center;
  min-height: 34px; padding: 0 14px; border-radius: 10px;
  font-size: 13px; font-weight: 400; font-family: inherit; white-space: nowrap;
  color: #fdfcf9; border: 1px solid transparent;
  background: linear-gradient(135deg, #557cb3, #41618f);
  box-shadow: 0 4px 14px rgba(74, 111, 165, .20); cursor: pointer;
}
.pi-top .pi-claim:hover:not(:disabled) { filter: brightness(1.04); }
/* 已领取：保留按钮形态但置灰、不可点，避免整行突然少一块 */
.pi-top .pi-claimed {
  background: rgba(255, 255, 255, .62); color: #8b96a6;
  border-color: rgba(74, 111, 165, .14); box-shadow: none; cursor: default;
}
.pi-main { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.points-label { font-size: 12.5px; color: #7b8798; font-weight: 300; white-space: nowrap; }
.points-number {
  font-family: var(--serif); font-size: 26px; font-weight: 500; line-height: 1;
  color: var(--ink-strong); font-variant-numeric: tabular-nums;
}
/* 第二行：全部按钮等宽平分，永远排得下 */
.pi-meta { display: flex; align-items: center; gap: 7px; width: 100%; }
.pi-meta button {
  flex: 1 1 0; min-width: 0; min-height: 36px; padding: 0 8px; border-radius: 10px;
  font-size: 13px; font-weight: 400; font-family: inherit; white-space: nowrap;
  border: 1px solid var(--blue-line); background: rgba(255, 255, 255, .7); color: var(--blue);
  box-shadow: none; cursor: pointer;
}
.pi-meta button:hover:not(:disabled) { background: #fff; border-color: rgba(74, 111, 165, .32); }
.pi-meta .pi-claim,
.pi-meta .primary {
  flex: 1.6 1 0;
  color: #fdfcf9; border-color: transparent;
  background: linear-gradient(135deg, #557cb3, #41618f);
  box-shadow: 0 4px 14px rgba(74, 111, 165, .20);
}
.pi-meta .pi-claim:hover:not(:disabled) { filter: brightness(1.04); }
.pi-meta button:disabled {
  color: #8b96a6; background: transparent;
  border-color: transparent; box-shadow: none; opacity: 1; cursor: default;
}
/* 积分条上「邀请 / 赠送 / 明细 / 兑换」并排：比主按钮更紧凑，保证一行放得下 */
.pi-meta { min-width: 0; }
.pi-meta .pi-mini {
  flex: 1 1 0; padding: 0 6px; min-height: 34px; font-size: 12px; border-radius: 9px;
}
.pi-meta .pi-claim { font-size: 13px; padding: 0 8px; }
@media (max-width: 340px) {
  .pi-meta { gap: 5px; }
  .pi-meta .pi-mini { font-size: 11.5px; padding: 0 4px; }
}
/* 状态区不再占一大块高度 */
.status { min-height: 0; }

/* ============================================================
   2026-11-18 视觉升级：卡片、标题、输入、按钮统一提质感
   （只改视觉，不动结构）
   ============================================================ */
body {
  background-image:
    radial-gradient(760px 520px at 6% -8%, rgba(120, 160, 214, .26), transparent 62%),
    radial-gradient(680px 480px at 100% 6%, rgba(163, 199, 238, .30), transparent 64%),
    radial-gradient(820px 560px at 50% 118%, rgba(196, 216, 244, .22), transparent 66%);
  background-attachment: fixed;
}

.card {
  max-width: 440px;
  padding: 30px 30px 26px;
  border-radius: 28px;
  background: rgba(255, 255, 255, .84);
  border: 1px solid rgba(74, 111, 165, .14);
  box-shadow: 0 24px 60px rgba(74, 111, 165, .14),
              inset 0 1px 0 rgba(255, 255, 255, .92);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute; inset: 0 0 auto; height: 5px;
  background: linear-gradient(90deg, rgba(74, 111, 165, .85), rgba(120, 160, 214, .85), rgba(178, 208, 240, .9));
}

/* 顶部只留跑步助手入口；未登录时不占高度 */
.head-bar { align-items: center; min-height: 0; padding-top: 0; }
.sign-card .head-bar:empty { display: none; }
.sign-card .who-line { margin: 4px 0 12px; }

.field { margin-bottom: 14px; }
label { font-size: 12px; color: #7b8798; letter-spacing: .05em; margin-bottom: 6px; }
input[type=text], input[type=password], input[type=number],
input[type=date], input[type=search], input[type=tel], select {
  height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(74, 111, 165, .18);
  font-size: 14.5px;
}
input:focus, select:focus {
  border-color: rgba(74, 111, 165, .55);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(74, 111, 165, .1);
}

.row { margin-top: 16px; }

/* 登录：学号与登录按钮同一行 */
.login-field { margin-bottom: 0; }
.login-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 10px; }
.login-row input { height: 46px; }
.login-row .btn-query { width: 100%; height: 46px; }
#passwordField { margin-top: 14px; }

/* 签到地点 + 常见问题 + 设置按钮：同一行，地点紧凑，按钮居右 */
.sign-meta {
  display: flex; align-items: center; gap: 8px;
  margin: 12px 0 12px;
}
/* 紧凑只读：改地点点「设置」 */
.sign-place {
  flex: 1 1 auto; min-width: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 0 10px;
  height: 38px;
  box-sizing: border-box;
  border: 1px solid rgba(74, 111, 165, .16);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(74, 111, 165, .07), rgba(178, 208, 240, .22));
  font-family: inherit; text-align: left;
  cursor: default; user-select: none;
}
.sign-place-label { flex: 0 0 auto; font-size: 11.5px; color: #7b8798; letter-spacing: .02em; }
.sign-place-value {
  flex: 1 1 auto; min-width: 0; text-align: right;
  font-size: 12.5px; color: #33517d; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 常见问题按钮：水彩青墨风格 */
.btn-faq {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 4px;
  height: 38px; padding: 0 12px;
  font-size: 12.5px; font-weight: 500; letter-spacing: .02em;
  color: #2b6e68;
  background: linear-gradient(135deg, #eef7f6, #def0ee);
  border: 1px solid rgba(56, 142, 133, .22);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(56, 142, 133, .10);
  cursor: pointer;
  transition: background .2s var(--ease), box-shadow .2s var(--ease), transform .18s var(--ease);
}
.btn-faq:hover {
  background: linear-gradient(135deg, #e2f2f0, #cdebe7);
  box-shadow: 0 4px 14px rgba(56, 142, 133, .18);
  transform: translateY(-1px);
}
.btn-faq:active { transform: translateY(0); }
.btn-faq-icon { font-size: 12px; line-height: 1; opacity: .9; }

/* 设置：实体按钮，不是文字链接 */
.btn-set {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 4px;
  height: 38px; padding: 0 13px;
  font-size: 12.5px; font-weight: 500; letter-spacing: .02em;
  color: #3f6398;
  background: linear-gradient(135deg, #eaf1fb, #dbe8f8);
  border: 1px solid rgba(74, 111, 165, .22);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(74, 111, 165, .10);
  cursor: pointer;
  transition: background .2s var(--ease), box-shadow .2s var(--ease), transform .18s var(--ease);
}
.btn-set:hover {
  background: linear-gradient(135deg, #dde9f9, #cadaf2);
  box-shadow: 0 4px 14px rgba(74, 111, 165, .18);
  transform: translateY(-1px);
}
.btn-set:active { transform: translateY(0); }
.btn-set-icon { font-size: 12px; line-height: 1; opacity: .85; }

/* 常见问题弹窗 */
.faq-card {
  max-width: 440px;
  max-height: min(85vh, 640px);
  display: flex;
  flex-direction: column;
}
.faq-modal-body {
  overflow-y: auto;
  padding: 4px 0 10px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.faq-contact-card {
  background: linear-gradient(135deg, rgba(74, 111, 165, .06), rgba(133, 205, 202, .10));
  border: 1px solid rgba(74, 111, 165, .16);
  border-radius: 12px;
  padding: 12px 14px;
}
.faq-contact-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.faq-contact-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
}
.faq-contact-k { color: #64748b; }
.faq-contact-v { color: #1e293b; font-weight: 600; }
.faq-qrcode-box {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(74, 111, 165, .16);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.faq-qrcode-box img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}
.faq-qrcode-tip { font-size: 11.5px; color: #64748b; }
.faq-contact-tips {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.5;
  color: #475569;
  background: rgba(255, 255, 255, .6);
  padding: 8px 10px;
  border-radius: 8px;
}
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.faq-item {
  background: rgba(255, 255, 255, .7);
  border: 1px solid rgba(74, 111, 165, .15);
  border-radius: 10px;
  padding: 8px 12px;
  transition: all .2s;
}
.faq-item[open] {
  background: #fff;
  border-color: rgba(74, 111, 165, .3);
  box-shadow: 0 2px 8px rgba(74, 111, 165, .08);
}
.faq-q {
  font-size: 13px;
  font-weight: 600;
  color: #243a5e;
  cursor: pointer;
  outline: none;
}
.faq-a {
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #475569;
  border-top: 1px dashed rgba(74, 111, 165, .12);
  padding-top: 6px;
}
.faq-empty, .faq-loading {
  text-align: center;
  padding: 16px;
  color: #94a3b8;
  font-size: 12.5px;
}

/* 设置弹窗内部分块 */
.set-block + .set-block { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.set-block-head {
  font-size: 12px; color: var(--blue); letter-spacing: .1em;
  margin-bottom: 10px; font-weight: 500;
}
/* 自动签到没有任何开关时，整块（含标题）一起隐藏，不留空标题 */
.set-block:has(#autoSignRow:empty) { display: none; }
.settings-actions { display: flex; gap: 10px; margin-top: 20px; }
.settings-actions button {
  flex: 1 1 auto; height: 44px; border-radius: 14px; font-size: 14.5px;
}
.settings-actions .btn-primary {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, #5b8ccb, #3f6398);
  box-shadow: 0 8px 20px rgba(74, 111, 165, .24);
}
.settings-actions .btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #5285c6, #38588a);
}
.loc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.loc-grid .field { margin-bottom: 0; }
#autoSignRow { margin: 0; gap: 8px; }
#autoSignRow:empty { display: none; }
/* 设置里的开关按钮换成淡蓝卡片式，而不是灰白小胶囊 */
#autoSignRow .btn-mini {
  height: 38px; padding: 0 14px; font-size: 13px;
  color: #3f6398;
  background: linear-gradient(135deg, #eef4fc, #e0ecfa);
  border: 1px solid rgba(74, 111, 165, .2);
  border-radius: 12px;
}
#autoSignRow .btn-mini[data-auto-sign="1"] {
  color: #fff;
  background: linear-gradient(135deg, #5b8ccb, #3f6398);
  border-color: transparent;
}
.sign-row { margin: 0; }

.btn-query {
  height: 46px;
  border-radius: 14px;
  font-size: 15px;
  letter-spacing: .08em;
  background: linear-gradient(135deg, #557cb3, #41618f);
  box-shadow: 0 10px 22px rgba(74, 111, 165, .26);
}
.btn-query:hover:not(:disabled) { filter: brightness(1.04); }
.btn-sign {
  height: 52px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .16em;
  color: #fff;
  background: linear-gradient(135deg, #5b8ccb, #3f6398);
  border: 1px solid transparent;
  box-shadow: 0 12px 26px rgba(74, 111, 165, .28);
}
.btn-sign:hover:not(:disabled) {
  background: linear-gradient(135deg, #5285c6, #38588a);
  box-shadow: 0 14px 30px rgba(74, 111, 165, .34);
}
.btn-sign:disabled { color: #a9bccb; background: #f1f4f8; border-color: #e6ecf3; box-shadow: none; }

.sign-row { margin: 0; }
.row.tight { gap: 8px; }
.row.tight .btn-mini { border-radius: 12px; }

/* 公告与状态 */
.ann-box {
  border-radius: 16px;
  border-color: rgba(74, 111, 165, .2);
  background: linear-gradient(150deg, rgba(120, 160, 214, .14), rgba(255, 255, 255, .62) 62%);
}
.status {
  border-radius: 16px;
  background: rgba(255, 255, 255, .72);
  border-color: rgba(74, 111, 165, .14);
  padding: 12px 15px;
}
.modal-card { border-radius: 24px; }
.modal-backdrop { backdrop-filter: blur(5px); }

@media (max-width: 480px) {
  body { padding: 16px 12px; }
  .card { padding: 22px 18px 20px; border-radius: 24px; }
  .pi-card { gap: 10px; padding: 12px 13px; }
  .points-number { font-size: 24px; }
  .pi-meta { gap: 7px; }
  .pi-meta button { padding: 0 12px; }
}
@media (max-width: 370px) {
  .login-row { grid-template-columns:1fr; }
  .loc-grid { grid-template-columns:1fr; }
  .pi-meta button { padding: 0 10px; font-size: 12.5px; }
}

/* 桌面保留清晰的工具页比例，不把签到框缩成狭窄的小卡片 */
@media (min-width: 761px) {
  body:has(.sign-card) { padding-top:40px; padding-bottom:72px; }
  .sign-card { max-width:520px; padding:28px 30px 24px; }
}

/* ---------- 首次登录：邀请码卡片（极简：标题 / 一个输入框 / 提交 / 右上角跳过） ---------- */
.invite-card {
  position: relative;
  width: min(88vw, 320px);
  padding: 42px 24px 26px;
  border: 1px solid rgba(74, 111, 165, .14);
  border-radius: var(--radius-lg);
  background: var(--panel-solid);
  box-shadow: var(--shadow-bloom);
  text-align: center;
  animation: inviteIn .26s var(--ease);
}
@keyframes inviteIn {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

.invite-skip {
  position: absolute;
  top: 10px;
  right: 12px;
  padding: 6px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.invite-skip:hover {
  color: var(--blue);
  background: rgba(74, 111, 165, .07);
  transform: none;
  box-shadow: none;
}

.invite-field {
  position: relative;
  width: 100%;
}

.invite-input {
  display: block;
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--input-line);
  border-radius: 12px;
  background: var(--input-bg);
  color: var(--ink-strong);
  font-family: inherit;
  font-size: 16px;              /* 16px 以下 iOS 会自动放大页面 */
  letter-spacing: .14em;
  text-align: center;
  outline: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.invite-input:focus {
  border-color: rgba(74, 111, 165, .45);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(74, 111, 165, .09);
}

/* 占位提示代替 placeholder 属性（项目规范禁止 placeholder） */
.invite-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 15px;
  letter-spacing: .02em;
  pointer-events: none;
  transition: opacity .15s var(--ease);
}
/* 只有真正填了内容才隐藏提示；聚焦时不隐藏，否则一打开就是空框 */
.invite-field.has-value .invite-hint { opacity: 0; }

.invite-submit {
  display: block;
  width: 100%;
  height: 46px;
  margin-top: 12px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #5b7fb4, #4a6fa5);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  letter-spacing: .06em;
  cursor: pointer;
  transition: filter .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
  box-shadow: 0 6px 16px rgba(74, 111, 165, .22);
}
.invite-submit:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(74, 111, 165, .26);
}
.invite-submit:active { transform: translateY(0); }
.invite-submit:disabled { opacity: .55; cursor: default; transform: none; box-shadow: none; }


/* ============================================================
   签到页「跑步面板」（右上角「跑步」入口 → 同页弹窗）
   与跑步助手同一套水彩 token：纸白底、蓝灰主色、大圆角、柔和阴影
   ============================================================ */
.run-head-actions { display: flex; gap: 8px; flex: 0 0 auto; }

.run-loading {
  padding: 18px 4px 20px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  font-weight: 300;
}
.run-loading.err { color: var(--red); }

/* 跑步次数：数字当主角，右边「查看详细」 */
.run-count-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(74, 111, 165, .16);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(74, 111, 165, .08), rgba(178, 208, 240, .22));
}
.run-count-main { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.run-count-label { font-size: 12px; color: #7b8798; letter-spacing: .06em; }
.run-count-num {
  font-family: var(--serif);
  font-size: 30px; line-height: 1; font-weight: 500; color: #33517d;
}

.run-note {
  margin: 10px 2px 0;
  font-size: 12px; line-height: 1.7; font-weight: 300; color: var(--muted);
}
.run-note.err { color: var(--red); }

/* 模式：晨跑 / 课外跑 */
.run-mode-switch {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  padding: 4px; margin-bottom: 12px;
  background: rgba(74, 111, 165, .07);
  border-radius: 14px;
}
.run-mode-btn {
  height: 36px; padding: 0; border: 0; border-radius: 11px;
  font-size: 13.5px; color: #5d6b7d; background: transparent; box-shadow: none;
}
.run-mode-btn:hover:not(:disabled) { transform: none; box-shadow: none; background: rgba(255, 255, 255, .6); }
.run-mode-btn.active {
  color: #33517d; font-weight: 500;
  background: #fff; box-shadow: 0 2px 8px rgba(74, 111, 165, .16);
}

.run-date-field { margin-bottom: 10px; display: grid; grid-template-columns: minmax(0, 1fr); }
/* 手机浏览器的日期控件自带一个很大的固有宽度，会把弹窗顶宽、框冲出卡片：
   网格轨道 minmax(0,1fr) + min-width:0 让它严格跟随容器。 */
.run-date-field input[type=date],
.run-date-field input[type=text] {
  width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box;
}
.run-cost {
  margin: 0 0 12px; font-size: 12.5px; color: var(--muted); font-weight: 300;
}
.run-cost.warning { color: var(--red); }

#btnRunBind, #btnRunUpload, #btnRunPhoneSubmit {
  display: block; width: 100%; height: 44px; padding: 0;
  border: 0; border-radius: 14px;
  color: #fdfcf9; font-size: 15px; letter-spacing: .06em;
  background: linear-gradient(135deg, #5b8ccb, #3f6398);
  box-shadow: 0 6px 18px rgba(74, 111, 165, .22);
}
#btnRunBind:hover:not(:disabled), #btnRunUpload:hover:not(:disabled),
#btnRunPhoneSubmit:hover:not(:disabled) { filter: brightness(1.05); }

/* 绑定学籍：固定信息只读展示 */
.bind-fixed {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px;
  margin-bottom: 14px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 16px;
  background: rgba(255, 255, 255, .6);
}
.bind-fixed small { display: block; font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.bind-fixed strong { font-size: 13.5px; color: var(--ink-strong); font-weight: 500; }
.bind-code-row { display: grid; grid-template-columns: minmax(0, 1fr) 118px; gap: 8px; }
.bind-code-row .btn-mini { height: 46px; padding: 0 8px; font-size: 12.5px; border-radius: 14px; }

/* 查看详细：有效 / 无效 */
.run-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.run-tab {
  flex: 1; height: 34px; padding: 0; border-radius: 12px;
  font-size: 13px; color: #5d6b7d;
  background: rgba(74, 111, 165, .07);
  border: 1px solid transparent;
}
.run-tab:hover:not(:disabled) { transform: none; box-shadow: none; }
.run-tab.active { color: #33517d; background: #fff; border-color: rgba(74, 111, 165, .22); }
.run-records-list {
  max-height: 46vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 6px;
}
.run-record-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .62);
  font-size: 13px; color: var(--ink-strong);
}
.run-record-day { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run-record-tag {
  flex: 0 0 auto; font-size: 11.5px; padding: 2px 8px; border-radius: 999px;
}
.run-record-tag.ok { color: #34695f; background: rgba(79, 148, 139, .16); }
.run-record-reason { flex: 0 0 auto; max-width: 55%; font-size: 12px; color: var(--red); text-align: right; }
.run-record-empty { padding: 18px 0; text-align: center; font-size: 12.5px; color: var(--muted); }

/* 设置：自动跑步 */
.run-auto-mode { margin-top: 12px; margin-bottom: 0; }
#btnAutoRunToggle {
  color: #fdfcf9; background: linear-gradient(135deg, #5b8ccb, #3f6398);
  border-radius: 12px;
}
#btnAutoRunToggle[aria-pressed="true"] { background: linear-gradient(135deg, #6f9d94, #4f948b); }
#btnAutoRunToggle:disabled { opacity: .55; }

/* 面板里「跑步次数」和「上传跑步」两块之间留出分隔，别贴在一起 */
.run-panel .set-block { margin-top: 16px; }
.run-note + .set-block { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
#btnRunUnbindPhone { display: block; width: 100%; height: 42px; padding: 0; }
#btnAutoRunToggle { height: 38px; padding: 0 18px; }

/* 右上角跑步入口现在是 <button>（不再跳转），补齐按钮基类的重置，保持原来的圆形图标外观 */
button.run-link {
  flex: 0 0 auto; width: 42px; height: 42px; padding: 0;
  border-radius: 50%; border: 1px solid rgba(74, 111, 165, .22);
  font-size: 19px; line-height: 1; color: #3f6398;
  background: #e8f0fb;
}

/* ============================================================
   首屏加载：慢网络下先只出这一屏，资源齐了再由 app.js 放行登录页
   （不铺背景色，直接叠在 body 的水彩底纹上，放行时没有底色跳变）
   ============================================================ */
.boot-loading {
  position: fixed; inset: 0; z-index: 90;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  color: var(--muted); font-size: 13px; letter-spacing: .08em;
  pointer-events: none;
}
.boot-spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid rgba(74, 111, 165, .18);
  border-top-color: var(--blue);
  animation: bootSpin .9s linear infinite;
}
@keyframes bootSpin { to { transform: rotate(360deg); } }
