:root {
  color-scheme: dark;
  --bg: #171b22;
  --panel: #222830;
  --ink: #f7efe1;
  --muted: #c6c6c5;
  --gold: #edc984;
  --line: #554c40;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.67; }
h1, h2, h3 { line-height: 1.15; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; }
h2 { margin: 0 0 18px; font-size: clamp(1.7rem, 4vw, 2.65rem); }
h3 { margin: 30px 0 10px; font-size: 1.17rem; color: var(--gold); }
p { margin: 0 0 14px; }
ul { margin: 12px 0; padding-left: 1.25em; }
li + li { margin-top: 7px; }
a { color: var(--gold); text-underline-offset: .23em; }
a:hover { color: #fff0c7; }
:focus-visible { outline: 2px solid #fff0c7; outline-offset: 3px; }
img { display: block; max-width: 100%; }
.wrap { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.site-header, .site-footer { background: #15181d; }
.site-header { border-bottom: 1px solid #4d4236; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 0; }
.header-inner img { height: auto; }
.header-inner > a:last-child { font-size: .9rem; }
.hero {
  background: linear-gradient(92deg, #171b22 24%, #171b22f2 46%, #171b223c 100%),
    url("tiem-doi-thien-ngu.png") calc(50% + 245px) 38% / auto 145% no-repeat,
    #332a25;
  border-bottom: 1px solid var(--line);
}
.hero-inner { padding-block: clamp(38px, 6vw, 75px); }
.hero time { color: var(--gold); font-size: .86rem; font-variant-numeric: tabular-nums; }
.hero h1 { margin: 12px 0 17px; font-weight: 700; font-size: clamp(2.8rem, 8vw, 6rem); line-height: .99; letter-spacing: -.045em; }
.hero h1 em { color: var(--gold); font-style: normal; }
.lead { max-width: 36rem; font-size: clamp(1rem, 3vw, 1.15rem); color: #ece3d7; }
.status { max-width: max-content; margin: 21px 0 0; padding: 8px 12px; border-left: 2px solid var(--gold); background: #191b23db; color: #f0d9ae; font-size: .93rem; }
.article-layout { display: grid; grid-template-columns: 180px minmax(0, 1fr); align-items: start; gap: clamp(26px, 5vw, 66px); padding-block: 45px 68px; }
.contents { position: sticky; top: 20px; padding: 3px 0 0 14px; border-left: 1px solid var(--line); font-size: .88rem; }
.contents strong { display: block; margin-bottom: 10px; }
.contents a { display: block; padding-block: 5px; text-decoration: none; color: var(--muted); }
.contents a:hover { text-decoration: underline; color: var(--gold); }
section { scroll-margin-top: 18px; }
section + section { margin-top: 52px; border-top: 1px solid var(--line); padding-top: 33px; }
.npc-intro, .conversion { display: grid; align-items: start; gap: clamp(16px, 3vw, 30px); }
.npc-intro { grid-template-columns: minmax(0, 1fr) 180px; }
.conversion { grid-template-columns: minmax(0, 1fr) minmax(0, 36%); margin-top: 26px; }
.conversion h3 { margin-top: 0; }
.shot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 14px; margin: 19px 0; }
.shot { margin: 0; border: 1px solid var(--line); border-radius: 7px; padding: 7px; background: var(--panel); }
.shot img { width: 100%; height: auto; border-radius: 3px; }
.shot a { display: block; cursor: zoom-in; }
.shot a:hover { box-shadow: 0 0 0 1px var(--gold); }
.shot figcaption { padding: 7px 3px 2px; font-size: .83rem; color: var(--muted); }
.wide-shot { max-width: 662px; margin: 16px auto 0; }
.table-scroll { overflow-x: auto; margin-bottom: 13px; border: 1px solid var(--line); border-radius: 7px; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; }
th, td { padding: 9px 11px; text-align: left; }
thead { background: #332c25; color: var(--gold); }
tbody tr:nth-child(even) { background: #222730; }
tbody th { font-weight: 550; }
.set-list strong { color: var(--gold); }
.article-source { margin-top: 35px; font-size: .86rem; color: var(--muted); }
.site-footer { padding: 22px 0; border-top: 1px solid var(--line); }
.lightbox { width: max-content; max-width: min(94vw, 1000px); max-height: 95dvh; padding: 46px 12px 6px; border: 1px solid var(--line); border-radius: 8px; background: #15181d; color: var(--ink); }
.lightbox::backdrop { background: #0c0d11df; }
.lightbox img { width: auto; height: auto; max-height: 75dvh; margin: 0 auto; object-fit: contain; }
.lightbox p { text-align: center; font-size: .89rem; margin: 7px 2px; }
.lightbox form { position: absolute; top: 5px; right: 5px; }
.lightbox button { width: 36px; height: 36px; cursor: pointer; color: var(--ink); background: #2b2320; border: 1px solid var(--line); border-radius: 5px; font-size: 1.35rem; }

@media (max-width: 800px) {
  .article-layout { grid-template-columns: 1fr; gap: 22px; padding-top: 25px; }
  .contents { position: static; }
  .contents a { display: inline-block; margin-right: 12px; }
  .hero { background-position: center, calc(50% + 170px) 39%, center; }
}

@media (max-width: 560px) {
  .wrap { width: calc(100% - 28px); }
  .npc-intro { grid-template-columns: minmax(0, 1fr) minmax(0, 34%); gap: 12px; }
  .conversion { grid-template-columns: 1fr; }
  .shot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .conversion .shot { max-width: 365px; margin-inline: auto; }
  .lightbox img { max-height: 72dvh; }
}

@media (max-width: 345px) {
  .shot-grid { grid-template-columns: 1fr; }
}
