/* Pip brand, taken from the robot logo: deep royal → electric → bright blue, with the eyes' cyan glow
   as the highlight color, on dark navy (the visor) */
:root {
  --pip-royal: #002ab4;
  --pip-blue: #0064f8;
  --pip-bright: #2d98fb;
  --pip-cyan: #5dbeff;
  --gradient: linear-gradient(135deg, var(--pip-royal), var(--pip-blue) 55%, var(--pip-bright));

  --bg: #f3f6ff;
  --surface: #ffffff;
  --surface-2: #e7edfc;
  --border: #d4ddf5;
  --text: #0a1433;
  --muted: #4e5d80;
  --accent: #0058e0;
  --accent-hover: #004bc2;
  --accent-text: #ffffff;
  --link: #0052d6;
  --danger: #dc2626;
  --success: #16a34a;
  --focus: #0064f8;
  --gold: var(--pip-cyan);  /* the Premium highlight; was yellow with the old logo */
  --gold-soft: #d6ecff;
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #050a1a;
    --surface: #0b1430;
    --surface-2: #142047;
    --border: #1f2d5c;
    --text: #e8eeff;
    --muted: #93a3c9;
    --accent: #2d8cff;
    --accent-hover: #4a9dff;
    --link: #6cbcff;
    --focus: #5dbeff;
    --gold-soft: #10335c;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}

a { color: var(--link); }
.logo { width: 38px; height: 38px; object-fit: contain; flex: none; }
.logo.lg { width: 96px; height: 96px; }
.topbar .brand .logo { width: 48px; height: 48px; }  /* the logo alone, no text next to it */
h1, h2, h3 { margin: 0 0 8px; line-height: 1.25; }
h1 { font-size: 24px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.small { font-size: 13px; }

/* ---------- layout ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.account { display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; flex: none; }
.avatar.lg { width: 56px; height: 56px; }
.avatar.fallback {
  display: inline-grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
}

main { max-width: 960px; margin: 0 auto; padding: 24px 16px 64px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.card > p:last-child { margin-bottom: 0; }

.login { max-width: 420px; margin: 64px auto; text-align: center; }
.login .logo.lg { display: block; margin: 0 auto 16px; }

.guild-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.guild-head .back { margin-left: auto; }

.guilds {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.guild {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
}
.guild:hover { border-color: var(--accent); }
.guild strong { display: block; }

/* Server page: grouped menu on the left, the page on the right */
/* Server page (MEE6-style): a full-height menu against the left edge, the page beside it */
main:has(.guild-layout) { max-width: none; padding: 0; }
.guild-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); align-items: start; min-height: calc(100vh - 64px); }
.guild-main { padding: 24px 32px 64px; max-width: 1180px; width: 100%; }
.side-nav { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 14px 10px 32px;
  background: var(--surface); border-right: 1px solid var(--border); }
.side-nav nav { margin-top: 14px; }
.menu-toggle { display: none; }
.menu-toggle::-webkit-details-marker { display: none; }

/* Server switcher */
.switcher { position: relative; }
.switcher-button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--border); color: var(--text); font-weight: 600; text-align: left; }
.switcher-button:hover { border-color: var(--accent); }
.switcher-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switcher-list { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0; max-height: 60vh; overflow-y: auto;
  padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 32px rgba(0, 0, 0, .35); }
.switcher-list[hidden] { display: none; }
.switcher-list a { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; color: var(--text); text-decoration: none; }
.switcher-list a:hover, .switcher-list a.current { background: var(--surface-2); }
.switcher-list a.all { color: var(--muted); font-size: 14px; }
.switcher-list span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Menu groups, folded open or shut by their title */
.nav-group { margin-bottom: 6px; }
.nav-title { display: flex; align-items: center; justify-content: space-between; padding: 12px 10px 6px; cursor: pointer;
  list-style: none; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.nav-title::-webkit-details-marker { display: none; }
.nav-title:hover { color: var(--text); }
.nav-title .chevron { font-size: 12px; transition: transform .15s; }
.nav-group:not([open]) .nav-title .chevron { transform: rotate(180deg); }
.side-nav nav a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 14.5px; }
.side-nav nav a:hover { color: var(--text); background: var(--surface-2); }
.side-nav nav a.active { color: var(--text); background: var(--surface-2); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }

