* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f5f3ee;
  color: #2b2620;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 16px 16px 40px;
}
h1 { font-size: 22px; text-align: center; margin: 14px 0 6px; }
.sub { text-align: center; color: #8a8275; font-size: 13px; margin-bottom: 18px; }

.card {
  background: #fff;
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.card h2 { font-size: 16px; margin-bottom: 10px; }

.big-btn {
  display: block;
  width: 100%;
  padding: 16px;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  background: #b0342b;
  border: none;
  border-radius: 12px;
  cursor: pointer;
}
.big-btn:disabled { background: #c9c2b6; }
.big-btn.ghost { background: #fff; color: #b0342b; border: 1.5px solid #b0342b; }

.entry {
  display: block;
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 14px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.entry .t { font-size: 17px; font-weight: 600; }
.entry .d { font-size: 13px; color: #8a8275; margin-top: 6px; }

.field { margin: 14px 0; }
.field label.lbl { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.check-line { display: flex; align-items: center; gap: 8px; padding: 10px 0; font-size: 15px; }
.check-line input { width: 20px; height: 20px; }
.radio-line { display: flex; gap: 20px; padding: 8px 0; font-size: 15px; }
.radio-line label { display: flex; align-items: center; gap: 6px; }
.radio-line input { width: 18px; height: 18px; }

.progress-wrap { margin-top: 14px; display: none; }
.progress-wrap.show { display: block; }
.progress-bar { height: 10px; background: #e6e0d4; border-radius: 6px; overflow: hidden; }
.progress-bar i { display: block; height: 100%; width: 0; background: #b0342b; transition: width .2s; }
.progress-txt { font-size: 13px; color: #8a8275; margin-top: 6px; text-align: center; }

.audio-card {
  display: flex; align-items: center; gap: 12px;
  background: #fbf7f0; border: 1px dashed #d8c9b4; border-radius: 10px; padding: 12px;
}
.audio-card .ic { font-size: 26px; }
.audio-card .name { font-size: 14px; font-weight: 600; word-break: break-all; }
.audio-card .note { font-size: 12px; color: #8a8275; }

.status-line { text-align: center; font-size: 15px; margin: 14px 0; min-height: 22px; }
.spin { display: inline-block; width: 16px; height: 16px; border: 2px solid #d8c9b4; border-top-color: #b0342b; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-run { background: #eef2ff; color: #3b5bdb; }
.badge-ok { background: #e7f6ec; color: #1e7e46; }
.badge-warn { background: #fff4e0; color: #b26a00; }
.badge-err { background: #fdeaea; color: #c02424; }

.material-item { background: #fff; border-radius: 12px; padding: 14px; margin-bottom: 12px; box-shadow: 0 1px 5px rgba(0,0,0,.04); }
.material-item .row1 { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.material-item .fname { font-size: 14px; font-weight: 600; word-break: break-all; flex: 1; }
.material-item .meta { font-size: 12px; color: #8a8275; margin-top: 6px; line-height: 1.6; }
.material-item .ops { margin-top: 10px; display: flex; gap: 10px; }
.mini-btn { padding: 8px 16px; font-size: 13px; border-radius: 8px; border: 1px solid #d8c9b4; background: #fff; color: #555; cursor: pointer; }
.mini-btn.danger { border-color: #e0a9a3; color: #b0342b; }
.mini-btn:disabled { opacity: .5; }

.video-box { width: 100%; border-radius: 10px; background: #000; margin-top: 10px; }
.dl-link { display: block; text-align: center; color: #b0342b; font-weight: 600; font-size: 14px; margin-top: 10px; text-decoration: none; }

.empty { text-align: center; color: #a89e8f; padding: 40px 0; font-size: 14px; }

.wechat-tip {
  background: #ff8f1f; color: #fff; text-align: center;
  font-size: 14px; font-weight: 600; padding: 10px;
  border-radius: 10px; margin-bottom: 12px;
}

.toast {
  position: fixed; left: 50%; top: 60px; transform: translateX(-50%) translateY(-20px);
  background: rgba(0,0,0,.82); color: #fff; padding: 10px 18px; border-radius: 20px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 99;
  max-width: 86vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: rgba(176,52,43,.92); }


/* ---- 统一页头（十年 UI 规范：全局品牌一致性 + 返回首页入口） ---- */
.page-header {
  display: flex; align-items: center; gap: 10px;
  max-width: 860px; margin: 0 auto 8px; padding: 10px 0;
}
.page-header .ph-logo { width: 36px; height: 36px; object-fit: contain; flex: 0 0 auto; }
.page-header .ph-brand { font-size: 16px; font-weight: 700; color: #b0342b; flex: 1; min-width: 0; }
.page-header .ph-user { font-size: 13px; color: #2b2620; font-weight: 600; flex: 0 0 auto; }
.page-header .ph-home {
  font-size: 13px; color: #b0342b; text-decoration: none; font-weight: 600;
  padding: 6px 14px; border: 1px solid #b0342b; border-radius: 20px; background: #fff;
  flex: 0 0 auto; white-space: nowrap;
}
.page-header .ph-home:hover { background: #b0342b; color: #fff; }
.page-header .ph-admin-link {
  font-size: 12px; color: #a89e8f; text-decoration: none; font-weight: 500;
  padding: 2px 6px; border-left: 1px solid #e2d8c2; flex: 0 0 auto; white-space: nowrap;
}
.page-header .ph-admin-link:hover { color: #b0342b; }

@media (max-width: 560px) {
  .page-header { flex-wrap: wrap; row-gap: 4px; }
  .page-header .ph-user { order: 3; width: 100%; font-size: 12px; }
}
