/* 泊霖AI · 拍图配音 —— 儿童小清新风格（糖果色 + 立体按钮） */
:root {
  --blue: #3a6ff2; --blue-2: #4f8cff; --blue-bg: #e9f1ff; --blue-dark: #2f5bd1;
  --ink: #2b3246; --muted: #7b86a1; --line: #e6ebf5; --bg: #f3f8ff; --card: #fff;
  --mint: #3ecf9e; --mint-bg: #e6faf3; --mint-dark: #2fae84;
  --peach: #ff8c5a; --peach-bg: #fff1ea; --peach-dark: #e5764a;
  --lemon: #ffcf4a; --lemon-bg: #fff8dd; --lemon-dark: #e6b530;
  --grape: #9b6cf5; --grape-bg: #f1eaff;
  --pink: #ff6fae; --pink-bg: #ffeaf3;
  --orange: #e07a1f; --orange-bg: #fff4e0; --red: #ef5b6b; --green: #2fae84;
  --shadow: 0 6px 18px rgba(63, 97, 180, .10);
  --r: 22px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Nunito", "Segoe UI", Roboto, -apple-system, "Noto Sans CJK SC", sans-serif; -webkit-text-size-adjust: 100%; }
body { padding-bottom: env(safe-area-inset-bottom);
  background-image: radial-gradient(circle at 12% 18%, rgba(62,207,158,.14) 0, transparent 160px), radial-gradient(circle at 88% 6%, rgba(255,207,74,.18) 0, transparent 180px), radial-gradient(circle at 70% 90%, rgba(155,108,245,.10) 0, transparent 220px);
  background-attachment: fixed; }
button, select, input { font: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.err { color: var(--red); min-height: 1.2em; font-size: 13px; }

/* 顶栏 */
.top { position: sticky; top: 0; z-index: 20; background: linear-gradient(120deg, #4f8cff, #6ea8ff 60%, #8fd3ff); color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top)); box-shadow: 0 4px 16px rgba(79,140,255,.28); border-radius: 0 0 22px 22px; }
.brand { color: #fff; text-decoration: none; display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: .3px; }
.brand svg { background: rgba(255,255,255,.22); border-radius: 12px; padding: 5px; width: 32px; height: 32px; }
.icon-btn { background: transparent; border: 0; color: inherit; padding: 6px; border-radius: 12px; cursor: pointer; display: inline-flex; align-items: center; transition: transform .15s, background .15s; }
.icon-btn:hover { background: rgba(255,255,255,.18); transform: scale(1.08); }
.icon-btn:active { transform: scale(.94); }
#app { max-width: 820px; margin: 0 auto; padding: 16px 12px 48px; }

/* 卡片 */
.card { background: var(--card); border-radius: var(--r); padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow); border: 2px solid #fff; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 8px; }
.card-head h3 { margin: 0; font-size: 16px; color: var(--ink); flex: none; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.card-head h3::before { content: ""; width: 8px; height: 18px; border-radius: 4px; background: linear-gradient(180deg, var(--mint), var(--blue-2)); }
h1 { font-size: 24px; line-height: 1.4; margin: 0 0 8px; color: var(--ink); font-weight: 800; }
h1 b, h1 em { color: var(--blue); font-style: normal; }
h2 { margin: 0; font-size: 19px; color: var(--ink); font-weight: 800; }

/* 立体按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: #fff; color: var(--ink); padding: 10px 16px; border-radius: 16px; cursor: pointer; font-size: 14px; font-weight: 700; white-space: nowrap; box-shadow: 0 4px 0 #dbe3f3, 0 6px 14px rgba(63,97,180,.08); transition: transform .12s, box-shadow .12s, background .15s; }
.btn:hover { background: #f7faff; transform: translateY(-1px); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #dbe3f3; }
.btn.primary { background: linear-gradient(180deg, #5d97ff, #3f7cf5); color: #fff; box-shadow: 0 4px 0 var(--blue-dark), 0 8px 18px rgba(79,140,255,.35); }
.btn.primary:hover { background: linear-gradient(180deg, #6aa1ff, #4a86ff); }
.btn.primary:active { box-shadow: 0 1px 0 var(--blue-dark); }
.btn.big { padding: 16px 20px; font-size: 17px; flex: 1; border-radius: 20px; }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.link { background: none; border: 0; color: var(--blue); cursor: pointer; padding: 2px 6px; font-size: 13px; font-weight: 600; border-radius: 8px; }
.link:hover { background: var(--blue-bg); }
.link.danger { color: var(--red); }
.link.danger:hover { background: #ffecef; }

/* 口令 */
.login-card { max-width: 380px; margin: 48px auto; text-align: center; }
.login-card h2 { font-size: 22px; }
.login-card form { display: flex; gap: 8px; margin-top: 14px; }
.login-card input { flex: 1; padding: 12px 14px; border: 2px solid var(--line); border-radius: 16px; outline: none; transition: border-color .15s; }
.login-card input:focus { border-color: var(--blue-2); }

/* 首页 */
.hero { background: linear-gradient(160deg, #ffffff 0%, #f2f8ff 100%); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, rgba(255,207,74,.35), transparent 70%); pointer-events: none; }
.hero .upload-row { display: flex; gap: 12px; margin-top: 16px; }
.hero .upload-row .btn.big:not(.primary) { background: linear-gradient(180deg, #ffffff, #f3f7ff); color: var(--blue); box-shadow: 0 4px 0 #cfdcf7, 0 8px 18px rgba(79,140,255,.12); }
.drop-zone { margin-top: 12px; border: 2px dashed #c9d8f5; border-radius: 16px; padding: 14px; text-align: center; color: var(--muted); font-size: 13px; background: #fbfdff; transition: all .15s; }
.drop-zone.over { border-color: var(--mint); background: var(--mint-bg); color: var(--mint-dark); }
@media (max-width: 480px) { .drop-zone { display: none; } }

/* 记录列表 */
.job-list { list-style: none; margin: 0; padding: 0; }
.job-list li { display: flex; align-items: center; gap: 10px; padding: 11px 10px; border-radius: 14px; cursor: pointer; transition: background .15s, transform .15s; }
.job-list li:hover { background: #f3f7ff; transform: translateX(3px); }
.job-list .jt { flex: 1; font-weight: 700; }
.job-list .jm { color: var(--muted); font-size: 12px; }
.job-list .empty { color: var(--muted); font-size: 13px; cursor: default; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--blue-bg); color: var(--blue); font-size: 12px; font-weight: 700; }
.badge.es { background: var(--peach-bg); color: var(--peach-dark); }
.badge.other { background: #eef0f5; color: #777; }

/* 识别中 */
.busy-card { text-align: center; padding: 32px 16px; }
.busy-card img { max-width: 60%; max-height: 220px; border-radius: 16px; border: 3px solid #fff; box-shadow: var(--shadow); }
.spinner { width: 42px; height: 42px; border: 5px solid var(--blue-bg); border-top-color: var(--blue-2); border-right-color: var(--mint); border-radius: 50%; margin: 20px auto 12px; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#busyText { font-weight: 700; color: var(--blue); }

/* 任务页头 */
.job-top { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 12px; }
.job-top .icon-btn { color: var(--blue); background: #fff; box-shadow: var(--shadow); border-radius: 50%; width: 38px; height: 38px; justify-content: center; margin-top: 2px; }
.job-title-wrap { flex: 1; min-width: 0; }
.job-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.img-card { text-align: center; padding: 10px; }
.img-card img { max-width: 100%; max-height: 70vh; border-radius: 14px; }

/* 声音面板 */
.voice-opts { display: flex; flex-direction: column; gap: 10px; }
.opt-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.opt-row select { flex: 1; min-width: 0; max-width: 100%; text-overflow: ellipsis; }
.opt-row .seg { flex-wrap: wrap; max-width: 100%; }
.opt-label { width: 40px; color: var(--muted); font-size: 13px; flex: none; font-weight: 600; }
.seg { display: inline-flex; background: #eef3fb; border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 7px 14px; cursor: pointer; font-size: 13px; font-weight: 700; color: var(--muted); border-radius: 999px; transition: all .15s; }
.seg button:hover { color: var(--blue); }
.seg button.on { background: #fff; color: var(--blue); box-shadow: 0 2px 6px rgba(63,97,180,.18); }
select { padding: 8px 12px; border: 2px solid var(--line); border-radius: 14px; background: #fff; max-width: 100%; font-weight: 600; color: var(--ink); outline: none; }
select:focus { border-color: var(--blue-2); }
.voice-actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.progress { flex: 1; min-width: 160px; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.progress .bar { flex: 1; height: 12px; background: #eef3fb; border-radius: 999px; overflow: hidden; position: relative; }
.progress .bar::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: var(--p, 0%); background: linear-gradient(90deg, var(--mint), var(--blue-2)); border-radius: 999px; transition: width .25s; }
.tracks { margin-top: 10px; font-size: 13px; color: var(--muted); }
.tracks b { color: var(--ink); }
.engine-warn { color: var(--orange); }

/* 播放条 */
.play-card { position: sticky; top: calc(60px + env(safe-area-inset-top)); z-index: 10; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.play-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.play-row + .play-row { margin-top: 10px; }
.play-row.small { font-size: 13px; color: var(--muted); gap: 12px; }
.play-row.small select { padding: 4px 8px; font-size: 13px; border-radius: 10px; }
.play-row.small input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--mint); vertical-align: -3px; }
#btnPlayAll { background: linear-gradient(180deg, #4ad8a8, #2fbf8c); box-shadow: 0 4px 0 #23996e, 0 8px 18px rgba(62,207,158,.35); }
#btnPlayAll:active { box-shadow: 0 1px 0 #23996e; }
#btnPdf { color: var(--peach-dark); }
.ipa-bar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; flex-wrap: wrap; }
@media (max-width: 520px) {
  .play-card { padding: 12px 14px; border-radius: 18px; position: static; }
  .play-row .btn { padding: 9px 13px; font-size: 14px; border-radius: 14px; }
  .play-row + .play-row { margin-top: 7px; }
  .play-row.small { font-size: 12px; gap: 8px 12px; }
  .play-row.small select { padding: 3px 6px; font-size: 12px; }
  .sent { padding: 12px 12px 10px; }
  .sent .t { font-size: 16px; }
}

/* 句子卡 */
.sent-list { list-style: none; margin: 0; padding: 0; }
.sent { background: var(--card); border: 2px solid #fff; border-radius: var(--r); padding: 14px 14px 12px; margin-bottom: 12px; display: flex; gap: 12px; position: relative; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.sent:hover { transform: translateY(-1px); }
.sent.playing { border-color: var(--blue-2); box-shadow: 0 0 0 4px var(--blue-bg), var(--shadow); animation: pulse 1.6s ease-in-out infinite; }
.sent.looping { border-color: var(--peach); box-shadow: 0 0 0 4px var(--peach-bg), var(--shadow); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.008); } }
.sent .num { flex: none; width: 30px; height: 30px; border-radius: 50%; color: #fff; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; margin-top: 2px; box-shadow: 0 3px 0 rgba(0,0,0,.12); }
.sent:nth-child(5n+1) .num { background: var(--blue-2); }
.sent:nth-child(5n+2) .num { background: var(--mint); }
.sent:nth-child(5n+3) .num { background: var(--peach); }
.sent:nth-child(5n+4) .num { background: var(--grape); }
.sent:nth-child(5n+5) .num { background: var(--pink); }
.sent .body { flex: 1; min-width: 0; }
.sent .t { font-size: 17px; font-weight: 700; line-height: 1.5; word-break: break-word; }
.sent .zh { color: var(--muted); font-size: 13px; margin-top: 4px; }
body.hide-zh .sent .zh { display: none; }
.sent .ctl { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
.sent .ctl button { border: 0; background: #f1f5fd; border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 700; cursor: pointer; color: var(--blue); display: inline-flex; align-items: center; gap: 4px; box-shadow: 0 3px 0 #d5dff3; transition: transform .12s, box-shadow .12s, background .15s; }
.sent .ctl button:hover { background: #e7eefc; }
.sent .ctl button:active { transform: translateY(2px); box-shadow: 0 1px 0 #d5dff3; }
.sent .ctl button.on { background: var(--blue-2); color: #fff; box-shadow: 0 3px 0 var(--blue-dark); }
.sent .ctl button.loop { color: var(--peach-dark); background: var(--peach-bg); box-shadow: 0 3px 0 #f3d2c2; }
.sent .ctl button.loop.on { background: var(--peach); color: #fff; box-shadow: 0 3px 0 var(--peach-dark); }
.sent .ctl button.ai { color: var(--mint-dark); background: var(--mint-bg); box-shadow: 0 3px 0 #bfeedd; }
.sent .ctl button.ai.on { background: var(--mint); color: #fff; box-shadow: 0 3px 0 var(--mint-dark); }
.sent .ctl button.edit { color: var(--muted); background: transparent; box-shadow: none; padding: 7px 8px; }
.sent .ctl button.edit:hover { background: #f1f5fd; }
.sent .ctl button:disabled { opacity: .4; cursor: default; transform: none; }
.sent .ctl .tag { font-size: 11px; color: var(--muted); }
.sent .ctl .accseg { display: inline-flex; background: #eef3fb; border-radius: 999px; padding: 2px; gap: 2px; }
.sent .ctl .accseg button { background: transparent; box-shadow: none; padding: 4px 10px; font-size: 12px; color: var(--muted); }
.sent .ctl .accseg button.on { background: #fff; color: var(--blue); box-shadow: 0 2px 6px rgba(63,97,180,.18); }
.sent .ctl select.rate { padding: 4px 8px; font-size: 12px; border-radius: 999px; border: 1.5px solid var(--line); color: var(--muted); font-weight: 600; }
.sent .ctl select.rate.on { color: var(--peach-dark); border-color: var(--peach); background: var(--peach-bg); }

.danger-zone { text-align: center; background: transparent; border: 0; box-shadow: none; }

/* 音标 / 连读 / 语调 —— 按「英语连读发音现象 40 例」的卡片格式 */
.phon { --fall: #2563eb; --rise: #ea580c; --level: #16a34a; --fallrise: #7c3aed; --risefall: #db2777; margin-top: 6px; font-size: 12.5px; color: #374151; }
body.ipa-off .phon { display: none; }
/* 有音标时，词块行就是句子本身，普通句子行隐藏 */
body:not(.ipa-off) .sent.has-phon > .body > .t { display: none; }
.phon-top { margin-top: 0; }
.phon .pw { display: flex; flex-wrap: wrap; gap: 2px 10px; margin: 0 0 4px; align-items: flex-end; }
.phon .pwc { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.phon .pwc .pt { font-weight: 700; color: var(--ink); font-size: 17px; line-height: 1.35; cursor: pointer; border-radius: 6px; padding: 0 2px; margin-left: -2px; }
.phon .pwc .pt:hover { background: var(--blue-bg); color: var(--blue); }
.phon .pwc .pt.on { background: var(--lemon); color: #5a4400; }
.phon .pwc .pd, .phon .pwc .pc { font-family: "Charis SIL", "Doulos SIL", "Gentium Plus", "Lucida Sans Unicode", "Segoe UI", "Arial Unicode MS", sans-serif; font-size: 12.5px; line-height: 1.35; white-space: nowrap; }
.phon .pwc .pd { color: #2563eb; }
.phon .pwc .pc { color: #8a94a6; }
.phon .pwc .pc.diff { background: #fef3c7; color: #b45309; border-radius: 4px; padding: 0 3px; font-weight: 600; }
.phon .pwc .pk { font-size: 14px; line-height: 1.2; height: 17px; font-weight: 800; align-self: center; }
.phon .pwc .pk.pre { color: #c3cbd8; font-weight: 400; }
.phon .pwc .pk.tail { color: #9aa5b5; font-weight: 500; }
.phon .pwc .pk.nuc { font-size: 16px; }
.phon .pwc .pk.fall { color: var(--fall); } .phon .pwc .pk.rise { color: var(--rise); } .phon .pwc .pk.level { color: var(--level); } .phon .pwc .pk.fallrise { color: var(--fallrise); } .phon .pwc .pk.risefall { color: var(--risefall); }
.phon .pwc .sp { align-self: center; color: #cbd5e1; font-size: 18px; line-height: 1; padding-top: 12px; }
.ipa-legend { font-size: 11px; color: var(--muted); }
.ipa-legend i { font-style: normal; padding: 0 4px; border-radius: 3px; margin: 0 2px; }
.ipa-legend .l1 { color: #2563eb; } .ipa-legend .l2 { color: #8a94a6; } .ipa-legend .l3 { background: #fef3c7; color: #b45309; }
.phon .prow { margin: 3px 0; line-height: 1.55; }
.phon .tg { display: inline-block; font-size: 11px; padding: 0 7px; border-radius: 4px; background: #fff4e0; color: #b45309; border: 1px solid #f3dc9c; margin-right: 5px; vertical-align: 1px; font-weight: 700; white-space: nowrap; }
.phon .tg.tone { background: #e8effc; color: #163a7a; border-color: #c7d6f3; }
.phon .marks { font-size: 15px; font-weight: 800; color: #163a7a; font-family: "Charis SIL", "Doulos SIL", "Segoe UI", sans-serif; }
.phon .marks b.fall { color: var(--fall); } .phon .marks b.rise { color: var(--rise); } .phon .marks b.level { color: var(--level); } .phon .marks b.fallrise { color: var(--fallrise); } .phon .marks b.risefall { color: var(--risefall); }
.phon .marks i { font-style: normal; color: #94a3b8; font-weight: 500; }
.phon .marks .msep { color: #cbd5e1; padding: 0 4px; }
.phon-wait { color: var(--muted); font-style: italic; font-size: 12px; }
@media (max-width: 520px) { .phon .pw { gap: 2px 8px; } .phon .pwc .pt { font-size: 16px; } .phon .marks { font-size: 14px; } }

/* 可点的单词 */
.sent .t .w { cursor: pointer; border-radius: 6px; padding: 0 2px; transition: background .15s, color .15s; }
.sent .t .w:hover { background: var(--blue-bg); color: var(--blue); }
.sent .t .w.on { background: var(--lemon); color: #5a4400; }

/* AI 解析面板 */
.ai-panel { margin-top: 12px; border-top: 2px dashed var(--line); padding-top: 12px; }
.ai-msgs { display: flex; flex-direction: column; gap: 8px; }
.ai-msg { border-radius: 16px; padding: 10px 14px; font-size: 14px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.ai-msg.assistant { background: var(--mint-bg); border-bottom-left-radius: 4px; }
.ai-msg.user { background: var(--blue-bg); color: var(--blue); align-self: flex-end; max-width: 92%; border-bottom-right-radius: 4px; }
.ai-msg.pending { color: var(--muted); font-style: italic; }
.ai-msg .h { font-weight: 800; color: var(--mint-dark); display: block; margin-top: 4px; }
.ai-msg .k { font-weight: 700; }
.ai-ask { display: flex; gap: 8px; margin-top: 10px; }
.ai-ask input { flex: 1; padding: 10px 14px; border: 2px solid var(--line); border-radius: 999px; min-width: 0; outline: none; }
.ai-ask input:focus { border-color: var(--mint); }
.ai-ask .btn { border-radius: 999px; }
.ai-quick { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.ai-quick button { border: 0; background: #fff; border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 700; color: var(--grape); cursor: pointer; box-shadow: 0 2px 0 #e3d8fb; }
.ai-quick button:hover { background: var(--grape-bg); }
.ai-quick button:active { transform: translateY(2px); box-shadow: none; }

/* 单词释义弹层 */
.sheet .sheet-mask { position: fixed; inset: 0; background: rgba(43,50,70,.35); z-index: 60; backdrop-filter: blur(2px); }
.sheet .sheet-body { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: min(560px, 100%); max-height: 82vh; overflow: auto; background: #fff; border-radius: 24px 24px 0 0; z-index: 61; padding: 16px 18px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 30px rgba(43,50,70,.18); animation: up .22s ease-out; }
@keyframes up { from { transform: translate(-50%, 30px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
@media (min-width: 700px) { .sheet .sheet-body { bottom: auto; top: 50%; transform: translate(-50%, -50%); border-radius: 24px; max-height: 80vh; animation: none; } }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 10px; }
.icon-btn.dark { color: var(--ink); background: #f1f4fa; border-radius: 50%; width: 34px; height: 34px; justify-content: center; }
.w-head { font-size: 24px; font-weight: 800; color: var(--blue); }
.w-head small { font-size: 14px; color: var(--muted); font-weight: 600; margin-left: 6px; }
.w-pron { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.w-pron button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: #f1f5fd; border-radius: 999px; padding: 6px 14px; cursor: pointer; font-size: 14px; box-shadow: 0 3px 0 #d5dff3; transition: transform .12s, box-shadow .12s; }
.w-pron button:active { transform: translateY(2px); box-shadow: 0 1px 0 #d5dff3; }
.w-pron button b { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; background: var(--blue-2); color: #fff; font-size: 11px; align-items: center; justify-content: center; }
.w-pron button:nth-child(2) b { background: var(--mint); }
.w-pron button i { font-style: normal; color: var(--blue); font-family: "Charis SIL", "Doulos SIL", "Lucida Sans Unicode", "DejaVu Sans", serif; }
.w-sec { background: #fbfcff; border: 1.5px solid var(--line); border-radius: 14px; padding: 9px 12px; margin-bottom: 8px; }
.w-sec .lbl { font-size: 11px; color: var(--muted); margin-bottom: 3px; font-weight: 700; }
.w-sec .def { font-size: 15px; line-height: 1.6; }
.w-sec .def .pos { color: var(--mint-dark); font-weight: 800; margin-right: 6px; }
.w-note { background: var(--lemon-bg); border-color: #f6e4a0; white-space: pre-wrap; font-size: 14px; line-height: 1.6; }
.w-actions { display: flex; gap: 8px; margin-top: 6px; }
.w-actions .btn { flex: 1; border-radius: 999px; }

/* 历史抽屉 */
.drawer .drawer-mask { position: fixed; inset: 0; background: rgba(43,50,70,.35); z-index: 30; }
.drawer .drawer-body { position: fixed; top: 0; right: 0; bottom: 0; width: min(380px, 90vw); background: #fff; z-index: 31; padding: 16px; overflow: auto; padding-top: calc(16px + env(safe-area-inset-top)); border-radius: 24px 0 0 24px; box-shadow: -6px 0 30px rgba(43,50,70,.15); }

.toast { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 999px; font-size: 14px; z-index: 50; max-width: 90vw; box-shadow: 0 8px 24px rgba(43,50,70,.3); }

/* 编辑弹窗 */
.editor { position: fixed; inset: 0; background: rgba(43,50,70,.4); z-index: 40; display: flex; align-items: center; justify-content: center; padding: 16px; }
.editor .box { background: #fff; border-radius: 22px; padding: 18px; width: min(560px, 100%); box-shadow: 0 12px 40px rgba(43,50,70,.25); }
.editor textarea { width: 100%; min-height: 70px; padding: 10px 12px; border: 2px solid var(--line); border-radius: 14px; resize: vertical; outline: none; }
.editor textarea:focus { border-color: var(--blue-2); }
.editor label { display: block; font-size: 13px; color: var(--muted); margin: 8px 0 4px; font-weight: 700; }
.editor .acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.regen-list { display: flex; flex-direction: column; gap: 10px; }
.regen-list .btn { justify-content: flex-start; white-space: normal; text-align: left; }
