/* Approved minimal library concept: design/minimal-library-v2.png. */
.system-filter-label{font-size:18px;color:var(--muted)}
#shell .filters{align-items:center}
#shell #system-filter{width:260px;max-width:100%;border:0;border-bottom:2px solid var(--edge);background:transparent;font-size:22px;padding:8px 22px 8px 0;min-height:44px}
#shell .playback-note{font-size:17px;line-height:1.35;margin:14px 0 0;color:var(--muted)}
#shell .play-button:disabled{cursor:default;opacity:.6}
@media(max-width:760px){#shell .filters{justify-content:flex-start;gap:18px}#shell #system-filter{width:auto;flex:1;min-width:0}}
#shell{min-height:100vh}
#shell .site-header{position:sticky;top:0;z-index:15;background:var(--bg);border-bottom:1px solid var(--line)}
#shell .header-inner{max-width:1280px;min-height:76px;padding:12px 32px;gap:42px;flex-wrap:nowrap}
#shell .brand{font-size:16px;letter-spacing:2px;gap:16px}
#shell .header-inner nav{margin-left:8px;gap:20px;width:auto;order:0;border:0;padding:0}
#shell .header-inner nav button{font-size:23px;padding:14px 8px;border-bottom-width:2px;flex:initial}
.profile-area{position:relative;margin-left:auto;flex-shrink:0}
#shell .profile{margin:0;gap:12px;min-height:44px}
#shell .profile strong{font-size:22px;max-width:150px}
#shell .small-avatar{width:42px;height:42px;border-width:1px}
.profile-chevron{font:22px Jersey;margin-left:6px}
.profile-menu{position:absolute;right:0;top:calc(100% + 16px);z-index:10;width:230px;padding:12px;background:var(--surface);border:1px solid var(--line);box-shadow:0 12px 30px #15161d66}
.profile-menu>span{display:block;font-size:17px;padding:8px 10px;border-bottom:1px solid var(--line);margin-bottom:6px}
.profile-menu button{display:block;width:100%;background:none;border:0;padding:10px;text-align:left;font-size:21px;min-height:44px}
.profile-menu button:hover,.profile-menu button:focus-visible{background:var(--raised)}
.profile-menu #logout{border-top:1px solid var(--line);margin-top:6px;color:var(--muted)}
#shell .main{width:calc(100% - 64px);max-width:1184px;margin:0 auto;padding-top:36px;min-height:calc(100vh - 77px);display:flex;flex-direction:column}
#shell .page-heading{margin-bottom:28px;min-height:54px;gap:24px;flex-wrap:nowrap;align-items:center}
#shell h1{font-size:30px;letter-spacing:1px;margin:0;line-height:1.5}
#shell .library-tools{display:flex;align-items:center;gap:12px;width:300px;flex-shrink:0;border:1px solid var(--line);padding:0 14px;background:transparent}
.library-tools>span{font:28px Jersey;color:var(--muted)}
#shell .library-tools input{width:100%;min-width:0;min-height:44px;font-size:21px;background:transparent;border:0;padding:8px 0;outline-offset:3px}
#shell .library-tools:focus-within{border-color:var(--edge)}
#shell .panel{border:1px solid var(--line);box-shadow:none}
#shell .home-intro{display:block;margin-bottom:28px}
#shell .continue-panel{display:flex;gap:28px;padding:16px 22px;min-height:176px;background:var(--surface)}
#shell .continue-illustration{width:190px;height:140px;padding:0;border:0;background:none}
#shell .continue-copy{min-width:0}
#shell .continue-copy h2{font:32px/1.1 Jersey;margin:9px 0 8px;overflow-wrap:anywhere}
#shell .continue-copy p{font-size:20px;margin:0;color:var(--muted)}
#shell .continue-copy .eyebrow{font-size:9px;letter-spacing:2px}
#shell #continue-play{margin-left:auto;min-width:150px;min-height:46px;font-size:24px;padding:8px 20px;flex-shrink:0}
#shell .filter-row{margin:0 0 24px;padding-top:20px;border-top:1px solid #4c4e60;align-items:center;gap:18px;flex-wrap:wrap}
#shell .filters{gap:24px;flex-wrap:nowrap}
#shell .filters button{padding:8px 0 10px;min-height:44px;background:none;border:0;border-bottom:2px solid transparent;box-shadow:none;font-size:21px;white-space:nowrap}
#shell .filters button.active{background:none;color:var(--ink);border-bottom-color:var(--edge)}
.collection-actions{margin-left:auto;display:flex;gap:16px;align-items:center}
#shell #result-count{font-size:18px;white-space:nowrap}
#shell #sort{width:123px;font-size:17px;min-height:36px;padding:4px 6px;background:transparent;border:0;color:var(--muted)}
#shell .game-grid{grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:1fr;gap:22px;align-items:stretch}
#shell .game-card{position:relative;display:flex;flex-direction:column;min-width:0;background:var(--surface);border:1px solid #4d4f61;box-shadow:none;overflow:hidden}
#shell .game-art{position:relative;height:auto;aspect-ratio:1.43;flex-shrink:0;background:#252630;margin:11px 11px 0;overflow:hidden}
#shell .game-art:after{display:none}
#shell .box-art-cover{position:absolute;inset:0;width:100%;height:100%;padding:0;display:grid;grid-template-rows:minmax(0,1fr);grid-template-columns:minmax(0,1fr);place-items:center}
#shell .game-art img,#shell .continue-illustration img{display:block;width:100%;height:100%;object-fit:cover;object-position:center top;filter:none;opacity:1;image-rendering:auto}
#shell .game-platform{display:none}
#shell .game-info{position:relative;display:flex;flex-direction:column;flex:1;padding:14px 17px 17px}
#shell .game-info h3{font:28px/1.15 Jersey;text-transform:none;min-height:2.3em;margin:0 36px 7px 0;overflow-wrap:anywhere}
#shell .game-meta{font-size:18px}
#shell .game-meta>span:not(:first-child){display:none}
#shell .favorite-button{top:10px;right:14px;bottom:auto;min-width:32px;height:36px;min-height:36px;padding:0;background:none;border:0;box-shadow:none;color:var(--ink);font-size:28px}
#shell .favorite-button.selected{background:none;color:var(--edge)}
#shell .favorite-button:hover{color:white;transform:translateY(-1px)}
#shell .game-bottom{margin-top:auto;padding-top:14px;justify-content:flex-start}
#shell .save-label{display:none}
#shell .play-button{font-size:22px;padding:5px 20px;min-height:40px;min-width:108px;border:1px solid #a3a0ba;box-shadow:inset 0 2px #77798e,inset 0 -2px #424456;background:var(--fill)}
#shell .play-button:active{transform:translateY(2px)}
#shell .main{padding-bottom:var(--footer-height,140px)}
#shell .site-footer{position:fixed;bottom:0;left:0;right:0;z-index:15;margin:0;background:var(--bg);padding:16px max(32px,calc((100vw - 1184px)/2)) calc(16px + env(safe-area-inset-bottom));gap:22px;font-size:17px;border-top:1px solid #4c4e60;flex-wrap:wrap}
#shell #library-view,#shell #extra-view{padding-bottom:28px}
#shell .site-footer div{margin-left:auto;width:auto;gap:22px}
#shell .site-footer button{font-size:18px}
#shell #controller-status{font-size:16px;opacity:.8}
#shell .status-dot{width:8px;height:8px;border-radius:50%;box-shadow:none;background:#b2aecb}
#shell #server-status[data-state=online] .status-dot{background:#65d68a}
#shell #server-status[data-state=offline] .status-dot{background:#f17777}
#shell .section-panel,#shell .persona-controls,#shell .mapping-panel{border-width:1px;box-shadow:none}
@media(max-width:1100px){
 #shell .header-inner{gap:24px}#shell .header-inner nav{gap:10px;margin:0}
 #shell .brand{font-size:14px;letter-spacing:1px}#shell .profile strong{max-width:100px}
 #shell .collection-actions{gap:8px}#shell .filters{gap:20px}#shell .game-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
 #shell .header-inner{padding:12px 20px;gap:14px;flex-wrap:wrap}
 #shell .header-inner nav{order:3;width:100%;justify-content:flex-start;gap:28px}
 #shell .header-inner nav button{font-size:22px;padding:6px 0 10px;flex:initial}
 #shell .profile strong{font-size:20px}#shell .main{width:calc(100% - 40px);padding-top:26px;min-height:calc(100vh - 126px)}
 #shell h1{font-size:25px}#shell .page-heading{flex-wrap:wrap;gap:18px;margin-bottom:22px}
 #shell .library-tools{width:100%}#shell .continue-panel{gap:18px;padding:16px;flex-wrap:wrap}
 #shell .continue-illustration{width:130px;height:100px}#shell .continue-copy{flex:1}
 #shell .continue-copy h2{font-size:28px}#shell .continue-copy p{font-size:18px}
 #shell #continue-play{min-width:130px;font-size:22px;margin-left:auto;min-height:42px}
 #shell .filters{gap:22px;justify-content:space-between;width:100%}
 #shell .filters button{font-size:19px}#shell .collection-actions{margin-left:0;width:100%;gap:12px;justify-content:flex-end}
 #shell #result-count{margin-right:auto;display:block}#shell #sort{width:115px}
 #shell .game-info h3{font-size:26px}#shell .game-grid{gap:16px}
 #shell .site-footer{gap:14px;padding-left:20px;padding-right:20px}#shell .site-footer div{margin-left:0;width:100%}
}
@media(max-width:480px){
 #shell .brand{font-size:12px;gap:10px}
 #shell .small-avatar{width:36px;height:36px}#shell .profile{gap:8px}#shell .profile strong{font-size:19px;max-width:84px}
 #shell .continue-panel{gap:14px}
 #shell .continue-illustration{width:112px;height:85px}#shell .continue-copy h2{font-size:26px}
 #shell .continue-copy .eyebrow{font-size:7px;letter-spacing:1px}#shell .continue-copy p{font-size:17px}
 #shell #continue-play{width:100%;margin:0}#shell .game-grid{grid-template-columns:1fr}
 #shell .game-info h3{font-size:28px}#shell .game-art{aspect-ratio:1.43}
 #shell .filters{gap:12px}#shell .filters button{font-size:18px}
 #shell #sort{width:108px}
}

/* Keep the wordmark continuous while giving WORLD a warm retro accent. */
.brand .brand-world{color:#e6bd78}

/* Count and sort occupy the right end of the library toolbar. */
#shell .collection-actions{margin-left:auto;justify-content:flex-end}
@media(max-width:760px){#shell .collection-actions{width:auto;margin-left:auto}#shell #result-count{margin-right:0}}

/* Reserve room for the mascot so its face stays clear of the wordmark. */
.brand{position:relative;isolation:isolate;padding-left:78px}
.brand .brand-carby{position:absolute;width:90px;height:90px;left:0;top:50%;transform:translateY(-50%);object-fit:contain;image-rendering:pixelated;pointer-events:none;z-index:0}
.brand .brand-wordmark{position:relative;z-index:1;text-shadow:0 1px 2px var(--bg),0 0 4px var(--bg)}
@media(max-width:480px){.brand{padding-left:62px}.brand .brand-carby{width:72px;height:72px;left:0}}
