/* Pulse dashboard — page-specific styles */
.small { font-size: 13px; }
.link-sm { font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 2px; }
.panel-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 14px; font-size: 13px; font-weight: 700; }
.sub-h { font-size: 13px; font-weight: 800; color: var(--text-2); margin-bottom: 12px; }
.preview-cap { margin-bottom: 8px; }
.page-foot-link { margin-top: 16px; font-size: 13px; }
.page-foot-link a { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; overflow-wrap: anywhere; }
.live-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--mint); padding: 3px 10px; border-radius: 999px; background: rgba(61, 245, 176, .08); }
.live-chip .hb-dot { background: var(--mint); width: 6px; height: 6px; animation: blink 2s ease-in-out infinite; }
.end-note { text-align: center; color: var(--text-3); font-size: 13px; padding: 18px 0 4px; }
.load-more { display: flex; justify-content: center; padding-top: 16px; }
#app:has(.savebar.show) ~ .toasts { bottom: 96px; }
.is-disabled { opacity: .45; pointer-events: none; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.stack > * + * { margin-top: 0; }
.head-notices { display: grid; gap: 10px; margin: -8px 0 20px; }
.head-notices:empty { display: none; }
.warn-list { display: grid; gap: 10px; }
.warn-list:empty { display: none; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; position: relative; overflow: hidden; }
.login-trace { position: absolute; inset: 0; display: flex; align-items: center; opacity: .55; pointer-events: none; }
.login-trace svg { width: 100%; height: 220px; }
.trace-path { stroke-dasharray: 2400; stroke-dashoffset: 2400; animation: loginTrace 4.5s var(--ease-out) .2s infinite; filter: drop-shadow(0 0 10px rgba(76, 201, 255, .6)); }
@keyframes loginTrace { 0% { stroke-dashoffset: 2400; } 55% { stroke-dashoffset: 0; } 85% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .trace-path { stroke-dashoffset: 0; animation: none; } }
.login-card { position: relative; width: min(460px, 100%); padding: 40px 36px 32px; border-radius: var(--r-xl); background: rgba(14, 17, 32, .84); border: 1px solid var(--line-strong); backdrop-filter: blur(20px); box-shadow: 0 50px 120px -40px #000, 0 0 0 1px rgba(124, 92, 255, .1); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; }
.login-logo { margin-bottom: 4px; }
.login-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(28px, 6vw, 38px); letter-spacing: -.03em; line-height: 1.05; }
.login-sub { color: var(--text-2); max-width: 34ch; }
.login-card .btn-discord { margin-top: 10px; width: 100%; }
.demo-note { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); max-width: 36ch; }
.fine { font-size: 12px; color: var(--text-3); }
.link-quiet { font-size: 13px; color: var(--text-3); margin-top: 6px; }
.discord-glyph { display: inline-grid; }

/* ---------- server picker ---------- */
.picker-shell { min-height: 100vh; }
.topbar-plain { position: sticky; }
.picker-page { max-width: 1100px; margin: 0 auto; padding: 48px 16px 80px; outline: none; }
.picker-hero { margin-bottom: 32px; }
.picker-hero h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(24px, 4vw, 36px); letter-spacing: -.02em; overflow-wrap: anywhere; }
.picker-hero p { margin-top: 8px; }
.guild-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 18px; }
.guild-card { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 32px 20px 22px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); animation: cardIn .6s var(--ease-spring) both; animation-delay: calc(var(--i, 0) * 80ms); transition: border-color var(--dur-2), transform var(--dur-2) var(--ease-out); }
.guild-card:hover { border-color: rgba(124, 92, 255, .45); transform: translateY(-3px); }
.guild-card.absent { background: rgba(14, 17, 32, .45); }
.guild-card.absent .g-icon { filter: grayscale(.8); opacity: .7; }
.guild-art { position: absolute; inset: 0 0 auto; height: 76px; background: radial-gradient(120px 60px at 50% 0%, rgba(124, 92, 255, .35), transparent), linear-gradient(180deg, rgba(76, 201, 255, .06), transparent); pointer-events: none; }
.guild-card .g-icon { position: relative; box-shadow: 0 10px 30px -10px #000; }
.guild-name { font-size: 17px; font-weight: 800; margin-top: 6px; overflow-wrap: anywhere; }
.guild-state { font-size: 13px; }
.state-on { display: inline-flex; align-items: center; gap: 8px; color: var(--mint); font-weight: 600; }
.guild-card .btn { margin-top: 8px; width: 100%; }
@keyframes cardIn { from { opacity: 0; transform: translateY(18px) scale(.97); } }

/* ---------- overview ---------- */
.ov-head h1 { font-size: clamp(24px, 3vw, 34px); overflow-wrap: anywhere; }
.ov-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); margin-left: 4px; }

