/* IPA Learner - 样式文件 | Mobile-First Design */

/* ========== 基础样式 ========== */
:root {
    --primary-color: #4CAF50;
    --primary-hover: #388E3C;
    --success-color: #66BB6A;
    --warning-color: #FFA726;
    --error-color: #EF5350;
    --bg-light: #f0f4f8;
    --bg-dark: #1a1a2e;
    --card-light: #ffffff;
    --card-dark: #16213e;
    --text-light: #2c3e50;
    --text-dark: #e8e8e8;
    --border-light: #dce1e6;
    --border-dark: #0f3460;

    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --card-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
    --transition-speed: 0.25s;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;

    /* 移动端底部导航高度 */
    --bottom-nav-h: 60px;
    /* iPhone 安全区（估算，运行时动态精确） */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 20px);
    --safe-bottom-px: 34px;
}

/* 亮色主题 */
body.light-theme {
    --bg: var(--bg-light);
    --card: var(--card-light);
    --text: var(--text-light);
    --border: var(--border-light);
}

/* 暗色主题 */
body.dark-theme {
    --bg: var(--bg-dark);
    --card: var(--card-dark);
    --text: var(--text-dark);
    --border: var(--border-dark);
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    transition: background var(--transition-speed), color var(--transition-speed);
    /* 移动端：禁止横向滚动 */
    overflow-x: hidden;
    /* iOS平滑滚动 */
    -webkit-overflow-scrolling: touch;
}

/* ========== 顶部导航（桌面端） ========== */
header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 10px 16px;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    /* 安全区 */
    padding-top: calc(10px + var(--safe-top));
}

.logo {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    letter-spacing: -0.3px;
}

/* ========== 返回主页按钮 ========== */
.home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 18px;
    text-decoration: none;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 8px;
    transition: background 0.2s;
    flex-shrink: 0;
}
.home-btn:hover {
    background: rgba(76, 175, 80, 0.2);
}

nav {
    display: none; /* 移动端：隐藏顶部导航，用底部导航 */
}

/* ========== 设置按钮（右上角） ========== */
.settings-btn button {
    background: transparent;
    border: none;
    font-size: 22px;
    cursor: pointer;
    padding: 6px 8px;
    line-height: 1;
}

/* ========== 设置面板 ========== */
.settings-panel {
    position: fixed;
    top: calc(50px + var(--safe-top));
    right: 12px;
    left: 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    z-index: 200;
    /* 安全区 */
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.settings-panel.hidden { display: none; }

.settings-content h3 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    gap: 10px;
}

.setting-item:last-child { border-bottom: none; }

.setting-item label {
    font-size: 14px;
    flex: 1;
}

.setting-item input[type="range"] {
    width: 100px;
    flex-shrink: 0;
}

#speed-value {
    font-size: 12px;
    color: var(--primary-color);
    min-width: 36px;
    text-align: right;
}

.toggle-group {
    display: flex;
    gap: 4px;
}

.theme-btn {
    flex: 1;
    padding: 6px 8px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    text-align: center;
    color: var(--text);
}

.theme-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 26px;
    flex-shrink: 0;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--border);
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .toggle-slider { background-color: var(--primary-color); }
input:checked + .toggle-slider:before { transform: translateX(18px); }

/* ========== 离线提示 ========== */
.offline-banner {
    background: var(--warning-color);
    color: white;
    text-align: center;
    padding: 8px 16px;
    font-size: 13px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 150;
}

.offline-banner.hidden { display: none; }

/* ========== 主内容区（留出顶部导航高度） ========== */
main {
    padding-top: calc(50px + var(--safe-top));
    padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom-px) + 10px);
    min-height: 100vh;
}

.tab-content {
    display: none;
    padding: 12px;
}

.tab-content.active { display: block; }

/* ========== 底部导航（移动端核心改进） ========== */
.bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card);
    border-top: 1px solid var(--border);
    z-index: 100;
    padding-bottom: var(--safe-bottom);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
}

.bottom-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    gap: 2px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text);
    opacity: 0.5;
    font-size: 10px;
    font-family: inherit;
    transition: opacity var(--transition-speed), color var(--transition-speed);
    min-height: 48px;
    /* iOS:active效果 */
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav-btn .nav-icon {
    font-size: 22px;
    line-height: 1;
}

.bottom-nav-btn.active {
    opacity: 1;
    color: var(--primary-color);
}

.bottom-nav-btn:active {
    opacity: 0.6;
}

