:root{--bg:#0b0e19;--panel:#121627;--panel2:#181d31;--line:#262c45;--text:#eceefa;--muted:#8d95b3;--accent:#8b78ff;--accent2:#6b5cf2;--ok:#5ed6a8;--bad:#f27a92;--warn:#efbd72;--radius:12px}
*{box-sizing:border-box}html{color-scheme:dark}body{margin:0;background:var(--bg);color:var(--text);font:15px/1.55 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}
a{color:var(--accent)}a:hover{color:#b3a8ff}h1{font-size:1.6rem;margin:.2rem 0 1rem}h2{font-size:1.15rem;margin:1.6rem 0 .6rem}h3{font-size:1rem;margin:0 0 .3rem}
.top{display:flex;align-items:center;gap:1rem;padding:.7rem 1.4rem;border-bottom:1px solid var(--line);background:#0e1220;position:sticky;top:0;z-index:5}
.brand{display:flex;align-items:center;gap:.55rem;font-weight:800;letter-spacing:.06em;color:var(--text);text-decoration:none}.brand img{width:30px;height:30px;border-radius:50%}
.top nav{margin-left:auto;display:flex;gap:1rem;align-items:center}.top nav a{color:var(--muted);text-decoration:none}.top nav a:hover{color:var(--text)}
main{max-width:1100px;margin:0 auto;padding:1.4rem}
.layout{display:grid;grid-template-columns:220px 1fr;gap:1.6rem}@media(max-width:800px){.layout{grid-template-columns:1fr}}
.side{display:flex;flex-direction:column;gap:.15rem}.side a{padding:.45rem .7rem;border-radius:8px;color:var(--muted);text-decoration:none}.side a:hover,.side a.on{background:var(--panel2);color:var(--text)}
.side .head{display:flex;gap:.6rem;align-items:center;margin-bottom:.8rem;font-weight:700}.icon{width:40px;height:40px;border-radius:50%;background:var(--panel2);display:inline-grid;place-items:center;font-weight:700;flex:none;object-fit:cover}
.card{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:1.1rem 1.2rem;margin-bottom:1rem}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:.9rem}
.module{display:flex;flex-direction:column;gap:.4rem}.module p{color:var(--muted);margin:0;flex:1;font-size:.92rem}.module .row{display:flex;justify-content:space-between;align-items:center}
.stats{display:flex;gap:.9rem;flex-wrap:wrap}.stat{flex:1;min-width:150px}.stat b{font-size:1.6rem;display:block}
.muted{color:var(--muted)}.small{font-size:.86rem}
.notice{background:#173328;border:1px solid #2d6b52;color:#bff0dc;padding:.6rem .9rem;border-radius:10px;margin-bottom:1rem}
.error{background:#3a1823;border:1px solid #7a3048;color:#ffd0da;padding:.6rem .9rem;border-radius:10px;margin-bottom:1rem}
.field-error{color:var(--bad);font-size:.86rem;margin-top:.2rem}
label{display:block;font-weight:600;margin:.9rem 0 .3rem}.help{color:var(--muted);font-size:.85rem;font-weight:400;margin-top:.15rem}
input[type=text],input[type=number],input[type=search],select,textarea{width:100%;background:#0c1020;color:var(--text);border:1px solid var(--line);border-radius:9px;padding:.55rem .7rem;font:inherit}
textarea{min-height:5.5rem;resize:vertical}select[multiple]{min-height:9rem}input:focus,select:focus,textarea:focus{outline:2px solid var(--accent2);border-color:transparent}
input[type=color]{width:4rem;height:2.4rem;border:1px solid var(--line);background:#0c1020;border-radius:8px}
.check{display:flex;gap:.5rem;align-items:center;font-weight:600;margin:.9rem 0}.check input{width:1.1rem;height:1.1rem;accent-color:var(--accent)}
button,.button{display:inline-block;background:var(--accent2);color:#fff;border:0;border-radius:9px;padding:.55rem 1rem;font:inherit;font-weight:600;cursor:pointer;text-decoration:none;text-align:center;box-sizing:border-box}
button:hover,.button:hover{background:var(--accent);color:#fff}button.secondary,.button.secondary{background:var(--panel2);border:1px solid var(--line)}button.danger{background:#a83552}button.link{background:none;padding:0;color:var(--accent);font-weight:400}
button:disabled{opacity:.6;cursor:wait}.actions{display:flex;gap:.6rem;flex-wrap:wrap;margin-top:1.1rem;align-items:center}form.inline{display:inline}
table{width:100%;border-collapse:collapse;font-size:.92rem}th,td{text-align:left;padding:.5rem .55rem;border-bottom:1px solid var(--line);vertical-align:top}th{color:var(--muted);font-weight:600}
.pill{display:inline-block;padding:.08rem .55rem;border-radius:99px;font-size:.78rem;font-weight:700;background:var(--panel2);border:1px solid var(--line)}.pill.on{background:#16392c;border-color:#2d6b52;color:#9ff0cf}.pill.off{color:var(--muted)}
.pill.done{color:var(--ok)}.pill.failed{color:var(--bad)}.pill.queued,.pill.running{color:var(--warn)}
.hero{max-width:440px;margin:4rem auto;text-align:center}.hero img{width:120px;height:120px;border-radius:50%;box-shadow:0 0 60px #6b5cf255}.hero .card{text-align:left;margin-top:1.4rem}
.codes{font:1.05rem/1.9 ui-monospace,SFMono-Regular,Menlo,monospace;columns:2;background:#0c1020;padding:1rem;border-radius:10px;border:1px solid var(--line)}
.twocol{display:grid;grid-template-columns:1fr 1fr;gap:1rem}@media(max-width:700px){.twocol{grid-template-columns:1fr}}
code{background:#0c1020;padding:.1rem .35rem;border-radius:5px}
fieldset{border:0;padding:0;margin:0;min-width:0}.card>h2:first-child,.card>form>h2:first-child,form.card>h2:first-child,.card>label:first-of-type{margin-top:0}
.narrow{max-width:16rem}.wide{width:100%}.plain{text-decoration:none;color:inherit}.with-icon{display:flex;gap:.6rem;align-items:center}
@media(max-width:800px){main{padding:1rem}.top{padding:.6rem 1rem}.top nav{gap:.8rem;font-size:.9rem}.top nav a.user{display:none}
.side .head{display:none}}
.top nav a.account-short{display:none}@media(max-width:800px){.top nav a.account-short{display:inline}}
.status-now{display:flex;align-items:center;gap:.6rem;font-size:1.15rem;font-weight:700;margin:0 0 .3rem}
.dot{display:inline-block;width:.75rem;height:.75rem;border-radius:50%;flex:none;background:var(--line)}.status-now .dot{width:1rem;height:1rem}
.dot.green,.uptime .green{background:var(--ok)}.dot.orange,.uptime .orange{background:var(--warn)}.dot.red,.uptime .red{background:var(--bad)}.dot.none,.uptime .none{background:var(--line)}
.uptime{display:flex;gap:2px;height:2.4rem;margin-top:1rem}.uptime span{flex:1;min-width:0;border-radius:2px}.uptime span:hover{opacity:.75}
.uptime-axis{display:flex;justify-content:space-between;margin-top:.35rem}
.legend{display:flex;flex-wrap:wrap;gap:.4rem 1.1rem;margin-top:.9rem}.legend>span{display:inline-flex;align-items:center;gap:.4rem}
@media(max-width:600px){.uptime{gap:1px}}
.checks{display:flex;flex-wrap:wrap;gap:.2rem 1.2rem}.checks .check{margin:.35rem 0;font-weight:500}
.perm-groups{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:1rem}
.perm-groups legend{font-weight:700;margin-bottom:.2rem}.perm-groups .check{margin:.35rem 0;font-weight:500}
.perm-table td:not(:first-child),.perm-table th:not(:first-child){text-align:center;width:9rem}.perm-table input{width:1.1rem;height:1.1rem;accent-color:var(--accent)}
.layout>*{min-width:0}.card{overflow-x:auto}
.embed-box{border:1px solid var(--line);border-radius:10px;padding:.2rem .9rem .6rem;margin-top:1rem}.embed-box summary{cursor:pointer;font-weight:600;padding:.5rem 0}
.menu-row{display:grid;grid-template-columns:1.2fr 1fr .6fr 1.4fr;gap:.5rem;margin:.4rem 0}@media(max-width:700px){.menu-row{grid-template-columns:1fr 1fr}}
.question{border-top:1px solid var(--line);margin-top:.8rem}
.small-icon{width:28px;height:28px;font-size:.8rem}.board td{vertical-align:middle}.board-page{max-width:760px;margin:0 auto}
.upload-preview{display:block;max-width:260px;max-height:160px;margin-top:.8rem;border-radius:10px;border:1px solid var(--line)}
@media(max-width:800px){table{display:block;overflow-x:auto}}

/* The one menu: grouped features with an on/off dot; on phones it folds into "Menu". */
.side .menu{display:flex;flex-direction:column;gap:.1rem}.side .menu summary{display:none;cursor:pointer;padding:.55rem .7rem;border-radius:8px;background:var(--panel2);font-weight:700;list-style:none}
.side .menu summary::-webkit-details-marker{display:none}.side .menu summary::after{content:" ▾";color:var(--muted)}.side .menu[open] summary{margin-bottom:.3rem}
.side .section{font-size:.8rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#b3bbd8;margin:1rem .7rem .3rem}
.side a{display:flex;align-items:center;justify-content:space-between;gap:.5rem}.side a .dot{width:.5rem;height:.5rem}.side a .dot.none{background:transparent;border:1px solid var(--line)}
.feature-head{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;flex-wrap:wrap}.feature-head h1{margin-bottom:.25rem}.feature-head p{margin:0 0 1rem}
.switches{display:flex;gap:.5rem;flex-wrap:wrap}.switch{min-width:5.5rem;background:var(--panel2);color:var(--muted);border:1px solid var(--line)}.switch::before{content:"";display:inline-block;width:.55rem;height:.55rem;border-radius:50%;background:var(--line);margin-right:.45rem}
.switch.on{background:#16392c;border-color:#2d6b52;color:#9ff0cf}.switch.on::before{background:var(--ok)}
@media(max-width:800px){.side .menu summary{display:block}.side{border-bottom:1px solid var(--line);padding-bottom:.6rem}}
.tabs{display:flex;gap:.3rem;border-bottom:1px solid var(--line);margin:0 0 1.2rem;overflow-x:auto}.tabs a{padding:.55rem .9rem;color:var(--muted);text-decoration:none;border-bottom:2px solid transparent;white-space:nowrap}.tabs a:hover{color:var(--text)}.tabs a.on{color:var(--text);border-bottom-color:var(--accent)}
.row-actions{white-space:nowrap}.row-actions a+a{margin-left:.9rem}
.cooldowns input.seconds{max-width:7rem}
/* Names instead of IDs; member search boxes. */
.who{display:inline-flex;align-items:center;gap:.35rem}.tiny-icon{width:20px;height:20px}
.user-picker{position:relative}.picker-results{position:absolute;z-index:4;left:0;right:0;top:100%;margin:.2rem 0 0;padding:.25rem;list-style:none;background:var(--panel2);border:1px solid var(--line);border-radius:10px;max-height:18rem;overflow-y:auto;box-shadow:0 8px 24px #0008}
.picker-results li{display:flex;align-items:center;gap:.5rem;padding:.45rem .55rem;border-radius:7px;cursor:pointer}.picker-results li:hover,.picker-results li:focus{background:var(--panel);outline:none}
.picker-results img{width:24px;height:24px;border-radius:50%}.picker-results small{color:var(--muted)}.picker-results li.note{color:var(--muted);cursor:default}
.level-role{display:grid;grid-template-columns:7rem 1fr;gap:.5rem;margin-bottom:.4rem}
/* The menu stays in view and keeps its own scroll position between pages (nav.js). */
@media(min-width:801px){.side{position:sticky;top:4.6rem;align-self:start;max-height:calc(100vh - 5.6rem);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding-right:.3rem}}
.menu-row{grid-template-columns:1.2fr 1fr .6fr 1.4fr auto}.level-role{grid-template-columns:7rem 1fr auto}
button.link.remove-row{color:var(--muted);font-size:1rem;padding:0 .4rem}button.link.remove-row:hover{color:var(--bad);background:none}.add-row{margin:.4rem 0 .2rem}
@media(max-width:700px){.menu-row{grid-template-columns:1fr 1fr}}

/* Features of a higher tier: a small crown with the tier number, and a popup when switched on. */
.crown{display:inline-flex;align-items:center;gap:.15rem;font-size:.72rem;font-weight:700;color:#f3c969;background:#3a2f12;border:1px solid #6b5520;border-radius:99px;padding:0 .4rem;line-height:1.5;white-space:nowrap}
.switch .crown{margin-left:.35rem}
.tier-popup{position:fixed;inset:0;z-index:20;margin:0;padding:1rem;width:auto;height:auto;max-width:none;max-height:none;border:0;background:#05070dcc;display:grid;place-items:center}
.tier-popup .card{max-width:26rem;margin:0;box-shadow:0 16px 48px #000a}.tier-popup:not([open]){display:none}
/* Emoji pickers: the field is only shown without JavaScript. */
.emoji-picker{display:inline-flex;align-items:center}.emoji-button{display:none;min-width:2.8rem;height:2.5rem;padding:0 .5rem;font-size:1.25rem;line-height:1}
.emoji-js .emoji-picker .emoji-value{display:none}.emoji-js .emoji-button{display:inline-flex;align-items:center;justify-content:center}
.emoji-img{width:1.4rem;height:1.4rem;object-fit:contain;vertical-align:middle}
.emoji-panel{position:absolute;z-index:30;width:min(22rem,calc(100vw - 16px));max-height:22rem;display:flex;flex-direction:column;background:var(--panel);border:1px solid var(--line);border-radius:12px;box-shadow:0 16px 40px #000a}
.emoji-panel[hidden]{display:none}.emoji-top{display:flex;gap:.5rem;align-items:center;padding:.6rem;border-bottom:1px solid var(--line)}.emoji-top input{flex:1}
.emoji-body{overflow-y:auto;padding:.3rem .6rem .6rem}.emoji-section{font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);margin:.6rem 0 .3rem}
.emoji-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(2.2rem,1fr));gap:.15rem}
.emoji-cell{background:none;border:0;padding:.25rem;font-size:1.35rem;line-height:1;border-radius:8px;cursor:pointer}.emoji-cell:hover,.emoji-cell:focus{background:var(--panel2)}.emoji-cell img{width:1.5rem;height:1.5rem;object-fit:contain}
.menu-row .emoji-picker{width:100%}.menu-row .emoji-button{width:100%}
/* admin panel */
@media(max-width:800px){.admin-top{flex-wrap:wrap}.admin-top nav{margin-left:0;flex-wrap:wrap;gap:.3rem .9rem}}
.when{width:11rem}.nowrap{white-space:nowrap}.logtext{white-space:pre-wrap;overflow-wrap:anywhere}.logtext summary{cursor:pointer}.codes.one{columns:1}
.filters{display:flex;flex-wrap:wrap;gap:.2rem 1rem;align-items:end;margin-bottom:1rem}.filters label{margin:.3rem 0}.filters input,.filters select{width:auto;min-width:12rem}.filters .actions{margin:0}.filters .inline-check{display:flex;gap:.45rem;align-items:center;font-weight:400;padding-bottom:.55rem}.filters .inline-check input{min-width:0}
.tier-form{display:flex;flex-wrap:wrap;gap:.4rem;align-items:center}.tier-form select{width:auto}.tier-form input[type=number]{width:11rem}.tier-form input[type=text]{width:14rem}
.pill.kind-problem{color:var(--bad)}.pill.kind-errors{color:var(--warn)}.pill.kind-update,.pill.kind-backup{color:var(--ok)}.pill.kind-admin{color:var(--accent)}
.announcement{max-width:min(520px,calc(100vw - 2rem));background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:var(--radius);padding:1.2rem 1.3rem;box-shadow:0 20px 60px #0009}.announcement::backdrop{background:#05070dcc}.announcement h2{margin:0 0 .6rem}.announcement p{white-space:pre-line;margin:0}