.monitor { display: grid; grid-template-columns: 200px minmax(0, 1fr) minmax(0, 280px); align-items: stretch; border-radius: var(--r-lg); border: 1px solid rgba(76, 201, 255, .18); background: linear-gradient(90deg, rgba(8, 10, 20, .8), rgba(12, 16, 32, .7)); overflow: hidden; margin-bottom: 18px; box-shadow: inset 0 0 60px -30px rgba(76, 201, 255, .4); }
.mon-meta { padding: 18px 20px; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.mon-title { font-size: 13px; font-weight: 800; color: var(--text-2); }
.mon-rate { display: flex; flex-direction: column; font-size: 12px; color: var(--text-3); }
.mon-rate-n { font-family: var(--font-display); font-size: 30px; font-weight: 700; color: var(--text); line-height: 1.1; }
.mon-trace { position: relative; min-height: 92px; }
.monitor-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.mon-latest { padding: 16px 18px; border-left: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; gap: 6px; min-width: 0; }
.mon-latest-label { font-size: 12px; font-weight: 700; color: var(--text-3); }
.mon-last { font-size: 13px; color: var(--text-2); display: flex; gap: 8px; align-items: flex-start; line-height: 1.4; }
.mon-last > span:nth-child(2) { flex: 1; min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mon-last time { font-size: 11px; color: var(--text-3); white-space: nowrap; }
.mon-ic { color: var(--tc); flex: none; margin-top: 1px; }
.mon-last.tick { animation: fadeUp .5s var(--ease-out); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } }

.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--panel); margin-bottom: 18px; overflow: hidden; }
.tiles .skel-card { padding: 20px; border-right: 1px solid var(--line); }
.tile { position: relative; padding: 18px 20px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; border-right: 1px solid var(--line); transition: background var(--dur-3); }
.tile:last-child { border-right: 0; }
.tile-top { display: flex; align-items: center; gap: 8px; }
.tile-ic { color: var(--c); display: grid; }
.tile-label { font-size: 13px; font-weight: 700; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-value { font-family: var(--font-display); font-size: clamp(24px, 2.4vw, 32px); font-weight: 600; letter-spacing: -.03em; line-height: 1.15; margin-top: 4px; font-variant-numeric: tabular-nums; }
.tile-sub { font-size: 12px; color: var(--text-3); }
.tile-spark { margin-top: 8px; color: var(--c); }
.online-bar { margin-top: 18px; }
.online-bar > span { background: var(--mint); }
.tile.bump { animation: tileBump .7s var(--ease-out); }
.tile.bump .tile-value { animation: valueBump .5s var(--ease-spring); }
@keyframes tileBump { 0% { background: color-mix(in srgb, var(--c) 14%, transparent); } 100% { background: transparent; } }
@keyframes valueBump { 40% { transform: scale(1.06); color: var(--c); } }
.tile-value { transform-origin: left center; }

.ov-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 18px; margin-bottom: 18px; align-items: start; }
.ov-grid > .panel + .panel { margin-top: 0; }
.ov-col { display: grid; gap: 18px; min-width: 0; }
.ov-col > .panel + .panel { margin-top: 0; }
.ov-feed { align-self: stretch; display: flex; flex-direction: column; }
.feed-scroll { flex: 1; overflow-y: auto; max-height: 520px; margin: 0 -8px; padding: 0 8px; scrollbar-width: thin; mask-image: linear-gradient(180deg, #000 90%, transparent); }
.new-pill { background: var(--violet); border-color: transparent; }
.ov-grid-b { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); }

.mini-lb { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.mini-row { display: grid; grid-template-columns: 26px 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 6px; border-radius: 12px; }
.mini-row:hover { background: rgba(160, 170, 255, .04); }
.mini-rank { font-size: 13px; color: var(--text-3); text-align: center; }
.mini-row.r1 .mini-rank { color: var(--amber); font-weight: 700; } .mini-row.r2 .mini-rank { color: #d3d8f0; font-weight: 700; } .mini-row.r3 .mini-rank { color: #e0a274; font-weight: 700; }
.mini-main { min-width: 0; display: grid; gap: 6px; }
.mini-line { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.mini-line b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-lvl { font-size: 12px; color: var(--violet-2); font-weight: 700; white-space: nowrap; }
.mini-xp { font-size: 12px; color: var(--text-2); }

.counts { list-style: none; margin: 0; padding: 0; display: grid; }
.count { display: flex; align-items: center; gap: 12px; padding: 11px 6px; border-bottom: 1px solid var(--line); color: var(--text); }
.counts li:last-child .count { border-bottom: 0; }
.count:hover { text-decoration: none; background: rgba(160, 170, 255, .04); }
.count-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(160, 170, 255, .07); color: var(--text-2); flex: none; }
.count-label { flex: 1; font-size: 14px; color: var(--text-2); font-weight: 600; }
.count-n { font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.count > .ic:last-child { color: var(--text-3); }

.health-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 12px; }
.health { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: rgba(8, 10, 20, .4); transition: border-color var(--dur-2), opacity var(--dur-2); }
.health.on { background: rgba(19, 23, 41, .6); }
.health.warn { border-color: rgba(255, 196, 77, .35); }
.health.busy { opacity: .6; pointer-events: none; }
.health-top { display: flex; align-items: center; gap: 10px; }
.health-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; color: var(--tc); background: color-mix(in srgb, var(--tc) 12%, transparent); }
.health:not(.on) .health-ic { color: var(--text-3); background: rgba(160, 170, 255, .05); }
.health-title { flex: 1; min-width: 0; display: grid; }
.health-title h3 { font-size: 14px; font-weight: 800; }
.health-status { font-size: 12px; font-weight: 700; }
.health-status.ok { color: var(--mint); } .health-status.w { color: var(--amber); } .health-status.off { color: var(--text-3); }
.health-tag { font-size: 12px; color: var(--text-3); line-height: 1.45; flex: 1; }
.health-warns { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; flex: 1; }
.health-warns li { display: flex; gap: 6px; font-size: 12px; color: var(--amber); line-height: 1.4; }
.health-warns li.soft { color: var(--text-3); }
.health-warns .ic { flex: none; margin-top: 1px; }
.health-link { font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 2px; align-self: flex-start; }

@media (max-width: 1280px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tile:nth-child(3) { border-right: 0; }
  .tile:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .monitor { grid-template-columns: 170px minmax(0, 1fr); }
  .mon-latest { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); flex-direction: row; align-items: center; padding: 12px 20px; }
}
@media (max-width: 1100px) {
  .ov-grid, .ov-grid-b { grid-template-columns: minmax(0, 1fr); }
  .feed-scroll { max-height: 420px; }
}
@media (max-width: 640px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px; }
  .tile:nth-child(3) { border-right: 1px solid var(--line); }
  .tile:nth-child(2n) { border-right: 0; }
  .tile-members { grid-column: 1 / -1; border-bottom: 0; }
  .monitor { grid-template-columns: minmax(0, 1fr); }
  .mon-meta { border-right: 0; border-bottom: 1px solid var(--line); flex-direction: row; align-items: baseline; justify-content: space-between; padding: 12px 16px; }
  .mon-rate { flex-direction: row; align-items: baseline; gap: 6px; }
  .mon-rate-n { font-size: 22px; }
  .mon-trace { min-height: 80px; }
  .mon-latest { padding: 12px 16px; flex-direction: column; align-items: flex-start; }
  .panel { padding: 16px; border-radius: var(--r-md); }
}

