/* Nekori Club design system: one palette, one set of controls, shared by the
   landing page, the server dashboard and the member pages. Keep components here
   instead of styling one page at a time. */

@font-face {
  font-family: "Nekori Sans";
  src: url("/assets/fonts/opensans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nekori Sans";
  src: url("/assets/fonts/opensans-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nekori Display";
  src: url("/assets/fonts/montserrat-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --font-body: "Nekori Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Nekori Display", "Nekori Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --bg: #17171c;
  --bg-soft: #1b1b21;
  --panel: #212128;
  --panel-2: #282831;
  --panel-3: #31313c;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);

  --text: #f2f2f6;
  --text-2: #bdbdc9;
  --text-3: #9494a3;

  --accent: #f4b4c8;
  --accent-2: #f9c9d8;
  --accent-ink: #2b1420;
  --accent-soft: rgba(244, 180, 200, 0.13);
  --accent-line: rgba(244, 180, 200, 0.38);

  --ok: #8fdcae;
  --ok-soft: rgba(143, 220, 174, 0.13);
  --warn: #f2cd82;
  --warn-soft: rgba(242, 205, 130, 0.13);
  --danger: #f59b9b;
  --danger-soft: rgba(245, 155, 155, 0.13);
  --info: #a6c8ff;
  --info-soft: rgba(166, 200, 255, 0.13);

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 12px 32px -18px rgba(0, 0, 0, 0.6);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; min-width: 320px; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
p { margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; }
ul, ol { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.muted { color: var(--text-3); }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; }

/* Icons: one 24px outline set, drawn with currentColor. */
.i {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.i-sm { width: 16px; height: 16px; }

/* Brand */
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
  font-family: var(--font-display); font-weight: 600; font-size: 16px; letter-spacing: -0.01em;
}

/* Buttons: one height scale (32 / 40 / 48) and one radius. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: var(--r-sm);
  background: none; font-family: var(--font-body); font-weight: 600; font-size: 14px; line-height: 1;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn .i { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover:not(:disabled) { background: var(--accent-2); }
.btn-secondary { background: var(--panel-2); color: var(--text); border-color: var(--line-2); }
.btn-secondary:hover:not(:disabled) { background: var(--panel-3); }
.btn-ghost { color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.btn-danger { color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: var(--danger-soft); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0;
  border: 0; border-radius: 8px; background: transparent; color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.07); color: var(--text); }
.icon-btn.is-danger:hover { background: var(--danger-soft); color: var(--danger); }

/* Form controls: every text field, select and toggle shares height, radius and focus ring. */
.input, select {
  width: 100%; height: 40px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background-color: var(--panel-2); color: var(--text);
  font-size: 14px; outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input::placeholder { color: var(--text-3); opacity: 1; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  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='%23bdbdc9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
.input:hover, select:hover { border-color: var(--line-2); }
.input:focus-visible, select:focus-visible { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.input:disabled, select:disabled { opacity: 0.5; cursor: not-allowed; }

.field { display: grid; align-content: start; gap: 8px; min-width: 0; }
.label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.hint { font-size: 12.5px; line-height: 1.5; color: var(--text-3); }

/* Checkbox: the same box everywhere. The native input stays focusable but invisible. */
.check {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  min-height: 28px; cursor: pointer; user-select: none;
  font-size: 14px; color: var(--text-2);
}
.check input {
  position: absolute; left: 0; top: 50%; width: 18px; height: 18px; margin: 0;
  opacity: 0; transform: translateY(-50%); pointer-events: none;
}
.check-box {
  position: relative; width: 18px; height: 18px; flex: none;
  border: 1.5px solid var(--line-2); border-radius: 6px; background: var(--panel-2);
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.check-box::after {
  content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 9px;
  border: solid var(--accent-ink); border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0); transition: transform 0.12s ease;
}
.check:hover .check-box { border-color: var(--accent-line); }
.check input:checked + .check-box { background: var(--accent); border-color: var(--accent); }
.check input:checked + .check-box::after { transform: rotate(45deg) scale(1); }
.check input:focus-visible + .check-box { box-shadow: 0 0 0 3px var(--accent-soft); border-color: var(--accent-line); }
.check input:disabled + .check-box { opacity: 0.5; }
.check input:disabled ~ .check-label { opacity: 0.6; }
.check-label { min-width: 0; overflow-wrap: anywhere; }

/* Switch: settings that are on or off. Same row layout wherever it appears. */
.switch-row {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer;
  background: var(--panel-2);
}
.switch-text { display: grid; gap: 2px; min-width: 0; }
.switch-text b { font-size: 14px; font-weight: 600; color: var(--text); }
.switch-text small { font-size: 13px; line-height: 1.45; color: var(--text-3); }
.switch { position: relative; flex: none; width: 36px; height: 20px; }
.switch input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer;
}
.switch-track {
  position: absolute; inset: 0; border-radius: 999px;
  background: var(--panel-3); border: 1px solid var(--line-2);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.switch-track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--text-2); transition: transform 0.18s ease, background-color 0.15s ease;
}
.switch input:checked + .switch-track { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(16px); background: var(--accent-ink); }
.switch input:focus-visible + .switch-track { box-shadow: 0 0 0 3px var(--accent-soft); }

/* Badges, chips and notices. */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px;
  border-radius: 999px; background: var(--panel-3); color: var(--text-2);
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-accent { background: var(--accent-soft); color: var(--accent); }
.badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  border-radius: 6px; background: var(--panel-3); color: var(--text-2); font-size: 12px;
}
.chip-accent { background: var(--accent-soft); color: var(--accent); }

.notice {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--panel-2); color: var(--text-2); font-size: 14px; line-height: 1.5;
}
.notice > .i { margin-top: 2px; }
.notice > div { min-width: 0; }
.notice ul { margin: 6px 0 0; padding-left: 18px; }
.notice-ok { color: var(--ok); background: var(--ok-soft); border-color: rgba(143, 220, 174, 0.22); }
.notice-warn { color: var(--warn); background: var(--warn-soft); border-color: rgba(242, 205, 130, 0.22); }
.notice-error { color: var(--danger); background: var(--danger-soft); border-color: rgba(245, 155, 155, 0.22); }
.notice-info { color: var(--info); background: var(--info-soft); border-color: rgba(166, 200, 255, 0.22); }

/* Cards: the one container used for every block of content. */
.card {
  min-width: 0; display: grid; align-content: start;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
.card-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 18px 20px 16px; border-bottom: 1px solid var(--line);
}
.card-head h2 { font-size: 16px; }
.card-head p { margin-top: 4px; font-size: 13.5px; line-height: 1.5; color: var(--text-3); }
.card-head > .badge { margin-top: 2px; }
.card-body { display: grid; gap: 16px; padding: 16px 20px 20px; min-width: 0; }
.card-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  padding: 14px 20px; border-top: 1px solid var(--line);
}
.card-foot-start { justify-content: space-between; }
.card-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 860px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.span-2 { grid-column: 1 / -1; }
.fields { display: grid; gap: 16px 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.stack { display: grid; gap: 16px; min-width: 0; }

/* Landing page */
.site {
  min-height: 100vh;
  display: flex; flex-direction: column;
  background:
    radial-gradient(1000px 540px at 10% -12%, rgba(244, 180, 200, 0.15), transparent 60%),
    radial-gradient(860px 480px at 100% 4%, rgba(166, 150, 255, 0.09), transparent 62%),
    var(--bg);
}
.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.nav-bar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(23, 23, 28, 0.72); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-end { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px;
  border: 1px solid var(--line-2); border-radius: 999px; background: rgba(255, 255, 255, 0.03);
  font-size: 13px; color: var(--text-2);
}
.pill .i { width: 16px; height: 16px; color: var(--accent); }
.h1 { margin-top: 22px; font-size: clamp(36px, 4vw, 46px); line-height: 1.04; letter-spacing: -0.035em; }
.h1 em { font-style: normal; color: var(--accent); }
.lead { margin-top: 20px; max-width: 52ch; font-size: 17px; line-height: 1.6; color: var(--text-2); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* Product preview in the hero: a static dashboard window, built with the same components. */

.section { padding: 72px 0; border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 12px; max-width: 720px; margin-bottom: 40px; }
.eyebrow { font-size: 12.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.section-head h2 { font-size: clamp(28px, 3.4vw, 38px); line-height: 1.1; letter-spacing: -0.03em; }
.section-head p { font-size: 16px; line-height: 1.6; color: var(--text-2); }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature {
  display: grid; align-content: start; gap: 12px; padding: 24px;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel);
  transition: border-color 0.2s ease;
}
.feature:hover { border-color: var(--accent-line); }
.feature-ico {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent);
}
.feature-ico .i { width: 21px; height: 21px; }
.feature h3 { font-size: 17px; }
.feature p { font-size: 14.5px; line-height: 1.6; color: var(--text-2); }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.step { display: grid; align-content: start; gap: 10px; padding: 24px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); }
.step-no { font-family: var(--font-display); font-size: 13px; letter-spacing: 0.06em; color: var(--accent); }
.step h3 { font-size: 18px; }
.step p { font-size: 14.5px; line-height: 1.6; color: var(--text-2); }
.site > main { flex: 1 0 auto; }
.footer { margin-top: auto; border-top: 1px solid var(--line); padding: 28px 0 36px; }
.footer .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13.5px; }
.footer-links a, .footer small { color: var(--text-3); text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.footer small { font-size: 13px; }

/* App shell: sidebar with server switcher and grouped sections, top bar, content. */
.app { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px; padding: 16px 12px;
  background: var(--bg-soft); border-right: 1px solid var(--line);
}
.sb-top { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 0; }
.sb-close { display: none; }
.server-switch {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--panel);
  color: var(--text); text-decoration: none; transition: border-color 0.15s ease;
}
.server-switch:hover { border-color: var(--line-2); }
.server-switch > .i { color: var(--text-3); }
.srv-icon {
  display: grid; place-items: center; flex: none; width: 34px; height: 34px; overflow: hidden;
  border-radius: 10px; background: var(--panel-3); color: var(--text-2);
  font-family: var(--font-display); font-size: 14px;
}
.srv-icon img { width: 100%; height: 100%; object-fit: cover; }
.srv-icon-lg { width: 44px; height: 44px; border-radius: 12px; font-size: 17px; }
.ss-text { display: grid; flex: 1; min-width: 0; }
.ss-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; }
.ss-text small { font-size: 12px; color: var(--text-3); }
.nav { display: grid; gap: 12px; }
.nav-group { display: grid; gap: 2px; }
.nav-head {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 6px 10px; border: 0; border-radius: 6px; background: none;
  color: var(--text-3); font-size: 12px; font-weight: 600; letter-spacing: 0.02em; text-align: left; cursor: pointer;
}
.nav-head:hover { color: var(--text-2); }
.nav-head .i { width: 14px; height: 14px; transition: transform 0.15s ease; }
.nav-head[aria-expanded="false"] .i { transform: rotate(-90deg); }
.nav-list { display: grid; gap: 2px; list-style: none; padding: 0; margin: 0; }
.nav-link {
  display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px;
  border-radius: var(--r-sm); color: var(--text-2); text-decoration: none; font-size: 14px;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.nav-link .i { width: 17px; height: 17px; color: var(--text-3); }
.nav-link:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.nav-link[aria-current="page"] { background: var(--panel-3); color: var(--text); }
.nav-link[aria-current="page"] .i { color: var(--accent); }
.content { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px;
  height: 60px; padding: 0 28px;
  background: rgba(23, 23, 28, 0.84); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.menu-toggle { display: none; }
.crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; color: var(--text-3); }
.crumbs .i { width: 14px; height: 14px; }
.crumbs b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--text); }
.topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.page { display: grid; gap: 20px; width: 100%; max-width: 1080px; margin: 0 auto; padding: 28px 28px 64px; }
.page-head { display: grid; gap: 6px; margin-bottom: 16px; }
.page-head h1 { font-size: 22px; }
.page-head p { font-size: 14px; line-height: 1.55; color: var(--text-3); max-width: 70ch; }
.page-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.scrim { display: none; }

