/* Existing admin palette, with a calmer resource-management density. */
:root{--game-ink:#26384d;--game-muted:#62748a;--game-line:#e2e8f0;--game-surface:#f5f7fb;--scroll-thumb:#a7b4c5;--scroll-track:#f0f3f8}
html{scrollbar-color:var(--scroll-thumb) var(--scroll-track);scrollbar-width:thin}
*::-webkit-scrollbar{width:10px;height:10px}*::-webkit-scrollbar-track{background:var(--scroll-track)}*::-webkit-scrollbar-thumb{background:var(--scroll-thumb);border:2px solid var(--scroll-track);border-radius:8px}*::-webkit-scrollbar-thumb:hover{background:#7c8da4}*::-webkit-scrollbar-thumb:active{background:#62748a}
#sec-games .panel{padding:24px;background:transparent;box-shadow:none;border-radius:0}
#sec-games .games-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:22px}
#sec-games .games-heading h3{border:0;padding:0;margin:0 0 7px;font-size:21px;letter-spacing:-.4px;color:var(--game-ink)}
.games-heading p{font-size:13px;color:var(--game-muted);line-height:1.6}.games-total{font-size:13px;font-variant-numeric:tabular-nums;background:white;color:var(--game-muted);border:1px solid var(--game-line);border-radius:8px;padding:8px 12px;white-space:nowrap}
#sec-games .game-search{background:white;border:1px solid var(--game-line);border-radius:10px;padding:16px;gap:10px;margin:0}
#sec-games .game-search input{flex:1;min-width:200px;width:auto;height:38px;font-size:13px}#sec-games .game-search select{width:170px;height:38px;font-size:13px}#sec-games .game-search .btn{height:38px;padding:0 16px;font-size:13px}
.games-operations{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:18px 0 0}.games-operations-label{font-size:13px;font-weight:600;color:var(--game-muted);margin-right:4px}.games-create{margin-left:auto}#sec-games .games-operations .btn{padding:8px 12px;font-size:12px}
#sec-games .games-operations .btn-warning,#sec-games .games-operations .btn-info{background:white;border:1px solid var(--game-line);color:var(--game-ink)}#sec-games .games-operations .btn:hover{border-color:var(--primary);color:var(--primary)}#sec-games .games-create:hover{color:#fff}
.games-list-message{min-height:26px;padding-top:5px;font-size:12px;color:var(--game-muted)}
#gameList{grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr));gap:16px}
#gameList .game-card{position:relative;background:#fff;border:1px solid var(--game-line);border-radius:12px;padding:20px;min-height:220px;box-shadow:0 2px 5px rgba(35,52,80,.025);transition:border-color .15s,box-shadow .15s}
#gameList .game-card:hover{border-color:#bac8dd;box-shadow:0 4px 16px rgba(35,52,80,.06)}
.game-card-title{height:76px;flex:none;min-width:0}#gameList .game-card .gn{min-height:0;max-height:44px;font-size:15px;line-height:22px;color:var(--game-ink);font-weight:650;letter-spacing:.05px}
.game-card-english{font-size:12px;line-height:18px;color:var(--game-muted);margin-top:5px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
#gameList .game-card .gi{display:flex;align-items:center;gap:8px;margin:0 0 15px;min-height:19px;color:var(--game-ink)}.game-appid-label{font-size:10px;letter-spacing:1px;color:var(--game-muted);font-weight:600}.gi code{font-family:Consolas,Monaco,monospace;font-size:12px}.game-price{margin-left:auto;color:var(--game-muted);font-size:12px}
.game-resource-row{display:grid;grid-template-columns:34px minmax(0,1fr);gap:8px;align-items:start;margin-bottom:12px}.game-resource-label{font-size:12px;line-height:20px;color:var(--game-muted)}
#gameList .game-ticket-state,#gameList .game-manifest-state{display:flex;align-items:flex-start;flex-wrap:wrap;gap:5px;margin:0;min-height:20px}
#gameList .badge{font-size:11px;line-height:17px;padding:1px 8px;border-radius:5px;min-height:19px}
.game-resource-row:last-child{margin-bottom:0}
.game-card-trigger{position:absolute;inset:0;z-index:1;border:0;border-radius:inherit;background:transparent;cursor:pointer}
.game-card .game-status-hint{position:relative;z-index:2}
.game-status-hint{position:relative;cursor:help;outline-offset:3px}.game-status-hint:focus-visible{outline:2px solid var(--primary)}
.game-status-tooltip{position:absolute;left:0;top:calc(100% + 7px);z-index:7;visibility:hidden;opacity:0;pointer-events:none;display:block;width:max-content;max-width:210px;white-space:normal;background:#26384d;color:white;padding:7px 10px;border-radius:6px;font-size:11px;font-weight:400;line-height:1.6;box-shadow:0 4px 12px #26384d26;font-variant-numeric:tabular-nums}
.game-status-hint:hover .game-status-tooltip,.game-status-hint:focus .game-status-tooltip{visibility:visible;opacity:1}
.game-btn-neutral{background:white!important;border:1px solid var(--game-line)!important;color:var(--game-ink)!important}.game-btn-neutral:hover{background:#f0f4fb!important;border-color:#bbc9de!important}.game-btn-danger{background:#b83d35;color:white}.game-btn-danger:hover{background:#982c26}.game-text-button{background:none;border:0;color:var(--primary);font-size:inherit;cursor:pointer;text-decoration:underline}
:is(#sec-games,.game-editor,.game-action-dialog) button:not(:disabled):active{filter:brightness(.95)}
.game-editor,.game-action-dialog{margin:auto;border:1px solid var(--game-line);border-radius:14px;background:white;color:var(--game-ink);box-shadow:0 24px 80px #17284233;font-family:inherit}
.game-editor::backdrop,.game-action-dialog::backdrop{background:rgba(21,34,53,.5)}
.game-editor{width:min(960px,calc(100vw - 48px));max-width:960px;max-height:calc(100dvh - 48px);padding:0;overflow:hidden}.game-editor[open]{display:flex;flex-direction:column}
.game-editor-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:23px 28px 20px;flex:none}.game-editor-heading h3{font-size:20px;margin:0 0 7px}.game-editor-heading p{font-size:12px;color:var(--game-muted);line-height:1.5;overflow-wrap:anywhere}.game-icon-button{background:#f3f6fa;color:var(--game-muted);border:0;border-radius:8px;font-size:24px;line-height:32px;min-width:36px;align-self:flex-start;cursor:pointer}.game-icon-button:hover{background:#e4ebf5;color:var(--game-ink)}
.game-editor-tabs{display:flex;gap:24px;padding:0 28px;border-bottom:1px solid var(--game-line);flex:none}.game-editor-tabs button{font-family:inherit;font-size:14px;background:none;border:0;border-bottom:3px solid transparent;color:var(--game-muted);padding:13px 0;cursor:pointer}.game-editor-tabs button[aria-selected=true]{border-bottom-color:var(--primary);color:var(--primary);font-weight:600}.game-editor-tabs button:hover{color:var(--primary)}
.game-editor-panel{display:flex;flex-direction:column;min-height:0;flex:1}.game-editor-panel[hidden]{display:none}.game-editor-body{padding:24px 28px;overflow:auto;min-height:0;overscroll-behavior:contain;scrollbar-gutter:stable;flex:1}
.game-field{margin-bottom:22px}.game-field label{font-size:13px;font-weight:600;display:block;margin-bottom:8px}.game-field input{width:100%;padding:11px 12px;border:1px solid #cfd8e5;border-radius:7px;color:var(--game-ink);font:14px inherit;font-family:inherit;min-height:42px}.game-field input:focus{border-color:var(--primary);outline:2px solid #4e73df24}.game-field p{font-size:12px;line-height:1.6;margin-top:7px;color:var(--game-muted)}#editGameAppid{max-width:280px;font-family:Consolas,Monaco,monospace}
.game-content-notice{font-size:12px;color:#395b91;line-height:1.7;background:#f0f4fc;border:1px solid #dce6f6;padding:11px 13px;border-radius:7px;margin-bottom:20px}
.game-content-tools{display:flex;justify-content:space-between;align-items:center;gap:12px}.game-content-tools label{font-size:13px;font-weight:600}.game-content-status{font-size:12px;color:var(--game-muted);min-height:25px;padding:5px 0}
.game-content-tools,.game-resource-actions{flex-wrap:wrap}
.game-resource-actions{display:flex;align-items:center;gap:8px}
.game-resource-actions .btn{white-space:nowrap}
#editorManifestTask{font-size:12px;color:var(--game-muted);line-height:1.6;overflow-wrap:anywhere}
#editorManifestTask:empty{display:none}
.game-resource-dialog{margin:auto;width:min(480px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:0;border:0;border-radius:14px;background:#fff;color:var(--game-ink);overflow:auto}
.game-resource-dialog::backdrop{background:rgba(21,34,53,.4)}
.game-resource-dialog .modal{margin:0;width:100%;max-width:none;box-shadow:none}
.game-editor-footer{flex-wrap:wrap}
.game-content-text{display:block;width:100%;height:300px;min-height:180px;max-height:50dvh;resize:none;background:#f8faff;border:1px solid #cfd8e5;border-radius:8px;padding:16px;font:13px/1.8 Consolas,Monaco,monospace;color:#2f4767;tab-size:2;overflow:auto;scrollbar-gutter:stable;white-space:pre-wrap;overflow-wrap:anywhere}.game-content-text:focus{outline:2px solid #4e73df33;border-color:var(--primary)}.game-content-text:disabled{background:#f1f4f8;color:var(--game-muted)}.game-content-text[aria-invalid=true]{border-color:#b83d35}
.game-content-meta{display:flex;justify-content:space-between;gap:12px;margin-top:10px;font-size:11px;color:var(--game-muted);line-height:1.7}.game-content-meta span:last-child{white-space:nowrap;font-variant-numeric:tabular-nums}.game-content-error{min-height:30px;display:flex;gap:12px;align-items:center;flex-wrap:wrap}.game-inline-error{font-size:12px;line-height:1.6;color:#ad342e;min-height:20px;padding-top:6px}.game-editor [hidden]{display:none!important}
.game-editor-footer{display:flex;align-items:center;gap:10px;background:#fafbfd;border-top:1px solid var(--game-line);padding:16px 28px;flex:none}.game-editor-footer>span{margin-right:auto;font-size:12px;color:var(--game-muted)}.game-editor-footer>span.game-dirty{color:#9c6512}.game-editor-footer .btn{min-width:90px;min-height:38px}.game-editor button:disabled{cursor:not-allowed;opacity:.5}.game-editor input:disabled{background:#f1f4f8}
.game-action-dialog{padding:26px;width:min(460px,calc(100vw - 32px))}.game-action-dialog h3{font-size:18px;margin-bottom:12px}.game-action-dialog p{font-size:13px;line-height:1.8;color:var(--game-muted);white-space:pre-wrap;overflow-wrap:anywhere}#gameActionButtons{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-top:24px}#gameActionButtons .btn{font-size:13px;padding:9px 13px}
:is(#sec-games,.game-editor,.game-action-dialog) :is(button,input,select,textarea):focus-visible{outline:3px solid #4e73df66;outline-offset:3px}
@media(max-width:900px){#sec-games .panel{padding:0}#sec-games .game-search input{flex-basis:100%}#sec-games .game-search select{flex:1;min-width:130px;width:auto}}
@media(max-width:600px){#sec-games .games-heading{align-items:flex-start;gap:8px}.games-heading p{max-width:220px;font-size:12px}#sec-games .games-heading h3{font-size:19px}.games-total{padding:7px 8px;font-size:11px}.games-operations{gap:8px}.games-operations-label{display:none}#sec-games .games-operations .btn{font-size:11px;padding:9px}.games-create{margin-left:auto}#gameList .game-card{padding:18px}.game-editor{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border:0;border-radius:0}.game-editor-heading{padding:19px 18px 16px}.game-editor-tabs{padding:0 18px;gap:24px}.game-editor-body{padding:18px}.game-content-notice{margin-bottom:16px}.game-content-text{height:34dvh;max-height:none;min-height:160px}.game-content-meta{flex-direction:column;gap:2px}.game-editor-footer{padding:13px 16px;gap:8px}.game-editor-footer>span{font-size:11px;max-width:85px}.game-editor-footer .btn{padding:9px 12px;font-size:12px;min-width:64px}.game-action-dialog{padding:22px}}
@media(prefers-reduced-motion:reduce){#gameList .game-card{transition:none}}
@media(forced-colors:active){html{scrollbar-color:auto}*::-webkit-scrollbar-thumb{background:ButtonText}.game-editor-tabs button[aria-selected=true]{border-color:Highlight}.game-resource-row .badge{border:1px solid CanvasText}}