/* ---------- activity ---------- */
.feed-full .feed-item { padding: 12px 4px; }

/* ---------- leaderboard ---------- */
.lb { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lb-row { display: grid; grid-template-columns: 52px 40px minmax(0, 1fr) 70px 90px; gap: 16px; align-items: center; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid transparent; animation: fadeUp .4s var(--ease-out) both; }
.lb-row:nth-child(2) { animation-delay: 30ms; } .lb-row:nth-child(3) { animation-delay: 60ms; } .lb-row:nth-child(4) { animation-delay: 90ms; } .lb-row:nth-child(n+5) { animation-delay: 120ms; }
.lb-row:hover { background: rgba(160, 170, 255, .04); border-color: var(--line); }
.lb-row.podium { background: rgba(19, 23, 41, .6); border-color: var(--line); }
.lb-rank { text-align: center; color: var(--text-3); font-size: 14px; }
.medal { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--ink-950); }
.p1 .medal { background: linear-gradient(135deg, #ffe08a, #ffb84d); box-shadow: 0 0 24px -4px rgba(255, 196, 77, .7); }
.p2 .medal { background: linear-gradient(135deg, #f0f2ff, #a7adcf); }
.p3 .medal { background: linear-gradient(135deg, #ffcfa8, #c9814f); }
.lb-main { min-width: 0; display: grid; gap: 8px; }
.lb-line { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.lb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-msgs { white-space: nowrap; }
.lb-progress { display: flex; align-items: center; gap: 10px; }
.lb-progress .bar { flex: 1; }
.lb-next { font-size: 11px; color: var(--text-3); white-space: nowrap; }
.lb-level { display: grid; justify-items: center; }
.lb-level-n { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--violet-2); line-height: 1; }
.lb-xp { display: grid; justify-items: end; position: relative; }
.lb-xp .mono { font-size: 15px; font-weight: 600; }
.lb-xpbar { width: 100%; height: 3px; border-radius: 3px; margin-top: 4px; background: linear-gradient(90deg, transparent calc(100% - var(--w)), rgba(76, 201, 255, .6) calc(100% - var(--w))); }
@media (max-width: 640px) {
  .lb-row { grid-template-columns: 34px 36px minmax(0, 1fr) 52px; gap: 10px; padding: 10px 6px; }
  .lb-xp { display: none; }
  .lb-msgs { display: none; }
  .medal { width: 28px; height: 28px; font-size: 13px; }
  .lb-row .avatar { width: 36px !important; height: 36px !important; }
}

/* ---------- cases ---------- */
.select-wrap select { min-width: 160px; }
.case-no { color: var(--text-2); }
.cell-stack { display: grid; }
.action-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; text-transform: capitalize; color: var(--tc); background: color-mix(in srgb, var(--tc) 13%, transparent); }
.reason-cell { max-width: 280px; color: var(--text-2); }
.row-actions { text-align: right; white-space: nowrap; }
tr.revoked td { opacity: .55; }
tr.revoked .case-no { text-decoration: line-through; }
@media (max-width: 760px) {
  .cases-wrap { border: 0; overflow: visible; }
  .cases thead { display: none; }
  .cases, .cases tbody, .cases tr, .cases td { display: block; width: 100%; }
  .cases tr { border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 10px; padding: 8px 4px; background: rgba(8, 10, 20, .4); }
  .cases td { border: 0; padding: 6px 12px; display: flex; gap: 12px; justify-content: space-between; text-align: right; }
  .cases td::before { content: attr(data-label); color: var(--text-3); font-size: 12px; font-weight: 700; text-align: left; flex: none; }
  .cases td.row-actions { justify-content: flex-end; }
  .cases td.row-actions:empty { display: none; }
  .reason-cell { max-width: none; }
  .cell-stack { justify-items: end; }
  .cell-stack .mono { overflow-wrap: anywhere; }
}

/* ---------- module pages ---------- */
.module-switch { flex-direction: row; align-items: center; gap: 12px; }
.module-off .settings .panel { border-style: dashed; }
.module-foot { margin-top: 18px; }
.settings > .panel + .panel, .data-host > .panel + .panel, .data-host { margin-top: 18px; }
.data-host:empty { display: none; }
.cmd-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.cmd { display: grid; grid-template-columns: minmax(0, auto) 1fr; gap: 4px 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); align-items: baseline; }
.cmd:last-child { border-bottom: 0; }
.cmd-usage { font-size: 12px; color: var(--sky); grid-column: 1 / -1; justify-self: start; overflow-wrap: anywhere; }
.cmd-desc { font-size: 13px; color: var(--text-2); }
.cmd-perm { display: inline-flex; gap: 4px; align-items: center; color: var(--text-3); font-size: 12px; justify-self: end; }
.explain { display: grid; gap: 10px; color: var(--text-2); max-width: 70ch; }

.escalate { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; margin-top: 18px; }
@media (max-width: 1100px) { .escalate { grid-template-columns: minmax(0, 1fr); } }
.ladder-wrap { padding: 16px; border-radius: var(--r-md); background: var(--field-bg); border: 1px solid var(--line); }
.ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; position: relative; }
.ladder.off { opacity: .5; }
.ladder-step { display: grid; grid-template-columns: 34px 30px 1fr; gap: 10px; align-items: center; padding: 10px 0; position: relative; }
.ladder-step:not(:last-of-type)::after { content: ''; position: absolute; left: 16px; top: 38px; bottom: -10px; width: 2px; background: linear-gradient(var(--tc), transparent); opacity: .5; }
.ladder-n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: var(--tc); border: 2px solid var(--tc); background: var(--ink-900); position: relative; z-index: 1; }
.ladder-ic { color: var(--tc); display: grid; }
.ladder-note { display: flex; gap: 6px; font-size: 12px; color: var(--amber); padding-top: 8px; }

.rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .rules { grid-template-columns: minmax(0, 1fr); } }
.rule { padding: 16px; border-radius: var(--r-md); border: 1px solid var(--line); background: rgba(8, 10, 20, .45); gap: 14px; transition: border-color var(--dur-2), background var(--dur-2); }
.rule.on { border-color: rgba(124, 92, 255, .4); background: rgba(124, 92, 255, .06); }
.rule-head { display: flex; gap: 12px; align-items: flex-start; }
.rule-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; background: rgba(160, 170, 255, .07); color: var(--text-3); transition: color var(--dur-2), background var(--dur-2); }
.rule.on .rule-ic { color: var(--violet-2); background: rgba(124, 92, 255, .16); }
.rule-title { flex: 1; min-width: 0; }
.rule-title h3 { font-size: 15px; font-weight: 800; }
.rule-title p { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.rule-body { padding-top: 14px; border-top: 1px solid var(--line); }
.rule:not(.on) .rule-body { opacity: .55; }
.rule-body .fields { gap: 16px; }

.xp-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; }
@media (max-width: 1100px) { .xp-grid { grid-template-columns: minmax(0, 1fr); } }
.curve-card { padding: 18px; border-radius: var(--r-md); background: linear-gradient(160deg, rgba(124, 92, 255, .12), rgba(8, 10, 20, .4)); border: 1px solid rgba(124, 92, 255, .25); }
.curve-lead { font-size: 14px; color: var(--text-2); margin-bottom: 14px; }
.curve-lead b { color: var(--text); }
.curve-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.curve-list li { display: grid; grid-template-columns: 70px 1fr; gap: 0 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.curve-list li:last-child { border-bottom: 0; }
.curve-lv { font-weight: 800; color: var(--violet-2); grid-row: span 2; align-self: center; font-size: 13px; }
.curve-list .mono { font-size: 13px; }

.rewards { display: grid; gap: 10px; }
.reward-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: end; padding: 12px; border-radius: var(--r-md); background: var(--field-bg); border: 1px solid var(--line); animation: fadeUp .3s var(--ease-out); }
.reward-lvl, .reward-role { display: grid; gap: 6px; min-width: 0; }
.reward-lvl .num-input { width: 80px; }
.rewards-foot { margin-top: 14px; }

