/* 3. CHRONICLE: dark editorial book-world, sharp frames and horizontal chapters */
body { --radius:0; --paper:#171916; --surface:#24241f; --ink:#ebe5d8; --accent:#b98b62; --line:rgba(235,229,216,.22); background:#171916; }
body main { background:#171916; }
body .header { background:rgba(23,25,22,.9); color:#ebe5d8; border-color:var(--line); }
body .brand-wordmark { color:#ebe5d8; font:600 22px/1 var(--display); letter-spacing:.01em; text-decoration:none; transition:color .2s; }
body .brand-wordmark:hover { color:#d7b28f; }
body .brand-wordmark:focus-visible { outline:1px solid #b98b62; outline-offset:7px; }
body .header-game { background:transparent; color:#d7b28f; border-color:rgba(185,139,98,.55); }
body .header-game:hover { background:rgba(185,139,98,.12); }
body .hero { min-height:100dvh; margin:0; padding:72px 7vw 0; place-items:center start; background:linear-gradient(90deg,rgba(12,14,12,.88) 0 33%,rgba(12,14,12,.12) 70%),url('assets/generated/community-eos.webp') center/cover; }
body .hero::after, body .hero .tree { display:none; }
body .hero-copy { width:min(660px,52vw); }
body .hero-copy > .hero-kicker { margin:20px 0 0; color:#ebe5d8; }
body .hero h1 { padding:4px 0 4px 32px; border:0; border-left:2px solid #b98b62; box-shadow:none; font-size:clamp(62px,8vw,116px); }
body .game-section { min-height:100dvh; grid-template-columns:1fr 1fr; width:100%; padding:0; }
body .game-visual { height:100%; min-height:100dvh; order:2; background:linear-gradient(90deg,#171916,transparent 30%),url('assets/generated/divnolesie.webp') center/cover; }
body .game-copy { margin:0; padding:12vw 7vw; align-self:stretch; display:flex; flex-direction:column; justify-content:center; background:#171916; border:0; color:#ebe5d8; }
body .books { width:100%; padding-inline:7vw; background:#20211d; }
body .books .section-heading { margin-bottom:80px; }
body .book-shelf { display:flex; flex-direction:column; align-items:stretch; width:100%; gap:0; }
body .book-card { display:grid; grid-template-columns:210px minmax(0,1fr); width:100%; margin:0; gap:48px; align-items:center; padding:42px 0; border-top:1px solid var(--line); }
body .book-card:last-child { border-bottom:1px solid var(--line); }
body .cover { width:210px; }
body .book-meta { margin:0; flex-direction:column; align-items:flex-start; gap:12px; }
body .book-meta h3 { font:600 clamp(34px,5vw,70px)/1 var(--display); }
body .book-date { color:#958b7f; font-size:13px; letter-spacing:.08em; text-transform:uppercase; }
body .book-meta .text-link { margin-top:8px; padding:9px 15px; color:#d7b28f; text-decoration:none; border:1px solid #765a43; }
body .book-meta .text-link:hover { color:#f2e6d8; background:#6f5039; border-color:#9c7655; }
body .shop-links { display:flex; flex-wrap:wrap; gap:9px; margin-top:8px; }
body .shop-links a { display:grid; place-items:center; width:42px; height:42px; background:#24211d; border:1px solid #4d4035; text-decoration:none; box-shadow:inset 0 1px 0 rgba(255,255,255,.035); transition:transform .2s,border-color .2s,background .2s; }
body .shop-links a:hover { transform:translateY(-2px); background:#302820; border-color:#8c6a4d; }
body .shop-links a:focus-visible { outline:2px solid #b98b62; outline-offset:3px; }
body .shop-links img { display:block; width:23px; height:23px; object-fit:contain; opacity:.72; filter:saturate(.68) brightness(.9); transition:opacity .2s,filter .2s; }
body .shop-links a:hover img { opacity:1; filter:saturate(.9) brightness(1); }
body .book-popover { position:static; opacity:1; transform:none; grid-column:2; margin-top:-110px; width:min(560px,100%); padding:0; background:transparent; border:0; box-shadow:none; color:#bdb8ad; }
body .world { width:100%; padding-inline:7vw; }
body .world .section-heading { max-width:900px; margin-left:auto; margin-right:auto; text-align:center; }
body .world .section-heading p { margin-left:auto; margin-right:auto; }
@media (min-width:768px) and (pointer:fine) {
  body .world { min-height:calc(100dvh - 72px); height:calc(100dvh - 72px); padding-top:28px; padding-bottom:34px; display:grid; grid-template-rows:auto auto minmax(0,1fr) auto; align-content:stretch; }
  body .world .section-heading { margin-bottom:20px; }
  body .world .section-heading h2 { font-size:clamp(44px,5vw,68px); margin-top:0; margin-bottom:12px; }
  body .world .section-heading p { margin-top:0; margin-bottom:0; margin-left:auto; margin-right:auto; font-size:16px; }
  body .world .tabs { margin-bottom:18px; }
  body .world .gallery { min-height:360px; height:100%; max-height:520px; margin-bottom:18px; }
  body .world .gallery-item, body .world .gallery-item:first-child { min-height:0; height:100%; }
  body .world > .button { justify-self:start; }
}
body .tabs { border-color:#493a2e; gap:6px; }
body .tabs button { background:#211f1b; color:#a8896d; border:1px solid #493a2e; border-bottom-color:#493a2e; }
body .tabs button:hover { color:#e0c3a5; background:#2b251f; border-color:#765a43; }
body .tabs button[aria-selected=true] { background:#6f5039; color:#f2e6d8; border-color:#9c7655; }
body .gallery { display:flex; overflow-x:auto;  padding-bottom:16px; }
body .gallery-item, body .gallery-item:first-child { min-width:min(68vw,760px); min-height:520px;  }
body .gallery-item audio { position:relative; z-index:2; width:min(90%,520px); margin:auto; accent-color:#b98b62; }
body .video-card { display:grid; grid-template-rows:minmax(0,1fr) auto; padding:0; background:#11130f; }
body .video-card iframe { width:100%; height:100%; min-height:220px; border:0; }
body .video-card > div { padding:20px 24px; }
body .media-placeholder { background:linear-gradient(145deg,#282821,#1b1d19)!important; border:1px dashed #594738; }
body .media-placeholder::before { color:rgba(185,139,98,.13); }
body .media-placeholder h3 { color:#bda992; }
body .media-placeholder p { color:#7f796f; }
body footer { min-height:96px; padding:24px clamp(20px,5vw,80px); display:grid; grid-template-columns:1fr auto; align-items:center; gap:24px; background:#0f110f; }
body footer small { grid-column:auto; color:#aeb9b1; }

@media (max-width:767px) {
body .hero-copy { width:100%; }
body .hero h1 { font-size:50px; }
body .game-section { display:flex; flex-direction:column; }
body .game-visual { min-height:55dvh; order:0; }
body .game-copy { min-height:55dvh; padding:70px 20px; }
body .books { padding-inline:20px; }
body .book-card { grid-template-columns:110px 1fr; gap:20px; }
body .cover { width:110px; }
body .book-popover { grid-column:1/-1; margin:0; }
body .gallery-item, body .gallery-item:first-child { min-width:86vw; }
}

#allWorks { width:94vw; max-width:1500px; height:90dvh; max-height:90dvh; padding:clamp(24px,4vw,54px); overflow:hidden; }
#allWorks[open] { display:grid; grid-template-rows:auto auto minmax(0,1fr); }
#allWorks h2 { margin:0 0 12px; font-size:clamp(42px,6vw,72px); }
#allWorks .modal-tabs h3 { margin:0 0 20px; color:#b98b62; font-size:14px; font-weight:500; letter-spacing:.1em; text-transform:uppercase; }
#allWorks .all-gallery { min-width:0; max-height:none; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; overflow-y:auto; overflow-x:hidden; padding:0 10px 20px 0; }
#allWorks .gallery-item, #allWorks .gallery-item:first-child { min-width:0; width:100%; min-height:300px; height:300px; }
@media (max-width:900px) { #allWorks .all-gallery { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:600px) { #allWorks { width:calc(100% - 16px); height:calc(100dvh - 16px); max-height:calc(100dvh - 16px); padding:24px 16px; } #allWorks .all-gallery { grid-template-columns:1fr; } #allWorks .gallery-item, #allWorks .gallery-item:first-child { height:260px; min-height:260px; } }
* { scrollbar-width:thin; scrollbar-color:#765a43 #191a17; }
*::-webkit-scrollbar { width:10px; height:10px; }
*::-webkit-scrollbar-track { background:#191a17; }
*::-webkit-scrollbar-thumb { background:#765a43; border:2px solid #191a17; }
*::-webkit-scrollbar-thumb:hover { background:#9c7655; }
.socials { align-items:center; justify-content:flex-end; }
.social-link { display:grid; place-items:center; width:40px; height:40px; border:1px solid rgba(235,229,216,.28); transition:background .2s,transform .2s; }
.social-link:hover { background:rgba(235,229,216,.1); transform:translateY(-2px); }
.social-link img { width:21px; height:21px; display:block; }

/* Single source of truth for page-by-page scrolling */
html { scroll-snap-type:y mandatory; scroll-padding-top:72px; }
.hero, .game-section, .books, .final-screen { scroll-snap-align:start; scroll-snap-stop:always; }
.final-screen { min-height:calc(118dvh - 72px); display:grid; grid-template-rows:minmax(0,1fr) auto; background:#171916; }
.final-screen .world { min-height:0; height:auto; }
.final-screen footer { width:100%; }
@media (max-width:767px) {
  html { scroll-padding-top:72px; }
}
