html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.profile-dropdown-menu {
  max-height: 300px;
  overflow-y: auto;
}

.profile-dropdown-search-pin {
  position: sticky;
  top: 0;
  background-color: var(--bs-dropdown-bg, #fff);
  z-index: 1;
}

/* ---------- landing page ---------- */

:root {
  --sigil-accent-1: #f97316; /* orange */
  --sigil-accent-2: #facc15; /* yellow */
  --sigil-accent-1-rgb: 249, 115, 22;
  --sigil-accent-2-rgb: 250, 204, 21;
  --sigil-gradient: linear-gradient(135deg, var(--sigil-accent-1), var(--sigil-accent-2));

  /* the button redesign's own accent, sampled directly from the reference image (close to but not
     identical to --sigil-accent-1 above) - kept separate so it doesn't also change unrelated things
     like the nav underline or the premium gem. */
  --btn-accent: #fd9425;
  --btn-accent-rgb: 253, 148, 37;
  /* Measured directly from the reference image (button height vs. notch cut, both in raw pixels),
     as a ratio of font-size rather than a fixed px, so the cut scales correctly whether it's a
     small nav button or a large hero CTA - a fixed px was exactly what made "My Profile" oversized. */
  --btn-notch: 0.5em;
  --btn-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='4' y1='12' x2='20' y2='12'/%3E%3Cpolyline points='13 5 20 12 13 19'/%3E%3C/svg%3E");
}

/* The two looks. Dark is "midnight indigo" (the default, and the only look of pages that have not been given a light one yet); light is "sky". Pages with both say so
   (data-themes="both" on <html>) and follow the visitor's device or their sun/moon choice: see js/theme.js. Change a colour here and it changes everywhere. */
[data-bs-theme="dark"] {
  --bs-body-bg: #100c33;
  --bs-tertiary-bg: #17123f;
  --bs-secondary-bg: #1c1649;
  --bs-border-color: rgba(255, 255, 255, 0.15);

  /* the whole page behind everything: a soft indigo glow that fades to the deep end of the colour */
  --sg-page: linear-gradient(170deg, #2b2172 0%, #1b1550 42%, #0e0b2c 100%);

  /* text and lines of the top bar, and the sigil mark's own colours (yellow at the top, orange lower down) */
  --nav-link: #a7a3c4;
  --nav-link-hover: #f6f4ff;
  --nav-line: rgba(255, 255, 255, 0.28);
  --brand-text: #f6f4ff;
  --mark-1: #ffe066;
  --mark-2: #ffa02e;
  --mark-3: #ff5a1f;
  --mark-gloss-top: 0.5;
  --mark-gloss-bottom: 0.21;
}

[data-bs-theme="light"] {
  --bs-body-bg: #eaf4ff;
  --bs-body-color: #0d2138;
  --bs-emphasis-color: #08192b;
  --bs-secondary-color: rgba(13, 33, 56, 0.72);
  --bs-secondary-rgb: 61, 82, 108;
  --bs-tertiary-bg: #eef5fd;
  --bs-secondary-bg: #e2edfa;
  --bs-border-color: #bcd3ea;
  --bs-link-color: #d4550b;
  --bs-link-hover-color: #a83f06;
  --bs-link-color-rgb: 212, 85, 11;
  --bs-link-hover-color-rgb: 168, 63, 6;

  --sg-page: linear-gradient(180deg, #b9dcff 0%, #d6ebff 30%, #eef6ff 62%, #fff8ef 100%);

  --nav-link: #4b6280;
  --nav-link-hover: #08192b;
  --nav-line: #8fb0d2;
  --brand-text: #0d2138;
  --mark-1: #ffac2a;
  --mark-2: #f56a10;
  --mark-3: #dc2a0a;
  --mark-gloss-top: 0.32;
  --mark-gloss-bottom: 0.14;
}

html {
  background: var(--sg-page, var(--bs-body-bg));
  background-attachment: fixed;
  min-height: 100%;
}

body {
  background: transparent;
}

.sigil-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
}

.sigil-brand-text {
  font-family: "Space Grotesk", "Inter", system-ui, sans-serif;
  letter-spacing: -0.03em;
  color: var(--brand-text, #f2f0ec);
}

.navbar-brand.sigil-brand {
  color: var(--brand-text, #f2f0ec);
}

.brand-mark {
  width: 28px;
  height: 28px;
}

.mark-stop-1 { stop-color: var(--mark-1, #ffe066); }
.mark-stop-2 { stop-color: var(--mark-2, #ffa02e); }
.mark-stop-3 { stop-color: var(--mark-3, #ff5a1f); }
.mark-gloss-top { stop-opacity: var(--mark-gloss-top, 0.5); }
.mark-gloss-bottom { stop-opacity: var(--mark-gloss-bottom, 0.21); }

/* the light/dark button: a sun when the page is dark (press for light), a moon when it is light */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--nav-line, rgba(255, 255, 255, 0.28));
  border-radius: 8px;
  background: transparent;
  color: var(--nav-link-hover, #f6f4ff);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--sigil-accent-1);
  background: rgba(var(--sigil-accent-1-rgb), 0.1);
}

.theme-toggle-row {
  width: auto;
  height: auto;
  padding: 0.55rem 0.9rem;
  margin: 0 0.8rem;
  font-size: 0.88rem;
  color: var(--nav-link, #a7a3c4);
  border-color: transparent;
}

.theme-toggle .ic-moon { display: none; }
[data-bs-theme="light"] .theme-toggle .ic-sun { display: none; }
[data-bs-theme="light"] .theme-toggle .ic-moon { display: inline; }

/* /EditEntrance */
.entrance-page {
  max-width: 52rem;
  margin: 0 auto;
}

.entrance-preview-figure {
  margin: 0 0 1.25rem;
}

.entrance-preview {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1.75rem;
  box-shadow: 0 16px 40px -20px rgba(0, 0, 0, 0.6);
}

/* /EditReactions emoji grid, ticked ones get an accent outline */
.reactions-page {
  max-width: 52rem;
  margin: 0 auto;
}

.emoji-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.emoji-choice {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  font-size: 1.6rem;
  line-height: 1;
}

.emoji-choice:hover {
  background: rgba(255, 255, 255, 0.1);
}

.emoji-choice input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}

.emoji-choice:has(input:checked) {
  border-color: var(--sigil-accent-1);
  background: rgba(var(--sigil-accent-1-rgb), 0.18);
}

.emoji-choice:has(input:focus-visible) {
  outline: 2px solid var(--sigil-accent-2);
  outline-offset: 2px;
}

.emoji-image {
  display: block;
  width: 2rem;
  height: 2rem;
  object-fit: contain;
}

/* Log in / Log out button (inside the menu on phones) */
.navbar .nav-auth-btn {
  align-self: center;
  margin: 0.5rem 0 0.25rem;
  /* normal padding made the bar taller */
  padding: 0.4rem 1.1rem;
  font-size: 0.875rem;
  white-space: nowrap;
}

@media (min-width: 576px) {
  .navbar .nav-auth-btn {
    margin: 0 0 0 0.5rem;
  }
}

/* The end of the top bar: CONQUEST in a box of its own, then the Log in / Log out link.
   It is not inside the collapsing menu, so on phones it stays in the bar beside the brand:
   brand, then this (pushed right), then the menu button; the links open below. */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  order: 2;
  margin: 0 0.6rem 0 auto;
}

.site-nav .navbar-brand {
  order: 1;
}

.site-nav .navbar-toggler {
  order: 3;
}

.site-nav .navbar-collapse {
  order: 4;
}

@media (min-width: 768px) {
  .site-nav .navbar-collapse {
    order: 2;
  }

  .nav-actions {
    order: 3;
    gap: 1.1rem;
    margin: 0 0 0 0.5rem;
  }
}

/* Log in / Log out is a plain word with a line under it, not a button. */
.navbar .nav-actions .nav-auth-btn {
  margin: 0;
  padding: 0 0 1px;
  overflow: visible;
  border: 0;
  border-bottom: 1px solid var(--nav-line, #3a3835);
  border-radius: 0;
  background: none;
  clip-path: none;
  color: var(--nav-link-hover, #f2f0ec);
  font-family: "Inter", "Segoe UI Variable Text", system-ui, sans-serif;
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  transition: border-color 0.2s ease;
}

.navbar .nav-actions .nav-auth-btn::before,
.navbar .nav-actions .nav-auth-btn::after {
  display: none;
}

.navbar .nav-actions .nav-auth-btn:hover,
.navbar .nav-actions .nav-auth-btn:focus-visible {
  border-color: transparent;
  border-bottom-color: var(--sigil-accent-1);
  background: none;
  color: #fff;
}

/* CONQUEST gets a box of its own: a warm glow that breathes, and a thin line of colour that keeps travelling round its edge. Both stop for people who ask for less motion. */
@property --cq-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.nav-conquest {
  --cq-angle: 0deg;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1rem 0.5rem 0.65rem;
  border: 1px solid rgba(var(--sigil-accent-1-rgb), 0.32);
  border-radius: 4px;
  background: linear-gradient(135deg, #1d1108, #0b0705);
  box-shadow: 0 0 26px -6px rgba(var(--sigil-accent-1-rgb), 0.55);
  color: #ffd9b0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  animation: cq-nav-breathe 3.2s ease-in-out infinite;
}

.nav-conquest::before {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 2px;
  border-radius: 5px;
  background: conic-gradient(from var(--cq-angle), transparent 0 55%, #f97316 75%, #facc15 90%, transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  animation: cq-nav-spin 3.2s linear infinite;
}

.nav-conquest:hover,
.nav-conquest:focus-visible {
  border-color: rgba(var(--sigil-accent-1-rgb), 0.6);
  color: #fff;
}

.nav-conquest:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.nav-conquest[aria-current="page"] {
  border-color: rgba(var(--sigil-accent-1-rgb), 0.7);
  color: #fff;
}

.nav-conquest-logo {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  animation: cq-nav-logo 3s ease-in-out infinite;
}

@keyframes cq-nav-spin {
  to { --cq-angle: 360deg; }
}

@keyframes cq-nav-breathe {
  50% { box-shadow: 0 0 34px -4px rgba(var(--sigil-accent-2-rgb), 0.5); }
}

@keyframes cq-nav-logo {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.15); filter: brightness(1.3); }
}

@media (prefers-reduced-motion: reduce) {
  .nav-conquest,
  .nav-conquest::before,
  .nav-conquest-logo {
    animation: none;
  }
}

/* phones: a smaller box so brand, CONQUEST, Log in and the menu button fit on one line */
@media (max-width: 767.98px) {
  .nav-conquest {
    gap: 0.4rem;
    padding: 0.38rem 0.6rem 0.38rem 0.45rem;
    font-size: 0.62rem;
    letter-spacing: 0.14em;
  }

  .nav-conquest-logo {
    width: 1.05rem;
    height: 1.05rem;
  }

  .navbar .nav-actions .nav-auth-btn {
    font-size: 0.82rem;
  }

  .site-nav .navbar-brand {
    margin-right: 0.5rem;
  }
}

/* the opened menu: links big enough for a thumb */
@media (max-width: 767.98px) {
  .site-nav .nav-pills-row {
    padding: 0.3rem 0 0.5rem;
  }

  .site-nav .nav-pills-row .nav-link {
    padding: 0.65rem 0;
  }
}

@media (max-width: 359.98px) {
  .nav-conquest {
    letter-spacing: 0.08em;
  }

  .nav-actions {
    gap: 0.6rem;
    margin-right: 0.4rem;
  }
}

/* Nav links: quiet, and white when hovered or on the page you are on. */
.site-nav {
  background: transparent;
}

.nav-pills-row .nav-link {
  position: relative;
  padding: 0.4rem 0;
  margin: 0 0.8rem;
  font-family: "Inter", "Segoe UI Variable Text", system-ui, sans-serif;
  font-size: 0.88rem;
  color: var(--nav-link, #8d8a85);
  transition: color 0.2s ease;
}

.nav-pills-row .nav-link:hover,
.nav-pills-row .nav-link:focus-visible,
.nav-pills-row .nav-link.active {
  color: var(--nav-link-hover, #f2f0ec);
}
/* "Can't log in?" details, styled like a link */
.login-help summary {
  display: inline;
  cursor: pointer;
  list-style: none;
  color: var(--bs-link-color);
  text-decoration: underline;
}

.login-help summary::-webkit-details-marker {
  display: none;
}

.login-help[open] summary {
  margin-bottom: 0.5rem;
  display: block;
}

.login-help p {
  max-width: 32rem;
  margin: 0 auto;
}

/* All three share the same cut-corner silhouette and lettering; each variant below only sets its
   own colors. Quiet by default (charcoal surface, thin muted border) - the accent only shows up as
   a response to interaction (a thin line on the bottom edge, plus a sheen sweeping across), not as
   a constant glow. */
.btn-sigil,
.btn-sigil-outline,
.btn-sigil-danger {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
  /* Derived, not guessed: rendered "CREATE PROFILE" in real JetBrains Mono Bold, measured its
     natural (zero-tracking) width, and compared that to the word's actual measured pixel width
     in the reference image. The gap between the two, spread over 13 letter-gaps, is this value. */
  letter-spacing: 0.36em;
  /* Not from the reference image (that's a fixed-scale mockup, not a proportion to this site's own
     body text) - a direct, modest reduction in response to "still a bit too big". */
  font-size: 0.7rem;
  border-radius: 0;
  clip-path: polygon(
    var(--btn-notch) 0, 100% 0, 100% calc(100% - var(--btn-notch)),
    calc(100% - var(--btn-notch)) 100%, 0 100%, 0 var(--btn-notch)
  );
}

/* the reference's primary button pins its arrow to the far edge, with a wide gap - not tight
   against the text - so it needs its own two ends pushed apart rather than centered as a group. */
.btn-sigil:not(.card-menu-toggle) {
  justify-content: space-between;
}

/* the diagonal sheen: a soft light band, off to the left at rest, that sweeps across on hover.
   ::before is free on all three variants (the arrow below uses ::after). */
.btn-sigil::before,
.btn-sigil-outline::before,
.btn-sigil-danger::before {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 35%;
  height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  transform: skewX(-20deg);
  transition: left 0.65s ease;
  pointer-events: none;
}

.btn-sigil:hover::before,
.btn-sigil-outline:hover::before,
.btn-sigil-danger:hover::before {
  left: 130%;
}

.btn-sigil {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 55%), var(--bs-secondary-bg);
  border: 1.5px solid rgba(var(--btn-accent-rgb), 0.22);
  color: var(--btn-accent);
  font-weight: 700;
  padding: 1.3em 2em;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.btn-sigil:hover,
.btn-sigil:focus-visible {
  border-color: rgba(var(--btn-accent-rgb), 0.35);
  border-bottom-color: var(--btn-accent);
  color: #fff;
}

/* the reference's primary button has a trailing arrow; nothing else needs one, including this same
   class used as the icon-only card-menu button (.card-menu-toggle::after already turns this off). */
.btn-sigil:not(.card-menu-toggle)::after {
  content: "";
  width: 1.1em;
  height: 1.1em;
  flex: none;
  background-color: currentColor;
  -webkit-mask: var(--btn-arrow) no-repeat center / contain;
  mask: var(--btn-arrow) no-repeat center / contain;
}

.btn-sigil-outline {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0) 55%), var(--bs-secondary-bg);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  padding: 1.3em 2em;
  transition: border-color 0.25s ease, color 0.25s ease;
}

.btn-sigil-outline:hover,
.btn-sigil-outline:focus-visible {
  border-color: rgba(255, 255, 255, 0.22);
  border-bottom-color: rgba(255, 255, 255, 0.7);
  color: #fff;
}

/* delete / remove buttons */
.btn-sigil-danger {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0) 55%), var(--bs-secondary-bg);
  border: 1.5px solid rgba(var(--bs-danger-rgb), 0.3);
  color: var(--bs-danger);
  font-weight: 600;
  padding: 1.3em 2em;
  transition: border-color 0.25s ease, color 0.25s ease;
}

.btn-sigil-danger:hover,
.btn-sigil-danger:focus-visible {
  border-color: rgba(var(--bs-danger-rgb), 0.5);
  border-bottom-color: var(--bs-danger);
  color: #fff;
}

/* tighter row of buttons above a card (Friends, the options gear, moderator tools) reads as a
   toolbar, not a page-level call to action, so it gets its own smaller size - both a smaller font
   and tighter padding, since the padding ratio measured off the large reference button was too
   generous to also carry over to a compact toolbar. */
.btn-sigil.btn-sm,
.btn-sigil-outline.btn-sm,
.btn-sigil-danger.btn-sm {
  font-size: 0.5rem;
  padding: 0.9em 1.4em;
}

/* the one icon button above a card that expands into Edit profile / Edit card */
.card-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  padding: 0;
}

.card-menu-toggle::after {
  display: none;
}

.card-menu-icon {
  width: 0.85rem;
  height: 0.85rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.premium-badge {
  color: #14100a;
  background: linear-gradient(135deg, #ff7a18, #ffd200);
  font-weight: 700;
  vertical-align: middle;
}

/* opacity preview, busy backdrop so the fade is easy to see */
.opacity-value {
  min-width: 3.5rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.opacity-sample-backdrop {
  padding: 1rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, #f97316, #ec4899 45%, #6366f1);
}

.opacity-sample {
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  text-align: center;
  background: color-mix(in srgb, var(--bs-body-bg) calc(var(--tile-opacity, 100) * 1%), transparent);
}

.edit-background-preview {
  display: block;
  max-width: 100%;
  max-height: 10rem;
  border-radius: 0.6rem;
}

/* With several presets, each one's background gets its own panel. */
.preset-background-many {
  padding: 0.9rem 1rem;
  margin-top: 0.9rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.8rem;
}

.preset-background-title {
  margin-bottom: 0.75rem;
}

.font-sample {
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
}

.section-heading {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

/* /Admin/WhatsNew */
.admin-whatsnew {
  max-width: 52rem;
  margin: 0 auto;
}

.whatsnew-add {
  margin: 1.25rem 0 2rem;
  padding: 1rem;
  border: 1px solid rgba(var(--sigil-accent-2-rgb), 0.25);
  border-radius: 0.75rem;
}

.whatsnew-admin-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.whatsnew-admin-item {
  display: flex;
  gap: 1rem;
  padding: 0.75rem;
  border: 1px solid rgba(var(--sigil-accent-2-rgb), 0.25);
  border-radius: 0.75rem;
}

.whatsnew-admin-thumb {
  flex: 0 0 auto;
  width: 5rem;
  height: 5rem;
  object-fit: cover;
  border-radius: 0.5rem;
}

.whatsnew-admin-body {
  flex: 1 1 auto;
  min-width: 0;
}

.whatsnew-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.whatsnew-admin-actions form {
  margin: 0;
}

/* /Admin/Dashboard */
.dashboard-page {
  max-width: 64rem;
  margin: 0 auto;
}

.dash-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.75rem;
  margin: 1.25rem 0 0.5rem;
}

.dash-stat {
  padding: 0.75rem 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  background: var(--bs-tertiary-bg);
}

.dash-stat-number {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.1;
}

.dash-stat-label {
  font-size: 0.8rem;
  color: var(--bs-secondary-color);
}

.dash-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.dash-feature {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex: 1 1 16rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  background: var(--bs-tertiary-bg);
}

.dash-search {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0.75rem 0;
}

.dash-search .form-control {
  flex: 1 1 14rem;
  max-width: 22rem;
}

.dash-table td,
.dash-table th {
  white-space: nowrap;
}

.dash-pager {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.75rem 0;
}

/* /Admin/Featured */
.admin-featured {
  max-width: 52rem;
  margin: 0 auto;
}

.featured-add {
  margin: 1.25rem 0;
}

.featured-add-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.featured-add-row .form-control {
  flex: 1 1 16rem;
}

.featured-admin-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.featured-admin-item {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.75rem;
  border: 1px solid rgba(var(--sigil-accent-2-rgb), 0.25);
  border-radius: 0.75rem;
}

.featured-admin-thumb {
  display: block;
  width: 12rem;
  max-width: 100%;
  height: 7.5rem;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 0.5rem;
}

.featured-admin-body {
  flex: 1 1 16rem;
  min-width: 0;
}

.featured-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.5rem 0;
}

.featured-admin-actions form {
  margin: 0;
}

.featured-replace {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.featured-replace .form-control {
  flex: 1 1 12rem;
}

.admin-prompts {
  max-width: 52rem;
  margin: 0 auto;
}

.prompt-kind-section {
  margin: 1.75rem 0;
  padding: 1rem;
  border: 1px solid rgba(var(--sigil-accent-2-rgb), 0.25);
  border-radius: 0.75rem;
}

.prompt-add textarea {
  resize: vertical;
}

.prompt-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.prompt-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(var(--sigil-accent-2-rgb), 0.15);
  border-radius: 0.5rem;
}

.prompt-item form {
  margin: 0;
  flex: 0 0 auto;
}

.categories-showcase {
  padding: 2rem 1rem 5rem;
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-top: 2rem;
}

.category-pill {
  border: 1px solid rgba(var(--sigil-accent-2-rgb), 0.35);
  color: var(--bs-body-color);
  padding: 0.4rem 1.1rem;
  border-radius: 50rem;
  font-size: 0.95rem;
  background: rgba(var(--sigil-accent-1-rgb), 0.08);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.category-pill:hover {
  border-color: var(--sigil-accent-1);
  background: rgba(var(--sigil-accent-1-rgb), 0.16);
}

/* ---------- profile box contents (the boxes are in card.css) ---------- */

/* a thin accent-tinted ring, not the old solid gradient disc - the cinematic look keeps the
   picture itself as the focal point rather than wrapping it in a bright band of colour. */
.profile-avatar-ring {
  display: inline-block;
  position: relative;
  padding: 3px;
  margin-bottom: 0.6rem;
  border-radius: 50%;
  background: rgba(var(--sigil-accent-1-rgb), 0.5);
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.6);
}

.profile-avatar {
  display: block;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(8, 8, 10, 0.9);
}

.profile-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: #14100a;
  background: var(--sigil-gradient);
}

.profile-username {
  font-size: 1.15rem;
  font-weight: 700;
}

.profile-handle {
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.profile-bio {
  white-space: pre-line;
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink);
  max-width: 32ch;
}

.profile-category-group {
  margin-bottom: 1.5rem;
}

.profile-category-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bs-secondary-color);
  margin-bottom: 0.5rem;
  display: block;
}

.profile-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.profile-empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--bs-secondary-color);
}

/* ---------- edit profile sidebar shell ---------- */

.edit-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 768px) {
  .edit-shell {
    grid-template-columns: 12rem minmax(0, 1fr);
  }
}

.edit-sidebar {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.35rem;
  position: static;
}

@media (min-width: 768px) {
  .edit-sidebar {
    flex-direction: column;
    position: sticky;
    top: 1rem;
  }
}

.edit-sidebar-link {
  text-align: left;
  padding: 0.55rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 0.7rem;
  background: transparent;
  color: var(--bs-body-color);
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.edit-sidebar-link:hover {
  background: rgba(var(--sigil-accent-1-rgb), 0.1);
}

.edit-sidebar-link.active {
  border-color: rgba(var(--sigil-accent-1-rgb), 0.4);
  background: rgba(var(--sigil-accent-1-rgb), 0.14);
  color: var(--sigil-accent-2);
}

.edit-content {
  min-width: 0;
}

.permission-toggle-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.permission-toggle {
  padding: 1.75rem 1.5rem;
  border-radius: 1rem;
  border: 1px solid rgba(250, 204, 21, 0.25);
  background: linear-gradient(180deg, rgba(249, 115, 22, 0.05), transparent 35%), var(--bs-body-bg);
}

/* ---------- edit profile sections ---------- */

.edit-section-box {
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 1rem;
  border: 1px solid rgba(250, 204, 21, 0.25);
  background: linear-gradient(180deg, rgba(249, 115, 22, 0.05), transparent 35%), var(--bs-body-bg);
}

.edit-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.edit-section-subtitle {
  margin-bottom: 1.5rem;
}

/* keeps the space so nothing jumps when "No avatar" hides the preview */
.avatar-preview-slot {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}

.edit-avatar-preview {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.edit-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 700;
  color: #14100a;
  background: var(--sigil-gradient);
}

.theme-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.theme-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  position: relative;
}

/* radio is hidden, the coloured chip is what you click */
.theme-swatch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.theme-swatch-chip {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  transition: transform 0.15s ease, outline-color 0.15s ease;
  outline: 3px solid transparent;
  outline-offset: 3px;
}

.theme-swatch:hover .theme-swatch-chip {
  transform: scale(1.08);
}

.theme-swatch input:checked + .theme-swatch-chip {
  outline-color: var(--bs-body-color);
}

.theme-swatch input:focus-visible + .theme-swatch-chip {
  outline-color: var(--sigil-accent-1);
}

/* "None" choice, empty box with a slash */
.background-none-chip {
  background: repeating-linear-gradient(45deg, transparent 0 6px, rgba(255, 255, 255, 0.12) 6px 8px);
}

.theme-swatch-label {
  font-size: 0.8rem;
  color: var(--bs-secondary-color);
}

/* ---------- Guide page ---------- */

.guide-page {
  max-width: 48rem;
  margin: 0 auto;
  padding-bottom: 3rem;
}

.guide-page h2 {
  scroll-margin-top: 1rem;
}

.guide-toc {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  background: var(--bs-tertiary-bg);
}

.guide-toc ul {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  columns: 2 14rem;
}

.guide-toc li {
  padding: 0.15rem 0;
}

.guide-list dt {
  margin-top: 0.9rem;
  font-weight: 700;
}

.guide-list dd {
  margin: 0.15rem 0 0;
  color: var(--bs-secondary-color);
}

.guide-commands code {
  font-size: 1rem;
}


/* ---------- the whole site in sky ----------
   Sky is the main look everywhere except the CONQUEST game screens. The pages are built on Bootstrap's variables, which the [data-bs-theme="light"] block near the top already
   sets; what is below are the pieces that had a colour written straight into them for the dark look (buttons, the card's small print, the profile box, the side tabs). */

[data-bs-theme="light"] {
  --btn-accent: #c2410c;
  --btn-accent-rgb: 194, 65, 12;

  /* the ink of a card's small print (tile labels, stats, pills, comments): navy on sky, white on a picture (see the profile box below) */
  --ink-strong: #08192b;
  --ink: rgba(13, 33, 56, 0.86);
  --ink-soft: rgba(13, 33, 56, 0.68);
  --ink-mute: rgba(13, 33, 56, 0.5);
  --pill-bg: rgba(13, 33, 56, 0.05);
  --pill-border: rgba(13, 33, 56, 0.16);
}

[data-bs-theme="dark"] {
  --ink-strong: #fff;
  --ink: rgba(255, 255, 255, 0.85);
  --ink-soft: rgba(255, 255, 255, 0.6);
  --ink-mute: rgba(255, 255, 255, 0.45);
  --pill-bg: rgba(255, 255, 255, 0.035);
  --pill-border: rgba(255, 255, 255, 0.12);
}

/* buttons: the main one is solid orange with dark lettering (like the landing page's), the others are pale glass with navy lettering */
[data-bs-theme="light"] .btn-sigil {
  background: linear-gradient(135deg, #ffb04a, #f97316);
  border-color: #ea580c;
  color: #180a01;
}

[data-bs-theme="light"] .btn-sigil:hover,
[data-bs-theme="light"] .btn-sigil:focus-visible {
  background: linear-gradient(135deg, #ffbe66, #fb8a2e);
  border-color: #c2410c;
  color: #180a01;
}

[data-bs-theme="light"] .btn-sigil-outline {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(13, 33, 56, 0.26);
  color: #0d2138;
}

[data-bs-theme="light"] .btn-sigil-outline:hover,
[data-bs-theme="light"] .btn-sigil-outline:focus-visible {
  background: #fff;
  border-color: rgba(13, 33, 56, 0.4);
  border-bottom-color: #f97316;
  color: #08192b;
}

[data-bs-theme="light"] .btn-sigil-danger {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(185, 28, 28, 0.4);
  color: #b91c1c;
}

[data-bs-theme="light"] .btn-sigil-danger:hover,
[data-bs-theme="light"] .btn-sigil-danger:focus-visible {
  background: #fff;
  border-color: rgba(185, 28, 28, 0.6);
  border-bottom-color: #b91c1c;
  color: #7f1d1d;
}

/* the side tabs of Edit profile and the dashboard */
[data-bs-theme="light"] .edit-sidebar-link.active {
  border-color: rgba(234, 88, 12, 0.5);
  background: rgba(249, 115, 22, 0.14);
  color: #9a3412;
}

/* the profile box: charcoal glass on indigo, pale glass on sky; with a picture behind it the words stay white (the picture has its own dark veil) */
[data-bs-theme="light"] .widget-profile {
  background: rgba(255, 255, 255, 0.4);
}

[data-bs-theme="light"] .widget-profile:has(.profile-widget-bg) {
  --ink-strong: #fff;
  --ink: rgba(255, 255, 255, 0.9);
  --ink-soft: rgba(255, 255, 255, 0.72);
  --ink-mute: rgba(255, 255, 255, 0.55);
  --pill-bg: rgba(255, 255, 255, 0.06);
  --pill-border: rgba(255, 255, 255, 0.2);
  --bs-body-color: #fff;
  --bs-emphasis-color: #fff;
  --bs-secondary-color: rgba(255, 255, 255, 0.72);
  background: rgba(8, 8, 10, 0.4);
  color: #fff;
}

/* the small labels next to a name (on cards and in the moderators' lists), so they look the same wherever they are shown */
.mod-badge {
  color: #fff;
  background: linear-gradient(135deg, #5865f2, #7b8bff);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: middle;
}

/* Developer tag: orange like the logo so it isn't mistaken for the blue mod one */
.dev-badge {
  color: #14100a;
  background: linear-gradient(135deg, #f97316, #fbbf24);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: middle;
}

/* SIGIL CONQUEST champion: a season's winning side. Dark ember with an orange rim, the colours of the game itself */
.champion-badge {
  color: #ffb13d;
  background: linear-gradient(135deg, #3b2216, #1c100b);
  border: 1px solid rgba(255, 150, 50, 0.55);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: middle;
}
