
:root{color-scheme:dark;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;--black:#000;--white:#fff;--soft:#111;--line:#4a4a4a;--quiet:#a9a9a9}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{min-height:100vh;margin:0;background:var(--black);color:var(--white);line-height:1.5}
button,input,select,textarea{font:inherit}
button,a{color:inherit}
button{cursor:pointer}
h1,h2,h3,p{margin-top:0}
h1,h2,h3{letter-spacing:-.025em;line-height:1.12}
.muted,.tiny,.page-description,.field small,.switch-row small,.activity-row small{color:var(--quiet);opacity:1}
.tiny{font-size:.75rem;line-height:1.5}
.centered{text-align:center}
.eyebrow{margin:0 0 .8rem;color:var(--quiet);font:700 .65rem/1.3 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.14em;text-transform:uppercase}

.login-shell{min-height:100vh;display:grid;place-items:center;padding:clamp(1rem,5vw,4rem)}
.login-card{position:relative;width:min(31rem,100%);padding:clamp(1.5rem,5vw,3rem);border:1px solid var(--line);border-top:8px solid var(--white);background:var(--black)}
.login-brand{display:flex;align-items:center;gap:.7rem;margin-bottom:3.5rem;text-decoration:none;font-weight:750;letter-spacing:-.02em}
.login-card h1{font-size:clamp(2.5rem,8vw,4.5rem);margin-bottom:1rem}
.login-card .muted{line-height:1.55;margin-bottom:1.5rem}
.discord-button{display:block;width:100%;padding:1rem;border:1px solid var(--white);background:var(--white);color:var(--black);text-align:center;text-decoration:none;font-weight:750}
.discord-button:hover,.discord-button:focus{background:var(--black);color:var(--white)}
.auth-message{padding:.8rem 1rem;border-left:4px solid var(--white);margin-bottom:1rem;background:var(--soft)}
.tiny a{text-decoration:underline}

.app-shell{display:grid;grid-template-columns:15rem minmax(0,1fr);min-height:100vh}
.sidebar{position:sticky;top:0;height:100vh;display:flex;flex-direction:column;padding:1.25rem;border-right:1px solid var(--line);background:var(--black)}
.logo{display:flex;align-items:center;gap:.65rem;padding:.25rem .5rem 2rem;color:var(--white);text-decoration:none;font-weight:700}
.brand-mark{display:grid;place-items:center;width:2rem;height:2rem;border:1px solid var(--white);background:var(--white);color:var(--black);font-weight:800;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
.brand-mark.small{width:1.5rem;height:1.5rem;font-size:.75rem}
.sidebar nav{display:grid}
.nav-item,.logout,.text-button,.configure,.icon-button{border:0;background:transparent;color:var(--white)}
.nav-item,.logout{width:100%;padding:.8rem .55rem;border-bottom:1px solid #222;text-align:left}
.nav-item span{display:inline-block;width:2rem;opacity:.6}
.nav-item:hover,.nav-item.active{background:var(--white);color:var(--black)}
.side-bottom{margin-top:auto}
.logout{border-top:1px solid var(--line);border-bottom:0}

.content{width:100%;max-width:96rem;padding:2rem clamp(1rem,4vw,3.5rem) 4rem}
.topbar{display:flex;align-items:end;justify-content:space-between;gap:1rem;padding-bottom:1.25rem;border-bottom:1px solid var(--line);margin-bottom:1.75rem}
.topbar h1{margin:0;font-size:clamp(1.65rem,3vw,2.3rem)}
.page-description{margin:.25rem 0 0;font-size:.8rem}
.server-picker{display:grid;gap:.35rem;font-size:.75rem}
.server-tools{display:flex;align-items:end;gap:1rem}.load-status{max-width:18rem;font-size:.72rem;opacity:.65;text-align:right}
input[type=search],.editor-fields input,.editor-fields textarea,.editor-fields select,.server-picker select{width:100%;padding:.7rem;border:1px solid var(--white);border-radius:0;outline:0;background:var(--black);color:var(--white)}
input:focus,textarea:focus,select:focus,button:focus-visible,a:focus-visible{outline:2px solid var(--white);outline-offset:2px}
button:disabled,input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;opacity:.45}
.hero-panel{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:clamp(1.25rem,3vw,2rem);border:1px solid var(--white);background:var(--white);color:var(--black)}
.hero-panel h2{margin-bottom:.35rem;font-size:clamp(1.35rem,3vw,2rem)}
.hero-panel p{margin:0;line-height:1.5}
.hero-panel .primary{background:var(--black);color:var(--white)}
.hero-panel .primary:hover{background:var(--white);color:var(--black)}
.primary,.secondary,#editor-save,.public-form button{padding:.7rem .9rem;border:1px solid var(--white);border-radius:0;background:var(--white);color:var(--black);font-weight:700}
.primary:hover,.secondary:hover,#editor-save:hover,.public-form button:hover{background:var(--black);color:var(--white)}
.stats{display:grid;grid-template-columns:repeat(3,1fr);border:1px solid var(--line);border-top:0;margin:0 0 2rem}
#booster-stats{grid-template-columns:repeat(4,1fr)}
.stat{padding:1.15rem;border-right:1px solid var(--line)}
.stat:last-child{border-right:0}
.stat strong,.stat small{display:block}
.stat strong{font-size:1.75rem;letter-spacing:-.04em}
.stat small{margin-top:.2rem;font-size:.7rem;text-transform:uppercase}
.section-head{display:flex;align-items:end;justify-content:space-between;margin:1.5rem 0 .85rem}
.section-head h2{margin:0;font-size:1rem}
.text-button,.configure{text-decoration:underline}
.toolbar{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding-bottom:1rem;border-bottom:1px solid var(--white);margin-bottom:1rem}
.toolbar input{max-width:22rem}
.filters{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.4rem}
.filter{padding:.5rem .65rem;border:1px solid var(--white);border-radius:0;background:var(--black);color:var(--white)}
.filter.active,.filter:hover{background:var(--white);color:var(--black)}
.module-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(17rem,1fr));gap:0;border-top:1px solid var(--white);border-left:1px solid var(--white)}
.module-card{min-height:11rem;display:flex;flex-direction:column;padding:1.15rem;border-right:1px solid var(--white);border-bottom:1px solid var(--white);background:var(--black)}
.module-card:hover{background:var(--soft)}
.module-card .category,.dialog-category{font-size:.65rem;text-transform:uppercase;text-decoration:underline}
.module-card h3{margin:.65rem 0 .4rem}
.module-card p{font-size:.8rem;line-height:1.5;opacity:.7}
.module-card footer{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin-top:auto;font-size:.75rem}
.status:before{content:"○ ";}.status.on:before{content:"● ";}
.compact .module-card:nth-child(n+9){display:none}
.notice{position:fixed;z-index:20;right:1rem;top:1rem;padding:.75rem;border:1px solid var(--white);background:var(--white);color:var(--black)}
.notice.error{background:var(--black);color:var(--white)}
.activity-list{border:1px solid var(--white)}
.activity-row{display:grid;grid-template-columns:1.2fr 1fr .8fr;gap:1rem;padding:1rem;border-bottom:1px solid var(--white);font-size:.8rem}
.activity-row:last-child{border-bottom:0}
.ops-layout{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;margin:1rem 0}.ops-panel{min-width:0;padding:1.15rem;border:1px solid var(--line);background:#050505}.ops-panel>h3{margin-bottom:.4rem}.ops-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem}.ops-form label{display:grid;gap:.3rem;font-size:.72rem}.ops-form .full{grid-column:1/-1}.ops-form input,.ops-form select,.ops-form textarea,.ops-filter select{width:100%;padding:.65rem;border:1px solid var(--white);background:var(--black);color:var(--white)}.ops-form textarea{min-height:5rem;resize:vertical}.ops-item{padding:.8rem;border-bottom:1px solid rgba(255,255,255,.5);font-size:.8rem}.ops-item:last-child{border-bottom:0}.ops-item header{display:flex;justify-content:space-between;gap:.5rem}.ops-item p{margin:.4rem 0;line-height:1.45}.ops-actions{display:flex;gap:.35rem;flex-wrap:wrap}.ops-actions button{padding:.35rem .5rem;border:1px solid var(--white);background:var(--black);color:var(--white);font-size:.7rem}.retention-panel{margin-top:1rem}.retention-panel table{width:100%;border-collapse:collapse;font-size:.75rem}.retention-panel th,.retention-panel td{padding:.65rem;border-bottom:1px solid rgba(255,255,255,.4);text-align:left;vertical-align:top}
.empty{padding:2rem;text-align:center;opacity:.65}

dialog{width:min(64rem,calc(100% - 2rem));max-height:90vh;padding:0;border:1px solid var(--white);border-radius:0;background:var(--black);color:var(--white)}
dialog::backdrop{background:#000}
.dialog-head{display:flex;align-items:start;justify-content:space-between;padding:1rem;border-bottom:1px solid var(--white)}
.dialog-head h2{margin:0}.icon-button{font-size:1.75rem}
.dialog-body{max-height:65vh;overflow:auto;padding:1rem}
.switch-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem;border:1px solid var(--white);margin:1rem 0}
.switch-row span strong,.switch-row span small{display:block}
.switch-row input{position:static;width:1.2rem;height:1.2rem;accent-color:var(--white)}
.switch-row i{display:none}
.editor-fields{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
.field{display:grid;grid-template-columns:minmax(0,1fr);min-width:0;gap:.4rem}.field.full{grid-column:1/-1}
.field textarea{min-height:8rem;resize:vertical;font-family:monospace}
.field select[multiple]{min-height:9rem}
.structured-field{padding:.75rem;border:1px solid rgba(255,255,255,.55)}
.structured-editor,.structured-node,.structured-children{display:grid;min-width:0;gap:.55rem}
.structured-node{padding:.65rem;border-left:2px solid rgba(255,255,255,.55)}
.structured-head{display:flex;align-items:center;justify-content:space-between;gap:.5rem}
.structured-head>strong{font-size:.72rem;text-transform:uppercase;overflow-wrap:anywhere}
.structured-kind{width:auto!important;min-width:7rem;padding:.4rem!important;font-size:.7rem}
.structured-children{padding-left:.35rem}
.structured-item,.structured-object-field{display:grid;grid-template-columns:minmax(0,1fr) auto;min-width:0;gap:.5rem;align-items:start;padding:.55rem;border:1px solid rgba(255,255,255,.35)}
.structured-object-field{grid-template-columns:minmax(7rem,.45fr) minmax(0,1.55fr) auto}
.structured-object-field>.structured-node,.structured-item>.structured-node{border-left:0;padding:0}
.structured-object-key,.structured-value{width:100%;min-width:0;padding:.6rem;border:1px solid var(--white);background:var(--black);color:var(--white)}
.structured-value{font-family:inherit!important}
.structured-value[multiple]{min-height:7rem}
.structured-actions{display:flex;flex-wrap:wrap;gap:.4rem}
.structured-actions button,.structured-remove{padding:.45rem .6rem;border:1px solid var(--white);background:var(--black);color:var(--white);font-size:.7rem}
.structured-empty{padding:.65rem;border:1px dashed rgba(255,255,255,.4);font-size:.72rem;opacity:.7}
.module-config-group{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem;min-width:0;margin:0;padding:1rem;border:1px solid rgba(255,255,255,.55)}
.module-config-group legend{padding:0 .4rem;font-size:.72rem;text-transform:uppercase}
.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border-top:1px solid var(--white);border-left:1px solid var(--white)}
.settings-grid .field{min-height:8rem;padding:1rem;border-right:1px solid var(--white);border-bottom:1px solid var(--white);align-content:start}
.settings-grid .field.full{grid-column:1/-1}
.field small{overflow-wrap:anywhere}.settings-grid .field small{line-height:1.45}
.settings-actions{display:flex;justify-content:flex-end;padding-top:1rem}
.language-hero{margin-bottom:1rem}.language-panel{display:grid;grid-template-columns:minmax(0,1fr) minmax(18rem,.8fr);gap:2rem}.language-form{display:grid;gap:1rem;align-content:start}.language-form .field{display:grid;gap:.45rem}.language-form input{width:100%;padding:.85rem;border:1px solid var(--white);background:var(--black);color:var(--white)}.language-form button{justify-self:start}.language-contract{border-left:1px solid var(--white);padding-left:2rem}.language-contract p{line-height:1.55}
.booster-toolbar{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1rem}.booster-toolbar .switch-row{flex:1;margin:0}.booster-actions{display:flex;gap:.5rem;flex-wrap:wrap}
.booster-layout{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.booster-group{border:1px solid var(--white);padding:1rem;align-content:start}.booster-group h3{margin-bottom:.25rem}.booster-group>p{font-size:.78rem;opacity:.65;line-height:1.45}.booster-group-fields{display:grid;grid-template-columns:1fr 1fr;gap:.8rem}.booster-group-fields .full{grid-column:1/-1}.collection{display:grid;min-width:0;gap:.5rem}.collection-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(8rem,1fr)) auto;min-width:0;gap:.5rem;align-items:end;padding:.65rem;border:1px solid rgba(255,255,255,.45)}.collection-row>*{min-width:0}.collection-row label{display:grid;gap:.3rem;font-size:.72rem}.collection-row input,.collection-row select,.collection-row textarea,.inline-form input,.inline-form select{width:100%;padding:.65rem;border:1px solid var(--white);background:var(--black);color:var(--white)}.collection-row textarea{resize:vertical}.collection-row select[multiple]{min-height:6rem}.remove-row{padding:.65rem;border:1px solid var(--white);background:var(--black)}.add-row{justify-self:start}.booster-records{margin-top:2rem}.inline-form{display:grid;grid-template-columns:minmax(12rem,2fr) minmax(7rem,1fr) auto;gap:.5rem;margin-bottom:1rem}.table-wrap{overflow:auto;border:1px solid var(--white)}.record-table{width:100%;border-collapse:collapse;font-size:.8rem}.record-table th,.record-table td{padding:.75rem;text-align:left;border-bottom:1px solid rgba(255,255,255,.4);white-space:nowrap}.record-table th{font-size:.68rem;text-transform:uppercase}.record-table tr:last-child td{border-bottom:0}
.dialog-actions{display:flex;justify-content:flex-end;gap:.5rem;padding:1rem;border-top:1px solid var(--white)}
.form-card{width:min(48rem,100%)}.public-form{margin-top:1.5rem}.option-list{display:grid;gap:.5rem}

