/* Mìn Thích Làm Vlog — giao diện sáng.
   Màu và font nằm trong khối :root bên dưới. Muốn đổi màu nhấn, sửa --sun (vàng nắng) và --lagoon (xanh hồ). */

:root {
  --bg: #ffffff;
  --paper: #f2faf8;        /* nền xanh bạc hà rất nhạt cho các khối phụ */
  --ink: #12292e;          /* chữ chính */
  --muted: #4b6166;        /* chữ phụ */
  --line: #dbe9e6;
  --line-2: #c3d8d4;
  --sun: #ffb41f;          /* màu nhấn chính: nút, gạch chân */
  --sun-deep: #f5a000;
  --sun-tint: #fff3d1;
  --lagoon: #0b7a7a;       /* liên kết */
  --lagoon-deep: #085e5f;
  --lagoon-tint: #e2f4f1;
  --danger: #b3261e;
  --danger-tint: #fdeceb;
  --ok: #17724d;
  --ok-tint: #e3f5ec;

  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 72rem;
  --read: 44rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --radius: 1rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink);
  font: 400 1rem/1.65 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
main { flex: 1 0 auto; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
[id] { scroll-margin-top: 5rem; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--lagoon); outline-offset: 2px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: .7rem 1.1rem; border-radius: .6rem; background: var(--ink); color: #fff; font-weight: 600; text-decoration: none; }
.skip:focus { top: 1rem; }

/* Ẩn nội dung một nhịp khi người xem chọn tiếng Anh, để không thấy chữ Việt nhấp nháy */
.i18n-pending body { visibility: hidden; }

/* Nội dung hai ngôn ngữ trong cùng một bài */
html:not([data-lang="en"]) [data-only="en"], html[data-lang="en"] [data-only="vi"] { display: none; }

/* ---------- Chữ ---------- */
h1, h2, h3 { margin: 0; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
.h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.muted { color: var(--muted); }
.hint { margin: .4rem 0 0; font-size: .875rem; line-height: 1.5; color: var(--muted); }
.hint a, .form-alt a, .muted a, .prose a, .steps a { color: var(--lagoon); text-underline-offset: .18em; }
.hint a:hover, .form-alt a:hover, .muted a:hover, .prose a:hover, .steps a:hover { color: var(--lagoon-deep); }

/* ---------- Nút ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .8rem 1.4rem;
  border: 1px solid transparent; border-radius: .75rem; font: 600 1rem/1.2 var(--font); text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn--primary { background: var(--sun); color: var(--ink); }
.btn--primary:hover { background: var(--sun-deep); }
.btn--ghost { background: #fff; border-color: var(--line-2); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--sm { padding: .65rem 1.15rem; font-size: .95rem; }
.btn--xs { padding: .4rem .85rem; font-size: .85rem; border-radius: .6rem; }
.btn:disabled { opacity: .6; cursor: default; }

/* ---------- Đầu trang ---------- */
.site-header { position: relative; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding-block: .75rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; margin-right: auto; text-decoration: none; }
.brand__mark { flex: none; width: 2.75rem; height: 2.75rem; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); }
.brand__name { font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; white-space: nowrap; }
/* Điện thoại hẹp (≤ 376px): thu nhỏ một chút để nút VI / EN còn nằm cùng hàng với tên trang. */
@media (max-width: 23.5rem) {
  .brand { gap: .5rem; }
  .brand__mark { width: 2.5rem; height: 2.5rem; }
  .brand__name { font-size: 1rem; }
}
.nav { display: flex; flex-wrap: wrap; gap: .1rem .25rem; order: 3; width: 100%; }
.nav a, .nav-logout {
  padding: .4rem .55rem; border: 0; background: none; border-radius: .5rem; cursor: pointer;
  color: var(--muted); font: 500 .95rem/1.5 var(--font); text-decoration: none; white-space: nowrap; transition: color .15s;
}
.nav a:hover, .nav-logout:hover { color: var(--ink); }
.nav a[aria-current="page"], .nav a.is-active { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--sun); text-decoration-thickness: 3px; text-underline-offset: .45em; }

.lang-switch { display: none; padding: .15rem; border: 1px solid var(--line-2); border-radius: 999px; }
.js .lang-switch { display: inline-flex; }
.lang-switch button { min-width: 2.5rem; padding: .35rem .6rem; border: 0; border-radius: 999px; background: none; cursor: pointer; color: var(--muted); font: 700 .78rem/1.2 var(--font); letter-spacing: .04em; }
.lang-switch button:hover { color: var(--ink); }
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: #fff; }

