
:root{--hl-sentence:#fff3cd;--hl-word:#ffd54f;--accent:#2d4a1e}
*{box-sizing:border-box;margin:0;padding:0}
body{font-family:Georgia,"Times New Roman",serif;background:#fafaf7;color:#222;line-height:1.9;padding:16px;max-width:1100px;margin:0 auto}
h1{font-size:20pt;color:var(--accent);margin-bottom:4px;text-align:center}
.meta{font-size:11pt;color:#888;font-style:italic;margin-bottom:16px;text-align:center}
.bar{position:sticky;top:0;background:#fafaf7;padding:8px 0;border-bottom:1px solid #e0e0e0;display:flex;gap:8px;justify-content:center;align-items:center;flex-wrap:wrap;z-index:10}
.bar button{padding:6px 14px;border:none;border-radius:6px;background:var(--accent);color:#fff;cursor:pointer;font-size:12px}
.bar select{padding:6px 10px;border:1px solid #ccc;border-radius:6px;font-size:13px;max-width:220px}
.grid{display:grid;grid-template-columns:1fr;gap:16px;margin-top:16px}
@media(min-width:760px){.grid{grid-template-columns:1fr 1fr}}
.card{background:#fff;border:1px solid #eee;border-radius:10px;padding:12px}
.imgs{display:grid;grid-template-columns:1fr 1fr;gap:4px;margin-bottom:10px}
.imgs img{width:100%;height:90px;object-fit:cover;border-radius:4px}
.txt{font-size:13pt;line-height:1.8}
.sent{cursor:pointer;border-radius:3px;padding:1px 2px}
.sent.hl{background:var(--hl-sentence)}
.w{background:var(--hl-word);border-radius:2px;padding:0 1px}
.ed{background:#ff6b6b;color:#fff;border-radius:2px;padding:0 3px;font-weight:bold;cursor:pointer}
.sent.note{border-bottom:2px solid #9b59b6;cursor:help}
.ed:hover{background:#c0392b}
.edit-mode .sent{outline:1px dashed #f0a050}
.shot-mode img{display:none!important}
.shot-mode .card{padding:6px!important}
.shot-mode .sent{font-size:13px!important;line-height:1.4!important;outline:none!important}
.shot-mode .card{gap:4px!important}
.shot-mode .meta{display:none!important}
.pop{position:fixed;right:16px;top:60px;width:340px;max-height:80vh;overflow:auto;background:#fff;border:1px solid #ddd;border-radius:10px;box-shadow:0 4px 20px rgba(0,0,0,.15);padding:16px;display:none;z-index:100;font-family:-apple-system,sans-serif}
.pop.show{display:block}
.pop h3{font-size:14pt;margin-bottom:4px;color:var(--accent)}
.pop .zh{font-size:11pt;color:#333;line-height:1.7;margin-top:4px}
.pop .zh p{margin-bottom:6px}
.pop .zh strong{color:#b5562a}
.pop .close{position:absolute;top:8px;right:12px;cursor:pointer;color:#aaa;font-size:16px}
.spinner{display:inline-block;width:14px;height:14px;border:2px solid #ccc;border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite;vertical-align:middle;margin-right:6px}
@keyframes spin{to{transform:rotate(360deg)}}
.tip{font-size:10pt;color:#999;margin-top:20px;padding-top:12px;border-top:1px solid #eee;text-align:center}
.panel{position:fixed;right:-400px;top:0;width:380px;max-width:95vw;height:100vh;background:#fff;box-shadow:-4px 0 20px rgba(0,0,0,.15);z-index:200;transition:right .25s;display:flex;flex-direction:column;font-family:-apple-system,sans-serif}
.panel.show{right:0}
.panel-head{padding:14px 16px;border-bottom:1px solid #eee;display:flex;justify-content:space-between;align-items:center}
.panel-head h2{font-size:14pt;color:var(--accent)}
.panel-body{flex:1;overflow:auto;padding:12px 16px}
.panel-item{margin-bottom:14px;padding-bottom:10px;border-bottom:1px solid #f0f0f0}
.panel-item .word{font-weight:bold;font-size:12pt;color:#222}
.panel-item .ans{font-size:10.5pt;color:#555;line-height:1.6;margin-top:4px}
.panel-item .ans strong{color:#b5562a}
.panel-foot{padding:10px 16px;border-top:1px solid #eee;display:flex;gap:8px}
.panel-foot button{flex:1;padding:8px;border:none;border-radius:6px;cursor:pointer;font-size:12px}
.export-btn{background:var(--accent);color:#fff}
.close-btn{background:#ddd}
.overlay{position:fixed;inset:0;background:rgba(0,0,0,.2);z-index:150;display:none}
.overlay.show{display:block}
