/* TVN 3D Viewer — Hướng dẫn sử dụng (dùng chung: HUONG_DAN.html trong plugin · thichvenha.com/huongdan/3dviewer) */
:root {
  --bg: #f4f6f9; --card: #fff; --text: #1b2430; --muted: #5d6b7c; --line: #e1e6ec; --accent: #0284c7; --accent-soft: #e0f2fe;
  --num: #ff8c00; --ok: #16a34a; --warn: #b45309; --warn-soft: #fff7e6; --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1218; --card: #161d26; --text: #e6ebf1; --muted: #9aa7b6; --line: #273240; --accent: #38bdf8; --accent-soft: #0c2a3d;
    --warn: #fbbf24; --warn-soft: #2a2110; --shadow: 0 1px 2px rgba(0, 0, 0, .3); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1218; --card: #161d26; --text: #e6ebf1; --muted: #9aa7b6; --line: #273240; --accent: #38bdf8; --accent-soft: #0c2a3d;
  --warn: #fbbf24; --warn-soft: #2a2110; --shadow: 0 1px 2px rgba(0, 0, 0, .3); color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 "Segoe UI", system-ui, -apple-system, sans-serif; }
a { color: var(--accent); }
img { max-width: 100%; }
main { max-width: 1040px; margin: 0 auto; padding: 28px 16px 80px; }

/* ---------- đầu trang ---------- */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: center; margin-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand img { width: 52px; height: 52px; background: #e8ebef; border-radius: 12px; padding: 6px; }
h1 { font-size: 34px; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
.ver { font-size: 13px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; vertical-align: 6px; margin-left: 8px; white-space: nowrap; }
.lead { font-size: 18px; color: var(--muted); margin: 14px 0 0; }
.flow { display: flex; align-items: center; justify-content: center; gap: 10px; }
.flow .arrow { font-size: 28px; color: var(--muted); }
.flow .dlg { width: 46%; }
.flow .phone { width: 38%; }

/* ---------- mục lục ---------- */
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 6px; padding: 0; list-style: none; }
.toc a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 14px 6px 8px; font-size: 14.5px; box-shadow: var(--shadow); }
.toc a:hover { border-color: var(--accent); }
.toc b { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; align-items: center; justify-content: center; }

/* ---------- mục ---------- */
section { scroll-margin-top: 16px; }
h2 { font-size: 25px; margin: 56px 0 6px; display: flex; align-items: center; gap: 12px; }
h2 .n { display: inline-flex; flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 17px; align-items: center; justify-content: center; }
h3 { font-size: 18px; margin: 28px 0 8px; }
.sub { color: var(--muted); margin: 0 0 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; margin: 14px 0; box-shadow: var(--shadow); }
.card.tip { border-left: 4px solid var(--accent); }
.card.warn { border-left: 4px solid var(--warn); background: var(--warn-soft); }
.card > :first-child { margin-top: 0; } .card > :last-child { margin-bottom: 0; }
ol, ul { padding-left: 22px; } li { margin: 5px 0; }
kbd { background: var(--bg); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 0 6px; font: 13.5px Consolas, monospace; }
code { font: 14px Consolas, monospace; background: var(--bg); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; }
table { width: 100%; border-collapse: collapse; }
td, th { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 14px; }
tr:last-child td { border-bottom: 0; }

/* ---------- ảnh ---------- */
figure { margin: 16px 0; }
figcaption { color: var(--muted); font-size: 14px; margin-top: 8px; }
.shot { display: block; border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); background: #03081f; }
.dlg { max-width: 330px; width: 100%; }                 /* hộp thoại SketchUp 380 px */
.phone { max-width: 270px; width: 100%; border-radius: 30px; border: 8px solid #11161c; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.wide { width: 100%; }
figure svg { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: 12px; }
.steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; align-items: start; margin: 16px 0; padding: 0; list-style: none; counter-reset: s; }
.steps > li { margin: 0; counter-increment: s; }
.steps > li > p { margin: 8px 0 0; font-size: 15px; }
.steps > li > p::before { content: counter(s); display: inline-flex; width: 22px; height: 22px; border-radius: 50%; background: var(--num); color: #fff; font-size: 12px; font-weight: 700;
  align-items: center; justify-content: center; margin-right: 8px; vertical-align: 1px; }
.steps .shot { width: 100%; }
.pair { display: grid; grid-template-columns: minmax(0, 330px) 1fr; gap: 26px; align-items: start; }
.pair.r { grid-template-columns: 1fr minmax(0, 330px); }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; justify-items: center; }
.trio figure { margin: 0; text-align: center; } .trio figcaption { text-align: left; }
@media (max-width: 760px) {
  .hero, .pair, .pair.r { grid-template-columns: 1fr; }
  .trio { grid-template-columns: 1fr; }
  h1 { font-size: 28px; }
}

