/* kd+04 — style theo M Core (brand/shell/shell.css, the-m) */
:root {
  --n1: #26292c; --n2: #34373b; --n3: #4a4c4e; --n4: #6e6a63; --n5: #9a9488; --n6: #cdc4b3; --n8: #fcf9f3;
  --accent: #bfa06a;
  --bg: var(--n1); --text: var(--n6); --ink: var(--n8); --mute: var(--n5); --dim: var(--n4);
  --line: var(--n3); --surface: var(--n2);
  --gap: 4px;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 300;
}
html[data-theme="light"] {
  --bg: var(--n8); --text: var(--n2); --ink: var(--n1); --mute: var(--n4); --dim: var(--n5);
  --line: var(--n6); --surface: #ebe3d5;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { min-height: 100vh; -webkit-text-size-adjust: 100%; }
a { color: inherit; text-decoration: none; }
img { display: block; }

/* Khung nội dung: 1172 trừ lề 36 (dưới 640px lề 20) */
.in { width: 100%; max-width: 1172px; margin: 0 auto; padding: 0 36px; }
@media (max-width: 639.98px) { .in { padding: 0 20px; } }

/* ---- Header: hàng logo 67px (mobile 59px) + kẻ + hàng menu 37px ---- */
.top { position: sticky; top: 0; z-index: 10; background: var(--bg); view-transition-name: mc-head; }
.bar { height: 67px; }
.bar .in { height: 100%; display: flex; align-items: center; justify-content: space-between; }
@media (max-width: 640px) { .bar { height: 59px; } }

/* Logo: chữ riêng từng mục, con trỏ vàng là một "nấc" trong chữ */
.wm { display: flex; align-items: center; font-size: 20px; line-height: 1; white-space: nowrap; color: inherit; }
.wm i { font-style: normal; font-weight: 200; color: var(--text); }
.wm b { font-weight: 500; color: var(--ink); }
.wm svg { display: block; height: 9px; width: 9px; margin: 0 2px; fill: var(--accent); flex: none; }
.wm u { display: inline-block; width: 5px; height: 20px; margin-left: 4px; background: var(--accent);
  animation: blink 1.1s steps(1) infinite; flex: none; }
.run .wm u { animation: none !important; }
@media (max-width: 640px) {
  .wm { font-size: 13px; }
  .wm svg { width: 7px; height: 7px; }
  .wm u { width: 3.5px; height: 13px; }
}
@keyframes blink { 50% { opacity: 0; } }

.theme {
  font: inherit; font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--mute); background: none; border: 0; cursor: pointer; padding: 8px 0;
}
.theme:hover { color: var(--ink); }

/* Menu: vạch kẻ trên hàng menu chạy hết chiều ngang, mục đang chọn có vạch vàng và chữ sáng */
.menu { position: relative; height: 37px; padding-top: 1px; }
.menu::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line);
  box-shadow: 0 0 0 100vmax var(--line); clip-path: inset(0 -100vmax); }
.menu .in { display: flex; gap: 28px; height: 100%; }
.menu a { position: relative; font-size: 11px; letter-spacing: .18em; line-height: 36px; text-transform: uppercase;
  white-space: nowrap; color: var(--mute); }
.menu a::before { content: ""; position: absolute; inset: 0 -14px; }
.menu a:hover, .menu a[aria-current] { color: var(--ink); }
.menu .ind { position: absolute; left: 0; right: .18em; top: -2px; height: 2px; background: var(--accent);
  view-transition-name: mc-ind; }
@media (max-width: 640px) { .menu .in { gap: min(28px, calc((100vw - 262px) / 3)); } }

/* Chuyển trang: vạch vàng trượt sang mục mới, header đứng yên (như M Core) */
@view-transition { navigation: auto; }
::view-transition-old(mc-head) { display: none; }
::view-transition-new(mc-head) { animation: none; }
::view-transition-group(mc-ind) { animation-duration: .35s; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .25s; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* ---- Nội dung ---- */
main { padding: 0 36px 32px; max-width: 1172px; margin: 0 auto; }
@media (max-width: 640px) { main { padding: 0 20px 32px; } }
.page-title { font-size: 20px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ink);
  margin: 40px 0 16px; }
