:root {
  color: #666;
  background: #f2f3f4;
  --line: #c9cbcd;
  --ledge: #e8e9ea;
  --shadow: #929699;
  --surface: #f2f3f4;
  --subtle: #6c6e70;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
main { max-width: 1240px; margin: 0; padding: 42px 48px 38px; }
a { color: inherit; text-underline-offset: .22em; }
button, input { color: inherit; font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
button { -webkit-tap-highlight-color: transparent; }
.back { font-size: 12px; }
h1 { margin: 29px 0 10px; font-size: 15px; line-height: 1.6; font-weight: 400; }
p { font-size: 13px; line-height: 1.7; }
.intro { margin: 0; }
.controls { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 22px; margin: 42px 0 20px; font-size: 12px; }
.filters, .utilities, .views { display: flex; align-items: center; gap: 20px; }
.utilities { gap: 32px; }
.filters { flex-wrap: wrap; row-gap: 14px; }
.filters button, .views button, #reset { border: 0; padding: 0 0 4px; background: none; font-size: inherit; text-underline-offset: .45em; }
.filters button[aria-pressed=true], .views button[aria-pressed=true] { text-decoration: underline; }
.filters button:hover, .views button:hover { text-decoration: underline; }
.filters span { margin-left: 2px; font-size: 10px; color: var(--subtle); }
.views { gap: 8px; flex-shrink: 0; }
.views > span { color: var(--line); }
.search { flex: 0 1 153px; min-width: 0; }
.search input { width: 153px; max-width: 100%; font-size: 12px; border: 0; border-bottom: 1px solid var(--line); padding: 0 0 5px; border-radius: 0; background: transparent; }
.search input::placeholder { color: var(--subtle); opacity: 1; }
.shelf { margin-top: 28px; }
.shelf[hidden], [hidden] { display: none !important; }
.shelf-heading { display: flex; justify-content: space-between; align-items: baseline; }
.shelf h2 { font-weight: 400; font-size: 12px; margin: 0; }
.shelf-label { display: flex; align-items: baseline; gap: 14px; }
.shelf-label a { color: var(--subtle); font-size: 10px; }
.shelf-number { color: var(--subtle); font-size: 10px; }
.scroll { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; padding: 0 0 16px; }
.rail { position: relative; display: flex; align-items: flex-end; gap: 26px; min-width: max-content; padding: 24px 16px 13px; min-height: 244px; }
.rail::after { content: ""; position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: 11px; background: var(--ledge); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); box-shadow: 0 8px 10px -9px var(--shadow); pointer-events: none; }
.shelf[data-kind=games] .rail { gap: 16px; }
.artifact { display: block; position: relative; flex: 0 0 auto; width: calc(var(--height) * var(--ratio)); height: var(--height); padding: 0; margin: 0; border: 0; border-radius: 1px 3px 3px 1px; background: var(--color); color: var(--ink); text-align: left; box-shadow: 2px 2px 3px #0003, 8px 5px 12px -7px #0005; transform-origin: bottom center; transition: transform 180ms ease, box-shadow 180ms ease, width 250ms ease; }
.artifact:hover, .artifact:focus-visible { transform: translateY(-8px) rotate(-1deg); box-shadow: 2px 8px 4px #0002, 8px 12px 15px -8px #0006; z-index: 3; }
.artifact:nth-child(3n + 2):hover { transform: translateY(-8px) rotate(1deg); }
.artifact::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, #0004, #fff1 3px, #0002 5px, transparent 9px, transparent calc(100% - 3px), #0002); pointer-events: none; box-shadow: inset 0 0 0 1px #0002; }
.artifact img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.artifact[data-kind=books] { border-right: 4px solid #dfdcd2; }
.artifact[data-kind=films] { border: 3px solid #2d3035; border-top-width: 7px; }
.artifact[data-kind=games] { border: 3px solid #373d42; border-top-width: 6px; }
.artifact[data-kind=manga] { border-right: 4px solid #dfdcd2; }
.artifact[data-kind=tv], .artifact[data-kind=anime] { border: 3px solid #2d3035; border-top-width: 7px; }
.artifact[data-kind=records] { border-radius: 0; box-shadow: 2px 2px 3px #0003, 5px 3px 10px -7px #0005; }
.artifact[data-kind=records]::before { content: ""; position: absolute; height: 93%; aspect-ratio: 1; border-radius: 50%; top: 3.5%; right: -4px; z-index: -1; background: repeating-radial-gradient(#252527 0 1px, #343436 2px 3px); transition: right 220ms ease; }
.artifact[data-kind=records]:hover::before, .artifact[data-kind=records]:focus-visible::before { right: -22px; }
.spine { position: absolute; inset: 0; padding: 12px 5px; display: none; align-items: center; justify-content: space-between; gap: 14px; overflow: hidden; writing-mode: vertical-rl; }
.spine-title { font-size: 12px; line-height: 1.4; font-weight: 500; }
.spine-creator { font-size: 8px; line-height: 1.4; opacity: .8; }
.fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 15px; text-align: center; font-size: 14px; }
.artifact img { position: relative; }
[data-view=spines] .shelf .rail { gap: 7px; }
[data-view=spines] .artifact { width: var(--spine); border: 0; }
[data-view=spines] .artifact img { display: none; }
[data-view=spines] .artifact .fallback { display: none; }
[data-view=spines] .spine { display: flex; }
[data-view=spines] .artifact::after { background: linear-gradient(90deg, #0004, #fff1 3px, transparent 7px, transparent 80%, #0002); }
[data-view=spines] .artifact[data-kind=records]::before { display: none; }
[data-view=spines] .artifact[data-kind=records] .spine-title { font-size: 10px; }
[data-view=spines] .artifact[data-kind=records] .spine-creator { display: none; }
footer { display: flex; justify-content: space-between; gap: 24px; margin-top: 42px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 11px; line-height: 1.8; }
footer p { margin: 0; font-size: inherit; }
#empty { margin: 80px 0; }
#reset { text-decoration: underline; }
dialog { width: min(610px, calc(100% - 40px)); max-height: calc(100dvh - 48px); border: 1px solid var(--line); padding: 36px; color: inherit; background: var(--surface); box-shadow: 0 12px 70px #0002; overflow: auto; }
dialog[open] { display: grid; grid-template-columns: 170px 1fr; gap: 30px; align-items: start; }
dialog::backdrop { background: #0005; backdrop-filter: blur(3px); }
.close { position: absolute; top: 9px; right: 12px; border: 0; background: transparent; font-size: 23px; line-height: 1; }
.detail-art img { display: block; width: 100%; max-height: 270px; object-fit: contain; box-shadow: 3px 3px 8px #0002; }
#detail-platform { display: block; text-align: center; margin-top: 10px; font-size: 11px; }
.detail-copy p { margin: 0 0 13px; font-size: 12px; }
.detail-copy .eyebrow { font-size: 10px; margin: 0 0 13px; }
.detail-copy h2 { font-size: 17px; line-height: 1.45; margin: 0 0 12px; font-weight: 500; }
.detail-copy a { font-size: 11px; display: inline-block; margin-top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; border: 0; }
@media (prefers-color-scheme: dark) {
  :root { --line: #969899; --ledge: #6f7172; --shadow: #27292a; --surface: #666; --subtle: #e5e7e9; }
}
@media (max-width: 700px) {
  main { padding: 32px 24px; }
  .controls { margin-top: 30px; gap: 22px; }
  .filters { gap: 18px; }
  .utilities { width: 100%; justify-content: space-between; gap: 16px; }
  .shelf { margin-top: 23px; }
  .rail { padding-left: 9px; padding-right: 9px; gap: 19px; }
  footer { flex-direction: column; gap: 12px; margin-top: 26px; }
  dialog[open] { grid-template-columns: 105px 1fr; padding: 32px 22px 24px; gap: 20px; }
  .detail-copy h2 { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
/* Sudeshna's shelf shares the original case-and-ledge layout. */
:root{color:#664a57;background:#f4e7eb;--line:#d5bfc9;--ledge:#ead6df;--shadow:#a78594;--surface:#f4e7eb;--subtle:#866977}
body,button,input{font-family:var(--site-font)}
body{font-size:13px;line-height:1.6}
a{color:#923859}
.rail{padding-top:18px;min-height:249px}
.case-badge{position:absolute;right:6px;top:5px;z-index:2;color:#fff9fc;font-size:15px;font-weight:700;line-height:1;text-shadow:0 1px 2px #493a40,0 0 2px #493a40}
[data-view=spines] .case-badge{right:3px;top:3px;font-size:12px}
.unfinished-mark{font-weight:700}
.artifact[data-kind=records] .fallback{font-size:16px}
.shelf + .shelf{margin-top:34px}
#detail-rating:empty{display:none}
@media(prefers-color-scheme:dark){:root{color:#664a57;background:#f4e7eb;--line:#d5bfc9;--ledge:#ead6df;--shadow:#a78594;--surface:#f4e7eb;--subtle:#866977}}
