/* Omni website. Sizes follow the "Omni website + dashboard" mockup (1440px home board and
   390px phone board). Colors follow the mascot palette in the bot's src/utils/canvasKit.ts.
   No inline styles anywhere (the CSP forbids them): colors come from classes. */

@font-face { font-family: 'Figtree'; src: url('../fonts/Figtree-Variable.ttf') format('truetype'); font-weight: 300 900; font-display: swap; }
@font-face { font-family: 'Fredoka'; src: url('../fonts/Fredoka-500.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Fredoka'; src: url('../fonts/Fredoka-600.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Fredoka'; src: url('../fonts/Fredoka-700.ttf') format('truetype'); font-weight: 700; font-display: swap; }

:root {
  --bg: #1C1D24;
  --bg-deep: #16171C;
  --panel: #262832;
  --panel-raised: #2B2D36;
  --line: #2A2C36;
  --chip: #30323D;
  --chip-hover: #3A3D4A;
  --text: #F2F0EA;
  --text-soft: #D6D7DE;
  --text-muted: #B9BBC6;
  --text-faint: #A9ABB8;
  --sun: #FFD23F;
  --sun-hover: #FFDD66;
  --ink: #2B1B2E;
  --cream: #FFF8EC;
  --cream-deep: #F5E8D2;
  --ink-soft: #76606F;
  --pink: #F2466B;
  --blue: #3A86FF;
  --teal: #2EC4B6;
  --violet: #8338EC;
  --orange: #FF6B35;
  --gold: #FFC53D;
  --red: #D62839;
  --placeholder: #7FB2FF;
  --blurple: #5865F2;
  --shadow: 0 24px 60px #0B0C1066;

  --display: 'Fredoka', 'Figtree', system-ui, sans-serif;
  --body: 'Figtree', system-ui, sans-serif;
  --gutter: 80px;
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* The mockup uses the browser's default line height; text blocks set their own. */
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); -webkit-font-smoothing: antialiased; }

img, svg { display: block; max-width: 100%; }
a { color: var(--sun); text-decoration: none; }
a:hover { color: #FFE27A; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 6px; }
button { font: inherit; color: inherit; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 700; }
h2 { font-size: 44px; line-height: 1.1; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.ph { color: var(--placeholder); }
.wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); }
.lead { margin: 0; font-size: 18px; line-height: 1.6; color: var(--text-muted); }
.stack { display: flex; flex-direction: column; gap: 24px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 30;
  background: var(--sun); color: var(--ink); padding: 10px 16px; border-radius: 10px; font-weight: 600;
}
.skip:focus { top: 12px; color: var(--ink); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 24px; border-radius: 12px; border: 0;
  font-weight: 600; font-size: 17px; white-space: nowrap; cursor: pointer;
  transition: background-color .15s ease;
}
.btn-sm { height: 44px; font-size: 15px; }
.btn-primary { background: var(--sun); color: var(--ink); }
.btn-primary:hover { background: var(--sun-hover); color: var(--ink); }
.btn-secondary { background: var(--chip); color: var(--text); }
.btn-secondary:hover { background: var(--chip-hover); color: var(--text); }
.btn-ink { background: var(--ink); color: var(--cream); }
.btn-ink:hover { background: #3D2A41; color: var(--cream); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Shared bits */
.panel { background: var(--panel); border: 1px solid #33364259; border-radius: var(--radius); }
.field {
  background: var(--bg-deep); border-radius: 12px; height: 44px;
  display: flex; align-items: center; gap: 10px; padding: 0 16px; font-size: 15px; color: var(--text);
}
.field-tall { height: auto; min-height: 68px; padding: 12px 16px; line-height: 1.5; }
.field-text { height: auto; padding: 12px 16px; line-height: 1.5; }
.field-select { justify-content: space-between; }
.label { display: block; font-size: 13px; color: var(--text-faint); margin-bottom: 8px; }
.chip {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; padding: 0 12px;
  border-radius: 999px; background: var(--chip); color: var(--text); font-size: 13px; font-weight: 500; white-space: nowrap;
}
.chip b { color: var(--sun); }
.chip.on { background: var(--sun); color: var(--ink); }
.chip-dashed { height: 32px; background: transparent; border: 1px dashed #4A4D5C; color: var(--text-faint); }
.chip-sun { background: #FFD23F26; color: var(--sun); }
.chip-blue { background: #3A86FF26; color: #9CC2FF; }
.chip-teal { background: #2EC4B626; color: #7FE0D6; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.center { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand img { width: 40px; height: 40px; border-radius: 12px; }
.brand span { font-family: var(--display); font-size: 24px; font-weight: 700; }
.site-nav { display: flex; gap: 36px; font-size: 15px; font-weight: 500; }
.site-nav a { color: var(--text-soft); }
.site-nav a:hover { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 12px; }

/* Phone menu: a <details> element, so it works without JavaScript. */
.mobile-menu { display: none; }
.mobile-menu summary {
  list-style: none; width: 44px; height: 44px; border-radius: 12px; background: var(--panel); color: var(--text);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu-panel {
  position: absolute; left: 16px; right: 16px; top: 64px; z-index: 20;
  display: flex; flex-direction: column; gap: 4px; padding: 12px;
  background: var(--panel); border: 1px solid #33364259; border-radius: var(--radius); box-shadow: var(--shadow);
}
.mobile-menu-panel > a:not(.btn) { color: var(--text-soft); font-size: 16px; font-weight: 500; padding: 12px; border-radius: 10px; }
.mobile-menu-panel > a:not(.btn):hover { background: var(--chip); color: var(--text); }
.mobile-menu-panel .btn { margin-top: 8px; }

/* Palette classes: accents, card backgrounds, frames, rarities */
.accent-pink { --accent: var(--pink); }
.accent-blue { --accent: var(--blue); }
.accent-teal { --accent: var(--teal); }
.accent-violet { --accent: var(--violet); }
.accent-orange { --accent: var(--orange); }
.accent-gold { --accent: var(--gold); }

.bd-sun { --card-bg: var(--sun); --dot-a: var(--teal); --dot-b: var(--violet); }
.bd-night { --card-bg: #2B2D5C; --dot-a: var(--sun); --dot-b: var(--placeholder); }
.bd-sea { --card-bg: #1E6F8C; --dot-a: var(--cream); --dot-b: var(--teal); }
.bd-candy { --card-bg: var(--pink); --dot-a: var(--sun); --dot-b: var(--cream); }
.bd-lake { --card-bg: #1E6F8C; --dot-a: var(--cream); --dot-b: var(--teal); }
.bd-ice { --card-bg: #9FD3E8; --dot-a: var(--cream); --dot-b: var(--blue); }
.bd-aurora { --card-bg: #123B4A; --dot-a: var(--teal); --dot-b: var(--violet); }
.bd-koi { --card-bg: #2F7A5A; --dot-a: var(--orange); --dot-b: var(--cream); }

/* Frames are 5px + 3px rings on a 680px card. */
.frame-none { --frame: none; }
.frame-gold { --frame: 0 0 0 .735cqw var(--gold), 0 0 0 1.176cqw var(--ink); }
.frame-ice { --frame: 0 0 0 .735cqw #BFE9FF, 0 0 0 1.176cqw var(--ink); }
.frame-neon { --frame: 0 0 0 .735cqw #39FF88, 0 0 0 1.176cqw var(--ink), 0 0 2.4cqw #39FF88; }

.rarity-common { --rarity: #A9BCCB; --rarity-fg: var(--ink); }
.rarity-uncommon { --rarity: var(--teal); --rarity-fg: var(--ink); }
.rarity-rare { --rarity: var(--blue); --rarity-fg: #fff; }
.rarity-epic { --rarity: var(--violet); --rarity-fg: #fff; }
.rarity-legendary { --rarity: var(--gold); --rarity-fg: var(--ink); }

/* Discord message */
.discord-msg { display: flex; gap: 14px; }
.discord-msg > img, .welcome-msg > img { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; }
.discord-msg .body, .welcome-msg .body { display: flex; flex-direction: column; gap: 10px; min-width: 0; flex-grow: 1; }
.discord-meta { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.discord-meta b { font-weight: 600; }
.app-tag { background: var(--blurple); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 4px; }
.discord-meta .time { font-size: 12px; color: var(--text-faint); }
.discord-text { font-size: 15px; color: #DCDDE3; overflow-wrap: anywhere; }
.mention { background: #3C4270; color: #C9CDFB; border-radius: 4px; padding: 0 3px; }

/* Cards as the bot draws them. Every size is in container units (1cqw = 1% of the card's
   width), taken from the mockup's px sizes, so a card scales as one piece. */
.card {
  container-type: inline-size;
  position: relative; overflow: hidden; width: 100%; background: var(--card-bg, var(--sun));
}
.card .deco { position: absolute; border-radius: 999px; }
.card .inner {
  position: absolute; display: flex; align-items: center; color: var(--ink);
  background: var(--cream); border-style: solid; border-color: var(--ink);
}
.card .avatar { flex-shrink: 0; border-radius: 50%; border-style: solid; border-color: var(--ink); background: var(--accent, var(--pink)); box-shadow: var(--frame, none); }
.card .info { display: flex; flex-direction: column; flex-grow: 1; min-width: 0; }
.card .row { display: flex; justify-content: space-between; align-items: baseline; }
.card .name { font-family: var(--display); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .lvl { font-family: var(--display); font-weight: 600; white-space: nowrap; }
.card .bar { border-radius: 999px; border-style: solid; border-color: var(--ink); background: var(--cream-deep); overflow: hidden; }
.card .bar span { display: block; height: 100%; width: 64%; background: var(--accent, var(--pink)); }
.card .sub { display: flex; justify-content: space-between; font-weight: 600; color: var(--ink-soft); }

/* Rank card: 680×240 */
.card-rank { aspect-ratio: 680 / 240; border-radius: 2.941cqw; }
.card-rank .inner { inset: 4.118cqw; border-width: .442cqw; border-radius: 2.353cqw; box-shadow: .882cqw .882cqw 0 var(--ink); gap: 3.529cqw; padding: 0 4.118cqw; }
.card-rank .avatar { width: 17.94cqw; height: 17.94cqw; border-width: .442cqw; }
.card-rank .info { gap: 1.765cqw; }
.card-rank .row { gap: 1.765cqw; }
.card-rank .name { font-size: 4.412cqw; }
.card-rank .lvl { font-size: 3.235cqw; }
.card-rank .bar { height: 4.118cqw; border-width: .442cqw; }
.card-rank .sub { font-size: 2.206cqw; }
.card-rank .deco-1 { left: 5cqw; top: 3.235cqw; width: 2.353cqw; height: 2.353cqw; background: var(--dot-a); }
.card-rank .deco-2 { right: 8.824cqw; top: 2.941cqw; width: 5.588cqw; height: 1.765cqw; background: var(--dot-b); transform: rotate(28deg); }
.card-rank .deco-3 { right: 3.824cqw; bottom: 4.412cqw; width: 2.059cqw; height: 2.059cqw; background: var(--dot-a); }
.card-rank .deco-4 { left: 8.824cqw; bottom: 2.353cqw; width: 4.412cqw; height: 1.471cqw; background: var(--dot-b); transform: rotate(-18deg); }

/* Welcome card: 680×300 */
.card-welcome { aspect-ratio: 680 / 300; border-radius: 2.941cqw; }
.card-welcome .inner { inset: 5.882cqw; border-width: .442cqw; border-radius: 2.353cqw; box-shadow: .882cqw .882cqw 0 var(--ink); flex-direction: column; justify-content: center; gap: 1.471cqw; text-align: center; }
.card-welcome .avatar { width: 15cqw; height: 15cqw; border-width: .442cqw; }
.card-welcome .title { font-family: var(--display); font-size: 4.118cqw; font-weight: 700; }
.card-welcome .sub { font-size: 2.206cqw; }
.card-welcome .deco-1 { left: 5.882cqw; top: 4.412cqw; width: 2.353cqw; height: 2.353cqw; background: var(--dot-a); }
.card-welcome .deco-2 { right: 10.294cqw; top: 5.294cqw; width: 5.588cqw; height: 1.765cqw; background: var(--dot-b); transform: rotate(-24deg); }
.card-welcome .deco-3 { left: 13.235cqw; bottom: 4.412cqw; width: 5cqw; height: 1.618cqw; background: var(--dot-b); transform: rotate(18deg); }

/* Fishing card: 680×300, the record stamp may stick out */
.card-fish { aspect-ratio: 680 / 300; border-radius: 2.941cqw; overflow: visible; }
.card-fish .inner { inset: 5.294cqw; border-width: .442cqw; border-radius: 2.353cqw; box-shadow: .882cqw .882cqw 0 var(--ink); gap: 3.824cqw; padding: 0 4.412cqw; }
.card-fish .fish-box {
  flex-shrink: 0; width: 22.94cqw; height: 22.94cqw; border-radius: 2.941cqw;
  border: .442cqw solid var(--ink); background: #DDF1F7; box-shadow: var(--frame, none);
  display: grid; place-items: center;
}
.card-fish .fish-box svg { width: 66.7%; height: 66.7%; }
.fish-body { fill: var(--rarity); }
.card-fish .info { gap: 1.471cqw; }
.card-fish .tags { display: flex; align-items: center; gap: 1.471cqw; flex-wrap: wrap; }
.card-fish .rarity { font-size: 1.765cqw; font-weight: 700; border-radius: 999px; padding: .442cqw 1.471cqw; background: var(--rarity); color: var(--rarity-fg); }
.card-fish .where { font-size: 1.912cqw; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; }
.card-fish .fish-name { font-family: var(--display); font-size: 5cqw; font-weight: 700; }
.card-fish .stats { display: flex; gap: 4.118cqw; }
.card-fish .stats b { display: block; font-family: var(--display); font-size: 3.824cqw; font-weight: 700; }
.card-fish .stats span { display: block; font-size: 1.912cqw; font-weight: 600; color: var(--ink-soft); }
.card-fish .owner { font-size: 2.059cqw; font-weight: 600; color: var(--ink-soft); }
.card-fish .deco-1 { left: 5.294cqw; top: 3.824cqw; width: 2.353cqw; height: 2.353cqw; background: var(--dot-a); }
.card-fish .deco-2 { right: 8.824cqw; bottom: 3.235cqw; width: 5.588cqw; height: 1.765cqw; background: var(--dot-b); transform: rotate(-20deg); }
.record-stamp {
  position: absolute; right: 8.235cqw; top: 2.647cqw; transform: rotate(6deg);
  background: var(--gold); color: var(--ink); border: .442cqw solid var(--ink); border-radius: 1.471cqw;
  padding: .882cqw 1.765cqw; font-family: var(--display); font-size: 2.206cqw; font-weight: 700;
}

/* Hero level-up card: 520×176 */
.card-hero { aspect-ratio: 520 / 176; border-radius: 3.077cqw; }
.card-hero .inner { inset: 3.846cqw; border-width: .577cqw; border-radius: 2.692cqw; box-shadow: .962cqw .962cqw 0 var(--ink); gap: 3.462cqw; padding: 0 3.846cqw; }
.card-hero .avatar { width: 17.31cqw; height: 17.31cqw; border-width: .577cqw; }
.card-hero .info { gap: 1.538cqw; }
.card-hero .name { font-size: 4.231cqw; }
.card-hero .lvl { font-size: 3.462cqw; }
.card-hero .bar { height: 4.231cqw; border-width: .577cqw; }
.card-hero .sub { font-size: 2.5cqw; }
.card-hero .deco-1 { left: 4.231cqw; top: 3.462cqw; width: 2.308cqw; height: 2.308cqw; background: var(--teal); }
.card-hero .deco-2 { right: 7.692cqw; top: 2.692cqw; width: 5.385cqw; height: 1.731cqw; background: var(--violet); transform: rotate(28deg); }
.card-hero .deco-3 { right: 3.462cqw; bottom: 5cqw; width: 1.923cqw; height: 1.923cqw; background: var(--blue); }

/* Hero */
.hero { min-height: 720px; padding: 88px 0 0; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 64px; align-items: start; }
.hero-copy { padding-top: 40px; gap: 28px; }
.hero h1 { font-size: 64px; line-height: 1.05; letter-spacing: -0.5px; }
.hero .lead { font-size: 20px; line-height: 1.55; max-width: 480px; }
.hero-msg { padding: 24px; background: var(--panel-raised); max-width: 640px; }
.hero-msg .card { max-width: 520px; }
/* 36px under the message panel, starting 248px in; it may reach 60px into the right gutter, as in the mockup. */
.hero-settings {
  width: 468px; max-width: 100%; margin: 36px 0 0 max(0px, min(248px, 100% - 408px)); padding: 22px;
  box-shadow: var(--shadow);
}
.hero-settings .title { font-size: 15px; font-weight: 600; margin-bottom: 16px; }
.hero-settings .two-col { margin-top: 16px; }
.swatches { display: flex; gap: 8px; align-items: center; height: 44px; }
.swatch { width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; background: var(--accent); }
.swatch.on { box-shadow: 0 0 0 3px var(--panel), 0 0 0 5px var(--text); }

/* Customize demo: radio inputs styled as tabs, buttons and swatches */
.customize { min-height: 900px; padding: 112px 0 0; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.customize .wrap { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 72px; }
.demo-copy, .demo-controls { display: flex; flex-direction: column; gap: 24px; }
.demo-controls input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.tabs { display: inline-flex; align-self: flex-start; background: var(--panel); border-radius: 12px; padding: 4px; }
.tab, .option {
  display: inline-flex; align-items: center; justify-content: center; position: relative; cursor: pointer;
  height: 40px; font-size: 15px; font-weight: 600; user-select: none; white-space: nowrap;
}
.tab { padding: 0 18px; border-radius: 9px; color: var(--text-faint); }
.tab:hover { color: var(--text); }
.tab:has(input:checked) { background: var(--chip); color: var(--text); }
.option-row { display: flex; flex-wrap: wrap; gap: 10px; }
.option { padding: 0 16px; border-radius: 10px; background: var(--panel); color: var(--text-soft); font-size: 14px; }
.option:hover { background: var(--chip); }
.option:has(input:checked) { background: var(--sun); color: var(--ink); }
.accent-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; height: 44px; }
.accent-btn { position: relative; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; background: var(--accent); }
.accent-btn:has(input:checked) { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--text); }
.tab:has(input:focus-visible), .option:has(input:focus-visible), .accent-btn:has(input:focus-visible) {
  outline: 3px solid var(--sun); outline-offset: 3px;
}
.input {
  display: block; width: 100%; height: 44px; border: 0; border-radius: 12px; background: var(--bg-deep);
  color: var(--text); padding: 0 16px; font: inherit; font-size: 15px;
}
input[type="range"] { display: block; width: 100%; height: 44px; margin: 0; accent-color: var(--sun); }
.for-welcome { display: flex; flex-direction: column; gap: 24px; }
.tokens { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; font-size: 13px; color: var(--text-faint); }
.token {
  border: 0; border-radius: 8px; background: #2C2E3A; color: var(--sun);
  font-size: 13px; font-weight: 600; padding: 5px 10px; cursor: pointer;
}
.preview { display: flex; justify-content: center; padding-top: 40px; }
#card-preview { width: 680px; max-width: 100%; }
.welcome-preview { display: flex; flex-direction: column; gap: 16px; }
.welcome-msg { display: flex; gap: 14px; background: var(--panel-raised); border-radius: var(--radius); padding: 18px 20px; }
.welcome-msg > img { width: 40px; height: 40px; }
.welcome-msg .body { gap: 6px; }
.welcome-msg .discord-meta b { font-weight: 700; }

/* Show only the controls for the selected card (browsers without :has show them all). */
.demo:not(:has([name="card"][value="rank"]:checked)) .for-rank { display: none; }
.demo:not(:has([name="card"][value="welcome"]:checked)) .for-welcome { display: none; }
.demo:not(:has([name="card"][value="fishing"]:checked)) .for-fishing { display: none; }
.demo:has([name="card"][value="fishing"]:checked) .for-cards { display: none; }

/* Leveling */
.leveling { min-height: 700px; padding: 120px 0 0; border-top: 1px solid var(--line); }
.leveling .wrap { display: grid; grid-template-columns: minmax(0, 480px) minmax(0, 1fr); gap: 96px; }
.side-copy { display: flex; flex-direction: column; gap: 24px; padding-top: 48px; }
.xp-panel { height: 500px; padding: 32px; display: flex; flex-direction: column; gap: 24px; }
.xp-panel header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.xp-panel header span:first-child { font-size: 17px; font-weight: 600; }
.xp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.days { display: flex; flex-wrap: wrap; gap: 8px; }
.days .chip { height: 40px; min-width: 80px; }
.level-roles { display: flex; flex-direction: column; gap: 12px; }
.level-roles .label { margin: 0; }
.level-roles .chip-row { gap: 10px; }

/* Auto-responders */
.responders { min-height: 720px; padding: 140px 0 0; }
.responders .wrap { display: flex; flex-direction: column; align-items: center; gap: 48px; }
.responders .lead { max-width: 620px; }
.flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; width: 1180px; max-width: 100%; }
.flow .panel { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.step { font-size: 13px; font-weight: 700; }
.step-blue { color: var(--blue); }
.step-teal { color: var(--teal); }
.step-orange { color: var(--orange); }
.then { display: flex; flex-direction: column; gap: 10px; }
.then .chip { height: 36px; justify-content: flex-start; }

/* Moderation bento */
.bento-section { min-height: 980px; padding: 120px 0 0; }
.bento-section .wrap { display: flex; flex-direction: column; gap: 40px; }
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: 340px 340px; gap: 20px; }
.tile { border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 18px; position: relative; overflow: hidden; }
.tile h3 { font-family: var(--body); font-size: 20px; font-weight: 600; }
.tile p { margin: 6px 0 0; font-size: 15px; color: var(--text-faint); }
.tile-automod { grid-column: span 4; padding: 32px; gap: 20px; }
.tile-tickets, .tile-feeds, .tile-sun, .tile-birthdays { grid-column: span 2; }
.rules { display: flex; flex-direction: column; gap: 10px; }
.rule { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--bg-deep); border-radius: 12px; padding: 12px 16px; font-size: 15px; color: var(--text-faint); }
.rule .act { color: #fff; font-weight: 700; font-size: 13px; padding: 4px 10px; border-radius: 8px; }
.rule .act-blue { background: var(--blue); }
.rule .act-orange { background: var(--orange); color: var(--ink); }
.rule .act-red { background: var(--red); }
.rule .val { background: var(--text); color: var(--bg); font-weight: 600; padding: 3px 10px; border-radius: 8px; }
.tile-tickets { background: #2A2340; justify-content: space-between; }
.tile-tickets p { color: #C6BEDA; }
.tickets-bottom { display: flex; flex-direction: column; gap: 10px; }
.tile-tickets .open { display: inline-flex; align-self: flex-start; align-items: center; background: var(--violet); color: #fff; font-weight: 600; padding: 10px 16px; border-radius: 10px; font-size: 15px; }
.tile-tickets .chip { background: #3A3155; }
.feed-list { display: flex; flex-direction: column; gap: 8px; }
.feed-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.feed-youtube { background: #FF4E45; }
.feed-reddit { background: var(--orange); }
.feed-twitch { background: #9146FF; }
.tile-sun { background: var(--sun); color: var(--ink); justify-content: space-between; }
.tile-sun h3 { font-family: var(--display); font-size: 24px; font-weight: 700; }
.tile-sun p { color: #4A3848; max-width: 260px; }
.tile-sun img { position: absolute; right: -20px; bottom: -24px; width: 190px; height: 190px; }
.tile-birthdays .field-text { padding: 14px 16px; align-items: flex-start; }

/* Welcome */
.welcome-section { min-height: 640px; padding: 120px 0 0; }
.welcome-section .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: 96px; }
.welcome-visual { position: relative; height: 420px; }
.welcome-card { position: absolute; left: 0; top: 0; width: 620px; height: 300px; border-radius: 16px; background: var(--sun); overflow: hidden; }
.welcome-card .deco { position: absolute; border-radius: 999px; }
.welcome-card .deco-1 { left: 36px; top: 30px; width: 14px; height: 14px; background: var(--blue); }
.welcome-card .deco-2 { left: 520px; top: 40px; width: 34px; height: 10px; background: var(--teal); transform: rotate(-24deg); }
.welcome-card .deco-3 { left: 90px; top: 238px; width: 30px; height: 10px; background: var(--orange); transform: rotate(18deg); }
.welcome-card .inner {
  position: absolute; inset: 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: var(--cream); border: 3px solid var(--ink); border-radius: 14px; box-shadow: 5px 5px 0 var(--ink);
}
.welcome-card .avatar { width: 94px; height: 94px; border-radius: 50%; border: 3px solid var(--ink); background: var(--blue); }
.welcome-card .title { font-family: var(--display); font-size: 26px; font-weight: 700; color: var(--ink); }
.welcome-card .sub { font-size: 15px; font-weight: 600; color: var(--ink-soft); }
.welcome-roles { position: absolute; left: 300px; top: 236px; width: 420px; padding: 20px; box-shadow: var(--shadow); }

/* Pricing */
.pricing { min-height: 620px; padding: 120px 0 0; }
.pricing .wrap { display: flex; flex-direction: column; align-items: center; gap: 44px; }
.pricing h2 { text-align: center; }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; width: 920px; max-width: 100%; }
.plan { padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.plan .name { font-size: 20px; font-weight: 600; }
.plan .price { font-family: var(--display); font-size: 40px; font-weight: 700; }
.plan .price small { font-family: var(--body); font-size: 18px; font-weight: 500; color: var(--text-muted); }
.plan .perks { font-size: 15px; line-height: 1.9; color: var(--text-faint); }
.plan-premium { border-radius: var(--radius); background: #2E2A1C; border: 1px solid #FFD23F66; }
.plan-premium .name { color: var(--sun); }
.plan-premium .perks { color: #D8D2BC; }

/* Final call to action + footer */
.cta-section { padding: 80px 0 0; }
.cta {
  position: relative; overflow: hidden; height: 240px; border-radius: var(--radius); background: var(--sun); color: var(--ink);
  display: flex; align-items: center; justify-content: space-between; padding: 0 64px;
}
.cta-copy { display: flex; flex-direction: column; gap: 20px; }
.cta-title { font-family: var(--display); font-size: 40px; font-weight: 700; }
.cta img { width: 280px; height: 280px; margin: 40px -40px 0 0; flex-shrink: 0; }
.footer-grid { margin-top: 64px; padding: 64px 0 56px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand { display: flex; flex-direction: column; gap: 14px; }
.footer-brand .brand img { width: 36px; height: 36px; border-radius: 10px; }
.footer-brand .brand span { font-size: 22px; }
.footer-brand p { margin: 0; font-size: 15px; max-width: 300px; line-height: 1.55; color: var(--text-faint); }
.footer-links { display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.footer-links a { color: var(--text-faint); }
.footer-links a:hover { color: var(--text); }

/* ---------- Inner pages (features, commands, guide, 404) ---------- */
@font-face { font-family: 'JetBrains Mono'; src: url('../fonts/JetBrainsMono-Variable.ttf') format('truetype'); font-weight: 100 800; font-display: swap; }
.muted { color: var(--text-faint); }
.site-nav a.on { color: var(--sun); }
/* Inner pages use 20px button padding (the 404 page keeps 24px, like the home page). */
.inner:not(.page-notfound) .btn, .inner .header-actions .btn { padding: 0 20px; }
.inner .site-footer { border-top: 1px solid var(--line); padding: 64px 0 56px; }
.inner .footer-grid { margin-top: 0; padding: 0; border-top: 0; }
.text-input {
  display: block; width: 100%; height: 48px; border: 1px solid #33364A; border-radius: 12px;
  background: var(--bg-deep); color: var(--text); padding: 0 16px; font: inherit; font-size: 15px;
}
.btn-cream { background: var(--cream); color: var(--ink); }
.btn-cream:hover { background: #FFFDF6; color: var(--ink); }
.btn-violet { background: #3A3155; color: var(--text); }
.btn-violet:hover { background: #463C66; color: var(--text); }
.act { color: #fff; font-weight: 700; font-size: 13px; padding: 4px 10px; border-radius: 8px; }
.act-blue { background: var(--blue); }
.act-orange { background: var(--orange); color: var(--ink); }
.act-red { background: var(--red); }
.fpanel { background: var(--panel); border-radius: 16px; }
.it { display: flex; flex-direction: column; gap: 6px; }
.it b { font-size: 17px; font-weight: 600; }
.it span { font-size: 15px; line-height: 1.55; color: var(--text-faint); }
.sechead { display: flex; align-items: center; gap: 16px; }
.sechead h2 { font-size: 38px; line-height: normal; }
.badge { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.badge-red { background: #D6283926; }
.badge-blue { background: #3A86FF26; }
.badge-sun { background: #FFD23F26; }
.badge-teal { background: #2EC4B626; }

/* Features */
.f-intro { padding: 88px 0 72px; }
.f-intro .wrap { display: flex; flex-direction: column; gap: 28px; }
.f-intro h1 { font-size: 56px; line-height: 1.05; max-width: 820px; }
.f-intro .lead { font-size: 19px; line-height: 1.55; max-width: 620px; }
.jumps { display: flex; flex-wrap: wrap; gap: 10px; }
.jump { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 999px; background: var(--panel); color: var(--text); font-size: 15px; font-weight: 500; }
.jump:hover { background: var(--chip); color: var(--text); }
.f-section { padding: 72px 0; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.f-moderation .wrap { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 72px; }
.f-side { display: flex; flex-direction: column; gap: 28px; }
.f-stack { display: flex; flex-direction: column; gap: 40px; }
.warn-panel { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.fpanel-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.wrule { display: flex; align-items: center; gap: 10px; background: var(--bg); border-radius: 12px; padding: 12px 16px; font-size: 15px; }
.it-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 48px; align-content: center; }
.community-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: 164px 164px; gap: 20px; }
.community-grid .fpanel { padding: 24px; }
.welcome-tile { grid-column: span 2; grid-row: span 2; min-height: 300px; justify-content: space-between; background: var(--sun); color: var(--ink); position: relative; overflow: hidden; }
.welcome-tile-copy { display: flex; flex-direction: column; gap: 8px; }
.welcome-tile-copy b { font-family: var(--display); font-size: 26px; font-weight: 700; }
.welcome-tile-copy span { color: #4A3848; max-width: 340px; font-size: 16px; }
.mini-card { align-self: flex-start; display: flex; align-items: center; gap: 14px; padding: 16px 20px; background: var(--cream); border: 3px solid var(--ink); border-radius: 14px; box-shadow: 5px 5px 0 var(--ink); }
.mini-avatar { width: 62px; height: 62px; border-radius: 50%; border: 3px solid var(--ink); background: var(--blue); }
.mini-title { font-family: var(--display); font-size: 20px; font-weight: 700; }
.mini-sub { font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.leveling-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.week-board { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.week-title { font-size: 14px; font-weight: 600; }
.week-row { display: flex; align-items: center; gap: 12px; background: var(--bg); border-radius: 12px; padding: 10px 14px; }
.week-row .muted { font-size: 14px; }
.place { width: 24px; font-family: var(--display); font-weight: 700; }
.place-1 { color: var(--gold); }
.place-2 { color: #CBD2DB; }
.place-3 { color: #E3965C; }
.week-row .dot { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; }
.dot-pink { background: var(--pink); }
.dot-blue { background: var(--blue); }
.dot-teal { background: var(--teal); }
.week-row .who { flex-grow: 1; font-weight: 600; }
.it-col { display: flex; flex-direction: column; gap: 28px; padding: 8px 12px; }
.f-games { padding: 56px; border-radius: 16px; background: #2A2340; display: flex; flex-direction: column; gap: 36px; }
.games-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.games-copy { display: flex; flex-direction: column; gap: 12px; }
.games-copy h2 { font-size: 38px; line-height: normal; }
.games-copy p { margin: 0; font-size: 17px; line-height: 1.55; color: #C6BEDA; max-width: 560px; }
.game-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.game { background: #3A3155; border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.game b { font-family: var(--display); font-size: 20px; }
.game span { font-size: 14px; line-height: 1.5; color: #C6BEDA; }
.game-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.game-chips span { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; background: #3A3155; font-size: 14px; }
.f-feeds { padding: 104px 0 72px; scroll-margin-top: 16px; }
.f-feeds > .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); gap: 72px; }
.f-feeds-copy { display: flex; flex-direction: column; gap: 36px; }
.feed-panel { padding: 24px; display: flex; flex-direction: column; gap: 12px; align-self: center; }
.feed-row { display: flex; align-items: center; gap: 14px; background: var(--bg); border-radius: 12px; padding: 14px 16px; }
.feed-icon { width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; }
.feed-name { font-weight: 600; }
.feed-note { font-size: 13px; }
.f-cta { padding: 32px 0 88px; }
.f-cta-box { height: 200px; border-radius: 16px; background: var(--sun); color: var(--ink); display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 56px; }
.f-cta-title { font-family: var(--display); font-size: 34px; font-weight: 700; }

/* Guide */
.guide { padding-top: 48px; padding-bottom: 96px; display: grid; grid-template-columns: 240px minmax(0, 1fr) 200px; gap: 64px; align-items: start; }
.guide-side { display: flex; flex-direction: column; gap: 2px; }
.guide-search { margin-bottom: 8px; }
.guide-search .text-input { height: 44px; padding: 0 14px; }
.guide-side b { font-size: 13px; color: #7C7F8C; font-weight: 700; padding: 18px 12px 8px; }
.guide-side a { height: 38px; display: flex; align-items: center; padding: 0 12px; border-radius: 10px; color: #B9BBC6; font-size: 15px; }
.guide-side a:hover { color: var(--text); }
.guide-side a.on { background: var(--panel); color: var(--text); font-weight: 600; }
.guide-article { display: flex; flex-direction: column; gap: 28px; max-width: 720px; }
.crumbs { font-size: 14px; }
.guide-article h1 { font-size: 48px; }
.guide-article h2 { font-size: 28px; line-height: normal; scroll-margin-top: 16px; }
.guide-article p { margin: 0; font-size: 17px; line-height: 1.7; color: #C9CBD4; }
.guide-article pre {
  margin: 0; background: var(--bg-deep); border-radius: 12px; padding: 16px 20px; white-space: pre-wrap;
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 14px; line-height: 1.8; color: #E6E7EC;
}
.guide-article pre .c { color: var(--sun); }
.guide-article pre .k { color: #7C7F8C; }
.g-step { display: flex; gap: 20px; }
.num { width: 36px; height: 36px; border-radius: 50%; background: var(--sun); color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 17px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.step-body { display: flex; flex-direction: column; gap: 14px; flex-grow: 1; min-width: 0; }
.step-body .btn { align-self: flex-start; }
.tip { background: #2E2A1C; border-radius: 14px; padding: 20px 24px; display: flex; gap: 16px; }
.tip svg { flex-shrink: 0; margin-top: 3px; }
.guide-article .tip p { color: #EDE6CC; }
.next { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 12px; }
.next a { background: var(--panel); border-radius: 14px; padding: 20px 24px; color: var(--text); }
.next a:hover { background: var(--chip); color: var(--text); }
.next .muted { font-size: 13px; }
.next-title { font-size: 17px; font-weight: 600; margin-top: 4px; }
.next-forward { text-align: right; }
.crumbs a { color: inherit; }
.crumbs a:hover { color: var(--text); }
.guide-article ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; font-size: 17px; line-height: 1.6; color: #C9CBD4; }
.guide-article li b, .guide-article p b { color: var(--text); }
.guide-article code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.88em; background: var(--panel); border-radius: 6px; padding: 2px 6px; color: #E6E7EC; }
.guide-picker { display: none; background: var(--panel); border-radius: 12px; }
.guide-picker summary { cursor: pointer; padding: 14px 18px; font-weight: 600; }
.guide-picker nav { display: flex; flex-direction: column; padding: 0 8px 12px; }
.guide-picker b { font-size: 13px; color: #7C7F8C; padding: 12px 10px 6px; }
.guide-picker a { padding: 8px 10px; border-radius: 8px; color: #B9BBC6; }
.guide-picker a.on { background: var(--chip); color: var(--text); font-weight: 600; }
.toc { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.toc-title { font-size: 13px; font-weight: 700; color: #7C7F8C; margin-bottom: 4px; }
.toc a { color: var(--text-faint); }
.toc a.on { color: var(--text); font-weight: 600; }

/* Commands */
.c-head { padding: 72px 0 40px; }
.c-head .wrap { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; }
.c-head-copy { display: flex; flex-direction: column; gap: 14px; }
.c-head h1 { font-size: 52px; }
.c-head .lead { line-height: normal; color: var(--text-faint); }
.c-search label { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--text-faint); }
.c-search .text-input { width: 380px; max-width: 100%; }
.c-body { padding-bottom: 96px; }
#command-results { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; }
.cats { display: flex; flex-direction: column; gap: 4px; }
.cat { display: flex; justify-content: space-between; align-items: center; height: 42px; padding: 0 14px; border-radius: 12px; color: #B9BBC6; font-size: 15px; font-weight: 500; }
.cat:hover { color: var(--text); }
.cat.on { background: var(--panel); color: var(--text); }
.cat span { font-size: 13px; color: #7C7F8C; }
.c-list { display: flex; flex-direction: column; gap: 48px; min-width: 0; }
.c-count { margin: 0 0 -24px; font-size: 15px; }
.c-section { display: flex; flex-direction: column; gap: 18px; scroll-margin-top: 16px; }
.c-section h2, .c-empty h2 { font-size: 28px; line-height: normal; }
.c-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.cmd { background: var(--panel); border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cmd code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 15px; font-weight: 600; color: var(--sun); overflow-wrap: anywhere; }
.cmd p { margin: 0; font-size: 15px; line-height: 1.5; color: #B9BBC6; }
.perm { align-self: flex-start; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 10px; }
.perm-mods { background: #3A86FF26; color: #9CC2FF; }
.perm-admins { background: #FF6B3526; color: #FFA27F; }
.perm-click { background: var(--chip); color: var(--text-faint); }
.c-all { align-self: flex-start; }
.c-empty { display: flex; flex-direction: column; gap: 10px; }
.c-empty p { margin: 0; font-size: 16px; line-height: 1.6; }

/* 404 (no footer, as in the mockup) */
.not-found { min-height: calc(100vh - 73px); display: flex; align-items: center; padding: 48px 0; }
.not-found .wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; align-items: center; }
.nf-copy { display: flex; flex-direction: column; gap: 24px; }
.eyebrow { font-family: var(--display); font-size: 20px; font-weight: 600; color: var(--sun); }
.not-found h1 { font-size: 60px; line-height: 1.05; }
.not-found .lead { font-size: 19px; line-height: 1.55; max-width: 460px; color: var(--text-muted); }
.nf-art { justify-self: center; width: 460px; max-width: 100%; aspect-ratio: 1; border-radius: 32px; overflow: hidden; }
.nf-art img { width: 100%; height: 100%; }


/* Style shop */
.s-intro { padding: 80px 0 48px; }
.s-intro .wrap { display: flex; flex-direction: column; gap: 18px; }
.s-intro h1 { font-size: 56px; line-height: 1.05; max-width: 760px; }
.s-intro .lead { font-size: 19px; line-height: 1.55; max-width: 620px; color: var(--text-faint); }
.s-body { padding-bottom: 96px; }
.s-body > .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 48px; align-items: start; }
.shop-form { display: flex; flex-direction: column; gap: 24px; }
.shop-form input[type="radio"], .shop-form input[type="checkbox"] { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.s-tabs { gap: 2px; }
.s-tabs .tab { height: 42px; padding: 0 20px; }
.shop:not(:has([name="tab"][value="banners"]:checked)) .tab-banners { display: none; }
.shop:not(:has([name="tab"][value="frames"]:checked)) .tab-frames { display: none; }
.shop:not(:has([name="tab"][value="badges"]:checked)) .tab-badges { display: none; }
.shop-note { display: block; font-size: 15px; margin-bottom: 24px; }
.shop-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.shop-item { position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: 16px; background: var(--panel); cursor: pointer; }
.shop-item:hover { background: #2B2D38; }
.shop-item:has(input:checked) { box-shadow: 0 0 0 2px var(--sun); }
.shop-item:has(input:focus-visible) { outline: 3px solid var(--sun); outline-offset: 3px; }
.shop-swatch { height: 110px; display: flex; align-items: center; justify-content: center; background: var(--chip); }
.shop-avatar { width: 62px; height: 62px; border-radius: 30%; background: var(--pink); border: 3px solid var(--ink); }
.shop-badge { font-size: 44px; line-height: 1; }
.shop-info { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.shop-name { font-size: 16px; font-weight: 600; }
.shop-price { font-size: 14px; font-weight: 600; color: var(--sun); }
.shop-price.earned { color: #7FE0D6; }
.shop-season { font-size: 13px; color: var(--text-faint); }
.shop-side { display: flex; flex-direction: column; gap: 16px; }
.shop-side-title { font-size: 14px; font-weight: 600; }
#style-preview { display: flex; flex-direction: column; gap: 16px; }
.profile-preview { position: relative; height: 180px; border-radius: 18px; background: var(--chip); overflow: hidden; }
.pp-inner {
  position: absolute; inset: 24px 22px; display: flex; align-items: center; gap: 18px; padding: 0 20px;
  background: var(--cream); color: var(--ink); border: 3px solid var(--ink); border-radius: 14px; box-shadow: 5px 5px 0 var(--ink);
}
.pp-avatar { width: 84px; height: 84px; flex-shrink: 0; border-radius: 30%; border: 3px solid var(--ink); background: var(--pink); }
.pp-info { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.pp-row { display: flex; justify-content: space-between; align-items: baseline; }
.pp-name { font-family: var(--display); font-size: 22px; font-weight: 700; }
.pp-level { font-family: var(--display); font-size: 17px; font-weight: 600; }
.pp-bar { height: 22px; border-radius: 999px; border: 3px solid var(--ink); background: var(--cream-deep); overflow: hidden; }
.pp-bar span { display: block; width: 64%; height: 100%; background: var(--pink); }
.pp-badges { display: flex; gap: 6px; font-size: 18px; line-height: 1; }
.shop-box { background: var(--panel); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.shop-line { font-size: 15px; line-height: 1.55; }
.shop-cmd { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.shop-cmd code { background: var(--bg-deep); border-radius: 8px; padding: 8px 12px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 14px; color: var(--sun); }
.shop-box-sun { background: #2E2A1C; gap: 8px; }
.shop-box-sun b { font-size: 16px; }
.shop-box-sun span { font-size: 14px; line-height: 1.55; color: #D8D2BC; }

/* Banner art (approximations of the bot's src/utils/cosmeticsArt.ts) */
.art-banner_mint { background: radial-gradient(circle at 20% 30%, #2EC4B6 0 4px, transparent 5px) 0 0 / 46px 38px, #BDF2E9; }
.art-banner_sunset { background: radial-gradient(circle at 72% 100%, #FFD23F 0 32%, transparent 33%), linear-gradient(#FF9A5A, #F2466B); }
.art-banner_ocean { background: linear-gradient(#7CC7F0, #1E6F8C); }
.art-banner_sakura { background: radial-gradient(circle at 30% 40%, #F98BA8 0 4px, transparent 5px) 0 0 / 40px 34px, #FFE1E8; }
.art-banner_night { background: radial-gradient(circle at 25% 30%, #FFFFFFCC 0 1.5px, transparent 2px) 0 0 / 34px 28px, linear-gradient(#1E1433, #3B2A63); }
.art-banner_checker { background: repeating-conic-gradient(var(--ink) 0 25%, var(--cream) 0 50%) 0 0 / 36px 36px; }
.art-banner_haunted { background: radial-gradient(circle at 78% 30%, #FFE8A3 0 14%, transparent 15%), linear-gradient(#1A1030, #4A1F5C); }
.art-banner_snowfall { background: radial-gradient(circle at 40% 40%, #F4F8FF 0 2px, transparent 3px) 0 0 / 30px 26px, linear-gradient(#1C2B5A, #3A5A9A); }
.art-banner_lava { background: radial-gradient(ellipse at 60% 110%, #FFD23F, #FF6B35 30%, transparent 62%), #3A1020; }

/* Frame rings (approximations of the bot's frames) */
.ring-frame_gold { box-shadow: 0 0 0 5px var(--gold), 0 0 0 8px var(--ink); }
.ring-frame_ice { box-shadow: 0 0 0 5px #BFE9FF, 0 0 0 8px var(--ink); }
.ring-frame_neon { box-shadow: 0 0 0 5px #7DF9EC, 0 0 0 8px var(--ink), 0 0 18px 6px #2EC4B6; }
.ring-frame_flame { box-shadow: 0 0 0 5px var(--orange), 0 0 0 8px var(--ink), 0 -6px 14px 4px #FFD23F99; }
.ring-frame_rainbow { box-shadow: 0 0 0 3px var(--pink), 0 0 0 6px var(--gold), 0 0 0 9px var(--blue), 0 0 0 12px var(--ink); }
.ring-frame_pumpkin { box-shadow: 0 0 0 5px #FF922B, 0 0 0 8px var(--ink); }
.ring-frame_candycane { box-shadow: 0 0 0 3px var(--red), 0 0 0 5px #FFFFFF, 0 0 0 7px var(--red), 0 0 0 10px var(--ink); }

/* Premium */
.p-intro { padding: 88px 0 56px; }
.p-intro .wrap { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.p-intro h1 { font-size: 56px; }
.p-intro .lead { font-size: 19px; line-height: 1.55; max-width: 560px; color: var(--text-faint); }
.p-plans .wrap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.p-plan { background: var(--panel); border-radius: 16px; padding: 32px; display: flex; flex-direction: column; gap: 20px; }
.p-plan-premium { background: #2E2A1C; border: 1px solid #FFD23F80; }
.p-head { display: flex; justify-content: space-between; align-items: center; }
.p-name { font-size: 20px; font-weight: 600; }
.p-plan-premium .p-name { color: var(--sun); }
.p-pill { font-size: 12px; font-weight: 700; color: var(--ink); background: var(--sun); border-radius: 999px; padding: 4px 10px; }
.p-price { font-family: var(--display); font-size: 44px; font-weight: 700; }
.p-desc { font-size: 15px; line-height: 1.5; }
.p-plan-premium .p-desc { color: #D8D2BC; }
.btn.is-disabled { opacity: .55; cursor: not-allowed; }
.p-rule { height: 1px; background: #33364A; }
.p-plan-premium .p-rule { background: #4A4430; }
.p-list { font-size: 15px; line-height: 2; color: var(--text-soft); }
.p-plan-premium .p-list { color: #EDE6CC; }
.p-compare { padding-top: 104px; }
.p-compare .wrap { display: flex; flex-direction: column; gap: 28px; }
.p-compare h2, .p-faq h2 { font-size: 36px; line-height: normal; }
.p-table { background: #1E1F27; border-radius: 16px; overflow: hidden; }
.p-row { display: grid; grid-template-columns: minmax(0, 1fr) 220px 220px; align-items: center; min-height: 56px; padding: 0 24px; font-size: 15px; }
.p-row:nth-child(even) { background: #22242C; }
.p-row > div:not(:first-child) { text-align: center; }
.p-row-head { min-height: 64px; background: var(--panel); font-weight: 700; }
.p-row .sun { color: var(--sun); }
.p-row .yes { color: var(--teal); font-weight: 700; }
.p-row .no { color: #6F7280; }
.p-faq { padding: 104px 0 96px; }
.p-faq .wrap { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 64px; }
.faqs { display: flex; flex-direction: column; gap: 12px; }
.faq { background: var(--panel); border-radius: 14px; padding: 0 24px; }
.faq summary { list-style: none; height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 17px; font-weight: 600; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { flex-shrink: 0; transition: transform .15s ease; }
.faq[open] summary svg { transform: rotate(180deg); }
.faq p { margin: 0 0 22px; font-size: 16px; line-height: 1.6; }


/* Privacy policy and terms */
.legal { padding-top: 72px; padding-bottom: 96px; display: grid; grid-template-columns: 260px minmax(0, 760px); gap: 96px; }
.legal-side { display: flex; flex-direction: column; gap: 28px; }
.legal-switch { display: flex; background: var(--panel); border-radius: 12px; padding: 4px; }
.legal-switch a { flex: 1; height: 40px; border-radius: 9px; color: var(--text-faint); font-size: 15px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.legal-switch a.on { background: var(--chip); color: var(--text); }
.legal-toc { font-size: 15px; }
.legal-article { display: flex; flex-direction: column; gap: 40px; }
.legal-head { display: flex; flex-direction: column; gap: 12px; }
.legal-head h1 { font-size: 48px; }
.legal-head .muted { font-size: 15px; }
.legal-article .sec { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 16px; }
.legal-article h2 { font-size: 26px; line-height: normal; }
.legal-article p, .legal-article li { margin: 0; font-size: 17px; line-height: 1.75; color: #C9CBD4; }
.legal-article ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }


/* Dashboard: server picker */
.dash-header { border-bottom: 1px solid var(--line); }
.dash-header .wrap { height: 72px; display: flex; align-items: center; justify-content: space-between; }
.dash-brand span { font-size: 22px; font-weight: 600; }
.dash-user { display: flex; align-items: center; gap: 12px; }
.dash-user-name { font-size: 15px; font-weight: 500; }
.dash-avatar { width: 36px; height: 36px; border-radius: 50%; }
.dash-avatar-default { display: block; background: var(--blue); }
.dash-logout { border: 0; background: transparent; color: var(--text-faint); font-size: 14px; cursor: pointer; padding: 6px 4px; white-space: nowrap; }
.dash-logout:hover { color: var(--text); }
.servers { padding: 64px 0 96px; }
.servers .wrap { display: flex; flex-direction: column; gap: 36px; }
.servers-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.servers-copy { display: flex; flex-direction: column; gap: 10px; }
.servers-copy h1 { font-size: 40px; }
.servers-copy p { margin: 0; font-size: 16px; }
.servers-search { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--text-faint); }
.servers-search .text-input { width: 280px; height: 44px; }
.servers-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.srv-card { background: var(--panel); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.srv-card[hidden] { display: none; }
.srv-banner { height: 96px; position: relative; }
.srv-icon { position: absolute; left: 20px; bottom: -28px; width: 72px; height: 72px; border-radius: 18px; border: 4px solid var(--panel); background: var(--ink); }
.srv-initials { display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 22px; font-weight: 700; }
.srv-body { padding: 40px 20px 20px; display: flex; flex-direction: column; gap: 16px; flex-grow: 1; justify-content: space-between; }
.srv-name { font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.srv-members { font-size: 14px; margin-top: 4px; }
.srv-bg-orange { background: var(--orange); } .srv-orange { color: var(--orange); }
.srv-bg-violet { background: var(--violet); } .srv-violet { color: #C9A5FF; }
.srv-bg-teal { background: var(--teal); } .srv-teal { color: var(--teal); }
.srv-bg-blue { background: var(--blue); } .srv-blue { color: #9CC2FF; }
.srv-bg-pink { background: var(--pink); } .srv-pink { color: #FF9AB0; }
.srv-bg-none { background: #33364A; } .srv-none { color: var(--text-faint); background: var(--bg); }
.dash-notice { background: var(--panel); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; max-width: 640px; }
.dash-notice p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--text-soft); }

/* Dashboard: a server */
.page-dash-server { background: #272935; }
.dash { display: flex; min-height: 100vh; }
.dash-side { width: 300px; flex-shrink: 0; background: #1E1F27; padding: 24px 18px; display: flex; flex-direction: column; gap: 4px; }
.dash-side-brand { padding: 0 8px 20px; }
.dash-switch { display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 16px; border-radius: 14px; background: #16171D; color: var(--text); margin-bottom: 16px; }
.dash-switch:hover { color: var(--text); background: #1A1B22; }
.dash-switch img, .dash-switch-initials { width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; }
.dash-switch-initials { display: flex; align-items: center; justify-content: center; color: var(--ink); font-family: var(--display); font-size: 14px; font-weight: 700; }
.dash-switch-name { flex-grow: 1; font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-nav { display: flex; flex-direction: column; gap: 4px; }
/* The menu wrapper is a popover drawer on phones; here it undoes the browser's popover look and sits in the sidebar */
.dash-menu { display: flex; flex-direction: column; gap: 4px; position: static; inset: auto; width: auto; height: auto; margin: 0; padding: 0; border: 0; overflow: visible; background: none; color: inherit; }
.dash-menu-btn, .dash-menu-x { display: none; }
.dash-nav a, .dash-nav > span, .dash-grp-d > span { display: flex; align-items: center; gap: 14px; height: 44px; padding: 0 14px; border-radius: 12px; color: #B9BBC6; font-size: 15px; font-weight: 500; }
.dash-nav svg { width: 20px; height: 20px; flex-shrink: 0; }
.dash-nav a:hover { background: #262833; color: var(--text); }
.dash-nav a.on { background: #2C2E3A; color: var(--text); }
.dash-nav .soon { color: #6F7280; }
.dash-nav .soon em { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 600; color: #6F7280; }
.dash-main { flex-grow: 1; display: flex; flex-direction: column; min-width: 0; }
.dash-top { height: 76px; flex-shrink: 0; display: flex; align-items: center; justify-content: flex-end; padding: 0 48px; background: #22242E; }
.dash-content { padding: 40px 48px; display: flex; flex-direction: column; gap: 28px; }
.dash-content h1 { font-size: 34px; }
.dash-sub { font-size: 16px; margin-top: 6px; }
.dash-panel { background: #1E1F27; border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.dash-panel h2 { font-family: var(--body); font-size: 20px; font-weight: 600; line-height: normal; }
.dash-panel p { margin: 0; font-size: 15px; line-height: 1.6; }
.dash-panel code { font-family: 'JetBrains Mono', ui-monospace, monospace; color: var(--sun); }


/* Dashboard overview: activity and modules */
.dash-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.dash-stat { background: #1E1F27; border-radius: 16px; padding: 22px; }
.dash-stat .muted { font-size: 14px; }
.dash-stat-value { font-family: var(--display); font-size: 32px; font-weight: 700; margin-top: 8px; }
.dash-top-chatter { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 18px; font-weight: 600; }
.dash-top-chatter img, .dash-top-chatter .dash-avatar-default { width: 30px; height: 30px; border-radius: 50%; }
.dash-section-head { display: flex; justify-content: space-between; align-items: baseline; }
.dash-section-head h2 { font-family: var(--body); font-size: 20px; font-weight: 600; line-height: normal; }
.dash-section-head .muted { font-size: 14px; }
.dash-modules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.dash-module { background: #1E1F27; border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.dash-module-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.dash-module-icon { width: 44px; height: 44px; border-radius: 12px; background: #FFD23F1F; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.dash-state { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #3A3D4A; color: #C9CBD4; }
.dash-state.on { background: var(--sun); color: var(--ink); }
.dash-module-name { font-size: 17px; font-weight: 600; }
.dash-module-desc { font-size: 14px; line-height: 1.5; }
.dash-hint { margin: 0; font-size: 14px; }
.dash-hint code { font-family: 'JetBrains Mono', ui-monospace, monospace; color: var(--sun); }

/* Overview: title row, feature cards */
.dash-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.dash-head-actions { display: flex; gap: 10px; }
.dash-btn { height: 40px; padding: 0 16px; font-size: 14px; }
.dash-feature-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.fi-leveling { background: #FFD23F26; color: #FFD23F; }
.fi-automod { background: #D6283926; color: #FF6B7A; }
.fi-responders { background: #2EC4B626; color: #2EC4B6; }
.fi-welcome { background: #3A86FF26; color: #7FB2FF; }
.fi-tickets { background: #8338EC26; color: #B488FF; }
.fi-feeds { background: #FF6B3526; color: #FF8A5C; }
a.dash-feature-link { color: var(--text); }
a.dash-feature-link:hover { color: var(--sun); }
/* Top bar settings search */
.dash-top { justify-content: space-between; gap: 16px; }
.dash-top .dash-user { margin-left: auto; }
.dash-search { display: flex; align-items: center; gap: 12px; color: var(--text-faint); flex: 1 1 auto; max-width: 360px; }
.dash-search input { flex: 1 1 auto; min-width: 0; background: transparent; border: 0; color: var(--text); font: inherit; font-size: 15px; padding: 8px 0; }
.dash-search input:focus { outline: none; }
.dash-search:focus-within { color: var(--text); }
/* Search results */
.dash-hits { background: #1E1F27; border-radius: 16px; padding: 8px 22px; max-width: 760px; }
.dash-hit { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid #2C2E3A; color: var(--text); }
.dash-hit:last-child { border-bottom: 0; }
.dash-hit:hover { color: var(--sun); }
.dash-hit .muted { font-size: 14px; flex-shrink: 0; }

/* Bot profile: Discord-style profile card preview */
.bp-card { background: #232428; border-radius: 16px; overflow: hidden; }
.bp-banner { height: 120px; background: var(--sun); }
.bp-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bp-avatar { width: 80px; height: 80px; border-radius: 50%; border: 6px solid #232428; margin: -46px 0 0 16px; display: block; position: relative; background: #232428; object-fit: cover; }
.bp-body { padding: 8px 18px 18px; }
.bp-name { display: flex; align-items: center; gap: 8px; font-size: 18px; }
.bp-where { font-size: 13px; margin-top: 4px; }
.bp-drop { position: relative; display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 12px 16px; border: 2px dashed #3A3C48; border-radius: 12px; background: #16171D; transition: border-color .15s ease, background-color .15s ease; }
.bp-drop:hover, .bp-drop.is-over { border-color: var(--sun); background: #1B1C23; }
.bp-drop:focus-within { outline: 2px solid var(--sun); outline-offset: 1px; }
.bp-drop.bad { border-color: #FF6B7A; }
.bp-drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.bp-drop-btn { flex: none; padding: 8px 14px; border-radius: 10px; background: var(--chip); color: var(--text); font-size: 14px; font-weight: 600; }
.bp-drop:hover .bp-drop-btn { background: var(--chip-hover); }
.bp-drop-name { min-width: 0; overflow-wrap: anywhere; line-height: 1.4; font-size: 14px; color: #8C8FA0; }
.bp-drop-name.is-set { color: var(--text); }
.bp-reset { margin-top: 10px; }

/* Dashboard sidebar groups (mockup .grp / .sub) */
.dash-grp { display: flex; align-items: center; justify-content: space-between; height: 40px; padding: 0 14px; margin-top: 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.8px; color: var(--text); cursor: pointer; list-style: none; border-radius: 12px; width: 100%; box-sizing: border-box; }
.dash-grp::-webkit-details-marker { display: none; }
.dash-grp:hover { background: #262833; }
.dash-chev { color: var(--text-faint); transition: transform .15s; }
.dash-grp-d[open] > .dash-grp .dash-chev { transform: rotate(180deg); }
.dash-grp-d { display: flex; flex-direction: column; gap: 4px; }
.dash-nav .dash-item { height: 42px; padding: 0 14px 0 20px; font-weight: 400; }
.dash-dot { width: 6px; height: 6px; border-radius: 50%; }
.dash-item.on .dash-dot { background: var(--sun); }

/* On/off switch (mockup .tg); a button, or a span after a hidden checkbox */
.tg { display: block; width: 48px; height: 28px; border-radius: 999px; background: #3A3D4A; position: relative; flex-shrink: 0; border: 0; padding: 0; cursor: pointer; }
.tg::after { content: ''; position: absolute; left: 4px; top: 4px; width: 20px; height: 20px; border-radius: 50%; background: #C9CBD4; transition: left .15s; }
.tg.on, .tg-input:checked + .tg { background: var(--sun); }
.tg.on::after, .tg-input:checked + .tg::after { left: 24px; background: var(--ink); }
.tg:focus-visible, .tg-input:focus-visible + .tg { outline: 2px solid var(--sun); outline-offset: 3px; }
.tg-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.dash-module-switch { display: flex; }
.dash-module-switch.htmx-request .tg { opacity: .6; }

/* Change history (mockup overview) */
.dash-history { background: #1E1F27; border-radius: 16px; padding: 8px 22px; }
.dash-history-row { display: flex; align-items: center; gap: 16px; min-height: 60px; border-bottom: 1px solid #2C2E3A; }
.dash-history-row:last-child { border-bottom: 0; }
.dash-history-text { flex-grow: 1; min-width: 0; font-size: 15px; line-height: 1.5; padding: 8px 0; overflow-wrap: anywhere; }
.dash-history-at { font-size: 14px; white-space: nowrap; }
.dash-btn-sm { height: 34px; padding: 0 12px; font-size: 14px; }

/* Leveling page (mockup "Leveling settings" board) */
.lv { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; padding: 40px 48px 120px; }
.lv-main { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.lv h1 { font-size: 34px; }
.lv .dash-sub { margin-top: 8px; line-height: 1.5; }
.lv-notice { background: #2EC4B61F; color: #7FE0D6; border-radius: 12px; padding: 14px 18px; font-size: 15px; font-weight: 500; }
.lv-notice.bad { background: #D628391F; color: #FF9AA6; }
.lv-notice-gap { margin-bottom: 18px; }
.lv-panel { background: #1E1F27; border-radius: 16px; padding: 28px; }
.lv-panel h2 { margin: 0; font-family: var(--body); font-size: 19px; font-weight: 600; line-height: normal; }
.lv-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.lv-rule { height: 1px; background: #2C2E3A; margin: 20px 0; }
.lv-grid { display: grid; gap: 20px; }
.lv-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lv-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lv-field { display: flex; flex-direction: column; min-width: 0; margin: 0; padding: 0; border: 0; }
.lv-lbl { display: block; padding: 0; font-size: 14px; color: var(--text-faint); margin-bottom: 8px; }
.lv-input { box-sizing: border-box; width: 100%; height: 48px; border: 0; border-radius: 12px; background: #16171D; color: var(--text); font: inherit; font-size: 15px; padding: 0 16px; }
.lv-input:focus-visible { outline: 2px solid var(--sun); outline-offset: 1px; }
.lv-input.bad { outline: 2px solid #FF6B7A; }
select.lv-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23A9ABB8' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 44px; cursor: pointer; }
.lv-hint { margin-top: 8px; font-size: 13px; line-height: 1.5; color: #8C8FA0; }
.lv-hint code, .lv-panel code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 13px; color: var(--sun); }
.lv-hint-block { margin: 16px 0 0; }
.lv-err { margin-top: 8px; font-size: 13px; color: #FF9AA6; }
.lv-seg { display: flex; background: #16171D; border-radius: 12px; padding: 4px; height: 48px; box-sizing: border-box; }
.lv-seg label { flex: 1; display: flex; }
.lv-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lv-seg span { flex: 1; display: flex; align-items: center; justify-content: center; border-radius: 9px; color: var(--text-faint); font-size: 14px; font-weight: 600; cursor: pointer; }
.lv-seg input:checked + span { background: #2C2E3A; color: var(--text); }
.lv-seg input:focus-visible + span { outline: 2px solid var(--sun); }
.lv-message { margin-top: 20px; }
.lv-textarea-wrap { position: relative; }
.lv-textarea { display: block; height: auto; min-height: 120px; padding: 16px 16px 32px; font-size: 16px; line-height: 1.8; resize: vertical; }
.lv-textarea:disabled { color: var(--text-faint); }
.lv-count { position: absolute; right: 16px; bottom: 10px; font-size: 13px; color: #6F7280; pointer-events: none; }
.lv-tokens { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; align-items: center; }
.lv-tokens .muted { font-size: 13px; margin-right: 4px; }
.lv-token { display: inline-block; background: #2C2E3A; color: #D6D7DE; border: 0; border-radius: 8px; padding: 2px 8px; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.lv-token:hover { color: var(--sun); }
.lv-bonus { margin-top: 24px; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.lv-days { display: flex; gap: 8px; flex-wrap: wrap; }
.lv-day input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lv-day span { display: flex; align-items: center; justify-content: center; width: 52px; height: 40px; border-radius: 10px; background: #16171D; color: var(--text-muted); font-size: 14px; font-weight: 600; cursor: pointer; }
.lv-day input:checked + span { background: var(--sun); color: var(--ink); }
.lv-day input:focus-visible + span { outline: 2px solid var(--sun); outline-offset: 2px; }
.lv-rate { width: 160px; }
.lv-checks { margin-top: 24px; display: flex; flex-direction: column; gap: 14px; }
.lv-check { display: flex; align-items: center; gap: 12px; font-size: 15px; cursor: pointer; }
.lv-check input { width: 20px; height: 20px; accent-color: var(--sun); margin: 0; }
.lv-toggle { position: relative; display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 500; color: var(--text); cursor: pointer; }
.lv-side { display: flex; flex-direction: column; gap: 16px; padding-top: 104px; position: sticky; top: 24px; }
.lv-side-title { font-size: 14px; font-weight: 600; }
.lv-preview { background: #313338; border-radius: 16px; padding: 18px; display: flex; gap: 12px; }
.lv-preview > img { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.lv-preview-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lv-preview-head { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.lv-app { background: var(--blurple); color: #FFFFFF; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; }
.lv-time { color: #949BA4; font-size: 12px; }
.lv-preview-text { font-size: 14px; color: #DBDEE1; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.lv-mention { background: #3C4270; color: #C9CDFB; border-radius: 4px; padding: 0 2px; }
.lv-role { background: #3A86FF33; color: #9CC2FF; border-radius: 4px; padding: 0 2px; }
.lv-pv-card { width: 270px; max-width: 100%; height: 96px; border-radius: 10px; background: var(--sun); position: relative; }
.lv-pv-card-in { position: absolute; inset: 10px; background: var(--cream); border: 2px solid var(--ink); border-radius: 9px; box-shadow: 3px 3px 0 var(--ink); display: flex; align-items: center; gap: 10px; padding: 0 12px; }
.lv-pv-avatar { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--ink); background: var(--pink); flex-shrink: 0; box-sizing: border-box; }
.lv-pv-meta { flex-grow: 1; display: flex; flex-direction: column; gap: 5px; }
.lv-pv-row { display: flex; justify-content: space-between; font-family: var(--display); color: var(--ink); font-size: 12px; font-weight: 600; }
.lv-pv-row span:first-child { font-size: 14px; font-weight: 700; }
.lv-pv-bar { height: 9px; border-radius: 999px; border: 2px solid var(--ink); background: var(--cream-deep); overflow: hidden; }
.lv-pv-bar div { width: 64%; height: 100%; background: var(--pink); }
.lv-pv-embed { display: none; background: #2B2D31; border-left: 4px solid var(--sun); border-radius: 4px; padding: 10px 14px; flex-direction: column; gap: 6px; }
.lv-pv-embed-title { font-size: 13px; font-weight: 600; }
.lv-pv-embed-field { display: flex; flex-direction: column; font-size: 13px; color: #DBDEE1; }
.lv:has(#style-embed:checked) .lv-pv-embed { display: flex; }
.lv:has(#style-embed:checked) .lv-pv-plain, .lv:has(#style-embed:checked) .lv-pv-card, .lv:has(#style-text:checked) .lv-pv-card { display: none; }
.lv-side-note { padding: 18px; font-size: 14px; line-height: 1.6; }
.lv-side-note-title { font-weight: 600; margin-bottom: 6px; }
.lv-bar { position: fixed; left: 348px; right: 48px; bottom: 28px; z-index: 5; height: 68px; border-radius: 16px; background: #16171D; box-shadow: 0 16px 40px #0B0C1080; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 16px 0 24px; font-size: 15px; }
.lv-bar-actions { display: flex; gap: 10px; }
.lv-bar { transition: transform .2s ease, opacity .2s ease, visibility .2s; }
/* Auto-mod: one column, checks in a 3-wide grid like the mockup */
.lv.am { grid-template-columns: minmax(0, 1fr); }
.am-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 24px; row-gap: 22px; }
.am-check { min-width: 0; }
.am-select { height: 52px; font-weight: 500; cursor: pointer; }
.am-select.off { color: #7C7F8C; }
.am-head { display: flex; align-items: center; gap: 6px; height: 28px; margin-bottom: 6px; }
.am-name { font-size: 14px; color: var(--text-faint); }
.am-cfg { position: relative; width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: #7FB2FF; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.am-cfg:hover { background: #2C2E3A; }
.am-cfg:focus-visible { outline: 2px solid var(--sun); outline-offset: 1px; }
.am-cfg.set::after, .am-cfg.bad::after { content: ''; position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--sun); }
.am-cfg.bad::after { background: #FF6B7A; }
/* A check's settings: a drawer on the right (the browser's popover, so it opens without JavaScript) */
.am-panel { position: fixed; inset: 0 0 0 auto; width: min(460px, 100vw); height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; box-sizing: border-box; background: #1E1F27; color: var(--text); box-shadow: -24px 0 60px #0B0C1080; flex-direction: column; }
.am-panel:popover-open { display: flex; }
.am-panel::backdrop { background: #0B0C1099; }
.am-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 24px 28px 16px; border-bottom: 1px solid #2C2E3A; }
.am-panel-head h3 { margin: 0; font-family: var(--body); font-size: 19px; font-weight: 600; }
.am-x { width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--text-muted); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.am-x:hover { background: #2C2E3A; color: var(--text); }
.am-panel-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 20px 28px 120px; }
.am-panel-body .lv-hint { margin-top: -4px; }
.am-panel-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 28px; border-top: 1px solid #2C2E3A; font-size: 13px; }
.am-list { min-height: 96px; padding: 12px 16px; font-size: 14px; line-height: 1.6; }
.am-global { margin-bottom: 4px; }

/* Channel and role pickers: chips in the field, a checkbox list in a popover */
.pk { position: relative; }
.pk-d { width: 100%; }
.pk-d > summary { list-style: none; width: 100%; }
.pk-d > summary::-webkit-details-marker { display: none; }
.pk-sum { display: flex; align-items: center; gap: 8px; height: auto; min-height: 48px; padding: 8px 12px; cursor: pointer; }
.pk-sum:focus-visible { outline: 2px solid var(--sun); outline-offset: 1px; }
.pk-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }
.pk-chip { border-radius: 999px; padding: 4px 10px; background: #2C2E3A; color: var(--text); font-size: 13px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-chip.gone { background: #D628391F; color: #FF9AA6; }
.pk-none { color: #7C7F8C; font-size: 15px; padding-left: 4px; }
.pk-caret { color: var(--text-faint); flex-shrink: 0; transition: transform .15s ease; }
.pk-d[open] .pk-caret { transform: rotate(180deg); }
.pk-pop { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 6; background: #16171D; border-radius: 12px; box-shadow: 0 16px 40px #0B0C1099; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.pk-find { height: 40px; background: #1E1F27; }
.pk-list { max-height: 280px; overflow-y: auto; display: flex; flex-direction: column; }
.pk-gname { padding: 10px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: #7C7F8C; }
.pk-item { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 10px; border-radius: 9px; font-size: 15px; color: var(--text-soft); cursor: pointer; }
.pk-item:hover { background: #2C2E3A; color: var(--text); }
.pk-item input { width: 18px; height: 18px; accent-color: var(--sun); margin: 0; flex-shrink: 0; }
.pk-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-item[hidden], .pk-group[hidden] { display: none; }
.pk-empty { padding: 10px; font-size: 14px; color: #7C7F8C; }
.ar-roles { margin-bottom: 4px; }
.am-count { font-size: 14px; }
.am-golist { font-size: 14px; color: #7FB2FF; }
.am-golist:hover { color: var(--sun); }
/* The row under the checks (mockup: moderators switch, "Log hits in # mod-log") */
.am-foot { display: flex; align-items: center; gap: 16px 40px; flex-wrap: wrap; font-size: 15px; }
.am-mods { display: flex; align-items: center; gap: 12px; }
.am-mods .tg { cursor: default; }
.am-inline { display: flex; align-items: center; gap: 12px; }
.am-chipsel { appearance: none; border: 0; border-radius: 10px; background: #16171D; color: var(--text); font: inherit; font-size: 15px; padding: 8px 34px 8px 14px; cursor: pointer; max-width: 260px; 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='%23A9ABB8' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.am-chipsel:focus-visible { outline: 2px solid var(--sun); outline-offset: 1px; }
.am-chipsel.bad { outline: 2px solid #FF6B7A; }
.am-exempt .pk { width: 280px; }
@media (max-width: 720px) { .am-foot .am-exempt { flex-basis: 100%; } }
.am-exempt .pk > .lv-lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.am-exempt .pk-sum { min-height: 40px; padding: 4px 10px; }
/* Lists section */
.am-lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; }
.am-listcard { display: flex; flex-direction: column; gap: 10px; min-width: 0; scroll-margin-top: 24px; }
.am-listcard:target .tags, .am-listcard:target .am-list { outline: 2px solid var(--sun); }
.am-listhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.am-listname { font-size: 16px; font-weight: 600; }
.am-state { border-radius: 999px; padding: 3px 10px; background: #2C2E3A; color: #8C8FA0; font-size: 12px; font-weight: 600; white-space: nowrap; }
.am-state.on { background: #2EC4B626; color: #7FE0D6; }
.am-listcard .lv-hint { margin-top: 0; }
/* Chip editor over a list textarea (the textarea stays the form field) */
textarea[data-tags][hidden] { display: none; }
.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 52px; padding: 8px; box-sizing: border-box; border-radius: 12px; background: #16171D; cursor: text; }
.tags:focus-within { outline: 2px solid var(--sun); outline-offset: 1px; }
.tags.bad { outline: 2px solid #FF6B7A; }
.tag { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; border-radius: 999px; padding: 3px 4px 3px 12px; background: #2C2E3A; font-size: 14px; font-weight: 600; }
.tag span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag button { width: 22px; height: 22px; border: 0; border-radius: 50%; background: transparent; color: var(--text-faint); font: inherit; font-size: 16px; line-height: 1; cursor: pointer; flex-shrink: 0; }
.tag button:hover { background: #3A3D4A; color: var(--text); }
.tags input { flex: 1; min-width: 160px; height: 34px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 15px; padding: 0 6px; outline: none; }
.tags input::placeholder { color: #7C7F8C; }
.tags-count { font-size: 12px; color: #7C7F8C; }
/* Tickets page and panel editor */
.tk-stack { display: flex; flex-direction: column; gap: 10px; }
.tk-row { display: flex; align-items: center; gap: 14px; background: #16171D; border-radius: 12px; padding: 0 16px; min-height: 56px; }
.tk-name { min-width: 110px; overflow-wrap: anywhere; }
.tk-where { flex: 1; min-width: 0; }
.tk-add { display: flex; align-items: center; justify-content: center; height: 52px; border-radius: 12px; border: 1px dashed #4A4D5C; color: #B9BBC6; font-size: 15px; }
.tk-add:hover { color: var(--text); border-color: #6A6D7C; }
.tk-empty { margin: 0; }
.tk-filter { display: inline-flex; background: #16171D; border-radius: 12px; padding: 4px; gap: 2px; }
.tk-filter a { padding: 8px 14px; border-radius: 9px; color: #A9ABB8; font-size: 14px; font-weight: 600; }
.tk-filter a.on { background: #2C2E3A; color: var(--text); }
.tk-table { display: flex; flex-direction: column; gap: 8px; }
.tk-tr { display: grid; grid-template-columns: 56px minmax(0, 1fr) 140px 80px; gap: 14px; align-items: center; background: #16171D; border-radius: 12px; padding: 10px 16px; }
.tk-th { background: none; padding: 0 16px; font-size: 13px; color: #A9ABB8; font-weight: 600; }
.tk-subject { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tk-ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-by { font-size: 13px; }
.tk-pill { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 9px; background: #2C2E3A; color: var(--text); }
.tk-pill.open { background: #FFD23F26; color: #FFE27A; }
.tk-back { display: inline-block; font-size: 14px; margin-bottom: 8px; }
.tk-button-row { grid-template-columns: 110px minmax(0, 1fr); }
.tk-embed { background: #2B2D31; border-left: 4px solid #3A86FF; border-radius: 6px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: #DBDEE1; }
.tk-embed b { font-size: 15px; overflow-wrap: anywhere; }
.tk-embed-foot { font-size: 12px; color: #949BA4; }
.tk-dbtn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 6px; background: #5865F2; color: #fff; font-size: 14px; font-weight: 500; }
.tk-delete { align-self: flex-start; }
.tk-delete p { font-size: 14px; }
@media (max-width: 720px) {
  .tk-tr { grid-template-columns: 48px minmax(0, 1fr) 70px; }
  .tk-tr > :nth-child(3) { display: none; }
  .tk-row { flex-wrap: wrap; padding: 12px 16px; }
}

/* Suggestions page: one column, a list whose rows open to decide */
.lv.sg { grid-template-columns: minmax(0, 1fr); }
.sg-settings { display: flex; flex-direction: column; gap: 24px; }
.sg-table { display: flex; flex-direction: column; gap: 8px; }
.sg-tr { display: grid; grid-template-columns: 64px minmax(0, 1fr) 110px 120px; gap: 14px; align-items: center; padding: 10px 16px; }
.sg-th { padding: 0 16px; font-size: 13px; color: #A9ABB8; font-weight: 600; }
.sg-item { background: #16171D; border-radius: 12px; }
.sg-item summary { cursor: pointer; list-style: none; border-radius: 12px; }
.sg-item summary::-webkit-details-marker { display: none; }
.sg-item summary:hover { background: #1B1C23; }
.sg-item[open] summary { box-shadow: 0 0 0 2px var(--sun); }
.sg-what { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sg-by { font-size: 13px; }
.sg-up { color: #7FE0D6; }
.sg-down { color: #FF9AB0; margin-left: 6px; }
.sg-pill { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.sg-yellow { background: #FFD23F26; color: #FFE27A; }
.sg-blue { background: #3A86FF26; color: #9CC2FF; }
.sg-teal { background: #2EC4B626; color: #7FE0D6; }
.sg-pink { background: #F2466B26; color: #FF9AB0; }
.sg-grey { background: #2C2E3A; color: var(--text); }
.sg-body { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.sg-content { margin: 0; font-size: 15px; line-height: 1.6; color: #D6D7DE; white-space: pre-wrap; overflow-wrap: anywhere; }
.sg-decided { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.sg-decide { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.sg-decide .lv-input { background: #252733; }
.sg-buttons { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.sg-link { margin-left: auto; font-size: 14px; }
@media (max-width: 720px) {
  .sg .lv-panel-head { flex-wrap: wrap; }
  .sg .tk-filter { max-width: 100%; overflow-x: auto; }
  .sg .tk-filter a { white-space: nowrap; }
  .sg-tr { grid-template-columns: 44px minmax(0, 1fr) 96px; }
  .sg-tr > :nth-child(3) { display: none; }
  .sg-link { margin-left: 0; }
}
@media (max-width: 400px) {
  .sg .tk-filter a { padding: 8px 10px; }
  .sg-tr { grid-template-columns: minmax(0, 1fr) auto; }
  .sg-tr > :first-child { display: none; }
}

/* Confessions page: the review queue and a preview of the posted card */
.cf-settings { display: flex; flex-direction: column; gap: 24px; }
.cf-item { background: #16171D; border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.cf-text { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.cf-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cf-when { font-size: 13px; flex-grow: 1; }
.cf-decide { display: flex; gap: 8px; margin: 0; }
.cf-card { width: 100%; max-width: 300px; box-sizing: border-box; border: 2px solid var(--ink); border-radius: 12px; background: var(--cream); box-shadow: 3px 3px 0 var(--ink); color: var(--ink); overflow: hidden; }
.cf-card-top { position: relative; height: 40px; background: var(--sun); border-bottom: 2px solid var(--ink); }
.cf-quote { position: absolute; left: 14px; top: 20px; width: 36px; height: 32px; border: 2px solid var(--ink); border-radius: 10px; background: var(--sun); box-shadow: 2px 2px 0 var(--ink); transform: rotate(-6deg); font-family: 'Fredoka', 'Figtree', sans-serif; font-size: 30px; font-weight: 700; line-height: 46px; text-align: center; }
.cf-pill { position: absolute; left: 62px; top: 26px; padding: 2px 10px; border: 2px solid var(--ink); border-radius: 999px; background: var(--cream); font-size: 12px; font-weight: 700; white-space: nowrap; }
.cf-card-text { margin: 30px 14px 12px; font-size: 14px; font-weight: 500; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.cf-card-foot { margin: 0 14px; padding: 8px 0 10px; border-top: 1.5px solid var(--cream-deep); color: var(--ink-soft); font-size: 11px; }

/* Scheduled messages: the list, and an editor whose fields follow what it posts and how often */
.sm-list { padding: 20px 28px 8px; }
.sm-list-head { margin-bottom: 4px; }
.sm-name { font-size: 16px; overflow-wrap: anywhere; }
.sm-what { font-size: 14px; }
.sm-next { flex: 0 0 170px; font-size: 14px; }
.sm-gap { margin-top: 20px; }
.sm-seg { height: auto; flex-wrap: wrap; gap: 2px; }
.sm-seg label { flex: 1 1 auto; }
.sm-seg span { padding: 10px 14px; white-space: nowrap; }
.sm-when { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.sm-num { width: 160px; }
.sm-lines { min-height: 180px; }
.sm-actions { display: flex; gap: 10px; align-items: center; }
.sm-confirm { position: absolute; left: 0; top: calc(100% + 6px); z-index: 2; background: #16171D; border-radius: 12px; padding: 8px; box-shadow: 0 16px 40px #0B0C1099; white-space: nowrap; }
.sm-pv-embed { display: flex; flex-direction: column; gap: 4px; background: #2B2D31; border-left: 4px solid var(--sun); border-radius: 4px; padding: 10px 14px; font-size: 14px; }
.sm-pv-card { display: flex; flex-direction: column; gap: 4px; max-width: 280px; padding: 12px 14px; border: 2px solid var(--ink); border-radius: 10px; background: var(--cream); box-shadow: 3px 3px 0 var(--ink); color: var(--ink); font-size: 13px; line-height: 1.4; }
.sm-pv-pic { display: flex; align-items: center; justify-content: center; height: 140px; max-width: 280px; border-radius: 6px; background: #2B2D31; color: var(--text-faint); font-size: 13px; }
.sm-edit:not(:has([name="source"][value="message"]:checked)) .sm-for-message,
.sm-edit:has([name="source"][value="message"]:checked) .sm-for-extra,
.sm-edit:not(:has([name="source"][value="fact"]:checked)) .sm-for-fact,
.sm-edit:not(:has([name="source"][value="question"]:checked)) .sm-for-question,
.sm-edit:not(:has([name="source"][value="animal"]:checked)) .sm-for-animal,
.sm-edit:not(:has([name="source"][value="list"]:checked)) .sm-for-list,
.sm-edit:not(:has([name="kind"][value="weekly"]:checked, [name="kind"][value="biweekly"]:checked)) .sm-for-week,
.sm-edit:not(:has([name="kind"][value="monthly"]:checked)) .sm-for-month,
.sm-edit:not(:has([name="kind"][value="hours"]:checked)) .sm-for-hours,
.sm-edit:has([name="kind"][value="hours"]:checked) .sm-for-clock { display: none; }
@media (max-width: 720px) {
  .sm-list { padding: 16px 16px 4px; }
  .sm-next { flex: 1 1 auto; }
}

/* Saved embeds: list, import and the embed editor */
.em-summary { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.em-import summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; cursor: pointer; list-style: none; }
.em-import summary::-webkit-details-marker { display: none; }
.em-import summary h2 { margin: 0; }
.em-import:not([open]) .lv-rule { display: none; }
.em-json { min-height: 160px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.5; }
.em-file { padding-top: 12px; }
.em-small { min-height: 80px; }
.em-fields { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.em-field { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto 48px; gap: 10px; align-items: center; width: 100%; }
.em-inline { white-space: nowrap; }
.em-send { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.em-send .lv-field { flex: 1 1 240px; }
.em-as { margin-top: 14px; }
.em-as summary { cursor: pointer; font-size: 14px; margin-bottom: 12px; }
.em-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.em-embed { border-left-color: #5865F2; }
.em-author { font-size: 13px; font-weight: 600; }
.em-pv-fields { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.em-pv-field { flex: 1 1 100%; display: flex; flex-direction: column; gap: 2px; font-size: 13px; overflow-wrap: anywhere; }
.em-pv-field.inline { flex: 1 1 28%; }
.em-pv-image { height: 120px; max-width: none; }
@media (max-width: 720px) {
  .em-field { grid-template-columns: minmax(0, 1fr) auto 48px; }
  .em-field > :nth-child(-n+2) { grid-column: 1 / -1; }
}

/* Tags page: who can make them, then the list as a grid of name, owner, uses, switch, edit */
.tl-who { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 20px 28px; }
.tl-who .lv-seg span { padding: 0 16px; white-space: nowrap; }
.tl-role { flex: 1 1 220px; min-width: 0; }
.tl-search { margin-bottom: 16px; }
.tl-head, .tl-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 150px) 70px 48px 60px; align-items: center; gap: 14px; padding: 0 16px; }
.tl-head { font-size: 13px; font-weight: 600; padding-bottom: 10px; }
.tl-list { gap: 8px; }
.tl-row { min-height: 56px; background: #16171D; border-radius: 12px; }
.tl-row[hidden] { display: none; }
.tl-row.off .tl-name, .tl-row.off .tl-owner, .tl-row.off .tl-uses { opacity: 0.55; }
.tl-name { color: var(--text); font-weight: 700; overflow-wrap: anywhere; }
.tl-name:hover { color: var(--sun); }
.tl-owner { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.tl-mobile { display: none; }
.tl-prune { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.tl-text { margin-top: 20px; }
.tl-area { min-height: 150px; }
.tl-pv { overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .tl-who fieldset { flex: 1 1 100%; min-width: 0; }
  .tl-who .lv-seg { height: auto; min-height: 48px; }
  .tl-who .lv-seg span { white-space: normal; text-align: center; line-height: 1.3; padding: 6px 8px; }
  .tl-head { display: none; }
  .tl-row { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "name switch edit" "meta meta meta"; padding: 12px 16px; row-gap: 6px; }
  .tl-name { grid-area: name; }
  .tl-row .ar-switch { grid-area: switch; }
  .tl-row .btn { grid-area: edit; }
  .tl-owner { grid-area: meta; }
  .tl-uses { grid-area: meta; justify-self: end; font-size: 14px; }
  .tl-mobile { display: inline; }
}

/* Free games page: platform boxes in three columns, the free game embed preview */
.fg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fg-box { display: flex; flex-direction: column; gap: 4px; background: #16171D; border-radius: 12px; padding: 14px 16px; cursor: pointer; }
.fg-box:has(input:checked) { box-shadow: 0 0 0 2px var(--sun); }
.fg-box .lv-check { color: var(--text); }
.fg-hint { font-size: 13px; padding-left: 32px; }
.fg-embed { border-left-color: var(--teal); }
.fg-top { display: flex; gap: 12px; }
.fg-main { flex: 1 1 auto; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fg-title { color: #00A8FC; }
.fg-thumb { width: 56px; height: 56px; border-radius: 8px; background: #1E1F27; flex-shrink: 0; }
@media (max-width: 720px) { .fg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 400px) { .fg-grid { grid-template-columns: minmax(0, 1fr); } }

/* AI replies page: switch rows, persona cards, the custom persona box and a sample answer per persona */
.ai-row { display: flex; align-items: center; gap: 16px; min-height: 64px; background: #16171D; border-radius: 12px; padding: 12px 16px; cursor: pointer; }
.ai-row-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ai-row-text .muted { font-size: 13px; line-height: 1.5; }
.ai-seg { max-width: 520px; }
.ai-seg span { padding: 0 10px; white-space: nowrap; }
.ai-personas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ai-persona { display: flex; flex-direction: column; gap: 4px; background: #16171D; border-radius: 12px; padding: 14px 16px; cursor: pointer; }
.ai-persona:has(input:checked) { box-shadow: 0 0 0 2px var(--sun); }
.ai-own { grid-column: 1 / -1; }
.ai-hint { font-size: 13px; padding-left: 32px; }
.ai-custom { margin-top: 12px; }
.ai-form:not(:has([name="features.ai.persona"][value="custom"]:checked)) .ai-custom textarea { opacity: 0.6; }
.ai-usage { padding: 20px; }
.ai-used { font-family: 'Fredoka', 'Figtree', sans-serif; font-size: 34px; font-weight: 700; }
.ai-pv { flex-direction: column; gap: 16px; }
.ai-say { display: none; }
.ai-form:has([name="features.ai.persona"][value="default"]:checked) .ai-say-default,
.ai-form:has([name="features.ai.persona"][value="friendly"]:checked) .ai-say-friendly,
.ai-form:has([name="features.ai.persona"][value="sarcastic"]:checked) .ai-say-sarcastic,
.ai-form:has([name="features.ai.persona"][value="teacher"]:checked) .ai-say-teacher,
.ai-form:has([name="features.ai.persona"][value="brief"]:checked) .ai-say-brief,
.ai-form:has([name="features.ai.persona"][value="pirate"]:checked) .ai-say-pirate,
.ai-form:has([name="features.ai.persona"][value="custom"]:checked) .ai-say-custom { display: block; }
@media (max-width: 720px) {
  .ai-personas { grid-template-columns: minmax(0, 1fr); }
  .ai-seg { height: auto; flex-wrap: wrap; }
  .ai-seg label { flex: 1 1 30%; }
  .ai-seg span { height: 40px; }
}

/* Counting page */
.ct-checks { margin-top: 20px; row-gap: 14px; }
.ct-lead { margin: 0 0 16px; font-size: 15px; }
.ct-kept { align-self: center; font-size: 14px; }
.ct-now { padding: 22px; display: flex; flex-direction: column; gap: 16px; font-size: 15px; }
.ct-now .muted { font-size: 14px; }
.ct-big { font-family: var(--display); font-size: 30px; font-weight: 700; }
.ct-mid { font-family: var(--display); font-size: 22px; font-weight: 700; }
.ct-set { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.ct-set .btn { width: 100%; }

/* Fishing page */
.fi-lead { margin: 0 0 18px; font-size: 15px; line-height: 1.5; }
.fi-prizes { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 4px; }
.fi-link { justify-content: space-between; color: var(--text); }
.fi-link:hover { color: var(--text); background: #1B1C23; }
.fi-week { padding: 22px; display: flex; flex-direction: column; gap: 14px; font-size: 15px; }
.fi-species { font-family: var(--display); font-size: 22px; font-weight: 700; }
.fi-top { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; counter-reset: place; }
.fi-top li { display: flex; justify-content: space-between; gap: 12px; counter-increment: place; }
.fi-top li span::before { content: counter(place) ". "; }

/* Giveaways page: one column, like the mockup */
.lv.gw { grid-template-columns: minmax(0, 1fr); }
.gw-gap { margin-top: 20px; }
.gw-tr { grid-template-columns: minmax(0, 1fr) 140px 110px 70px 70px 190px; }
.gw-prize { font-weight: 600; }
.gw-prize a { color: var(--text); }
.gw-prize a:hover { color: var(--sun); }
.gw-actions { display: flex; gap: 8px; justify-content: flex-end; }
.gw-actions form { margin: 0; }
.gw-textarea { min-height: 96px; }
.gw-drop { min-height: 48px; padding: 6px 12px; }
.gw-post { margin-bottom: 20px; }
.gw-submit { margin-top: 24px; }
@media (max-width: 900px) {
  .gw-tr { grid-template-columns: minmax(0, 1fr) 60px 60px; }
  .gw-tr > :nth-child(2), .gw-tr > :nth-child(3) { display: none; }
  .gw-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* Game night page */
.gn-when { display: flex; gap: 28px; align-items: flex-start; flex-wrap: wrap; }
.gn-when fieldset { border: 0; margin: 0; padding: 0; }
.gn-time { width: 140px; }
.gn-tz { width: 240px; }
.gn-gap { margin-top: 20px; }
.gn-note { font-size: 14px; }
.gn-lineup { display: flex; gap: 14px; }
.gn-game { flex: 1; background: #16171D; border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.5; }
.gn-game b { font-size: 16px; }
.gn-step { font-family: var(--display); font-size: 13px; font-weight: 600; color: var(--sun); }
.gn-date { width: 180px; }
.gn-played { flex-grow: 1; }
.gn-next { padding: 22px; display: flex; flex-direction: column; gap: 14px; font-size: 15px; }
.gn-next-day { font-family: var(--display); font-size: 24px; font-weight: 700; }
.gn-start { font-size: 14px; line-height: 1.5; }
@media (max-width: 720px) {
  .gn-lineup { flex-direction: column; }
  .gn-time, .gn-tz { width: 100%; }
  .gn-date { width: auto; }
}

/* Trivia page: one column, like the mockup */
.lv.tv { grid-template-columns: minmax(0, 1fr); }
.lv.tv > .lv-main > form { display: flex; flex-direction: column; gap: 24px; }
.tv-lead { margin: 0 0 16px; font-size: 15px; }
.tv-tr { grid-template-columns: minmax(0, 1fr) 170px 110px 110px 84px; }
.tv-right { color: #7FE0D6; }
.tv-del { margin: 0; justify-self: end; }
.tv-add-title { margin: 0 0 16px; font-size: 16px; font-weight: 600; }
.tv-gap { margin-top: 20px; }
.tv-submit { margin-top: 24px; }
.tv code { overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .tv-tr.tk-th { display: none; }
  .tv-tr { grid-template-columns: minmax(0, 1fr) 84px; }
  .tv-tr > :nth-child(3), .tv-tr > :nth-child(4) { display: none; }
  .tv-tr > :nth-child(2) { grid-row: 2; }
}

/* Economy page and shop item editor */
.lv.eco { grid-template-columns: minmax(0, 1fr); }
.eco-gap { margin-top: 20px; }
.eco-tr { grid-template-columns: minmax(0, 1fr) 150px 100px minmax(0, 190px) 90px 70px; }
.eco-chip { display: inline-flex; border-radius: 999px; padding: 4px 12px; font-size: 14px; font-weight: 600; white-space: nowrap; background: #2C2E3A; }
.eco-edit { display: flex; justify-content: flex-end; }
.eco-add { margin-top: 10px; }
.eco-buyer { width: 160px; flex-shrink: 0; }
.eco-item { flex-grow: 1; min-width: 0; }
.eco-when { width: 120px; flex-shrink: 0; }
.si-types { height: auto; flex-wrap: wrap; gap: 2px; }
.si-types label { flex: 1 1 auto; }
.si-types span { padding: 10px 14px; white-space: nowrap; }
.si-text { min-height: 80px; }
/* Only the fields the picked type uses show. Browsers without :has() show them all. */
.si:has([name="type"][value="role"]:checked) :is(.si-f, .si-l, .si-n):not(.t-role),
.si:has([name="type"][value="temprole"]:checked) :is(.si-f, .si-l, .si-n):not(.t-temprole),
.si:has([name="type"][value="xp"]:checked) :is(.si-f, .si-l, .si-n):not(.t-xp),
.si:has([name="type"][value="boost"]:checked) :is(.si-f, .si-l, .si-n):not(.t-boost),
.si:has([name="type"][value="counting-save"]:checked) :is(.si-f, .si-l, .si-n):not(.t-counting-save),
.si:has([name="type"][value="manual"]:checked) :is(.si-f, .si-l, .si-n):not(.t-manual) { display: none; }
@media (max-width: 900px) {
  .eco-tr { grid-template-columns: minmax(0, 1fr) 80px 70px; }
  .eco-tr > :nth-child(2), .eco-tr > :nth-child(4), .eco-tr > :nth-child(5) { display: none; }
  .eco-buyer, .eco-when { width: auto; }
  .eco-order { flex-wrap: wrap; padding: 10px 16px; }
}

/* Verification page */
.vf-modes { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.vf-mode { display: flex; gap: 12px; align-items: flex-start; background: #16171D; border-radius: 14px; padding: 18px; cursor: pointer; }
.vf-mode input { width: 20px; height: 20px; margin: 0; accent-color: var(--sun); flex-shrink: 0; }
.vf-mode > span { display: flex; flex-direction: column; gap: 6px; }
.vf-mode .muted { font-size: 14px; line-height: 1.5; }
.vf-mode:has(input:checked) { box-shadow: 0 0 0 2px var(--sun); }
.vf-mode:has(input:focus-visible) { outline: 2px solid var(--sun); outline-offset: 2px; }
.vf-rules { min-height: 180px; }
.vf-embed { border-left-color: var(--sun); }
.vf-btn { background: #248046; }
@media (max-width: 900px) { .vf-modes { grid-template-columns: minmax(0, 1fr); } }

/* Welcome page */
.wl-check { display: flex; align-items: flex-end; padding-bottom: 14px; }
.wl-card { margin-top: 4px; }

/* Birthdays page */
.bd-lead { margin: 0 0 16px; font-size: 15px; }
.bd-greets { display: flex; flex-direction: column; gap: 8px; }
.bd-greets:has(.bd-greet) { margin-bottom: 8px; }
.bd-greet { display: flex; gap: 12px; align-items: flex-start; }
.bd-greet[hidden] { display: none; }
.bd-text { flex: 1; min-width: 0; }
.bd-textarea { min-height: 64px; padding-top: 12px; }
.bd-add { width: 100%; background: none; font: inherit; cursor: pointer; }
.bd-add:disabled { opacity: .5; cursor: default; }
.bd-saved { font-size: 14px; }
.bd-name { width: 160px; font-weight: 600; overflow-wrap: anywhere; }
.bd-date { flex: 1; min-width: 0; }
.bd-card { background: var(--pink); }
.bd-avatar { background: var(--teal); }
.bd-card-name { font-size: 12px !important; font-weight: 600 !important; }
@media (max-width: 720px) {
  .bd-greet { flex-direction: column; align-items: stretch; }
  .bd-name { width: auto; }
}

/* Self-roles editor */
.sr-modes { grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); }
.sr-mode { display: flex; gap: 10px; align-items: center; }
.sr-mode .lv-seg { flex: 1; }
.sr-mode .lv-seg span { white-space: nowrap; padding: 0 10px; }
button.tk-add { width: 100%; background: transparent; font: inherit; font-size: 15px; cursor: pointer; }
.sr-max { width: 80px; }
.sr-rows { display: flex; flex-direction: column; gap: 12px; }
.sr-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) 90px minmax(0, 0.8fr); gap: 12px; background: #16171D; border-radius: 12px; padding: 14px; }
.sr-row .lv-input { background: #1E1F27; }
.sr-wide { grid-column: 1 / -1; }
.sr-static { display: flex; align-items: center; color: var(--text-faint); }
.sr-embed { border-left-color: var(--sun); }
.sr-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.sr-b1 { background: #5865F2; } .sr-b2 { background: #4E5058; } .sr-b3 { background: #248046; } .sr-b4 { background: #DA373C; }
.sr-menu { display: flex; justify-content: space-between; align-items: center; height: 40px; padding: 0 12px; border-radius: 6px; background: #1E1F22; color: #949BA4; font-size: 14px; }
@media (max-width: 900px) { .sr-row, .sr-modes { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .sr-modes { grid-template-columns: minmax(0, 1fr); } }

/* Shared form bits, and the Anti-raid page (raid-) */
.lv-lead { margin: 0 0 18px; font-size: 15px; }
.lv-check-grid { row-gap: 14px; }
.lv-gap { margin-top: 24px; }
.raid-young { align-items: center; }
.raid-young-check { grid-column: span 2; }
@media (max-width: 720px) { .raid-young-check { grid-column: auto; } }
@media (max-width: 900px) { .am-lists { grid-template-columns: minmax(0, 1fr); } .am-exempt .pk { width: 100%; } .am-exempt { flex: 1; min-width: 0; } }
@media (max-width: 1180px) { .am-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .am-grid { grid-template-columns: minmax(0, 1fr); } }

/* Auto-responders */
.ar { padding: 40px 48px 80px; display: flex; flex-direction: column; gap: 24px; }
.ar h1, .ar-edit h1 { margin: 0; }
.ar-list { padding: 8px 28px; }
.ar-row { display: flex; align-items: center; gap: 14px; min-height: 76px; border-bottom: 1px solid #2C2E3A; padding: 12px 0; }
.ar-row:last-child { border-bottom: 0; }
.ar-row.off .ar-row-main { opacity: 0.55; }
.ar-row-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ar-row-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ar-trigger { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 14px; color: var(--sun); background: #16171D; border-radius: 8px; padding: 3px 8px; overflow-wrap: anywhere; }
.ar-tag { font-size: 12px; font-weight: 600; color: #B9BBC6; background: #2C2E3A; border-radius: 999px; padding: 3px 10px; }
.ar-preview { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-switch { display: flex; }
.ar-delete { position: relative; }
.ar-delete summary { list-style: none; }
.ar-delete summary::-webkit-details-marker { display: none; }
.ar-delete form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 2; background: #16171D; border-radius: 12px; padding: 8px; box-shadow: 0 16px 40px #0B0C1099; }
.ar-danger { background: #FF6B7A; color: #2B1B2E; }
.ar-empty { padding: 28px; }
.ar-empty h2 { margin: 0 0 8px; }
.ar-title { display: flex; align-items: center; gap: 14px; }
.ar-back { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--text); }
.ar-back:hover { background: #2C2E3A; color: var(--text); }
.ar-segs { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; margin-bottom: 16px; }
.ar-reply { margin-bottom: 12px; }
.ar-add { margin-top: 4px; }
.ar-tokens { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.ar-tokens .lv-tokens { margin-top: 0; }
.ar-segs .lv-seg span, .ar-more .lv-seg span { padding: 0 14px; white-space: nowrap; }
.ar-tokens .lv-tokens > .muted { width: 64px; flex-shrink: 0; }
.ar-more { display: flex; flex-wrap: wrap; gap: 24px 40px; align-items: flex-start; }
.ar-num { width: 160px; }
.ar-saved { display: none; }
.ar-edit:has(#fmt-saved:checked) .ar-saved { display: block; }
.ar-edit:has(#fmt-saved:checked) .ar-written { display: none; }
/* Responder preview: the member's trigger, then Omni's reply as Discord shows it */
.ar-side { padding-top: 72px; }
.ar-pv { flex-direction: column; gap: 18px; }
.ar-pv-msg { display: flex; gap: 12px; }
.ar-pv-msg > img, .ar-pv-avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.ar-pv-avatar { background: var(--orange); }
.ar-pv-member { color: #FF9A6E; }
.ar-pv-where { font-size: 12px; }
.ar-pv-embed { display: flex; }
.ar-pv-buttons, .ar-pv-reacts { display: flex; flex-wrap: wrap; gap: 6px; }
.ar-pv-button { background: #4E5058; color: #FFFFFF; border-radius: 4px; padding: 4px 12px; font-size: 13px; font-weight: 500; }
.ar-pv-react { background: #2B2D31; border: 1px solid #3F4147; border-radius: 8px; padding: 1px 8px; font-size: 13px; }
.ar-pv-none { margin: 0; font-size: 14px; }
.ar-side [hidden] { display: none; }
@media (max-width: 720px) {
  .ar { padding: 24px var(--gutter) 64px; }
  .ar-list { padding: 4px 16px; }
  .ar-row { flex-wrap: wrap; }
  .ar-row-main { flex-basis: 100%; }
  .ar > .lv-panel-head { flex-direction: column; align-items: flex-start; }
  .ar-segs { justify-content: flex-start; }
}

/* Level roles */
.lr-head, .lr-row { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 12px; }
.lr-head { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.lr-row { margin-bottom: 12px; }
.lr-msg { grid-column: 1 / -1; margin-top: -4px; }
.lv-roles-link { margin-top: 16px; }

/* A form that failed to save keeps its bar: the fixed values still need saving */
form[data-dirty-ready]:not([data-changed]):not([data-invalid]) .lv-bar { transform: translateY(calc(100% + 40px)); opacity: 0; pointer-events: none; visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .lv-bar { transition: none; } }

/* Tablet */
@media (max-width: 1180px) {
  :root { --gutter: 48px; }
  .hero .wrap, .customize .wrap, .leveling .wrap, .welcome-section .wrap { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .hero, .customize, .leveling, .responders, .bento-section, .welcome-section, .pricing { min-height: 0; padding-bottom: 96px; }
  .responders, .bento-section, .welcome-section, .pricing { padding-top: 24px; }
  .hero-copy, .side-copy { padding-top: 0; }
  .preview { padding-top: 0; }
  .welcome-section .side-copy { order: -1; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: minmax(300px, auto); }
  .tile-automod { grid-column: span 2; }
  .tile-tickets, .tile-feeds, .tile-sun, .tile-birthdays { grid-column: span 1; }
}

/* Phone-only and desktop-only pieces, for where the phone board differs. */
.m-only { display: none; }

/* Phone: follows the mockup's 390px "Website: home on a phone" board. */
@media (max-width: 720px) {
  :root { --gutter: 16px; }
  .d-only { display: none !important; }
  .m-only { display: revert; }
  h2 { font-size: 30px; }
  .lead { font-size: 16px; color: var(--text-faint); }
  .panel { border-radius: 14px; }
  .field { border-radius: 10px; min-height: 44px; padding: 0 14px; }
  .label { margin-bottom: 6px; }
  .chip { height: 32px; font-size: 14px; }
  .chip-dashed { height: 34px; }
  .btn { gap: 8px; }
  .actions .btn { flex: 1 1 100%; }

  /* Header */
  .site-header .wrap { height: 64px; position: relative; }
  .site-header .brand { gap: 10px; }
  .site-header .brand img { width: 36px; height: 36px; border-radius: 10px; }
  .site-header .brand span { font-size: 22px; }
  .site-nav, .header-actions { display: none; }
  .mobile-menu { display: block; }

  /* Hero */
  .hero { padding: 40px 0 48px; }
  .hero .wrap { gap: 28px; }
  .hero-copy { gap: 20px; }
  .hero h1 { font-size: 40px; line-height: 1.08; letter-spacing: 0; }
  .hero .lead { font-size: 17px; color: var(--text-muted); }
  .hero .actions { gap: 20px; }
  .hero-visual { display: flex; flex-direction: column; gap: 14px; }
  .hero-msg { padding: 14px; }
  .hero-msg .discord-msg { gap: 10px; }
  .hero-msg .discord-msg > img { width: 36px; height: 36px; }
  .hero-msg .body { gap: 8px; }
  .hero-msg .discord-meta { gap: 6px; font-size: 14px; }
  .hero-msg .app-tag { font-size: 10px; padding: 2px 5px; }
  .hero-msg .discord-text { font-size: 14px; line-height: 1.45; }
  .card-hero { aspect-ratio: auto; height: 132px; border-radius: 12px; }
  .card-hero .inner { inset: 16px 14px; border-width: 3px; border-radius: 12px; box-shadow: 4px 4px 0 var(--ink); gap: 12px; padding: 0 12px; }
  .card-hero .avatar { width: 60px; height: 60px; border-width: 3px; }
  .card-hero .info { gap: 6px; }
  .card-hero .name { font-size: 17px; }
  .card-hero .lvl { font-size: 14px; }
  .card-hero .bar { height: 18px; border-width: 3px; }
  .card-hero .sub { font-size: 11px; }
  .card-hero .deco-1 { left: 12px; top: 8px; width: 8px; height: 8px; }
  .card-hero .deco-2 { right: 22px; top: 6px; width: 20px; height: 7px; }
  .card-hero .deco-3 { right: 8px; bottom: 10px; width: 8px; height: 8px; }
  .hero-settings { margin: 0; width: 100%; padding: 18px; box-shadow: 0 20px 48px #0B0C1066; }
  .hero-settings .title { margin-bottom: 14px; }
  .hero-settings .field-tall { padding: 12px 14px; }
  .hero-settings .field-select { font-size: 14px; padding: 0 12px; gap: 4px; white-space: nowrap; }
  .hero-settings .field-select svg { width: 14px; height: 14px; flex-shrink: 0; }
  .hero-settings .two-col { gap: 12px; margin-top: 14px; }
  .hero-settings .swatches { gap: 7px; }
  .hero-settings .swatch { width: 20px; height: 20px; }
  .hero-settings .swatch.on { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--text); }

  /* Every section below the hero: 40/48px padding and a top border */
  .customize, .leveling, .responders, .bento-section, .welcome-section, .pricing {
    min-height: 0; padding: 40px 0 48px; border-top: 1px solid var(--line);
  }

  /* Customize: the three cards stacked, no controls */
  .customize .wrap { display: block; }
  .demo-copy { gap: 18px; }
  .demo-controls, .customize .preview { display: none; }
  .phone-demo { display: flex; flex-direction: column; gap: 18px; }
  .phone-demo .chip.on { font-weight: 600; }
  .phone-demo > .btn { margin-top: 6px; }
  .cap { margin-top: 6px; font-size: 13px; font-weight: 700; letter-spacing: .4px; color: var(--text-faint); text-transform: uppercase; }
  .pcard { position: relative; overflow: hidden; border-radius: 14px; }
  .pcard .deco { position: absolute; border-radius: 999px; }
  .pcard .inner {
    position: absolute; display: flex; align-items: center; color: var(--ink);
    background: var(--cream); border: 3px solid var(--ink); border-radius: 12px; box-shadow: 4px 4px 0 var(--ink);
  }
  .pcard .avatar { flex-shrink: 0; width: 70px; height: 70px; border-radius: 50%; border: 3px solid var(--ink); }
  .pcard-rank { height: 150px; background: var(--sun); }
  .pcard-rank .deco-1 { left: 16px; top: 10px; width: 10px; height: 10px; background: var(--teal); }
  .pcard-rank .deco-2 { right: 30px; top: 8px; width: 24px; height: 8px; background: var(--violet); transform: rotate(28deg); }
  .pcard-rank .deco-3 { left: 40px; bottom: 6px; width: 22px; height: 7px; background: var(--violet); transform: rotate(-18deg); }
  .pcard-rank .inner { inset: 20px 18px; gap: 14px; padding: 0 14px; }
  .pcard-rank .avatar { background: var(--pink); box-shadow: 0 0 0 4px var(--gold), 0 0 0 7px var(--ink); }
  .pcard-rank .info { display: flex; flex-direction: column; gap: 7px; flex-grow: 1; min-width: 0; }
  .pcard-rank .row { display: flex; justify-content: space-between; align-items: baseline; }
  .pcard-rank .name { font-family: var(--display); font-size: 19px; font-weight: 700; }
  .pcard-rank .lvl { font-family: var(--display); font-size: 15px; font-weight: 600; }
  .pcard-rank .bar { height: 20px; border-radius: 999px; border: 3px solid var(--ink); background: var(--cream-deep); overflow: hidden; }
  .pcard-rank .bar span { display: block; width: 64%; height: 100%; background: var(--pink); }
  .pcard-rank .sub { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--ink-soft); }
  .pmsg { display: flex; gap: 10px; background: var(--panel-raised); border-radius: 14px; padding: 12px 14px; }
  .pmsg > img { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; }
  .pmsg .body { display: flex; flex-direction: column; gap: 4px; }
  .pmsg .discord-meta { gap: 6px; font-size: 14px; }
  .pmsg .discord-meta b { font-weight: 700; }
  .pmsg .app-tag { font-size: 10px; padding: 2px 5px; }
  .pmsg .discord-text { font-size: 14px; line-height: 1.45; }
  .pcard-welcome { height: 210px; background: #2B2D5C; }
  .pcard-welcome .deco-1 { left: 20px; top: 14px; width: 10px; height: 10px; background: var(--sun); }
  .pcard-welcome .deco-2 { right: 34px; top: 16px; width: 24px; height: 8px; background: var(--placeholder); transform: rotate(-24deg); }
  .pcard-welcome .deco-3 { left: 50px; bottom: 12px; width: 22px; height: 8px; background: var(--placeholder); transform: rotate(18deg); }
  .pcard-welcome .inner { inset: 26px 22px; flex-direction: column; justify-content: center; gap: 6px; }
  .pcard-welcome .avatar { background: var(--blue); }
  .pcard-welcome .title { font-family: var(--display); font-size: 21px; font-weight: 700; }
  .pcard-welcome .sub { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
  .pcard-fish { height: 200px; background: #1E6F8C; overflow: visible; }
  .pcard-fish .deco-1 { left: 16px; top: 10px; width: 10px; height: 10px; background: var(--cream); }
  .pcard-fish .deco-2 { right: 30px; bottom: 8px; width: 24px; height: 8px; background: var(--teal); transform: rotate(-20deg); }
  .pcard-fish .inner { inset: 22px 18px; gap: 14px; padding: 0 14px; }
  .pcard-fish .fish-box { flex-shrink: 0; width: 98px; height: 98px; border-radius: 14px; border: 3px solid var(--ink); background: #DDF1F7; display: grid; place-items: center; }
  .pcard-fish .fish-box svg { width: 66px; height: 66px; }
  .pcard-fish .info { display: flex; flex-direction: column; gap: 6px; flex-grow: 1; min-width: 0; }
  .pcard-fish .rarity { align-self: flex-start; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 8px; background: var(--rarity); color: var(--rarity-fg); }
  .pcard-fish .fish-name { font-family: var(--display); font-size: 24px; font-weight: 700; }
  .pcard-fish .stats { display: flex; gap: 18px; }
  .pcard-fish .stats b { display: block; font-family: var(--display); font-size: 18px; font-weight: 700; }
  .pcard-fish .stats span { display: block; font-size: 12px; font-weight: 600; color: var(--ink-soft); }
  .pcard-fish .stamp {
    position: absolute; right: 24px; top: 8px; transform: rotate(6deg);
    background: var(--gold); color: var(--ink); border: 3px solid var(--ink); border-radius: 8px;
    padding: 3px 9px; font-family: var(--display); font-size: 13px; font-weight: 700;
  }

  /* Leveling: the button moves under the panel */
  .leveling .wrap { display: flex; flex-direction: column; gap: 18px; }
  .leveling .side-copy { display: contents; }
  .leveling .side-copy .actions { order: 2; }
  .xp-panel { height: auto; padding: 18px; gap: 18px; }
  .xp-panel header span:first-child { font-size: 16px; }
  .xp-panel .chip-sun { height: 28px; font-size: 13px; }
  .xp-grid { gap: 12px; }
  .days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
  .days .chip { height: 36px; min-width: 0; padding: 0; font-size: 13px; }
  .level-roles { gap: 0; }
  .level-roles .label { margin-bottom: 6px; }
  .level-roles .chip-row { gap: 8px; }

  /* Auto-responders */
  .responders .wrap { align-items: stretch; gap: 14px; }
  .responders .center { display: contents; text-align: left; }
  .responders .lead { max-width: none; margin-bottom: 4px; }
  .flow { display: flex; flex-direction: column; gap: 14px; width: auto; }
  .flow .panel { padding: 16px; gap: 10px; }
  .flow .field-text { padding: 12px 14px; }
  .then { gap: 8px; align-items: flex-start; }
  .responders .wrap > .btn { margin-top: 4px; }

  /* Moderation and community */
  .bento-section .wrap { gap: 14px; }
  .bento-section h2 { margin-bottom: 4px; }
  .bento { display: flex; flex-direction: column; gap: 14px; }
  .tile { border-radius: 14px; padding: 18px; gap: 14px; }
  .tile h3 { font-size: 18px; }
  .tile p { line-height: 1.5; }
  .tile-automod { padding: 18px; gap: 14px; }
  .rules { gap: 14px; }
  .rule { gap: 8px; padding: 12px; font-size: 14px; }
  .rule .act { font-size: 12px; padding: 4px 9px; border-radius: 7px; }
  .rule .val { padding: 3px 9px; border-radius: 7px; }
  .tile-tickets { justify-content: flex-start; gap: 16px; }
  .tickets-bottom { display: contents; }
  .tile-sun { display: block; height: 200px; padding: 20px; }
  .tile-sun > div { position: relative; max-width: 200px; }
  .tile-sun h3 { font-size: 22px; line-height: 1.15; }
  .tile-sun p { margin-top: 8px; line-height: 1.45; }
  .tile-sun img { right: -18px; bottom: -22px; width: 160px; height: 160px; }
  .tile-birthdays .field-text { padding: 12px 14px; }

  /* Welcome: heading first, then the card and the panel */
  .welcome-section .wrap { display: flex; flex-direction: column; gap: 16px; }
  .welcome-section .side-copy, .welcome-visual { display: contents; }
  .welcome-section h2, .welcome-section .lead { order: -1; }
  .welcome-section .lead { margin-bottom: 4px; }
  .welcome-card { position: relative; width: auto; height: 210px; border-radius: 14px; }
  .welcome-card .deco-1 { left: 20px; top: 14px; width: 10px; height: 10px; }
  .welcome-card .deco-2 { left: auto; right: 34px; top: 16px; width: 24px; height: 8px; }
  .welcome-card .deco-3 { left: 50px; top: auto; bottom: 12px; width: 22px; height: 8px; }
  .welcome-card .inner { inset: 26px 22px; gap: 6px; border-radius: 12px; box-shadow: 4px 4px 0 var(--ink); }
  .welcome-card .avatar { width: 70px; height: 70px; }
  .welcome-card .title { font-size: 21px; }
  .welcome-card .sub { font-size: 13px; }
  .welcome-roles { position: static; width: auto; padding: 16px; box-shadow: none; }

  /* Pricing: name and price on one row */
  .pricing .wrap { align-items: stretch; gap: 14px; }
  .pricing h2 { text-align: left; margin-bottom: 4px; }
  .plans { display: flex; flex-direction: column; gap: 14px; width: auto; }
  .plan { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 14px 12px; padding: 22px; }
  .plan-premium { border-radius: 14px; }
  .plan .name { font-size: 18px; }
  .plan .price { font-size: 30px; text-align: right; }
  .plan .price small { display: block; margin-top: 6px; font-size: 13px; font-weight: 400; }
  .plan .perks, .plan .btn { grid-column: 1 / -1; }

  /* Final call to action */
  .cta-section { padding: 8px 0 40px; }
  .cta { height: 300px; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 18px; padding: 26px 20px; }
  .cta-copy { display: contents; }
  .cta-title { position: relative; max-width: 230px; font-size: 28px; line-height: 1.1; }
  .cta-copy > div { position: relative; }
  .cta .btn { width: 180px; }
  .cta img { position: absolute; right: -28px; bottom: -36px; width: 190px; height: 190px; margin: 0; }

  /* Footer: brand on top, Product and Help side by side */
  .site-footer { margin: 0; padding: 32px 0 40px; border-top: 1px solid var(--line); }
  .footer-grid { margin: 0; padding: 0; border: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; }
  .footer-brand { grid-column: 1 / -1; gap: 12px; }
  .footer-brand .brand { gap: 10px; }
  .footer-brand .brand img { width: 32px; height: 32px; border-radius: 9px; }
  .footer-brand .brand span { font-size: 20px; }
  .footer-brand p { max-width: none; }

}

/* Inner pages: tablet */
@media (max-width: 1180px) {
  .servers-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-side { width: 240px; }
  .dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-modules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lv { grid-template-columns: minmax(0, 1fr); }
  .lv-side { padding-top: 0; position: static; }
  .lv-bar { left: 288px; }
  .legal { grid-template-columns: 200px minmax(0, 1fr); gap: 48px; }
  .s-body > .wrap { grid-template-columns: minmax(0, 1fr); }
  .shop-side { max-width: 520px; }
  .p-plans .wrap { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin: 0 auto; }
  .p-faq .wrap { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .p-row { grid-template-columns: minmax(0, 1fr) 120px 120px; }
  .f-moderation .wrap, .f-feeds > .wrap { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .community-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; }
  .leveling-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .week-board { grid-column: span 2; }
  .game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .guide { grid-template-columns: 220px minmax(0, 1fr); gap: 48px; }
  .toc { display: none; }
  .c-head .wrap { flex-direction: column; align-items: stretch; }
  .c-search .text-input { width: 100%; }
  #command-results { grid-template-columns: 200px minmax(0, 1fr); gap: 32px; }
  .c-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Inner pages: phone */
@media (max-width: 720px) {
  .servers { padding: 32px 0 56px; }
  .servers-head { flex-direction: column; align-items: stretch; }
  .servers-search .text-input { width: 100%; }
  .servers-grid { grid-template-columns: minmax(0, 1fr); }
  .dash-user-name { display: none; }
  .dash { flex-direction: column; }
  .dash-side { width: auto; padding: 12px 16px; flex-direction: row; align-items: center; justify-content: space-between; }
  .dash-side-brand { padding: 0 4px; }
  .dash-menu-btn, .dash-menu-x { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: #16171D; color: var(--text); cursor: pointer; padding: 0; }
  .dash-menu-btn svg, .dash-menu-x svg { width: 22px; height: 22px; }
  .dash-menu-btn:focus-visible, .dash-menu-x:focus-visible { outline: 2px solid var(--sun); outline-offset: 1px; }
  .dash-menu:not(:popover-open) { display: none; }
  .dash-menu:popover-open { position: fixed; inset: 0 auto 0 0; width: min(320px, 88vw); height: 100dvh; max-height: none; box-sizing: border-box; padding: 68px 16px 32px; overflow-y: auto; background: #1E1F27; box-shadow: 24px 0 60px #0B0C1080; }
  .dash-menu::backdrop { background: #0B0C1099; }
  .dash-menu-x { position: absolute; top: 12px; right: 12px; background: transparent; color: var(--text-muted); }
  .dash-top { height: 60px; padding: 0 16px; }
  .dash-content { padding: 24px 16px; }
  .dash-stats, .dash-modules { grid-template-columns: minmax(0, 1fr); }
  .dash-search { max-width: none; }
  .dash-head-actions { width: 100%; }
  .dash-history { padding: 4px 16px; }
  .dash-history-row { flex-wrap: wrap; gap: 4px 12px; padding: 10px 0; }
  .dash-history-text { flex-basis: 100%; padding: 0; }
  .lv { padding: 24px 16px 120px; gap: 24px; }
  .lv-panel { padding: 20px; }
  .lv-grid-2, .lv-grid-3 { grid-template-columns: minmax(0, 1fr); }
  .lv-day span { width: 40px; }
  .lv-rate { width: 100%; }
  .lv-bar { left: 16px; right: 16px; bottom: 16px; height: auto; padding: 12px 12px 12px 16px; font-size: 14px; flex-wrap: wrap; row-gap: 10px; }
  .legal { grid-template-columns: minmax(0, 1fr); padding-top: 32px; padding-bottom: 56px; gap: 28px; }
  .legal-toc { display: none; }
  .legal-head h1 { font-size: 36px; }
  .s-intro { padding: 40px 0 28px; }
  .s-intro h1, .p-intro h1 { font-size: 36px; }
  .s-intro .lead, .p-intro .lead { font-size: 17px; }
  .s-body { padding-bottom: 56px; }
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .s-tabs { align-self: stretch; display: flex; }
  .s-tabs .tab { flex: 1; padding: 0 8px; }
  .p-intro { padding: 40px 0 32px; }
  .p-compare { padding-top: 56px; }
  .p-faq { padding: 56px 0; }
  .p-compare h2, .p-faq h2 { font-size: 28px; }
  .p-row { grid-template-columns: minmax(0, 1fr) 72px 84px; padding: 10px 14px; font-size: 14px; gap: 8px; }
  .faq { padding: 0 16px; }
  .faq summary { height: auto; min-height: 56px; font-size: 16px; }
  .inner .site-footer { padding: 32px 0 40px; }
  .f-intro { padding: 40px 0 40px; }
  .f-intro .wrap { gap: 20px; }
  .f-intro h1 { font-size: 36px; }
  .f-intro .lead { font-size: 17px; }
  .f-section { padding: 40px 0 48px; }
  .sechead h2, .games-copy h2 { font-size: 28px; }
  .badge { width: 44px; height: 44px; border-radius: 12px; }
  .it-grid, .community-grid, .leveling-grid, .game-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .welcome-tile, .week-board { grid-column: auto; grid-row: auto; }
  .community-grid { grid-template-rows: none; }
  .welcome-tile { gap: 20px; min-height: 0; }
  .f-stack { gap: 24px; }
  .f-games { padding: 24px; gap: 24px; }
  .games-head { flex-direction: column; align-items: flex-start; }
  .f-feeds { padding: 48px 0; }
  .f-cta { padding: 16px 0 48px; }
  .f-cta-box { height: auto; flex-direction: column; align-items: flex-start; padding: 28px 20px; }
  .f-cta-title { font-size: 28px; }
  .guide { grid-template-columns: minmax(0, 1fr); padding-top: 24px; padding-bottom: 56px; gap: 32px; }
  .guide-side { display: none; }
  .guide-picker { display: block; }
  .guide-article h1 { font-size: 36px; }
  .g-step { gap: 14px; }
  .next { grid-template-columns: minmax(0, 1fr); }
  .c-head { padding: 40px 0 24px; }
  .c-head h1 { font-size: 40px; }
  #command-results { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .cats { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .cat { flex-shrink: 0; gap: 8px; height: 38px; background: var(--panel); }
  .cat.on { background: var(--chip); }
  .c-list { gap: 32px; }
  .not-found { min-height: 0; padding: 40px 0 56px; }
  .not-found .wrap { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .not-found h1 { font-size: 40px; }
  .nf-art { width: 260px; justify-self: start; }
}

/* Public leaderboard */
.lb { padding: 40px 0 96px; }
.lb code { font-family: 'JetBrains Mono', ui-monospace, monospace; color: var(--sun); }
.lb-error { margin: 40px 0; }
.lb-banner { position: relative; height: 180px; border-radius: var(--radius); }
.lb-banner-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.lb-id { position: absolute; left: 40px; bottom: -48px; display: flex; align-items: flex-end; gap: 24px; max-width: calc(100% - 80px); }
.lb-icon { width: 120px; height: 120px; flex-shrink: 0; border-radius: 28px; border: 6px solid var(--bg); background: var(--ink); object-fit: cover; }
.lb-initials { display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 40px; font-weight: 700; }
.lb-id h1 { margin: 0 0 56px; font-family: var(--display); font-size: 40px; line-height: 1.1; color: var(--ink); overflow-wrap: anywhere; }
.lb-banner-img ~ .lb-id h1 { color: var(--text); text-shadow: 0 2px 12px #0009; }
.lb-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; padding-top: 80px; }
.lb-main { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.lb-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.lb-tabs { overflow-x: auto; max-width: 100%; }
.tab.on { background: var(--chip); color: var(--text); }
.lb-count { font-size: 14px; }

.lb-podium { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: end; }
.lb-place { background: var(--panel); border-radius: var(--radius); padding: 24px 16px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 10px; text-align: center; min-width: 0; }
.lb-place-1 { order: 2; min-height: 260px; background: #2E2A1C; }
.lb-place-2 { order: 1; min-height: 220px; }
.lb-place-3 { order: 3; min-height: 200px; }
.lb-pav { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 4px var(--podium); }
.lb-place-1 .lb-pav { width: 88px; height: 88px; }
.lb-place-2 .lb-pav { width: 72px; height: 72px; }
.lb-place-1 { --podium: var(--gold); }
.lb-place-2 { --podium: #CBD2DB; }
.lb-place-3 { --podium: #E3965C; }
.lb-pname { font-size: 18px; max-width: 100%; overflow-wrap: anywhere; }
.lb-place-1 .lb-pname { font-size: 20px; }
.lb-pmeta { font-size: 14px; color: var(--text-faint); }
.lb-pnum { font-family: var(--display); font-size: 22px; font-weight: 700; color: var(--podium); }
.lb-place-1 .lb-pnum { font-size: 26px; }
.lb-place.lb-you { box-shadow: 0 0 0 2px var(--sun); }

.lb-table { width: 100%; border-collapse: separate; border-spacing: 0 8px; margin: -8px 0; font-size: 15px; table-layout: fixed; }
.lb-table th { height: 28px; padding: 0 20px 0 0; text-align: left; font-size: 13px; font-weight: 700; color: #7C7F8C; }
.lb-table th:first-child { width: 56px; padding-left: 20px; }
.lb-table th:nth-child(3) { width: 140px; }
.lb-table th.lb-th-lv { width: 200px; text-align: right; }
.lb-row td { height: 64px; padding: 0 20px 0 0; background: #22242C; }
.lb-row td:first-child { padding-left: 20px; border-radius: 12px 0 0 12px; }
.lb-row td:last-child { border-radius: 0 12px 12px 0; }
.lb-row.lb-you td { background: #2E2A1C; box-shadow: inset 0 2px 0 var(--sun), inset 0 -2px 0 var(--sun); }
.lb-row.lb-you td:first-child { box-shadow: inset 2px 2px 0 var(--sun), inset 0 -2px 0 var(--sun); }
.lb-row.lb-you td:last-child { box-shadow: inset -2px 2px 0 var(--sun), inset 0 -2px 0 var(--sun); }
.lb-rank { font-family: var(--display); font-weight: 700; font-size: 17px; color: var(--text-faint); }
.lb-you .lb-rank { color: var(--sun); }
.lb-who { display: flex; align-items: center; gap: 14px; font-weight: 600; min-width: 0; }
.lb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-you-tag { color: var(--sun); font-weight: 500; }
.lb-av { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; object-fit: cover; }
.lb-stat { color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-lv { display: flex; align-items: center; justify-content: flex-end; gap: 12px; font-weight: 600; }
.lb-lvn { min-width: 2ch; text-align: right; }
.lb-bar { appearance: none; width: 110px; height: 8px; border: 0; border-radius: 999px; background: #33364A; overflow: hidden; }
.lb-bar::-webkit-progress-bar { background: #33364A; border-radius: 999px; }
.lb-bar::-webkit-progress-value { background: var(--sun); border-radius: 999px; }
.lb-bar::-moz-progress-bar { background: var(--sun); border-radius: 999px; }
.lb-more { display: flex; justify-content: center; }
.lb-more:empty { display: none; }
.lb-foot { margin: 0; font-size: 14px; line-height: 1.6; }

.lb-side { display: flex; flex-direction: column; gap: 16px; }
.lb-card { background: var(--panel); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.lb-card p { margin: 0; font-size: 15px; line-height: 1.6; }
.lb-card-title { font-size: 17px; }
.lb-roles { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.lb-roles li { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; }
.lb-role { border-radius: 999px; padding: 4px 12px; font-weight: 600; background: color-mix(in srgb, currentColor 15%, transparent); overflow-wrap: anywhere; }
.lb-cta { background: var(--sun); color: var(--ink); }
.lb-cta b { font-family: var(--display); font-size: 20px; }
.lb-cta .btn { align-self: flex-start; }

@media (max-width: 1180px) {
  .lb-body { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .lb { padding-top: 24px; }
  .lb-banner { height: 120px; }
  .lb-id { left: 20px; bottom: -40px; gap: 16px; max-width: calc(100% - 40px); }
  .lb-icon { width: 88px; height: 88px; border-radius: 22px; border-width: 5px; }
  .lb-initials { font-size: 30px; }
  .lb-id h1 { font-size: 26px; margin-bottom: 48px; }
  .lb-body { padding-top: 64px; }
  .lb-podium { grid-template-columns: minmax(0, 1fr); }
  /* The podium becomes three rows: place, avatar, then name over level. */
  .lb-place, .lb-place-1, .lb-place-2, .lb-place-3 {
    order: 0; min-height: 0; padding: 16px; text-align: left;
    display: grid; grid-template-columns: 28px 48px minmax(0, 1fr); column-gap: 14px; row-gap: 2px; align-items: center;
  }
  .lb-place .lb-pnum { order: -1; grid-row: 1 / 3; }
  .lb-place .lb-pav, .lb-place-1 .lb-pav, .lb-place-2 .lb-pav { grid-row: 1 / 3; width: 48px; height: 48px; }
  .lb-pname, .lb-place-1 .lb-pname { font-size: 16px; }
  .lb-table th:first-child { width: 44px; padding-left: 12px; }
  .lb-table th:nth-child(3) { width: 84px; }
  .lb-table th.lb-th-lv { width: 52px; }
  .lb-row td:first-child { padding-left: 12px; }
  .lb-row td { padding-right: 12px; height: 56px; }
  .lb-bar { display: none; }
  .lb-who { gap: 10px; }
  .lb-av { width: 28px; height: 28px; }
}

/* Card styles: dashboard/{guild}/cards. Follows the mockup's "Card styles" board. */
.cs { grid-template-columns: minmax(0, 1fr); }
.cs-default { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cs-head { align-items: flex-start; }
.cs-tabs { display: flex; gap: 4px; flex-wrap: wrap; background: #1E1F27; border-radius: 12px; padding: 4px; align-self: flex-start; }
.cs-tabs a { padding: 9px 16px; border-radius: 9px; color: var(--text-faint); font-size: 14px; font-weight: 600; text-decoration: none; }
.cs-tabs a:hover { color: var(--text); }
.cs-tabs a.on { background: #30323D; color: var(--text); }
.cs-std-note { margin: -12px 0 0; font-size: 14px; }
.cs-cols { display: grid; grid-template-columns: minmax(340px, 440px) minmax(0, 1fr); gap: 24px; align-items: start; }
.cs-right { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.cs-gap { margin-top: 20px; }
.cs-sub { margin: 8px 0 16px; font-size: 14px; }
.cs-sub code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 13px; color: var(--sun); }
.cs-empty { margin: 0; font-size: 14px; }

/* Background panes: only the picked mode's pane shows (no JS needed). */
.cs-pane { display: none; margin-top: 16px; }
.cs:has(#bg-preset:checked) .cs-pane-preset, .cs:has(#bg-upload:checked) .cs-pane-upload, .cs:has(#bg-color:checked) .cs-pane-color { display: block; }
.cs-backdrops { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cs-backdrop, .cs-upload { display: flex; flex-direction: column; gap: 6px; cursor: pointer; font-size: 13px; color: var(--text-muted); }
.cs-backdrop input, .cs-upload input, .cs-layout input, .cs-pills input, .cs-chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cs-backdrop svg { display: block; width: 100%; height: auto; border-radius: 10px; }
.cs-backdrop input:checked + svg, .cs-upload input:checked + img { box-shadow: 0 0 0 3px #1E1F27, 0 0 0 5px var(--sun); }
.cs-backdrop input:focus-visible + svg, .cs-upload input:focus-visible + img { outline: 2px solid var(--sun); outline-offset: 6px; }
.cs-backdrop input:checked ~ span, .cs-upload input:checked ~ span { color: var(--text); }
.cs-uploads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cs-upload img, .cs-lib-item img, .cs-pending-row img { display: block; width: 100%; aspect-ratio: 11 / 4; object-fit: cover; border-radius: 10px; background: #2C2E3A; }
.cs-upload span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-swatches { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cs-swatch { width: 32px; height: 32px; padding: 0; border: 0; background: none; border-radius: 9px; cursor: pointer; }
.cs-swatch.round { border-radius: 50%; }
.cs-swatch svg { display: block; width: 32px; height: 32px; }
.cs-swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px #1E1F27, 0 0 0 5px var(--text); }
.cs-swatch:focus-visible { outline: 2px solid var(--sun); outline-offset: 4px; }
.cs-hex { width: 110px; height: 40px; margin-left: auto; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 14px; }
.cs-range { width: 100%; accent-color: var(--sun); }
.cs-range:focus-visible { outline: 2px solid var(--sun); outline-offset: 4px; }

/* Layout pictures: a tiny card per layout. */
.cs-layouts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cs-layout { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); cursor: pointer; }
.cs-layout-pic { display: flex; align-items: center; gap: 8px; width: 100%; height: 56px; box-sizing: border-box; padding: 10px; border-radius: 10px; background: #16171D; }
.cs-layout-pic i { width: 22px; height: 22px; border-radius: 50%; background: #4A4D5C; flex-shrink: 0; }
.cs-layout-pic b { display: flex; flex-direction: column; gap: 5px; flex: 1; }
.cs-layout-pic em { display: block; height: 5px; border-radius: 3px; background: #4A4D5C; }
.cs-layout-pic em + em { width: 60%; }
.cs-lp-centered { flex-direction: column; justify-content: center; gap: 4px; padding: 6px; }
.cs-lp-centered i { width: 16px; height: 16px; }
.cs-lp-centered b { flex: 0; width: 60%; align-items: center; gap: 3px; }
.cs-lp-compact { padding: 14px 10px; }
.cs-lp-compact i { width: 16px; height: 16px; }
.cs-layout input:checked + .cs-layout-pic { box-shadow: 0 0 0 3px #1E1F27, 0 0 0 5px var(--sun); }
.cs-layout input:focus-visible + .cs-layout-pic { outline: 2px solid var(--sun); outline-offset: 6px; }
.cs-layout input:checked ~ span:last-child { color: var(--text); }

/* Pills (font, panel, shape) and element chips. */
.cs-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.cs-pills label { display: flex; cursor: pointer; }
.cs-pills span { display: flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; box-sizing: border-box; padding: 0 14px; border-radius: 10px; background: #16171D; color: var(--text-muted); font-size: 14px; font-weight: 600; }
.cs-pills input:checked + span { background: #2C2E3A; color: var(--text); box-shadow: inset 0 0 0 2px var(--sun); }
.cs-pills input:focus-visible + span { outline: 2px solid var(--sun); outline-offset: 2px; }
.cs-shapes span { padding: 0; width: 44px; }
.cs-shapes i { display: block; width: 18px; height: 18px; background: currentColor; }
.cs-shape-circle { border-radius: 50%; }
.cs-shape-rounded { border-radius: 5px; }
.cs-shape-square { border-radius: 1px; }
.cs-font-playful { font-family: 'Fredoka', sans-serif; font-weight: 600; }
.cs-font-clean { font-family: 'Figtree', sans-serif; }
.cs-font-serif { font-family: Georgia, 'Times New Roman', serif; }
.cs-font-mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.cs-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.cs-chips label { display: flex; cursor: pointer; }
.cs-chips span { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid #4A4D5C; color: var(--text-faint); font-size: 14px; font-weight: 500; }
.cs-chips svg { opacity: .25; }
.cs-chips input:checked + span { background: #FFD23F26; border-color: #FFD23F66; color: var(--sun); }
.cs-chips input:checked + span svg { opacity: 1; }
.cs-chips input:focus-visible + span { outline: 2px solid var(--sun); outline-offset: 2px; }
.cs-toggle-row { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 16px; cursor: pointer; }
.cs-toggle-row > span:first-child { display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.cs-toggle-row .muted { font-size: 13px; line-height: 1.5; }
.cs-reset { margin-top: 24px; width: 100%; }

/* Preview. */
.cs-preview-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.cs-as { height: 40px; }
.cs-as span { padding: 0 14px; white-space: nowrap; }
@media (max-width: 720px) {
  .cs-as { height: auto; min-height: 40px; width: 100%; }
  .cs-as label { min-width: 0; }
  .cs-as span { padding: 6px 8px; white-space: normal; text-align: center; }
}
.cs-panel-shape { display: flex; gap: 20px; flex-wrap: wrap; }
.cs-panel-shape .cs-pills { flex-wrap: nowrap; }
.cs-preview-wrap.htmx-request .csp { opacity: .85; }
.csp { position: relative; aspect-ratio: 7 / 4; max-height: 340px; border-radius: 20px; overflow: hidden; container-type: inline-size; color: var(--ink); }
.csp-layer { position: absolute; inset: 0; width: 100%; height: 100%; }
.csp-img { object-fit: cover; }
.csp-tag { position: absolute; left: 14px; top: 14px; z-index: 1; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: #0B0C10B3; color: #FFFFFF; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.csp-panel { position: absolute; left: 7%; right: 7%; top: 50%; transform: translateY(-50%); z-index: 1; display: flex; align-items: center; gap: 4.6cqw; padding: 4.3cqw; border-radius: 3.6cqw; background: var(--cream); border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); --sub: var(--ink-soft); --track: var(--cream-deep); }
.csp-p-dark .csp-panel { background: #1C1D24; border-color: #0B0C10; box-shadow: 6px 6px 0 #0B0C10; color: var(--text); --sub: var(--text-muted); --track: #30323D; }
.csp-p-glass .csp-panel { background: #16171D73; border: 1px solid #FFFFFF73; box-shadow: 0 12px 30px #0B0C104D; backdrop-filter: blur(10px); color: #FFFFFF; --sub: #E4E2DC; --track: #FFFFFF4D; }
.csp-av { position: relative; width: 21cqw; height: 21cqw; flex-shrink: 0; overflow: hidden; border: 3px solid var(--ink); border-radius: 50%; box-sizing: border-box; }
.csp-av > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.csp-s-rounded .csp-av { border-radius: 28%; }
.csp-s-square .csp-av { border-radius: 8px; }
.csp-framed .csp-av { box-shadow: 0 0 0 5px var(--gold), 0 0 0 8px var(--ink); overflow: visible; }
.csp-fishbox { display: flex; align-items: center; justify-content: center; background: #FFFFFF; }
.csp-fishbox > svg { position: static; width: 70%; height: 70%; }
.csp-col { display: flex; flex-direction: column; gap: 1.8cqw; flex: 1; min-width: 0; }
.csp-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.csp-k { font-size: max(10px, 2.2cqw); font-weight: 700; letter-spacing: .08em; color: var(--sub); }
.csp-pill { position: relative; overflow: hidden; font-size: max(10px, 2.1cqw); font-weight: 700; color: var(--ink); border: 2px solid var(--ink); border-radius: 999px; padding: 2px 10px; }
.csp-pill > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.csp-pill > span { position: relative; }
.csp-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.csp-title { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 5.7cqw; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.csp-f-clean .csp-title { font-family: 'Figtree', sans-serif; font-weight: 800; }
.csp-f-serif .csp-title { font-family: Georgia, 'Times New Roman', serif; }
.csp-f-mono .csp-title { font-family: 'JetBrains Mono', ui-monospace, monospace; font-weight: 700; font-size: 4.8cqw; }
.csp-lvl { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 3.2cqw; color: var(--sub); white-space: nowrap; }
.csp-bar { height: 3.6cqw; min-height: 12px; border-radius: 999px; border: 3px solid var(--ink); background: var(--track); overflow: hidden; }
.csp-bar svg { display: block; width: 100%; height: 100%; }
.csp-sub { font-size: max(11px, 2.5cqw); font-weight: 600; color: var(--sub); }
.csp-stats { display: flex; gap: 5cqw; }
.csp-stats div { display: flex; flex-direction: column; }
.csp-stats b { font-family: 'Fredoka', sans-serif; font-size: 3.6cqw; }
.csp-stats span { font-size: max(10px, 2cqw); color: var(--sub); }
.csp-rarity { background: var(--violet); color: #FFFFFF; font-size: max(10px, 2cqw); font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.csp-sticker { position: absolute; right: 5%; top: 9%; z-index: 2; transform: rotate(6deg); background: var(--sun); color: var(--ink); border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); border-radius: 10px; padding: 4px 12px; font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: max(12px, 2.5cqw); }
/* Centered: avatar on top, text centered. Compact: a smaller avatar and title. */
.csp-l-centered .csp-panel { flex-direction: column; text-align: center; gap: 1.6cqw; left: 15%; right: 15%; padding: 3cqw 4cqw; }
.csp-l-centered .csp-av { width: 12cqw; height: 12cqw; }
.csp-l-centered .csp-col { width: 100%; align-items: center; gap: 1.2cqw; }
.csp-l-centered .csp-top, .csp-l-centered .csp-row { justify-content: center; }
.csp-l-centered .csp-bar { width: 100%; }
.csp-l-centered .csp-title { font-size: 4.6cqw; }
.csp-l-compact .csp-av { width: 14cqw; height: 14cqw; }
.csp-l-compact .csp-panel { gap: 3.2cqw; }
.csp-l-compact .csp-title { font-size: 4.6cqw; }
.csp-fish.csp-l-classic .csp-av { width: 25cqw; height: 25cqw; }
.csp-note { margin: 14px 0 0; font-size: 14px; line-height: 1.5; }

/* Library and member uploads. */
.cs-library { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.cs-lib-item { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cs-lib-item img { margin-bottom: 4px; }
.cs-lib-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-lib-used { font-size: 13px; }
.cs-pending { display: flex; flex-direction: column; gap: 12px; }
.cs-pending-row { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.cs-pending-row img { width: 110px; flex-shrink: 0; }

@media (max-width: 1180px) {
  .cs-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .cs-head { flex-direction: column; }
  .cs-backdrops, .cs-library { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-hex { margin-left: 0; }
  .cs-as { width: 100%; }
}
.cs-render { display: block; width: 100%; height: auto; border-radius: 12px; }
.cs-preview-wrap.htmx-request .cs-render { opacity: .85; }
.cs-test { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; }
.cs-test-msg { font-size: 14px; }
.cs-test-msg.ok { color: #57D9A3; }
.cs-test-msg.bad { color: #FF6B7A; }

/* Logs page: events in two columns (Messages, Members and Voice; Server), each with its channel. */
.lg-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; row-gap: 20px; align-items: start; }
.lg-group { grid-column: 1; display: flex; flex-direction: column; gap: 10px; }
.lg-tall { grid-column: 2; grid-row: 1 / span 3; }
.lg-title { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.lg-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 4px 6px 4px 16px; border-radius: 12px; background: #16171D; }
.lg-check { display: flex; align-items: center; gap: 12px; font-size: 15px; cursor: pointer; min-width: 0; }
.lg-check input { width: 20px; height: 20px; accent-color: var(--sun); margin: 0; flex-shrink: 0; }
.lg-select { background-color: transparent; color: #A9ABB8; font-size: 14px; max-width: 46%; }
.lg-select:hover, .lg-select:focus-visible { background-color: #22232C; color: var(--text); }
@media (max-width: 900px) { .lg-cols { grid-template-columns: minmax(0, 1fr); } .lg-group, .lg-tall { grid-column: auto; grid-row: auto; } }

/* Feeds page: the feed list (kind icon, name and address, channel, state) and the editor. */
.fd-row { padding: 6px 16px; }
.fd-row.on { box-shadow: 0 0 0 2px var(--sun); }
.fd-ico { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: #2C2E3A; color: #D6D7DE; }
.fd-ico svg { width: 20px; height: 20px; }
.fd-twitch { background: #9146FF33; color: #C7A6FF; }
.fd-youtube { background: #FF000026; color: #FF8A8A; }
.fd-reddit { background: #FF450026; color: #FFA27F; }
.fd-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 4px 0; overflow-wrap: anywhere; }
.fd-name .muted { font-size: 13px; }
.fd-where { width: 130px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-state { width: 110px; flex-shrink: 0; display: flex; justify-content: flex-end; }
.fd-pill { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 9px; white-space: nowrap; background: #2EC4B626; color: #7FE0D6; }
.fd-pill.bad { background: #F2466B26; color: #FF9AB0; }
.fd-close { font-size: 14px; }
.fd-static { display: flex; align-items: center; color: #B9BBC6; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.fd-msg-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.fd-msg-head .lv-lbl { margin: 0; }
.fd-checks { display: flex; flex-wrap: wrap; gap: 14px 32px; }
.fd-remove { color: #FF9AB0; }
.fd-ment { align-self: flex-start; background: #3C4270; color: #C9CDFB; border-radius: 4px; padding: 0 2px; font-size: 14px; }
.fd-thumb { height: 120px; border-radius: 6px; background: #1E1F27; display: flex; align-items: center; justify-content: center; color: #8C8F9C; font-size: 13px; }
.fd-preview .lv-preview-body { flex-grow: 1; }
.tk-embed[hidden] { display: none; }
@media (max-width: 720px) {
  .fd-row { flex-wrap: wrap; }
  .fd-where, .fd-state { width: auto; }
}

/* Activity page: one column; charts are SVG and CSS shades (the CSP drops inline styles). */
.lv.ac { grid-template-columns: minmax(0, 1fr); }
.ac-head { align-items: flex-start; flex-wrap: wrap; }
.ac-head-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ac-tabs .tab { height: 36px; padding: 0 14px; font-size: 14px; }
.ac-tabs-sunk { background: #16171D; }
.ac-stat-sub { margin-top: 4px; font-size: 13px; }
.ac-chart { display: block; width: 100%; height: 200px; }
.ac-bar { fill: #4A4D5C; }
.ac-bar:hover { fill: #6F7280; }
.ac-bar.today { fill: var(--sun); }
.ac-bar.joins, .ac-key.joins { fill: #2EC4B6; background: #2EC4B6; }
.ac-bar.leaves, .ac-key.leaves { fill: #F2466B; background: #F2466B; }
.ac-ticks { display: flex; justify-content: space-between; margin-top: 10px; font-size: 12px; }
.ac-legend { display: flex; gap: 18px; margin-top: 12px; font-size: 13px; }
.ac-legend span { display: inline-flex; align-items: center; gap: 8px; }
.ac-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.ac-grid { gap: 24px; }
.ac-heat { display: flex; flex-direction: column; gap: 3px; }
.ac-heat-row, .ac-heat-hours { display: grid; grid-template-columns: 36px repeat(24, minmax(0, 1fr)); gap: 3px; align-items: center; }
.ac-heat-day { font-size: 12px; }
.ac-cell { aspect-ratio: 1; border-radius: 3px; background: #2C2E3A; }
.ac-cell.h1 { background: #5C5233; }
.ac-cell.h2 { background: #8C7A35; }
.ac-cell.h3 { background: #C4A63A; }
.ac-cell.h4 { background: var(--sun); }
.ac-heat-hours { margin-top: 6px; font-size: 12px; }
.ac-heat-hours span:nth-child(1) { grid-column: 2; }
.ac-heat-hours span:nth-child(2) { grid-column: 8; }
.ac-heat-hours span:nth-child(3) { grid-column: 14; }
.ac-heat-hours span:nth-child(4) { grid-column: 20; }
.ac-top { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.ac-top li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.ac-rank { font-size: 14px; }
.ac-top-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ac-top-name { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-meter { display: block; width: 100%; height: 6px; }
.ac-meter rect { fill: var(--sun); }
.ac-top-n { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ac-ret { display: flex; flex-direction: column; gap: 4px; }
.ac-ret-row { display: flex; justify-content: space-between; align-items: center; height: 44px; border-bottom: 1px solid #2C2E3A; font-size: 15px; }
.ac-ret-row:last-child { border-bottom: 0; }
.ac-ret-row b { font-family: var(--display); font-size: 20px; }
.ac-checks { display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 1180px) { .ac .dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ac-grid { grid-template-columns: minmax(0, 1fr); } }

/* Members page */
a.dash-top-chatter { color: var(--text); text-decoration: none; }
a.dash-top-chatter:hover span { text-decoration: underline; }
.lv.mb { grid-template-columns: minmax(0, 1fr); }
.mb-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 24px; align-items: start; }
.mb-list { display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.mb-table { display: flex; flex-direction: column; gap: 8px; }
.mb-tr { display: grid; grid-template-columns: minmax(0, 1fr) 64px 80px 52px; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 12px; }
.mb-th { font-size: 13px; padding-top: 0; padding-bottom: 0; }
.mb-row { background: #16171D; color: var(--text); text-decoration: none; font-size: 15px; border: 2px solid transparent; }
.mb-row:hover { background: #22232C; }
.mb-row.on { border-color: var(--sun); }
.mb-who { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 600; }
.mb-who img, .mb-avatar { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; }
.mb-avatar { display: inline-block; background: #3A3C4A; }
.mb-avatar-lg { width: 56px; height: 56px; }
.mb-warns { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 22px; padding: 0 6px; border-radius: 11px; background: #D6283933; color: #FF9AA6; font-size: 13px; font-weight: 700; }
.mb-more { justify-content: center; }
.mb-clear { font-size: 14px; text-align: center; }
.mb-detail { display: flex; flex-direction: column; gap: 24px; min-width: 0; scroll-margin-top: 24px; }
.mb-head { display: flex; align-items: center; gap: 16px; }
.mb-head img { width: 56px; height: 56px; border-radius: 50%; }
.mb-head h2 { font-size: 24px; margin-bottom: 4px; }
.mb-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.mb-stat { background: #16171D; border-radius: 12px; padding: 14px 16px; }
.mb-stat .muted { font-size: 13px; }
.mb-stat b { display: block; font-family: var(--display); font-size: 20px; margin-top: 4px; }
.mb-gap { margin-top: 16px; }
.mb-adjust { display: flex; flex-direction: column; gap: 14px; margin-top: 24px; }
.mb-adjust h3 { font-size: 16px; }
.mb-adjust-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 14px; }
.mb-adjust-row-2 { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); }
.mb-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mb-lines li { display: flex; justify-content: space-between; align-items: center; gap: 14px; background: #16171D; border-radius: 12px; padding: 14px 16px; }
.mb-lines li > div { min-width: 0; }
.mb-text { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.mb-note { font-weight: 500; white-space: pre-line; }
.mb-meta { font-size: 13px; margin-top: 4px; }
.mb-lines + .mb-lines { margin-top: 10px; }
.mb-inline { display: flex; align-items: flex-end; gap: 12px; margin-top: 18px; }
.mb-inline .lv-field { flex: 1; }
.mb-clearall { margin-top: 12px; }
.mb-note-form { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.mb-kept { margin-top: 16px; line-height: 2; }
.mb-pick { text-align: center; padding: 48px 28px; }
@media (max-width: 1180px) { .mb-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) {
  .mb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mb-adjust-row, .mb-adjust-row-2 { grid-template-columns: minmax(0, 1fr); }
  .mb-tr { grid-template-columns: minmax(0, 1fr) 56px 64px 44px; gap: 8px; padding: 10px; }
  .mb-inline { flex-direction: column; align-items: stretch; }
}

/* Settings page (mockup Settings board) */
.lv.gs { grid-template-columns: minmax(0, 1fr); }
.lv.gs > .lv-main > form { display: flex; flex-direction: column; gap: 24px; }
.gs-gap { margin-top: 20px; }
.gs-rows { display: flex; flex-direction: column; gap: 8px; }
.gs-row { display: flex; align-items: center; gap: 14px; background: #16171D; border-radius: 12px; padding: 14px 16px; position: relative; cursor: pointer; }
.gs-row-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.gs-row-text .muted { font-size: 14px; }
.gs-bookmark { margin-top: 20px; display: flex; gap: 16px; align-items: flex-end; }
.gs-emoji { width: 160px; flex-shrink: 0; }
.gs-bookmark-note { padding-bottom: 14px; }
.gs-line { display: flex; align-items: center; gap: 16px; }
.gs-line > span { flex: 1 1 auto; font-size: 15px; color: #D6D7DE; }
.gs-danger { box-shadow: inset 0 0 0 1px #F2466B66; }
.gs-pill { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 9px; white-space: nowrap; background: #F2466B26; color: #FF9AB0; }
.gs-lead { font-size: 15px; margin: 0 0 18px; }
.gs-notice { margin-bottom: 18px; }
.gs-targets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 14px; column-gap: 20px; margin: 0; padding: 0; border: 0; }
.gs-btn-danger { background: var(--pink); color: #FFFFFF; }
.gs-btn-danger:hover { background: #FF5C7E; color: #FFFFFF; }
.gs-preview p { margin: 0 0 10px; }
.gs-preview ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-width: 520px; }
.gs-preview li { display: flex; justify-content: space-between; gap: 16px; background: #16171D; border-radius: 10px; padding: 10px 14px; font-size: 15px; }
.gs-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
@media (max-width: 760px) {
  .gs-targets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gs-bookmark, .gs-line { flex-direction: column; align-items: stretch; }
  .gs-bookmark-note { padding-bottom: 0; }
}

/* Warnings and mod log */
.md-expiry { max-width: 320px; }
.md-rules, .md-cools { display: flex; flex-direction: column; gap: 14px; }
.md-cools { gap: 8px; }
.md-rules:has(.md-rule), .md-cools:has(.md-cool) { margin-bottom: 14px; }
.md-rule { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr) 48px; gap: 14px; align-items: end; }
.md-rule[hidden], .md-cool[hidden] { display: none; }
.md-rule:not(:has(option[value="timeout"]:checked)) .md-for { visibility: hidden; }
.btn.md-x { width: 48px; height: 48px; padding: 0; }
.md-x svg { width: 20px; height: 20px; max-width: none; flex-shrink: 0; }
.md-cool { display: grid; grid-template-columns: minmax(0, 170px) 116px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 56px; padding: 8px 16px; border-radius: 12px; background: #16171D; }
.md-cool .lv-input { height: 40px; background: #22242E; }
.md-chip { justify-self: start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; background: #3A86FF26; color: #9CC2FF; font-size: 14px; font-weight: 600; }
.md-chip.gone { background: #FF6B7A26; color: #FF9AA5; }
.md-mins { display: flex; align-items: center; gap: 8px; }
.md-status { color: var(--text-faint); font-size: 13px; line-height: 1.4; }
.md-mins .lv-input { width: 76px; }
.md-status.cooling { color: var(--sun); }
.md-check-hint { margin: 10px 0 0; padding-left: 32px; }
@media (max-width: 720px) {
  .md-rule { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .md-cool { grid-template-columns: minmax(0, 1fr) auto; }
  .md-status { grid-column: 1 / -1; }
}

/* Reports and modmail page: one column, like the mockup */
.lv.rp { grid-template-columns: minmax(0, 1fr); }
.rp-settings { display: flex; flex-direction: column; gap: 24px; }
.rp-list { display: flex; flex-direction: column; gap: 12px; }
.rp-card { background: #16171D; border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.rp-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rp-kind { height: auto; padding: 4px 12px; background: #2C2E3A; color: var(--text); font-size: 14px; font-weight: 600; }
.rp-who { overflow-wrap: anywhere; }
.rp-by { font-size: 14px; flex: 1; min-width: 0; }
.rp-pill { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.rp-open { background: #FFD23F26; color: #FFE27A; }
.rp-claimed { background: #3A86FF26; color: #9CC2FF; }
.rp-done { background: #2EC4B626; color: #7FE0D6; }
.rp-quote { background: #1E1F27; border-radius: 10px; padding: 10px 14px; color: #D6D7DE; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-line; }
.rp-reason { font-size: 15px; overflow-wrap: anywhere; }
.rp-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rp-form { margin: 0; }
.rp-end { margin-left: auto; order: 2; }
.rp-btn { height: 34px; padding: 0 12px; font-size: 14px; }
.rp-danger { color: #FF9AB0; }
.rp-note { font-size: 14px; }
.rp-links { display: flex; gap: 14px; font-size: 14px; order: 3; flex-basis: 100%; }
.rp-links:empty { display: none; }
.rp-sub { margin: 24px 0 12px; font-family: var(--body); font-size: 16px; font-weight: 600; }
.rp-threads { display: flex; flex-direction: column; gap: 8px; }
.rp-thread { display: flex; align-items: center; gap: 14px; background: #16171D; border-radius: 12px; padding: 10px 16px; min-height: 56px; box-sizing: border-box; }
.rp-tname { width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-tstart { flex-grow: 1; }
@media (max-width: 720px) {
  .rp .lv-panel-head { flex-wrap: wrap; }
  .rp-by { order: 4; flex-basis: 100%; }
  .rp-pill { margin-left: auto; }
  .rp-thread { flex-wrap: wrap; gap: 4px 14px; padding: 12px 16px; }
  .rp-tname { width: auto; flex: 1; }
  .rp-tstart { order: 3; flex-basis: 100%; }
}

/* Ban sync page */
.bs-count { font-size: 14px; }
.bs-code { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; font-size: 15px; }
.bs-tok { background: #2C2E3A; color: var(--sun); border-radius: 8px; padding: 2px 8px; font-weight: 600; user-select: all; }
.bs-copy { border: 0; border-radius: 8px; background: #2C2E3A; color: #D6D7DE; font: inherit; font-size: 13px; font-weight: 600; padding: 5px 10px; cursor: pointer; }
.bs-copy:hover { color: var(--text); }
.bs-copy:focus-visible { outline: 2px solid var(--sun); outline-offset: 1px; }
.bs-code-hint { margin: 0; }
.bs-tr { display: grid; grid-template-columns: minmax(0, 1fr) 84px 84px 84px 96px; gap: 12px; align-items: center; }
.bs-th { padding: 0 16px 10px; font-size: 13px; font-weight: 600; color: var(--text-faint); }
.bs-rows { display: flex; flex-direction: column; gap: 8px; }
.bs-row { background: #16171D; border-radius: 12px; padding: 0 16px; min-height: 56px; font-size: 15px; }
.bs-name { display: flex; align-items: center; gap: 6px 8px; min-width: 0; flex-wrap: wrap; padding: 8px 0; }
.bs-name b { overflow-wrap: anywhere; }
.bs-pill { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.bs-here { background: #FFD23F26; color: #FFE27A; }
.bs-owner { background: #3A86FF26; color: #9CC2FF; }
.bs-k { display: none; }
.bs-act { display: flex; justify-content: flex-end; }
.bs-act form { margin: 0; }
.bs-btn { height: 34px; padding: 0 12px; font-size: 14px; }
.bs-settings { display: flex; flex-direction: column; }
.bs-fields { display: flex; flex-direction: column; gap: 20px; }
.bs-seg { border: 0; margin: 0; padding: 0; min-width: 0; }
.bs-seg .lv-seg { display: inline-flex; flex-wrap: wrap; height: auto; max-width: 100%; align-self: flex-start; }
.bs-seg .lv-seg label { flex: 0 1 auto; }
.bs-seg .lv-seg span { height: 40px; padding: 0 16px; white-space: nowrap; }
.bs-seg input:disabled + span { cursor: default; }
.bs-inline { display: flex; align-items: flex-start; gap: 12px; }
.bs-grow { flex: 1; min-width: 0; }
.bs-go { margin-top: 30px; height: 48px; }
.bs-side-title { font-size: 14px; font-weight: 600; }
.bs-actions { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.bs-actions form { margin: 0; }
.bs-wide { width: 100%; }
.bs-danger { color: #FF9AB0; }
.bs-flat { margin: 0; }
@media (max-width: 900px) {
  .bs-th { display: none; }
  .bs-tr { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; padding: 12px 16px; }
  .bs-name { grid-column: 1 / -1; }
  .bs-k { display: inline; }
  .bs-act { grid-column: 2; grid-row: 2 / span 3; align-self: center; }
}
@media (max-width: 720px) {
  .bs-seg .lv-seg span { white-space: normal; text-align: center; padding: 6px 12px; height: auto; min-height: 40px; }
  .bs-inline { flex-direction: column; align-items: stretch; }
  .bs-go { margin-top: 0; }
}

/* Role rules */
.rr-rules { display: flex; flex-direction: column; gap: 14px; }
.rr-rules:has(.rr-rule) { margin-bottom: 14px; }
.rr-rule { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.4fr) 48px; gap: 14px; align-items: end; }
.rr-rule[hidden] { display: none; }
.rr-pinned-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 18px 0 10px; }
.rr-pinned-head h3 { margin: 0; font-size: 15px; }
.rr-pinned-head .muted { font-size: 13px; }
.rr-pinned { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rr-pinned li { display: grid; grid-template-columns: minmax(0, 170px) minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 56px; padding: 8px 16px; border-radius: 12px; background: #16171D; }
.rr-who { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
@media (max-width: 720px) {
  .rr-rule { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .rr-pinned li { grid-template-columns: minmax(0, 1fr) auto; }
  .rr-chips { grid-column: 1 / -1; grid-row: 2; }
}

/* Boosters */
.bo-embed { border-left-color: var(--sun); }
.bo-role { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; background: #16171D; border-radius: 12px; padding: 14px 16px; }
.bo-role code { overflow-wrap: anywhere; }

/* Invites */
.lv.iv { grid-template-columns: minmax(0, 1fr); }
.iv-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.iv-reward { grid-template-columns: minmax(0, 140px) minmax(0, 1fr) 48px; }
.iv-label { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr) 48px; }
.iv-board { display: flex; flex-direction: column; gap: 8px; }
.iv-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) repeat(4, 76px) 212px; gap: 12px; align-items: center; min-height: 56px; padding: 8px 16px; border-radius: 12px; background: #16171D; font-variant-numeric: tabular-nums; }
.iv-head { min-height: 0; padding-top: 0; padding-bottom: 0; background: none; font-size: 13px; font-weight: 700; color: #7C7F8C; }
.iv-rank { color: #7C7F8C; font-weight: 700; }
.iv-who { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iv-bonus.up { color: var(--sun); font-weight: 700; }
.iv-cap { display: none; }
.iv-acts { display: flex; gap: 8px; justify-content: flex-end; }
.iv-edit { position: relative; }
.iv-edit summary { list-style: none; }
.iv-edit summary::-webkit-details-marker { display: none; }
.iv-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 4; width: 260px; display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 14px; background: #262732; box-shadow: 0 16px 40px #0B0C1080; }
.iv-ignored { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.iv-chip { display: inline-flex; align-items: center; gap: 6px; padding-right: 6px; }
.iv-x { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: none; color: inherit; cursor: pointer; }
.iv-x:hover, .iv-x:focus-visible { background: #FFFFFF1A; }
.iv-x svg { width: 14px; height: 14px; }
.iv-add { display: flex; gap: 12px; align-items: end; margin-top: 18px; max-width: 480px; }
.iv-add .lv-field { flex: 1; }
.iv-csv { align-self: flex-start; }
@media (max-width: 960px) {
  .iv-pair { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .iv-reward { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) 48px; }
  .iv-label { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .iv-label > :first-child { grid-column: 1 / -1; }
  .iv-head { display: none; }
  .iv-row { grid-template-columns: 24px minmax(0, 1fr); gap: 4px 12px; padding: 12px 16px; }
  .iv-row > span:nth-child(n+3) { grid-column: 2; font-size: 14px; }
  .iv-row > span:nth-child(n+3):not(.iv-acts) { display: inline; }
  .iv-cap { display: inline; color: #7C7F8C; }
  .iv-acts { justify-content: flex-start; margin-top: 6px; }
  .iv-pop { left: 0; right: auto; }
}

/* XP boosts and drops */
.xp-boost { grid-template-columns: minmax(0, 1fr) minmax(0, 140px) 48px; }
.xp-embed { border-left-color: #F2466B; }
.xp-buttons { display: flex; gap: 8px; margin-top: 8px; }
.xp-btn { padding: 6px 14px; border-radius: 6px; background: #DA373C; color: #FFFFFF; font-size: 14px; font-weight: 600; }
.xp-btn.good { background: #248046; }
@media (max-width: 720px) {
  .xp-boost { grid-template-columns: minmax(0, 1fr) minmax(0, 96px) 48px; }
}

/* Channel rules */
.lv.cr { grid-template-columns: minmax(0, 1fr); }
.cr-type { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 48px; }
.cr-sticky { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr) auto minmax(0, 230px) auto; gap: 14px; padding: 10px 16px; }
.cr-sticky.on { box-shadow: 0 0 0 2px var(--sun); }
.cr-where, .cr-text, .cr-reposts { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-style { justify-self: start; background: #2C2E3A; color: var(--text); }
.cr-acts { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.cr-edit-head { margin-bottom: 14px; }
.cr-edit-head h3 { margin: 0; font-size: 16px; font-weight: 600; }
.cr-edit-acts { display: flex; justify-content: flex-end; }
.cr-stack { display: flex; flex-direction: column; gap: 20px; }
.cr-pair { gap: 24px; align-items: start; }
@media (max-width: 960px) {
  .cr-pair { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .cr-sticky { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .cr-text, .cr-reposts { grid-column: 1 / -1; }
  .cr-acts { grid-column: 1 / -1; justify-content: flex-start; }
}

/* Stat channels */
.sc-head, .sc-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.sc-head { font-size: 13px; color: var(--text-faint); font-weight: 600; margin-bottom: 10px; }
.sc-rows { display: flex; flex-direction: column; gap: 12px; }
.sc-label { padding-top: 13px; }
.sc-cell { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sc-off { display: flex; align-items: center; color: var(--text-faint); }
.sc-custom { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 48px; }
.sc-preview { background: #2B2D31; border-radius: 16px; padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; }
.sc-cat { font-size: 12px; font-weight: 700; letter-spacing: 0.6px; color: #949BA4; padding: 0 8px 6px; }
.sc-chan { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; color: #DBDEE1; font-size: 15px; }
.sc-chan svg { color: #80848E; flex-shrink: 0; }
.sc-chan span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-none { margin: 0; padding: 4px 8px; font-size: 14px; }
@media (max-width: 720px) {
  .sc-head { display: none; }
  .sc-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .sc-label { padding-top: 0; }
  .sc-custom { grid-template-columns: minmax(0, 1fr) 48px; }
  .sc-custom > .lv-field:first-child { grid-column: 1 / -1; }
}

/* Starboard */
.sb-post { align-items: center; padding: 10px 16px; }
.sb-stars { flex-shrink: 0; border-radius: 999px; padding: 4px 12px; background: #FFD23F26; color: #FFE27A; font-size: 14px; font-weight: 600; white-space: nowrap; }
.sb-what { flex-grow: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-ment { background: #3C4270; color: #C9CDFB; border-radius: 4px; padding: 0 2px; }
.sb-card { width: 100%; max-width: 280px; box-sizing: border-box; border-radius: 10px; background: var(--sun); padding: 10px; }
.sb-card-in { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 2px solid #2B1B2E; border-radius: 9px; background: #FFF8EC; box-shadow: 3px 3px 0 #2B1B2E; color: #2B1B2E; font-size: 13px; line-height: 1.4; }
.sb-card-who { display: flex; align-items: center; gap: 8px; font-family: 'Fredoka', 'Figtree', sans-serif; font-size: 14px; }
.sb-card-av { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #2B1B2E; background: #FF6B35; box-sizing: border-box; }
.sb-card-pic { display: flex; align-items: center; justify-content: center; height: 90px; border-radius: 6px; background: #E8DCC6; color: #6B5E4E; font-size: 12px; }
.sb-jump { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 6px; background: #4E5058; color: #FFFFFF; font-size: 14px; font-weight: 500; }
@media (max-width: 720px) {
  .sb-post { flex-wrap: wrap; gap: 8px 12px; }
  .sb-what { flex-basis: 100%; order: 3; white-space: normal; }
  .sb-post .btn { margin-left: auto; }
}

/* Streaks */
.st-nick { grid-template-columns: minmax(0, 1fr) minmax(0, 180px); }
.st-sub { display: block; margin: 22px 0 10px; }
.st-mark { grid-template-columns: minmax(0, 140px) minmax(0, 140px) 48px; }
.st-role { grid-template-columns: minmax(0, 140px) minmax(0, 1fr) 48px; }
.st-member { display: flex; align-items: center; gap: 10px; padding: 6px 8px; color: #DBDEE1; font-size: 15px; }
.st-member span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-av { width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; background: #5865F2; }
.st-av.t1 { background: #3BA55C; }
.st-av.t2 { background: #FF6B35; }
.st-av.t3 { background: #5865F2; }
@media (max-width: 720px) {
  .st-nick { grid-template-columns: minmax(0, 1fr); }
  .st-mark, .st-role { grid-template-columns: minmax(0, 96px) minmax(0, 1fr) 48px; }
}

/* Achievements */
.ach-emoji { width: 40px; height: 40px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: #16171D; font-size: 20px; }
.ach-head, .ach-row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.2fr) minmax(0, 0.6fr) minmax(0, 1.2fr) 48px auto; gap: 14px; align-items: center; }
.ach-head { padding: 0 0 8px; color: var(--text-faint); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.ach-row { min-height: 68px; padding: 10px 0; border-top: 1px solid #2C2E3A; }
.ach-row.off .ach-name, .ach-row.off .ach-cell { opacity: 0.55; }
.ach-name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ach-name > div, .ach-builtin-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ach-name .muted, .ach-builtin-text .muted { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ach-cell { font-size: 14px; min-width: 0; }
.ach-holders { display: block; font-size: 12px; color: var(--text-faint); }
.ach-list + .md-add, .ac + .md-add { margin-top: 14px; }
.ach-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.ach-tabs input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ach-tabs span { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 999px; background: #16171D; color: var(--text-faint); font-size: 14px; font-weight: 600; cursor: pointer; }
.ach-tabs input:checked + span { background: #2C2E3A; color: var(--text); }
.ach-tabs input:focus-visible + span { outline: 2px solid var(--sun); }
.ach-builtins { display: none; }
.ach-builtin { display: grid; grid-template-columns: 40px minmax(0, 1fr) 150px; gap: 14px; align-items: center; padding: 8px 0; border-top: 1px solid #2C2E3A; }
.ach-xp { display: flex; align-items: center; gap: 8px; }
.ach-xp .lv-input { width: 110px; }
.ach-err { grid-column: 2 / -1; }
#builtin:has([value="messages"]:checked) .ach-tab-messages,
#builtin:has([value="social"]:checked) .ach-tab-social,
#builtin:has([value="streaks"]:checked) .ach-tab-streaks,
#builtin:has([value="levels"]:checked) .ach-tab-levels,
#builtin:has([value="voice"]:checked) .ach-tab-voice,
#builtin:has([value="reputation"]:checked) .ach-tab-reputation,
#builtin:has([value="economy"]:checked) .ach-tab-economy,
#builtin:has([value="fishing"]:checked) .ach-tab-fishing,
#builtin:has([value="special"]:checked) .ach-tab-special { display: block; }
.ach-ident { grid-template-columns: minmax(0, 1fr) minmax(0, 180px); }
.ach-fixed { display: flex; align-items: center; color: var(--text-faint); }
.ach-trigger { display: none; }
.ach-edit.byrole .ach-trigger, .ach-edit:has(option[value="special:role"]:checked) .ach-trigger { display: block; }
.ach-add-tier { margin-top: 12px; }
.ach-tiers { counter-reset: tier; display: flex; flex-direction: column; gap: 12px; }
.ach-tier { grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr) 48px; }
.ach-tier:not([hidden]) { counter-increment: tier; }
.ach-tier-name { align-self: center; padding-top: 22px; font-family: 'Fredoka', 'Figtree', sans-serif; }
.ach-tier-name::before { content: "Tier " counter(tier, upper-roman); }
.ach-yesno-hint { display: none; }
.ach-edit.yesno .ach-needs, .ach-edit:has(option[data-yesno]:checked) .ach-needs { visibility: hidden; }
.ach-edit.yesno .ach-tier ~ .ach-tier, .ach-edit:has(option[data-yesno]:checked) .ach-tier ~ .ach-tier,
.ach-edit.yesno .ach-add-tier, .ach-edit:has(option[data-yesno]:checked) .ach-add-tier,
.ach-edit.yesno .ach-tier-hint, .ach-edit:has(option[data-yesno]:checked) .ach-tier-hint { display: none; }
.ach-edit.yesno .ach-yesno-hint, .ach-edit:has(option[data-yesno]:checked) .ach-yesno-hint { display: block; }
@media (max-width: 720px) {
  .ach-head { display: none; }
  .ach-row { grid-template-columns: minmax(0, 1fr) 48px auto; gap: 6px 12px; }
  .ach-name { grid-column: 1 / -1; }
  .ach-cell { grid-column: 1 / -1; padding-left: 52px; }
  .ach-row .tg { grid-column: 2; }
  .ach-builtin { grid-template-columns: 40px minmax(0, 1fr); }
  .ach-xp { grid-column: 2; }
  .ach-ident { grid-template-columns: minmax(0, 1fr); }
  .ach-tier { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 48px; }
  .ach-tier-name { grid-column: 1 / -1; padding-top: 0; }
}

/* Events and spotlight */
.ev-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; font-size: 14px; }
.ev-head h3 { margin: 0; font-family: var(--body); font-size: 16px; font-weight: 600; }
.ev-lead { margin: 0 0 18px; font-size: 15px; }
.ev-half { max-width: calc(50% - 10px); }
.ev-row { padding: 10px 16px; }
.ev-top { box-shadow: 0 0 0 2px var(--sun); }
.ev-what { display: flex; flex-direction: column; gap: 2px; flex-grow: 1; min-width: 0; }
.ev-what .muted { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-count { flex-shrink: 0; text-align: right; white-space: nowrap; }
.ev-winner { padding: 22px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.ev-winner-name { font-family: var(--display); font-size: 22px; font-weight: 700; overflow-wrap: anywhere; }
.ev-chip { display: inline-flex; border-radius: 999px; padding: 4px 12px; font-size: 14px; font-weight: 600; background: #FFD23F26; color: #FFE27A; }
@media (max-width: 720px) {
  .ev-half { max-width: none; }
  .ev-what .muted { white-space: normal; }
}
