/* Đế Chế Tự Do v2 — trang danh sách (tag) + dòng sách (partials/dct-book-row.hbs)
   Canon: Nhận diện — Màu & Chữ v2.0. Đen tuyệt đối, không màu nhấn, Be Vietnam Pro, một cột giữa ~640px.
   Cấm: lưới, thẻ có viền, nút đặc, gradient, bo góc ảnh, pill, glow.
   Backup placeholder cũ: dct-list.css.pre-redesign-20261006 */

/* ── Dòng sách (partials/dct-book-row.hbs + DCTRow.html in player-homepage.js) — variant C, 14/10/2026 ──
   minimal: [cover fixed 75×113 left, text centred] [text link: title (2 lines) / author /
   meta 1 "★ 4.3 · <tag>" / meta 2 "25ph" | "Còn 12ph" (gold) + 70px bar | "25ph · ✓ Đã nghe" (green check)] [side: "…" + round white ▶, side by side, centred].
   Gold only on the score and "Còn Nph". Lock badge on the cover corner. Earlier variants: scratchpad bak/ + notes. */
.dct-row {
  position: relative;
  /* Rev 9 (14/10): text link = display:contents → its lines are grid items. Rows: label / title / author / meta 1 / meta 2.
     Title + author span to the right edge; "…" + ▶ sit in col 3 beside the two meta lines. Cover is absolutely centred in col 1
     (a spanning grid item would stretch the text rows); min-height 113 + align-content:center keeps the text centred on it. */
  display: grid; grid-template-columns: 75px minmax(0, 1fr) auto;
  grid-template-rows: repeat(5, auto); align-content: center;
  column-gap: 12px; align-items: center; min-height: 129px; /* border-box: 113 cover + 2×8 padding */
  padding: 8px 0; /* rows = 113px cover + padding */
  border-bottom: 1px solid var(--rule);
  color: var(--ink); text-decoration: none;
  font-family: 'Be Vietnam Pro', -apple-system, system-ui, sans-serif;
}
.dct-row:hover .dct-row-title { color: #FFFFFF; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.dct-row-cover {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%); z-index: 2; display: block; cursor: pointer;
  width: 75px; height: 113px; /* fixed 2:3 on every list, mobile + desktop */
  background: var(--surface); /* placeholder while the image loads */
  border-radius: 0; box-shadow: none; overflow: hidden;
}
.dct-row-cover img {
  display: block; width: 100%; height: 100%;
  object-fit: cover; border-radius: 0; box-shadow: none; border: 0; margin: 0;
}
.dct-row-cover .dct-lock { position: absolute; top: 4px; right: 4px; z-index: 2; width: 18px; height: 18px; padding: 4px; box-sizing: border-box; color: var(--ink-55); background: rgba(0,0,0,.78); border-radius: 50%; } /* dct-home.js removes it for role mo */
.dct-row-body { display: contents; color: var(--ink); text-decoration: none; }
.dct-row-title::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* whole row → book page (inside the link) */
.dct-row-body:focus-visible .dct-row-title { outline: 1px solid #FFFFFF; outline-offset: 2px; }
.dct-row-body .dct-tag { grid-column: 2 / 4; grid-row: 1; min-width: 0; margin-bottom: 3px; font-size: 10px; }
.dct-row-title { grid-column: 2 / 4; grid-row: 2; min-width: 0; }
.dct-row-author { grid-column: 2 / 4; grid-row: 3; min-width: 0; margin-top: 3px; }
.dct-row-info { grid-column: 2; grid-row: 4; }
.dct-row-sub { grid-column: 2; grid-row: 5; margin-top: 3px; }
.dct-row-title {
  font-size: 18px; line-height: 1.25; font-weight: 600; letter-spacing: -0.005em;
  color: #EFEFEF;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; /* 1 line, full row width */
}
.dct-row-author {
  font-size: 14px; line-height: 1.4; color: var(--ink-55);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dct-row-excerpt { display: none; } /* removed in variant C minimal */
/* Meta line 1: gold "★ 4.3" (rating-widget.js) · primary tag (muted, plain text). No tag → score only; neither → hidden.
   Meta line 2 (.dct-row-sub): "25ph" | "Còn Nph" (gold) + 70px bar | "25ph · ✓ Đã nghe" (green check) — DCTRow.paint. 14/10 rev. */
.dct-row-info, .dct-row-sub {
  display: flex; align-items: center; flex-wrap: nowrap; min-height: 18px; white-space: nowrap; min-width: 0;
  font-size: 13px; line-height: 1.4; color: var(--ink-55); font-variant-numeric: tabular-nums;
}
.dct-row-info { margin-top: 3px; }
.dct-row-info:not(:has(.dct-row-star)):not(:has(.dct-row-tag)) { display: none; }
.dct-row-sub:not(:has(.dct-row-min:not(:empty))) { display: none; }
.dct-row .dct-row-info .book-rating-slot { display: inline-flex; flex: none; justify-content: initial; }
.dct-row .dct-row-info .book-rating-slot:empty { display: none; }
.dct-row .dct-row-star { margin: 0; font-size: 14px; line-height: 1; font-weight: 600; color: var(--star, #E8B04B); white-space: nowrap; }
.dct-row-tag { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dct-row-info .book-rating-slot:not(:empty) + .dct-row-tag::before { content: "·"; margin: 0 6px; }
.dct-row-min:empty { display: none; }
.dct-row-min.is-left { color: var(--star, #E8B04B); font-weight: 600; }
.dct-row-prog { flex: 0 1 70px; min-width: 24px; width: 70px; height: 3px; margin-left: 8px; background: var(--rule); border-radius: 2px; overflow: hidden; }
.dct-row-prog > i { display: block; height: 100%; width: 0; background: var(--ink); }
.dct-row-done { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dct-row-done > b { color: #4CC38A; font-weight: 600; }
.dct-row-done::before { content: "·"; margin: 0 6px; }
.dct-row-prog[hidden], .dct-row-done[hidden] { display: none; }

/* Side: "…" and the round white play side by side, beside the two meta lines (rev 9) */
.dct-row-side {
  grid-column: 3; grid-row: 4 / 6; align-self: center; position: relative; z-index: 2; /* beside meta lines 1–2 */
  display: flex; flex-direction: row; align-items: center; gap: 8px;
}
.dct-row-more {
  margin: 0; padding: 0; width: 24px; height: 32px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; border-radius: 0; box-shadow: none; color: var(--ink-55); cursor: pointer;
  -webkit-appearance: none; appearance: none; -webkit-tap-highlight-color: transparent;
}
.dct-row-more svg { width: 18px; height: 18px; fill: currentColor; }
.dct-row-more:hover { color: var(--ink); }
.dct-row-more:focus-visible { outline: 1px solid #FFFFFF; outline-offset: 2px; }
.dct-row-play {
  margin: 0; flex: none; width: 40px; height: 40px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: #FFFFFF; color: #000000; border: 0; border-radius: 50%; box-shadow: none; cursor: pointer;
  -webkit-appearance: none; appearance: none; -webkit-tap-highlight-color: transparent;
}
.dct-row-play svg { width: 20px; height: 20px; fill: currentColor; margin-left: 2px; }
.dct-row-play:hover { background: #E8E8E8; }
.dct-row-play:active { transform: scale(0.95); }
.dct-row-play:focus-visible { outline: 1px solid #FFFFFF; outline-offset: 3px; }
.dct-row:not(:has(.dct-has-audio)) .dct-row-play { display: none; } /* no audio → the text link is the only action */

/* More sheet opened from a row "…" (dct-app.js floatMore): moved to <body>, fixed over the page instead of inside .gp-popup */
.gp-more-overlay.is-floating { position: fixed; }

@media (min-width: 700px) {
  .dct-row { column-gap: 20px; padding: 14px 0; min-height: 141px; }
  .dct-row-title { font-size: 18px; }
  .dct-row-play { width: 44px; height: 44px; }
  .dct-row-play svg { width: 22px; height: 22px; }
}

/* ── Trang tag ── */
.dct-list {
  background: var(--bg); color: var(--ink);
  font-family: 'Be Vietnam Pro', -apple-system, system-ui, sans-serif;
  padding: 0 16px 160px;
}
.dct-list-head { max-width: 640px; margin: 0 auto; padding: 96px 0 56px; text-align: center; }
.dct-list-label {
  margin: 0 0 20px;
  font-size: 14px; font-weight: 400; text-transform: uppercase; letter-spacing: 0.45em;
  color: var(--ink-55);
}
.dct-list-title {
  margin: 0;
  font-size: 52px; line-height: 1.1; font-weight: 800; letter-spacing: -0.025em;
  color: #EFEFEF; font-style: normal; text-wrap: balance;
}
.dct-list-sub { margin: 20px auto 0; font-size: 18px; line-height: 1.6; color: #E8E8E8; }
.dct-list-count { margin: 16px 0 0; font-size: 15px; color: var(--ink-55); }

/* Ô tìm: trần, chỉ kẻ 1px dưới */
.dct-list-search { position: relative; max-width: 420px; margin: 40px auto 0; text-align: left; }
.dct-list-q {
  width: 100%; padding: 10px 0; margin: 0;
  background: transparent; color: var(--ink);
  border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; box-shadow: none; outline: none;
  font: 400 16px/1.4 'Be Vietnam Pro', -apple-system, system-ui, sans-serif;
  -webkit-appearance: none; appearance: none;
}
.dct-list-q::placeholder { color: var(--ink-35); }
.dct-list-q:focus { border-bottom-color: #FFFFFF; box-shadow: none; }
.dct-list-q::-webkit-search-cancel-button { filter: invert(1); opacity: .5; }
.dct-list-results {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 20;
  background: var(--bg); padding: 8px 0;
  display: flex; flex-direction: column;
}
.dct-list-results[hidden] { display: none; }
.dct-list-results a, .dct-list-results span {
  padding: 8px 0; font-size: 15px; color: var(--ink); text-decoration: none;
}
.dct-list-results a:hover { color: #FFFFFF; text-decoration: underline; text-underline-offset: 4px; }
.dct-list-results span { color: var(--ink-55); }

/* Danh sách: một cột. Ghi đè rule .tag-posts cũ trong player.css (grid/gap/padding !important trên mobile). */
.dct-list-body { max-width: 640px; margin: 0 auto; }
.dct-list-rows.tag-posts { display: block !important; padding: 0 !important; gap: 0 !important; border-top: 1px solid var(--rule); }
.dct-list-rows.tag-posts > .dct-row { border-bottom: 1px solid var(--rule) !important; }

/* Thanh sort (dct-catalog.js): link chữ, mục đang chọn trắng + gạch chân. Không pill/nút đặc. */
.dct-list-sort {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px;
  margin: 0 0 20px; padding: 0;
}
.dct-list-sort[hidden] { display: none; }
.dct-list-sort-btn {
  background: none; border: 0; border-radius: 0; box-shadow: none; padding: 6px 0; margin: 0; cursor: pointer;
  font: 400 14px/1.4 'Be Vietnam Pro', -apple-system, system-ui, sans-serif;
  color: var(--ink-55); -webkit-appearance: none; appearance: none;
}
.dct-list-sort-btn:hover { color: var(--ink); }
.dct-list-sort-btn.is-active {
  color: #FFFFFF; font-weight: 600;
  text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px;
}
.dct-list-sort-btn:focus-visible { outline: 1px solid #FFFFFF; outline-offset: 4px; }
.dct-list-more-wrap[hidden] { display: none; }

/* Xem thêm: link chữ, không nút */
.dct-list-more-wrap { margin: 48px 0 0; text-align: center; color: var(--ink-55); font-size: 15px; }
.dct-list-more {
  font-size: 15px; font-weight: 600; color: #FFFFFF;
  text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px;
  background: none; border: 0; padding: 0;
}
.dct-list-more:hover { text-decoration-thickness: 2px; }
.dct-list-empty { padding: 48px 0; text-align: center; color: var(--ink-55); font-size: 16px; }
.dct-list-empty a { color: #FFFFFF; text-decoration: underline; text-underline-offset: 4px; }

.dct-visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (max-width: 639px) {
  .dct-list-head { padding: 64px 0 40px; }
  .dct-list-title { font-size: 36px; }
  .dct-list-sub { font-size: 16px; }
  .dct-list-sort { gap: 2px 16px; }
  .dct-list-sort-btn { font-size: 13px; }
}

/* ── Trang tất cả chủ đề (/tags/ — page-tags.hbs) ── */
.dct-tags-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.dct-tags-rows > li { margin: 0; padding: 0; border-bottom: 1px solid var(--rule); }
.dct-tags-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  padding: 18px 0;
  color: var(--ink); text-decoration: none;
  font-family: 'Be Vietnam Pro', -apple-system, system-ui, sans-serif;
}
.dct-tags-name { font-size: 20px; line-height: 1.35; font-weight: 800; color: #FFFFFF; min-width: 0; }
.dct-tags-count { flex: none; font-size: 14px; color: var(--ink-55); white-space: nowrap; }
.dct-tags-row:hover .dct-tags-name,
.dct-tags-row:focus-visible .dct-tags-name { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.dct-tags-row:focus-visible { outline: 1px solid #FFFFFF; outline-offset: 2px; }

@media (max-width: 639px) {
  .dct-tags-row { padding: 16px 0; gap: 16px; }
  .dct-tags-name { font-size: 18px; }
}

/* ── EXPERIMENT 12/10/2026 (home only): category tile instead of cover image ──
   Markup: span.dct-row-cat[data-tag=<primary_tag slug>] inside .dct-row-cover (partial catcover=true, dct-home.js free rows).
   Families + bottom colours = TINTS / TAG_TO_TINT in scripts/gen-cover.py; --k = light accent of the same hue.
   Turn off: remove catcover=true in index.hbs (2x) + revert the cat block in dct-home.js. Unknown slug → "other". */
.dct-row-cat {
  --g: #963434; --k: #FFB4B4; /* other (red) = default */
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 6px; box-sizing: border-box; text-align: center;
  background: linear-gradient(180deg, #121212 0%, var(--g) 100%);
  color: var(--k);
  font: 700 11px/1.2 'Be Vietnam Pro', -apple-system, system-ui, sans-serif;
  letter-spacing: 0.04em; text-transform: uppercase;
  overflow-wrap: anywhere; hyphens: auto;
}
.dct-cat-business,
.dct-row-cat:is([data-tag="kinh-doanh"], [data-tag="khoi-nghiep"], [data-tag="tiep-thi"], [data-tag="ban-hang"], [data-tag="quan-ly-lanh-dao"],
  [data-tag="su-nghiep-thanh-cong"], [data-tag="nang-suat"], [data-tag="truyen-thong"]) { --g: #B07020; --k: #FFD08A; }
.dct-cat-mind,
.dct-row-cat:is([data-tag="tam-ly-hoc"], [data-tag="triet-hoc"], [data-tag="phat-trien-ban-than"], [data-tag="dong-luc"], [data-tag="giao-tiep"],
  [data-tag="moi-quan-he"], [data-tag="tam-linh"]) { --g: #8040A0; --k: #E2B8FF; }
.dct-cat-health,
.dct-row-cat:is([data-tag="suc-khoe"], [data-tag="am-thuc"]) { --g: #288C60; --k: #A8F0C8; }
.dct-cat-money,
.dct-row-cat:is([data-tag="tai-chinh"], [data-tag="kinh-te"]) { --g: #A88A28; --k: #FFE48A; }
.dct-cat-story,
.dct-row-cat:is([data-tag="tieu-su-hoi-ky"], [data-tag="lich-su"], [data-tag="tieu-thuyet"], [data-tag="chinh-tri"], [data-tag="van-hoa-xa-hoi"],
  [data-tag="nghe-thuat-thiet-ke"]) { --g: #365CAA; --k: #B4CCFF; }
.dct-cat-other,
.dct-row-cat:is([data-tag="khoa-hoc"], [data-tag="cong-nghe"], [data-tag="giao-duc"], [data-tag="nuoi-day-con-cai"], [data-tag="phong-cach-song"]) { --g: #963434; --k: #FFB4B4; }