@media (min-width: 48rem) {
  .site-header { position: sticky; top: 0; }
  .nav { order: 0; width: auto; }
  .nav a, .nav-logout { padding: .4rem .7rem; }
  .brand__name { font-size: 1.25rem; }
}

/* ---------- Trang chủ: dải ảnh chạy ở đầu trang ---------- */
.showcase { padding-top: clamp(1rem, 3vw, 1.75rem); }
.showcase__stage { position: relative; overflow: hidden; aspect-ratio: 16 / 10; border-radius: 1.5rem; background: var(--paper); touch-action: pan-y; }
@media (min-width: 40rem) { .showcase__stage { aspect-ratio: 2.4 / 1; } }
@media (min-width: 64rem) { .showcase__stage { aspect-ratio: 3 / 1; } }
.showcase__slides { position: absolute; inset: 0; }
.slide { position: absolute; inset: 0; visibility: hidden; opacity: 0; }
.slide.is-active { z-index: 1; visibility: visible; opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .slide { transition: opacity .7s ease, visibility 0s linear .7s; }
  .slide.is-active { transition-delay: 0s; }
}
/* Có JavaScript thì chờ dải ảnh xếp xong thứ tự ngẫu nhiên rồi mới hiện, để ảnh không nháy. */
.js .showcase:not(.is-ready) .slide.is-active { opacity: 0; transition: none; }
.slide__link { position: relative; display: block; width: 100%; height: 100%; color: #fff; text-decoration: none; }
.slide__link:focus-visible { outline: 4px solid var(--sun); outline-offset: -8px; }
.slide__img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; }
.slide__caption { position: absolute; inset: auto 0 0; display: flex; flex-direction: column; gap: .3rem; padding: 3.5rem clamp(1rem, 3vw, 1.75rem) clamp(1rem, 2.5vw, 1.5rem); background: linear-gradient(to top, rgba(8, 28, 32, .78), rgba(8, 28, 32, 0)); }
.slide__where { display: inline-flex; align-items: center; gap: .5rem; font-size: .9rem; font-weight: 600; }
.slide__title { max-width: 26ch; font-size: clamp(1.25rem, 3.2vw, 2rem); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }
.slide__link:hover .slide__title { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--sun); text-underline-offset: .2em; }
.slide .badge { position: absolute; top: .75rem; left: .75rem; }
.showcase__controls { position: absolute; top: .75rem; right: .75rem; z-index: 2; display: flex; gap: .4rem; }
.showcase__btn { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; padding: 0; border: 0; border-radius: 50%; background: #fff; color: var(--ink); cursor: pointer; }
.showcase__btn:hover { background: var(--sun); }
.showcase__btn svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.showcase__toggle .i-play, .showcase__toggle[data-state="paused"] .i-pause { display: none; }
.showcase__toggle[data-state="paused"] .i-play { display: block; fill: currentColor; stroke-width: 1.6; }
.showcase + .hero { padding-top: clamp(2rem, 5vw, 3.5rem); }

/* ---------- Trang chủ: phần mở đầu ---------- */
.hero { padding-block: clamp(2.5rem, 7vw, 5rem) 0; }
.hero__grid { display: grid; gap: 2.5rem; align-items: center; }
.hero__title { max-width: 14ch; font-size: clamp(2.5rem, 7vw, 4.5rem); line-height: 1.05; letter-spacing: -.035em; }
.hero__lede { max-width: 34rem; margin: 1.25rem 0 0; color: var(--muted); font-size: clamp(1.05rem, 1.6vw, 1.2rem); line-height: 1.7; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.hero__photo { margin: 0; width: min(100% - 14px, 20rem); }
.hero__photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 1.5rem; box-shadow: 12px 12px 0 var(--sun); }
@media (min-width: 52rem) {
  .hero__grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 4rem; }
  .hero__photo { justify-self: end; width: min(100% - 14px, 24rem); }
}

