:root {
  --bg: #ffffff;
  --bg-2: #f4f5f4;
  --surface: #ffffff;
  --text: #141414;
  --muted: #6a6f6b;
  --line: #e4e6e4;
  --accent: #16a34a;
  --accent-2: #15803d;
  --accent-soft: #e5f6eb;
  --danger: #dc2626;
  --warn: #b45309;
  --badge: rgba(0, 0, 0, .78);
  --radius: 6px;
}
:root[data-theme="dark"] {
  --bg: #101211; --bg-2: #181b19; --surface: #1b1e1c; --text: #eef0ee; --muted: #9aa29c;
  --line: #2a2f2c; --accent: #22c55e; --accent-2: #16a34a; --accent-soft: #14301f;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101211; --bg-2: #181b19; --surface: #1b1e1c; --text: #eef0ee; --muted: #9aa29c;
    --line: #2a2f2c; --accent: #22c55e; --accent-2: #16a34a; --accent-soft: #14301f;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif; font-size: 14px; line-height: 1.45;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img, video { display: block; max-width: 100%; }
.muted { color: var(--muted); }
.container { max-width: 1720px; margin: 0 auto; padding: 18px clamp(10px, 3vw, 40px) 40px; min-height: 60vh; outline: none; }

/* ---------- header ---------- */
.hdr { background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.hdr-top { display: flex; align-items: center; gap: 18px; padding: 10px clamp(10px, 3vw, 40px); max-width: 1720px; margin: 0 auto; }
.logo { flex: none; display: block; line-height: 0; }
.logo img { height: 64px; width: auto; }
.search { flex: 1; max-width: 640px; display: flex; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: var(--surface); }
.search:focus-within { border-color: var(--accent); }
.search input { flex: 1; min-width: 0; border: 0; padding: 10px 12px; background: transparent; outline: none; font-size: 15px; }
.search button { border: 0; background: var(--bg-2); padding: 0 16px; cursor: pointer; }
.auth { display: flex; align-items: center; gap: 10px; margin-left: auto; white-space: nowrap; }
.auth > a:not(.btn) { color: var(--muted); }
.auth > a:not(.btn):hover { color: var(--text); }
.icon-btn { border: 0; background: transparent; cursor: pointer; font-size: 20px; padding: 4px; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 600; }
.menu summary::-webkit-details-marker { display: none; }
.menu-list {
  position: absolute; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.15); min-width: 190px; padding: 6px; display: flex; flex-direction: column; z-index: 40;
}
.menu-list a, .menu-list button { text-align: left; padding: 8px 10px; border-radius: 6px; border: 0; background: none; cursor: pointer; }
.menu-list a:hover, .menu-list button:hover { background: var(--bg-2); }

.nav { display: flex; justify-content: center; gap: clamp(8px, 3vw, 44px); padding: 0 12px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { display: flex; align-items: center; gap: 7px; padding: 11px 4px; font-weight: 700; font-size: 15px; white-space: nowrap; border-bottom: 3px solid transparent; }
.nav a i { font-style: normal; color: var(--muted); font-weight: 400; }
.nav a:hover, .nav a.active { border-bottom-color: var(--accent); }
.nav a.nav-up { color: var(--accent); }

/* ---------- buttons, forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--surface);
  padding: 8px 14px; border-radius: 4px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--bg-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); }
.btn.dark { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn.danger { color: var(--danger); }
.btn.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.link { border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer; font-weight: 600; }

.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.form label small { font-weight: 400; color: var(--muted); }
.form input, .form textarea, .form select, .input {
  width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 4px; padding: 10px 12px; outline: none;
}
.form input:focus, .form textarea:focus, .form select:focus, .input:focus { border-color: var(--accent); }
.form textarea { resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.err { color: var(--danger); min-height: 1em; margin: 0; }

/* ---------- list page ---------- */
.list-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.list-head h1 { margin: 0; font-size: 22px; }
.list-head h1 small { font-size: 14px; color: var(--muted); font-weight: 500; margin-left: 6px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs a { padding: 6px 12px; border-radius: 4px; background: var(--bg-2); font-weight: 600; font-size: 13px; }
.tabs a.active { background: var(--text); color: var(--bg); }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; scrollbar-width: thin; }
.chips a { flex: none; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; }
.chips a.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); font-weight: 600; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px 8px; }
.card { min-width: 0; }
.thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: #1a1d1b; overflow: hidden; }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.thumb .ph { width: 100%; height: 100%; display: grid; place-items: center; color: rgba(255,255,255,.9); font-weight: 800; font-size: 18px; }
.card:hover .thumb img, .card:hover .thumb video { filter: brightness(1.08); }
.q { position: absolute; top: 6px; right: 6px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; padding: 1px 6px; border-radius: 3px; }
.st { position: absolute; top: 6px; left: 6px; color: #fff; font-size: 12px; font-weight: 700; padding: 1px 6px; border-radius: 3px; background: var(--warn); }
.st.rejected { background: var(--danger); }
.card .t {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  text-align: center; font-size: 16px; line-height: 1.3; margin: 8px 4px 4px; min-height: 2.6em;
}
.card .t:hover { color: var(--accent); }
.card .m { text-align: center; color: var(--muted); font-size: 14px; }
.card .m a { text-decoration: underline; text-underline-offset: 2px; }
.card .m a:hover { color: var(--accent); }
.dur { display: inline-block; background: var(--badge); color: #fff; padding: 0 5px; border-radius: 3px; font-size: 13px; font-variant-numeric: tabular-nums; }
.grid.small { grid-template-columns: 1fr; gap: 12px; }
.grid.small .card { display: grid; grid-template-columns: 168px 1fr; gap: 10px; align-items: start; }
.grid.small .card .t { text-align: left; margin: 0 0 4px; font-size: 14px; min-height: 0; }
.grid.small .card .m { text-align: left; font-size: 12px; }

.pager { display: flex; justify-content: center; gap: 4px; margin: 30px 0 0; flex-wrap: wrap; }
.pager a, .pager span { min-width: 38px; text-align: center; padding: 7px 10px; border-radius: 4px; background: var(--bg-2); font-weight: 600; }
.pager .active { background: var(--accent); color: #fff; }
.empty { text-align: center; padding: 60px 10px; color: var(--muted); }
.loading { text-align: center; padding: 60px; color: var(--muted); }

/* ---------- watch page ---------- */
.watch { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; }
.player { background: #000; aspect-ratio: 16 / 9; }
.player video { width: 100%; height: 100%; background: #000; }
.w-title { font-size: 21px; margin: 14px 0 8px; line-height: 1.3; }
.w-bar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.w-meta { color: var(--muted); }
.w-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.rating { height: 4px; background: var(--danger); border-radius: 2px; overflow: hidden; margin-top: 4px; width: 150px; }
.rating i { display: block; height: 100%; background: var(--accent); }
.w-channel { display: flex; align-items: center; gap: 12px; padding: 14px 0; }
.w-channel .name { font-weight: 700; font-size: 15px; }
.w-channel .sub { margin-left: auto; }
.avatar {
  flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 17px;
}
.avatar.sm { width: 30px; height: 30px; font-size: 13px; }
.avatar.lg { width: 84px; height: 84px; font-size: 34px; }
.w-desc { background: var(--bg-2); border-radius: 8px; padding: 12px 14px; white-space: pre-line; overflow-wrap: anywhere; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; white-space: normal; }
.tags a { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: 13px; }
.tags a:hover { border-color: var(--accent); color: var(--accent); }
.notice { padding: 10px 14px; border-radius: 6px; margin-bottom: 12px; font-weight: 600; background: #fef3c7; color: #78350f; }
.notice.rejected { background: #fee2e2; color: #7f1d1d; }
.comments h3 { margin: 24px 0 12px; }
.c-form { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 18px; }
.c-form textarea { flex: 1; }
.c-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.c-list li { display: flex; gap: 10px; }
.c-list .who { font-weight: 700; }
.c-list time { color: var(--muted); font-size: 12px; margin-left: 6px; }
.c-list p { margin: 2px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.side h3 { margin: 0 0 12px; font-size: 16px; }

/* ---------- upload ---------- */
.narrow { max-width: 760px; margin: 0 auto; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: clamp(16px, 3vw, 28px); }
.panel h1 { margin: 0 0 6px; font-size: 22px; }
.drop {
  border: 2px dashed var(--line); border-radius: 10px; padding: 36px 16px; text-align: center; cursor: pointer; color: var(--muted);
  transition: border-color .15s, background .15s; display: block;
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop b { color: var(--text); display: block; font-size: 16px; margin-bottom: 4px; }
.file-ok { display: grid; grid-template-columns: 260px 1fr; gap: 16px; align-items: start; }
.file-ok video { width: 100%; aspect-ratio: 16/9; background: #000; border-radius: 6px; }
.thumb-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.thumb-pick button { padding: 0; border: 3px solid transparent; border-radius: 6px; overflow: hidden; cursor: pointer; background: none; }
.thumb-pick button.sel { border-color: var(--accent); }
.thumb-pick img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.progress { height: 10px; background: var(--bg-2); border-radius: 5px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.ok { color: var(--accent); font-weight: 600; }

/* ---------- channels / categories ---------- */
.ch-head { display: flex; align-items: center; gap: 18px; padding: 20px; background: var(--bg-2); border-radius: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.ch-head h1 { margin: 0; font-size: 26px; }
.ch-head .stats { color: var(--muted); }
.ch-head .act { margin-left: auto; display: flex; gap: 8px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tile { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 16/9; background: #222; display: block; }
.tile img { width: 100%; height: 100%; object-fit: cover; opacity: .75; }
.tile .lbl { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 12px; color: #fff;
  background: linear-gradient(transparent 30%, rgba(0,0,0,.8)); }
.tile .lbl b { font-size: 18px; }
.tile:hover img { opacity: .9; }
.ch-card { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.ch-card:hover { border-color: var(--accent); }
.ch-card b { display: block; font-size: 15px; }
.ch-card small { color: var(--muted); }

/* ---------- tables (me/admin) ---------- */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl th { font-size: 12px; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; }
.tbl .tt { display: flex; gap: 10px; align-items: center; min-width: 260px; }
.tbl .tt .thumb { width: 120px; flex: none; border-radius: 4px; }
.tbl .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pill.published { background: var(--accent-soft); color: var(--accent); }
.pill.pending { background: #fef3c7; color: #92400e; }
.pill.rejected { background: #fee2e2; color: #991b1b; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat { background: var(--bg-2); border-radius: 8px; padding: 14px; }
.stat b { display: block; font-size: 24px; }
.stat span { color: var(--muted); font-size: 13px; }
.scroll-x { overflow-x: auto; }

/* ---------- dialog & toast ---------- */
dialog { border: 0; border-radius: 12px; padding: 0; width: min(520px, calc(100vw - 24px)); background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
dialog::backdrop { background: rgba(0,0,0,.55); }
.dlg { padding: 22px; }
.dlg h2 { margin: 0 0 14px; font-size: 18px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 100;
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 600; transition: .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.footer { border-top: 1px solid var(--line); padding: 22px 16px; text-align: center; font-size: 13px; }
.footer p { margin: 4px 0; }
.footer a { text-decoration: underline; }

/* ---------- quản trị: thành viên, bình luận, cài đặt ---------- */
.admin-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.admin-bar .input { width: auto; flex: 0 1 260px; min-width: 0; }
.user-cell { display: inline-flex; align-items: center; gap: 8px; }
.cmt-cell { max-width: 420px; min-width: 220px; white-space: pre-wrap; overflow-wrap: anywhere; }
.form label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 600; cursor: pointer; }
.form label.check input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.form label.check span { display: flex; flex-direction: column; gap: 2px; }

/* ---------- quản trị: cài đặt giao diện ---------- */
.set-grid { display: grid; gap: 18px; max-width: 920px; }
.set-sec h2 { font-size: 18px; margin: 0 0 4px; }
.set-sec > .muted { margin: 0 0 12px; font-size: 13px; }
.set-sec code { background: var(--bg-2); padding: 0 4px; border-radius: 3px; }
.set-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.le-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 7px 0; border-bottom: 1px solid var(--line); }
.le-row .input { min-width: 0; }
.le-icon { width: 64px; text-align: center; }
.le-label, .le-name { flex: 1 1 160px; }
.le-href { flex: 2 1 200px; }
.le-check { display: flex; gap: 5px; align-items: center; font-size: 13px; white-space: nowrap; cursor: pointer; }
.le-check input { width: 16px; height: 16px; accent-color: var(--accent); }
.le-note { font-size: 12px; white-space: nowrap; }
.le-btns { display: flex; gap: 4px; margin-left: auto; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) { .watch { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .hdr-top { flex-wrap: wrap; gap: 10px; }
  .logo img { height: 48px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .auth .hide-m, .w-actions .hide-m { display: none; }
  .nav { justify-content: flex-start; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 6px; }
  .card .t { font-size: 13px; }
  .card .m { font-size: 12px; }
  .grid.small .card { grid-template-columns: 140px 1fr; }
  .row2, .file-ok { grid-template-columns: 1fr; }
  .c-form { flex-direction: column; align-items: stretch; }
}
@media (max-width: 420px) { .grid { grid-template-columns: 1fr; } }

[hidden] { display: none !important; }

/* ---------- nội dung SEO ---------- */
.seo-text { line-height: 1.7; overflow-wrap: anywhere; }
.seo-text h2 { font-size: 18px; margin: 20px 0 6px; }
.seo-text p { margin: 0 0 10px; }
.seo-text ul { margin: 0 0 10px; padding-left: 22px; }
.seo-ssr { max-width: 860px; margin: 0 auto; }
.seo-intro { background: var(--bg-2); border-radius: 8px; padding: 10px 14px; margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.seo-intro .seo-text { max-height: 3.4em; overflow: hidden; }
.seo-intro.open .seo-text { max-height: none; }
.seo-intro .seo-text p:last-child { margin-bottom: 0; }
.seo-more { font-size: 13px; margin-top: 4px; }
.faq details { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin-bottom: 8px; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin: 8px 0 0; }
.seo-admin { gap: 16px; }
.seo-count { font-weight: 500; color: var(--muted); }
.seo-count.over { color: var(--warn); font-weight: 700; }
.seo-cat { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
.seo-cat summary { cursor: pointer; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.seo-cat-body { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.faq-ed { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.faq-row { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.faq-fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }

/* ---------- quảng cáo ---------- */
.pz-wrap { max-width: 1720px; margin: 0 auto; padding: 0 clamp(10px, 3vw, 40px); }
.pz-wrap:empty { display: none; }
#pzTop .pz { margin: 14px auto 0; }
.pz { margin: 14px auto; text-align: center; min-width: 0; }
.pz-label { display: block; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.pz-fit { display: flex; justify-content: center; overflow: hidden; }
.pz-box { flex: none; transform-origin: top center; }
.pz-box a, .pz-box img, .pz-box iframe { display: block; width: 100%; height: 100%; border: 0; }
.pz-box img { object-fit: contain; }
.grid .pz-card { margin: 0; align-self: start; }
.pz-side { margin: 0 0 18px; }
.pz-player { margin: 12px auto 4px; }
/* trang quản trị quảng cáo */
.pz-admin { gap: 16px; }
.pz-admin .set-sec h2 { margin-top: 0; }
.pz-vars { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 14px; margin-top: 12px; }
.pz-var { border: 1px solid var(--line); border-radius: 8px; padding: 12px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pz-var-head { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.pz-fields { display: flex; flex-direction: column; gap: 10px; }
.pz-field { display: flex; flex-direction: column; gap: 6px; }
.pz-img-row { display: flex; gap: 6px; align-items: center; }
.pz-img-row .input { flex: 1; min-width: 0; }
.pz-preview { display: flex; flex-direction: column; gap: 4px; overflow-x: auto; }
.pz-preview img { max-width: 100%; height: auto; border: 1px dashed var(--line); }
.pz-var textarea { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.pz-save { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0; display: flex; gap: 12px; align-items: center; justify-content: flex-end; border-top: 1px solid var(--line); }

/* ---------- xem trước khi rê chuột, tiến độ đã xem ---------- */
.thumb .pv { position: absolute; inset: 0; background-size: 1000% 100%; background-repeat: no-repeat; opacity: 0; transition: opacity .15s; }
.thumb .pv.on { opacity: 1; }
.thumb .prog { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .35); }
.thumb .prog i { display: block; height: 100%; background: var(--danger); }

/* ---------- chế độ rạp ---------- */
.watch.theater { grid-template-columns: minmax(0, 1fr); }
.watch.theater .player { aspect-ratio: auto; height: min(56.25vw, 78vh); }
.watch.theater .side .grid.small { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.watch.theater .side .grid.small .card { display: block; }
.watch.theater .side .grid.small .card .t { text-align: center; margin: 8px 4px 4px; }
.watch.theater .side .grid.small .card .m { text-align: center; }

/* ---------- đám mây thẻ ---------- */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: baseline; }
.tag-cloud a { padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; font-weight: 600; line-height: 1.3; }
.tag-cloud a:hover { border-color: var(--accent); color: var(--accent); }
.tag-cloud small { margin-left: 6px; font-size: 12px; color: var(--muted); font-weight: 500; }

/* ---------- cổng xác nhận 18+ ---------- */
body.gated { overflow: hidden; }
.agegate { position: fixed; inset: 0; z-index: 1000; background: rgba(8, 10, 9, .97); display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.agegate-box { max-width: 520px; width: 100%; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: clamp(20px, 4vw, 32px); text-align: center; }
.agegate-box img { height: 56px; width: auto; }
.agegate-box h1 { font-size: 22px; margin: 14px 0 10px; }
.agegate-box p { margin: 8px 0; }
.agegate-box .badge18 { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; border: 3px solid var(--danger); color: var(--danger); font-weight: 800; font-size: 18px; }
.agegate-act { display: flex; flex-direction: column; gap: 10px; margin: 18px 0 10px; }
.agegate-act .btn { justify-content: center; padding: 12px; font-size: 15px; }
.agegate-box .small { font-size: 12px; }

/* ---------- trang pháp lý ---------- */
.legal { max-width: 820px; margin: 0 auto; line-height: 1.7; }
.legal h1 { font-size: 26px; margin: 8px 0 4px; }
.legal h2 { font-size: 18px; margin: 26px 0 8px; }
.legal li { margin: 4px 0; }
.legal .box { background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; white-space: pre-line; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 18px; }
.footer .legal-links a { margin: 0 2px; }

/* ---------- người xuất hiện trong video ---------- */
.perf { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px 14px; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.perf legend { font-weight: 700; padding: 0 6px; }
.perf p { margin: 0; }
.perf-list { display: flex; flex-direction: column; }
.perf-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.perf-row .perf-consent { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; font-size: 13px; }
.perf-row .perf-consent input { padding: 4px; max-width: 260px; }
.perf-add { display: flex; gap: 8px; flex-wrap: wrap; }
.sec-h { font-size: 17px; margin: 22px 0 10px; }
.doc-links { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.notice.ok { background: var(--accent-soft); color: var(--accent); }
.rec-tbl td, .rec-tbl th { font-size: 13px; padding: 6px 8px; }
dialog.wide { width: min(760px, calc(100vw - 24px)); }
