/* 04 一起学习 */

.study { padding: 0 var(--gutter) 28px; display: flex; flex-direction: column; gap: 16px; }
.study .k { font-size: 11px; letter-spacing: .3em; }
.study .acc { color: var(--accent); }

.study-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; padding: max(50px, env(safe-area-inset-top)) 0 10px; border-bottom: 1px solid var(--rule); }
.study-head h1 { margin: 0; font-size: 26px; font-weight: 300; letter-spacing: .32em; line-height: 1.1; }
.study-head h1 + span { display: block; margin-top: 5px; font-size: 11px; letter-spacing: .25em; }
.study-head .r { display: flex; align-items: center; gap: 6px; }
.study-head .t-back { display: flex; align-items: center; gap: 2px; margin-left: -14px; }
.study-head .t-back h1 { font-size: 24px; }
.study-head .t-back h1 + span { letter-spacing: 0; font-size: 12px; }
.mode-chip { height: 28px; padding: 0 10px; border-radius: var(--r-pill); border: 1px solid var(--rule); background: var(--paper-card); display: inline-flex; align-items: center; gap: 4px; }
.mode-chip .latin { font-size: 14px; font-weight: 600; }
.mode-chip svg { width: 10px; height: 10px; fill: none; stroke: var(--ink-soft); stroke-width: 2.4; stroke-linecap: round; }

/* 大四叶草 */
.clover-stage { position: relative; width: calc(100% + 2 * var(--gutter)); margin: -4px calc(-1 * var(--gutter)) -8px; aspect-ratio: 390 / 250; }
.clover-big { position: absolute; inset: 0; width: 100%; height: 100%; }
.leaf-tag { position: absolute; font-size: 12px; color: var(--ink-soft); transform: rotate(var(--r)); white-space: nowrap; }
.leaf-tag.now { color: var(--accent); }