.empty {
  display: grid; gap: 8px; justify-items: start; padding: 24px; border: 1px dashed var(--line-2);
  border-radius: var(--r-lg); color: var(--text-3);
}

/* Settings: status list, commands, connections. */
.status-list { display: grid; gap: 0; list-style: none; padding: 0; margin: 0; }
.status-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.status-item:first-child { border-top: 0; padding-top: 0; }
.status-item:last-child { padding-bottom: 0; }
.status-ico { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 8px; }
.status-ico .i { width: 16px; height: 16px; }
.status-item b { display: block; font-size: 14px; font-weight: 600; color: var(--text); }
.status-item small { display: block; margin-top: 2px; font-size: 13px; line-height: 1.45; color: var(--text-3); }
.tone-ok .status-ico { background: var(--ok-soft); color: var(--ok); }
.tone-warn .status-ico { background: var(--warn-soft); color: var(--warn); }
.tone-problem .status-ico { background: var(--danger-soft); color: var(--danger); }
.tone-info .status-ico { background: var(--info-soft); color: var(--info); }

.link-box {
  display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel-2);
}
.link-box code { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--text-2); }

.cmd-name {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 7px;
  background: var(--accent-soft); color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px;
}
.check-list { display: grid; gap: 10px; max-height: 300px; overflow-y: auto; padding-right: 4px; }

/* Settings: cards in a row keep the same height. */
.settings-grid { align-items: stretch; }
.settings-grid > .card { display: flex; flex-direction: column; }
.settings-grid > .card > .card-body { flex: 1; }