.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 10px; }
.event-tile { flex-direction: row; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: rgba(8, 10, 20, .45); cursor: pointer; transition: border-color var(--dur-2), background var(--dur-2); }
.event-tile.on { border-color: rgba(76, 201, 255, .35); background: rgba(76, 201, 255, .05); }
.event-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; background: rgba(160, 170, 255, .07); color: var(--text-3); }
.event-tile.on .event-ic { color: var(--sky); background: rgba(76, 201, 255, .12); }
.event-text { flex: 1; min-width: 0; display: grid; }
.event-text b { font-size: 14px; }
.event-tile .field-error { display: none; }

.tpl.single { grid-template-columns: minmax(0, 1fr); }

/* custom commands */
.cc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cc { display: grid; grid-template-columns: minmax(0, 1fr) 110px auto; gap: 16px; align-items: center; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line); background: rgba(8, 10, 20, .4); }
.cc-main { min-width: 0; display: grid; gap: 6px; }
.cc-line { display: flex; gap: 8px; align-items: center; }
.cc-name { font-size: 14px; color: var(--violet-2); background: rgba(124, 92, 255, .12); }
.cc-resp { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-uses { display: grid; justify-items: end; gap: 2px; }
.cc-uses .mono { font-weight: 600; }
.cc-usebar { width: 100%; height: 3px; border-radius: 3px; background: linear-gradient(90deg, transparent calc(100% - var(--w)), var(--violet) calc(100% - var(--w))); }
.cc-actions { display: flex; gap: 4px; }
@media (max-width: 560px) { .cc { grid-template-columns: minmax(0, 1fr) auto; } .cc-uses { display: none; } }
.prefixed { display: flex; align-items: stretch; }
.prefix { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--line-strong); border-right: 0; border-radius: 12px 0 0 12px; background: rgba(160, 170, 255, .08); color: var(--violet-2); }
.prefixed .text-input { border-radius: 0 12px 12px 0; }
.modal-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
@media (max-width: 820px) { .modal-split { grid-template-columns: minmax(0, 1fr); } }