/* ---------- Khối nội dung chung ---------- */
.section { padding-top: clamp(3rem, 7vw, 5rem); }
.section-head { margin-bottom: 1.75rem; }
.section-head__text { max-width: 36rem; margin: .5rem 0 0; color: var(--muted); }
.band { margin-top: clamp(3rem, 7vw, 5rem); padding-block: clamp(2.25rem, 5vw, 3.5rem); background: var(--paper); }

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .65rem; margin: 0; color: var(--muted); font-size: .85rem; }
.meta__where { display: inline-flex; align-items: center; gap: .5rem; color: var(--ink); font-weight: 600; }
.meta__sep { display: none; }
.flag { width: 1.3rem; height: .87rem; flex: none; border-radius: 2px; object-fit: cover; box-shadow: 0 0 0 1px rgba(18, 41, 46, .15); }
.badge { display: inline-flex; padding: .2rem .55rem; border-radius: .4rem; background: #fff; color: var(--ink); font-size: .75rem; font-weight: 700; }
.stretch::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.tags li { padding: .2rem .7rem; border-radius: 999px; background: var(--lagoon-tint); color: var(--lagoon-deep); font-size: .85rem; font-weight: 500; }

/* Thẻ bài viết: ảnh, rồi chữ ngay trên nền trang, không viền không bóng */
.cards { display: grid; gap: 2.25rem 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr)); }
.card { position: relative; display: flex; flex-direction: column; gap: .9rem; }
.card__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: var(--paper); }
.card__media > img { width: 100%; height: 100%; object-fit: cover; }
.card .badge { position: absolute; top: .75rem; left: .75rem; }
.card__body { display: flex; flex-direction: column; gap: .35rem; }
.card-title { font-size: 1.2rem; line-height: 1.25; letter-spacing: -.015em; }
.card-title a { text-decoration: none; }
.card:hover .card-title a, .card-title a:focus-visible { color: var(--lagoon-deep); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .2em; }
.card__text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: .15rem 0 0; color: var(--muted); font-size: .95rem; }

/* Bản đồ: các quốc gia là những thẻ nhỏ */
.atlas { display: flex; flex-wrap: wrap; gap: .6rem; }
.country { display: inline-flex; align-items: center; gap: .6rem; padding: .5rem 1rem .5rem .65rem; border: 1px solid var(--line-2); border-radius: 1.4rem; background: #fff; text-decoration: none; transition: border-color .15s; }
.country:hover { border-color: var(--lagoon); }
.country > span { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .5rem; }
.country__name { font-weight: 600; }
.country__count { color: var(--muted); font-size: .85rem; }
.country__cities { flex-basis: 100%; max-width: 20rem; color: var(--muted); font-size: .85rem; line-height: 1.35; }

/* ---------- Chân trang ---------- */
.site-footer { margin-top: clamp(3rem, 7vw, 5rem); border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.band + .site-footer { margin-top: 0; }
.site-footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 2rem; padding-block: 1.5rem; }
.site-footer p { margin: 0; }
.footer-nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: 0; padding: 0; list-style: none; }
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Trang bài viết ---------- */
.post-hero { display: flex; flex-direction: column; padding-top: clamp(1.75rem, 4vw, 3rem); }
.post-hero .post-hero__content { order: -1; width: min(100% - 2 * var(--gutter), var(--read)); padding-bottom: 1.75rem; }
.post-hero__img { width: min(100% - 2 * var(--gutter), var(--wrap)); height: auto; aspect-ratio: 16 / 9; max-height: 30rem; margin-inline: auto; object-fit: cover; border-radius: 1.25rem; background: var(--paper); }
.crumb { display: inline-flex; align-items: center; gap: .4rem; margin-bottom: 1.25rem; color: var(--muted); font-size: .9rem; font-weight: 500; text-decoration: none; }
.crumb::before { content: "\2190"; }
.crumb:hover { color: var(--ink); text-decoration: underline; }
.post-hero h1 { font-size: clamp(2rem, 5.5vw, 3.25rem); line-height: 1.1; letter-spacing: -.03em; }
.post-dek { margin: .9rem 0 0; color: var(--muted); font-size: clamp(1.05rem, 1.6vw, 1.2rem); line-height: 1.65; }
.facts { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; margin: 1.1rem 0 0; padding: 0; font-size: .9rem; }
.facts > div { display: flex; gap: .4rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }

