/* 中文口语课堂：手机优先。大字、大按钮、一屏一个主要动作。 */
:root {
  --bg: #f4f2ec; --card: #ffffff; --ink: #1d2522; --muted: #5b6863; --line: #e3dfd5;
  --brand: #2f6f5e; --brand-ink: #ffffff; --brand-soft: #e5f0eb; --brand-dark: #245848;
  --accent: #f0a531; --accent-soft: #fff4dc; --accent-ink: #6f4a00;
  --bad: #c2412d; --bad-soft: #fdeceA; --ok: #2b7a4b; --ok-soft: #e5f4ea; --info-soft: #ecf2fa; --info-ink: #284a73;
  --me: #2f6f5e; --me-ink: #fff; --them: #f1efe8;
  --r: 18px; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.05);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141917; --card: #1e2522; --ink: #ecf0ee; --muted: #a2b0aa; --line: #33403b;
    --brand: #4fa58a; --brand-ink: #0d1412; --brand-soft: #23362f; --brand-dark: #68bca0;
    --accent: #f0b04a; --accent-soft: #3a2f17; --accent-ink: #f6d58f;
    --bad: #ef7a64; --bad-soft: #3d201b; --ok: #6fcf97; --ok-soft: #1c3426; --info-soft: #1d2a3a; --info-ink: #b9d0ee;
    --me: #3d8b73; --me-ink: #fff; --them: #2a332f;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif; }
