/*
 * Trang chi tiết app / tải xuống / phiên bản — bố cục thoáng, nạp sau glass.css.
 * Không backdrop-filter cho khối lớn (chỉ nền bán trong suốt); CSP: không style="".
 * Tài liệu: docs/detail-page.md
 */

.dt-page, .dt-page-narrow {
  --dt-card: rgba(255, 255, 255, .74);
  --dt-tile: rgba(255, 255, 255, .85);
  --dt-line: rgba(29, 42, 58, .09);
  --dt-text: #1d2a3a;
  --dt-text-2: rgba(29, 42, 58, .78);
  --dt-muted: rgba(29, 42, 58, .6);
  --dt-accent: #24cd77;
  --dt-accent-soft: rgba(36, 205, 119, .12);
  --dt-radius: 22px;
  --dt-gap: 24px;
  padding-top: 22px;
  padding-bottom: 48px;
  color: var(--dt-text);
}
html:has(.dt-page), html:has(.dt-page-narrow) { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html:has(.dt-page), html:has(.dt-page-narrow) { scroll-behavior: auto; } }

/* Thẻ -------------------------------------------------------------------- */
.dt-card {
  position: relative;
  background: var(--dt-card);
  border: 1px solid rgba(255, 255, 255, .92);
  border-radius: var(--dt-radius);
  box-shadow: 0 8px 28px rgba(40, 70, 120, .10);
  padding: 30px 32px;
  margin-bottom: var(--dt-gap);
  scroll-margin-top: 136px;
}
.sk .dt-h { font-size: 21px; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; color: var(--dt-text); margin: 0 0 18px; }
.dt-h-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: inherit; text-decoration: none; }
.dt-h-link i { font-style: normal; font-size: 24px; color: var(--dt-muted); line-height: 1; margin-bottom: 18px; }
.sk .dt-h-link:hover .dt-h { color: #0b7d44; }
.dt-h-link-sub { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--dt-line); }
.dt-muted { color: var(--dt-muted); font-size: 13.5px; margin: 10px 0 0; }
.dt-slot:empty, .dt-slot:not(:has(*)) { display: none; }
.dt-slot { margin-bottom: var(--dt-gap); }

