/* ═════════════════════════════════════════════════════════════
   GoGear dashboard — monochrome (blanc / gris / noir)
   ═════════════════════════════════════════════════════════════ */
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url('/static/fonts/Poppins_400Regular.ttf') format('truetype'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url('/static/fonts/Poppins_500Medium.ttf') format('truetype'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url('/static/fonts/Poppins_600SemiBold.ttf') format('truetype'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url('/static/fonts/Poppins_700Bold.ttf') format('truetype'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 800; font-display: swap; src: url('/static/fonts/Poppins_800ExtraBold.ttf') format('truetype'); }

:root {
  --bg: #09090a;
  --bg-2: #0e0e10;
  --panel: #121214;
  --card: #161618;
  --card-2: #1c1c1f;
  --card-3: #232326;
  --border: #242428;
  --border-2: #2e2e33;
  --text: #f5f5f5;
  --text-2: #c9c9ce;
  --muted: #8a8a90;
  --muted-2: #5e5e64;
  --accent: #f5f5f5;
  --accent-ink: #0a0a0b;
  --success: #3ba55d;
  --danger: #ed4245;
  --warn: #faa61a;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --rail: 76px;
  --sidebar: 300px;
  --topbar: 64px;
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent); color: var(--accent-ink); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #26262a; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #34343a; }

.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.i.sm { width: 15px; height: 15px; }
.i.lg { width: 22px; height: 22px; }
.i.xl { width: 30px; height: 30px; }

/* ───────────── Top bar ───────────── */
.topbar {
  position: fixed; inset: 0 0 auto 0; height: var(--topbar); z-index: 40;
  display: flex; align-items: center; justify-content: space-between; padding: 0 20px 0 14px;
  background: rgba(9, 9, 10, .88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: .3px; }
.brand img { width: 46px; height: 46px; object-fit: contain; }
.brand span small { display: block; font-size: 10px; font-weight: 500; color: var(--muted); letter-spacing: 1.5px; text-transform: uppercase; margin-top: -4px; }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.top-link { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-weight: 500; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; }
.top-link:hover { color: var(--text); }
.top-link .box { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; background: var(--card-3); }
.top-user { display: flex; align-items: center; gap: 6px; padding: 5px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); }
.top-user img { width: 34px; height: 34px; border-radius: 9px; }
.top-user a { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: var(--muted); }
.top-user a:hover { color: var(--text); background: var(--card-3); }
.burger { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }

/* ───────────── Rail (servers) ───────────── */
.rail {
  position: fixed; top: var(--topbar); bottom: 0; left: 0; width: var(--rail); z-index: 30;
  padding: 14px 0; display: flex; flex-direction: column; align-items: center; gap: 12px; overflow-y: auto;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail a { position: relative; width: 48px; height: 48px; border-radius: 14px; overflow: hidden; display: grid; place-items: center; background: var(--card-2); border: 1px solid var(--border); transition: border-radius .2s, transform .15s; font-weight: 600; font-size: 12px; color: var(--text-2); flex-shrink: 0; }
.rail a:hover { border-radius: 12px; transform: translateY(-1px); }
.rail a img { width: 100%; height: 100%; object-fit: cover; }
.rail a.home { background: var(--accent); color: var(--accent-ink); border: 0; }
.rail a.active::before { content: ''; position: absolute; left: -14px; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent); }
.rail a.active { outline: 2px solid var(--accent); outline-offset: 2px; overflow: visible; }
.rail a.active img { border-radius: 13px; }
.rail .sep { width: 32px; height: 2px; border-radius: 2px; background: var(--border-2); flex-shrink: 0; }
.rail a.add { color: var(--muted); border-style: dashed; background: transparent; }

/* ───────────── Sidebar ───────────── */
.sidebar {
  position: fixed; top: var(--topbar); bottom: 0; left: var(--rail); width: var(--sidebar); z-index: 30;
  background: var(--panel); border: 1px solid var(--border); border-bottom: 0; border-radius: 18px 18px 0 0;
  display: flex; flex-direction: column; margin-top: 12px;
}
.sidebar-scroll { flex: 1; overflow-y: auto; padding: 12px 12px 20px; }
.guild-switch { position: relative; margin: 0 0 8px; }
.guild-switch > button {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px;
  background: var(--card-2); border: 1px solid var(--border); cursor: pointer; text-align: left;
}
.guild-switch > button:hover { border-color: var(--border-2); }
.guild-switch .gicon { width: 34px; height: 34px; border-radius: 9px; background: var(--card-3); display: grid; place-items: center; overflow: hidden; flex-shrink: 0; }
.guild-switch .gname { flex: 1; min-width: 0; }
.guild-switch .gname b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guild-switch .gname small { color: var(--muted); font-size: 12px; }
.dropdown { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--card-2); border: 1px solid var(--border-2); border-radius: 12px; padding: 6px; box-shadow: var(--shadow); z-index: 50; max-height: 360px; overflow-y: auto; display: none; }
.dropdown.open { display: block; }
.dropdown a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; }
.dropdown a:hover { background: var(--card-3); }
.dropdown a img, .dropdown a .ph { width: 28px; height: 28px; border-radius: 8px; background: var(--card-3); display: grid; place-items: center; font-size: 10px; }

.nav-section { margin-top: 14px; }
.nav-title { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; }
.nav-title .i { transition: transform .2s; }
.nav-section.collapsed .nav-title .i { transform: rotate(180deg); }
.nav-section.collapsed .nav-items { display: none; }
.nav-items a {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px; margin: 2px 0; border-radius: 9px;
  color: var(--text-2); font-weight: 500; transition: background .15s, color .15s;
}
.nav-items a:hover { background: var(--card-2); color: var(--text); }
.nav-items a.active { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.nav-items a.active::before { content: ''; position: absolute; left: -12px; top: 6px; bottom: 6px; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent); }
.nav-items a .dot { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); }
.nav-items a .dot.on { background: var(--success); box-shadow: 0 0 0 3px rgba(59, 165, 93, .15); }
.nav-items a.active .dot.on { box-shadow: none; }
.nav-items a.special { color: #e9e9ec; }
.nav-items a.special .i { color: var(--text); }

.sidebar-user { margin: 0 10px 10px; padding: 12px 14px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); display: flex; align-items: center; gap: 10px; font-weight: 600; }
.sidebar-user img { width: 32px; height: 32px; border-radius: 9px; }
.sidebar-user span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user a { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; }
.sidebar-user a:hover { background: rgba(0, 0, 0, .08); }

/* ───────────── Main ───────────── */
.main { margin-left: calc(var(--rail) + var(--sidebar)); padding: calc(var(--topbar) + 40px) 48px 80px; min-height: 100vh; }
.main-inner { max-width: 1240px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.page-title { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 22px; font-weight: 700; }
.page-title .i { width: 22px; height: 22px; }
.page-desc { color: var(--muted); margin: 6px 0 0; max-width: 720px; }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; margin: 40px 0 18px; }

/* ───────────── Cards / grid ───────────── */
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.card-pad { padding: 22px 24px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--border); }
.card-head h3 { margin: 0; font-size: 16px; font-weight: 600; }
.card-body { padding: 20px 24px; }
.stat { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; min-height: 86px; }
.stat .label { color: var(--muted); font-size: 14px; }
.stat .value { font-size: 18px; font-weight: 700; margin-top: 2px; }
.stat .ico { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; color: var(--text); }
.stat .ico .i { width: 30px; height: 30px; }
.stat .sub { font-size: 12px; color: var(--muted); }
.stat .sub.up { color: var(--success); }
.stat .sub.down { color: var(--danger); }

