/* Phần mềm đăng bài tự động — HANA. Cùng bộ màu/phông với các phần mềm khác (quangcao, chonchude):
   sáng mặc định, tự tối theo máy. Sửa ở đây rồi chạy: python dung.py */
:root {
  --ground: #eff0f2; --surface: #ffffff; --ink: #15171c; --muted: #5a5f69; --line: #dcdfe4; --soft: #f5f6f8; --field: #ffffff;
  --red: #d71920; --red-ink: #b3141a; --on-red: #ffffff; --yellow: #ffcf33; --on-yellow: #15171c; --frame: #111317;
  --done: #1d7f47; --done-soft: #e3f3e9; --focus: #2166d1; --hl: #fff4cc; --hl-line: #f1dc8f;
  --xanh: #1d7f47; --xanh-nen: #e3f3e9; --vang: #8a5a00; --vang-nen: #fff4cc; --do: #b3141a; --do-nen: #fde8e8;
  --cho: #5a5f69; --cho-nen: #eef0f3; --fb: #0866ff; --fb-nen: #e7f0ff;
  --display: "Anton", "Oswald", Impact, "Arial Narrow", sans-serif;
  --body: "Be Vietnam Pro", "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", Consolas, "Courier New", monospace;
  --nav-h: 66px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0e1014; --surface: #171a20; --ink: #eceef2; --muted: #9ba1ac; --line: #2a2e36; --soft: #1d2027; --field: #111318;
    --red-ink: #ff6166; --frame: #07080a; --done: #4cc783; --focus: #7fb0ff; --hl: #2a2413; --hl-line: #4a3f1c;
    --xanh: #4cc783; --xanh-nen: #14301f; --vang: #ffcf33; --vang-nen: #2f2712; --do: #ff6166; --do-nen: #35171a;
    --cho: #9ba1ac; --cho-nen: #1d2027; --fb: #6ba5ff; --fb-nen: #10233f;
  }
}
:root[data-theme="dark"] {
  --ground: #0e1014; --surface: #171a20; --ink: #eceef2; --muted: #9ba1ac; --line: #2a2e36; --soft: #1d2027; --field: #111318;
  --red-ink: #ff6166; --frame: #07080a; --done: #4cc783; --focus: #7fb0ff; --hl: #2a2413; --hl-line: #4a3f1c;
  --xanh: #4cc783; --xanh-nen: #14301f; --vang: #ffcf33; --vang-nen: #2f2712; --do: #ff6166; --do-nen: #35171a;
  --cho: #9ba1ac; --cho-nen: #1d2027; --fb: #6ba5ff; --fb-nen: #10233f;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.55; }
body.locked { overflow: hidden; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.tc { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.app { max-width: 1120px; margin-inline: auto; padding-inline: 16px; padding-block: 14px calc(var(--nav-h) + 40px); display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 860px) { .app { padding-inline: 24px; padding-block: 22px 64px; } }

/* ---------------- đầu trang */
.top { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; }
.logo { font-family: var(--display); font-weight: 400; font-size: clamp(20px, 5.6vw, 29px); line-height: 1; text-transform: uppercase; letter-spacing: .01em; }
.logo span { color: var(--red-ink); }
.top-r { display: flex; align-items: center; gap: 10px; justify-self: end; min-width: 0; }
.sync { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.sync i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.sync[data-mode="cloud"] i { background: var(--done); }
.sync[data-mode="loading"] i { background: var(--yellow); }
.sync[data-mode="error"] i { background: var(--red); }
.sync .short { display: none; }
@media (max-width: 560px) { .sync .long { display: none; } .sync .short { display: inline; } }
@media (max-width: 420px) { .top .sync { display: none; } }
.bq-chip { font: 600 13px/1 var(--body); padding: 8px 11px; min-height: 34px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; white-space: nowrap; }
.bq-chip:hover { border-color: var(--ink); }
.bq-chip.sap { background: var(--hl); border-color: var(--hl-line); }
.bq-chip.het { background: var(--red); border-color: var(--red); color: #fff; }
.db-ve, .cong-ve { display: flex; align-items: center; min-height: 0; }
.db-ve { margin-bottom: -10px; }
.db-ve:empty { margin-bottom: -20px; }
.cong-ve:empty { margin-bottom: -16px; }

/* ---------------- thẻ chuyển trang */
.tabs { display: none; }
@media (min-width: 760px) {
  .tabs { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px; align-self: flex-start; }
  .tabs button { font: 600 15px/1.1 var(--body); padding: 10px 16px; border-radius: 9px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
  .tabs button:hover { color: var(--ink); }
  .tabs button[aria-current="true"] { background: var(--ink); color: var(--ground); }
}
.bnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
@media (min-width: 760px) { .bnav { display: none; } .app { padding-bottom: 64px; } }
.bnav button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 4px 10px; font: 600 12px/1.2 var(--body); color: var(--muted); background: transparent; border: 0; cursor: pointer; }
.bnav button b { font-family: var(--mono); font-size: 15px; font-weight: 700; }
.bnav button[aria-current="true"] { color: var(--ink); }
.bnav button[aria-current="true"] b { color: var(--red-ink); }

/* ---------------- khối chung */
.the { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 760px) { .the { padding: 20px; } }
.the h2 { font-size: 19px; font-weight: 700; }
.the h3 { font-size: 16px; font-weight: 700; }
.dan { color: var(--muted); font-size: 15px; max-width: 70ch; }
.tag { display: inline-block; background: var(--yellow); color: var(--on-yellow); font-family: var(--display); font-size: 14px; letter-spacing: .04em; line-height: 1; padding: 6px 9px 5px; border-radius: 6px; }
.hang { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cot { display: flex; flex-direction: column; gap: 8px; }
.luoi { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .luoi.c2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .luoi.c3 { grid-template-columns: repeat(3, 1fr); } }

.btn { font: 600 15px/1.1 var(--body); display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; padding: 12px 16px; min-height: 44px; cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; text-align: center; }
.btn:hover { background: var(--soft); }
.btn-red { background: var(--red); border-color: var(--red); color: var(--on-red); }
.btn-red:hover { background: #e3262d; }
.btn-lg { font-size: 17px; padding: 14px 22px; }
.btn-sm { font-size: 14px; padding: 8px 12px; min-height: 38px; }
.btn-ghost { background: transparent; }
.btn[disabled] { opacity: .55; cursor: default; }
.btn-del { color: var(--red-ink); background: transparent; }
.btn-del.armed { background: var(--red); border-color: var(--red); color: #fff; }

label { font-size: 13px; font-weight: 600; color: var(--muted); display: block; margin-bottom: 4px; }
input, textarea, select { font: 500 16px/1.4 var(--body); color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; width: 100%; }
input:focus, textarea:focus, select:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px rgba(33, 102, 209, .18); }
input.so { font-family: var(--mono); font-variant-numeric: tabular-nums; }
textarea { min-height: 92px; resize: vertical; }
.o { min-width: 0; }
.goi { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* ---------------- ô số liệu lớn */
.so-luoi { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.so-o { background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.so-o dt { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .01em; }
.so-o dd { margin: 2px 0 0; font-family: var(--mono); font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.so-o small { display: block; font-size: 12px; color: var(--muted); font-family: var(--body); font-weight: 500; margin-top: 2px; }
.so-o.nhan { background: var(--hl); border-color: var(--hl-line); }

/* ---------------- đèn chấm chiến dịch */
.den { display: inline-flex; align-items: center; gap: 7px; font: 700 13px/1 var(--body); padding: 7px 11px; border-radius: 999px; white-space: nowrap; }
.den i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.den.xanh { color: var(--xanh); background: var(--xanh-nen); }
.den.vang { color: var(--vang); background: var(--vang-nen); }
.den.do { color: var(--do); background: var(--do-nen); }
.den.cho { color: var(--cho); background: var(--cho-nen); }

.cd { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.cd.l-do { border-left: 4px solid var(--do); }
.cd.l-vang { border-left: 4px solid var(--vang); }
.cd.l-xanh { border-left: 4px solid var(--xanh); }
.cd-dau { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.cd-ten { font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.cd-tt { font: 600 12px/1 var(--mono); padding: 5px 8px; border-radius: 6px; background: var(--soft); color: var(--muted); border: 1px solid var(--line); }
.cd-tt.on { background: var(--xanh-nen); color: var(--xanh); border-color: transparent; }
.cd-so { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; }
.cd-so span { white-space: nowrap; color: var(--muted); }
.cd-so b { font-family: var(--mono); font-weight: 700; color: var(--ink); }
.cd-ly { font-size: 15px; }
.cd-viec { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.cd-viec li::marker { color: var(--red-ink); }
.cd-chan { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--muted); }
.cd-nut { display: flex; flex-wrap: wrap; gap: 6px; }
.cd-ai { background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font-size: 15px; white-space: pre-wrap; }

/* ---------------- kết quả soạn bài */
.kq { display: flex; flex-direction: column; gap: 14px; }
.kq-muc { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.kq-muc:first-child { border-top: 0; padding-top: 0; }
.kq-nhan { font: 700 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--red-ink); }
.hook { display: flex; gap: 8px; align-items: flex-start; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.hook p { flex: 1; font-size: 16px; font-weight: 600; }
.hook .so-tt { font: 700 12px/1 var(--mono); color: var(--muted); padding-top: 4px; }
.bai-o { background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.bai-o h4 { font-size: 14px; font-weight: 700; color: var(--red-ink); }
.bai-chu { white-space: pre-wrap; font-size: 15px; line-height: 1.6; }
.ds { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.ds li::marker { color: var(--red-ink); }
.chip-ds { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: 600 13px/1 var(--body); padding: 7px 10px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); }
.canh { background: var(--vang-nen); border: 1px solid var(--hl-line); border-radius: 10px; padding: 11px 12px; font-size: 14px; }
.canh b { font-weight: 700; }

/* ---------------- bảng danh sách đã lưu */
.luu-o { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--surface); }
.luu-o .tt { min-width: 0; }
.luu-o .tt b { display: block; font-size: 15px; overflow-wrap: anywhere; }
.luu-o .tt small { color: var(--muted); font-size: 12px; }

/* ---------------- Facebook */
.fb-b { display: flex; gap: 10px; align-items: flex-start; }
.fb-b .n { flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--fb-nen); color: var(--fb); font: 700 13px/26px var(--mono); text-align: center; }
.fb-b .t { flex: 1; font-size: 15px; }
.fb-b code { font-family: var(--mono); font-size: 13px; background: var(--soft); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; overflow-wrap: anywhere; }
.fb-tt { display: inline-flex; align-items: center; gap: 7px; font: 600 13px/1 var(--body); padding: 7px 11px; border-radius: 999px; background: var(--fb-nen); color: var(--fb); }
.cong-tac { display: flex; align-items: center; gap: 10px; justify-content: space-between; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.cong-tac .t { font-size: 15px; }
.cong-tac .t small { display: block; color: var(--muted); font-size: 13px; }
.bat { position: relative; flex: 0 0 52px; height: 30px; border-radius: 999px; border: 1px solid var(--line); background: var(--field); cursor: pointer; }
.bat::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--muted); transition: left .15s, background .15s; }
.bat[aria-pressed="true"] { background: var(--xanh-nen); border-color: var(--xanh); }
.bat[aria-pressed="true"]::after { left: 25px; background: var(--xanh); }
.nk { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; font-size: 14px; }
.nk .l { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; padding-top: 3px; }
.nk .v b { font-weight: 700; }
.token-o { font-family: var(--mono); font-size: 13px; min-height: 76px; }

/* ---------------- hộp thoại */
.hop { position: fixed; inset: 0; z-index: 65; background: rgba(5, 6, 8, .55); display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.hop-the { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; padding: 20px; width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 14px; margin-block: auto; }
.hop-the h2 { font-size: 20px; font-weight: 700; }
.bq-bang { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.bq-bang div { display: grid; grid-template-columns: 124px 1fr; gap: 10px; }
.bq-bang dt { font-size: 13px; font-weight: 600; color: var(--muted); padding-top: 2px; }
.bq-bang dd { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.bq-nut { display: flex; flex-wrap: wrap; gap: 8px; }
.bq-ghi { font-size: 13px; color: var(--muted); }

/* ---------------- toast */
#toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 14px); transform: translateX(-50%) translateY(12px); z-index: 80;
  background: var(--frame); color: #fff; font-size: 15px; font-weight: 600; padding: 11px 16px; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; max-width: calc(100vw - 32px); text-align: center; }
#toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast a { color: var(--yellow); margin-left: 8px; }
@media (min-width: 760px) { #toast { bottom: 24px; } }

/* ---------------- cổng kích hoạt: luôn tối như bìa video */
.cong { position: fixed; inset: 0; z-index: 70; overflow-y: auto; display: flex; justify-content: center;
  background: radial-gradient(120% 90% at 85% 0%, #2a2f38 0%, transparent 60%), #0b0c0f; color: #f4f5f7;
  padding: calc(24px + env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px)); }
.cong-hop { width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 16px; margin-block: auto; }
.cong-h { display: flex; flex-direction: column; font-family: var(--display); font-weight: 400; font-size: clamp(36px, 10vw, 60px); line-height: 1.04; text-transform: uppercase; color: #fff; letter-spacing: .01em;
  text-shadow: 3px 0 0 #d71920, -3px 0 0 #d71920, 0 3px 0 #d71920, 0 -3px 0 #d71920, 2px 2px 0 #d71920, -2px 2px 0 #d71920, 2px -2px 0 #d71920, -2px -2px 0 #d71920, 6px 6px 0 #000, 5px 7px 0 #000, 7px 5px 0 #000; }
.cong-dan { color: #b9bec8; font-size: 16px; max-width: 46ch; }
.cong-tt { font-size: 15px; font-weight: 600; background: #1b1e25; border: 1px solid #343945; border-radius: 10px; padding: 10px 12px; color: #d5d9e0; line-height: 1.45; }
.cong-tt.loi { background: #fff4cc; color: #15171c; border-color: #f1dc8f; }
.cong form { display: flex; flex-direction: column; gap: 8px; }
.cong label { font-size: 13px; font-weight: 600; color: #d5d9e0; }
.cong .hang { display: flex; gap: 8px; flex-wrap: wrap; }
#in-ma { flex: 1 1 220px; min-width: 0; font: 600 18px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: #f4f5f7; background: #1b1e25; border: 1px solid #343945; border-radius: 10px; padding: 13px 14px; }
#in-ma::placeholder { color: #6f7581; }
#in-ma:focus { border-color: #ffcf33; outline: none; box-shadow: 0 0 0 3px rgba(255, 207, 51, .25); }
.thu-o { display: flex; flex-direction: column; gap: 8px; }
.thu-dan { font-size: 15px; color: #d5d9e0; margin: 0 0 2px; }
#in-ten, #in-sdt { font: 500 17px/1.2 var(--body); color: #f4f5f7; background: #1b1e25; border: 1px solid #343945; border-radius: 10px; padding: 13px 14px; }
#in-ten::placeholder, #in-sdt::placeholder { color: #6f7581; }
#in-ten:focus, #in-sdt:focus { border-color: #ffcf33; outline: none; box-shadow: 0 0 0 3px rgba(255, 207, 51, .25); }
#f-thu .btn-toi { margin-top: 6px; }
.thu-note { font-size: 13px; color: #9ba1ac; line-height: 1.45; margin: 0; }
.cong-hoac { display: flex; align-items: center; gap: 10px; color: #6f7581; font-size: 13px; }
.cong-hoac::before, .cong-hoac::after { content: ""; flex: 1; height: 1px; background: #2b3039; }
.cong .btn-toi { background: transparent; color: #f4f5f7; border-color: #4a505c; }
.cong .btn-toi:hover { background: #1b1e25; }
.cong-note { font-size: 14px; color: #9ba1ac; line-height: 1.5; }
.cong-note a { color: #ffcf33; }
.cong-ds { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 15px; color: #d5d9e0; }
.cong-ds li::marker { color: #ffcf33; }

/* =====================================================================  PHẦN RIÊNG CỦA ĐĂNG BÀI (dung.py nối sau kieu.css) */
.chip-tt { display: inline-flex; align-items: center; gap: 6px; font: 700 12px/1 var(--body); padding: 6px 9px; border-radius: 999px; white-space: nowrap; }
.chip-tt i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.tt-nhap, .tt-da_huy { color: var(--cho); background: var(--cho-nen); }
.tt-cho_duyet, .tt-can_sua { color: var(--vang); background: var(--vang-nen); }
.tt-da_duyet, .tt-da_hen, .tt-dang_dang { color: var(--fb); background: var(--fb-nen); }
.tt-da_dang { color: var(--xanh); background: var(--xanh-nen); }
.tt-loi { color: var(--do); background: var(--do-nen); }
.nguon { font: 700 11px/1 var(--mono); padding: 4px 6px; border-radius: 5px; background: var(--soft); border: 1px solid var(--line); color: var(--muted); }

/* thanh công cụ lịch */
.lich-dau { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.thang { display: flex; align-items: center; gap: 6px; }
.thang b { font-family: var(--display); font-weight: 400; font-size: 24px; letter-spacing: .02em; min-width: 8ch; text-align: center; }
.btn-vuong { width: 44px; padding: 0; }
.loc { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.loc::-webkit-scrollbar { display: none; }
.loc button { font: 600 13px/1 var(--body); padding: 8px 11px; min-height: 36px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; white-space: nowrap; }
.loc button b { font-family: var(--mono); margin-left: 4px; color: var(--ink); }
.loc button[aria-pressed="true"] { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.loc button[aria-pressed="true"] b { color: var(--ground); }
.viec { display: flex; flex-wrap: wrap; gap: 8px; }
.viec button { font: 600 14px/1.2 var(--body); padding: 10px 12px; border-radius: 10px; border: 1px solid var(--hl-line); background: var(--hl); color: var(--ink); cursor: pointer; }
.viec button.do { border-color: transparent; background: var(--do-nen); color: var(--do); }

/* lưới tháng (máy tính) */
.luoi-thang { display: none; }
@media (min-width: 760px) {
  .luoi-thang { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--line); gap: 1px; }
  .ds-ngay { display: none !important; }
}
.luoi-thang .thu { background: var(--soft); font: 700 12px/1 var(--body); color: var(--muted); padding: 8px; text-align: center; }
.o-ngay { background: var(--surface); min-height: 112px; padding: 6px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; min-width: 0; }
.o-ngay:hover { background: var(--soft); }
.o-ngay.ngoai { background: var(--soft); opacity: .55; }
.o-ngay.nay .so-ngay { background: var(--red); color: #fff; }
.so-ngay { font: 700 12px/1 var(--mono); align-self: flex-start; padding: 4px 6px; border-radius: 6px; color: var(--muted); }
.vien { display: flex; gap: 5px; align-items: center; font: 600 12px/1.25 var(--body); padding: 4px 6px; border-radius: 6px; border: 0; text-align: left; cursor: pointer; min-width: 0; width: 100%; }
.vien span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.vien em { font: 700 11px/1 var(--mono); font-style: normal; flex: 0 0 auto; opacity: .85; }
.them-n { font-size: 12px; color: var(--muted); padding-left: 6px; }

/* danh sách ngày (điện thoại) */
.ds-ngay { display: flex; flex-direction: column; gap: 14px; }
.ngay-dau { font: 700 13px/1 var(--body); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.ngay-dau.nay { color: var(--red-ink); }
.dong-bai { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; cursor: pointer; color: var(--ink); font: inherit; }
.dong-bai + .dong-bai { margin-top: 6px; }
.dong-bai .gio { font: 700 14px/1.3 var(--mono); flex: 0 0 46px; color: var(--muted); }
.dong-bai .nd { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.dong-bai .nd b { font-size: 15px; font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.dong-bai .nd small { color: var(--muted); font-size: 12px; }

/* hộp soạn bài: rộng hơn hộp thường */
.hop-the.rong { max-width: 760px; }
.hop-dau { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.hop-dau .hang { gap: 6px; }
.dem-chu { font: 600 12px/1 var(--mono); color: var(--muted); text-align: right; margin-top: 4px; }
textarea.noi-dung { min-height: 220px; line-height: 1.55; }
.anh-luoi { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.anh-o { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--soft); border: 1px solid var(--line); }
.anh-o img { width: 100%; height: 100%; object-fit: cover; display: block; }
.anh-o button { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 16px; cursor: pointer; line-height: 1; }
.anh-them { aspect-ratio: 1; border-radius: 10px; border: 1.5px dashed var(--line); background: transparent; color: var(--muted); font: 600 13px/1.3 var(--body); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.anh-them:hover { border-color: var(--ink); color: var(--ink); }
.anh-them b { font-size: 24px; line-height: 1; }
.chon-ds { display: flex; flex-direction: column; gap: 6px; }
.chon { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 15px; font-weight: 500; color: var(--ink); margin: 0; }
.chon input { width: 20px; height: 20px; flex: 0 0 auto; accent-color: var(--red); }
.chon small { color: var(--muted); font-size: 12px; margin-left: auto; }
.chon.loi { border-color: var(--do); }
.canh-ds { margin: 0; padding: 10px 12px 10px 30px; background: var(--vang-nen); border: 1px solid var(--hl-line); border-radius: 10px; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.dich-ds { display: flex; flex-direction: column; gap: 6px; }
.dich { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 14px; padding: 9px 11px; border-radius: 10px; background: var(--soft); border: 1px solid var(--line); }
.dich b { font-weight: 600; }
.dich a { color: var(--fb); }
.dich .loi-chu { flex-basis: 100%; color: var(--do); font-size: 13px; }
.su-ds { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.su-ds b { color: var(--ink); font-weight: 600; }
.nut-day { position: sticky; bottom: -20px; margin: 0 -20px -20px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px; border-radius: 0 0 16px 16px; }
.nut-day .gian { flex: 1; }
.btn-xanh { background: var(--xanh); border-color: var(--xanh); color: #fff; }
.btn-xanh:hover { filter: brightness(1.08); background: var(--xanh); }
.btn-fb { background: var(--fb); border-color: var(--fb); color: #fff; }
.btn-fb:hover { filter: brightness(1.08); background: var(--fb); }
.goi-y { font-size: 14px; background: var(--soft); border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; }
.goi-y b { font-weight: 700; }

/* hội nhóm */
.hang-cho { display: flex; flex-direction: column; gap: 10px; }
.muc-nhom { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: var(--surface); }
.muc-nhom .ten { font-weight: 700; font-size: 16px; overflow-wrap: anywhere; }
.muc-nhom .phu { font-size: 13px; color: var(--muted); }
.muc-nhom pre { margin: 0; white-space: pre-wrap; font: 400 14px/1.55 var(--body); background: var(--soft); border-radius: 10px; padding: 10px 12px; max-height: 160px; overflow: auto; }
.buoc { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.dong-ho { font: 700 15px/1.3 var(--mono); background: var(--fb-nen); color: var(--fb); padding: 10px 12px; border-radius: 10px; }
.bang { width: 100%; border-collapse: collapse; font-size: 14px; }
.bang th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.bang td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.bang td a { color: var(--fb); }
.cuon-ngang { overflow-x: auto; }
.ban-nhom { display: flex; flex-direction: column; gap: 6px; }
.ban-nhom label { color: var(--ink); font-size: 14px; }
.ban-nhom textarea { min-height: 130px; font-size: 15px; }
.tien-do { height: 6px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.tien-do i { display: block; height: 100%; background: var(--xanh); }
.trang-o { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; flex-wrap: wrap; }
.trang-o img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--soft); flex: 0 0 auto; }
.trang-o .tt { flex: 1; min-width: 140px; }
.trang-o .tt b { display: block; overflow-wrap: anywhere; }
.trang-o .tt small { color: var(--muted); font-size: 12px; }
.trang-o .tt .loi-chu { color: var(--do); font-size: 13px; display: block; }
ol.buoc-lay { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
ol.buoc-lay code { font-family: var(--mono); font-size: 13px; background: var(--soft); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; overflow-wrap: anywhere; }
details.gon summary { cursor: pointer; font-weight: 600; font-size: 15px; }
details.gon[open] summary { margin-bottom: 10px; }
.trong { color: var(--muted); font-size: 15px; padding: 14px; border: 1px dashed var(--line); border-radius: 12px; text-align: center; }
