* { box-sizing: border-box; }
html { font-size: 17px; }
body { margin: 0; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #fdf6ec; color: #263238; padding-bottom: 100px; }
.topbar { background: radial-gradient(circle at 88% 12%, rgba(255,255,255,0.28), transparent 42%), linear-gradient(135deg, #0b8a6e, #12b5a5); color: #fff; padding: 26px 18px 22px; display: flex; justify-content: space-between; align-items: center; border-radius: 0 0 28px 28px; box-shadow: 0 6px 20px rgba(11,138,110,0.25); }
.topbar h1 { margin: 0; font-size: 1.65rem; letter-spacing: 1px; }
.topbar p { margin: 5px 0 0; font-size: 0.82rem; opacity: 0.92; }
.topbar-badge { background: rgba(255,255,255,0.25); border-radius: 20px; padding: 7px 14px; font-size: 0.9rem; white-space: nowrap; font-weight: 700; }
main { max-width: 640px; margin: 0 auto; padding: 16px; }
.view { display: block; }
.view[hidden] { display: none !important; }
.section-title { font-size: 1.1rem; font-weight: 800; margin: 20px 2px 12px; }
.muted { color: #8a94a6; font-size: 0.82rem; font-weight: 400; }
.search { width: 100%; padding: 13px 18px; font-size: 1rem; border: none; border-radius: 999px; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.06); outline: none; }
.search-results { background: #fff; border-radius: 16px; margin-top: 10px; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,0.07); }
.search-item { padding: 13px 16px; border-bottom: 1px solid #f3f4f6; }
.search-item:last-child { border-bottom: none; }
.search-item b { font-size: 1.05rem; }
.search-item span { color: #8a94a6; font-size: 0.9rem; }
.review-banner { background: linear-gradient(135deg, #fff3d6, #ffe9b8); border-radius: 18px; padding: 16px; margin-bottom: 8px; font-size: 1rem; box-shadow: 0 3px 12px rgba(245,185,63,0.25); }
.review-banner button { margin-top: 12px; }
.unit-list { display: grid; gap: 12px; }
.unit-card { position: relative; background: #fff; border-radius: 20px; padding: 16px 16px 16px 64px; border: none; cursor: pointer; text-align: left; width: 100%; font-size: 1rem; box-shadow: 0 3px 14px rgba(0,0,0,0.06); overflow: hidden; }
.unit-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--bar, #0e7a5f); }
.unit-card:nth-child(6n+1) { --bar: #0e7a5f; }
.unit-card:nth-child(6n+2) { --bar: #e8590c; }
.unit-card:nth-child(6n+3) { --bar: #1971c2; }
.unit-card:nth-child(6n+4) { --bar: #ae3ec9; }
.unit-card:nth-child(6n+5) { --bar: #d6336c; }
.unit-card:nth-child(6n) { --bar: #e67700; }
.unit-chip { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 1.05rem; }
.unit-card b { font-size: 1.08rem; }
.unit-card .meta { color: #8a94a6; font-size: 0.85rem; margin-top: 4px; }
.progress { height: 8px; background: #f0ebe0; border-radius: 4px; margin-top: 10px; overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, #0e7a5f, #12b5a5); border-radius: 4px; }
.card { background: #fff; border-radius: 26px; padding: 30px 22px 26px; text-align: center; min-height: 300px; cursor: pointer; box-shadow: 0 8px 28px rgba(0,0,0,0.08); }
.card-unit { display: inline-block; background: #eef7f3; color: #0e7a5f; border-radius: 999px; padding: 5px 14px; font-size: 0.85rem; font-weight: 700; margin-bottom: 14px; }
.card-en { font-size: 2.4rem; font-weight: 800; line-height: 1.25; word-break: break-word; letter-spacing: 0.2px; }
.card-phonetic { color: #0e7a5f; margin-top: 10px; font-size: 1.05rem; min-height: 1.4em; font-weight: 600; }
.card-sentence { margin: 20px auto 0; background: #fff8e6; border-left: 4px solid #f5b93f; border-radius: 0 12px 12px 0; padding: 12px 14px; font-size: 1rem; line-height: 1.5; color: #5d4037; text-align: left; max-width: 480px; }
.card-sentence:empty { display: none; }
.card-zh { font-size: 1.6rem; font-weight: 700; margin-top: 20px; line-height: 1.4; }
.card-sentence-zh { color: #8a94a6; font-size: 0.95rem; margin-top: 8px; }
.card-sentence-zh:empty { display: none; }
.speak-btn { margin-top: 22px; background: linear-gradient(135deg, #0e7a5f, #12b5a5); border: none; color: #fff; border-radius: 999px; padding: 12px 30px; font-size: 1.05rem; font-weight: 700; cursor: pointer; box-shadow: 0 4px 14px rgba(14,122,95,0.35); }
.reveal-btn { width: 100%; margin-top: 14px; padding: 12px; border: none; background: transparent; color: #0e7a5f; font-size: 1rem; font-weight: 600; cursor: pointer; }
.learn-actions { display: flex; gap: 12px; margin-top: 8px; }
.learn-nav { display: flex; gap: 12px; margin-top: 12px; }
.btn { border: none; border-radius: 999px; padding: 14px 16px; font-size: 1rem; font-weight: 700; cursor: pointer; flex: 1; }
.btn-wrong { background: #fdecea; color: #c92a2a; }
.btn-know { background: linear-gradient(135deg, #0e7a5f, #12b5a5); color: #fff; box-shadow: 0 4px 14px rgba(14,122,95,0.3); }
.btn-ghost { background: #fff; border: 1px solid #e8e0d0; color: #495057; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.btn-primary { background: linear-gradient(135deg, #0e7a5f, #12b5a5); color: #fff; box-shadow: 0 4px 14px rgba(14,122,95,0.3); }
.btn-danger { background: #fff; border: 1px solid #fca5a5; color: #b91c1c; }
.btn-block { width: 100%; margin-top: 12px; }
.back-btn { background: none; border: none; color: #0e7a5f; font-size: 1rem; font-weight: 700; padding: 0 0 10px; cursor: pointer; }
.learn-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-size: 1rem; font-weight: 700; }
.field-label { display: block; margin: 16px 0 8px; font-weight: 700; }
.select { width: 100%; padding: 13px; font-size: 1rem; border: none; border-radius: 14px; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.quiz-types { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quiz-type-btn { padding: 16px 8px; border-radius: 16px; border: 2px solid transparent; background: #fff; font-size: 1rem; font-weight: 600; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.quiz-type-btn.sel { border-color: #0e7a5f; background: #eef7f3; color: #0e7a5f; }
.quiz-options { display: grid; gap: 12px; margin-top: 22px; text-align: left; }
.opt-btn { padding: 15px 16px; border-radius: 16px; border: 1px solid #e8e0d0; background: #fff; font-size: 1.05rem; cursor: pointer; text-align: left; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.opt-btn.correct { background: #dcfce7; border-color: #16a34a; }
.opt-btn.wrong { background: #fdecea; border-color: #dc2626; }
.opt-btn:disabled { opacity: 1; }
.spell-input { width: 100%; padding: 15px; font-size: 1.1rem; border: 1px solid #e8e0d0; border-radius: 14px; margin-top: 22px; outline: none; }
.quiz-feedback { margin-top: 16px; font-size: 1.05rem; line-height: 1.5; font-weight: 600; }
.quiz-feedback.ok { color: #15803d; }
.quiz-feedback.no { color: #b91c1c; }
.wrong-list { display: grid; gap: 10px; }
.wrong-item { background: #fff; border-radius: 16px; padding: 13px 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.wrong-item b { font-size: 1.05rem; }
.wrong-item span { color: #8a94a6; font-size: 0.9rem; }
.mini-btn { border: 1px solid #0e7a5f; color: #0e7a5f; background: #fff; border-radius: 999px; padding: 7px 15px; cursor: pointer; white-space: nowrap; font-weight: 600; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { background: #fff; border-radius: 20px; padding: 18px; text-align: center; box-shadow: 0 3px 14px rgba(0,0,0,0.05); }
.stat b { display: block; font-size: 1.8rem; color: #0e7a5f; }
.stat span { color: #8a94a6; font-size: 0.85rem; }
.days-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.day-dot { width: 28px; height: 28px; border-radius: 8px; background: #f0ebe0; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; color: #8a94a6; }
.day-dot.done { background: #0e7a5f; color: #fff; }
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,0.96); border-top: 1px solid #f0ebe0; display: flex; z-index: 10; padding: 6px 8px 10px; }
.nav-btn { flex: 1; border: none; background: none; padding: 10px 0; font-size: 0.95rem; color: #8a94a6; cursor: pointer; border-radius: 999px; font-weight: 600; }
.nav-btn.active { color: #fff; background: linear-gradient(135deg, #0e7a5f, #12b5a5); }
.task-card { background: linear-gradient(135deg, #0b8a6e, #12b5a5); border-radius: 24px; padding: 20px; color: #fff; box-shadow: 0 8px 24px rgba(11,138,110,0.3); }
.task-head { display: flex; justify-content: space-between; align-items: center; }
.task-title { font-size: 1.25rem; font-weight: 800; }
.task-sub { font-size: 0.85rem; opacity: 0.9; margin-top: 4px; }
.ring { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ring span { background: #0e7a5f; width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 800; }
.task-rows { margin: 16px 0; background: rgba(255,255,255,0.16); border-radius: 14px; padding: 4px 14px; }
.task-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,0.15); font-size: 0.95rem; }
.task-row:last-child { border-bottom: none; }
.task-card .btn-primary { background: #fff; color: #0e7a5f; box-shadow: none; }
.task-card .btn-ghost { background: rgba(255,255,255,0.18); color: #fff; border: none; }
.task-done { text-align: center; margin-top: 12px; font-weight: 700; }
.tip-box { background: #fff8e6; border-left: 4px solid #f5b93f; border-radius: 0 14px 14px 0; padding: 13px 15px; font-size: 0.92rem; line-height: 1.55; color: #5d4037; margin-top: 18px; }
.mask-btn { width: 100%; margin-top: 14px; padding: 11px; border: 1px dashed #0e7a5f; background: #eef7f3; color: #0e7a5f; border-radius: 999px; font-size: 0.95rem; font-weight: 600; cursor: pointer; }
.grade-row { display: flex; gap: 10px; margin-top: 16px; }
.grade-btn { padding: 15px 8px; }
.grade-dont { background: #fdecea; color: #c92a2a; }
.grade-fuzzy { background: #fff3d6; color: #9a6700; }
.grade-know { background: linear-gradient(135deg, #0e7a5f, #12b5a5); color: #fff; box-shadow: 0 4px 14px rgba(14,122,95,0.3); }
.card-en.masked { letter-spacing: 8px; }
.card-family { margin: 16px auto 0; font-size: 0.92rem; color: #5d4037; background: #f4f8f6; border-radius: 12px; padding: 10px 13px; text-align: left; max-width: 480px; line-height: 1.5; }
.quiz-card { cursor: default; min-height: 260px; }
.quiz-q { color: #8a94a6; font-size: 0.95rem; margin-bottom: 10px; }
.quiz-word { font-size: 1.9rem; font-weight: 800; line-height: 1.3; word-break: break-word; }
.report-card { background: #fff; border-radius: 24px; padding: 24px 18px; box-shadow: 0 8px 28px rgba(0,0,0,0.08); }
.report-title { font-size: 1.4rem; font-weight: 800; text-align: center; margin-bottom: 18px; }
.report-line { color: #5d4037; font-size: 0.95rem; line-height: 1.55; margin: 16px 2px 4px; }
.settings-card { background: #fff; border-radius: 20px; padding: 18px; box-shadow: 0 3px 14px rgba(0,0,0,0.05); }
.settings-row { display: flex; gap: 10px; margin-top: 14px; }
.settings-row .btn { flex: 1; text-align: center; }
.file-btn { display: flex; align-items: center; justify-content: center; }
.login-card { background: #fff; border-radius: 24px; padding: 28px 22px; box-shadow: 0 8px 28px rgba(0,0,0,0.08); margin-top: 24px; }
.login-title { font-size: 1.7rem; font-weight: 800; text-align: center; }
.login-sub { color: #8a94a6; font-size: 0.92rem; line-height: 1.55; text-align: center; margin: 10px 0 4px; }
.login-error { background: #fdecea; color: #c92a2a; border-radius: 12px; padding: 10px 13px; font-size: 0.92rem; margin-top: 12px; }
.account-box { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #eef7f3; border-radius: 14px; padding: 12px 14px; margin-bottom: 6px; font-size: 0.95rem; }
.grade-btn:disabled { opacity: 0.45; }
.spell-score { text-align: center; font-weight: 800; font-size: 1.05rem; margin-bottom: 12px; color: #0e7a5f; }
.spell-card { cursor: default; }
.letter-boxes { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 22px; }
.letter-box { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 52px; padding: 0 6px; border-radius: 12px; font-size: 1.5rem; font-weight: 800; background: #fff; border: 2px solid #e8e0d0; }
.letter-box.fixed { background: #f4f8f6; border-color: #d8e5df; color: #263238; }
.letter-box.blank { border: 2px dashed #0e7a5f; background: #eef7f3; cursor: pointer; color: #0e7a5f; }
.letter-box.blank.sel { background: #d3f9d8; border-style: solid; box-shadow: 0 0 0 3px rgba(14,122,95,0.25); }
.letter-box.blank.ok { background: #dcfce7; border-color: #16a34a; border-style: solid; color: #15803d; }
.letter-box.blank.no { background: #fdecea; border-color: #dc2626; border-style: solid; color: #b91c1c; animation: shake 0.3s; }
.letter-static { display: inline-flex; align-items: center; justify-content: center; min-width: 14px; height: 52px; font-size: 1.5rem; font-weight: 800; color: #8a94a6; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.keyboard { margin-top: 18px; display: grid; gap: 8px; }
.kb-row { display: flex; gap: 6px; justify-content: center; }
.key-btn { flex: 1; max-width: 52px; padding: 12px 0; border-radius: 12px; border: none; background: #fff; font-size: 1.05rem; font-weight: 800; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.key-btn:active { background: #eef7f3; }
.key-del { max-width: 110px; flex: none; padding: 12px 16px; font-size: 0.95rem; }
.spell-actions { display: flex; gap: 12px; margin-top: 16px; }
.spell-actions .btn { flex: 1; }
.profile-head { display: flex; align-items: center; gap: 16px; margin-top: 10px; }
.profile-avatar { width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, #0b8a6e, #12b5a5); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 800; flex-shrink: 0; }
.profile-name { font-size: 1.35rem; font-weight: 800; }
.profile-sub { color: #8a94a6; font-size: 0.9rem; margin-top: 4px; }
.info-card { background: #fff; border-radius: 20px; padding: 6px 18px; box-shadow: 0 3px 14px rgba(0,0,0,0.05); }
.info-row { display: flex; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid #f3f4f6; font-size: 0.98rem; }
.info-row:last-child { border-bottom: none; }
.info-row span { color: #8a94a6; }
.pagefoot { text-align: center; padding: 20px 0 8px; font-size: 0.8rem; }
.pagefoot a { color: #b0a89a; text-decoration: none; }
