/* ====================== 听写模式 ====================== */

/* ---- 句子选择（全书所有文本，不修改 DOM，仅改变光标提示） ---- */
.dict-mode .book,
.dict-mode .book *{ cursor:text; }
.dict-mode .book button,
.dict-mode .book a,
.dict-mode .book input,
.dict-mode .book textarea,
.dict-mode .book select{ cursor:default; }

/* ---- 句子池浮层（右侧） ---- */
.dict-pool{
  position:fixed; top:0; right:0; width:340px; height:100vh;
  background:#25222e; color:#eae6d6; z-index:600;
  display:none; flex-direction:column; box-shadow:-4px 0 20px rgba(0,0,0,.5);
  font-family:"Iowan Old Style","Palatino Linotype","Book Antiqua",Georgia,"Times New Roman","Songti SC",serif;
}
.dict-pool-h{
  display:flex; align-items:center; padding:12px 14px; background:#2d293a; gap:6px; flex-shrink:0;
  border-bottom:1px solid #3d3950;
}
.dict-pool-h span:first-child{ flex:1; font-size:15px; font-weight:600; color:#f0ead8; }
#dictCount{ color:#d4af37; font-weight:700; }
.dict-pool-h button{
  background:none; border:none; color:#b8b0a0; cursor:pointer; font-size:16px;
  padding:4px 6px; border-radius:4px; line-height:1;
}
.dict-pool-h button:hover{ background:#3d3950; color:#f0ead8; }
#dictCloseBtn{ font-size:20px; margin-left:2px; }

.dict-list-wrap{ flex:1; overflow-y:auto; padding:8px; }

.dict-list-item{
  background:#2d293a; border-radius:6px; padding:8px 10px; margin-bottom:6px;
  border-left:3px solid #4a4560; font-size:13.5px; line-height:1.5; color:#e0dccf;
}
.dict-list-item.has-pair{ border-left-color:#d4af37; }
.dict-list-item.edit-mode{ border-left-color:#d4af37; }

.dli-head{ display:flex; align-items:center; margin-bottom:4px; }
.dli-num{ font-weight:700; color:#d4af37; font-size:13px; flex:1; }
.dli-ops{ display:flex; gap:2px; }
.dli-op{
  background:none; border:none; color:#706858; cursor:pointer; font-size:11px;
  padding:2px 4px; border-radius:3px; line-height:1;
}
.dli-op:hover{ background:#3d3950; color:#f0ead8; }
.dli-op:active{ color:#d4af37; }

.dli-text{ display:block; margin-bottom:2px; }
.dli-pair-text{
  color:#a09880; font-style:italic; padding-left:10px;
  border-left:2px solid #4a4560; margin:2px 0;
}
.dli-cn{
  font-size:12px; color:#a09880; margin-top:3px; padding-top:3px;
  border-top:1px dashed #3d3950;
}
.dli-pair-cn{ color:#807868; font-style:italic; }

/* ---- 编辑模式 ---- */
.dict-list-item textarea{
  width:100%; background:#1e1b28; color:#eae6d6; border:1px solid #4a4560;
  border-radius:4px; padding:6px 8px; font-size:13px; font-family:inherit;
  resize:vertical; min-height:50px; box-sizing:border-box; margin-bottom:4px;
}
.dict-list-item textarea:focus{ outline:none; border-color:#d4af37; }
.dli-edit-cn{ font-size:12px; color:#b0a898; min-height:40px; }
.dli-edit-pair{ border-left:2px solid #4a4560; padding-left:8px; }

/* ---- 池底部按钮 ---- */
.dict-pool-ft{
  padding:10px 14px; display:flex; gap:8px; flex-shrink:0;
  border-top:1px solid #3d3950;
}
.dict-btn{
  padding:7px 14px; border-radius:6px; border:none; cursor:pointer;
  font-size:13px; font-family:inherit; font-weight:500;
  background:#3d3950; color:#c8c0b0; flex:1;
}
.dict-btn:hover{ background:#4a4560; }
.dict-btn-primary{ background:#d4af37; color:#1a1a1a; }
.dict-btn-primary:hover{ background:#c5a032; }
.dict-btn:disabled{ opacity:.4; cursor:default; }

/* ---- 预览模态框 ---- */
.dict-preview{
  position:fixed; inset:0; background:rgba(10,8,16,.85); z-index:700;
  display:none; align-items:center; justify-content:center;
}
.dict-preview.show{ display:flex; }
.dict-preview-inner{
  width:1024px; max-width:95vw; background:#1a1823; border-radius:12px;
  overflow:hidden; box-shadow:0 8px 40px rgba(0,0,0,.6);
}
.dict-preview-h{
  display:flex; align-items:center; padding:10px 16px;
  background:#2d293a; gap:10px;
}
.dict-preview-h span{ color:#f0ead8; font-size:14px; font-weight:600; }
.dict-preview-tabs{ display:flex; gap:4px; margin:0 8px; }
.dict-tab{
  padding:4px 12px; border-radius:12px; border:1px solid #4a4560;
  background:transparent; color:#a09880; cursor:pointer; font-size:12px; font-family:inherit;
}
.dict-tab.sel{ background:#d4af37; color:#1a1a1a; border-color:#d4af37; }
#dictPageInfo{ color:#908878; font-size:12px; margin-left:auto; }
#dictExportBtn{ margin-left:auto; flex:0; padding:5px 14px; }
#dictPreviewClose{
  background:none; border:none; color:#908878; cursor:pointer;
  font-size:22px; padding:0 4px; line-height:1;
}
#dictPreviewClose:hover{ color:#f0ead8; }

/* ---- 幻灯片区域 (16:9) ---- */
.dict-slide-wrap{
  position:relative; background:#1e1c26; padding:24px; display:flex; justify-content:center;
}
.dict-slide{
  width:800px; aspect-ratio:16/9; background:#fcf9f2; border-radius:6px;
  padding:32px 40px; box-sizing:border-box; box-shadow:0 2px 12px rgba(0,0,0,.3);
  position:relative; overflow:hidden;
}
.dict-slide-title{
  font-size:20px; font-weight:700; color:#2d2a1e;
  margin-bottom:10px; padding-bottom:6px; border-bottom:2px solid #d4af37;
  font-family:"Iowan Old Style","Palatino Linotype",Georgia,serif;
}
.dict-slide-items{
  font-size:24px; line-height:1.5; color:#1a1810;
  font-family:"Iowan Old Style","Palatino Linotype",Georgia,serif;
}
.dict-slide-items p{
  margin:0; padding:2px 0; word-break:break-word;
}
.dict-slide-items .dline{
  display:flex; align-items:flex-start; gap:4px; margin-bottom:2px;
}
.dline .dline-num{
  min-width:32px; text-align:right; font-weight:700; color:#d4af37;
  font-size:22px; line-height:1.5; flex-shrink:0;
}
.dline .dline-text{ flex:1; line-height:1.5; }
.dline .dline-text2{
  flex:1; margin-left:8px; padding-left:10px;
  border-left:1.5px solid #d4af37;
}
.dline.dline-short .dline-text{ width:48%; }
.dline.dline-pair .dline-text{ width:48%; flex:none; }
.dline.dline-pair .dline-text2{ width:48%; flex:none; border-left:1.5px solid #d4af37; padding-left:10px; margin-left:4px; }

.dict-slide-pg{
  position:absolute; bottom:12px; right:18px;
  font-size:12px; color:#b0a898; font-family:Georgia,serif;
}

/* ---- 预览底部翻页 ---- */
.dict-preview-nav{
  display:flex; justify-content:center; gap:12px; padding:10px 0;
  background:#1e1c26;
}
.dict-preview-nav button{
  padding:6px 18px; border:1px solid #4a4560; border-radius:6px;
  background:#2d293a; color:#c8c0b0; cursor:pointer; font-size:14px; font-family:inherit;
}
.dict-preview-nav button:hover{ background:#3d3950; }

/* ---- 响应式 ---- */
@media (max-width:720px){
  .dict-pool{ width:280px; }
  .dict-preview-inner{ width:100%; border-radius:0; }
  .dict-slide{ width:100%; padding:20px 24px; }
  .dict-slide-items{ font-size:20px; }
}
