/* 开口练：角色、对话气泡、按住说话按钮、结果与纠错、结束页；路线上的入口 */

.speak { min-height: 100dvh; display: flex; flex-direction: column; gap: 12px; padding: calc(10px + var(--safe-t)) 16px calc(16px + var(--safe-b)); }
.speak-top { display: flex; align-items: center; gap: 10px; }
.speak-title { flex: 1; min-width: 0; font-size: 17px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.speak-left { flex: none; font-size: 13px; font-weight: 800; color: var(--muted); padding: 4px 10px; border-radius: 999px; background: var(--soft); }
.speak-progress { font-size: 13px; font-weight: 800; color: var(--muted); text-align: center; }

.avatar-wrap { display: grid; place-items: center; }
.role-avatar { width: 150px; height: 168px; filter: drop-shadow(0 6px 10px rgba(30, 35, 64, .18)); }
.role-avatar[data-mouth="2"], .role-avatar[data-mouth="3"] { transform: translateY(-1px); }

.speak-stage { display: grid; justify-items: center; gap: 10px; }
.bubble { position: relative; width: 100%; max-width: 360px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); display: grid; gap: 8px; text-align: center; }
.bubble::before { content: ""; position: absolute; top: -9px; left: 50%; width: 18px; height: 18px; background: var(--surface); transform: translateX(-50%) rotate(45deg); }
.bubble-sv { font-size: 24px; font-weight: 900; font-family: var(--font-round); overflow-wrap: anywhere; }
.bubble-zh { font-size: 13px; color: var(--muted); }
.role-line { display: grid; gap: 2px; justify-items: center; text-align: center; }
.role-line-sv { font-size: 18px; font-weight: 900; font-family: var(--font-round); overflow-wrap: anywhere; }
.role-line-zh { font-size: 13px; color: var(--muted); }
.bubble-hello { padding-bottom: 8px; border-bottom: 2px dashed var(--line); }
.speak-fb .role-line { justify-items: start; text-align: left; }
.bubble-tools { display: flex; justify-content: center; gap: 8px; }
.chip-btn { min-height: 36px; padding: 4px 12px; border-radius: 999px; border: 2px solid var(--line); background: var(--bg); color: var(--ink); font-weight: 800; font-size: 14px; }

.speak-result:empty { display: none; }
.speak-fb { padding: 14px 16px; border-radius: var(--r-md); display: grid; gap: 8px; animation: rise .22s both; }
.speak-fb.is-ok { background: var(--ok-soft); }
.speak-fb.is-bad { background: var(--lingon-soft); }
.speak-said { font-size: 18px; font-weight: 900; overflow-wrap: anywhere; }
.is-ok .speak-said { color: var(--ok-deep); }
.is-bad .speak-said { color: var(--lingon-deep); }
@media (prefers-color-scheme: dark) { .is-ok .speak-said { color: var(--ok); } .is-bad .speak-said { color: var(--lingon); } }
.speak-errors { margin: 0; padding-left: 20px; font-weight: 700; }
.speak-notezh { margin: 0; color: var(--muted); }
.speak-correct { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.speak-correct b { font-size: 17px; }
.speak-limit { margin: 0; font-weight: 800; color: var(--sun-deep); }
.speak-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }

.speak-foot { margin-top: auto; display: grid; justify-items: center; gap: 10px; }
.speak-status { min-height: 1.4em; margin: 0; color: var(--muted); font-weight: 700; text-align: center; }
.hold-btn { width: 132px; height: 132px; border-radius: 50%; border: 0; background: var(--btn); color: #fff; display: grid; place-content: center; gap: 2px; box-shadow: 0 6px 0 var(--btn-deep); touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.hold-btn:disabled { opacity: .55; }
.hold-ico { font-size: 40px; line-height: 1; }
.hold-label { font-weight: 900; font-size: 15px; }
.hold-btn.is-recording { background: var(--lingon); box-shadow: 0 2px 0 var(--lingon-deep), 0 0 0 10px var(--lingon-soft); transform: translateY(4px); }

.speak-card, .speak-end { flex: 1; display: grid; justify-items: center; align-content: center; gap: 10px; text-align: center; }
.speak-note { color: var(--muted); font-size: 14px; max-width: 26em; }
.speak-score { font-size: 20px; font-weight: 900; }
.speak-review { width: 100%; max-width: 380px; margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; text-align: left; }
.speak-review li { padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface); border-left: 5px solid var(--ok); display: grid; gap: 4px; }
.speak-review li.is-bad { border-left-color: var(--lingon); }
.review-turn { display: grid; font-size: 14px; }
.review-fix { color: var(--ok-deep); font-weight: 800; }
.review-note { color: var(--muted); font-size: 13px; }

/* 路线上的入口：问答节点标签下面一行小按钮 */
.speak-entry { align-self: flex-start; margin-top: 4px; padding: 3px 10px; border-radius: 999px; background: var(--sun-soft); color: var(--sun-deep); font-size: 13px; font-weight: 800; text-decoration: none; }
.node-label.is-left .speak-entry { align-self: flex-end; }
.speak-entry.is-done { background: var(--ok-soft); color: var(--ok-deep); }
