/* ===== 商务英语车载对练 · Soft Structuralism（taste-skill: soft）=====
   暖调近黑画布 · 超柔散射阴影 + 发丝描边的悬浮卡片 · 单一薄荷强调色
   大号展示字体(Outfit, 中文回退系统) · 有弹性的微动效 · 超大点击目标 */
@font-face {
  font-family: 'Outfit';
  src: url('fonts/outfit.woff2') format('woff2');
  font-weight: 100 900; font-display: swap;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  --bg: #0e0f13; --ink: #f3f2ef; --muted: #9c9ba6; --faint: #6d6c78;
  --surface: #17181e; --elevated: #1d1f27; --hair: rgba(255,255,255,.075);
  --accent: #57d6ac; --accent-ink: #0b1a15;   /* 薄荷绿：go / 主行动 */
  --talk: #8aa0ff;                              /* 老师在说 */
  --hint: #f0b775;                              /* 提示/纠错 */
  --danger: #e06a7e;
  --shadow: 0 24px 60px -20px rgba(0,0,0,.7), 0 2px 8px rgba(0,0,0,.4);
  --ease: cubic-bezier(.22,.61,.36,1);
  --r: 20px;
  font-family: 'Outfit', -apple-system, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font-size: 16px; line-height: 1.5; overscroll-behavior: none; -webkit-font-smoothing: antialiased; }
#bg-glow { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(120% 60% at 50% -8%, rgba(87,214,172,.10), transparent 60%),
              radial-gradient(90% 50% at 90% 110%, rgba(138,160,255,.08), transparent 60%); }
#app { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; min-height: 100vh;
  display: flex; flex-direction: column; padding: env(safe-area-inset-top) 18px calc(env(safe-area-inset-bottom) + 16px); }

header { display: flex; align-items: center; justify-content: space-between; padding: 18px 2px 8px; }
.hleft { display: flex; align-items: center; gap: 6px; }
.brand { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; display: flex; align-items: center; gap: 9px; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px var(--accent); }
.icon-btn { background: none; border: none; color: var(--muted); cursor: pointer; padding: 6px; display: flex; }
.icon-btn:active { color: var(--ink); }

.panel { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r);
  padding: 22px; margin-bottom: 16px; box-shadow: var(--shadow); }
