/* ===========================================================
   听读小达人 · 样式
   给小学生用：大按钮、大字号、句子清楚、跟着声音走
   =========================================================== */

:root{
  --blue:#4f7cff;
  --blue-d:#3a63e0;
  --orange:#ff7a59;
  --green:#25b96b;
  --yellow:#f3b52c;
  --ink:#20243a;
  --ink-2:#5b6180;
  --line:#e7eaf6;
  --radius:22px;
  --shadow:0 10px 26px rgba(38,52,110,.10);
  --shadow-sm:0 4px 12px rgba(38,52,110,.08);
}

*{box-sizing:border-box}
html,body{height:100%}
html{-webkit-text-size-adjust:100%}

body{
  margin:0;
  font-family:"Microsoft YaHei","微软雅黑","PingFang SC","Hiragino Sans GB",system-ui,-apple-system,"Segoe UI",sans-serif;
  color:var(--ink);
  font-size:17px;
  line-height:1.6;
  background:
    radial-gradient(1100px 620px at 8% -8%, #dbe7ff 0%, rgba(219,231,255,0) 60%),
    radial-gradient(900px 560px at 100% 0%, #ffe6dd 0%, rgba(255,230,221,0) 58%),
    radial-gradient(760px 520px at 50% 108%, #dcf7e8 0%, rgba(220,247,232,0) 62%),
    #f6f8ff;
  -webkit-font-smoothing:antialiased;
}

.hidden{display:none !important}
button{
  font-family:inherit;font-size:inherit;cursor:pointer;
  touch-action:manipulation;-webkit-tap-highlight-color:transparent;
}

/* ---------- 通用 ---------- */
.btn{
  border:0;border-radius:16px;padding:13px 22px;font-weight:700;font-size:16.5px;
  white-space:nowrap;                     /* 按钮文字不换行 */
  transition:transform .08s ease, background .18s ease, opacity .18s;
}
.btn:active{transform:translateY(1px) scale(.985)}
.btn.primary{background:linear-gradient(180deg,#5c86ff,#3f6bf0);color:#fff;box-shadow:0 8px 18px rgba(63,107,240,.32)}
.btn.ghost{background:#fff;color:var(--ink);border:2px solid var(--line);box-shadow:var(--shadow-sm)}

.icon-btn{
  border:0;background:#fff;box-shadow:var(--shadow-sm);border-radius:14px;
  width:46px;height:46px;font-size:20px;display:grid;place-items:center;
  transition:transform .08s ease, background .18s;
}
.icon-btn:hover{background:#f4f7ff}
.icon-btn:active{transform:scale(.94)}

.foot-action{
  min-width:0;min-height:46px;padding:9px 12px;border:1px solid #e4e8f3;border-radius:14px;
  background:rgba(255,255,255,.92);color:var(--ink-2);font-size:14px;font-weight:750;
  display:flex;align-items:center;justify-content:center;gap:8px;
  box-shadow:0 4px 12px rgba(39,56,111,.06);transition:background .15s,border-color .15s,transform .1s;
}
.foot-action:hover{color:var(--blue-d);background:#f7f9ff;border-color:#cfdaf8}
.foot-action:active{transform:scale(.98)}
.foot-action .fa-icon{font-size:18px;line-height:1}
.foot-action .fa-label{white-space:nowrap}

.mini{
  border:2px solid var(--line);background:#fff;border-radius:13px;padding:8px 14px;font-weight:700;font-size:14.5px;
  display:inline-flex;align-items:center;gap:6px;transition:background .15s, border-color .15s, color .15s;
}
.mini:hover{background:#f4f7ff;border-color:#ccd9ff}
.mini:disabled{opacity:.45;cursor:not-allowed}
.mini.on{border-color:var(--blue);background:#eef3ff;color:var(--blue-d)}

.browser-tip{
  position:sticky;top:0;z-index:40;
  background:#fff8e6;border-bottom:1px solid #f2dda6;color:#7a5a10;
  padding:10px 18px;font-size:14.5px;display:flex;gap:12px;align-items:center;justify-content:center;
}
.browser-tip button{border:0;background:#f0d9a0;color:#6b4d00;border-radius:10px;padding:5px 12px;font-weight:700}

/* ===========================================================
   首页
   =========================================================== */
.view{max-width:1180px;margin:0 auto;padding:22px 22px 44px}

.home-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:24px;flex-wrap:wrap}
.brand{display:flex;align-items:center;gap:14px}
.brand-logo{
  width:62px;height:62px;border-radius:20px;display:grid;place-items:center;font-size:32px;
  background:linear-gradient(150deg,#5c86ff,#8f6bff);box-shadow:0 10px 22px rgba(92,134,255,.35);
}
.brand h1{margin:0;font-size:27px;letter-spacing:.5px}
.brand-sub{margin:0;color:var(--ink-2);font-size:14.5px}
.head-right{display:flex;align-items:center;gap:10px;flex-wrap:nowrap;min-width:0}
.stat-pill{background:#fff;border-radius:16px;padding:10px 18px;font-weight:800;font-size:16px;box-shadow:var(--shadow-sm);color:#3a63e0}
.user-chip{
  border:0;cursor:pointer;font-family:inherit;color:var(--ink-2);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  max-width:170px;padding:10px 16px;
}
.user-chip:hover{background:#eef3ff;color:var(--blue-d)}
.user-chip.on{background:#eef3ff;color:var(--blue-d)}
.auth-box{max-width:430px}
.auth-tabs{margin-bottom:14px}
.auth-msg{color:var(--red);font-size:14px;font-weight:700;margin:4px 0 0;min-height:20px}

/* ===========================================================
   对话练习
   =========================================================== */
.mk-kind{margin-bottom:16px}
.mk-kind button{font-size:15px}
.name-hint{
  margin:0 0 14px;font-size:13.5px;font-weight:700;color:var(--blue-d);
  background:#eef3ff;border-radius:12px;padding:8px 12px;
}
.name-hint.auto{color:var(--ink-2);background:#f6f8ff}

.dlg-roles{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 12px}
.dlg-roles span{
  background:#f4f6fd;border-radius:12px;padding:7px 13px;font-weight:700;font-size:14px;color:var(--ink-2);
}
.dlg-roles span b{color:var(--ink);margin:0 4px 0 2px}
.dlg-roles span i{font-style:normal;font-weight:600;font-size:12.5px;opacity:.75}
.dlg-roles span em{font-style:normal;font-weight:800;font-size:12px;margin-left:6px;
  background:#fff;border-radius:8px;padding:1px 7px;opacity:.9}
.dlg-roles .role-a{background:#eef3ff;color:var(--blue-d)}
.dlg-roles .role-b{background:#eafaf0;color:#178a4c}

.dlg-tip{margin:10px 0 0;font-size:13px;line-height:1.5}

.dlg-list{
  display:flex;flex-direction:column;gap:12px;padding:6px 2px 10px;
  max-height:calc(100vh - 330px);overflow:auto;
}
.dline{display:flex;gap:10px;align-items:flex-end;max-width:88%}
.dline.a{align-self:flex-start}
.dline.b{align-self:flex-end;flex-direction:row-reverse}
.dbubble{
  display:flex;flex-direction:column;gap:3px;border-radius:18px 18px 18px 6px;
  padding:11px 15px;background:#f2f5ff;border:2px solid transparent;
  transition:border-color .2s, box-shadow .2s, background .2s;
}
.dline.b .dbubble{background:#eefbf3;border-radius:18px 18px 6px 18px}
.dline.active .dbubble{border-color:var(--blue);box-shadow:0 6px 16px rgba(79,124,255,.18)}
.dline.b.active .dbubble{border-color:var(--green);box-shadow:0 6px 16px rgba(37,185,107,.18)}
.dwho{font-size:12.5px;font-weight:800;color:var(--ink-2)}
.dline.a .dwho{color:var(--blue-d)}
.dline.b .dwho{color:#178a4c}
.den{font-size:17px;font-weight:700;line-height:1.45}
.dzh{font-size:13.5px;color:var(--ink-2)}
.dsay,.drec,.dmy{
  flex:0 0 40px;width:40px;height:40px;border:0;border-radius:50%;cursor:pointer;
  font-size:17px;display:grid;place-items:center;box-shadow:var(--shadow-sm);
  background:#fff;color:var(--blue-d);transition:transform .1s, background .15s;
}
.dsay:hover,.drec:hover,.dmy:hover{background:#eef3ff;transform:scale(1.05)}
.drec{background:#fff4ee;color:#e8703a}
.drec.rec{background:#f2603c;color:#fff;animation:pulse 1.2s ease-in-out infinite}
.dmy{background:#eefbf3;color:#178a4c}
.dsay.model{background:#eef3ff;color:var(--blue-d)}
#d-autolisten.on{border-color:var(--blue);background:#eef3ff;color:var(--blue-d)}
.dwait{
  align-self:flex-end;font-size:13px;font-weight:800;color:#178a4c;
  background:#eafaf0;border-radius:10px;padding:4px 10px;
}
.dlg-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px;padding-top:14px;border-top:1px dashed var(--line)}
.dlg-actions .btn{flex:1;min-width:120px}
.dlg-list.hide-zh .dzh{display:none}
.dlg-list.hide-en .den{display:none}
.dlg-play-card .seg button{font-size:14px}
.dlg-mode{margin:0}
.dlg-mode button{font-size:13.5px}
.dlg-mode button.on{font-weight:800}

@media (max-width:900px){
  .dlg-list{max-height:none}
  .dline{max-width:94%}
  .den{font-size:16px}
  .dsay,.drec,.dmy{flex:0 0 44px;width:44px;height:44px;font-size:18px}
  .dlg-roles{gap:7px;margin-bottom:10px}
  .dlg-play-card .ctl-rows{display:none}
  .dlg-play-card.expanded .ctl-rows{display:block}
}

.group-title{
  display:flex;align-items:baseline;gap:12px;margin:26px 0 14px;
}
.group-title h2{margin:0;font-size:20px}
.group-title span{color:var(--ink-2);font-size:14px}

.card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(255px,1fr));gap:15px}
.pcard{
  position:relative;background:#fff;border-radius:var(--radius);padding:17px 18px 15px;
  box-shadow:var(--shadow);border:2px solid transparent;text-align:left;
  display:flex;gap:13px;align-items:flex-start;
  transition:transform .12s ease, box-shadow .2s ease, border-color .2s;
}
.pcard:hover{transform:translateY(-3px);box-shadow:0 16px 30px rgba(38,52,110,.15);border-color:#dbe4ff}
.pcard .pc-emoji{font-size:31px;line-height:1.1}
.pcard .pc-main{flex:1;min-width:0}
.pcard .pc-name{font-weight:800;font-size:17.5px;display:flex;align-items:center;gap:8px}
.pcard .pc-sub{display:block;color:var(--ink-2);font-size:13px;line-height:1.5;margin-top:2px}
.pcard .pc-meta{display:flex;gap:10px;align-items:center;margin-top:9px;font-size:12.5px;font-weight:700;color:var(--ink-2)}
.pcard .pc-meta .heard{color:var(--green)}
.pcard .pc-play{
  position:absolute;right:14px;bottom:13px;width:40px;height:40px;border-radius:50%;border:0;
  background:linear-gradient(160deg,#6d95ff,#436ff0);color:#fff;font-size:17px;display:grid;place-items:center;
  box-shadow:0 6px 14px rgba(67,111,240,.35);
}
.badge-done{background:#e9fbf1;color:var(--green);font-size:11.5px;font-weight:800;border-radius:20px;padding:1px 9px}

/* ---------- 首页：生成新听力入口 ---------- */
.make-card{
  width:100%;display:flex;align-items:center;gap:14px;text-align:left;
  background:linear-gradient(120deg,#f2f6ff,#fbf3ff 72%);
  border:1px solid #e4eaff;border-radius:var(--radius);
  padding:16px 18px;margin-bottom:24px;
  box-shadow:0 6px 18px rgba(79,124,255,.10);
  transition:transform .12s ease, border-color .2s, box-shadow .2s;
}
.make-card:hover{transform:translateY(-2px);border-color:#bcd0ff;box-shadow:0 12px 26px rgba(79,124,255,.18)}
.make-card:active{transform:translateY(0) scale(.995)}
/* 只作用于首页那张卡（编辑页里的 .mk-* 是输入框，别受影响） */
#btn-make .mk-emoji{
  flex:0 0 48px;width:48px;height:48px;display:grid;place-items:center;
  font-size:24px;line-height:1;border:0;padding:0;border-radius:16px;
  background:linear-gradient(150deg,#5c86ff,#8f6bff);
  box-shadow:0 6px 14px rgba(92,134,255,.30);
}
#btn-make .mk-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
/* 这三行是重点：把"输入框样式"从卡片里的文字上清掉（它们和编辑页的输入框同名） */
#btn-make .mk-title{
  width:auto;border:0;padding:0;background:none;border-radius:0;
  font-weight:800;font-size:18px;color:var(--blue-d);line-height:1.3;
}
#btn-make .mk-sub{
  width:auto;border:0;padding:0;background:none;border-radius:0;
  color:var(--ink-2);font-size:13.5px;line-height:1.45;
}
#btn-make .mk-go{
  flex:0 0 auto;font-weight:800;color:#fff;font-size:13.5px;white-space:nowrap;
  background:linear-gradient(135deg,#5c86ff,#436ff0);border-radius:999px;padding:9px 14px;
  box-shadow:0 6px 14px rgba(67,111,240,.28);
}

/* 首页分类标签 + 分页 */
.home-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 18px}
.htab{
  border:2px solid var(--line);background:#fff;border-radius:14px;
  padding:9px 15px;font-weight:800;font-size:15px;color:var(--ink-2);
  box-shadow:var(--shadow-sm);transition:all .15s;
  display:inline-flex;align-items:center;gap:7px;min-width:0;
}
.htab .ht{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;text-align:left}
.htab i{
  font-style:normal;font-size:12px;font-weight:800;color:var(--blue-d);
  background:#eef3ff;border-radius:20px;padding:1px 8px;
}
.htab:hover{border-color:#cfd8f4;background:#fbfcff}
.htab.on{border-color:var(--blue);background:#eef3ff;color:var(--blue-d)}
.htab.on i{background:#fff}
.pager{
  display:flex;align-items:center;justify-content:center;gap:12px;
  margin:22px 0 4px;font-weight:800;color:var(--ink-2);
}
.pager .mini{min-width:96px;justify-content:center}
.pager .now{font-size:14.5px;min-width:70px;text-align:center}

/* ---------- 生成页 ---------- */
.card{background:#fff;border-radius:24px;box-shadow:var(--shadow);padding:20px 22px;margin-bottom:16px}
.card h3{margin:0 0 12px;font-size:18px}
.card h4.sub-h{margin:18px 0 8px;font-size:15.5px;color:var(--ink-2)}
#mk-text{
  width:100%;border:2px solid var(--line);border-radius:16px;padding:13px 15px;
  font-family:inherit;font-size:16px;line-height:1.6;color:var(--ink);resize:vertical;background:#fbfcff;
}
#mk-text:focus{outline:none;border-color:#a9c0ff;background:#fff}
.opt-row{display:flex;align-items:center;gap:10px;margin-top:12px}
.opt-label{flex:0 0 40px;font-weight:800;font-size:14.5px;color:var(--ink-2)}
.opt-row .seg{flex:1}
.mk-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}
.mk-actions .btn{flex:1;min-width:150px}
.meta-row{display:flex;gap:10px;margin-bottom:10px}
.cfg-input,.mk-emoji,.mk-title,.mk-sub,#cfg-base,#cfg-model,#cfg-key{
  width:100%;border:2px solid var(--line);border-radius:13px;padding:11px 13px;
  font-family:inherit;font-size:16px;color:var(--ink);background:#fff;
}
.cfg-input:focus,.mk-emoji:focus,.mk-title:focus,.mk-sub:focus{outline:none;border-color:#a9c0ff}
.mk-emoji{flex:0 0 74px;text-align:center;font-size:20px}
.mk-title{flex:1;font-weight:800}
.mk-sub{margin-bottom:12px;font-size:15px}
.sub-label{display:block;font-size:13px;font-weight:700;color:var(--ink-2);margin:8px 0 4px}
.cfg-box{border-top:1px dashed var(--line);padding-top:16px}
.key-line{display:flex;gap:8px;align-items:center}
.key-line .cfg-input{flex:1}
.key-line .mini{flex:0 0 auto;padding:10px 13px;font-size:17px}
#cfg-pick{
  width:100%;border:2px solid var(--line);border-radius:13px;padding:12px 13px;
  font-family:inherit;font-size:16px;color:var(--ink);background:#fff;
}
#cfg-pick:focus{outline:none;border-color:#a9c0ff}

.edit-list{display:flex;flex-direction:column;gap:8px}
.erow{display:flex;gap:8px;align-items:center}
.erow .en,.erow .zh{border:2px solid var(--line);border-radius:12px;padding:10px 12px;font-family:inherit;font-size:15.5px;color:var(--ink)}
.erow .en{flex:1.3}
.erow .zh{flex:1}
.erow .en:focus,.erow .zh:focus{outline:none;border-color:#a9c0ff}
.erow .en{font-weight:700}
.erow .del{border:0;background:#fff2f2;color:var(--red);border-radius:10px;width:34px;height:34px;flex:0 0 34px}
.erow .say{border:0;background:#eef3ff;color:var(--blue-d);border-radius:10px;width:34px;height:34px;flex:0 0 34px}
.erow .role{
  flex:0 0 58px;border:2px solid var(--line);border-radius:12px;padding:10px 6px;
  font-family:inherit;font-size:15px;font-weight:800;color:var(--blue-d);background:#f7f9ff;
}
.erow .role:focus{outline:none;border-color:#a9c0ff}

.done-emoji{font-size:52px;text-align:center;line-height:1;margin-bottom:6px}
#step-done{text-align:center}
#step-done h3{margin-bottom:6px}

.home-foot{margin-top:34px;display:flex;flex-direction:column;align-items:stretch;gap:14px}
.foot-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:100%;max-width:380px;margin:0 auto}
.version{color:#98a0bd;font-size:12px;text-align:center}

/* ===========================================================
   听读页
   =========================================================== */
#view-player{max-width:1180px}

.bar{display:flex;align-items:center;gap:12px;margin-bottom:18px}
.bar-title{display:flex;align-items:center;gap:9px;font-weight:800;font-size:19px;flex:1;min-width:0}
.bar-title>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pill{background:#fff;box-shadow:var(--shadow-sm);border-radius:12px;padding:6px 13px;font-weight:800;font-size:14.5px;color:var(--ink-2)}

.player-grid{display:grid;grid-template-columns:392px 1fr;gap:20px;align-items:start}

/* --- 播放卡 --- */
.play-card{
  background:#fff;border-radius:26px;box-shadow:var(--shadow);padding:22px 22px 20px;
  position:sticky;top:16px;
}
.ctl-toggle{display:none}
.play-top{display:flex;gap:16px;align-items:center}
.play-big{
  flex:0 0 92px;width:92px;height:92px;border-radius:50%;border:0;font-size:34px;color:#fff;
  background:linear-gradient(160deg,#6d95ff,#436ff0);box-shadow:0 12px 26px rgba(67,111,240,.36);
  display:grid;place-items:center;transition:transform .1s ease;
}
.play-big:active{transform:scale(.95)}
.play-big.playing{animation:pulse 1.6s ease-in-out infinite}
@keyframes pulse{
  0%{box-shadow:0 0 0 0 rgba(67,111,240,.4),0 12px 26px rgba(67,111,240,.36)}
  70%{box-shadow:0 0 0 22px rgba(67,111,240,0),0 12px 26px rgba(67,111,240,.36)}
  100%{box-shadow:0 0 0 0 rgba(67,111,240,0),0 12px 26px rgba(67,111,240,.36)}
}
.play-state{flex:1;min-width:0}
.play-label{font-size:14px;font-weight:800;color:var(--ink-2)}
.play-now{font-size:16.5px;font-weight:700;line-height:1.45;margin-top:3px;
  display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}

/* 分段进度条 */
.segs{display:flex;gap:3px;margin:18px 0 10px;height:14px}
.segs button{
  flex:1;border:0;padding:0;border-radius:5px;background:#e8ecf8;position:relative;overflow:hidden;
  transition:background .18s;min-width:0;
}
.segs button:hover{background:#d8e0f8}
.segs button i{position:absolute;inset:0;width:0;background:linear-gradient(90deg,#7ba0ff,#5c86ff);border-radius:5px}
.segs button.done i{width:100%;background:#b9c9f5}
.segs button.cur i{background:linear-gradient(90deg,#6d95ff,#436ff0)}
.time-row{display:flex;justify-content:space-between;font-size:12.5px;color:var(--ink-2);font-weight:700;margin-bottom:14px}

/* 控制区 */
.ctl-row{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin-bottom:11px}
.ctl-row:last-child{margin-bottom:0}
.ctl-label{font-size:13px;font-weight:800;color:var(--ink-2);flex:0 0 34px}
.seg{display:flex;gap:5px;background:#f4f6fd;padding:5px;border-radius:14px;flex:1;min-width:0}
.seg button{
  flex:1;border:0;background:transparent;border-radius:10px;padding:7px 6px;
  font-weight:700;font-size:14px;color:var(--ink-2);white-space:nowrap;
  transition:background .15s,color .15s,box-shadow .15s;
}
.seg button.on{background:#fff;color:var(--blue-d);box-shadow:var(--shadow-sm)}

/* --- 句子列表 --- */
.list-card{background:#fff;border-radius:26px;box-shadow:var(--shadow);padding:16px 16px 14px}
.list-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:2px 6px 12px;flex-wrap:wrap}
.list-head h3{margin:0;font-size:17px}
.list-head .hint{color:var(--ink-2);font-size:13px}
.list{max-height:calc(100vh - 250px);overflow:auto;padding-right:4px}

.sent{
  display:grid;grid-template-columns:auto 1fr auto;gap:11px;align-items:start;
  padding:11px 12px;border-radius:16px;border:2px solid transparent;cursor:pointer;
  transition:background .15s, border-color .15s;
}
.sent:hover{background:#f7f9ff}
.sent.active{background:#eef3ff;border-color:#c9d8ff}
.sent.playing{background:#e9f0ff;border-color:#9fb9ff}
.sn{
  width:26px;height:26px;border-radius:9px;background:#f0f3fd;color:var(--ink-2);
  display:grid;place-items:center;font-size:13px;font-weight:800;margin-top:2px;
}
.sent.active .sn{background:var(--blue);color:#fff}
.sent-body{display:block;min-width:0}
.sent-en{display:block;font-size:18px;font-weight:700;line-height:1.5;transition:color .15s}
.sent.playing .sent-en{color:var(--blue-d)}
.sent-zh{display:block;font-size:14.5px;color:var(--ink-2);line-height:1.5;margin-top:1px}
.sent-tools{display:flex;gap:4px;opacity:.35;transition:opacity .15s}
.sent:hover .sent-tools,.sent.active .sent-tools{opacity:1}
.sent-tools button{
  border:0;background:#fff;border-radius:10px;width:32px;height:32px;font-size:14px;
  box-shadow:var(--shadow-sm);display:grid;place-items:center;
}
.sent-tools button:hover{background:#eef3ff}
.sent-tools button.on{background:#eef3ff;color:var(--blue-d)}

.chips{grid-column:2/4;display:flex;flex-wrap:wrap;gap:6px;padding-top:9px}
.chips button{
  border:2px solid var(--line);background:#fff;border-radius:11px;padding:4px 10px;
  font-size:15.5px;font-weight:700;color:var(--ink);
}
.chips button:hover{background:#eef3ff;border-color:#c9d8ff}

body.hide-cn .sent-zh,body.hide-cn .now-cn{display:none}
body.hide-en .sent-en{display:none}
/* 只看中文的时候，中文就是主角，放大一点、颜色深一点 */
body.hide-en .sent-zh{font-size:17px;color:var(--ink)}
body.hide-en .play-now{color:var(--ink)}
body.hide-text .sent-en,body.hide-text .sent-zh,body.hide-text .play-now{display:none}
body.hide-text .sent{opacity:.55}
body.hide-text .sent.playing{opacity:1}

/* --- 重点表达 --- */
.keys-card{background:#fff;border-radius:26px;box-shadow:var(--shadow);padding:14px 18px;margin-top:18px}
.keys-head{
  width:100%;border:0;background:none;display:flex;align-items:center;gap:9px;
  font-weight:800;font-size:16.5px;padding:4px 0;
}
.keys-head .cnt{color:var(--ink-2);font-size:13.5px;font-weight:700}
.keys-head .arrow{margin-left:auto;color:var(--ink-2);transition:transform .2s}
.keys-head.open .arrow{transform:rotate(180deg)}
.keys-list{padding-top:10px}
.key-row{
  display:flex;align-items:center;gap:12px;padding:9px 10px;border-radius:14px;
  cursor:pointer;transition:background .15s ease, box-shadow .15s ease;
}
.key-row:hover{background:#f7f9ff}
.key-row.playing{background:#eef3ff;box-shadow:inset 0 0 0 2px #c9d8ff}
.key-row .k-txt{display:flex;flex-direction:column;gap:1px;min-width:0}
.key-en{display:block;font-weight:800;font-size:16.5px;color:var(--blue-d)}
.key-zh{display:block;color:var(--ink-2);font-size:14px}
.key-row .k-say{
  margin-left:auto;border:0;background:#eef3ff;color:var(--blue-d);border-radius:11px;
  width:42px;height:42px;font-size:17px;flex:0 0 42px;
  transition:background .15s, color .15s, transform .1s;
}
.key-row .k-say:hover{background:#dfe9ff;transform:scale(1.05)}
.key-row.playing .k-say{background:var(--blue);color:#fff;animation:pulse 1.5s ease-in-out infinite}
.k-all{
  width:100%;border:2px dashed #c9d8ff;background:#f7f9ff;color:var(--blue-d);
  border-radius:14px;padding:10px;font-weight:800;font-size:15px;margin-bottom:8px;
}
.k-all:hover{background:#eef3ff}
.k-all.on{border-style:solid;background:#eef3ff}

/* ===========================================================
   弹窗 / 提示
   =========================================================== */
.modal{
  position:fixed;inset:0;background:rgba(24,30,56,.45);z-index:60;
  display:flex;align-items:center;justify-content:center;padding:22px;backdrop-filter:blur(3px);
}
.modal-box{
  background:#fff;border-radius:26px;max-width:620px;width:100%;max-height:88vh;
  display:flex;flex-direction:column;box-shadow:0 26px 60px rgba(20,28,60,.32);animation:up .24s ease;
}
@keyframes up{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:translateY(0)}}
.modal-head{display:flex;align-items:center;justify-content:space-between;padding:20px 24px 12px}
.modal-head h3{margin:0;font-size:21px}
.modal-body{padding:6px 24px 20px;overflow:auto}
.modal-foot{padding:14px 24px 22px;display:flex;justify-content:flex-end;gap:10px}
.field{margin-bottom:20px}
.field>label{display:block;font-weight:800;font-size:15.5px;margin-bottom:9px}
.field-tip{color:var(--ink-2);font-size:13.5px;margin:8px 0 0}
.help-body h4{margin:18px 0 6px;font-size:16.5px}
.help-body h4:first-child{margin-top:6px}
.help-body p,.help-body li{color:#3c4260;font-size:15px}
.help-body ul{margin:6px 0;padding-left:22px}
.help-body li{margin-bottom:5px}
.help-body b{color:var(--ink)}

.toast{
  position:fixed;left:50%;bottom:34px;transform:translateX(-50%);
  background:rgba(32,36,58,.94);color:#fff;padding:12px 22px;border-radius:15px;font-weight:700;
  z-index:80;box-shadow:0 12px 28px rgba(0,0,0,.25);animation:up .2s ease;max-width:88vw;text-align:center;
}

/* ===========================================================
   手机 / 平板
   =========================================================== */
@media (max-width:900px){
  .player-grid{grid-template-columns:1fr;gap:14px}
  .list{max-height:none;overflow:visible}

  /* 播放条固定在屏幕底部，手指够得着 */
  .play-card{
    position:fixed;left:0;right:0;bottom:0;top:auto;z-index:35;
    margin:0;padding:8px 12px calc(8px + env(safe-area-inset-bottom));
    border-radius:20px 20px 0 0;
    box-shadow:0 -10px 26px rgba(38,52,110,.16);
    max-height:78vh;overflow-y:auto;-webkit-overflow-scrolling:touch;
  }
  .play-top{gap:12px}
  .play-big{flex:0 0 56px;width:56px;height:56px;font-size:24px}
  .play-label{font-size:12.5px}
  .play-now{font-size:15px;-webkit-line-clamp:1;margin-top:1px}
  .ctl-toggle{display:grid;width:42px;height:42px;font-size:19px}
  .segs{margin:8px 0 6px;height:10px;gap:2px}
  /* 手机上不显示时间、状态标签、长提示和按钮文字，卡片更矮 */
  .time-row{display:none}
  #view-player .play-label{display:none}
  #view-dialogue .dlg-tip{display:none}
  .main-ctl .lbl{display:none}
  .main-ctl{margin-bottom:0}
  .main-ctl .mini{flex:1;justify-content:center;padding:7px 6px;font-size:16px}

  /* 语速 / 文字 / 循环：默认收起，点右上角齿轮展开 */
  .ctl-rows{display:none}
  .play-card.expanded .ctl-rows{display:block;margin-top:10px}
  .play-card.expanded .ctl-row{margin-bottom:9px}
  .ctl-label{flex:0 0 30px;font-size:12.5px}
  .seg button{padding:8px 4px;font-size:13.5px}

  /* 句子清单：大一点、好点 */
  .list-card{padding:12px 10px 10px;border-radius:20px}
  .list-head{padding:2px 6px 8px}
  .list-head .hint{font-size:12px}
  .sent{padding:12px 10px;gap:9px;border-radius:14px}
  .sent-en{font-size:16.5px;line-height:1.45}
  .sent-zh{font-size:13.5px}
  .sn{width:24px;height:24px;font-size:12.5px}
  .sent-tools{opacity:1;gap:6px}
  .sent-tools button{width:40px;height:40px;font-size:16px}

  .keys-card{padding:12px 14px;border-radius:20px}
  .key-en{font-size:15.5px}
  .key-row{padding:10px 8px;gap:9px}
  .key-row .k-say{width:46px;height:46px;flex:0 0 46px;font-size:18px}
  .k-all{padding:12px;font-size:15.5px}

  .view{padding:12px 14px calc(30px + env(safe-area-inset-bottom))}
  /* 底部播放条会盖住内容，这里留出空间 */
  #view-player,
  #view-dialogue{padding-bottom:calc(170px + env(safe-area-inset-bottom))}
  .toast{bottom:calc(200px + env(safe-area-inset-bottom))}
  /* 首页「写一件今天发生的事」：手机上排得更顺眼 */
  .make-card{padding:14px;gap:12px;margin-bottom:18px;border-radius:20px;align-items:center}
  /* 手机：显示全部分类，每行最多两个，分类多了自动换行 */
  .home-tabs{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    grid-auto-flow:row;
    align-content:start;
    align-items:stretch;
    gap:8px;
    margin-bottom:14px;
  }
  .htab{padding:9px 12px;font-size:14px;width:100%;min-width:0;justify-content:flex-start}
  .htab .ht{flex:1;text-align:left}
  .htab i{margin-left:auto;flex:0 0 auto}
  .pager{gap:8px;margin-top:16px}
  .pager .mini{min-width:78px;padding:9px 10px}
  #btn-make .mk-emoji{flex:0 0 44px;width:44px;height:44px;font-size:22px;border-radius:14px}
  #btn-make .mk-main{gap:2px}
  #btn-make .mk-title{font-size:16.5px}
  #btn-make .mk-sub{font-size:12.5px;line-height:1.5}
  #btn-make .mk-go{font-size:12.5px;padding:8px 12px}
  .card{padding:16px 16px;border-radius:20px}
  .card h3{font-size:16.5px}
  .erow{flex-wrap:wrap}
  .erow .en,.erow .zh{flex:1 1 100%}
  .erow .say,.erow .del{width:38px;height:38px;flex:0 0 38px}
  .erow .idx{flex:0 0 22px}
  .opt-row{flex-wrap:wrap}
  .opt-label{flex:0 0 100%}
  /* 手机上按钮竖着排、各自占满一行，文字就不会换行了 */
  .mk-actions{flex-direction:column;gap:9px}
  .mk-actions .btn{flex:none;width:100%;min-width:0;padding:13px 14px}
  .brand h1{font-size:23px}
  .brand-logo{width:52px;height:52px;font-size:27px;border-radius:17px}
  .home-head{margin-bottom:16px;gap:10px}
  .head-right{gap:8px}
  .stat-pill{padding:8px 14px;font-size:14.5px}
  .user-chip{max-width:118px;padding:8px 12px;font-size:14px;letter-spacing:0}
  .brand h1{white-space:nowrap}

  /* 手机上把副标题藏起来，抬头就能和右侧按钮排在同一行 */
  .brand-sub{display:none}
  .home-head{flex-wrap:nowrap}
  .card-grid{grid-template-columns:1fr;gap:12px}
  .pcard{padding:14px 15px 13px}
  .pcard .pc-emoji{font-size:28px}
  .pcard .pc-play{width:38px;height:38px;right:12px;bottom:11px}
  .group-title{margin:20px 0 10px}
  .group-title h2{font-size:18.5px}
  .home-foot{margin-top:24px;gap:10px}
  .foot-actions{gap:7px}
  .foot-action{min-height:54px;padding:7px 4px;border-radius:14px;flex-direction:column;gap:2px;font-size:12.5px}
  .foot-action .fa-icon{font-size:18px}
  .version{font-size:11.5px}

  /* 弹窗从底部弹出，像手机 App */
  .modal{padding:0;align-items:flex-end}
  .modal-box{max-width:none;border-radius:24px 24px 0 0;max-height:92vh}
  .modal-head{padding:16px 18px 8px}
  .modal-body{padding:4px 18px 14px}
  .modal-foot{padding:10px 18px calc(18px + env(safe-area-inset-bottom))}
  .field{margin-bottom:16px}
  .seg button{padding:10px 6px}
}

/* 超窄屏（小手机） */
@media (max-width:380px){
  .sent-en{font-size:15.5px}
  .play-big{flex:0 0 56px;width:56px;height:56px;font-size:23px}
  .main-ctl .mini{font-size:13px;padding:9px 5px}
}

/* 横屏手机：左右分栏，播放条不用固定 */
@media (min-width:640px) and (max-width:900px) and (orientation:landscape){
  .player-grid{grid-template-columns:minmax(300px,1fr) 1.2fr}
  .play-card{position:static;margin:0 0 12px;border-radius:22px;
             max-height:none;overflow:visible;padding:12px 14px;
             box-shadow:0 8px 22px rgba(38,52,110,.10)}
  #view-player{padding-bottom:calc(30px + env(safe-area-inset-bottom))}
  .toast{bottom:34px}
  .ctl-rows{display:block}
  .ctl-toggle{display:none}
}

@media (prefers-reduced-motion:reduce){
  *{animation-duration:.001s !important;transition-duration:.001s !important}
}