/* 倒计时 */
.study-timer { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.study-timer > div:first-child { display: flex; flex-direction: column; gap: 2px; }
.study-timer b { font-size: 52px; font-weight: 500; line-height: .95; letter-spacing: .02em; }
.study-timer .ctl { display: flex; gap: 8px; padding-bottom: 6px; }
.study-timer .btn { height: 38px; }
.round-btn { width: 38px; height: 38px; border-radius: 50%; background: var(--ink); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.round-btn svg { width: 13px; height: 13px; }

/* 他教你的卡片（横线纸） */
.study-card { position: relative; padding: 10px 16px 12px; border: 1px solid var(--rule); box-shadow: var(--shadow-card); background-position: 0 10px; }
.study-card p { margin: 0; font-size: 14.5px; line-height: 26px; }
.sc-head { display: flex; align-items: center; gap: 8px; min-height: 26px; }
.sc-head img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; border: 1px solid var(--rule); }
.sc-head .k { color: var(--ink-soft); }
.sc-head .r { margin-left: auto; font-size: 12px; }
.topic-chip { margin-left: auto; padding: 1px 9px; border-radius: var(--r-pill); background: var(--accent-wash); font-size: 12px; white-space: nowrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; min-height: 26px; align-items: center; }
.chips .topic-chip { margin-left: 0; }
.topic input { width: 100%; height: 40px; margin: 6px 0 4px; border: 0; border-bottom: 1.5px solid var(--rule-dash); background: transparent; outline: none; font-family: var(--font-hand); font-size: 17px; }
.topic input:focus { border-color: var(--accent-soft); }
.review-chip { margin-top: 8px; padding: 6px 12px; border-radius: var(--r-pill); background: #FBEFC9; font-size: 13px; }
.steps { display: flex; flex-direction: column; }
.step { display: flex; align-items: center; gap: 8px; min-height: 26px; font-size: 13.5px; color: var(--ink-soft); }
.step i { width: 14px; height: 14px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.step i::after { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1.2px solid var(--ink-faint); box-sizing: border-box; }
.step.cur { color: var(--ink); }
.step.cur i::after { background: var(--accent); border-color: var(--accent); }
.step.done { text-decoration: line-through; text-decoration-color: var(--rule-dash); }
.step b { font-weight: 400; font-size: 10px; letter-spacing: .2em; color: var(--accent); }
.study-card .step-text { margin-top: 2px; padding-left: 10px; border-left: 2px solid var(--accent-soft); font-size: 14px; }
.study-card .next { display: block; margin: 6px 0 0 auto; font-size: 12.5px; color: var(--ink-soft); }

/* 攒着的问题 */
.qs, .cards { display: flex; flex-direction: column; gap: 8px; }
.qs-head { display: flex; align-items: baseline; justify-content: space-between; }
.qs-head .song { font-size: 11px; letter-spacing: .3em; }
.qs-head .hand { font-size: 12px; }
.qs-list { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.qnote { padding: 7px 10px; font-size: 13px; transform: rotate(var(--r)); box-shadow: 0 2px 5px rgba(120, 100, 60, .12); text-align: left; }
.qadd { height: 34px; padding: 0 14px; border: 1px dashed var(--rule-dash); border-radius: 8px; font-size: 13px; color: var(--ink-soft); }

/* 面板里的输入 */
.study-ta textarea, .study-in input { width: 100%; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 12px; background: rgba(251, 245, 230, .8); outline: none; font-family: var(--font-hand); font-size: 15px; line-height: 1.6; resize: none; }
.study-ta textarea:focus, .study-in input:focus { border-color: var(--accent-soft); }
.study-in input { height: 44px; }
.study-btns { display: flex; gap: 10px; }
.study-btns .btn { flex: 1; height: 44px; }
.study-btns .btn-dark { flex: 1.3; }

/* 休息：他答问题 */
.answers { display: flex; flex-direction: column; gap: 8px; }
.answers .k { color: var(--ink-soft); }
.answers p { margin: 0; font-size: 13px; }
.qa { display: flex; gap: 10px; align-items: flex-start; }
.qa .qnote { flex: none; max-width: 40%; }
.his { flex: 1; min-width: 0; display: flex; gap: 7px; align-items: flex-start; }
.his img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; border: 1px solid var(--rule); flex: none; }
.his span { padding: 7px 10px; background: var(--paper-card); border: 1px solid var(--rule); border-radius: 4px 14px 14px 14px; font-size: 13px; line-height: 1.5; }
.qa-fold { display: flex; align-items: center; gap: 8px; min-height: 30px; }
.qa-fold .qnote { padding: 3px 9px; font-size: 12.5px; box-shadow: none; }
.qa-fold .soft { font-size: 12px; }
.qa-fold svg { width: 11px; height: 11px; fill: none; stroke: var(--ink-soft); stroke-width: 2; stroke-linecap: round; }

/* 出题 */
.quiz { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; border-top: 1px dashed var(--rule-dash); }
.quiz > p { margin: 0; font-size: 13px; }
.quiz-bar { display: flex; align-items: center; gap: 8px; }
.quiz-bar .song { font-size: 11px; letter-spacing: .3em; }
.quiz-bar .n { font-size: 14px; font-weight: 600; }
.quiz-bar .n span { color: var(--ink-faint); font-weight: 500; }
.dots { margin-left: auto; display: flex; gap: 4px; }
.quiz-bar .dots i { width: 18px; height: 5px; border-radius: 3px; }
.score .dots i, .field .dots i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid #C9BFA8; }
.qcard { padding: 14px 16px 16px; background: var(--paper-card); border: 1px solid var(--rule); border-top: 3px solid var(--accent-soft); box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 12px; }
.qcard .k { font-size: 10px; letter-spacing: .25em; }
.qcard .q { font-size: 17px; line-height: 1.5; }
.qcard.done { gap: 6px; }
.qcard.done .big { font-size: 16px; }
.qcard.done .big b { font-size: 26px; }
.qcard.done .soft { font-size: 13px; }
.opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.opt { min-height: 42px; border-radius: 10px; border: 1.3px solid var(--rule); display: flex; align-items: center; gap: 8px; padding: 6px 12px; text-align: left; }
.opt .latin { font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.opt .hand { font-size: 15px; }
.opt em { margin-left: auto; font-style: normal; font-size: 12px; white-space: nowrap; }
.opt.right { border-color: #7FAF7C; background: #E3EED9; }
.opt.right em { color: #7FAF7C; }
.opt.wrong { border-color: #D98A78; background: #F7E3DC; }
.opt.wrong span.hand { text-decoration: line-through; text-decoration-color: #D98A78; }
.opt.wrong em { color: #D98A78; }
.opt[disabled] { cursor: default; }
.grade { position: relative; padding: 10px 16px 14px; border: 1px solid var(--rule); background-position: 0 10px; }
.grade p { margin: 0; font-size: 14px; line-height: 26px; }
.grade .more { white-space: pre-line; color: var(--ink-soft); }
.verdict { margin-left: auto; font-size: 13px; }
.verdict.ok { color: #7FAF7C; }
.verdict.no { color: #D98A78; }
.card-note { position: absolute; left: -10px; bottom: -12px; padding: 4px 10px; background: #E3EED9; font-size: 12px; transform: rotate(-3deg); box-shadow: 0 2px 5px rgba(120, 100, 60, .12); }
.brk .study-btns { margin-top: 6px; }
.skip { align-self: center; font-size: 12.5px; color: var(--ink-soft); padding: 6px; }

/* 四叶草田 */
.month { display: flex; align-items: center; gap: 2px; }
.month button { width: 28px; height: 32px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-soft); }
.month button svg { width: 14px; height: 14px; stroke-width: 2; }
.month button:last-child svg { transform: scaleX(-1); }
.month button[disabled] { opacity: .35; cursor: default; }
.month .latin { font-size: 18px; font-weight: 600; }
.month .song { font-size: 12px; font-weight: 400; margin-left: 2px; }
.cal { margin: 0 -4px; }
.cal .wk { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); padding-bottom: 6px; border-bottom: 1px solid var(--rule); }
.cal .wk span { text-align: center; font-size: 11px; letter-spacing: .1em; color: var(--ink-soft); }
.cal .grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 2px; padding-top: 6px; }
.day { position: relative; height: 50px; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.day svg { margin-top: 2px; }
.day > .latin { font-size: 11px; font-weight: 600; line-height: 1; color: var(--ink-soft); }
.day em { position: absolute; right: 2px; top: 0; font-style: normal; font-size: 10px; color: var(--accent); }
.day::before { content: ""; position: absolute; top: 1px; left: 50%; width: 38px; height: 38px; margin-left: -19px; border-radius: 50%; border: 1.3px solid transparent; }
.day.today::before { border-color: var(--rule); }
.day.today > .latin { color: var(--accent); }
.day.sel::before { border-color: var(--accent); }
.day.future { opacity: .45; cursor: default; }
.field-stats { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-size: 13px; color: var(--ink-soft); }
.field-stats b { font-size: 20px; color: var(--ink); }
.field-stats b.acc { color: var(--accent); }
.score { display: flex; align-items: center; gap: 4px; min-height: 26px; font-size: 13px; }
.score b { font-size: 16px; }
.card-row { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 10px; }
.card-row::-webkit-scrollbar { display: none; }
.rcard { flex: none; width: 168px; min-height: 104px; padding: 10px 12px; background: var(--paper-card); border: 1px solid var(--rule); border-top: 3px solid var(--tint); box-shadow: 0 3px 8px rgba(120, 100, 60, .10); display: flex; flex-direction: column; gap: 6px; text-align: left; transform: rotate(-1deg); }
.rcard:nth-child(2n) { transform: rotate(1deg); }
.rcard .k { font-size: 10px; letter-spacing: .25em; }
.rcard .q { font-size: 14px; line-height: 1.5; }
.rcard .a { display: none; font-size: 13px; color: var(--accent); }
.rcard.flip .a { display: block; }
