#toy-shelf{position:fixed;inset:0;z-index:1000;box-sizing:border-box;background:#102a28;color:#fffbeb;font:500 15px/1.4 system-ui,sans-serif;display:grid;grid-template-rows:auto minmax(0,1fr) auto;padding: max(8px,env(safe-area-inset-top)) max(4vmax,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(4vmax,env(safe-area-inset-left));overflow:hidden;text-align:left}
#toy-shelf *{box-sizing:border-box}
.shelf-top,.shelf-heading{display:flex;align-items:center;justify-content:space-between}
.shelf-top{height:clamp(28px,6vmin,58px);border-bottom:1px solid #ffffff35;margin-bottom:1vmin;letter-spacing:.1em}
.shelf-top strong{font-size:clamp(14px,2.5vmin,21px)}.shelf-top i{color:#e9ef8d}.shelf-top span,.shelf-info small{color:#c0d7b9;font-weight:700}
.shelf-hero{position:relative;isolation:isolate;overflow:hidden;border-radius:12px;background:#123e37}
#shelf-art{position:absolute;right:0;height:100%;width:69%;object-fit:cover;object-position:center 43%;z-index:-2}
.shelf-hero:before{content:'';position:absolute;inset:0;background:linear-gradient(90deg,#173d37 10%,#173d37fa 27%,#173d37ca 42%,transparent 70%);z-index:-1}
.shelf-info{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;height:100%;padding:2vmin 3vmax;width:55%}
#shelf-title{font:850 clamp(22px,min(4.8vmax,7vmin),65px)/1.14 system-ui;margin:1vmin 0;color:#fffbe8;letter-spacing:-.04em}
#shelf-desc{font-size:clamp(12px,2.1vmin,18px);margin:0 0 2vmin;color:#e1ebe0}
#shelf-go,#shelf-retry{display:inline-flex;align-items:center;min-height:36px;padding:6px 21px;border-radius:24px;text-decoration:none;font-weight:800;background:#edee9c;color:#16352c;cursor:pointer}#shelf-retry{position:absolute;bottom:1vmin;right:1vmax}
.shelf-library{padding-top:1vmin}.shelf-heading{height:34px}.shelf-heading button{font:22px/1 system-ui;width:40px;height:32px;border:0;border-radius:6px;background:transparent;color:#fff9dc;cursor:pointer}
#shelf-rail{display:flex;overflow-x:auto;gap:10px;padding:5px 4px;scrollbar-width:none;overscroll-behavior-x:contain}#shelf-rail::-webkit-scrollbar{display:none}
#shelf-rail button{position:relative;flex:0 0 auto;width:clamp(90px,23vmin,195px);padding:0;border:0;border-radius:6px;overflow:hidden;background:#21443d;color:white;cursor:pointer;box-shadow:none}#shelf-rail img{width:100%;height:clamp(48px,12vmin,102px);object-fit:cover;display:block}#shelf-rail span{display:block;text-align:left;padding:4px 7px;font:bold 12px/1.25 system-ui;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
#shelf-rail button[aria-pressed=true]{outline:3px solid #edf398;outline-offset:1px;background:#edf398;color:#17362e}
#toy-shelf{grid-template-columns:minmax(0,1fr)}.shelf-library{min-width:0}
.shelf-hero:before{background:linear-gradient(90deg,#173d37 0%,#173d37 32%,#173d37d9 43%,transparent 73%)}
#shelf-go:focus-visible,.shelf-heading button:focus-visible{outline:2px solid #fafbec;outline-offset:3px}
@media (orientation: portrait) {
#toy-shelf {
  inset: auto;
  top: 0;
  left: var(--viewport-width, 100vw);
  width: 100vh;
  width: var(--viewport-height, 100dvh);
  height: var(--viewport-width, 100vw);
  transform-origin: 0 0;
  transform: rotate(90deg);
  padding: max(8px, env(safe-area-inset-right)) max(4vmax, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)) max(4vmax, env(safe-area-inset-top));
}
}
@media (max-width:600px) and (max-height:600px) {
  #shelf-rail { gap:6px }
  #shelf-rail button { width:84px }
}

#toy-shelf[hidden],#shelf-retry[hidden]{display:none!important}

.app-stage[hidden] { display: none !important; }
#shelf-rail { position: relative; touch-action: none; }
#shelf-prev:disabled, #shelf-next:disabled { opacity: .35; }
#shelf-rail button:focus-visible { outline: 3px solid white; outline-offset: 1px; }
