:root {
  /* Một cột đọc hẹp như trang vở; cảnh từ video tràn rộng hơn cột chữ; ánh đèn vàng là điểm nhấn duy nhất. */
  --paper: #f6f4ef;
  --paper-deep: #ece7dc;
  --ink: #1d1b1b;
  --ink-soft: #5a5758;
  --lamp: #b0621f;
  --glow: #ffe7a0;
  --rule: #d8d1c2;
  --font-hand: "Patrick Hand", "Comic Sans MS", cursive;
  --font-body: "Literata", Georgia, "Times New Roman", serif;
  --font-ui: "Nunito", "Segoe UI", system-ui, sans-serif;
  --col: 38rem;
  --wide: 56rem;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.11 0 0 0 0 0.1 0 0 0 0 0.1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.75;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--lamp); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px dashed var(--lamp); outline-offset: 3px; border-radius: 4px; }

/* Đầu trang */
.site-head {
  max-width: var(--wide); margin: 0 auto; padding: 1.25rem 1rem .5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); }
.brand .face {
  width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 1.5px solid var(--ink);
  background: radial-gradient(circle at 50% 60%, var(--glow), var(--paper) 70%); overflow: hidden;
}
.brand span { font-family: var(--font-hand); font-size: 1.7rem; line-height: 1; }
.site-nav { display: flex; gap: 1.25rem; font-family: var(--font-ui); font-weight: 800; font-size: .95rem; }
.site-nav a { color: var(--ink); text-decoration: none; padding: .25rem 0; border-bottom: 2px solid transparent; }
.site-nav a[aria-current="page"] { border-bottom-color: var(--lamp); }

main { padding: 0 1rem 3rem; }
.view[hidden] { display: none; }

/* Trang chính */
.hero { max-width: var(--wide); margin: 1.5rem auto 0; display: grid; gap: 1.5rem; }
.hero figure { margin: 0; border: 1.5px solid var(--ink); border-radius: 14px; overflow: hidden; }
.hero-text { max-width: var(--col); margin: 0 auto; text-align: center; }
.hero-text h1 {
  font-family: var(--font-hand); font-weight: 400; font-size: clamp(2rem, 5.5vw, 3rem);
  line-height: 1.2; margin: 0 0 .75rem; text-wrap: balance;
}
.hero-text p { margin: 0; color: var(--ink-soft); }

.section-label {
  font-family: var(--font-ui); font-weight: 800; font-size: .8rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-soft);
  max-width: var(--col); margin: 3rem auto 1rem; display: flex; align-items: center; gap: .75rem;
}
.section-label::after { content: ""; flex: 1; border-top: 1px dashed var(--rule); }