/* Honeypot duration: days, hours, minutes and seconds side by side. */
.duration { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.duration label { display: grid; gap: 4px; }

/* Role chips: single choice (the Jailed role). */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-check { position: relative; display: inline-flex; max-width: 100%; }
.chip-check input { position: absolute; opacity: 0; pointer-events: none; }
.chip-check span {
  display: inline-flex; align-items: center; min-height: 32px; max-width: 100%; padding: 0 12px;
  border: 1px solid var(--line-2); border-radius: 999px; color: var(--text-2); font-size: 13px;
  overflow-wrap: anywhere; cursor: pointer; user-select: none;
}
.chip-check:hover span { border-color: var(--accent-line); color: var(--text); }
.chip-check input:checked + span { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.chip-check input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }

.conn-list { display: grid; gap: 10px; list-style: none; padding: 0; margin: 0; }
.conn { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2); }
.conn .srv-icon { width: 36px; height: 36px; font-size: 14px; }
.conn-text { display: grid; gap: 6px; flex: 1; min-width: 0; }
.conn-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; }
.conn-chips { display: flex; flex-wrap: wrap; gap: 6px; }

@media (max-width: 1080px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; z-index: 20; left: 0; top: 0; width: 280px; height: 100vh;
    transform: translateX(-102%); transition: transform 0.22s ease;
    box-shadow: 0 0 0 1px var(--line);
  }
  .app.is-open .sidebar { transform: none; }
  .sb-close { display: inline-grid; }
  .menu-toggle { display: inline-grid; }
  .app.is-open .scrim { display: block; position: fixed; inset: 0; z-index: 15; background: rgba(0, 0, 0, 0.55); }
  .topbar { padding: 0 16px; }
  .page { padding: 20px 16px 56px; }
}
@media (max-width: 960px) {
  .steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .container { padding: 0 18px; }
  .feature-grid { grid-template-columns: minmax(0, 1fr); }
  .section { padding: 52px 0; }
  .card-head, .card-body, .card-foot { padding-left: 16px; padding-right: 16px; }
}
/* Error page and other single-column pages. */
.narrow-page { max-width: 560px; padding-top: 56px; }
.error-card h1 { font-size: 22px; }
.error-card .card-body { padding: 24px; gap: 14px; }
.error-text { color: var(--text-2); font-size: 15px; line-height: 1.6; }
.error-card .cta-row { margin-top: 4px; }
@media (max-width: 560px) {
  .brand span { white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* Page building blocks used by the dashboard templates. */
.tab-panel, .settings-form { display: grid; gap: 20px; min-width: 0; }
.card-foot-form { display: grid; gap: 0; min-width: 0; }
.fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.fieldset legend { padding: 0; margin-bottom: 8px; }
.purpose-list { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.form-note { padding: 0 20px 16px; }
.empty .i { width: 22px; height: 22px; color: var(--text-3); }

/* Brand: the avatar and the short name, as in the reference header. */
.brand { gap: 10px; font-size: 16px; }
.brand-avatar { width: 32px; height: 32px; flex: none; border-radius: 50%; object-fit: cover; background: var(--panel-3); }

/* Landing header: brand and links on the left, the hotbar on the right. */
.nav-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.nav-links { display: flex; gap: 22px; }
.nav-links a { font-size: 14px; color: var(--text-2); text-decoration: none; }
.nav-links a:hover { color: var(--text); }
.nav-end { margin-left: auto; display: flex; align-items: center; gap: 12px; }

/* Dropdown menus use native details, so they work without scripts. */
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-trigger {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 6px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--panel);
  color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer; user-select: none;
}
.menu-trigger:hover { border-color: var(--line-2); }
.menu[open] > .menu-trigger { border-color: var(--accent-line); }
.menu-chevron { width: 14px; height: 14px; color: var(--text-3); }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; display: grid; gap: 2px;
  min-width: 200px; padding: 6px; border: 1px solid var(--line-2); border-radius: 12px;
  background: var(--panel-2); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.7);
}
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px;
  border: 0; border-radius: 8px; background: none; color: var(--text-2);
  font: inherit; font-size: 14px; text-align: left; text-decoration: none; cursor: pointer;
}
.menu-item .i { width: 16px; height: 16px; color: var(--text-3); }
.menu-item:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.menu-item.is-current { color: var(--accent); }
.menu-item-danger:hover { background: var(--danger-soft); color: var(--danger); }
.menu-form { margin: 0; }
.lang-code { font-size: 14px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; }
.avatar { width: 30px; height: 30px; flex: none; border-radius: 50%; object-fit: cover; background: var(--panel-3); }
.avatar-empty { display: grid; place-items: center; }
.avatar-empty .i { width: 16px; height: 16px; color: var(--text-2); }
.menu-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Hero: copy on the left, the avatar on the right with pink line decorations. */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center; gap: 40px; padding: 64px 0 72px; min-height: 620px;
}
.h1 { margin-top: 22px; font-size: clamp(38px, 4.2vw, 52px); line-height: 1.06; letter-spacing: -0.035em; }
.hero-visual { display: grid; place-items: center; }
.avatar-stage { position: relative; width: min(100%, 520px); aspect-ratio: 1; display: grid; place-items: center; }
.avatar-glow {
  position: absolute; inset: 4%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(244, 180, 200, 0.30), rgba(244, 180, 200, 0) 74%);
  filter: blur(14px);
}
.avatar-hero {
  position: relative; width: 78%; height: auto; aspect-ratio: 1; border-radius: 50%; object-fit: cover;
  box-shadow: 0 30px 80px -28px rgba(0, 0, 0, 0.8);
}
.deco {
  position: absolute; width: 34px; height: 34px; fill: none; stroke: var(--accent);
  stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0.8;
}
.deco-star { top: 6%; left: 16%; }
.deco-spark { top: 10%; right: 14%; width: 30px; height: 30px; }
.deco-heart { top: 47%; left: 2%; }
.deco-music { top: 44%; right: 2%; }
.deco-code { bottom: 10%; left: 12%; }
.deco-cat { bottom: 6%; right: 16%; }
@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 32px; padding: 40px 0 48px; min-height: 0; }
  .avatar-stage { width: min(100%, 340px); }
  .deco { width: 26px; height: 26px; }
}

/* Narrow screens: the section links leave the header, the account shows only the avatar. */
@media (max-width: 760px) {
  .nav-links { display: none; }
}
@media (max-width: 480px) {
  .nav-inner { gap: 12px; }
  .menu-name { display: none; }
}

/* Server list: the shared header, a title, a search field and cards with a banner. */
.servers { padding: 44px 0 80px; }
.servers-title {
  margin: 0 0 22px; font-family: var(--font-display); font-size: clamp(28px, 3.2vw, 36px);
  font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; color: var(--text);
}
.servers-search { position: relative; margin-bottom: 26px; }
.servers-search > .i {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--text-3); pointer-events: none;
}
.servers-search .input { padding-left: 44px; }
.srv-grid {
  display: grid; gap: 18px; list-style: none; margin: 0; padding: 0;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}
