/* 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; }

.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%; }
/* Hard viewport guards */
html,body{width:100%;max-width:100%;overflow-x:clip}html{overflow-y:visible}body{overflow-y:visible;touch-action:pan-y pinch-zoom}main,.hero,.game-section,.books,.world,.final-screen,footer{max-width:100%}img,video,iframe,canvas,svg{max-width:100%}.hero-copy,.game-copy,.section-heading,.book-shelf,.gallery,.tabs{min-width:0;max-width:100%}
@media(max-width:767px){.header{width:100%;max-width:100%;gap:12px}.header .brand-wordmark{min-width:0;white-space:nowrap;font-size:19px}.header nav{min-width:0;flex-shrink:0}.hero{width:100%;padding-left:16px;padding-right:16px;overflow:clip}.hero-copy{width:100%;max-width:100%}.hero h1{max-width:100%;padding-left:12px;padding-right:12px;font-size:clamp(31px,10vw,40px);line-height:1.04;overflow-wrap:break-word}.hero-copy>.hero-kicker{max-width:100%;overflow-wrap:break-word}.game-section{width:100%!important;max-width:100%;min-height:auto;overflow:clip}.game-visual{width:100%;max-width:100%}.game-copy{width:100%;max-width:100%;margin:0;padding:56px 20px}.game-copy h2{max-width:100%;font-size:clamp(42px,14vw,58px);overflow-wrap:anywhere}.game-copy p{max-width:100%;overflow-wrap:break-word}.section-shell{max-width:100%}.books .book-shelf{max-width:100%;}.books .book-card{max-width:76vw}.world{width:100%;max-width:100%;padding-left:16px!important;padding-right:16px!important}.final-screen{display:block;min-height:100dvh}.world .tabs{width:100%;display:flex;flex-wrap:wrap;overflow:visible}.world .tabs button{flex:1 1 auto;min-width:0;white-space:normal}.world .gallery{width:100%;max-width:100%;display:grid;grid-template-columns:1fr;overflow:visible;gap:14px}.world .gallery-item,.world .gallery-item:first-child{width:100%;min-width:0;min-height:280px;height:280px}.world .video-card iframe{min-height:200px}footer{width:100%;max-width:100%}dialog{max-width:calc(100vw - 16px)!important}.book-dialog .dialog-book-copy{max-width:100%;overflow-wrap:anywhere}.shop-links{max-width:100%}}
@media(max-width:360px){.header{padding-left:10px;padding-right:10px}.header .brand-wordmark{font-size:17px}.hero h1{font-size:29px}.game-copy{padding-left:16px;padding-right:16px}.game-copy h2{font-size:40px}.books-title{font-size:44px!important}footer small{font-size:11px}}

@media (max-width:767px), (hover:none), (pointer:coarse) {
  .hero { min-height:100svh; }
  .game-section { min-height:auto; }
  .game-visual { height:55svh; min-height:55svh; }
  .game-copy { min-height:auto; }
  .final-screen { min-height:auto; }
}


/* Prevent browser scroll anchoring when carousel content is replaced */
html,body,main,.world,.gallery { overflow-anchor:none; }

/* Stable mobile section heights: do not react to browser chrome resizing */
@media (max-aspect-ratio:1/1), (hover:none), (pointer:coarse) {
  body .hero { height:auto!important; min-height:100svh!important; }
  body .game-section { height:auto!important; min-height:0!important; }
  body .game-visual { height:55svh!important; min-height:55svh!important; }
  body .game-copy { height:auto!important; min-height:0!important; }
  body .header { backdrop-filter:none; -webkit-backdrop-filter:none; }
}

/* Page-by-page scrolling for landscape desktop mouse environments only */
@media (min-aspect-ratio:4/3) {
  html { scroll-snap-type:y mandatory; scroll-padding-top:72px; }
  .hero,
  .game-section,
  .books,
  .final-screen { scroll-snap-align:start; scroll-snap-stop:always; }
}

@media (max-aspect-ratio:1/1) {
  body .hero h1 { font-size:clamp(24px,8.2vw,36px)!important; line-height:1.06; letter-spacing:-.025em; }
}

