/* =====================================================================
 * bienac — "Tàng thư số"
 * Kho lưu trữ tương lai: mực đen, giấy cũ, ấn son phương Đông,
 * đồng thau của dụng cụ thiên văn phương Tây, ánh lân quang màn hình.
 * File này nạp SAU style.css và chỉ ghi đè phần nhìn.
 * ===================================================================== */
:root {
  --ink: #06070b;
  --text: #ece6d6;          /* trắng ngà như giấy dó */
  --text-dim: #9d9786;
  --cyan: #37f0cf;          /* lân quang */
  --mint: #b3ffec;
  --violet: #37f0cf;        /* bỏ tím, thống nhất một màu lân quang */
  --cinnabar: #e8452e;      /* son ấn triện */
  --brass: #c9a650;         /* đồng thau */
  --hair: rgba(201, 166, 80, 0.28);
  --glass: rgba(10, 12, 16, 0.62);
  --glass-border: rgba(201, 166, 80, 0.22);
  --radius: 2px;
  --display: 'Chakra Petch', 'Be Vietnam Pro', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --han: 'Noto Serif TC', 'Noto Serif SC', serif;
}

body { color: var(--text); }

/* Vạch quét màn hình rất mờ phủ toàn trang */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}

::selection { background: var(--cinnabar); color: #fff; }

/* ------------------------------------------------------ Chữ ----- */
.hero-title, .section-title, .post-title, .brand-name, .post-item h2, .post-body h2 {
  font-family: var(--display);
  letter-spacing: 0.01em;
}
.accent {
  background: none;
  -webkit-text-fill-color: currentColor;
  color: var(--cyan);
  text-shadow: 0 0 18px rgba(55, 240, 207, 0.45);
}
.section-title { font-weight: 700; text-transform: none; }

/* Nhãn kiểu hồ sơ lưu trữ:  卷一 // VIDEO */
.sec-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font: 500 0.78rem/1 var(--mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
}
.sec-label .han {
  font-family: var(--han);
  font-size: 1rem;
  letter-spacing: 0.1em;
  color: var(--cinnabar);
}
.sec-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--hair), transparent);
}

