* { box-sizing: border-box; }
body { margin: 0; font: 17px/1.65 -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: #1d1d1f; background: #fafaf7; }
header.top { position: sticky; top: 0; z-index: 5; background: #1f3a5f; color: #fff; padding: 10px 14px; display: flex; gap: 12px; align-items: center; }
header.top a { color: #fff; text-decoration: none; font-weight: 600; }
header.top .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
main { max-width: 820px; margin: 0 auto; padding: 14px 14px 55vh; }
.hint { font-size: 14px; color: #555; background: #eef3fa; border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; }
h1, h2, h3, h4 { line-height: 1.3; color: #1f3a5f; }
p, li { margin: .45em 0; }
table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 16px; }
td, th { border: 1px solid #d5d5d0; padding: 6px 8px; vertical-align: top; text-align: left; }
th { background: #eef1f5; }
img { max-width: 100% !important; height: auto !important; }
mark { background: #fff3b0; }
.w { cursor: pointer; border-radius: 3px; -webkit-tap-highlight-color: transparent; }
.hl { background: #e3f0ff; }
.w.hw { background: #ffd54f; }
/* Bảng tra nghĩa */
#sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; max-height: 52vh; overflow-y: auto;
  background: #fff; border-top: 3px solid #1f3a5f; box-shadow: 0 -6px 24px rgba(0,0,0,.18);
  padding: 10px 14px calc(14px + env(safe-area-inset-bottom)); transform: translateY(110%); transition: transform .2s; }
#sheet.open { transform: none; }
.sh-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sh-word { font-size: 22px; font-weight: 700; color: #1f3a5f; }
.sh-ipa { color: #b5432b; font-size: 17px; }
.sh-close { margin-left: auto; }
.btn { border: 1px solid #ccd; background: #f4f6fa; border-radius: 8px; padding: 4px 10px; font-size: 17px; }
.btn.sm { font-size: 13px; padding: 2px 8px; }
.sh-mean { margin-top: 6px; }
.sh-mean .main { font-size: 18px; font-weight: 600; }
.sh-mean i, .sh-def i { color: #666; }
.sh-def { font-size: 14px; color: #444; margin-top: 4px; }
.sh-sent { margin-top: 10px; padding-top: 8px; border-top: 1px dashed #ccc; }
.sh-sent .lbl { font-size: 13px; color: #666; margin-bottom: 4px; }
.sh-en { font-style: italic; }
.sh-vi { margin-top: 4px; color: #0b6b3a; font-weight: 500; }
.muted { color: #888; font-size: 14px; }
/* Index */
.list a { display: block; padding: 14px 16px; margin: 10px 0; background: #fff; border: 1px solid #dde; border-radius: 10px;
  text-decoration: none; color: #1f3a5f; font-weight: 600; font-size: 18px; }
.list a small { display: block; color: #777; font-weight: 400; font-size: 14px; }
