/**
 * 移动端样式 - 网点调研系统
 * 设计规范：
 * - 主色: #2563eb -> #1d4ed8 (渐变)
 * - 成功: #22c55e, 警告: #f59e0b, 危险: #ef4444, 信息: #8b5cf6
 * - 背景: #f9fafb, 表面: #ffffff, 文字: #1f2937, 次要: #6b7280, 边框: #e5e7eb
 * - 字体: PingFang SC, 无衬线
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #8b5cf6;
    --bg: #f9fafb;
    --surface: #ffffff;
    --text: #1f2937;
    --text-secondary: #6b7280;
    --border: #e5e7eb;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    background: var(--bg);
    height: var(--app-height, 100vh);
    height: 100dvh;
}

.app-shell {
    height: var(--app-height, 100vh);
    height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
}

@media (min-width: 768px) {
    .app-shell {
        max-width: 480px;
        margin: 0 auto;
        box-shadow: 0 0 24px rgba(0, 0, 0, 0.08);
    }
}

/* ===== Header ===== */
.header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    z-index: 100;
}

.header h1 {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    cursor: pointer;
    backdrop-filter: blur(2px);
    transition: background 0.2s;
}

.badge:active {
    background: rgba(255, 255, 255, 0.3);
}

.header a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    opacity: 0.9;
}

/* ===== Bottom Bar ===== */
.bottom-bar {
    flex-shrink: 0;
    padding: 10px 16px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.bottom-bar .info {
    font-size: 13px;
    color: var(--text-secondary);
}

.bottom-bar .info b {
    color: var(--primary);
    font-weight: 600;
}

.bottom-bar a {
    color: var(--primary);
    text-decoration: none;
    font-size: 13px;
}

/* ===== Map Container ===== */
#map {
    flex: 1;
    z-index: 1;
    position: relative;
}

.amap-logo,
.amap-copyright {
    display: none !important;
}

/* ===== Card ===== */
.card {
    background: var(--surface);
    border-radius: 12px;
    padding: 16px;
    margin: 12px 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
}

.card-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.1s;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}

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

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    width: 100%;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    min-height: 32px;
    font-size: 13px;
}

/* ===== Form Group ===== */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text);
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input.error {
    border-color: var(--danger);
}

.error-text {
    font-size: 12px;
    color: var(--danger);
    margin-top: 4px;
}

/* ===== Survey Form Sections ===== */
.fs {
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.fs:last-child {
    border-bottom: none;
}

.fs-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.fs-title .num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.req::after {
    content: " *必填";
    color: var(--danger);
    font-size: 12px;
}

.opt::after {
    content: " 选填";
    color: var(--text-secondary);
    font-size: 11px;
}

.hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ===== Photo Boxes ===== */
.photo-area {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.photo-box {
    width: 80px;
    height: 80px;
    border: 2px dashed var(--border);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    background: #fafafa;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    transition: border-color 0.2s;
}

.photo-box:active {
    border-color: var(--primary);
}

.photo-box .icon {
    font-size: 22px;
    line-height: 1;
}

.photo-box .label {
    font-size: 10px;
    color: var(--text-secondary);
    margin-top: 2px;
    text-align: center;
}

.photo-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.photo-box .del {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 20px;
    height: 20px;
    background: rgba(239, 68, 68, 0.9);
    color: #fff;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    z-index: 10;
    border: none;
    cursor: pointer;
    line-height: 1;
}

.photo-box.filled {
    border-style: solid;
    border-color: var(--primary);
}

.photo-box.error {
    border-style: solid;
    border-color: var(--danger);
    animation: shake 0.3s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.photo-box.filled .del {
    display: flex;
}

.photo-box.add-btn {
    border-style: dashed;
    border-color: var(--border);
    opacity: 0.7;
    min-width: 80px;
}

.photo-box.add-btn .icon {
    font-size: 24px;
    color: var(--text-secondary);
}

input[type="file"] {
    display: none;
}

/* Upload progress */
.upload-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--primary);
    transition: width 0.3s;
    z-index: 5;
}

.uploading-text {
    position: absolute;
    bottom: 4px;
    font-size: 9px;
    color: var(--primary);
    font-weight: 600;
}

/* ===== Video Section ===== */
.video-section {
    margin-bottom: 8px;
}

.video-section .timer-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.video-section .timer-display {
    font-size: 26px;
    font-weight: 700;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
    font-family: ui-monospace, SFMono-Regular, monospace;
}

.video-section .t-btn {
    padding: 8px 16px;
    border-radius: 18px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.video-section .t-btn:active {
    opacity: 0.8;
}

.video-section .t-btn.record {
    background: var(--danger);
    color: #fff;
}

.video-section .t-btn.record.stop {
    background: #fef2f2;
    color: var(--danger);
    border: 1.5px solid var(--danger);
}

/* Recording indicator */
.rec-indicator {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 20px;
    font-size: 12px;
    color: var(--danger);
    font-weight: 600;
    margin-bottom: 8px;
}

.rec-indicator.show {
    display: inline-flex;
}

.rec-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--danger);
    animation: recPulse 1.2s ease-in-out infinite;
}