/* ----------------------------------------------------- Header --- */
.site-header.scrolled,
.blog .site-header {
  background: rgba(6, 7, 11, 0.82);
  box-shadow: 0 1px 0 var(--hair);
}
.brand-name {
  background: none;
  -webkit-text-fill-color: currentColor;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 1.15rem;
}
.brand-logo img { filter: drop-shadow(0 0 6px rgba(55, 240, 207, 0.5)); }
.site-nav a {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.site-nav a:hover, .site-nav .nav-active { color: var(--cyan); }
.site-nav .nav-cta,
.btn {
  border-radius: 0;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.site-nav .nav-cta {
  background: var(--cyan);
  color: var(--ink);
  box-shadow: none;
}

/* ---------------------------------------------------- Nút ------- */
.btn {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.btn-primary {
  background: var(--cyan);
  color: var(--ink);
  box-shadow: none;
}
.btn-primary:hover { background: var(--mint); box-shadow: none; transform: translateY(-2px); }
.btn-ghost {
  background: rgba(201, 166, 80, 0.08);
  border: 0;
  box-shadow: inset 0 0 0 1px var(--glass-border);
}
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--brass); }

/* ---------------------------------------------------- Hero ------ */
.hero { overflow: hidden; }
.hero-frame {
  position: absolute;
  inset: 96px clamp(16px, 4vw, 48px) 56px;
  pointer-events: none;
  /* bốn góc ngắm kiểu kính thiên văn */
  background:
    linear-gradient(var(--brass), var(--brass)) top left / 22px 1px,
    linear-gradient(var(--brass), var(--brass)) top left / 1px 22px,
    linear-gradient(var(--brass), var(--brass)) top right / 22px 1px,
    linear-gradient(var(--brass), var(--brass)) top right / 1px 22px,
    linear-gradient(var(--brass), var(--brass)) bottom left / 22px 1px,
    linear-gradient(var(--brass), var(--brass)) bottom left / 1px 22px,
    linear-gradient(var(--brass), var(--brass)) bottom right / 22px 1px,
    linear-gradient(var(--brass), var(--brass)) bottom right / 1px 22px;
  background-repeat: no-repeat;
  opacity: 0.7;
}
.hero-readout {
  position: absolute;
  font: 500 0.7rem/1.6 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.hero-readout.tl { top: 112px; left: clamp(32px, 5vw, 72px); text-align: left; }
.hero-readout.br { bottom: 72px; right: clamp(32px, 5vw, 72px); text-align: right; }
.hero-readout b { color: var(--cyan); font-weight: 500; }

/* Cột chữ Hán dọc như cuộn thư, có vệt quét lân quang chạy qua */
.hero-scroll {
  position: absolute;
  right: clamp(40px, 8vw, 120px);
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-family: var(--han);
  font-size: clamp(1.1rem, 1.6vw, 1.45rem);
  letter-spacing: 0.5em;
  color: rgba(236, 230, 214, 0.22);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 15%, #000 85%, transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 15%, #000 85%, transparent);
}
.hero-scroll::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: var(--cyan);
  text-shadow: 0 0 12px var(--cyan);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 6%, transparent 12%);
          mask-image: linear-gradient(to bottom, transparent 0%, #000 6%, transparent 12%);
  -webkit-mask-size: 100% 300%;
          mask-size: 100% 300%;
  animation: scroll-scan 7s linear infinite;
}
@keyframes scroll-scan {
  from { -webkit-mask-position: 0 100%; mask-position: 0 100%; }
  to   { -webkit-mask-position: 0 0%;   mask-position: 0 0%; }
}

.hero-title {
  font-weight: 700;
  font-size: clamp(3.4rem, 12vw, 8rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 0 30px rgba(55, 240, 207, 0.25);
  position: relative;
}
/* Ấn triện son đóng cạnh tên kênh: hai chữ 边幄 xếp dọc */
.seal {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.04em;
  margin-left: 0.14em;
  padding: 0.12em 0.1em;
  vertical-align: top;
  font-family: var(--han);
  font-weight: 600;
  font-size: 0.24em;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  color: #f4ece0;
  -webkit-text-fill-color: #f4ece0;
  background: var(--cinnabar);
  box-shadow: 0 0 0 0.05em var(--ink), 0 0 0 0.1em var(--cinnabar);
  transform: rotate(-5deg) translateY(0.15em);
  text-shadow: none;
}
.hero-tagline { font-family: var(--display); font-weight: 400; letter-spacing: 0.04em; }
.hero-sub { font-family: var(--mono); color: var(--brass); letter-spacing: 0.3em; }
.hero-logo img { filter: drop-shadow(0 0 18px rgba(55, 240, 207, 0.55)); }

.scroll-hint { border-color: var(--hair); border-radius: 0; }

/* ---------------------------------------- Khung kiểu hồ sơ ------ */
.video-card,
.about-card,
.request-card,
.post-item,
.post-cta,
.fx-options,
.phys-menu {
  border-radius: var(--radius);
  border-color: var(--glass-border);
  position: relative;
}
.video-card::after,
.about-card::after,
.request-card::after,
.post-item::after,
.post-cta::after {
  content: '';
  position: absolute;
  inset: -1px;
  pointer-events: none;
  background:
    linear-gradient(var(--cyan), var(--cyan)) top left / 12px 1px,
    linear-gradient(var(--cyan), var(--cyan)) top left / 1px 12px,
    linear-gradient(var(--cyan), var(--cyan)) bottom right / 12px 1px,
    linear-gradient(var(--cyan), var(--cyan)) bottom right / 1px 12px;
  background-repeat: no-repeat;
  opacity: 0.55;
  transition: opacity 0.25s ease;
}
.video-card:hover::after, .post-item:hover::after { opacity: 1; }
.video-card:hover {
  border-color: rgba(55, 240, 207, 0.45);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
}
.video-thumb img { filter: saturate(0.85) contrast(1.05); }
.video-card:hover .video-thumb img { filter: none; }
.video-tag {
  font-family: var(--mono);
  border-radius: 0;
  color: var(--brass);
  background: transparent;
  border-color: var(--hair);
}
.video-meta h3 { font-family: var(--display); font-weight: 600; font-size: 1.12rem; }

/* Số thứ tự hồ sơ trên mỗi video:  No.01 */
.video-grid { counter-reset: vid; }
.video-card { counter-increment: vid; }
.video-thumb::before {
  content: 'No.' counter(vid, decimal-leading-zero);
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  font: 600 0.68rem/1 var(--mono);
  letter-spacing: 0.12em;
  color: var(--ink);
  background: var(--cyan);
  padding: 5px 7px;
}

/* -------------------------------------------------- Về Bienac --- */
.about-text p:first-of-type {
  font-family: var(--display);
  color: var(--text);
  border-left: 2px solid var(--cinnabar);
  padding-left: 18px;
}
.about-text strong { color: var(--cinnabar); font-weight: 600; }
.about-logo img { filter: drop-shadow(0 0 16px rgba(55, 240, 207, 0.45)); }

/* --------------------------------------------- Nút nổi, chân trang */
.fx-toggle, .phys-bubble { border-color: var(--glass-border); }
.fx-toggle { border-radius: 0; clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); color: var(--cyan); }
.fx-options button, .phys-menu button { border-radius: 0; font-family: var(--mono); font-size: 0.82rem; }
.fx-label, .phys-label { font-family: var(--mono); color: var(--brass); }
.site-footer {
  font: 500 0.75rem/1.6 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-top: 1px solid var(--hair);
  max-width: 1120px;
  margin: 0 auto;
}

/* ------------------------------------------------- Bài viết ------ */
.post-meta { font-family: var(--mono); color: var(--brass); }
.post-body h2 { border-left: 2px solid var(--cinnabar); padding-left: 14px; }
.post-body blockquote { border-left-color: var(--brass); }
.post-player { border-radius: var(--radius); }
.post-item-thumb { border-radius: 0; }

/* ------------------------------------------------- Điện thoại ---- */
@media (max-width: 720px) {
  .hero-scroll, .hero-readout { display: none; }
  .hero-frame { inset: 80px 12px 40px; }
  .site-nav a { border-radius: 0; }
  .site-nav { border-radius: var(--radius); background: rgba(6, 7, 11, 0.95); }
  .hero-sub { letter-spacing: 0.14em; font-size: 0.78rem; }
  .nav-toggle { border-radius: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-scroll::after { animation: none; display: none; }
}

/* =====================================================================
 * Lưới ô ứng dụng ở đầu trang chủ (thay cho dòng menu)
 * ===================================================================== */
.hero { min-height: auto; padding-top: 110px; padding-bottom: 72px; }
.hero-logo img { width: clamp(64px, 8vw, 96px); }
.hero-title { margin-top: 10px; }

.app-grid {
  margin-top: 40px;
  width: min(100%, 880px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  position: relative;
  z-index: 1;
}
.app {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  justify-items: start;
  gap: 4px;
  min-height: 132px;
  padding: 12px 14px 14px;
  text-align: left;
  text-decoration: none;
  color: var(--text);
  background: rgba(8, 10, 14, 0.66);
  box-shadow: inset 0 0 0 1px var(--glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.app::before {                      /* góc vát sáng */
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 20px;
  height: 20px;
  background: linear-gradient(225deg, var(--brass) 0 1px, transparent 1px);
  opacity: 0.8;
}
.app-no { font: 500 0.66rem/1 var(--mono); letter-spacing: 0.14em; color: var(--brass); }
.app-han {
  align-self: center;
  font-family: var(--han);
  font-weight: 600;
  font-size: 2.2rem;
  line-height: 1;
  color: var(--text);
  transition: color 0.2s ease, text-shadow 0.2s ease;
}
.app-name { font: 600 1rem/1.2 var(--display); letter-spacing: 0.02em; }
.app-desc { font-size: 0.76rem; line-height: 1.35; color: var(--text-dim); }

.app:hover, .app:focus-visible {
  background: rgba(55, 240, 207, 0.08);
  box-shadow: inset 0 0 0 1px rgba(55, 240, 207, 0.6);
  transform: translateY(-2px);
}
.app:hover .app-han, .app:focus-visible .app-han {
  color: var(--cyan);
  text-shadow: 0 0 16px rgba(55, 240, 207, 0.6);
}
/* Ô đang làm: mờ, có nhãn son */
.app.soon { cursor: default; }
.app.soon .app-han, .app.soon .app-name { opacity: 0.45; }
.app.soon .app-desc {
  justify-self: start;
  font: 500 0.62rem/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cinnabar);
  border: 1px solid rgba(232, 69, 46, 0.5);
  padding: 3px 5px;
}
.app.soon:hover { transform: none; background: rgba(8, 10, 14, 0.66); box-shadow: inset 0 0 0 1px var(--glass-border); }
.app.soon:hover .app-han { color: var(--text); text-shadow: none; }

/* Trang chủ: chỉ còn nút đăng ký trên thanh đầu, không cần nút menu */
.site-nav { gap: 0; }

@media (max-width: 860px) {
  .app-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .hero { padding-top: 92px; padding-bottom: 48px; }
  /* trên điện thoại thanh đầu không dùng menu xổ xuống nữa */
  .site-nav, .site-nav.open {
    position: static;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    flex-direction: row;
  }
  .site-nav .nav-cta { margin-top: 0; padding: 8px 12px; font-size: 0.72rem; }
  .app-grid { gap: 8px; margin-top: 28px; }
  .app { min-height: 104px; padding: 10px; }
  .app-han { font-size: 1.8rem; }
  .app-name { font-size: 0.86rem; }
  .app-desc { display: none; }
  .app.soon .app-desc { display: inline-block; font-size: 0.55rem; }
}
@media (max-width: 360px) {
  .app-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Thanh mỏng ở trang con: tên mục + nút ⊞ về lưới ứng dụng ---- */
.site-nav .nav-here{font-family:var(--mono);font-size:.72rem;letter-spacing:.18em;text-transform:uppercase;color:var(--brass)}
.site-nav .nav-apps{display:inline-grid;place-items:center;width:38px;height:38px;font-size:1.3rem;line-height:1;color:var(--cyan);border:1px solid var(--glass-border);background:var(--glass);text-decoration:none;transition:border-color .2s,color .2s}
.site-nav .nav-apps:hover,.site-nav .nav-apps:focus-visible{border-color:var(--cyan);color:var(--mint)}
.site-nav:has(.nav-apps){display:flex;align-items:center;gap:12px}
@media(max-width:720px){
  .site-nav:has(.nav-apps){position:static;flex-direction:row;background:none;padding:0;transform:none;opacity:1;visibility:visible;box-shadow:none;border:0}
  .site-nav .nav-here{display:none}
}

/* =====================================================================
 * Bo tròn toàn bộ, bỏ chữ Hán trang trí và con dấu (theo yêu cầu 24/10)
 * ===================================================================== */
:root { --radius: 16px; }
.hero-scroll, .seal, .hero-frame, .sec-label .han, .ud-kicker .han, .video-thumb::before,
.video-card::after, .about-card::after, .request-card::after, .post-item::after, .post-cta::after,
.app::before { display: none !important; }
.sec-label::after { display: none; }

.btn, .nav-cta, .ud-btn, .fx-toggle, .app, .app.soon .app-desc, .mt-chip { clip-path: none !important; }
.btn, .nav-cta, .ud-btn { border-radius: 999px !important; }
.fx-toggle, .nav-apps, .site-nav .nav-apps, .home-apps { border-radius: 12px !important; }
.app, .ud-panel, .video-card, .about-card, .request-card, .post-item, .post-cta, .post-chapters, .post-fix,
.post-player, .post-empty, .tool-item textarea, .ct-cand, .ct-search input, .ct-used button, .ct-word,
.bt-tu button, .bt-tt button, .mt-chip, .dt-band, .dt-ev span, .dt-cursor b, .tvt-east, .fx-options, .fx-options button,
.phys-menu button, .video-thumb, .post-item-thumb, .t-glyph { border-radius: 14px !important; }
.ct-used button, .bt-tu button, .dt-band, .dt-ev span, .dt-cursor b, .mt-chip, .ct-word, .app.soon .app-desc { border-radius: 8px !important; }
.video-thumb { overflow: hidden; }
.ct-tree-wrap::before { display: none; }

/* Ô ứng dụng: biểu tượng nét mảnh thay cho chữ Hán */
.app { border-radius: 18px !important; }
.app-ico { align-self: center; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--cyan); background: rgba(55, 240, 207, .08); }
.app-ico svg { width: 24px; height: 24px; }
.app:hover .app-ico, .app:focus-visible .app-ico { background: rgba(55, 240, 207, .18); }
.app.soon .app-ico { opacity: .45; }
@media (max-width: 720px) { .app-ico { width: 34px; height: 34px; } .app-ico svg { width: 20px; height: 20px; } }

/* =====================================================================
 * Trang chủ (24/10 chiều): không thanh đầu trang, logo lớn bằng mã nhị phân,
 * nút đăng ký ở giữa, ô kính mờ căn giữa
 * ===================================================================== */
#bin-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
body.home { background: var(--ink); }
body.home main, body.home .site-footer { position: relative; z-index: 1; }
body.home .vignette { z-index: 0; }
body.home .hero { padding-top: clamp(40px, 7vh, 80px); }
body.home .hero-readout.tl { top: 28px; }
body.home .hero-logo { width: min(64vw, 340px); aspect-ratio: 1; margin: 0 auto; position: relative; }
body.home .hero-logo img { width: 100% !important; height: 100%; opacity: .16; filter: blur(10px) !important; animation: none; }
body.home .hero-title { margin-top: 4px; }
.hero-cta { margin-top: 26px; display: inline-flex; align-items: center; gap: 10px; padding: 14px 28px; font-size: .95rem; }

/* ô tìm kiếm */
.search { position: relative; z-index: 3; margin-top: 22px; width: min(100%, 520px); }
.search input { width: 100%; padding: 13px 18px 13px 46px; font: 500 .95rem 'Be Vietnam Pro', sans-serif; color: var(--text); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; outline: none; backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); }
.search input:focus { border-color: var(--cyan); }
.search-ico { z-index: 2; position: absolute; left: 17px; top: 50%; transform: translateY(-50%); color: var(--text-dim); pointer-events: none; }
.search-res { position: absolute; left: 0; right: 0; top: calc(100% + 8px); max-height: 60vh; overflow-y: auto; padding: 6px; text-align: left; background: rgba(12, 16, 20, .9); border: 1px solid rgba(255, 255, 255, .12); border-radius: 18px; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.search-res a { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; padding: 8px; border-radius: 12px; color: var(--text); text-decoration: none; }
.search-res a:hover, .search-res a.on { background: rgba(55, 240, 207, .1); }
.search-res .k { display: block; font: 500 .62rem var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.search-res .t { display: block; font-size: .92rem; line-height: 1.35; }
.search-res img, .search-res .ic { width: 64px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; display: grid; place-items: center; background: rgba(55, 240, 207, .08); color: var(--cyan); font-size: 1.3rem; }
.search-res p { padding: 12px; color: var(--text-dim); font-size: .9rem; }

/* ô ứng dụng: kính mờ, căn giữa, không số thứ tự */
.app-grid { gap: 12px; margin-top: 34px; }
.app { justify-items: center !important; align-content: center; text-align: center !important; grid-template-rows: auto auto auto !important; gap: 8px !important; padding: 18px 12px !important; min-height: 140px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .02)) !important;
  border: 1px solid rgba(255, 255, 255, .12); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 10px 30px rgba(0, 0, 0, .25) !important;
  backdrop-filter: blur(18px) saturate(150%) !important; -webkit-backdrop-filter: blur(18px) saturate(150%) !important; }
.app:hover, .app:focus-visible { border-color: rgba(55, 240, 207, .55); background: linear-gradient(160deg, rgba(55, 240, 207, .16), rgba(255, 255, 255, .03)) !important; }
.app-no { display: none !important; }
.app-ico { align-self: auto; width: 46px; height: 46px; border-radius: 14px; background: rgba(55, 240, 207, .12); }
.app-name, .app-desc { text-align: center; }
@media (max-width: 720px) {
  body.home .hero { padding-top: 28px; }
  .app { min-height: 112px; padding: 14px 8px !important; }
  .app-ico { width: 38px; height: 38px; }
  .hero-cta { margin-top: 20px; }
}

/* ---- Trang chủ, bản gọn (24/10 16:40): khẩu hiệu + nút ở trên cùng, ô chức năng đè lên logo nhị phân ---- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
body.home .hero { min-height: 0; justify-content: flex-start; padding-top: 22px !important; padding-bottom: 40px; }
body.home .hero-tagline { margin: 0; font-size: clamp(1.15rem, 2.4vw, 1.5rem); }
body.home .hero-sub { margin-top: 6px; }
.hero-row { margin-top: 16px; width: min(100%, 760px); display: flex; gap: 10px; align-items: center; justify-content: center; }
.hero-row .hero-cta { margin-top: 0; flex: none; }
.hero-row .search { margin-top: 0; flex: 1; width: auto; }
.apps-stage { position: relative; width: min(100%, 880px); margin-top: 22px; }
body.home .hero-logo { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(96vw, 640px); margin: 0; z-index: 0; pointer-events: none; }
.apps-stage .app-grid { margin-top: 0; width: 100%; position: relative; z-index: 1; }
@media (max-width: 720px) {
  body.home .hero { padding-top: 16px !important; }
  .hero-row { flex-direction: column; gap: 10px; }
  .hero-row .search { width: 100%; }
  .hero-row .hero-cta { padding: 12px 24px; }
  body.home .hero-logo { width: 104vw; }
}

/* Trang chủ có lại nền WebGL + bong bóng hiện tượng; lớp mã nhị phân nằm trên nền WebGL, dưới nội dung */
body.home #fx-canvas { z-index: 0; }
body.home #bin-canvas { z-index: 0; }
body.home .fx-switcher, body.home .phys-bubble, body.home .phys-menu { z-index: 60; }
.about-logo .about-qr { width: clamp(180px, 22vw, 240px) !important; max-width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 16px; padding: 8px; filter: none !important; animation: none !important; }
.about-bank { font: 600 1rem var(--mono); color: var(--text) !important; }
.about-pay { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.about-pay .btn { padding: 9px 16px; font-size: .8rem; }
@media (max-width: 720px) { body.home .fx-switcher { bottom: 22px; } body.home .fx-options.collapsed { display: none; } }
.about-pay .btn { margin-top: 0 !important; }

/* Hàng nút lọc ô theo chủ đề + lưới 5 cột khi nhiều ô */
.app-filter { margin-top: 16px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; position: relative; z-index: 2; }
.app-filter button { padding: 7px 14px; font: 600 .78rem 'Be Vietnam Pro', sans-serif; color: var(--text-dim); background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-radius: 999px; cursor: pointer; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.app-filter button:hover { color: var(--text); }
.app-filter button[aria-pressed="true"] { color: var(--ink); background: var(--cyan); border-color: var(--cyan); }
body.home .apps-stage { width: min(100%, 1120px); margin-top: 16px; }
body.home .app-grid { grid-template-columns: repeat(5, 1fr); }
.app[hidden] { display: none !important; }
@media (max-width: 1100px) { body.home .app-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 860px) { body.home .app-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .app-filter { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; width: 100%; padding-bottom: 4px; scrollbar-width: none; } .app-filter button { flex: none; } }

/* ---- Đầu trang cân đối lại (24/10 17:00) ---- */
body.home #fx-canvas { opacity: .5; }
body.home .hero::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 260px; z-index: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(6,7,11,.92), rgba(6,7,11,.6) 55%, rgba(6,7,11,0)); }
body.home .hero > * { position: relative; z-index: 1; }
body.home .hero { position: relative; padding-top: 28px !important; gap: 0; }
.hero-head { text-align: center; }
body.home .hero-tagline { font: 600 clamp(1.4rem, 3vw, 2rem)/1.2 var(--display); letter-spacing: .01em; color: var(--text); margin: 0; }
body.home .hero-sub { margin-top: 8px; font-size: .74rem; letter-spacing: .32em; }
.hero-bar { margin-top: 22px; width: min(100%, 680px); display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 999px;
  background: rgba(10, 14, 18, .72); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); box-shadow: 0 12px 40px rgba(0,0,0,.35); }
.hero-bar .search { flex: 1; margin: 0; width: auto; }
.hero-bar .search input { background: transparent; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 11px 14px 11px 44px; }
.hero-bar .search input:focus { border: 0; box-shadow: none; }
.hero-bar:focus-within { border-color: rgba(55,240,207,.6); }
.hero-bar .hero-cta { margin: 0; flex: none; padding: 11px 20px; font-size: .82rem; gap: 8px; }
body.home .app-filter { margin-top: 16px; }
body.home .app-filter button { background: rgba(10,14,18,.66); }
/* ô kính tối hơn để chữ luôn rõ trên nền sáng */
body.home .app { background: linear-gradient(160deg, rgba(20, 28, 32, .72), rgba(8, 10, 14, .62)) !important; border-color: rgba(255,255,255,.12); }
body.home .app:hover, body.home .app:focus-visible { background: linear-gradient(160deg, rgba(55,240,207,.2), rgba(8,10,14,.6)) !important; }
body.home .app-desc { color: rgba(236,230,214,.62); }
@media (max-width: 720px) {
  body.home .hero { padding-top: 20px !important; }
  .hero-bar { margin-top: 16px; }
  .hero-bar .hero-cta { padding: 10px 14px; }
  .hero-bar .hero-cta span { display: none; }
  .hero-bar .search input { padding-left: 40px; font-size: .9rem; }
}
body.home .hero > .hero-bar { z-index: 5; }
@media (max-width: 720px) { .hero-bar .hero-cta span { display: inline; } .hero-bar .hero-cta { font-size: .72rem; padding: 10px 12px; } .hero-bar .search input::placeholder { font-size: .85rem; } }
body.home .app-filter button[aria-pressed="true"] { color: var(--ink); background: var(--cyan); border-color: var(--cyan); }
.old-comments { margin: 18px auto 0; max-width: 820px; padding: 18px 20px; border-radius: 18px; background: rgba(10,14,18,.7); border: 1px solid rgba(255,255,255,.1); text-align: left; }
.old-k { font: 600 .66rem var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--brass); margin-bottom: 10px; }
.oc { display: grid; grid-template-columns: 32px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid rgba(255,255,255,.06); }
.oc:first-child { border-top: 0; }
.oc img { width: 32px; height: 32px; border-radius: 50%; }
.oc p { font-size: .92rem; line-height: 1.55; color: var(--text); }
.oc .oc-h { font-size: .78rem; color: var(--text-dim); }
.oc .oc-h b { color: var(--cyan); font-weight: 600; }
.oc .oc { margin-top: 8px; padding-left: 4px; }