.empty { color: var(--text); }
.crumb { font-size: 13px; margin-bottom: 4px; }
.crumb a { color: var(--accent); }

/* ---- Trang chủ kiểu showcase: thumbnail cao 4, ngang 3; 4 mục mỗi hàng (2 hàng trên điện thoại) ---- */
.showcase { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px 12px; grid-template-columns: repeat(2, 1fr); }
.show-item { display: block; }
.show-card { display: block; width: 100%; aspect-ratio: 3 / 4; background: var(--surface); overflow: hidden; }
.show-card img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.show-item:hover .show-card img, .show-item:focus-visible .show-card img { opacity: .8; }
.showcase .text { display: flex; flex-direction: column; gap: 3px; padding-top: 8px; min-width: 0; }
.showcase .kicker { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--mute); }
.showcase .name { color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.showcase .sub { font-size: 12px; color: var(--text); }
@media (min-width: 720px) {
  .showcase { grid-template-columns: repeat(4, 1fr); gap: 24px 16px; }
}

/* ---- Danh sách hoạt động ---- */
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.row { display: flex; align-items: center; gap: 14px; background: var(--surface); border-radius: 4px; padding: 10px; }
.row:hover { background: var(--n3); }
.row .thumb { width: 72px; height: 72px; flex: none; background: var(--bg); overflow: hidden; border-radius: 3px; }
.row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.row .text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.row .kicker { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--mute); }
.row .name { color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.row .sub { font-size: 12px; color: var(--text); }

/* ---- Lưới album ---- */
.albums { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
.album-card { display: block; }
.cover { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--surface); overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.meta { display: flex; flex-direction: column; gap: 2px; padding-top: 8px; }
.name { font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.count { font-size: 12px; color: var(--text); }
.album-card:hover .name, .album-card:focus-visible .name { color: var(--accent); }

/* ---- Lưới thumb ---- */
.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap); grid-template-columns: repeat(3, 1fr); }
.grid li { display: block; }
.tile { position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0;
  background: var(--surface); cursor: pointer; overflow: hidden; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; right: 6px; bottom: 6px; font-size: 11px; line-height: 1;
  color: var(--n8); background: rgba(38, 41, 44, 0.75); padding: 4px 6px; border-radius: 3px; }

/* Trang Video: thẻ 16:9, to gấp đôi lưới ảnh, 2 cột (1 cột trên điện thoại), khoảng cách 8px */
.grid.videos { grid-template-columns: 1fr; gap: 8px; }
.grid.videos .tile { aspect-ratio: 16 / 9; }
.grid.videos li { display: block; }
.vname { display: block; padding-top: 6px; font-size: 12px; color: var(--text); overflow-wrap: anywhere; }
@media (min-width: 720px) {
  .grid.videos { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 720px) {
  .albums { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .grid { grid-template-columns: repeat(5, 1fr); }
}
@media (min-width: 1000px) {
  .grid { grid-template-columns: repeat(6, 1fr); }
}

/* ---- Lightbox ---- */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(20, 22, 24, 0.97);
  display: flex; align-items: center; justify-content: center; touch-action: pan-y; }
.lightbox[hidden] { display: none; }
.lb-stage { max-width: 100%; max-height: 100%; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center; padding: 56px 8px; }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb-close { position: absolute; top: 8px; right: 12px; font-size: 32px; line-height: 1;
  color: var(--n8); background: none; border: 0; cursor: pointer; padding: 6px 10px; z-index: 2; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); font-size: 40px; line-height: 1;
  color: var(--n8); background: rgba(38, 41, 44, 0.5); border: 0; cursor: pointer;
  padding: 8px 14px; z-index: 2; border-radius: 4px; }
.lb-nav.prev { left: 6px; }
.lb-nav.next { right: 6px; }
.lb-count { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; font-size: 13px; color: var(--n6); }
@media (max-width: 640px) { .lb-nav { display: none; } }
