/* MOMONCHY STORIES — unified cover art direction, 2026-08-30
   This file is intentionally loaded last. It is the final visual contract for
   every bookshelf cover on index.html: featured, character shelves, archive,
   and coming stories. */

:root{
  --cover-w:240px;
  --cover-radius:11px 22px 22px 11px;
  --cover-ink:#fff;
  --cover-navy:#102b5e;
  --cover-shadow:0 2px 0 rgba(255,255,255,.86) inset,0 0 0 1px rgba(52,55,81,.10),8px 13px 24px rgba(47,42,66,.16);
}

/* One physical book shape everywhere. */
html body .book-object.m-book,
html body #firstBookCover.book-object.m-book{
  position:relative!important;
  display:block!important;
  width:min(var(--cover-w),100%)!important;
  max-width:var(--cover-w)!important;
  height:auto!important;
  aspect-ratio:210/257!important;
  overflow:hidden!important;
  border:3px solid rgba(255,255,255,.98)!important;
  border-radius:var(--cover-radius)!important;
  background:#0e65bb!important;
  box-shadow:var(--cover-shadow)!important;
  transform:none!important;
  isolation:isolate!important;
  transition:transform .2s ease,box-shadow .2s ease!important;
}
html body a.book-object.m-book:hover{
  transform:translateY(-5px)!important;
  box-shadow:0 2px 0 rgba(255,255,255,.9) inset,0 0 0 1px rgba(52,55,81,.08),10px 18px 30px rgba(47,42,66,.20)!important;
}

/* Soft book spine, consistent across all sections. */
html body .book-object.m-book::before{
  content:""!important;
  display:block!important;
  position:absolute!important;
  z-index:12!important;
  left:0!important;
  top:0!important;
  bottom:0!important;
  width:9px!important;
  background:linear-gradient(90deg,rgba(5,28,68,.30),rgba(255,255,255,.18) 43%,rgba(255,255,255,0) 100%)!important;
  box-shadow:1px 0 0 rgba(255,255,255,.18)!important;
  pointer-events:none!important;
}
html body .book-object.m-book::after{display:none!important;content:none!important}

/* Full-bleed Morirunastella forest. */
html body .m-book .m-book__cover,
html body #firstBookCover.m-book .m-book__cover{
  position:absolute!important;
  inset:0!important;
  padding:0!important;
  overflow:hidden!important;
  border-radius:7px 18px 18px 7px!important;
  background:#0e65bb!important;
  isolation:isolate!important;
}
html body .m-book .m-book__forest-bg,
html body #firstBookCover.m-book .m-book__forest-bg{
  display:block!important;
  position:absolute!important;
  inset:0!important;
  z-index:0!important;
  background-image:var(--m-cover-bg,url("../img/covers/story_forest_bg.png"))!important;
  background-position:center center!important;
  background-size:cover!important;
  background-repeat:no-repeat!important;
  transform:scale(1.015)!important;
}

/* A common readable title zone without hiding the painted forest. */
html body .m-book .m-book__cover::before{
  content:""!important;
  display:block!important;
  position:absolute!important;
  z-index:1!important;
  inset:0!important;
  background:
    linear-gradient(180deg,rgba(8,37,93,.62) 0%,rgba(8,45,102,.34) 24%,rgba(5,56,96,.02) 49%,rgba(4,54,65,.06) 72%,rgba(8,44,55,.18) 100%),
    radial-gradient(circle at 50% 66%,var(--cover-glow,rgba(255,255,255,.10)) 0%,rgba(255,255,255,0) 42%)!important;
  pointer-events:none!important;
}
html body .m-book .m-book__cover::after{
  content:""!important;
  display:block!important;
  position:absolute!important;
  z-index:10!important;
  inset:5px!important;
  border:1px solid rgba(255,255,255,.24)!important;
  border-radius:5px 15px 15px 5px!important;
  pointer-events:none!important;
}

/* Character-specific tint is intentionally subtle: same series, easy recognition. */
html body .m-book.ryu{--cover-glow:rgba(255,190,212,.30)}
html body .m-book.kuri{--cover-glow:rgba(255,231,139,.28)}
html body .m-book.noma{--cover-glow:rgba(173,225,248,.30)}
html body .m-book.night{--cover-glow:rgba(221,205,255,.25)}
html body .m-book.forest{--cover-glow:rgba(197,234,184,.20)}

/* Series line + story number share one baseline. */
html body .m-book .m-book__series{
  position:absolute!important;
  z-index:7!important;
  top:14px!important;
  left:19px!important;
  right:42px!important;
  width:auto!important;
  margin:0!important;
  color:rgba(255,255,255,.92)!important;
  text-align:left!important;
  font-family:var(--site-font-en,Georgia,"Times New Roman",serif)!important;
  font-size:9px!important;
  line-height:1!important;
  font-weight:700!important;
  letter-spacing:.20em!important;
  text-shadow:0 1px 6px rgba(0,22,63,.35)!important;
}
html body .m-book .m-book__no{
  position:absolute!important;
  z-index:7!important;
  top:11px!important;
  right:15px!important;
  bottom:auto!important;
  min-width:24px!important;
  padding:4px 5px 3px!important;
  border:1px solid rgba(255,255,255,.34)!important;
  border-radius:999px!important;
  background:rgba(11,45,91,.22)!important;
  color:rgba(255,255,255,.94)!important;
  text-align:center!important;
  font-family:var(--site-font-en,"Yu Gothic",sans-serif)!important;
  font-size:9px!important;
  line-height:1!important;
  font-weight:700!important;
  letter-spacing:.05em!important;
  backdrop-filter:blur(2px)!important;
}
html body .m-book .m-book__no:empty{display:none!important}