/* Mobile gallery dialog stays inside the viewport; only its content scrolls vertically */
@media (max-aspect-ratio:1/1) {
  #allWorks { width:calc(100vw - 12px)!important; max-width:calc(100vw - 12px)!important; height:calc(100svh - 12px); max-height:calc(100svh - 12px); padding:46px 12px 14px; overflow:hidden; }
  #allWorks[open] { display:grid; grid-template-rows:auto auto minmax(0,1fr); }
  #allWorks h2 { margin:0 30px 5px 0; font-size:clamp(30px,10vw,42px); line-height:1; }
  #allWorks .modal-tabs h3 { margin:0 0 10px; font-size:11px; }
  #allWorks .all-gallery { width:100%; min-width:0; max-width:100%; grid-template-columns:1fr; gap:10px; overflow-y:auto; overflow-x:hidden; padding:0 4px 10px 0; }
  #allWorks .gallery-item, #allWorks .gallery-item:first-child { width:100%; min-width:0; max-width:100%; height:min(42svh,320px); min-height:220px; }
  #allWorks .dialog-close { top:7px; right:7px; width:34px; height:34px; }
}
@media (max-aspect-ratio:1/1) {
  body .hero h1 { font-size:clamp(30px,10.5vw,44px)!important; line-height:1.03; letter-spacing:-.03em; }
}