.hidden { display: none !important; }
h1, h2, h3 { line-height: 1.35; margin: 0 0 .5em; }
h1 { font-size: 26px; } h2 { font-size: 21px; } h3 { font-size: 17px; }
p { margin: .5em 0; }
.small { font-size: 14px; color: var(--muted); }
.center { text-align: center; }
.good { color: var(--ok); } .bad { color: var(--bad); }
.lead { font-size: 19px; }
.soft { color: var(--muted); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- 顶栏与进度 ---------- */
.bar { position: sticky; top: 0; z-index: 20; background: var(--card); border-bottom: 1px solid var(--line); padding: 10px 16px 8px; padding-top: max(10px, env(safe-area-inset-top)); }
.bar-row { display: flex; align-items: center; gap: 10px; max-width: 760px; margin: 0 auto; }
.bar-title { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-clock { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--brand); background: var(--brand-soft); border-radius: 999px; padding: 2px 12px; white-space: nowrap; }
.bar-clock:empty { display: none; }
.bar-clock.urgent { color: var(--accent-ink); background: var(--accent-soft); }
.bar-out { border: 0; background: none; color: var(--muted); font-size: 15px; padding: 6px 2px; }
.steps { display: flex; list-style: none; margin: 8px auto 0; padding: 0; gap: 4px; max-width: 760px; }
.steps li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; color: var(--muted); position: relative; }
.steps li::before { content: ""; position: absolute; top: 11px; left: -50%; right: 50%; height: 3px; background: var(--line); z-index: 0; }
.steps li:first-child::before { display: none; }
.steps li.done::before, .steps li.now::before { background: var(--brand); }
.steps .dot { position: relative; z-index: 1; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 2px solid var(--line); font-weight: 700; font-size: 13px; }
.steps li.done .dot { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.steps li.now .dot { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.steps li.now { color: var(--ink); font-weight: 700; }
body.teacher .steps { display: none; }

main { max-width: 760px; margin: 0 auto; padding: 14px 16px 40px; }
body.teacher main { max-width: 1280px; }

/* ---------- 卡片、按钮 ---------- */
.card { background: var(--card); border-radius: var(--r); padding: 20px 18px; margin-bottom: 14px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.card.narrow { max-width: 420px; margin: 24px auto; }
.card.wide { max-width: none; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.two > * { flex: 1; }
.row.end { justify-content: flex-end; }
button.primary, button.secondary, button.danger, button.stop {
  border-radius: 14px; padding: 12px 18px; font-weight: 700; border: 2px solid transparent; min-height: 50px;
  transition: transform .06s ease; }
button.primary:active, button.secondary:active, button.stop:active, .mic:active { transform: scale(.97); }
button.primary { background: var(--brand); color: var(--brand-ink); }
button.secondary { background: var(--brand-soft); color: var(--brand-dark); border-color: transparent; }
button.danger { background: var(--bad-soft); color: var(--bad); }
button.stop { background: var(--bad); color: #fff; }
button.big { width: 100%; font-size: 19px; min-height: 58px; margin: 6px 0; }
button.link { background: none; border: 0; color: var(--brand); padding: 8px 4px; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }
.chip { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 8px 14px; font-size: 15px; background: var(--card); border: 1.5px solid var(--line); color: var(--ink); min-height: 42px; }
button.chip:hover { border-color: var(--brand); }
.chip.ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.tools { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }

/* ---------- 提示条 ---------- */
.banner { border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.banner b { font-size: 16px; }
.banner button { align-self: flex-start; min-height: 40px; padding: 6px 14px; }
.banner.warn { background: var(--accent-soft); color: var(--accent-ink); }
.banner.pause { background: var(--info-soft); color: var(--info-ink); position: sticky; top: 92px; z-index: 5; }
.banner.info { background: var(--info-soft); color: var(--info-ink); }
.warn { background: var(--accent-soft); color: var(--accent-ink); border-radius: 12px; padding: 10px 12px; margin: 8px 0; }
.warn.red { background: var(--bad-soft); color: var(--bad); }
.warn-text { color: var(--accent-ink); background: var(--accent-soft); border-radius: 10px; padding: 8px 10px; font-size: 15px; }
.note { color: var(--muted); font-size: 14px; }
.privacy { font-size: 13px; color: var(--muted); background: var(--bg); border-radius: 10px; padding: 8px 10px; margin-top: 12px; }
.err { color: var(--bad); font-size: 15px; min-height: 1.2em; }

/* ---------- 登录 ---------- */
.login { text-align: left; }
.login-icon { font-size: 44px; text-align: center; }
.login h1 { text-align: center; margin-bottom: 2px; }
.login-sub { text-align: center; color: var(--muted); margin-top: 0; margin-bottom: 18px; }
.login label { display: block; font-weight: 700; margin: 14px 0 6px; }
.login input { width: 100%; font-size: 22px; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--bg); letter-spacing: .06em; }
.login input:focus { border-color: var(--brand); outline: none; background: var(--card); }
.login input::placeholder { letter-spacing: 0; font-size: 17px; }
.pinwrap { position: relative; }
.pinwrap input { padding-right: 76px; }
.pin-show { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: var(--brand-soft); color: var(--brand-dark); border-radius: 10px; padding: 6px 10px; font-size: 14px; }
.login button.big { margin-top: 20px; }

/* ---------- 学生：等待页 ---------- */
.hero { padding: 36px 20px; }
.hero-icon { font-size: 52px; }
.hello { font-size: 22px; font-weight: 700; margin-top: 0; }
.checklist { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 10px; }
.checklist li { border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.checklist li.done { border-color: var(--ok); background: var(--ok-soft); }
.ck-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.ck-num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; flex: none; }
.checklist li.done .ck-num { background: var(--ok); color: #fff; }
.checklist button { min-height: 46px; }
.plan { background: var(--bg); border-radius: 14px; padding: 12px 14px; margin-top: 8px; }
.plan h3 { margin-bottom: 6px; }
.plan ol { list-style: none; margin: 0; padding: 0; }
.plan li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.plan li:last-child { border-bottom: 0; }
.plan .pi { font-size: 20px; } .plan .pm { margin-left: auto; font-size: 13px; color: var(--muted); white-space: nowrap; }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin 1s linear infinite; margin-right: 8px; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 学生：题目 ---------- */
img.scene { width: 100%; border-radius: 14px; display: block; margin-bottom: 12px; border: 1px solid var(--line); }
.ask { background: var(--brand-soft); border-radius: 14px; padding: 12px 14px 10px; }
.ask-tag { display: inline-block; font-size: 13px; font-weight: 700; color: var(--brand-ink); background: var(--brand); border-radius: 999px; padding: 1px 10px; }
.ask ul { margin: 8px 0 2px; padding-left: 1.2em; font-size: 18px; font-weight: 600; }
.ask li { margin: 2px 0; }
.ask p { font-size: 17px; font-weight: 600; margin: 8px 0 2px; }
.hint { background: var(--accent-soft); color: var(--accent-ink); border-radius: 14px; padding: 10px 14px; margin: 12px 0; }
.hint p { margin: 4px 0; }
.zone { margin: 18px 0 6px; display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.sub { margin-top: 18px; font-size: 15px; color: var(--muted); }

/* 大麦克风按钮 */
.micwrap { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 4px 0; }
.mic { width: 112px; height: 112px; border-radius: 50%; border: 0; background: var(--brand); color: var(--brand-ink);
  box-shadow: 0 0 0 8px var(--brand-soft), 0 6px 18px rgba(47,111,94,.35); display: grid; place-items: center; transition: transform .06s ease; }
.mic-icon { font-size: 46px; line-height: 1; }
.mic-label { font-size: 19px; font-weight: 700; text-align: center; }

/* 录音中 */
.recbox { border: 2px solid var(--bad); background: var(--bad-soft); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.rec-head { display: flex; align-items: center; gap: 10px; color: var(--bad); }
.rec-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--bad); animation: pulse 1s ease-in-out infinite; flex: none; }
@keyframes pulse { 50% { opacity: .25; transform: scale(.8); } }
.rectime { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 700; }
.meter { height: 14px; border-radius: 999px; background: var(--card); overflow: hidden; border: 1px solid var(--line); }
.meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ok), var(--accent)); transition: width .08s linear; border-radius: 999px; }
#micMeter { margin-top: 8px; }
.progress { height: 6px; border-radius: 999px; background: rgba(0,0,0,.08); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--bad); }
.recbox .stop.big { margin: 0; }

.done-note { background: var(--ok-soft); color: var(--ok); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.done-note span { color: var(--ink); font-size: 15px; }
.more { display: flex; flex-direction: column; gap: 0; }

.attempts { display: grid; gap: 10px; }
.attempt { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.attempt .row { justify-content: space-between; }
.attempt audio { width: 100%; margin-top: 6px; height: 40px; }
.tag { font-size: 13px; padding: 2px 10px; border-radius: 999px; background: var(--bg); color: var(--muted); white-space: nowrap; }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.tag.warn { background: var(--accent-soft); color: var(--accent-ink); }
.draft { background: var(--bg); border-radius: 10px; padding: 8px 10px; margin: 8px 0 0; }
.draft .small { display: block; }
.big-text { font-size: 21px; font-weight: 600; }
textarea { width: 100%; border: 2px solid var(--line); border-radius: 12px; padding: 10px; background: var(--card); font-size: 18px; }
textarea:focus { border-color: var(--brand); outline: none; }
details.demo { margin-top: 14px; font-size: 14px; color: var(--muted); }
details.demo summary { cursor: pointer; }
details.demo select { padding: 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); }

/* ---------- 学生：第三题聊天 ---------- */
.partner { display: flex; align-items: center; gap: 12px; margin: 14px 0 6px; }
.partner > div { display: flex; flex-direction: column; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 19px; flex: none; }
.log { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; min-height: 120px; overflow-y: auto; padding: 10px; background: var(--bg); border-radius: 14px; }
.log .empty { color: var(--muted); text-align: center; margin: auto 0; padding: 10px; }
.bubble { max-width: 84%; padding: 10px 14px; border-radius: 18px; font-size: 18px; line-height: 1.5; }
.bubble.me { align-self: flex-end; background: var(--me); color: var(--me-ink); border-bottom-right-radius: 6px; }
.bubble.them { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.bubble.sys { align-self: center; background: var(--accent-soft); color: var(--accent-ink); font-size: 15px; }
.bubble.wait { color: var(--muted); font-size: 15px; }
.replay { display: block; margin-top: 6px; border: 0; background: var(--brand-soft); color: var(--brand-dark); border-radius: 999px; padding: 4px 12px; font-size: 14px; }
.typing { display: inline-flex; gap: 3px; margin-right: 8px; vertical-align: middle; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .2; } }
.review { border: 2px solid var(--brand); border-radius: 18px; padding: 12px 14px; }
.review .draft { background: none; padding: 0; margin: 0 0 8px; }
.autosend { font-size: 14px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.progress.auto i { background: var(--brand); width: 100%; animation: drain 2.5s linear forwards; }
@keyframes drain { from { width: 100%; } to { width: 0; } }

/* ---------- 学生：对照组 ---------- */
.rounds { list-style: none; padding: 0; margin: 14px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; }
.rounds li { border: 1.5px solid var(--line); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; align-items: center; text-align: center; font-size: 15px; }
.rounds li .dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); font-weight: 700; }
.rounds li.done { opacity: .7; } .rounds li.done .dot { background: var(--ok); color: #fff; }
.rounds li.now { border-color: var(--brand); background: var(--brand-soft); } .rounds li.now .dot { background: var(--brand); color: var(--brand-ink); }
.role { display: flex; gap: 14px; align-items: center; border-radius: 18px; padding: 14px; background: var(--brand-soft); margin: 10px 0; }
.role > div { display: flex; flex-direction: column; }
.role b { font-size: 26px; line-height: 1.2; }
.role p { margin: 4px 0 0; font-size: 15px; }
.role-icon { font-size: 40px; }
.role.invitee { background: var(--accent-soft); }
.role.observer { background: var(--info-soft); }
.rolecard { border: 2px dashed var(--brand); border-radius: 14px; padding: 10px 14px; margin: 10px 0; }
.rolecard.invitee { border-color: var(--accent); }

/* ---------- 学生：自评与成果 ---------- */
fieldset { border: 0; padding: 0; margin: 18px 0; }
legend { font-weight: 700; font-size: 18px; margin-bottom: 8px; display: flex; gap: 8px; align-items: flex-start; }
.qn { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-size: 14px; flex: none; margin-top: 2px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; }
.pill input, .quote input { position: absolute; opacity: 0; pointer-events: none; }
.pill span { display: block; padding: 10px 18px; border-radius: 999px; border: 2px solid var(--line); font-size: 17px; min-height: 48px; }
.pill input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 700; }
.pill input:focus-visible + span, .quote input:focus-visible + span { outline: 3px solid var(--accent); }
.quotes { display: grid; gap: 8px; }
.quote span { display: block; padding: 10px 14px; border-radius: 14px; border: 2px solid var(--line); }
.quote small { display: block; color: var(--muted); }
.quote input:checked + span { border-color: var(--brand); background: var(--brand-soft); }
.result { background: linear-gradient(160deg, var(--brand-soft), var(--card)); border-radius: 18px; padding: 16px; margin-top: 20px; border: 1px solid var(--line); }
.result ul { list-style: none; padding: 0; margin: 0 0 8px; }
.result li { display: flex; flex-direction: column; padding: 8px 0; border-bottom: 1px solid var(--line); }
.result li b { font-size: 17px; }
blockquote { margin: 12px 0; padding: 12px 14px; border-left: 4px solid var(--accent); background: var(--card); border-radius: 0 12px 12px 0; font-size: 18px; }

.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: var(--card); color: var(--ink); border-radius: 18px; padding: 22px 18px 18px; width: 100%; max-width: 380px; box-shadow: 0 12px 40px rgba(0,0,0,.3); }
.modal p { margin: 0 0 18px; font-size: 18px; line-height: 1.6; }
.modal-btns { display: flex; gap: 10px; }
.modal-btns button { flex: 1; margin: 0; }
.toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translateX(-50%); background: #1d2522; color: #fff; padding: 12px 18px; border-radius: 14px; max-width: calc(100% - 32px); z-index: 50; font-size: 16px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }

/* ---------- 教师端 ---------- */
.tctl h2 { margin: 0; }
.tctl .row { justify-content: space-between; }
.phasebar { display: flex; margin: 16px 0 8px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); position: relative; }
.phasebar .seg { padding: 8px 6px; font-size: 13px; text-align: center; background: var(--bg); color: var(--muted); border-right: 1px solid var(--line); min-width: 0; }
.phasebar .seg:last-child { border-right: 0; }
.phasebar .seg b { display: block; font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phasebar .seg .mins { display: block; white-space: nowrap; }
.phasebar .seg.done { background: var(--brand-soft); }
.phasebar .seg.now { background: var(--brand); color: var(--brand-ink); }
.phasebar .seg.now b { color: var(--brand-ink); }
.phasebar .needle { position: absolute; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 14px 0 0; }
.kpi { background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.kpi b { font-size: 24px; display: block; line-height: 1.2; }
.kpi span { font-size: 13px; color: var(--muted); }
.attn { border: 2px solid var(--bad); }
.attn h2 { color: var(--bad); }
.attn .row { gap: 8px; }
.attn button.chip { border-color: var(--bad); }
details.sys, details.ref, details.adj { margin-top: 12px; font-size: 14px; color: var(--muted); }
details summary { cursor: pointer; font-weight: 600; }
details.ref { color: var(--ink); font-size: 16px; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: -1px; margin-right: 4px; }
.lg-on { background: var(--ok); } .lg-off { background: var(--line); } .lg-alert { background: var(--bad); } .lg-hold { background: var(--accent); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.tile { text-align: left; background: var(--card); border: 1.5px solid var(--line); border-left: 6px solid var(--ok); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; font-size: 15px; }
.tile:hover { border-color: var(--brand); }
.tile.off { border-left-color: var(--line); opacity: .75; }
.tile.hold { border-left-color: var(--accent); }
.tile.alert { border-left-color: var(--bad); background: var(--bad-soft); }
.tile .row { justify-content: space-between; gap: 6px; }
.tile b { font-size: 18px; }
.progress3 { display: flex; gap: 4px; }
.progress3 span { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.progress3 span.got { background: var(--brand); }
.badge { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); white-space: nowrap; }
.badge.red { background: var(--bad); color: #fff; } .badge.orange { background: var(--accent); color: #2b1d00; }
.badge.grp { background: var(--brand-soft); color: var(--brand-dark); }
.inline { display: inline-flex; align-items: center; gap: 6px; }
input.num { width: 72px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); }
.export input[type=password] { padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); min-width: 200px; }
img.small-img { max-width: 360px; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(720px, 100%); background: var(--card); z-index: 40; overflow-y: auto; padding: 16px 18px 40px; box-shadow: -8px 0 32px rgba(0,0,0,.18); }
.drawer-head { position: sticky; top: -16px; background: var(--card); padding: 8px 0; margin-top: -8px; z-index: 2; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.drawer-head h2 { margin: 0; flex: 1; }
.dsec { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 14px; }
.rev { font-size: 15px; margin: 4px 0; }
.src { font-size: 12px; color: var(--muted); }
.obs { background: var(--bg); border-radius: 12px; padding: 10px 12px; margin: 10px 0; display: flex; flex-direction: column; gap: 8px; }
.obs input:not([type]), .obs select { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); width: 100%; }
.obs .row select { flex: 1; width: auto; min-width: 0; }
.turnrow { display: flex; flex-direction: column; gap: 4px; }
.drawer .log { max-height: none; }
.drawer .bubble { font-size: 15px; }
@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .phasebar .seg { font-size: 11px; padding: 6px 2px; }
  .phasebar .seg b { font-size: 12px; }
  .phasebar .seg .mins { display: none; }
  .kpis { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .kpi { padding: 8px; }
  .kpi b { font-size: 20px; }
  .kpi span { font-size: 12px; }
}
