/* One image pixel per CSS pixel. Layout must adapt to the sprite, never the reverse. */
img[data-pixel-art] {
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    flex: 0 0 auto !important;
    object-fit: contain !important;
    image-rendering: pixelated;
    transform: none !important;
    box-sizing: content-box;
    border: 0 !important;
    padding: 0 !important;
    animation: none !important;
    filter: none !important;
}
.community-welcome { grid-template-columns: minmax(0, 1fr) 320px; }
.auth-pixel-scene { display: none; }
@media(min-width:1100px) {
    .auth-pixel-scene { display: flex; position:relative; flex-wrap:wrap; align-items:end; justify-content:center; gap:16px; height:auto; padding:32px 0; }
    .auth-pixel-scene > img { position:relative; inset:auto; margin:0; }
    .auth-scene-halo { inset:12px; }
}
.world-window { transform:none; }
.world-window-scene { display:flex; align-items:center; justify-content:center; }
.world-window-scene > img[data-pixel-art] { flex:none; }
.first-books-art { max-height:none; }
.first-books-art img { margin:auto; }
.friend-code-art { align-self:center; }
.village-purse { justify-items:center; }
.village-product-art { min-height:280px; }
.village-demo-designs { grid-template-columns:1fr; }
.village-demo-designs button { display:flex; justify-content:center; }
.profile-banner[data-pixel-art] { position:absolute; left:50%; translate:-50% 0; }
.article-card:has(> img[data-pixel-art]), .article-preview:has(> img[data-pixel-art]), .article-body { overflow:hidden; }
.article-card > img[data-pixel-art] { margin-inline:auto; }
@media(max-width:700px) {
    .reader-welcome-heading { flex-direction:column; align-items:start; }
    .reader-welcome-heading > img { align-self:center; }
    .first-books-art { min-height:256px; }
    .world-window-note { flex-wrap:wrap; }
    .village-purse { grid-template-columns:32px auto; }
}
.profile-header:has(> .profile-banner[data-pixel-art]) { position:relative; padding-top:240px; }
.profile-banner[data-pixel-art] { top:0; }
.profile-portrait:has(> img[data-pixel-art]) { width:32px; margin-top:0; }
.profile-identity:has(.profile-portrait > img[data-pixel-art]) { grid-template-columns:40px minmax(0,1fr) auto; }
.profile-portrait:has(> img[data-pixel-art]) .profile-portrait-sprout { right:-16px; bottom:-12px; }
/* Shelves are layout, not an enlarged miniature cabinet. Objects and book spines stay native. */
.library-room [data-library-room-target=scene]::before { background-size:128px 128px; }
.library-room [data-library-room-target=scene]::after { width:256px; height:80px; background-size:auto; }
.room-cabinet { width:min(620px,100%); aspect-ratio:auto; padding:48px 18px 20px; border:8px solid #714a35; border-radius:4px; background:#bc9168; box-shadow:inset 0 0 0 4px #e2ba89; }
.room-nameplate { position:relative; inset:auto; width:max-content; max-width:100%; height:auto; padding:6px 12px; margin:0 auto 24px; font-size:1rem; background:#f6dfb1; border:2px solid #714a35; }
.room-shelf { position:relative; inset:auto; width:100%; height:128px; margin-top:24px; border-bottom:8px solid #714a35; box-shadow:0 4px #e2ba89; overflow-x:auto; overflow-y:hidden; gap:8px; }
.room-books { flex:none; gap:2px; }
.room-book,.room-book-height--1,.room-book-height--2 { width:24px; min-width:24px; max-width:24px; height:111px; flex:none; }
.room-cabinet .room-book-art { background-size:auto; background-position:0 0; }
.room-book-title { font-size:10px; }
.room-object { width:80px; height:112px; }
.room-object-image { inset:auto auto 0 0 !important; }
.room-ivy { top:0; }
.room-ivy--left { left:-22px; }
.room-ivy--right { right:-22px; }
.room-neighbour { display:none; }
.room-empty { position:relative; inset:auto; width:auto; margin:16px 0; }
@media(max-width:700px) {
    .room-cabinet { margin-inline:auto; border-width:4px; padding:24px 8px 16px; }
    .room-ivy { display:none; }
}
.room-cabinet { background:#bc9168 url("../images/shelf-back-blGoy2k.png") repeat; }
.room-shelf { display:grid; grid-template-columns:80px minmax(0,1fr) 80px; align-items:end; overflow:visible; }
.room-books { display:flex; overflow-x:auto; overflow-y:hidden; height:120px; }
.bookshelf-title { background-size:auto; background-repeat:repeat; }
.bookshelf-row { background-size:auto; background-repeat:repeat-x; }
.book-spine { background-size:auto; background-repeat:repeat; }
.sidebar-quote { transform:none; }
.city-customization img[data-pixel-art] { margin-inline:auto; }
.adventure-hero-art { overflow:hidden; }
.city-design-options, .city-design-options.is-six, .city-milestones { grid-template-columns:repeat(auto-fit,minmax(224px,1fr)); }
.city-milestone img[data-pixel-art] { float:none; margin:0 auto 12px; }
.village-demo-designs { display:flex; overflow-x:auto; scroll-snap-type:x mandatory; padding-bottom:8px; }
.village-demo-designs button { display:grid; flex:0 0 224px; scroll-snap-align:start; }