.empty { color: var(--muted); text-align: center; padding: 30px 10px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.mt { margin-top: 16px; }
.mt-lg { margin-top: 28px; }

/* Tables */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-weight: 500; color: var(--text-2); padding: 14px 20px; border-bottom: 1px solid var(--border); font-size: 14px; }
.table td { padding: 12px 20px; border-bottom: 1px solid var(--border); color: var(--text-2); }
.table tr:last-child td { border-bottom: 0; }
.table .who { display: flex; align-items: center; gap: 10px; }
.table .who img { width: 28px; height: 28px; border-radius: 50%; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 9px;
  border: 1px solid var(--border-2); background: var(--card-2); color: var(--text); font-weight: 500; cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s, opacity .15s; white-space: nowrap;
}
.btn:hover { background: var(--card-3); border-color: #3a3a40; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn.primary:hover { background: #ffffff; }
.btn.danger { background: rgba(237, 66, 69, .12); border-color: rgba(237, 66, 69, .35); color: #ff8a8c; }
.btn.danger:hover { background: rgba(237, 66, 69, .2); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--card-2); }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn.icon { padding: 7px; }
.btn.lg { padding: 13px 22px; font-size: 15px; border-radius: 11px; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 500; background: var(--card-3); color: var(--text-2); }
.badge.on { background: rgba(59, 165, 93, .14); color: #6fd08f; }
.badge.off { background: var(--card-3); color: var(--muted); }
.badge.red { background: rgba(237, 66, 69, .14); color: #ff8a8c; }
.badge.warn { background: rgba(250, 166, 26, .14); color: #ffc062; }

/* ───────────── Forms ───────────── */
.module-bar { position: sticky; top: calc(var(--topbar) + 12px); z-index: 20; display: flex; align-items: center; gap: 12px; padding: 14px 18px; margin-bottom: 20px; background: rgba(22, 22, 24, .92); backdrop-filter: blur(10px); border: 1px solid var(--border); border-radius: var(--radius); }
.module-bar .state { font-weight: 600; }
.unsaved { display: none; align-items: center; gap: 12px; color: var(--text-2); }
.unsaved.show { display: flex; }

.form-card { margin-bottom: 16px; }
.field { padding: 16px 24px; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 20px; align-items: center; }
.field:last-child { border-bottom: 0; }
.field.stack { grid-template-columns: 1fr; gap: 10px; }
.field > label, .field .flabel { font-weight: 500; color: var(--text); }
.field .help { display: block; margin-top: 3px; color: var(--muted); font-size: 12.5px; font-weight: 400; }
.heading { padding: 18px 24px 6px; font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); font-weight: 600; border-bottom: 0 !important; }

.input, .select, .textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 9px; padding: 10px 12px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: #5a5a62; box-shadow: 0 0 0 3px rgba(245, 245, 245, .06); }
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a8a90' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.select option { background: var(--card-2); }

.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; cursor: pointer; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--card-3); border: 1px solid var(--border-2); transition: background .2s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: transform .2s, background .2s; }
.switch input:checked + span { background: var(--accent); border-color: var(--accent); }
.switch input:checked + span::after { transform: translateX(20px); background: var(--accent-ink); }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px rgba(245, 245, 245, .2); }

.color-input { display: flex; align-items: center; gap: 10px; }
.color-input input[type=color] { width: 42px; height: 38px; padding: 0; border: 1px solid var(--border-2); border-radius: 9px; background: var(--bg-2); cursor: pointer; }
.color-input input[type=color]::-webkit-color-swatch-wrapper { padding: 4px; }
.color-input input[type=color]::-webkit-color-swatch { border: 0; border-radius: 6px; }

/* Picker (channels / roles) */
.picker { position: relative; }
.picker-box { min-height: 42px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 36px 6px 8px; background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 9px; cursor: pointer; position: relative; }
.picker-box::after { content: ''; position: absolute; right: 12px; top: 50%; width: 16px; height: 16px; margin-top: -8px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a8a90' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.picker-box .ph { color: var(--muted-2); padding: 2px 4px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 6px 3px 9px; border-radius: 7px; background: var(--card-3); font-size: 13px; max-width: 100%; }
.chip .x { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; color: var(--muted); cursor: pointer; }
.chip .x:hover { background: #34343a; color: var(--text); }
.chip .sw { width: 10px; height: 10px; border-radius: 50%; }
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60; background: var(--card-2); border: 1px solid var(--border-2); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; display: none; }
.picker.open .picker-menu { display: block; }
.picker-menu input { margin-bottom: 6px; }
.picker-list { max-height: 260px; overflow-y: auto; }
.picker-opt { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 7px; cursor: pointer; color: var(--text-2); }
.picker-opt:hover, .picker-opt.hl { background: var(--card-3); color: var(--text); }
.picker-opt.sel { color: var(--text); font-weight: 600; }
.picker-opt.sel::after { content: '✓'; margin-left: auto; }
.picker-opt.disabled { opacity: .45; }
.picker-group { padding: 8px 10px 4px; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted-2); font-weight: 600; }

/* Tags */
.tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 8px; min-height: 42px; background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 9px; align-items: center; }
.tags input { flex: 1; min-width: 140px; background: transparent; border: 0; outline: none; padding: 4px; }