@media (max-width: 860px) {
  .guild-layout { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .guild-main { padding: 16px 16px 48px; }
  .guild-head { flex-wrap: wrap; }
  .guild-head .back { margin-left: 0; }
  table.leaderboard { display: block; overflow-x: auto; }
  .side-nav { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--border); padding: 12px 16px; }
  .menu-toggle { display: block; list-style: none; margin-top: 10px; padding: 10px 12px; border-radius: 10px; cursor: pointer;
    background: var(--surface-2); color: var(--text); font-weight: 600; }
  .side-nav nav { display: flex; flex-wrap: wrap; gap: 0 14px; }
  .nav-group { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin: 0; }
  .nav-title { width: 100%; padding: 8px 4px 2px; }
  .side-nav nav a { padding: 6px 9px; }
}

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.tabs a {
  padding: 8px 14px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }

/* ---------- forms ---------- */

.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field > label, .label { display: block; font-weight: 600; margin-bottom: 4px; }
.hint { color: var(--muted); font-size: 13px; margin: 4px 0 0; }

input[type="text"], input[type="number"], select, textarea {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
}
textarea { min-height: 80px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

.row { display: flex; gap: 8px; align-items: center; }
.row > input, .row > select { flex: 1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.switch input { width: 18px; height: 18px; accent-color: var(--accent); }

.check { display: flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; }
.check input { accent-color: var(--accent); }

button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--gradient);
  color: var(--accent-text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
button:hover, .button:hover { filter: brightness(1.1); }
button:disabled { opacity: .6; cursor: default; filter: none; }
button.secondary, .button.secondary { background: var(--surface-2); color: var(--text); }
button.secondary:hover, .button.secondary:hover { background: var(--border); filter: none; }
button.danger { background: var(--danger); }
button.danger:hover { filter: brightness(.9); }
button.icon { padding: 4px 8px; background: transparent; color: var(--muted); }
button.icon:hover { background: var(--surface-2); color: var(--text); filter: none; }

.actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chips:empty { display: none; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px 2px 10px;
  background: var(--surface-2);
  border-radius: 999px;
  font-size: 13px;
}
.chip .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.chip button { padding: 0 6px; background: transparent; color: var(--muted); font-size: 15px; line-height: 1.2; }
.chip button:hover { background: transparent; color: var(--danger); }

.preview {
  margin-top: 8px;
  padding: 10px 12px;
  border-left: 4px solid var(--success);
  background: var(--bg);
  border-radius: 4px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ---------- lists ---------- */

.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.list-item:first-of-type { border-top: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--muted);
}
.badge.on { background: var(--success); color: #fff; }

.badge.premium { background: var(--gold); color: #04122e; vertical-align: middle; }
.badge.locked { background: var(--gold-soft); color: var(--text); }
.hint.over { color: var(--danger); }

/* ---------- premium ---------- */

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 8px; }
.plans:empty { display: none; }
.plan {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}
.plan .price { font-size: 26px; font-weight: 700; margin-bottom: 12px; }
.plan button { width: 100%; }

.coming-soon { margin: 12px 0 0; color: var(--muted); }
.coming-soon .badge { margin-right: 6px; }

/* "Secure checkout by Paddle [VISA] [Mastercard]" */
.pay-methods { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.card-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  min-width: 38px;
  padding: 0 6px;
  border-radius: 4px;
  background: #fff;
  border: 1px solid #d9d9e3;
}
.card-badge.visa { color: #1a1f71; font: italic 800 13px/1 system-ui, sans-serif; letter-spacing: .02em; }
.card-badge.mastercard i { width: 14px; height: 14px; border-radius: 50%; background: #eb001b; }
.card-badge.mastercard i + i { margin-left: -6px; background: #f79e1b; mix-blend-mode: multiply; }

.compare { width: 100%; border-collapse: collapse; }
.compare th, .compare td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border); }
.compare th:not(:first-child), .compare td:not(:first-child) { text-align: center; width: 25%; }
.compare tr:last-child td { border-bottom: 0; }

/* Staff leaderboard */
.row.wrap { flex-wrap: wrap; }
.segmented { display: inline-flex; gap: 4px; padding: 3px; border-radius: 10px; background: var(--surface-2); }
.segmented button { padding: 5px 12px; font-size: 13px; }
.segmented button.secondary { background: transparent; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 12px 0 16px; }
.stat { padding: 12px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--border); }
.stat-value { font-size: 22px; font-weight: 700; }
.stat-label { font-size: 12px; color: var(--muted); }
.leaderboard th:not(:first-child), .leaderboard td:not(:first-child) { width: 18%; }
.lb-name { display: flex; align-items: center; gap: 8px; }
.leaderboard .avatar { width: 26px; height: 26px; }
.leaderboard .rank { width: 26px; text-align: center; }

/* Ranch panels */
.ranch-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ranch-title { flex: 1 1 280px; min-width: 0; }
.ranch-title .badge { white-space: nowrap; }
.table-scroll { overflow-x: auto; }
.install-steps { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 12px; }
.install-steps summary { cursor: pointer; font-weight: 600; }
.install-steps ol { padding-left: 22px; margin: 10px 0 0; display: grid; gap: 8px; }
.install-steps pre { margin: 8px 0 0; padding: 10px 12px; border-radius: var(--radius); background: var(--bg);
  border: 1px solid var(--border); font-size: 13px; overflow-x: auto; }
.command-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.command-list code { font-weight: 700; }
.command-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.command-item summary { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 14px; cursor: pointer; list-style: none; }
.command-item summary::-webkit-details-marker { display: none; }
.command-item summary:hover { background: var(--surface-2); border-radius: var(--radius); }
.command-item .chevron { color: var(--muted); transition: transform .15s; }
.command-item[open] .chevron { transform: rotate(180deg); }
.command-body { padding: 0 14px 12px; display: grid; gap: 4px; }
.card.commands-card { margin-top: 32px; }
.ranch-staff { min-width: 520px; }
.ranch-staff th:not(:first-child), .ranch-staff td:not(:first-child) { width: 14%; }
.ranch-staff tfoot td { border-top: 2px solid var(--border); border-bottom: 0; }
.ranch-staff th { white-space: nowrap; }
.ranch-rates-title { margin: 18px 0 8px; }
.ranch-rates { align-items: flex-end; }
.ranch-rates .field { flex: 1; min-width: 140px; margin: 0; }
.ranch-config pre { padding: 12px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--border);
  overflow-x: auto; font-size: 13px; }
.member-results { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.member-option { display: flex; align-items: center; justify-content: flex-start; gap: 6px; text-align: left; }
.member-option .avatar { width: 22px; height: 22px; }

.row > input[type="color"] { flex: none; }
input[type="color"] { width: 56px; height: 38px; padding: 2px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); }
input:disabled, textarea:disabled, select:disabled { opacity: .55; cursor: not-allowed; }

.badge.error { background: var(--danger); color: #fff; }

.callout {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-left: 4px solid var(--accent);
  border-radius: 4px;
  background: var(--bg);
}
.callout.error { border-left-color: var(--danger); }
.callout.warning { border-left-color: #f59e0b; margin: 0 0 16px; }
.actions.start { justify-content: flex-start; margin-top: 10px; }

.steps { padding-left: 22px; margin: 0 0 16px; }
.steps li { margin-bottom: 8px; }
.card.warning { border-color: var(--danger); }
.i18n-wait body { visibility: hidden; }  /* until the page's translation is applied (site-i18n.js) */
.site-language { width: auto; min-width: 0; padding: 6px 8px; font-size: 14px; }
.legal-note { padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
[dir="rtl"] .site-nav { margin-left: 0; margin-right: auto; }
[dir="rtl"] code { direction: ltr; unicode-bidi: isolate; display: inline-block; }  /* /commands read left to right */
[dir="rtl"] .perks, [dir="rtl"] .legal ul, [dir="rtl"] .legal ol { padding-left: 0; padding-right: 22px; }
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; max-width: 100%; }
.language-select { width: auto; min-width: 150px; max-width: 100%; }
.reaction-row { margin-bottom: 8px; }
.reaction-row .emoji-input { flex: 0 0 76px; width: 76px; text-align: center; font-size: 18px; }
.launch-banner { display: inline-block; max-width: 640px; margin: 16px auto 0; padding: 10px 16px; border: 1px solid var(--gold);
  border-radius: var(--radius); background: var(--gold-soft); color: var(--text); }
.launch-banner[hidden] { display: none; }
.launch-banner.center { display: block; text-align: center; }
.launch-banner.center[hidden] { display: none; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
label.button:focus-within { outline: 2px solid var(--focus); outline-offset: 1px; }
.pick-preview {
  flex: none;
  background: var(--bg) center / cover no-repeat;
  border: 2px dashed var(--border);
}
.pick-preview.filled { border-style: solid; }
.pick-preview.round { width: 64px; height: 64px; border-radius: 50%; }
.pick-preview.wide { width: 140px; height: 56px; border-radius: 8px; }

/* Welcome card preview: same proportions and layout as the 1024×450 image cards.py draws */
.card-preview-wrap { margin: 12px 0 16px; container-type: inline-size; }
.welcome-card {
  position: relative;
  aspect-ratio: 1024 / 450;
  border-radius: 12px;
  overflow: hidden;
  background: #222 center / cover no-repeat;
  color: #fff;
  text-align: center;
  transition: opacity .2s;
}
.welcome-card.default-bg { background-image: linear-gradient(90deg, #050c28, #002a96); }
.welcome-card.off { opacity: .45; }
.welcome-card::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.wc-panel { position: absolute; inset: 5.3% 2.3%; border-radius: 2.7cqw; background: rgba(0, 0, 0, .4); }
.wc-avatar {
  position: absolute;
  top: 9.3%;
  left: 50%;
  width: 18.5%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  border: .8cqw solid #fff;
  background: #5865f2;
  object-fit: cover;
}
.wc-title, .wc-subtitle {
  position: absolute;
  left: 6%;
  right: 6%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-shadow: 0 .3cqw .6cqw rgba(0, 0, 0, .8);
}
.wc-title { top: 60%; font-size: 4.5cqw; font-weight: 600; }
.wc-subtitle { top: 74.5%; font-size: 3.1cqw; color: #d7d7e1; }
label.button.disabled, span.button.disabled { opacity: .55; cursor: not-allowed; filter: none; }

.grid3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 16px; }
.type-block { padding: 16px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.type-head { margin-bottom: 8px; }
.small-chips { margin: 6px 0 2px; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Discord's own button colors, so the preview looks like the real thing */
.button-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.discord-button { padding: 6px 14px; border-radius: 4px; color: #fff; font-size: 14px; font-weight: 500; }
.discord-button.primary { background: #5865f2; }
.discord-button.secondary { background: #4e5058; }
.discord-button.success { background: #248046; }
.discord-button.danger { background: #da373c; }
.discord-button .emoji-img { width: 18px; height: 18px; margin-right: 4px; vertical-align: -4px; }

/* Emoji picker (ticket buttons) */
/* Level ranks */
.rank-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.rank-tile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 8px; text-align: center;
  border: 1px solid var(--border); border-radius: 12px; background: var(--bg); }
.rank-tile img { width: 84px; height: 84px; object-fit: contain; margin-bottom: 6px; }
.rank-badge { width: 28px; height: 28px; object-fit: contain; }
.rank-actions { display: flex; gap: 6px; margin-top: 8px; }
.rank-actions .button, .rank-actions button { padding: 4px 10px; font-size: 12px; }

/* Stream schedule: games */
.game-thumb { width: 92px; height: 43px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.list-item.editing { background: var(--bg); border-radius: 8px; padding-left: 8px; padding-right: 8px; }
.game-results { display: flex; flex-direction: column; gap: 4px; margin: -6px 0 12px; }
.game-result { display: flex; align-items: center; gap: 10px; text-align: left; padding: 6px 8px; background: var(--bg);
  border: 1px solid var(--border); color: inherit; font-weight: 500; }
.game-result:hover { border-color: var(--accent); }
.game-result img { width: 92px; height: 35px; object-fit: cover; border-radius: 4px; }
.game-preview { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; padding: 12px 14px; border-radius: 6px;
  border-left: 4px solid var(--accent); background: var(--bg); word-break: break-word; }
.game-preview p { margin: 0; }
.game-preview img { width: 100%; border-radius: 6px; margin-top: 6px; }

/* "Before you start" checklists (Streaming pages) */
.checklist ul { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--border); }
.checklist li:first-child { border-top: 0; }
.checklist .mark { flex: none; }
.checklist li.todo strong { color: var(--text); }
.checklist li.ok strong { color: var(--muted); font-weight: 500; }
.checklist .hint { margin: 4px 0 0; }

/* Reviews on the landing page */
.review-summary { font-size: 18px; color: #fbbf24; font-weight: 700; }
.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 20px; }
.review { margin: 0; }
.review-head { display: flex; align-items: center; gap: 12px; }
.review-avatar { width: 40px; height: 40px; border-radius: 50%; }
.review-stars { margin: 10px 0 6px; color: #fbbf24; letter-spacing: 2px; }
.review p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Rate Pip */
.star-pick { display: flex; gap: 4px; }
.star-pick .star { width: 46px; height: 46px; padding: 0; font-size: 30px; line-height: 1; background: transparent;
  border: 1px solid var(--border); color: var(--muted); }
.star-pick .star.on { color: #fbbf24; border-color: #fbbf24; }
.star-pick .star:hover { color: #fbbf24; }
.review-invite { display: flex; align-items: center; gap: 16px; margin-top: 20px; }
.review-invite p { margin: 4px 0 0; }
.rate-link { display: block; margin: 14px 4px 0; padding: 10px 12px; border-radius: 8px; border: 1px dashed var(--border);
  color: var(--muted); text-decoration: none; font-size: 14px; text-align: center; }
.rate-link:hover { color: var(--text); border-color: var(--accent); }

.image-input { flex-wrap: nowrap; }
.image-input input[type="text"] { min-width: 0; flex: 1; }
.image-input .button { white-space: nowrap; }
.button.busy { opacity: .6; pointer-events: none; }
.emoji-picker { position: relative; }
.emoji-picker .row input { min-width: 0; flex: 1; }
.emoji-grid { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: min(360px, 86vw); padding: 10px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface); box-shadow: 0 12px 32px rgba(0, 0, 0, .35); }
.emoji-grid[hidden] { display: none; }
.emoji-grid .hint { margin: 4px 0; }
.emoji-row { display: flex; flex-wrap: wrap; gap: 4px; max-height: 180px; overflow-y: auto; margin-bottom: 6px; }
.emoji-choice { width: 38px; height: 38px; padding: 0; font-size: 20px; line-height: 1; background: transparent; border: 1px solid transparent; }
.emoji-choice:hover, .emoji-choice:focus-visible { background: var(--surface-2, rgba(255, 255, 255, .08)); border-color: var(--border); }
.emoji-choice img { width: 26px; height: 26px; object-fit: contain; }

.embed-preview {
  margin-top: 4px;
  padding: 10px 14px;
  border-left: 4px solid var(--accent);
  border-radius: 4px;
  background: var(--bg);
}
.embed-footer { margin-top: 8px; font-size: 12px; color: var(--muted); }
.embed-footer:empty { display: none; }

.question { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 14px; }
.question .num { padding-top: 8px; width: 24px; color: var(--muted); text-align: right; flex: none; }
.question textarea { min-height: 42px; }
.question .tools { display: flex; flex-direction: column; }
.question-body { flex: 1; min-width: 0; }
.answer-type { margin-top: 6px; }
.answer-type > select { width: auto; }
.choices { margin: 8px 0 0 12px; padding-left: 12px; border-left: 2px solid var(--border); }
/* Answers as tags inside one box: type an answer, then a comma */
.tag-input {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.tag-input:focus-within { outline: 2px solid var(--focus); outline-offset: 1px; }
.tag-input input { flex: 1; min-width: 180px; width: auto; padding: 4px 2px; border: 0; background: transparent; }
.tag-input input:focus-visible { outline: none; }
.tag-input .chip { background: var(--surface-2); }
.small-button { padding: 4px 12px; font-size: 13px; }

.warn-entries { margin: 8px 0 0; padding-left: 20px; font-size: 14px; }

/* ---------- landing page ---------- */

.landing main { max-width: 1040px; }
.site-nav { display: flex; align-items: center; gap: 20px; }
.site-nav a:not(.button) { color: var(--muted); text-decoration: none; font-weight: 600; }
.site-nav a:not(.button):hover { color: var(--text); }

.hero { text-align: center; padding: 56px 0 40px; }
.hero h1 { font-size: clamp(30px, 5.5vw, 48px); max-width: 760px; margin: 0 auto 16px; letter-spacing: -.02em; }
.hero .logo.lg { display: block; width: 220px; height: auto; margin: 0 auto 20px; filter: drop-shadow(0 10px 36px rgba(0, 100, 248, .45)); }
.hero .accent { background: linear-gradient(90deg, var(--pip-blue), var(--pip-cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 18px; color: var(--muted); max-width: 620px; margin: 0 auto 28px; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.button.big { padding: 12px 24px; font-size: 16px; }

.section { padding: 40px 0; }
.section-title { font-size: 26px; text-align: center; margin-bottom: 20px; }

.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.feature { margin: 0; }
.feature.wide { grid-column: 1 / -1; }
.feature-icon { font-size: 28px; margin-bottom: 8px; }
.feature h3 .badge { margin-left: 6px; vertical-align: middle; }
.see-all { margin-top: 20px; }

.pricing { display: grid; grid-template-columns: repeat(2, minmax(0, 340px)); gap: 20px; justify-content: center; margin-top: 20px; }
.tier { position: relative; display: flex; flex-direction: column; margin: 0; }
.tier.featured { border: 2px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--gradient) border-box; }
.tier .badge { position: absolute; top: -12px; right: 16px; }
.tier .price { font-size: 32px; font-weight: 700; margin-bottom: 4px; }
.perks { padding-left: 20px; margin: 12px 0 20px; flex: 1; }
.perks li { margin-bottom: 6px; }

.faq { max-width: 720px; margin: 0 auto; }
.faq details { padding: 14px 20px; margin-bottom: 10px; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq details p { margin: 10px 0 0; }

/* Embed builder: form on the left, Discord-like preview on the right */
.embed-builder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 16px; align-items: start; }
.sticky-preview { position: sticky; top: 12px; }
.embed-swatch { width: 10px; align-self: stretch; border-radius: 4px; flex: none; }
.embed-field textarea { margin-top: 6px; min-height: 52px; }
.discord-message { padding: 12px; border-radius: 8px; background: #313338; color: #dbdee1; font-size: 14px; }
.pv-content { margin-bottom: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.pv-embed { display: flex; gap: 12px; padding: 10px 14px 12px 12px; border-left: 4px solid #0064f8; border-radius: 4px; background: #2b2d31; }
.pv-main { flex: 1; min-width: 0; }
.pv-author { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #f2f3f5; margin-bottom: 6px; }
.pv-author .linked:hover { text-decoration: underline; }
.pv-icon { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex: none; }
.pv-icon.small { width: 20px; height: 20px; }
.pv-title { font-weight: 700; color: #f2f3f5; margin-bottom: 4px; overflow-wrap: anywhere; }
.pv-title.linked { color: #00a8fc; }
.pv-description { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13.5px; }
.pv-fields { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-top: 8px; }
.pv-field { flex: 1 1 100%; min-width: 0; }
.pv-field.inline { flex: 1 1 28%; }
.pv-field-name { font-weight: 700; font-size: 13px; color: #f2f3f5; }
.pv-field-value { font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.pv-image { display: block; max-width: 100%; max-height: 300px; margin-top: 10px; border-radius: 4px; }
.pv-thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 4px; flex: none; }
.pv-footer { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; color: #b5bac1; }
.discord-message a { color: #00a8fc; }
.pv-mention { padding: 0 2px; border-radius: 3px; background: rgba(88, 101, 242, .3); color: #c9cdfb; font-weight: 500; }
textarea.tall { min-height: 160px; }
input[type="datetime-local"] { width: 100%; padding: 8px 10px; background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 6px; font: inherit; color-scheme: light dark; }
.pv-code { padding: 0 3px; border-radius: 3px; background: #1e1f22; font-size: 12.5px; }
@media (max-width: 1120px) { .embed-builder { grid-template-columns: 1fr; } .sticky-preview { position: static; } }

/* Commands page */
.commands-page .section { padding-top: 32px; }
.command-tools { position: sticky; top: 0; z-index: 2; padding: 12px 0; margin-bottom: 8px; background: var(--bg); }
.command-tools input { width: 100%; font-size: 16px; padding: 10px 14px; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; }
.command-jump { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.command-jump .chip { padding: 4px 12px; color: var(--text); text-decoration: none; }
.command-jump .chip:hover { background: var(--border); }
.command-section { scroll-margin-top: 130px; margin-top: 28px; }
.command-section h2 { font-size: 21px; margin-bottom: 12px; }
.command-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.command { margin: 0; padding: 16px; }
.command-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.command-usage { font-size: 14px; font-weight: 600; color: var(--link); overflow-wrap: anywhere; }
.command-desc { margin: 6px 0 0; }
.command-options { margin: 8px 0 0; padding-left: 18px; font-size: 13px; }
.command-options li { margin-bottom: 3px; }
.command-perm { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; }

/* Privacy Policy and Terms pages */
.legal { max-width: 760px; line-height: 1.65; }
.legal h1 { font-size: 30px; margin-bottom: 4px; }
.legal h2 { font-size: 19px; margin: 28px 0 8px; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal mark { background: var(--gold-soft); color: var(--text); padding: 0 4px; border-radius: 4px; }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 24px 16px 40px;
  border-top: 1px solid var(--border);
}

/* ---------- toast ---------- */

#toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 10px 18px;
  border-radius: var(--radius);
  background: var(--success);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .25);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
#toast.show { opacity: 1; pointer-events: auto; }
#toast.error { background: var(--danger); }

@media (max-width: 640px) {
  .topbar { padding: 10px 16px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .account .name { display: none; }
  .list-item { flex-wrap: wrap; }
  .site-nav { gap: 12px; }
  .site-nav a:not(.button) { display: none; }
  .features, .pricing { grid-template-columns: 1fr; }
  .hero { padding-top: 32px; }
}