/* ========== 筛选栏 ========== */
.filter-bar {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    margin-bottom: 12px;
    padding: 10px 12px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    /* iOS隐藏滚动条 */
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.filter-bar::-webkit-scrollbar { display: none; }

.filter-btn {
    flex-shrink: 0;
    padding: 5px 12px;
    background: transparent;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    color: var(--text);
    transition: all var(--transition-speed);
    white-space: nowrap;
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ========== 音标卡片网格 ========== */
.phoneme-grid {
    display: grid;
    /* iPhone 15 Pro 宽度约393px，每格约82px，4列 */
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.phoneme-card {
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 4px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-speed);
    box-shadow: var(--card-shadow);
    /* 最小触摸目标44px */
    min-height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.phoneme-card:active {
    transform: scale(0.95);
    box-shadow: var(--card-shadow-hover);
}

.phoneme-card:hover { border-color: var(--primary-color); }

.phoneme-card.mastered {
    border-color: var(--success-color);
    background: linear-gradient(135deg, var(--card) 0%, rgba(39, 174, 96, 0.08) 100%);
}

.phoneme-card.familiar {
    border-color: var(--warning-color);
}

.phoneme-card.learning {
    border-color: var(--primary-color);
}

.phoneme-symbol {
    font-size: 24px;
    font-weight: 600;
    color: var(--text);
    font-family: 'Times New Roman', serif;
    line-height: 1.1;
}

.phoneme-example {
    font-size: 10px;
    color: var(--text);
    opacity: 0.6;
    margin-top: 2px;
    line-height: 1.2;
}

.phoneme-status {
    font-size: 9px;
    margin-top: 2px;
}

.phoneme-status.mastered { color: var(--success-color); }
.phoneme-status.familiar { color: var(--warning-color); }
.phoneme-status.learning { color: var(--primary-color); }

/* ========== 音标详情弹窗（移动端优化：底部滑出） ========== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 300;
    /* iOS动效 */
    -webkit-backdrop-filter: blur(2px);
}

.modal.hidden { display: none; }

.modal-content {
    background: var(--card);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 20px 16px;
    padding-bottom: calc(20px + var(--safe-bottom-px));
    width: 100%;
    max-width: 600px;
    box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.2);
    /* 底部滑入动画 */
    animation: slideUp 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0.6; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--bg);
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    /* iOS最小触摸目标 */
    min-width: 44px;
    min-height: 44px;
    top: calc(var(--safe-top) + 8px);
    right: 12px;
}

.modal-phoneme { text-align: center; margin-bottom: 16px; }

.modal-symbol {
    font-size: 56px;
    font-weight: 700;
    font-family: 'Times New Roman', serif;
    color: var(--primary-color);
}

.modal-info h3 {
    margin: 0 0 6px 0;
    font-size: 16px;
    font-weight: 600;
}

.modal-desc {
    font-size: 13px;
    color: var(--text);
    opacity: 0.75;
    margin-bottom: 12px;
    line-height: 1.5;
}

.modal-example {
    padding: 12px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}

.modal-example .label {
    font-size: 11px;
    color: var(--text);
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.example-word {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    margin-top: 4px;
}

.example-ipa {
    font-size: 13px;
    color: var(--text);
    opacity: 0.7;
    font-family: 'Times New Roman', serif;
}

/* ========== 音频按钮（移动端优化） ========== */
.modal-audio-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.audio-btn {
    width: 100%;
    padding: 14px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    transition: background var(--transition-speed);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    /* iOS最小触摸目标 */
    min-height: 48px;
}

.audio-btn:active {
    background: var(--primary-hover);
    transform: scale(0.98);
}

.audio-btn.playing {
    background: var(--success-color);
}

.audio-source {
    font-size: 10px;
    color: var(--warning-color);
    text-align: center;
    opacity: 0.8;
}

/* ========== 状态按钮 ========== */
.modal-progress {
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.modal-progress h4 {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: var(--text);
    opacity: 0.6;
}

.status-buttons {
    display: flex;
    gap: 8px;
}

.status-btn {
    flex: 1;
    padding: 10px 8px;
    background: transparent;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    color: var(--text);
    transition: all var(--transition-speed);
    min-height: 44px;
}

.status-btn:active {
    transform: scale(0.96);
}

.status-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ========== 练习模块（移动端优化） ========== */
.practice-menu {
    text-align: center;
    padding: 10px 0;
}

.practice-menu h2 {
    margin: 0 0 16px 0;
    font-size: 18px;
}

.practice-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.practice-card {
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    cursor: pointer;
    transition: all var(--transition-speed);
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    /* iOS最小触摸目标 */
    min-height: 72px;
}

.practice-card:active {
    transform: scale(0.98);
}

.practice-card.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--card) 0%, rgba(74, 144, 217, 0.06) 100%);
}