.srv-card {
  position: relative; display: flex; flex-direction: column; height: 100%; min-width: 0;
  overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--panel);
  color: var(--text); text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.srv-card:hover {
  border-color: var(--accent-line); transform: translateY(-2px);
  box-shadow: 0 22px 44px -30px rgba(244, 180, 200, 0.55);
}
.srv-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.srv-banner {
  display: block; height: 92px;
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(244, 180, 200, 0.55) 0%, rgba(244, 180, 200, 0) 60%),
    radial-gradient(90% 120% at 100% 0%, rgba(190, 110, 230, 0.55) 0%, rgba(190, 110, 230, 0) 62%),
    linear-gradient(180deg, #2a1b33 0%, #1f1a26 100%);
}
.srv-avatar {
  position: absolute; top: 60px; left: 50%; transform: translateX(-50%); display: grid; place-items: center;
  width: 64px; height: 64px; overflow: hidden; border: 4px solid var(--panel); border-radius: 50%;
  background: linear-gradient(135deg, #f4b4c8 0%, #a48ae0 100%); color: var(--accent-ink);
  font-family: var(--font-display); font-size: 22px; font-weight: 600;
}
.srv-avatar img { width: 100%; height: 100%; object-fit: cover; }
.srv-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 42px 18px 18px; }
.srv-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; font-weight: 600; }
.srv-row .btn { flex: none; }
.servers-empty { margin: 28px 0 0; color: var(--text-3); text-align: center; }

/* Header controls: plain items like the reference, a round flag and a round avatar, no boxes. */
.flag { display: block; width: 20px; height: 20px; flex: none; }
.lang-menu > .menu-trigger,
.account-menu > .menu-trigger {
  height: 36px; padding: 0 8px; border: 0; border-radius: 8px; background: none;
  color: var(--text-2); font-size: 14px; font-weight: 600;
}
.lang-menu > .menu-trigger:hover,
.account-menu > .menu-trigger:hover,
.lang-menu[open] > .menu-trigger,
.account-menu[open] > .menu-trigger { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.lang-menu .menu-item .flag { width: 18px; height: 18px; }

/* ---- Announcements: message editors ---- */
.ann-body { display: grid; gap: 24px; min-width: 0; }
.ann-group { display: grid; gap: 8px; max-width: 34rem; min-width: 0; }
.ann-group > select, .ann-group > .input { width: 100%; }
.ann-group textarea { width: 100%; min-height: 112px; resize: vertical; }
.ann-title { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); }
.ann-help { font-size: 13px; line-height: 1.5; color: var(--text-3); margin: -2px 0 2px; }
.ann-tools { display: flex; justify-content: flex-end; align-items: center; gap: 6px; flex-wrap: wrap; }
.ann-pop { position: relative; display: inline-block; }
.ann-pop > summary { list-style: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; padding: 0; cursor: pointer; }
.ann-pop > summary::-webkit-details-marker { display: none; }
.ann-pop > summary .i { width: 16px; height: 16px; }
.ann-pop-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 220px; max-height: 280px; overflow: auto; display: grid; gap: 2px; padding: 6px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); }
.ann-pop-panel button { display: block; width: 100%; text-align: left; padding: 6px 8px; border: 0; border-radius: 6px; background: none; color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.ann-pop-panel button:hover, .ann-pop-panel button:focus-visible { background: var(--panel-3); outline: none; }
.ann-emoji { grid-template-columns: repeat(8, 1fr); min-width: 260px; }
.ann-emoji button { width: auto; text-align: center; font-size: 18px; padding: 4px; }
.ann-vars button { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; }
.ann-vars code { color: var(--accent); font-size: 12px; }
.ann-vars span { color: var(--text-2); font-size: 12px; }
.ann-pop-panel .hint { margin: 4px 6px; font-size: 12px; }
.ann-tool { height: 32px; min-width: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel-3); color: var(--text-2); font: inherit; font-size: 13px; cursor: pointer; }
.ann-tool:hover { color: var(--text); border-color: var(--accent-line); }
.ann-tool:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; }
.seg label { position: relative; min-width: 0; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.seg span { display: flex; align-items: center; justify-content: center; height: 36px; padding: 0 10px; border-radius: 9px; font-size: 13.5px; color: var(--text-3); text-align: center; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg label:hover span { color: var(--text-2); }
.seg input:checked + span { background: var(--panel-3); color: var(--text); box-shadow: inset 0 0 0 1.5px var(--accent-line); }
.seg-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.seg-4 span { padding: 0 6px; font-size: 13px; }
.seg input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }
.ann-card-options { margin-top: 4px; }
.ann-card-options[hidden] { display: none; }
.ann-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.ann-slot { position: relative; min-height: 132px; border-radius: 12px; border: 1px dashed var(--line-2); background: var(--bg-soft); overflow: hidden; display: grid; }
.ann-slot.is-over { border-color: var(--accent-line); background: var(--accent-soft); }
.ann-slot.is-loading { opacity: 0.6; }
.ann-slot.is-filled { border-style: solid; border-color: var(--line); }
.ann-slot.is-filled > img { width: 100%; height: 100%; min-height: 132px; object-fit: cover; display: block; }
.ann-slot-drop { position: relative; display: grid; place-items: center; align-content: center; gap: 6px; padding: 16px; text-align: center; cursor: pointer; color: var(--text-2); font-size: 13.5px; min-height: 132px; }
.ann-slot-drop input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.ann-slot-drop small { color: var(--text-3); font-size: 12px; }
.ann-slot-icon { width: 36px; height: 36px; border-radius: 50%; background: var(--panel-3); display: grid; place-items: center; color: var(--text-2); }
.ann-slot-icon .i { width: 16px; height: 16px; }
.ann-slot-remove { position: absolute; right: 8px; bottom: 8px; height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-2); background: rgba(23, 23, 28, 0.86); color: var(--text); font: inherit; font-size: 12.5px; cursor: pointer; }
.ann-slot-remove:hover { border-color: var(--accent-line); }
.ann-slot .ann-error { position: absolute; left: 8px; right: 8px; bottom: 8px; margin: 0; padding: 8px 10px; font-size: 12.5px; color: var(--danger); background: var(--danger-soft); border-radius: 8px; }
.ann-slot .ann-error[hidden] { display: none; }
.ann-buttons { display: grid; gap: 8px; }
.ann-button-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) auto; gap: 8px; align-items: center; }
.ann-add-button { justify-self: start; }
.ann-add-button:disabled { opacity: 0.45; cursor: not-allowed; }
.ann-preview { padding: 16px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--line); }
.ann-preview-message { display: flex; gap: 12px; align-items: flex-start; }
.ann-preview-avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; }
.ann-preview-body { min-width: 0; display: grid; gap: 4px; flex: 1; }
.ann-preview-name { font-size: 14px; font-weight: 600; color: var(--text); }
.ann-preview-text { font-size: 14.5px; line-height: 1.5; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.ann-preview-text:empty { display: none; }
.ann-mention { background: rgba(88, 101, 242, 0.35); color: #dfe3ff; border-radius: 4px; padding: 0 3px; }
.ann-preview-card { display: block; padding: 10px 14px; border-radius: 6px; background: var(--panel-2); border-left: 4px solid var(--ann-color, var(--accent)); max-width: 440px; min-width: 0; }
.ann-preview-card[hidden] { display: none; }
.ann-preview-title { font-size: 15px; font-weight: 600; color: var(--text); margin-top: 6px; }
.ann-preview-title:empty { display: none; }
.ann-preview-desc { font-size: 14px; line-height: 1.5; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 4px; }
.ann-preview-desc:empty { display: none; }
.ann-preview-image { display: block; max-width: 100%; border-radius: 6px; margin-top: 2px; }
.ann-preview-image[hidden] { display: none; }
.ann-preview-image.is-thumb { float: right; width: 72px; height: 72px; object-fit: cover; margin: 0 0 6px 10px; }
.ann-preview-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.ann-preview-buttons:empty { display: none; }
.ann-preview-button { padding: 6px 12px; border-radius: 4px; background: var(--panel-3); color: var(--text); font-size: 13px; }
@media (max-width: 560px) {
  .ann-group { max-width: none; }
  .seg span { font-size: 12.5px; padding: 0 6px; }
  .ann-button-row { grid-template-columns: minmax(0, 1fr) auto; }
  .ann-button-row > input:nth-of-type(2) { grid-column: 1 / -1; }
}

/* Restricted channels: rule cards in the moderation tab. */
.restricted-list, .command-list { display: grid; gap: 16px; margin-bottom: 16px; }
.restricted-empty {
  display: grid; justify-items: center; gap: 6px; padding: 32px 16px; text-align: center;
  color: var(--text-3); border: 1px dashed var(--line); border-radius: var(--r-lg);
}
.restricted-empty .i { width: 28px; height: 28px; }
.restricted-empty b { color: var(--text); font-weight: 600; }
.restricted-empty small { font-size: 13px; }
.restricted-add { width: 100%; justify-content: center; }
.restricted-add[disabled] { opacity: 0.5; cursor: not-allowed; }
.duration-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.duration-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.levels-row-body { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 12px; align-items: end; }
@media (max-width: 640px) { .levels-row-body { grid-template-columns: minmax(0, 1fr); } }
.roles-picker { position: relative; }
.roles-picker > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.roles-picker > summary::-webkit-details-marker { display: none; }
.roles-picker > summary .i { width: 16px; height: 16px; flex: none; color: var(--text-3); transition: transform 0.15s; }
.roles-picker[open] > summary .i { transform: rotate(180deg); }
.roles-picker-panel {
  display: grid; gap: 4px; max-height: 240px; overflow-y: auto; margin-top: 6px; padding: 8px 12px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm);
}

/* Multi-line text fields look like the other fields. */
textarea {
  width: 100%; min-height: 96px; padding: 10px 12px; resize: vertical;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background-color: var(--panel-2); color: var(--text);
  font: inherit; font-size: 14px; line-height: 1.5; outline: none;
}
textarea:hover { border-color: var(--line-2); }
textarea:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }

