/* Mặc Thư — hệ thống thẩm mỹ v4.
   Nguyên tắc: chuyên nghiệp từ cái nhìn đầu tiên, tiện dụng cho người đọc lâu.
   - Mọi màu đi qua biến, đổi tông chỉ là đổi khối :root[data-skin].
   - Bo góc, đổ bóng, viền nhấn thống nhất theo thang --r-*, --shadow-*.
   - Mật độ danh sách và bố cục không phụ thuộc tông màu. */

/* ------------------------------------------------------------ phông chữ */

@font-face {
  font-family: "Be Vietnam Pro";
  src: url("/v3/fonts/be-vietnam-pro-400-vietnamese.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01B0,
    U+1EA0-1EF9, U+20AB;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Be Vietnam Pro";
  src: url("/v3/fonts/be-vietnam-pro-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Be Vietnam Pro";
  src: url("/v3/fonts/be-vietnam-pro-600-vietnamese.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01B0,
    U+1EA0-1EF9, U+20AB;
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Be Vietnam Pro";
  src: url("/v3/fonts/be-vietnam-pro-600-latin.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Be Vietnam Pro";
  src: url("/v3/fonts/be-vietnam-pro-700-vietnamese.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01B0,
    U+1EA0-1EF9, U+20AB;
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Be Vietnam Pro";
  src: url("/v3/fonts/be-vietnam-pro-700-latin.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Literata";
  src: url("/v3/fonts/literata-400-vietnamese.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01B0,
    U+1EA0-1EF9, U+20AB;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("/v3/fonts/literata-400-latin.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Lora";
  src: url("/v3/fonts/lora-vietnamese-regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Lora";
  src: url("/v3/fonts/lora-vietnamese-semibold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Lora";
  src: url("/v3/fonts/lora-vietnamese-medium-italic.ttf") format("truetype");
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Roboto Condensed";
  src: url("/v3/fonts/roboto-condensed-400-vietnamese.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01B0,
    U+1EA0-1EF9, U+20AB;
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Roboto Condensed";
  src: url("/v3/fonts/roboto-condensed-400-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

/* ------------------------------------------------------------ tông màu */

:root[data-skin="ink"] {
  /* Mực — mực tàu sâu, nhấn son đỏ */
  --bg: #05090d;
  --bg-2: #0b1319;
  --bg-3: #101b23;
  --text: #edeee8;
  --muted: #97a29a;
  --dim: #6b746c;
  --accent: #e2653c;
  --accent-2: #f4a67e;
  --accent-deep: #9c3d1e;
  --accent-ink: #1c0a04;
  --glow: rgba(46, 112, 90, 0.2);
  --art-shade: 0.55;
  --gl-1: #0d2b23;
  --gl-2: #38180e;
  --gl-3: #091b23;
}

:root,
:root[data-skin="night"] {
  /* Đêm lam — nền xanh đêm sâu, nhấn vàng đồng (tông mặc định) */
  --bg: #070d1a;
  --bg-2: #0d1626;
  --bg-3: #131f36;
  --text: #e9eef8;
  --muted: #9caac2;
  --dim: #75839b;
  --accent: #d9a850;
  --accent-2: #f0d090;
  --accent-deep: #96701f;
  --accent-ink: #221804;
  --glow: rgba(88, 128, 205, 0.18);
  --art-shade: 0.5;
  --gl-1: #142c4e;
  --gl-2: #3a2f12;
  --gl-3: #0e3850;
}

:root[data-skin="graphite"] {
  /* Than chì — xám trung tính, nhấn lam băng */
  --bg: #101316;
  --bg-2: #171b1f;
  --bg-3: #1f242a;
  --text: #e9ebee;
  --muted: #9aa1a9;
  --dim: #747b83;
  --accent: #7db1e8;
  --accent-2: #b3d4f2;
  --accent-deep: #3d6d9e;
  --accent-ink: #07131e;
  --glow: rgba(125, 177, 232, 0.1);
  --art-shade: 0.45;
  --gl-1: #1f2a36;
  --gl-2: #1c2a3c;
  --gl-3: #232d31;
}

:root[data-skin="paper"] {
  /* Giấy — nền sáng ấm, nhấn son đất */
  --bg: #f4efe4;
  --bg-2: #fdfaf1;
  --bg-3: #ebe4d3;
  --text: #241f17;
  --muted: #665d4b;
  --dim: #7d745f;
  --accent: #b04a2b;
  --accent-2: #8f361d;
  --accent-deep: #7c2d14;
  --accent-ink: #fff6ee;
  --glow: rgba(176, 74, 43, 0.06);
  --art-shade: 0.16;
  --gl-1: #eee0c8;
  --gl-2: #f2e0d2;
  --gl-3: #e6e9dc;
}

:root {
  --line: color-mix(in srgb, var(--text) 10%, transparent);
  --line-2: color-mix(in srgb, var(--text) 18%, transparent);
  --fill: color-mix(in srgb, var(--text) 5%, transparent);
  --fill-2: color-mix(in srgb, var(--text) 9%, transparent);
  --scrim: color-mix(in srgb, var(--bg) 94%, transparent);
  --head-glass: color-mix(in srgb, var(--bg) 78%, transparent);

  --grad-accent: linear-gradient(135deg, var(--accent-2), var(--accent) 55%, var(--accent-deep));

  --sans: "Be Vietnam Pro", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --serif: "Literata", ui-serif, Georgia, serif;
  --serif-read: "Lora", "Literata", ui-serif, Georgia, serif;
  --cond: "Roboto Condensed", ui-sans-serif, system-ui, sans-serif;

  --r-s: 8px;
  --r-m: 12px;
  --r-l: 16px;
  --r-xl: 22px;

  --shadow-1: 0 1px 2px rgba(2, 6, 14, 0.35), 0 2px 10px rgba(2, 6, 14, 0.22);
  --shadow-2: 0 2px 6px rgba(2, 6, 14, 0.4), 0 10px 28px rgba(2, 6, 14, 0.34);
  --shadow-glow: 0 0 0 1px color-mix(in srgb, var(--accent) 32%, transparent),
    0 10px 36px color-mix(in srgb, var(--accent) 14%, transparent);

  --head-h: 62px;
  --tab-h: 56px;
  --row-h: 64px;
  --row-pad: 10px;
  --row-title: 15.5px;
  --row-sub: 12.5px;
  --art-w: 44px;
  --art-h: 62px;
  --gutter: 20px;
  --wrap: 1120px;
}

:root[data-density="roomy"] {
  --row-h: 82px;
  --row-pad: 14px;
  --row-title: 16.5px;
  --row-sub: 13.5px;
  --art-w: 52px;
  --art-h: 73px;
}

/* Nền WebGL nằm dưới toàn bộ nội dung. */
.bg-gl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  display: block;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

::selection { background: color-mix(in srgb, var(--accent) 32%, transparent); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--text) 16%, transparent);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background-color: color-mix(in srgb, var(--text) 28%, transparent); }

body {
  margin: 0;
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  background:
    radial-gradient(1300px 480px at 50% -140px, var(--glow), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px));
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.015em; }
img { display: block; }
button, input, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent);
  outline-offset: 2px;
  border-radius: 4px;
}

.main {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: calc(var(--head-h) + 26px) var(--gutter) 56px;
}

.kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Vào trang: nội dung chính hiện lên dịu, một lần duy nhất. */
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.main > * { animation: rise 0.44s cubic-bezier(0.22, 0.8, 0.36, 1) backwards; }
/* 'backwards' chứ KHÔNG phải 'both': 'both' giữ lại transform của keyframe cuối,
   biến .reader thành khối chứa cho position:fixed và đẩy panel Mục lục/Tùy chỉnh
   ra ngoài tầm nhìn. Keyframe cuối trùng với style gốc nên hiệu ứng không đổi. */
.main > *:nth-child(2) { animation-delay: 0.05s; }
.main > *:nth-child(3) { animation-delay: 0.1s; }
.main > *:nth-child(4) { animation-delay: 0.15s; }
.main > *:nth-child(n + 5) { animation-delay: 0.2s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .main > * { animation: none; }
  * { transition-duration: 0.01ms !important; }
}

/* ------------------------------------------------------------- header */

.site-head {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--head-h);
  background: var(--head-glass);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border-bottom: 1px solid var(--line);
  z-index: 40;
  transition: transform 0.26s ease;
}
.site-head.is-hidden { transform: translateY(-100%); }

.head-inner {
  max-width: var(--wrap);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand { display: flex; align-items: center; gap: 11px; flex: none; }
.brand-seal {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: var(--grad-accent);
  color: var(--accent-ink);
  font-size: 19px;
  font-weight: 700;
  border-radius: 9px;
  transform: rotate(-4deg);
  box-shadow: var(--shadow-1), inset 0 1px 0 color-mix(in srgb, #fff 25%, transparent);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.brand:hover .brand-seal { transform: rotate(0deg) scale(1.05); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-size: 17.5px; font-weight: 700; letter-spacing: -0.01em; }
.brand-tag {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  margin-top: 2px;
}

.nav { display: flex; gap: 4px; font-size: 14px; }
.nav-link {
  color: var(--muted);
  padding: 7px 13px;
  border-radius: 999px;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-link:hover { color: var(--text); background: var(--fill); }
.nav-link.is-active {
  color: var(--text);
  background: var(--fill-2);
  box-shadow: inset 0 0 0 1px var(--line-2);
}

.head-search { margin-left: auto; position: relative; }
.head-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 15px;
  height: 15px;
  margin-top: -8px;
  stroke: var(--dim);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
  transition: stroke 0.15s ease;
}
.head-search input {
  width: 230px;
  height: 37px;
  padding: 0 14px 0 36px;
  background: var(--fill);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13.5px;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, width 0.2s ease;
}
.head-search input::placeholder { color: var(--dim); }
.head-search input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: var(--fill-2);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
  width: 270px;
}
.head-search:focus-within svg { stroke: var(--accent); }

.head-account {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.head-account::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--grad-accent);
}
.head-account:hover { color: var(--text); border-color: var(--line-2); background: var(--fill); }

@media (max-width: 920px) {
  .nav, .head-search { display: none; }
  .head-account { margin-left: auto; }
  .brand-tag { display: none; }
}

/* -------------------------------------------------- thanh dưới (mobile) */

.tabbar {
  position: fixed;
  inset: auto 0 0 0;
  height: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: none;
  background: var(--head-glass);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border-top: 1px solid var(--line);
  z-index: 40;
}
.tabbar .tab {
  flex: 1;
  display: grid;
  place-items: center;
  gap: 3px;
  color: var(--dim);
  font-size: 10px;
  position: relative;
  transition: color 0.15s ease;
}
.tabbar .tab.is-active { color: var(--accent); }
.tabbar .tab.is-active::before {
  content: "";
  position: absolute;
  top: 0;
  width: 22px;
  height: 2px;
  border-radius: 99px;
  background: var(--grad-accent);
}
.tabbar svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; }
@media (max-width: 920px) { .tabbar { display: flex; } }
@media (min-width: 921px) { body { padding-bottom: 0; } }

/* ---------------------------------------------------------- khối đề cử */

.hero {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 290px;
  margin-bottom: 26px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--bg-2);
  box-shadow: var(--shadow-2);
  isolation: isolate;
}
.hero-art {
  position: absolute;
  inset: 0;
  background-image: var(--hero-art);
  background-size: cover;
  background-position: center 22%;
  opacity: 0.9;
  transform: scale(1.02);
  transition: transform 0.6s cubic-bezier(0.22, 0.8, 0.36, 1);
  z-index: -2;
}
.hero:hover .hero-art { transform: scale(1.06); }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg,
      color-mix(in srgb, var(--bg) 96%, transparent) 0%,
      color-mix(in srgb, var(--bg) 86%, transparent) 36%,
      color-mix(in srgb, var(--bg) 22%, transparent) 66%,
      color-mix(in srgb, var(--bg) 4%, transparent) 100%),
    linear-gradient(0deg, color-mix(in srgb, var(--bg) 88%, transparent), transparent 64%);
  z-index: -1;
}
.hero-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  max-width: 60%;
  padding: 34px 32px;
}
.hero-title {
  font-size: 38px;
  line-height: 1.06;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.hero-sub { font-size: 14.5px; color: color-mix(in srgb, var(--text) 80%, transparent); }
.hero-latest {
  font-size: 13px;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: blur(6px);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hero-cta {
  margin-top: 12px;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 22px;
  background: var(--grad-accent);
  color: var(--accent-ink);
  font-size: 14.5px;
  font-weight: 700;
  border-radius: 999px;
  box-shadow: var(--shadow-1), 0 6px 22px color-mix(in srgb, var(--accent) 26%, transparent);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.hero:hover .hero-cta {
  transform: translateY(-1px);
  box-shadow: var(--shadow-2), 0 10px 30px color-mix(in srgb, var(--accent) 34%, transparent);
}
.hero-cta em { font-style: normal; transition: transform 0.18s ease; }
.hero:hover .hero-cta em { transform: translateX(3px); }

@media (max-width: 720px) {
  .hero { min-height: 232px; border-radius: var(--r-l); }
  .hero::after {
    background:
      linear-gradient(0deg,
        color-mix(in srgb, var(--bg) 97%, transparent) 10%,
        color-mix(in srgb, var(--bg) 62%, transparent) 56%,
        color-mix(in srgb, var(--bg) 30%, transparent)),
      linear-gradient(90deg, color-mix(in srgb, var(--bg) 75%, transparent), transparent 72%);
  }
  .hero-body { max-width: 100%; padding: 22px 20px; }
  .hero-title { font-size: 28px; }
}

/* -------------------------------------------------------------- mục */

.sec { margin: 34px 0; }
.sec-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.sec-title {
  font-size: 21px;
  position: relative;
  padding-left: 14px;
}
.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 18px;
  margin-top: -9px;
  border-radius: 99px;
  background: var(--grad-accent);
}
.sec-more {
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: 0;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.15s ease;
}
.sec-more:hover { color: var(--accent-2); }
.sec-note { margin: -4px 0 14px; color: var(--muted); font-size: 13px; }

/* ------------------------------------------------------- dòng truyện */

.list { display: flex; flex-direction: column; }

.row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: var(--row-h);
  padding: var(--row-pad) 12px var(--row-pad) 8px;
  border-radius: var(--r-m);
  border-bottom: 1px solid var(--line);
  transition: background 0.16s ease;
}
.row:last-child { border-bottom-color: transparent; }
.row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 0;
  border-radius: 99px;
  background: var(--grad-accent);
  transform: translateY(-50%);
  transition: height 0.18s ease;
}
.row:hover { background: var(--fill); }
.row:hover::before { height: 62%; }

.row-art {
  flex: none;
  width: var(--art-w);
  height: var(--art-h);
  overflow: hidden;
  background: var(--bg-3);
  border-radius: 7px;
  box-shadow: var(--shadow-1);
  transition: transform 0.2s cubic-bezier(0.22, 0.8, 0.36, 1), box-shadow 0.2s ease;
}
.row:hover .row-art { transform: scale(1.04); box-shadow: var(--shadow-2); }
.row-art img { width: 100%; height: 100%; object-fit: cover; }

.row-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.row-title {
  font-size: var(--row-title);
  font-weight: 600;
  line-height: 1.28;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.row:hover .row-title { color: var(--accent-2); }
.row-sub {
  font-size: var(--row-sub);
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row-right {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}
.row-time {
  color: color-mix(in srgb, var(--text) 74%, transparent);
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--fill);
  font-size: 11.5px;
  white-space: nowrap;
}
.row-total {
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  color: var(--dim);
  white-space: nowrap;
}

.stat { display: flex; flex-direction: column; align-items: flex-end; font-size: 16px; }
.stat small { font-size: 11px; color: var(--muted); }
.rank {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 6px;
  border-radius: 10px;
  font-family: var(--cond);
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  background: var(--fill);
  box-shadow: inset 0 0 0 1px var(--line);
}
.rank-1 { color: var(--accent-ink); background: var(--grad-accent); box-shadow: var(--shadow-1); }
.rank-2 { color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }
.rank-3 { color: var(--accent-2); background: color-mix(in srgb, var(--accent) 9%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent); }

.density { margin-left: auto; display: flex; gap: 6px; }
.density button {
  background: var(--fill);
  border: 1px solid var(--line-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.density button.is-active {
  color: var(--accent-2);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
}

/* ------------------------------------------------------------- thẻ */

.cards { display: grid; gap: 14px; }
@media (min-width: 760px) { .cards { grid-template-columns: 1fr 1fr; } }

.card {
  position: relative;
  display: flex;
  gap: 15px;
  padding: 15px;
  background: linear-gradient(165deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  box-shadow: var(--shadow-1);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}
.card-art {
  flex: none;
  width: 96px;
  height: 134px;
  overflow: hidden;
  border-radius: 9px;
  box-shadow: var(--shadow-2);
  transition: transform 0.22s cubic-bezier(0.22, 0.8, 0.36, 1);
}
.card:hover .card-art { transform: scale(1.03) rotate(0.4deg); }
.card-art img { width: 100%; height: 100%; object-fit: cover; }
.card-main { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.card-title { font-size: 17.5px; font-weight: 700; line-height: 1.22; }
.card-sub { font-size: 12.5px; color: var(--muted); }
.card-desc {
  font-family: var(--serif);
  font-size: 12.8px;
  line-height: 1.55;
  color: color-mix(in srgb, var(--text) 78%, transparent);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Thanh tiến độ dịch: mảnh, chỉ hiện khi biết tổng nguồn. */
.progress { margin-top: auto; display: flex; flex-direction: column; gap: 4px; }
.progress-track {
  height: 4px;
  border-radius: 99px;
  background: var(--fill-2);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  border-radius: 99px;
  background: var(--grad-accent);
  transition: width 0.4s ease;
}
.progress-label { font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.card .chips { margin-top: 0; }
.chips-wrap { margin-bottom: 8px; }
.chip {
  font-size: 11.5px;
  font-weight: 500;
  padding: 3.5px 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--muted);
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.chip-state {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}
.chip-link:hover {
  border-color: var(--accent);
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.chip b { color: var(--accent); font-weight: 600; }
.chip-off { opacity: 0.38; }

/* ------------------------------------------------------- trang truyện */

.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: 30px; margin-bottom: 5px; letter-spacing: -0.02em; }

.novel-head {
  position: relative;
  display: flex;
  gap: 24px;
  padding: 26px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--bg-2);
  box-shadow: var(--shadow-2);
  isolation: isolate;
}
.novel-backdrop {
  position: absolute;
  inset: 0;
  background-image: var(--hero-art);
  background-size: cover;
  background-position: center 25%;
  filter: blur(30px) saturate(0.85);
  opacity: 0.38;
  transform: scale(1.2);
  z-index: -2;
}
.novel-head::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--bg) 68%, transparent),
    color-mix(in srgb, var(--bg) 93%, transparent));
  z-index: -1;
}
.novel-cover {
  width: 138px;
  height: 193px;
  object-fit: cover;
  flex: none;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, calc(var(--art-shade) * 1.4)),
    0 0 0 1px color-mix(in srgb, var(--text) 12%, transparent);
}
.novel-meta { min-width: 0; flex: 1; }
.novel-title { font-size: 32px; line-height: 1.1; letter-spacing: -0.022em; }
.novel-author {
  margin: 7px 0 12px;
  color: color-mix(in srgb, var(--text) 78%, transparent);
  font-size: 14.5px;
  font-family: var(--serif);
  font-style: italic;
}

.stats { display: flex; margin: 14px 0 6px; }
.stats .stat {
  align-items: flex-start;
  font-size: 22px;
  font-weight: 700;
  padding-right: 22px;
  margin-right: 22px;
  border-right: 1px solid var(--line-2);
  font-variant-numeric: tabular-nums;
}
.stats .stat:last-child { border-right: 0; margin-right: 0; padding-right: 0; }

.novel-progress { max-width: 420px; margin: 2px 0 14px; }

.cta { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 20px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--fill);
  color: var(--text);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}
.btn:hover { border-color: color-mix(in srgb, var(--accent) 50%, transparent); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--grad-accent);
  border: 0;
  color: var(--accent-ink);
  box-shadow: var(--shadow-1), 0 6px 20px color-mix(in srgb, var(--accent) 24%, transparent);
}
.btn-primary:hover {
  background: var(--grad-accent);
  box-shadow: var(--shadow-2), 0 10px 28px color-mix(in srgb, var(--accent) 32%, transparent);
}
.btn-ghost { background: none; }
.btn.is-off { opacity: 0.3; pointer-events: none; }

.tabs { display: flex; gap: 6px; margin: 22px 0 18px; border-bottom: 1px solid var(--line); }
.tab-link {
  padding: 10px 16px;
  margin-bottom: -1px;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.tab-link:hover { color: var(--text); background: var(--fill); }
.tab-link.is-active { color: var(--text); border-bottom-color: var(--accent); }

@media (max-width: 600px) {
  .novel-head { flex-direction: column; gap: 16px; padding: 20px; border-radius: var(--r-l); }
  .novel-cover { width: 106px; height: 148px; }
  .novel-title { font-size: 25px; }
  .stats .stat { font-size: 18px; padding-right: 16px; margin-right: 16px; }
}

/* ---------------------------------------------------------- mục lục */

.ch-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.ch-count { font-size: 13px; color: var(--muted); }
.ch-order { font-size: 13px; font-weight: 600; color: var(--accent); }
.ch-jump { display: flex; gap: 7px; margin-left: auto; }
.ch-jump input {
  width: 130px;
  height: 36px;
  padding: 0 12px;
  background: var(--fill);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ch-jump input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 13%, transparent);
}
.ch-jump button {
  height: 36px;
  padding: 0 16px;
  background: var(--fill);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.ch-jump button:hover { border-color: var(--accent); color: var(--accent); }

.lots { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
.lot {
  font-size: 12px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.lot:hover { border-color: var(--line-2); color: var(--text); background: var(--fill); }
.lot.is-active {
  border-color: transparent;
  color: var(--accent-ink);
  background: var(--grad-accent);
  font-weight: 600;
}

.ch-list { display: grid; }
@media (min-width: 760px) { .ch-list { grid-template-columns: 1fr 1fr; column-gap: 28px; } }
.ch {
  display: flex;
  gap: 12px;
  padding: 9px 8px;
  border-radius: var(--r-s);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  transition: background 0.13s ease;
}
.ch:hover { background: var(--fill); }
.ch-no { color: var(--dim); font-variant-numeric: tabular-nums; min-width: 46px; }
.ch-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch:hover .ch-title { color: var(--accent-2); }
.ch.is-read .ch-title { color: var(--dim); }
.ch.is-read .ch-no { color: var(--accent); }
.ch.is-read .ch-no::after { content: " ·"; }

/* --------------------------------------------------------- trang đọc */
/* Dựng theo đúng số đo lấy từ CSS của TruyenYY:
     khung  .flex.flex-col.w-full.lg:w-[900px].m-auto.p-2   -> 900px, lề 8px
     chữ    .font-[Lora].text-lg                            -> Lora 18px / dòng 28px
     đoạn   .gap-2 + <p></p> rỗng xen giữa                   -> cách nhau 16px
     tiêu đề .font-bold.text-2xl.font-title                  -> Roboto Condensed 700, 24px/32px
     canh lề: trái (CSS của YY không có justify ở đâu cả)
   Nền mặc định: trắng. */

body.is-reader {
  padding-bottom: 0;
  background: var(--r-bg, #ffffff);
  color: var(--r-fg, #000000);
}

:root:not([data-reader-theme]),
:root[data-reader-theme="white"] {
  --r-bg: #ffffff; --r-fg: #000000; --r-dim: #6b7280;
  --r-accent: #111827; --r-accent-ink: #ffffff;
}
:root[data-reader-theme="paper"] {
  --r-bg: #faf8f1; --r-fg: #1d1c18; --r-dim: #6b665c;
  --r-accent: #1d1c18; --r-accent-ink: #faf8f1;
}
:root[data-reader-theme="ivory"] {
  --r-bg: #1b1915; --r-fg: #f1eadb; --r-dim: #9d9586;
  --r-accent: var(--accent); --r-accent-ink: var(--accent-ink);
}
:root[data-reader-theme="night"] {
  --r-bg: #101315; --r-fg: #cbc8c1; --r-dim: #7e847f;
  --r-accent: var(--accent); --r-accent-ink: var(--accent-ink);
}
:root[data-reader-theme="ink"] {
  --r-bg: #04070a; --r-fg: #ddd9d0; --r-dim: #828b85;
  --r-accent: var(--accent); --r-accent-ink: var(--accent-ink);
}

.reader {
  --r-size: 18px;
  --r-lh: 1.5556;   /* 28px trên cỡ chữ 18px, đúng text-lg của Tailwind */
  --r-gap: 16px;    /* gap-2 hai lần vì YY có <p> rỗng xen giữa */
  --r-width: 100%;
  --r-align: left;
}
.reader[data-density="normal"] { --r-lh: 1.75; --r-gap: 22px; }
.reader[data-density="roomy"] { --r-size: 19px; --r-lh: 1.95; --r-gap: 28px; }
.reader[data-width="narrow"] { --r-width: 640px; }
.reader[data-width="wide"] { --r-width: 900px; }
.reader[data-width="full"] { --r-width: 100%; }
.reader[data-align="justify"] { --r-align: justify; }

.r-shell {
  max-width: var(--r-width);
  margin: 0 auto;
  padding: 8px 4px 56px;
}

/* Trang đọc không có thanh đầu cố định nên không cần chừa khoảng đỉnh. */
body.is-reader .main { padding-top: 10px; padding-bottom: 0; }

/* Điện thoại: chữ tràn sát hai bên lề (~2px), tận dụng tối đa màn hình. */
@media (max-width: 720px) {
  body.is-reader .main {
    padding-left: max(2px, env(safe-area-inset-left, 0px));
    padding-right: max(2px, env(safe-area-inset-right, 0px));
  }
  .r-shell { padding: 6px 0 48px; }
}

.r-tools {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px;
  margin-bottom: 14px;
  border: 1px solid color-mix(in srgb, var(--r-fg) 12%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--r-fg) 4%, transparent);
}
.r-tool {
  background: color-mix(in srgb, var(--r-fg) 5%, transparent);
  border: 1px solid color-mix(in srgb, var(--r-fg) 22%, transparent);
  color: var(--r-fg);
  font-size: 13px;
  font-weight: 600;
  padding: 5px 13px;
  border-radius: 999px;
  cursor: pointer;
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.r-tool-novel { margin-right: auto; background: none; border-color: transparent; opacity: 0.72; }
.r-tool-novel:hover { opacity: 1; }
.r-tool-home { padding: 5px 10px; line-height: 0; }
.r-tool-home svg {
  width: 15px;
  height: 15px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.r-tool:hover { border-color: color-mix(in srgb, var(--r-fg) 45%, transparent); background: color-mix(in srgb, var(--r-fg) 8%, transparent); }
.r-tool-novel:hover { border-color: transparent; }

.r-head { margin-bottom: 10px; }
.r-crumb { font-size: 16px; color: var(--r-dim); margin: 0 0 2px; }
.r-title {
  font-family: var(--cond);
  font-size: 24px;
  line-height: 32px;
  font-weight: 700;
  letter-spacing: 0;
}

/* Hàng Trước/Tiếp nằm trong dòng chảy, đúng chỗ YY đặt. */
.r-pager { display: flex; gap: 6px; margin: 12px 0; }
.r-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid color-mix(in srgb, var(--r-fg) 16%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--r-fg) 4%, transparent);
  color: var(--r-fg);
  font-size: 14.5px;
  font-weight: 600;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.r-page:hover { border-color: var(--r-accent); transform: translateY(-1px); }
.r-page-next { background: var(--r-accent); border-color: var(--r-accent); color: var(--r-accent-ink); }
.r-page.is-off { opacity: 0.3; }
.r-pager-end { margin-top: 24px; }

.r-words { font-size: 11px; font-weight: 300; color: var(--r-dim); margin: 0 0 8px; }

.r-text {
  font-family: var(--serif-read);
  font-size: var(--r-size);
  line-height: var(--r-lh);
  text-align: var(--r-align);
  margin-top: 8px;   /* mt-2 */
}
.r-text.is-sans { font-family: var(--sans); }
.r-text p { margin: 0 0 var(--r-gap); text-wrap: pretty; }
.r-text p:last-child { margin-bottom: 0; }

.r-endnav { display: flex; gap: 7px; margin-top: 18px; }
.r-endnav .btn {
  flex: 1;
  background: color-mix(in srgb, var(--r-fg) 5%, transparent);
  border-color: color-mix(in srgb, var(--r-fg) 16%, transparent);
  border-radius: 999px;
  color: var(--r-fg);
}
.r-endnav .btn:hover { border-color: var(--r-accent); }

@media (max-width: 720px) {
  .r-title { font-size: 21px; line-height: 28px; }
  .r-crumb { font-size: 14px; }
}

/* -------------------------------------------------------- bảng trượt */

.sheet {
  position: fixed;
  inset: 0;
  background: rgba(2, 5, 12, 0.62);
  backdrop-filter: blur(4px);
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: sheet-in 0.2s ease;
}
@keyframes sheet-in { from { opacity: 0; } }
.sheet[hidden] { display: none; }
.sheet-inner {
  width: 100%;
  max-width: 580px;
  max-height: 84vh;
  overflow: auto;
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  color: var(--text);
  border: 1px solid var(--line-2);
  border-bottom: 0;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 18px 20px 30px;
  box-shadow: var(--shadow-2);
  animation: sheet-up 0.24s cubic-bezier(0.22, 0.8, 0.36, 1);
}
@keyframes sheet-up { from { transform: translateY(24px); opacity: 0.4; } }
.sheet-head { display: flex; align-items: center; margin-bottom: 16px; }
.sheet-head h2 { font-size: 18px; }
.sheet-head button {
  margin-left: auto;
  background: none;
  border: 0;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.set-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.set-label { font-size: 13px; color: var(--muted); min-width: 96px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button, .stepper button {
  background: var(--fill);
  border: 1px solid var(--line-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.seg button:hover { color: var(--text); border-color: var(--accent); }
.seg button.is-active {
  color: var(--accent-2);
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
}
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button { padding: 6px 15px; }
.stepper button:hover { border-color: var(--accent); color: var(--accent); }
.stepper output { font-size: 13px; min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; }

.idx-list { display: flex; flex-direction: column; margin: 12px 0; }
.idx { display: flex; gap: 12px; padding: 9px 10px; border-radius: var(--r-s); border-bottom: 1px solid var(--line); font-size: 14px; }
.idx:hover { background: var(--fill); }
.idx-no { color: var(--dim); min-width: 46px; font-variant-numeric: tabular-nums; }
.idx-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idx.is-current {
  color: var(--text);
  font-weight: 600;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  box-shadow: inset 3px 0 0 var(--accent);
}
.idx.is-current .idx-no { color: var(--accent); }

/* ------------------------------------------------------------- khác */

.prose {
  max-width: 40rem;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.75;
  color: color-mix(in srgb, var(--text) 88%, transparent);
}
.prose p { margin: 0 0 1em; }

.form { display: flex; flex-direction: column; gap: 14px; max-width: 390px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.form input, .form textarea {
  background: var(--fill);
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  padding: 11px 13px;
  font-size: 15px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form input:focus, .form textarea:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 13%, transparent);
}
.form-error { color: var(--accent); font-size: 13px; margin: 0; }

.searchbox { display: flex; gap: 8px; max-width: 480px; margin-top: 12px; }
.searchbox input {
  flex: 1;
  background: var(--fill);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 16px;
  font-size: 15px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.searchbox input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 13%, transparent);
}
.searchbox button {
  padding: 0 22px;
  background: var(--grad-accent);
  border: 0;
  border-radius: 999px;
  color: var(--accent-ink);
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-1);
}

.empty { text-align: center; padding: 60px 16px; color: var(--muted); }
.empty .seal {
  display: inline-grid;
  place-items: center;
  width: 62px;
  height: 62px;
  background: var(--grad-accent);
  color: var(--accent-ink);
  font-size: 28px;
  font-weight: 700;
  border-radius: 16px;
  transform: rotate(-4deg);
  margin-bottom: 18px;
  box-shadow: var(--shadow-1);
}
.empty-msg { font-size: 18px; font-weight: 600; color: var(--text); margin: 0 0 6px; }
.empty-hint { font-size: 13px; margin: 0; }

.site-foot {
  border-top: 1px solid var(--line);
  margin-top: 56px;
  background: color-mix(in srgb, var(--bg-2) 60%, transparent);
}
.foot-inner { max-width: var(--wrap); margin: 0 auto; padding: 30px var(--gutter) 38px; }
.foot-brand { font-size: 14.5px; margin: 0 0 14px; color: color-mix(in srgb, var(--text) 80%, transparent); }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.foot-links a { transition: color 0.15s ease; }
.foot-links a:hover { color: var(--accent); }
.foot-note { font-size: 12px; color: var(--dim); margin: 18px 0 0; }

/* Bộ chọn tông màu. */
.skin { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 20px 0 0; }
.skin-label { font-size: 12px; color: var(--dim); }
.skin button {
  display: flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12.5px;
  padding: 5px 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.skin button:hover { color: var(--text); border-color: var(--line-2); }
.skin button.is-active { border-color: var(--accent); color: var(--text); }
.skin i { width: 11px; height: 11px; border-radius: 50%; display: block; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2); }


/* ------------------------------------------------- giới thiệu truyện */
.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 238px;
  gap: 32px;
  align-items: start;
}
.intro-text { max-width: none; }
.intro-empty {
  color: var(--dim);
  font-family: var(--serif);
  font-size: 15px;
  font-style: italic;
}
.intro-facts {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  overflow: hidden;
}
.intro-facts .fact {
  display: flex;
  gap: 12px;
  padding: 10px 13px;
  background: var(--bg-2);
  font-size: 13px;
  line-height: 1.5;
}
.intro-facts dt {
  flex: none;
  min-width: 88px;
  color: var(--muted);
}
.intro-facts dd {
  margin: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  .intro-grid { grid-template-columns: 1fr; gap: 20px; }
  .intro-facts { order: -1; }
}

/* Chỉ dành cho trình đọc màn hình và máy tìm kiếm — không hiện trên giao diện. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Dấu ngắt quãng giữa các nút số trang khi danh sách trang quá dài. */
.lot-gap { align-self: center; padding: 0 2px; color: var(--dim); font-size: 12px; }