/* Hero ------------------------------------------------------------------- */
.dt-hero { padding: 22px 32px 30px; }
.dt-hero .sk-crumbs { padding: 0 0 20px; margin: 0; }
.dt-hero-main { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 28px; align-items: center; }
.dt-icon .sk-icon { width: 128px; height: 128px; border-radius: 30px; box-shadow: 0 10px 28px rgba(30, 50, 90, .22); display: block; }
.dt-hero-info { min-width: 0; }
.dt-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.dt-badge {
  display: inline-flex; align-items: center; min-height: 26px; padding: 2px 11px; border-radius: 999px;
  background: rgba(29, 42, 58, .07); color: var(--dt-text-2); font-size: 12.5px; font-weight: 650; text-decoration: none; line-height: 1;
}
a.dt-badge:hover { background: rgba(29, 42, 58, .12); }
.dt-badge-mod { background: #ff6a3d; color: #fff; letter-spacing: .04em; }
.dt-badge-ok { background: var(--dt-accent-soft); color: #0b6b3b; }
.dt-hero h1 { font-size: 30px; line-height: 1.2; font-weight: 800; letter-spacing: -.02em; color: var(--dt-text); margin: 0 0 8px; overflow-wrap: anywhere; }
.dt-hero h1 small { display: block; font-size: 15px; font-weight: 500; color: var(--dt-muted); letter-spacing: 0; margin-top: 4px; }
.dt-dev { display: inline-flex; align-items: center; min-height: 32px; font-size: 15.5px; font-weight: 600; color: #0b7d44; text-decoration: none; }
.dt-dev:hover { text-decoration: underline; }

.dt-cta { display: grid; gap: 12px; justify-items: stretch; min-width: 252px; }
.dt-cta .sk-btn { justify-content: center; min-height: 52px; gap: 10px; width: 100%; box-sizing: border-box; }
.dt-btn-play { background: rgba(255, 255, 255, .8); }
.dt-howto { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; font-size: 13.5px; color: var(--dt-muted); text-decoration: none; }
.dt-howto:hover { color: #0b7d44; }

/* Hàng chỉ số ------------------------------------------------------------- */
.dt-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(122px, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 28px 0 0; }
.dt-stats li { display: grid; gap: 4px; align-content: center; justify-items: center; text-align: center; padding: 16px 10px; border-radius: 18px; background: var(--dt-tile); border: 1px solid var(--dt-line); min-height: 78px; }
.dt-stats strong { display: inline-flex; align-items: center; gap: 5px; font-size: 17px; font-weight: 750; color: var(--dt-text); line-height: 1.2; }
.dt-stats span { font-size: 12.5px; color: var(--dt-muted); line-height: 1.3; }
.dt-ok { color: #0b7d44 !important; }

/* Thanh neo ---------------------------------------------------------------- */
.dt-nav {
  position: sticky; top: 74px; z-index: 6; display: flex; gap: 4px; overflow-x: auto; padding: 6px; margin-bottom: var(--dt-gap);
  background: #fbfdff; border: 1px solid rgba(255, 255, 255, .95); border-radius: 999px;
  box-shadow: 0 6px 22px rgba(40, 70, 120, .12); scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.dt-nav::-webkit-scrollbar { display: none; }
.dt-nav a {
  flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px; border-radius: 999px;
  font-size: 14px; font-weight: 600; color: var(--dt-text-2); text-decoration: none; white-space: nowrap; transition: background .2s, color .2s;
}
.dt-nav a:hover { background: rgba(29, 42, 58, .06); }
.dt-nav a.is-active { background: var(--dt-accent); color: #06371f; }

/* Bố cục 2 cột -------------------------------------------------------------- */
.dt-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--dt-gap); align-items: stretch; }
.dt-main, .dt-aside { min-width: 0; }
.dt-aside-inner { position: sticky; top: 148px; display: grid; gap: var(--dt-gap); }
.dt-aside .sk-module { margin: 0; border-radius: var(--dt-radius); }
.dt-useapp { display: flex; align-items: center; gap: 14px; padding: 18px 20px; margin: 0; }
.dt-useapp .sk-logo, .dt-useapp svg { flex: 0 0 auto; }
.dt-useapp span { display: grid; gap: 2px; min-width: 0; flex: 1; }
.dt-useapp b { font-size: 15px; }
.dt-useapp small { font-size: 12.5px; color: var(--dt-muted); }

/* Nội dung văn bản ----------------------------------------------------------- */
.dt-lead { font-size: 17px; line-height: 1.6; font-weight: 600; color: var(--dt-text); margin: 0 0 18px; max-width: 72ch; }
.dt-prose { font-size: 16px; line-height: 1.75; color: var(--dt-text-2); max-width: 72ch; overflow-wrap: anywhere; }
.dt-prose > :first-child { margin-top: 0; }
.dt-prose p { margin: 0 0 1.1em; }
.dt-prose h2, .dt-prose h3, .dt-prose h4 { color: var(--dt-text); line-height: 1.35; margin: 1.8em 0 .6em; font-weight: 700; }
.dt-prose h2 { font-size: 20px; }
.dt-prose h3 { font-size: 18px; }
.dt-prose h4 { font-size: 16px; }
.dt-prose ul, .dt-prose ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.dt-prose li { margin: .45em 0; padding-left: .2em; }
.dt-prose li::marker { color: var(--dt-accent); }
.dt-prose a { color: #0b7d44; text-decoration: underline; text-underline-offset: 2px; }
.dt-prose img { max-width: 100%; height: auto; border-radius: 12px; }
.dt-prose table { display: block; overflow-x: auto; max-width: 100%; border-collapse: collapse; margin: 0 0 1.2em; }
.dt-prose th, .dt-prose td { border: 1px solid var(--dt-line); padding: 8px 12px; text-align: left; }
.dt-clamp { max-height: 15.5em; overflow: hidden; position: relative; }
.dt-clamp:not(.is-open) { -webkit-mask-image: linear-gradient(#000 62%, transparent); mask-image: linear-gradient(#000 62%, transparent); }
.dt-clamp.is-open { max-height: none; }
.dt-more {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; margin-top: 12px; padding: 0 22px;
  border: 1px solid rgba(29, 42, 58, .16); border-radius: 999px; background: rgba(255, 255, 255, .8); color: #0b7d44; font: inherit; font-size: 14.5px; font-weight: 650; cursor: pointer;
}
.dt-more:hover { background: #fff; }
.dt-more[hidden] { display: none; }

/* Thông tin app: lưới 2 cột -------------------------------------------------- */
.dt-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; margin: 0; }
.dt-info > div { display: grid; gap: 4px; padding: 15px 0; border-bottom: 1px solid var(--dt-line); min-width: 0; }
.dt-info dt { font-size: 12.5px; font-weight: 600; letter-spacing: .02em; color: var(--dt-muted); }
.dt-info dd { margin: 0; font-size: 15.5px; font-weight: 650; color: var(--dt-text); overflow-wrap: anywhere; }
.dt-info a { color: #0b7d44; text-decoration: none; }
.dt-info a:hover { text-decoration: underline; }

/* Có gì mới ----------------------------------------------------------------- */
.dt-card-new { background: linear-gradient(180deg, rgba(36, 205, 119, .12), rgba(255, 255, 255, .72)); border-left: 4px solid var(--dt-accent); }
.dt-new-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 16px; }
.sk .dt-new-head .dt-h { margin: 0; }
.dt-pill { display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; border-radius: 999px; background: rgba(255, 255, 255, .8); border: 1px solid var(--dt-line); font-size: 12.5px; color: var(--dt-muted); }

.dt-dl-band { display: flex; justify-content: center; margin: 0 0 var(--dt-gap); }
.dt-dl-band .sk-btn { min-width: 280px; justify-content: center; min-height: 54px; gap: 10px; }

/* Quét bảo mật --------------------------------------------------------------- */
.dt-scan { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 24px; align-items: center; }
.dt-scan-ring { width: 88px; height: 88px; border-radius: 50%; border: 7px solid var(--dt-accent); display: grid; place-content: center; text-align: center; background: rgba(255, 255, 255, .8); }
.dt-scan-ring b { font-size: 26px; line-height: 1; color: #0b7d44; }
.dt-scan-ring small { font-size: 12px; color: var(--dt-muted); }
.dt-scan-body h3 { font-size: 18px; margin: 0 0 6px; }
.dt-scan-body p { margin: 0 0 8px; color: var(--dt-text-2); line-height: 1.6; }
.dt-scan-body ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.dt-scan-body li { font-size: 14px; color: var(--dt-text-2); }
.dt-scan-body li::before { content: "✓"; color: #0b7d44; font-weight: 800; margin-right: 6px; }

/* Danh sách phiên bản -------------------------------------------------------- */
.dt-vers { list-style: none; margin: 0 0 20px; padding: 0; }
.dt-vers li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--dt-line); }
.dt-vers li:first-child { padding-top: 4px; }
.dt-v-main { display: grid; gap: 6px; min-width: 0; }
.dt-v-main strong { font-size: 15.5px; line-height: 1.35; overflow-wrap: anywhere; }
.dt-v-main span { font-size: 13.5px; color: var(--dt-muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.dt-tag { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--dt-accent-soft); color: #0b6b3b; font-size: 11.5px; font-weight: 750; letter-spacing: .03em; }
.dt-vers .sk-btn-small, .dt-sticky .sk-btn { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.dt-card .sk-btn-block { display: flex; justify-content: center; align-items: center; min-height: 46px; }

/* FAQ -------------------------------------------------------------------------- */
.dt-faq { display: grid; gap: 12px; }
.dt-faq details { border: 1px solid var(--dt-line); border-radius: 16px; background: rgba(255, 255, 255, .6); overflow: hidden; }
.dt-faq details[open] { background: rgba(255, 255, 255, .9); }
.dt-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 56px; padding: 12px 20px; font-size: 15.5px; font-weight: 650; cursor: pointer; list-style: none; }
.dt-faq summary::-webkit-details-marker { display: none; }
.dt-faq summary::after { content: "+"; flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; background: rgba(29, 42, 58, .07); display: grid; place-content: center; font-size: 18px; line-height: 1; color: var(--dt-text-2); }
.dt-faq details[open] summary::after { content: "–"; background: var(--dt-accent-soft); color: #0b6b3b; }
.dt-faq p { margin: 0; padding: 0 20px 18px; color: var(--dt-text-2); line-height: 1.7; max-width: 72ch; }

/* Thẻ chủ đề, lưới app liên quan ----------------------------------------------- */
.dt-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.dt-tags a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; background: rgba(255, 255, 255, .8); border: 1px solid var(--dt-line); font-size: 14px; color: var(--dt-text-2); text-decoration: none; }
.dt-tags a:hover { background: #fff; color: #0b7d44; }
.dt-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 24px 16px; }
.dt-grid .sk-ic { padding: 0; }

/* Thanh tải dính (điện thoại) --------------------------------------------------- */
.dt-sticky { display: none; }

/* Gallery trong thẻ riêng */
.dt-card .gl-gal { margin: 0; }

/* Trang tải xuống / phiên bản ---------------------------------------------------- */
.dt-page-narrow .dt-layout { grid-template-columns: minmax(0, 1fr) 300px; }
.dt-dl-hero { padding: 22px 32px 28px; }
.dt-dl-hero .sk-crumbs { padding: 0 0 18px; margin: 0; }
.dt-dl-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: center; }
.dt-dl-head .sk-icon { width: 96px; height: 96px; border-radius: 24px; box-shadow: 0 8px 24px rgba(30, 50, 90, .2); display: block; }
.dt-dl-head h1 { font-size: 26px; line-height: 1.25; font-weight: 800; letter-spacing: -.015em; margin: 0 0 6px; overflow-wrap: anywhere; }
.dt-dl-head h1 small { font-size: 14px; font-weight: 500; color: var(--dt-muted); letter-spacing: 0; margin-left: 4px; }
.dt-dl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 14px; color: var(--dt-muted); }
.dt-dl-meta a { color: #0b7d44; }
.dt-dl-start { text-align: center; }
.dt-dl-start .sk-note { margin: 12px auto; max-width: 56ch; color: var(--dt-muted); line-height: 1.6; }
.dt-dl-start .sk-note-warn { background: rgba(255, 170, 60, .16); border: 1px solid rgba(255, 150, 30, .35); color: #7a4a00; border-radius: 14px; padding: 12px 16px; }
.dt-dl-start .sk-note-info { background: var(--dt-accent-soft); border-radius: 14px; padding: 12px 16px; color: #0b6b3b; }
.dt-dl-start > p:first-child { margin-top: 0; font-size: 16px; font-weight: 600; color: var(--dt-text); }
.dt-dl-files { display: grid; gap: 12px; max-width: 460px; margin: 16px auto; }
.dt-dl-files .sk-btn { min-height: 56px; width: 100%; box-sizing: border-box; justify-content: center; gap: 10px; }
.dt-back { display: inline-flex; align-items: center; min-height: 44px; color: #0b7d44; font-weight: 600; text-decoration: none; }
.dt-ver-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; }
.dt-ver-head .sk-icon { border-radius: 18px; display: block; }
.dt-ver-name { display: block; font-size: 19px; font-weight: 750; line-height: 1.3; overflow-wrap: anywhere; }
.dt-ver-name small { font-weight: 500; color: var(--dt-muted); font-size: 13px; }
.dt-ver-sub { display: block; font-size: 13.5px; color: var(--dt-muted); margin-top: 4px; line-height: 1.5; }
.dt-intro { color: var(--dt-text-2); line-height: 1.7; max-width: 72ch; margin: 0 0 20px; }

/* Trung bình: gọn lại ------------------------------------------------------------ */
@media (max-width: 1100px) {
  .dt-layout, .dt-page-narrow .dt-layout { grid-template-columns: minmax(0, 1fr); }
  .dt-aside-inner { position: static; }
  .dt-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Điện thoại ----------------------------------------------------------------------- */
@media (max-width: 720px) {
  .dt-page, .dt-page-narrow { --dt-gap: 16px; --dt-radius: 20px; padding-top: 14px; padding-bottom: 96px; }
  .dt-card { padding: 22px 18px; scroll-margin-top: 70px; }
  .dt-hero, .dt-dl-hero { padding: 16px 18px 22px; }
  .dt-hero-main { grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: start; }
  .dt-icon .sk-icon { width: 88px; height: 88px; border-radius: 22px; }
  .dt-hero h1 { font-size: 22px; }
  .dt-hero h1 small { font-size: 13px; }
  .dt-cta { grid-column: 1 / -1; min-width: 0; }
  .dt-cta .sk-btn { min-height: 54px; }
  .dt-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 22px; }
  .dt-stats li:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .dt-nav { top: 8px; margin-left: -4px; margin-right: -4px; }
  .dt-h { font-size: 19px; margin-bottom: 14px; }
  .dt-lead { font-size: 16px; }
  .dt-prose { font-size: 15.5px; }
  .dt-info { grid-template-columns: minmax(0, 1fr); }
  .dt-scan { grid-template-columns: auto minmax(0, 1fr); gap: 16px; }
  .dt-scan .dt-badge { grid-column: 1 / -1; justify-self: start; }
  .dt-vers li { align-items: flex-start; flex-direction: column; gap: 12px; }
  .dt-vers .sk-btn-small { width: 100%; justify-content: center; }
  .dt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 10px; }
  .dt-dl-band .sk-btn { min-width: 0; width: 100%; }
  .dt-dl-head { grid-template-columns: auto minmax(0, 1fr); gap: 14px; }
  .dt-dl-head .sk-icon { width: 72px; height: 72px; border-radius: 18px; }
  .dt-dl-head h1 { font-size: 21px; }
  .dt-ver-head { grid-template-columns: auto minmax(0, 1fr); }
  .dt-ver-head > .sk-btn { grid-column: 1 / -1; justify-content: center; min-height: 50px; }
  .dt-sticky {
    position: fixed; z-index: 40; left: 8px; right: 8px; top: 8px; display: none; align-items: center; gap: 12px; padding: 8px 8px 8px 12px;
    background: rgba(255, 255, 255, .96); border: 1px solid rgba(255, 255, 255, .95); border-radius: 18px; box-shadow: 0 10px 30px rgba(30, 50, 90, .22);
    transform: translateY(-120%); transition: transform .25s ease;
  }
  .dt-sticky.is-on { display: flex; transform: translateY(0); }
  .dt-sticky .sk-icon { border-radius: 10px; flex: 0 0 auto; }
  .dt-sticky-t { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dt-nav.is-stuck-hidden { display: none; }
}
@media (prefers-reduced-motion: reduce) { .dt-sticky { transition: none; } }

/* Bổ sung trang phiên bản */
.dt-badge-hot { background: rgba(255, 106, 61, .14); color: #b8401a; margin-left: 6px; }
.dt-more-wrap { display: flex; justify-content: center; }
.sk .dt-h-page { font-size: 24px; margin-bottom: 10px; }
.dt-vers strong .dt-badge { vertical-align: middle; }

/* ---- Nút dự phòng "Bản gốc trên Google Play" (trang tải) ---- */
.dt-gplay { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 20px; padding-top: 18px; border-top: 1px dashed rgba(15, 23, 42, .14); }
.dt-gplay .sk-note { margin: 0; }
.dt-gplay .dt-btn-play { min-height: 44px; }

/* ---- Hàng phiên bản gọn + danh sách tệp tải (trang chi tiết, /versions, /download) ---- */
.dt-vers .dt-ver { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; }
.dt-vers .dt-ver:first-child { padding-top: 2px; }
.dt-vers .dt-ver[hidden] { display: none; }
.dt-vers .dt-v-main { gap: 3px; flex: 1 1 auto; min-width: 0; }
.dt-vers .dt-v-name { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 15px; line-height: 1.35; }
.dt-vers .dt-v-main .dt-v-title { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: inherit; color: var(--dt-text); }
.dt-vers .dt-v-main .dt-badge { display: inline-flex; flex: 0 0 auto; min-height: 22px; padding: 2px 9px; margin: 0; font-size: 11.5px; }
.dt-vers .dt-v-main .dt-badge-ok { color: #0b6b3b; }
.dt-vers .dt-v-main .dt-badge-hot { color: #b8401a; }
.dt-vers .dt-v-main .dt-v-meta { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; min-width: 0; font-size: 12.5px; color: var(--dt-muted); }
.dt-vers .dt-v-main .dt-v-meta .dt-tag { flex: 0 0 auto; padding: 1px 7px; font-size: 11px; }
.dt-vers .dt-v-main .dt-v-info { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: inherit; }
.dt-vers .dt-v-btn { height: auto; min-height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 999px; flex: 0 0 auto; gap: 6px; }

.dt-dl-start .dt-dl-hint { margin: 0 0 12px; font-size: 14.5px; font-weight: 600; color: var(--dt-text-2); text-align: left; }
.dt-dl-start .dt-dl-files { display: block; max-width: none; margin: 0; width: 100%; text-align: left; }
.dt-files { list-style: none; margin: 0; padding: 0; border: 1px solid var(--dt-line); border-radius: 16px; overflow: hidden; background: rgba(255, 255, 255, .6); }
.dt-file { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border-top: 1px solid var(--dt-line); }
.dt-file:first-child { border-top: 0; }
.dt-file[hidden] { display: none; }
.dt-file.is-main { background: var(--dt-accent-soft); }
.dt-file-info { display: grid; gap: 3px; min-width: 0; flex: 1 1 auto; }
.dt-file-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; font-weight: 700; color: var(--dt-text); }
.dt-file-meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--dt-muted); }
.dt-file-meta .dt-tag { padding: 1px 7px; font-size: 11px; }
.dt-file-meta .dt-tag-dead { background: rgba(220, 38, 38, .12); color: #b42318; }
.dt-dl-files .dt-files .dt-file-btn { width: auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: 0 0 auto; height: auto; min-height: 38px; min-width: 104px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 700; }
.dt-dl-start .dt-dl-files .dt-more-wrap { margin-top: 4px; }
.dt-dl-start .dt-dl-note { margin: 12px 0 0; font-size: 12.5px; text-align: left; max-width: none; }
.dt-dl-start .dt-gplay { align-items: flex-start; flex-direction: row; flex-wrap: wrap; gap: 10px 16px; margin-top: 16px; padding-top: 14px; text-align: left; }
.dt-dl-start .dt-gplay .sk-note { margin: 0; flex: 1 1 260px; font-size: 13px; }
.dt-dl-start .dt-gplay .dt-btn-play { flex: 0 0 auto; width: auto; min-height: 40px; padding: 0 16px; font-size: 14px; }

@media (max-width: 640px) {
  .dt-vers .dt-ver { flex-wrap: wrap; align-items: stretch; gap: 10px; padding: 14px 0; }
  .dt-vers .dt-ver .dt-v-main { flex: 1 1 100%; }
  .dt-vers .dt-ver .dt-v-btn { flex: 1 1 100%; width: 100%; min-height: 44px; }
  .dt-file { flex-wrap: wrap; gap: 10px; padding: 12px; }
  .dt-file-info { flex: 1 1 100%; }
  .dt-dl-files .dt-files .dt-file-btn { flex: 1 1 100%; width: 100%; min-height: 44px; }
}

/* ---- Nút "Chia sẻ" + popup (desktop: bảng nổi có mũi tên; điện thoại: bottom sheet) ---- */
.sk-sharebox { position: relative; display: inline-flex; }
.sk-sharebox[hidden] { display: none; }
.sk-sharebox .dt-btn-share { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; }
.sk-share-layer { display: contents; }
.sk-share-layer[hidden] { display: none; }
.sk-share-pop {
  position: absolute; z-index: 60; top: calc(100% + 12px); right: 0; width: 336px; max-width: calc(100vw - 24px); box-sizing: border-box;
  padding: 16px 16px 14px; border-radius: 20px; background: rgba(255, 255, 255, .985); border: 1px solid rgba(29, 42, 58, .08);
  box-shadow: 0 18px 48px rgba(30, 50, 90, .26), 0 2px 8px rgba(30, 50, 90, .08); text-align: left; color: #1d2a3a;
  animation: sk-share-in .16s ease-out;
}
.sk-share-pop::before { content: ""; position: absolute; top: -7px; right: 26px; width: 14px; height: 14px; background: inherit; border-left: 1px solid rgba(29, 42, 58, .08); border-top: 1px solid rgba(29, 42, 58, .08); transform: rotate(45deg); border-radius: 3px 0 0 0; }
.sk-share-pop:focus { outline: none; }
.sk-share-grab { display: none; }
.sk-share-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sk-share-head h3 { margin: 0; font-size: 17px; line-height: 1.3; font-weight: 800; letter-spacing: -.01em; }
.sk-share-x { display: grid; place-items: center; width: 36px; height: 36px; margin: -4px -6px -4px 0; border: 0; border-radius: 50%; background: rgba(29, 42, 58, .06); color: #1d2a3a; cursor: pointer; transition: background .15s ease; }
.sk-share-x:hover { background: rgba(29, 42, 58, .12); }
.sk-share-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 8px; }
.sk-share-item { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 8px 4px; min-height: 44px; border-radius: 14px; color: #1d2a3a; text-decoration: none; transition: background .15s ease; }
.sk-share-item:hover { background: rgba(29, 42, 58, .05); }
.sk-share-ico { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; color: #fff; box-shadow: 0 4px 10px rgba(30, 50, 90, .18); transition: transform .15s ease, box-shadow .15s ease; }
.sk-share-item:hover .sk-share-ico, .sk-share-item:focus-visible .sk-share-ico { transform: translateY(-2px); box-shadow: 0 8px 16px rgba(30, 50, 90, .24); }
.sk-share-item:focus-visible, .sk-share-x:focus-visible, .sk-share-copybtn:focus-visible, .sk-sharebox .dt-btn-share:focus-visible { outline: 2px solid #0b7d44; outline-offset: 2px; }
.sk-share-lbl { font-size: 12.5px; font-weight: 600; line-height: 1.2; text-align: center; overflow-wrap: anywhere; }
.net-facebook { background: #1877f2; }
.net-x { background: #0f1419; }
.net-reddit { background: #ff4500; }
.net-whatsapp { background: #25d366; }
.net-telegram { background: #229ed9; }
.net-email { background: #64748b; }
.sk-share-copy { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 6px; border: 1px solid rgba(29, 42, 58, .12); border-radius: 14px; background: rgba(29, 42, 58, .04); }
.sk-share-copy input { flex: 1 1 auto; min-width: 0; height: 40px; padding: 0 8px 0 10px; border: 0; background: transparent; color: #1d2a3a; font: inherit; font-size: 13px; text-overflow: ellipsis; }
.sk-share-copy input:focus { outline: 2px solid #0b7d44; outline-offset: -2px; border-radius: 8px; }
.sk-share-copybtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: 0 0 auto; min-height: 40px; min-width: 104px; padding: 0 14px; border: 0; border-radius: 10px; background: #24cd77; color: #06371f; font: inherit; font-size: 13.5px; font-weight: 750; cursor: pointer; transition: background .15s ease; }
.sk-share-copybtn:hover { background: #1fbe6d; }
.sk-share-copybtn .ic-done, .sk-share-copybtn .lbl-done { display: none; }
.sk-share-copybtn.is-done { background: #0b7d44; color: #fff; }
.sk-share-copybtn.is-done .ic-copy, .sk-share-copybtn.is-done .lbl-copy { display: none; }
.sk-share-copybtn.is-done .ic-done { display: block; }
.sk-share-copybtn.is-done .lbl-done { display: inline; }
.sk-share-live { display: block; min-height: 0; padding: 0; font-size: 12px; color: #0b6b3b; }
.sk-share-live:empty { display: none; }
.sk-share-ghost { position: fixed; left: -9999px; top: 0; opacity: 0; }
html.sk-share-lock { overflow: hidden; }
.dt-cta .sk-sharebox { display: flex; }
.dt-cta .sk-sharebox .dt-btn-share { width: 100%; }
.dt-cta .sk-share-pop { left: 50%; right: auto; margin-left: -168px; }
.dt-cta .sk-share-pop::before { right: auto; left: 50%; margin-left: -7px; }
.sk-sharebox-post { margin-left: auto; flex: 0 0 auto; }
.pt-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pt-head .sk-h1 { margin: 0; flex: 1 1 280px; min-width: 0; }
@keyframes sk-share-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes sk-share-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sk-share-fade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 640px) {
  .sk-share-layer { position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-end; justify-content: center; background: rgba(15, 23, 42, .45); animation: sk-share-fade .18s ease-out; }
  .sk-share-layer[hidden] { display: none; }
  .sk-share-pop, .dt-cta .sk-share-pop { position: relative; top: auto; left: auto; right: auto; margin: 0; width: 100%; max-width: 520px; border-radius: 22px 22px 0 0; padding: 10px 18px calc(18px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -12px 40px rgba(15, 23, 42, .3); animation: sk-share-up .22s cubic-bezier(.2, .8, .2, 1); }
  .sk-share-pop::before, .dt-cta .sk-share-pop::before { display: none; }
  .sk-share-grab { display: block; width: 44px; height: 5px; margin: 0 auto 12px; border-radius: 999px; background: rgba(29, 42, 58, .2); }
  .sk-share-ico { width: 56px; height: 56px; }
  .sk-share-grid { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .sk-share-pop, .sk-share-layer, .sk-share-ico, .sk-share-item, .sk-share-copybtn, .sk-share-x { animation: none !important; transition: none !important; }
}
/* Bottom sheet chia sẻ đè lên dock điều hướng điện thoại: ẩn dock khi sheet mở. */
html.sk-share-lock .gl-dock { display: none !important; }

/* QA mobile: vùng chạm >=44px, breadcrumb, dock ở màn hình thấp -------------- */
@media (max-width: 760px) {
  .dt-hero .sk-crumbs, .dt-dl-hero .sk-crumbs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
  .dt-hero .sk-crumbs::-webkit-scrollbar, .dt-dl-hero .sk-crumbs::-webkit-scrollbar { display: none; }
  .dt-hero .sk-crumbs a, .dt-dl-hero .sk-crumbs a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; justify-content: center; padding: 0 8px; }
  .dt-badge-ver { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; }
  .dt-dev { min-height: 44px; padding: 0 4px; }
  .dt-dl-head a[href$="/versions"], .dt-dl-head .dt-oldv { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; }
}
@media (max-width: 760px) and (max-height: 700px) {
  .dt-nav { padding: 3px; }
  .dt-nav a { min-height: 44px; }
  body.dt-dock-hide .gl-dock { transform: translateY(140%); opacity: 0; pointer-events: none; }
}
body.dt-dock-hide .gl-dock { transition: transform .25s ease, opacity .2s ease; }
@media (prefers-reduced-motion: reduce) { body.dt-dock-hide .gl-dock { transition: none; } }

/* Nhãn APKS (split APK) */
.dt-tag-apks { background: rgba(217, 119, 6, .14); color: #92400e; cursor: help; }
.dt-apks-note { margin: 10px 0 0; font-size: 13px; line-height: 1.45; }