.hidden { display: none !important; }
.step { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 6px; }
h2.tight { margin: 0; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .accent { color: var(--accent); }
.small { font-size: 13.5px; } .micro { font-size: 12px; } .center { text-align: center; }
.row-between { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.spacer { flex: 1; } p { margin: 6px 0 14px; }

label { display: block; font-size: 13px; color: var(--muted); margin: 16px 0 7px; }
input[type=password], input[type=text], textarea, select {
  width: 100%; background: var(--elevated); color: var(--ink); border: 1px solid var(--hair);
  border-radius: 14px; padding: 13px 15px; font: inherit; transition: border-color .2s var(--ease); }
textarea { resize: vertical; line-height: 1.55; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
input[type=range] { accent-color: var(--accent); padding: 0; }

.btn { border: none; border-radius: 15px; padding: 15px 20px; font: inherit; font-weight: 600;
  letter-spacing: -0.01em; cursor: pointer; width: 100%; transition: transform .12s var(--ease), background .2s, opacity .2s; }
.btn:active { transform: scale(.985); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.subtle { background: var(--elevated); color: var(--ink); border: 1px solid var(--hair); font-weight: 500; }
.btn.sm { width: auto; padding: 9px 15px; font-size: 13px; border-radius: 12px; }
.btn.big { font-size: 18px; padding: 19px; margin-top: 6px; }
.btn:disabled { opacity: .5; }

.uploader { display: flex; align-items: center; gap: 12px; margin: 12px 0 4px; flex-wrap: wrap; }
.uploader .btn { width: auto; }

/* ===== 话题大卡片（车载核心：大、清晰、易点） ===== */
.topic-list { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.topic-card { text-align: left; width: 100%; background: var(--elevated); border: 1px solid var(--hair);
  border-radius: 18px; padding: 20px; cursor: pointer; min-height: 96px;
  transition: transform .14s var(--ease), border-color .2s, box-shadow .2s; box-shadow: 0 8px 24px -14px rgba(0,0,0,.6); }
.topic-card:active { transform: scale(.98); }
.topic-card:hover { border-color: rgba(87,214,172,.5); box-shadow: 0 0 0 1px rgba(87,214,172,.35), 0 12px 30px -16px rgba(0,0,0,.7); }
.topic-card .t-row { display: flex; align-items: baseline; gap: 12px; }
.topic-card .t-num { font-size: 15px; font-weight: 700; color: var(--accent); min-width: 26px; }
.topic-card .t-title { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.topic-card .t-sum { color: var(--muted); font-size: 14px; margin: 8px 0 0 38px; line-height: 1.45; }
.topic-card .t-words { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 0 38px; }
.topic-card .t-word { font-size: 12px; color: var(--accent); background: rgba(87,214,172,.1);
  border: 1px solid rgba(87,214,172,.25); border-radius: 8px; padding: 4px 9px; }

/* ===== 对话主界面 ===== */
#live { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; }
.topic-chip { align-self: center; font-size: 13px; color: var(--muted); background: var(--elevated);
  border: 1px solid var(--hair); border-radius: 20px; padding: 7px 15px; margin-bottom: 4px; max-width: 100%; }
.orb { width: 156px; height: 156px; border-radius: 50%; margin: 22px 0 10px; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 38%, #23252f, #14151b); border: 1px solid var(--hair); transition: box-shadow .3s var(--ease); }
.orb-core { width: 98px; height: 98px; border-radius: 50%; background: linear-gradient(150deg, #3a3d4a, #23252f); transition: transform .2s var(--ease), background .3s; }
.orb.listen { box-shadow: 0 0 0 7px rgba(87,214,172,.14), 0 0 55px rgba(87,214,172,.4); }
.orb.listen .orb-core { background: linear-gradient(150deg, var(--accent), #2f9e86); animation: breathe 1.1s infinite var(--ease); }
.orb.think .orb-core { background: linear-gradient(150deg, var(--hint), #d98f43); animation: spin 1.1s infinite linear; }
.orb.talk { box-shadow: 0 0 0 7px rgba(138,160,255,.14), 0 0 55px rgba(138,160,255,.42); }
.orb.talk .orb-core { background: linear-gradient(150deg, var(--talk), #5a6fe0); animation: breathe .6s infinite var(--ease); }
@keyframes breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.13); } }
@keyframes spin { to { transform: rotate(360deg); } }
.phase { font-size: 15px; color: var(--muted); height: 22px; margin-bottom: 10px; }
.tutor-line { font-size: 23px; font-weight: 600; line-height: 1.4; letter-spacing: -0.015em; margin: 4px 0; min-height: 66px; }
.hint { font-size: 14.5px; color: var(--hint); min-height: 20px; margin-bottom: 8px; line-height: 1.5; }
.hint .recast { color: var(--accent); }
.live-actions { display: flex; gap: 12px; width: 100%; }
.live-actions .btn { padding: 13px; }
#pttBtn.recording { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
#stopBtn { margin-top: 12px; }

/* ===== 打分 ===== */
.rate-item { background: var(--elevated); border: 1px solid var(--hair); border-radius: 14px; padding: 15px 16px; margin-bottom: 12px; }
.rate-item .en { font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.rate-item .zh { color: var(--muted); font-size: 13.5px; margin: 3px 0 12px; }
.rate-btns { display: flex; gap: 8px; }
.rate-btns button { flex: 1; border-radius: 11px; border: 1px solid var(--hair); background: var(--surface);
  color: var(--muted); padding: 12px 4px; font: inherit; font-size: 13px; transition: all .15s var(--ease); }
.rate-btns button.sel { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }

footer { margin-top: auto; padding: 14px 4px 4px; }
