#detail[open] {
  width: min(100vw, 650px);
  max-width: 100vw;
  height: min(96dvh, 940px);
  --detail-safe-top: max(8px, env(safe-area-inset-top));
  --detail-safe-bottom: max(8px, env(safe-area-inset-bottom));
  position: fixed;
  inset: var(--detail-safe-top) 0 var(--detail-safe-bottom);
  max-height: calc(100dvh - var(--detail-safe-top) - var(--detail-safe-bottom));
  margin: auto;
  background: #0d0a09;
  color: #f2e8d8;
  border-color: #473b30;
}
.detailScroll { position: relative; overflow: auto; min-height: 0; flex: 1; overscroll-behavior: contain; }
#detail .detailBody { overflow: visible; padding-inline: clamp(12px, 4vw, 26px); }
.detailMast { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; flex: none; padding: 4px 12px; background: #0d0a09; text-align: center; }
.detailMast strong { text-transform: uppercase; letter-spacing: .24em; }
.detailMast button { width: 44px; height: 44px; padding: 0; background: transparent; border: 0; font-size: 32px; }
.detailShowcase {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(10px, 4vw, 28px);
  align-items: center;
  padding: 18px clamp(12px, 4vw, 26px);
  background: radial-gradient(ellipse at 20% 42%, #561710, transparent 58%);
}
.detailShowcase figure { min-width: 0; margin: 0; }
.detailShowcase figcaption { margin-top: 13px; color: #d8c9b5; font-size: .72rem; line-height: 1.22; }
.detailModel { position: relative; isolation: isolate; display: flex; align-items: stretch; padding: 4% 1% 4% 0; }
.detailModel::after { content: ""; position: absolute; inset: 88% 0 2% 5%; z-index: -1; background: #000; filter: blur(9px); transform: rotate(-4deg); }
.detailBinding {
  position: relative;
  flex: 0 0 18%;
  overflow: hidden;
  transform: skewY(-15deg) translateY(3%);
  transform-origin: right center;
  border-radius: 32% 4% 4% 20% / 3% 1% 1% 3%;
  background: #32272a url('./cloth.webp') center / 100px;
  color: #f0d9b7;
  box-shadow: inset 1px 0 #9e8575, inset -3px 0 5px #0009;
}
.detailBinding img { position: absolute; width: 100%; height: 100%; object-fit: fill; }
.detailBinding span { position: absolute; inset: 6% 0; margin-inline: auto; writing-mode: vertical-rl; text-align: center; overflow: hidden; white-space: nowrap; font-weight: bold; font-size: clamp(9px, 2.2vw, 15px); text-shadow: 0 1px #000; }
.detailBinding::after, .detailFace::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.detailBinding::after { box-shadow: inset 2px 0 3px #fff4, inset -5px 0 8px #000a; }
.detailFace {
  position: relative; width: 82%; aspect-ratio: 2 / 3; overflow: hidden;
  transform: skewY(5deg); transform-origin: left center;
  border: 1px solid #aa9074; border-radius: 1px 4px 4px 1px;
  background: linear-gradient(#20181de6, #20181de6), #242124 url('./paper.webp') center / 110px;
  box-shadow: 4px 6px 0 #382b22, 6px 11px 12px #000c;
}
.detailFace::after { box-shadow: inset 3px 0 6px #000a, inset -1px 1px 2px #fff7; }
.detailModel[data-binding="paper"] .detailBinding,
.detailModel[data-binding="mass"] .detailBinding { flex-basis: 13%; border-radius: 1px; }
.detailModel[data-binding="digital"] .detailBinding { flex-basis: 9%; background: #211d20; }
.detailModel[data-binding="paper"] .detailFace,
.detailModel[data-binding="mass"] .detailFace { border-radius: 1px; box-shadow: 2px 3px #655d53, 5px 9px 12px #000c; }
.detailFace .detailCover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #1b1615; }
.detailTypeset { position: absolute; inset: 0; display: grid; align-content: center; gap: 7%; padding: 8%; text-align: center; text-shadow: 0 1px 2px #000; overflow: hidden; overflow-wrap: anywhere; }
.detailTypeset b { font-size: clamp(.82rem, 4vw, 1.7rem); line-height: 1.05; }
.detailTypeset span, .detailTypeset small { font-size: .68rem; }
.detailFace .alternate-cover-label { position: absolute; bottom: 3%; left: 5%; right: 3%; width: fit-content; padding: 2px 3px; color: white; background: #151212ed; font-size: .62rem; }
.detailFacts { min-width: 0; overflow-wrap: anywhere; }
.detailFacts h2 { font-size: clamp(1.28rem, 6vw, 2.55rem); line-height: 1.03; margin: 0 0 6px; }
.detailAuthor { margin: 0 0 10px; color: #e0cfbd; }
.detailCommunity { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 6px; color: inherit; font-size: .82rem; }
.detailCommunity small { flex-basis: 100%; color: #ffe1d7; }
.detailStars { background: linear-gradient(90deg, #ff4358 var(--rating), #82716b var(--rating)); background-clip: text; -webkit-background-clip: text; color: transparent; white-space: nowrap; font-size: 1.05rem; }
.detailFacts ul { list-style: none; padding: 0; margin: 10px 0 0; font-size: .81rem; color: #e0cfbd; }
.detailFacts li + li { margin-top: 4px; }
#detail .detailTabs { overflow-x: auto; background: #100d0c; }
#detail .detailTabs button { min-height: 44px; }
#detail .detailProgress { display: block; width: calc(100% - 32px); margin: 0 16px 10px; text-align: left; }
.detailProgress span { display: flex; justify-content: space-between; }
.detailProgress progress { display: block; width: 100%; height: 9px; margin-top: 6px; accent-color: #d12138; }
.detailEditions { margin: 12px 0; }
#detail .detailEditions header { display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; }
.detailEditions h3 { margin: 0; }
.detailEditionShelf { display: flex; overflow-x: auto; gap: 10px; padding: 10px; background: linear-gradient(0deg,#0008,transparent 38%),url('./walnut.jpg') center / cover; border-bottom: 5px solid #312015; }
#detail .detailEditionShelf button { flex: 0 0 105px; display: grid; align-content: start; gap: 6px; padding: 4px; color: inherit; background: #160e0ba8; text-align: left; }
.detailEditionShelf button > span { font-size: .72rem; overflow-wrap: anywhere; }
.detailEditionShelf .detailTypeset b { font-size: .7rem; }
.detailEditionShelf .detailTypeset small, .detailEditionShelf .detailTypeset span { font-size: .55rem; }
