/* GD Wiki – "cổ phong võ hiệp" theme: parchment, ink, cinnabar red, gold trim.
   Fonts are local only (no web fonts); Cambria / Noto Serif render Vietnamese tone marks correctly. */
:root {
  --giay: #fbf6ea; --nen: #ecdfc3; --muc: #2a1f17; --mo: #7b6a55;
  --son: #9b2226; --son-dam: #6e1518; --vang: #b8862b; --vang-nhat: #ead9ad; --vien: #dcc9a0;
  --link: #8a2c1d; --xanh: #2e6b3f; --do: #a61b1b;
  --serif: "Noto Serif", Cambria, "Times New Roman", serif;
  --sans: "Segoe UI", system-ui, Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { font-size: 15px; }
body {
  margin: 0; color: var(--muc); font-family: var(--sans); line-height: 1.6;
  background: var(--nen) url("/static/anh/nen.jpg") repeat;
  background-size: 512px;
}
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--son); text-decoration: underline; text-decoration-color: var(--vang); }
code { background: #f1e6cc; padding: 0 .3em; border-radius: 3px; font-size: .88em; color: var(--son-dam); }
.mo { color: var(--mo); }
.nho { font-size: .85em; }

/* ---------- header ---------- */
.dau {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; padding: 9px 20px;
  background: linear-gradient(180deg, #7a1a1d, var(--son-dam)); color: #f8ecd0;
  border-bottom: 3px double var(--vang); box-shadow: 0 2px 10px rgba(60,20,10,.35);
}
.dau a { color: #f8ecd0; }
.dau a:hover { color: #fff; text-decoration: none; }
.logo { display: flex; align-items: center; gap: 9px; font-family: var(--serif); font-weight: 700; font-size: 1.2rem; letter-spacing: .5px; white-space: nowrap; }
.logo img { width: 38px; height: 38px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(243,217,164,.7), 0 2px 6px rgba(0,0,0,.4); }
.doi-du-an { position: relative; font-family: var(--serif); }
.doi-du-an summary { cursor: pointer; list-style: none; padding: 4px 12px; border: 1px solid rgba(243,217,164,.7); border-radius: 4px; background: rgba(0,0,0,.15); white-space: nowrap; }
.doi-du-an summary::after { content: " ▾"; color: var(--vang-nhat); }
.doi-du-an div { position: absolute; left: 0; top: 125%; min-width: 220px; background: var(--giay); border: 3px double var(--vang); border-radius: 6px; padding: 6px 0; box-shadow: 0 10px 30px rgba(60,20,10,.3); }
.doi-du-an div a { display: block; padding: 7px 16px; color: var(--muc); }
.doi-du-an div a:hover { background: var(--vang-nhat); text-decoration: none; }
.doi-du-an div a.dang-o { font-weight: 700; color: var(--son); }
.nut-menu { display: none; background: none; border: 0; color: #f8ecd0; font-size: 1.4rem; cursor: pointer; }
.tim { position: relative; flex: 1; max-width: 560px; }
.tim input[name=q] {
  width: 100%; padding: 7px 14px; border-radius: 18px; border: 1px solid var(--vang); background: #fffaf0;
  font-size: .95rem; color: var(--muc); outline: none;
}
.tim input[name=q]:focus { box-shadow: 0 0 0 3px rgba(234,217,173,.6); }
.goi-y { position: absolute; top: 100%; left: 0; right: 0; margin-top: 6px; background: var(--giay); color: var(--muc); border: 1px solid var(--vang); border-radius: 8px; box-shadow: 0 10px 30px rgba(60,20,10,.25); overflow: hidden; }
.goi-y a { display: block; padding: 8px 14px; color: var(--muc); border-bottom: 1px dashed #eadfc4; }
.goi-y a.chon, .goi-y a:hover { background: var(--vang-nhat); text-decoration: none; }
.goi-y b { color: var(--son); }
.goi-y small { color: var(--mo); margin-left: 8px; }
.menu-tren { display: flex; align-items: center; gap: 16px; margin-left: auto; white-space: nowrap; font-family: var(--serif); }
.nguoi { position: relative; }
.nguoi summary { cursor: pointer; list-style: none; padding: 3px 12px; border: 1px solid rgba(243,217,164,.6); border-radius: 14px; }
.nguoi div { position: absolute; right: 0; top: 130%; background: var(--giay); border: 1px solid var(--vang); border-radius: 8px; padding: 6px 0; min-width: 190px; box-shadow: 0 8px 24px rgba(60,20,10,.25); }
.nguoi div a, .nguoi div button { display: block; width: 100%; text-align: left; padding: 7px 16px; color: var(--muc); background: none; border: 0; font: inherit; cursor: pointer; }
.nguoi div a:hover, .nguoi div button:hover { background: var(--vang-nhat); text-decoration: none; }

/* ---------- frame ---------- */
.khung { display: grid; grid-template-columns: 260px minmax(0, 1fr); max-width: 1480px; margin: 0 auto; }
.trai { position: sticky; top: 52px; align-self: start; height: calc(100vh - 52px); overflow-y: auto; padding: 18px 12px 40px; font-size: .92rem; }
.trai > a { display: block; padding: 4px 8px; border-radius: 4px; }
.trai > a:hover { background: rgba(184,134,43,.15); text-decoration: none; }
.trai .du-an { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; color: var(--son); margin-bottom: 6px; border-bottom: 1px solid var(--vien); padding-bottom: 8px; }
.trai h3 { margin: 16px 8px 6px; font-size: .78rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--vang); }
.trai details { margin: 3px 0; }
.trai summary { cursor: pointer; padding: 4px 8px; font-weight: 700; font-family: var(--serif); color: var(--son-dam); list-style: none; }
.trai summary::before { content: "◆ "; color: var(--vang); font-size: .7em; }
.trai details[open] summary::before { content: "◇ "; }
.trai ul { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 1px solid var(--vien); margin-left: 12px; }
.trai li a { display: block; padding: 2px 8px; border-radius: 4px; color: var(--muc); }
.trai li a:hover { background: rgba(184,134,43,.15); text-decoration: none; }
.khung-trong { color: #a8977d !important; }
.ngung { text-decoration: line-through; }
.bai {
  margin: 16px 18px 40px 0; padding: 28px 38px 50px; min-width: 0; background: var(--giay);
  border: 1px solid var(--vien); border-radius: 4px; position: relative;
  box-shadow: 0 1px 0 #fff inset, 0 6px 24px rgba(80,50,20,.12);
}
.khung.mot-cot { grid-template-columns: 1fr; max-width: 1100px; }
.mot-cot .bai { margin: 20px 18px 40px; }
.phai { float: right; width: 310px; margin: 0 0 20px 26px; }

/* ---------- article ---------- */
.loai { margin: 0; color: var(--vang); font-size: .82rem; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600; }
.loai code { text-transform: none; letter-spacing: 0; }
h1 { margin: 4px 0 14px; font-family: var(--serif); font-size: 2.05rem; line-height: 1.25; color: var(--son-dam); font-weight: 700; }
h2 {
  margin: 34px 0 12px; padding-bottom: 6px; font-family: var(--serif); font-size: 1.4rem; color: var(--son-dam); font-weight: 700;
  border-bottom: 3px double var(--vien);
}
h2::before { content: "❖ "; color: var(--vang); font-size: .8em; }
h3 { font-family: var(--serif); font-size: 1.08rem; margin: 18px 0 6px; color: var(--muc); }
.tom-tat { font-size: 1.08rem; font-family: var(--serif); color: #3b2c20; border-left: 4px solid var(--son); padding: 8px 14px; background: linear-gradient(90deg, #f6ead0, transparent); border-radius: 0 6px 6px 0; }
.bao { background: #fbeed3; border: 1px dashed var(--vang); padding: 9px 14px; border-radius: 6px; }
.loi { background: #f8e1dc; color: var(--do); padding: 9px 14px; border-radius: 6px; border: 1px solid #e3b3a8; }
.tot { background: #e4efdf; color: var(--xanh); padding: 9px 14px; border-radius: 6px; }
.hoi { font-size: 1.2rem; font-weight: 700; font-family: var(--serif); color: var(--son-dam); }
.noi-dung ul, .noi-dung ol { padding-left: 24px; }
.noi-dung li { margin: 4px 0; }
.noi-dung li::marker { color: var(--vang); }
.noi-dung strong { color: #4a2418; }
.bang { overflow-x: auto; margin: 12px 0; }
table { border-collapse: collapse; }
.bang table, table.ds { width: 100%; font-size: .93rem; background: #fffdf6; }
.bang th, .bang td, table.ds th, table.ds td { border: 1px solid var(--vien); padding: 7px 10px; text-align: left; vertical-align: top; }
.bang th, table.ds th { background: #f0e2c0; color: var(--son-dam); font-family: var(--serif); }
.bang tr:nth-child(even) td, table.ds tr:nth-child(even) td { background: #fbf4e2; }
.muc-luc { display: inline-block; margin: 6px 0 10px; padding: 12px 18px; border: 1px solid var(--vien); background: #f8eed6; border-radius: 6px; font-size: .9rem; min-width: 210px; }
.muc-luc b { font-family: var(--serif); color: var(--son-dam); display: block; margin-bottom: 4px; }
.muc-luc a { display: block; padding: 1px 0; }
.chan { margin-top: 44px; color: var(--mo); font-size: .84rem; border-top: 1px solid var(--vien); padding-top: 10px; }
a.lk { font-weight: 600; }
a.dn { color: inherit; border-bottom: 1px dotted var(--son); }
a.dn:hover { text-decoration: none; color: var(--son); }

/* ---------- infobox ---------- */
.hop-tt { background: #fdf8ec; border: 3px double var(--vang); border-radius: 4px; overflow: hidden; box-shadow: 0 4px 16px rgba(80,50,20,.15); }
.hop-tt-dau { background: linear-gradient(180deg, var(--son), var(--son-dam)); color: #fbecc8; text-align: center; font-family: var(--serif); font-weight: 700; font-size: 1.05rem; padding: 8px 10px; }
.hop-tt .bia { display: block; width: 100%; cursor: zoom-in; border-bottom: 1px solid var(--vien); }
.hop-tt table { width: 100%; font-size: .9rem; }
.hop-tt th { text-align: left; vertical-align: top; width: 38%; padding: 7px 10px; background: #f3e6c6; font-weight: 700; color: var(--son-dam); font-family: var(--serif); }
.hop-tt td { padding: 7px 10px; border-top: 1px solid #efe2c4; overflow-wrap: anywhere; }
.hop-tt tr + tr th { border-top: 1px solid #e6d5ad; }
.nhan { display: inline-block; padding: 0 9px; border-radius: 10px; font-size: .8rem; font-weight: 700; border: 1px solid transparent; }
.nhan-nhap { background: #fbe9c4; color: #8a5300; border-color: #e7c98a; }
.nhan-da-chot { background: #dcebd6; color: var(--xanh); border-color: #b7d3ad; }
.nhan-chua-viet { background: #eee6d6; color: var(--mo); border-color: #dccfb4; }
.nhan-ngung { background: #f4d6d2; color: var(--do); border-color: #e0aaa3; }

/* ---------- images ---------- */
.ba-o { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.o-anh { border: 1px solid var(--vien); border-radius: 6px; padding: 10px 12px; background: #fdf7e8; }
.o-anh h3 { margin: 0 0 8px; font-size: .85rem; color: var(--vang); text-transform: uppercase; letter-spacing: 1.2px; font-family: var(--sans); }
.o-anh figure { margin: 0 0 10px; }
.o-anh img { width: 100%; border-radius: 4px; border: 1px solid var(--vien); cursor: zoom-in; transition: transform .15s; }
.o-anh img:hover { transform: scale(1.02); }
.o-anh figcaption { font-size: .8rem; color: var(--mo); }
.phong-to { position: fixed; inset: 0; z-index: 50; background: rgba(30,15,8,.88); display: flex; align-items: center; justify-content: center; cursor: zoom-out; padding: 24px; }
.phong-to img { max-width: 100%; max-height: 100%; border: 3px double var(--vang); }

/* ---------- impact, backlinks ---------- */
.hai-cot { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.hai-cot > div { background: #fbf2dc; border: 1px solid var(--vien); border-radius: 6px; padding: 10px 14px; }
.hai-cot h3 { margin-top: 0; }
.hai-cot ul { padding-left: 18px; margin: 0; font-size: .93rem; }
.tro-toi { margin-top: 26px; font-size: .92rem; }
.anh, .anh-huong, .tro-toi, .chan { clear: both; }

/* ---------- home, lists, search ---------- */
.hero { margin: -28px -38px 20px; min-height: 210px; display: flex; flex-direction: column; justify-content: flex-end; padding: 22px 38px;
  background: #3a2418 center / cover no-repeat; border-bottom: 3px double var(--vang); position: relative; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(30,15,8,.75)); }
.hero h1, .hero p { position: relative; margin: 0; color: #fbecc8; text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.hero h1 { font-size: 2.4rem; }
.the-du-an { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.the-du-an a { display: block; border: 3px double var(--vang); border-radius: 6px; overflow: hidden; background: #fffaf0; color: var(--muc); transition: transform .15s, box-shadow .15s; }
.the-du-an a:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(80,50,20,.25); text-decoration: none; }
.the-du-an img { display: block; width: 100%; height: 150px; object-fit: cover; }
.the-du-an b { display: block; padding: 10px 14px 0; font-family: var(--serif); font-size: 1.25rem; color: var(--son-dam); }
.the-du-an span { display: block; padding: 2px 14px 12px; color: var(--mo); font-size: .88rem; }
.so-lieu { background: #f6e8c6; border: 1px solid var(--vien); padding: 10px 14px; border-radius: 6px; font-family: var(--serif); }
.so-lieu b { color: var(--son); }
.cum h3 { font-family: var(--serif); color: var(--son-dam); margin-top: 22px; }
.cum h3::before { content: ""; display: inline-block; width: 10px; height: 10px; background: var(--son); transform: rotate(45deg); margin-right: 10px; vertical-align: middle; }
.the-luoi { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.the { display: block; padding: 10px 12px; border: 1px solid var(--vien); border-left: 4px solid var(--vang); border-radius: 6px; background: #fffaf0; color: var(--muc); transition: transform .12s, box-shadow .12s; }
.the b { color: var(--son); }
.the:hover { border-left-color: var(--son); text-decoration: none; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(80,50,20,.15); }
.the span { display: block; font-size: .8rem; color: var(--mo); margin-top: 3px; }
.the.lon { padding: 18px; font-size: 1.15rem; font-family: var(--serif); }
.moi, .ket-qua, .ds-hoi { padding-left: 20px; }
.ket-qua li, .ds-hoi li { margin: 7px 0; }
.ket-qua li::marker, .ds-hoi li::marker, .moi li::marker { color: var(--vang); }
.loc select { padding: 4px 6px; border: 1px solid var(--vien); border-radius: 4px; background: #fffaf0; }

/* hover definition */
.tip { position: absolute; z-index: 40; max-width: 340px; background: #2a1f17; color: #f8ecd0; padding: 9px 12px; border-radius: 6px; border: 1px solid var(--vang); font-size: .86rem; line-height: 1.5; box-shadow: 0 8px 20px rgba(0,0,0,.3); pointer-events: none; }

/* ---------- login / account ---------- */
.trang-dn { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: radial-gradient(circle at 50% 30%, #8b1e1e, #3a0c0e 75%); }
.hop-dn { background: var(--giay); padding: 30px 32px; border-radius: 6px; width: 100%; max-width: 370px; border: 3px double var(--vang); box-shadow: 0 16px 50px rgba(0,0,0,.45); }
.hop-dn.nho-gon { box-shadow: none; padding: 18px 22px; }
.hop-dn h1 { margin-top: 0; text-align: center; }
.logo-dn { display: block; width: 240px; margin: -10px auto 0; }
.trang-dn .hop-dn p { text-align: center; }
.hop-dn label { display: block; margin: 12px 0; font-size: .9rem; font-weight: 700; font-family: var(--serif); color: var(--son-dam); }
.hop-dn input { display: block; width: 100%; margin-top: 4px; padding: 9px 11px; border: 1px solid var(--vien); border-radius: 4px; font-size: 1rem; background: #fffdf6; }
.hop-dn input:focus { outline: none; border-color: var(--vang); box-shadow: 0 0 0 3px rgba(234,217,173,.6); }
.hop-dn button { width: 100%; padding: 10px; margin-top: 10px; border: 1px solid var(--son-dam); border-radius: 4px; background: linear-gradient(180deg, var(--son), var(--son-dam)); color: #fbecc8; font-size: 1rem; font-family: var(--serif); font-weight: 700; cursor: pointer; }
.hop-dn button:hover { filter: brightness(1.08); }

/* ---------- mindmap ---------- */
.tieu-de-mm { margin-bottom: 8px; }
.mm-thanh { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-size: .9rem; margin-bottom: 4px; }
.mm-thanh button, .mm-chon summary { padding: 5px 12px; border: 1px solid var(--vang); border-radius: 4px; background: #fffaf0; cursor: pointer; font: inherit; color: var(--son-dam); }
.mm-thanh button:hover, .mm-chon summary:hover { background: var(--vang-nhat); }
.mm-thanh select { padding: 3px 6px; border: 1px solid var(--vien); border-radius: 4px; background: #fffaf0; }
.mm-chon { position: relative; }
.mm-chon summary { list-style: none; font-weight: 700; }
.mm-ds { position: absolute; z-index: 15; top: 120%; left: 0; width: 560px; max-height: 60vh; overflow: auto; background: var(--giay); border: 3px double var(--vang); border-radius: 6px; padding: 10px 14px; box-shadow: 0 10px 30px rgba(60,20,10,.3); }
.mm-ds fieldset { border: 0; border-top: 1px solid var(--vien); margin: 8px 0 0; padding: 6px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
.mm-ds legend { font-family: var(--serif); font-weight: 700; color: var(--son-dam); padding-right: 8px; }
.mm-ds label { font-size: .88rem; cursor: pointer; }
.mm-khung { position: relative; height: calc(100vh - 230px); min-height: 460px; border: 3px double var(--vang); border-radius: 6px; overflow: hidden; background: #1b1410; }
#do-thi { width: 100%; height: 100%; }
.mm-nhan { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; font: 12px var(--sans); }
.mm-nhan div { position: absolute; white-space: nowrap; transform: translate(-50%, 9px); text-shadow: 0 0 3px #000, 0 0 6px #000; }
.mm-nhan .tn { color: #f6e7c4; }
.mm-nhan .tp { color: #bfae8c; font-size: 11px; font-style: italic; }
.mm-nhan .dang-chon { color: #ffd77a; font-weight: 700; font-size: 13px; }
.mm-chu-giai { position: absolute; z-index: 2; left: 10px; bottom: 10px; display: flex; flex-wrap: wrap; gap: 4px 12px; max-width: 70%; padding: 8px 10px; background: rgba(27,20,16,.82); border: 1px solid #5a4630; border-radius: 6px; color: #e9dcbc; font-size: .78rem; }
.mm-chu-giai i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.mm-chu-giai i.duong { width: 22px; height: 3px; border-radius: 0; background: #6ec6ff; }
.mm-chu-giai i.qua-lai { background: #ff9f43; }
.mm-chu-giai i.dung { background: rgba(200,190,170,.5); height: 1px; }
.mm-ben { position: absolute; z-index: 3; top: 10px; right: 10px; width: 310px; max-height: calc(100% - 20px); overflow: auto; background: var(--giay); border: 3px double var(--vang); border-radius: 6px; padding: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.4); font-size: .9rem; }
.mm-ben .dong { float: right; border: 0; background: none; font-size: 1rem; cursor: pointer; color: var(--son); }
.mm-ben h3 { margin-top: 0; color: var(--son-dam); }
.mm-ben .nhom-nho { margin: 0; font-size: .75rem; color: var(--vang); text-transform: uppercase; letter-spacing: 1px; }
.mm-ben ul { padding-left: 18px; }

/* ---------- small screens ---------- */
@media (max-width: 1000px) { .phai { width: 260px; } }
@media (max-width: 760px) {
  html { font-size: 14.5px; }
  /* header: logo · project · user on row 1, full-width search on row 2 */
  .dau { flex-wrap: wrap; gap: 8px 10px; padding: 8px 12px; }
  .logo { font-size: 1.05rem; }
  .logo img { width: 32px; height: 32px; }
  .tim { order: 10; flex-basis: 100%; max-width: none; }
  .menu-tren { gap: 8px; }
  .menu-tren > a { display: none; }
  .doi-du-an summary { max-width: 130px; overflow: hidden; text-overflow: ellipsis; padding: 3px 8px; }
  .nguoi summary { padding: 2px 8px; }
  .nut-menu { display: block; order: -1; padding: 0 4px; }
  /* index = slide-in drawer with a dimmed backdrop */
  .khung { grid-template-columns: 1fr; }
  .trai { display: block; position: fixed; z-index: 45; top: 0; left: 0; bottom: 0; width: 84%; max-width: 330px; height: auto;
    background: var(--giay); box-shadow: 4px 0 24px rgba(0,0,0,.3); transform: translateX(-105%); transition: transform .2s; padding-top: 22px; }
  .trai.mo-ra { transform: none; }
  body.mo-menu::after { content: ""; position: fixed; inset: 0; z-index: 44; background: rgba(30,15,8,.45); }
  .trai a, .trai summary { padding-top: 6px; padding-bottom: 6px; }
  /* article */
  .bai { margin: 8px; padding: 16px 14px 36px; }
  h1 { font-size: 1.55rem; }
  h2 { font-size: 1.2rem; margin-top: 26px; }
  .hero { margin: -16px -14px 14px; padding: 14px; min-height: 140px; }
  .hero h1 { font-size: 1.7rem; }
  .phai { float: none; width: auto; margin: 0 0 14px; }
  .muc-luc { display: block; }
  .ba-o, .hai-cot { grid-template-columns: 1fr; }
  .the-luoi { grid-template-columns: 1fr 1fr; gap: 6px; }
  .the-du-an { grid-template-columns: 1fr; }
  /* tables: scroll sideways with the first column pinned */
  .bang table, table.ds { font-size: .85rem; }
  .bang th, .bang td, table.ds th, table.ds td { padding: 6px 7px; }
  .bang td:first-child, .bang th:first-child { position: sticky; left: 0; z-index: 1; background: #fbf4e2; box-shadow: 1px 0 0 var(--vien); }
  .ds-vp td:first-child { min-width: 140px; }
  .ds-vp th:nth-child(2), .ds-vp td:nth-child(2), .ds-vp th:nth-child(3), .ds-vp td:nth-child(3),
  .ds-vp th:nth-child(6), .ds-vp td:nth-child(6), .ds-vp th:nth-child(7), .ds-vp td:nth-child(7) { display: none; }
  .loc-vp input[type=search] { flex: 1 1 100%; min-width: 0; }
  .loc-vp select { flex: 1 1 45%; min-width: 0; }
  h2, tr[id] { scroll-margin-top: 110px; }
  .kpi-tong { gap: 6px 14px; }
  .chuoi-tien { font-size: 1rem; }
  .luoi-tien { grid-template-columns: 1fr; }
  /* mindmap: taller canvas, details as a bottom sheet */
  .mm-khung { height: 68vh; min-height: 380px; }
  .mm-ds { width: 92vw; left: -6px; }
  .mm-ds fieldset { grid-template-columns: 1fr; }
  .mm-ben { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 55%; border-radius: 10px 10px 0 0; }
  .mm-chu-giai { font-size: .68rem; max-width: calc(100% - 20px); padding: 5px 8px; }
  .tip { max-width: 80vw; }
}
}
.lich-su-khoi { clear: both; }
table.lich-su td:first-child { white-space: nowrap; width: 110px; }
table.lich-su td:nth-child(2) { white-space: nowrap; width: 100px; color: var(--mo); }
table.lich-su tr.moi-nhat td { background: #fbefd2; }
table.lich-su tr:target td { background: #f6d98f !important; transition: background .4s; }
table.lich-su tr { scroll-margin-top: 80px; }
.sua-wiki { font-size: .9rem; padding-left: 20px; }

/* ---------- economy ---------- */
.nhan-demo { background: #efe1f5; color: #6b2c8a; border: 1px solid #d6b8e3; font-size: .7rem; padding: 0 6px; vertical-align: middle; }
.hiem { display: inline-block; padding: 0 8px; border-radius: 10px; font-size: .8rem; font-weight: 700; color: #fff; background: var(--mau); }
td.so { white-space: nowrap; font-variant-numeric: tabular-nums; }
.ds-vp td:first-child { min-width: 210px; }
.ds-vp td:nth-child(2), .ds-vp td:nth-child(3) { white-space: nowrap; }
.loc-vp { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; padding: 10px 12px; background: #f6e8c6; border: 1px solid var(--vien); border-radius: 6px; }
.loc-vp input, .loc-vp select { padding: 6px 9px; border: 1px solid var(--vien); border-radius: 4px; background: #fffaf0; font: inherit; }
.loc-vp input[type=search] { flex: 1; min-width: 220px; }
.loc-vp label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.bieu-do { width: 100%; height: auto; display: block; margin: 8px 0 14px; background: #fffaf0; border: 1px solid var(--vien); border-radius: 6px; }
.bd-nhan { font: 14px var(--sans); fill: var(--muc); }
.bd-nhan.lk { fill: var(--link); }
.bd-so { font: 13px var(--sans); fill: var(--mo); }
.bd-truc { font: 13px var(--sans); fill: var(--mo); }
.bd-luoi { stroke: #eadcbc; stroke-width: 1; }
.bd-moc { stroke: var(--vang); stroke-dasharray: 4 3; }
.bd-moc-chu { font: 10px var(--sans); fill: var(--son-dam); }
.can-bang { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; padding: 8px 12px; border-radius: 6px; border: 1px solid var(--vien); background: #fbf2dc; font-size: .92rem; }
.can-bang em { font-style: normal; font-weight: 700; margin-left: auto; }
.can-du em { color: #b45309; } .can-thieu em { color: var(--do); } .can-can em { color: var(--xanh); }
.chuoi-tien { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0; padding: 12px 16px; background: #f6e8c6; border: 3px double var(--vang); border-radius: 6px; font-family: var(--serif); font-size: 1.15rem; }
.chuoi-tien .mui { color: var(--mo); font-size: .9rem; font-family: var(--sans); }
.luoi-tien { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 16px; }
.the-tien { border: 1px solid var(--vien); border-radius: 6px; padding: 10px 14px; background: #fffaf0; }
.the-tien h3 { margin-top: 2px; }
.moc-cap li { margin: 5px 0; }

.nhan-dev { background: #fde7d4; color: #9a4a12; border: 1px solid #f1c29b; font-size: .7rem; padding: 0 6px; vertical-align: middle; }
.tac-dong { margin: 6px 0 18px; padding: 8px 14px; background: #fbf2dc; border-left: 4px solid var(--vang); border-radius: 0 6px 6px 0; font-size: .88rem; }
.tac-dong ul { margin: 4px 0 0; padding-left: 18px; }
.chu-giai-bd { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: -6px 0 10px; font-size: .85rem; color: var(--mo); }
.chu-giai-bd i { display: inline-block; width: 14px; height: 4px; margin-right: 6px; vertical-align: middle; border-radius: 2px; }
.kpi-tong { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; margin: 8px 0; padding: 10px 14px; background: #f6e8c6; border: 1px solid var(--vien); border-radius: 6px; }
.kpi-tong b { color: var(--son); font-size: 1.1rem; }
table.giai-doan .vao { color: #2e7d5b; font-weight: 600; }
table.giai-doan .tieu { color: #a8322d; font-weight: 600; }
table.giai-doan .du { font-size: .82rem; color: var(--xanh); }
table.giai-doan .thieu { font-size: .82rem; color: var(--do); }
tr.moc td { background: #fbefd2; }
table.bang-ngay td, table.bang-ngay th { padding: 4px 8px; white-space: nowrap; }
table.bang-ngay .co { color: var(--do); cursor: help; }
details.gia-dinh { margin-top: 22px; }
.bai details > summary { cursor: pointer; font-weight: 700; color: var(--son-dam); font-family: var(--serif); }
