/* DRAVILON bot panel – subdued gold on black */
@font-face { font-family: 'DV'; src: url('fonts/Poppins-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'DV'; src: url('fonts/Poppins-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'DV'; src: url('fonts/Poppins-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'DV'; src: url('fonts/Poppins-Light.ttf') format('truetype'); font-weight: 300; font-display: swap; }

:root {
  --bg: #0b0a08; --bg2: #100e0b; --panel: #131109; --card: #17140f; --card2: #1c1912; --field: #0f0d0a;
  --line: rgba(201, 169, 97, .13); --line2: rgba(201, 169, 97, .24); --line3: rgba(236, 230, 216, .07);
  --gold: #c9a961; --gold2: #e3cb8f; --gold-dim: #8f7744; --gold-bg: rgba(201, 169, 97, .09);
  --text: #ece6d8; --text2: #c8bfac; --muted: #8f8571; --faint: #5f584a;
  --ok: #6dbb78; --warn: #e0a33a; --bad: #df5d55; --info: #6f9bf0;
  --r: 12px; --r2: 8px; --shadow: 0 12px 40px rgba(0, 0, 0, .45);
  --side: 264px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 400 14px/1.55 'DV', system-ui, -apple-system, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--gold2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(201, 169, 97, .35); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2a251b; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }
.noscript { padding: 40px; text-align: center; }

/* ---------- boot / gate ---------- */
.boot { height: 100vh; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--muted); letter-spacing: .08em; font-size: 12px; text-transform: uppercase; }
.boot img { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; transform: scale(.96); } }
body.gate, .gate-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(900px 500px at 15% -10%, rgba(201, 169, 97, .10), transparent 60%), radial-gradient(700px 400px at 100% 110%, rgba(201, 169, 97, .06), transparent 60%), var(--bg); }
.gate-card { width: min(440px, 100%); background: linear-gradient(180deg, var(--card), var(--panel)); border: 1px solid var(--line2); border-radius: 18px; padding: 38px 34px 32px; text-align: center; box-shadow: var(--shadow); position: relative; }
.gate-card::before, .gate-card::after { content: ''; position: absolute; width: 22px; height: 22px; border: 2px solid var(--gold); }
.gate-card::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; border-top-left-radius: 18px; }
.gate-card::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; border-bottom-right-radius: 18px; }
.gate-logo { margin: 0 auto 18px; }
.gate-card h1 { font-size: 21px; font-weight: 600; margin: 0 0 8px; letter-spacing: .01em; }
.gate-card p { color: var(--text2); margin: 0 0 24px; }
.gate-card .eyebrow { margin-bottom: 10px; }
.gate-card .btn { width: 100%; justify-content: center; padding: 12px 16px; }
.gate-foot { margin-top: 18px; font-size: 12px; color: var(--faint); }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--bg2); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 12px; padding: 20px 20px 16px; }
.brand b { display: block; font-weight: 700; letter-spacing: .14em; font-size: 14px; }
.brand small { display: block; color: var(--muted); font-size: 11.5px; letter-spacing: .04em; }
.guild { margin: 0 14px 10px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.guild img, .guild .gi { width: 34px; height: 34px; border-radius: 10px; background: #221d14; flex: none; display: grid; place-items: center; font-weight: 700; color: var(--gold); }
.guild b { display: block; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guild small { color: var(--muted); font-size: 11.5px; }
.guild > div { min-width: 0; }
.nav { padding: 6px 10px 20px; flex: 1; }
.nav h6 { margin: 16px 12px 6px; font-size: 10.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .16em; color: var(--faint); }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 9px; color: var(--text2); font-size: 13.5px; position: relative; text-decoration: none; transition: background .15s, color .15s; }
.nav a .ic { width: 22px; text-align: center; font-size: 15px; filter: saturate(.75); }
.nav a:hover { background: rgba(236, 230, 216, .04); color: var(--text); }
.nav a.on { background: var(--gold-bg); color: var(--gold2); }
.nav a.on::before { content: ''; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--gold); }
.side-foot { padding: 14px 20px 18px; border-top: 1px solid var(--line3); font-size: 11.5px; color: var(--faint); display: flex; justify-content: space-between; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 14px 32px; background: rgba(11, 10, 8, .86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line3); }
.top .burger { display: none; }
.crumb { flex: 1; min-width: 0; }
.crumb small { display: block; color: var(--faint); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.crumb b { font-size: 17px; font-weight: 600; }
.me { display: flex; align-items: center; gap: 10px; padding: 5px 6px 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.me img, .me .av { width: 30px; height: 30px; border-radius: 50%; }
.me span { font-size: 13px; }
.me small { color: var(--gold); font-size: 11px; display: block; line-height: 1.1; }
.content { padding: 28px 32px 120px; max-width: 1180px; width: 100%; }
.page-head { margin-bottom: 22px; }
.page-head h1 { margin: 0 0 4px; font-size: 26px; font-weight: 600; display: flex; align-items: center; gap: 12px; }
.page-head p { margin: 0; color: var(--muted); max-width: 720px; }

/* ---------- cards & boxes ---------- */
.card { background: linear-gradient(180deg, var(--card), var(--panel)); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; margin-bottom: 18px; }
.card > h3, .box-head h3 { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: .02em; color: var(--text); display: flex; align-items: center; gap: 8px; }
.box-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.box-head h3::before { content: ''; width: 6px; height: 6px; border-radius: 2px; background: var(--gold); transform: rotate(45deg); }
.box-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.note { margin-top: 14px; padding: 10px 14px; background: rgba(201, 169, 97, .05); border: 1px dashed var(--line2); border-radius: var(--r2); color: var(--text2); font-size: 13px; }
.warnbar { padding: 12px 16px; border-radius: var(--r2); border: 1px solid rgba(224, 163, 58, .35); background: rgba(224, 163, 58, .08); color: #f0c77a; margin-bottom: 18px; font-size: 13.5px; }
.okbar { padding: 12px 16px; border-radius: var(--r2); border: 1px solid rgba(109, 187, 120, .3); background: rgba(109, 187, 120, .07); color: #a6dcae; margin-bottom: 18px; font-size: 13.5px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.eyebrow { font-size: 10.5px; text-transform: uppercase; letter-spacing: .18em; color: var(--gold); font-weight: 500; }

/* ---------- fields ---------- */
.f { margin-bottom: 16px; min-width: 0; }
.f:last-child { margin-bottom: 0; }
.f > label, .lbl { display: block; font-size: 12.5px; font-weight: 500; color: var(--text2); margin-bottom: 6px; }
.help { font-size: 12px; color: var(--muted); margin-top: 6px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 16px; align-items: start; }
.row:last-child { margin-bottom: 0; }
.row > .f { margin-bottom: 0; }
.boolgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px 18px; }
.boolgrid .f { margin: 0; }
input[type=text], input[type=url], input[type=number], input[type=search], textarea, select, .combo-btn {
  width: 100%; background: var(--field); border: 1px solid var(--line3); border-radius: var(--r2); padding: 9px 12px; color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s; min-height: 40px;
}
textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
input:focus, textarea:focus, select:focus, .combo-btn:focus-visible { border-color: var(--gold-dim); box-shadow: 0 0 0 3px rgba(201, 169, 97, .12); }
input::placeholder, textarea::placeholder { color: var(--faint); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 17px, calc(100% - 12px) 17px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
select option { background: #15130e; }
.f.err input, .f.err textarea, .f.err .combo-btn, .f.err select { border-color: var(--bad); }
.inline { display: flex; gap: 8px; align-items: center; }
.inline > * { min-width: 0; }
.dur input { flex: 1; } .dur select { width: 110px; flex: none; }
.color { display: flex; gap: 8px; align-items: center; }
.color input[type=color] { width: 44px; height: 40px; padding: 3px; border-radius: var(--r2); border: 1px solid var(--line3); background: var(--field); cursor: pointer; flex: none; }
.color input[type=text] { font-family: ui-monospace, monospace; text-transform: uppercase; }
.swatches { display: flex; gap: 5px; flex-wrap: wrap; }
.swatches button { width: 20px; height: 20px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .12); cursor: pointer; padding: 0; }

/* switch */
.sw { display: flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; min-height: 40px; }
.sw input { position: absolute; opacity: 0; pointer-events: none; }
.sw i { width: 40px; height: 22px; border-radius: 22px; background: #2b261c; border: 1px solid var(--line3); position: relative; flex: none; transition: background .18s, border-color .18s; }
.sw i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #8d846f; transition: transform .18s, background .18s; }
.sw input:checked + i { background: rgba(201, 169, 97, .32); border-color: var(--gold-dim); }
.sw input:checked + i::after { transform: translateX(18px); background: var(--gold2); }
.sw input:focus-visible + i { box-shadow: 0 0 0 3px rgba(201, 169, 97, .2); }
.sw span { font-size: 13.5px; color: var(--text); }

/* vars */
.vars { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.vars button { font-family: ui-monospace, monospace; font-size: 11.5px; padding: 3px 8px; border-radius: 6px; background: var(--gold-bg); border: 1px solid var(--line); color: var(--gold2); cursor: pointer; }
.vars button:hover { border-color: var(--line2); }

/* combo (channel / role pickers) */
.combo { position: relative; }
.combo-btn { display: flex; align-items: center; gap: 8px; cursor: pointer; text-align: left; flex-wrap: wrap; padding: 6px 34px 6px 10px; position: relative; }
.combo-btn::after { content: ''; position: absolute; right: 14px; top: 17px; border: 5px solid transparent; border-top-color: var(--muted); }
.combo-btn .ph { color: var(--faint); padding: 2px 2px; }
.combo-btn .single { display: flex; align-items: center; gap: 8px; padding: 2px 2px; min-width: 0; }
.combo-btn .single span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 6px 3px 9px; border-radius: 7px; background: #221e16; border: 1px solid var(--line3); font-size: 12.5px; max-width: 100%; }
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip b { cursor: pointer; color: var(--muted); font-weight: 400; padding: 0 3px; line-height: 1; font-size: 15px; }
.chip b:hover { color: var(--bad); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: #99aab5; }
.chi { color: var(--muted); font-size: 13px; width: 16px; text-align: center; flex: none; }
.pop { position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; right: 0; min-width: 260px; background: #17140f; border: 1px solid var(--line2); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.pop input { border: 0; border-bottom: 1px solid var(--line3); border-radius: 0; background: transparent; box-shadow: none !important; }
.pop ul { list-style: none; margin: 0; padding: 6px; max-height: 300px; overflow-y: auto; }
.pop li { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 7px; cursor: pointer; font-size: 13.5px; }
.pop li:hover, .pop li.hl { background: rgba(236, 230, 216, .06); }
.pop li.sel { color: var(--gold2); }
.pop li.sel::after { content: '✓'; margin-left: auto; color: var(--gold); }
.pop li.dis { opacity: .4; cursor: not-allowed; }
.pop li.cat { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); cursor: default; padding: 10px 10px 4px; }
.pop li.cat:hover { background: none; }
.pop li small { color: var(--warn); font-size: 11px; margin-left: auto; }
.pop .empty { padding: 14px; color: var(--muted); font-size: 13px; }
.words { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 8px; background: var(--field); border: 1px solid var(--line3); border-radius: var(--r2); min-height: 40px; align-items: center; cursor: text; }
.words input { border: 0; background: transparent; padding: 3px 4px; min-height: 0; flex: 1; min-width: 120px; box-shadow: none !important; }
.words.secret .chip span { filter: blur(4px); transition: filter .15s; }
.words.secret:hover .chip span { filter: none; }

/* map + list */
.map-row { display: grid; grid-template-columns: 120px 1fr 36px; gap: 10px; align-items: start; margin-bottom: 10px; }
.map-row .key input { text-align: center; }
.map-row.obj { grid-template-columns: 120px 1fr 36px; }
.map-row .f { margin: 0; }
.items { display: flex; flex-direction: column; gap: 12px; }
.item { border: 1px solid var(--line3); border-radius: var(--r); background: rgba(0, 0, 0, .18); }
.item-head { display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; user-select: none; }
.item-head .tw { color: var(--muted); transition: transform .15s; font-size: 11px; width: 12px; }
.item.open > .item-head .tw { transform: rotate(90deg); }
.item-head b { font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-head .tag { font-size: 11px; padding: 2px 8px; border-radius: 99px; background: rgba(109, 187, 120, .12); color: var(--ok); border: 1px solid rgba(109, 187, 120, .25); }
.item-head .tag.off { background: rgba(236, 230, 216, .05); color: var(--muted); border-color: var(--line3); }
.item-body { padding: 4px 16px 16px; border-top: 1px solid var(--line3); display: none; }
.item.open > .item-body { display: block; padding-top: 16px; }
.item-tools { display: flex; gap: 6px; }
.item.compact { background: transparent; border: 0; border-bottom: 1px dashed var(--line3); border-radius: 0; padding-bottom: 12px; }
.item.compact .item-body { display: grid; grid-template-columns: 1fr 36px; gap: 10px; border: 0; padding: 0; }
.item.compact:last-child { border-bottom: 0; }
.item-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line3); }
.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 20px; align-items: start; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: var(--r2); border: 1px solid var(--line2); background: var(--card2); color: var(--text); cursor: pointer; font-weight: 500; font-size: 13.5px; transition: background .15s, border-color .15s, transform .05s; white-space: nowrap; text-decoration: none !important; }
.btn:hover { border-color: var(--gold-dim); background: #221e15; }
.btn:active { transform: translateY(1px); }
.btn.gold { background: linear-gradient(180deg, #d8bc78, #b8964f); border-color: #e2c98e; color: #17130b; font-weight: 600; }
.btn.gold:hover { background: linear-gradient(180deg, #e3c98a, #c4a25a); }
.btn.ghost { background: transparent; border-color: var(--line3); color: var(--text2); }
.btn.ghost:hover { border-color: var(--line2); color: var(--text); }
.btn.danger { border-color: rgba(223, 93, 85, .4); color: #f0938c; background: rgba(223, 93, 85, .06); }
.btn.danger:hover { background: rgba(223, 93, 85, .14); border-color: var(--bad); }
.btn.sm { padding: 6px 11px; font-size: 12.5px; }
.btn.icon { padding: 0; width: 36px; height: 36px; justify-content: center; }
.btn.discord { background: #5865f2; border-color: #6d78f5; color: #fff; }
.btn.discord:hover { background: #4f5ae0; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn .spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* save bar */
.savebar { position: fixed; z-index: 40; left: calc(var(--side) + 32px); right: 32px; bottom: 20px; max-width: 1116px; display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 20px; background: #1b170f; border: 1px solid var(--gold-dim); border-radius: 14px; box-shadow: 0 16px 50px rgba(0, 0, 0, .6); transform: translateY(140%); opacity: 0; visibility: hidden; transition: transform .25s cubic-bezier(.2, .9, .3, 1.2), opacity .2s, visibility .25s; }
.savebar.show { transform: none; opacity: 1; visibility: visible; }
.savebar span { flex: 1; color: var(--text2); }
.savebar span b { color: var(--gold2); font-weight: 500; }

/* toasts, modal */
.toasts { position: fixed; z-index: 100; right: 22px; top: 76px; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 44px)); }
.toast { padding: 12px 16px; border-radius: 10px; background: #1c1912; border: 1px solid var(--line2); box-shadow: var(--shadow); font-size: 13.5px; animation: tin .25s ease; display: flex; gap: 10px; align-items: flex-start; }
.toast.ok { border-color: rgba(109, 187, 120, .45); } .toast.ok::before { content: '✓'; color: var(--ok); font-weight: 700; }
.toast.bad { border-color: rgba(223, 93, 85, .5); } .toast.bad::before { content: '!'; color: var(--bad); font-weight: 700; }
@keyframes tin { from { opacity: 0; transform: translateY(-6px); } }
.modal-bg { position: fixed; inset: 0; z-index: 90; background: rgba(5, 4, 3, .72); display: grid; place-items: center; padding: 20px; animation: fade .15s; backdrop-filter: blur(3px); }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(520px, 100%); background: var(--card); border: 1px solid var(--line2); border-radius: 16px; padding: 24px; box-shadow: var(--shadow); max-height: 90vh; overflow-y: auto; }
.modal.wide { width: min(1020px, 100%); }
.modal h3 { margin: 0 0 10px; font-size: 17px; font-weight: 600; }
.modal p { color: var(--text2); margin: 0 0 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.preview-img { width: 100%; border-radius: 10px; border: 1px solid var(--line); }

/* ---------- tables, stats ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-weight: 500; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 10px; border-bottom: 1px solid var(--line3); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.click { cursor: pointer; } .table tr.click:hover td { background: rgba(236, 230, 216, .025); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.tablewrap { overflow-x: auto; margin: 0 -6px; }
.user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.user img, .user .av { width: 30px; height: 30px; border-radius: 50%; flex: none; background: #2a241a; display: grid; place-items: center; font-size: 12px; color: var(--gold); font-weight: 600; }
.user div { min-width: 0; } .user b { font-weight: 500; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .user small { color: var(--muted); font-size: 11.5px; }
.user.lg img, .user.lg .av { width: 56px; height: 56px; font-size: 20px; } .user.lg b { font-size: 18px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: linear-gradient(180deg, var(--card), var(--panel)); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; position: relative; overflow: hidden; }
.stat small { display: block; color: var(--muted); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.stat b { display: block; font-size: 28px; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--text2); }
.stat::after { content: ''; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle, rgba(201, 169, 97, .14), transparent 70%); }
.mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.mod { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line3); border-radius: 10px; background: rgba(0, 0, 0, .15); color: var(--text); text-decoration: none !important; transition: border-color .15s; }
.mod:hover { border-color: var(--line2); }
.mod .ic { font-size: 18px; }
.mod b { display: block; font-weight: 500; font-size: 13.5px; } .mod small { color: var(--muted); font-size: 12px; }
.mod .st { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: #4a4335; flex: none; }
.mod .st.on { background: var(--ok); box-shadow: 0 0 0 4px rgba(109, 187, 120, .12); }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; border: 1px solid var(--line3); color: var(--text2); background: rgba(236, 230, 216, .04); white-space: nowrap; }
.pill.gold { color: var(--gold2); border-color: var(--line2); background: var(--gold-bg); }
.pill.ok { color: var(--ok); border-color: rgba(109, 187, 120, .3); background: rgba(109, 187, 120, .08); }
.pill.bad { color: #f0938c; border-color: rgba(223, 93, 85, .35); background: rgba(223, 93, 85, .07); }
.pill.live { color: #ff7a7a; border-color: rgba(255, 90, 90, .4); background: rgba(255, 90, 90, .08); }
.bar { height: 6px; border-radius: 6px; background: #2a251b; overflow: hidden; min-width: 80px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-dim), var(--gold2)); border-radius: 6px; }
.pager { display: flex; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 14px; color: var(--muted); font-size: 13px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar > input, .toolbar > select { width: auto; flex: 1; min-width: 180px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 14px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--gold2); border-bottom-color: var(--gold); }
.empty-state { text-align: center; padding: 34px 20px; color: var(--muted); }
.empty-state .big { font-size: 34px; margin-bottom: 8px; }
.feed { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line3); }
.feed:last-child { border-bottom: 0; }
.feed .fi { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: #211c14; border: 1px solid var(--line3); }
.feed b { font-weight: 500; } .feed small { color: var(--muted); display: block; font-size: 12.5px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; font-size: 13.5px; } .kv dt { color: var(--muted); } .kv dd { margin: 0; }
.roles-inline { display: flex; flex-wrap: wrap; gap: 6px; }
.lvl-sel { min-height: 34px; padding: 5px 30px 5px 10px; font-size: 13px; background-position: calc(100% - 15px) 14px, calc(100% - 10px) 14px; }

/* ---------- Discord embed preview ---------- */
.dc { background: #313338; border-radius: 10px; padding: 14px 16px; color: #dbdee1; font-family: 'gg sans', 'DV', system-ui, sans-serif; font-size: 14px; line-height: 1.375; }
.dc-label { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .14em; margin-bottom: 8px; }
.dc-msg { display: grid; grid-template-columns: 40px 1fr; gap: 14px; }
.dc-av { width: 40px; height: 40px; border-radius: 50%; background: #1e1f22; }
.dc-name { font-weight: 600; color: #f2f3f5; } .dc-name em { font-style: normal; font-size: 10px; background: #5865f2; color: #fff; border-radius: 3px; padding: 1px 4px; margin-left: 5px; vertical-align: 2px; font-weight: 600; }
.dc-name small { color: #949ba4; font-weight: 400; font-size: 12px; margin-left: 6px; }
.dc-content { white-space: pre-wrap; word-wrap: break-word; margin: 2px 0 4px; }
.dc-embed { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; background: #2b2d31; border-left: 4px solid #c9a961; border-radius: 4px; padding: 10px 16px 14px 12px; max-width: 520px; margin-top: 4px; }
.dc-embed > div { min-width: 0; grid-column: 1; }
.dc-author { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #f2f3f5; margin-top: 4px; } .dc-author img { width: 22px; height: 22px; border-radius: 50%; }
.dc-title { font-weight: 600; color: #f2f3f5; margin-top: 6px; } .dc-title.link { color: #00a8fc; }
.dc-desc { white-space: pre-wrap; word-wrap: break-word; margin-top: 6px; font-size: 13.8px; }
.dc-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.dc-field { grid-column: 1 / -1; font-size: 13.5px; } .dc-field.inl { grid-column: auto; } .dc-field b { display: block; color: #f2f3f5; font-weight: 600; margin-bottom: 2px; }
.dc-thumb { grid-column: 2; grid-row: 1 / span 4; width: 80px; height: 80px; object-fit: cover; border-radius: 4px; margin-top: 6px; }
.dc-img { grid-column: 1 / -1; max-width: 100%; border-radius: 4px; margin-top: 10px; }
.dc-foot { grid-column: 1 / -1; font-size: 12px; color: #b5bac1; margin-top: 8px; }
.dc-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.dc-btns span { background: #4e5058; color: #fff; border-radius: 4px; padding: 6px 14px; font-size: 13.5px; font-weight: 500; }
.dc-desc code, .dc-content code { background: #1e1f22; padding: 1px 4px; border-radius: 3px; font-size: 12.5px; }
.dc-desc blockquote, .dc-content blockquote { margin: 2px 0; padding-left: 10px; border-left: 4px solid #4e5058; }
.dc .mention { background: rgba(88, 101, 242, .3); color: #c9cdfb; border-radius: 3px; padding: 0 2px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } .grid3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 70; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform .22s; box-shadow: var(--shadow); }
  .shell.nav-open .side { transform: none; }
  .shell.nav-open::after { content: ''; position: fixed; inset: 0; z-index: 65; background: rgba(0, 0, 0, .55); }
  .top { padding: 12px 16px; } .top .burger { display: inline-flex; }
  .content { padding: 20px 16px 120px; }
  .savebar { left: 12px; right: 12px; bottom: 12px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .me span, .me small { display: none; } .me { padding: 4px; }
  .map-row, .map-row.obj { grid-template-columns: 90px 1fr 36px; }
  .kv { grid-template-columns: 110px 1fr; }
}
.f > label.sw { display: flex; margin: 0; font-size: inherit; font-weight: 400; }
.row:has(input:not([type=checkbox]), select, textarea, .combo) > .f > label.sw { margin-top: 25px; }
