:root {
  --bg: #0e1016;
  --bg-2: #13161e;
  --panel: #191d27;
  --panel-2: #1f2430;
  --panel-3: #262c3a;
  --border: #2a3040;
  --text: #e8eaf0;
  --muted: #8d95a8;
  --faint: #5f6779;
  --primary: #7c5cff;
  --primary-2: #6a48f5;
  --primary-soft: rgba(124, 92, 255, .14);
  --accent: #22d3ee;
  --success: #34d399;
  --danger: #f87171;
  --warning: #fbbf24;
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar: 264px;
  --topbar: 64px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
svg.icon { width: 20px; height: 20px; flex: none; }

.boot { height: 100vh; display: grid; place-items: center; }
.boot img { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.88); opacity: .6; } }

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: var(--radius-sm); border: 1px solid transparent;
  background: var(--panel-3); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: background .15s, transform .05s, border-color .15s;
}
.btn:hover { background: #2f3647; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-2); }
.btn-ghost { background: transparent; border-color: var(--border); }
.btn-ghost:hover { background: var(--panel-2); }
.btn-danger { background: rgba(248, 113, 113, .12); color: var(--danger); }
.btn-danger:hover { background: rgba(248, 113, 113, .2); }
.btn-lg { height: 50px; padding: 0 26px; font-size: 16px; border-radius: 10px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-icon { width: 36px; height: 36px; padding: 0; }

/* ── landing ── */
.site-nav {
  position: sticky; top: 0; z-index: 20; height: 68px; display: flex; align-items: center; gap: 28px;
  padding: 0 max(20px, calc((100vw - 1180px) / 2)); background: rgba(14, 16, 22, .82); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, .04);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.brand img { width: 34px; height: 34px; }
.site-nav .links { display: flex; gap: 22px; color: var(--muted); font-weight: 500; }
.site-nav .links a:hover { color: var(--text); }
.site-nav .spacer { flex: 1; }

.hero {
  position: relative; overflow: hidden;
  padding: 90px max(20px, calc((100vw - 1180px) / 2)) 110px;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center;
}
.hero::before {
  content: ''; position: absolute; inset: -40% -10% auto auto; width: 900px; height: 900px; border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--primary-rgb), .28), transparent 60%); pointer-events: none;
}
.hero h1 { font-size: clamp(38px, 5.4vw, 64px); font-weight: 800; letter-spacing: -.035em; line-height: 1.04; }
.hero h1 .grad { background: linear-gradient(90deg, var(--primary-light), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { margin: 22px 0 32px; font-size: 18px; color: var(--muted); max-width: 520px; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-art { position: relative; aspect-ratio: 1; max-width: 460px; justify-self: center; width: 100%; }
.orbit { position: absolute; inset: 0; border: 1px dashed rgba(255, 255, 255, .12); border-radius: 50%; animation: spin 60s linear infinite; }
.orbit.o2 { inset: 16%; animation-duration: 40s; animation-direction: reverse; }
.orbit.o3 { inset: 32%; border-style: solid; border-color: rgba(var(--primary-rgb), .3); }
.orbit .planet {
  position: absolute; width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center;
  background: var(--panel-2); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.orbit .planet svg { width: 26px; height: 26px; }
.hero-core { position: absolute; inset: 38%; border-radius: 28%; box-shadow: 0 0 80px rgba(var(--primary-rgb), .6); }
.hero-core img { width: 100%; height: 100%; }
@keyframes spin { to { transform: rotate(360deg); } }
.orbit .planet { animation: spin 60s linear infinite reverse; }
.orbit.o2 .planet { animation-duration: 40s; animation-direction: normal; }

.section { padding: 70px max(20px, calc((100vw - 1180px) / 2)); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head h2 { font-size: 36px; font-weight: 800; letter-spacing: -.02em; }
.section-head p { color: var(--muted); margin-top: 12px; font-size: 17px; }
.eyebrow { color: var(--primary); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }

.feature-cat { margin-bottom: 44px; }
.feature-cat h3 { font-size: 20px; margin-bottom: 16px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.feature {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px;
  transition: transform .15s, border-color .15s;
}
.feature:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.feature h4 { font-size: 16px; margin: 14px 0 6px; }
.feature p { color: var(--muted); font-size: 14px; }

.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.stat-strip .n { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }

.cta-band {
  margin: 0 max(20px, calc((100vw - 1180px) / 2)) 70px; padding: 54px 30px; border-radius: 20px; text-align: center;
  background: linear-gradient(120deg, #3b2a8f, #5b3cf0 45%, #0e7490);
}
.cta-band h2 { font-size: 32px; font-weight: 800; }
.cta-band p { margin: 10px 0 26px; opacity: .85; }
.cta-band .btn { background: #fff; color: #1b1340; }

.site-footer { border-top: 1px solid var(--border); padding: 30px max(20px, calc((100vw - 1180px) / 2)); color: var(--faint); font-size: 14px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ── plugin icon tile ── */
.picon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.picon svg { width: 22px; height: 22px; }
.picon.sm { width: 28px; height: 28px; border-radius: 8px; }
.picon.sm svg { width: 16px; height: 16px; }
.picon.lg { width: 60px; height: 60px; border-radius: 16px; }
.picon.lg svg { width: 30px; height: 30px; }

/* ── server picker ── */
.picker { max-width: 1080px; margin: 0 auto; padding: 50px 20px 80px; }
.picker h1 { font-size: 32px; font-weight: 800; text-align: center; letter-spacing: -.02em; }
.picker > p { text-align: center; color: var(--muted); margin: 10px 0 40px; }
.guild-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.guild-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
  display: flex; flex-direction: column; transition: transform .15s, border-color .15s;
}
.guild-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.guild-card .banner { height: 96px; position: relative; overflow: hidden; }
.guild-card .banner .blur { position: absolute; inset: -30px; filter: blur(26px) saturate(1.4); opacity: .55; background-size: cover; background-position: center; }
.guild-card .body { padding: 0 18px 18px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; margin-top: -38px; position: relative; }
.guild-card .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.guild-card .btn { width: 100%; }
.gicon {
  width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; flex: none;
  background: var(--panel-3); border: 4px solid var(--panel); font-weight: 700; font-size: 22px; color: var(--text);
}
.gicon img { width: 100%; height: 100%; object-fit: cover; }
.gicon.sm { width: 32px; height: 32px; border-width: 0; font-size: 12px; }
.gicon.md { width: 44px; height: 44px; border-width: 0; font-size: 15px; }

/* ── app shell ── */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--bg-2); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; scrollbar-width: thin;
}
.sidebar .brand { height: var(--topbar); padding: 0 20px; border-bottom: 1px solid var(--border); font-size: 18px; flex: none; }
.sidebar .brand img { width: 30px; height: 30px; }
.switcher { position: relative; padding: 14px 12px 6px; }
.switcher-btn {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; cursor: pointer; text-align: left;
}
.switcher-btn:hover { background: var(--panel-2); }
.switcher-btn .n { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown {
  position: absolute; z-index: 40; left: 12px; right: 12px; top: calc(100% - 2px); background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 6px; box-shadow: var(--shadow); max-height: 360px; overflow-y: auto;
}
.dropdown a, .dropdown button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 7px; background: none; border: 0;
  cursor: pointer; text-align: left; font-size: 14px;
}
.dropdown a:hover, .dropdown button:hover { background: var(--panel-3); }
.dropdown .sep { height: 1px; background: var(--border); margin: 6px 4px; }
.nav { padding: 8px 12px 30px; }
.nav-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); padding: 18px 10px 8px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 7px 10px; border-radius: 8px; color: var(--muted); font-weight: 500; font-size: 14px;
  margin-bottom: 2px;
}
.nav a:hover { background: var(--panel); color: var(--text); }
.nav a.active { background: var(--primary-soft); color: var(--text); }
.nav a .label { flex: 1; }
.nav a .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(52, 211, 153, .15); }
.nav a .nicon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--panel-2); }
.nav a .nicon svg { width: 16px; height: 16px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 15; height: var(--topbar); display: flex; align-items: center; gap: 14px; padding: 0 28px;
  background: rgba(14, 16, 22, .85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}
.topbar .crumbs { flex: 1; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; min-width: 0; }
.topbar .crumbs b { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-toggle { display: none; }
.pill { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(251, 191, 36, .14); color: var(--warning); }
.user-menu { position: relative; }
.user-btn { display: flex; align-items: center; gap: 10px; background: none; border: 0; cursor: pointer; padding: 4px 8px 4px 4px; border-radius: 999px; }
.user-btn:hover { background: var(--panel); }
.user-btn img { width: 34px; height: 34px; border-radius: 50%; }
.user-menu .dropdown { left: auto; right: 0; width: 200px; top: calc(100% + 6px); }
.content { padding: 30px 28px 120px; max-width: 1200px; width: 100%; margin: 0 auto; }

/* ── overview ── */
.overview-head { display: flex; align-items: center; gap: 18px; margin-bottom: 26px; }
.overview-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 36px; }
.stat { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: flex; gap: 14px; align-items: center; }
.stat .v { font-size: 22px; font-weight: 800; }
.stat .k { color: var(--muted); font-size: 13px; }
.cat-title { font-size: 18px; font-weight: 700; margin: 34px 0 14px; display: flex; align-items: center; gap: 10px; }
.cat-title .count { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--panel-2); padding: 2px 8px; border-radius: 999px; }
.plugin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.plugin-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 12px;
  transition: border-color .15s, transform .15s; cursor: pointer; min-height: 170px;
}
.plugin-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.plugin-card .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.plugin-card h3 { font-size: 16px; font-weight: 700; }
.plugin-card p { color: var(--muted); font-size: 13.5px; flex: 1; }
.plugin-card .foot { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--muted); }
.status-on { color: var(--success); font-weight: 600; }