.post-body { padding-top: clamp(2rem, 5vw, 3rem); }
.post-body > .video, .post-body > .prose, .post-body > .hops, .post-body > .comments { width: min(100%, var(--read)); margin-inline: auto; }
.prose { width: min(100%, var(--read)); margin-inline: auto; font-size: 1.0625rem; line-height: 1.8; }
.prose p { margin: 0 0 1.25em; }
.prose h2 { margin: 2.2em 0 .6em; font-size: clamp(1.4rem, 2.6vw, 1.7rem); line-height: 1.25; letter-spacing: -.015em; }
.prose h3 { margin: 1.8em 0 .5em; font-size: 1.2rem; }
.prose ul, .prose ol { margin: 0 0 1.25em; padding-left: 1.4em; }
.prose img { height: auto; border-radius: var(--radius); }
.prose blockquote { margin: 1.8em 0; padding: .1em 0 .1em 1.25rem; border-left: 4px solid var(--sun); font-size: 1.15em; font-weight: 500; line-height: 1.55; }
.prose blockquote p { margin: 0; }
.sample-note { margin: 0 0 1.75em; padding: .8rem 1rem; border-radius: .75rem; background: var(--sun-tint); color: var(--ink); font-size: .92rem; line-height: 1.6; }
.photo { margin: 2em 0; }
.photo__frame { display: grid; place-items: center; aspect-ratio: 2 / 1; padding: 1.5rem; border: 2px dashed var(--line-2); border-radius: var(--radius); background: var(--paper); color: var(--muted); font-size: .95rem; text-align: center; }
.photo__frame p { max-width: 24rem; margin: 0; }
.photo img { width: 100%; height: auto; border-radius: var(--radius); }
.photo figcaption { margin-top: .6rem; color: var(--muted); font-size: .875rem; }
.video { position: relative; aspect-ratio: 16 / 9; margin: 2em auto; overflow: hidden; border-radius: var(--radius); background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video--empty { aspect-ratio: 2 / 1; display: grid; place-items: center; padding: 1.5rem; border: 2px dashed var(--line-2); background: var(--paper); color: var(--muted); font-size: .95rem; text-align: center; }
.video--empty p { max-width: 22rem; margin: 0; }
.play { width: 3.5rem; height: 3.5rem; margin: 0 auto 1rem; display: grid; place-items: center; border-radius: 50%; background: var(--sun); }
.play::before { content: ""; margin-left: .25rem; border-top: .6rem solid transparent; border-bottom: .6rem solid transparent; border-left: .95rem solid var(--ink); }

.hops { display: grid; gap: .75rem; margin-top: 3.5rem; }
.hop { display: flex; flex-direction: column; gap: .15rem; padding: 1rem 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; transition: border-color .15s; }
.hop:hover { border-color: var(--lagoon); }
.hop__dir { color: var(--muted); font-size: .85rem; }
.hop__name { font-size: 1.15rem; font-weight: 700; }
@media (min-width: 40rem) {
  .hops { grid-template-columns: 1fr 1fr; }
  .hop--later { text-align: right; }
  .hop--later:only-child { grid-column: 2; }
}

/* ---------- Giới thiệu, 404 ---------- */
.page-hero { padding-block: clamp(2.5rem, 6vw, 4rem) 0; }
.page-title { max-width: 20ch; font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.1; letter-spacing: -.03em; }
.about { display: grid; gap: 2.5rem; padding-top: clamp(2rem, 5vw, 3rem); }
.about .prose { margin-inline: 0; }
.about__art { width: min(100% - 14px, 20rem); }
.tile { margin: 0; }
.tile img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 1.5rem; box-shadow: 12px 12px 0 var(--sun); }
@media (min-width: 60rem) { .about { grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: 4rem; align-items: start; } .about__art { justify-self: end; } }
.contact { margin-top: 2.2em; padding: 1.25rem 1.5rem; border-radius: var(--radius); background: var(--paper); }
.contact h2 { margin: 0 0 .5em; font-size: 1.3rem; }
.contact p { margin: 0 0 .75em; }
.contact p:last-child { margin-bottom: 0; }
.contact .follow { color: var(--muted); font-size: .95rem; }
.prose .socials, .socials { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.prose .socials { padding: 0; }
.prose .socials a { text-decoration: none; }
.prose .socials .btn--primary { color: var(--ink); }
.prose .socials .btn--ghost { color: var(--ink); }

.notfound { padding-block: clamp(3.5rem, 9vw, 7rem); }
.notfound__code { margin: 0; color: var(--sun); font-size: clamp(5rem, 18vw, 9rem); font-weight: 800; line-height: 1; letter-spacing: -.05em; }
.notfound .h2 { margin-top: .5rem; }
.notfound .prose { margin: 1rem 0 1.75rem; }

/* ---------- Tài khoản, biểu mẫu ---------- */
.auth { padding-block: clamp(1.75rem, 4vw, 2.5rem) clamp(3rem, 8vw, 5rem); }
.form { display: grid; gap: 1.1rem; width: min(100%, 30rem); padding: clamp(1.25rem, 3vw, 1.75rem); border: 1px solid var(--line); border-radius: 1.25rem; background: #fff; }
.form--wide { width: 100%; padding: 0; border: 0; }
.form h2 { font-size: 1.5rem; }
.form p { margin: 0; }
.form-alt { text-align: center; color: var(--muted); font-size: .95rem; }
.form-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.form ol.steps { margin: 0; padding-left: 1.25rem; display: grid; gap: .6rem; }
.reset-box { display: grid; gap: .75rem; margin-bottom: 1.25rem; padding: 1rem 1.1rem; border: 1px solid var(--sun); border-radius: .85rem; background: #fff8e6; }
.reset-box p { margin: 0; }
.reset-box__title { font-weight: 700; }
.reset-box .field input { font: 500 .85rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.field { display: grid; gap: .4rem; min-width: 0; }
.field label { font-size: .9rem; font-weight: 600; }
.field input, .field textarea, .field select {
  width: 100%; padding: .7rem .9rem; border: 1px solid var(--line-2); border-radius: .6rem;
  background: #fff; color: var(--ink); font: 400 1rem/1.5 var(--font); transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 6rem; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--muted); }
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible { outline: none; border-color: var(--lagoon); box-shadow: 0 0 0 3px rgba(11, 122, 122, .2); }
.field input::placeholder, .field textarea::placeholder { color: #70868b; }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field-row { display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
@media (min-width: 40rem) { .field-row { grid-template-columns: 2fr 1.4fr 1fr; } }

details.invite-box, details.help { padding: .75rem 1rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--paper); }
details summary { cursor: pointer; font-size: .92rem; font-weight: 600; }
details[open] > summary { margin-bottom: .85rem; }
details.help ul { margin: 0; padding-left: 1.2rem; color: var(--muted); font-size: .9rem; line-height: 1.8; }
details.help code { padding: .1rem .4rem; border-radius: .35rem; background: #fff; color: var(--lagoon-deep); font-size: .85em; }
details.help .field { margin-top: 1rem; }

.notice { margin: 0; padding: .75rem 1rem; border-left: 4px solid var(--line-2); border-radius: .5rem; background: var(--paper); color: var(--ink); font-size: .95rem; line-height: 1.5; }
.notice--error { border-color: var(--danger); background: var(--danger-tint); }
.notice--success { border-color: var(--ok); background: var(--ok-tint); }
.notice--info { border-color: var(--sun); background: var(--sun-tint); }
.notice.wrap { margin-top: 1.2rem; }

.link-btn { padding: 0; border: 0; background: none; cursor: pointer; color: var(--lagoon); font: inherit; font-size: .85rem; text-decoration: underline; }

/* ---------- Khu quản lý ---------- */
.admin { padding-block: clamp(1.75rem, 4vw, 2.5rem) clamp(3rem, 8vw, 5rem); }
.admin__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.admin__head h2 { font-size: 1.5rem; }
.tabs { display: flex; gap: .25rem; margin-bottom: 1.75rem; border-bottom: 1px solid var(--line); }
.tab { display: inline-flex; align-items: center; gap: .5rem; margin-bottom: -1px; padding: .7rem 1rem; border: 0; border-bottom: 3px solid transparent; background: none; cursor: pointer; color: var(--muted); font: 600 .95rem/1.2 var(--font); }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--sun); }
.count { min-width: 1.4rem; padding: .1rem .45rem; border-radius: 999px; background: var(--sun); color: var(--ink); font-size: .75rem; font-weight: 700; text-align: center; }
.rows { display: grid; gap: .6rem; margin: 0 0 1.75rem; padding: 0; list-style: none; }
.row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.25rem; padding: .85rem 1.1rem; border: 1px solid var(--line); border-radius: .85rem; background: #fff; }
.row__main { display: grid; gap: .2rem; min-width: 0; flex: 1 1 16rem; }
.row__main strong { font-weight: 600; overflow-wrap: anywhere; }
.row__sub { color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }
.row__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.row__actions .btn { text-decoration: none; }
.tag-pill { display: inline-flex; padding: .1rem .55rem; border-radius: 999px; background: var(--paper); color: var(--muted); font-size: .78rem; font-weight: 600; }
.tag-pill--ok { background: var(--ok-tint); color: var(--ok); }
.tag-pill--draft { background: #eef3f2; color: var(--muted); }
.tag-pill--wait { background: var(--sun-tint); color: #7a4f00; }
.tag-pill--bad { background: var(--danger-tint); color: var(--danger); }
.editor { margin-top: 1.75rem; padding: clamp(1.1rem, 3vw, 1.75rem); border-radius: 1.25rem; background: var(--paper); }
.editor h2 { margin-bottom: 1.25rem; font-size: 1.4rem; }

/* ---------- Bình luận ---------- */
.comments { margin-top: 3rem; padding-top: 1.75rem; border-top: 1px solid var(--line); }
.comments h2 { margin-bottom: 1rem; font-size: 1.4rem; }
.comment-list { margin: 0 0 1.75rem; padding: 0; list-style: none; }
.comment { padding: .9rem 0; border-top: 1px solid var(--line); }
.comment:first-child { border-top: 0; padding-top: 0; }
.comment__meta { margin: 0 0 .25rem; color: var(--muted); font-size: .85rem; }
.comment__meta strong { color: var(--ink); }
.comment__body { margin: 0; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.comments .form { width: 100%; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------- Ảnh của bài (khu quản lý) ---------- */
.post-photos { margin: 0 0 1.25rem; padding: 1rem 1.1rem; border: 1px dashed var(--line-2); border-radius: var(--radius); background: var(--paper); }
.post-photos__title { margin: 0 0 .25rem; font: 700 1rem/1.3 var(--font); }
.post-photos__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; margin: .9rem 0 0; padding: 0; list-style: none; }
.post-photos__item { display: grid; gap: .45rem; padding: .4rem; border: 1px solid var(--line); border-radius: .75rem; background: #fff; }
.post-photos__item img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: .5rem; }
.post-photos__actions { display: flex; flex-wrap: wrap; gap: .4rem; }

/* ---------- Tất cả ảnh (khu quản lý) ---------- */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .9rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.media-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: .85rem; background: #fff; }
.media-card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--paper); }
.media-card__body { display: grid; gap: .3rem; padding: .75rem .85rem .85rem; }
.media-card__caption { margin: 0; font-weight: 600; line-height: 1.35; word-break: break-word; }
.media-card__post { font-size: .88rem; color: var(--lagoon); }
.media-card__post--none { color: var(--muted); }
.media-card__meta { margin: 0; color: var(--muted); font-size: .8rem; }
.media-card__actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .35rem; }

/* ---------- Nhật ký theo dòng thời gian (trang chủ) ---------- */
.cards.is-timeline { display: block; }
.timeline__year { margin: 2.75rem 0 1.25rem; font: 800 1.6rem/1.2 var(--font); color: var(--ink); }
.timeline__year:first-child { margin-top: 0; }
.timeline__list { position: relative; display: grid; gap: 2.25rem; margin: 0; padding: 0 0 0 2.25rem; list-style: none; border-left: 2px solid var(--line-2); }
.tl-item { position: relative; }
.tl-item::before {
  content: ''; position: absolute; left: calc(-2.25rem - 9px); top: .35rem;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--sun); border: 3px solid var(--bg); box-sizing: content-box;
}
.tl-item__date { display: inline-block; margin-bottom: .6rem; color: var(--lagoon); font-size: .9rem; font-weight: 700; letter-spacing: .02em; }

/* Thẻ nhật ký: chữ trước, ảnh sau. Ảnh thu nhỏ hình vuông, cắt giữa ảnh, tối đa 10 ảnh mỗi bài */
.tl-card { display: grid; gap: .9rem; }
.tl-card__photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 140px)); gap: .4rem; }
.tl-card__photos img { display: block; width: 100%; aspect-ratio: 1 / 1; height: auto; object-fit: cover; border-radius: .5rem; background: var(--paper); border: 1px solid var(--line); }
.tl-card__body .card-title { margin: .2rem 0 .3rem; font-size: 1.15rem; }
.tl-card__body .card__text { margin: 0; color: var(--muted); font-size: .95rem; }