.story-list { max-width: var(--col); margin: 0 auto; display: grid; gap: 1.25rem; padding: 0; list-style: none; }
.story-card a {
  display: grid; grid-template-columns: 9.5rem 1fr; gap: 1rem; align-items: start;
  color: var(--ink); text-decoration: none; padding: .9rem; border-radius: 14px;
  border: 1.5px solid var(--ink); background: var(--paper);
  transition: background-color .2s;
}
.story-card a:hover { background: #fffaf0; }
.story-card img { border-radius: 8px; border: 1px solid var(--rule); aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.story-card h2 { font-family: var(--font-hand); font-weight: 400; font-size: 1.5rem; line-height: 1.25; margin: 0 0 .3rem; text-wrap: balance; }
.story-card p { margin: 0; font-size: 1rem; line-height: 1.6; color: var(--ink-soft); }
.meta { font-family: var(--font-ui); font-weight: 600; font-size: .82rem; color: var(--ink-soft); }
.story-card .meta { display: block; margin-top: .5rem; }

/* Bài viết */
.article-head { max-width: var(--col); margin: 2rem auto 0; }
.back { font-family: var(--font-ui); font-weight: 800; font-size: .9rem; text-decoration: none; }
.article-head h1 {
  font-family: var(--font-hand); font-weight: 400; font-size: clamp(2.1rem, 6vw, 3.1rem);
  line-height: 1.15; margin: 1rem 0 .5rem; text-wrap: balance;
}
.article-head .meta { margin: 0; }
.prose { max-width: var(--col); margin: 0 auto; }
.prose p { margin: 0 0 1.2rem; }
.prose h2 {
  font-family: var(--font-hand); font-weight: 400; font-size: 1.85rem; line-height: 1.2;
  margin: 2.75rem 0 .9rem; text-wrap: balance;
}
.prose .lead { font-size: 1.25rem; line-height: 1.7; }
.prose blockquote {
  margin: 1.75rem 0; padding: .25rem 0 .25rem 1.25rem; border-left: 3px solid var(--lamp);
  font-family: var(--font-hand); font-size: 1.5rem; line-height: 1.45;
}
.prose .term { font-style: italic; }
.chapter { margin-top: 3.5rem; }
.chapter > .prose:first-child h2 { margin: 0; font-size: 2.1rem; }
.chapter > .wide { margin-top: 1.1rem; }
.wide { max-width: var(--wide); margin: 2rem auto; }
.wide img { border: 1.5px solid var(--ink); border-radius: 14px; width: 100%; }
.wide figcaption { font-family: var(--font-ui); font-weight: 600; font-size: .85rem; color: var(--ink-soft); text-align: center; margin-top: .6rem; }

.video-card {
  max-width: var(--col); margin: 1.75rem auto 2rem; display: grid; grid-template-columns: 12rem 1fr; gap: 1rem; align-items: center;
  border: 1.5px solid var(--ink); border-radius: 14px; padding: .85rem; color: var(--ink);
  background: linear-gradient(90deg, rgba(255,231,160,.35), transparent 70%);
}
.video-card .thumb { position: relative; }
.video-card .thumb img { border-radius: 8px; width: 100%; }
.video-card .play {
  position: absolute; inset: 0; margin: auto; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: var(--ink); display: grid; place-items: center;
}
.video-card .play::after { content: ""; border-left: 12px solid var(--paper); border-top: 8px solid transparent; border-bottom: 8px solid transparent; margin-left: 3px; }
.video-card strong { font-family: var(--font-hand); font-weight: 400; font-size: 1.45rem; display: block; line-height: 1.2; }
.video-card .watch > span { font-family: var(--font-ui); font-weight: 600; font-size: .85rem; color: var(--ink-soft); display: block; margin-top: .2rem; }
.watch-links { list-style: none; padding: 0; margin: .7rem 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.watch-links a {
  display: grid; justify-items: center; align-content: center; gap: .1rem; min-height: 2.9rem; padding: .4rem .25rem;
  font-family: var(--font-ui); font-weight: 800; font-size: .95rem; color: var(--ink); text-decoration: none;
  border: 1.5px solid var(--ink); border-radius: 12px; background: var(--paper);
}
.watch-links a:hover { background: #fffaf0; }
.watch-links small { font-weight: 600; font-size: .72rem; color: var(--ink-soft); white-space: nowrap; }

.theory {
  max-width: calc(var(--col) + 3rem); margin: 2.5rem auto; padding: 1.5rem 1.5rem .5rem;
  border: 1.5px dashed var(--ink); border-radius: 14px; background: #fbf8f1;
}
.theory .tag { font-family: var(--font-ui); font-weight: 800; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--lamp); margin: 0 0 .25rem; }
.theory h2 { margin-top: 0; }

.question {
  max-width: var(--col); margin: 2.5rem auto; text-align: center; padding: 1.75rem 1.25rem;
  background: radial-gradient(ellipse at 50% 40%, rgba(255,231,160,.75), transparent 70%);
}
.question p { font-family: var(--font-hand); font-size: 1.6rem; line-height: 1.4; margin: 0; text-wrap: balance; }
.question .meta { display: block; margin-bottom: .5rem; }
.sign { font-family: var(--font-hand); font-size: 1.6rem; text-align: right; margin: 0 0 1rem; }

.reading { max-width: var(--col); margin: 2.5rem auto 0; font-size: .98rem; line-height: 1.6; }
.reading h3, .notes h3 { font-family: var(--font-ui); font-weight: 800; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 .6rem; }
.reading ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .4rem; }
.care { max-width: var(--col); margin: 1.5rem auto 0; font-size: .95rem; color: var(--ink-soft); font-style: italic; }

/* Lời nhắn */
.notes { max-width: var(--col); margin: 3rem auto 0; padding-top: 2rem; border-top: 1px dashed var(--rule); }
.notes > p { margin: 0 0 1rem; color: var(--ink-soft); font-size: 1rem; }
.notes form { display: grid; gap: .8rem; }
.notes label { font-family: var(--font-ui); font-weight: 800; font-size: .85rem; display: grid; gap: .3rem; }
.notes input, .notes textarea {
  font: inherit; font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  background: #fffdf8; border: 1.5px solid var(--ink); border-radius: 10px; padding: .6rem .75rem;
}
.notes textarea { min-height: 7.5rem; resize: vertical; }
.notes button {
  justify-self: start; font-family: var(--font-ui); font-weight: 800; font-size: .95rem;
  color: var(--paper); background: var(--ink); border: 0; border-radius: 999px; padding: .65rem 1.4rem; cursor: pointer;
}
.notes button:hover { background: #3a3636; }
.notes .empty { font-family: var(--font-hand); font-size: 1.25rem; color: var(--ink-soft); margin: 1.25rem 0 0; }
.form-msg { font-family: var(--font-ui); font-weight: 600; font-size: .9rem; color: var(--lamp); margin: 0; min-height: 1.2em; }

/* Về cậu bé */
.about { max-width: var(--col); margin: 2rem auto 0; display: grid; gap: 1rem; }
.about .boy { width: 7rem; margin: 0 auto; }
.about h1 { font-family: var(--font-hand); font-weight: 400; font-size: 2.6rem; text-align: center; margin: 0; }
.channels { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; padding: 0; margin: .5rem 0 0; list-style: none; }
.channels a {
  font-family: var(--font-ui); font-weight: 800; font-size: .9rem; text-decoration: none; color: var(--ink);
  border: 1.5px solid var(--ink); border-radius: 999px; padding: .4rem 1rem; display: inline-block;
}
.channels a:hover { background: #fffaf0; }

/* Chân trang */
.site-foot { max-width: var(--wide); margin: 2rem auto 0; padding: 0 1rem 2.5rem; text-align: center; }
.family { max-width: 30rem; margin: 0 auto; border-bottom: 1.5px solid var(--ink); padding: 0 1.5rem; }
.site-foot p { margin: 1rem 0 0; font-family: var(--font-hand); font-size: 1.3rem; color: var(--ink-soft); }
.site-foot .channels { margin-top: 1rem; }

@media (max-width: 34rem) {
  body { font-size: 1.06rem; }
  /* Điện thoại: cắt cảnh rộng thành khung 4:3 quanh nhân vật cho dễ nhìn */
  .wide img, .hero figure img { aspect-ratio: 4 / 3; object-fit: cover; }
  .wide { margin: 1.5rem auto; }
  .site-nav a { padding: .6rem 0; }
  .site-foot .channels { display: grid; grid-template-columns: repeat(2, minmax(0, 9rem)); justify-content: center; }
  .site-foot .channels a { display: block; text-align: center; padding: .55rem 1rem; }
  .article-head h1 { font-size: 2.05rem; }
  .chapter { margin-top: 2.75rem; }
  .chapter > .prose:first-child h2 { font-size: 1.85rem; }
  .story-card a { grid-template-columns: 1fr; }
  .video-card { grid-template-columns: 1fr; }
  .theory { padding: 1.1rem 1.1rem .25rem; }
}
@media (min-width: 34.01rem) and (max-width: 60rem) {
  main, .site-head, .site-foot { padding-left: 1.5rem; padding-right: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Bản chạy thật */
.video-card .thumb { position: relative; padding: 0; border: 0; background: none; cursor: pointer; display: block; width: 100%; }
.video-card .thumb .play {
  position: absolute; inset: 0; margin: auto; width: 3rem; height: 3rem; border-radius: 50%;
  background: var(--ink); display: grid; place-items: center; box-shadow: 0 0 0 4px rgba(246,244,239,.7);
}
.video-card .thumb .play::after { content: ""; border-left: 14px solid var(--paper); border-top: 9px solid transparent; border-bottom: 9px solid transparent; margin-left: 4px; }
.video-card .thumb:hover .play { background: #3a3636; }
.video-card iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 8px; display: block; }
.note-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1rem; }
.note-list li { border-left: 3px solid var(--lamp); padding: .25rem 0 .25rem 1rem; }
.note-list .who { font-family: var(--font-ui); font-weight: 800; font-size: .85rem; color: var(--ink-soft); display: block; margin-bottom: .2rem; }
.note-list p { margin: 0; white-space: pre-line; font-size: 1rem; line-height: 1.65; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notes button[disabled] { opacity: .6; cursor: default; }
