/* Lá số Tử Vi – bố cục 4x4, Thiên bàn ở giữa */
.ls{--ls-line:#d8c6a4;--ls-head:#efe3cc;--h-M:#1d8a4e;--h-H:#c8261e;--h-O:#cf7a0f;--h-K:#4b5563;--h-T:#1f56d6;
  min-width:900px;background:#fbf6ec;border-top:5px solid var(--brand,#a3211c);border-radius:6px;overflow:hidden;
  font-family:"Be Vietnam Pro",system-ui,sans-serif;color:#1b1714;box-shadow:0 14px 34px -16px rgba(40,25,10,.4)}
.ls-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:minmax(232px,auto);gap:1px;background:var(--ls-line);border-bottom:1px solid var(--ls-line)}
.ls-cell{background:#fbf6ec;display:flex;flex-direction:column;cursor:pointer;transition:background .15s,opacity .2s;position:relative;min-width:0}
.ls-cell:hover{background:#fffaf1}
.ls-head{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:6px;background:var(--ls-head);padding:7px 10px;font-size:13px;font-weight:700}
.ls-canchi{font-weight:700}
.ls-cung{text-align:center;text-transform:uppercase;letter-spacing:.02em;font-size:13.5px;display:flex;align-items:center;justify-content:center;gap:5px;white-space:nowrap}
.ls-than{font-size:10.5px;text-transform:none;letter-spacing:0;color:#fff;background:var(--brand,#a3211c);border-radius:4px;padding:1px 6px}
.ls-dh{font-weight:700;font-size:13.5px}
.ls-main{text-align:center;padding:10px 6px 4px;font-size:18px;font-weight:700;line-height:1.3;min-height:38px}
.ls-main div{white-space:nowrap}
.ls-vcd{font-size:13px;font-weight:500;font-style:italic;color:#8c7f73}
.ls-subs{display:grid;grid-template-columns:1fr 1fr;gap:0 8px;padding:2px 10px 6px;font-size:12.6px;line-height:1.55;flex:1;align-content:start}
.ls-subs span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ls-subs b{font-weight:700}
.ls-foot{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:6px;padding:5px 10px 7px;border-top:1px solid #eadcc2;font-size:12px;color:#8c7f73;margin-top:auto}
.ls-ts{text-align:center;font-weight:700;font-size:13px}
.ls-tags{display:inline-flex;flex-direction:column;gap:1px;margin-right:6px;vertical-align:middle}
.ls-tags i{font-style:normal;font-size:9.5px;font-weight:700;line-height:1.25;color:#fff;background:#1b1714;border-radius:3px;padding:0 4px;text-align:center}
.ls-right{display:inline-flex;align-items:center}
.h-M{color:var(--h-M)}.h-H{color:var(--h-H)}.h-O{color:var(--h-O)}.h-K{color:var(--h-K)}.h-T{color:var(--h-T)}

/* Thiên bàn */
.ls-center{grid-column:2/4;grid-row:2/4;background:#f6efe1;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:22px 26px 26px;overflow:hidden}
.ls-lines{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.ls-lines line{stroke:var(--brand,#a3211c);stroke-opacity:.45;stroke-width:1.2;vector-effect:non-scaling-stroke}
.ls-lines line.xung{stroke-dasharray:5 4}
.ls-title{position:relative;font-size:42px;font-weight:800;color:var(--brand,#a3211c);letter-spacing:.02em;line-height:1.1;padding:0 18px 6px;border-bottom:2px solid var(--brand,#a3211c)}
.ls-subtitle{position:relative;margin:8px 0 12px;font-weight:700;color:#7d1a16;font-size:15px;text-align:center}
.ls-tb{position:relative;width:100%;max-width:520px;border-collapse:collapse;font-size:14.5px}
.ls-tb td{padding:7px 14px}
.ls-tb tr:nth-child(odd) td{background:rgba(220,200,165,.32)}
.ls-tb td:first-child{color:#7d7166;width:110px}
.ls-tb td:nth-child(2){font-weight:700}
.ls-tb td:nth-child(3){font-weight:700;color:var(--brand,#a3211c)}
.ls-seal{position:absolute;right:22px;bottom:18px;width:74px;height:74px;border-radius:50%;opacity:.9;transform:rotate(-8deg);box-shadow:0 0 0 3px rgba(163,33,28,.15)}

/* Chú thích */
.ls-legend{display:flex;flex-wrap:wrap;align-items:center;gap:8px 18px;padding:12px 16px;font-size:13px;background:#f3ead8}
.ls-legend span{display:inline-flex;align-items:center;gap:6px;font-weight:600}
.ls-legend i{width:14px;height:14px;border-radius:2px;display:inline-block}
.ls-legend .dt-key{font-weight:500;color:#5b4f45;margin-left:auto}
.ls-note{padding:8px 16px 12px;font-size:12.5px;color:#8c7f73;background:#f3ead8;border-top:1px dashed #dccaa8}

/* Tam phương tứ chính khi bấm cung */
.ls.focus .ls-cell:not(.on){background:#f1e8d6}
.ls.focus .ls-cell:not(.on)>*{opacity:.45}
.ls.focus .ls-cell.sel{box-shadow:inset 0 0 0 2px var(--brand,#a3211c)}
