/* Shared visual language: paper surfaces, ink edges, bright arcade accents. */
body.directory-home{--bg:#f3f1e9;--panel:#fffefa;--ink:#171c24;--muted:#62666b;--line:#d1cec5;--accent:#4d6425;--brand-lime:#d1f14c;--ui-yellow:#ffe15a;--ui-ink:#171c24;background:var(--bg);color:var(--ink);font-family:'DM Sans',Arial,sans-serif}
body.directory-home h1,body.directory-home h2,body.directory-home h3{font-family:'DM Sans',Arial,sans-serif;font-weight:800;letter-spacing:-.035em}
body.directory-home>header{background:#fbfaf5;border-bottom:2px solid var(--ui-ink);height:78px}
body.directory-home>header .brand{color:var(--ui-ink);font-weight:800}
body.directory-home>header .brand .brand-mark{padding:5px;background:#17212c;border:2px solid #17212c;width:43px;height:43px}
body.directory-home>header .brand .accent{color:#526a29}
body.directory-home>header .header-search{border:1px solid #a8a9a2;border-radius:2px}
body.directory-home>header .header-search button{background:var(--brand-lime);border-radius:0;color:var(--ui-ink)}
body.directory-home>header>nav{font-size:13px;font-weight:700;color:var(--ui-ink)}
body.directory-home>header .nav-save{border:1px solid var(--ui-ink);border-radius:0;padding:8px 13px}
body.directory-home .directory-sidebar{top:78px;width:100%;min-width:0;height:calc(100dvh - 78px);max-height:calc(100dvh - 78px);overflow-x:hidden;overscroll-behavior-y:contain;background:#202c3b;color:#eef1f7;padding:22px 15px;scrollbar-color:#667383 #202c3b}
.directory-sidebar-title{color:#a8b7cb;font-size:10px;letter-spacing:.12em}
.directory-sidebar nav a{border-radius:2px;font-size:13px;min-height:44px;color:#eef1f7}
.directory-sidebar nav a:hover,.directory-sidebar nav a:focus-visible{background:#364356;color:white}
.directory-sidebar :is(nav,.directory-sidebar-note) a.directory-sidebar-active{background:var(--brand-lime);color:#171c24}
.directory-sidebar nav[aria-label="Game collections"] a{font-size:12px;line-height:1.5}
.directory-sidebar-note a{color:#ffe15a}.directory-sidebar-note p{color:#b8c3d2}
.ui-icon{display:inline-block;width:21px;height:21px;vertical-align:middle;flex:none}
.directory-sidebar .ui-icon{width:20px;height:20px}
body.directory-home>header .menu-button::before{content:none}
body.directory-home>header .menu-button .ui-icon{width:23px;height:23px}
body.directory-home>header .menu-button span{margin:0}
.directory-intro{margin-bottom:20px;align-items:center}
.source-library-link{margin:0 0 22px;font-size:14px;line-height:1.6}
.source-library-link a{font-weight:700;text-decoration:underline;text-underline-offset:4px}
.catalog-content .source-game-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:1200px){.catalog-content .source-game-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:640px){.catalog-content .source-game-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.directory-intro .eyebrow,.directory-intro>span{display:none}
.directory-intro h1{font-size:clamp(18px,1.6vw,23px);margin:0 0 5px}
.directory-intro p:not(.eyebrow){font-size:12px;color:#62666b}
.directory-content{padding-top:22px}
@media(min-width:1051px){body.directory-home .directory-content{padding-left:20px}}
.directory-shelf{margin-bottom:34px}
.directory-shelf-title{font-family:'Arial Black','DM Sans',sans-serif!important;font-weight:900!important;letter-spacing:-.04em;font-size:clamp(21px,2vw,28px);border:2px solid #171c24;box-shadow:3px 3px 0 #171c24;padding:8px 13px}
.directory-shelf-title--green{background:#86d7a2}.directory-shelf-title--violet{background:#bba4f5}.directory-shelf-title--peach{background:#ffb3a1}
.directory-shelf-label>p{font-size:12px;color:#62666b}
.directory-shelf-actions{gap:12px}
.directory-shelf-actions>a.shelf-all-link{display:inline-flex;align-items:center;justify-content:center;gap:14px;min-height:52px;padding:0 20px;border:1px solid #202c3b;border-radius:8px;box-shadow:none;background:#202c3b;color:#fffefa;font-size:13px;font-weight:700;letter-spacing:.01em;text-decoration:none;transition:background 160ms ease,color 160ms ease,border-color 160ms ease}
.directory-shelf-actions>a.shelf-all-link>svg{width:18px;height:18px;flex:none;transition:transform 160ms ease}
.directory-shelf-actions>a.shelf-all-link:hover{background:var(--brand-lime);border-color:var(--brand-lime);color:#171c24;text-decoration:none}
.directory-shelf-actions>a.shelf-all-link:hover>svg{transform:translateX(3px)}
.shelf-browser{display:flex;align-items:center;gap:12px;height:auto;padding:0;border:0;border-radius:0;background:transparent;color:#171c24;box-shadow:none}
.shelf-browser .shelf-nav{display:grid;place-items:center;flex:none;width:44px;min-width:44px;height:44px;padding:0;border:2px solid #171c24;border-radius:0;background:#f3f1e9;color:#171c24;box-shadow:3px 3px 0 #171c24;cursor:pointer;transition:background 140ms ease,transform 140ms ease,box-shadow 140ms ease}
.shelf-browser .shelf-nav>svg{width:20px;height:20px}
.shelf-browser .shelf-nav:hover:not(:disabled){background:var(--brand-lime)}
.shelf-browser .shelf-nav:active:not(:disabled){transform:translate(2px,2px);box-shadow:1px 1px 0 #171c24;background:var(--brand-lime)}
.shelf-browser .shelf-nav:disabled{color:#969b9e;border-color:#969b9e;box-shadow:none;cursor:default}
.shelf-browser .shelf-nav:focus-visible,.directory-shelf-actions>a.shelf-all-link:focus-visible{outline:3px solid var(--brand-lime);outline-offset:3px}
@media(max-width:900px){.directory-shelf-heading{flex-wrap:wrap;gap:14px}.directory-shelf-label{flex-basis:100%}.directory-shelf-actions{width:100%;justify-content:space-between}}
@media(max-width:600px){.directory-shelf-actions{gap:10px}.directory-shelf-actions>a.shelf-all-link{gap:10px;padding:0 14px;font-size:12px}}
@media(prefers-reduced-motion:reduce){.shelf-browser .shelf-nav,.directory-shelf-actions>a.shelf-all-link,.directory-shelf-actions>a.shelf-all-link>svg{transition:none}.shelf-browser .shelf-nav:active:not(:disabled){transform:none}}
body.directory-home .directory-rail{grid-auto-columns:calc((100% - 96px)/7);gap:16px;scrollbar-color:#171c24 #dedbd2;padding-bottom:12px}
.directory-game{border:2px solid #171c24;box-shadow:3px 3px 0 #171c24;background:#fffefa}
.directory-game-image{aspect-ratio:4/5;background:#18212c}
.game-cover{display:grid;grid-template-rows:minmax(55px,.8fr) minmax(0,2.5fr) minmax(30px,.45fr);height:100%;width:100%;background:#18212c;color:#fffefa;overflow:hidden;text-align:left}
.game-cover-heading{padding:14px 13px 8px;display:flex;flex-direction:column;justify-content:center;gap:5px;min-width:0}
.game-cover-heading>span{font:700 8px/1 'DM Sans',sans-serif;letter-spacing:.16em;text-transform:uppercase;color:#ffe15a}
.game-cover-heading strong{font:800 clamp(16px,1.5vw,21px)/1.05 'DM Sans',Arial,sans-serif;letter-spacing:-.035em;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.game-cover-scene{display:flex;min-height:0;align-items:center;justify-content:center;background:#101720;border-block:1px solid #435061}
.game-cover-scene>picture{display:flex;align-items:center;justify-content:center;width:100%;height:100%}
body.directory-home .game-cover-scene img{display:block;width:100%;height:100%;max-height:100%;object-fit:contain;object-position:center;transform:none!important}
/* Frame the actual game window within the upstream SDL desktop screenshot. */
.game-cover[data-cover="doom"] .game-cover-scene{overflow:hidden}
body.directory-home .game-cover[data-cover="doom"] .game-cover-scene img{transform:scale(2.15)!important;transform-origin:48% 42%}
.game-cover-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;font-size:8px;line-height:1.3;text-transform:uppercase;letter-spacing:.09em;color:#b7c5d5}
.game-cover-foot>span{font-size:16px;color:#ffe15a}
.directory-game-copy{min-height:81px;padding:11px 12px;gap:8px;border-top:2px solid #171c24}
.directory-game-copy h3{font-size:16px;font-weight:800;line-height:1.18}
.directory-game-copy p{font-size:11px;color:#565c61}
.directory-game-dot{background:#86d7a2;border-color:#171c24}
.home-play-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:18px 16px;padding:6px 6px 12px}
.home-play-grid>.directory-game{min-width:0}
.home-play-grid>.directory-game:nth-child(n+15){display:none}
.home-play-grid .directory-game-link{height:100%}
.home-play-grid .directory-game-image{aspect-ratio:2/3}
.home-play-grid .directory-game-copy{flex:1;min-height:84px}
.shelf-browser[hidden]{display:none}
.home-play-grid.has-shelf-browser{--shelf-columns:7;grid-template-columns:none;grid-template-rows:repeat(2,auto);grid-auto-flow:column;grid-auto-columns:calc((100% - 96px)/7);overflow-x:auto;overscroll-behavior-inline:contain;scroll-snap-type:x proximity;scrollbar-width:thin}
.home-play-grid.has-shelf-browser>.directory-game:nth-child(n){display:block;scroll-snap-align:start}
.home-play-grid.has-shelf-browser:focus-visible{outline:3px solid var(--brand-lime);outline-offset:3px}
body.directory-home .directory-rail.touch-carousel-ready,.home-play-grid.has-shelf-browser.touch-carousel-ready{touch-action:pan-y pinch-zoom;-webkit-overflow-scrolling:touch}
body.directory-home .directory-rail.is-touch-scrolling,.home-play-grid.has-shelf-browser.is-touch-scrolling{scroll-snap-type:none}
@media(max-width:1200px){.home-play-grid.has-shelf-browser{--shelf-columns:4;grid-auto-columns:calc((100% - 48px)/4)}}
@media(max-width:640px){.home-play-grid.has-shelf-browser{--shelf-columns:2;grid-auto-columns:calc((100% - 12px)/2)}}
@media(max-width:1200px){body.directory-home .directory-rail{grid-auto-columns:190px}.home-play-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.home-play-grid>.directory-game:nth-child(n+9){display:none}}
@media(max-width:640px){.home-play-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 12px}.home-play-grid>.directory-game:nth-child(n+5){display:none}}
.directory-save{top:7px;right:7px;width:33px;height:33px;border:1px solid #171c24;border-radius:0;background:#fffefa;color:#171c24}
.directory-save .ui-icon{width:18px;height:18px}
.directory-save[aria-pressed="true"],.directory-save:hover{background:#ffe15a}
/* Favorites stay over the cover; touch users and keyboard users can still reach them. */
body.directory-home .catalog-content .game-card{position:relative}
body.directory-home .catalog-content .card-top>.save{position:absolute;top:7px;right:7px;margin:0;width:33px;height:33px;min-width:33px;min-height:33px;z-index:2}
body.directory-home :is(.directory-save,.catalog-content .card-top>.save) .ui-icon{width:18px;height:18px}
body.directory-home :is(.directory-save,.catalog-content .card-top>.save)[aria-pressed="true"]{color:#c82543}
body.directory-home :is(.directory-save,.catalog-content .card-top>.save)[aria-pressed="true"] .ui-icon{fill:currentColor}
body.directory-home :is(.directory-save,.catalog-content .card-top>.save){background:transparent;border:0;box-shadow:none;color:#fffefa}
body.directory-home :is(.directory-save,.catalog-content .card-top>.save) .ui-icon{filter:drop-shadow(0 1px 1px #000) drop-shadow(0 0 1px #000)}
@media(hover:hover) and (pointer:fine){
 body.directory-home :is(.directory-save,.catalog-content .card-top>.save){opacity:0;pointer-events:none}
 body.directory-home .directory-game:has(.directory-game-image:hover)>.directory-save,
 body.directory-home .directory-game:has(.directory-game-link:focus-visible)>.directory-save,
 body.directory-home .catalog-content .game-card:has(.card-image:hover) .card-top>.save,
 body.directory-home .catalog-content .game-card:has(.card-image:focus-visible) .card-top>.save,
 body.directory-home :is(.directory-save,.catalog-content .card-top>.save):is(:hover,:focus-visible){opacity:1;pointer-events:auto}
}
/* Covers keep their typography clear of the save control. */
.directory-game .game-cover-heading{padding-right:42px}
body.directory-home .catalog-content .card-image{aspect-ratio:4/5;border-radius:0}
body.directory-home .catalog-content .game-card{border:2px solid #171c24;border-radius:0;box-shadow:3px 3px 0 #171c24;background:#fffefa}
body.directory-home .card-top h3{font-weight:800;letter-spacing:-.025em}
body.directory-home .save:not(.outline){border-radius:0;border-color:#171c24;background:#fffefa;color:#171c24}
body.directory-home .save[aria-pressed="true"]{background:#ffe15a;border-color:#171c24;color:#171c24}
body.directory-home .tags span{color:#545a61;border-color:#ccc9c0;background:#faf9f4}
body.directory-home .tags .play-location{color:#324d1e;border-color:#869c70}
body.directory-home .tags .row-fill-label{background:#eaf5bc;border-color:#a8bd53;color:#344319}
body.directory-home :is(.button,.outline,.chips button,.filter-bar input,.filter-bar select,.search,.finder-banner,.save-panel,.read-next,.checklist,.compare-card,.theme-card,.guide-card-image){border-radius:0}
body.directory-home .button{background:#ffe15a;border:2px solid #171c24;box-shadow:3px 3px 0 #171c24;color:#171c24;font-weight:800}
body.directory-home .button:hover{background:#ffeb90;transform:translateY(-1px)}
body.directory-home .outline,body.directory-home .chips button{border:1px solid #171c24;background:#fffefa;color:#171c24}
body.directory-home .chips button[aria-pressed="true"]{background:#ffe15a;border-color:#171c24;color:#171c24;font-weight:700}
body.directory-home .theme-card,body.directory-home .compare-card{border:2px solid #171c24;box-shadow:3px 3px 0 #171c24}
body.directory-home .theme-body h3,body.directory-home .guide-card h3{font-weight:800}
body.directory-home .theme-image img,body.directory-home .guide-card-image img{object-fit:contain;background:#18212c}
body.directory-home .play-help,body.directory-home .at-a-glance{color:#59616a}
body.directory-home .embed-header,body.directory-home .embed-note,body.directory-home .embed-status{background:#fffefa;color:#59616a}
body.directory-home .embed-header h2{color:#171c24}
body.directory-home .embed-toolbar{background:#202c3b;color:#fffefa}
body.directory-home .embed-toolbar button{color:#fffefa;border-color:#738191}
body.directory-home .embed-poster-label{color:white}
body.directory-home .arcade-referral-card{--ink:#fffefa;--muted:#c3cdda;--accent:#ffe15a;background:#202c3b;border:2px solid #171c24;border-radius:0;box-shadow:4px 4px 0 #171c24;color:#fffefa}
body.directory-home footer{--ink:#fffefa;--muted:#bac5d3;--accent:#ffe15a;background:#202c3b;max-width:none;border-top:2px solid #171c24}
body.directory-home footer .brand-wordmark{color:#fffefa}
body.directory-home .toast{background:#ffe15a;color:#171c24;border:2px solid #171c24}
body.directory-home :focus-visible{outline:3px solid #7360ae;outline-offset:4px}
.directory-inner .page-heading{padding:18px 0 35px}.directory-inner .page-heading h1{font-size:clamp(34px,4vw,62px)}
.directory-inner .section{padding-block:45px}.directory-inner .article-layout{grid-template-columns:220px minmax(0,1fr);gap:45px}
.directory-inner .prose{max-width:75ch}.directory-inner .theme-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.directory-inner .theme-body h3{font-size:27px}.directory-inner .theme-body{padding:22px}
.directory-inner .game-card .card-image{aspect-ratio:4/3;border-radius:0}
.directory-inner .collection-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,190px),1fr));gap:24px 16px;align-items:stretch}
.directory-inner .collection-grid .game-card{position:relative;display:flex;flex-direction:column;min-width:0;padding-bottom:12px;background:#fffefa;border:1px solid #d1cec5}
.directory-inner .collection-grid .game-card[hidden]{display:none}
.directory-inner .collection-grid .card-image{aspect-ratio:4/3;max-height:180px}
.directory-inner .collection-grid .card-top{position:static;display:block;min-height:45px;margin:12px 12px 6px}
.directory-inner .collection-grid .card-top h3{font-size:18px;line-height:1.25;letter-spacing:-.025em;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.directory-inner .collection-grid .card-top>.save{position:absolute;top:8px;right:8px;z-index:2;display:grid;place-items:center;width:44px;height:44px;min-width:44px;min-height:44px;margin:0;padding:0;background:rgba(255,254,250,.96);border:1px solid rgba(23,28,36,.22);border-radius:50%;box-shadow:0 2px 8px #0002;color:#171c24;opacity:1;pointer-events:auto}
.directory-inner .collection-grid .card-top>.save:hover{background:#ffe15a;border-color:#171c24}
.directory-inner .collection-grid .card-top>.save .ui-icon{width:20px;height:20px;filter:none}
.directory-inner .collection-grid .card-top>.save[aria-pressed="true"]{background:#ffe15a;border-color:#171c24;color:#c82543}
.directory-inner .collection-grid .card-top>.save[aria-pressed="true"] .ui-icon{fill:currentColor}
.directory-inner .collection-grid .game-cover-heading{padding-right:58px}
.directory-inner .collection-grid .game-card>p{font-size:12px;line-height:1.55;margin:0 12px 10px}
.directory-inner .collection-grid .card-top+p{min-height:3.1em;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.directory-inner .collection-grid .tags{align-content:flex-start;gap:5px;min-height:45px;margin:auto 12px 0}
.directory-inner .collection-grid .tags span{font-size:9px;padding:3px 5px}
@media(min-width:1800px){.directory-inner .collection-grid{grid-template-columns:repeat(7,minmax(0,1fr))}}
@media(max-width:640px){.directory-inner .collection-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:22px 12px}.directory-inner .collection-grid .card-top{min-height:40px;margin:10px 10px 6px}.directory-inner .collection-grid .card-top h3{font-size:16px}.directory-inner .collection-grid .game-card>p{margin-inline:10px}.directory-inner .collection-grid .tags{margin-inline:10px}}
.directory-inner .game-cover-heading{padding:8px 12px}.directory-inner .game-cover-heading strong{font-size:17px}
@media(max-width:1050px){.directory-inner .article-layout{grid-template-columns:180px minmax(0,1fr);gap:28px}.directory-inner .theme-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.directory-inner .article-layout{display:flex;flex-direction:column}.directory-inner .theme-grid{grid-template-columns:1fr}.directory-inner .page-heading{padding:10px 0 25px}}
@media(max-width:600px){
 body.directory-home>header{height:64px;padding:8px 10px;gap:8px}
 body.directory-home>header .brand .brand-mark{width:29px;height:29px;padding:3px}
 body.directory-home>header .menu-button{font-size:0;min-width:30px;width:30px}
 body.directory-home>header .brand-wordmark{font-size:13px}
 body.directory-home>header .header-search button{width:28px;min-width:28px}
 .directory-intro{margin-bottom:16px}.directory-intro h1{font-size:18px}.directory-intro p:not(.eyebrow){font-size:11px}
 .directory-shelf-title{font-size:18px;padding:7px 9px}
 body.directory-home .directory-rail{grid-auto-columns:clamp(136px,42vw,168px);gap:12px}
 .directory-game-copy{min-height:76px;padding:9px}.directory-game-copy h3{font-size:14px}
 .game-cover-heading{padding:10px 9px 7px}.game-cover-heading strong{font-size:15px}.game-cover-heading>span{font-size:7px}
 .game-cover-foot{font-size:7px;padding:7px 9px}
 .directory-game .game-cover-heading{padding-right:33px}
 .directory-save{width:27px;height:27px;right:5px;top:5px}
 body.directory-home .catalog-content .card-top h3{font-size:15px}
 .directory-inner .page-heading h1{font-size:34px}
}

body.directory-home .embed-poster-label strong{background:#ffe15a;color:#171c24;border:2px solid #171c24;border-radius:0;box-shadow:3px 3px 0 #171c24;font-weight:800}
body.directory-home .embed-poster-label small{color:#fffefa;background:#17212c}
body.directory-home .play-help,body.directory-home .play-main>.embed-game,body.directory-home .play-workspace>.embed-game{border:2px solid #171c24;border-radius:0}
body.directory-home .play-help h2,body.directory-home .play-help h3{color:#171c24}
body.directory-home .embed-game{margin-inline:0;max-width:100%;min-width:0}
body.directory-home .embed-toolbar :is(button,.outline){background:#202c3b;color:#fffefa;border:1px solid #738191;box-shadow:none}
body.directory-home .embed-toolbar [data-save][aria-pressed="true"]{background:#ffe15a;color:#171c24}
body.directory-home .embed-prompt{color:#fffefa}

/* The replacement library uses its portrait artwork without a second title frame. */
.game-cover--artwork{display:block;position:relative;isolation:isolate;background:#101720}
.game-cover--artwork::before{content:"";position:absolute;inset:-12px;background-size:cover;background-position:center;filter:blur(12px) brightness(.62);pointer-events:none;z-index:0}
.game-cover--artwork.cover-image-ready::before{background-image:var(--preview-art)}
body.directory-home .game-cover--artwork img{position:relative;z-index:1;width:100%;height:100%;display:block;object-fit:cover;transform:none!important}
body.directory-home .game-cover--artwork img.cover-image-wide{object-fit:contain}
.directory-game-image:has(.game-cover--artwork),body.directory-home .catalog-content .card-image:has(.game-cover--artwork){aspect-ratio:2/3}
.project-options{display:grid;gap:16px;margin-block:25px}
.project-option{padding:20px;border:1px solid var(--line);background:var(--panel)}
.project-option h3{margin-top:0}.project-option .project-state{font-size:12px;font-weight:700;color:var(--muted)}

/* Preserve image proportions while filling cropped thumbnail frames. */
body.directory-home :is(.theme-image img,.finder-photo img,.compare-photo img,.next-game img,.guide-card-image img){object-fit:cover;object-position:center}
body.directory-home :is(.collection-pick img,.detail-photo img,.guide-hero img){object-fit:contain;object-position:center}

/* Game previews fill the full frame at every container ratio. */
body.directory-home .play-main .external-game-preview{height:clamp(320px,42vw,520px);isolation:isolate;background:#101720}
body.directory-home :is(.play-main .external-game-preview,.embed-poster)::before{content:"";position:absolute;inset:-24px;background-image:var(--preview-art);background-size:cover;background-position:center;filter:blur(22px) brightness(.38);pointer-events:none;z-index:0}
body.directory-home :is(.play-main .external-game-preview>img,.embed-poster>img,.embed-poster picture img){position:relative;z-index:1;display:block;width:100%;height:100%;max-height:none;object-fit:contain;object-position:center;opacity:1}
body.directory-home .play-main .external-game-overlay{z-index:2;inset:0;padding:24px 16px;background:transparent;justify-content:center;opacity:1;border:0;border-radius:0}
body.directory-home .play-main .external-game-overlay strong{display:inline-flex;align-items:center;justify-content:center;min-height:48px;max-width:100%;padding:12px 24px;background:#ffe15a;color:#171c24;border:2px solid #171c24;box-shadow:3px 3px 0 #171c24;font-family:'DM Sans',Arial,sans-serif;font-size:16px;font-weight:800;line-height:1.4;letter-spacing:0}
body.directory-home .play-main .external-game-overlay small{padding:4px 8px;background:rgba(10,16,24,.87);color:#fffefa;font-size:11px;line-height:1.4}
body.directory-home .embed-poster-label{z-index:2}
@media(max-width:650px){body.directory-home .play-main .external-game-preview{height:360px;max-height:62svh}}

/* Original game screenshots sit in the same portrait cards as the new library. */
.directory-game-image,body.directory-home .catalog-content .card-image:has(.game-cover){aspect-ratio:2/3}
.game-cover-scene{position:relative;overflow:hidden;isolation:isolate}
.game-cover-scene::before{content:"";position:absolute;inset:-12px;background-size:cover;background-position:center;filter:blur(12px) brightness(.4);z-index:-1}
.game-cover.cover-image-ready .game-cover-scene::before{background-image:var(--preview-art)}
body.directory-home .game-cover-scene img{object-fit:contain}
/* The original PrinceJS capture is pixel art; do not blur its enlarged pixels. */
body.directory-home .game-cover[data-cover="princejs"] .game-cover-scene img{image-rendering:pixelated}
@media(prefers-reduced-motion:reduce){.game-cover[data-cover="princejs"],.embed-game[data-embed-layout="princejs"] .embed-poster{--preview-art:url('/media/prince-controls.svg')!important}}

/* Collection navigation uses small cover thumbnails rather than large banners. */
body.directory-home .theme-grid{gap:16px}
body.directory-home .theme-card{display:grid;grid-template-columns:104px minmax(0,1fr);align-items:center;gap:16px;padding:16px}
body.directory-home .theme-image{width:104px;height:144px;aspect-ratio:auto;border:1px solid var(--line)}
body.directory-home .theme-image img{object-fit:cover;object-position:center}
body.directory-home .theme-body{padding:0;min-width:0;align-self:stretch}
body.directory-home .theme-body h3{font-size:20px;line-height:1.2;margin:6px 0 8px}
body.directory-home .theme-body p{font-size:12px;line-height:1.55;margin:0 0 10px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
body.directory-home .theme-body .collection-cover-game{font-size:11px;margin-bottom:6px}
body.directory-home .theme-body .text-link{font-size:11px;line-height:1.4;gap:8px;padding:4px 0}
@media(max-width:650px){body.directory-home .theme-card{grid-template-columns:80px minmax(0,1fr);gap:12px;padding:14px}body.directory-home .theme-image{width:80px;height:112px}body.directory-home .theme-grid{gap:14px}}

/* Give homepage category choices more room and a larger preview. */
body.directory-home #browse-collections .theme-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}
body.directory-home #browse-collections .theme-card{grid-template-columns:140px minmax(0,1fr);gap:22px;padding:22px;min-height:244px}
body.directory-home #browse-collections .theme-image{width:140px;height:196px}
body.directory-home #browse-collections .theme-body h3{font-size:25px;line-height:1.2;margin:8px 0 10px}
body.directory-home #browse-collections .theme-body p{font-size:14px;line-height:1.65;margin-bottom:12px}
body.directory-home #browse-collections .theme-body>.eyebrow{font-size:10px;line-height:1.5}
body.directory-home #browse-collections .theme-body .collection-cover-game{font-size:13px;margin-bottom:8px}
body.directory-home #browse-collections .theme-body .text-link{font-size:13px;padding:6px 0}
@media(min-width:1800px){body.directory-home #browse-collections .theme-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:850px){body.directory-home #browse-collections .theme-grid{grid-template-columns:1fr}}
@media(max-width:650px){
 body.directory-home #browse-collections .theme-grid{gap:18px}
 body.directory-home #browse-collections .theme-card{grid-template-columns:112px minmax(0,1fr);gap:16px;padding:16px;min-height:200px}
 body.directory-home #browse-collections .theme-image{width:112px;height:156px}
 body.directory-home #browse-collections .theme-body h3{font-size:22px}
 body.directory-home #browse-collections .theme-body p{font-size:13px}
 body.directory-home #browse-collections .theme-body .collection-cover-game{font-size:12px}
}
@media(max-width:380px){
 body.directory-home #browse-collections .theme-card{grid-template-columns:96px minmax(0,1fr);gap:12px}
 body.directory-home #browse-collections .theme-image{width:96px;height:134px}
}

/* Keep the game visible while comparing the text in collection tables. */
.save-notice{margin:20px 0;padding:18px 22px;background:var(--panel);border:1px solid var(--line);color:var(--muted);font-size:13px;line-height:1.65}
.save-notice h3{margin:0 0 8px;color:var(--ink);font-size:16px;line-height:1.3}
.save-notice p+p,.save-panel p+p{margin-top:8px}
.save-method-source{display:inline-block;font-size:11px;text-decoration:underline;text-underline-offset:3px;white-space:nowrap}
.save-unverified{color:var(--muted)}
.save-panel .save-method{color:var(--ink)}
.choice-table .save-method{min-width:130px;max-width:28ch}
@media(max-width:600px){.save-notice{padding:15px}}
.choice-table tbody th{min-width:380px}
.choice-table .choice-game{display:grid;grid-template-columns:180px minmax(0,1fr);align-items:center;gap:16px}
.choice-table .choice-game-thumb{width:180px;height:135px;object-fit:cover;object-position:center;background:#e7e4db;border:1px solid var(--line);outline:3px solid transparent;outline-offset:2px;transform-origin:center;transition:transform 180ms cubic-bezier(.2,.8,.2,1.2),outline-color 140ms ease,box-shadow 180ms ease,filter 140ms ease}
.choice-table .choice-game-copy{color:var(--ink);line-height:1.4}
.choice-game-copy strong{display:block;font-size:15px;margin-bottom:4px}
@media(hover:hover) and (pointer:fine){.choice-table .choice-game:hover .choice-game-thumb{transform:translateY(-3px) scale(1.025);outline-color:var(--brand-lime);box-shadow:3px 5px 0 #171c24;filter:brightness(1.05)}}
.choice-table .choice-game:focus-visible .choice-game-thumb{outline-color:#7360ae;box-shadow:3px 3px 0 #171c24}
.choice-table .choice-game:is(:active,.is-game-pressed) .choice-game-thumb{transform:translate(1px,1px) scale(.975);outline-color:var(--brand-lime);box-shadow:1px 1px 0 #171c24;filter:brightness(.9);transition-duration:70ms}
@media(max-width:600px){.choice-table tbody th{min-width:330px}.choice-table .choice-game{grid-template-columns:144px minmax(0,1fr);gap:12px}.choice-table .choice-game-thumb{width:144px;height:108px}}
@media(prefers-reduced-motion:reduce){.choice-table .choice-game-thumb{transition:none}.choice-table .choice-game:is(:hover,:active,.is-game-pressed) .choice-game-thumb{transform:none}}

/* Every game uses the HexGL window size; native content keeps its own ratio. */
body.directory-home .embed-game .embed-viewport,
body.directory-home .player-frame{width:100%;max-width:100%;min-width:0;height:auto;min-height:320px;aspect-ratio:100 / 51}
.embed-game[data-embed-layout="hexgl"] .embed-fit iframe{width:1000px;height:510px}
body.directory-home .embed-game .embed-viewport:fullscreen{width:100vw;height:100dvh;min-height:0;aspect-ratio:auto}
/* Match the surrounding frame as well as the picture area. */
body.directory-home .play-workspace .embed-header{height:56px;min-height:56px}
.play-workspace .embed-header>div{min-width:0}
.play-workspace .embed-header h2{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.play-workspace .embed-header>a{max-width:44%}
.play-workspace .embed-stage{border:0}
.embed-footer{height:76px;box-sizing:border-box;padding:12px 16px;overflow:auto}
body.directory-home .embed-footer :is(.embed-status,.embed-note){padding:0;margin:0;font-size:11px;line-height:1.65}
body.directory-home .embed-footer .embed-note{margin-top:6px}
.embed-extra-controls{margin:8px 0 0;padding:0 16px;font-size:12px;line-height:1.6;color:var(--muted)}
.play-workspace .embed-toolbar{height:64px;box-sizing:border-box;flex-wrap:nowrap;overflow-x:auto}
.play-workspace .embed-toolbar>*{flex-shrink:0}
@media(max-width:600px){.embed-footer{height:112px;padding:12px}}

/* Finder cards use larger portrait covers with the title and a full introduction. */
.finder-body{padding:20px}
.finder-card-heading{display:grid;grid-template-columns:180px minmax(0,1fr);align-items:center;gap:16px;width:100%;margin-bottom:16px}
.finder-card-title{min-width:0}
.finder-card-title>.eyebrow{font-size:9px;line-height:1.6}
.finder-card-title h2{font-size:22px;line-height:1.2;margin:6px 0 8px}
.finder-card .finder-photo{width:180px;height:240px;aspect-ratio:auto;background:#e7e4db;border:1px solid var(--line)}
body.directory-home .finder-card .finder-photo img{width:100%;height:100%;object-fit:cover;object-position:center;transform:none}
.finder-host{display:inline-block;padding:3px 6px;border:1px solid var(--line);font-size:9px;line-height:1.5;color:var(--muted)}
.finder-body>p{font-size:13px;line-height:1.65}
.finder-body dl{padding-top:16px;margin:16px 0 20px;gap:9px 12px}
@media(max-width:700px){.finder-body{padding:18px}.finder-card-heading{grid-template-columns:144px minmax(0,1fr);gap:12px}.finder-card .finder-photo{width:144px;height:192px}.finder-card-title h2{font-size:22px}}

/* Original-host covers use the very same window as playable projects. */
.play-main>.detail-photo:has(>.external-game){margin:0}
.play-main>.detail-photo:has(>.external-game)>.external-game{margin:0;padding:0;border-radius:0;overflow:hidden;border:2px solid #171c24}
body.directory-home .external-game .external-game-preview{display:block;width:100%;height:100%;min-height:0;max-height:none;aspect-ratio:auto}
body.directory-home .external-game .external-game-preview>img{object-fit:contain}

/* Arcade selection: lift on hover, press into the ink shadow on activation. */
body.directory-home .directory-rail{padding:8px 10px 14px 6px;margin-top:-8px;margin-left:-6px}
body.directory-home :is(.directory-game,.catalog-content .game-card){
 position:relative;
 outline:3px solid transparent;
 outline-offset:2px;
 transform-origin:center;
 transition:transform 180ms cubic-bezier(.2,.8,.2,1.2),box-shadow 180ms ease,outline-color 140ms ease,border-color 140ms ease;
}
body.directory-home :is(.directory-game-image,.catalog-content .card-image) .game-cover{
 transition:transform 220ms cubic-bezier(.2,.7,.2,1),filter 180ms ease;
}
@media(hover:hover) and (pointer:fine){
 body.directory-home :is(.directory-game,.catalog-content .game-card):has(a:hover){
  z-index:1;
  transform:translateY(-4px);
  border-color:#28613d;
  outline-color:#86d7a2;
  box-shadow:5px 7px 0 #171c24;
 }
 body.directory-home :is(.directory-game,.catalog-content .game-card):has(a:hover) .game-cover{transform:scale(1.025);filter:brightness(1.06)}
}
body.directory-home :is(.directory-game,.catalog-content .game-card):has(a:focus-visible){
 z-index:1;
 outline-color:#7360ae;
 box-shadow:5px 5px 0 #171c24;
}
body.directory-home :is(.directory-game,.catalog-content .game-card):is(:has(a:active),.is-game-pressed){
 z-index:1;
 transform:translate(2px,2px) scale(.975);
 border-color:#171c24;
 outline-color:#ffe15a;
 box-shadow:1px 1px 0 #171c24;
 transition-duration:70ms;
}
body.directory-home :is(.directory-game,.catalog-content .game-card):is(:has(a:active),.is-game-pressed) .game-cover{transform:scale(1);filter:brightness(.92);transition-duration:70ms}
@media(prefers-reduced-motion:reduce){
 body.directory-home :is(.directory-game,.catalog-content .game-card),
 body.directory-home :is(.directory-game-image,.catalog-content .card-image) .game-cover{transition:none}
 body.directory-home :is(.directory-game,.catalog-content .game-card):is(:has(a:is(:hover,:active)),.is-game-pressed),
 body.directory-home :is(.directory-game,.catalog-content .game-card):is(:has(a:is(:hover,:active)),.is-game-pressed) .game-cover{transform:none}
}

/* Launch evidence uses the existing type, border and spacing system. */
.closing.closing-links{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:40px;align-items:start;padding:56px 0 64px;border-top:1px solid var(--line)}
.closing-links .closing-copy{min-width:0}
.closing-links .eyebrow{font-size:11px;letter-spacing:.12em;color:var(--muted)}
.closing-links h2{font-size:clamp(24px,2.6vw,32px);line-height:1.2;letter-spacing:-.025em;margin:12px 0 16px;max-width:24ch}
.closing-links .closing-copy>p:last-child{font-size:15px;line-height:1.55;color:var(--muted);max-width:34ch;margin:0}
.closing-routes{min-width:0;display:grid}
.closing-route{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:20px;align-items:center;min-height:56px;padding:16px 0;border-bottom:1px solid var(--line);text-decoration:none}
.closing-route:first-child{padding-top:0}
.closing-route-copy{display:grid;gap:6px;min-width:0}
.closing-route-copy strong{font-size:16px;line-height:1.35}
.closing-route-copy>span{font-size:13px;line-height:1.55;color:var(--muted)}
.closing-route-action{font-size:13px;line-height:1.5;white-space:normal;text-align:right;max-width:16ch;color:var(--ink)}
.closing-route:hover .closing-route-action{text-decoration:underline;text-underline-offset:4px}
.closing-route:focus-visible{outline:2px solid var(--ink);outline-offset:5px}
@media(max-width:720px){.closing.closing-links{grid-template-columns:1fr;gap:24px;padding:36px 0 44px}.closing-links h2{font-size:clamp(22px,6.5vw,28px)}.closing-route{grid-template-columns:1fr;gap:10px;min-height:52px;padding:14px 0}.closing-route-action{justify-self:end;max-width:none}.closing-links .closing-copy>p:last-child{max-width:34ch}}
.launch-summary{display:flex;flex-wrap:wrap;gap:10px 24px;padding:16px 20px;margin:0 0 20px;background:#fffef8;border:1px solid #d2d0c5;line-height:1.6}.launch-summary span{font-size:14px}.launch-summary small{flex-basis:100%;font-size:12px;color:#52616d}.filter-bar{flex-wrap:wrap}.filter-bar .select-label{min-width:130px;flex:1}.filter-bar .search{min-width:180px;flex:2}@media(max-width:600px){.launch-summary{display:grid;gap:8px;padding:14px}.filter-bar .select-label{flex-basis:calc(50% - 12px);min-width:0}.filter-bar .search{flex-basis:100%}.filter-bar select{max-width:100%;width:100%}}

.directory-list .filter-bar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;align-items:end}.directory-list .filter-bar .select-label{display:grid;grid-template-columns:1fr;gap:6px;min-width:0}.directory-list .filter-bar .search{min-width:0;margin:0;min-height:50px}.directory-list .filter-bar select{width:100%;min-width:0;padding:10px}.directory-list .filter-bar input{min-width:0}@media(max-width:600px){.directory-list .filter-bar{grid-template-columns:repeat(2,minmax(0,1fr))}.directory-list .filter-bar .search{grid-column:1/-1}}

/* Large-cover gallery for the Play here collection. */
.play-here-card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,190px),1fr));gap:18px 16px;align-items:stretch}.play-here-card-grid>.directory-game{min-width:0}.play-here-card-grid .directory-game-link{height:100%}.play-here-card-grid .directory-game-image{aspect-ratio:2/3}.play-here-card-grid .directory-game-copy{flex:1;min-height:84px}@media(min-width:1800px){.play-here-card-grid{grid-template-columns:repeat(7,minmax(0,1fr))}}@media(max-width:600px){.play-here-card-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 12px}}

.finder-body>.finder-description{display:block;width:100%;font-size:14px;line-height:1.75;overflow:visible;max-height:none;-webkit-line-clamp:unset;white-space:normal}

@media(max-width:380px){.finder-card-heading{grid-template-columns:128px minmax(0,1fr)}.finder-card .finder-photo{width:128px;height:171px}}