@keyframes recPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(0.8);
    }
}

.rec-status {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.rec-status .status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--warning);
    border-radius: 50%;
    margin-right: 4px;
}

.rec-status .status-dot.recording {
    background: var(--danger);
    animation: recPulse 1.2s ease-in-out infinite;
}

/* Video Preview */
.video-preview {
    display: none;
    margin-top: 8px;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    position: relative;
}

.video-preview.show {
    display: block;
}

.video-preview video {
    width: 100%;
    display: block;
    max-height: 200px;
    object-fit: contain;
}

.video-preview .vid-del {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    background: rgba(239, 68, 68, 0.9);
    color: #fff;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    z-index: 10;
}

.video-preview .vid-label {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
}

/* ===== Submit Area ===== */
.submit-area {
    padding: 16px 0 calc(8px + env(safe-area-inset-bottom, 0px));
}

.submit-area .warn {
    font-size: 12px;
    color: var(--danger);
    text-align: center;
    margin-top: 8px;
    display: none;
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    max-width: 80%;
    text-align: center;
}

.toast.show {
    opacity: 1;
}

.toast-success {
    background: rgba(34, 197, 94, 0.95);
}

.toast-error {
    background: rgba(239, 68, 68, 0.95);
}

.toast-info {
    background: rgba(139, 92, 246, 0.95);
}

.toast-warning {
    background: rgba(245, 158, 11, 0.95);
}

/* ===== Alert ===== */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--danger);
}

.alert-info {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #0284c7;
}

/* ===== Status Badges ===== */
.badge-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.badge-pending {
    background: #fef3c7;
    color: #d97706;
}

.badge-approved {
    background: #dcfce7;
    color: #16a34a;
}

.badge-rejected {
    background: #fee2e2;
    color: #dc2626;
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-secondary);
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--text);
}

.empty-state p {
    font-size: 13px;
}

/* ===== Spinner ===== */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ===== Progress Bar ===== */
.progress-bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar .bar {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s;
}

/* ===== Record List ===== */
.record-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.record-item {
    background: var(--surface);
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s;
}

.record-item:active {
    background: #f3f4f6;
}

.record-item .record-no {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.record-item .point-name {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.record-item .record-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-secondary);
}

