/* Local flow preview: retain the original framed, pastel web theme. */
.explore-tools{display:flex;justify-content:flex-end;gap:20px;padding:10px 24px;border-bottom:1px dashed #b38ac9;background:#fff5ff;font:11px/1.6 var(--pixel)}
.flow-back{display:block;margin:16px 24px;padding:10px 14px}
.flow-doors>a{display:block;padding:15px 14px;border-bottom:1px dashed #c8a4dc;text-decoration:none}.flow-doors>a:last-child{border:0}.flow-doors small{font-size:13px;margin-top:6px;color:#76518d}
.home-board{grid-template-columns:250px minmax(0,1fr) 220px}.home-board .board-right{display:grid;gap:16px}.home-board .bbs-site-badges{display:block}.home-board .board-left{display:grid;align-content:start}
.webring{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap}.webring>p,.webring>div{width:100%}
.mystery-poses{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin-bottom:24px}.mystery-poses figure{border:1px solid var(--accent);padding:20px;text-align:center;background:var(--wash)}.mystery-poses img{width:100%;height:250px;object-fit:contain;image-rendering:pixelated}
@media(max-width:1150px){.home-board{grid-template-columns:240px minmax(0,1fr)}.home-board .board-right{grid-column:1/-1;grid-template-columns:1fr 1fr}}
@media(max-width:760px){.explore-tools{justify-content:space-between;gap:12px;padding:10px 14px;font-size:9px}.home-board{display:flex;flex-direction:column}.home-board>*{width:100%}.home-board .board-left{display:flex;flex-direction:column}.flow-doors{order:-1}.home-board .board-right{display:flex;flex-direction:column}.home-board .board-welcome{display:none}.flow-doors>a{padding:12px 14px}.mystery-poses img{height:170px}.flow-back{margin:12px 14px}}

header.site-header-shared nav a[href="/world/noticeboard/"]{font-size:clamp(11px,1.5vw,19px);letter-spacing:1px}
.mystery-poses .cropped-sprite{height:200px;max-width:100%}

.visiting-book .panel-bar{display:block}.visiting-book>.panel{margin:12px;border:1px solid var(--accent)}
@media(max-width:600px){header.site-header-shared nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px}header.site-header-shared nav a,header.site-header-shared nav a[href="/world/noticeboard/"]{font-size:12px;letter-spacing:0;min-height:44px}}

/* Shared character-page navigation, regardless of character family. */
.character-ring{display:grid;grid-template-columns:1fr auto 1fr;gap:14px;align-items:center}
.character-ring a{font:12px/1.7 var(--pixel);padding:10px 4px;overflow-wrap:anywhere}
.character-ring a:first-child{text-align:left}.character-ring a:last-child{text-align:right}
.house-essentials [data-stamp-status],.house-essentials [data-yokai-status]{margin-top:15px}
.room-nav a{min-height:44px;display:inline-flex;align-items:center}
@media(max-width:440px){.character-ring{gap:8px}.character-ring a{font-size:10px}}

/* Measure visible artwork, not transparent image canvases. */
.sized-art{position:relative;display:block;overflow:hidden;flex:none;width:min(100%,calc(var(--art-height)*var(--art-ratio)));height:auto;max-width:100%;margin-inline:auto}
.sized-art>img{position:absolute;display:block;max-width:none;max-height:none;object-fit:fill}
.fullscale-link{display:flex;flex-direction:column;align-items:center;gap:12px}
.fullscale-link .sized-art{--art-height:380px;image-rendering:auto}
.album .album-photo>a{display:grid;place-items:center;aspect-ratio:auto;height:210px;min-height:0;padding:16px}
.album .sized-art{--art-height:170px;height:auto}
.resident-art{display:grid;place-items:center;min-height:110px;padding:10px}
.resident-art .cropped-sprite{--art-height:90px;width:min(100%,calc(var(--art-height)*var(--art-ratio)));height:auto!important}
@media(max-width:760px){.fullscale-link .sized-art{--art-height:290px}}
@media(max-width:440px){.album .album-photo>a{height:150px;padding:12px}.album .sized-art{--art-height:120px}.resident-art .cropped-sprite{--art-height:70px}}

.house-scene.fullscale-scene{grid-template-columns:minmax(0,1fr)}

/* The tablet grid's start alignment must not shrink mobile sidebar blocks. */
@media(max-width:760px){
 .home-board .board-right{align-items:stretch}
 .home-board .board-right>.bbs-window,.home-board .board-right>.bbs-site-badges{width:100%;min-width:0}
 .home-board .bbs-site-badges>a{margin-inline:0}
}

/* Long-form reading needs a quiet surface inside the shared patterned canvas. */
.paper-article{background-color:var(--paper)}
main>.page-intro{background-color:var(--paper);border:1px solid var(--accent);padding:22px 20px}
@media(max-width:760px){main>.page-intro{padding:18px 16px}}
/* Keep interactive artwork captions usable on a touch screen. */
.album-photo figcaption a{display:inline-flex;align-items:center;justify-content:center;min-height:44px}
.art-dialog .close-dialog{width:44px;height:44px}

.home-board .board-right{align-self:start;align-content:start}

/* On narrow screens, put the guide contents before the article, not after it. */
@media(max-width:760px){
 .reading-layout:has(.guide-section){display:flex;flex-direction:column}
 .reading-layout:has(.guide-section)>aside{display:contents}
 .reading-layout:has(.guide-section)>aside>.panel:first-child{order:-1}
 .reading-layout:has(.guide-section)>aside>.panel{margin:0}
}
