.hidden { display: none !important; }

/* ---------------- 登录 / 注册 ---------------- */
.view { min-height: 100vh; }
.auth-wrap {
  min-height: 100vh; padding: calc(28px + env(safe-area-inset-top)) 18px 28px;
  background: linear-gradient(160deg, #eaf1ff 0%, #f6f8ff 45%, #ffffff 100%);
}
.auth-hero { text-align: center; padding: 18px 0 26px; }
.auth-logo {
  width: 68px; height: 68px; margin: 0 auto 14px; border-radius: 22px;
  background: #fff; box-shadow: 0 10px 28px rgba(47,107,255,.18);
  display: flex; align-items: center; justify-content: center; font-size: 32px;
}
.auth-hero h1 { font-size: 24px; margin: 0 0 8px; letter-spacing: .5px; }
.auth-hero p { font-size: 13px; color: var(--ink-3); margin: 0; line-height: 1.6; }

.auth-card {
  background: #fff; border-radius: 20px; padding: 8px 20px 24px;
  box-shadow: 0 12px 40px rgba(28,48,96,.10); max-width: 440px; margin: 0 auto;
}
.auth-tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.auth-tab {
  flex: 1; padding: 16px 0 12px; border: 0; background: none; cursor: pointer;
  font-size: 16px; font-weight: 600; color: var(--ink-3); position: relative;
}
.auth-tab.active { color: var(--brand); }
.auth-tab.active::after {
  content: ''; position: absolute; left: 50%; bottom: -1px; transform: translateX(-50%);
  width: 36px; height: 3px; border-radius: 3px; background: var(--brand);
}
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field i { color: var(--danger); font-style: normal; }
.field input, .field select {
  width: 100%; height: 46px; padding: 0 13px; border: 1px solid var(--line);
  border-radius: 10px; background: #fbfcff; outline: none; color: var(--ink);
  font-size: 15px; appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238792a8' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 34px;
}
.field input:focus, .field select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); background: #fff; }
.field input::placeholder { color: #aab3c5; }
.btn-lg { height: 48px; font-size: 16px; margin-top: 6px; }
.auth-tip { font-size: 12px; color: var(--ink-3); line-height: 1.65; margin: 0; }
.auth-foot { text-align: center; font-size: 12px; color: #a4aec1; margin: 22px 0 0; }

/* ---------------- 授权书 ---------------- */
.page-head { padding: calc(24px + env(safe-area-inset-top)) 20px 16px; background: #fff; border-bottom: 1px solid var(--line); }
.page-head h2 { font-size: 20px; margin: 0 0 5px; }
.page-head p { font-size: 13px; color: var(--ink-3); margin: 0; }
.consent-body { padding: 16px 16px calc(30px + env(safe-area-inset-bottom)); }
.consent-paper { background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.consent-paper h3 { text-align: center; font-size: 17px; margin: 2px 0 6px; }
.consent-meta { text-align: center; font-size: 12px; color: var(--ink-3); margin-bottom: 14px; }
.consent-text {
  white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: 13.5px;
  line-height: 1.85; color: var(--ink-2); margin: 0; max-height: 340px; overflow-y: auto;
  padding: 12px; background: #fafbfe; border: 1px solid var(--line); border-radius: 10px;
}
.sign-block { background: #fff; border-radius: var(--radius); padding: 18px; margin-top: 14px; box-shadow: var(--shadow); }
.sign-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 14px; }
#sign-canvas {
  width: 100%; height: 200px; display: block; border: 1px dashed #c9d5ee; border-radius: 12px;
  background: repeating-linear-gradient(0deg, #fff, #fff 39px, #f2f5fc 40px);
  touch-action: none; cursor: crosshair;
}
.sign-hint { font-size: 12px; color: var(--ink-3); text-align: center; margin: 9px 0 16px; }
.agree-row { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.7; color: var(--ink-2); margin-bottom: 18px; }
.agree-row input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--brand); }

/* ---------------- 主界面 ---------------- */
.app-header { background: linear-gradient(135deg, #2f6bff, #5b8cff); color: #fff; padding: calc(20px + env(safe-area-inset-top)) 18px 22px; }
.app-header-inner { display: flex; justify-content: space-between; align-items: center; }
.app-title { font-size: 20px; font-weight: 700; }
.app-sub { font-size: 12.5px; opacity: .88; margin-top: 4px; }
.signed-chip { background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.35); padding: 5px 12px; border-radius: 999px; font-size: 12px; }

.tab-panel { padding: 16px 16px calc(90px + env(safe-area-inset-bottom)); }
.card { background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 14px; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.card-label { font-size: 12px; font-weight: 700; color: var(--ink-3); letter-spacing: .5px; }
.text-content { font-size: 19px; font-weight: 600; line-height: 1.7; color: var(--ink); min-height: 56px; word-break: break-word; }
/* 朗读文本可上下滑动：长语料完整可读，手指在文本区内滑动不会带着整页跑 */
.text-content.text-scroll {
  max-height: 34vh; min-height: 92px; overflow-y: auto;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  white-space: pre-wrap; touch-action: pan-y; padding-right: 4px;
  scrollbar-width: thin; scrollbar-color: #c9d6f0 transparent;
}
.text-content.text-scroll::-webkit-scrollbar { width: 5px; }
.text-content.text-scroll::-webkit-scrollbar-thumb { background: #c9d6f0; border-radius: 4px; }
.text-scroll-hint { font-size: 11px; color: var(--ink-3); text-align: right; margin-top: 4px; }
.text-meta { font-size: 12px; color: var(--ink-3); margin-top: 10px; }

.notice { border-radius: 10px; padding: 11px 14px; font-size: 13px; line-height: 1.6; margin-bottom: 14px; }
.notice-warn { background: var(--warn-soft); color: #8a5b00; border: 1px solid #f4dcb0; }

.record-card { text-align: center; padding: 22px 16px 20px; }
.rec-status { font-size: 13px; color: var(--ink-3); }
.rec-timer { font-size: 40px; font-weight: 700; letter-spacing: 2px; font-variant-numeric: tabular-nums; margin: 6px 0 12px; }
.wave-wrap { height: 34px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.wave-bar {
  width: 62%; height: 6px; border-radius: 999px; background: #e8eefb; overflow: hidden; position: relative;
}
.wave-bar::after {
  content: ''; position: absolute; inset: 0; width: var(--level, 0%);
  background: linear-gradient(90deg, #2f6bff, #7aa2ff); border-radius: 999px; transition: width .08s linear;
}
.rec-actions { display: flex; justify-content: center; margin: 12px 0 4px; }
.rec-btn {
  width: 86px; height: 86px; border-radius: 50%; border: 0; cursor: pointer;
  background: linear-gradient(145deg, #ff5b5f, #e0353a); box-shadow: 0 10px 26px rgba(224,53,58,.32);
  display: flex; align-items: center; justify-content: center; transition: .2s ease;
}
.rec-btn:active { transform: scale(.95); }
.rec-icon { width: 30px; height: 30px; border-radius: 8px; background: #fff; }
.rec-btn.recording .rec-icon { width: 26px; height: 26px; border-radius: 5px; }
.rec-btn.recording { animation: pulse 1.5s infinite; background: linear-gradient(145deg, #51628c, #2e3c5c); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(47,107,255,.35); } 70% { box-shadow: 0 0 0 22px rgba(47,107,255,0); } 100% { box-shadow: 0 0 0 0 rgba(47,107,255,0); } }
.rec-hint { font-size: 12px; color: var(--ink-3); margin: 12px 0 0; line-height: 1.6; }
.preview-box { border-top: 1px dashed var(--line); margin-top: 18px; padding-top: 16px; }
.preview-box audio { width: 100%; height: 42px; }
.preview-actions { display: flex; gap: 10px; margin-top: 12px; }
.preview-actions .btn { flex: 1; }

.mini-stats { display: flex; gap: 10px; }
.mini-stat { flex: 1; background: #fff; border-radius: 12px; padding: 14px 10px; text-align: center; box-shadow: var(--shadow); }
.mini-stat b { display: block; font-size: 21px; color: var(--brand); }
.mini-stat span { font-size: 11.5px; color: var(--ink-3); }

.section-title { font-size: 16px; font-weight: 700; margin: 2px 0 14px; }
.section-title span { font-size: 12px; font-weight: 500; color: var(--ink-3); margin-left: 6px; }
.rec-item { background: #fff; border-radius: var(--radius); padding: 15px; box-shadow: var(--shadow); margin-bottom: 12px; }
.rec-item-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; }
.rec-item-time { font-size: 12px; color: var(--ink-3); }
.rec-item-text { font-size: 15px; font-weight: 600; line-height: 1.55; margin-bottom: 9px; word-break: break-word; }
.rec-item-meta { font-size: 12px; color: var(--ink-3); display: flex; gap: 12px; flex-wrap: wrap; }
.rec-item audio { width: 100%; height: 38px; margin-top: 10px; }
.reject-note { margin-top: 10px; background: var(--danger-soft); color: #b3282d; border-radius: 8px; padding: 9px 11px; font-size: 12.5px; line-height: 1.6; }

.profile-card { text-align: center; padding: 26px 16px; }
.profile-avatar {
  width: 62px; height: 62px; border-radius: 50%; margin: 0 auto 12px;
  background: var(--brand-soft); color: var(--brand); font-size: 26px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.profile-name { font-size: 18px; font-weight: 700; }
.profile-line { font-size: 13px; color: var(--ink-3); margin-top: 5px; }
.info-row { display: flex; justify-content: space-between; padding: 12px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.info-row:last-child { border-bottom: 0; }
.info-row span { color: var(--ink-3); }
.info-row b { font-weight: 600; }
.version-line { text-align: center; font-size: 11.5px; color: #aab3c5; margin-top: 26px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; background: rgba(255,255,255,.96); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom); backdrop-filter: blur(12px);
}
.tab-item {
  flex: 1; border: 0; background: none; padding: 9px 0 8px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 11px; color: var(--ink-3);
}
.tab-item.active { color: var(--brand); font-weight: 700; }
.tab-ico { font-size: 20px; line-height: 1.2; filter: grayscale(1); opacity: .6; }
.tab-item.active .tab-ico { filter: none; opacity: 1; }

/* ---------------- 授权书详情弹层 ---------------- */
.sheet-mask { position: fixed; inset: 0; background: rgba(16,26,48,.5); z-index: 200; display: flex; align-items: flex-end; }
.sheet { background: #fff; width: 100%; max-height: 88vh; border-radius: 20px 20px 0 0; display: flex; flex-direction: column; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 18px 12px; border-bottom: 1px solid var(--line); font-size: 16px; }
.sheet-close { border: 0; background: #f1f4fa; border-radius: 50%; width: 30px; height: 30px; cursor: pointer; color: var(--ink-2); }
.sheet-body { overflow-y: auto; padding: 16px 18px calc(24px + env(safe-area-inset-bottom)); }
.sheet-sign { background: #fafbfe; border: 1px solid var(--line); border-radius: 10px; padding: 8px; text-align: center; }
.sheet-sign img { max-width: 100%; max-height: 160px; }
.sheet-meta { font-size: 12px; color: var(--ink-3); line-height: 1.7; margin: 10px 0; }
.sheet-body .consent-text { max-height: none; }

/* ---------------- v3：自定义保密协议 ---------------- */
.agreement-empty { background: #f7f9fd; border: 1px dashed var(--line); border-radius: 12px;
  padding: 14px; font-size: 12.5px; color: var(--ink-3); text-align: center; margin-bottom: 14px; }
.agreement-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px; margin-bottom: 14px; }
.ag-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.ag-head b { font-size: 15px; color: var(--ink); }
.ag-ver { display: inline-block; margin-left: 7px; font-size: 11px; font-weight: 600;
  color: var(--brand); background: #eef4ff; border-radius: 6px; padding: 2px 6px; }
.ag-scope { flex: none; font-size: 11px; color: var(--ink-3); background: #f1f4fa;
  border-radius: 6px; padding: 3px 8px; }
.ag-body { white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: 13px;
  line-height: 1.8; color: var(--ink-2); background: #fafbfe; border: 1px solid var(--line);
  border-radius: 10px; padding: 12px; margin: 0 0 8px; max-height: 460px; overflow-y: auto; }
.ag-body.clamp { max-height: 118px; overflow: hidden; }
.ag-more { border: 0; background: none; color: var(--brand); font-size: 12.5px;
  font-weight: 600; cursor: pointer; padding: 2px 0 8px; }
.ag-attach { display: inline-block; font-size: 12.5px; color: var(--brand); margin: 0 0 10px;
  text-decoration: none; border-bottom: 1px solid #b9cdff; padding-bottom: 1px; }
.ag-check { display: flex; align-items: flex-start; gap: 9px; font-size: 12.8px;
  line-height: 1.65; color: var(--ink-2); background: #f5f8ff; border-radius: 10px;
  padding: 11px 12px; margin-top: 6px; }
.ag-check input { width: 17px; height: 17px; flex: none; margin-top: 1px; accent-color: var(--brand); }
.sheet-agreements { margin-top: 16px; }
.sheet-ag-title { font-size: 13px; font-weight: 700; margin-bottom: 8px; color: var(--ink); }
.sheet-ag-item { background: #f7f9fd; border-radius: 10px; padding: 10px 12px;
  font-size: 12px; color: var(--ink-2); line-height: 1.7; margin-bottom: 8px; }
.sheet-ag-item b { color: var(--ink); }

/* ---------------- v3：语料领取 / 任务进度 ---------------- */
.claim-badge { display: inline-block; font-size: 11.5px; font-weight: 600; color: #a86400;
  background: #fff6e6; border: 1px solid #f5dfae; border-radius: 999px;
  padding: 4px 11px; margin-bottom: 10px; }
.claim-badge.claimed { color: #137a3c; background: #eaf8ef; border-color: #bfe7cd; }
.claim-badge.muted { color: var(--ink-3); background: #f1f4fa; border-color: var(--line); }
.claim-note { font-size: 11.5px; color: var(--ink-3); line-height: 1.6; margin: 10px 0 0; }
.task-progress { margin-top: 12px; background: #f7f9fd; border-radius: 10px; padding: 10px 12px; }
.tp-bar { height: 7px; border-radius: 999px; background: #e4ebf8; overflow: hidden; }
.tp-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #2f6bff, #6ea0ff);
  transition: width .3s ease; }
.tp-fill.done { background: linear-gradient(90deg, #16a34a, #4ade80); }
.tp-text { font-size: 11.5px; color: var(--ink-3); margin-top: 6px; line-height: 1.5; }

/* ---------------- v3：有效时长 ---------------- */
.rec-effective { font-size: 13px; font-weight: 600; color: var(--brand); margin-top: 2px; }
.preview-duration { font-size: 12.5px; color: var(--ink-2); line-height: 1.6;
  background: #f5f8ff; border-radius: 9px; padding: 9px 11px; margin-top: 10px; }

/* ---------------- v4：WAV 规格 / 任务广场 / 驳回重录 ---------------- */
.spec-line { font-size: 11px; color: var(--ink-3); text-align: center; margin: 8px 0 0; line-height: 1.5; }
.square-tip { font-size: 12px; color: var(--ink-3); line-height: 1.7;
  background: #f7f9fd; border-radius: 10px; padding: 10px 12px; margin: 0 0 14px; }
.square-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px; margin-bottom: 14px; }
.sq-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sq-head b { font-size: 15px; color: var(--ink); }
.sq-note { font-size: 12.5px; color: var(--ink-2); line-height: 1.65; margin: 9px 0 0; }
.sq-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 11.5px;
  color: var(--ink-3); margin: 11px 0; }
.sq-meta span { background: #f1f5fc; border-radius: 6px; padding: 3px 7px; }
.sq-progress { margin: 0 0 12px; }
.sq-reason { font-size: 11.5px; color: var(--ink-3); text-align: center; margin-top: 8px; }
.rec-item-edited { margin-top: 10px; font-size: 12px; line-height: 1.65; color: #a86400;
  background: #fff8e9; border: 1px solid #f5e3bd; border-radius: 8px; padding: 9px 11px; }
.rec-item-edited span { display: block; color: var(--ink-3); font-size: 11.5px; margin-top: 3px; }
.retake-btn { margin-top: 10px; width: 100%; }


/* v6：自由采集「采集动作」与「按任务时长统计」 */
.action-box { margin-top: 12px; padding: 10px 12px; border: 1px solid #d5e6ff; border-radius: 10px; background: #f2f7ff; }
.action-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: #2455a0; font-weight: 600; }
.action-current { margin-top: 8px; font-size: 15px; line-height: 1.7; color: #1b2b4b; white-space: pre-wrap; word-break: break-word; }
.action-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.action-chip { min-width: 30px; height: 28px; padding: 0 8px; border-radius: 8px; border: 1px solid #c9d9f5; background: #fff; color: #2455a0; font-size: 12px; cursor: pointer; }
.action-chip.active { background: #2f6bda; border-color: #2f6bda; color: #fff; }
.task-stats-box { font-size: 13px; line-height: 1.7; }
.ts-total { padding: 8px 10px; border-radius: 8px; background: #eef6ff; color: #2455a0; margin-bottom: 10px; }
.ts-row { padding: 9px 0; border-bottom: 1px solid #e7edf8; }
.ts-row:last-child { border-bottom: 0; }
.ts-name { font-weight: 600; color: #1b2b4b; }
.ts-name span { font-size: 11px; font-weight: 400; color: #8a94a8; margin-left: 6px; }
.ts-line { font-size: 12px; color: #55627a; }
.ts-bar { height: 6px; border-radius: 4px; background: #e7edf8; margin-top: 6px; overflow: hidden; }
.ts-bar i { display: block; height: 100%; background: #2f6bda; }
.ts-empty { color: #8a94a8; font-size: 12px; padding: 8px 0; }

/* v8：去掉长提示，让朗读文本与录制按钮贴近；暂停按钮、我的录音筛选与任务文件夹 */
.alloc-tag { font-size: 11px; color: #8a94a8; }
.text-card { padding: 14px 14px 12px; margin-bottom: 8px; }
.text-card .card-head { margin-bottom: 6px; }
.text-content.text-scroll { max-height: 30vh; min-height: 76px; }
.record-card { padding: 14px 14px 16px; margin-bottom: 10px; }
.rec-timer { font-size: 36px; margin: 4px 0 8px; }
.wave-wrap { margin-bottom: 6px; }
.rec-actions { align-items: center; gap: 12px; margin: 6px 0 2px; }
.rec-btn { width: 78px; height: 78px; }
.rec-btn.paused { animation: none; background: linear-gradient(145deg, #7b879c, #56627a); }
.rec-pause { min-width: 86px; height: 42px; padding: 0 12px; font-size: 13px; }
.rec-pause.paused { color: #2455a0; border-color: #b9cdff; background: #f2f7ff; }
.spec-line { margin-top: 5px; }
.section-title { margin-bottom: 10px; }
#claim-badge, #text-scroll-hint, #current-text-meta, #task-progress, #btn-claim,
.claim-note, .square-tip { display: none !important; }

.list-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.list-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-btn {
  border: 1px solid #d7e2f5; background: #fff; color: #55627a;
  border-radius: 999px; padding: 6px 12px; font-size: 12px; cursor: pointer;
}
.filter-btn.active { background: #2f6bda; border-color: #2f6bda; color: #fff; font-weight: 600; }
.rec-folder { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 10px; overflow: hidden; }
.folder-head {
  width: 100%; display: flex; align-items: center; gap: 10px; border: 0; background: #fff;
  cursor: pointer; text-align: left; padding: 14px 15px;
}
.folder-ico { font-size: 20px; flex: none; }
.folder-main { flex: 1; min-width: 0; }
.folder-name { display: block; font-size: 14px; font-weight: 700; color: #1b2b4b; word-break: break-word; }
.folder-meta { display: block; margin-top: 3px; font-size: 11.5px; color: #8a94a8; line-height: 1.5; }
.folder-arrow { flex: none; color: #8a94a8; font-size: 14px; transition: transform .15s ease; }
.rec-folder.open .folder-arrow { transform: rotate(90deg); }
.folder-body { border-top: 1px solid #eef2f9; padding: 12px 12px 2px; background: #fbfcff; }
.folder-body .rec-item { margin-bottom: 10px; box-shadow: none; border: 1px solid #e7edf8; }