/* Centered site wordmark in the header */
body .header .brand-wordmark { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); white-space:nowrap; }
body .header { justify-content:flex-end; }
@media (max-aspect-ratio:1/1) {
  body .hero-copy > .hero-kicker { font-size:10px; line-height:1.35; letter-spacing:.055em; }
}
@media (max-aspect-ratio:1/1) {
  body .game-section { height:100svh!important; min-height:100svh!important; display:grid; grid-template-rows:48svh 52svh; }
  body .game-visual { width:100%; height:48svh!important; min-height:48svh!important; }
  body .game-copy { width:100%; height:52svh!important; min-height:0!important; margin:0; padding:22px 20px; display:flex; justify-content:center; }
  body .game-copy h2 { margin-top:8px; margin-bottom:14px; }
  body .game-copy p:not(.section-mark) { margin-top:0; margin-bottom:20px; font-size:16px; }
}
@media (max-aspect-ratio:1/1) {
  body .game-section { grid-template-columns:1fr!important; grid-template-rows:48svh 52svh!important; }
  body .game-visual { grid-column:1; grid-row:1; order:0!important; }
  body .game-copy { grid-column:1; grid-row:2; order:1!important; }
}
@media (max-aspect-ratio:1/1) {
  body .game-copy { justify-content:flex-start; padding-top:38px; }
}
.music-card { flex-direction:column; justify-content:flex-end; align-items:stretch!important; background-position:center; background-size:cover; }
.music-card audio { width:100%; margin:auto 0 18px; }
.music-card > div { width:100%; }
.social-link-disabled { opacity:.42; cursor:default; }
.social-link > span { font-size:13px; font-weight:700; }
/* Click-to-view video cards */
.video-card{position:relative;display:block!important;min-height:0!important;padding:0!important;overflow:hidden;background:#10120f;cursor:pointer;aspect-ratio:16/9}.video-card iframe{display:block;width:100%;height:100%;min-height:0!important;border:0;pointer-events:none}.video-card::after{position:absolute;inset:0;background:rgba(8,10,8,.18);content:"";transition:background 180ms cubic-bezier(.23,1,.32,1)}.video-card:hover::after,.video-card:focus-visible::after{background:rgba(8,10,8,.38)}.video-card:focus-visible{outline:2px solid #b98b62;outline-offset:3px}.video-play{position:absolute;z-index:2;top:50%;left:50%;display:grid;width:58px;height:58px;place-items:center;padding-left:4px;background:rgba(23,25,22,.9);color:#f2e6d8;border:1px solid rgba(185,139,98,.72);border-radius:50%;font-size:19px;transform:translate(-50%,-50%);transition:transform 160ms cubic-bezier(.23,1,.32,1),background 160ms ease-out}.video-card:hover .video-play{background:#6f5039;transform:translate(-50%,-50%) scale(1.05)}.video-card:active .video-play{transform:translate(-50%,-50%) scale(.96)}.video-viewer{width:min(92vw,1380px);max-width:none;padding:48px 12px 12px;overflow:hidden;background:#10120f}.video-viewer-frame{width:100%;aspect-ratio:16/9;background:#080908}.video-viewer-frame iframe{display:block;width:100%;height:100%;border:0}.video-viewer .dialog-close{color:#ebe5d8}@media(max-aspect-ratio:1/1){.video-card{width:100%;height:auto!important;min-height:0!important}.video-play{width:48px;height:48px;font-size:16px}.video-viewer{width:calc(100vw - 12px)!important;max-width:calc(100vw - 12px)!important;padding:44px 6px 6px}.video-viewer-frame{aspect-ratio:16/9}}
/* Visual novel and anonymous player profile */
.game-player{width:100vw!important;max-width:none!important;height:100dvh;max-height:none;margin:0;padding:0;border:0;background:#0b0d0b;color:#eee8dd}.game-player::backdrop{background:#080a08}.novel-stage{position:relative;width:100%;height:100%;overflow:hidden;background:#151915 center/cover no-repeat;isolation:isolate;transition:background-image .25s ease-out}.novel-stage::before{position:absolute;z-index:-1;inset:0;background:linear-gradient(180deg,rgba(7,9,7,.12) 30%,rgba(7,9,7,.68) 100%);content:""}.novel-topbar{position:absolute;z-index:3;top:0;right:0;left:0;display:flex;align-items:center;justify-content:space-between;padding:18px 24px;background:linear-gradient(rgba(7,9,7,.72),transparent);color:#f3ede3}.novel-topbar strong{font:600 18px Georgia}.novel-topbar>div{display:flex;gap:8px}.novel-topbar button{padding:8px 12px;border:1px solid rgba(225,210,192,.35);background:rgba(12,14,12,.58);color:#eee7dc;cursor:pointer}.novel-topbar .novel-close{width:39px;font-size:20px}.novel-dialogue{position:absolute;right:clamp(18px,6vw,100px);bottom:clamp(18px,5vh,60px);left:clamp(18px,6vw,100px);min-height:230px;padding:24px clamp(22px,3vw,42px);background:rgba(16,18,15,.92);border:1px solid rgba(185,139,98,.58);box-shadow:0 24px 80px rgba(0,0,0,.46);backdrop-filter:blur(12px)}.novel-meta{display:flex;justify-content:space-between;gap:20px;margin-bottom:13px;color:#cba37f;font-size:11px;letter-spacing:.12em;text-transform:uppercase}.novel-story{max-width:900px;color:#f0eae1;font:18px/1.62 Georgia}.novel-story p,.novel-story h3{margin:0 0 .68em}.novel-story h3{font-size:24px;line-height:1.25}.novel-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:9px;margin-top:18px}.novel-actions button{min-width:180px;padding:11px 18px;border:1px solid #8a674c;background:#684b36;color:#fff7ed;cursor:pointer;transition:background .15s ease-out,transform .15s ease-out}.novel-actions button:hover{background:#805e44;transform:translateY(-1px)}.novel-actions .novel-continue{min-width:54px;font-size:18px}.novel-ending{margin-right:auto;color:#a9a196;font:italic 16px Georgia}.achievement-toast{position:absolute;z-index:5;top:82px;right:24px;display:grid;grid-template-columns:48px minmax(0,240px);gap:12px;align-items:center;padding:12px;background:#171914;border:1px solid #9b7655;box-shadow:0 14px 45px rgba(0,0,0,.42);animation:achievement-in .35s cubic-bezier(.2,.8,.2,1)}.achievement-toast img{width:48px;height:48px;object-fit:cover}.achievement-toast span{display:block;color:#a99886;font-size:10px;letter-spacing:.11em;text-transform:uppercase}.achievement-toast strong{display:block;margin-top:2px;color:#f1e8dc;font:600 16px Georgia}@keyframes achievement-in{from{opacity:0;transform:translateY(-8px) scale(.98)}}.player-profile{width:min(680px,calc(100% - 24px));max-height:88dvh;overflow-y:auto;background:#171914;color:#e9e2d7;border-color:#5b493a}.player-profile h2{margin:5px 0 24px;color:#f1e9dd;font-size:48px}.player-profile h3{font:600 22px Georgia}.player-profile .dialog-close{color:#eee7dc}.recovery-notice{margin-bottom:20px;padding:16px;background:#29251d;border:1px solid #9b7655}.recovery-notice p{margin:5px 0 12px;color:#bcb2a6}.recovery-notice>div{display:flex;gap:8px}.recovery-notice code{flex:1;min-width:0;padding:9px;overflow-x:auto;background:#11130f;color:#e8c6a5;white-space:nowrap}.recovery-notice button,.profile-restart{border:1px solid #71563f;background:transparent;color:#e5d8ca;cursor:pointer}.profile-summary{display:grid;grid-template-columns:1fr auto;gap:8px 20px;padding:15px 0;border-block:1px solid #3e382f}.profile-summary span{color:#aaa197}.player-achievements{display:grid;gap:8px}.player-achievement{display:grid;grid-template-columns:48px 1fr;gap:12px;align-items:center;padding:10px;background:#20211c}.player-achievement img,.player-achievement-mark{display:grid;width:48px;height:48px;place-items:center;background:#30291f;color:#c99f78}.player-achievement strong,.player-achievement p{display:block;margin:0}.player-achievement p{margin-top:3px;color:#a9a197;font-size:12px}.profile-restore{margin-top:24px;padding:14px 0;border-top:1px solid #3e382f}.profile-restore summary{cursor:pointer;color:#c3b7aa}.profile-restore form{display:grid;gap:10px;margin-top:14px}.profile-restore label{display:grid;gap:6px}.profile-restore input{width:100%;padding:11px;background:#10120f;color:#eee7dc;border:1px solid #594b3e}.profile-error{min-height:1.3em;margin:0;color:#e2a598}.profile-restart{margin-top:14px;padding:9px 12px;color:#c8a080}@media(max-width:767px){.novel-topbar{padding:10px 12px}.novel-topbar strong{font-size:15px}.novel-topbar button{padding:7px 9px;font-size:11px}.novel-dialogue{right:8px;bottom:8px;left:8px;min-height:42dvh;max-height:66dvh;padding:17px 16px;overflow-y:auto}.novel-story{font-size:16px;line-height:1.5}.novel-story h3{font-size:20px}.novel-actions{display:grid;justify-content:stretch}.novel-actions button{width:100%;min-width:0}.achievement-toast{top:58px;right:8px;left:8px;grid-template-columns:40px 1fr}.achievement-toast img{width:40px;height:40px}.player-profile{padding:26px 18px!important}.player-profile h2{font-size:38px}.recovery-notice>div{align-items:stretch;flex-direction:column}.recovery-notice code{font-size:11px}.profile-summary{grid-template-columns:minmax(0,1fr) auto}}@media(prefers-reduced-motion:reduce){.achievement-toast{animation:none}.novel-stage,.novel-actions button{transition:none}}
.novel-story{white-space:pre-line}.novel-story p,.novel-story h3{white-space:normal}
/* Illustrated storybook visual language — based on the supplied game reference */
.game-player{--novel-night:#182952;--novel-blue:#354c82;--novel-blue-deep:#263866;--novel-gold:#c5a36b;--novel-gold-dark:#90714d;--novel-paper:#eadcc1;--novel-paper-light:#f4e8d1;--novel-paper-deep:#d7c09c;--novel-ink:#493b34;font-family:Arial,sans-serif}.novel-stage::before{background:linear-gradient(180deg,rgba(17,31,67,.08) 35%,rgba(13,23,48,.5) 100%)}.novel-topbar{align-items:flex-start;padding:24px 28px;background:none;pointer-events:none}.novel-topbar>strong{padding:8px 14px;background:rgba(28,43,85,.54);color:#f1d79c;border:1px solid rgba(220,185,119,.5);border-radius:18px;text-shadow:0 2px 6px rgba(11,19,42,.6);pointer-events:auto}.novel-tools{display:flex;gap:12px;pointer-events:auto}.novel-topbar .novel-round-button{display:grid;width:58px;height:58px;place-items:center;padding:0;background:linear-gradient(145deg,#40578f,#2b3e75);color:#f2d58f;border:3px solid #d7b77c;border-radius:50%;box-shadow:0 0 0 2px rgba(68,49,38,.65),inset 0 0 0 2px rgba(255,226,163,.18),0 5px 14px rgba(8,15,35,.32)}.novel-round-button svg{width:29px;height:29px;fill:none;stroke:currentColor;stroke-width:2.3;stroke-linecap:round;stroke-linejoin:round}.novel-topbar .novel-round-button:hover{background:linear-gradient(145deg,#4b64a0,#324981);transform:translateY(-1px)}.novel-topbar .novel-round-button:focus-visible{outline:3px solid #fff1c7;outline-offset:3px}.novel-menu{position:absolute;z-index:8;top:96px;right:28px;display:grid;width:230px;padding:13px;background:var(--novel-paper);color:var(--novel-ink);border:2px solid var(--novel-gold-dark);border-radius:18px;box-shadow:inset 0 0 0 3px var(--novel-paper-light),0 16px 44px rgba(8,15,35,.42)}.novel-menu[hidden]{display:none}.novel-menu strong{padding:7px 9px 11px;font:600 19px Georgia;border-bottom:1px solid rgba(116,88,56,.3)}.novel-menu button{padding:11px 10px;background:transparent;color:var(--novel-ink);border:0;border-bottom:1px solid rgba(116,88,56,.2);text-align:left;cursor:pointer}.novel-menu button:last-child{border-bottom:0;color:#78483e}.novel-menu button:hover{background:rgba(91,68,43,.08)}.novel-dialogue{right:clamp(30px,5.5vw,92px);bottom:clamp(20px,3.5vh,45px);left:clamp(30px,5.5vw,92px);min-height:230px;padding:31px 27px 20px;background:linear-gradient(105deg,var(--novel-paper-light),var(--novel-paper) 48%,#e5d3b5);color:var(--novel-ink);border:3px solid var(--novel-gold-dark);border-radius:30px;box-shadow:inset 0 0 0 3px #f8ecd6,inset 0 0 0 5px rgba(144,113,77,.48),0 18px 52px rgba(7,14,33,.48);backdrop-filter:none}.novel-dialogue::before,.novel-dialogue::after{position:absolute;top:7px;color:rgba(116,88,59,.48);font:42px/1 Georgia;content:"❧";pointer-events:none}.novel-dialogue::before{left:18px;transform:rotate(-28deg)}.novel-dialogue::after{right:18px;transform:scaleX(-1) rotate(-28deg)}.novel-meta{position:relative;z-index:1;justify-content:center;margin:0 auto 9px;color:#846b53;font-size:10px;letter-spacing:.08em}.novel-meta span+span::before{margin-right:12px;content:"•"}.novel-story{position:relative;z-index:1;max-width:920px;min-height:62px;margin:0 auto;color:var(--novel-ink);font:18px/1.55 Arial,sans-serif;text-align:center;text-shadow:0 1px rgba(255,255,255,.5)}.novel-story p,.novel-story h3{margin:0 0 .55em}.novel-story h3{color:#41342e;font:600 23px/1.3 Georgia}.novel-actions{position:relative;z-index:1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 14px;margin:18px -2px 0;padding-top:15px;border-top:1px solid rgba(126,95,62,.46)}.novel-actions button{position:relative;display:flex;min-width:0;min-height:58px;align-items:center;justify-content:center;padding:10px 53px 10px 66px;overflow:visible;background:linear-gradient(180deg,#f3e6cd,#e4d1b0);color:var(--novel-ink);border:2px solid #aa8960;border-radius:30px;box-shadow:inset 0 0 0 2px rgba(255,249,231,.72),0 2px 4px rgba(70,47,28,.13);font-size:16px;text-align:center;text-shadow:0 1px #fff4de}.novel-actions button:hover{background:linear-gradient(180deg,#f9eed8,#ead7b6);border-color:#886945;transform:translateY(-1px)}.novel-actions button:focus-visible{outline:3px solid var(--novel-blue);outline-offset:2px}.novel-actions button:active{transform:translateY(1px)}.choice-medallion{position:absolute;left:12px;display:grid;width:46px;height:46px;place-items:center;background:linear-gradient(145deg,#42598f,#2b3f75);color:#f2d58f;border:2px solid #d1ac70;border-radius:50%;box-shadow:0 0 0 2px #795f43,inset 0 0 0 1px rgba(255,230,169,.24)}.choice-medallion svg{width:25px;height:25px;fill:currentColor;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}.choice-flourish{position:absolute;right:15px;color:rgba(139,105,68,.42);font:26px Georgia;transform:rotate(-25deg)}.novel-actions .novel-continue{grid-column:2;justify-self:end;width:min(100%,310px);padding-right:68px;padding-left:20px}.novel-continue .choice-medallion{right:12px;left:auto}.novel-ending{grid-column:1/-1;margin:4px auto;color:#74614f;font:italic 16px Georgia}.achievement-toast{top:100px;right:28px;padding:12px 16px;background:var(--novel-paper);color:var(--novel-ink);border:2px solid var(--novel-gold-dark);border-radius:17px;box-shadow:inset 0 0 0 2px var(--novel-paper-light),0 12px 36px rgba(8,15,35,.4)}.achievement-toast span{color:#80684e}.achievement-toast strong{color:var(--novel-ink)}.achievement-toast .player-achievement-mark{background:var(--novel-blue);color:#f2d58f;border:2px solid var(--novel-gold)}.player-profile{background:linear-gradient(120deg,#f2e5cc,#e4d2b4);color:var(--novel-ink,#493b34);border:3px solid #90714d;border-radius:24px;box-shadow:inset 0 0 0 3px #faefd9,0 24px 70px rgba(8,15,35,.5)}.player-profile h2,.player-profile h3{color:#493b34}.player-profile .dialog-close{color:#493b34}.player-profile .recovery-notice{background:#dfcba8;color:#493b34;border-color:#98764f;border-radius:14px}.player-profile .recovery-notice p,.player-profile .profile-restore summary{color:#665443}.player-profile .recovery-notice code,.player-profile .profile-restore input{background:#f7ead2;color:#493b34;border-color:#a8865c}.player-profile .recovery-notice button,.player-profile .profile-restart{color:#594638;border-color:#8c6d4b}.player-profile .profile-summary{border-color:rgba(109,82,51,.3)}.player-profile .profile-summary span{color:#74614f}.player-profile .player-achievement{background:rgba(121,91,55,.1);border-radius:13px}.player-profile .player-achievement p{color:#6c5947}@media(max-width:767px){.novel-topbar{padding:12px}.novel-topbar>strong{display:none}.novel-tools{margin-left:auto;gap:9px}.novel-topbar .novel-round-button{width:48px;height:48px;border-width:2px}.novel-round-button svg{width:24px;height:24px}.novel-menu{top:70px;right:10px;width:min(240px,calc(100vw - 20px))}.novel-dialogue{right:7px;bottom:7px;left:7px;min-height:0;max-height:68dvh;padding:26px 12px 12px;border-width:2px;border-radius:22px;box-shadow:inset 0 0 0 2px #f8ecd6,inset 0 0 0 4px rgba(144,113,77,.42),0 12px 38px rgba(7,14,33,.45)}.novel-dialogue::before,.novel-dialogue::after{top:5px;font-size:31px}.novel-dialogue::before{left:11px}.novel-dialogue::after{right:11px}.novel-meta{margin-bottom:7px;font-size:9px}.novel-story{min-height:0;font-size:15px;line-height:1.45}.novel-story h3{font-size:19px}.novel-actions{grid-template-columns:1fr;gap:7px;margin-top:12px;padding-top:10px}.novel-actions button{min-height:48px;padding:7px 42px 7px 54px;border-width:1.5px;font-size:13px}.choice-medallion{left:8px;width:38px;height:38px}.choice-medallion svg{width:21px;height:21px}.choice-flourish{right:10px;font-size:20px}.novel-actions .novel-continue{grid-column:1;width:100%;padding-right:55px}.novel-continue .choice-medallion{right:8px}.novel-ending{grid-column:1}.achievement-toast{top:72px;right:8px;left:8px}.player-profile{border-radius:18px}}@media(max-height:620px) and (orientation:landscape){.novel-topbar{padding:10px 14px}.novel-topbar>strong{display:none}.novel-topbar .novel-round-button{width:44px;height:44px}.novel-menu{top:62px}.novel-dialogue{right:16px;bottom:8px;left:16px;max-height:76dvh;padding:23px 16px 10px}.novel-story{font-size:14px;line-height:1.35}.novel-actions{gap:6px 10px;margin-top:8px;padding-top:8px}.novel-actions button{min-height:43px;font-size:13px}.choice-medallion{width:34px;height:34px}.choice-medallion svg{width:19px;height:19px}}@media(prefers-reduced-motion:reduce){.novel-topbar .novel-round-button,.novel-actions button{transition:none}}
.achievement-toast[hidden]{display:none}
/* Larger botanical corners and symmetrical choice ornaments */
.novel-dialogue::before,.novel-dialogue::after{top:5px;width:92px;height:79px;background:url('/assets/ui/botanical-corner.svg') left top/contain no-repeat;color:transparent;font-size:0;content:""}.novel-dialogue::before{left:12px;transform:none}.novel-dialogue::after{right:12px;transform:scaleX(-1)}.novel-actions button[data-choice]{padding-right:54px;padding-left:54px}.choice-flourish-left{right:auto;left:15px;transform:scaleX(-1) rotate(-25deg)}@media(max-width:767px){.novel-dialogue::before,.novel-dialogue::after{top:4px;width:62px;height:54px}.novel-dialogue::before{left:7px}.novel-dialogue::after{right:7px}.novel-actions button[data-choice]{padding-right:40px;padding-left:40px}.choice-flourish-left{left:10px}}
/* Panel corners intentionally clean; leaf ornaments remain on choice buttons. */
.novel-dialogue::before,.novel-dialogue::after{display:none}
/* Player chronicle: attempt-by-attempt path map */
.player-chronicle{width:min(1120px,calc(100% - 28px));max-width:none;max-height:90dvh;padding:34px;background:linear-gradient(120deg,#f2e5cc,#e3d0b0);color:#493b34;border:3px solid #90714d;border-radius:24px;box-shadow:inset 0 0 0 3px #faefd9,0 24px 70px rgba(8,15,35,.5)}.player-chronicle .dialog-close{color:#493b34}.chronicle-heading{display:flex;align-items:end;justify-content:space-between;gap:24px}.chronicle-heading p{margin:0;color:#826b54;font-size:12px}.chronicle-heading h2{margin:3px 0 0;color:#493b34;font-size:44px}.chronicle-heading label{display:grid;gap:5px;color:#75604d;font-size:11px}.chronicle-heading select{min-width:230px;padding:10px 32px 10px 11px;background:#f8ead1;color:#493b34;border:1px solid #9d7c55}.chronicle-summary{display:flex;align-items:baseline;gap:13px;margin:20px 0 14px;padding:12px 15px;background:rgba(113,82,47,.09);border:1px solid rgba(112,82,49,.22);border-radius:12px}.chronicle-summary span{font-size:12px}.chronicle-summary strong{font:600 18px Georgia}.chronicle-summary small{margin-left:auto;color:#796550}.chronicle-graph{min-height:290px;padding:28px;overflow:auto;background-color:#28395f;background-image:radial-gradient(rgba(226,205,160,.18) 1px,transparent 1px);background-size:22px 22px;border:2px solid #806445;border-radius:18px;box-shadow:inset 0 0 30px rgba(9,18,40,.38)}.chronicle-path{display:flex;min-width:max-content;align-items:center;padding:50px 12px}.chronicle-event{position:relative;display:grid;width:210px;min-height:116px;grid-template-columns:34px 1fr;gap:10px;align-items:start;padding:17px 14px 13px;overflow:visible;background:#ecdec3;color:#493b34;border:2px solid #9b7b56;border-radius:14px;box-shadow:inset 0 6px 0 var(--event-color),0 8px 18px rgba(7,14,31,.25)}.chronicle-event+.chronicle-event{margin-left:54px}.chronicle-connector{position:absolute;top:50%;right:-56px;width:54px;height:2px;background:#c8a873}.chronicle-event:last-child .chronicle-connector{display:none}.chronicle-event-icon{display:grid;width:32px;height:32px;place-items:center;background:#344a7e;color:#efd28f;border:2px solid #c5a36b;border-radius:50%;font-weight:700}.chronicle-event small{display:block;color:#846e59;font-size:9px}.chronicle-event strong{display:block;margin-top:3px;font:600 15px/1.2 Georgia}.chronicle-event p{margin:5px 0 0;color:#715f4e;font-size:11px}.chronicle-event.event-choice{min-height:92px;background:#dfceb0}.chronicle-event.event-page_view{width:155px;min-height:84px}.chronicle-event.event-achievement{background:#f0dcae}.chronicle-event.event-attempt_end{background:#d8c2a5}.chronicle-empty{margin:90px auto;color:#e9d7b8;text-align:center}.novel-actions .novel-new-attempt{grid-column:2;justify-self:end;width:min(100%,310px)}@media(max-width:767px){.player-chronicle{width:calc(100% - 12px)!important;max-width:calc(100% - 12px)!important;padding:25px 12px 12px!important;border-radius:18px}.chronicle-heading{align-items:stretch;flex-direction:column;gap:12px}.chronicle-heading h2{font-size:34px}.chronicle-heading select{width:100%;min-width:0}.chronicle-summary{display:grid;grid-template-columns:1fr auto;gap:4px 8px}.chronicle-summary small{grid-column:1/-1;margin-left:0}.chronicle-graph{max-height:58dvh;padding:20px 14px}.chronicle-path{min-width:0;align-items:stretch;flex-direction:column;padding:5px}.chronicle-event,.chronicle-event.event-page_view{width:100%;min-height:78px}.chronicle-event+.chronicle-event{margin-top:40px;margin-left:0}.chronicle-connector{top:auto;right:auto;bottom:-42px;left:30px;width:2px;height:40px}.novel-actions .novel-new-attempt{grid-column:1;width:100%}}
/* Fullscreen art viewer and edge-to-edge video player */
.image-card{cursor:zoom-in}.image-card:focus-visible{outline:3px solid #d1ad78;outline-offset:3px}.image-viewer{width:100vw!important;max-width:none!important;height:100dvh;max-height:none;margin:0;padding:0;border:0;background:#070807;overflow:hidden}.image-viewer img{display:block;width:100%;height:100%;max-width:none;object-fit:contain}.image-viewer .dialog-close,.video-viewer .dialog-close{z-index:3;top:10px;right:10px;display:grid;width:42px;height:42px;place-items:center;padding:0;background:rgba(9,11,9,.78);color:#fff;border:1px solid rgba(255,255,255,.5);border-radius:50%;font-size:28px;line-height:1;backdrop-filter:blur(7px)}.image-viewer .dialog-close:hover,.video-viewer .dialog-close:hover{background:#252a24}.image-viewer::backdrop{background:#070807}.video-viewer{width:min(96vw,calc(92dvh * 1.7778))!important;max-width:none!important;margin:auto;padding:0;border:0;background:#050505;overflow:hidden}.video-viewer-frame{width:100%;aspect-ratio:16/9;background:#050505}.video-viewer-frame iframe{display:block;width:100%;height:100%;max-width:none;border:0}@media(max-width:767px){.image-viewer{width:100vw!important;max-width:none!important}.image-viewer .dialog-close,.video-viewer .dialog-close{top:7px;right:7px;width:38px;height:38px}.video-viewer{width:calc(100vw - 8px)!important;max-width:calc(100vw - 8px)!important;padding:0}.video-viewer-frame{aspect-ratio:16/9}}@media(max-height:520px) and (orientation:landscape){.video-viewer{width:min(96vw,calc(96dvh * 1.7778))!important}.video-viewer .dialog-close{top:6px;right:6px}}
/* Achievement collection and fog-of-war states */
.achievement-collection{width:min(920px,calc(100% - 24px));max-width:none;max-height:88dvh;padding:34px;background:linear-gradient(120deg,#f2e5cc,#e3d0b0);color:#493b34;border:3px solid #90714d;border-radius:24px;box-shadow:inset 0 0 0 3px #faefd9,0 24px 70px rgba(8,15,35,.5)}.achievement-collection .dialog-close{color:#493b34}.achievement-collection-heading{display:grid;grid-template-columns:1fr auto;align-items:end;margin-bottom:22px}.achievement-collection-heading p{grid-column:1/-1;margin:0;color:#826b54;font-size:12px}.achievement-collection-heading h2{margin:3px 0 0;color:#493b34;font-size:44px}.achievement-collection-heading>span{padding:7px 12px;background:rgba(53,76,130,.1);color:#354c82;border:1px solid rgba(53,76,130,.25);border-radius:16px;font-weight:700}.achievement-collection-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-height:62dvh;padding:3px;overflow-y:auto}.achievement-tile{position:relative;display:grid;min-height:124px;grid-template-columns:76px minmax(0,1fr);gap:15px;align-items:center;padding:16px;background:#eadbc0;border:2px solid #a4835c;border-radius:17px;box-shadow:inset 0 0 0 2px rgba(255,246,224,.62)}.achievement-tile-icon{position:relative;display:grid;width:72px;height:72px;place-items:center;overflow:hidden;background:linear-gradient(145deg,#40578f,#2b3e75);color:#f2d58f;border:3px solid #c7a36a;border-radius:50%;box-shadow:0 0 0 2px #765d43}.achievement-tile-icon img{width:100%;height:100%;object-fit:cover}.achievement-tile-icon>span{font:600 24px Georgia}.achievement-tile small{display:block;color:#806b56;font-size:9px}.achievement-tile strong{display:block;margin-top:4px;color:#493b34;font:600 17px/1.2 Georgia}.achievement-tile p{margin:6px 0 0;color:#6f5d4c;font-size:12px;line-height:1.35}.achievement-tile.locked{background:#293a61;border-color:#62729a;box-shadow:inset 0 0 0 2px rgba(226,211,177,.12)}.achievement-tile.locked .achievement-tile-icon{background:#1c2949;border-color:#7782a0;filter:saturate(.5)}.achievement-tile.locked small{color:#a9b0c1}.achievement-tile.locked strong{color:#e1deD5}.achievement-tile.locked p{color:#b5bac7}.locked-rune{z-index:1;color:#c7c6c1!important;filter:blur(1px);opacity:.52}.fog{position:absolute;width:85px;height:28px;background:rgba(220,225,226,.32);border-radius:50%;filter:blur(9px);animation:fog-drift 4s ease-in-out infinite alternate}.fog-one{top:15px;left:-20px}.fog-two{right:-23px;bottom:11px;animation-delay:-2s}@keyframes fog-drift{to{transform:translateX(18px);opacity:.45}}.achievement-collection-empty{grid-column:1/-1;margin:80px auto;color:#78634f;text-align:center}@media(max-width:700px){.achievement-collection{width:calc(100% - 12px)!important;max-width:calc(100% - 12px)!important;padding:26px 13px 13px!important;border-radius:18px}.achievement-collection-heading h2{font-size:34px}.achievement-collection-grid{grid-template-columns:1fr;max-height:68dvh}.achievement-tile{min-height:108px;grid-template-columns:60px 1fr;padding:13px}.achievement-tile-icon{width:58px;height:58px}.achievement-tile strong{font-size:15px}.achievement-tile p{font-size:11px}}@media(prefers-reduced-motion:reduce){.fog{animation:none}}