/* One card per tab: the title and description sit in its head, the content in its body.
   Cards inside a tab are quieter blocks, not separate squares. */
.tab-card { padding: 0; }
.tab-body { padding: 20px; }
.tab-body > .card, .tab-body .grid > .card {
  box-shadow: none; background: var(--panel-2); border-color: var(--line);
}
.tab-body .grid { gap: 12px; }


/* Server list: name with the user's role under it. */
.srv-meta { display: grid; gap: 2px; min-width: 0; }
.srv-role { font-size: 12.5px; color: var(--text-3); }

/* AI connections: one card per connection, with the actions in a small menu. */
.conn-card { flex-direction: column; align-items: stretch; gap: 14px; }
.conn-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.conn-menu { margin-left: auto; }
.conn-menu > summary { display: inline-grid; place-items: center; cursor: pointer; }
.conn-menu .menu-panel { min-width: 190px; }
.conn-edit { display: grid; gap: 12px; }
.conn-row { display: grid; grid-template-columns: 180px minmax(0, 1fr); align-items: center; gap: 6px 16px; }
.conn-label { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.conn-types { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.conn-model { display: flex; flex-wrap: wrap; gap: 8px; max-width: 480px; }
.conn-model select, .conn-model .input { flex: 1 1 220px; min-width: 0; }
.conn-notes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding-top: 4px; border-top: 1px solid var(--line); }
.conn-notes .hint { margin: 0; }
.conn-checking { border-color: var(--accent-line); }
@media (max-width: 640px) { .conn-row { grid-template-columns: minmax(0, 1fr); } }

/* How the bot answers: one line per type. */
.route-block { display: grid; gap: 6px; padding: 12px 0; border-top: 1px solid var(--line); }
.route-block:first-child { border-top: 0; padding-top: 0; }
.route-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.route-line > b { min-width: 76px; }
.route-chain { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.route-arrow { color: var(--text-3); }
.route-hint { margin: 0; }
.route-order summary { cursor: pointer; color: var(--text-3); font-size: 13px; }
.route-items { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; max-width: 420px; }
.route-items li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2); }
.route-moves { display: inline-flex; gap: 6px; }

/* Changing what a connection is used for is rare, so it sits under a small link. */
.conn-types-edit > summary { cursor: pointer; list-style: none; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; color: var(--text-3); }
.conn-types-edit .chip { white-space: nowrap; }
.conn-types-edit > summary::-webkit-details-marker { display: none; }
.conn-types-edit > summary:hover { color: var(--text-2); }
.conn-types-edit[open] > summary { margin-bottom: 8px; }

/* The state of a connection next to its name. */
.chip-status.chip-ok { color: var(--ok); background: var(--ok-soft); }
.chip-status.chip-warn { color: var(--warn); background: var(--warn-soft); }
.chip-status.chip-error { color: var(--danger); background: var(--danger-soft); }

