.admin-body{background:#101216;min-height:100vh;color:#f4f5ef;font-family:'Portal',Arial,sans-serif}.admin-body button,.admin-body input,.admin-body textarea,.admin-body select{font:inherit}.admin-body button{cursor:pointer}.admin-body [hidden]{display:none!important}.admin-body input,.admin-body textarea,.admin-body select{width:100%;background:#111418;border:1px solid #34383e;color:#f4f5ef;border-radius:9px;padding:13px 14px;outline:none;min-width:0;transition:border-color .2s}.admin-body input:focus,.admin-body textarea:focus,.admin-body select:focus{border-color:#c8ff5d;box-shadow:0 0 0 3px #c8ff5d15}.admin-body input:read-only{color:#8d949c;background:#171a1f}.admin-body textarea{resize:vertical;line-height:1.5}.admin-body label{display:flex;flex-direction:column;gap:8px;font-size:13px;font-weight:600;color:#e6e9e0}.admin-body label small,.upload-hint{font-size:11px;font-weight:400;line-height:1.5;color:#9299a2}.admin-body .eyebrow{font-size:10px;letter-spacing:2px;color:#a4ad9d;margin:0 0 14px}.admin-primary,.admin-secondary{display:inline-flex;align-items:center;justify-content:center;gap:12px;min-height:45px;border-radius:9px;border:1px solid transparent;padding:12px 19px;font-weight:700!important;font-size:13px!important;text-decoration:none;white-space:nowrap}.admin-primary{background:#c8ff5d;color:#111710}.admin-primary:hover{background:#d9ff94}.admin-secondary{background:#22272e;color:#f0f3eb;border-color:#3a4048}.admin-secondary:hover{border-color:#c8ff5d}.admin-body button:disabled{opacity:.5;cursor:wait}.icon-button{display:grid;place-items:center;background:#23272c;border:1px solid #34393f;border-radius:8px;color:#dce2d5;width:36px;height:36px;font-size:24px!important;flex-shrink:0}.boot-state{display:grid;place-items:center;height:100vh;color:#aeb7a4}.auth-view{min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;background:radial-gradient(ellipse at 30% 0,#c8ff5d0e,transparent 55%),#101216}.auth-view>.brand{margin-bottom:35px}.auth-box{max-width:450px;width:100%;padding:36px;border:1px solid #343930;border-radius:20px;background:#171b1f;position:relative}.auth-spark{color:#c8ff5d;position:absolute;right:27px;top:25px;font-size:30px}.auth-box h1{font-size:32px;letter-spacing:-1px;line-height:1.1;margin:0 0 15px}.auth-box>p:not(.eyebrow){color:#a8aea5;font-size:13px;line-height:1.6}.auth-box form{display:grid;gap:18px;margin-top:26px}.auth-box .admin-primary{width:100%;justify-content:space-between}.password-field{position:relative;display:flex}.password-field input{padding-right:80px}.password-field button{position:absolute;right:7px;top:7px;bottom:7px;background:transparent;border:0;color:#c8ff5d;padding:0 9px;font-size:11px!important}.auth-note{font-size:11px!important;margin:22px 0 0}.quiet-link{font-size:12px;color:#a1aa97;margin-top:25px;text-decoration:none}.form-error{color:#ffad9d;font-size:12px;line-height:1.5;margin:0;max-width:520px;overflow-wrap:anywhere}.form-error:empty{display:none}.admin-sidebar{position:fixed;left:0;top:0;bottom:0;width:225px;padding:32px 22px;background:#15181c;border-right:1px solid #292d33;display:flex;flex-direction:column;z-index:5}.admin-sidebar .brand{font-size:26px}.admin-sidebar .brand-icon{width:30px;height:30px}.admin-label{font-size:8px;letter-spacing:2px;color:#6e777e;margin:18px 0 38px 2px}.admin-sidebar nav{display:grid;gap:8px}.admin-sidebar nav button,.admin-sidebar nav a{display:flex;align-items:center;gap:12px;color:#929a9f;background:transparent;border:0;text-decoration:none;text-align:left;font-size:12px;padding:13px 12px;border-radius:8px}.admin-sidebar nav button>span:first-of-type,.admin-sidebar nav a span{flex:1}.admin-sidebar nav .selected{background:#c8ff5d12;color:#c8ff5d;box-shadow:inset 2px 0 #c8ff5d}.admin-sidebar nav #sidebar-count{font-size:10px;border:1px solid #c8ff5d35;border-radius:5px;padding:2px 5px}.sidebar-bottom{margin-top:auto;border-top:1px solid #2d3237;padding-top:23px;display:flex;align-items:center;gap:9px}.account-dot{width:29px;height:29px;background:#c8ff5d18;border:1px solid #c8ff5d40;border-radius:50%;flex-shrink:0}.account-dot:after{content:'✦';color:#c8ff5d;display:grid;place-items:center;height:100%;font-size:13px}.sidebar-bottom strong{font-size:11px;display:block;overflow-wrap:anywhere;max-width:88px}.sidebar-bottom small{color:#7e888d;font-size:9px;display:block;margin-top:4px}.sidebar-bottom button{margin-left:auto;background:transparent;border:0;color:#9ea79b;font-size:10px!important}.admin-main{margin-left:225px;padding:0 40px 50px;max-width:1800px}.admin-topbar{height:76px;border-bottom:1px solid #292e33;display:flex;align-items:center;justify-content:space-between;font-size:9px;letter-spacing:1.5px;color:#7a858c}.breadcrumb{color:#626b72;margin-left:9px}.admin-topbar a{color:#c0c8ba;text-decoration:none;font-size:11px;letter-spacing:0}.admin-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:40px 0 30px}.admin-heading h1{font-size:clamp(26px,2.7vw,39px);letter-spacing:-1.4px;margin:0;line-height:1.15}.admin-heading h1 span{color:#c8ff5d}.admin-heading p:last-child{font-size:12px;line-height:1.6;color:#8e989f;margin:13px 0 0}.stats{display:grid;grid-template-columns:repeat(4,1fr);border:1px solid #30363b;border-radius:12px;background:#171b20;overflow:hidden;margin-bottom:38px}.stats>div{padding:21px 22px;border-right:1px solid #30363b}.stats>div:last-child{border:0}.stats>div>span{color:#8d989f;letter-spacing:1.2px;font-size:9px;display:flex;align-items:center;gap:7px}.stats strong{font-size:35px;display:block;margin:12px 0 8px;font-weight:650}.stats>div:nth-child(2) strong{color:#c8ff5d}.stats small{font-size:10px;color:#6f7c85}.status-dot{height:5px;width:5px;border-radius:50%;background:#c8ff5d;display:inline-block}.list-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px}.list-heading h2{font-size:19px;margin:0}.list-heading h2 span{font-size:10px;color:#879094;border:1px solid #343b40;border-radius:6px;padding:3px 7px;margin-left:6px;vertical-align:middle}.list-heading p{font-size:10px;color:#75828a;margin:9px 0 0;line-height:1.5}.admin-search{width:210px;flex-shrink:0}.admin-search input{font-size:11px!important;padding:11px 14px!important}.list-filters{display:flex;gap:8px;margin-bottom:18px}.list-filters button{background:transparent;border:1px solid transparent;color:#849099;border-radius:7px;padding:7px 13px;font-size:11px!important}.list-filters .active{color:#e3e9dc;background:#252b30;border-color:#3b4349}.admin-games{display:grid;gap:12px}.admin-game{display:grid;grid-template-columns:170px 1fr auto;align-items:center;gap:22px;padding:13px;background:#191e23;border:1px solid #30383e;border-radius:12px}.admin-game img{width:170px;aspect-ratio:1.7;object-fit:cover;border-radius:7px}.admin-game h3{margin:0 0 9px;font-size:19px;letter-spacing:-.4px}.admin-game .row-meta{display:flex;gap:8px;align-items:center;flex-wrap:wrap;font-size:10px;color:#86939c}.state-chip{display:inline-flex;align-items:center;font-size:9px;border:1px solid #49515a;border-radius:5px;padding:4px 7px;color:#a3adb3}.state-chip.live{color:#c8ff5d;background:#c8ff5d0c;border-color:#c8ff5d35}.state-chip.highlight{color:#f6cf80;border-color:#f6cf8030}.row-url{font-size:10px;color:#60717e;margin:12px 0 0;overflow-wrap:anywhere}.row-actions{display:flex;gap:8px;align-items:center;padding-right:10px}.row-actions button{background:#252c32;border:1px solid #3b444c;color:#c8d1d6;border-radius:7px;padding:9px 11px;font-size:11px!important}.row-actions button:first-child{color:#d9f2b9;border-color:#68804b55;background:#c8ff5d0a}.row-actions .row-toggle{color:#83929d;background:transparent;border-color:transparent;font-size:10px!important}.admin-tip{display:flex;align-items:center;gap:18px;border:1px dashed #3f4b3a;padding:21px 24px;border-radius:12px;margin-top:25px;background:linear-gradient(110deg,#c8ff5d06,transparent)}.admin-tip>span{color:#c8ff5d;font-size:32px}.admin-tip strong{font-size:12px;font-weight:600}.admin-tip p{font-size:10px;color:#7f8e98;margin:7px 0 0;line-height:1.7;max-width:640px}.admin-empty{text-align:center;padding:40px;color:#83919a;border:1px dashed #39424a;border-radius:12px}.admin-empty>span{font-size:30px;color:#c8ff5d}.admin-empty h3{font-size:18px;color:#cdd7ce}.admin-empty p{font-size:12px}.access-form{max-width:470px;display:grid;gap:23px;background:#181d22;border:1px solid #333c43;padding:28px;border-radius:14px}.access-form .admin-primary{margin-top:6px}#editor{width:min(1110px,calc(100% - 40px));max-width:1110px;max-height:calc(100dvh - 40px);padding:0;border:1px solid #424a44;border-radius:16px;background:#171c21;color:#f4f5ef}#editor::backdrop,.game-preview-dialog::backdrop{background:#05080cce;backdrop-filter:blur(5px)}#game-form{display:flex;flex-direction:column;max-height:calc(100dvh - 44px)}.editor-header{display:flex;align-items:center;justify-content:space-between;padding:23px 28px;border-bottom:1px solid #30383f;flex-shrink:0}.editor-header .eyebrow{font-size:8px;margin-bottom:7px}.editor-header h2{font-size:25px;letter-spacing:-.8px;margin:0}.editor-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,.8fr);overflow:auto;overscroll-behavior:contain}.editor-fields{padding:25px 28px}.editor-fields fieldset{display:grid;gap:19px;border:0;margin:0 0 30px;padding:0}.editor-fields legend{font-size:10px;color:#c8ff5d;border-bottom:1px solid #333b40;width:100%;padding-bottom:15px;margin-bottom:20px;letter-spacing:2px}.editor-fields legend span{font-size:14px;font-weight:600;color:#d9e0d5;letter-spacing:0;margin-left:7px}.field-row{display:grid;grid-template-columns:1fr 1fr;gap:17px}.slug-field{display:flex;align-items:center;background:#111418;border:1px solid #34383e;border-radius:9px;overflow:hidden}.slug-field>span{padding-left:13px;font-size:12px;color:#798b95}.slug-field input{border:0!important;box-shadow:none!important;padding-left:4px}.optional{font-size:9px;color:#7d8c96;font-weight:400}.check-label{flex-direction:row!important;align-items:center;background:#c8ff5d06;border:1px solid #374337;border-radius:9px;padding:12px;gap:10px!important;align-self:start}.check-label input{width:16px;height:16px;accent-color:#c8ff5d;flex-shrink:0}.check-label strong{font-size:11px}.check-label small{display:block;margin-top:5px;font-size:10px!important}.editor-preview{padding:28px 24px;background:#10151a;border-left:1px solid #2b343b}.editor-preview>.eyebrow{text-align:center;font-size:8px}.editor-preview .game-card{max-width:460px}.editor-preview .game-content{padding:20px}.editor-preview .game-title-row{flex-wrap:wrap;gap:8px}.editor-preview .game-title-row h3{font-size:27px}.editor-preview .game-number{font-size:8px}.editor-preview .game-content>p{font-size:12px;line-height:1.7;min-height:0;margin:14px 0 17px}.editor-preview .game-tags{font-size:9px;gap:5px}.editor-preview .game-tags>span{padding:5px 8px}.editor-preview .card-actions{margin-top:22px}.editor-preview .play-button{font-size:12px;height:45px}.editor-preview .info-button{width:44px;height:45px}.preview-note{text-align:center;font-size:10px;line-height:1.7;color:#6e8290;margin:16px 0}.editor-preview .admin-secondary{width:100%;margin-top:7px}.editor-footer{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:18px 26px;border-top:1px solid #344039;background:#1c2327;flex-shrink:0}.editor-footer .form-error{margin-top:6px;max-width:440px}.editor-save-actions{display:flex;gap:10px;flex-shrink:0}.muted{color:#93a48a;font-size:10px;margin:0}.game-preview-dialog{padding:0;width:95vw;max-width:1300px;height:85dvh;background:#11161c;border:1px solid #3a454d;border-radius:12px;color:#f4f5ef}.game-preview-dialog header{height:60px;display:flex;align-items:center;justify-content:space-between;padding:0 20px}.game-preview-dialog h2{font-size:16px}#preview-frame{height:calc(100% - 60px)}#preview-frame iframe{width:100%;height:100%;border:0;background:#101216}
@media(min-width:1500px){.admin-main{padding-left:65px;padding-right:65px}.admin-game{grid-template-columns:205px 1fr auto}.admin-game img{width:205px}.admin-heading{margin-top:50px}}
@media(max-width:1100px){.admin-sidebar{width:190px;padding:26px 16px}.admin-main{margin-left:190px;padding:0 25px 40px}.admin-game{grid-template-columns:125px 1fr;gap:16px}.admin-game img{width:125px}.row-actions{grid-column:2;padding:0}.stats>div{padding:18px 16px}.admin-heading{align-items:flex-start}.admin-heading .admin-primary{font-size:11px!important;padding:11px 14px}.editor-layout{grid-template-columns:1.1fr .9fr}}
@media(max-width:760px){.admin-sidebar{position:relative;width:100%;height:auto;padding:17px 20px;border-right:0;border-bottom:1px solid #30383e;display:flex;flex-direction:row;align-items:center;gap:22px;flex-wrap:wrap}.admin-sidebar .brand{font-size:23px}.admin-label,.sidebar-bottom{display:none}.admin-sidebar nav{display:flex;gap:5px;margin-left:auto}.admin-sidebar nav button,.admin-sidebar nav a{padding:9px;font-size:10px}.admin-sidebar nav a{display:none}.admin-sidebar nav #sidebar-count{display:none}.admin-main{margin:0;padding:0 20px 35px}.admin-topbar{height:48px}.admin-heading{margin:28px 0 24px;flex-wrap:wrap;gap:18px}.admin-heading h1{font-size:30px}.admin-heading .eyebrow{font-size:8px}.stats{grid-template-columns:repeat(2,1fr);margin-bottom:27px}.stats>div:nth-child(2){border-right:0}.stats>div:nth-child(-n+2){border-bottom:1px solid #30363b}.stats strong{font-size:30px;margin:10px 0 7px}.stats>div{padding:17px}.list-heading{align-items:flex-start;flex-wrap:wrap}.admin-search{width:100%}.admin-game{grid-template-columns:90px 1fr;padding:11px;gap:13px}.admin-game img{width:90px}.admin-game h3{font-size:16px}.row-meta{gap:5px!important}.row-url{margin-top:7px;font-size:9px}.row-actions{grid-column:1/-1;justify-content:flex-end;border-top:1px solid #2e3942;padding-top:11px}.row-actions button{flex:1}.admin-tip{padding:18px;align-items:flex-start}.admin-tip p{font-size:10px}.admin-topbar #mobile-logout{border:0;background:transparent;color:#9eadb5;font-size:11px}#editor{width:100%;height:100dvh;max-height:100dvh;border-radius:0;margin:0;max-width:none}#game-form{max-height:100dvh;height:100dvh}.editor-header{padding:18px 20px}.editor-header h2{font-size:23px}.editor-layout{display:block}.editor-fields{padding:23px 20px}.editor-preview{padding:24px 20px;border-left:0;border-top:1px solid #303c43}.editor-preview .game-card{margin:auto;max-width:400px}.editor-footer{padding:13px 16px;align-items:flex-start;flex-direction:column;gap:8px}.editor-footer>div:first-child:has(.form-error:empty){display:none}.editor-save-actions{width:100%}.editor-save-actions>button{flex:1;padding:11px 10px;font-size:11px!important}.auth-box{padding:29px 25px}.auth-box h1{font-size:29px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
#mobile-logout{border:1px solid #374148;border-radius:6px;padding:7px 12px;background:#1c242b;color:#a4b2bd;font-size:10px}
.admin-sidebar nav{height:auto}.admin-topbar>a{margin-left:auto;margin-right:22px}.admin-game .row-url{color:#8898a4}.stats small{color:#94a1aa}.list-heading p{color:#98a6af}.admin-tip p{color:#99a7b1}.preview-note{color:#91a3b1}
@media(min-width:761px){.editor-preview{position:sticky;top:0;align-self:start}.admin-body .admin-topbar{gap:0}}
@media(max-width:500px){.field-row{grid-template-columns:1fr}.editor-preview{position:static}}

/* One scroll container for the entire editor, including short notebook screens. */
#editor{overflow-x:hidden;overflow-y:auto;scrollbar-gutter:stable;overscroll-behavior:contain;scroll-padding-top:110px;scroll-padding-bottom:100px}
#game-form{display:block;height:auto;max-height:none;min-height:0}
.editor-layout{overflow:visible;min-height:0}
.editor-header{position:sticky;top:0;z-index:3;background:#171c21}
.editor-footer{position:sticky;bottom:0;z-index:3}
.editor-preview{position:static;align-self:start}
#editor::-webkit-scrollbar{width:9px}
#editor::-webkit-scrollbar-track{background:#13191d}
#editor::-webkit-scrollbar-thumb{background:#657458;border:2px solid #13191d;border-radius:8px}
@media(max-width:760px){#editor{height:100dvh;max-height:100dvh}#game-form{height:auto;max-height:none}.editor-footer{padding-bottom:max(13px,env(safe-area-inset-bottom))}}
html:has(#editor[open]),body:has(#editor[open]){overflow:hidden;overscroll-behavior:none}
