*{box-sizing:border-box}
:root{--blue:#0d5df5;--blue2:#145df0;--navy:#0e1838;--text:#18223b;--muted:#667085;--line:#dfe5ee;--soft:#f8faff;--card:#fff;--purple:#6d4ce7;--green:#13986b;--red:#df4762;--shadow:0 8px 24px rgba(26,45,92,.055)}
html{scroll-behavior:smooth}body{margin:0;background:#fff;color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:14px;-webkit-font-smoothing:antialiased}button,input{font:inherit}button{cursor:pointer}a{text-decoration:none;color:inherit}.svg-sprite{position:absolute;width:0;height:0;overflow:hidden}
.site-header{position:sticky;top:0;z-index:50;height:72px;background:rgba(255,255,255,.97);border-bottom:1px solid #e8ecf2;backdrop-filter:blur(12px)}.header-inner{max-width:1480px;height:100%;margin:auto;padding:0 28px;display:flex;align-items:center;gap:30px}.brand{display:flex;align-items:center;gap:10px;min-width:245px}.brand-mark{width:42px;height:42px}.brand strong{display:block;color:#0c4bb7;font-size:19px;line-height:1}.brand small{display:block;margin-top:4px;color:#7e8aa0;font-size:12px}.main-nav{height:100%;display:flex;align-items:center;justify-content:center;gap:5px;flex:1}.main-nav a{position:relative;height:100%;padding:0 15px;display:flex;align-items:center;gap:8px;font-weight:600;color:#26324d}.main-nav a svg,.header-actions svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.main-nav a.active{color:var(--blue)}.main-nav a.active:after{content:"";position:absolute;left:10px;right:10px;bottom:0;height:2px;background:var(--blue)}.header-actions{display:flex;align-items:center;gap:10px;margin-left:auto}.btn-login,.btn-register{height:42px;padding:0 17px;border-radius:8px;display:flex;align-items:center;font-weight:650}.btn-login{border:1px solid #cfd7e4;background:#fff}.btn-register{border:1px solid var(--blue);background:var(--blue);color:#fff}.menu-btn{display:none;width:40px;height:40px;border:1px solid var(--line);border-radius:8px;background:#fff;place-items:center;color:#1f2a44}
.result-page{max-width:1320px;margin:auto;padding:22px 24px 48px}.result-search{max-width:980px;margin:0 auto 16px}.result-search form{display:grid;grid-template-columns:1fr 120px;gap:8px}.result-search-box{position:relative;height:48px}.result-search-box>svg{position:absolute;left:15px;top:50%;transform:translateY(-50%);width:19px;height:19px;fill:none;stroke:#40506d;stroke-width:1.8}.result-search-box input{width:100%;height:100%;padding:0 44px;border:1px solid #cfd8e5;border-radius:9px;outline:0;font-weight:600;color:#18223d}.result-search-box input:focus{border-color:#91b1ff;box-shadow:0 0 0 3px rgba(13,93,245,.07)}.result-search-box button{position:absolute;right:10px;top:50%;transform:translateY(-50%);width:28px;height:28px;border:0;background:transparent;color:#637089;display:grid;place-items:center}.result-search-box button svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8}.result-search form>button{border:0;border-radius:8px;background:var(--blue);color:#fff;font-weight:700}
.result-layout{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:22px;align-items:start}.main-column,.side-column{display:flex;flex-direction:column;gap:10px}.side-column{position:sticky;top:90px}.word-card,.mnemonic-box,.learning-card,.examples-card,.side-card{background:#fff;border:1px solid #dce3ed;border-radius:11px;box-shadow:var(--shadow)}
.word-card{position:relative;padding:18px 20px}.word-title-row{display:flex;align-items:center;gap:11px}.word-title-row h1{margin:0;font-size:39px;line-height:1;color:#111a39;letter-spacing:-.7px}.icon-action,.bookmark-btn{border:0;background:transparent;color:#0d5df5}.icon-action svg,.bookmark-btn svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8}.bookmark-btn{position:absolute;right:18px;top:18px;color:#53627e}.bookmark-btn.saved{color:#0d5df5;fill:#eaf2ff}.word-meta{display:flex;align-items:center;gap:28px;margin-top:9px;color:#5e6b84}.word-meta strong{font-size:15px;font-weight:500}.word-meta span{font-size:13px}.word-card h2{margin:10px 0 3px;font-size:21px}.word-card p{margin:0;color:#5c6980;line-height:1.55}.word-tags{display:flex;gap:8px;margin-top:10px}.word-tags span{padding:4px 11px;border:1px solid #8eb1ff;border-radius:999px;color:#0b5be8;font-size:12px;font-weight:650}
.mnemonic-box{padding:14px 17px;display:flex;align-items:flex-start;gap:13px}.mnemonic-icon{width:38px;height:38px;flex:0 0 38px;border-radius:9px;background:#f2f6ff;display:grid;place-items:center;color:#0d5df5}.mnemonic-icon svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.75}.mnemonic-content{flex:1;min-width:0}.mnemonic-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.mnemonic-head>strong{font-size:14px}.member-badge{display:inline-flex;align-items:center;gap:5px;padding:4px 8px;border-radius:999px;background:#f3efff;color:#704bd4;font-size:12px;font-weight:700}.member-badge svg{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:1.8}.mnemonic-member p,.mnemonic-guest p{margin:6px 0 0;color:#66728a;line-height:1.5}.mnemonic-guest>span{display:block;margin-top:4px;color:#8791a3;font-size:12px}.mnemonic-actions{display:flex;gap:8px;margin-top:11px}.mnemonic-actions button{min-height:35px;padding:0 13px;border-radius:8px;font-size:12px;font-weight:700}.guest-primary{border:1px solid var(--blue);background:var(--blue);color:#fff}.guest-secondary{border:1px solid #cddbf5;background:#fff;color:#285ec2}
.learning-card{overflow:hidden}.tabs{height:52px;padding:0 12px;border-bottom:1px solid #e1e7ef;display:grid;grid-template-columns:repeat(4,1fr);align-items:stretch;gap:8px}.tab{position:relative;padding:0 8px;border:0;background:transparent;color:#536079;font-weight:700}.tab.active{color:#0b5be8}.tab.active:after{content:"";position:absolute;left:0;right:0;bottom:0;height:2px;background:#0b5be8}.tab-panel{display:none;padding:17px 18px}.tab-panel.active{display:block}.panel-title{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:13px}.panel-title h3{margin:0;font-size:15px}.panel-title>span,.panel-title div>span{display:block;margin-top:3px;color:#788499;font-size:12px}
.usage-context-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.context-usage-item{padding:13px;border:1px solid #e0e6ef;border-radius:9px;background:#fff}.context-usage-item:hover{border-color:#b8cdf6;background:#fbfdff}.context-usage-head{display:flex;align-items:flex-start;gap:9px}.context-usage-index{width:26px;height:26px;flex:0 0 26px;border-radius:7px;display:grid;place-items:center;background:#edf4ff;color:#0d5df5;font-size:12px;font-weight:800}.context-usage-item b{display:block;color:#17233f}.context-usage-item>p{margin:7px 0 0 35px;color:#69768e;font-size:12px;line-height:1.5}.usage-example{margin:9px 0 0 35px;padding:8px 9px;border-radius:7px;background:#f8faff}.usage-example .en{font-weight:650;color:#243653;font-size:12px}.usage-example .vi{margin-top:3px;color:#7a879a;font-size:12px}
.family-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.family-item{padding:12px;border:1px solid #e0e6ef;border-radius:9px}.family-item b{display:block;color:#0b5be8;font-size:15px}.family-item span{display:inline-block;margin-top:5px;padding:2px 7px;border-radius:5px;background:#eef4ff;color:#2b63bf;font-size:12px}.family-item p{margin:6px 0 0;color:#657189;font-size:12px}.collocation-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:9px}.collocation-grid button{min-height:48px;padding:8px 11px;border:1px solid #cfdced;border-radius:8px;background:#f8faff;color:#2459b0;text-align:left}.collocation-grid button b,.collocation-grid button span{display:block}.collocation-grid button b{font-size:12px}.collocation-grid button span{margin-top:3px;color:#74839a;font-size:12px}
.review-head>span{padding:5px 9px;border-radius:999px;background:#eef4ff;color:#0d5df5;font-weight:700}.word-review-grid{display:grid;grid-template-columns:1fr;gap:10px}.review-card{padding:14px;border:1px solid #e0e6ef;border-radius:9px;background:#fff}.review-card.done{border-color:#bfe5d6;background:#fbfffd}.review-card-head{display:flex;align-items:flex-start;gap:10px}.review-card-head>span{width:26px;height:26px;flex:0 0 26px;border-radius:7px;display:grid;place-items:center;background:#f0edff;color:#6a4ed8;font-size:12px;font-weight:800}.review-card-head b,.review-card-head small{display:block}.review-card-head b{font-size:13px}.review-card-head small{margin-top:3px;color:#8290a3;font-size:12px}.letter-answer{min-height:44px;margin:12px 0 9px;padding:8px;border:1px dashed #bfcbe0;border-radius:8px;display:flex;align-items:center;gap:5px;flex-wrap:wrap;background:#fbfcff}.letter-answer:empty:before{content:"Bấm các ký tự bên dưới để ghép từ";color:#9aa5b7;font-size:12px}.letter-bank{display:flex;flex-wrap:wrap;gap:6px}.letter-tile{width:34px;height:34px;border:1px solid #cbd7e8;border-radius:7px;background:#fff;color:#244266;font-weight:750}.letter-tile.used{opacity:.3;pointer-events:none}.answer-tile{min-width:30px;height:30px;padding:0 8px;border-radius:6px;display:grid;place-items:center;background:#eef4ff;color:#0d5df5;font-weight:750}
.quiz-options{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:12px;}.quiz-option{min-height:38px;padding:7px 10px;border:1px solid #dce4ef;border-radius:7px;background:#fff;text-align:left;color:#42516a;text-transform: capitalize;}.quiz-option.selected{border-color:#8fb2ff;background:#f1f6ff;color:#0b5be8}.fill-sentence{margin:14px 0 0;color:#2e3d58}.fill-sentence input{width:130px;height:36px;margin:0 5px;border:1px solid #cfd8e5;border-radius:7px;outline:0;padding:0 9px}.fill-sentence input:focus{border-color:#8fb2ff;box-shadow:0 0 0 3px rgba(13,93,245,.07)}.review-actions{display:flex;justify-content:flex-end;gap:7px;margin-top:11px}.btn-soft,.btn-primary-sm{height:34px;padding:0 11px;border-radius:7px;font-size:12px;font-weight:700}.btn-soft{border:1px solid #dce4ef;background:#fff;color:#52627c}.btn-primary-sm{border:1px solid var(--blue);background:var(--blue);color:#fff}.review-feedback{min-height:17px;margin:7px 0 0;font-size:12px;font-weight:650}.review-feedback.ok{color:var(--green)}.review-feedback.bad{color:#cf4058}
.examples-card{overflow:visible}.examples-card-head{padding:15px 17px;border-bottom:1px solid #e4e9f0;display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.section-eyebrow{display:block;color:#0d5df5;font-size:12px;font-weight:800;letter-spacing:.8px}.examples-card-head h3{margin:4px 0 0;font-size:15px}.examples-card-head p{margin:4px 0 0;color:#7a879a;font-size:12px}
.pagination-summary{display:flex;align-items:center;gap:10px;color:#7b8799;font-size:12px;justify-content: center;}
.pager{display:flex;gap:5px}.pager button{width:32px;height:32px;border:1px solid #dce4ef;border-radius:7px;background:#fff;color:#40516d;font-size:18px}.pager button:disabled{opacity:.35;cursor:not-allowed}.sentence-list{padding:8px}.sentence-row{position:relative;padding:11px 10px;border:1px solid #e1e7ef;border-radius:9px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center}.sentence-row+.sentence-row{margin-top:7px}.sentence-row.saved{border-color:#f1b4c1;background:#fffafb}.sentence-meta{display:flex;align-items:center;gap:6px;margin-bottom:7px}.sentence-no,.sentence-tag{height:22px;padding:0 7px;border-radius:999px;display:inline-flex;align-items:center;font-size:12px;font-weight:700}.sentence-no{background:#edf4ff;color:#0d5df5}.sentence-tag.level-basic{background:#eaf8f2;color:#12865f}.sentence-tag.level-mid{background:#e9f6ff;color:#087ab5}.sentence-tag.context{background:#f2efff;color:#704bd4}.sentence-tag.context.green{background:#eaf8f0;color:#187c59}.sentence-copy .en{margin:0;color:#17243f;font-weight:700;line-height:1.45}.sentence-copy .vi{margin:4px 0 0;color:#748198;font-size:12px}.sentence-actions{display:flex;align-items:center;gap:6px}.sentence-action,.sentence-review-btn,.grammar-explain-btn{height:34px;padding:0 9px;border:1px solid #dce4ef;border-radius:7px;background:#fff;color:#53627d;display:inline-flex;align-items:center;justify-content:center;gap:5px;font-size:12px;font-weight:650;white-space:nowrap}.sentence-action svg,.sentence-review-btn svg,.grammar-explain-btn svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8}.sentence-action:hover,.grammar-explain-btn:hover{border-color:#b8cdf6;background:#f5f8ff;color:#0d5df5}.sentence-action.save.active{border-color:#efb3c0;background:#fff1f4;color:#df4762}.sentence-review{position:relative}.sentence-review-btn{border-color:#d5c9ff;color:#6d4ce7;background:#fbfaff}.sentence-review-menu{display:none;position:absolute;right:0;top:39px;z-index:25;min-width:155px;padding:6px;border:1px solid #ddd5f7;border-radius:8px;background:#fff;box-shadow:0 12px 28px rgba(46,37,87,.14)}.sentence-review.open .sentence-review-menu{display:block}.sentence-review-menu button{width:100%;height:34px;padding:0 9px;border:0;border-radius:6px;background:#fff;color:#4e5d75;text-align:left;font-size:12px}.sentence-review-menu button:hover{background:#f5f1ff;color:#6b4dd1}
.side-card{padding:15px}.side-card h3{margin:0 0 13px;display:flex;align-items:center;gap:8px;font-size:14px}.side-card h3 svg{width:19px;height:19px;fill:none;stroke:#0d5df5;stroke-width:1.8}.learning-side label,.learning-side>button{width:100%;min-height:36px;border:0;background:transparent;display:flex;align-items:center;gap:10px;color:#4d5a73;text-align:left}.check{width:20px;height:20px;border:1px solid #b6c1d0;border-radius:50%;display:grid;place-items:center}.check svg{width:12px;height:12px;fill:none;stroke:#fff;stroke-width:2}.check.done,.learning-side>button.saved .check{border-color:#0d5df5;background:#0d5df5}.side-family{display:grid;grid-template-columns:1fr 1fr;gap:8px}.side-family button{height:34px;border:1px solid #98b8ff;border-radius:999px;background:#fff;color:#0b5be8;font-weight:600}.side-links{display:flex;flex-direction:column;border:1px solid #e0e6ef;border-radius:8px;overflow:hidden}.side-links a{height:39px;padding:0 10px;border-bottom:1px solid #e6ebf2;background:#fff;display:flex;align-items:center;justify-content:space-between;color:#0b59e7}.side-links a:last-child{border-bottom:0}.side-links svg{width:16px;height:16px;fill:none;stroke:#62708a;stroke-width:1.8}
.toast{position:fixed;right:24px;bottom:24px;z-index:99;padding:12px 16px;border-radius:9px;background:#15203b;color:#fff;box-shadow:0 14px 35px rgba(14,24,56,.22);opacity:0;transform:translateY(12px);pointer-events:none;transition:.2s}.toast.show{opacity:1;transform:none}
.modal-backdrop[hidden]{display:none}.modal-backdrop{position:fixed;inset:0;z-index:100;background:rgba(13,24,54,.42);display:grid;place-items:center;padding:18px}.review-modal,.grammar-modal{position:relative;width:min(620px,100%);max-height:88vh;overflow:auto;padding:22px;border-radius:14px;background:#fff;box-shadow:0 24px 70px rgba(12,24,57,.25)}.modal-close{position:absolute;right:14px;top:14px;width:36px;height:36px;border:0;border-radius:8px;background:#f5f7fb;color:#66738a;display:grid;place-items:center}.modal-close svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8}.modal-kicker{color:#6d4ce7;font-size:12px;font-weight:800;letter-spacing:.8px}.review-modal h3,.grammar-modal h3{margin:5px 0 16px;font-size:20px}.sentence-review-source{padding:11px 12px;border:1px solid #e1e7ef;border-radius:8px;background:#fafcff}.sentence-review-source b,.sentence-review-source span{display:block}.sentence-review-source span{margin-top:4px;color:#7a879a;font-size:12px}.token-bank,.token-answer{display:flex;flex-wrap:wrap;gap:6px}.token-answer{min-height:48px;margin:13px 0 9px;padding:8px;border:1px dashed #bfcbe0;border-radius:8px}.token-answer:empty:before{content:"Bấm từng cụm từ theo đúng thứ tự";color:#9aa5b7;font-size:12px}.token-btn{min-height:34px;padding:0 9px;border:1px solid #cad6e7;border-radius:7px;background:#fff;color:#324765}.token-btn.used{opacity:.3;pointer-events:none}.review-modal-actions{display:flex;justify-content:flex-end;gap:7px;margin-top:13px}.dictation-box{margin-top:13px}.dictation-box textarea{width:100%;min-height:92px;padding:10px;border:1px solid #cfd8e5;border-radius:8px;resize:vertical;outline:0}.dictation-box textarea:focus{border-color:#8fb2ff;box-shadow:0 0 0 3px rgba(13,93,245,.07)}.grammar-point{padding:11px 0;border-bottom:1px solid #edf0f4}.grammar-point:last-child{border-bottom:0}.grammar-point b{display:block;color:#263852}.grammar-point p{margin:5px 0 0;color:#69768e;line-height:1.55}.grammar-highlight{display:inline-block;padding:2px 5px;border-radius:4px;background:#fff3b8;color:#614a00;font-weight:700}
@media(max-width:1050px){.brand{min-width:205px}.main-nav a{padding:0 9px}.btn-login{display:none}.sentence-row{grid-template-columns:1fr}.sentence-actions{justify-content:flex-start;flex-wrap:wrap}}
@media(max-width:980px){.result-layout{grid-template-columns:1fr}.side-column{position:static;display:grid;grid-template-columns:1fr 1fr}.learning-side{grid-row:span 2}}
@media(max-width:880px){.main-nav{position:fixed;top:72px;left:0;right:0;height:auto;padding:12px;background:#fff;border-bottom:1px solid var(--line);display:none;grid-template-columns:repeat(2,1fr);box-shadow:0 12px 25px rgba(20,38,85,.08)}.main-nav.open{display:grid}.main-nav a{height:44px;border-radius:7px}.main-nav a.active{background:#edf4ff}.main-nav a.active:after{display:none}.menu-btn{display:grid}.family-grid{grid-template-columns:1fr 1fr}}
@media(max-width:700px){.result-page{padding:15px 12px}.result-search form{grid-template-columns:1fr}.result-search form>button{height:44px}.tabs{display:flex;overflow:auto;gap:5px}.tab{flex:0 0 auto;min-width:145px}.usage-context-grid,.collocation-grid,.quiz-options{grid-template-columns:1fr}.family-grid{grid-template-columns:1fr 1fr}.side-column{grid-template-columns:1fr}.word-title-row h1{font-size:32px}.examples-card-head{display:block}
/*	.pagination-summary{margin-top:10px;justify-content:space-between}*/
	.sentence-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}.sentence-action,.sentence-review-btn,.grammar-explain-btn{width:100%}.sentence-review-menu{left:0;right:auto}.mnemonic-actions{flex-direction:column}}
@media(max-width:460px){.word-card{padding:15px}.word-title-row h1{font-size:29px}.word-meta{gap:14px}.family-grid{grid-template-columns:1fr}.side-family{grid-template-columns:1fr 1fr}.sentence-actions{grid-template-columns:1fr 1fr}.grammar-explain-btn{grid-column:1/-1}.fill-sentence input{display:block;width:100%;margin:7px 0}}


/* =========================================================
   V4 — RESPONSIVE + SENTENCE ACTION HIERARCHY
   ========================================================= */

.sentence-more{display:none;position:relative}
.sentence-more-btn{
  width:36px;height:34px;padding:0;border:1px solid #dce4ef;border-radius:7px;
  background:#fff;color:#53627d;display:grid;place-items:center
}
.sentence-more-btn svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8}
.sentence-more-menu{
  display:none;position:absolute;right:0;top:39px;z-index:35;min-width:190px;padding:6px;
  border:1px solid #dce4ef;border-radius:8px;background:#fff;
  box-shadow:0 12px 28px rgba(34,47,76,.15)
}
.sentence-more.open .sentence-more-menu{display:block}
.sentence-more-menu button{
  width:100%;height:36px;padding:0 10px;border:0;border-radius:6px;background:#fff;
  color:#4e5d75;display:flex;align-items:center;gap:8px;text-align:left;font-size:12px
}
.sentence-more-menu button:hover{background:#f3f6fb;color:#0d5df5}
.sentence-more-menu svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8}


/* =========================================================
   MỞ RỘNG VỐN TỪ
   ========================================================= */

.expand-vocab-card,.learning-journey-card{
  background:#fff;border:1px solid #dce3ed;border-radius:11px;box-shadow:var(--shadow)
}

.expand-vocab-card{overflow:hidden}
.expand-vocab-toggle{
  width:100%;min-height:72px;padding:14px 17px;border:0;background:#fff;
  display:flex;align-items:center;justify-content:space-between;gap:16px;text-align:left
}
.expand-vocab-toggle:hover{background:#fbfcff}
.expand-vocab-title{display:flex;align-items:center;gap:11px;min-width:0}
.expand-vocab-icon{
  width:38px;height:38px;flex:0 0 38px;border-radius:10px;background:#f2efff;
  color:#6d4ce7;display:grid;place-items:center
}
.expand-vocab-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8}
.expand-vocab-title b,.expand-vocab-title small{display:block}
.expand-vocab-title b{color:#1c2c49;font-size:14px}
.expand-vocab-title small{margin-top:4px;color:#7e899b;font-size:12px}
.expand-vocab-right{display:flex;align-items:center;gap:8px;color:#6e7b90;font-size:12px;font-weight:650}
.expand-vocab-right svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;transition:.18s}
.expand-vocab-card.open .expand-chevron{transform:rotate(90deg)}

.expand-vocab-body{padding:0 16px 16px;border-top:1px solid #e8edf3}
.expand-vocab-body[hidden]{display:none}
.expand-vocab-tabs{
  display:flex;gap:6px;padding:12px 0;border-bottom:1px solid #edf0f4;overflow:auto
}
.expand-vocab-tab{
  min-height:34px;padding:0 11px;border:1px solid #dce4ef;border-radius:999px;
  background:#fff;color:#57657c;font-size:12px;font-weight:700;white-space:nowrap
}
.expand-vocab-tab.active{border-color:#a8c1fb;background:#eef4ff;color:#0d5df5}
.expand-vocab-panel{display:none;padding-top:14px}
.expand-vocab-panel.active{display:block}
.expand-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:10px}
.expand-panel-head b,.expand-panel-head span{display:block}
.expand-panel-head b{font-size:13px;color:#263752}
.expand-panel-head div>span{margin-top:3px;color:#7d899b;font-size:12px}
.expand-panel-head>span{
  padding:4px 8px;border-radius:999px;background:#f3f6fb;color:#69778c;font-size:12px;font-weight:700
}

.synonym-grid,.antonym-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.vocab-related-item{
  padding:10px 11px;border:1px solid #e1e7ef;border-radius:8px;background:#fff
}
.vocab-related-item:hover{border-color:#bdd0f6;background:#fbfdff}
.vocab-related-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.vocab-related-head b{color:#0d5df5;font-size:13px}
.vocab-related-head span{color:#8792a4;font-size:12px}
.vocab-related-item>p{margin:5px 0 0;color:#46566f;font-size:12px;line-height:1.45}
.vocab-related-example{margin-top:7px;padding-top:7px;border-top:1px solid #edf0f4}
.vocab-related-example span{display:block;color:#34445f;font-size:12px;line-height:1.45}
.vocab-related-example small{display:block;margin-top:3px;color:#8490a2;font-size:12px;line-height:1.4}

.nuance-list{display:flex;flex-direction:column;gap:7px}
.nuance-row{
  display:grid;grid-template-columns:110px 1.1fr .9fr 1.25fr;gap:10px;align-items:center;
  min-height:54px;padding:9px 10px;border:1px solid #e2e7ef;border-radius:8px
}
.nuance-word b{display:block;color:#0d5df5;font-size:12px}
.nuance-row span,.nuance-row small{font-size:12px;line-height:1.45}
.nuance-row span{color:#43536c}.nuance-row small{color:#7d899b}
.nuance-tone{
  width:max-content;max-width:100%;padding:3px 7px;border-radius:999px;background:#f3f0ff;color:#6a4dc6!important;font-weight:700
}


/* =========================================================
   PERSONALIZED LEARNING JOURNEY
   ========================================================= */

.learning-journey-card{padding:16px 17px}
.journey-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.journey-head h3{margin:4px 0 0;color:#1d2f4d;font-size:16px}
.journey-head p{margin:5px 0 0;color:#7b8799;font-size:12px}
.journey-status-badge{
  padding:5px 9px;border-radius:999px;background:#eef4ff;color:#0d5df5;
  font-size:12px;font-weight:750;white-space:nowrap
}
.journey-steps{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:14px}
.journey-step{
  position:relative;min-height:58px;padding:9px 10px;border:1px solid #e2e7ef;border-radius:9px;
  display:flex;align-items:center;gap:8px;background:#fff
}
.journey-step:after{
  content:"";position:absolute;right:-9px;top:50%;width:9px;height:1px;background:#dfe5ee
}
.journey-step:last-child:after{display:none}
.journey-step-icon{
  width:28px;height:28px;flex:0 0 28px;border:1px solid #d2dae6;border-radius:50%;
  display:grid;place-items:center;color:#8290a4;background:#fff;font-size:12px;font-weight:800
}
.journey-step-icon svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2}
.journey-step b,.journey-step small{display:block}
.journey-step b{color:#526078;font-size:12px}
.journey-step small{margin-top:2px;color:#929cad;font-size:12px}
.journey-step.done{border-color:#c9e7dc;background:#fbfffd}
.journey-step.done .journey-step-icon{border-color:#95d6bf;background:#e9f8f2;color:#14936a}
.journey-step.done b{color:#295548}
.journey-step.current{border-color:#adc6fb;background:#f7faff}
.journey-step.current .journey-step-icon{border-color:#8eaff6;background:#eaf1ff;color:#0d5df5}

.next-action-card{
  margin-top:12px;padding:12px 13px;border:1px solid #d8e3fa;border-radius:9px;
  background:linear-gradient(90deg,#f7faff,#fbfcff);
  display:flex;align-items:center;justify-content:space-between;gap:16px
}
.next-action-copy{min-width:0}
.next-action-copy>span{display:block;color:#0d5df5;font-size:12px;font-weight:800;letter-spacing:.7px}
.next-action-copy b{display:block;margin-top:4px;color:#243653;font-size:13px}
.next-action-copy p{margin:4px 0 0;color:#768398;font-size:12px;line-height:1.45}
.next-action-btn{
  min-width:148px;height:38px;padding:0 12px;border:1px solid var(--blue);border-radius:8px;
  background:var(--blue);color:#fff;display:inline-flex;align-items:center;justify-content:center;gap:7px;
  font-size:12px;font-weight:750;white-space:nowrap
}
.next-action-btn:hover{background:var(--blue2)}
.next-action-btn svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.9}


/* =========================================================
   TABLET OPTIMIZATION
   ========================================================= */

@media(max-width:1050px){
  .result-page{padding-left:18px;padding-right:18px}
  .sentence-row{padding:11px}
  .sentence-actions{width:100%;justify-content:flex-start}
}

@media(max-width:900px){
  .desktop-extra-action{display:none!important}
  .sentence-more{display:block}
  .sentence-actions{
    display:grid!important;
    grid-template-columns:minmax(72px,1fr) minmax(72px,1fr) minmax(110px,1.35fr) 38px;
    gap:6px;width:100%;align-items:center
  }
  .sentence-action,.sentence-review-btn{width:100%;height:36px}
  .sentence-review-menu{left:0;right:auto}
  .sentence-more-menu{right:0;left:auto}
  .examples-card-head{align-items:center}
  .journey-steps{grid-template-columns:repeat(4,minmax(0,1fr))}
  .nuance-row{grid-template-columns:90px 1fr .8fr 1.15fr}
}

@media(max-width:760px){
  .result-page{padding:12px 10px 34px}
  .result-search{margin-bottom:10px}
  .result-search form{grid-template-columns:minmax(0,1fr) 88px;gap:6px}
  .result-search-box{height:44px}
  .result-search form>button{height:44px}

  .word-card,.mnemonic-box,.learning-card,.examples-card,.expand-vocab-card,.learning-journey-card,.side-card{border-radius:10px}
  .word-card{padding:15px}
  .bookmark-btn{right:13px;top:13px}
  .word-title-row h1{font-size:30px}
  .word-meta{gap:13px;flex-wrap:wrap}
  .word-card h2{font-size:19px}
  .word-card p{font-size:12.5px}

  .mnemonic-box{padding:12px}
  .mnemonic-icon{width:34px;height:34px;flex-basis:34px}
  .mnemonic-head{align-items:flex-start}
  .member-badge{font-size:12px}
  .mnemonic-actions{display:grid;grid-template-columns:1fr;gap:6px}
  .mnemonic-actions button{width:100%;min-height:38px}

  .tabs{
    height:48px;display:flex;overflow-x:auto;overflow-y:hidden;gap:4px;padding:0 8px;
    scrollbar-width:none;-webkit-overflow-scrolling:touch
  }
  .tabs::-webkit-scrollbar{display:none}
  .tab{flex:0 0 auto;min-width:124px;padding:0 10px;font-size:12px}
  .tab-panel{padding:14px 12px}
  .panel-title{display:block}
  .panel-title>span{margin-top:7px!important}
  .usage-context-grid,.family-grid,.collocation-grid,.quiz-options{grid-template-columns:1fr}
  .context-usage-item>p,.usage-example{margin-left:0}
  .review-head>span{display:inline-block!important;margin-top:8px!important}

  .examples-card-head{display:flex;padding:13px 12px}
  .examples-card-head>div:first-child p{display:none}
/*  .pagination-summary{margin:0;flex-direction:column;align-items:flex-end;gap:5px}*/
  .sentence-list{padding:7px}
  .sentence-row{grid-template-columns:1fr!important;gap:10px;padding:10px}
  .sentence-meta{overflow:auto;white-space:nowrap;padding-bottom:1px}
  .sentence-copy .en{font-size:13px}
  .sentence-copy .vi{font-size:12px}
  .sentence-actions{
    grid-template-columns:minmax(66px,1fr) minmax(66px,1fr) minmax(102px,1.35fr) 38px!important
  }
  .sentence-action,.sentence-review-btn{height:35px;padding:0 7px;font-size:12px}
  .sentence-review-btn svg,.sentence-action svg{width:14px;height:14px}

  .expand-vocab-toggle{min-height:66px;padding:12px}
  .expand-vocab-right>span{display:none}
  .expand-vocab-body{padding:0 11px 12px}
  .synonym-grid,.antonym-grid{grid-template-columns:1fr}
  .nuance-row{grid-template-columns:1fr 1fr;padding:10px}
  .nuance-word{grid-column:1/-1}
  .expand-panel-head{display:block}
  .expand-panel-head>span{display:inline-block;margin-top:7px}

  .learning-journey-card{padding:13px 12px}
  .journey-head{display:block}
  .journey-status-badge{display:inline-block;margin-top:8px}
  .journey-steps{grid-template-columns:1fr 1fr;gap:7px}
  .journey-step:after{display:none}
  .next-action-card{align-items:stretch;flex-direction:column;gap:10px}
  .next-action-btn{width:100%;min-width:0;height:40px}

  .side-column{grid-template-columns:1fr!important}
  .review-modal,.grammar-modal{padding:18px 14px;border-radius:12px}
}

@media(max-width:460px){
  .header-inner{padding-left:12px;padding-right:12px}
  .brand strong{font-size:15px}.brand small{display:none}.brand-mark{width:34px;height:34px}
  .result-search form{grid-template-columns:minmax(0,1fr) 82px}
  .result-search-box input{padding-left:40px;padding-right:34px;font-size:13px}
  .sentence-actions{
    grid-template-columns:minmax(60px,1fr) minmax(60px,1fr) minmax(96px,1.45fr) 36px!important;
    gap:5px
  }
  .sentence-action,.sentence-review-btn{padding:0 5px;font-size:12px}
  .sentence-action svg,.sentence-review-btn svg{width:13px;height:13px}
  .sentence-more-btn{width:36px;height:35px}
  .sentence-more-menu{min-width:176px}
  .journey-step{padding:8px}
  .journey-step b{font-size:12px}
  .journey-step small{font-size:12px}
  .modal-backdrop{padding:8px}
  .review-modal,.grammar-modal{width:100%;max-height:94vh}
}


/* =========================================================
   V4.1 — READABILITY + TRUE RESPONSIVE FIX
   ========================================================= */

html,
body{
  width:100%;
  max-width:100%;
  overflow-x:hidden;
}

body{
  font-size:15px;
  line-height:1.5;
}

img,
svg,
video,
canvas{
  max-width:100%;
}

.result-page,
.result-layout,
.main-column,
.side-column,
.word-card,
.mnemonic-box,
.learning-card,
.examples-card,
.expand-vocab-card,
.learning-journey-card,
.side-card,
.tab-panel,
.sentence-row,
.sentence-main,
.sentence-copy,
.sentence-actions,
.next-action-copy{
  min-width:0;
  max-width:100%;
}

/* Font đọc chính: ưu tiên 14px */
.main-nav a,
.btn-login,
.btn-register,
.result-search input,
.result-search form>button,
.word-card p,
.mnemonic-member p,
.mnemonic-guest p,
.tab,
.context-usage-item b,
.context-usage-item>p,
.family-item p,
.collocation-grid button,
.review-card,
.example-item,
.sentence-copy .en,
.side-links a,
.learning-side label,
.learning-side>button,
.expand-vocab-title b,
.expand-panel-head b,
.vocab-related-item>p,
.next-action-copy p{
  font-size:14px;
}

/* Metadata / phụ chú: tối thiểu 12px */
.word-meta span,
.word-tags span,
.panel-title>span,
.panel-title div>span,
.usage-example .en,
.usage-example .vi,
.family-item span,
.collocation-grid button span,
.sentence-tag,
.sentence-no,
.sentence-action,
.sentence-review-btn,
.grammar-explain-btn,
.sentence-more-menu button,
.expand-vocab-title small,
.expand-vocab-right,
.expand-vocab-tab,
.expand-panel-head div>span,
.expand-panel-head>span,
.vocab-related-head span,
.vocab-related-example span,
.vocab-related-example small,
.nuance-row span,
.nuance-row small,
.journey-status-badge,
.journey-step b,
.journey-step small,
.next-action-copy>span,
.next-action-btn,
.member-badge,
.mnemonic-guest>span,
.mnemonic-actions button,
.modal-kicker,
.sentence-review-source span,
.token-answer:empty:before{
  font-size:12px;
}

.sentence-copy .vi{
  font-size:13px;
}

.panel-title h3,
.side-card h3,
.mnemonic-head>strong,
.expand-vocab-title b,
.journey-head h3{
  font-size:16px;
}

.word-card h2{
  font-size:22px;
}

/* HỌC TỪ NÀY — dùng cùng một cột icon và text */
.learning-side{
  padding:16px;
}

.learning-side h3,
.learning-side label,
.learning-side>button{
  display:grid;
  grid-template-columns:24px minmax(0,1fr);
  column-gap:10px;
  align-items:center;
  width:100%;
  margin:0;
  padding:0;
}

.learning-side h3{
  min-height:32px;
  margin-bottom:8px;
  color:#26324d;
  font-size:16px;
  font-weight:750;
}

.learning-side h3>svg{
  width:20px;
  height:20px;
  justify-self:center;
}

.learning-side label,
.learning-side>button{
  min-height:42px;
  color:#56647b;
  font-size:14px;
  line-height:1.4;
}

.learning-side .check{
  width:22px;
  height:22px;
  justify-self:center;
  margin:0;
}

.learning-side .save-label{
  display:block;
  min-width:0;
}

/* Không cho chuỗi dài ép layout rộng */
.word-card,
.context-usage-item,
.usage-example,
.family-item,
.collocation-grid button,
.review-card,
.sentence-copy,
.vocab-related-item,
.nuance-row,
.next-action-copy{
  overflow-wrap:anywhere;
  word-break:normal;
}

/* Tab cuộn nội bộ nhưng không tạo thanh cuộn ngang toàn trang */
.tabs,
.expand-vocab-tabs{
  max-width:100%;
  scrollbar-width:none;
}

.tabs::-webkit-scrollbar,
.expand-vocab-tabs::-webkit-scrollbar{
  display:none;
}

/* TABLET */
@media (max-width:1024px){

  .header-inner{
    padding-left:18px;
    padding-right:18px;
    gap:16px;
  }

  .result-page{
    width:100%;
    padding-left:16px;
    padding-right:16px;
  }

  .result-layout{
    grid-template-columns:minmax(0,1fr);
    gap:14px;
  }

  .side-column{
    position:static;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
  }

  .learning-side{
    grid-row:auto;
  }

  .sentence-row{
    grid-template-columns:minmax(0,1fr)!important;
  }

  .sentence-actions{
    width:100%;
    min-width:0;
  }

  .journey-steps{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .journey-step:after{
    display:none;
  }
}

/* SMALL TABLET + MOBILE */
@media (max-width:760px){

  .header-inner{
    padding-left:12px;
    padding-right:12px;
  }

  .result-page{
    padding-left:10px;
    padding-right:10px;
  }

  .result-search form{
    grid-template-columns:minmax(0,1fr) 86px!important;
    gap:6px;
  }

  .result-search-box,
  .result-search form>button{
    height:44px;
    min-width:0;
  }

  .tabs{
    display:flex!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    padding:0 8px;
    gap:4px;
    -webkit-overflow-scrolling:touch;
  }

  .tab{
    min-width:118px!important;
    flex:0 0 auto;
    padding:0 9px;
    font-size:13px;
  }

  .side-column{
    grid-template-columns:minmax(0,1fr)!important;
  }

  .sentence-row{
    padding:10px;
    gap:10px;
  }

  .sentence-meta{
    width:100%;
    max-width:100%;
    overflow-x:auto;
    overflow-y:hidden;
    white-space:nowrap;
    scrollbar-width:none;
  }

  .sentence-meta::-webkit-scrollbar{
    display:none;
  }

  .sentence-copy .en{
    font-size:14px;
  }

  .sentence-copy .vi{
    font-size:13px;
  }

  .sentence-actions{
    display:grid!important;
    grid-template-columns:minmax(64px,1fr) minmax(64px,1fr) minmax(104px,1.35fr) 38px!important;
    gap:5px!important;
    width:100%!important;
    max-width:100%!important;
  }

  .sentence-action,
  .sentence-review-btn{
    width:100%;
    min-width:0;
    height:36px;
    padding:0 6px;
    font-size:12px;
    white-space:nowrap;
  }

  .sentence-more-btn{
    width:38px;
    height:36px;
  }

  .usage-context-grid,
  .family-grid,
  .collocation-grid,
  .quiz-options,
  .synonym-grid,
  .antonym-grid{
    grid-template-columns:minmax(0,1fr)!important;
  }

  .nuance-row{
    grid-template-columns:minmax(0,1fr)!important;
  }

  .nuance-word{
    grid-column:auto;
  }

  .journey-steps{
    grid-template-columns:minmax(0,1fr)!important;
  }

  .next-action-card{
    flex-direction:column;
    align-items:stretch;
  }

  .next-action-btn{
    width:100%;
    min-width:0;
  }

  .review-modal,
  .grammar-modal{
    width:100%;
    max-width:100%;
    padding:18px 14px;
  }
}

/* VERY SMALL MOBILE */
@media (max-width:420px){

  .result-page{
    padding-left:8px;
    padding-right:8px;
  }

  .result-search form{
    grid-template-columns:minmax(0,1fr) 78px!important;
  }

  .result-search form>button{
    padding:0 8px;
    font-size:12px;
  }

  .word-card{
    padding:14px;
  }

  .word-title-row h1{
    font-size:30px;
  }

  .word-meta{
    gap:10px;
  }

  .sentence-actions{
    grid-template-columns:minmax(58px,1fr) minmax(58px,1fr) minmax(96px,1.4fr) 36px!important;
    gap:4px!important;
  }

  .sentence-action,
  .sentence-review-btn{
    padding:0 4px;
    font-size:12px;
  }

  .sentence-action svg,
  .sentence-review-btn svg{
    width:13px;
    height:13px;
  }

  .learning-side h3{
    font-size:15px;
  }

  .learning-side label,
  .learning-side>button{
    font-size:14px;
  }
}


/* =========================================================
   V5 — STATIC DB-READY
   Sidebar sticky only on desktop; tablet/mobile normal flow.
   ========================================================= */

@media (min-width:1025px){
  .word-detail-sidebar{
    position:sticky !important;
    top:90px !important;
    align-self:start;
    height:max-content;
  }
}

@media (max-width:1024px){
  .word-detail-sidebar{
    position:static !important;
    top:auto !important;
  }
}

.side-family-link{
  min-height:36px;
  padding:7px 10px;
  border:1px solid #98b8ff;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#0b5be8;
  background:#fff;
  font-size:13px;
  font-weight:650;
  text-align:center;
}

.side-family-link:hover{
  background:#f4f8ff;
  border-color:#6f9aff;
  color:#084fc8;
}

.letter-btn,
.picked-letter{
  min-width:34px;
  height:34px;
  padding:0 9px;
  border:1px solid #b9caf0;
  border-radius:7px;
  background:#fff;
  color:#224b9a;
  font-weight:700;
}

.letter-btn:hover,
.picked-letter:hover{
  background:#eef4ff;
  border-color:#7ea2ef;
}

.quiz-option.selected{
  border-color:#6f9dff !important;
  background:#eef4ff !important;
  color:#0d5df5 !important;
}

.sentence-row[hidden]{
  display:none !important;
}

.sentence-grammar-data{
  display:none !important;
}

.grammar-source{
  margin-bottom:14px;
  padding:12px;
  border:1px solid #e0e6ef;
  border-radius:8px;
  background:#f8faff;
}

.grammar-source b,
.grammar-source span{
  display:block;
}

.grammar-source b{
  color:#283b59;
  font-size:14px;
}

.grammar-source span{
  margin-top:5px;
  color:#7d899b;
  font-size:13px;
}

.grammar-point{
  margin-bottom:10px;
  padding:11px 12px;
  border:1px solid #e3e8f0;
  border-radius:8px;
}

.grammar-point:last-child{
  margin-bottom:0;
}

.grammar-point b{
  color:#0d5df5;
  font-size:13px;
}

.grammar-point p{
  margin:5px 0 0;
  color:#536078;
  font-size:13px;
  line-height:1.55;
}

.dictation-listen{
  margin-bottom:10px;
  display:inline-flex;
  align-items:center;
  gap:7px;
}

.dictation-listen svg{
  width:16px;
  height:16px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
}

#dictationInput{
  width:100%;
  min-height:92px;
  padding:10px 11px;
  border:1px solid #dce3ed;
  border-radius:8px;
  resize:vertical;
  outline:0;
  font:inherit;
}

#dictationInput:focus{
  border-color:#8fb2f8;
  box-shadow:0 0 0 3px rgba(13,93,245,.07);
}


/* =========================================================
   V6 — STICKY SIDEBAR + LETTER DISABLE
   ========================================================= */

/*
 * overflow-x:hidden trên html/body có thể tạo scroll container
 * và làm position:sticky hoạt động không ổn định ở một số browser.
 * clip chặn tràn ngang nhưng không tạo scrolling ancestor.
 */
html,
body{
  overflow-x:clip !important;
}

.result-page,
.result-layout{
  overflow:visible !important;
}

/* Desktop: cột phải luôn bám theo viewport khi cuộn trang. */
@media (min-width:1025px){
  .result-layout{
    align-items:start !important;
    overflow:visible !important;
  }

  /*
   * Sidebar vẫn sticky trên desktop nhưng KHÔNG có
   * vùng cuộn riêng. Nội dung cuộn theo trang chính.
   */
  .word-detail-sidebar{
    position:sticky !important;
    top:88px !important;
    align-self:start !important;

    max-height:none !important;
    overflow:visible !important;
    padding-right:0 !important;

    scrollbar-width:none !important;
  }

  .word-detail-sidebar::-webkit-scrollbar{
    display:none !important;
    width:0 !important;
    height:0 !important;
  }
}

/* Tablet/mobile: sidebar trở lại flow bình thường. */
@media (max-width:1024px){
  .word-detail-sidebar{
    position:static !important;
    top:auto !important;
    max-height:none !important;
    overflow:visible !important;
    padding-right:0;
  }
}


/* Bài tập ghép ký tự: ký tự đã chọn phải disable rõ ràng. */
.letter-btn.used,
.letter-btn:disabled{
  opacity:.28;
  cursor:default;
  pointer-events:none;
  background:#f1f4f8;
  border-color:#d8dee8;
  color:#8e99aa;
  transform:none;
}

.letter-btn:not(:disabled):hover{
  border-color:#729cf4;
  background:#eef4ff;
  color:#0d5df5;
}

.picked-letter{
  cursor:pointer;
}

.picked-letter:hover{
  border-color:#ef9cac;
  background:#fff2f5;
  color:#cf3855;
}


/* AJAX popup loading/error */
.ajax-popup-state{
  padding:18px 14px;
  border:1px dashed #cbd6e7;
  border-radius:9px;
  background:#fafcff;
  color:#68758b;
  font-size:14px;
  line-height:1.55;
}

.ajax-popup-state strong{
  display:block;
  margin-bottom:5px;
  color:#273956;
  font-size:14px;
}

.ajax-popup-state.error{
  border-color:#efc3ca;
  background:#fff7f8;
  color:#b5485b;
}

.ajax-popup-state.loading{
  border-color:#cbdcff;
  background:#f7faff;
  color:#315fae;
}


/* =========================================================
   V6.2 — NGỮ CẢNH SỬ DỤNG LẤY HTML TRỰC TIẾP TỪ DATABASE
   Dùng cho dữ liệu kiểu:
   <p>...</p>
   <p>...</p>
   <ul><li><em>...</em> (dịch)</li></ul>
   ========================================================= */

.word-usage-db{
  width:100%;
  min-width:0;
  color:#4b5a72;
  font-size:14px;
  line-height:1.65;
}

/* Dòng tiêu đề từ + nghĩa */
.word-usage-db > p:first-child{
  margin:0 0 10px;
  color:#1e3150;
  font-size:15px;
  line-height:1.5;
}

.word-usage-db > p:first-child strong{
  color:#0d5df5;
  font-size:15px;
  font-weight:750;
}

/* Phần mô tả cách dùng */
.word-usage-db > p:nth-child(2){
  margin:0 0 14px;
  padding:12px 14px;

  border-left:3px solid #8fb2ff;
  border-radius:0 8px 8px 0;

  background:#f8faff;

  color:#526078;
  font-size:14px;
  line-height:1.65;
}

.word-usage-db > p:nth-child(2) strong{
  color:#263a59;
  font-weight:750;
}

/* Các paragraph phát sinh thêm từ DB */
.word-usage-db > p:not(:first-child):not(:nth-child(2)){
  margin:10px 0;
  color:#526078;
  font-size:14px;
  line-height:1.65;
}

/* Danh sách câu ví dụ */
.word-usage-db ul{
  list-style:none;
  margin:0;
  padding:0;

  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}

.word-usage-db ul li{
  min-width:0;
  margin:0;
  padding:12px 13px;

  border:1px solid #e0e6ef;
  border-radius:9px;

  background:#fff;

  color:#7b8799;
  font-size:13px;
  line-height:1.55;

  overflow-wrap:anywhere;

  transition:
    border-color .16s ease,
    background .16s ease,
    box-shadow .16s ease;
}

.word-usage-db ul li:hover{
  border-color:#b8cdf8;
  background:#fbfdff;
  box-shadow:0 4px 12px rgba(32,62,116,.04);
}

/* Câu tiếng Anh */
.word-usage-db ul li em{
  display:block;
  margin:0 0 5px;

  color:#273a59;

  font-size:14px;
  font-style:normal;
  font-weight:650;
  line-height:1.5;
}

/* Nghĩa tiếng Việt nếu được bọc span */
.word-usage-db ul li > span{
  display:block;
  color:#7b8799;
  font-size:13px;
  line-height:1.5;
}

/*
 * Trường hợp dữ liệu cũ trong DB KHÔNG bọc nghĩa Việt bằng span,
 * ví dụ:
 *
 * <li>
 *   <em>Sentence</em>
 *   (Nghĩa Việt)
 * </li>
 *
 * vẫn hiển thị ổn nhờ style của li.
 */

/* Các thẻ HTML thông dụng khác nếu dữ liệu DB có phát sinh */
.word-usage-db strong{
  font-weight:750;
}

.word-usage-db a{
  color:#0d5df5;
  text-decoration:none;
}

.word-usage-db a:hover{
  text-decoration:underline;
}

.word-usage-db blockquote{
  margin:12px 0;
  padding:10px 13px;

  border-left:3px solid #c6d5f5;
  background:#fafcff;

  color:#58667d;
  font-size:14px;
}

/* TABLET */
@media(max-width:900px){
  .word-usage-db ul{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

/* MOBILE */
@media(max-width:600px){
  .word-usage-db{
    font-size:14px;
  }

  .word-usage-db > p:first-child{
    font-size:15px;
  }

  .word-usage-db > p:nth-child(2){
    padding:11px 12px;
    font-size:14px;
  }

  .word-usage-db ul{
    grid-template-columns:minmax(0,1fr);
    gap:8px;
  }

  .word-usage-db ul li{
    padding:11px;
    font-size:13px;
  }

  .word-usage-db ul li em{
    font-size:14px;
  }
}


/* =========================================================
   V6.3 — LINK TỪ TIẾNG ANH TRONG "MỞ RỘNG VỐN TỪ"
   href="#" để sau này ghép route PHP thật.
   ========================================================= */

.expand-vocab-card .vocab-word-link{
  display:inline-flex;
  align-items:center;
  width:max-content;
  max-width:100%;

  color:#0d5df5;
  text-decoration:none;

  border-radius:4px;

  transition:
    color .15s ease,
    background .15s ease,
    text-decoration-color .15s ease;
}

.expand-vocab-card .vocab-word-link b{
  color:inherit;
  font-weight:750;
}

.expand-vocab-card .vocab-word-link:hover,
.expand-vocab-card .vocab-word-link:focus{
  color:#084fc8;
  text-decoration:underline;
  text-underline-offset:3px;
}

.expand-vocab-card .vocab-word-link:focus-visible{
  outline:2px solid rgba(13,93,245,.25);
  outline-offset:3px;
}

/* Giữ căn chỉnh phần so sánh sắc thái */
.nuance-word .vocab-word-link{
  display:inline-flex;
}


/* =========================================================
   PAGE DETAIL ENGLISH WORD - NAMESPACE
   Avoid conflict with home.php global CSS
   ========================================================= */

.page_detail_english_word{
    width:100%;
    max-width:1480px;
    margin:0 auto;
}

.page_detail_english_word .result-page{
    width:100%;
}

.page_detail_english_word .result-layout{
    display:grid;
    grid-template-columns:minmax(0,1fr) 310px;
    gap:24px;
    align-items:start;
}

.page_detail_english_word .main-column{
    min-width:0;
    width:100%;
}

.page_detail_english_word .side-column{
    min-width:0;
}

@media(min-width:1025px){
    .page_detail_english_word .word-detail-sidebar,
    .page_detail_english_word .side-column{
        position:sticky;
        top:90px;
        align-self:start;
        height:max-content;
    }
}

.page_detail_english_word .word-card,
.page_detail_english_word .context-usage-item,
.page_detail_english_word .mnemonic-box,
.page_detail_english_word .examples-card,
.page_detail_english_word .expand-vocab-card{
    width:100%;
}

.page_detail_english_word .word-title-row h1{
    word-break:normal;
    overflow-wrap:normal;
}

@media(max-width:1024px){
    .page_detail_english_word .result-layout{
        grid-template-columns:minmax(0,1fr);
    }

    .page_detail_english_word .side-column{
        position:static;
    }
}