/* Message Builder ------------------------------------------------------------------- */
.nb-view, .nb-editor { display: grid; gap: 16px; min-width: 0; }
.nb-head-row { align-items: center; flex-wrap: wrap; }
.nb-count { margin: 0; }
.nb-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(150px, 220px); gap: 10px; align-items: center; }
.nb-seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; }
.nb-seg-item { height: 30px; padding: 0 14px; border: 0; border-radius: 8px; background: none; color: var(--text-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.nb-seg-item:hover:not(:disabled) { color: var(--text); }
.nb-seg-item.is-on { background: var(--panel-3); color: var(--text); }
.nb-seg-item:disabled { cursor: not-allowed; opacity: 0.55; }
.nb-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.nb-card { display: grid; gap: 10px; padding: 14px 16px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; }
.nb-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.nb-card-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.nb-card-meta { display: grid; gap: 2px; font-size: 12.5px; color: var(--text-3); }
.nb-sent { color: var(--ok); text-decoration: none; overflow-wrap: anywhere; }
.nb-sent.is-none { color: var(--text-3); }
a.nb-sent:hover { text-decoration: underline; }
.nb-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.nb-badge { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; background: var(--panel-3); color: var(--text-2); font-size: 11.5px; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap; }
.nb-badge.is-accent { background: var(--accent-soft); color: var(--accent); }
.nb-empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 6px; padding: 36px 16px; text-align: center; border: 1px dashed var(--line-2); border-radius: var(--r); color: var(--text-3); }
.nb-empty .i { width: 28px; height: 28px; color: var(--text-2); }
.nb-empty b { color: var(--text); }
.nb-options { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
.nb-option { display: grid; gap: 10px; align-content: start; padding: 18px; text-align: left; font: inherit; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; transition: border-color 0.15s ease, background-color 0.15s ease; }
.nb-option:hover { border-color: var(--accent-line); background: var(--panel-3); }
.nb-option-top { display: flex; align-items: center; justify-content: space-between; color: var(--accent); }
.nb-option-top .i { width: 22px; height: 22px; }
.nb-option-title { font-size: 16px; }
.nb-option-lead { color: var(--text-2); font-size: 13.5px; line-height: 1.5; }
.nb-features { display: grid; gap: 6px; margin: 6px 0 0; padding: 12px 0 0; list-style: none; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.nb-features li { display: flex; align-items: center; gap: 8px; }
.nb-features .i { width: 14px; height: 14px; color: var(--ok); flex: none; }

.nb-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.nb-bar-title { min-width: 0; flex: 1 1 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-bar-state { font-size: 12.5px; color: var(--text-3); }
.nb-alerts:empty { display: none; }
.nb-alerts { margin: 0; }
.nb-alerts:not(:empty) { background: var(--bg); border-radius: var(--r); box-shadow: 0 0 0 6px var(--bg); }
.nb-send-status { margin: 0; font-size: 13px; line-height: 1.45; color: var(--text-3); }
.nb-send-status:empty { display: none; }
.nb-send-status.is-error { color: var(--danger); }
.nb-send-status.is-ok { color: var(--ok); }
.nb-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: 16px; align-items: start; }
.nb-main-col, .nb-side-col { display: grid; gap: 16px; min-width: 0; }
.nb-side-col { position: sticky; top: 72px; align-self: start; max-height: calc(100vh - 88px); overflow: auto; }
.nb-block-body { gap: 12px; }
.nb-send-body { gap: 10px; }
.nb-send-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.nb-link-out { color: var(--accent); }
.nb-field-row { gap: 6px; }
.nb-input { display: grid; gap: 6px; min-width: 0; }
.nb-input textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.5; font-family: inherit; }
.nb-counter { justify-self: end; font-size: 12px; color: var(--text-3); }
.nb-counter.is-over { color: var(--danger); }
.nb-check { padding: 2px 0; }
.nb-color-row { display: flex; align-items: center; gap: 10px; }
.nb-color.is-unset { opacity: 0.4; }
.nb-color-state { margin: 0; }
.nb-color { width: 44px; height: 32px; padding: 2px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel-2); cursor: pointer; }
.nb-block { display: grid; gap: 0; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; }
.nb-block-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px 8px 12px; }
.nb-toggle { display: inline-flex; align-items: center; gap: 8px; min-width: 0; padding: 4px 0; border: 0; background: none; color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.nb-toggle b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-toggle .i { width: 16px; height: 16px; flex: none; transition: transform 0.15s ease; }
.nb-toggle[aria-expanded="false"] .i { transform: rotate(-90deg); }
.nb-block-tools { display: flex; gap: 4px; justify-content: flex-end; }
.nb-mini { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel-2); color: var(--text-2); cursor: pointer; }
.nb-mini:hover { color: var(--text); border-color: var(--line-2); }
.nb-mini .i { width: 14px; height: 14px; }
.nb-mini.is-up .i { transform: rotate(90deg); }
.nb-mini.is-down .i { transform: rotate(90deg); }
.nb-mini.is-danger:hover { color: var(--danger); border-color: rgba(245, 155, 155, 0.4); }
.nb-block-inner { display: grid; gap: 12px; padding: 4px 12px 14px; min-width: 0; }
.nb-group { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel); }
.nb-subblock { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel); position: relative; }
.nb-subblock > .nb-block-tools { justify-content: flex-end; }
.nb-button-edit { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: start; }
.nb-button-edit > .nb-mini { margin-top: 28px; }
.nb-image { display: flex; gap: 12px; align-items: flex-start; }
.nb-image-thumb { flex: none; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; border: 1px dashed var(--line-2); background: var(--panel-2); display: grid; place-items: center; color: var(--text-3); }
.nb-image-thumb img { width: 100%; height: 100%; object-fit: cover; }
.nb-image-thumb .i { width: 22px; height: 22px; }
.nb-image-controls { display: grid; gap: 8px; min-width: 0; flex: 1; }
.nb-image-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.nb-image-error { margin: 0; font-size: 12.5px; color: var(--text-3); }
.nb-image-error.is-error { color: var(--danger); }
.nb-image-error[hidden], .nb-image-url[hidden] { display: none; }
.nb-meters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.nb-meter-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.nb-meter-top b { color: var(--text-2); font-weight: 600; }
.nb-meter-bar { height: 6px; border-radius: 99px; background: var(--panel-3); overflow: hidden; }
.nb-meter-bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.nb-meter.is-over .nb-meter-bar i { background: var(--danger); }
.nb-meter.is-over .nb-meter-top b { color: var(--danger); }
.nb-add { justify-self: start; }
.nb-add .ann-pop-panel { right: auto; left: 0; }
.nb-add > summary { width: auto; padding: 0 14px; list-style: none; cursor: pointer; }
.nb-add > summary::-webkit-details-marker { display: none; }
.nb-tools { justify-content: flex-start; }
.nb-tools .ann-pop > summary { width: auto; padding: 0 12px; }

/* The preview imitates Discord's dark theme so the owner sees roughly what will be posted. */
.nb-preview { --nb-bg: #313338; --nb-text: #dbdee1; --nb-muted: #949ba4; --nb-embed: #2b2d31; --nb-link: #00a8fc; --nb-button: #4e5058;
  padding: 14px; background: var(--nb-bg); border-radius: 10px; color: var(--nb-text); font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; min-width: 0; }
