* { box-sizing: border-box }
[hidden] { display: none !important }
html, body { margin: 0; min-height: 100%; background: #211911; color: #ffedcd; font-family: "Microsoft YaHei UI", "Microsoft YaHei", sans-serif }
main { min-height: 100svh; display: grid; place-content: center; justify-items: center }
#viewport { position: relative; width: min(100vw, 177.68svh); aspect-ratio: 1672 / 941; overflow: hidden }
#room { position: absolute; top: 0; left: 0; width: 1672px; height: 941px; transform-origin: top left; background: #805331 url('assets/room.webp') center / 100% 100%; isolation: isolate }
@media (orientation: landscape) {
 #viewport { width: 100vw; height: 100svh; aspect-ratio: auto }
}
button, input { font: inherit }
button { cursor: pointer }
button:focus-visible, input:focus-visible { outline: 4px solid #ffd575; outline-offset: 3px }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap }
#screen { position: absolute; left: 202px; top: 177px; width: 497px; height: 328px; border-radius: 11% 10% 8% 8% / 15% 14% 12% 11%; overflow: hidden; background: #122121; color: #fff1cf }
#screen > video, #still, #glass { position: absolute; inset: 0; width: 100%; height: 100% }
#screen > video, #still {
  width: calc(100% * var(--screen-width-ratio, 1));
  transform: scaleX(var(--screen-scale-x, 1));
  transform-origin: left center;
  object-fit: cover;
}
#still { filter: brightness(.79) saturate(.85) }
#glass { pointer-events: none; z-index: 1; box-shadow: inset 0 0 26px 7px #061315a8; background: repeating-linear-gradient(transparent 0 3px,#08111619 3px 4px), linear-gradient(125deg,#b6d2cb16,transparent 28%); border-radius: inherit }
#osd { position: absolute; z-index: 2; inset: auto 0 0; padding: 28px 35px 22px; background: linear-gradient(transparent,#0b1515df); pointer-events: none; text-shadow: 0 1px 4px #10221e }
#signal { font: bold 14px monospace; letter-spacing: 2px; color: #dfefb8 }
#caption { margin-top: 5px; display: block; font-family: "SimSun", serif; font-size: 26px; letter-spacing: 2px }
#transport { z-index: 3; position: absolute; bottom: 24px; right: 20px; color: #fff9dc; border: solid 1px #e3e2c083; border-radius: 20px; padding: 5px 13px; background: #18221fc9; font-size: 16px }
#empty { position: absolute; z-index: 2; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; background: radial-gradient(ellipse,#1e3734,#101d1e 85%) }
#empty strong { font-size: 32px; letter-spacing: 1px }
#empty img { width: 150px; height: 150px; image-rendering: pixelated; transform: scaleX(var(--screen-scale-x, 1)) }
#empty small { font-size: 16px; color: #e4dec9 }
#searchForm { position: absolute; top: 91px; left: 1070px; width: 531px; height: 45px; display: flex; align-items: center }
#query { width: 100%; font-size: 25px; border: 0; padding: 1px 44px 2px 6px; color: #482f1f; background: transparent; font-family: "SimSun",serif; font-weight: bold }
#query::placeholder { color: #6d503b }
#clear { position: absolute; right: 10px; background: transparent; color: #5c402b; border: 0; font-size: 28px }
.tier { position: absolute; left: 977px; width: 660px; height: 194px; display: grid; grid-template-columns: 95px repeat(3, 1fr); align-items: end; justify-items: center }
#recommended { top: 170px }
#popular { top: 398px }
.tier h2 { align-self: center; margin: 0; padding: 7px; background: linear-gradient(110deg,#dcb078,#f7dfb7,#c99a66); color: #69361e; border: 2px groove #ba8453; border-radius: 6px; font: bold 20px "SimSun",serif; box-shadow: 2px 3px 4px #29160e99 }
.cover { width: 122px; height: 185px; padding: 0; background: #221c18; border: 0; border-radius: 4px; box-shadow: 6px 3px 8px #160d08ba; transition: transform .18s, opacity .2s; position: relative; transform-origin: bottom }
.cover img { width: 100%; height: 100%; border-radius: inherit; display: block }
.tier h2 { white-space: nowrap; font-size: 18px; padding-inline: 6px }
.cover:hover:enabled, .cover:focus-visible, .cover.selected { transform: translateY(-6px); outline: 3px solid #ffcf82; box-shadow: 0 0 14px #ffc36388 }
.cover.dim { opacity: .25 }
.cover.vacant { visibility: hidden }
.cover:disabled { cursor: default }
.series-jacket { position: absolute; inset: auto 0 0; display: grid; gap: 3px; padding: 8px 6px; border-top: 1px solid #ac835e; border-radius: 0 0 4px 4px; background: #251a13f7; color: #ffedcd }
.series-jacket strong { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font: bold 19px/1.2 "SimSun", serif; overflow-wrap: anywhere }
.series-jacket small { font-size: 15px; color: #e8cfaa }
#seriesDialog { width: min(660px, calc(100vw - 32px)); max-height: min(74dvh, 660px); padding: 0; border: 1px solid #a27b55; border-radius: 9px; background: #251a13; color: #ffedcd; box-shadow: 0 18px 70px #100905b8 }
#seriesDialog::backdrop { background: #160e0bbd }
.series-heading { position: sticky; top: 0; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 24px 16px; border-bottom: 1px solid #70543e; background: #33241a }
.series-heading h2 { margin: 0; font: bold clamp(24px, 5vw, 33px)/1.2 "SimSun", serif; overflow-wrap: anywhere }
.series-heading p { margin: 6px 0 0; color: #e8cfaa; font-size: 14px }
#seriesClose { width: 44px; height: 44px; border: 1px solid #a27b55; border-radius: 5px; background: #251a13; color: inherit; font-size: 25px }
#seriesMembers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; list-style: none; margin: 0; padding: 20px 24px 24px }
#seriesMembers button { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 12px; width: 100%; height: 100%; padding: 8px; border: 1px solid #70543e; border-radius: 5px; background: #33241a; color: inherit; text-align: left; overflow-wrap: anywhere }
#seriesMembers button:hover, #seriesClose:hover { border-color: #ffcf82; background: #412e21 }
#seriesMembers img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 2px }
#seriesMembers small { display: block; margin-top: 4px; color: #e8cfaa }
#details { position: absolute; left: 977px; top: 615px; width: 664px; height: 229px; padding: 16px 21px; display: grid; grid-template-columns: 114px 1fr; align-items: center; gap: 23px; color: #422919; background: linear-gradient(105deg,#ecd0a7,#f7e9ce 60%,#dbc29d); border: 4px ridge #b8844c; border-radius: 5px; box-shadow: 0 3px 8px #321b10 }
#detailCover { width: 112px; height: 177px; object-fit: cover; box-shadow: 2px 4px 5px #825f4080 }
#details > div { max-height: 100%; overflow: auto; overscroll-behavior: contain }
.shelf-page { position: absolute; left: 17px; bottom: 36px; border: 0; border-radius: 3px; padding: 3px 8px; color: #422919; background: #e7c79d }
#details small, #details h3 { color: #803d25; font-weight: bold }
#details small { font-size: 15px; letter-spacing: 2px }
#details h2 { font-family: "SimSun",serif; font-size: 32px; margin: 2px 0 3px }
#details h3 { font-size: 17px; margin: 8px 0 3px; padding-top: 7px; border-top: 1px solid #b28c66 }
#details p { font-size: 17px; margin: 0; line-height: 1.48 }
#actor, #case, #disc { position:absolute; pointer-events: none; transform-origin: center bottom }
#actor { z-index: 6; left: 805px; top: 900px; height: 251px; transform: translate(-50%,-100%); filter: drop-shadow(2px 4px 3px #28120763) }
#walkingActor { position: absolute; inset: 0; z-index: 6; pointer-events: none }
#case { z-index: 7; width: 75px; height: 110px; perspective: 260px }
#case img, .case-back { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 3px; border: 2px solid #403930 }
#case img { transform-origin: left; transition: transform .2s }
.case-back { background: radial-gradient(circle,#252722 0 5%,#a4a599 6% 33%,#383a36 35%); box-shadow: 2px 2px 3px #21150c99 }
#case.open img { transform: rotateY(-82deg) }
#case.behind { z-index: 5 }
#case.stowed::after { content: ""; position: absolute; inset: 40% -8% -7%; border-radius: 3px 3px 12px 12px; background: repeating-linear-gradient(47deg,#943f27 0 2px,#a95834 2px 4px); border: 2px solid #743d29; box-shadow: inset 0 3px 3px #daa1756b }
#disc { width: 66px; height: 22px; z-index: 8; border-radius: 100%; background: radial-gradient(ellipse at center,#302b25 0 8%,#ded4ca 9% 14%,transparent 15%),conic-gradient(#eee3cd,#7aaebb,#f7dac4,#c4b8ed,#faf4db,#8fa39d,#eee3cd); border: 1px solid #d9dbd0; box-shadow: 0 2px 1px #4f4c48 }
#tray { position: absolute; z-index: 5; left: 383px; top: 600px; width: 115px; height: 22px; background: radial-gradient(ellipse,#36332b 0 55%,#625d50 57%,#302e29 66%); border: 2px ridge #aaa39a; border-radius: 3px 3px 9px 9px; transform-origin: center top; transform: scaleY(0); transition: transform .25s }
#tray.out { transform: scaleY(1) }
#led { position: absolute; left: 519px; top: 594px; width: 78px; height: 19px; padding: 2px 3px; text-align: center; color: #a3cf66; background: #141a0c; font: bold 13px monospace; letter-spacing: 1px }
#ladder { position: absolute; inset: 0; z-index: 4; pointer-events: none }
.mobile { display: none }
@media (max-width: 700px) and (orientation: portrait) {
 main {
   display: block;
   place-content: normal;
   justify-items: normal;
   color: #542d20;
   background: radial-gradient(ellipse at top left,#f5e1ba,transparent 66%),linear-gradient(#e9cca0,#d0a575);
 }
 #searchForm, #empty { display: none }
 .mobile { display: block; margin-inline: auto }
 .mobile-toolbar { max-width: 550px; padding: 0 20px 18px }
 #viewport {
   width: min(calc(100vw - 40px), 510px);
   margin-inline: auto;
   border-radius: 2px;
   outline: 4px solid #714328;
   outline-offset: 2px;
   box-shadow: 0 9px 22px #4b221d50;
 }
 .mobile-brand {
   padding: max(16px, env(safe-area-inset-top)) 0 14px;
   border-bottom: 1px solid #b0895c;
   font: bold 22px/1.3 "SimSun", serif;
 }
 #mobileSearch { position: relative; margin-top: 14px }
 #mobileQuery {
   width: 100%;
   min-height: 48px;
   padding: 11px 54px 11px 14px;
   border: 1px solid #a27b55;
   border-radius: 8px;
   background: #fffaf0;
   color: #392619;
   font-size: 16px;
 }
 #mobileQuery::-webkit-search-cancel-button { display: none }
 #mobileClear {
   position: absolute;
   inset: 2px 2px 2px auto;
   width: 44px;
   border: 0;
   border-radius: 6px;
   background: transparent;
   color: #5c402b;
   font-size: 23px;
 }
 #mobileRequest {
   position: relative;
   margin-top: -22px;
   padding: 28px 24px max(24px, env(safe-area-inset-bottom));
   border-radius: 24px 24px 0 0;
   background: #f5f0e5;
   color: #2c332c;
   text-align: center;
 }
 #mobileRequest h2 { margin: 0; font: bold 29px/1.25 "SimSun", serif }
 #requestTerm { margin: 8px 0 0; color: #625f53; font-size: 15px; overflow-wrap: anywhere }
 #mobileRequest figure { margin: 16px 0 }
 #mobileRequest img {
   display: block;
   width: min(231px, 100%);
   height: auto;
   margin: auto;
   background: #fff;
   image-rendering: pixelated;
   -webkit-touch-callout: default;
 }
 #mobileRequest figcaption { margin-top: 10px; font-size: 16px; font-weight: bold }
 #mobileRequest figcaption small { display: block; margin-top: 4px; color: #625f53; font-weight: normal }
 #returnToDiscs {
   width: min(100%, 350px);
   min-height: 48px;
   border: 0;
   border-radius: 6px;
   background: #354f43;
   color: #fffbef;
   font-weight: bold;
 }
 #returnToDiscs:focus-visible { outline-color: #354f43 }
 #mobileRequest:not([hidden]) ~ #mobileCatalogStatus,
 #mobileRequest:not([hidden]) ~ #mobileList,
 #mobileList:empty { display: none }
 #mobileCatalogStatus {
   max-width: 510px;
   margin: 26px auto 20px;
   width: calc(100% - 40px);
   min-height: 185px;
   display: grid;
   place-content: center;
   justify-items: center;
   gap: 7px;
   padding: 20px 16px;
   color: #542d20;
   border: 1px solid #9e6d44;
   outline: 1px dashed #c4a06f;
   outline-offset: -8px;
   background: #f9edce;
   text-align: center;
 }
 #mobileCatalogStatus:focus-visible { box-shadow: 0 0 0 3px #714328 }
 #mobileCatalogStatus::before {
   content: "";
   width: 35px;
   height: 35px;
   margin-bottom: 5px;
   border: 2px solid #865c3a;
   border-radius: 50%;
   background: radial-gradient(circle,#865c3a 0 3px,#f9edce 4px 6px,transparent 7px),
     repeating-radial-gradient(circle,transparent 0 4px,#b68d62 5px 6px);
 }
 #mobileCatalogTitle { font: bold 23px/1.2 "SimSun",serif }
 #mobileCatalogMessage { margin: 0; color: #6b5b46; font-size: 15px; line-height: 1.65 }
 #mobileList { max-width: 550px; margin: auto; padding: 20px 16px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px }
 #mobileList button { color: #542d20; border: 1px solid #9e6d44; border-radius: 6px; padding: 9px 3px; background: #f9edce }
 #mobileList img { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: contain; margin-bottom: 5px }
 #mobileList small { display: block; margin-top: 3px; color: #6b5b46 }
}
@media (max-width: 520px) {
 .series-heading { padding-inline: 16px }
 #seriesMembers { grid-template-columns: 1fr; padding: 16px }
}