/* ---------- chú thích số trên hình ---------- */
.legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 6px 18px; margin: 10px 0 0; padding: 0; list-style: none; font-size: 15px; }
.legend li { margin: 2px 0; }
b.n { display: inline-flex; width: 20px; height: 20px; border-radius: 50%; background: var(--num); color: #fff; font-size: 12px; align-items: center; justify-content: center; margin-right: 6px; vertical-align: 1px; }

/* ---------- nút thanh đáy SketchUp — đúng màu UIKit (ui_kit.rb) ---------- */
.chip { display: inline-block; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; line-height: 22px; color: #fff; white-space: nowrap; vertical-align: 1px; }
.chip.on { background: rgb(3, 105, 161); }
.chip.off { background: rgba(16, 52, 73, .745); box-shadow: inset 0 0 0 1px rgba(0, 150, 220, .588); color: rgb(232, 236, 241); }
.chip.locked { background: rgba(18, 37, 50, .745); box-shadow: inset 0 0 0 1px rgba(0, 150, 220, .216); color: rgb(176, 182, 190); }
.rbtn { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 700; vertical-align: -5px; }
.rbtn.ok { background: rgb(22, 163, 74); } .rbtn.gear { background: rgb(71, 85, 105); }
.dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .18); vertical-align: -2px; }
.hudrow td.fig { width: 330px; } .hudrow svg { width: 300px; border: 0; border-radius: 8px; }
.bdg svg { width: 34px; height: 34px; border: 0; display: block; }
/* nút trong hộp thoại (nền tối) */
.ib { display: inline-flex; width: 30px; height: 30px; border-radius: 8px; align-items: center; justify-content: center; background: #0f1a2c; border: 1px solid #2a3a52; color: #e6ebf1; vertical-align: -9px; }
.ib svg { width: 17px; height: 17px; }
.ib.pri { background: #0a3550; border-color: #1f7fa8; }
.ib.del { background: #3b1220; border-color: #9f1239; color: #fb7185; }

/* ---------- bảng gói ---------- */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.plan h3 { margin: 0 0 6px; display: flex; align-items: center; gap: 10px; }
.plan .price { font-size: 26px; font-weight: 800; }
.plan ul { list-style: none; padding: 0; } .plan li::before { content: "✓"; color: var(--ok); font-weight: 700; margin-right: 8px; }
.plan.paid { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow); }
@media (max-width: 640px) { .plans { grid-template-columns: 1fr; } }
.qa dt { font-weight: 700; margin-top: 14px; } .qa dd { margin: 4px 0 0; color: var(--text); }
footer { color: var(--muted); font-size: 13.5px; margin-top: 60px; border-top: 1px solid var(--line); padding-top: 14px; }

/* ---------- tiện ích (thay style nội tuyến — CSP của web chỉ cho CSS từ file) ---------- */
.topnav { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; margin: -8px 0 18px; }
.topnav a { color: var(--muted); text-decoration: none; } .topnav a:hover { color: var(--accent); }
.sub.mt { margin-top: 10px; } .sub.note { margin: 8px 0 0; } h3.mt0 { margin-top: 0; }
.w44 { width: 44px; } .w52 { width: 52px; } .w150 { width: 150px; }
img.inl { width: 22px; height: 22px; vertical-align: -5px; background: #e8ebef; border-radius: 5px; padding: 2px; }
.chip.trial { background: #3a2a0c; color: #fbbf24; } .chip.paidc { background: #0d3b26; color: #4ade80; }
.once { font-size: 15px; font-weight: 600; color: var(--muted); }
.chip.pick { background: rgba(31, 38, 49, .9); box-shadow: inset 0 0 0 1px rgba(148, 163, 184, .59); color: rgb(232, 236, 241); }