.nb-preview .hint { color: var(--nb-muted); }
.nb-message { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; }
.nb-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.nb-main { min-width: 0; }
.nb-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 2px; }
.nb-name { font-weight: 600; color: #fff; }
.nb-app { padding: 0 5px; border-radius: 4px; background: #5865f2; color: #fff; font-size: 10px; font-weight: 700; line-height: 15px; letter-spacing: 0.02em; }
.nb-time { font-size: 12px; color: var(--nb-muted); }
.nb-body { display: grid; gap: 6px; min-width: 0; }
.nb-line, .nb-text > .nb-line { white-space: pre-wrap; min-height: 1.4em; }
.nb-mention { padding: 0 2px; border-radius: 3px; background: rgba(88, 101, 242, 0.3); color: #c9cdfb; font-weight: 500; }
.nb-mention.is-role { background: rgba(148, 155, 164, 0.2); color: #dbdee1; }
.nb-link { color: var(--nb-link); text-decoration: none; }
.nb-link:hover { text-decoration: underline; }
.nb-code { padding: 0 4px; border-radius: 4px; background: #1e1f22; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 0.875em; }
.nb-pre { margin: 4px 0; padding: 8px 10px; border: 1px solid #1e1f22; border-radius: 6px; background: #2b2d31; overflow: auto; font-size: 13px; }
.nb-pre code { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; white-space: pre; }
.nb-quote { margin: 2px 0; padding: 0 0 0 10px; border-left: 4px solid #4e5058; }
.nb-h1 { font-size: 1.5em; font-weight: 700; margin: 6px 0 2px; }
.nb-h2 { font-size: 1.25em; font-weight: 700; margin: 6px 0 2px; }
.nb-h3 { font-size: 1.1em; font-weight: 700; margin: 4px 0 2px; }
.nb-small { font-size: 12px; color: var(--nb-muted); }
.nb-list { margin: 2px 0; padding-left: 22px; }
.nb-spoiler { background: #1e1f22; color: transparent; border-radius: 3px; cursor: pointer; }
.nb-spoiler.is-open { background: rgba(255, 255, 255, 0.1); color: inherit; }
.nb-embed { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; max-width: 432px; padding: 8px 16px 16px 12px; background: var(--nb-embed); border-left: 4px solid var(--nb-embed-color, #1e1f22); border-radius: 4px; }
.nb-embed-main { display: grid; gap: 6px; min-width: 0; padding-top: 8px; }
.nb-embed-author, .nb-embed-footer { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.nb-embed-footer { font-size: 12px; font-weight: 400; color: var(--nb-muted); }
.nb-embed-icon { width: 20px; height: 20px; border-radius: 50%; }
.nb-embed-title { font-size: 16px; font-weight: 700; color: #fff; }
.nb-embed-title.is-link { color: var(--nb-link); }
.nb-embed-desc { font-size: 14px; }
.nb-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.nb-field { grid-column: 1 / -1; min-width: 0; }
.nb-field.is-inline { grid-column: auto; }
.nb-field-name { font-size: 14px; font-weight: 700; color: #fff; }
.nb-field-value { font-size: 14px; }
.nb-embed-thumb { grid-column: 2; grid-row: 1; width: 80px; height: 80px; margin-top: 8px; }
.nb-picture { overflow: hidden; border-radius: 6px; background: #1e1f22; min-width: 0; }
.nb-picture img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nb-picture.is-empty { min-height: 60px; }
.nb-picture.is-external { display: grid; place-items: center; min-height: 60px; padding: 8px; }
.nb-picture-note { font-size: 11.5px; line-height: 1.35; color: var(--nb-muted); text-align: center; }
.nb-embed-image { margin-top: 4px; max-height: 300px; }
.nb-embed-image img { height: auto; max-height: 300px; }
.nb-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.nb-button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 3px; background: var(--nb-button); color: #fff; font-size: 14px; font-weight: 500; text-decoration: none; }
.nb-button:hover { background: #6d6f78; }
.nb-ticket-settings { grid-column: 1 / -1; display: grid; gap: 12px; }
.nb-button-primary { background: #5865f2; }
.nb-button-secondary { background: #4e5058; }
.nb-button-success { background: #248046; }
.nb-button-danger { background: #da373c; }
.nb-button-icon { width: 14px; height: 14px; }
.nb-cv2 { gap: 8px; }
.nb-container { display: grid; gap: 8px; padding: 12px 14px; background: var(--nb-embed); border-left: 4px solid var(--nb-accent, #4f545c); border-radius: 8px; max-width: 520px; min-width: 0; }
.nb-container.is-spoiler { filter: blur(0); outline: 1px dashed var(--nb-muted); }
.nb-section { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.nb-section-thumb { width: 80px; height: 80px; }
.nb-sep { padding: 4px 0; }
.nb-sep.is-large { padding: 10px 0; }
.nb-sep hr { margin: 0; border: 0; border-top: 1px solid #4e5058; }
.nb-gallery { display: grid; gap: 4px; border-radius: 8px; overflow: hidden; }
.nb-gallery-1 { grid-template-columns: 1fr; }
.nb-gallery-2, .nb-gallery-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nb-gallery-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.nb-gallery-item { aspect-ratio: 16 / 10; border-radius: 0; }
.nb-gallery-1 .nb-gallery-item { aspect-ratio: auto; max-height: 320px; }
.nb-gallery-item.is-spoiler img { filter: blur(14px); }

@media (max-width: 960px) {
  .nb-button-edit { grid-template-columns: minmax(0, 1fr) auto; }
  .nb-button-edit > .nb-mini { grid-column: 2; grid-row: 1; margin-top: 0; justify-self: end; }
  .nb-cols { grid-template-columns: minmax(0, 1fr); }
  .nb-side-col { position: static; max-height: none; overflow: visible; }
  .nb-options { grid-template-columns: minmax(0, 1fr); }
  .nb-toolbar { grid-template-columns: minmax(0, 1fr); }
  .nb-meters { grid-template-columns: minmax(0, 1fr); }
}


/* Picture card: the fonts the bot draws it with (the same files), and the editor controls. */
@font-face { font-family: "NekoriCard-inter"; src: url("/assets/fonts/card/Inter.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "NekoriCard-montserrat"; src: url("/assets/fonts/card/Montserrat.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "NekoriCard-nunito"; src: url("/assets/fonts/card/Nunito.ttf") format("truetype"); font-weight: 200 1000; font-display: swap; }
@font-face { font-family: "NekoriCard-opensans"; src: url("/assets/fonts/card/OpenSans.ttf") format("truetype"); font-weight: 300 800; font-display: swap; }
/* One narrow column, like the editor the owner compared it with: the preview sits right under the style. */
.ann-preview.is-banner { padding: 18px; background: var(--panel-2); border-color: transparent; }
.ann-preview.is-banner .ann-preview-avatar, .ann-preview.is-banner .ann-preview-name { display: none; }
.ann-preview.is-banner .ann-preview-message { display: block; }
.ann-group-inner { display: grid; gap: 8px; }
.ann-card-options > .ann-group-inner { margin-top: 14px; }
.ann-group-inner[hidden], [data-ann-banner-only][hidden], [data-ann-embed-only][hidden] { display: none; }
.ann-banner-options { gap: 18px; }
.ann-preview-banner { display: block; width: 100%; height: auto; border-radius: 10px; margin-top: 4px; background: #09090b; }
.ann-preview-banner[hidden] { display: none; }
.ann-swatches { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ann-swatch { position: relative; width: 32px; height: 32px; padding: 0; border-radius: 50%; border: 2px solid transparent; background: var(--swatch, #fff); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18); cursor: pointer; display: grid; place-items: center; }
.ann-swatch:hover { transform: scale(1.06); }
.ann-swatch.is-on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ann-swatch-custom { background: var(--panel-3); color: var(--text-2); overflow: hidden; }
.ann-swatch-custom .i { width: 15px; height: 15px; pointer-events: none; }
.ann-swatch-custom input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.ann-range { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; font-size: 12.5px; color: var(--text-3); }
.ann-range b { color: var(--text-2); font-weight: 600; }
.ann-range input[type="range"] { grid-column: 1 / -1; width: 100%; accent-color: var(--accent); }

/* Premium button in the top bars and the premium page. */
.btn-premium { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.btn-premium:hover:not(:disabled) { background: rgba(244, 180, 200, 0.22); }
.btn-premium .i { width: 16px; height: 16px; }
.prem { padding: 40px 0 64px; }
.prem-wide { max-width: 1040px; }
.prem-h1 { margin: 0 0 8px; text-align: center; font-family: var(--font-display); font-size: 34px; }
.prem-lead { margin: 0 auto 8px; max-width: 560px; text-align: center; color: var(--text-3); }
.prem-wallet { margin: 0 0 8px; text-align: center; color: var(--text-2); font-size: 14px; }

/* Tabs without scripts: three radios, the label of the chosen one is lit and the other group is hidden. */
.prem-radio { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.prem-tabs { display: flex; width: fit-content; max-width: 100%; margin: 22px auto 8px; padding: 4px; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; }
.prem-tabs label { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 9px; color: var(--text-3); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; }
.prem-tabs label:hover { color: var(--text); }
.prem-tabs .i { width: 16px; height: 16px; }
.prem-shell:has(#pt-all:checked) label[for="pt-all"],
.prem-shell:has(#pt-personal:checked) label[for="pt-personal"],
.prem-shell:has(#pt-server:checked) label[for="pt-server"] { background: var(--panel-3); color: var(--text); }
.prem-shell:has(.prem-radio:focus-visible) .prem-tabs { box-shadow: 0 0 0 3px var(--accent-soft); border-color: var(--accent-line); }
.prem-shell:has(#pt-personal:checked) [data-kind="server"],
.prem-shell:has(#pt-server:checked) [data-kind="personal"] { display: none; }

.prem-group { display: flex; flex-direction: column; margin-top: 30px; }
.prem-group-title { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; font-size: 20px; }
.prem-group-title .i { width: 22px; height: 22px; color: var(--accent); }
.prem-group-lead { margin: 0 0 16px; min-height: 44px; color: var(--text-3); font-size: 14px; }
.prem-groups { display: grid; align-items: stretch; grid-template-columns: repeat(auto-fit, minmax(300px, 360px)); gap: 20px 28px; justify-content: center; }
.plans { display: grid; flex: 1; }
.plan { height: 100%; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.plan:hover { border-color: var(--line-2); }
.plan-art { position: relative; display: grid; place-items: center; height: 116px; background: linear-gradient(135deg, #3a2a44, #232331); overflow: hidden; }
.plan-art-personal { height: auto; min-height: 172px; padding: 14px 14px 44px; }
.plan-art-personal img { display: block; width: 100%; height: auto; border-radius: 12px; }
.plan-art-server { height: 172px; background: linear-gradient(135deg, #243a4a, #2a2438); }
.plan-mascot { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid var(--accent-line); }
.plan-badge { position: absolute; left: 14px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(33, 33, 40, 0.86); color: var(--text-2); font-size: 12px; font-weight: 700; }
.plan-badge .i { width: 13px; height: 13px; }
.plan-body { display: flex; flex: 1; flex-direction: column; padding: 18px 18px 18px; }
.plan-name { margin: 0 0 4px; font-size: 17px; }
.plan-sub { margin: 0 0 14px; color: var(--text-3); font-size: 13px; }
.plan-perks { display: grid; gap: 10px; margin: 0 0 18px; padding: 0; list-style: none; }
.plan-perks li { display: grid; grid-template-columns: 16px 1fr; gap: 10px; color: var(--text-2); font-size: 14px; line-height: 1.4; }
.plan-perks .i { width: 16px; height: 16px; margin-top: 2px; color: var(--ok); }
.plan-perks b { color: var(--text); }
.plan-foot { margin-top: auto; display: grid; gap: 8px; }
.plan-foot form { display: grid; gap: 8px; }
.plan-buy { width: 100%; justify-content: center; font-weight: 700; }
.plan-field { color: var(--text-3); font-size: 12px; font-weight: 600; }
.plan-status { margin: 0; color: var(--text-2); font-size: 13px; text-align: center; }
.plan-note { margin: 0; color: var(--text-3); font-size: 12px; text-align: center; }
.prem-examples { margin-top: 40px; }
.prem-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-top: 12px; }
.prem-cards img { width: 100%; height: auto; border-radius: 14px; }
.prem-shell:has(#pt-server:checked) ~ .prem-examples { display: none; }

/* Giveaways tab */
.giveaway-form { display: grid; gap: 16px; }
.giveaway-heading { margin: 0; font-size: 15px; font-weight: 600; }
.giveaway-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.giveaway-row { display: grid; gap: 8px; padding: 14px 0; border-top: 1px solid var(--border, rgba(255,255,255,.08)); }
.giveaway-row:first-of-type { border-top: 0; padding-top: 0; }
.giveaway-main { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.giveaway-prize { font-weight: 600; overflow-wrap: anywhere; }
.giveaway-meta { margin: 0; }
.giveaway-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.giveaway-buttons form { margin: 0; }

/* Ideas & questions tab */
.fb-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.fb-form { display: grid; gap: 16px; }
.fb-form > .card { box-shadow: none; background: var(--panel-2); border-color: var(--line); }
.fb-save { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.fb-list { display: grid; gap: 10px; }
.fb-dept { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel-2); }
.fb-dept > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.fb-dept > summary::-webkit-details-marker { display: none; }
.fb-dept > summary:hover { background: var(--panel-3); border-radius: var(--r-sm); }
.fb-dept > summary .i { width: 16px; height: 16px; flex: none; color: var(--text-3); transition: transform 0.15s; }
.fb-dept[open] > summary .i { transform: rotate(180deg); }
.fb-dept-icon { flex: none; width: 32px; text-align: center; font-size: 20px; line-height: 1; }
.fb-dept-title { display: grid; gap: 2px; min-width: 0; flex: 1; }
.fb-dept-title b { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.fb-dept-title small { font-size: 13px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-dept-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.fb-dept-new > summary b { color: var(--accent); }
.fb-dept-body { display: grid; gap: 16px; padding: 16px 14px 14px; border-top: 1px solid var(--line); }
.fb-fields { grid-template-columns: 110px 1fr; }
.fb-emoji .input { text-align: center; }
.fb-ban { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.fb-ban:first-of-type { border-top: 0; padding-top: 0; }
.fb-ban-main { display: grid; gap: 2px; min-width: 0; flex: 1; }
.fb-ban form { margin: 0; }
@media (max-width: 640px) {
  .fb-fields { grid-template-columns: 1fr; }
  .fb-dept-badges { display: none; }
}
#tab-feedback > .tab-card + .tab-card, #tab-giveaways > .tab-card + .tab-card { margin-top: 16px; }
