/* 3C Friend — giao diện chung cho các trang phụ (terms, privacy, del, pro, join, gift, sales).
   Lấy theo trang chủ _server/index.html: nền tối, vàng #d9b45b / #f2d488, tiêu đề Playfair Display, chữ Be Vietnam Pro. Chỉ có nền tối. */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;900&family=Be+Vietnam+Pro:wght@300;400;500;600;700&display=swap');

:root{
  --bg:#0a0e0b; --bg-2:#0e1511; --bg-3:#13201a;
  --felt:#1a7a4c; --gold:#d9b45b; --gold-hi:#f2d488; --gold-deep:#a17f37;
  --ivory:#f4efe3; --text:#cdd3cb; --muted:#97a298;
  --line:rgba(217,180,91,0.16); --line-2:rgba(217,180,91,0.30);
  --ok:#6fdca6; --bad:#ff9a8a;
  --pad:clamp(16px,4.5vw,96px);
  color-scheme:dark;
}
*{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; }
body{
  margin:0; overflow-x:hidden; min-height:100vh; display:flex; flex-direction:column;
  background:
    radial-gradient(1200px 720px at 82% -8%, rgba(26,122,76,0.16), transparent 60%),
    radial-gradient(900px 600px at 0% 100%, rgba(217,180,91,0.06), transparent 55%),
    var(--bg);
  color:var(--text);
  font-family:'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  line-height:1.62; font-size:16.5px; -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}
main{ flex:1 0 auto; min-width:0; }
img, video{ max-width:100%; }
.wrap{ width:100%; max-width:1440px; margin:0 auto; padding-left:var(--pad); padding-right:var(--pad); }
.hidden{ display:none !important; }
.hide{ display:none; }

/* chữ */
h1,h2,h3,h4{ font-family:'Playfair Display', Georgia, serif; color:var(--ivory); font-weight:700; line-height:1.15; margin:0; text-wrap:balance; }
h1{ font-size:clamp(28px,3.8vw,48px); margin-bottom:14px; }
h2{ font-size:clamp(21px,2vw,28px); }
h3{ font-size:19px; }
p{ margin:0 0 .8em; }
a{ color:var(--gold-hi); text-decoration:none; }
a:hover{ text-decoration:underline; text-underline-offset:3px; }
b, strong{ color:var(--ivory); font-weight:600; }
code{ font-size:.92em; color:var(--gold-hi); background:rgba(217,180,91,0.10); border:1px solid var(--line); padding:1px 6px; border-radius:6px; overflow-wrap:anywhere; }
blockquote{ margin:0 0 1em; padding:10px 16px; border-left:3px solid var(--gold); background:rgba(217,180,91,0.05); border-radius:0 10px 10px 0; color:var(--text); }
hr{ border:0; border-top:1px solid var(--line); margin:22px 0; }
.eyebrow{ display:inline-flex; flex-wrap:wrap; align-items:center; gap:10px; font-weight:600; font-size:13px; letter-spacing:3px; text-transform:uppercase; color:var(--gold); margin-bottom:14px; }
.diamond{ width:9px; height:9px; background:var(--gold); transform:rotate(45deg); display:inline-block; flex:0 0 auto; box-shadow:0 0 10px rgba(217,180,91,0.5); }
.lede{ font-size:clamp(16px,1.3vw,19px); color:var(--text); max-width:72ch; }
.fine{ font-size:13.5px; color:var(--muted); }
.fine b{ color:var(--text); }
.note{ font-size:14px; color:var(--muted); margin:8px 0 0; }
.meta{ font-size:14px; color:var(--muted); }
.mut{ color:var(--muted); } .ok-t{ color:var(--ok); } .bad-t{ color:var(--bad); }

/* nút */
.btn{ display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:48px; padding:10px 24px; border-radius:999px; border:0; cursor:pointer; text-decoration:none; font:inherit; font-weight:700; font-size:15.5px; letter-spacing:.2px; text-align:center; transition:transform .2s, box-shadow .2s; }
.btn:hover{ transform:translateY(-2px); text-decoration:none; }
.btn.primary{ color:#0c1a12; background:linear-gradient(180deg,var(--gold-hi),var(--gold)); box-shadow:0 10px 26px rgba(217,180,91,0.22); }
.btn.ghost{ color:var(--ivory); border:1px solid var(--line-2); background:rgba(217,180,91,0.05); }
.btn.sm{ min-height:44px; padding:8px 16px; font-size:14.5px; }
.btn.block{ display:flex; width:100%; }
.btn[disabled]{ opacity:.55; cursor:default; transform:none; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, summary:focus-visible{ outline:2px solid var(--gold-hi); outline-offset:2px; }

/* thanh trên cùng (dính khi cuộn) */
header.top{ position:sticky; top:0; z-index:20; background:rgba(10,14,11,0.86); backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px); border-bottom:1px solid var(--line); }
header.top .wrap{ display:flex; align-items:center; justify-content:space-between; gap:8px 16px; min-height:60px; }
.brand{ display:flex; align-items:center; gap:10px; color:var(--ivory); font-family:'Playfair Display',serif; font-weight:900; font-size:19px; white-space:nowrap; text-decoration:none; }
.brand:hover{ text-decoration:none; }
.brand img{ width:34px; height:34px; }
.brand b{ color:var(--gold-hi); }
header.top nav{ display:flex; align-items:center; gap:2px; }
header.top .links{ display:flex; align-items:center; gap:2px; }
header.top nav a{ color:var(--text); font-size:14.5px; padding:8px 12px; border-radius:8px; white-space:nowrap; text-decoration:none; }
header.top nav a:hover, header.top nav a[aria-current]{ color:var(--gold-hi); }
header.top nav a.btn{ min-height:40px; padding:8px 18px; font-size:14.5px; margin-left:6px; color:#0c1a12; }
header.top nav a.btn:hover{ color:#0c1a12; }
@media (max-width:760px){
  header.top .wrap{ flex-wrap:wrap; padding-top:8px; padding-bottom:4px; min-height:0; }
  header.top nav{ display:contents; }
  .brand{ order:1; }
  header.top nav a.btn{ order:2; margin-left:auto; }
  header.top .links{ order:3; flex:0 0 100%; min-width:0; overflow-x:auto; scrollbar-width:none; -webkit-overflow-scrolling:touch; margin:0 -8px; padding-bottom:4px; }
  header.top .links::-webkit-scrollbar{ display:none; }
  header.top .links a{ padding:8px 10px; }
  header.top .links a.hm{ display:none; }
}

/* thanh người dùng (đăng nhập / đăng xuất) dưới header, dùng cho /pro /gift /sales */
.whobar{ display:flex; justify-content:flex-end; padding-top:10px; }
.who{ display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:6px 12px; font-size:14px; color:var(--muted); min-width:0; }
.who .em{ color:var(--ivory); font-weight:600; overflow-wrap:anywhere; }
.who:empty{ display:none; }
.whobar:has(.who:empty){ display:none; }

/* chân trang */
footer{ border-top:1px solid var(--line); padding:30px 0 40px; margin-top:clamp(28px,4vw,56px); color:var(--muted); font-size:14px; }
footer .wrap{ display:flex; flex-wrap:wrap; gap:10px 24px; justify-content:space-between; align-items:center; }
footer .fbrand{ display:flex; align-items:center; gap:10px; color:var(--ivory); font-weight:600; }
footer .fbrand img{ width:26px; height:26px; }
footer nav{ display:flex; flex-wrap:wrap; gap:0 6px; }
footer nav a{ display:inline-flex; align-items:center; min-height:44px; padding:0 10px; color:var(--text); font-size:15px; text-decoration:none; }
footer nav a:hover{ color:var(--gold-hi); }
footer .legal{ flex-basis:100%; font-size:12.5px; color:var(--muted); margin:6px 0 0; }
@media (max-width:480px){ footer .wrap{ flex-direction:column; align-items:flex-start; } footer nav{ margin-left:-10px; } }

/* khung trang */
.page{ padding-top:clamp(28px,4vw,64px); }
.page > h1, .page > .meta, .page > .intro{ max-width:80ch; }
.intro{ font-size:clamp(16px,1.25vw,18px); color:var(--text); max-width:75ch; }
.foot{ margin-top:22px; }
.foot a{ display:inline-block; padding:10px 6px; }

/* thẻ, khung */
.card, .panel{ background:linear-gradient(180deg,var(--bg-3),var(--bg-2)); border:1px solid var(--line); border-radius:14px; padding:clamp(18px,1.8vw,28px); min-width:0; }
.card h2, .panel h2{ font-size:clamp(20px,1.6vw,25px); margin-bottom:10px; }
.card h3{ margin:4px 0 8px; }
.badge{ display:inline-block; font-size:12px; font-weight:700; letter-spacing:.5px; text-transform:uppercase; padding:4px 10px; border-radius:999px; color:var(--gold-hi); background:rgba(217,180,91,0.12); border:1px solid var(--line-2); }
.msg{ border-radius:12px; padding:14px 16px; border:1px solid var(--line-2); background:rgba(217,180,91,0.07); color:var(--ivory); margin:0 0 14px; overflow-wrap:anywhere; }
.msg.ok{ border-color:rgba(111,220,166,0.5); background:rgba(111,220,166,0.09); }
.msg.bad{ border-color:rgba(255,154,138,0.5); background:rgba(255,154,138,0.08); }
.warn{ background:rgba(255,154,138,0.08); border:1px solid rgba(255,154,138,0.3); color:#ffd1c9; border-radius:12px; padding:12px 14px; font-size:15px; margin:12px 0; }
.toast{ position:fixed; left:50%; bottom:22px; transform:translateX(-50%); background:#1d2b23; color:var(--ivory); border:1px solid var(--line-2); padding:12px 18px; border-radius:12px; font-size:14.5px; z-index:50; max-width:calc(100% - 32px); box-shadow:0 12px 30px rgba(0,0,0,.5); }
.spin{ display:inline-block; width:18px; height:18px; border:2px solid var(--line-2); border-top-color:var(--gold-hi); border-radius:50%; animation:sp 1s linear infinite; vertical-align:-3px; }
@keyframes sp{ to{ transform:rotate(360deg); } }

/* văn bản dài (điều khoản, chính sách, xoá tài khoản) */
.doc{ display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,440px),1fr)); gap:clamp(14px,1.5vw,24px); align-items:start; margin-top:clamp(18px,2vw,28px); }
.doc section{ background:linear-gradient(180deg,var(--bg-3),var(--bg-2)); border:1px solid var(--line); border-radius:14px; padding:6px clamp(16px,1.8vw,26px) 14px; min-width:0; }
.doc section.full{ grid-column:1 / -1; }
.doc h2{ margin:16px 0 12px; padding-bottom:10px; border-bottom:1px solid var(--line); font-size:clamp(20px,1.7vw,24px); }
.prose{ max-width:75ch; }
.doc ul, .doc ol, .prose ul, .prose ol{ margin:0 0 .9em; padding:0; list-style:none; }
.doc li, .prose li{ position:relative; padding:5px 0 5px 22px; line-height:1.6; }
.doc ul > li::before, .prose ul > li::before{ content:''; position:absolute; left:2px; top:15px; width:7px; height:7px; background:var(--gold); transform:rotate(45deg); }
.doc ol, .prose ol{ counter-reset:n; }
.doc ol > li, .prose ol > li{ counter-increment:n; padding-left:34px; }
.doc ol > li::before, .prose ol > li::before{ content:counter(n); position:absolute; left:0; top:6px; width:24px; height:24px; border-radius:50%; background:var(--felt); color:#fff; font-size:13px; font-weight:700; display:grid; place-items:center; }

/* bảng */
table{ border-collapse:collapse; width:100%; font-size:14.5px; }
th, td{ text-align:left; padding:10px 12px; border-bottom:1px solid var(--line); vertical-align:top; }
th{ color:var(--gold); font-weight:700; font-size:12.5px; letter-spacing:.8px; text-transform:uppercase; }
td.num, th.num{ text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.tbl, .wrap-table{ overflow-x:auto; -webkit-overflow-scrolling:touch; margin:6px 0 12px; }
.wrap-table table{ min-width:560px; }

/* biểu mẫu */
label{ color:var(--muted); font-size:13.5px; }
input, select, textarea{ font:inherit; font-size:16px; color:var(--ivory); background:#0b120e; border:1px solid var(--line-2); border-radius:10px; padding:10px 12px; min-height:44px; width:100%; min-width:0; }
input::placeholder, textarea::placeholder{ color:#6c776e; }
input[type=checkbox], input[type=radio]{ width:22px; height:22px; min-height:0; accent-color:var(--gold); }
textarea{ min-height:120px; resize:vertical; line-height:1.5; }

/* chuyển khoản VietQR */
.kv{ display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:4px 12px; align-items:center; margin:0; }
.kv dt{ color:var(--muted); font-size:14px; }
.kv dd{ margin:0; color:var(--ivory); font-weight:600; overflow-wrap:anywhere; }
.kv dd.big{ font-size:20px; color:var(--gold-hi); }
.kv .cp{ min-height:44px; padding:6px 12px; font-size:13.5px; }
.timer{ font-variant-numeric:tabular-nums; color:var(--gold-hi); font-weight:700; }
.status-line{ display:flex; align-items:center; gap:10px; margin-top:14px; color:var(--text); font-size:15px; }
.pay{ display:grid; grid-template-columns:minmax(0,220px) minmax(0,1fr); gap:16px 22px; align-items:center; }
.pay-side .status-line{ margin-top:16px; }
.kv3{ grid-column:1 / -1; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
@media (max-width:480px){ .kv3{ grid-template-columns:1fr; } }
.kc{ border:1px solid var(--line); border-radius:12px; padding:10px 14px 14px; background:rgba(217,180,91,0.04); display:flex; flex-direction:column; gap:4px; min-width:0; }
.kc .kh{ display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:36px; }
.kc .kl{ color:var(--muted); font-size:13.5px; }
.kc b{ color:var(--ivory); font-weight:600; font-size:17px; overflow-wrap:anywhere; min-width:0; }
.kc b + .kl{ margin-top:8px; }
.kc b.big{ font-size:20px; color:var(--gold-hi); }
.kc b.code{ font-size:16px; letter-spacing:.2px; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; }
.kc .cp{ flex:none; min-height:36px; padding:4px 12px; font-size:13px; }
.qrimg{ background:#fff; border-radius:12px; padding:8px; width:100%; max-width:260px; }
.qrimg img{ display:block; width:100%; height:auto; }
@media (max-width:560px){
  body{ font-size:16px; }
  .pay{ grid-template-columns:1fr; }
  .qrimg{ margin:0 auto; }
  .kv{ grid-template-columns:minmax(0,1fr) auto; }
  .kv dt{ grid-column:1 / -1; margin-top:6px; }
  .cta .btn{ width:100%; }
}
@media (prefers-reduced-motion:reduce){ .btn:hover{ transform:none; } }

/* Hướng dẫn: nút nổi bật trên thanh trên cùng */
header.top nav a[href="/guide/"]{ color:var(--gold-hi); border:1px solid var(--line-2); border-radius:999px; padding:6px 14px; background:rgba(217,180,91,0.08); }
header.top nav a[href="/guide/"]::before{ content:"▶"; font-size:10px; margin-right:5px; }
header.top nav a[href="/guide/"]:hover{ border-color:var(--gold); background:rgba(217,180,91,0.16); }

/* Điện thoại (user 25/11): không để 1 từ rớt dòng cuối; link chân trang không gãy; bảng xếp dọc */
p, li, summary, td, th, .lede{ text-wrap:pretty; }
footer a, .foot a{ white-space:nowrap; }
@media (max-width:480px){
  .tbl table, .tbl tbody, .tbl tr, .tbl td{ display:block; width:100%; }
  .tbl thead{ display:none; }
  .tbl tr{ padding:10px 0; border-bottom:1px solid var(--line); }
  .tbl td{ border:0; padding:2px 4px; }
  .tbl td:first-child{ color:var(--ivory); font-weight:600; }
  .tbl td:not(:first-child){ display:inline; }
  .tbl td:nth-child(3)::before{ content:"· "; color:var(--muted); }
}