.practice-icon {
    font-size: 36px;
    flex-shrink: 0;
}

.practice-card h3 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 600;
}

.practice-card p {
    font-size: 12px;
    color: var(--text);
    opacity: 0.65;
    margin: 0;
}

.difficulty-selector, .practice-range {
    margin-bottom: 16px;
    padding: 12px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
}

.difficulty-selector h3, .practice-range h3 {
    font-size: 13px;
    margin: 0 0 8px 0;
    opacity: 0.6;
}

.difficulty-options, .range-options {
    display: flex;
    gap: 8px;
}

.diff-btn, .range-btn {
    flex: 1;
    padding: 10px 8px;
    background: transparent;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    color: var(--text);
    min-height: 44px;
    transition: all var(--transition-speed);
}

.diff-btn:active, .range-btn:active { transform: scale(0.96); }

.diff-btn.active, .range-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.primary-btn {
    width: 100%;
    padding: 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 17px;
    font-weight: 600;
    font-family: inherit;
    transition: background var(--transition-speed);
    min-height: 52px;
    /* iOS大字体按钮 */
    letter-spacing: 0.3px;
}

.primary-btn:active {
    background: var(--primary-hover);
    transform: scale(0.98);
}

.secondary-btn {
    display: none; /* 移动端：隐藏文字按钮，用主按钮 */
}

/* 练习进行中 */
.practice-active { padding: 12px; }

.practice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--card);
    border-radius: var(--radius);
    margin-bottom: 12px;
    box-shadow: var(--card-shadow);
}

.quit-btn {
    padding: 8px 16px;
    background: var(--error-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    min-height: 36px;
}

.practice-question {
    text-align: center;
    padding: 24px 16px;
    background: var(--card);
    border-radius: var(--radius);
    margin-bottom: 12px;
    box-shadow: var(--card-shadow);
}

.practice-question .question-symbol {
    font-size: 48px;
    font-family: 'Times New Roman', serif;
}

.practice-question .question-text {
    font-size: 15px;
    margin-top: 10px;
    opacity: 0.7;
}

.practice-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.option-btn {
    padding: 16px 8px;
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 18px;
    font-family: 'Times New Roman', serif;
    transition: all var(--transition-speed);
    box-shadow: var(--card-shadow);
    min-height: 60px;
    color: var(--text);
}

.option-btn:active {
    transform: scale(0.96);
}

.option-btn.correct {
    border-color: var(--success-color);
    background: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
}

.option-btn.wrong {
    border-color: var(--error-color);
    background: rgba(231, 76, 60, 0.1);
    color: var(--error-color);
}

.practice-feedback {
    text-align: center;
    padding: 14px;
    background: var(--card);
    border-radius: var(--radius);
    margin-top: 12px;
    font-size: 14px;
}

.practice-feedback.hidden { display: none; }

/* 练习结果 */
.practice-result {
    text-align: center;
    padding: 16px 0;
}

.practice-result h2 { margin: 0 0 16px 0; font-size: 18px; }

.result-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 20px;
}

.stat-item { text-align: center; }

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
}

.stat-label {
    font-size: 12px;
    color: var(--text);
    opacity: 0.6;
}

.result-details {
    max-width: 600px;
    margin: 0 auto 20px;
    text-align: left;
    background: var(--card);
    border-radius: var(--radius);
    padding: 12px;
    box-shadow: var(--card-shadow);
    max-height: 200px;
    overflow-y: auto;
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-actions .primary-btn {
    margin-bottom: 0;
}

/* ========== 进度模块（移动端优化） ========== */
.progress-overview {
    padding: 14px;
    background: var(--card);
    border-radius: var(--radius);
    margin-bottom: 12px;
    box-shadow: var(--card-shadow);
}

.progress-overview h2 {
    margin: 0 0 14px 0;
    font-size: 16px;
}

.progress-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.progress-card {
    text-align: center;
    padding: 12px 4px;
    background: var(--bg);
    border-radius: var(--radius-sm);
}

.progress-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
}

.progress-label {
    font-size: 11px;
    color: var(--text);
    opacity: 0.6;
}

.progress-bar-container {
    background: var(--border);
    border-radius: 10px;
    height: 18px;
    position: relative;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--success-color) 100%);
    border-radius: 10px;
    transition: width 0.5s;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    font-weight: 600;
    color: white;
}

.weak-phonemes, .practice-history, .daily-review {
    padding: 14px;
    background: var(--card);
    border-radius: var(--radius);
    margin-bottom: 12px;
    box-shadow: var(--card-shadow);
}