/* reaction roles */
.rr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); gap: 14px; }
.rr-card { border-radius: var(--r-md); border: 1px solid var(--line); overflow: hidden; background: rgba(8, 10, 20, .4); display: flex; flex-direction: column; }
.rr-preview { background: #313338; padding: 14px; flex: 1; color: #dbdee1; }
.rr-meta { display: flex; align-items: center; gap: 12px; padding: 12px 14px; flex-wrap: wrap; }
.rr-info { flex: 1; min-width: 0; display: grid; }
.rr-info b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.published { color: var(--mint); display: inline-flex; gap: 4px; align-items: center; font-weight: 600; }
.rr-actions { display: flex; gap: 4px; align-items: center; }
.rr-rows { display: grid; gap: 8px; }
.rr-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 64px 110px auto; gap: 8px; align-items: center; }
.rr-role { min-width: 0; }
.emoji-in { text-align: center; padding-left: 4px; padding-right: 4px; }
.rr-none { padding: 6px 0; }
@media (max-width: 620px) { .rr-row { grid-template-columns: minmax(0, 1fr) 64px auto; padding-bottom: 10px; border-bottom: 1px solid var(--line); } .rr-role { grid-column: 1 / -1; } .rr-row select { grid-column: 1 / 3; grid-row: 3; } }