/* Titles now occupy the exact same zone on every cover. */
html body .m-book .m-book__title,
html body .m-book.small .m-book__title,
html body .m-book.mini .m-book__title,
html body .m-book.m-book--featured .m-book__title,
html body #firstBookCover.m-book .m-book__title{
  position:absolute!important;
  z-index:7!important;
  top:39px!important;
  left:17px!important;
  right:15px!important;
  width:auto!important;
  max-width:none!important;
  min-height:2.5em!important;
  margin:0!important;
  padding:0!important;
  color:var(--cover-ink)!important;
  text-align:center!important;
  font-family:var(--site-font-round,"Hiragino Sans","Yu Gothic",Meiryo,sans-serif)!important;
  font-size:22px!important;
  line-height:1.23!important;
  font-weight:700!important;
  letter-spacing:.02em!important;
  word-break:keep-all!important;
  overflow-wrap:normal!important;
  text-shadow:0 2px 5px rgba(0,31,79,.52),0 7px 18px rgba(0,24,64,.24)!important;
}
html body .m-book .m-book__title--medium{font-size:20px!important;line-height:1.22!important}
html body .m-book .m-book__title--long{font-size:17px!important;line-height:1.18!important;top:38px!important}

/* Character illustration: clean cutout, same visual weight and baseline. */
html body .m-book .m-book__character,
html body .m-book.small .m-book__character,
html body .m-book.mini .m-book__character,
html body .m-book.m-book--featured .m-book__character{
  position:absolute!important;
  z-index:5!important;
  left:50%!important;
  right:auto!important;
  bottom:8.5%!important;
  width:64%!important;
  height:50%!important;
  max-width:none!important;
  max-height:none!important;
  transform:translateX(-50%)!important;
  object-fit:contain!important;
  object-position:center bottom!important;
  opacity:1!important;
  filter:drop-shadow(0 9px 12px rgba(3,28,57,.20))!important;
}
html body .m-book .m-book__character--group{
  width:88%!important;
  height:48%!important;
  bottom:7%!important;
}

/* The opening book uses the same cover design and a balanced 3-character lockup. */
html body #firstBookCover .m-book__trio{
  position:absolute!important;
  z-index:5!important;
  left:7%!important;
  right:5%!important;
  bottom:8%!important;
  height:45%!important;
  display:flex!important;
  align-items:flex-end!important;
  justify-content:center!important;
}
html body #firstBookCover .m-book__trio img{
  position:relative!important;
  width:39%!important;
  height:83%!important;
  object-fit:contain!important;
  filter:drop-shadow(0 8px 10px rgba(4,27,55,.18))!important;
}
html body #firstBookCover .m-book__trio img:nth-child(1){transform:translateX(12%) rotate(-3deg)!important}
html body #firstBookCover .m-book__trio img:nth-child(2){z-index:2!important;height:94%!important;transform:translateY(-5%)!important}
html body #firstBookCover .m-book__trio img:nth-child(3){transform:translateX(-12%) rotate(3deg)!important}

/* Keep all shelves visually aligned even when copy lengths vary. */
html body .m-book-entry{align-items:center!important}
html body .m-book-meta{width:100%!important;padding-top:16px!important}
html body .original-library-grid .m-book,
html body .provisional-library-grid .m-book,
html body .bookcase .m-book,
html body .mini-bookcase .m-book{width:min(var(--cover-w),100%)!important;max-width:var(--cover-w)!important}

/* Mobile: retain the same composition, only scale the physical book. */
@media(max-width:620px){
  :root{--cover-w:220px}
  html body .m-book .m-book__series{top:13px!important;left:18px!important;font-size:8px!important}
  html body .m-book .m-book__no{top:10px!important;right:13px!important;font-size:8px!important}
  html body .m-book .m-book__title,
  html body .m-book.small .m-book__title,
  html body .m-book.mini .m-book__title,
  html body .m-book.m-book--featured .m-book__title,
  html body #firstBookCover.m-book .m-book__title{top:36px!important;font-size:20px!important}
  html body .m-book .m-book__title--medium{font-size:18px!important}
  html body .m-book .m-book__title--long{font-size:16px!important;top:35px!important}
}


/* === 2026-08-30 FINAL FOREST COVER FIX ===
   cover-unified.css is loaded last, so the forest must be declared here.
   Do not use a blue background shorthand that resets background-image. */
html body .m-book .m-book__cover,
html body #firstBookCover.m-book .m-book__cover{
  background-color:#0e65bb!important;
  background-image:
    linear-gradient(180deg,rgba(8,37,93,.18) 0%,rgba(8,45,102,.08) 26%,rgba(5,56,96,.01) 55%,rgba(4,54,65,.05) 100%),
    url("../img/covers/story_forest_bg.png")!important;
  background-position:center center!important;
  background-size:cover!important;
  background-repeat:no-repeat!important;
}
html body .m-book .m-book__forest-bg,
html body #firstBookCover.m-book .m-book__forest-bg{
  background-image:url("../img/covers/story_forest_bg.png")!important;
  background-position:center center!important;
  background-size:cover!important;
  background-repeat:no-repeat!important;
}
html body .m-book .m-book__no{display:none!important}
/* === END FINAL FOREST COVER FIX === */