/* ── toggle ── */
.switch { position: relative; width: 44px; height: 24px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #3a4152; transition: background .15s; }
.switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + span { background: var(--success); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ── plugin page ── */
.plugin-head {
  display: flex; align-items: center; gap: 18px; padding: 24px; margin-bottom: 22px; border-radius: 16px; border: 1px solid var(--border);
  background: linear-gradient(120deg, var(--head-tint, rgba(var(--primary-rgb), .16)), transparent 70%), var(--panel);
}
.plugin-head .info { flex: 1; min-width: 0; }
.plugin-head h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.plugin-head p { color: var(--muted); margin-top: 4px; }
.plugin-head .toggle-wrap { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip { font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--panel-3); padding: 3px 8px; border-radius: 6px; color: #c7cbe0; }
.disabled-note {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 10px; margin-bottom: 20px;
  background: rgba(251, 191, 36, .08); border: 1px solid rgba(251, 191, 36, .25); color: #fcd34d; font-size: 14px;
}
.plugin-layout { display: grid; grid-template-columns: 1fr; gap: 18px; }
.plugin-layout.with-preview { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; }
.card > h2 { font-size: 17px; font-weight: 700; }
.card > .desc { color: var(--muted); font-size: 14px; margin-top: 4px; }
.card > .fields { margin-top: 18px; display: flex; flex-direction: column; gap: 18px; }
.card-actions { display: flex; gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }

.field > label, .field > .flabel { display: block; font-size: 13px; font-weight: 600; color: var(--label); margin-bottom: 7px; }
.field.toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 2px 0; }
.field.toggle > label { margin: 0; font-size: 14px; font-weight: 500; color: var(--text); }
.input, .select, .textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.input[readonly] { color: var(--muted); }
.textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.select { appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238d95a8' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
.select option, .select optgroup { background: var(--panel-2); }
.color-row { display: flex; gap: 10px; align-items: center; }
.color-row input[type=color] { width: 44px; height: 40px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-2); padding: 3px; cursor: pointer; }
.vars { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.vars button { font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--primary-soft); color: var(--primary-light); border: 0; border-radius: 6px; padding: 3px 8px; cursor: pointer; }
.vars button:hover { background: rgba(var(--primary-rgb), .26); }

.multi { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 44px; }
.multi .tag { display: inline-flex; align-items: center; gap: 6px; background: var(--panel-3); border-radius: 6px; padding: 4px 6px 4px 9px; font-size: 13px; }
.multi .tag .swatch { width: 10px; height: 10px; border-radius: 50%; }
.multi .tag button { background: none; border: 0; cursor: pointer; color: var(--muted); padding: 0 2px; display: grid; place-items: center; }
.multi .tag button:hover { color: var(--danger); }
.multi select, .multi input { flex: 1; min-width: 140px; background: transparent; border: 0; outline: none; padding: 5px 6px; color: var(--muted); cursor: pointer; }
.multi input { cursor: text; color: var(--text); }
.multi select option { background: var(--panel-2); color: var(--text); }

.list { display: flex; flex-direction: column; gap: 10px; }
.list-item { background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; }
.list-item > .head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; user-select: none; }
.list-item > .head .t { flex: 1; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item > .head .chev { transition: transform .15s; color: var(--muted); }
.list-item.open > .head .chev { transform: rotate(90deg); }
.list-item > .body { display: none; padding: 4px 14px 16px; flex-direction: column; gap: 16px; border-top: 1px solid var(--border); padding-top: 16px; }
.list-item.open > .body { display: flex; }
.list-item .list-item { background: var(--panel); }
.list-item .item-actions { display: flex; gap: 8px; }
.add-btn { border: 1px dashed var(--border-strong); background: transparent; color: var(--muted); height: 42px; border-radius: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 14px; }
.add-btn:hover { color: var(--text); border-color: var(--primary); background: var(--primary-soft); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── save bar ── */
.savebar {
  position: fixed; left: calc(var(--sidebar) + 28px); right: 28px; bottom: 22px; z-index: 30; max-width: 900px; margin: 0 auto;
  display: flex; align-items: center; gap: 14px; padding: 12px 12px 12px 20px; border-radius: 12px; background: #0b0d12;
  border: 1px solid var(--border); box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
  transform: translateY(140%); transition: transform .25s cubic-bezier(.2, .9, .3, 1.2);
}
.savebar.show { transform: none; }
.savebar .msg { flex: 1; font-weight: 600; }
.savebar.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* ── tables & panels ── */
.table-wrap { overflow-x: auto; margin-top: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; padding: 8px 10px; border-bottom: 1px solid var(--border); }
td { padding: 10px; border-bottom: 1px solid rgba(42, 48, 64, .6); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; text-transform: capitalize; background: var(--panel-3); }
.badge.warn { background: rgba(251, 191, 36, .14); color: var(--warning); }
.badge.ban, .badge.kick { background: rgba(248, 113, 113, .14); color: var(--danger); }
.badge.timeout { background: rgba(251, 146, 60, .14); color: #fb923c; }
.badge.unban, .badge.live { background: rgba(52, 211, 153, .14); color: var(--success); }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; font-size: 14px; }

/* ── embed preview ── */
.preview { position: sticky; top: calc(var(--topbar) + 20px); }
.discord { background: #313338; border-radius: 10px; padding: 16px; display: flex; gap: 14px; font-size: 15px; color: #dbdee1; }
.discord .ava { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.discord .who { font-weight: 600; color: #fff; display: flex; align-items: center; gap: 6px; }
.discord .bot-tag { background: #5865f2; color: #fff; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; }
.discord .content { margin: 2px 0 6px; white-space: pre-wrap; word-break: break-word; }
/* The page layout also uses .content; keep its padding and width out of Discord-style previews. */
.discord .content { padding: 0; max-width: none; width: auto; }
.embed { background: #2b2d31; border-left: 4px solid var(--primary); border-radius: 4px; padding: 10px 14px 14px; max-width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.embed .e-author { font-size: 13px; font-weight: 600; color: #fff; }
.embed .e-title { font-weight: 700; color: #fff; }
.embed .e-title.link { color: #00a8fc; }
.embed .e-desc { font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.embed .e-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 4px; }
.embed .e-field { grid-column: span 3; font-size: 14px; }
.embed .e-field.inline { grid-column: span 1; }
.embed .e-field b { display: block; color: #fff; font-size: 13px; }
.embed .e-thumb { width: 72px; height: 72px; border-radius: 4px; object-fit: cover; grid-row: 1 / span 3; grid-column: 2; }
.embed .e-image { grid-column: 1 / -1; max-width: 100%; border-radius: 4px; margin-top: 6px; }
.embed .e-footer { grid-column: 1 / -1; font-size: 12px; color: #b5bac1; margin-top: 4px; }
.embed > .e-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

/* ── leaderboard ── */
.lb { max-width: 980px; margin: 0 auto; padding: 40px 20px 80px; }
.lb-head { display: flex; align-items: center; gap: 18px; margin-bottom: 28px; }
.lb-head h1 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.lb-layout { display: grid; grid-template-columns: 1fr 280px; gap: 20px; align-items: start; }
.lb-row { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-radius: 12px; background: var(--panel); border: 1px solid var(--border); margin-bottom: 8px; }
.lb-rank { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--panel-3); flex: none; font-size: 14px; }
.lb-rank.r1 { background: #f5b301; color: #1a1300; }
.lb-rank.r2 { background: #b8c2cc; color: #111; }
.lb-rank.r3 { background: #c8773a; color: #1a0d00; }
.lb-row img { width: 44px; height: 44px; border-radius: 50%; background: var(--panel-3); }
.lb-row .who { flex: 1; min-width: 0; }
.lb-row .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-row .nums { display: flex; gap: 22px; text-align: center; font-size: 13px; color: var(--muted); }
.lb-row .nums b { display: block; color: var(--text); font-size: 15px; }
.ring { --p: 0; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--primary) calc(var(--p) * 1%), var(--panel-3) 0); }
.ring span { width: 44px; height: 44px; border-radius: 50%; background: var(--panel); display: grid; place-items: center; font-weight: 800; font-size: 15px; }
.reward { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.reward:last-child { border: 0; }

/* ── toasts ── */
#toasts { position: fixed; right: 20px; top: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--panel-2); border: 1px solid var(--border); border-left: 4px solid var(--success); padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow); max-width: 360px; font-size: 14px; animation: slidein .25s; }
.toast.error { border-left-color: var(--danger); }
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } }

.error-page { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 30px; }
.error-page h1 { font-size: 26px; margin: 18px 0 8px; }
.error-page p { color: var(--muted); margin-bottom: 22px; }

.backdrop { display: none; }

@media (max-width: 1100px) {
  .plugin-layout.with-preview { grid-template-columns: 1fr; }
  .preview { position: static; }
  .lb-layout { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 50px; text-align: center; }
  .hero p { margin-left: auto; margin-right: auto; }
  .hero .ctas { justify-content: center; }
  .hero-art { max-width: 320px; }
  .site-nav .links { display: none; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar); z-index: 50; transform: translateX(-100%); transition: transform .2s; }
  .shell.nav-open .sidebar { transform: none; }
  .shell.nav-open .backdrop { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 45; }
  .menu-toggle { display: inline-flex; }
  .topbar, .content { padding-left: 16px; padding-right: 16px; }
  .savebar { left: 16px; right: 16px; }
  .user-btn .uname { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .lb-row .nums .hide-sm { display: none; }
  .plugin-head { flex-wrap: wrap; }
}

/* ═════════ dashboard shell: full-width top bar, collapsible sidebar, tabbed plugin grid ═════════ */
.shell { grid-template-columns: var(--sidebar) minmax(0, 1fr); grid-template-rows: var(--topbar) 1fr; }
.shell > .topbar { grid-column: 1 / -1; grid-row: 1; padding: 0 20px; gap: 12px; background: var(--bg-2); backdrop-filter: none; }
.shell > .sidebar { grid-row: 2; top: var(--topbar); height: calc(100vh - var(--topbar)); }
.shell > .main { grid-row: 2; }
.topbar .brand { font-size: 18px; }
.topbar .brand img { width: 30px; height: 30px; }
.topbar .spacer { flex: 1; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: var(--panel); color: var(--text); }
.bell { position: relative; }
.bell .dropdown, .user-menu .dropdown { left: auto; right: 0; top: calc(100% + 8px); width: 240px; }
.dd-title { font-weight: 700; padding: 8px 10px 4px; }
.dd-user { display: flex; align-items: center; gap: 10px; padding: 8px 10px; }
.dd-user img { width: 38px; height: 38px; border-radius: 50%; }
.dd-user b { display: block; }
.dropdown .danger { color: var(--danger); }
.dropdown a.current { background: var(--primary-soft); }
.dropdown .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-accent { background: linear-gradient(90deg, var(--primary), #4f7cff); color: #fff; }
.btn-accent:hover { filter: brightness(1.1); }
.btn-accent svg, .btn-enable svg { width: 16px; height: 16px; }
.btn-enable { background: var(--panel-3); color: var(--text); }
.btn-enable:hover { background: var(--primary); color: #fff; }

.switcher { padding: 16px 12px 8px; }
.switcher-btn { background: var(--panel-2); padding: 10px 12px; }
.nav { padding: 6px 10px 40px; }
.nav a.nav-top { gap: 12px; padding: 8px 12px; }
.nav a.nav-top svg { width: 18px; height: 18px; }
.nav-section { margin-top: 10px; }
.nav-label {
  width: 100%; display: flex; align-items: center; justify-content: space-between; background: none; border: 0; cursor: pointer;
  font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); padding: 12px 12px 6px;
}
.nav-label:hover { color: var(--muted); }
.nav-label .caret { width: 14px; height: 14px; transition: transform .15s; transform: rotate(180deg); }
.nav-section.closed .caret { transform: none; }
.nav-section.closed .nav-items { display: none; }
.nav a.nav-plugin { gap: 10px; padding: 6px 12px; }
.nav-plugin .status { width: 6px; height: 6px; border-radius: 50%; background: #4a5163; flex: none; }
.nav-plugin .status.on { background: var(--success); box-shadow: 0 0 0 3px rgba(52, 211, 153, .15); }
.nav-plugin .nicon { width: 22px; height: 22px; background: none !important; }
.nav-plugin .nicon svg { width: 18px; height: 18px; }

.hovercard {
  position: fixed; left: calc(var(--sidebar) + 8px); z-index: 60; width: 280px; padding: 14px; border-radius: 12px;
  background: var(--panel-2); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.hovercard::before { content: ''; position: absolute; left: -6px; top: 22px; width: 10px; height: 10px; background: var(--panel-2); border-left: 1px solid var(--border); border-bottom: 1px solid var(--border); transform: rotate(45deg); }
.hc-head { display: flex; align-items: center; gap: 10px; }
.hovercard p { color: var(--muted); font-size: 13px; margin: 8px 0 12px; }
.hc-foot { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }

.content { padding: 26px 32px 120px; max-width: 1240px; }
.banner {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: center; padding: 28px; border-radius: 16px; margin-bottom: 34px;
  background: radial-gradient(120% 140% at 0% 0%, rgba(var(--primary-rgb), .35), transparent 55%), radial-gradient(100% 120% at 100% 100%, rgba(34, 211, 238, .18), transparent 60%), var(--panel);
  border: 1px solid var(--border);
}
.banner .eyebrow { display: block; }
.banner h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.banner p { color: var(--muted); margin: 8px 0 18px; }
.banner-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.banner-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bstat { background: rgba(0, 0, 0, .22); border: 1px solid rgba(255, 255, 255, .05); border-radius: 12px; padding: 12px 14px; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; }
.bstat svg { grid-row: span 2; color: var(--primary); }
.bstat b { font-size: 18px; }
.bstat span { color: var(--muted); font-size: 12px; }

.page-title { font-size: 22px; font-weight: 800; margin-bottom: 12px; }
.tabbar { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 26px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.tabs::-webkit-scrollbar { display: none; }
.tab { background: none; border: 0; color: var(--muted); font-weight: 600; font-size: 14px; padding: 12px 14px; cursor: pointer; white-space: nowrap; position: relative; }
.tab:hover, .tab.active { color: var(--text); }
.tab.active::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; border-radius: 2px; background: var(--primary); }
.tab-arrow { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 6px; display: grid; place-items: center; }
.tab-arrow:hover { background: var(--panel); color: var(--text); }
.icon.flip { transform: rotate(180deg); }

.plugin-section { margin-bottom: 34px; }
.section-title { display: inline-block; font-size: 17px; font-weight: 700; padding-bottom: 8px; margin-bottom: 16px; border-bottom: 2px solid var(--primary); }
.plugin-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.plugin-card { min-height: 214px; padding: 18px; gap: 10px; }
.plugin-card .top { align-items: center; }
.plugin-card h3 { font-size: 15px; margin-top: 4px; }
.plugin-card p { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.plugin-card .foot { justify-content: flex-start; gap: 10px; }
.plugin-card .foot .switch { margin-left: auto; }
.plugin-card.is-on { border-color: rgba(52, 211, 153, .3); }

.modal { position: fixed; inset: 0; z-index: 90; background: rgba(5, 6, 10, .72); display: grid; place-items: center; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal-card { position: relative; width: min(640px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 30px; box-shadow: var(--shadow); }
.modal-x { position: absolute; right: 12px; top: 12px; }
.modal-body { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.modal-body h2 { font-size: 22px; font-weight: 800; }
.modal-logo { margin: 8px 0; }
.modal-actions { display: flex; gap: 10px; margin-top: 14px; }
.steps { display: flex; gap: 6px; margin-bottom: 8px; }
.steps span { width: 22px; height: 4px; border-radius: 4px; background: var(--panel-3); }
.steps span.on { background: var(--primary); }
.link-btn { background: none; border: 0; color: var(--primary-light); cursor: pointer; font-weight: 600; font-size: 13px; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; width: 100%; text-align: left; margin-top: 6px; }
.pick { display: flex; align-items: center; gap: 10px; padding: 10px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 600; }
.pick > span:nth-child(2) { flex: 1; }
.pick .check { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--border); display: grid; place-items: center; color: transparent; }
.pick .check svg { width: 12px; height: 12px; }
.pick.on { border-color: var(--primary); background: var(--primary-soft); }
.pick.on .check { background: var(--primary); border-color: var(--primary); color: #fff; }
.done-mark { width: 64px; height: 64px; border-radius: 50%; background: rgba(52, 211, 153, .15); color: var(--success); display: grid; place-items: center; }
.done-mark svg { width: 32px; height: 32px; }

.card-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.card-row h2 { font-size: 17px; font-weight: 700; }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 16px; }
.emoji-grid .empty { grid-column: 1 / -1; }
.emoji-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 10px 12px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; }
.emoji-tile img { width: 44px; height: 44px; object-fit: contain; }
.emoji-tile code { font-size: 12px; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emoji-tile .icon-btn { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; opacity: 0; transition: opacity .15s; }
.emoji-tile .icon-btn svg { width: 15px; height: 15px; }
.emoji-tile:hover .icon-btn, .emoji-tile .icon-btn:focus-visible { opacity: 1; }
.emoji-tile .icon-btn:hover { color: var(--danger); }
.emoji-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-top: 16px; }
.emoji-form .field { min-width: 160px; }
.emoji-form .field.grow { flex: 1; min-width: 220px; }

/* ═════════ embed messages: list + inline builder ═════════ */
.eb { display: flex; flex-direction: column; gap: 18px; }
.eb .card { margin-bottom: 0; }
.eb-new {
  display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 18px 22px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--primary); color: var(--text); font-weight: 700; font-size: 15px; cursor: pointer;
}
.eb-new:hover { background: var(--primary-soft); }
.eb-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.eb-item { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; }
.eb-item .item-actions { display: flex; align-items: center; gap: 4px; flex: none; }
.eb-item-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; background: none; border: 0; cursor: pointer; text-align: left; padding: 6px; }
.eb-item-stripe { width: 4px; align-self: stretch; border-radius: 4px; background: var(--embed-color); }
.eb-item-text { display: flex; flex-direction: column; min-width: 0; }
.eb-item-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eb-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 40px 10px 20px; }
.eb-empty-art { width: 84px; height: 84px; border-radius: 24px; display: grid; place-items: center; margin-bottom: 8px; color: #818cf8;
  background: radial-gradient(circle at 30% 30%, rgba(129, 140, 248, .35), rgba(129, 140, 248, .08)); }
.eb-empty-art svg { width: 38px; height: 38px; }

.eb-sticky { position: sticky; top: var(--topbar); z-index: 12; margin: -26px -32px 0; padding: 14px 32px 10px; background: rgba(14, 16, 22, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.eb-header { display: flex; align-items: center; gap: 8px; }
.eb-header .spacer { flex: 1; }
.eb-name { font-size: 20px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eb-name-input { max-width: 320px; font-size: 18px; font-weight: 700; }
.eb-state { display: block; margin: 2px 0 0 46px; }
.eb-save:disabled { opacity: .45; }

.eb-card { padding: 0; }
.eb-card-head { width: 100%; display: flex; align-items: center; justify-content: space-between; background: none; border: 0; padding: 18px 22px; cursor: pointer; color: var(--text); }
.eb-card-head h2 { font-size: 16px; font-weight: 700; }
.eb-card-head .caret { transform: rotate(180deg); transition: transform .15s; color: var(--muted); }
.eb-card.closed .caret { transform: none; }
.eb-card.closed .eb-card-body { display: none; }
.eb-card-body { padding: 0 22px 22px; display: flex; flex-direction: column; gap: 16px; }
.req { color: var(--danger); }
.eb-link-row { display: flex; gap: 8px; }
.eb-link-row .input { flex: 1; }
.eb-top-links { display: flex; gap: 16px; }
.link-btn.danger { color: var(--danger); }

.eb-inline { background: #313338; border-radius: 12px; padding: 18px 16px 14px; }
.eb-discord { background: none; padding: 0; }
.eb-discord-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.eb-content .eb-ghost { background: #383a40; border-radius: 8px; padding: 10px 12px; }
.eb-ghost {
  width: 100%; background: transparent; border: 1px dashed transparent; border-radius: 6px; color: #dbdee1; outline: none; resize: none;
  padding: 3px 6px; font: inherit; font-size: 14px; line-height: 1.4; overflow: hidden;
}
.eb-ghost::placeholder { color: #80848e; }
.eb-embed-box.editing .eb-ghost { border-color: rgba(255, 255, 255, .08); }
.eb-ghost:hover { border-color: rgba(255, 255, 255, .18); }
.eb-ghost:focus { border-color: var(--primary); background: rgba(0, 0, 0, .18); }
.eb-ghost-wrap { position: relative; display: flex; flex-direction: column; gap: 4px; }
.eb-ghost-wrap .eb-count { position: absolute; right: 6px; bottom: 4px; opacity: 0; transition: opacity .15s; pointer-events: none; }
.eb-ghost-wrap:focus-within .eb-count, .eb-count.near, .eb-count.over { opacity: 1; }
.eb-ghost-wrap .eb-toolbar { display: none; }
.eb-ghost-wrap:focus-within .eb-toolbar { display: flex; }
.eb-count { font-size: 11px; color: #949ba4; font-variant-numeric: tabular-nums; }
.eb-count.near { color: var(--warning); }
.eb-count.over { color: var(--danger); font-weight: 700; }
.e-title-in { font-weight: 700; font-size: 15px; color: #fff; }
.e-author-in, .e-fname { font-weight: 600; font-size: 13px; color: #fff; }
.e-footer-in { font-size: 12px; }

.eb-toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: #2b2d31; border-radius: 6px; width: fit-content; }
.eb-fmt { min-width: 26px; height: 24px; padding: 0 6px; border: 0; border-radius: 4px; background: transparent; color: #b5bac1; cursor: pointer; font-size: 12px; }
.eb-fmt:hover { background: #404249; color: #fff; }
.eb-fmt.b { font-weight: 800; } .eb-fmt.i { font-style: italic; } .eb-fmt.u { text-decoration: underline; } .eb-fmt.s { text-decoration: line-through; }
.eb-mention { background: transparent; border: 0; color: #b5bac1; font-size: 12px; cursor: pointer; max-width: 46px; }
.eb-mention option, .eb-mention optgroup { background: var(--panel-2); color: var(--text); }

.eb-embed-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) 32px; gap: 8px; align-items: start; margin-left: -48px; }
.eb-embed-col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.eb-tools { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.eb-tool { width: 32px; height: 32px; border-radius: 8px; border: 0; display: grid; place-items: center; cursor: pointer; background: #2b2d31; color: #b5bac1; position: relative; }
.eb-tool svg { width: 16px; height: 16px; }
.eb-tool:hover { background: #404249; color: #fff; }
.eb-tool.on { background: var(--primary); color: #fff; }
.eb-tool.danger:hover { background: rgba(248, 113, 113, .2); color: var(--danger); }
.eb-tool:disabled { opacity: .4; cursor: not-allowed; }
.eb-color::after { content: ''; width: 16px; height: 16px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px #2b2d31, 0 0 0 3px rgba(255, 255, 255, .25); }
.eb-color input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.eb-swatches { display: flex; gap: 6px; flex-wrap: wrap; padding-left: 4px; }
.eb-swatch { width: 18px; height: 18px; border-radius: 50%; border: 0; cursor: pointer; box-shadow: 0 0 0 2px #313338; }
.eb-swatch.on { box-shadow: 0 0 0 2px #313338, 0 0 0 4px #fff; }

.embed.eb-embed-box { grid-template-columns: minmax(0, 1fr) auto; max-width: 520px; }
.embed.eb-embed-box.editing { padding: 10px 12px 12px; gap: 6px 10px; }
.eb-author, .eb-title-row, .eb-footer { display: flex; align-items: center; gap: 6px; }
.eb-footer { grid-column: 1 / -1; margin-top: 4px; }
.eb-slot {
  display: grid; place-items: center; border: 1px dashed rgba(255, 255, 255, .22); border-radius: 6px; background: rgba(0, 0, 0, .15);
  color: #80848e; cursor: pointer; overflow: hidden; padding: 0; flex: none;
}
.eb-slot:hover { border-color: var(--primary); color: #fff; }
.eb-slot svg { width: 20px; height: 20px; }
.eb-slot img { width: 100%; height: 100%; object-fit: cover; }
.eb-slot.filled { border-style: solid; border-color: transparent; }
.eb-slot.mini { width: 24px; height: 24px; }
.eb-slot.mini svg { width: 13px; height: 13px; }
.eb-slot.round { border-radius: 50%; }
.eb-slot.thumb { width: 80px; height: 80px; grid-column: 2; grid-row: 1; align-self: start; }
.eb-slot.big { grid-column: 1 / -1; height: 150px; width: 100%; }
.eb-slot.big.filled { height: auto; max-height: 300px; }
.eb-mini { flex: none; min-width: 22px; height: 22px; padding: 0 4px; border: 0; border-radius: 5px; background: rgba(0, 0, 0, .2); color: #949ba4; cursor: pointer; font-size: 11px; }
.eb-mini:hover { color: #fff; background: #404249; }
.eb-mini.on { color: #00a8fc; }
.eb-mini.danger:hover { color: var(--danger); }
.eb-mini:disabled { opacity: .35; cursor: not-allowed; }
.eb-field { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 6px; border-radius: 6px; background: rgba(0, 0, 0, .12); }
.eb-field-bar { display: flex; gap: 3px; justify-content: flex-end; }
.eb-add-field { grid-column: 1 / -1; justify-self: start; display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; color: #00a8fc; cursor: pointer; font-size: 13px; font-weight: 600; padding: 4px 2px; }
.eb-add-field svg { width: 14px; height: 14px; }
.eb-chip { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; flex: none; border: 1px solid rgba(255, 255, 255, .12); background: transparent; color: #949ba4; border-radius: 999px; font-size: 11px; padding: 2px 8px; cursor: pointer; }
.eb-chip svg { width: 12px; height: 12px; }
.eb-chip.on { background: var(--primary-soft); border-color: var(--primary); color: #fff; }

.eb-linkbtns { display: flex; flex-wrap: wrap; gap: 8px; }
.eb-linkbtn { display: flex; align-items: center; gap: 4px; background: #4e5058; border-radius: 6px; padding: 3px 6px; min-width: 200px; }
.eb-linkbtn .eb-ghost { color: #fff; font-weight: 500; }
.eb-lb-emoji { width: 36px !important; text-align: center; }
.eb-bottom { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .06); }
.eb-bottom .eb-count { margin-left: auto; }
.eb-problems { margin: 0; padding: 12px 16px 12px 34px; border-radius: 10px; background: rgba(251, 191, 36, .08); border: 1px solid rgba(251, 191, 36, .25); color: #fcd34d; font-size: 13px; }
.eb-problems li + li { margin-top: 4px; }

.eb-pop { position: absolute; z-index: 95; width: 300px; padding: 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--border); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; }
.eb-pop-actions { display: flex; justify-content: flex-end; gap: 6px; }
.modal-card.wide { width: min(760px, 100%); }
.modal-card.wide h2 { font-size: 20px; font-weight: 800; }
.modal-actions.end { justify-content: flex-end; width: 100%; }
.eb-json { min-height: 320px; margin-top: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }

/* reaction role templates */
.rrt-intro { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 8px 0 6px; }
.rrt-intro h2 { font-size: 20px; font-weight: 800; }
.rrt-intro p { max-width: 480px; font-size: 14px; }
.rrt-intro-art { display: flex; align-items: center; gap: 6px; font-size: 34px; margin-bottom: 6px; padding: 14px 22px; border-radius: 20px;
  background: radial-gradient(circle at 50% 40%, rgba(192, 132, 252, .28), rgba(192, 132, 252, .06)); }
.rrt-intro-art span:nth-child(2) { font-size: 22px; opacity: .8; }
.rrt-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.rrt-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; width: 100%; }
.rrt-card-head b { font-size: 15px; line-height: 1.3; }
.rrt-arrow { width: 16px; height: 16px; color: var(--muted); flex: none; transition: transform .15s, color .15s; }
.rrt-card:hover .rrt-arrow { color: var(--text); transform: translateX(2px); }
.rrt-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.rrt-tag { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.rrt-tag.essential { color: var(--success); }
.rrt-tag.function { color: #38bdf8; }
.rrt-tag.fun { color: #c084fc; }
.rrt-more { display: block; margin: 16px auto 0; background: none; border: 0; color: var(--muted); font-weight: 600; font-size: 13px; cursor: pointer; padding: 6px 10px; border-radius: 8px; }
.rrt-more:hover { color: var(--text); background: var(--panel-2); }
@media (max-width: 1100px) { .rrt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .rrt-grid { grid-template-columns: 1fr; } }
.rrt-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; padding: 16px; border-radius: 12px; cursor: pointer;
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text); transition: border-color .15s, transform .15s;
}
.rrt-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.rrt-card.scratch { border-style: dashed; }
.rrt-card .muted { flex: 1; }
.rrt-emojis { display: flex; gap: 2px; font-size: 22px; line-height: 1; min-height: 30px; align-items: center; margin-bottom: 4px; }
.rrt-emojis svg { width: 22px; height: 22px; color: var(--primary); }
.rrt-emojis.big { font-size: 34px; min-height: 44px; }
.rrt-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-top: 4px; }
.rrt-modal { display: flex; flex-direction: column; gap: 16px; }
.rrt-head { display: flex; gap: 16px; align-items: center; }
.rrt-head h2 { font-size: 20px; font-weight: 800; }
.rrt-head .badge { margin-top: 6px; }
.rrt-preview .e-desc { white-space: pre-wrap; }
.rrt-reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.rrt-reactions > span { display: inline-flex; align-items: center; gap: 6px; background: #2b2d31; border: 1px solid #3f4147; border-radius: 8px; padding: 2px 8px; font-size: 14px; }
.rrt-reactions b { font-size: 12px; color: #b5bac1; }
.rrt-roles { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow-y: auto; }
.rrt-role { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; background: var(--bg-2); }
.rrt-role .muted { flex: 1; }
.rrt-role b { white-space: nowrap; }
.rrt-emoji { font-size: 18px; width: 24px; text-align: center; }
.rrt-swatch { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.rrt-options { align-items: end; }
.rrt-create { display: flex; align-items: center; gap: 10px; font-size: 14px; padding-bottom: 10px; cursor: pointer; }
.rrt-create input { width: 18px; height: 18px; accent-color: var(--primary); }

/* markdown inside previews */
.md-code { background: #2b2d31; border-radius: 4px; padding: 1px 4px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 85%; }
.md-pre { background: #2b2d31; border: 1px solid #1e1f22; border-radius: 4px; padding: 8px; margin: 4px 0; white-space: pre-wrap; font-size: 13px; }
.md-quote { margin: 2px 0; padding-left: 10px; border-left: 4px solid #4e5058; }
.md-ul { margin: 2px 0; padding-left: 20px; }
.md-h { margin: 6px 0 2px; color: #fff; }
h3.md-h { font-size: 20px; } h4.md-h { font-size: 17px; } h5.md-h { font-size: 15px; }
.md-spoiler { background: #1e1f22; color: transparent; border-radius: 3px; cursor: pointer; }
.md-spoiler.shown { background: rgba(255, 255, 255, .1); color: inherit; }
.md-mention { background: rgba(88, 101, 242, .3); color: #c9cdfb; border-radius: 3px; padding: 0 2px; font-weight: 500; }
.discord a { color: #00a8fc; }
.embed .e-author { display: flex; align-items: center; gap: 8px; }
.e-author-icon, .e-footer-icon { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.e-footer-icon { width: 20px; height: 20px; }
.embed .e-footer { display: flex; align-items: center; gap: 8px; }
.d-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.d-btn { display: inline-flex; align-items: center; gap: 6px; background: #4e5058; color: #fff !important; font-size: 14px; font-weight: 500; padding: 6px 14px; border-radius: 4px; }
.d-btn svg { width: 14px; height: 14px; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .emoji-tile .icon-btn { opacity: 1; }
  .eb-sticky { margin: -20px -16px 0; padding: 12px 16px 8px; }
  .eb-embed-row { margin-left: 0; grid-template-columns: minmax(0, 1fr); }
  .eb-embed-row .eb-tools { flex-direction: row; }
  .eb-discord .ava { display: none; }
  .shell > .topbar { padding: 0 12px; }
  .hide-sm { display: none; }
  .banner { grid-template-columns: 1fr; }
  .content { padding: 20px 16px 120px; }
}

/* ═════════ dashboard layout pass: full-height sidebar, slim top bar, dark panels on a mid-tone page ═════════ */
:root {
  --bg: #272934;          /* page */
  --bg-2: #1f2129;        /* sidebar + top bar */
  --panel: #17181e;       /* cards and setting rows */
  --panel-2: #1d1e25;
  --panel-3: #2c2e3a;
  --border: #2e3040;
  --text: #f2f4fb;
  --muted: #9195ab;
  --faint: #656a83;
  --radius: 8px;
  --radius-sm: 6px;
  --sidebar: 300px;
  --topbar: 80px;
}
body { font-size: 14px; color: rgba(255, 255, 255, .78); }

.shell { grid-template-columns: var(--sidebar) minmax(0, 1fr); grid-template-rows: var(--topbar) 1fr; }
.shell > .sidebar { grid-column: 1; grid-row: 1 / -1; top: 0; height: 100vh; border-right: 0; }
.shell > .topbar { grid-column: 2; grid-row: 1; height: var(--topbar); padding: 0 40px; border-bottom: 0; background: var(--bg-2); }
.shell > .main { grid-column: 2; grid-row: 2; }
.top-brand { display: none; }
.pill { white-space: nowrap; }
.side-brand { height: var(--topbar); padding: 0 32px; font-size: 20px; flex: none; }
.side-brand img { width: 32px; height: 32px; }

.switcher { padding: 8px 20px 12px; }
.switcher-btn { height: 50px; padding: 0 14px; background: rgba(23, 24, 30, .7); border: 1px solid var(--panel); border-radius: 8px; }
.switcher-btn:hover { background: var(--panel); }
.switcher-btn .n { color: var(--text); font-size: 15px; }
.switcher .dropdown { left: 20px; right: 20px; }

.nav { padding: 4px 20px 40px; }
.nav a.nav-top, .nav a.nav-plugin { min-height: 34px; padding: 5px 12px; color: var(--muted); font-weight: 500; border-radius: 6px; }
.nav a.nav-top:hover, .nav a.nav-plugin:hover { background: rgba(255, 255, 255, .04); color: var(--text); }
.nav a.active { background: rgba(255, 255, 255, .06); color: var(--text); }
.nav-label { color: var(--faint); font-size: 11px; font-weight: 800; letter-spacing: .08em; padding: 18px 12px 6px; }

.content { padding: 40px 40px 120px; max-width: none; }

/* Plugin pages: plain header, then one dark row per settings group. */
.plugin-head { background: none !important; border: 0; padding: 0; margin-bottom: 20px; align-items: flex-start; }
.plugin-head h1 { font-size: 24px; font-weight: 700; color: #fff; letter-spacing: -.01em; }
.plugin-head p { color: var(--muted); margin-top: 6px; max-width: 760px; }
.plugin-head .toggle-wrap { font-weight: 600; font-size: 13px; color: var(--text); padding-top: 4px; }
.plugin-head .chips { margin-top: 10px; }
.disabled-note { border-radius: 8px; }

.card { background: var(--panel); border: 0; border-radius: 8px; }
.card.setting { padding: 0; margin-bottom: 12px; overflow: visible; }
.setting-head {
  width: 100%; min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 20px; background: none; border: 0; color: var(--text); text-align: left; cursor: pointer;
}
div.setting-head { cursor: default; }
.setting-head h2 { font-size: 14px; font-weight: 700; color: #fff; }
.setting-head .caret { color: var(--muted); transition: transform .15s; transform: rotate(180deg); }
.card.setting.closed .caret { transform: none; }
.card.setting.closed .setting-body { display: none; }
.setting-body { padding: 0 20px 20px; border-top: 1px solid rgba(255, 255, 255, .04); padding-top: 16px; }
.setting-body > .desc { margin: 0 0 14px; }
.setting-body > .fields { margin-top: 0; }
.card.setting:focus-within { box-shadow: 0 0 0 1px rgba(var(--primary-rgb), .35); }

.input, .select, .textarea, .multi { background: var(--field); border-color: var(--field-border); }
.list-item { background: var(--field); }
.list-item .list-item { background: var(--panel); }

/* Overview */
.banner { border: 0; }
.plugin-card { background: var(--panel); border: 1px solid transparent; }
.plugin-card:hover { border-color: var(--border-strong); }
.stat, .bstat { border-radius: 8px; }
.tabbar { border-bottom-color: var(--border-strong); }
.section-title { font-size: 16px; }

/* Embed builder: colour picker, inline links, button editor */
.cp-pop { position: absolute; z-index: 96; width: 270px; padding: 14px; border-radius: 10px; background: var(--field); border: 1px solid var(--border);
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; font-size: 12px; }
.cp-pop > b { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.cp-swatches { display: flex; flex-wrap: wrap; gap: 4px; }
.cp-swatch { width: 20px; height: 20px; border-radius: 50%; border: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); }
.cp-swatch:hover { transform: scale(1.12); }
.cp-square { position: relative; height: 150px; border-radius: 6px; cursor: crosshair; touch-action: none; margin-top: 4px; }
.cp-knob { position: absolute; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .4); transform: translate(-50%, -50%); pointer-events: none; }
.cp-hue { -webkit-appearance: none; appearance: none; width: 100%; height: 12px; border-radius: 6px; cursor: pointer;
  background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%); }
.cp-hue::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .4); }
.cp-hue::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 0; }
.cp-inputs { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 6px; }
.cp-inputs label { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--faint); font-size: 10px; text-transform: uppercase; }
.cp-inputs .input { padding: 5px 6px; font-size: 12px; text-align: center; }
.cp-num::-webkit-inner-spin-button { -webkit-appearance: none; }
.eb-color { display: grid; place-items: center; }

.eb-url-row { padding: 2px 0 4px; }
.eb-url-in { width: 100%; background: #1e1f22; border: 1px solid #3f4147; border-radius: 6px; color: #dbdee1; padding: 7px 10px; font-size: 13px; outline: none; }
.eb-url-in:focus { border-color: var(--primary); }
.eb-url-in.bad { border-color: var(--danger); }

.eb-field-bar { opacity: 0; transition: opacity .12s; }
.eb-field:hover .eb-field-bar, .eb-field:focus-within .eb-field-bar { opacity: 1; }
.eb-field { background: transparent; }
.eb-field:hover, .eb-field:focus-within { background: rgba(0, 0, 0, .12); }

.eb-linkbtns { flex-direction: column; align-items: stretch; }
.eb-linkbtn-block { display: flex; flex-direction: column; gap: 8px; max-width: 520px; }
.eb-linkbtn { background: none; padding: 0; min-width: 0; gap: 8px; }
.eb-lb-preview { border: 0; cursor: pointer; flex: none; max-width: 200px; }
.eb-lb-preview span:last-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eb-lb-preview.editing { box-shadow: 0 0 0 2px var(--primary); }
.eb-linkbtn .eb-url-in { flex: 1; }
.eb-btn-editor { background: #2b2d31; border-radius: 8px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.eb-btn-editor-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #b5bac1; }
.eb-btn-editor-row { display: flex; gap: 10px; }
.eb-btn-editor-row .field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #b5bac1; }
.eb-btn-editor-row .grow { flex: 1; }
.eb-emoji-field .input { width: 70px; text-align: center; }
.eb-btn-editor-actions { display: flex; justify-content: flex-end; gap: 8px; }

.eb-content { position: relative; display: flex; align-items: flex-start; gap: 8px; }
.eb-content > .eb-ghost-wrap { flex: 1; }
.eb-info { flex: none; width: 18px; height: 18px; margin-top: 10px; border-radius: 50%; border: 1px solid #80848e; color: #80848e;
  display: grid; place-items: center; font-size: 11px; font-weight: 700; font-style: italic; cursor: help; }
.eb-name { cursor: text; border-radius: 6px; padding: 2px 6px; margin-left: -6px; }
.eb-name:hover { background: rgba(255, 255, 255, .05); }

/* Embed builder clean-up: quieter editing surface */
.eb-embed-box.editing .eb-ghost { border-color: transparent; }
.eb-ghost { border-style: solid; }
.eb-ghost:hover { border-color: transparent; background: rgba(255, 255, 255, .03); }
.eb-ghost:focus { border-color: transparent; background: rgba(0, 0, 0, .2); box-shadow: 0 0 0 1px rgba(var(--primary-rgb), .6); }
.eb-content .eb-ghost { background: #383a40; }
.eb-content .eb-ghost:focus { background: #383a40; }
.eb-ghost-wrap:focus-within .eb-count { opacity: 0; }
.eb-ghost-wrap .eb-count.near, .eb-ghost-wrap .eb-count.over { opacity: 1; }
.eb-slot { border-color: rgba(255, 255, 255, .12); background: rgba(0, 0, 0, .12); }
.eb-mini { background: transparent; }
.eb-mini:hover { background: rgba(255, 255, 255, .08); }
.eb-time svg { width: 13px; height: 13px; }
.eb-time { margin-left: auto; }
.eb-time.on { color: #00a8fc; }
.eb-bottom { border-top: 0; padding-top: 4px; margin-top: 12px; }
.eb-bottom .btn-ghost { border-color: transparent; background: #2b2d31; }
.eb-bottom .btn-ghost:hover { background: #35373c; }
.eb-inline { padding: 18px 18px 14px; }
/* Sticky editor header: same colour as the page, lined up with the cards, and not pulled up over what's above it. */
.eb-sticky { margin: 0 -40px; padding: 14px 40px 12px; background: rgba(39, 41, 52, .96); border-bottom: 1px solid rgba(255, 255, 255, .06); }
@media (max-width: 900px) { .eb-sticky { margin: 0 -16px; padding: 12px 16px 10px; } }
.eb-save.has-changes::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--warning); margin-left: 2px; }
.eb-more { border-top: 1px solid rgba(255, 255, 255, .05); padding-top: 12px; }
.eb-more summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 600; list-style: none; display: inline-flex; align-items: center; gap: 6px; user-select: none; }
.eb-more summary::-webkit-details-marker { display: none; }
.eb-more summary::before { content: '▸'; font-size: 11px; transition: transform .15s; }
.eb-more[open] summary::before { transform: rotate(90deg); }
.eb-more summary:hover { color: var(--text); }
.eb-more-body { display: flex; flex-direction: column; gap: 16px; margin-top: 14px; }

.field-warn { margin: 6px 0 0; font-size: 12px; color: var(--warning); }

/* Role menu editor */
.rme { display: flex; flex-direction: column; gap: 18px; }
.rme .card { margin-bottom: 0; }
.rme .eb-card-body { padding-top: 20px; }
.rme-settings .segmented { margin-bottom: 6px; }
.rme-embed-row { margin-left: -48px; }
.rme-embed { min-width: 320px; }
.rme-embed .e-body { gap: 4px; }
.rme-lines { display: flex; flex-direction: column; gap: 3px; margin-top: 8px; font-size: 14px; color: #dbdee1; padding: 0 6px; }
.rme-lines:empty { display: none; }
.rme-line { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.rme-reactions { margin-top: 8px; }
.rme-reactions span { gap: 5px; }
.rme-emoji-img { width: 20px; height: 20px; object-fit: contain; }
.rme-emoji-char { font-size: 18px; line-height: 1; }
.rme-rows { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 10px; }
.rme-row { display: grid; grid-template-columns: 18px 48px minmax(0, 1.2fr) minmax(0, 1fr) 36px; gap: 10px; align-items: start; border-radius: 8px; }
.rme-row.dragging { opacity: .4; }
.rme-row.drop-target { box-shadow: 0 -2px 0 var(--primary); }
.rme-grip { cursor: grab; color: var(--faint); font-size: 16px; line-height: 42px; text-align: center; user-select: none; }
.rme-grip:hover { color: var(--text); }
.rme-toggle { display: flex; align-items: center; gap: 10px; font-size: 14px; margin: 10px 0 4px; cursor: pointer; }
.rme-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.rme-mode { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 8px; background: var(--field); border: 1px solid var(--field-border); cursor: pointer; }
.rme-mode.on { border-color: var(--primary); background: var(--primary-soft); }
.rme-mode input { margin-top: 3px; accent-color: var(--primary); }
.rme-mode > span { display: flex; flex-direction: column; gap: 2px; }
.rme-extras { margin-top: 8px; }
.d-btn.primary { background: #5865f2; }
.rme-buttons .d-btn { font-size: 13px; padding: 5px 12px; }
.rme-dropdown { max-width: 420px; }
.rme-dropdown-box { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border-radius: 4px; background: #1e1f22; color: #949ba4; font-size: 14px; }
.rme-dropdown-box svg { width: 16px; height: 16px; }
.rme-dropdown-list { margin-top: 4px; border-radius: 4px; background: #2b2d31; border: 1px solid #1e1f22; }
.rme-dropdown-opt { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 14px; color: #dbdee1; }
.rme-dropdown-opt + .rme-dropdown-opt { border-top: 1px solid rgba(255, 255, 255, .04); }
.rme-summary { margin: 0; padding: 4px 2px; }
.ep-use.ghost { background: transparent; border: 1px solid var(--border); color: var(--muted); }
.rme-emoji { width: 48px; height: 42px; border-radius: 8px; border: 1px solid var(--field-border); background: var(--field); display: grid; place-items: center; cursor: pointer; color: var(--muted); font-size: 18px; }
.rme-emoji:hover { border-color: var(--primary); color: var(--text); }
.rme-emoji.empty { border-style: dashed; }
.rme-role .field-warn { margin-top: 4px; }

.ep-pop { position: absolute; z-index: 96; width: 320px; max-height: 360px; display: flex; flex-direction: column; gap: 8px; padding: 12px;
  border-radius: 10px; background: var(--field); border: 1px solid var(--border); box-shadow: var(--shadow); }
.ep-body { overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.ep-body > b { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 4px; }
.ep-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.ep-item { height: 34px; border: 0; border-radius: 6px; background: none; cursor: pointer; font-size: 20px; display: grid; place-items: center; }
.ep-item:hover { background: rgba(255, 255, 255, .08); }
.ep-item img { width: 24px; height: 24px; object-fit: contain; }
.ep-use { align-self: flex-start; border: 0; border-radius: 6px; background: var(--primary-soft); color: var(--text); padding: 6px 10px; cursor: pointer; font-weight: 600; }
.ep-use span { font-size: 18px; margin-left: 4px; }
@media (max-width: 900px) {
  .rme-embed-row { margin-left: 0; }
  .rme-embed { min-width: 0; }
  .rme-row { grid-template-columns: 18px 48px minmax(0, 1fr) 36px; }
  .rme-row .rme-label { grid-column: 3 / 4; }
  .rme-modes { grid-template-columns: 1fr; }
}
.list-limit { text-align: center; padding: 8px; }

/* Welcome page: badges, tabs, counters, previews */
.new-badge { display: inline-block; margin-left: 10px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700;
  background: rgba(52, 211, 153, .15); color: var(--success); vertical-align: middle; }
.setting-preview { margin-bottom: 18px; }
.mini-discord { max-width: 560px; }
.d-btn.success { background: #248046; }
.what-happens { margin-top: 12px; padding: 12px 16px; border-radius: 8px; background: var(--field); font-size: 13px; }
.what-happens ul { margin: 6px 0 0; padding-left: 20px; color: var(--muted); }
.what-happens li + li { margin-top: 3px; }
.card-actions { align-items: center; }
.segmented { display: inline-flex; padding: 3px; gap: 3px; border-radius: 8px; background: var(--field); border: 1px solid var(--field-border); }
.segmented button { border: 0; background: none; color: var(--muted); font-weight: 600; font-size: 13px; padding: 7px 14px; border-radius: 6px; cursor: pointer; }
.segmented button:hover { color: var(--text); }
.segmented button.on { background: var(--primary); color: #fff; }
.textarea-wrap { position: relative; }
.char-count { position: absolute; right: 10px; bottom: 8px; font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; pointer-events: none; }
.char-count.over { color: var(--danger); font-weight: 700; }
.textarea-wrap .textarea { padding-bottom: 24px; }
.welcome-card { position: relative; width: 100%; max-width: 560px; aspect-ratio: 1024 / 450; border-radius: 14px; overflow: hidden; border: 1px solid rgba(255,255,255,.10); box-shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 28px rgba(0,0,0,.28); }
.wc-overlay { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; padding: 10px; }
.wc-avatar { width: 24%; aspect-ratio: 1; border-radius: 50%; border: 3px solid; object-fit: cover; margin-bottom: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.45); }
.wc-title { font-weight: 800; letter-spacing: -.01em; font-size: clamp(14px, 3.6vw, 26px); line-height: 1.15; text-shadow: 0 2px 6px rgba(0,0,0,.5); }
.wc-sub { font-weight: 600; font-size: clamp(11px, 2.2vw, 16px); opacity: .82; text-shadow: 0 1px 4px rgba(0,0,0,.5); }

/* ═════════ server picker ═════════ */
.picker { max-width: 1120px; padding: 48px 24px 96px; }
.picker-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 36px; }
.picker-hello { display: flex; align-items: center; gap: 16px; min-width: 0; }
.picker-hello img { width: 56px; height: 56px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .45); flex: none; }
.picker-hello h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; text-align: left; }
.picker-hello p { margin: 4px 0 0; text-align: left; }
.picker-tools { display: flex; align-items: center; gap: 10px; }
.picker-tools .btn svg { width: 16px; height: 16px; }
.picker-search { width: 240px; }
.picker-section { margin-bottom: 40px; }
.picker-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.picker-section-head h2 { font-size: 16px; font-weight: 700; color: #fff; }
.picker-section-head .count { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--panel); padding: 2px 9px; border-radius: 999px; }

.picker .guild-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.picker .guild-card { background: var(--panel); border: 1px solid rgba(255, 255, 255, .05); border-radius: 14px; overflow: hidden;
  transition: transform .18s, border-color .18s, box-shadow .18s; }
.picker .guild-card:hover { transform: translateY(-4px); border-color: rgba(var(--primary-rgb), .45); box-shadow: 0 14px 32px rgba(0, 0, 0, .35); }
.picker .guild-card .banner { position: relative; height: 92px; overflow: hidden; }
.picker .guild-card .banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(23, 24, 30, 0) 30%, var(--panel) 100%); }
.picker .guild-card .blur { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(28px) saturate(1.6); opacity: .75; }
.gc-status { position: absolute; z-index: 1; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; background: rgba(0, 0, 0, .45); color: #d1fae5; backdrop-filter: blur(6px); }
.gc-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(52, 211, 153, .25); }
.picker .guild-card .body { position: relative; z-index: 1; margin-top: -44px; padding: 0 18px 18px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.gc-icon .gicon { width: 84px; height: 84px; border: 4px solid var(--panel); font-size: 24px; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); background: var(--panel-3); }
.picker .guild-card .name { font-size: 16px; font-weight: 700; color: #fff; margin-top: 6px; max-width: 100%; }
.gc-meta { font-size: 12.5px; color: var(--muted); min-height: 18px; margin-bottom: 8px; }
.picker .guild-card .btn { width: 100%; }
.picker .guild-card .btn svg { width: 16px; height: 16px; }
.picker .guild-card:not(.is-added) .gicon { filter: saturate(.6); opacity: .85; }
.picker .guild-card:not(.is-added):hover .gicon { filter: none; opacity: 1; }

.add-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 250px; padding: 20px;
  text-align: center; color: var(--text); border: 2px dashed rgba(var(--primary-rgb), .35) !important; background: rgba(var(--primary-rgb), .05) !important; }
.add-card:hover { background: rgba(var(--primary-rgb), .1) !important; }
.add-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-light); margin-bottom: 4px; }
.add-icon svg { width: 26px; height: 26px; }

.picker-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 60px 20px; background: var(--panel); border-radius: 14px; }
.picker-empty h2 { font-size: 20px; font-weight: 800; }
.picker-empty p { max-width: 460px; }
.picker-empty-art { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; background: #5865f2; color: #fff; margin-bottom: 6px; }
.picker-empty-art svg { width: 36px; height: 36px; }
.picker-empty-actions { margin-top: 8px; }

.site-user .user-btn { color: var(--text); }
.site-user .user-btn .uname { font-weight: 600; }
.site-user .dropdown { right: 0; left: auto; width: 230px; top: calc(100% + 8px); }
@media (max-width: 640px) {
  .picker { padding: 28px 16px 72px; }
  .picker-hello h1 { font-size: 21px; }
  .picker-tools { width: 100%; }
  .picker-search { flex: 1; width: auto; }
}

/* Leaderboard/picker cards pick up the darker panels too */
.guild-card, .lb-row, .feature, .rrt-card, .eb-item, .emoji-tile { border-radius: 8px; }
.guild-card, .lb-row { background: var(--panel); border-color: transparent; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: 64px 1fr; }
  .shell > .sidebar { position: fixed; top: 0; height: 100vh; z-index: 50; }
  .shell > .topbar { grid-column: 1; height: 64px; padding: 0 12px; }
  .shell > .main { grid-column: 1; }
  .top-brand { display: flex; }
  .content { padding: 20px 16px 120px; }
}

/* ═════════ visual polish pass ═════════ */

/* Settings groups: the fields inside each group had no spacing between them. */
.setting-body > .fields { display: flex; flex-direction: column; gap: 18px; }
.setting-body .field.toggle { padding: 4px 0; }
.setting-body .field.toggle + .field.toggle { margin-top: -6px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .04); }
.setting-body .card-actions { border-top-color: rgba(255, 255, 255, .06); }
.field > label, .field > .flabel { color: var(--label); }
.setting-head:hover h2 { color: #fff; }
button.setting-head:hover { background: rgba(255, 255, 255, .02); }

/* Buttons: secondary buttons were too faint to read as clickable. */
.btn-ghost { border-color: var(--border-strong); background: rgba(255, 255, 255, .03); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, .07); border-color: var(--border-hover); }
.btn-primary { box-shadow: 0 4px 14px rgba(var(--primary-rgb), .25); }
.btn-primary:hover { box-shadow: 0 6px 18px rgba(var(--primary-rgb), .35); }
.btn-enable { background: var(--field); border: 1px solid var(--border-strong); }
.btn:disabled:hover { background: inherit; }

/* Keyboard focus is always visible. */
:where(a, button, input, select, textarea, [tabindex]):focus-visible { outline: 2px solid var(--primary-light); outline-offset: 2px; }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: none; }

/* Sidebar */
.sidebar { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; border: 2px solid var(--bg-2); }
.side-brand { border-bottom: 1px solid rgba(255, 255, 255, .04); }
.switcher { padding: 16px 20px 10px; }
.switcher-btn { transition: background .15s, border-color .15s; }
.switcher-btn:hover { border-color: var(--border); }
.switcher-btn svg { color: var(--muted); }
.nav { padding: 6px 14px 40px; }
.nav a.nav-top, .nav a.nav-plugin {
  position: relative; min-height: 38px; padding: 6px 10px; gap: 12px; margin-bottom: 2px; border-radius: 8px;
  color: var(--nav-text); font-size: 14px; transition: background .12s, color .12s;
}
.nav a.nav-top svg { width: 18px; height: 18px; color: #7d839b; transition: color .12s; }
.nav a.nav-top:hover svg, .nav a.nav-top.active svg { color: #fff; }
.nav a.active { background: rgba(var(--primary-rgb), .14); color: #fff; font-weight: 600; }
.nav a.active::before { content: ''; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
.nav-plugin .nicon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--tint) !important; }
.nav-plugin .nicon svg { width: 16px; height: 16px; }
.nav-plugin .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-plugin .status { width: 7px; height: 7px; margin-left: auto; border-radius: 50%; background: transparent; box-shadow: inset 0 0 0 1.5px #4a4f63; }
.nav-plugin .status.on { background: var(--success); box-shadow: 0 0 0 3px rgba(52, 211, 153, .15); }
.nav-section { margin-top: 14px; }
.nav-label { padding: 10px 10px 6px; border-radius: 6px; }
.nav-label:hover { background: rgba(255, 255, 255, .02); }
.nav-label .caret { width: 13px; height: 13px; }
.hovercard { border-radius: 12px; }

/* Plugin category tabs: pill tabs with counts. */
.tabbar { gap: 6px; border-bottom: 0; margin-bottom: 28px; padding: 4px; border-radius: 12px; background: var(--panel); }
.tabs { gap: 4px; scroll-behavior: smooth; }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 9px; font-size: 13.5px; color: var(--nav-text); transition: background .12s, color .12s; }
.tab:hover { background: rgba(255, 255, 255, .04); color: #fff; }
.tab.active { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(var(--primary-rgb), .3); }
.tab.active::after { display: none; }
.tab-count { font-size: 11px; font-weight: 700; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: rgba(255, 255, 255, .07); color: var(--label); text-align: center; }
.tab.active .tab-count { background: rgba(255, 255, 255, .22); color: #fff; }
.tab-arrow { flex: none; width: 32px; height: 32px; border-radius: 8px; }
.tab-arrow[hidden] { display: none; }

/* Segmented controls (Text / Embed, Emoji / Button / Dropdown) share the same look. */
.segmented { background: var(--bg-2); border-color: var(--border); border-radius: 10px; }
.segmented button { border-radius: 7px; transition: background .12s, color .12s; }

/* Overview cards and section titles */
.section-title { border-bottom-width: 0; padding-bottom: 0; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.section-title::after { content: ''; flex: 1; height: 1px; background: rgba(255, 255, 255, .06); }
.plugin-card { border-radius: 12px; transition: transform .15s, border-color .15s, box-shadow .15s; }
.plugin-card:hover { box-shadow: 0 10px 26px rgba(0, 0, 0, .3); }
.plugin-card.is-on { border-color: rgba(52, 211, 153, .25); }
.banner { border-radius: 16px; }

/* Plugin page header */
.plugin-head .chips { gap: 6px; }
.chip { background: var(--field); border: 1px solid var(--border); color: var(--label); }

/* Inputs */
.input, .select, .textarea, .multi { border-radius: 8px; transition: border-color .15s, box-shadow .15s, background .15s; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--border-strong); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }

/* Top bar */
.shell > .topbar { box-shadow: 0 1px 0 rgba(255, 255, 255, .04); }
.icon-btn:focus-visible { outline-offset: 0; }

/* Toasts */
.toast { background: var(--field); border-color: var(--border); border-radius: 10px; box-shadow: 0 12px 30px rgba(0, 0, 0, .45); }

/* Leaderboard */
.lb-row { border: 1px solid transparent; transition: border-color .15s; }
.lb-row:hover { border-color: var(--border); }
.ring span { background: var(--panel); }

/* Enable panel shown over a switched-off plugin */
.plugin-gate { position: relative; min-height: calc(100vh - 140px); }
.gate-behind { filter: blur(3px) grayscale(.4); opacity: .35; pointer-events: none; user-select: none; max-height: calc(100vh - 140px); overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 40%, transparent); mask-image: linear-gradient(#000 40%, transparent); }
.gate-card {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100% - 8px));
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 32px 28px 26px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
  animation: gate-in .18s ease-out;
}
.gate-card .picon.gate-icon { width: 64px; height: 64px; border-radius: 16px; margin-bottom: 4px; }
.gate-card .picon.gate-icon svg { width: 30px; height: 30px; }
.gate-card h2 { font-size: 20px; font-weight: 800; color: #fff; }
.gate-card > p { color: var(--muted); font-size: 14px; line-height: 1.5; }
.gate-card .chips { justify-content: center; margin-top: 2px; }
.gate-card .gate-hint { font-size: 13px; margin-top: 6px; }
.gate-actions { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; justify-content: center; }
@keyframes gate-in { from { opacity: 0; transform: translate(-50%, calc(-50% + 8px)); } }
@media (max-width: 600px) { .gate-card { padding: 26px 18px 20px; } }
/* On short screens there is no room to centre, so pin it near the top instead. */
@media (max-height: 560px) {
  .gate-card { top: 24px; transform: translateX(-50%); }
  @keyframes gate-in { from { opacity: 0; transform: translate(-50%, 8px); } }
}

/* Sidebar rows like MEE6: status dot on the left, then a plain line icon and the name */
.nav a.nav-plugin { gap: 10px; padding-left: 10px; }
.nav-plugin .status { order: 0; margin-left: 0; width: 5px; height: 5px; background: #3b4050; box-shadow: none; }
.nav-plugin .status.on { background: #5b8cff; box-shadow: none; }
.nav-plugin .nicon { width: 18px; height: 18px; border-radius: 0; background: none !important; color: inherit !important; }
.nav-plugin .nicon svg { width: 17px; height: 17px; }
.nav a.nav-top .icon { width: 17px; height: 17px; }

/* Server picker (MEE6-style cards) */
.srv-page { max-width: 1140px; margin: 0 auto; padding: 48px 24px 80px; }
.srv-title { text-align: center; font-size: 34px; font-weight: 800; color: #fff; letter-spacing: -.01em; }
.srv-tools { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 14px 0 44px; }
.srv-search { max-width: 280px; }
.srv-refresh { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; padding: 6px 8px; border-radius: 6px; }
.srv-refresh:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.srv-refresh svg { width: 14px; height: 14px; }
.srv-refresh:disabled { opacity: .5; cursor: progress; }
.srv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 263px)); justify-content: center; gap: 44px 72px; }
.srv-card { min-width: 0; }
.srv-banner { position: relative; display: grid; place-items: center; height: 152px; border-radius: 8px; overflow: hidden; background: #2f3240; }
.srv-blur { position: absolute; inset: -20px; background-size: cover; background-position: center; filter: blur(18px) brightness(.55); transform: scale(1.1); }
.srv-icon { position: relative; width: 80px; height: 80px; border-radius: 50%; border: 2px solid #fff; overflow: hidden; display: grid; place-items: center; background: #3a3d4c; }
.srv-icon > * { width: 100% !important; height: 100% !important; border-radius: 50% !important; font-size: 26px; }
.srv-icon img { object-fit: cover; }
.srv-banner:hover .srv-icon { transform: scale(1.04); }
.srv-icon { transition: transform .15s; }
.srv-foot { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.srv-text { flex: 1; min-width: 0; }
.srv-name { font-weight: 700; font-size: 15px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srv-role { font-size: 13px; color: #8e94ab; margin-top: 4px; }
.srv-btn { flex: none; display: inline-grid; place-items: center; min-width: 69px; height: 48px; padding: 0 20px; border-radius: 6px; font-weight: 600; font-size: 15px; color: #fff; text-decoration: none; transition: filter .12s; }
.srv-btn:hover { filter: brightness(1.1); }
.srv-btn.go { background: #3b95ff; }
.srv-btn.setup { background: #4c5062; }
@media (max-width: 600px) { .srv-page { padding-top: 32px; } .srv-title { font-size: 26px; } .srv-grid { grid-template-columns: 1fr; gap: 32px; } }

/* Owner & Admin panels */
.op-page { max-width: 1180px; margin: 0 auto; padding: 36px 24px 80px; }
.op-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.op-head h1 { font-size: 28px; font-weight: 800; color: #fff; margin-top: 8px; }
.op-head p { margin-top: 4px; }
.op-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: #fbbf24; background: rgba(251, 191, 36, .12); padding: 4px 10px; border-radius: 999px; }
.op-badge svg { width: 13px; height: 13px; }
.op-switch { display: flex; gap: 4px; padding: 4px; background: var(--panel); border-radius: 10px; }
.op-switch a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 7px; color: var(--muted); font-weight: 600; font-size: 14px; text-decoration: none; }
.op-switch a svg { width: 16px; height: 16px; }
.op-switch a:hover { color: var(--text); }
.op-switch a.active { background: var(--primary); color: #fff; }
.op-body { display: flex; flex-direction: column; gap: 16px; }
.op-loading { color: var(--muted); padding: 40px; text-align: center; }
.op-card { background: var(--panel); border-radius: 10px; padding: 20px; min-width: 0; }
.op-card-head { margin-bottom: 16px; }
.op-card-head h2 { font-size: 16px; font-weight: 700; color: #fff; }
.op-card-head p { font-size: 13px; margin-top: 4px; }
.op-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.op-bot { display: flex; align-items: center; gap: 16px; }
.op-bot img { width: 64px; height: 64px; border-radius: 50%; }
.op-bot-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.op-bot-text h2 { font-size: 20px; font-weight: 800; color: #fff; }
.op-live { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--warning); }
.op-live .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.op-live.on { color: var(--success); }
.op-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.op-stat { display: flex; align-items: center; gap: 12px; background: var(--panel); border-radius: 10px; padding: 16px; }
.op-stat-ic { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; background: rgba(var(--primary-rgb), .14); color: var(--primary-light); flex: none; }
.op-stat-ic svg { width: 18px; height: 18px; }
.op-stat b { display: block; font-size: 19px; font-weight: 800; color: #fff; line-height: 1.2; }
.op-stat span { font-size: 12px; color: var(--muted); }
.op-stat small { display: block; font-size: 11px; color: var(--faint); margin-top: 2px; }
.op-form-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.op-form-row label { display: flex; flex-direction: column; gap: 6px; min-width: 140px; }
.op-form-row label.grow { flex: 1; min-width: 180px; }
.op-form-row label > span, .op-field > span { font-size: 12px; font-weight: 600; color: var(--label); }
.op-field { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.op-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.op-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-radius: 8px; background: var(--bg-2, rgba(0, 0, 0, .18)); }
.op-switch-row > div { display: flex; flex-direction: column; gap: 2px; }
.op-switch-row.warn { background: rgba(251, 191, 36, .1); box-shadow: inset 0 0 0 1px rgba(251, 191, 36, .3); }
.op-switch-row.warn b { color: var(--warning); }
.op-bars { display: flex; flex-direction: column; gap: 10px; }
.op-bar { display: grid; grid-template-columns: 140px 1fr 32px; align-items: center; gap: 10px; font-size: 13px; }
.op-bar .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.op-bar .track { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.op-bar .track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #3b95ff); }
.op-bar b { text-align: right; color: #fff; }
.op-toolbar { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.op-search { max-width: 280px; }
.op-table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
.op-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.op-table th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.op-table td { padding: 10px; border-bottom: 1px solid rgba(255, 255, 255, .04); vertical-align: middle; white-space: nowrap; }
.op-table tr:last-child td { border-bottom: 0; }
.op-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.op-table td.empty { text-align: center; color: var(--muted); padding: 24px; }
.op-row-actions { text-align: right; }
.op-row-actions > * + * { margin-left: 6px; }
.op-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.op-who b { color: #fff; font-weight: 600; }
.op-ava { width: 32px; height: 32px; border-radius: 50%; flex: none; }
.op-tag { margin-left: 6px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #fbbf24; background: rgba(251, 191, 36, .12); padding: 2px 6px; border-radius: 4px; vertical-align: 1px; }
.op-id { background: none; border: 0; padding: 0; font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; color: #8e94ab; cursor: copy; }
.op-id:hover { color: var(--text); text-decoration: underline; }
.op-list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.op-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 8px; background: rgba(0, 0, 0, .18); }
.op-list li b { color: #fff; }
.op-card > .muted.small { margin-top: 14px; }
@media (max-width: 860px) { .op-grid2 { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .op-page { padding: 24px 16px 60px; }
  .op-switch { width: 100%; }
  .op-switch a { flex: 1; justify-content: center; }
  .op-bot { flex-wrap: wrap; }
  .op-bar { grid-template-columns: 100px 1fr 28px; }
}

/* Announcement banner */
.announce { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 8px; font-size: 14px; font-weight: 500; margin-bottom: 16px;
  background: rgba(59, 149, 255, .12); color: #9cc8ff; box-shadow: inset 0 0 0 1px rgba(59, 149, 255, .25); }
.announce > svg { width: 16px; height: 16px; flex: none; }
.announce > span { flex: 1; min-width: 0; color: var(--text); }
.announce.success { background: rgba(52, 211, 153, .1); color: var(--success); box-shadow: inset 0 0 0 1px rgba(52, 211, 153, .25); }
.announce.warning { background: rgba(251, 191, 36, .1); color: var(--warning); box-shadow: inset 0 0 0 1px rgba(251, 191, 36, .28); }
.announce.danger { background: rgba(248, 113, 113, .1); color: var(--danger); box-shadow: inset 0 0 0 1px rgba(248, 113, 113, .28); }
.announce-x { background: none; border: 0; color: inherit; cursor: pointer; padding: 2px; border-radius: 4px; display: grid; place-items: center; opacity: .7; }
.announce-x:hover { opacity: 1; background: rgba(255, 255, 255, .06); }
.announce-x svg { width: 14px; height: 14px; }
.main > .announce { margin: 16px 40px 0; }
.srv-page > .announce { margin: 0 auto 24px; max-width: 760px; }
@media (max-width: 900px) { .main > .announce { margin: 12px 16px 0; } }

/* Support server (Discord invite) */
.btn-discord { background: #5865f2; color: #fff; }
.btn-discord:hover { background: #4752c4; }
.btn-discord svg { width: 16px; height: 16px; }
.site-footer-link { display: inline-flex; align-items: center; gap: 6px; color: #aab2ff; text-decoration: none; }
.site-footer-link:hover { color: #fff; }
.site-footer-link svg { width: 16px; height: 16px; }
.eb-content-label { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #b5bac1; margin: 6px 0 4px; }
.eb-content-label span { margin-left: 6px; font-weight: 500; letter-spacing: 0; text-transform: none; color: #80848e; }

/* Enable pop-up from the plugin cards (same panel as a disabled plugin's page) */
.enable-modal { z-index: 90; }
.gate-card.in-modal { position: relative; left: auto; top: auto; transform: none; animation: gate-pop .16s ease-out; }
@keyframes gate-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }

/* ── Public site: MEE6-style nav menus ── */
.site-nav { position: sticky; }
.site-nav .links { gap: 6px; align-items: center; height: 100%; }
.mm { position: static; height: 100%; display: flex; align-items: center; }
.mm-btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border: 0; border-radius: 8px; background: none;
  color: var(--muted); font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; }
.mm-btn:hover, .mm.open .mm-btn, .mm:focus-within .mm-btn { color: var(--text); background: rgba(255, 255, 255, .05); }
.mm-caret { width: 14px; height: 14px; transition: transform .15s; }
.mm.open .mm-caret { transform: rotate(180deg); }
.mm-panel { position: absolute; left: 0; right: 0; top: 100%; background: #16181f; border-bottom: 1px solid var(--border);
  box-shadow: 0 24px 48px rgba(0, 0, 0, .45); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .14s, transform .14s, visibility .14s; }
.mm.open .mm-panel { opacity: 1; visibility: visible; transform: none; }
@media (hover: hover) and (min-width: 861px) {
  .mm:hover .mm-panel { opacity: 1; visibility: visible; transform: none; }
  .mm:hover .mm-btn { color: var(--text); background: rgba(255, 255, 255, .05); }
  .mm:hover .mm-caret { transform: rotate(180deg); }
}
.mm-inner { max-width: 1180px; margin: 0 auto; padding: 26px 20px 30px; display: grid; grid-template-columns: 2fr 1fr; gap: 12px 40px; }
.mm-col { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); align-content: start; gap: 4px 16px; }
.mm-col + .mm-col { border-left: 1px solid var(--border); padding-left: 32px; grid-template-columns: 1fr; }
.mm-title { grid-column: 1 / -1; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint, var(--faint)); margin: 0 0 8px 10px; }
.mm-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 10px; color: var(--text); text-decoration: none; }
.mm-item:hover { background: rgba(255, 255, 255, .05); }
.mm-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: rgba(var(--primary-rgb), .14); color: var(--primary-light); }
.mm-ic svg { width: 19px; height: 19px; }
.mm-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mm-text b { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #fff; }
.mm-text span { font-size: 13px; color: var(--muted); line-height: 1.4; }
.mm-ext { width: 12px; height: 12px; color: var(--muted); }
.mm-burger { display: none; }
.mm-mobile { position: absolute; left: 0; right: 0; top: 100%; max-height: calc(100vh - 68px); overflow-y: auto; background: #16181f;
  border-bottom: 1px solid var(--border); padding: 12px 16px 20px; box-shadow: 0 24px 48px rgba(0, 0, 0, .45); }
.mm-mobile-group + .mm-mobile-group { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.mm-mobile .mm-title { margin: 4px 0 6px 10px; }
@media (max-width: 860px) {
  .site-nav { gap: 12px; }
  .site-nav .links { display: none; }
  .mm-burger { display: grid; }
  .site-nav > .btn .label { display: none; }
}
@media (min-width: 861px) { .mm-mobile { display: none !important; } }

/* ── Public site footer (columns like MEE6) ── */
.site-footer { display: block; padding: 48px max(20px, calc((100vw - 1180px) / 2)) 28px; }
.sf-top { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.sf-brand p { margin-top: 12px; color: var(--muted); max-width: 280px; }
.sf-col { display: flex; flex-direction: column; gap: 10px; }
.sf-col b { color: #fff; font-size: 14px; margin-bottom: 4px; }
.sf-col a { color: var(--muted); text-decoration: none; font-size: 14px; }
.sf-col a:hover { color: var(--text); }
.sf-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); }
@media (max-width: 760px) { .sf-top { grid-template-columns: 1fr 1fr; } .sf-brand { grid-column: 1 / -1; } }

/* ── Public sub-pages ── */
.page-hero { position: relative; overflow: hidden; text-align: center; padding: 80px max(20px, calc((100vw - 900px) / 2)) 40px; }
.page-hero::before { content: ''; position: absolute; left: 50%; top: -420px; width: 900px; height: 700px; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--primary-rgb), .25), transparent 62%); pointer-events: none; }
.page-hero > * { position: relative; }
.page-hero h1 { font-size: clamp(34px, 5vw, 54px); font-weight: 800; letter-spacing: -.03em; line-height: 1.08; }
.page-hero p { margin: 16px auto 0; font-size: 18px; color: var(--muted); max-width: 640px; }
.page-hero .ctas { display: flex; justify-content: center; gap: 12px; margin-top: 28px; }
.page-hero .section { padding-top: 0; }
.section-more { display: flex; justify-content: center; margin-top: 8px; }
.section-more .btn svg { width: 16px; height: 16px; }
.feature-link { display: block; color: inherit; text-decoration: none; }
.feature-cat h3 a { color: inherit; text-decoration: none; }
.feature-cat h3 a:hover { color: var(--primary-light); }

.cat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin-bottom: 56px; }
.cat-card { display: flex; flex-direction: column; gap: 8px; padding: 20px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border);
  color: inherit; text-decoration: none; transition: transform .15s, border-color .15s; }
.cat-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.cat-card b { font-size: 16px; color: #fff; margin-top: 6px; }
.cat-card > span:not(.mm-ic):not(.cat-count) { font-size: 13px; color: var(--muted); line-height: 1.45; flex: 1; }
.cat-count { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--primary-light); }
.cat-count svg { width: 14px; height: 14px; }

.cat-tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 28px; }
.cat-tabs a { padding: 8px 14px; border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; background: var(--panel); }
.cat-tabs a:hover { color: var(--text); }
.cat-tabs a.active { background: var(--primary); color: #fff; }

.cmd-search { max-width: 420px; margin: 28px auto 0; display: block; }
.cmd-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.cmd-group { background: var(--panel); border-radius: var(--radius); padding: 18px; border: 1px solid var(--border); }
.cmd-group-head { display: flex; align-items: flex-start; gap: 12px; }
.cmd-group-head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cmd-group-head b { color: #fff; }
.cmd-group-head span { font-size: 13px; color: var(--muted); line-height: 1.4; }
.cmd-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.cmd-list code { font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; padding: 4px 9px; border-radius: 6px; background: var(--panel-3, #2a2d3a); color: #d6d9ff; }
@media (max-width: 420px) { .cmd-groups { grid-template-columns: 1fr; } }
.mm-col.stack { grid-template-columns: 1fr; }
.mm-inner.even { grid-template-columns: 1fr 1fr; max-width: 820px; margin-left: max(20px, calc((100vw - 1180px) / 2)); }

/* Category page: compact plugin cards (replaces the big alternating rows) */
.page-hero:has(.cat-tabs) { padding-bottom: 8px; }
.section.plugin-cards { padding-top: 32px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pcard { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 12px; padding: 20px 22px; border-radius: 14px;
  background: radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--c) 13%, transparent), transparent 55%), var(--panel);
  border: 1px solid var(--border); scroll-margin-top: 90px; transition: border-color .15s, transform .15s; }
.pcard:hover { border-color: color-mix(in srgb, var(--c) 45%, var(--border)); transform: translateY(-2px); }
.pcard:target { border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 25%, transparent); }
.pcard-head { display: flex; align-items: center; gap: 12px; }
.pcard-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; color: var(--c);
  background: color-mix(in srgb, var(--c) 16%, var(--panel)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 28%, transparent); }
.pcard-icon svg { width: 21px; height: 21px; }
.pcard h2 { font-size: 17px; font-weight: 700; color: #fff; letter-spacing: -.01em; }
.pcard-sub { font-size: 12px; color: var(--muted); }
.pcard p { color: var(--muted); font-size: 14px; line-height: 1.55; flex: 1; }
.pcard-cmds { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pcard-cmds code { font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; padding: 3px 8px; border-radius: 6px; background: rgba(255, 255, 255, .05); color: #d6d9ff; }
.pcard-more { font-size: 12px; color: var(--primary-light); text-decoration: none; }
.pcard-more:hover { text-decoration: underline; }
.pcard-actions { display: flex; gap: 8px; margin-top: 4px; }
.pcard-actions .btn svg { width: 14px; height: 14px; }
@media (max-width: 760px) { .section.plugin-cards { grid-template-columns: 1fr; } }

/* ── Premium ── */
:root { --gold: #f5b041; --gold-2: #f7c56b; --gold-soft: rgba(245, 176, 65, .14); }
.prem-badge { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 2px 8px; border-radius: 999px; vertical-align: 1px;
  font-size: 11px; font-weight: 700; letter-spacing: .02em; color: var(--gold-2); background: var(--gold-soft); box-shadow: inset 0 0 0 1px rgba(245, 176, 65, .3); }
.prem-badge svg { width: 12px; height: 12px; }
.btn-premium { background: linear-gradient(135deg, #f7c56b, #e8912d); color: #2a1a05; font-weight: 700; }
.btn-premium:hover { filter: brightness(1.06); }
.btn-premium svg { width: 16px; height: 16px; }
.btn-premium-ghost { color: var(--gold-2); background: var(--gold-soft); box-shadow: inset 0 0 0 1px rgba(245, 176, 65, .3); font-weight: 700; }
.btn-premium-ghost:hover { background: rgba(245, 176, 65, .22); }
.btn-premium-ghost svg { width: 16px; height: 16px; }
@media (max-width: 860px) { .nav-premium-btn .label { display: none; } .nav-premium-btn { padding: 0 10px; } }

/* Sidebar link + switcher gem */
.nav a.nav-premium .icon, .nav a.nav-premium svg { color: var(--gold); }
.nav a.nav-premium .label { color: var(--gold-2); }
.nav a.nav-premium.active { background: var(--gold-soft); }
.nav a.nav-premium.active::before { background: var(--gold); }
.switcher-gem { display: grid; place-items: center; color: var(--gold); }
.switcher-gem svg { width: 15px; height: 15px; }

/* Premium-only fields and list limits */
.field-premium.locked > :not(label):not(.flabel):not(.prem-unlock) { opacity: .5; pointer-events: none; }
.prem-unlock { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--gold-2); text-decoration: none; }
.prem-unlock:hover { text-decoration: underline; }
.prem-unlock svg { width: 14px; height: 14px; }
.prem-hint { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--gold-2); text-decoration: none; opacity: .85; }
.prem-hint:hover { opacity: 1; text-decoration: underline; }
.prem-hint svg { width: 13px; height: 13px; }
.prem-limit { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 12px 14px; border-radius: 10px; font-size: 13px;
  background: var(--gold-soft); box-shadow: inset 0 0 0 1px rgba(245, 176, 65, .3); color: var(--text); }
.prem-limit svg { width: 16px; height: 16px; color: var(--gold); }
.prem-limit a { color: var(--gold-2); font-weight: 700; }

/* Dashboard Premium page */
.prem-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 32px; border-radius: 16px; margin-bottom: 28px;
  background: radial-gradient(90% 140% at 100% 0%, rgba(245, 176, 65, .22), transparent 60%), linear-gradient(135deg, #22202a, var(--panel)); box-shadow: inset 0 0 0 1px rgba(245, 176, 65, .22); }
.prem-hero.is-active { background: radial-gradient(90% 140% at 100% 0%, rgba(245, 176, 65, .35), transparent 60%), linear-gradient(135deg, #2a2418, var(--panel)); }
.prem-hero .prem-badge { margin-left: 0; font-size: 12px; padding: 4px 10px; }
.prem-hero h1 { font-size: 28px; font-weight: 800; color: #fff; margin-top: 12px; letter-spacing: -.02em; }
.prem-hero-text > p { color: var(--muted); margin-top: 6px; font-size: 15px; }
.prem-redeem-wrap { margin-top: 22px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; max-width: 560px; }
.prem-label { font-size: 13px; font-weight: 600; color: var(--label); }
.prem-redeem { display: flex; gap: 8px; width: 100%; }
.prem-key-input { flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; text-transform: uppercase; }
.prem-redeem-wrap code, .prem-steps code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: rgba(255, 255, 255, .06); padding: 1px 6px; border-radius: 5px; }
.prem-hero-art { width: 150px; height: 150px; display: grid; place-items: center; }
.prem-gem { width: 110px; height: 110px; border-radius: 30px; display: grid; place-items: center; color: #2a1a05;
  background: linear-gradient(135deg, #f9d58c, #e8912d); box-shadow: 0 20px 60px rgba(245, 176, 65, .35); transform: rotate(-8deg); }
.prem-gem svg { width: 56px; height: 56px; }
.prem-perks { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-bottom: 28px; }
.prem-perk { padding: 18px; border-radius: 12px; background: var(--panel); border: 1px solid var(--border); }
.prem-perk-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--gold); background: var(--gold-soft); }
.prem-perk-ic svg { width: 19px; height: 19px; }
.prem-perk b { display: block; margin-top: 12px; color: #fff; font-size: 15px; }
.prem-perk p { margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.prem-table .prem-col { color: var(--gold-2); font-weight: 700; }
@media (max-width: 700px) { .prem-hero { grid-template-columns: 1fr; padding: 22px; } .prem-hero-art { display: none; } .prem-redeem { flex-direction: column; } }

/* Owner panel → Premium keys */
.op-stat-ic.prem { background: var(--gold-soft); color: var(--gold); }
.prem-toolbar { justify-content: flex-start; }
.prem-new-keys { margin-top: 16px; padding: 14px; border-radius: 10px; background: rgba(245, 176, 65, .08); box-shadow: inset 0 0 0 1px rgba(245, 176, 65, .3); }
.prem-new-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.prem-new-head b { color: var(--gold-2); }
.prem-new-keys pre { margin: 0; font: 13px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; color: #fff; white-space: pre-wrap; user-select: all; }
.prem-code { font-size: 13px; color: #fff; letter-spacing: .03em; }
.prem-plan-pill { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(var(--primary-rgb), .16); color: #b8a6ff; }
.prem-plan-pill.lifetime { background: var(--gold-soft); color: var(--gold-2); }
.prem-status { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; margin-left: 6px; }
td > .prem-status, td > div > .prem-status:first-child { margin-left: 0; }
.prem-status.unused { background: rgba(52, 211, 153, .14); color: var(--success); }
.prem-status.used { background: rgba(255, 255, 255, .07); color: var(--muted); }
.prem-status.revoked { background: rgba(248, 113, 113, .12); color: var(--danger); }

/* Public Premium page (MEE6-style) */
.pp-hero { position: relative; overflow: hidden; text-align: center; padding: 72px 20px 36px; }
.pp-hero::before { content: ''; position: absolute; left: 50%; top: -380px; width: 1000px; height: 720px; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 176, 65, .22), transparent 62%); pointer-events: none; }
.pp-hero > * { position: relative; }
.pp-eyebrow { display: inline-flex; align-items: center; gap: 6px; color: var(--gold); }
.pp-eyebrow svg { width: 15px; height: 15px; }
.pp-hero h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 800; letter-spacing: -.03em; line-height: 1.06; }
.pp-gold { background: linear-gradient(90deg, #f9d58c, #e8912d); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pp-hero p { margin: 16px auto 0; font-size: 18px; color: var(--muted); max-width: 620px; }

.pp-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 360px)); justify-content: center; gap: 20px; padding: 36px 20px 20px; align-items: end; }
.pp-card { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 26px; border-radius: 14px; background: var(--panel); border: 1px solid var(--border); }
.pp-card.popular { border: 2px solid #f0a64a; border-top-left-radius: 0; border-top-right-radius: 0;
  background: radial-gradient(100% 70% at 50% 0%, rgba(245, 176, 65, .14), transparent 70%), #1f1d22; }
.pp-popular { position: absolute; left: -2px; right: -2px; bottom: 100%; padding: 7px; border-radius: 12px 12px 0 0; text-align: center;
  font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #2a1a05; background: linear-gradient(90deg, #f7c56b, #e8912d); }
.pp-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pp-top h3 { font-size: 22px; font-weight: 800; color: #fff; }
.pp-tag { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #ffd2dc; background: rgba(244, 63, 94, .22); }
.pp-card.popular .pp-tag { color: #2a1a05; background: #f7c56b; }
.pp-price { display: flex; align-items: baseline; gap: 6px; }
.pp-price b { font-size: 38px; font-weight: 800; letter-spacing: -.02em; color: var(--gold-2); }
.pp-price span { color: var(--muted); font-size: 15px; }
.pp-sub { color: var(--muted); font-size: 14px; margin-top: -6px; }
.pp-perks { list-style: none; margin: 4px 0 8px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pp-perks li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.pp-perks svg { width: 16px; height: 16px; color: var(--success); flex: none; }
.pp-cta { justify-content: center; width: 100%; padding: 12px 16px; font-size: 15px; }

.pp-section { padding-top: 40px; }
.pc-table { max-width: 920px; margin: 0 auto; border-radius: 14px; overflow: hidden; background: var(--panel); border: 1px solid var(--border); }
.pc-head, .pc-row, .pc-group { display: grid; grid-template-columns: minmax(0, 1fr) 140px 140px; align-items: center; }
.pc-head { background: #22242e; border-bottom: 1px solid var(--border); padding: 14px 20px;
  font-weight: 800; color: #fff; }
.pc-head span:not(:first-child), .pc-row span:not(:first-child) { text-align: center; justify-self: center; }
.pc-head .pc-prem { display: inline-flex; align-items: center; gap: 6px; color: var(--gold-2); }
.pc-head .pc-prem svg { width: 16px; height: 16px; }
.pc-group { padding: 16px 20px 8px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--primary-light); background: rgba(var(--primary-rgb), .05); }
.pc-row { padding: 11px 20px; border-top: 1px solid rgba(255, 255, 255, .04); font-size: 14px; }
.pc-row:hover { background: rgba(255, 255, 255, .02); }
.pc-row > span:first-child { display: flex; flex-direction: column; gap: 2px; }
.pc-row > span:first-child b { font-weight: 600; color: var(--text); }
.pc-row small { color: var(--muted); font-size: 12px; }
.pc-row .pc-prem b { color: var(--gold-2); }
.pc-yes, .pc-no { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; }
.pc-yes { color: var(--success); background: rgba(52, 211, 153, .14); }
.pc-no { color: var(--faint); background: rgba(255, 255, 255, .05); }
.pc-yes svg, .pc-no svg { width: 14px; height: 14px; }
.pp-section .section-more { margin-top: 28px; }

.pp-faq { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.pp-faq details { border-radius: 12px; background: var(--panel); border: 1px solid var(--border); }
.pp-faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; cursor: pointer; font-weight: 700; color: #fff; }
.pp-faq summary::-webkit-details-marker { display: none; }
.pp-caret { width: 18px; height: 18px; color: var(--muted); transition: transform .15s; flex: none; }
.pp-faq details[open] .pp-caret { transform: rotate(180deg); }
.pp-faq details p { padding: 0 20px 18px; color: var(--muted); line-height: 1.6; }
@media (max-width: 760px) {
  .pp-plans { grid-template-columns: 1fr; padding-top: 44px; }
  .pc-head, .pc-row, .pc-group { grid-template-columns: minmax(0, 1fr) 70px 90px; }
  .pc-head, .pc-row, .pc-group { padding-left: 14px; padding-right: 14px; }
}

/* Language picker (site nav + dashboard top bar) */
.lang-pick { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border: 0; border-radius: 8px; background: none;
  color: var(--muted); font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; }
.lang-btn:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.lang-btn > svg:first-child { width: 17px; height: 17px; }
.lang-caret { width: 13px; height: 13px; }
.lang-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 180px; z-index: 60; padding: 6px; }
.lang-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: none;
  color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.lang-menu button:hover { background: rgba(255, 255, 255, .06); }
.lang-menu button.current { background: rgba(var(--primary-rgb), .16); color: #fff; font-weight: 600; }
.lang-flag { font-size: 16px; }
@media (max-width: 600px) { .lang-btn .lang-code, .lang-btn .lang-caret { display: none; } }

/* Premium plugin locks */
.nav-lock { margin-left: auto; display: grid; place-items: center; color: var(--gold); opacity: .9; }
.nav-lock svg { width: 13px; height: 13px; }
.prem-gate { border-color: rgba(245, 176, 65, .45) !important;
  background: radial-gradient(120% 80% at 50% 0%, rgba(245, 176, 65, .14), transparent 65%), var(--panel) !important; }
.prem-gate .prem-badge { margin-left: 0; }
.prem-gate-icon { position: relative; width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; margin-bottom: 4px;
  color: var(--gold); background: var(--gold-soft); box-shadow: inset 0 0 0 1px rgba(245, 176, 65, .3); }
.prem-gate-icon > svg { width: 30px; height: 30px; }
.prem-gate-icon > span { position: absolute; right: -6px; bottom: -6px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  color: #2a1a05; background: linear-gradient(135deg, #f7c56b, #e8912d); box-shadow: 0 0 0 3px var(--panel); }
.prem-gate-icon > span svg { width: 14px; height: 14px; }
.plugin-card .top .prem-badge { margin-left: 0; }

/* Subscription card (dashboard Premium page) */
.sub-card { padding: 24px; border-radius: 16px; margin-bottom: 28px; background: var(--panel); border: 1px solid rgba(245, 176, 65, .3); }
.sub-card.soon { border-color: rgba(251, 191, 36, .6); }
.sub-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.sub-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sub-head h2 { margin-top: 4px; font-size: 22px; font-weight: 800; color: #fff; display: flex; align-items: center; gap: 4px; }
.sub-gem { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #2a1a05; background: linear-gradient(135deg, #f9d58c, #e8912d); }
.sub-gem svg { width: 22px; height: 22px; }
.sub-rows { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 18px; }
.sub-row { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 10px; background: rgba(255, 255, 255, .03); }
.sub-row span { font-size: 12px; color: var(--muted); }
.sub-row b { color: #fff; font-size: 14px; }
.sub-bar { height: 8px; margin-top: 16px; border-radius: 99px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.sub-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f7c56b, #e8912d); }
.sub-warn { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 10px 12px; border-radius: 8px; font-size: 13px;
  color: var(--warning); background: rgba(251, 191, 36, .1); }
.sub-warn svg { width: 16px; height: 16px; flex: none; }
.sub-transfer { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 14px; }
.sub-transfer summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--text); list-style: none; }
.sub-transfer summary::-webkit-details-marker { display: none; }
.sub-transfer summary svg { width: 15px; height: 15px; color: var(--gold); }
.sub-transfer p { margin: 10px 0; }
.sub-transfer-form { display: flex; gap: 8px; flex-wrap: wrap; }
.sub-transfer-form select { flex: 1; min-width: 200px; }
a.prem-ending { text-decoration: none; margin-bottom: 18px; }
a.prem-ending > svg:last-child { width: 16px; height: 16px; }

/* Three plan cards */
.pp-plans { grid-template-columns: repeat(3, minmax(0, 330px)); }
@media (max-width: 1060px) { .pp-plans { grid-template-columns: repeat(2, minmax(0, 330px)); } }
@media (max-width: 760px) { .pp-plans { grid-template-columns: 1fr; } }

/* Language flags */
.flag { width: 21px; height: 14px; border-radius: 3px; flex: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); }
.lang-cur-flag { display: grid; place-items: center; }
.lang-menu .flag { width: 22px; height: 15px; }

/* Premium checkout (Litecoin) */
.co-ltc-mark { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-weight: 800; font-size: 13px; line-height: 1;
  color: #fff; background: #345d9d; flex: none; }
.co-page { max-width: 760px; margin: 0 auto; padding: 48px 20px 72px; }
.co-head { text-align: center; margin-bottom: 28px; }
.co-head h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -.02em; margin-top: 6px; }
.co-head p { margin-top: 8px; }
.co-card { display: flex; flex-direction: column; gap: 12px; padding: 26px; border-radius: 16px; background: var(--panel); border: 1px solid var(--border); }
.co-card h2 { font-size: 20px; font-weight: 800; color: #fff; }
.co-step { display: flex; align-items: center; gap: 10px; font-weight: 700; color: #fff; margin-top: 6px; }
.co-num { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; color: #2a1a05; background: linear-gradient(135deg, #f7c56b, #e8912d); }
.co-note { margin-top: -4px; }
.co-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.co-plan { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 16px; border-radius: 12px; cursor: pointer; text-align: left;
  background: rgba(255, 255, 255, .03); border: 1px solid var(--border); color: var(--text); font: inherit; transition: border-color .15s, background .15s; }
.co-plan:hover { border-color: rgba(245, 176, 65, .45); }
.co-plan.on { border-color: var(--gold); background: var(--gold-soft); box-shadow: 0 0 0 1px var(--gold) inset; }
.co-plan b { color: #fff; font-size: 15px; }
.co-ltc { font-size: 20px; font-weight: 800; color: var(--gold-2); }
.co-plan small { color: var(--muted); font-size: 12px; }
.co-go { margin-top: 10px; justify-content: center; width: 100%; }
.co-go .co-ltc-mark { width: 22px; height: 22px; }
.co-fine { margin-top: 4px; }
.co-pay-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.co-pay-head > div { display: flex; flex-direction: column; gap: 2px; }
.co-muted { color: var(--muted); font-size: 13px; }
.co-pay-head b { color: #fff; font-size: 18px; }
.co-count { font-size: 13px; font-weight: 600; color: var(--gold-2); background: var(--gold-soft); padding: 5px 10px; border-radius: 999px; }
.co-pay-grid { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; margin-top: 8px; }
.co-qr { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.co-qr img { width: 200px; height: 200px; border-radius: 12px; background: #fff; padding: 8px; }
.co-fields { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.co-fields > label { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.co-amount { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0; font-size: 28px; font-variant-numeric: tabular-nums; color: #fff; }
.co-amount b { font-weight: 800; }
.co-amount .co-tail { color: #2a1a05; background: var(--gold-2); border-radius: 5px; padding: 0 3px; margin-left: 1px; }
.co-amount > span { font-size: 16px; color: var(--muted); margin: 0 12px 0 6px; }
.co-addr { display: flex; align-items: center; gap: 8px; }
.co-addr code { flex: 1; min-width: 0; overflow-wrap: anywhere; font: 14px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; color: #fff;
  background: rgba(255, 255, 255, .05); padding: 10px 12px; border-radius: 8px; }
.co-copy { flex: none; }
.co-warn { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); margin-top: 4px; }
.co-warn svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--gold); }
.co-status { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 12px 14px; border-radius: 10px; font-size: 14px; font-weight: 600;
  background: rgba(255, 255, 255, .04); color: var(--text); }
.co-status.seen { background: rgba(52, 211, 153, .1); color: var(--success); }
.co-status.warn { background: rgba(251, 191, 36, .1); color: var(--warning); }
.co-status.bad { background: rgba(248, 113, 113, .1); color: var(--danger); }
.co-status svg { width: 16px; height: 16px; flex: none; }
.co-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; flex: none; }
.co-txid { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--border); }
.co-txid label { font-size: 13px; color: var(--muted); }
.co-txid-row { display: flex; gap: 8px; }
.co-txid-row input { flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.co-done { align-items: center; text-align: center; padding: 40px 26px; }
.co-done-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: #06281c; background: var(--success); }
.co-done-icon svg { width: 32px; height: 32px; }
.co-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.co-tx { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.co-tx svg { width: 12px; height: 12px; }
.pp-ltc-note { font-size: 13px; color: var(--muted); margin-top: -8px; }
.pp-pay-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; }
.pp-cta .co-ltc-mark { margin-right: 2px; }
@media (max-width: 640px) {
  .co-pay-grid { grid-template-columns: 1fr; }
  .co-amount { font-size: 22px; }
  .co-card { padding: 20px; }
}

/* MEE6-style prices */
.pp-billing { font-size: 13px; color: var(--muted); margin-top: -8px; }
.pp-billing s { color: var(--faint); }
.pp-billing b { color: var(--text); font-weight: 600; }
.pp-ltc-note { display: inline-flex; align-items: center; gap: 6px; }
.pp-ltc-note .co-ltc-mark { width: 16px; height: 16px; font-size: 10px; }
.co-approx { color: var(--muted); }
.co-pay-head .co-muted:last-child { margin-top: 2px; }
.shop-form { display: flex; flex-direction: column; gap: 14px; }
.shop-grid { display: grid; grid-template-columns: 110px 1fr 1fr; gap: 8px 12px; align-items: center; }
.shop-grid > b { font-size: 12px; font-weight: 600; color: var(--label); }
.shop-grid > span { font-weight: 600; font-size: 14px; }
@media (max-width: 600px) { .shop-grid { grid-template-columns: 80px 1fr 1fr; } }

/* Plugin message templates (Vouch, Order Queue): the inline embed builder as a settings field */
.msg-field-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 8px; }
.msg-field-head .link-btn { margin-left: auto; }
.msg-field-vars { margin-top: 10px; display: grid; gap: 6px; }
.eb-slot-var { font: 600 12px/1.2 ui-monospace, Consolas, monospace; color: var(--muted, #9aa0ad); padding: 4px; text-align: center; word-break: break-all; }

/* Welcome Channel: theme picker and channel preview */
.theme-picker { display: grid; gap: 12px; max-height: 420px; overflow: auto; padding-right: 4px; }
.theme-group-name { display: block; font-size: 12px; font-weight: 700; color: var(--muted, #9aa0ad); margin-bottom: 6px; }
.theme-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.theme-tile { position: relative; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: none; cursor: pointer; }
.theme-tile img { display: block; width: 100%; aspect-ratio: 3 / 1; object-fit: cover; }
.theme-tile span { display: block; padding: 4px 2px 2px; font-size: 11px; font-weight: 600; text-align: left; color: var(--muted, #9aa0ad); }
.theme-tile:hover { border-color: rgba(255,255,255,.35); }
.theme-tile.on { border-color: #34d399; box-shadow: 0 0 0 2px rgba(52,211,153,.25); }
.theme-tile.on::after { content: '✓'; position: absolute; top: 4px; right: 6px; width: 18px; height: 18px; border-radius: 50%; background: #34d399; color: #062; font: 700 12px/18px sans-serif; text-align: center; }
.wch-preview { max-height: 640px; overflow: auto; border-radius: 10px; }
.wch-head { padding: 8px 12px; font-size: 13px; color: var(--muted, #9aa0ad); border-bottom: 1px solid rgba(255,255,255,.06); }
.wch-banner { position: relative; max-width: 520px; margin: 6px 0 4px; }
.wch-banner img { display: block; width: 100%; aspect-ratio: 3 / 1; object-fit: cover; border-radius: 8px; }
.wch-banner-text { position: absolute; inset: 0; display: grid; place-items: center; font: 400 44px/1 Impact, 'Arial Narrow', sans-serif; letter-spacing: 1px; text-transform: uppercase; color: #fff; text-shadow: 0 0 18px rgba(0,0,0,.8); }
.wch-post { margin-bottom: 10px; }
.wch-post .embed { max-width: 520px; }
.theme-gif { position: absolute; top: 5px; left: 5px; padding: 1px 5px; border-radius: 4px; background: rgba(0,0,0,.65); color: #fff; font: 700 10px/1.4 sans-serif; letter-spacing: .5px; }

/* Welcome Channel page layout: preview + list on the left, sticky theme picker on the right (stacks on small screens) */
.setting-split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.setting-main { min-width: 0; }
.setting-aside { position: sticky; top: 76px; background: rgba(255,255,255,.025); border: 1px solid rgba(255,255,255,.06); border-radius: 12px; padding: 14px; }
@media (max-width: 1100px) { .setting-split { grid-template-columns: 1fr; } .setting-aside { position: static; } }
.theme-field .theme-picker { max-height: calc(100vh - 260px); min-height: 280px; }
.setting-aside .theme-tiles { grid-template-columns: 1fr 1fr; }
.theme-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.theme-head .flabel { font-size: 15px; font-weight: 700; }
.theme-filters { display: flex; gap: 6px; margin-bottom: 10px; }
.chip-btn { border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04); color: inherit; border-radius: 999px; padding: 4px 12px; font: 600 12px/1.4 inherit; cursor: pointer; }
.chip-btn:hover { border-color: rgba(255,255,255,.25); }
.chip-btn.on { background: var(--primary, var(--primary)); border-color: transparent; color: #fff; }
.theme-group[hidden], .theme-tile[hidden] { display: none; }
.wch-preview { max-height: 720px; background: #313338; border: 1px solid rgba(255,255,255,.06); }
.wch-head { display: flex; align-items: center; gap: 6px; position: sticky; top: 0; z-index: 1; background: #313338; padding: 10px 14px; font-size: 15px; color: #f2f3f5; border-bottom: 1px solid rgba(0,0,0,.35); box-shadow: 0 1px 0 rgba(255,255,255,.03); }
.wch-hash { color: #80848e; font-size: 20px; line-height: 1; }
.wch-topic { margin-left: 8px; padding-left: 10px; border-left: 1px solid rgba(255,255,255,.12); color: #949ba4; font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wch-preview .discord { background: transparent; border: 0; box-shadow: none; }
.wch-banner img { box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.head-action { margin-right: 14px; }

/* Welcome Channel inline editor (MEE6-style) */
.wce-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.wce-channel { max-height: none; overflow: visible; }
.wce-channel .wch-head { top: 60px; }
.wce-body { padding: 14px 16px 18px 72px; position: relative; }
.wce-author { position: relative; display: flex; align-items: center; min-height: 22px; margin-bottom: 6px; }
.wce-author .ava { position: absolute; left: -56px; top: 0; width: 40px; height: 40px; border-radius: 50%; }
.wce-author .who { display: flex; align-items: center; gap: 6px; font-weight: 600; color: #f2f3f5; }
.wce-el { position: relative; max-width: 540px; margin: 0 0 8px; border-radius: 8px; }
.wce-el:hover { outline: 1px dashed rgba(255,255,255,.18); outline-offset: 4px; }
.wce-el.open { outline: 1px solid var(--primary, var(--primary)); outline-offset: 4px; }
.wce-tools { position: absolute; top: 4px; right: -46px; display: flex; flex-direction: column; gap: 4px; opacity: 0; transition: opacity .12s; z-index: 2; }
.wce-el:hover .wce-tools, .wce-el.open .wce-tools, .wce-el:focus-within .wce-tools { opacity: 1; }
.wce-tool { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; border: 1px solid rgba(255,255,255,.1); background: #1e1f22; color: #dbdee1; cursor: pointer; font-weight: 700; }
.wce-tool:hover:not(:disabled) { background: #2b2d31; border-color: rgba(255,255,255,.25); }
.wce-tool:disabled { opacity: .35; cursor: default; }
.wce-tool.danger:hover { color: #f87171; border-color: rgba(248,113,113,.5); }
.wce-tool svg { width: 15px; height: 15px; }
.wce-banner { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 8px; }
.wce-banner img { display: block; width: 100%; aspect-ratio: 3 / 1; object-fit: cover; border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.wce-embed { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.wce-embed .embed { max-width: 540px; }
.wce-embed:hover .embed { filter: brightness(1.08); }
.wce-empty .e-body { padding: 10px 0; }
.wce-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; padding: 12px; border-radius: 10px; background: #1e1f22; border: 1px solid rgba(255,255,255,.08); }
.wce-panel .wce-panel-actions { grid-column: 1 / -1; }
.wce-panel-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 8px; }
.wce-panel-actions .muted { margin-right: auto; }
.wce-embed-edit .eb-discord { background: transparent; padding: 0; }
.wce-add { margin-top: 18px; }
.wce-add-line { display: flex; align-items: center; gap: 10px; }
.wce-add-line::before, .wce-add-line::after { content: ''; flex: 1; height: 1px; background: rgba(255,255,255,.1); }
.wce-add-btn.on { background: rgba(255,255,255,.08); }
.wce-add-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; max-width: 540px; }
.wce-card { display: grid; gap: 10px; padding: 12px; border-radius: 10px; border: 1px solid var(--primary, var(--primary)); background: rgba(var(--primary-rgb),.06); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.wce-card:hover { background: rgba(var(--primary-rgb),.14); }
.wce-card b { display: flex; justify-content: space-between; align-items: center; }
.wce-card b svg { width: 16px; height: 16px; }
.wce-card-art { height: 70px; border-radius: 8px; overflow: hidden; background: #2b2d31; }
.wce-card-art img { width: 100%; height: 100%; object-fit: cover; }
.embed-art { display: grid; align-content: center; gap: 7px; padding: 0 12px; border-left: 4px solid var(--primary, var(--primary)); }
.embed-art i { display: block; height: 8px; border-radius: 4px; background: rgba(255,255,255,.18); }
.embed-art i:first-child { width: 45%; background: rgba(255,255,255,.35); }
.embed-art i:nth-child(2) { width: 85%; } .embed-art i:nth-child(3) { width: 65%; }
.wce-empty-note { padding: 18px 0; }
@media (max-width: 700px) {
  .wce-body { padding-left: 16px; }
  .wce-author .ava { position: static; width: 32px; height: 32px; margin-right: 8px; }
  .wce-tools { position: static; flex-direction: row; opacity: 1; margin-bottom: 6px; }
  .wce-panel, .wce-add-cards { grid-template-columns: 1fr; }
}
.wce-embed-edit .eb-discord > .ava, .wce-embed-edit .eb-discord-main > .who { display: none; }
.wce-embed-edit .eb-discord { display: block; }

/* Searchable channel picker */
.cp { position: relative; }
.cp-multi { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px; border-radius: 10px; background: var(--input-bg, rgba(0,0,0,.25)); border: 1px solid rgba(255,255,255,.08); min-height: 44px; }
.cp-trigger.select { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; text-align: left; cursor: pointer; }
.cp-trigger .cp-caret { width: 16px; height: 16px; opacity: .6; transition: transform .15s; }
.cp-trigger[aria-expanded="true"] .cp-caret { transform: rotate(180deg); }
.cp-add { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 8px; border: 1px dashed rgba(255,255,255,.2); background: none; color: var(--muted, #9aa0ad); font: 600 13px/1.4 inherit; cursor: pointer; }
.cp-add:hover { color: #fff; border-color: rgba(255,255,255,.4); }
.cp-add svg { width: 14px; height: 14px; }
.cp-label { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.cp-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-glyph { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .65; }
.cp-tag .cp-glyph { width: 13px; height: 13px; }
.cp-pop { position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; right: 0; min-width: 240px; max-width: 420px; background: #111214; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; box-shadow: 0 16px 40px rgba(0,0,0,.5); overflow: hidden; }
.cp-multi .cp-pop { right: auto; width: min(360px, 100%); }
.cp-search-wrap { padding: 8px; border-bottom: 1px solid rgba(255,255,255,.06); }
.cp-search { width: 100%; box-sizing: border-box; padding: 8px 10px; border-radius: 6px; border: 0; background: #1e1f22; color: #fff; font: 14px/1.3 inherit; outline: none; }
.cp-search:focus { box-shadow: 0 0 0 2px var(--primary, var(--primary)); }
.cp-list { max-height: 280px; overflow-y: auto; padding: 6px; }
.cp-group { display: flex; align-items: center; gap: 4px; padding: 10px 6px 4px; font: 700 11px/1 inherit; letter-spacing: .04em; color: #949ba4; }
.cp-group .cp-glyph { width: 12px; height: 12px; }
.cp-opt { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 7px 8px; border: 0; border-radius: 6px; background: none; color: #dbdee1; font: 14px/1.3 inherit; text-align: left; cursor: pointer; }
.cp-opt.active { background: rgba(255,255,255,.07); color: #fff; }
.cp-opt.selected { color: #fff; }
.cp-opt.selected .cp-glyph { opacity: 1; }
.cp-check { width: 16px; height: 16px; color: var(--primary, var(--primary)); }
.cp-empty { padding: 14px 8px; text-align: center; }

/* Picker polish */
.cp-pop { right: 0; max-width: none; animation: cp-in .12s ease-out; transform-origin: top; }
.cp-pop.up { top: auto; bottom: calc(100% + 6px); transform-origin: bottom; }
@keyframes cp-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.cp.open > .cp-trigger.select { border-color: var(--primary, var(--primary)); box-shadow: 0 0 0 3px rgba(var(--primary-rgb),.18); }
.cp-search-wrap { position: relative; }
.cp-search-icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; opacity: .5; pointer-events: none; }
.cp-search { padding-left: 32px; }
.cp-list { max-height: 320px; scrollbar-width: thin; }
.cp-group { justify-content: flex-start; }
.cp-count { margin-left: auto; padding: 1px 6px; border-radius: 999px; background: rgba(255,255,255,.06); font-size: 10px; color: #b5bac1; }
.cp-opt { transition: background .08s; }
.cp-opt.active { background: rgba(var(--primary-rgb),.16); }
.cp-opt.selected { background: rgba(var(--primary-rgb),.1); }
.cp-hint { margin-left: auto; font-size: 11px; color: #f0b232; white-space: nowrap; }
.cp-swatch { width: 12px; height: 12px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); }
.cp-multi { transition: border-color .12s; }
.cp-multi.open { border-color: var(--primary, var(--primary)); }
.cp-tag { display: inline-flex; align-items: center; gap: 4px; }

/* Emoji packs */
.pack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.pack-card { padding: 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.025); transition: border-color .15s, opacity .15s; }
.pack-card.on { border-color: rgba(52,211,153,.5); background: rgba(52,211,153,.05); }
.pack-card.busy { opacity: .6; pointer-events: none; }
.pack-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.pack-head b { display: block; }
.pack-card > p { margin: 6px 0 10px; }
.pack-strip { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.pack-strip img { width: 36px; height: 36px; object-fit: contain; }
.pack-more { font-size: 12px; font-weight: 700; color: var(--muted, #9aa0ad); margin-left: 4px; }

/* Coupons */
.co-coupon { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; }
.co-coupon-in { max-width: 220px; text-transform: uppercase; }
.co-coupon-msg.ok { color: #34d399; }
.co-coupon-msg.bad { color: #f87171; }
.co-was { opacity: .55; font-weight: 400; margin-right: 2px; }
.coupon-form { display: grid; gap: 10px; margin-bottom: 14px; padding: 14px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); }
.coupon-form-head { display: flex; justify-content: space-between; align-items: center; }
.coupon-disc { display: flex; gap: 6px; }
.coupon-disc input { width: 90px; }
.coupon-plans { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.coupon-check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }

/* Single-emoji switches */
.pack-emojis { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
.pack-emojis.folded .pack-emoji:nth-child(n+9) { display: none; }
.pack-emoji { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 6px; padding: 5px 6px; border-radius: 8px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.05); cursor: pointer; min-width: 0; }
.pack-emoji.on { border-color: rgba(52,211,153,.45); background: rgba(52,211,153,.06); }
.pack-emoji img { width: 32px; height: 32px; object-fit: contain; }
.pack-emoji code { font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted, #9aa0ad); background: none; padding: 0; }
.switch.mini { transform: scale(.72); transform-origin: right center; margin-left: -8px; }
.pack-more-btn { margin-top: 8px; }

/* ── Emojis page ── */
.emj-meter { padding-bottom: 18px; }
.emj-meter-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.emj-meter-top h2 { margin: 0 0 2px; }
.emj-meter-top .desc { margin: 0; }
.emj-meter-num { font-size: 15px; color: var(--muted); white-space: nowrap; }
.emj-meter-num b { font-size: 28px; color: var(--text, #fff); font-weight: 800; }
.emj-bar { height: 10px; margin-top: 14px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; }
.emj-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6366f1, #22d3ee); transition: width .4s ease; }
.emj-bar.near span { background: linear-gradient(90deg, #f59e0b, #f97316); }
.emj-bar.full span { background: linear-gradient(90deg, #ef4444, #f43f5e); }
.emj-warn { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: rgba(245,158,11,.1); color: #fbbf24; font-size: 13px; }
.emj-warn svg { width: 18px; height: 18px; flex: none; }

.emj-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.emj-head h2 { margin: 0 0 2px; }
.emj-head .desc { margin: 0 0 14px; }
.emj-count { padding: 3px 10px; border-radius: 99px; background: rgba(255,255,255,.06); color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }

.emj-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: thin; }
.emj-tab { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 8px; border-radius: 12px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03); color: var(--text, #e5e7eb); font: 600 13.5px/1.2 inherit; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s; }
.emj-tab:hover { background: rgba(255,255,255,.06); }
.emj-tab.active { border-color: var(--primary, var(--primary)); background: rgba(var(--primary-rgb),.14); }
.emj-tab img { width: 26px; height: 26px; object-fit: contain; }
.emj-tab-count { padding: 1px 7px; border-radius: 99px; background: rgba(255,255,255,.08); font-size: 11px; color: var(--muted); }
.emj-tab-count.on { background: rgba(52,211,153,.18); color: #34d399; }

.emj-pack-info { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.025); border: 1px solid rgba(255,255,255,.05); margin-bottom: 12px; }
.emj-pack-info p { margin: 2px 0 0; }
.emj-pack-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.emj-pack-status { position: relative; display: inline-flex; align-items: center; min-width: 130px; height: 28px; padding: 0 12px; border-radius: 99px; background: rgba(255,255,255,.06); font-size: 12px; font-weight: 600; color: var(--muted); overflow: hidden; }
.emj-pack-status i { position: absolute; inset: 0 auto 0 0; background: rgba(52,211,153,.18); transition: width .3s; }

.emj-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.emj-search-wrap { position: relative; flex: 1; max-width: 320px; min-width: 180px; }
.emj-search-wrap svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; opacity: .5; pointer-events: none; }
.emj-search { padding-left: 34px !important; }
.emj-filters { display: flex; gap: 6px; }

.emj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.emj-grid .empty { grid-column: 1 / -1; }
.emj-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 6px 10px; border-radius: 14px; border: 1px solid rgba(255,255,255,.07); background: rgba(255,255,255,.03); color: inherit; font: inherit; cursor: pointer; transition: transform .12s, background .15s, border-color .15s, box-shadow .15s; }
.emj-tile:hover { transform: translateY(-2px); background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); }
.emj-tile:focus-visible { outline: 2px solid var(--primary, var(--primary)); outline-offset: 2px; }
.emj-tile img { width: 52px; height: 52px; object-fit: contain; transition: transform .15s; }
.emj-tile:hover img { transform: scale(1.08); }
.emj-tile code { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; color: var(--muted); background: none; padding: 0; }
.emj-action { font-size: 11px; font-weight: 700; color: var(--primary, var(--primary-light)); opacity: 0; transition: opacity .12s; }
.emj-tile:hover .emj-action { opacity: 1; }
.emj-tile.on { border-color: rgba(52,211,153,.55); background: rgba(52,211,153,.07); box-shadow: inset 0 0 0 1px rgba(52,211,153,.15); }
.emj-tile.on .emj-action { color: #f87171; }
.emj-check { position: absolute; top: 7px; right: 7px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: #34d399; color: #062e1f; transform: scale(0); transition: transform .15s; }
.emj-check svg { width: 13px; height: 13px; stroke-width: 3; }
.emj-tile.on .emj-check { transform: scale(1); }
.emj-tile.busy { pointer-events: none; opacity: .55; }
.emj-tile.busy img { animation: emj-pulse .8s ease-in-out infinite; }
@keyframes emj-pulse { 50% { transform: scale(.9); opacity: .6; } }
.emj-packs.busy { opacity: .6; pointer-events: none; }

.emj-upload { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.emj-upload .input:first-of-type { width: 150px; }
.emj-upload .input:nth-of-type(2) { flex: 1; min-width: 220px; }
.emj-colon { color: var(--muted); font-weight: 700; }
.emj-server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.emj-server-grid .empty { grid-column: 1 / -1; }
.emj-own { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px 10px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); }
.emj-own img { width: 40px; height: 40px; object-fit: contain; }
.emj-own code { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; color: var(--muted); background: none; padding: 0; }
.emj-badge { position: absolute; top: 5px; left: 5px; padding: 1px 6px; border-radius: 99px; background: rgba(var(--primary-rgb),.2); color: var(--primary-light); font-size: 9.5px; font-weight: 700; }
.emj-del { position: absolute; top: 3px; right: 3px; width: 26px; height: 26px; opacity: 0; transition: opacity .12s; }
.emj-del svg { width: 14px; height: 14px; }
.emj-own:hover .emj-del, .emj-del:focus-visible { opacity: 1; }
.emj-del:hover { color: #f87171; }
@media (max-width: 640px) {
  .emj-meter-top { flex-direction: column; align-items: flex-start; }
  .emj-grid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }
  .emj-upload .input:first-of-type { width: 100%; }
}
.emj-meter, .emj-packs, .emj-server { min-width: 0; max-width: 100%; }
.emj-tabs { max-width: 100%; }
/* Grid columns never grow past the page: wide rows (tabs, tables) scroll inside instead */
.plugin-layout > * { min-width: 0; }

/* Owner panel: community roles */
.ur-card { transition: opacity .15s; }
.ur-card.off .ur-stats, .ur-card.off .ur-grid { opacity: .55; }
.ur-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.ur-head h2 { margin: 0 0 4px; }
.ur-head p { margin: 0 0 14px; max-width: 70ch; }
.ur-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.ur-stats > div { padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.06); min-width: 0; }
.ur-stats b { display: block; font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ur-stats span { font-size: 12px; color: var(--muted); }
.ur-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.ur-role { display: grid; gap: 6px; min-width: 0; }
.ur-label { font-weight: 600; font-size: 14px; }
.ur-label small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.ur-role-pick { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.ur-role-pick .cp { flex: 1; min-width: 180px; }
.ur-checks { display: grid; gap: 8px; padding-top: 4px; }
.ur-check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
@media (max-width: 760px) { .ur-grid, .ur-stats { grid-template-columns: 1fr; } }

/* ═════════ Pulsar theme — one palette and one set of surfaces for every page ═════════ */
:root {
  --bg: #25262f;
  --bg-2: #1d1e26;
  --panel: #18191f;
  --panel-2: #1e1f27;
  --panel-3: #2a2c38;
  --field: #1f2029;
  --field-border: #2c2e3b;
  --border: #2b2d3a;
  --border-strong: #363949;
  --border-hover: #474b5f;
  --line-soft: rgba(255, 255, 255, .05);
  --heading: #ffffff;
  --text: #eef0f7;
  --label: #cdd1de;
  --nav-text: #a6abbf;
  --muted: #9296ab;
  --faint: #676c84;
  --primary: #7c5cff;
  --primary-2: #6a48f5;
  --primary-light: #a78bfa;
  --primary-soft: rgba(124, 92, 255, .14);
  --primary-ring: rgba(124, 92, 255, .32);
  --primary-grad: linear-gradient(180deg, #8b6fff 0%, #7254fb 100%);
  --brand-grad: linear-gradient(120deg, #7c5cff 0%, #4f7cff 55%, #22d3ee 100%);
  --radius: 12px;
  --radius-sm: 8px;
  --elev-1: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 1px 2px rgba(0, 0, 0, .25);
  --elev-2: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 12px 32px rgba(0, 0, 0, .35);
  --t: .16s cubic-bezier(.2, .7, .3, 1);
}

html { scrollbar-color: var(--border-strong) transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--border-hover); }
::-webkit-scrollbar-track { background: transparent; }
::selection { background: rgba(var(--primary-rgb), .4); color: #fff; }

/* A faint brand glow at the top of every page, so the dark isn't flat. */
body { background: radial-gradient(1100px 420px at 70% -120px, rgba(var(--primary-rgb), .10), transparent 70%), var(--bg); background-attachment: fixed; }
.shell > .topbar, .sidebar { background: var(--bg-2); }
.shell > .topbar { box-shadow: 0 1px 0 var(--line-soft); backdrop-filter: saturate(1.2); }

/* ── Surfaces: every card-like box is the same panel, edge and radius ── */
.card, .op-card, .op-stat, .prem-perk, .pp-card, .pc-table, .pp-faq details, .plugin-card, .stat, .bstat, .guild-card, .cat-card,
.lb-row, .rrt-card, .modal-card, .ur-card, .sub-card, .plan-card, .co-card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--elev-1);
}
.card.setting { border-radius: var(--radius); }
.card.setting:focus-within { border-color: var(--primary-ring); box-shadow: var(--elev-1), 0 0 0 3px rgba(var(--primary-rgb), .08); }
.plugin-card, .guild-card, .cat-card, .rrt-card, .op-stat, .prem-perk, .pp-card { transition: transform var(--t), border-color var(--t), box-shadow var(--t); }
.plugin-card:hover, .guild-card:hover, .cat-card:hover, .rrt-card:hover { border-color: var(--border-strong); box-shadow: var(--elev-2); transform: translateY(-2px); }
.plugin-card.is-on { border-color: rgba(52, 211, 153, .22); }
.modal-card { border-radius: 16px; box-shadow: var(--elev-2); }
.op-card { padding: 22px; }
.setting-body { border-top-color: var(--line-soft); }

/* Inner boxes sitting on a panel (lists, info strips, previews) */
.list-item, .emj-pack-info, .what-happens, .rme-mode, .ur-stats > div {
  background: var(--field); border: 1px solid var(--field-border); border-radius: 10px;
}
.list-item .list-item { background: var(--panel); }

/* ── Type: one scale for page titles, card titles and descriptions ── */
.plugin-head h1, .op-head h1, .prem-hero h1, .lb-head h1, .overview-head h1, .page-title, .emj-page-head h1 {
  font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--heading); line-height: 1.2;
}
.plugin-head p, .op-head p { color: var(--muted); font-size: 14px; }
.setting-head h2, .op-card-head h2, .emj-head h2, .emj-meter-top h2, .card > h2, .card-row h2, .ur-head h2, .eb-card-head h2 {
  font-size: 15px; font-weight: 700; color: var(--heading); letter-spacing: -.005em;
}
.op-card-head p, .ur-head p, .card > .desc, .setting-body > .desc, .emj-head .desc, .emj-meter-top .desc { font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.field > label, .field > .flabel, .op-form-row label > span, .op-field > span, .prem-label, .ur-label { color: var(--label); font-size: 13px; font-weight: 600; }
.section-title { font-size: 15px; font-weight: 700; color: var(--heading); }
.section-title::after { background: var(--line-soft); }

/* ── Buttons ── */
.btn { border-radius: var(--radius-sm); transition: background var(--t), border-color var(--t), box-shadow var(--t), transform .05s, filter var(--t); }
.btn-primary { background: var(--primary-grad); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 4px 14px rgba(var(--primary-rgb), .28); }
.btn-primary:hover { background: var(--primary-grad); filter: brightness(1.08); box-shadow: 0 1px 0 rgba(255, 255, 255, .2) inset, 0 6px 20px rgba(var(--primary-rgb), .4); }
.btn-accent { background: var(--brand-grad); box-shadow: 0 4px 14px rgba(79, 124, 255, .25); }
.btn-ghost { background: rgba(255, 255, 255, .03); border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, .07); border-color: var(--border-hover); }
.btn-enable { background: var(--field); border: 1px solid var(--border-strong); color: var(--text); }
.btn-enable:hover { background: var(--primary-grad); border-color: transparent; color: #fff; }
.btn-danger { border: 1px solid rgba(248, 113, 113, .22); }

/* ── Inputs ── */
.input, .select, .textarea, .multi, .cp-btn, .cp-trigger {
  background: var(--field); border: 1px solid var(--field-border); border-radius: var(--radius-sm); color: var(--text);
}
.input:hover, .select:hover, .textarea:hover, .multi:hover { border-color: var(--border-strong); }
.input:focus, .select:focus, .textarea:focus, .multi:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); outline: none; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
:where(a, button, input, select, textarea, [tabindex]):focus-visible { outline-color: var(--primary-light); }

/* ── Tabs, pills and segmented controls all share one look ── */
.tabbar, .op-switch, .segmented { background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: 12px; padding: 4px; }
.tab, .op-switch a { border-radius: 9px; color: var(--nav-text); transition: background var(--t), color var(--t); }
.tab:hover, .op-switch a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.tab.active, .op-switch a.active { background: var(--primary-grad); color: #fff; box-shadow: 0 4px 12px rgba(var(--primary-rgb), .3); }
.segmented button { border-radius: 8px; }
.emj-tab { border-radius: 10px; border-color: var(--field-border); background: var(--field); }
.emj-tab:hover { border-color: var(--border-strong); background: var(--panel-2); }
.emj-tab.active { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .1); }
.chip { background: var(--field); border: 1px solid var(--field-border); color: var(--label); border-radius: 6px; }

/* Status badges: small rounded pills, one shape everywhere */
.badge, .emj-count, .op-badge, .prem-badge, .emj-tab-count, .tab-count { border-radius: 999px; }
.op-badge { color: var(--primary-light); background: var(--primary-soft); }

/* ── Owner / Admin ── */
.op-page { max-width: 1200px; }
.op-stat-ic, .prem-perk-ic { border-radius: 10px; }
.op-stat-ic { background: var(--primary-soft); color: var(--primary-light); }
.op-stat b { color: var(--heading); }
.op-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1200px) { .op-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .op-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── Emojis page ── */
.emj-bar { background: var(--field); box-shadow: inset 0 0 0 1px var(--field-border); }
.emj-bar span { background: var(--brand-grad); }

/* ── Premium keeps its gold, on the same panels ── */
.prem-hero { border-radius: 16px; background: radial-gradient(90% 140% at 100% 0%, rgba(245, 176, 65, .2), transparent 60%), radial-gradient(70% 120% at 0% 100%, rgba(var(--primary-rgb), .14), transparent 60%), var(--panel); box-shadow: var(--elev-1), inset 0 0 0 1px rgba(245, 176, 65, .2); }
.prem-hero.is-active { background: radial-gradient(90% 140% at 100% 0%, rgba(245, 176, 65, .32), transparent 60%), var(--panel); }

/* ── Menus, pop-overs and toasts ── */
.dropdown, .cp-pop, .hovercard, .toast, .mm-panel {
  background: var(--panel-2); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
}
.dropdown a, .dropdown button { border-radius: 8px; }


/* Several actions in one group: the first is the main one, the rest are secondary. */
.card-actions .btn-primary ~ .btn-primary { background: rgba(255, 255, 255, .03); border-color: var(--border-strong); color: var(--text); box-shadow: none; filter: none; }
.card-actions .btn-primary ~ .btn-primary:hover { background: rgba(255, 255, 255, .07); border-color: var(--border-hover); }

/* Server picker: brand buttons, panel-coloured cards */
.srv-btn { border-radius: var(--radius-sm); height: 42px; font-size: 14px; }
.srv-btn.go { background: var(--primary-grad); box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 4px 14px rgba(var(--primary-rgb), .28); }
.srv-btn.setup { background: rgba(255, 255, 255, .04); border: 1px solid var(--border-strong); color: var(--text); }
.srv-btn.setup:hover { background: rgba(255, 255, 255, .08); filter: none; }
.srv-banner { border-radius: var(--radius); background: var(--panel-3); box-shadow: inset 0 0 0 1px var(--line-soft); }
.srv-icon { background: var(--panel-3); border-color: rgba(255, 255, 255, .9); }
.srv-role { color: var(--muted); }
.picker-empty-art { background: var(--primary-grad); }

/* Plugin artwork (e.g. the Pulsarpot honey pot) in place of a line icon */
img.pglyph { width: 100%; height: 100%; object-fit: contain; display: block; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .35)); }
.picon.has-art { padding: 4px; }
.picon.lg.has-art { padding: 5px; }
.nav-plugin .nicon img.pglyph, .pcard-icon img.pglyph { width: 22px; height: 22px; }
.prem-gate-icon img.pglyph { width: 60%; height: 60%; }

/* ═════════ Modern layer: deep background, lighter panels with hairline borders, fewer glows ═════════
   Panels now sit *above* the page (lighter than it) — the usual modern dark look — and every edge is a thin
   hairline instead of a shadow. Colours only come from the tokens below. */
:root {
  --bg: #0c0d11;
  --bg-2: #0c0d11;
  --panel: #14151b;
  --panel-2: #191a21;
  --panel-3: #22242d;
  --field: #0f1015;
  --field-border: #262833;
  --border: #23252e;
  --border-strong: #2e313c;
  --border-hover: #3b3f4c;
  --line-soft: rgba(255, 255, 255, .06);
  --hairline: rgba(255, 255, 255, .07);
  --text: #ececf1;
  --label: #c9ccd6;
  --nav-text: #9a9eae;
  --muted: #8b8fa0;
  --faint: #5f6373;
  --primary-grad: linear-gradient(180deg, #8467ff, #7556fc);
  --radius: 12px;
  --radius-sm: 8px;
  --elev-1: none;
  --elev-2: 0 8px 24px rgba(0, 0, 0, .35);
  --sidebar: 256px;
  --topbar: 60px;
}
body { background: var(--bg); color: var(--text); }

/* ── Frame: see-through top bar and a quiet sidebar, separated by hairlines ── */
.shell > .topbar {
  position: sticky; top: 0; z-index: 40; height: var(--topbar); padding: 0 28px;
  background: rgba(12, 13, 17, .72); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--hairline); box-shadow: none;
}
.sidebar { background: var(--bg-2); border-right: 1px solid var(--hairline) !important; }
.side-brand { height: var(--topbar); padding: 0 20px; font-size: 17px; border-bottom: 1px solid var(--hairline); }
.side-brand img { width: 28px; height: 28px; }
.switcher { padding: 14px 14px 6px; }
.switcher-btn { height: 44px; background: var(--panel); border: 1px solid var(--hairline); border-radius: 10px; }
.switcher-btn:hover { background: var(--panel-2); border-color: var(--border-strong); }
.switcher .dropdown { left: 14px; right: 14px; }
.nav { padding: 6px 10px 40px; }
.nav a.nav-top, .nav a.nav-plugin { min-height: 34px; padding: 6px 10px; gap: 10px; margin-bottom: 1px; border-radius: 8px; font-size: 13.5px; color: var(--nav-text); }
.nav a.nav-top:hover, .nav a.nav-plugin:hover { background: rgba(255, 255, 255, .04); color: var(--text); }
.nav a.active { background: rgba(255, 255, 255, .06); color: #fff; font-weight: 600; }
.nav a.active::before { left: -10px; top: 9px; bottom: 9px; width: 2px; }
.nav a.nav-top svg { width: 17px; height: 17px; color: var(--faint); }
.nav-label { font-size: 10.5px; letter-spacing: .1em; color: var(--faint); padding: 14px 10px 6px; }
.nav-plugin .status { width: 6px; height: 6px; box-shadow: inset 0 0 0 1.5px #3a3d49; }
.nav-plugin .status.on { box-shadow: 0 0 0 2px rgba(52, 211, 153, .14); }

/* ── Content column ── */
.content { padding: 32px 36px 120px; max-width: 1180px; }
.plugin-head { margin-bottom: 24px; }
.plugin-head h1, .overview-head h1 { font-size: 24px; letter-spacing: -.02em; }
.plugin-head p { font-size: 14px; color: var(--muted); }
.chip { background: transparent; border: 1px solid var(--hairline); color: var(--muted); font-size: 12px; border-radius: 6px; }

/* ── Surfaces: flat panels, hairline edges, no drop shadows at rest ── */
.card, .op-card, .op-stat, .prem-perk, .pp-card, .pc-table, .pp-faq details, .plugin-card, .stat, .guild-card, .cat-card,
.lb-row, .rrt-card, .ur-card, .sub-card, .plan-card, .co-card {
  background: var(--panel); border: 1px solid var(--hairline); box-shadow: none;
}
.plugin-card:hover, .guild-card:hover, .cat-card:hover, .rrt-card:hover { transform: none; border-color: var(--border-hover); box-shadow: none; background: var(--panel-2); }
.plugin-card.is-on { border-color: var(--hairline); }
.card.setting { margin-bottom: 14px; }
.setting-head { min-height: 56px; padding: 14px 20px; }
.setting-head h2 { font-size: 14.5px; }
.setting-body { padding: 18px 20px 20px; border-top: 1px solid var(--hairline); }
.card.setting:focus-within { border-color: var(--border-hover); box-shadow: none; }
.setting-body .field.toggle + .field.toggle { border-top-color: var(--hairline); }
.list-item, .emj-pack-info, .what-happens, .rme-mode, .ur-stats > div { background: var(--panel-2); border: 1px solid var(--hairline); }
.modal-card, .dropdown, .cp-pop, .hovercard, .toast, .mm-panel { background: var(--panel-2); border: 1px solid var(--border-strong); box-shadow: 0 20px 50px rgba(0, 0, 0, .55); }

/* ── Overview: a calm welcome card and separate stat tiles ── */
.banner {
  grid-template-columns: 1.3fr 1fr; padding: 28px; border-radius: 14px; margin-bottom: 36px;
  background: radial-gradient(80% 120% at 0% 0%, rgba(var(--primary-rgb), .16), transparent 60%), var(--panel);
  border: 1px solid var(--hairline);
}
.banner .eyebrow { font-size: 11px; letter-spacing: .12em; color: var(--primary-light); }
.banner h1 { font-size: 24px; }
.bstat { background: var(--bg); border: 1px solid var(--hairline); border-radius: 10px; padding: 14px 16px; }
.bstat svg { color: var(--muted); width: 18px; height: 18px; }
.bstat b { font-size: 20px; letter-spacing: -.01em; }
.section-title { font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--muted); text-transform: none; }
.plugin-grid { gap: 14px; }
.plugin-card { min-height: 196px; padding: 18px; border-radius: 12px; }
.plugin-card h3 { font-size: 15px; font-weight: 650; }
.plugin-card p { color: var(--muted); }
.badge.live { background: rgba(52, 211, 153, .1); color: #4ade80; border: 0; font-weight: 600; font-size: 11px; padding: 2px 8px; border-radius: 999px; }
.picon { border-radius: 10px; }

/* ── Controls: flat and crisp ── */
.btn { height: 38px; font-weight: 600; font-size: 13.5px; }
.btn-sm { height: 32px; font-size: 13px; }
.btn-primary { background: var(--primary); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16); filter: none; }
.btn-primary:hover { background: var(--primary-hi); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2); filter: none; }
.btn-ghost, .btn-enable { background: transparent; border: 1px solid var(--border-strong); color: var(--text); }
.btn-ghost:hover, .btn-enable:hover { background: rgba(255, 255, 255, .05); border-color: var(--border-hover); color: var(--text); }
.btn-accent { background: var(--primary); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16); }
.card-actions .btn-primary ~ .btn-primary { background: transparent; border-color: var(--border-strong); }
.srv-btn.go { background: var(--primary); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16); }
.input, .select, .textarea, .multi, .cp-btn, .cp-trigger { background: var(--field); border-color: var(--field-border); }
.input:focus, .select:focus, .textarea:focus, .multi:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .18); }
.switch span { background: #2d303b; }
.switch input:checked + span { background: var(--primary); }
.tabbar, .op-switch, .segmented { background: var(--panel); border: 1px solid var(--hairline); }
.tab.active, .op-switch a.active { background: var(--panel-3); color: #fff; box-shadow: none; }
.tab.active .tab-count { background: var(--primary); color: #fff; }
.segmented button.active, .segmented [aria-pressed="true"] { background: var(--panel-3); color: #fff; box-shadow: none; }

/* Unsaved-changes bar floats as a clean pill */
.savebar { background: rgba(25, 26, 33, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--border-strong); box-shadow: 0 16px 40px rgba(0, 0, 0, .5); }

@media (max-width: 900px) {
  .shell > .topbar { padding: 0 14px; }
  .content { padding: 20px 16px 110px; }
}

/* ── Plugin (tab) pages: icon header and a comfortable reading width ── */
.plugin-head { display: flex; align-items: center; gap: 16px; padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--hairline); }
.plugin-head .head-icon { width: 52px; height: 52px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--hairline); }
.plugin-head .head-icon svg { width: 26px; height: 26px; }
.plugin-head .head-icon.has-art { padding: 5px; }
.plugin-head .info h1 { font-size: 22px; line-height: 1.25; }
.plugin-head .info p { margin-top: 4px; font-size: 13.5px; }
.plugin-head .chips { margin-top: 10px; }
.plugin-head .toggle-wrap { align-self: center; padding: 6px 6px 6px 12px; border-radius: 999px; border: 1px solid var(--hairline); background: var(--panel); }
.plugin-head .head-action { align-self: center; }
/* Forms read best at ~900px; pages with side-by-side editors keep the full width. */
.content:has(.plugin-layout:not(.plugin-welcomeChannel):not(.plugin-reactionRoles):not(:has(.has-aside, .with-preview))) .plugin-head,
.plugin-layout:not(.plugin-welcomeChannel):not(.plugin-reactionRoles):not(:has(.has-aside, .with-preview)),
.content:has(.plugin-layout:not(.plugin-welcomeChannel):not(.plugin-reactionRoles):not(:has(.has-aside, .with-preview))) .disabled-note {
  max-width: 920px; margin-left: auto; margin-right: auto;
}
.field > label, .field > .flabel { font-size: 12.5px; font-weight: 600; color: var(--label); margin-bottom: 8px; }
.setting-body > .desc { color: var(--muted); font-size: 13px; }
@media (max-width: 640px) {
  .plugin-head { flex-wrap: wrap; }
  .plugin-head .head-icon { width: 44px; height: 44px; }
  .plugin-head .info { flex-basis: calc(100% - 60px); }
}
.plugin-head { border-radius: 0; background: none !important; border-left: 0; border-right: 0; border-top: 0; box-shadow: none; }
/* Phones: the top bar keeps only what fits — menu, logo, language, bell and account. */
@media (max-width: 520px) {
  .shell > .topbar { gap: 6px; padding: 0 10px; }
  .shell > .topbar .pill, .shell > .topbar .top-brand span { display: none; }
  .shell > .topbar .icon-btn, .shell > .topbar .user-btn { padding-left: 4px; padding-right: 4px; }
}
@media (max-width: 900px) { .banner { grid-template-columns: 1fr; padding: 22px; } }

/* Member Backup: verified members */
.mb-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.mb-stat { padding: 12px 14px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--hairline); min-width: 0; }
.mb-stat b { display: block; font-size: 20px; color: var(--heading); }
.mb-stat span { font-size: 12px; color: var(--muted); }
.mb-search { margin-bottom: 12px; max-width: 320px; }
.mb-status { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.mb-here { background: rgba(52, 211, 153, .12); color: #4ade80; }
.mb-left { background: rgba(255, 255, 255, .06); color: var(--muted); }
.mb-removed { background: rgba(251, 191, 36, .12); color: #fbbf24; }
.mb-more { margin-top: 10px; }
.mono { font-family: ui-monospace, Consolas, monospace; }
@media (max-width: 640px) { .mb-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ═════════ Accent theme: #3994ff by default; the dashboard's Theme picker overrides these on <html> ═════════ */
:root {
  --primary: #3994ff;
  --primary-rgb: 57, 148, 255;
  --primary-2: #2a7fe6;
  --primary-hi: #52a3ff;
  --primary-light: #93c5ff;
  --primary-soft: rgba(var(--primary-rgb), .14);
  --primary-ring: rgba(var(--primary-rgb), .32);
  --primary-grad: linear-gradient(180deg, var(--primary-hi), var(--primary));
  --brand-grad: linear-gradient(120deg, var(--primary) 0%, #22d3ee 100%);
}
.btn-primary:hover { background: var(--primary-hi); }


/* Owner → Receipts */
.rc-checks { margin-bottom: 14px; }
.rc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin-bottom: 12px; }
.rc-card .op-field { display: grid; gap: 6px; margin-bottom: 12px; }
.rc-card .textarea { min-height: 200px; font-family: inherit; }
.rc-card .op-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.rc-card .op-actions .input { max-width: 260px; }
.co-email { margin-bottom: 6px; }
@media (max-width: 700px) { .rc-grid { grid-template-columns: 1fr; } }
.rc-card .msg-field-vars { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -4px 0 14px; }
.rc-card .msg-field-vars .chip { font-family: ui-monospace, Consolas, monospace; font-size: 12px; padding: 2px 8px; }

.sub-transfer-count { font-size: 13px; color: var(--label); margin: 4px 0 10px; }
.sub-transfer-count.none { color: #fbbf24; }
.prem-plan-pill.quarter { background: rgba(var(--primary-rgb), .14); color: var(--primary-light); }

/* Checkout: key + receipt after paying */
.co-key { margin: 16px 0 6px; display: grid; gap: 6px; text-align: left; }
.co-key-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.co-key-row code { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 8px; background: var(--field); border: 1px solid var(--field-border); font: 600 14px ui-monospace, Consolas, monospace; letter-spacing: .04em; overflow-wrap: anywhere; }
.co-receipt-wrap { margin: 10px 0 16px; text-align: left; display: grid; gap: 8px; justify-items: start; }
.co-receipt { width: 100%; padding: 14px 16px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--hairline); display: grid; gap: 10px; justify-items: start; }
.co-receipt pre { margin: 0; white-space: pre-wrap; font: 13px/1.55 inherit; color: var(--label); }

.rc-provider { margin: 6px 0 10px; }
.rc-hint { margin: 0 0 12px; max-width: 75ch; }
.op-field-title { display: block; font-size: 13px; font-weight: 600; color: var(--label); margin-top: 4px; }

/* ═════════ Visual upgrade: landing page, leaderboard, small fixes ═════════ */
/* Commands page: the icon tile no longer stretches like the text column. */
.cmd-group-head > .picon { flex: none; width: 34px; height: 34px; }

/* Landing hero */
.hero-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; margin-bottom: 18px; border-radius: 999px; font-size: 13px; font-weight: 600;
  color: var(--primary-light); background: rgba(var(--primary-rgb), .1); border: 1px solid rgba(var(--primary-rgb), .25); }
.hero-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 3px rgba(52, 211, 153, .2); }
.hero-trust { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 22px 0 0; color: var(--muted); font-size: 14px; }
.hero-trust li { display: inline-flex; align-items: center; gap: 6px; }
.hero-trust svg { width: 16px; height: 16px; color: #34d399; }

/* Highlight cards with mini previews */
.hl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.hl-card-outer { display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: var(--panel); border: 1px solid var(--hairline);
  transition: transform var(--t), border-color var(--t), box-shadow var(--t); }
.hl-card-outer:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 45%, transparent); box-shadow: 0 18px 40px rgba(0, 0, 0, .35); }
.hl-mock { position: relative; height: 170px; padding: 18px; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--c) 22%, transparent), transparent 70%), var(--panel-2); border-bottom: 1px solid var(--hairline); }
.hl-body { padding: 18px 20px 22px; }
.hl-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hl-title h3 { font-size: 17px; margin: 0; color: var(--heading); }
.hl-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.hl-ic svg { width: 18px; height: 18px; }
.hl-body p { margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.hl-banner { width: 100%; max-width: 300px; border-radius: 10px; box-shadow: 0 12px 30px rgba(0, 0, 0, .5); }
.hl-lb { width: 100%; max-width: 300px; display: grid; gap: 8px; }
.hl-lb-row { display: grid; grid-template-columns: 22px 1fr 90px auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: rgba(0, 0, 0, .28); font-size: 13px; }
.hl-rank { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: var(--panel-3); }
.hl-rank.r1 { background: #fbbf24; color: #3b2800; } .hl-rank.r2 { background: #cbd5e1; color: #1e293b; } .hl-rank.r3 { background: #d97706; color: #fff; }
.hl-bar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; display: block; }
.hl-bar i { display: block; height: 100%; border-radius: inherit; background: var(--c); }
.hl-bar.big { width: 100%; height: 8px; margin: 10px 0 8px; }
.hl-lvl { font-size: 12px; color: var(--muted); font-weight: 700; }
.hl-feed { width: 100%; max-width: 300px; display: grid; gap: 8px; font-size: 13px; }
.hl-feed > div { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 10px; background: rgba(0, 0, 0, .28); border-left: 3px solid var(--c); }
.hl-backup { width: 100%; max-width: 280px; text-align: left; }
.hl-backup b { font-size: 34px; color: var(--heading); line-height: 1; }
.hl-backup span { margin-left: 8px; color: var(--muted); font-size: 13px; }
.hl-backup small { color: #4ade80; font-size: 12.5px; font-weight: 600; }
.hl-msg { width: 100%; max-width: 300px; display: flex; gap: 10px; align-items: flex-start; text-align: left; }
.hl-av { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--primary); }
.hl-msg b { font-size: 13px; color: var(--heading); } .hl-msg p { margin: 2px 0 6px; font-size: 13px; color: var(--text); }
.hl-card { display: block; padding: 8px 10px; border-radius: 8px; border-left: 3px solid #9146ff; background: rgba(0, 0, 0, .3); font-size: 12px; color: var(--muted); }
.hl-embed { width: 100%; max-width: 280px; padding: 12px 14px; border-radius: 8px; text-align: left; border-left: 4px solid var(--c); background: rgba(0, 0, 0, .3); }
.hl-embed b { font-size: 14px; color: var(--heading); } .hl-embed p { margin: 6px 0 10px; font-size: 12.5px; color: var(--label); }
.hl-btn { display: inline-block; padding: 5px 12px; border-radius: 6px; background: #248046; color: #fff; font-size: 12px; font-weight: 600; }

/* How it works */
.how-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; counter-reset: s; }
.how-steps li { position: relative; padding: 26px 22px; border-radius: 16px; background: var(--panel); border: 1px solid var(--hairline); }
.step-n { position: absolute; top: 18px; right: 20px; font-size: 42px; font-weight: 800; line-height: 1; color: rgba(var(--primary-rgb), .18); }
.step-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--primary-grad); box-shadow: 0 8px 22px rgba(var(--primary-rgb), .35); }
.step-ic svg { width: 20px; height: 20px; }
.how-steps h3 { margin: 16px 0 6px; font-size: 17px; color: var(--heading); }
.how-steps p { margin: 0; color: var(--muted); font-size: 14px; }
@media (max-width: 800px) { .how-steps { grid-template-columns: 1fr; } }

/* Stats */
.stats-section { padding-top: 0; }
.stat-tile { text-align: center; padding: 24px 16px; }
.stat-tile .n { background: linear-gradient(90deg, var(--heading), var(--primary-light)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-tile p { margin-top: 4px; }

/* Pricing teaser */
.pt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; max-width: 820px; margin: 0 auto; }
.pt-card { position: relative; display: grid; gap: 6px; justify-items: center; padding: 26px 18px; border-radius: 16px; text-decoration: none; color: var(--text);
  background: var(--panel); border: 1px solid var(--hairline); transition: transform var(--t), border-color var(--t); }
.pt-card:hover { transform: translateY(-3px); border-color: var(--border-hover); }
.pt-card.best { border-color: rgba(245, 176, 65, .45); background: radial-gradient(90% 80% at 50% 0%, rgba(245, 176, 65, .12), transparent 70%), var(--panel); }
.pt-card b { font-size: 15px; color: var(--heading); }
.pt-price { font-size: 30px; font-weight: 800; letter-spacing: -.02em; color: var(--heading); }
.pt-card small { color: var(--muted); font-size: 12.5px; }
.pt-best { position: absolute; top: -11px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; background: linear-gradient(135deg, #f9d58c, #e8912d); color: #2a1a05; }
@media (max-width: 700px) { .pt-grid { grid-template-columns: 1fr; } }

/* Closing call to action */
.cta-band .ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-band .btn { display: inline-flex; align-items: center; gap: 8px; }
.btn-ghost-light { background: transparent !important; color: #fff !important; border: 1px solid rgba(255, 255, 255, .45) !important; }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .1) !important; }

/* Leaderboard */
.lb-hero { display: flex; align-items: center; gap: 18px; margin-bottom: 28px; }
.lb-hero h1 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; color: var(--heading); margin-top: 4px; }
.lb-hero .eyebrow { margin: 0; font-size: 11px; }
.lb-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: end; margin-bottom: 26px; max-width: 760px; }
.lb-pod { position: relative; display: grid; justify-items: center; gap: 4px; padding: 18px 12px 0; border-radius: 16px 16px 0 0; text-align: center; overflow: hidden;
  background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--hairline); border-bottom: 0; }
.lb-pod img { width: 64px; height: 64px; border-radius: 50%; border: 3px solid var(--pc, var(--border-strong)); box-shadow: 0 0 0 4px rgba(0, 0, 0, .25); }
.lb-pod.r1 { --pc: #fbbf24; padding-top: 26px; } .lb-pod.r1 img { width: 78px; height: 78px; }
.lb-pod.r2 { --pc: #cbd5e1; } .lb-pod.r3 { --pc: #d97706; }
.lb-pod b { margin-top: 6px; color: var(--heading); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-crown { font-size: 22px; line-height: 1; }
.lb-pod-lvl { font-size: 13px; font-weight: 700; color: var(--pc); }
.lb-pod-xp { font-size: 12px; color: var(--muted); }
.lb-step { width: 100%; margin-top: 12px; padding: 10px 0; font-size: 22px; font-weight: 800; color: #0c0d11;
  background: linear-gradient(180deg, var(--pc), color-mix(in srgb, var(--pc) 70%, #000)); }
.lb-pod.r1 .lb-step { padding: 22px 0; } .lb-pod.r2 .lb-step { padding: 14px 0; }
.lb-pod.me { border-color: var(--primary); }
.lb-search { margin-bottom: 12px; max-width: 320px; }
.lb-list { display: grid; gap: 8px; }
.lb-row { transition: border-color var(--t), background var(--t); }
.lb-row.me { border-color: rgba(var(--primary-rgb), .55); background: rgba(var(--primary-rgb), .07); }
.lb-row .who { min-width: 0; display: grid; gap: 6px; }
.lb-prog { height: 5px; max-width: 220px; border-radius: 99px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.lb-prog i { display: block; height: 100%; border-radius: inherit; background: var(--primary-grad); }
.lb-you { margin-left: 8px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--primary); color: #fff; vertical-align: 1px; }
.lb-rewards { margin-top: 12px; display: grid; gap: 8px; }
.lb-role { font-weight: 600; color: var(--rc); }
.lb-lvl-pill { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--field); border: 1px solid var(--field-border); color: var(--muted); }
@media (max-width: 640px) {
  .lb-podium { gap: 8px; } .lb-pod img { width: 48px; height: 48px; } .lb-pod.r1 img { width: 58px; height: 58px; }
  .lb-hero h1 { font-size: 22px; }
}
.gicon.lg { width: 72px; height: 72px; border-width: 0; font-size: 24px; border-radius: 22px; box-shadow: 0 10px 28px rgba(0, 0, 0, .4); }
@media (max-width: 900px) { .hero .hero-trust { justify-content: center; } }
.cta-band { background: radial-gradient(120% 140% at 0% 0%, rgba(255, 255, 255, .14), transparent 55%), linear-gradient(120deg, #1d5fd1, #3994ff 50%, #22b8d6) !important; }

/* Toasts: icon, timer bar and a soft exit */
.toast { position: relative; overflow: hidden; display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px 14px 12px; border-left: 0; background: var(--panel-2); border: 1px solid var(--border-strong); }
.toast-ic { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(52, 211, 153, .15); color: #4ade80; }
.toast-ic svg { width: 14px; height: 14px; }
.toast.error .toast-ic { background: rgba(248, 113, 113, .15); color: #f87171; }
.toast-msg { padding-top: 1px; line-height: 1.45; }
.toast-timer { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: #4ade80; transform-origin: left; animation: toast-timer 4s linear forwards; opacity: .7; }
.toast.error .toast-timer { background: #f87171; }
.toast.out { animation: toast-out .25s ease forwards; }
@keyframes toast-timer { to { transform: scaleX(0); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(16px); } }

/* Pop-up cards scale in */
.modal-card, .gate-card { animation: pop-in .22s cubic-bezier(.2, .8, .3, 1.15); }
@keyframes pop-in { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }

/* Loading placeholders shimmer */
.op-loading { background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, .04) 50%, transparent 100%) 0 0 / 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: 10px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  .toast, .toast.out, .toast-timer, .modal, .modal-card, .gate-card, .op-loading, .hl-card-outer, .pt-card, .plugin-card, .orbit { animation: none !important; transition: none !important; }
}

/* ── power tools: command palette, plugin toolbar ── */
kbd { font: 600 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 3px 6px; border-radius: 6px; border: 1px solid var(--border-strong, var(--border)); border-bottom-width: 2px; background: var(--panel-2); color: var(--muted); }
.cmdk-btn { display: inline-flex; align-items: center; gap: 10px; height: 36px; padding: 0 8px 0 12px; min-width: 260px; margin-right: 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.cmdk-btn:hover { border-color: rgba(var(--primary-rgb), .55); color: var(--text); }
.cmdk-btn .icon { width: 16px; height: 16px; flex: none; }
.cmdk-btn .cmdk-label { flex: 1; text-align: left; }
@media (max-width: 900px) { .cmdk-btn { min-width: 0; padding: 0 10px; } .cmdk-btn .cmdk-label, .cmdk-btn kbd { display: none; } }
.cmdk { position: fixed; inset: 0; z-index: 120; background: rgba(5, 6, 10, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; justify-content: center; align-items: flex-start; padding: min(12vh, 110px) 16px 16px; animation: fade .12s; }
.cmdk-card { width: min(640px, 100%); max-height: min(72vh, 620px); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--border-strong, var(--border)); border-radius: 16px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 0 1px rgba(var(--primary-rgb), .12); overflow: hidden; animation: pop-in .16s ease-out; }
.cmdk-top { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.cmdk-top .icon { width: 20px; height: 20px; color: var(--primary); flex: none; }
.cmdk-input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 16px; }
.cmdk-list { overflow-y: auto; padding: 6px; flex: 1; }
.cmdk-group { padding: 10px 10px 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.cmdk-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 10px; border: 0; border-radius: 10px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.cmdk-item.on { background: rgba(var(--primary-rgb), .14); box-shadow: inset 2px 0 0 var(--primary); }
.cmdk-ico { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--panel-2); color: var(--muted); }
.cmdk-ico .icon { width: 16px; height: 16px; }
.cmdk-item .picon { flex: none; }
.cmdk-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cmdk-text b { font-weight: 600; font-size: 14px; }
.cmdk-text span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-enter { color: var(--faint); opacity: 0; font-size: 13px; }
.cmdk-item.on .cmdk-enter { opacity: 1; }
.cmdk-empty { padding: 28px; text-align: center; color: var(--muted); }
.cmdk-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--faint); }
.cmdk-foot kbd { margin-right: 3px; }

.plugin-tools { position: sticky; top: calc(var(--topbar) + 8px); z-index: 20; margin: 0 0 16px; padding: 10px; border-radius: 14px; background: rgba(23, 24, 30, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.pt-row { display: flex; align-items: center; gap: 10px; }
.pt-search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); transition: border-color .15s, box-shadow .15s; }
.pt-search:focus-within { border-color: rgba(var(--primary-rgb), .7); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .15); }
.pt-search .icon { width: 16px; height: 16px; color: var(--muted); flex: none; }
.pt-find { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 14px; }
.pt-count { white-space: nowrap; }
.pt-hint { white-space: nowrap; }
.pt-more { position: relative; }
.pt-menu { right: 0; left: auto; top: calc(100% + 6px); min-width: 220px; }
.pt-menu button { width: 100%; }
.pt-jump { display: flex; gap: 6px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.pt-jump::-webkit-scrollbar { display: none; }
.pt-chip { flex: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--panel-2); color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .15s; }
.pt-chip:hover { color: var(--text); border-color: rgba(var(--primary-rgb), .6); background: rgba(var(--primary-rgb), .12); }
.pt-out { display: none !important; }
.pt-file { display: block; margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.card.setting { scroll-margin-top: calc(var(--topbar) + 120px); }
.flash { animation: flash 1.6s ease-out; border-radius: 10px; }
@keyframes flash { 0%, 30% { box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .7), 0 0 30px rgba(var(--primary-rgb), .35); } 100% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0); } }
@media (max-width: 700px) { .plugin-tools { position: static; } }
@media (prefers-reduced-motion: reduce) { .flash, .cmdk, .cmdk-card { animation: none; } }

/* ═════════ Clean layer: calm charcoal surfaces, flat cards, more air — every page ═════════ */
:root {
  --bg: #16171b;
  --bg-2: #1c1d22;
  --panel: #202126;
  --panel-2: #25262c;
  --panel-3: #2c2d34;
  --field: #18191d;
  --field-border: #2d2f36;
  --border: #2a2b31;
  --border-strong: #33353d;
  --border-hover: #3d3f48;
  --line-soft: rgba(255, 255, 255, .05);
  --hairline: rgba(255, 255, 255, .06);
  --text: #f1f2f5;
  --label: #d4d6de;
  --nav-text: #a4a7b3;
  --muted: #979aa6;
  --faint: #6b6e7a;
  --primary-grad: none;
  --radius: 10px;
  --radius-sm: 8px;
}
body { background: var(--bg); }
/* frame */
.shell > .topbar { background: var(--bg-2); backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 1px solid var(--hairline); }
.sidebar { background: var(--bg-2); }
.nav-label { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); padding: 18px 10px 6px; }
.nav a.nav-top, .nav a.nav-plugin { min-height: 38px; font-size: 14px; font-weight: 500; }
.nav a.nav-top:hover, .nav a.nav-plugin:hover { background: rgba(255, 255, 255, .045); }
.nav a.active { background: rgba(var(--primary-rgb), .14); color: #fff; }
.nav a.active svg, .nav a.active .picon { color: var(--primary) !important; }
.nav a.active::before { display: none; }
.nav .status:not(.on) { opacity: 0; }
.switcher-btn { background: var(--panel); border: 1px solid var(--hairline); border-radius: 10px; }
.main > .content, .content { max-width: 1240px; }
/* buttons: solid, flat */
.btn { border-radius: 8px; box-shadow: none !important; }
.btn-primary { background: var(--primary); background-image: none; border-color: transparent; }
.btn-primary:hover { background: #4ea2ff; }
.btn-ghost { background: var(--panel-2); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--panel-3); border-color: var(--border-hover); }
/* overview banner: flat header card + stat tiles */
.banner { background: var(--panel) !important; background-image: none !important; border: 1px solid var(--hairline); border-radius: 14px; padding: 28px 30px; }
.banner .eyebrow { color: var(--primary); letter-spacing: .08em; }
.banner h1 { font-size: 26px; font-weight: 800; letter-spacing: -.01em; }
.banner p { color: var(--muted); }
.bstat { background: var(--panel-2) !important; border: 1px solid var(--hairline) !important; border-radius: 12px; box-shadow: none !important; }
.bstat b { font-size: 22px; font-weight: 800; }
.page-title { font-size: 24px; font-weight: 800; letter-spacing: -.01em; margin-top: 36px; }
/* category tabs: quiet pills */
.tabbar { border: 0; background: none; padding: 0; }
.tab { border-radius: 999px; background: transparent; color: var(--muted); font-weight: 600; }
.tab:hover { background: var(--panel-2); color: var(--text); }
.tab.active { background: var(--panel-3); color: #fff; box-shadow: none; }
.tab.active .tab-count { background: var(--primary); color: #fff; }
.tab-count { background: var(--panel-2); color: var(--muted); }
/* plugin cards: bigger icon, no badges, calm footer */
.plugin-grid { gap: 16px; }
.plugin-card { min-height: 212px; padding: 22px; border-radius: 14px; background: var(--panel); border: 1px solid var(--hairline); box-shadow: none; transition: background .15s, border-color .15s; }
.plugin-card:hover { background: var(--panel-2); border-color: var(--border-hover); transform: none; box-shadow: none; }
.plugin-card.is-on { border-color: var(--hairline); }
.plugin-card .top { margin-bottom: 14px; }
.plugin-card .top .picon { width: 48px; height: 48px; border-radius: 12px; }
.plugin-card .top .picon svg { width: 24px; height: 24px; }
.plugin-card .badge.live { display: none; }
.plugin-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.plugin-card p { font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.plugin-card .foot { padding-top: 16px; margin-top: auto; border-top: 1px solid var(--line-soft); }
.plugin-card .foot .btn-ghost { background: transparent; border-color: transparent; padding-left: 0; color: var(--label); }
.plugin-card .foot .btn-ghost:hover { color: #fff; background: transparent; }
/* plugin pages */
.plugin-head { padding: 6px 0 22px; margin-bottom: 18px; border-bottom: 1px solid var(--hairline); }
.plugin-head h1 { font-size: 28px; font-weight: 800; letter-spacing: -.01em; }
.plugin-head .info p { color: var(--muted); font-size: 14.5px; }
.plugin-head .chip { background: var(--panel-2); border: 1px solid var(--hairline); color: var(--label); }
.card, .card.setting { background: var(--panel); border: 1px solid var(--hairline); border-radius: 14px; box-shadow: none; }
.card.setting { margin-bottom: 16px; }
.setting-head { min-height: 60px; padding: 16px 22px; }
.setting-head h2 { font-size: 16px; font-weight: 700; }
.setting-body { padding: 4px 22px 22px; }
.field > label, .field .flabel { color: var(--label); font-weight: 600; font-size: 13.5px; }
.input, .textarea, select.input, .select { background: var(--field); border-color: var(--field-border); border-radius: 8px; }
.input:focus, .textarea:focus { border-color: rgba(var(--primary-rgb), .8); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .15); }
.plugin-tools { background: var(--panel); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: 0 8px 20px rgba(0, 0, 0, .25); border-color: var(--hairline); }
.pt-search { background: var(--field); }
.savebar { background: var(--panel-3) !important; backdrop-filter: none !important; border: 1px solid var(--border-strong); border-radius: 12px; }
.cmdk-btn { background: var(--panel); border-color: var(--hairline); }
.dropdown { background: var(--panel-2); border-color: var(--border-strong); }
@media (max-width: 900px) { .banner { padding: 22px; } .plugin-card { min-height: 0; } }
.cmdk-btn { min-width: 200px; white-space: nowrap; }
@media (max-width: 1180px) { .cmdk-btn { min-width: 150px; } }
.pt-spacer { flex: 1; }
.plugin-tools .pt-jump { flex: 1; min-width: 0; margin-top: 0; }

/* ── Owner: status message ── */
.sm-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; margin-top: 8px; }
@media (max-width: 1000px) { .sm-layout { grid-template-columns: 1fr; } }
.sm-form { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.sm-pill { flex: none; align-self: flex-start; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--panel-3); color: var(--muted); }
.sm-pill.on { background: rgba(35, 165, 90, .16); color: #4ade80; }
.sm-rows { display: flex; flex-direction: column; gap: 8px; }
.sm-row { display: grid; grid-template-columns: auto minmax(0, 1fr) 200px; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--hairline); }
.sm-row.off .sm-row-name, .sm-row.off .sm-state { opacity: .45; }
.sm-row-name { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sm-row-name .input { height: 34px; }
.sm-row-name small { font-size: 11.5px; }
.sm-state { height: 34px; }
@media (max-width: 640px) { .sm-row { grid-template-columns: auto 1fr; } .sm-state { grid-column: 1 / -1; } }
.sm-side { min-width: 0; }
.sm-preview-wrap { margin-top: 8px; position: sticky; top: calc(var(--topbar) + 16px); }
.sm-preview { background: #313338; border-radius: 12px; padding: 14px; }
.sm-embed { display: flex; gap: 14px; margin-top: 6px; padding: 12px 14px; border-radius: 6px; background: #2b2d31; border-left: 4px solid #3994ff; max-width: 520px; }
.sm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: #dbdee1; }
.sm-author, .sm-foot { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #f2f3f5; }
.sm-foot { font-size: 12px; font-weight: 500; color: #b5bac1; margin-top: 4px; }
.sm-author img, .sm-foot img { width: 22px; height: 22px; border-radius: 50%; }
.sm-foot img { width: 18px; height: 18px; }
.sm-title { font-weight: 700; color: #f2f3f5; font-size: 15px; }
.sm-desc { line-height: 1.45; }
.sm-desc .sm-h { font-size: 16px; font-weight: 700; color: #f2f3f5; margin: 2px 0 4px; }
.sm-desc .sm-q { border-left: 4px solid #4e5058; padding-left: 10px; color: #b5bac1; }
.sm-desc .sm-gap { height: 8px; }
.sm-desc b { color: #f2f3f5; }
.sm-thumb { width: 80px; height: 80px; border-radius: 8px; flex: none; object-fit: cover; }
.sm-row-name .input, .sm-state { height: 38px; min-height: 38px; padding-top: 0; padding-bottom: 0; line-height: 36px; }

/* ═════════ Modern polish: soft depth, smooth motion, accent touches — keeps the charcoal base ═════════ */
:root {
  --radius: 14px;
  --radius-sm: 10px;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --elev-card: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .22);
  --elev-hover: 0 2px 4px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .34);
  --glow: 0 6px 20px rgba(var(--primary-rgb), .35);
}
* { scrollbar-width: thin; scrollbar-color: var(--panel-3) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--panel-3); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--border-hover); background-clip: content-box; }

/* Hero: soft top light + a quiet accent glow in the corner */
.banner { position: relative; overflow: hidden; background:
  radial-gradient(130% 130% at 100% -20%, rgba(var(--primary-rgb), .16), transparent 55%),
  linear-gradient(180deg, rgba(255, 255, 255, .03), transparent 40%),
  var(--panel) !important; box-shadow: var(--elev-card); }
.banner h1 { font-size: 28px; letter-spacing: -.02em; }
.bstat { background: rgba(255, 255, 255, .025) !important; transition: border-color .2s var(--ease), background .2s var(--ease); }
.bstat:hover { border-color: rgba(var(--primary-rgb), .3) !important; background: rgba(var(--primary-rgb), .06) !important; }
.bstat svg { color: var(--primary); }

/* Cards: gentle elevation + a smooth lift, accent-tinted edge on hover */
.plugin-card, .guild-card, .cat-card, .op-card, .card.setting { box-shadow: var(--elev-card); transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease); }
.plugin-card:hover, .guild-card:hover, .cat-card:hover { transform: translateY(-3px); box-shadow: var(--elev-hover); border-color: rgba(var(--primary-rgb), .35); }
.plugin-card .top .picon { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); transition: transform .2s var(--ease); }
.plugin-card:hover .top .picon { transform: scale(1.06); }

/* Nav: rounded accent indicator on the active item */
.nav a.nav-top, .nav a.nav-plugin { position: relative; transition: background .15s var(--ease), color .15s var(--ease); }
.nav a.active::before { content: ''; display: block !important; position: absolute; left: -6px; top: 50%; transform: translateY(-50%); width: 3px; height: 18px; border-radius: 3px; background: var(--primary); box-shadow: 0 0 8px rgba(var(--primary-rgb), .6); }

/* Buttons: primary gets a soft sheen + glow on hover; smooth press */
.btn { transition: transform .12s var(--ease), background .15s var(--ease), border-color .15s var(--ease), box-shadow .2s var(--ease); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(180deg, var(--primary-hi), var(--primary)) !important; }
.btn-primary:hover { box-shadow: var(--glow) !important; filter: brightness(1.04); }

/* Category tabs: smooth, with a soft active fill */
.tab { transition: background .15s var(--ease), color .15s var(--ease); }
.tab.active { box-shadow: inset 0 0 0 1px var(--hairline); }

/* Settings cards: accent ring while editing, section headers a touch tighter */
.card.setting:focus-within { border-color: rgba(var(--primary-rgb), .4) !important; box-shadow: var(--elev-card), 0 0 0 3px rgba(var(--primary-rgb), .1) !important; }
.plugin-head h1 { letter-spacing: -.02em; }

/* Inputs: smooth focus */
.input, .textarea, select.input, .select { transition: border-color .15s var(--ease), box-shadow .15s var(--ease), background .15s var(--ease); }

/* Toggles: a hair smoother */
.switch span { transition: background .2s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  .plugin-card:hover, .guild-card:hover, .cat-card:hover, .plugin-card:hover .top .picon, .btn:active { transform: none; }
  * { scroll-behavior: auto; }
}

/* ── Promo marquee: smooth infinite scroll ── */
.marquee { position: relative; display: flex; align-items: center; margin: 0; height: 40px; overflow: hidden;
  background: linear-gradient(90deg, var(--primary), #4f8bff 50%, var(--accent)); box-shadow: 0 2px 12px rgba(var(--primary-rgb), .35); }
.mq-track { display: flex; align-items: center; gap: 0; white-space: nowrap; will-change: transform; animation: mq-scroll 34s linear infinite; }
.marquee:hover .mq-track { animation-play-state: paused; }
.mq-item { display: inline-flex; align-items: center; gap: 8px; padding: 0 26px; font-size: 13.5px; font-weight: 700; color: #fff; letter-spacing: .01em; }
.mq-item::after { content: ''; position: absolute; } /* spacing handled by padding */
.mq-emoji { font-size: 15px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
@keyframes mq-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
/* soft fades at the edges + a spot for the close button */
.marquee::before, .marquee::after { content: ''; position: absolute; top: 0; bottom: 0; width: 36px; pointer-events: none; z-index: 1; }
.marquee::before { left: 0; background: linear-gradient(90deg, var(--primary), transparent); }
.marquee::after { right: 0; background: linear-gradient(270deg, var(--accent), transparent); }
.mq-x { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); z-index: 2; display: grid; place-items: center;
  width: 26px; height: 26px; border: 0; border-radius: 8px; background: rgba(0,0,0,.18); color: rgba(255,255,255,.85); cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease); }
.mq-x:hover { background: rgba(0,0,0,.32); color: #fff; }
.mq-x svg { width: 14px; height: 14px; }
@media (prefers-reduced-motion: reduce) { .mq-track { animation: none; } }

/* ── Landing: gentle scroll-reveal (added from JS so content is always visible without it) ── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease, ease), transform .6s var(--ease, ease); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; }
.hl-card-outer.reveal, .cat-card.reveal { transition-delay: .04s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1 !important; transform: none !important; } }

/* ── Dashboard: gentle one-shot entrance on page open (uses existing pop-in) ── */
.plugin-head, .op-head, .srv-title, .prem-hero, .lb-head, .overview-head { animation: pop-in .32s var(--ease, ease) both; }
@media (prefers-reduced-motion: reduce) { .plugin-head, .op-head, .srv-title, .prem-hero, .lb-head, .overview-head { animation: none; } }
