/* v417: 📖 Word sheets — src/js/394-word-sheets.js */
#tab-sheets{ max-width:760px; margin:0 auto; }
#sheetsRoot{ --ws-ink:#14302b; --ws-sub:#4b5f5a; --ws-line:#e3ebe7; --ws-acc:#0F766E; --ws-bg:#fff; --ws-soft:#f2f8f6; }
body.dark-mode #sheetsRoot{ --ws-ink:#e8f2ef; --ws-sub:#a9bdb7; --ws-line:#2c3d39; --ws-bg:#16201e; --ws-soft:#1c2a27; --ws-acc:#5eead4; }
.ws-intro{ margin:0 0 10px; }
.ws-groups{ display:flex; flex-wrap:wrap; gap:8px; margin:0 0 10px; }
.ws-g{ border:1px solid var(--ws-line); background:var(--ws-bg); color:var(--ws-ink); border-radius:999px; padding:8px 14px; font-weight:700; font-size:14px; min-height:40px; cursor:pointer; }
.ws-g.on{ background:var(--ws-acc); border-color:var(--ws-acc); color:#fff; }
body.dark-mode .ws-g.on{ color:#05201c; }
.ws-n{ font-weight:600; opacity:.75; font-size:12px; margin-left:2px; }
.ws-search{ width:100%; box-sizing:border-box; border:1px solid var(--ws-line); border-radius:12px; padding:10px 12px; font-size:15px; margin:0 0 10px; background:var(--ws-bg); color:var(--ws-ink); }
.ws-list{ display:grid; grid-template-columns:minmax(0,1fr); gap:8px; }
@media (min-width:700px){ .ws-list{ grid-template-columns:minmax(0,1fr) minmax(0,1fr); } }
.ws-card{ min-width:0; box-sizing:border-box; display:flex; align-items:center; gap:12px; text-align:left; width:100%; border:1px solid var(--ws-line); background:var(--ws-bg); border-radius:16px; padding:12px 14px; cursor:pointer; color:var(--ws-ink); box-shadow:0 2px 6px rgba(15,60,50,.05); }
.ws-card:hover{ border-color:var(--ws-acc); }
.ws-ic{ font-size:24px; flex:0 0 auto; }
.ws-ct{ flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:2px; }
.ws-ct b{ font-size:15px; }
.ws-ct small{ color:var(--ws-sub); font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ws-cn{ flex:0 0 auto; font-size:12px; font-weight:700; color:var(--ws-acc); background:var(--ws-soft); border-radius:999px; padding:3px 9px; }
.ws-empty{ color:var(--ws-sub); padding:12px 4px; }

.ws-sheet{ background:var(--ws-bg); border:1px solid var(--ws-line); border-radius:22px; padding:14px 14px 12px; box-shadow:0 4px 14px rgba(15,60,50,.07); touch-action:pan-y; }
.ws-sheet.in-r{ animation:wsInR .24s ease-out; } .ws-sheet.in-l{ animation:wsInL .24s ease-out; }
@keyframes wsInR{ from{ opacity:.3; transform:translateX(36px); } to{ opacity:1; transform:none; } }
@keyframes wsInL{ from{ opacity:.3; transform:translateX(-36px); } to{ opacity:1; transform:none; } }
@media (prefers-reduced-motion:reduce){ .ws-sheet.in-r, .ws-sheet.in-l{ animation:none; } }
.ws-top{ display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; }
.ws-back{ border:0; background:none; color:var(--ws-acc); font-weight:700; font-size:14px; padding:8px 4px; min-height:40px; cursor:pointer; }
.ws-mode{ display:inline-flex; background:var(--ws-soft); border-radius:999px; padding:3px; }
.ws-mode button{ border:0; background:none; border-radius:999px; padding:7px 12px; font-weight:700; font-size:13px; color:var(--ws-sub); min-height:36px; cursor:pointer; }
.ws-mode button.on{ background:var(--ws-acc); color:#fff; }
body.dark-mode .ws-mode button.on{ color:#05201c; }
.ws-head{ display:flex; align-items:center; gap:10px; margin:8px 0 2px; }
.ws-hic{ font-size:28px; }
.ws-title{ margin:0; font-size:22px; line-height:1.25; color:var(--ws-ink); }
.ws-hint{ margin:2px 0 10px; color:var(--ws-sub); font-size:13px; }
.ws-body{ display:flex; flex-direction:column; gap:6px; }
.ws-line{ display:flex; align-items:center; gap:8px; border-radius:14px; padding:9px 10px; background:var(--ws-soft); border:1px solid transparent; min-width:0; }
.ws-line.now{ border-color:var(--ws-acc); }
.ws-txt{ flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:2px; }
.ws-main{ font-size:18px; font-weight:700; color:var(--ws-ink); line-height:1.3; overflow-wrap:anywhere; }
.ws-mean{ font-size:14.5px; color:var(--ws-acc); font-weight:600; overflow-wrap:anywhere; }
@media (min-width:700px){ .ws-line.row .ws-txt{ flex-direction:row; align-items:baseline; gap:14px; } .ws-line.row .ws-main{ flex:0 0 52%; } }
.ws-acts{ flex:0 0 auto; display:flex; gap:4px; }
.ws-say, .ws-add{ width:38px; height:38px; border-radius:50%; border:1px solid var(--ws-line); background:var(--ws-bg); font-size:16px; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; padding:0; }
.ws-add{ font-size:13px; }
.ws-sheet.test .ws-line{ cursor:pointer; }
.ws-sheet.test .ws-line .ws-mean{ filter:blur(6px); opacity:.55; user-select:none; transition:filter .15s, opacity .15s; }
.ws-sheet.test .ws-line.open .ws-mean{ filter:none; opacity:1; }
.ws-pair{ display:grid; grid-template-columns:1fr auto 1fr; align-items:stretch; gap:6px; }
.ws-pair .ws-line{ flex-direction:column; align-items:stretch; text-align:center; }
.ws-pair .ws-acts{ justify-content:center; }
.ws-pair .ws-main{ font-size:17px; }
.ws-arrow{ align-self:center; color:var(--ws-sub); font-weight:700; }
.ws-tools{ display:flex; flex-wrap:wrap; gap:8px; margin:12px 0 4px; }
.ws-tool{ border:1px solid var(--ws-line); background:var(--ws-bg); color:var(--ws-ink); border-radius:999px; padding:8px 14px; font-weight:700; font-size:14px; min-height:40px; cursor:pointer; }
.ws-tool:first-child{ background:var(--ws-acc); border-color:var(--ws-acc); color:#fff; }
body.dark-mode .ws-tool:first-child{ color:#05201c; }
.ws-nav{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:8px; }
.ws-arw{ width:48px; height:48px; border-radius:50%; border:1px solid var(--ws-line); background:var(--ws-bg); color:var(--ws-acc); font-size:26px; font-weight:700; cursor:pointer; line-height:1; }
.ws-arw:disabled{ opacity:.35; cursor:default; }
.ws-dots{ display:flex; flex-wrap:wrap; justify-content:center; gap:6px; flex:1 1 auto; }
.ws-dot{ width:8px; height:8px; border-radius:50%; background:var(--ws-line); }
.ws-dot.on{ background:var(--ws-acc); width:20px; border-radius:6px; }
.ws-pos{ color:var(--ws-sub); font-weight:700; font-size:14px; }
@media (max-width:420px){ .ws-main{ font-size:17px; } .ws-pair{ grid-template-columns:1fr; } .ws-arrow{ transform:rotate(90deg); justify-self:center; } }
/* v418: tone families */
.ws-note{ margin:2px 0 8px; font-size:13.5px; color:var(--ws-ink); background:var(--ws-soft); border-radius:10px; padding:8px 10px; }
.ws-quiz{ margin:4px 0 8px; font-weight:700; color:var(--ws-acc); font-size:15px; }
.ws-tone{ align-self:flex-start; font-size:11.5px; font-weight:800; letter-spacing:.02em; border:1px solid currentColor; border-radius:999px; padding:1px 8px; margin-bottom:2px; }
.ws-tone.tone-ngang{ color:var(--ws-sub); }
.ws-sheet .ws-line.q-ok{ border-color:#16a34a; background:#ecfdf3; }
.ws-sheet .ws-line.q-bad{ border-color:#e11d48; background:#fff1f2; }
body.dark-mode .ws-sheet .ws-line.q-ok{ background:#12301f; } body.dark-mode .ws-sheet .ws-line.q-bad{ background:#3a1520; }
@media (min-width:700px){ .ws-line.row .ws-txt:has(.ws-tone){ flex-direction:column; align-items:flex-start; gap:2px; } }