.weak-phonemes h3, .practice-history h3, .daily-review h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
}

.weak-phoneme-list {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.weak-phoneme-item {
    padding: 6px 12px;
    background: var(--bg);
    border-radius: 6px;
    font-family: 'Times New Roman', serif;
    font-size: 16px;
    cursor: pointer;
    color: var(--text);
    /* iOS最小触摸目标 */
    min-height: 36px;
    display: flex;
    align-items: center;
}

.weak-phoneme-item:active {
    background: var(--primary-color);
    color: white;
}

.empty-hint {
    color: var(--text);
    opacity: 0.4;
    text-align: center;
    font-size: 13px;
}

/* ========== iPhone 特定优化 ========== */
/* iPhone 15 Pro (390px宽) */
@media (min-width: 390px) {
    .phoneme-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .phoneme-symbol { font-size: 26px; }
    .modal-symbol { font-size: 60px; }
}

/* ========== 平板/桌面端 ========== */
@media (min-width: 768px) {
    /* 恢复顶部导航 */
    header {
        padding: 12px 20px;
    }
    .logo { font-size: 22px; }
    nav {
        display: flex;
        gap: 8px;
    }
    .bottom-nav { display: none; }
    main {
        padding-top: calc(56px + var(--safe-top));
        padding-bottom: 20px;
    }
    .settings-panel {
        left: auto;
        right: 20px;
        width: 300px;
    }
    .settings-btn button { font-size: 24px; }

    .tab-content { padding: 20px; }

    .phoneme-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 12px;
    }
    .phoneme-card {
        padding: 14px;
        min-height: 72px;
    }
    .phoneme-symbol { font-size: 32px; }
    .phoneme-example { font-size: 12px; }

    .modal-content {
        border-radius: var(--radius-lg);
        padding: 28px;
        max-height: 85vh;
        animation: none;
    }
    .modal-close {
        top: 16px;
        right: 16px;
        width: 36px;
        height: 36px;
        min-width: unset;
        min-height: unset;
    }
    .modal-symbol { font-size: 72px; }
    .modal-audio-controls { flex-direction: row; }
    .audio-btn { flex: 1; }

    .practice-menu { padding: 30px 20px; }
    .practice-options {
        flex-direction: row;
        justify-content: center;
    }
    .practice-card { padding: 24px 32px; min-height: unset; }
    .practice-icon { font-size: 44px; }
    .practice-card h3 { font-size: 17px; }
    .practice-card p { font-size: 13px; }
    .difficulty-options, .range-options { justify-content: center; }
    .diff-btn, .range-btn { padding: 8px 20px; min-height: unset; }
    .primary-btn { width: auto; padding: 14px 40px; font-size: 16px; min-height: unset; }
    .secondary-btn {
        display: inline-flex;
        padding: 14px 40px;
        background: transparent;
        color: var(--primary-color);
        border: 2px solid var(--primary-color);
        border-radius: 10px;
        cursor: pointer;
        font-size: 16px;
        font-family: inherit;
    }

    .practice-question { padding: 40px 20px; }
    .practice-question .question-symbol { font-size: 64px; }
    .practice-question .question-text { font-size: 18px; }
    .practice-options-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .option-btn { padding: 18px; font-size: 22px; min-height: unset; }

    .practice-result { padding: 30px; }
    .result-stats { gap: 40px; }
    .stat-value { font-size: 36px; }
    .result-actions { flex-direction: row; justify-content: center; }

    .progress-overview { padding: 20px; }
    .progress-overview h2 { font-size: 18px; }
    .progress-cards { grid-template-columns: repeat(3, 1fr); gap: 16px; }
    .progress-value { font-size: 30px; }
    .weak-phonemes, .practice-history, .daily-review { padding: 16px; }
    .weak-phonemes h3, .practice-history h3, .daily-review h3 { font-size: 15px; }
    .weak-phoneme-item { font-size: 18px; min-height: unset; }
}

/* ========== 大屏桌面 ========== */
@media (min-width: 1024px) {
    .phoneme-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }
    .modal-content {
        width: 480px;
    }
}

/* ========== iOS专用：禁用长按弹出菜单 ========== */
@media (hover: none) {
    .phoneme-card, .practice-card, .option-btn, .audio-btn, .status-btn {
        -webkit-touch-callout: none;
        user-select: none;
    }
}

/* ========== 辅助：无障碍focus样式 ========== */
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}

/* ========== result-details 里的历史列表 ========== */
#practice-history-list > div {
    padding: 10px;
    margin: 4px 0;
    background: var(--bg);
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    gap: 8px;
}