/* tickets */
.post-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.post-row .field { flex: 1 1 260px; }
.seg-btn { border: 0; background: transparent; color: var(--text-2); font-weight: 700; font-size: 13px; padding: 7px 14px; border-radius: 9px; }
.seg-btn[aria-selected="true"] { background: var(--ink-600); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.tk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tk { width: 100%; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: rgba(8, 10, 20, .4); text-align: left; color: var(--text); }
.tk:hover { border-color: rgba(76, 201, 255, .35); background: rgba(76, 201, 255, .04); }
.tk-no { font-weight: 700; color: var(--sky); }
.tk-no.closed { color: var(--text-3); }
.tk-main { display: grid; min-width: 0; }
.tk-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-when { white-space: nowrap; }
.tk-open { color: var(--text-3); display: grid; }
@media (max-width: 560px) { .tk { grid-template-columns: 52px minmax(0, 1fr) auto; } .tk-when { display: none; } }

/* giveaways */
.inline-num { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.gw-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.gw { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line); background: rgba(8, 10, 20, .4); }
.gw:not(.ended) { border-color: rgba(124, 92, 255, .35); background: linear-gradient(90deg, rgba(124, 92, 255, .1), rgba(8, 10, 20, .4) 60%); }
.gw-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(124, 92, 255, .16); color: var(--violet-2); }
.gw.ended .gw-ic { background: rgba(160, 170, 255, .06); color: var(--text-3); }
.gw-main { display: grid; min-width: 0; gap: 2px; }
.gw-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gw-winners { color: var(--amber); display: inline-flex; gap: 4px; align-items: center; font-weight: 600; }
.gw-count { font-size: 16px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.gw-count.soon { color: var(--amber); }
@media (max-width: 600px) { .gw { grid-template-columns: 40px minmax(0, 1fr); } .gw-time, .gw-actions { grid-column: 2; } }

/* polls */
.poll-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 14px; }
.poll { padding: 18px; border-radius: var(--r-md); border: 1px solid var(--line); background: rgba(8, 10, 20, .4); display: flex; flex-direction: column; gap: 14px; }
.poll.ended { opacity: .8; }
.poll-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.poll-head h3 { font-size: 15px; font-weight: 800; overflow-wrap: anywhere; }
.poll-head .badge .hb-dot { background: var(--mint); width: 6px; height: 6px; animation: blink 2s infinite; }
.poll-opts { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.poll-opt { display: grid; gap: 5px; }
.poll-line { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 600; }
.poll-opt:not(.lead) .bar > span { background: var(--ink-600); }
.poll-opt.lead .poll-line { color: var(--text); }
.poll-opt:not(.lead) .poll-line { color: var(--text-2); }
.poll-votes { font-size: 12px; }
.poll-foot { margin-top: auto; }

/* embed builder */
.builder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.builder-form > .panel + .panel { margin-top: 18px; }
.builder-preview .sticky { position: sticky; top: calc(var(--top-h) + 20px); }
.embed-preview .d-frame-body { min-height: 160px; }
.empty-preview { padding: 30px 0; text-align: center; color: #80848e !important; }
.em-fields { display: grid; gap: 10px; }
.em-field { display: grid; gap: 8px; padding: 12px; border-radius: var(--r-md); background: var(--field-bg); border: 1px solid var(--line); }
.em-field-top { display: flex; align-items: center; gap: 10px; }
.em-field-top .inline-toggle { margin-left: auto; display: inline-flex; gap: 8px; align-items: center; color: var(--text-2); }
.em-embed .fields { gap: 16px; }
@media (max-width: 1100px) { .builder { grid-template-columns: minmax(0, 1fr); } .builder-preview .sticky { position: static; } }

/* server settings */
.switchboard { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; }
@media (max-width: 900px) { .switchboard { grid-template-columns: minmax(0, 1fr); } }
.sb-row { flex-direction: row; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r-md); border: 1px solid var(--line); background: rgba(8, 10, 20, .4); }
.sb-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; color: var(--tc); background: color-mix(in srgb, var(--tc) 12%, transparent); }
.sb-text { flex: 1; min-width: 0; display: grid; }
.sb-text a { color: var(--text); font-weight: 800; font-size: 14px; }
.sb-text .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-row .field-error { display: none; }
.rules { align-items: start; }
.module-foot { align-items: start; }
.fields > .field-toggle { align-self: start; }
@media (max-width: 560px) {
  .sb-long { display: none; }
  .savebar-text::first-letter { text-transform: uppercase; }
  .page-head { gap: 12px; margin-bottom: 18px; }
  .head-icon { width: 44px; height: 44px; border-radius: 14px; }
  .page-head .head-actions { margin-left: 0; }
  .modal-wrap { padding: 8px; align-items: end; }
  .modal { max-height: calc(100vh - 16px); }
}
.field > .stepper { align-self: flex-start; }

