/* Malam di gurun: langit banner, lalu bukit pasir, lalu rak cerita di malam hari, lalu rak buku kuning. */
:root {
  --malam: #1f1147; --ungu: #35205f; --pasir: #a9563a; --pasir-tua: #7f3b28;
  --emas: #ffd23f; --terang: #fff6df; --tinta: #221238;
  --judul: "Lilita One", "Arial Rounded MT Bold", sans-serif;
  --isi: Andika, Verdana, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--malam); color: var(--terang); font: 400 1.0625rem/1.6 var(--isi); }
img { display: block; max-width: 100%; height: auto; }
h1, h2, p, ul { margin: 0; padding: 0; }
h2 { font: 400 clamp(1.7rem, 4vw, 2.5rem)/1.1 var(--judul); text-wrap: balance; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--emas); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.wrap { max-width: 1160px; margin: auto; padding-inline: max(18px, env(safe-area-inset-left)) max(18px, env(safe-area-inset-right)); }
.hero img { width: 100%; }
.buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 8px 24px; border: 2px solid var(--emas); border-radius: 999px; background: var(--emas); color: var(--tinta); font-weight: 700; text-decoration: none; }
.btn.line { background: none; color: inherit; border-color: currentColor; }
.btn.dark { background: var(--tinta); border-color: var(--tinta); color: var(--terang); }
.btn:hover { filter: brightness(1.08); }

.today { background: linear-gradient(var(--pasir), var(--pasir-tua)); padding-block: 28px 56px; }
.today-row { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: clamp(22px, 5vw, 60px); align-items: center; }
.today-text { display: grid; gap: 16px; max-width: 60ch; }
.today-text h2 { font-size: 1.3rem; color: var(--emas); }
.big { font: 400 clamp(2rem, 5.4vw, 3.5rem)/1.05 var(--judul); text-wrap: balance; }
.jump { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.jump a { padding-block: 8px; }

.poster { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 18px; overflow: hidden; aspect-ratio: 9 / 16; background: var(--ungu); }
.poster img { width: 100%; height: 100%; object-fit: cover; }
.play { position: absolute; inset: auto auto 12px 12px; width: 46px; height: 46px; border-radius: 50%; background: var(--emas); }
.play::after { content: ""; position: absolute; left: 18px; top: 14px; border: solid transparent; border-width: 9px 0 9px 14px; border-left-color: var(--tinta); }
.time { position: absolute; right: 10px; bottom: 12px; padding: 1px 9px; border-radius: 99px; background: #120a2bd9; font-size: .85rem; }

.stories { padding-block: 64px 72px; }
.head { display: grid; grid-template-columns: 1fr minmax(200px, 320px) auto; gap: 14px 20px; align-items: center; margin-bottom: 28px; }
#count { color: var(--emas); }
.find input { width: 100%; min-height: 48px; padding: 8px 20px; border: 2px solid #6d55a5; border-radius: 99px; background: var(--ungu); }
.find input::placeholder { color: #cdbfec; }
.sort { display: flex; padding: 4px; border-radius: 99px; background: var(--ungu); }
.sort button { min-height: 44px; padding: 4px 15px; border: 0; border-radius: 99px; background: none; white-space: nowrap; }
.sort [aria-pressed="true"] { background: var(--terang); color: var(--tinta); font-weight: 700; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 28px 18px; }
.story { display: grid; gap: 10px; align-content: start; }
.story h3 { margin: 0; font: 700 1.02rem/1.35 var(--isi); text-wrap: balance; }
.story .poster img { transition: transform .25s; }
.story .poster:hover img { transform: scale(1.04); }
.no { font-size: .88rem; color: #cdbfec; }
.empty { padding-block: 20px; }
.more { margin: 40px auto 0; display: flex; }

.film { background: var(--ungu); padding-block: 64px; }
.film-row { display: grid; grid-template-columns: 230px minmax(0, 60ch); gap: clamp(22px, 5vw, 60px); align-items: center; }
.film-row > div { display: grid; gap: 14px; }
iframe { width: 100%; height: 100%; object-fit: cover; border: 0; display: block; }

.books { background: var(--emas); color: var(--tinta); padding-block: 64px 72px; }
.books :focus-visible { outline-color: var(--tinta); }
.lead { max-width: 60ch; margin-block: 12px 22px; }
.shelf { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; margin-top: 38px; }
.shelf a { display: grid; gap: 10px; text-decoration: none; font-weight: 700; }
.shelf img { width: 100%; border-radius: 4px 12px 12px 4px; box-shadow: 0 8px 18px #7a55004d; }
.shelf a:hover span { text-decoration: underline; }

footer { padding-block: 40px; }
.foot { display: flex; flex-wrap: wrap; gap: 16px 48px; justify-content: space-between; align-items: center; }
.foot nav { display: flex; gap: 22px; }
.foot a { padding-block: 10px; }
.small { font-size: .88rem; color: #cdbfec; }

dialog { width: min(900px, 100%); max-width: 100%; max-height: 100dvh; padding: 0; border: 0; border-radius: 20px; background: var(--ungu); color: var(--terang); }
dialog::backdrop { background: #0d0722e0; }
.p-box { display: grid; grid-template-columns: min(400px, 46vh) minmax(0, 1fr); }
.p-video { aspect-ratio: 9 / 16; max-height: 88dvh; width: 100%; background: #000; }
.p-text { position: relative; display: grid; gap: 14px; align-content: center; padding: 28px; }
.p-text h2 { font-size: 1.9rem; padding-right: 36px; }
.p-no { color: var(--emas); font-weight: 700; }
.moral { padding: 14px 18px; border-radius: 14px; background: var(--malam); }
.close { position: absolute; top: 12px; right: 12px; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--malam); font-size: 1.6rem; line-height: 1; }

@media (max-width: 900px) {
  .head { grid-template-columns: 1fr; }
  .sort { justify-self: start; max-width: 100%; }
  .shelf { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}
@media (max-width: 700px) {
  .today { padding-block: 16px 44px; }
  .today-row { grid-template-columns: 112px minmax(0, 1fr); gap: 18px; align-items: start; }
  .today-text { display: contents; }
  .today-text h2 { grid-column: 1 / -1; grid-row: 1; }
  .today-row .poster { grid-row: 2 / span 2; }
  .today-text > p { grid-column: 2; }
  .today-text > div, .today-text > nav { grid-column: 1 / -1; }
  .film-row { grid-template-columns: 112px minmax(0, 1fr); gap: 18px; align-items: start; }
  .big { font-size: 1.7rem; }
  .today-row .time { display: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
  .sort button { padding-inline: 11px; font-size: .95rem; }
  dialog { height: 100dvh; width: 100%; margin: 0; border-radius: 0; }
  .p-box { grid-template-columns: 1fr; }
  .p-video { height: 68dvh; aspect-ratio: auto; }
  .p-text { padding: 20px 18px 32px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .story .poster img { transition: none; } }
