.mode-switch{display:flex;gap:4px;padding:4px;background:var(--soft);border:1px solid var(--line);border-radius:14px;flex-shrink:0}.mode-switch a{padding:9px 14px;color:var(--muted);font-size:.9rem;font-weight:700;text-decoration:none;border-radius:10px;white-space:nowrap}.mode-switch a[aria-current=page]{background:var(--purple);color:var(--surface)}.top{flex-wrap:wrap;gap:14px}.game-card .poster{aspect-ratio:460/215}.game-card .game-card-genres{line-height:1.6}.game-mode-tags{display:flex;gap:5px;flex-wrap:wrap;margin:6px 0 12px}.game-mode-tags span{padding:4px 7px;border-radius:8px;background:var(--soft);color:var(--purple);font-size:.72rem}.game-editor{width:min(780px,calc(100% - 24px));padding:0;overflow:hidden}.game-editor>form{display:flex;flex-direction:column;max-height:90dvh;min-height:0}.game-editor .dialog-head{margin:0;padding:22px 24px;flex-shrink:0}.game-editor-scroll{min-height:0;overflow-y:auto;padding:20px 24px;overscroll-behavior:contain}.game-editor .dialog-actions{margin:0;padding:14px 24px;flex-shrink:0;border-top:1px solid var(--line);background:var(--surface)}.game-editor .catalog-box{margin:0 0 20px}.game-lookup-row{display:flex;gap:8px}.game-lookup-row input{flex:1;min-width:0}.game-lookup-row button{flex-shrink:0}#gameResults{display:grid;gap:8px;margin-top:10px;max-height:320px;overflow:auto}#gameResults .catalog-result{width:100%;display:flex;gap:12px;align-items:center;text-align:left}#gameResults img{width:100px;aspect-ratio:231/87;object-fit:cover;border-radius:8px}.game-editor fieldset{margin:14px 0;display:flex;gap:8px 14px;flex-wrap:wrap}.game-editor fieldset label{display:flex;align-items:center;gap:7px;font-size:.875rem;margin:0}.game-editor fieldset input{width:18px;height:18px;accent-color:var(--purple)}.game-editor details{margin:14px 0}.game-editor summary{cursor:pointer;color:var(--purple);font-weight:700;margin-bottom:12px}.game-preview{display:flex;gap:16px;margin:0 0 20px}.game-preview img{width:42%;object-fit:contain;align-self:start;border-radius:12px}.game-preview>div{min-width:0}.game-preview h3{line-height:1.5;margin-top:0}.game-preview p{line-height:1.65;font-size:.9rem}.game-search-sort{max-width:none;flex-wrap:wrap}.game-search-sort input{max-width:260px}#gameStatuses button[data-status].active{color:var(--status-ink,var(--purple));border-bottom-color:var(--status-accent,var(--purple))}#gameStatuses button[data-status]:not([data-status=all])::before{content:'';display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:7px;background:var(--status-accent)}#gameStatuses button[data-status]:not([data-status=all]) b{background:var(--status-bg);color:var(--status-ink)}
@media(max-width:600px){.mode-switch{order:3;width:100%;justify-content:center}.mode-switch a{flex:1;text-align:center}.game-editor-scroll{padding:16px}.game-editor .dialog-head{padding:18px 16px}.game-editor .dialog-actions{padding:12px 16px}.game-lookup-row{flex-wrap:wrap}.game-lookup-row input{flex-basis:100%;font-size:16px}.game-lookup-row button{width:100%}.game-preview{flex-direction:column}.game-preview img{width:100%}.game-search-sort input{max-width:none;width:100%}.game-search-sort select{width:calc(50% - 5px)}#gameRatings{grid-template-columns:1fr}}

.game-search-sort{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:420px;max-width:100%}.game-search-sort input{grid-column:1/-1;width:100%;max-width:none}.game-search-sort select{width:100%;max-width:none;min-width:0}@media(max-width:600px){.game-search-sort{width:100%}.game-search-sort select{width:100%}.game-editor .dialog-head h2{font-size:1.2rem;line-height:1.45;overflow-wrap:anywhere}}
.game-statistics{border:1px solid var(--line);border-radius:16px;padding:16px;margin:0 0 22px;background:var(--soft)}.game-statistics>h3{margin-top:0}.game-account-dialog{width:min(760px,calc(100% - 24px));overscroll-behavior:contain}.player-account-list{display:grid;gap:10px;margin:16px 0}.player-account-row{padding:14px;border:1px solid var(--line);border-radius:14px}.player-account-actions{display:flex;gap:8px;flex-wrap:wrap}.player-account-form{border-top:1px solid var(--line);padding-top:18px;margin-top:18px}.player-profile-links{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0;font-size:.875rem}.player-stat-account{padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}.player-stat-account>summary{line-height:1.6;overflow-wrap:anywhere}.player-stat-account>select{margin-bottom:10px}.player-stat-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:14px 0}.player-stat-tile{padding:10px;background:var(--soft);border-radius:10px;min-width:0}.player-stat-tile span,.player-stat-tile strong{display:block}.player-stat-tile strong{margin-top:6px;font-size:1.15rem;overflow-wrap:anywhere}.player-ranks p{font-size:.875rem}.player-stat-result a{font-size:.8rem}.player-stat-result .hint{line-height:1.65}@media(max-width:600px){.player-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.game-statistics{padding:12px}#gamesApp .account{flex-wrap:wrap;justify-content:flex-end}.game-account-dialog{padding:18px 16px}.player-profile-links a{overflow-wrap:anywhere}}

.player-profile-links a,.player-stat-result a{color:var(--purple)}

/* Account window: one content scroller, fixed close and save controls. */
#gameAccountDialog{padding:0;overflow:hidden;height:min(860px,92dvh);max-height:92dvh}
#gameAccountDialog[open]{display:flex;flex-direction:column}
#gameAccountDialog>.dialog-head{flex:none;margin:0;padding:20px 24px;border-bottom:1px solid var(--line);background:var(--surface);gap:16px}
#gameAccountDialog>.dialog-head h2{min-width:0;line-height:1.4;margin:0;overflow-wrap:anywhere}
#gameAccountDialog>.dialog-head .icon{flex:none;min-width:44px;min-height:44px;align-self:flex-start}
.player-account-scroll{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:18px 24px;scrollbar-gutter:stable}
.player-account-footer{flex:none;padding:12px 24px;border-top:1px solid var(--line);background:var(--surface)}
.player-account-footer>.player-account-actions{justify-content:flex-end;align-items:center}
.player-account-footer .error{margin:0 0 10px;line-height:1.5}.player-account-footer .error:empty{display:none}
.game-source-links{display:flex;flex-direction:column;align-items:flex-start;gap:12px;margin-top:14px;line-height:1.6}
.game-source-links a{color:var(--purple);overflow-wrap:anywhere}
@media(max-width:600px){#gameAccountDialog{height:94dvh;max-height:94dvh}#gameAccountDialog>.dialog-head{padding:16px}#gameAccountDialog>.dialog-head h2{font-size:1.2rem}.player-account-scroll{padding:16px}.player-account-footer{padding:12px 16px}.player-account-footer>.player-account-actions{display:grid;grid-template-columns:auto minmax(0,1fr)}.player-account-footer button{min-height:48px;padding:10px 12px}}

/* Game status remains visible over the full card, including its lower section. */
:root:not([data-theme=dark]) #gameGrid>.game-card[data-status]{background:var(--status-bg);border-color:var(--status-accent)}
:root:not([data-theme=dark]) #gameGrid>.game-card[data-status]>.card-body{background:var(--status-bg)}
:root[data-theme=dark] #gameGrid>.game-card[data-status]{border-color:var(--status-border)}
:root[data-theme=dark] #gameGrid>.game-card[data-status]>.card-body{background:var(--status-bg)}
#gameGrid>.game-card[data-status] .card-show-status{border-top-color:var(--status-border)}

/* Keep every cover complete inside the same large preview frame. */
.game-card .poster::before{content:'';position:absolute;inset:-16px;background-image:var(--game-cover,none);background-size:cover;background-position:center;filter:blur(14px);opacity:.5;pointer-events:none}
.game-card .poster img{object-fit:contain;object-position:center;z-index:1}
.game-card .poster .badge,.game-card .poster .card-year-badge{z-index:2}

/* Games use wide library tiles rather than the cinema poster layout. */
#gameGrid{grid-template-columns:repeat(3,minmax(0,1fr));gap:22px;align-items:stretch}
#gameGrid>.game-card{border-radius:16px;box-shadow:0 6px 20px #160e2012}
#gameGrid>.game-card>.card-body{padding:16px 18px;border-top:1px solid var(--status-border)}
.game-card-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:11px;min-height:27px}
#gameGrid .game-card-header .badge{position:static;padding:5px 9px;font-size:.72rem;line-height:1.4;border-radius:7px}
.game-card-year{color:var(--muted);font-size:.78rem;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
#gameGrid .game-card h3{font-size:1.1rem;line-height:1.35;margin:0 0 5px;white-space:normal;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
#gameGrid .game-card .meta{font-size:.76rem;line-height:1.5;margin:0 0 10px}
#gameGrid .game-mode-tags{margin:0 0 12px;gap:5px}
#gameGrid .game-mode-tags span{padding:4px 8px;font-size:.7rem;border:1px solid var(--status-border);background:var(--surface);color:var(--status-ink);line-height:1.4}
#gameGrid .ratings{border:0;padding:9px 10px;background:var(--soft);border-radius:9px;gap:7px 12px}
#gameGrid .game-card-genres{font-size:.8rem;line-height:1.5;margin:11px 0 0}
#gameGrid .card-footer{min-height:0;padding-top:14px;gap:0}
#gameGrid .card-show-status{border-top-style:solid;padding-top:10px;padding-right:26px;font-size:.74rem}
#gameGrid .card-body::after{content:'🎮';mask:none;background:none;width:auto;height:auto;font-size:16px;line-height:1;opacity:.5;transform:none;right:18px;bottom:18px}
@media(max-width:1050px){#gameGrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}}
@media(max-width:600px){#gameGrid{grid-template-columns:minmax(0,1fr);gap:18px}#gameGrid>.game-card>.card-body{padding:15px 16px}#gameGrid .game-card h3{font-size:1.08rem}#gameGrid .ratings span{font-size:.75rem}#gameGrid .card-body::after{right:16px;bottom:17px}}

#gameGrid>.game-card{font-weight:700;cursor:pointer;transition:transform .18s,box-shadow .18s}
#gameGrid .game-card-title{display:block;padding:0;background:transparent;border-radius:3px;text-align:left;font:inherit;line-height:inherit;width:100%}
#gameGrid .game-card-title:hover{transform:none;filter:none;color:var(--purple)}

#gameGrid .game-pin{position:absolute;z-index:3;top:10px;right:10px;width:26px;height:26px;min-height:0;display:grid;place-items:center;padding:0;border-radius:7px;border:1px solid #bdd2df66;background:#142937d9;color:#c7d9e4;font-size:0;line-height:1;box-shadow:0 1px 4px #0002;backdrop-filter:blur(8px)}
#gameGrid .game-pin-icon{display:block;width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round;pointer-events:none}
#gameGrid .game-pin[aria-pressed=true]{background:var(--soft);color:var(--muted);border-color:var(--cozy-border,var(--line))}
#gameGrid .game-pin[aria-pressed=true] .game-pin-icon{fill:currentColor}
#gameGrid .game-pin:hover{background:#304b5d;color:#e0edf5;transform:none;filter:none}#gameGrid .game-pin[aria-pressed=true]:hover{background:var(--surface);color:var(--purple)}
#gameGrid .game-pin:focus-visible{outline:3px solid var(--purple);outline-offset:3px}
#gameGrid>.game-card[data-pinned=true] .game-card-title::after{content:' ★';color:var(--muted);font-size:.65em}
#gameGrid .game-pin::before{content:"";position:absolute;inset:-7px}
#gameGrid>.game-card[data-valorant=true] .poster img{object-fit:cover;object-position:center}
.game-list-caption{display:flex;align-items:baseline;justify-content:space-between;gap:8px 20px;flex-wrap:wrap;margin:16px 0 12px}
.game-list-caption p{margin:0}.game-list-caption .hint{font-size:.76rem;line-height:1.5}
#gameGrid .game-drag-handle{position:absolute;z-index:3;top:10px;left:10px;width:32px;height:32px;display:grid;place-items:center;padding:0;border:1px solid #ffffff75;border-radius:9px;background:#11202edb;color:#fff;font-size:1.3rem;line-height:1;box-shadow:0 2px 8px #0003;backdrop-filter:blur(8px);cursor:grab;opacity:0;transition:opacity .15s}
#gameGrid .game-card:hover .game-drag-handle,#gameGrid .game-drag-handle:focus-visible{opacity:1}
#gameGrid .game-drag-handle:hover{transform:none;filter:none;background:#263e50}
#gameGrid .game-drag-handle:focus-visible{outline:3px solid var(--purple);outline-offset:3px}
#gameGrid>.game-card[draggable=true]{cursor:grab}
#gameGrid>.game-card.game-dragging{opacity:.4;cursor:grabbing}
#gameGrid.game-sorting>.game-card{transition:none;user-select:none}
#gameGrid>.game-card.game-drop-before{outline:3px solid var(--purple);outline-offset:4px;box-shadow:-7px 0 0 var(--purple)}
#gameGrid>.game-card.game-drop-after{outline:3px solid var(--purple);outline-offset:4px;box-shadow:7px 0 0 var(--purple)}
#gameGrid[aria-busy=true]{cursor:progress}
@media(hover:none){#gameGrid .game-drag-handle{opacity:1}}
@media(max-width:600px){#gameGrid>.game-card.game-drop-before{box-shadow:0 -7px 0 var(--purple)}#gameGrid>.game-card.game-drop-after{box-shadow:0 7px 0 var(--purple)}}