.record-item .media-summary {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* ===== Record Detail ===== */
.record-detail {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.record-header {
    padding: 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.record-header .record-no {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.record-header .record-info {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.media-grid {
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.media-card {
    background: var(--surface);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.media-card img,
.media-card video {
    width: 100%;
    display: block;
    max-height: 120px;
    object-fit: cover;
}

.media-card .media-info {
    padding: 8px 10px;
}

.media-card .media-kind {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 2px;
}

.media-card .media-meta {
    font-size: 11px;
    color: var(--text-secondary);
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    gap: 12px;
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.pagination .page-info {
    font-size: 13px;
    color: var(--text-secondary);
    min-width: 80px;
    text-align: center;
}

.pagination a {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 6px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
}

.pagination a:active {
    background: #eff6ff;
}

.pagination a:disabled,
.pagination a.disabled {
    color: var(--text-secondary);
    opacity: 0.5;
    pointer-events: none;
}

/* ===== Assignments List ===== */
.assignments-container {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.assignment-card {
    background: var(--surface);
    margin: 12px 16px;
    padding: 14px 16px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.assignment-card .point-code {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.assignment-card .point-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.assignment-card .point-category {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.assignment-card .assigned-at {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* ===== Login Page ===== */
.login-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px 24px;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header .logo {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 20px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #fff;
}

.login-header h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 6px;
}

.login-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

.login-form {
    background: var(--surface);
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.login-footer {
    text-align: center;
    margin-top: 24px;
}

.login-footer .admin-link {
    font-size: 13px;
    color: var(--text-secondary);
}

.login-footer .admin-link a {
    color: var(--primary);
    text-decoration: none;
}

.login-footer .note {
    margin-top: 16px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* ===== AMap InfoWindow Custom ===== */
.amap-info-content {
    padding: 8px 12px !important;
}

.popup-actions {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

.popup-btn {
    padding: 5px 12px;
    border-radius: 12px;
    border: none;
    font-size: 12px;
    cursor: pointer;
    font-weight: 600;
}

.popup-btn.survey {
    background: var(--primary);
    color: #fff;
}

/* ===== Photo box disabled state (during recording) ===== */
.photo-box.disabled {
    opacity: 0.4;
    filter: grayscale(0.5);
}

/* ===== Full-screen recording overlay ===== */
.rec-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #000;
    z-index: 10000;
    flex-direction: column;
}
.rec-overlay.show {
    display: flex;
}
.rec-overlay video {
    flex: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

/* 顶部栏：录制标识 + 倒计时 + 最低时长提示 */
.rec-top-bar {
    position: absolute;
    top: 0; left: 0; right: 0;
    padding: 12px 16px;
    padding-top: max(env(safe-area-inset-top, 0px), 14px);
    padding-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.35) 60%, transparent 100%);
    z-index: 2;
    pointer-events: none;
}
.rec-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(220, 38, 38, 0.18);
    border: 1px solid rgba(255, 90, 90, 0.55);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    color: #fff;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.rec-dot-big {
    display: inline-block;
    width: 9px; height: 9px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 6px #ef4444;
    animation: rec-pulse 1.2s ease-in-out infinite;
}
@keyframes rec-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(0.75); }
}
.rec-timer {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.7);
    margin-left: 2px;
}
.rec-hint {
    margin-left: auto;
    color: rgba(255,255,255,0.85);
    font-size: 12px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.7);
    text-align: right;
    max-width: 40%;
    line-height: 1.3;
}

/* 底部栏：停止按钮 */
.rec-bottom-bar {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 24px 16px;
    padding-bottom: max(env(safe-area-inset-bottom, 0px), 28px);
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.35) 60%, transparent 100%);
    z-index: 2;
}

/* 停止按钮：药丸形，多行内容 */
.rec-stop-btn {
    padding: 12px 28px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.45), 0 0 0 2px rgba(255,255,255,0.18) inset;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
}
.rec-stop-btn:active {
    transform: scale(0.96);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4), 0 0 0 2px rgba(255,255,255,0.25) inset;
}
.rec-stop-btn .stop-icon {
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 2px;
    flex-shrink: 0;
}
.rec-stop-btn .btn-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}
.rec-stop-btn .btn-main {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.rec-stop-btn .btn-hint {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.9;
    margin-top: 2px;
}

/* 禁用态：未达最低时长 */
.rec-stop-btn.disabled {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    box-shadow: 0 4px 14px rgba(0,0,0,0.4), 0 0 0 2px rgba(255,255,255,0.1) inset;
    opacity: 0.85;
}
.rec-stop-btn.disabled:active {
    transform: none;
}

/* ===== v2 新增样式 ===== */

/* 返回按钮（form.php header） */
.header-back {
    color: #fff;
    text-decoration: none;
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
    padding: 0 8px 0 0;
    min-width: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.header-back:active { opacity: 0.6; }

/* 上传状态指示器 */
.upload-status {
    width: 100%;
    min-height: 16px;
    margin-top: 4px;
    font-size: 11px;
    text-align: center;
}
.upload-status.uploading {
    color: #2563eb;
}
.upload-bar {
    width: 100%;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 2px;
}
.upload-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    transition: width 0.3s ease;
}
.upload-pct { font-weight: 600; }
.upload-status.done { color: #16a34a; }
.upload-ok { font-weight: 600; }
.upload-status.error { color: #ef4444; }
.upload-err { font-weight: 600; }

/* 录制完成后的状态 */
.timer-display.done {
    color: #16a34a;
    font-weight: 700;
}
.status-dot.ok {
    background: #16a34a;
    box-shadow: 0 0 6px #16a34a;
}

/* 重新录制按钮样式 */
.t-btn.rerecord {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* 录制中按钮样式 */
.t-btn.record.recording {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    animation: rec-btn-pulse 1.5s ease-in-out infinite;
}
@keyframes rec-btn-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
    50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

/* 错误 Modal（问题 #9）*/
.err-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 20000;
    align-items: center;
    justify-content: center;
}
.err-modal.show { display: flex; }
.err-modal-mask {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
}
.err-modal-box {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 24px 20px 16px;
    margin: 0 24px;
    max-width: 360px;
    width: calc(100% - 48px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.err-modal-title {
    font-size: 17px;
    font-weight: 700;
    color: #ef4444;
    margin-bottom: 12px;
    text-align: center;
}
.err-modal-msg {
    font-size: 14px;
    color: #374151;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: center;
    word-break: break-word;
}
.err-modal-btn {
    display: block;
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.err-modal-btn:active { background: #1d4ed8; }

/* 保存草稿按钮 */
.btn-draft {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
}
.btn-draft:active { background: #e5e7eb; }
.btn-draft:disabled { opacity: 0.6; }