/* Lists (repeatable items) */
.list-field { padding: 16px 24px; border-bottom: 1px solid var(--border); }
.list-field:last-child { border-bottom: 0; }
.list-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 10px; }
.list-head b { font-weight: 600; }
.list-items { display: flex; flex-direction: column; gap: 10px; }
.item { border: 1px solid var(--border-2); border-radius: 11px; background: var(--bg-2); overflow: hidden; }
.item-head { display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; user-select: none; }
.item-head .title { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-head .chev { transition: transform .2s; color: var(--muted); }
.item.open > .item-head .chev { transform: rotate(180deg); }
.item-body { display: none; border-top: 1px solid var(--border); background: var(--card); }
.item.open > .item-body { display: block; }
.item-body .field, .item-body .list-field { padding-left: 18px; padding-right: 18px; }
.item-body .item { background: var(--bg-2); }
.item-actions { display: flex; gap: 6px; padding: 12px 18px; border-top: 1px solid var(--border); flex-wrap: wrap; }

.group { border-bottom: 1px solid var(--border); }
.group:last-child { border-bottom: 0; }
.group-title { padding: 16px 24px 0; font-weight: 600; color: var(--text); }
.group .field { border-bottom: 0; padding-top: 12px; padding-bottom: 12px; }

/* ───────────── Embed editor + Discord preview ───────────── */
.embed-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.embed-editor .ee-form { display: grid; gap: 10px; }
.embed-editor .ee-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.embed-editor label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; font-weight: 500; }
.ee-fields .ee-field { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.discord { background: #313338; border-radius: 10px; padding: 16px 16px 18px; font-family: 'gg sans', 'Noto Sans', Helvetica, Arial, sans-serif; color: #dbdee1; position: sticky; top: calc(var(--topbar) + 90px); }
.dmsg { display: flex; gap: 14px; }
.dmsg .av { width: 40px; height: 40px; border-radius: 50%; background: #0a0a0b var(--img-avatar) center/cover no-repeat; flex-shrink: 0; }
.dmsg .nm { font-weight: 600; color: #f2f3f5; font-size: 15px; }
.dmsg .bot { background: #5865f2; color: #fff; font-size: 10px; font-weight: 600; padding: 1px 5px; border-radius: 3px; margin-left: 4px; vertical-align: 2px; }
.dmsg .tm { color: #949ba4; font-size: 12px; margin-left: 6px; }
.dmsg .ct { white-space: pre-wrap; word-wrap: break-word; font-size: 15px; line-height: 1.375; margin-top: 2px; }
.dembed { margin-top: 6px; max-width: 520px; background: #2b2d31; border-left: 4px solid #f5f5f5; border-radius: 4px; padding: 10px 16px 14px 12px; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.dembed .ea { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #f2f3f5; }
.dembed .ea img { width: 24px; height: 24px; border-radius: 50%; }
.dembed .et { font-weight: 600; color: #f2f3f5; font-size: 16px; }
.dembed .et.link { color: #00a8fc; }
.dembed .ed { font-size: 14px; white-space: pre-wrap; word-wrap: break-word; line-height: 1.375; }
.dembed .ef { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dembed .ef div { grid-column: 1 / -1; font-size: 14px; }
.dembed .ef div.inl { grid-column: auto; }
.dembed .ef b { display: block; color: #f2f3f5; font-size: 14px; margin-bottom: 2px; }
.dembed .ei { grid-column: 1 / -1; border-radius: 4px; max-width: 100%; margin-top: 6px; }
.dembed .eth { width: 80px; height: 80px; object-fit: cover; border-radius: 4px; grid-row: 1 / span 3; grid-column: 2; }
.dembed .eft { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: 12px; color: #b5bac1; }
.dembed .eft img { width: 20px; height: 20px; border-radius: 50%; }
.dembed > .main-col { display: grid; gap: 8px; min-width: 0; }
.dbtn { display: inline-flex; margin-top: 8px; padding: 6px 14px; background: #4e5058; color: #fff; border-radius: 4px; font-size: 14px; font-weight: 500; }
.mention { background: rgba(88, 101, 242, .3); color: #c9cdfb; border-radius: 3px; padding: 0 2px; }

/* Placeholders helper */
.vars { display: flex; flex-wrap: wrap; gap: 6px; }
.vars code { cursor: pointer; background: var(--card-3); border-radius: 6px; padding: 3px 7px; font-size: 12px; color: var(--text-2); }
.vars code:hover { background: var(--accent); color: var(--accent-ink); }

/* ───────────── Toasts / modal ───────────── */
.toasts { position: fixed; right: 22px; bottom: 22px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 420px; padding: 13px 16px; border-radius: 11px; background: var(--card-2); border: 1px solid var(--border-2); box-shadow: var(--shadow); animation: toastIn .25s ease; }
.toast.ok { border-left: 4px solid var(--success); }
.toast.err { border-left: 4px solid var(--danger); }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

.modal-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .65); backdrop-filter: blur(4px); z-index: 90; display: none; place-items: center; padding: 20px; }
.modal-bg.open { display: grid; }
.modal { width: min(520px, 100%); background: var(--card); border: 1px solid var(--border-2); border-radius: 14px; box-shadow: var(--shadow); }
.modal h3 { margin: 0; padding: 18px 22px; border-bottom: 1px solid var(--border); font-size: 17px; }
.modal .modal-body { padding: 18px 22px; display: grid; gap: 12px; }
.modal .modal-foot { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* Heatmap */
.heatmap { display: grid; grid-template-columns: 40px repeat(24, 1fr); gap: 3px; font-size: 11px; color: var(--muted); }
.heatmap .hc { aspect-ratio: 1; border-radius: 3px; background: #1b1b1e; }
.heatmap .hl { display: flex; align-items: center; }
.heatmap .hh { text-align: center; }

/* Bars (top lists) */
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.bar-row .pos { color: var(--muted); font-size: 12px; text-align: right; }
.bar-row .nm { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bar-row .nm img { width: 22px; height: 22px; border-radius: 50%; }
.bar-row .nm span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row .track { grid-column: 2 / 3; height: 6px; border-radius: 6px; background: #1f1f23; overflow: hidden; margin-top: 4px; }
.bar-row .fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, #f5f5f5, #6d6d73); }
.bar-row .val { font-weight: 600; font-size: 13px; }

.seg { display: inline-flex; padding: 4px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; gap: 4px; }
.seg button { padding: 6px 12px; border-radius: 7px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-weight: 500; }
.seg button.on { background: var(--accent); color: var(--accent-ink); }

.chart-box { position: relative; height: 260px; }

/* Profile */
.profile-card { position: relative; border-radius: 16px; overflow: hidden; background: linear-gradient(135deg, #1f1f23, #0d0d0f); border: 1px solid var(--border-2); }
.profile-card img.card-img { width: 100%; border-radius: 12px; }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: 11px; background: rgba(250, 166, 26, .08); border: 1px solid rgba(250, 166, 26, .25); color: #ffd18a; margin-bottom: 18px; }

/* ───────────── Server list / landing ───────────── */
.plain-main { padding: calc(var(--topbar) + 40px) 24px 80px; max-width: 1200px; margin: 0 auto; }
.servers { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.server-card { position: relative; overflow: hidden; border-radius: 14px; background: var(--card); border: 1px solid var(--border); }
.server-card .banner { height: 110px; background-size: cover; background-position: center; filter: blur(18px) brightness(.55); transform: scale(1.3); background-color: #1b1b1e; }
.server-card .body { position: relative; margin-top: -52px; padding: 0 18px 18px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.server-card .sicon { width: 76px; height: 76px; border-radius: 20px; border: 4px solid var(--card); background: var(--card-3); display: grid; place-items: center; overflow: hidden; font-weight: 700; }
.server-card .sicon img { width: 100%; height: 100%; object-fit: cover; }
.server-card h3 { margin: 4px 0 0; font-size: 16px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.footer { border-top: 1px solid var(--border); padding: 26px 24px; text-align: center; color: var(--muted-2); font-size: 13px; }

.center-card { max-width: 460px; margin: calc(var(--topbar) + 80px) auto 40px; padding: 36px; text-align: center; }
.center-card .gicon { width: 96px; height: 96px; border-radius: 26px; margin: 0 auto 16px; background: var(--card-3); overflow: hidden; }

/* Leaderboard */
.lb-row { display: grid; grid-template-columns: 50px 46px minmax(0, 1fr) 160px 110px; align-items: center; gap: 14px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.lb-row:last-child { border-bottom: 0; }
.lb-row .pos { font-weight: 700; font-size: 18px; color: var(--muted); text-align: center; }
.lb-row .pos.top { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-size: 15px; margin: 0 auto; }
.lb-row img { width: 46px; height: 46px; border-radius: 50%; }
.lb-row .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-row .prog { height: 6px; background: #1f1f23; border-radius: 6px; overflow: hidden; }
.lb-row .prog div { height: 100%; background: var(--accent); }
.lb-row .lvl { text-align: center; }
.lb-row .lvl b { display: block; font-size: 18px; }

/* ───────────── Responsive ───────────── */
@media (max-width: 1280px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .embed-editor { grid-template-columns: 1fr; } .discord { position: static; } }
@media (max-width: 1000px) {
  .burger { display: grid; place-items: center; }
  .sidebar, .rail { transform: translateX(-120%); transition: transform .25s; }
  body.nav-open .sidebar, body.nav-open .rail { transform: none; }
  body.nav-open .sidebar { box-shadow: var(--shadow); }
  .main { margin-left: 0; padding: calc(var(--topbar) + 24px) 16px 60px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .field { grid-template-columns: 1fr; gap: 10px; }
  .top-link span { display: none; }
  .lb-row { grid-template-columns: 36px 40px minmax(0, 1fr) 70px; }
  .lb-row .prog-col { display: none; }
}
@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr; }
  .card-head, .card-body, .field, .list-field { padding-left: 16px; padding-right: 16px; }
  .ee-fields .ee-field { grid-template-columns: 1fr; }
  .embed-editor .ee-row { grid-template-columns: 1fr; }
  .brand span { display: none; }
}

/* ───────────── Home ───────────── */
.reveal { opacity: 1; }
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1) var(--d, 0s), transform .8s cubic-bezier(.2, .7, .2, 1) var(--d, 0s), translate .2s ease, border-color .2s; }
.js .reveal.from-left { transform: translateX(-40px); }
.js .reveal.from-right { transform: translateX(40px); }
.js .reveal.zoom { transform: translateY(24px) scale(.96); }
.js .reveal.in { opacity: 1; transform: none; }

.home .h-hero { position: relative; min-height: 100vh; padding: calc(var(--topbar) + 70px) 20px 90px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 50px; align-items: center; max-width: 1240px; margin: 0 auto; }
.h-glow { position: absolute; inset: -10% -20% auto; height: 80vh; background: radial-gradient(45% 55% at 30% 20%, rgba(255, 255, 255, .11), transparent 70%), radial-gradient(35% 45% at 85% 35%, rgba(255, 255, 255, .06), transparent 70%); pointer-events: none; z-index: -1; animation: glowShift 14s ease-in-out infinite alternate; }
.h-gridbg { position: absolute; inset: 0; z-index: -2; pointer-events: none; background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(70% 60% at 40% 30%, #000 30%, transparent 75%); -webkit-mask-image: radial-gradient(70% 60% at 40% 30%, #000 30%, transparent 75%); }
@keyframes glowShift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(4%, 3%, 0); } }
.h-eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 99px; background: rgba(255, 255, 255, .05); border: 1px solid var(--border-2); font-size: 13px; color: var(--text-2); margin-bottom: 22px; transition: border-color .2s, background .2s; }
.h-eyebrow:hover { border-color: #4a4a50; background: rgba(255, 255, 255, .08); }
.h-eyebrow .pill { padding: 2px 9px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; letter-spacing: .5px; }
.h-logo { width: 150px; margin-bottom: 8px; filter: drop-shadow(0 20px 60px rgba(255, 255, 255, .18)); animation: floatY 6s ease-in-out infinite; }
@keyframes floatY { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
.h-hero h1 { font-size: clamp(38px, 6vw, 70px); line-height: 1.02; margin: 0 0 18px; font-weight: 800; letter-spacing: -1.5px; }
.h-hero h1 .grad { background: linear-gradient(180deg, #ffffff 20%, #7d7d84); -webkit-background-clip: text; background-clip: text; color: transparent; }
.h-sub { color: var(--muted); font-size: 17px; max-width: 600px; margin: 0 0 30px; line-height: 1.6; }
.h-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.h-stats { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 38px; margin-top: 46px; }
.h-stats b { display: block; font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.h-stats span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1.2px; }
.h-scroll { position: absolute; left: 50%; bottom: 22px; translate: -50% 0; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted-2); }
.h-scroll .i { animation: bounceY 1.8s ease-in-out infinite; }
@keyframes bounceY { 0%, 100% { translate: 0 0; } 50% { translate: 0 5px; } }

/* Discord-like mock windows */
.mock, .h-feed { background: #111214; border: 1px solid var(--border-2); border-radius: 16px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .02) inset; text-align: left; }
.mock-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; background: #18191c; border-bottom: 1px solid #222327; font-size: 13px; color: var(--text-2); }
.mock-bar > i { width: 10px; height: 10px; border-radius: 50%; background: #2e2f34; }
.mock-bar > i:nth-child(1) { background: #ed4245; opacity: .7; }
.mock-bar > i:nth-child(2) { background: #faa61a; opacity: .7; }
.mock-bar > i:nth-child(3) { background: #3ba55d; opacity: .7; }
.mock-bar span { margin-left: 8px; font-weight: 600; }
.mock-bar .live { margin-left: auto; font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: 1px; color: #ff8a8c; display: flex; align-items: center; gap: 6px; }
.mock-bar .live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #ed4245; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.mock-body { padding: 16px; display: grid; gap: 12px; }
.msg { display: flex; gap: 12px; }
.msg .av { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; background: var(--c, #5865f2); }
.msg .av.gg { background: #f5f5f5 var(--img-avatar) center / cover; }
.msg .mc { min-width: 0; flex: 1; }
.msg .mh { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.msg .mh b { color: #fff; }
.msg .app { background: #5865f2; color: #fff; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; }
.msg .tm { color: #6d6f78; font-size: 11px; }
.msg .ct { color: #dbdee1; font-size: 14px; margin-top: 2px; line-height: 1.45; }
.msg.deleted { opacity: .55; }
.msg.deleted s { color: #ff8a8c; }
.emb { margin-top: 6px; border-left: 4px solid #f5f5f5; background: #1e1f22; border-radius: 5px; padding: 10px 12px; font-size: 13.5px; color: #dbdee1; }
.emb.red { border-left-color: var(--danger); }
.emb.orange { border-left-color: var(--warn); }
.emb.green { border-left-color: var(--success); }
.emb .et { font-weight: 700; color: #fff; margin-bottom: 4px; }
.emb .ed { line-height: 1.5; }
.emb .ef-foot { margin-top: 8px; font-size: 11.5px; color: #949ba4; }
.btnrow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.db { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 4px; background: #4e5058; color: #fff; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.db.red { background: #da373c; }
.db.green { background: #248046; }
.subtext { font-size: 11.5px; color: #949ba4; margin-top: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-s { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; background: var(--card-3); border: 1px solid var(--border-2); font-size: 12px; color: var(--text-2); }
.chip-s.red { background: rgba(237, 66, 69, .12); border-color: rgba(237, 66, 69, .35); color: #ff8a8c; }
.chip-s.green { background: rgba(59, 165, 93, .12); border-color: rgba(59, 165, 93, .35); color: #6fd08f; }

/* Hero live feed */
.h-feed { position: relative; }
.feed-list { padding: 10px; display: grid; gap: 8px; min-height: 330px; align-content: start; }
.feed-item { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 12px; border-radius: 11px; background: #18191c; border: 1px solid #222327; animation: feedIn .5s cubic-bezier(.2, .7, .2, 1); }
.feed-item:first-child { border-color: #3a3b40; background: #1d1e22; }
.feed-item .fe { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: #26272b; font-size: 18px; }
.feed-item b { display: block; font-size: 13.5px; }
.feed-item span { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-item time { font-size: 11px; color: var(--muted-2); }
@keyframes feedIn { from { opacity: 0; transform: translateY(-12px) scale(.98); } to { opacity: 1; transform: none; } }

/* Marquee */
.h-marquee { overflow: hidden; border-block: 1px solid var(--border); background: #0c0c0e; padding: 14px 0; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.h-marquee .track { display: flex; gap: 12px; width: max-content; animation: marquee 60s linear infinite; }
.h-marquee span { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 99px; background: var(--card); border: 1px solid var(--border); color: var(--text-2); font-size: 13px; white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Showcase */
.h-section { max-width: 1200px; margin: 0 auto; padding: 100px 24px 20px; }
.h-head { text-align: center; max-width: 700px; margin: 0 auto 50px; }
.h-head h2 { font-size: clamp(28px, 4vw, 42px); margin: 0 0 10px; letter-spacing: -.8px; }
.h-head p { color: var(--muted); margin: 0; font-size: 16px; }
/* Trailer scrubbed by scroll (home #features): the track is tall, the stage sticks, JS maps scroll → video.currentTime.
   Without .is-scrub (no JS / reduced motion) it is a plain video with controls. */
.h-trailer { max-width: none; padding-left: 0; padding-right: 0; }
.h-trailer .h-head { padding: 0 24px; }
.ht-track { position: relative; }
.ht-track.is-scrub { height: 640vh; }
.ht-stage { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 0 24px; }
.ht-track.is-scrub .ht-stage { position: sticky; top: 0; height: 100vh; height: 100svh; padding-top: calc(var(--topbar) + 10px); }
.ht-frame { position: relative; width: min(1180px, 100%, calc((100svh - var(--topbar) - 150px) * 16 / 9)); aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; background: #08090a; border: 1px solid var(--border); box-shadow: 0 40px 120px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .02); }
.ht-frame video { display: block; width: 100%; height: 100%; object-fit: cover; }
.ht-hint { position: absolute; left: 50%; bottom: 26px; translate: -50% 0; display: none; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 99px; background: rgba(10, 10, 11, .72); border: 1px solid var(--border-2); backdrop-filter: blur(8px); font-size: 13px; font-weight: 600; color: var(--text-2); transition: opacity .4s, translate .4s; pointer-events: none; }
.ht-hint .i { animation: htBounce 1.6s ease-in-out infinite; }
.ht-track.is-scrub .ht-hint { display: inline-flex; }
.ht-track.started .ht-hint { opacity: 0; translate: -50% 10px; }
@keyframes htBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
.ht-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .08); display: none; }
.ht-progress i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.ht-track.is-scrub .ht-progress { display: block; }
.ht-chapters { list-style: none; margin: 0; padding: 4px; display: flex; gap: 6px; max-width: 100%; overflow-x: auto; scrollbar-width: none; border-radius: 99px; background: var(--card); border: 1px solid var(--border); }
.ht-chapters::-webkit-scrollbar { display: none; }
.ht-chapters button { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border: 0; border-radius: 99px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background .25s, color .25s; }
.ht-chapters button span { font-size: 11px; opacity: .6; font-variant-numeric: tabular-nums; }
.ht-chapters button:hover { color: var(--text); }
.ht-chapters button.on { background: var(--accent); color: var(--accent-ink); }

/* Modules grid */
.h-cat { font-size: 13px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); margin: 34px 0 14px; }
.h-modules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.h-module { display: flex; gap: 14px; padding: 18px; border-radius: 14px; background: var(--card); border: 1px solid var(--border); transition: border-color .2s, translate .2s; }
.h-module:hover { border-color: #3a3a40; translate: 0 -3px; }
.h-module .fi { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--card-3); flex-shrink: 0; }
.h-module h4 { margin: 0 0 4px; font-size: 15px; }
.h-module p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

.h-featured { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.h-srv { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--srv, #f5f5f5); transition: translate .2s, border-color .2s; }
.h-srv:hover { translate: 0 -3px; }

.h-final { max-width: 900px; margin: 110px auto 90px; padding: 60px 30px; text-align: center; border-radius: 26px; background: radial-gradient(80% 120% at 50% 0%, rgba(255, 255, 255, .09), transparent 60%), var(--card); border: 1px solid var(--border-2); }
.h-final h2 { font-size: clamp(26px, 4vw, 38px); margin: 10px 0 8px; letter-spacing: -.6px; }
.h-final p { color: var(--muted); margin: 0 0 26px; }
.h-final .h-ctas { justify-content: center; }
.h-final-logo { width: 90px; margin: 0 auto; }

/* ───────────── Explorer ───────────── */
.explore { max-width: 1240px; }
.explore-head { text-align: center; max-width: 760px; margin: 0 auto 36px; }
.explore-head h1 { font-size: clamp(30px, 4.5vw, 46px); margin: 14px 0 10px; letter-spacing: -1px; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 99px; background: var(--card-2); border: 1px solid var(--border-2); font-size: 12.5px; color: var(--text-2); }
.explore-search { display: flex; align-items: center; gap: 10px; margin: 26px auto 16px; max-width: 560px; padding: 4px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--border-2); color: var(--muted); }
.explore-search:focus-within { border-color: #55555c; }
.explore-search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; padding: 11px 0; font-size: 15px; }
.tag-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.tag-filter button { padding: 6px 13px; border-radius: 99px; background: var(--card); border: 1px solid var(--border); color: var(--text-2); cursor: pointer; font-size: 13px; }
.tag-filter button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.explore-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.srv-card { display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: var(--card); border: 1px solid var(--border); transition: transform .2s, border-color .2s; }
.srv-card:hover { transform: translateY(-3px); border-color: #3a3a40; }
.srv-card[hidden] { display: none; }
.srv-banner { display: block; height: 96px; background: linear-gradient(120deg, color-mix(in srgb, var(--srv, #f5f5f5) 45%, #111), #18181b) center / cover; }
.srv-body { position: relative; padding: 0 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.srv-icon { width: 64px; height: 64px; border-radius: 18px; border: 4px solid var(--card); background: var(--card-3); display: grid; place-items: center; overflow: hidden; font-weight: 700; flex-shrink: 0; }
.srv-body .srv-icon { margin-top: -32px; }
.srv-icon img { width: 100%; height: 100%; object-fit: cover; }
.srv-icon.xl { width: 110px; height: 110px; border-radius: 28px; border-width: 6px; border-color: var(--bg); font-size: 28px; }
.srv-body h3 { margin: 0; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srv-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--muted); }
.srv-meta span { display: inline-flex; align-items: center; gap: 5px; }
.srv-desc { margin: 0; color: var(--text-2); font-size: 13.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.srv-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.srv-tags span, .srv-tags a { padding: 3px 9px; border-radius: 99px; background: var(--card-3); font-size: 12px; color: var(--text-2); }
.srv-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.srv-cta { align-items: center; justify-content: center; text-align: center; min-height: 260px; border-style: dashed; color: var(--muted); }
.srv-cta h3 { color: var(--text); margin: 10px 0 4px; }
.srv-hero { height: 220px; border-radius: 20px; background: linear-gradient(120deg, color-mix(in srgb, var(--srv, #f5f5f5) 40%, #111), #141416) center / cover; border: 1px solid var(--border); }
.srv-head { display: flex; align-items: flex-end; gap: 22px; margin: -55px 0 30px; padding: 0 26px; flex-wrap: wrap; }
.srv-head h1 { margin: 0 0 6px; font-size: 30px; }
.srv-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
.srv-about { color: var(--text-2); line-height: 1.7; word-wrap: break-word; }

/* ───────────── Module pages (new) ───────────── */
.field.note { display: flex; gap: 10px; align-items: flex-start; grid-template-columns: none; color: var(--text-2); background: rgba(255, 255, 255, .025); font-size: 13px; }
.field.note .i { margin-top: 2px; color: var(--muted); }
.group-help { padding: 4px 24px 0; color: var(--muted); font-size: 12.5px; }
.toast.warn { border-left: 4px solid var(--warn); }
.test-result { display: none; margin-top: 12px; padding: 11px 14px; border-radius: 10px; font-size: 14px; }
.test-result.show { display: block; }
.test-result.good { background: rgba(59, 165, 93, .1); border: 1px solid rgba(59, 165, 93, .35); color: #8fe0aa; }
.test-result.bad { background: rgba(237, 66, 69, .1); border: 1px solid rgba(237, 66, 69, .35); color: #ff9c9e; }
.meter { height: 8px; border-radius: 99px; background: var(--card-3); overflow: hidden; }
.meter div { height: 100%; background: linear-gradient(90deg, #a1a1aa, #fff); border-radius: 99px; transition: width .8s ease; }
.badge-ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: rgba(88, 101, 242, .15); color: #a5adff; flex-shrink: 0; }
.big-num { font-size: 42px; font-weight: 800; line-height: 1; }
.stars { color: #faa61a; letter-spacing: 1px; white-space: nowrap; }
.stars span { color: #3a3b40; }
.bump-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.bump-layout #moduleForm { min-width: 0; }
.sticky-preview { position: sticky; top: calc(var(--topbar) + 90px); }
.chips-list { display: flex; flex-wrap: wrap; gap: 6px; max-height: 50vh; overflow: auto; }
.lang-switch { display: inline-flex; padding: 3px; border-radius: 9px; background: var(--card); border: 1px solid var(--border); }
.lang-switch a { padding: 4px 9px; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.lang-switch a.on { background: var(--card-3); color: var(--text); }
.lang-switch a:hover { color: var(--text); }

@media (max-width: 1100px) {
  .home .h-hero { grid-template-columns: 1fr; text-align: center; padding-top: calc(var(--topbar) + 50px); }
  .h-sub, .h-logo { margin-left: auto; margin-right: auto; }
  .h-ctas, .h-stats { justify-content: center; }
  .h-feed { max-width: 560px; width: 100%; margin: 0 auto; }
  .h-scroll { display: none; }
  .h-modules, .h-featured { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bump-layout, .srv-grid { grid-template-columns: 1fr; }
  .sticky-preview { position: static; }
}
@media (max-width: 640px) {
  .h-stats { grid-template-columns: repeat(2, auto); gap: 22px 36px; }
  .h-modules, .h-featured { grid-template-columns: 1fr; }
  .h-section { padding-top: 70px; }
  .hide-sm { display: none !important; }
  .srv-head { margin-top: -45px; padding: 0 10px; }
  .srv-icon.xl { width: 90px; height: 90px; }
}
@media (max-width: 420px) { .hide-xs { display: none; } .lang-switch a { padding: 4px 6px; } }
@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .reveal.from-left, .js .reveal.from-right, .js .reveal.zoom { opacity: 1; transform: none; transition: none; }
  .h-marquee .track, .h-glow, .h-logo, .h-scroll .i, .ht-hint .i, .mock-bar .live::before { animation: none; }
}

/* ═════════════════════════════════════════════════════════════
   Uploads (S3), Components V2 preview, image filter, bot profile
   ═════════════════════════════════════════════════════════════ */
@keyframes spin { to { transform: rotate(360deg); } }
.spin { display: inline-block; width: 15px; height: 15px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; vertical-align: -2px; }

.img-input { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 8px; align-items: center; border-radius: 11px; transition: box-shadow .2s, background .2s; }
.img-input .img-thumb { width: 42px; height: 42px; border-radius: 9px; background: var(--bg-2); border: 1px solid var(--border-2); display: grid; place-items: center; color: var(--muted-2); overflow: hidden; }
.img-input .img-thumb img { width: 100%; height: 100%; object-fit: cover; animation: fadeIn .3s ease; }
.img-input .img-up { height: 42px; width: 42px; }
.img-input.drag { box-shadow: 0 0 0 2px var(--text), 0 0 0 6px rgba(245, 245, 245, .08); background: rgba(255, 255, 255, .03); }
.img-input.busy { opacity: .75; pointer-events: none; }
.img-input.done .img-thumb { animation: popIn .5s cubic-bezier(.2, 1.4, .4, 1); box-shadow: 0 0 0 2px var(--success); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { 0% { transform: scale(.8); } 60% { transform: scale(1.08); } 100% { transform: none; } }

.v2-toggle { color: var(--text); font-size: 14px; align-items: flex-start; }
.v2-toggle .help { display: block; color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 2px; }
.dv2 { margin-top: 6px; max-width: 540px; background: #2b2d31; border: 1px solid #3a3c43; border-radius: 8px; padding: 14px 16px 14px 18px; display: grid; gap: 10px; position: relative; font-size: 14px; line-height: 1.375; }
.dv2::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; border-radius: 8px 0 0 8px; background: var(--accent, #f5f5f5); }
.dv2 .v2-title { font-weight: 700; font-size: 17px; color: #f2f3f5; }
.dv2 .v2-title.link { color: #00a8fc; }
.dv2 .v2-small { font-size: 12px; color: #b5bac1; }
.dv2 .v2-section { display: grid; grid-template-columns: 1fr 80px; gap: 12px; align-items: start; }
.dv2 .v2-section img { width: 80px; height: 80px; border-radius: 8px; object-fit: cover; }
.dv2 .v2-media { width: 100%; border-radius: 8px; }
.dv2 .v2-sep { border: 0; border-top: 1px solid #3f4147; margin: 0; }

.if-drop { display: grid; place-items: center; min-height: 150px; border: 1.5px dashed var(--border-2); border-radius: 14px; cursor: pointer; text-align: center; padding: 20px; transition: border-color .2s, background .2s, transform .2s; }
.if-drop:hover, .if-drop.drag { border-color: var(--text); background: rgba(255, 255, 255, .03); }
.if-drop.drag { transform: scale(1.01); }
.if-drop.busy { opacity: .6; pointer-events: none; }
.if-drop-in { display: grid; gap: 6px; justify-items: center; color: var(--text-2); }
.if-result { display: none; margin-top: 16px; gap: 18px; grid-template-columns: 160px minmax(0, 1fr); align-items: start; animation: toastIn .3s ease; }
.if-result.show { display: grid; }
.if-result > .muted { grid-column: 1 / -1; }
.if-result img { width: 160px; max-height: 200px; object-fit: contain; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); }
.if-result img.blur { filter: blur(14px) grayscale(.4); }
.bar-row .fill.hot { background: linear-gradient(90deg, #ff8a8c, #ed4245); }

.bp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.bp-side { position: sticky; top: calc(var(--topbar) + 24px); }
.bp-label { letter-spacing: 1.2px; text-transform: uppercase; margin-bottom: 10px; }
.bp-card { background: #232428; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); font-family: 'gg sans', 'Noto Sans', Helvetica, Arial, sans-serif; color: #dbdee1; animation: popIn .5s ease; }
.bp-banner { height: 112px; background: linear-gradient(135deg, #3a3a40, #1b1b1f) center / cover no-repeat; transition: background-image .3s; }
.bp-avatar { position: relative; width: 92px; height: 92px; margin: -46px 0 0 16px; border-radius: 50%; border: 6px solid #232428; background: #0a0a0b; }
.bp-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.bp-status { position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%; background: #23a55a; border: 5px solid #232428; }
.bp-body { padding: 10px 16px 18px; }
.bp-name { font-size: 20px; font-weight: 700; color: #f2f3f5; word-break: break-word; }
.bp-user { display: flex; align-items: center; gap: 6px; font-size: 14px; color: #b5bac1; }
.bp-app { background: #5865f2; color: #fff; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; }
.bp-sep { height: 1px; background: #3f4147; margin: 12px 0; }
.bp-h { font-size: 12px; font-weight: 700; text-transform: uppercase; color: #f2f3f5; margin-bottom: 6px; }
.bp-bio { font-size: 14px; line-height: 1.45; white-space: normal; word-break: break-word; }

/* ═════════════════════════════════════════════════════════════
   Footer
   ═════════════════════════════════════════════════════════════ */
.site-footer { position: relative; margin-top: 60px; background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .015)); overflow: hidden; }
/* Giant wordmark, cut by the line under it. Hover: a violet outline lit around the cursor (mask follows --mx / --my). */
.ft-word { --fs: min(12.4vw, 168px); --mx: -999px; --my: -999px; position: relative; max-width: 1200px; margin: 0 auto; padding: 0 24px; height: calc(var(--fs) * .86); overflow: hidden; border-bottom: 1px solid var(--border); user-select: none; cursor: default; }
.ft-word span { position: absolute; left: 24px; right: 24px; top: calc(var(--fs) * -.06); font-size: var(--fs); line-height: 1; font-weight: 700; letter-spacing: -.045em; white-space: nowrap; text-align: center; }
.ft-word-base { color: #131317; -webkit-mask-image: linear-gradient(180deg, #000 45%, rgba(0, 0, 0, .35)); mask-image: linear-gradient(180deg, #000 45%, rgba(0, 0, 0, .35)); }
.ft-word-glow {
  color: transparent; -webkit-text-stroke: 1.5px #a78bfa;
  filter: drop-shadow(-1.5px 0 rgba(59, 130, 246, .85)) drop-shadow(1.5px 0 rgba(239, 68, 68, .55)) drop-shadow(0 0 5px rgba(139, 92, 246, .45));
  -webkit-mask-image: radial-gradient(circle 190px at var(--mx) var(--my), #000 15%, transparent 72%);
  mask-image: radial-gradient(circle 190px at var(--mx) var(--my), #000 15%, transparent 72%);
  opacity: 0; transition: opacity .35s ease;
}
.ft-word.hover .ft-word-glow { opacity: 1; }
.ft-inner { position: relative; max-width: 1200px; margin: 0 auto; padding: 56px 24px 36px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr); gap: 40px; }
.ft-brand p { margin: 14px 0 18px; max-width: 320px; }
.ft-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.ft-col { display: grid; gap: 10px; align-content: start; }
.ft-col h4 { margin: 0 0 4px; font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.ft-col a { color: var(--text-2); width: fit-content; position: relative; transition: color .2s; }
.ft-col a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.ft-col a:hover { color: var(--text); }
.ft-col a:hover::after { transform: scaleX(1); }
.ft-bottom { position: relative; max-width: 1200px; margin: 0 auto; padding: 18px 24px 28px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; font-size: 13px; color: var(--muted); }
.ft-bottom a { color: var(--text-2); }
.ft-bottom a:hover { color: var(--text); }
.ft-status { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; background: var(--card); border: 1px solid var(--border-2); font-size: 13px; color: var(--text-2); transition: border-color .2s, background .2s; }
.ft-status:hover { border-color: #3a3a40; background: var(--card-2); color: var(--text); }
.ft-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); position: relative; }
.ft-status[data-state] .dot::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; background: inherit; opacity: .35; animation: ping 2s ease-out infinite; }
.ft-status[data-state="up"] .dot { background: var(--success); }
.ft-status[data-state="degraded"] .dot { background: var(--warn); }
.ft-status[data-state="down"] .dot { background: var(--danger); }
@keyframes ping { 0% { transform: scale(.6); opacity: .5; } 100% { transform: scale(2.2); opacity: 0; } }
.app-footer { margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; font-size: 12.5px; color: var(--muted); }
.app-footer nav { display: flex; flex-wrap: wrap; gap: 6px 16px; flex: 1; }
.app-footer nav a { color: var(--muted); transition: color .2s; }
.app-footer nav a:hover { color: var(--text); }
.app-footer .ft-status { padding: 4px 10px; font-size: 12px; }

/* ═════════════════════════════════════════════════════════════
   Legal pages
   ═════════════════════════════════════════════════════════════ */
.legal { max-width: 1100px; }
.legal-head { padding: 20px 0 30px; border-bottom: 1px solid var(--border); margin-bottom: 30px; }
.legal-head h1 { font-size: clamp(30px, 4.4vw, 46px); letter-spacing: -1px; margin: 22px 0 10px; }
.legal-head p { max-width: 640px; margin: 0 0 14px; font-size: 16px; }
.legal-date { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.legal-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); }
.legal-tabs a { padding: 7px 14px; border-radius: 9px; color: var(--muted); font-size: 14px; font-weight: 500; transition: color .2s, background .25s; }
.legal-tabs a:hover { color: var(--text); }
.legal-tabs a.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.legal-grid { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 48px; align-items: start; }
.legal-toc { position: sticky; top: calc(var(--topbar) + 24px); display: grid; gap: 2px; }
.legal-toc .small { margin-bottom: 8px; letter-spacing: 1.2px; text-transform: uppercase; }
.legal-toc a { padding: 6px 10px; border-left: 2px solid var(--border); color: var(--muted); font-size: 13.5px; transition: color .2s, border-color .2s, padding .2s; }
.legal-toc a:hover { color: var(--text); }
.legal-toc a.on { color: var(--text); border-color: var(--text); padding-left: 14px; }
.legal-body { display: grid; gap: 14px; }
.legal-sec { padding: 24px 26px; border-radius: 16px; background: var(--card); border: 1px solid var(--border); scroll-margin-top: calc(var(--topbar) + 20px); }
.legal-sec h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; font-size: 19px; }
.legal-sec h2 .num { font-size: 12px; font-weight: 700; color: var(--muted); padding: 3px 8px; border-radius: 7px; background: var(--card-3); }
.legal-sec p, .legal-sec li { color: var(--text-2); line-height: 1.7; }
.legal-sec p { margin: 0 0 10px; }
.legal-sec ul { margin: 0 0 10px; padding-left: 20px; }
.legal-sec a { color: var(--text); text-decoration: underline; text-decoration-color: rgba(245, 245, 245, .3); text-underline-offset: 3px; transition: text-decoration-color .2s; }
.legal-sec a:hover { text-decoration-color: var(--text); }

/* ═════════════════════════════════════════════════════════════
   Status page
   ═════════════════════════════════════════════════════════════ */
.status-main { max-width: 980px; }
.status-hero { text-align: center; padding: 30px 0 34px; }
.status-hero h1 { font-size: clamp(26px, 4vw, 40px); letter-spacing: -.8px; margin: 22px 0 8px; transition: color .3s; }
.status-hero p { margin: 0 0 8px; }
.st-orb { position: relative; width: 74px; height: 74px; margin: 0 auto; }
.st-orb span { position: absolute; inset: 0; border-radius: 50%; background: var(--muted-2); }
.st-orb span:nth-child(1) { inset: 22px; box-shadow: 0 0 24px currentColor; }
.st-orb span:nth-child(2), .st-orb span:nth-child(3) { opacity: .25; animation: orb 2.6s ease-out infinite; }
.st-orb span:nth-child(3) { animation-delay: 1.3s; }
@keyframes orb { 0% { transform: scale(.35); opacity: .45; } 100% { transform: scale(1.15); opacity: 0; } }
.status-hero[data-state="up"] .st-orb span { background: var(--success); color: var(--success); }
.status-hero[data-state="degraded"] .st-orb span { background: var(--warn); color: var(--warn); }
.status-hero[data-state="down"] .st-orb span { background: var(--danger); color: var(--danger); }
.st-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.st-metric { padding: 16px 18px; display: grid; gap: 4px; }
.st-metric b { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.st-list { display: grid; gap: 12px; }
.st-service { padding: 18px 20px; display: grid; gap: 14px; }
.st-row { display: flex; align-items: center; gap: 14px; }
.st-name { display: grid; flex: 1; min-width: 0; }
.st-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--muted-2); flex-shrink: 0; position: relative; }
.st-dot::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; background: inherit; opacity: .3; animation: ping 2.2s ease-out infinite; }
.st-service[data-state="up"] .st-dot { background: var(--success); }
.st-service[data-state="degraded"] .st-dot { background: var(--warn); }
.st-service[data-state="down"] .st-dot { background: var(--danger); }
.st-lat { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.st-badge { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: rgba(59, 165, 93, .12); color: #8fe0aa; white-space: nowrap; }
.st-service[data-state="degraded"] .st-badge { background: rgba(250, 166, 26, .12); color: #fcd48a; }
.st-service[data-state="down"] .st-badge { background: rgba(237, 66, 69, .12); color: #ff9c9e; }
.st-service[data-state="unknown"] .st-badge { background: var(--card-3); color: var(--muted); }
.st-bars { display: grid; grid-template-columns: repeat(90, minmax(0, 1fr)); gap: 2px; height: 34px; }
.st-bars i { border-radius: 3px; background: var(--card-3); transform-origin: bottom; animation: barIn .5s cubic-bezier(.2, .7, .2, 1) backwards; transition: transform .15s, filter .15s; }
.st-bars i:nth-child(10n+1) { animation-delay: .02s; } .st-bars i:nth-child(10n+2) { animation-delay: .04s; } .st-bars i:nth-child(10n+3) { animation-delay: .06s; }
.st-bars i:nth-child(10n+4) { animation-delay: .08s; } .st-bars i:nth-child(10n+5) { animation-delay: .1s; } .st-bars i:nth-child(10n+6) { animation-delay: .12s; }
.st-bars i:nth-child(10n+7) { animation-delay: .14s; } .st-bars i:nth-child(10n+8) { animation-delay: .16s; } .st-bars i:nth-child(10n+9) { animation-delay: .18s; }
.st-bars i.ok { background: var(--success); }
.st-bars i.warn { background: var(--warn); }
.st-bars i.bad { background: var(--danger); }
.st-bars i:hover { transform: scaleY(1.15); filter: brightness(1.25); }
@keyframes barIn { from { transform: scaleY(.2); opacity: 0; } }
.st-legend { display: flex; justify-content: space-between; gap: 10px; }
.st-note { text-align: center; margin-top: 20px; display: flex; justify-content: center; align-items: center; gap: 6px; }
.st-tip { position: absolute; z-index: 60; translate: -50% -100%; padding: 6px 10px; border-radius: 8px; background: var(--card-3); border: 1px solid var(--border-2); font-size: 12px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .15s; box-shadow: var(--shadow); }
.st-tip.show { opacity: 1; }

/* ═════════════════════════════════════════════════════════════
   Motion (site + dashboard)
   ═════════════════════════════════════════════════════════════ */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 50; background: linear-gradient(90deg, #6d6d73, #f5f5f5); transform: scaleX(0); transform-origin: left; pointer-events: none; }
.topbar { transition: background .3s, box-shadow .3s, height .3s; }
body.scrolled .topbar { box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }

/* Cards: soft lift on hover + light following the cursor on .glow-card */
.card { transition: border-color .25s, transform .25s cubic-bezier(.2, .7, .2, 1), box-shadow .25s; }
a.card:hover, .srv-card:hover, .st-service:hover, .legal-sec:hover { border-color: var(--border-2); }
a.card:hover, .srv-card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(0, 0, 0, .35); }
.glow-card { position: relative; overflow: hidden; }
.glow-card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .07), transparent 70%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.glow-card:hover::before { opacity: 1; }

/* Buttons: press feedback + sheen on primary buttons */
.btn { position: relative; overflow: hidden; }
.btn:active { transform: translateY(1px) scale(.98); }
.btn.primary::after { content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); transform: skewX(-20deg); transition: left .6s ease; pointer-events: none; }
.btn.primary:hover::after { left: 130%; }

/* Dashboard: page content slides in, block by block */
.main-inner > * { animation: pageIn .55s cubic-bezier(.2, .7, .2, 1) backwards; }
.main-inner > *:nth-child(2) { animation-delay: .05s; }
.main-inner > *:nth-child(3) { animation-delay: .1s; }
.main-inner > *:nth-child(4) { animation-delay: .15s; }
.main-inner > *:nth-child(5) { animation-delay: .2s; }
.main-inner > *:nth-child(n+6) { animation-delay: .25s; }
@keyframes pageIn { from { opacity: 0; transform: translateY(14px); } }
.form-card .field, .form-card .list-field, .form-card .group { animation: fieldIn .45s ease backwards; }
@keyframes fieldIn { from { opacity: 0; transform: translateY(6px); } }

/* Sidebar items: subtle slide on hover */
.nav-items a { transition: background .2s, color .2s, padding-left .2s; }
.nav-items a:not(.active):hover { padding-left: 16px; }
.nav-items a .i { transition: transform .25s; }
.nav-items a:hover .i { transform: scale(1.12); }

/* Modal + list items + switches */
.modal-bg.open { animation: fadeIn .2s ease; }
.modal-bg.open .modal { animation: modalIn .28s cubic-bezier(.2, 1.2, .4, 1); }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.96); } }
.item.open > .item-body { animation: fieldIn .3s ease; }
.switch span::after { transition: transform .25s cubic-bezier(.3, 1.5, .5, 1), background .2s; }

/* Loading placeholders */
.empty { position: relative; }
.skeleton { background: linear-gradient(90deg, var(--card-2) 25%, var(--card-3) 50%, var(--card-2) 75%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (max-width: 1100px) {
  .bp-layout { grid-template-columns: 1fr; }
  .bp-side { position: static; max-width: 360px; }
}
@media (max-width: 860px) {
  .ft-inner { grid-template-columns: 1fr; gap: 30px; }
  .legal-grid { grid-template-columns: 1fr; gap: 20px; }
  .legal-toc { position: static; display: none; }
  .st-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .if-result.show { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .ft-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-bars { grid-template-columns: repeat(45, minmax(0, 1fr)); }
  .st-bars i:nth-child(-n+45) { display: none; }
  .legal-sec { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .main-inner > *, .form-card .field, .form-card .list-field, .form-card .group, .st-bars i, .modal-bg.open, .modal-bg.open .modal, .item.open > .item-body, .bp-card { animation: none; }
  .ft-status .dot::after, .st-dot::after, .st-orb span { animation: none; }
  .btn.primary::after { display: none; }
  a.card:hover, .srv-card:hover { transform: none; }
}

/* ═════════════════════════════════════════════════════════════
   Staff management
   ═════════════════════════════════════════════════════════════ */
.staff-top { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; }
.st-rank { --rank: #f5f5f5; padding: 12px 0; border-bottom: 1px solid var(--border); animation: fieldIn .4s ease backwards; }
.st-rank:last-child { border-bottom: 0; }
.st-rank-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.st-rank-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--rank); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rank) 20%, transparent); }
.st-members { display: flex; flex-wrap: wrap; gap: 6px; }
.st-member { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 4px; border-radius: 99px; background: var(--card-2); border: 1px solid var(--border); font-size: 13px; transition: border-color .2s, transform .2s; }
.st-member:hover { border-color: var(--border-2); transform: translateY(-1px); }
.st-member img { width: 22px; height: 22px; border-radius: 50%; }
.st-member em { font-style: normal; font-size: 11px; color: #fcd48a; background: rgba(250, 166, 26, .12); padding: 1px 6px; border-radius: 99px; }
.st-counts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.st-count { display: grid; padding: 10px 12px; border-radius: 10px; background: var(--card-2); border: 1px solid var(--border); }
.st-count b { font-size: 22px; font-weight: 700; }
.st-count span { font-size: 12px; color: var(--muted); }
.st-count.good b { color: #8fe0aa; } .st-count.warn b { color: #fcd48a; } .st-count.bad b { color: #ff9c9e; }
.st-tag { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--card-3); color: var(--text-2); }
.st-tag.good { background: rgba(59, 165, 93, .12); color: #8fe0aa; } .st-tag.warn { background: rgba(250, 166, 26, .12); color: #fcd48a; } .st-tag.bad { background: rgba(237, 66, 69, .12); color: #ff9c9e; }
tr.revoked td { opacity: .5; }
@media (max-width: 900px) { .staff-top { grid-template-columns: 1fr; } }

/* ═════════════════════════════════════════════════════════════
   Robux calculator
   ═════════════════════════════════════════════════════════════ */
.rbx { max-width: 1000px; }
.rbx-head { text-align: center; padding: 20px 0 34px; }
.rbx-head h1 { font-size: clamp(30px, 5vw, 50px); letter-spacing: -1.2px; margin: 18px 0 10px; }
.rbx-head p { max-width: 620px; margin: 0 auto; font-size: 16px; }
.rbx-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.rbx-card { padding: 24px; }
.rbx-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); margin-bottom: 20px; }
.rbx-tabs button { padding: 9px 6px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 600; cursor: pointer; transition: background .25s, color .25s; }
.rbx-tabs button.on { background: var(--accent); color: var(--accent-ink); }
.rbx-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.rbx-input { display: flex; align-items: center; gap: 10px; padding: 6px 16px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--border-2); transition: border-color .2s, box-shadow .2s; }
.rbx-input:focus-within { border-color: #5a5a62; box-shadow: 0 0 0 4px rgba(245, 245, 245, .06); }
.rbx-input span { font-weight: 700; color: var(--muted); }
.rbx-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 32px; font-weight: 700; padding: 8px 0; }
.rbx-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.rbx-presets button { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--border); background: var(--card-2); color: var(--text-2); cursor: pointer; font-size: 13px; transition: border-color .2s, transform .15s; }
.rbx-presets button:hover { border-color: var(--border-2); transform: translateY(-1px); }
.rbx-result { display: grid; align-content: start; gap: 10px; }
.rbx-big { font-size: clamp(40px, 6vw, 60px); font-weight: 800; letter-spacing: -1.5px; line-height: 1; font-variant-numeric: tabular-nums; }
.rbx-big small { font-size: 20px; color: var(--muted); margin-left: 8px; letter-spacing: 0; }
.rbx-bar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--card-3); margin: 8px 0 4px; }
.rbx-bar i { display: block; height: 100%; transition: width .5s cubic-bezier(.2, .7, .2, 1); }
.rbx-bar .keep { background: linear-gradient(90deg, #3ba55d, #8fe0aa); }
.rbx-bar .tax { background: linear-gradient(90deg, #ed4245, #ff9c9e); }
.rbx-rows { display: grid; gap: 2px; }
.rbx-rows div { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.rbx-rows div:last-child { border-bottom: 0; }
.rbx-rows .tax b { color: #ff9c9e; } .rbx-rows .keep b { color: #8fe0aa; } .rbx-rows .warn b { color: #fcd48a; } .rbx-rows .muted b { color: var(--muted); }
.rbx-notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.rbx-notes p { margin: 6px 0 0; line-height: 1.6; }
@media (max-width: 800px) { .rbx-grid, .rbx-notes { grid-template-columns: 1fr; } }

/* ───────── Conditional fields (showIf) ───────── */
.field[hidden], .list-field[hidden], .group[hidden] { display: none !important; }

/* ───────── Forms: Discord modal preview, answers ───────── */
.fm-stage { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: 20px; align-items: start; }
.fm-modal { background: #313338; border-radius: 10px; color: #dbdee1; font-family: 'gg sans', 'Noto Sans', Helvetica, Arial, sans-serif; box-shadow: var(--shadow); overflow: hidden; }
.fm-head { display: flex; align-items: center; gap: 10px; padding: 16px 16px 8px; font-size: 18px; color: #f2f3f5; }
.fm-head img { width: 24px; height: 24px; border-radius: 50%; }
.fm-head b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-x { color: #b5bac1; display: grid; }
.fm-body { padding: 8px 16px 16px; display: grid; gap: 18px; }
.fm-intro { font-size: 14px; line-height: 1.45; color: #dbdee1; }
.fm-label { font-size: 14px; font-weight: 600; color: #f2f3f5; }
.fm-req { color: #f23f43; margin-left: 4px; }
.fm-desc { font-size: 12.5px; color: #b5bac1; margin-top: 2px; }
.fm-input { margin-top: 8px; background: #1e1f22; border: 1px solid #1e1f22; border-radius: 8px; padding: 10px 12px; min-height: 40px; font-size: 14px; color: #dbdee1; white-space: pre-wrap; word-break: break-word; }
.fm-input.fm-long { min-height: 86px; }
.fm-select { display: flex; align-items: center; justify-content: space-between; gap: 8px; white-space: nowrap; }
.fm-ph { color: #87898c; font-size: 14px; }
.fm-menu { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.fm-menu span { font-size: 12px; background: #2b2d31; border-radius: 6px; padding: 3px 8px; color: #b5bac1; }
.fm-opts { display: grid; gap: 4px; margin-top: 8px; }
.fm-opt { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: 8px; background: #2b2d31; font-size: 14px; margin-top: 4px; }
.fm-opt small { color: #b5bac1; font-size: 12px; }
.fm-radio, .fm-check { width: 18px; height: 18px; border: 2px solid #b5bac1; flex-shrink: 0; margin-top: 1px; }
.fm-radio { border-radius: 50%; }
.fm-check { border-radius: 5px; }
.fm-file { margin-top: 8px; border: 1px dashed #4e5058; border-radius: 8px; padding: 18px 12px; text-align: center; color: #b5bac1; font-size: 13px; display: flex; justify-content: center; align-items: center; gap: 8px; }
.fm-foot { display: flex; justify-content: flex-end; align-items: center; gap: 16px; padding: 16px; background: #2b2d31; font-size: 14px; }
.fm-cancel { color: #f2f3f5; }
.fm-submit { background: #5865f2; color: #fff; border-radius: 6px; padding: 9px 18px; font-weight: 500; }
.fm-after { margin-top: 10px; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.fm-checks { display: grid; gap: 8px; align-content: start; }
.fm-check-line { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--text-2); padding: 9px 12px; border-radius: 8px; background: var(--card-2); }
.fm-check-line .i { margin-top: 2px; flex-shrink: 0; }
.fm-check-line.ok .i { color: var(--success); }
.fm-check-line.warn { background: rgba(250, 166, 26, .1); }
.fm-check-line.warn .i { color: var(--warn); }
.fm-check-line.info .i { color: var(--muted); }
.fm-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.fm-stats .big-num { font-size: 30px; margin-top: 6px; }
.fm-stat { text-align: left; cursor: pointer; font: inherit; color: inherit; border: 1px solid var(--border); }
.fm-stat:hover { border-color: var(--border-2); background: var(--card-2); }
.fm-table tbody tr { cursor: pointer; }
.fm-table .badge { white-space: nowrap; }
.fm-table tbody tr:hover td { background: var(--card-2); }
.fm-meta { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; align-items: center; margin-bottom: 14px; }
.fm-meta .who { display: inline-flex; align-items: center; gap: 8px; }
.fm-meta .who img, .fm-table .who img { width: 22px; height: 22px; border-radius: 50%; }
.fm-table .who { display: flex; align-items: center; gap: 8px; }
.fm-answers { display: grid; gap: 10px; max-height: 46vh; overflow-y: auto; margin-bottom: 12px; }
.fm-answer { background: var(--card-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.fm-alabel { font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.fm-avalue { color: var(--text); word-break: break-word; }
.btn.disabled { opacity: .5; }
@media (max-width: 900px) {
  .fm-stage { grid-template-columns: 1fr; }
}