@media(max-width:800px){.app-shell{display:block}.sidebar{position:static;height:auto;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;border-right:0;border-bottom:1px solid var(--white)}.sidebar nav{display:flex;overflow-x:auto}.side-bottom{margin:0}.logout{width:auto;border:0;padding:.75rem}.logo{padding:0}.logo span:last-child,.nav-item span{display:none}.nav-item{width:auto;white-space:nowrap;font-size:.75rem}.content{padding:1rem}.topbar,.toolbar,.booster-toolbar{align-items:stretch;flex-direction:column}.server-tools{align-items:stretch;justify-content:space-between}.load-status{text-align:left}.filters{justify-content:flex-start}.activity-row{grid-template-columns:minmax(0,1fr)}.booster-layout,.ops-layout,.language-panel{grid-template-columns:minmax(0,1fr)}.language-contract{border-left:0;border-top:1px solid var(--white);padding-left:0;padding-top:1.25rem}.booster-group{min-width:0}}
@media(max-width:520px){.login-card{padding:1.25rem}.hero-panel{display:block}.hero-panel .primary{width:100%;margin-top:1rem}.stats,#booster-stats{grid-template-columns:minmax(0,1fr)}.stat{border-right:0;border-bottom:1px solid var(--white)}.stat:last-child{border-right:0;border-bottom:0}.module-grid,.editor-fields,.settings-grid,.booster-group-fields,.collection-row,.ops-form,.structured-object-field,.module-config-group{grid-template-columns:minmax(0,1fr)}.settings-grid .field.full,.booster-group-fields .full,.ops-form .full{grid-column:auto}.inline-form{grid-template-columns:minmax(0,1fr)}.booster-actions{display:grid}.structured-children{padding-left:0}.structured-remove{justify-self:start}}
