/* Photo wall adapted to Fantasy's existing 880px page; viewer follows the photo reference. */
.ps-document { scrollbar-gutter:stable; }
.ps-page { --ps-muted:#737373; --ps-surface:#f5f5f5; padding:8px 5% 48px; text-align:left; color:inherit; }
.ps-page *, .ps-lightbox * { box-sizing:border-box; }
.ps-page [hidden], .ps-lightbox [hidden] { display:none !important; }
.ps-page .ps-intro { margin:0 0 24px; padding:8px 0; }
.ps-page .ps-intro h1 { margin:0; font-size:24px; font-weight:600; line-height:1.5; }
.ps-page .ps-intro p { margin:6px 0 0; font-size:13px; line-height:1.8; color:var(--ps-muted); }
.ps-page .ps-feed { min-width:0; }
.ps-page .ps-grid { --ps-columns:4; --ps-gap:4px; display:grid; grid-template-columns:repeat(var(--ps-columns),minmax(0,1fr)); gap:var(--ps-gap); align-items:start; }
.ps-page .ps-grid.ps-masonry { display:block; position:relative; }
.ps-page .ps-grid.ps-masonry > .ps-card { position:absolute; top:0; left:0; width:calc((100% - (var(--ps-columns) - 1)*var(--ps-gap))/var(--ps-columns)); }
.ps-page .ps-card { min-width:0; margin:0; padding:0; border:0; background:none; }
.ps-page .ps-cover { position:relative; display:block; width:100%; aspect-ratio:var(--ps-ratio,4/3); padding:0; border:0; border-radius:0; background:var(--ps-surface); overflow:hidden; cursor:zoom-in; color:inherit; }
.ps-page .ps-cover img { display:block; width:100%; height:100%; object-fit:contain; margin:0; border:0; border-radius:0; transition:all .5s cubic-bezier(.4,0,.2,1); }
.ps-document .ps-cover:not(.is-loaded) img { opacity:0; }
.ps-page .ps-count { position:absolute; bottom:8px; right:8px; display:inline-flex; align-items:center; gap:5px; padding:3px 7px; border:1px solid rgba(255,255,255,.1); border-radius:6px; color:#fff; background:rgba(0,0,0,.4); backdrop-filter:blur(8px); font-size:10px; line-height:1.5; font-variant-numeric:tabular-nums; pointer-events:none; }
.ps-page .ps-count svg { flex-shrink:0; }
.ps-page .ps-cover-failed { position:absolute; inset:0; display:grid; align-content:center; text-align:center; padding:12px; color:var(--ps-muted); font-size:12px; line-height:1.7; }
.ps-page .ps-cover-failed small { font-size:10px; }
.ps-page .ps-load-area { text-align:center; margin:32px 0 0; min-height:44px; }
.ps-page #ps-feed-status { margin:8px 0; color:var(--ps-muted); font-size:13px; }
.ps-page #ps-feed-status:empty { display:none; }
.ps-page[aria-busy="true"] #ps-feed-status { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.ps-page .ps-load-more { display:inline-flex; justify-content:center; align-items:center; gap:12px; min-height:44px; min-width:144px; padding:6px 10px 6px 22px; border:1px solid rgba(0,0,0,.1); border-radius:999px; background:rgba(255,255,255,.9); color:#404040; font:inherit; font-size:13px; cursor:pointer; box-shadow:0 2px 8px rgba(0,0,0,.04); transition:background .2s ease,transform .2s ease,box-shadow .2s ease; }
.ps-page .ps-load-icon { position:relative; display:grid; place-items:center; width:30px; height:30px; border-radius:50%; }
.ps-page .ps-load-icon svg { display:block; transition:transform .2s ease,opacity .15s ease; }
.ps-page .ps-load-more:disabled { cursor:wait; }
.ps-page .ps-load-more.is-loading .ps-load-icon svg { opacity:0; }
.ps-page .ps-load-more.is-loading .ps-load-icon::after { position:absolute; width:13px; height:13px; border:1.5px solid rgba(0,0,0,.1); border-top-color:#737373; border-right-color:#737373; border-radius:50%; content:""; animation:ps-loading .75s linear infinite; }
.ps-page .ps-card.is-entering { animation:ps-card-enter .4s ease-out both; animation-delay:var(--ps-enter-delay,0ms); }
@keyframes ps-loading { to { transform:rotate(360deg); } }
@keyframes ps-card-enter { from { opacity:0; translate:0 12px; } to { opacity:1; translate:0 0; } }
.ps-page .ps-empty { margin:64px 0; text-align:center; color:var(--ps-muted); font-size:14px; }
.ps-page .ps-end { margin:24px 0 0; color:var(--ps-muted); font-size:12px; }
.ps-page button:focus-visible { outline:2px solid #737373; outline-offset:3px; }
/* Top-layer dialog owns scroll/focus without changing the theme's layout or stacking contexts. */
.ps-lightbox { --ps-spring:cubic-bezier(.16,1,.3,1); box-sizing:border-box; position:fixed; inset:0; width:100%; max-width:none; height:100dvh; max-height:none; margin:0; padding:0; border:0; border-radius:0; background:#f5f5f5; color:#fff; overflow:hidden; text-align:left; font-family:inherit; font-size:14px; }
.ps-lightbox[open] { display:block; animation:ps-viewer-in .3s ease-out both; }
.ps-lightbox::backdrop { background:transparent; }
.ps-lightbox.is-closing { animation:ps-viewer-out .2s ease-in both; pointer-events:none; }
.ps-lightbox .ps-photo-background { position:absolute; inset:-48px; overflow:hidden; pointer-events:none; }
.ps-lightbox .ps-photo-background img { width:100%; height:100%; object-fit:cover; filter:blur(40px); opacity:1; }
.ps-lightbox .ps-photo-veil { position:absolute; inset:0; background:rgba(255,255,255,.5); pointer-events:none; }
.ps-lightbox .ps-viewer { position:relative; display:flex; width:100%; height:100%; overflow:hidden; }
.ps-lightbox .ps-viewer-main { display:flex; flex:1; flex-direction:column; min-width:0; height:100%; }
.ps-lightbox .ps-image-stage { position:relative; display:flex; flex:1; align-items:center; justify-content:center; min-width:0; min-height:0; overflow:hidden; touch-action:none; }
.ps-lightbox .ps-photo-frame { display:flex; align-items:center; justify-content:center; width:100%; height:100%; pointer-events:none; }
.ps-lightbox #ps-album-image { display:block; max-width:100%; max-height:100%; width:auto; height:auto; object-fit:contain; border:0; border-radius:0; margin:0; user-select:none; -webkit-user-select:none; transform-origin:center; pointer-events:auto; }
.ps-lightbox .ps-image-stage.is-zoomed { cursor:grab; }
.ps-lightbox .ps-image-stage.is-dragging { cursor:grabbing; }
.ps-lightbox button { display:grid; place-items:center; flex-shrink:0; width:36px; height:36px; padding:0; border:1px solid #f5f5f5; border-radius:50%; background:rgba(255,255,255,.3); color:#404040; font:inherit; cursor:pointer; box-shadow:0 2px 4px rgba(0,0,0,.04); backdrop-filter:blur(12px); transition:all .2s cubic-bezier(.4,0,.2,1); }
.ps-lightbox button svg { display:block; flex-shrink:0; }
.ps-lightbox button:focus-visible, .ps-lightbox a:focus-visible { outline:2px solid #fff; outline-offset:3px; }
.ps-lightbox button:disabled { opacity:.3; cursor:default; }
.ps-lightbox .ps-viewer-tools { position:absolute; z-index:4; top:16px; right:16px; display:flex; align-items:center; gap:8px; }
.ps-lightbox #ps-album-zoom[aria-pressed="true"] .ps-zoom-plus { display:none; }
.ps-lightbox .ps-image-nav { position:absolute; z-index:3; top:50%; width:32px; height:32px; margin-top:-16px; border:0; background:rgba(0,0,0,.3); color:#fff; backdrop-filter:blur(4px); }
.ps-lightbox .ps-image-prev { left:16px; }
.ps-lightbox .ps-image-next { right:16px; }
.ps-lightbox .ps-image-nav:disabled { visibility:hidden; }
.ps-lightbox .ps-zoom-hint { position:absolute; top:16px; left:50%; transform:translateX(-50%); margin:0; padding:4px 8px; border:1px solid rgba(255,255,255,.1); border-radius:8px; color:#fff; background:rgba(0,0,0,.5); opacity:.6; white-space:nowrap; font-size:12px; line-height:1.4; pointer-events:none; animation:ps-hint 4s ease both; }
.ps-lightbox .ps-scale-badge, .ps-lightbox .ps-album-counter { position:absolute; bottom:16px; z-index:3; padding:8px 16px; border:1px solid rgba(255,255,255,.1); border-radius:12px; background:rgba(0,0,0,.4); color:#fff; backdrop-filter:blur(24px); line-height:1.5; font-size:14px; font-variant-numeric:tabular-nums; pointer-events:none; }
.ps-lightbox .ps-scale-badge { left:16px; }
.ps-lightbox .ps-album-counter { right:16px; }
.ps-lightbox #ps-album-status { position:absolute; z-index:2; inset:auto 24px; margin:0; padding:12px; text-align:center; font-size:13px; line-height:1.8; color:#fff; text-shadow:0 1px 8px rgba(0,0,0,.4); pointer-events:none; }
.ps-lightbox .ps-image-retry { position:absolute; z-index:4; bottom:24%; width:auto; height:40px; padding:8px 18px; border-radius:999px; font-size:12px; }
.ps-lightbox .ps-filmstrip { flex-shrink:0; z-index:2; min-height:97px; background:rgba(0,0,0,.2); backdrop-filter:blur(24px); border-top:1px solid rgba(255,255,255,.1); animation:ps-glass-in .4s var(--ps-spring) .1s both; }
.ps-lightbox .ps-thumbnails { display:flex; align-items:center; gap:12px; height:96px; padding:16px; overflow-x:auto; overscroll-behavior:contain; scrollbar-width:none; }
.ps-lightbox .ps-thumbnails::-webkit-scrollbar { display:none; }
.ps-lightbox .ps-thumbnail { width:64px; height:64px; padding:0; overflow:hidden; border:2px solid rgba(255,255,255,.2); border-radius:8px; background:transparent; box-shadow:none; backdrop-filter:none; opacity:.7; filter:grayscale(.5); animation:ps-thumb-in .3s var(--ps-spring) both; animation-delay:var(--ps-thumb-delay,0ms); }
.ps-lightbox .ps-thumbnail img { width:100%; height:100%; object-fit:cover; margin:0; border:0; border-radius:0; }
.ps-lightbox .ps-thumbnail[aria-current="true"] { border-color:#fff; opacity:1; filter:none; transform:scale(1.1); box-shadow:0 4px 8px rgba(0,0,0,.1); }
.ps-lightbox .ps-info { display:flex; flex-direction:column; flex:0 0 320px; width:320px; height:100%; z-index:5; background:rgba(0,0,0,.2); backdrop-filter:blur(24px); border-left:1px solid rgba(255,255,255,.1); overflow:hidden; animation:ps-glass-in .4s var(--ps-spring) .1s both; color:#fff; }
.ps-lightbox .ps-info-heading { display:flex; flex-shrink:0; align-items:center; justify-content:space-between; gap:12px; min-height:49px; padding:12px 16px; border-bottom:1px solid rgba(255,255,255,.1); }
.ps-lightbox .ps-info-heading h2 { margin:0; color:#fff; font-size:16px; font-weight:600; line-height:1.5; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ps-lightbox #ps-info-close { width:28px; height:28px; background:transparent; border:0; color:#fff; box-shadow:none; }
.ps-lightbox #ps-info-close svg { width:16px; height:16px; }
.ps-lightbox .ps-info-content { flex:1; min-height:0; overflow-y:auto; padding:16px 16px 48px; scrollbar-width:thin; scrollbar-color:rgba(255,255,255,.2) transparent; }
.ps-lightbox #ps-image-caption { margin:0 0 16px; padding:12px; border:1px solid rgba(255,255,255,.1); border-radius:8px; background:rgba(255,255,255,.05); color:rgba(255,255,255,.8); font-size:14px; line-height:1.7; overflow-wrap:anywhere; }
.ps-lightbox #ps-image-caption:empty { display:none; }
.ps-lightbox .ps-info-section { margin:0 0 20px; }
.ps-lightbox .ps-info-section h3 { margin:0 0 10px; color:#fff; font-size:14px; font-weight:500; line-height:1.5; }
.ps-lightbox .ps-info-section dl { margin:0; font-size:12px; line-height:1.6; }
.ps-lightbox .ps-info-section dl > div { display:flex; justify-content:space-between; gap:12px; margin:6px 0; }
.ps-lightbox .ps-info-section dt { color:rgba(255,255,255,.7); flex-shrink:0; }
.ps-lightbox .ps-info-section dd { margin:0; text-align:right; overflow-wrap:anywhere; min-width:0; }
.ps-lightbox .ps-article-card { position:relative; display:block; padding:12px 36px 12px 12px; border:1px solid rgba(255,255,255,.1); border-radius:8px; background:rgba(255,255,255,.05); color:#fff; text-decoration:none; font-size:14px; line-height:1.6; overflow-wrap:anywhere; transition:background .2s ease; }
.ps-lightbox .ps-article-card small { display:block; margin-top:2px; color:rgba(255,255,255,.7); font-size:12px; }
.ps-lightbox .ps-article-card svg { position:absolute; right:12px; top:16px; width:14px; height:14px; opacity:.7; }
@keyframes ps-viewer-in { from { opacity:0; } to { opacity:1; } }
@keyframes ps-viewer-out { from { opacity:1; } to { opacity:0; } }
@keyframes ps-glass-in { from { opacity:0; } to { opacity:1; } }
@keyframes ps-thumb-in { from { opacity:0; translate:0 8px; } to { opacity:1; translate:0 0; } }
@keyframes ps-hint { 0%,65% { opacity:.6; } 100% { opacity:0; } }
@media(hover:hover) {
    .ps-page .ps-cover:hover img { transform:scale(1.05); }
    .ps-page .ps-load-more:hover:not(:disabled) { background:#f5f5f5; transform:translateY(-2px); box-shadow:0 4px 12px rgba(0,0,0,.1); }
    .ps-page .ps-load-more:hover:not(:disabled) .ps-load-icon svg { transform:translateY(2px); }
    .ps-lightbox button:hover:not(:disabled) { background:rgba(255,255,255,.5); }
    .ps-lightbox .ps-image-nav:hover:not(:disabled) { background:rgba(0,0,0,.4); }
    .ps-lightbox .ps-thumbnail:hover:not(:disabled) { opacity:1; filter:none; }
    .ps-lightbox .ps-article-card:hover { background:rgba(255,255,255,.15); }
}
@media(max-width:860px) { .ps-page .ps-grid { --ps-columns:3; } }
@media(max-width:600px) { .ps-page .ps-grid { --ps-columns:2; } .ps-page .ps-intro h1 { font-size:22px; } }
@media(max-width:1023px) {
    .ps-lightbox .ps-info { position:absolute; right:8px; bottom:8px; width:min(380px,calc(100% - 16px)); height:auto; max-height:70%; border:1px solid rgba(255,255,255,.1); border-radius:12px; box-shadow:0 12px 40px rgba(0,0,0,.1); }
    .ps-lightbox .ps-info-content { height:auto; max-height:calc(70dvh - 80px); padding-bottom:24px; }
}
@media(max-width:639px) {
    .ps-lightbox .ps-viewer-tools { top:max(8px,env(safe-area-inset-top)); right:8px; }
    .ps-lightbox .ps-viewer-tools button, .ps-lightbox .ps-image-nav { width:44px; height:44px; }
    .ps-lightbox .ps-image-nav { margin-top:-22px; }
    .ps-lightbox .ps-image-prev { left:8px; } .ps-lightbox .ps-image-next { right:8px; }
    .ps-lightbox .ps-zoom-hint { top:8px; }
    .ps-lightbox .ps-filmstrip { min-height:73px; padding-bottom:env(safe-area-inset-bottom); }
    .ps-lightbox .ps-thumbnails { height:72px; gap:8px; padding:12px; }
    .ps-lightbox .ps-thumbnail { width:48px; height:48px; }
    .ps-lightbox .ps-scale-badge, .ps-lightbox .ps-album-counter { bottom:16px; padding:8px 12px; font-size:12px; }
    .ps-lightbox #ps-info-close { width:44px; height:44px; margin:-8px; }
    .ps-lightbox .ps-info { left:8px; right:8px; width:auto; }
}
@media(prefers-reduced-motion:reduce) {
    .ps-page *, .ps-page *::after, .ps-lightbox, .ps-lightbox *, .ps-lightbox::backdrop { animation:none !important; transition:none !important; scroll-behavior:auto !important; }
}
.ps-lightbox .ps-outgoing { position:absolute; inset:0; z-index:1; pointer-events:none; }
.ps-lightbox .ps-outgoing img { display:block; max-width:100%; max-height:100%; width:auto; height:auto; object-fit:contain; border:0; border-radius:0; margin:0; }
/* Reset broad theme aside/span rules inside the native dialog. */
.ps-lightbox .ps-info { padding:0; margin:0; }
.ps-lightbox .ps-article-card > span { color:inherit; font:inherit; }
@media(max-width:639px) { .ps-lightbox .ps-zoom-hint { left:12px; top:14px; transform:none; max-width:calc(100% - 160px); overflow:hidden; text-overflow:ellipsis; } }
.ps-lightbox .ps-info-heading h2 { font-weight:900; }
.ps-lightbox #ps-image-caption { background:rgba(255,255,255,.08); border-color:rgba(255,255,255,.15); color:rgba(255,255,255,.95); line-height:24px; }
@media(min-width:1024px) { .ps-lightbox #ps-info-close { display:none; } }

@supports (animation-timing-function:linear(0,1)) { .ps-lightbox { --ps-spring:linear(0 0%, 0.024 2.5641025641025643%, 0.0823 5.128205128205128%, 0.1594 7.692307692307692%, 0.2448 10.256410256410255%, 0.3315 12.82051282051282%, 0.4152 15.384615384615383%, 0.4934 17.94871794871795%, 0.5646 20.51282051282051%, 0.6282 23.076923076923077%, 0.6844 25.641025641025642%, 0.7334 28.205128205128208%, 0.7758 30.769230769230774%, 0.8122 33.333333333333336%, 0.8432 35.8974358974359%, 0.8694 38.46153846153846%, 0.8916 41.02564102564102%, 0.9102 43.589743589743584%, 0.9258 46.153846153846146%, 0.9388 48.71794871794871%, 0.9496 51.28205128205127%, 0.9586 53.84615384615383%, 0.966 56.410256410256395%, 0.9722 58.97435897435896%, 0.9772 61.53846153846152%, 0.9814 64.10256410256409%, 0.9848 66.66666666666666%, 0.9876 69.23076923076923%, 0.9899 71.7948717948718%, 0.9918 74.35897435897436%, 0.9933 76.92307692307693%, 0.9946 79.4871794871795%, 0.9956 82.05128205128207%, 0.9964 84.61538461538463%, 0.9971 87.17948717948718%, 0.9977 89.74358974358975%, 0.9981 92.30769230769232%, 0.9985 94.87179487179488%, 0.9988 97.43589743589743%, 1 100%); } }

@media(min-width:640px) and (hover:hover) { .ps-lightbox .ps-image-nav { opacity:0; transition:opacity .2s ease; } .ps-lightbox .ps-image-stage:hover .ps-image-nav, .ps-lightbox .ps-image-nav:focus-visible { opacity:1; } }
