/* Daily English News page. Everything is scoped to #news-root so it cannot touch the rest of the site. */
#news-root{--muted:var(--brand);--mid:var(--ink2);--rule:var(--line);--q-bg:var(--surface);--correct:#1a6b2e;--wrong:#9b1a1a;--opt-hover:var(--soft);--fs:1;
  --f-serif:Georgia,"Noto Serif TC","Times New Roman",serif;position:relative;isolation:isolate;max-width:680px;margin:0 auto;font-family:var(--f-serif);line-height:1.85}
#news-root *{box-sizing:border-box}
#news-root hr{border:none;border-top:1px solid var(--rule);margin:2rem 0}
#news-root .audio-box{position:sticky;top:62px;z-index:9;background:var(--surface);border:1px solid var(--rule);border-radius:12px;padding:.7rem;margin-bottom:1.2rem;box-shadow:0 2px 10px rgba(16,41,45,.08)}
#news-root .audio-btns,#news-root .speed{display:flex;gap:.4rem;flex-wrap:wrap;align-items:center}
#news-root .audio-btns{margin-bottom:.6rem}
#news-root .fsz{display:flex;gap:.35rem}
#news-root .abtn{font:inherit;font-size:.82rem;background:var(--bg);border:1px solid var(--rule);border-radius:20px;padding:.28rem .85rem;cursor:pointer;color:var(--mid)}
#news-root .abtn:hover{border-color:var(--brand);color:var(--ink)}
#news-root .abtn.on{background:var(--brand);border-color:var(--brand);color:#fff;font-weight:700}
#news-root .abtn.ab.half{border-style:dashed;border-color:var(--brand);color:var(--brand)}
#news-root .abtn:disabled{opacity:.4;cursor:default}
#news-root .fsz .abtn{min-width:2.6rem;font-weight:700}
#news-root audio{display:none}
#news-root .mini{display:inline-flex;align-items:center;gap:.55rem;background:var(--soft);border-radius:20px;padding:.15rem .8rem .15rem .3rem}
#news-root .mini-play{width:2.1rem;height:2.1rem;border:none;border-radius:50%;background:none;color:var(--ink);cursor:pointer;display:grid;place-items:center;padding:0}
#news-root .mini-play svg{width:1rem;height:1rem;fill:currentColor}
#news-root .mini-play .i-pause,#news-root .mini-play.playing .i-play{display:none}
#news-root .mini-play.playing .i-pause{display:block}
#news-root .mini-time{white-space:nowrap;font-variant-numeric:tabular-nums;font-size:.8rem;font-family:system-ui,sans-serif}
#news-root .toolbar{display:flex;gap:.5rem;flex-wrap:wrap;margin-bottom:.8rem;align-items:center}
#news-root .toolbar-label{font-size:.78rem;color:var(--mid)}
#news-root .tog{display:flex;align-items:center;gap:.4rem;font:inherit;font-size:.85rem;background:var(--surface);border:1px solid var(--rule);border-radius:20px;padding:.28rem .8rem .28rem .55rem;cursor:pointer;color:var(--mid)}
#news-root .tog.on{background:var(--soft);border-color:var(--brand);color:var(--ink)}
#news-root .pip{width:9px;height:9px;border-radius:50%;background:#ccc}
#news-root .tog.on .pip{background:var(--brand)}
#news-root .tapnote{font-family:inherit;margin-bottom:1.4rem;font-size:.85rem}
#news-root .collapsible{overflow:hidden;transition:max-height .35s ease,opacity .3s ease;max-height:2500px}
#news-root .collapsible.hidden{max-height:0!important;opacity:0;pointer-events:none}
#news-root .dateline{font-family:system-ui,sans-serif;font-size:.74rem;letter-spacing:.12em;color:var(--brand);text-transform:uppercase;margin:0 0 .4rem;font-weight:700}
#news-root h1{font-size:calc(1.5rem * var(--fs));line-height:1.3;margin:0 0 .8rem;color:var(--ink);font-weight:700}
#news-root .summary{font-size:calc(1.08rem * var(--fs));line-height:1.95;margin:0}
#news-root .w{border-bottom:1px dashed rgba(13,99,112,.55);cursor:help}
#news-root .w:hover,#news-root .w.open{border-bottom-color:var(--brand);background:rgba(25,168,172,.14)}
#tip{position:fixed;left:0;top:0;background:#10292D;color:#fff;font-size:.85rem;line-height:1.5;padding:3px 10px 4px;border-radius:6px;max-width:min(280px,calc(100vw - 16px));pointer-events:none;opacity:0;transition:opacity .12s;z-index:50}
#tip.show{opacity:1}
#news-root .zh-title{font-size:calc(1.15rem * var(--fs));font-weight:700;margin:0 0 .5rem;line-height:1.6}
#news-root .zh-body{font-size:calc(1rem * var(--fs));line-height:2;color:var(--mid)}
#news-root .zh-body p{margin:0 0 .8em}
#news-root .sec-label{font-family:system-ui,sans-serif;font-size:.74rem;letter-spacing:.12em;color:var(--brand);text-transform:uppercase;font-weight:700;margin-bottom:.75rem;display:block}
#news-root .keywords{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.35rem 2rem}
#news-root .keywords li{font-size:calc(.95rem * var(--fs));color:var(--mid);overflow-wrap:anywhere}
#news-root .keywords li strong{color:var(--ink)}
#news-root .keywords li.hasa{display:flex;align-items:center;justify-content:flex-start;gap:.4rem}
#news-root .keywords .kt{min-width:0}
#news-root .kbtn{flex:none;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:1.9rem;height:1.9rem;margin:-.25rem 0;padding:0;border:1px solid var(--rule);border-radius:50%;background:var(--surface);color:var(--mid);cursor:pointer;transition:color .15s,border-color .15s;-webkit-tap-highlight-color:transparent}
#news-root .kbtn::before{content:'';display:block;width:0;height:0;margin-left:.12rem;border-style:solid;border-width:.3rem 0 .3rem .5rem;border-color:transparent transparent transparent currentColor}
#news-root .kbtn:hover,#news-root .kbtn.on{color:var(--muted);border-color:var(--muted)}
#news-root .kbtn.on::before{width:.5rem;height:.5rem;margin-left:0;border:0;background:currentColor}
@media(max-width:520px){#news-root .keywords{grid-template-columns:minmax(0,1fr)}}
#news-root .q-stem{font-size:calc(1rem * var(--fs));font-weight:700;margin:0 0 .7rem;line-height:1.6}
#news-root .opts{list-style:none;padding:0;margin:0}
#news-root .opts li{margin-bottom:.4rem}
#news-root .obtn{display:block;width:100%;text-align:left;background:var(--surface);border:1px solid var(--rule);border-radius:10px;padding:.6rem .9rem;font:inherit;font-size:calc(.95rem * var(--fs));color:var(--ink);cursor:pointer;line-height:1.5}
#news-root .obtn:hover:not(:disabled){background:var(--opt-hover)}
#news-root .obtn.cp,#news-root .obtn.rc{background:#e6f4ea;border-color:var(--correct);color:var(--correct);font-weight:700}
#news-root .obtn.wp{background:#fbeaea;border-color:var(--wrong);color:var(--wrong);text-decoration:line-through}
#news-root .fb{font-size:.88rem;margin-top:.5rem;padding:.35rem .7rem;border-radius:6px;display:none}
#news-root .fb.show{display:block}
#news-root .fb.ok{color:var(--correct);background:#e6f4ea}
#news-root .fb.no{color:var(--wrong);background:#fbeaea}
#news-root .discuss{background:var(--surface);border-left:4px solid var(--brand);border-radius:0 10px 10px 0;padding:.95rem 1.15rem;font-size:calc(1rem * var(--fs));line-height:1.8}
#news-root .qlabel{color:var(--brand);font-weight:700;display:block;margin-bottom:.4rem;font-family:system-ui,sans-serif;font-size:.74rem;letter-spacing:.1em;text-transform:uppercase}
#news-root .archive{list-style:none;padding:0;display:grid;gap:8px}
#news-root .archive a{display:block;background:var(--surface);border:1px solid var(--rule);border-radius:10px;padding:10px 14px;text-decoration:none;color:var(--ink);font-size:.95rem}
#news-root .archive a:hover,#news-root .archive a[aria-current]{border-color:var(--brand)}
#news-root .archive .ad{font-family:system-ui,sans-serif;font-size:.78rem;color:var(--brand);font-weight:700;margin-right:.5rem}
#band{position:absolute;z-index:-1;left:0;top:0;width:0;height:0;border-radius:6px;pointer-events:none;opacity:0;background:rgba(25,168,172,.22);transition:top .15s ease-out,height .15s ease-out,opacity .12s}
#band.snap{transition:none}
#news-root .t.abm,#news-root .c.abm{box-shadow:inset 0 -3px rgba(13,99,112,.7)}
#news-root :focus-visible{outline:2px solid var(--brand);outline-offset:2px}
@media(max-width:640px){
  #news-root .audio-box{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:.4rem .35rem;padding:.55rem;top:58px}
  #news-root .audio-btns,#news-root .speed,#news-root .fsz{display:contents}
  #news-root .audio-box .abtn{grid-column:span 2;margin:0;min-width:0;padding:.3rem .1rem;text-align:center;white-space:nowrap;font-size:.76rem}
  #news-root #b-both,#news-root #b-en,#news-root #b-zh{grid-column:span 4}
  #news-root .fsz .abtn{grid-column:span 3}
  #news-root .mini{grid-column:span 4;justify-content:center;padding:.1rem .5rem .1rem .2rem}
  #news-root #b-ab{order:1}
  #news-root .audio-box .skip,#news-root .audio-box .sp,#news-root #b-rep{order:2}
}
@media(prefers-reduced-motion:reduce){#news-root *{transition:none!important}}
#news-root .week{margin-bottom:1.4rem}
#news-root .weeklist{display:grid;gap:6px}
#news-root .weeklist a{display:flex;gap:.7rem;align-items:baseline;background:var(--surface);border:1px solid var(--rule);border-radius:10px;padding:8px 12px;text-decoration:none;color:var(--ink);font-size:.92rem;line-height:1.4}
#news-root .weeklist a b{font-family:system-ui,sans-serif;color:var(--brand);font-size:.8rem;white-space:nowrap;min-width:4.6rem}
#news-root .weeklist a[aria-current]{border-color:var(--brand);background:var(--soft)}
#news-root .weeklist a:hover{border-color:var(--brand)}

/* ---------- select a word: meaning in this sentence + add to Dictionary (owner and helper teachers) ---------- */
#sw-btn{position:fixed;left:50%;bottom:16px;transform:translateX(-50%);z-index:60;background:var(--brand);color:#fff;border:none;border-radius:24px;padding:.7rem 1.3rem;font:inherit;font-size:.95rem;font-weight:700;box-shadow:0 4px 16px rgba(16,41,45,.3);cursor:pointer;max-width:calc(100vw - 32px)}
#sw-btn[hidden],#sw-card[hidden]{display:none}
#sw-card{position:fixed;left:50%;bottom:0;transform:translateX(-50%);z-index:61;width:min(560px,100vw);max-height:80vh;overflow:auto;background:var(--surface,#fff);border:1px solid var(--line,#d6e4e6);border-bottom:none;border-radius:16px 16px 0 0;padding:1rem 1.2rem 1.4rem;box-shadow:0 -6px 24px rgba(16,41,45,.22);font-family:system-ui,sans-serif;line-height:1.6;color:var(--ink,#10292D)}
#sw-card .sw-x{position:absolute;right:.6rem;top:.4rem;background:none;border:none;font-size:1.7rem;line-height:1;cursor:pointer;color:var(--ink2,#456);padding:.3rem .6rem}
#sw-card .sw-sel{margin:0 2rem .4rem 0;font-size:.8rem;color:var(--ink2,#456)}
#sw-card .sw-word{font-size:1.5rem;font-weight:700}
#sw-card .sw-pos{color:var(--brand);font-weight:700}
#sw-card .sw-ipa{color:var(--ink2,#456);font-size:.9rem}
#sw-card p{margin:.2rem 0}
#sw-card .sw-zh{font-size:1.25rem;font-weight:700;margin-top:.4rem}
#sw-card .sw-en{color:var(--ink2,#456)}
#sw-card .sw-note{font-size:.88rem;color:var(--ink2,#456)}
#sw-card .sw-ex{margin-top:.7rem;padding:.55rem .8rem;background:var(--soft,#eaf6f6);border-radius:8px;font-family:Georgia,serif;font-size:.95rem}
#sw-card .sw-ex b{background:rgba(25,168,172,.28);font-weight:700}
#sw-card .sw-add{margin-top:.8rem;background:var(--brand);color:#fff;border:none;border-radius:10px;padding:.65rem 1.2rem;font:inherit;font-weight:700;font-size:1rem;cursor:pointer}
#sw-card .sw-add:disabled{opacity:.5}
#sw-card .sw-done,#sw-card .sw-err,#sw-card .sw-wait{margin-top:.5rem;font-size:.92rem}
#sw-card .sw-err{color:#9b1a1a}

/* Day navigation: previous / next lesson. Always two boxes, so nothing moves when one is off. */
#news-root .daynav{display:flex;justify-content:space-between;gap:.6rem;margin-bottom:.8rem}
#news-root .dnbtn{flex:1 1 0;min-width:0;box-sizing:border-box;min-height:2.6rem;display:flex;align-items:center;justify-content:center;text-align:center;font-size:.9rem;font-weight:700;text-decoration:none;color:var(--ink);background:var(--surface);border:1px solid var(--rule);border-radius:20px;padding:.3rem .8rem;white-space:nowrap}
#news-root a.dnbtn:hover{border-color:var(--brand);color:var(--brand)}
#news-root .dnbtn.off{opacity:.4}
/* tap a word, add it to 生力軍 (newsword.js): a bar fixed at the bottom, so the page itself never moves */
#wb-bar{position:fixed;left:50%;bottom:0;transform:translateX(-50%);z-index:59;width:min(560px,100vw);box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:.5rem;background:var(--surface,#fff);border:1px solid var(--line,#d6e4e6);border-bottom:none;border-radius:16px 16px 0 0;padding:.6rem .5rem calc(.6rem + env(safe-area-inset-bottom)) 1rem;box-shadow:0 -6px 24px rgba(16,41,45,.18)}
#wb-bar[hidden]{display:none}
#wb-text{margin:0;font-size:.95rem;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#wb-text b{font-size:1.05rem;margin-right:.35rem}
#wb-add{min-height:46px;min-width:11em;border:none;border-radius:12px;background:var(--brand);color:#fff;font:inherit;font-size:.92rem;font-weight:700;padding:.3rem .8rem;cursor:pointer}
#wb-add:disabled{opacity:.6;cursor:default}
#wb-x{width:44px;height:44px;border:none;background:none;font-size:1.5rem;line-height:1;color:var(--ink2,#456);cursor:pointer}