/* ---------- Your data & privacy ---------- */
.account-page { max-width: 860px; margin: 0 auto; padding: 32px 16px 64px; }
.privacy-page { display: grid; gap: 20px; }
.privacy-hero { display: flex; gap: 20px; align-items: center; margin-bottom: 6px; }
.privacy-hero h1 { font-family: var(--font-display); font-size: clamp(26px, 4vw, 36px); margin: 4px 0 6px; }
.privacy-hero p { margin: 0; max-width: 60ch; }
.privacy-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 22px; }
.privacy-list li { display: flex; gap: 12px; align-items: flex-start; }
.privacy-list p { margin: 2px 0 0; }
.privacy-ic { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(124, 92, 255, .12); color: var(--violet-2); }
.danger-zone { border-color: rgba(255, 93, 115, .35); background: linear-gradient(180deg, rgba(255, 93, 115, .06), transparent 60%), var(--glass); }
.danger-zone h2 { color: #ff8796; }
.privacy-notes { margin: 0 0 16px; padding-left: 18px; display: grid; gap: 4px; }
.privacy-confirm label { display: block; font-weight: 600; margin-bottom: 8px; }
.privacy-confirm-row { display: flex; gap: 10px; flex-wrap: wrap; }
.privacy-confirm-row .text-input { flex: 1 1 160px; max-width: 220px; letter-spacing: .12em; }
.privacy-done { text-align: center; padding: 60px 16px; display: grid; justify-items: center; gap: 10px; }
.privacy-done h1 { font-family: var(--font-display); margin: 8px 0 0; }
.privacy-done p { max-width: 52ch; }
.privacy-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
@media (max-width: 560px) { .privacy-hero { flex-direction: column; align-items: flex-start; } }
.login-legal { margin: 10px 0 0; }

/* ---------- Premium ---------- */
.pm-page { display: grid; gap: 20px; }
.pm-hero { display: flex; gap: 20px; align-items: center; }
.pm-hero h2 { margin: 6px 0 6px; font-family: var(--font-display); font-size: clamp(20px, 2.6vw, 26px); }
.pm-hero p { margin: 0 0 8px; max-width: 70ch; }
.pm-hero.is-premium { border-color: rgba(255, 196, 77, .4); background: linear-gradient(135deg, rgba(255, 196, 77, .08), transparent 55%), var(--glass); }
.pm-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0 6px; }
.pm-meters { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px 24px; }
.pm-meter { display: grid; gap: 6px; }
.pm-meter-top { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; font-size: 14px; }
.pm-bar { height: 8px; border-radius: 99px; background: var(--ink-700); overflow: hidden; }
.pm-bar i { display: block; height: 100%; border-radius: inherit; background: var(--mint); transition: width var(--dur-3) var(--ease-out); }
.pm-bar.tone-amber i { background: var(--amber); } .pm-bar.tone-ember i { background: var(--ember); }
.pm-table td { text-align: center; } .pm-table td.num { font-variant-numeric: tabular-nums; }
.pm-soon th { color: var(--text-2); font-weight: 500; }
.pm-promise { display: flex; align-items: center; gap: 6px; }
@media (max-width: 560px) { .pm-hero { flex-direction: column; align-items: flex-start; } }
/* Premium: bot identity */
.id-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.id-panel .fields { display: grid; gap: 14px; }
.id-panel .field label, .id-panel .field .label { display: block; font-weight: 600; margin-bottom: 6px; }
.id-panel textarea.text-input { resize: vertical; min-height: 70px; width: 100%; }
.id-panel input.text-input { width: 100%; }
.id-file { display: flex; gap: 8px; flex-wrap: wrap; }
.id-panel.is-locked .fields { opacity: .55; }
.id-preview { border-radius: 14px; overflow: hidden; background: #232428; border: 1px solid var(--line); }
.id-pv-banner { height: 96px; background: linear-gradient(120deg, #7c5cff, #4cc9ff) center / cover no-repeat; }
.id-pv-body { padding: 0 16px 16px; position: relative; }
.id-pv-avatar { display: block; width: 76px; height: 76px; margin-top: -38px; border-radius: 50%; border: 6px solid #232428; background: #2b2d31 center / cover no-repeat; }
.id-pv-avatar.is-default { background-image: url('/shared/logo.svg') !important; background-size: 70%; }
.id-pv-name { font-size: 18px; margin-right: 6px; }
.id-pv-app { vertical-align: middle; }
.id-pv-bio { margin: 8px 0 0; color: #dbdee1; white-space: pre-wrap; }
@media (max-width: 860px) { .id-grid { grid-template-columns: 1fr; } }
