/* ==========================================================================
   Beltchecker — modern layer (2026)
   Loaded after the template CSS. Restyles shared UI (surfaces, type,
   buttons, inputs, navigation, tables) and adds motion. No markup changes.
   ========================================================================== */

:root {
  --bc-bg: #f4f4f6;
  --bc-surface: #ffffff;
  --bc-surface-2: #f6f6f8;
  --bc-surface-3: #eeeef2;
  --bc-ink: #0b0b10;
  --bc-ink-2: #3a3a44;
  --bc-muted: #6b6b76;
  --bc-faint: #9a9aa5;
  --bc-line: rgba(15, 15, 25, 0.07);
  --bc-line-strong: rgba(15, 15, 25, 0.12);

  /* Brand, taken from the logo quadrants */
  --bc-cyan: #03c3e3;
  --bc-violet: #7a3aa8;
  --bc-clay: #d4744f;
  --bc-brand-grad: linear-gradient(120deg, #03c3e3 0%, #5b4bd1 45%, #9a3ea8 70%, #d4744f 100%);

  --bc-accent: #5b4bd1;
  --bc-green: #16a34a;
  --bc-green-2: #22c55e;
  --bc-blue: #2563eb;
  --bc-amber: #f59e0b;
  --bc-red: #e11d48;

  --bc-r-sm: 10px;
  --bc-r: 14px;
  --bc-r-lg: 22px;

  --bc-shadow-1: 0 1px 2px rgba(16, 16, 30, 0.04), 0 1px 1px rgba(16, 16, 30, 0.03);
  --bc-shadow-2: 0 1px 2px rgba(16, 16, 30, 0.04), 0 8px 24px -6px rgba(16, 16, 30, 0.08);
  --bc-shadow-3: 0 2px 4px rgba(16, 16, 30, 0.04), 0 18px 48px -12px rgba(16, 16, 30, 0.18);
  --bc-ring: 0 0 0 4px rgba(91, 75, 209, 0.16);

  --bc-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --bc-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --bc-font: "Geist", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --bc-on-ink: #ffffff;   /* text on a --bc-ink background (primary buttons, active tabs) */
  --bc-glass: rgba(255, 255, 255, 0.78);          /* top bar, bottom bar, sticky headers */
  --bc-glass-strong: rgba(255, 255, 255, 0.92);
  --bc-glass-edge: rgba(255, 255, 255, 0.7);
}
/* Dark mode (html[data-theme="dark"], header.php): the tokens flip, so everything drawn with them follows.
   The older w3.css / Bootstrap / template classes are handled in styles/dark.css. */
html[data-theme="dark"] {
  --bc-bg: #0d0d12;
  --bc-surface: #17171f;
  --bc-surface-2: #1d1d26;
  --bc-surface-3: #272731;
  --bc-ink: #f1f1f5;
  --bc-ink-2: #cfcfd8;
  --bc-muted: #a0a0ad;
  --bc-faint: #767684;
  --bc-line: rgba(255, 255, 255, 0.08);
  --bc-line-strong: rgba(255, 255, 255, 0.15);
  --bc-accent: #9d90ff;
  --bc-violet: #b779e0;
  --bc-shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --bc-shadow-2: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 24px -6px rgba(0, 0, 0, 0.55);
  --bc-shadow-3: 0 2px 4px rgba(0, 0, 0, 0.35), 0 18px 48px -12px rgba(0, 0, 0, 0.7);
  --bc-ring: 0 0 0 4px rgba(157, 144, 255, 0.28);
  --bc-on-ink: #0d0d12;
  --bc-glass: rgba(20, 20, 28, 0.78);
  --bc-glass-strong: rgba(23, 23, 31, 0.94);
  --bc-glass-edge: rgba(255, 255, 255, 0.06);
  color-scheme: dark;
}

/* Windows draws country flag emoji as two letters ("FI"): there (html.bc-noflags, set in header.php) the
   flags come from Twemoji's flag font. unicode-range keeps it to flags, and it only downloads where one shows. */
@font-face {
  font-family: "Twemoji Country Flags";
  unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067, U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;
  src: url("../fonts/TwemojiCountryFlags.woff2") format("woff2");
  font-display: swap;
}
html.bc-noflags {
  --bc-font: "Twemoji Country Flags", "Geist", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- Base & typography ---------- */

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body.theme-light {
  font-family: var(--bc-font) !important;
  color: var(--bc-ink-2) !important;
  background-color: var(--bc-bg) !important;
  background-image:
    radial-gradient(1200px 600px at 10% -10%, rgba(3, 195, 227, 0.07), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(122, 58, 168, 0.06), transparent 60%);
  background-attachment: fixed;
  letter-spacing: -0.006em;
  font-feature-settings: "ss01", "cv11";
}

h1, h2, h3, h4, h5, h6,
.header .header-title,
#footer-bar a span {
  font-family: var(--bc-font) !important;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--bc-ink);
  letter-spacing: -0.025em;
  font-weight: 650;
}
h1 { font-size: 22px; line-height: 1.25; }
.card h1 { font-size: 21px; }

p { color: var(--bc-muted); }

a { transition: color 0.2s var(--bc-ease), opacity 0.2s var(--bc-ease); }

::selection { background: rgba(91, 75, 209, 0.18); color: var(--bc-ink); }

/* Uppercase micro labels feel dated in all-caps + heavy weight; soften them */
.text-uppercase { letter-spacing: 0.04em; }

/* ---------- Top bar: translucent glass ---------- */

.header,
#app-topbar {
  background-color: var(--bc-glass) !important;
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--bc-line) !important;
  box-shadow: 0 1px 0 var(--bc-glass-edge) inset, 0 6px 24px -12px rgba(16, 16, 30, 0.12) !important;
}

.header .header-icon {
  color: var(--bc-ink);
  border-radius: 12px;
  transition: background-color 0.2s var(--bc-ease), transform 0.2s var(--bc-ease);
}
.header .header-icon:hover { background-color: rgba(15, 15, 25, 0.05); }
.header .header-icon:active { transform: scale(0.92); }
.header .header-icon .badge {
  box-shadow: 0 0 0 2px var(--bc-surface);
  animation: bc-pop 0.5s var(--bc-ease-spring) both;
}

.header .header-title img.rounded {
  border-radius: 10px !important;
  box-shadow: var(--bc-shadow-1);
  transition: transform 0.35s var(--bc-ease-spring);
}
.header .header-title img.rounded:hover { transform: rotate(-6deg) scale(1.06); }

/* Desktop search in the top bar */
.topbar-desktop-search input {
  height: 38px !important;
  border-radius: 999px !important;
  background: rgba(15, 15, 25, 0.04) !important;
  border: 1px solid transparent !important;
  box-shadow: none !important;
  transition: background-color 0.25s var(--bc-ease), box-shadow 0.25s var(--bc-ease), border-color 0.25s var(--bc-ease);
}
.topbar-desktop-search input:hover { background: rgba(15, 15, 25, 0.06) !important; }
.topbar-desktop-search input:focus {
  background: var(--bc-surface) !important;
  border-color: rgba(91, 75, 209, 0.35) !important;
  box-shadow: var(--bc-ring), var(--bc-shadow-2) !important;
}
.topbar-search-results {
  border-radius: var(--bc-r) !important;
  border: 1px solid var(--bc-line) !important;
  box-shadow: var(--bc-shadow-3) !important;
  background: var(--bc-glass-strong) !important;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  animation: bc-drop 0.28s var(--bc-ease) both;
}
.topbar-search-results a { transition: background-color 0.15s ease; }

/* ---------- Bottom navigation: floating glass dock ---------- */

#footer-bar {
  left: 0 !important;
  right: 0 !important;
  margin: 0 auto;
  bottom: calc(10px + env(safe-area-inset-bottom) * 0.6) !important;
  width: min(560px, calc(100% - 20px));
  height: 64px !important;
  min-height: 64px;
  padding: 6px !important;
  gap: 4px;
  border-radius: 22px;
  background-color: var(--bc-glass) !important;
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  backdrop-filter: saturate(180%) blur(22px);
  border: 1px solid var(--bc-glass-edge);
  box-shadow: 0 0 0 1px var(--bc-line), 0 20px 40px -16px rgba(16, 16, 30, 0.28), 0 4px 12px -4px rgba(16, 16, 30, 0.08) !important;
}
#footer-bar a {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 !important;
  height: 100%;
  line-height: 1 !important;
  border-radius: 16px;
  overflow: hidden;
  color: var(--bc-muted) !important;
  transition: background-color 0.25s var(--bc-ease), color 0.25s var(--bc-ease), transform 0.25s var(--bc-ease);
}
#footer-bar a i,
#footer-bar a svg {
  display: block;
  font-size: 17px;
  height: 18px;
  line-height: 18px !important;
  margin: 0 !important;
  transition: transform 0.2s var(--bc-ease);
}
#footer-bar a span {
  margin: 0 !important;
  line-height: 1 !important;
  height: auto;
  font-size: 10.5px;
  font-weight: 550;
  opacity: 1 !important;
  letter-spacing: 0;
}
#footer-bar a:hover { color: var(--bc-ink) !important; background-color: rgba(15, 15, 25, 0.04); }
#footer-bar a:active i { transform: scale(0.88); }
#footer-bar a.active-nav,
#footer-bar a.active-nav i,
#footer-bar a.active-nav span {
  color: var(--bc-ink) !important;
}
#footer-bar a.active-nav {
  background: var(--bc-surface);
  box-shadow: var(--bc-shadow-2), 0 0 0 1px var(--bc-line);
}
#footer-bar a.active-nav i {
  background: var(--bc-brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
/* Never scroll sideways: items share the width and squeeze their labels instead
   (long translations like "Rediger profil" otherwise pushed the dock into a scrollbar) */
#footer-bar {
  display: flex !important;
  overflow: hidden !important;
  scrollbar-width: none;
}
#footer-bar::-webkit-scrollbar { display: none; }
#footer-bar a { min-width: 0 !important; width: auto !important; }
#footer-bar a span {
  max-width: 100%;
  padding: 0 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 420px) {
  #footer-bar { gap: 2px; padding: 5px !important; }
  #footer-bar a span { font-size: 10px; letter-spacing: -0.01em; }
}
#footer-bar .badge {
  top: 4px !important;
  margin-top: 0 !important;
  box-shadow: 0 0 0 2px #fff;
}

/* Leave room for the floating dock */
.page-content {
  padding-bottom: calc(110px + env(safe-area-inset-bottom)) !important;
}

/* ---------- Surfaces / cards ---------- */

.card-style {
  border-radius: var(--bc-r-lg) !important;
  background-color: var(--bc-surface);
  box-shadow: var(--bc-shadow-2), 0 0 0 1px var(--bc-line) !important;
  transition: box-shadow 0.4s var(--bc-ease), transform 0.4s var(--bc-ease);
}
.card-style .content { margin-left: 20px; margin-right: 20px; }
/* A card outside startColumns() lines up with the ones inside: the row's -12px gutter takes 16px down to 4px */
.page-content .card-style:not(.row .card-style) { margin-left: 4px; margin-right: 4px; }
.card-style .card-overlay { border-radius: var(--bc-r-lg) !important; }

.content-box {
  border-radius: var(--bc-r-lg);
  box-shadow: var(--bc-shadow-2), 0 0 0 1px var(--bc-line);
}

/* Inner grey list rows used across stats/leaderboards */
.card-style .bg-light,
.card-style .w3-light-grey,
.card-style .bg-theme-light {
  background-color: var(--bc-surface-2) !important;
}

.rounded-sm { border-radius: var(--bc-r-sm) !important; }
.rounded-m, .rounded-2 { border-radius: var(--bc-r) !important; }

/* Entrance: cards rise in from the very first paint. Pure CSS on purpose —
   a script that hides cards after they have painted makes the page blink.
   "backwards" fill means a card is never left hidden if the animation stops. */
.page-content .card-style { animation: bc-rise 0.5s var(--bc-ease) backwards; }
.page-content [class*="col"] > .card-style:nth-of-type(2) { animation-delay: 50ms; }
.page-content [class*="col"] > .card-style:nth-of-type(3) { animation-delay: 100ms; }
.page-content [class*="col"] > .card-style:nth-of-type(n+4) { animation-delay: 150ms; }
.page-content .col-md-9 > .card-style:first-of-type,
.page-content .col-lg-9 > .card-style:first-of-type,
.page-content .col-md-6 > .card-style:first-of-type { animation-delay: 40ms; }
@keyframes bc-rise { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Buttons ---------- */

.btn {
  font-family: var(--bc-font) !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em;
  border-radius: 12px !important;
  transition:
    transform 0.18s var(--bc-ease),
    box-shadow 0.3s var(--bc-ease),
    background-color 0.3s var(--bc-ease),
    color 0.3s var(--bc-ease),
    border-color 0.3s var(--bc-ease),
    filter 0.3s var(--bc-ease) !important;
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { opacity: 1 !important; }
.btn:active { transform: scale(0.97); }
.btn:focus-visible { box-shadow: var(--bc-ring) !important; outline: none; }
.btn.text-uppercase { letter-spacing: 0.06em; font-size: 12.5px !important; }

/* Primary colours, refined */
.btn.bg-green-dark {
  background: linear-gradient(180deg, #22c55e, #16a34a) !important;
  border-color: #16a34a !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 6px 16px -6px rgba(22, 163, 74, 0.55);
}
.btn.bg-green-dark:hover { filter: brightness(1.05); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 10px 22px -8px rgba(22, 163, 74, 0.6); }

.btn.bg-blue-dark {
  background: linear-gradient(180deg, #3b82f6, #2563eb) !important;
  border-color: #2563eb !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 6px 16px -6px rgba(37, 99, 235, 0.55);
}
.btn.bg-yellow-dark {
  background: linear-gradient(180deg, #fbbf24, #f59e0b) !important;
  border-color: #f59e0b !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 6px 16px -6px rgba(245, 158, 11, 0.55);
}
.btn.bg-red-dark {
  background: linear-gradient(180deg, #f43f5e, #e11d48) !important;
  border-color: #e11d48 !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 6px 16px -6px rgba(225, 29, 72, 0.5);
}
.btn.bg-dark, .btn.bg-black {
  background: linear-gradient(180deg, #25252d, #0b0b10) !important;
  border-color: #0b0b10 !important;
  color: #fff !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 8px 20px -8px rgba(11, 11, 16, 0.6) !important;
}

/* Outline buttons (cssButton): quiet, crisp */
.btn.border-secondary {
  border-color: var(--bc-line-strong) !important;
  color: var(--bc-ink-2) !important;
  background-color: var(--bc-surface);
  box-shadow: var(--bc-shadow-1);
}
.btn.border-secondary:hover {
  border-color: rgba(15, 15, 25, 0.22) !important;
  color: var(--bc-ink) !important;
  box-shadow: var(--bc-shadow-2);
  transform: translateY(-1px);
}
.btn.border-secondary.bg-dark { color: #fff !important; }

/* Side navigation buttons (cssButtonMenu) → list rows with a sliding chevron */
.btn.text-start.hover-shadow {
  background-color: transparent !important;
  color: var(--bc-ink-2) !important;
  font-weight: 500 !important;
  padding: 11px 36px 11px 14px !important;
  margin-bottom: 4px !important;
  box-shadow: none !important;
}
.btn.text-start.hover-shadow::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.75px solid currentColor;
  border-top: 1.75px solid currentColor;
  transform: translate(-4px, -50%) rotate(45deg);
  opacity: 0;
  transition: opacity 0.25s var(--bc-ease), transform 0.3s var(--bc-ease);
}
.btn.text-start.hover-shadow:hover {
  background-color: var(--bc-surface-2) !important;
  color: var(--bc-ink) !important;
  transform: none;
}
.btn.text-start.hover-shadow:hover::after { opacity: 0.45; transform: translate(0, -50%) rotate(45deg); }
.btn.text-start.hover-shadow.bg-dark {
  background: var(--bc-ink) !important;
  color: var(--bc-on-ink) !important;
  box-shadow: 0 8px 20px -10px rgba(11, 11, 16, 0.7) !important;
}
.btn.text-start.hover-shadow.bg-dark::after { opacity: 0.7; transform: translate(0, -50%) rotate(45deg); }

/* Ripple (element injected by modern-motion.js) */
.bc-ripple {
  position: absolute !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 50%;
  pointer-events: none;
  background: currentColor;
  opacity: 0.18 !important;
  transform: scale(0);
  animation: bc-ripple 0.6s var(--bc-ease) forwards;
}

/* ---------- Form controls ---------- */

.form-control,
.form-select,
.input-style input,
.input-style select,
.input-style textarea,
input[type="text"].form-control,
select.form-control,
textarea.form-control {
  font-family: var(--bc-font) !important;
  border-radius: 12px !important;
  border: 1px solid var(--bc-line-strong) !important;
  background-color: var(--bc-surface) !important;
  color: var(--bc-ink) !important;
  box-shadow: 0 1px 2px rgba(16, 16, 30, 0.04) inset;
  transition: border-color 0.2s var(--bc-ease), box-shadow 0.25s var(--bc-ease), background-color 0.2s var(--bc-ease) !important;
}
.form-control:hover,
.form-select:hover { border-color: rgba(15, 15, 25, 0.2) !important; }
.form-control:focus,
.form-select:focus,
.input-style input:focus,
.input-style select:focus,
.input-style textarea:focus {
  border-color: rgba(91, 75, 209, 0.55) !important;
  box-shadow: var(--bc-ring) !important;
  outline: none !important;
}
.form-control::placeholder { color: var(--bc-faint); }
.form-floating > label { color: var(--bc-muted); }
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select ~ label { color: var(--bc-accent); }

.form-check-input {
  border-radius: 6px;
  transition: background-color 0.2s var(--bc-ease), box-shadow 0.2s var(--bc-ease);
}
.form-check-input:checked { background-color: var(--bc-ink); border-color: var(--bc-ink); }
.form-check-input:focus { box-shadow: var(--bc-ring); border-color: rgba(91, 75, 209, 0.55); }
.form-switch .form-check-input { border-radius: 2em; }

/* ---------- Tables ---------- */

.card-style table.table-borderless { border-collapse: separate; border-spacing: 0; }
.card-style table thead th {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bc-muted) !important;
  background: transparent !important;
  border-bottom: 1px solid var(--bc-line) !important;
}
.card-style .w3-table-all tr,
.card-style .w3-striped tbody tr,
.card-style .table > :not(caption) > * > * { border-color: var(--bc-line) !important; }
.card-style tbody tr { transition: background-color 0.2s var(--bc-ease); }
.card-style tbody tr:hover { background-color: rgba(91, 75, 209, 0.04) !important; }
.w3-table-all, .w3-table-all tr { border-color: var(--bc-line) !important; }
.w3-table-all tr:nth-child(odd) { background-color: var(--bc-surface) !important; }
.w3-table-all tr:nth-child(even) { background-color: var(--bc-surface-2) !important; }

/* ---------- Alerts / notices ---------- */

.alert, [class*="notification-"] {
  border-radius: var(--bc-r) !important;
}

/* alert() boxes: soft tinted surface, icon badge, sentence-case title */
.alert[role="alert"] {
  --al-bg: #f4f4f6; --al-ring: rgba(15, 15, 25, 0.08); --al-ink: #2a2a33; --al-icon: #6b6b76;
  position: relative;
  min-height: 58px;
  padding: 14px 18px 14px 0 !important;
  background: var(--al-bg) !important;
  color: var(--al-ink) !important;
  border: none !important;
  box-shadow: 0 0 0 1px var(--al-ring) inset, 0 6px 18px -12px rgba(16, 16, 30, 0.25);
  animation: bc-alert-in 0.5s var(--bc-ease) both;
}
.alert[role="alert"].bg-yellow-dark { --al-bg: #fffaeb; --al-ring: rgba(245, 158, 11, 0.28); --al-ink: #713f12; --al-icon: #f59e0b; }
.alert[role="alert"].bg-green-dark  { --al-bg: #f0fdf4; --al-ring: rgba(22, 163, 74, 0.25); --al-ink: #14532d; --al-icon: #16a34a; }
.alert[role="alert"].bg-blue-dark   { --al-bg: #eff6ff; --al-ring: rgba(37, 99, 235, 0.22); --al-ink: #1e3a8a; --al-icon: #2563eb; }
.alert[role="alert"].bg-red-dark    { --al-bg: #fff1f2; --al-ring: rgba(225, 29, 72, 0.22); --al-ink: #881337; --al-icon: #e11d48; }
.alert[role="alert"] > .alert-icon {
  left: 14px !important;
  top: 50% !important;
  bottom: auto !important;
  width: 32px !important;
  height: 32px;
  border-radius: 10px;
  transform: translateY(-50%);
  background: var(--al-icon) !important;
  color: #fff;
  box-shadow: 0 6px 14px -6px var(--al-icon);
}
.alert[role="alert"] > .alert-icon i { font-size: 14px !important; color: #fff !important; }
.alert[role="alert"] h4 {
  padding-left: 60px !important;
  margin-bottom: 2px !important;
  text-transform: none !important;
  letter-spacing: -0.01em !important;
  font-size: 15px !important;
  line-height: 1.3 !important;
  font-weight: 650 !important;
  color: var(--al-ink) !important;
}
.alert[role="alert"] .alert-message {
  margin-left: 60px !important;
  font-size: 14px;
  line-height: 1.45;
  color: var(--al-ink);
  opacity: 0.85;
}
.alert[role="alert"] .text-white,
.alert[role="alert"] .color-white { color: inherit !important; }
.alert[role="alert"] a { text-decoration: none !important; color: inherit !important; }
/* Linked alerts: the whole box reads as a button — lift on hover and a chevron, no underlines */
.alert[role="alert"]:has(a) { cursor: pointer; padding-right: 44px !important; transition: transform 0.25s var(--bc-ease), box-shadow 0.25s var(--bc-ease); }
.alert[role="alert"]:has(a)::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--al-icon);
  border-top: 2px solid var(--al-icon);
  transform: translate(-3px, -50%) rotate(45deg);
  transition: transform 0.3s var(--bc-ease);
}
.alert[role="alert"]:has(a):hover { transform: translateY(-1px); box-shadow: 0 0 0 1px var(--al-ring) inset, 0 12px 24px -12px rgba(16, 16, 30, 0.3); }
.alert[role="alert"]:has(a):hover::after { transform: translate(0, -50%) rotate(45deg); }
@keyframes bc-alert-in { from { opacity: 0; transform: translateY(6px); } }

/* ---------- Side menu (hamburger) ---------- */

.menu {
  transition: transform 0.5s var(--bc-ease), opacity 0.4s var(--bc-ease) !important;
}
.menu-box-left {
  border-radius: 0 26px 26px 0;
  background-color: rgba(250, 250, 252, 0.92) !important;
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  box-shadow: none !important;
  border-right: 1px solid var(--bc-line);
}
.menu-box-left.menu-active { box-shadow: 30px 0 60px -30px rgba(16, 16, 30, 0.35) !important; }
.menu-hider {
  background-color: rgba(10, 10, 20, 0.28) !important;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: opacity 0.4s var(--bc-ease) !important;
}
/* The template also blurs page content heavily; the hider does it more subtly now */
.menu-active ~ .page-content, .menu-hider.menu-active ~ .page-content { filter: none; }

.menu .list-custom-small a {
  border-radius: 12px;
  border-bottom: none !important;
  padding-left: 6px !important;
  padding-right: 6px !important;
  transition: background-color 0.2s var(--bc-ease), transform 0.25s var(--bc-ease);
}
.menu .list-custom-small a:hover { background-color: var(--bc-surface-2); }
.menu .list-custom-small a:hover .fa-angle-right { transform: translateX(3px); }
.menu .list-custom-small a .fa-angle-right { transition: transform 0.25s var(--bc-ease); }
.menu .list-custom-small a i:first-child {
  border-radius: 9px !important;
  box-shadow: 0 4px 10px -4px rgba(16, 16, 30, 0.35);
}
.menu .card-style { box-shadow: 0 0 0 1px var(--bc-line), var(--bc-shadow-1) !important; }

/* Staggered items when the menu opens */
.menu.menu-active .list-custom-small a {
  animation: bc-slide-in 0.5s var(--bc-ease) both;
}
.menu.menu-active .list-custom-small a:nth-child(1) { animation-delay: 0.04s; }
.menu.menu-active .list-custom-small a:nth-child(2) { animation-delay: 0.07s; }
.menu.menu-active .list-custom-small a:nth-child(3) { animation-delay: 0.10s; }
.menu.menu-active .list-custom-small a:nth-child(4) { animation-delay: 0.13s; }
.menu.menu-active .list-custom-small a:nth-child(5) { animation-delay: 0.16s; }
.menu.menu-active .list-custom-small a:nth-child(6) { animation-delay: 0.19s; }
.menu.menu-active .list-custom-small a:nth-child(7) { animation-delay: 0.22s; }
.menu.menu-active .list-custom-small a:nth-child(8) { animation-delay: 0.25s; }
.menu.menu-active .list-custom-small a:nth-child(n+9) { animation-delay: 0.28s; }

/* Modals */
.menu-box-modal, .modal-content {
  border-radius: var(--bc-r-lg) !important;
  box-shadow: var(--bc-shadow-3) !important;
}
.menu-box-bottom { border-radius: 26px 26px 0 0 !important; }
.modal.fade .modal-dialog {
  transform: translateY(16px) scale(0.98);
  transition: transform 0.4s var(--bc-ease), opacity 0.3s var(--bc-ease);
}
.modal.show .modal-dialog { transform: none; }
.modal-backdrop.show { opacity: 0.3; }
.modal-backdrop { -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }

/* ---------- Avatars & images ---------- */

/* Round photos are never stretched: old uploads aren't square, so fill the circle and keep the top (faces) */
img.rounded-circle, img.w3-circle, img[class*="rounded-circle"] { object-fit: cover; object-position: 50% 30%; }

.card-style img.rounded-circle,
.card-style img[style*="border-radius: 50%"],
.card-style img[class*="rounded-circle"] {
  transition: transform 0.35s var(--bc-ease-spring), box-shadow 0.3s var(--bc-ease);
}
.card-style a:hover img.rounded-circle { transform: scale(1.05); }

img.img-fade-in { transition: opacity 0.5s var(--bc-ease); }

/* ---------- Badges / pills ---------- */

.badge { font-weight: 600; letter-spacing: 0.01em; border-radius: 999px; }

/* ---------- Pagination ---------- */

.pagination .page-link {
  border-radius: 10px !important;
  margin: 0 3px;
  border: 1px solid var(--bc-line-strong);
  color: var(--bc-ink-2);
  transition: all 0.2s var(--bc-ease);
}
.pagination .page-link:hover { transform: translateY(-1px); box-shadow: var(--bc-shadow-2); }
.pagination .active > .page-link, .pagination .page-item.active .page-link {
  background: var(--bc-ink);
  border-color: var(--bc-ink);
  color: var(--bc-on-ink);
}
/* generatePagination() (functions.php) marks the current page with .bg-highlight (red, !important) and the
   others with .bg-theme/.shadow-*: keep it neutral site-wide — ink for the current page, surface for the rest */
.pagination .page-item .page-link.bg-theme,
.pagination .page-item .page-link.bg-transparent {
  background: var(--bc-surface) !important;
  color: var(--bc-ink-2) !important;
  border: 1px solid var(--bc-line-strong) !important;
  box-shadow: none !important;
}
.pagination .page-item .page-link.bg-theme:hover { background: var(--bc-surface-3) !important; color: var(--bc-ink) !important; }
.pagination .page-item.active .page-link,
.pagination .page-item.active .page-link.bg-highlight {
  background: var(--bc-ink) !important;
  border: 1px solid var(--bc-ink) !important;
  color: var(--bc-on-ink) !important;
  box-shadow: none !important;
  pointer-events: none;
}
.pagination .page-item.disabled .page-link { background: transparent !important; border-color: transparent !important; color: var(--bc-faint) !important; }
.pagination .page-link { min-width: 38px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Scrollbar ---------- */

@media (hover: hover) {
  * { scrollbar-width: thin; scrollbar-color: rgba(15, 15, 25, 0.18) transparent; }
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-thumb {
    background-color: rgba(15, 15, 25, 0.16);
    border-radius: 10px;
    border: 3px solid transparent;
    background-clip: content-box;
  }
  ::-webkit-scrollbar-thumb:hover { background-color: rgba(15, 15, 25, 0.3); }
  ::-webkit-scrollbar-track { background: transparent; }
}

/* ---------- Preloader: soft fade instead of a white flash ---------- */

.theme-light #preloader {
  background-color: rgba(244, 244, 246, 0.6) !important;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
#preloader .spinner-border {
  border-width: 2.5px;
  color: var(--bc-accent) !important;
}

/* Turbo progress bar in brand colours */
.turbo-progress-bar {
  height: 3px !important;
  background: var(--bc-brand-grad) !important;
  box-shadow: 0 0 12px rgba(91, 75, 209, 0.45);
}

/* ---------- Page transitions (View Transitions API, via Turbo) ---------- */

@supports (view-transition-name: none) {
  #app-topbar { view-transition-name: bc-topbar; }
  #footer-bar { view-transition-name: bc-dock; }

  ::view-transition-old(root) {
    animation: bc-vt-out 0.22s var(--bc-ease) both;
  }
  ::view-transition-new(root) {
    animation: bc-vt-in 0.42s var(--bc-ease) both;
  }
  ::view-transition-group(bc-topbar),
  ::view-transition-group(bc-dock) { animation-duration: 0.3s; }
}

/* ---------- Keyframes ---------- */

@keyframes bc-vt-out { to { opacity: 0; transform: translateY(-6px) scale(0.995); filter: blur(2px); } }
@keyframes bc-vt-in { from { opacity: 0; transform: translateY(10px) scale(0.995); filter: blur(2px); } }
@keyframes bc-ripple { to { transform: scale(2.6); opacity: 0; } }
@keyframes bc-pop { 0% { transform: scale(0); } 100% { transform: scale(1); } }
@keyframes bc-drop { from { opacity: 0; transform: translateY(-6px) scale(0.98); } }
@keyframes bc-slide-in { from { opacity: 0; transform: translateX(-12px); } }

/* ---------- Respect reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Legacy compatibility — w3.css (styles.css) + Bootstrap leftovers
   Brings the ~1,500 w3-* usages in line with the modern layer.
   ========================================================================== */

/* w3 buttons */
.w3-button, .w3-btn {
  font-family: var(--bc-font);
  font-weight: 550;
  border-radius: 12px;
  transition: transform 0.18s var(--bc-ease), background-color 0.25s var(--bc-ease), box-shadow 0.25s var(--bc-ease), color 0.25s var(--bc-ease), filter 0.25s var(--bc-ease);
  position: relative;
  overflow: hidden;
}
.w3-button:active, .w3-btn:active { transform: scale(0.97); }
/* w3's grey hover (#ccc !important) flattens every coloured button — replace it */
.w3-button:hover {
  background-color: rgba(15, 15, 25, 0.06) !important;
  color: var(--bc-ink) !important;
}
.w3-button.w3-theme-l4 {
  background-color: var(--bc-surface-2);
  color: var(--bc-ink-2);
  box-shadow: 0 0 0 1px var(--bc-line) inset;
}
.w3-button.w3-theme-l4:hover { background-color: var(--bc-surface-3) !important; }
.w3-button.w3-green, .w3-button.w3-green.w3-theme-l4 {
  background: linear-gradient(180deg, #22c55e, #16a34a) !important;
  color: #fff !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 6px 16px -6px rgba(22, 163, 74, 0.55);
}
.w3-button.w3-red {
  background: linear-gradient(180deg, #f43f5e, #e11d48) !important;
  color: #fff !important;
  box-shadow: 0 6px 16px -6px rgba(225, 29, 72, 0.5);
}
.w3-button.w3-orange {
  background: linear-gradient(180deg, #fb923c, #f97316) !important;
  color: #fff !important;
  box-shadow: 0 6px 16px -6px rgba(249, 115, 22, 0.5);
}
.w3-button.w3-green:hover, .w3-button.w3-red:hover, .w3-button.w3-orange:hover {
  color: #fff !important;
  filter: brightness(1.06);
}
.w3-button.w3-display-topright {
  position: absolute !important;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 36px;
  height: 36px;
  padding: 0 !important;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 22px !important;
  line-height: 1;
  color: var(--bc-muted);
  background: var(--bc-surface-2);
}
.w3-button.w3-display-topright:hover { background: var(--bc-surface-3) !important; color: var(--bc-ink) !important; }
.w3-button.w3-hover-red:hover { background-color: rgba(225, 29, 72, 0.1) !important; color: var(--bc-red) !important; }
.w3-modal-content { position: relative; }
.w3-button.w3-hover-white:hover { background-color: rgba(255, 255, 255, 0.9) !important; }
.w3-bar .w3-bar-item.w3-button { border-radius: 10px; }

/* w3 inputs & selects */
.w3-input, .w3-select {
  font-family: var(--bc-font);
  border-radius: 12px;
  border: 1px solid var(--bc-line-strong) !important;
  background-color: var(--bc-surface);
  color: var(--bc-ink);
  padding: 10px 12px;
  box-shadow: 0 1px 2px rgba(16, 16, 30, 0.04) inset;
  transition: border-color 0.2s var(--bc-ease), box-shadow 0.25s var(--bc-ease);
}
.w3-input:hover, .w3-select:hover { border-color: rgba(15, 15, 25, 0.2) !important; }
.w3-input:focus, .w3-select:focus {
  outline: none;
  border-color: rgba(91, 75, 209, 0.55) !important;
  box-shadow: var(--bc-ring);
}

/* w3 cards */
.w3-card, .w3-card-2, .w3-card-4 {
  box-shadow: var(--bc-shadow-2), 0 0 0 1px var(--bc-line) !important;
}
.w3-card.w3-round, .w3-card.w3-round-large { border-radius: var(--bc-r-lg) !important; }
.w3-hover-shadow { transition: box-shadow 0.3s var(--bc-ease), transform 0.3s var(--bc-ease); }
.w3-hover-shadow:hover { box-shadow: var(--bc-shadow-3) !important; transform: translateY(-2px); }

/* w3 rounding scale nudged up */
.w3-round, .w3-round-medium { border-radius: 8px; }
.w3-round-large { border-radius: 14px; }
.w3-border { border-color: var(--bc-line-strong) !important; }

/* w3 tags / badges → pills */
.w3-tag {
  border-radius: 999px;
  padding: 1px 9px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* w3 modals */
.w3-modal {
  background-color: rgba(10, 10, 20, 0.32) !important;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.w3-modal-content {
  border-radius: var(--bc-r-lg);
  overflow: hidden;
  box-shadow: var(--bc-shadow-3), 0 0 0 1px var(--bc-line) !important;
}
.w3-modal-content.w3-animate-top { animation: bc-modal-in 0.45s var(--bc-ease) both !important; }
@keyframes bc-modal-in { from { opacity: 0; transform: translateY(18px) scale(0.98); } }

/* w3 + Bootstrap tables */
.w3-table td, .w3-table th, .w3-table-all td, .w3-table-all th { vertical-align: middle; }
.w3-table-all { border: 1px solid var(--bc-line) !important; border-radius: var(--bc-r); overflow: hidden; }
.w3-bordered tr, .w3-table-all tr { border-bottom-color: var(--bc-line) !important; }
.w3-striped tbody tr:nth-child(even) { background-color: var(--bc-surface-2); }

.table { --bs-table-striped-bg: var(--bc-surface-2); --bs-table-hover-bg: rgba(91, 75, 209, 0.04); color: var(--bc-ink-2); }
.table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-accent-bg: var(--bc-surface-2); }
.table > :not(caption) > * > * { padding: 0.7rem 0.6rem; vertical-align: middle; }
.table th {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bc-muted) !important;
  white-space: nowrap;
}
.table tr:first-child > th { background: transparent !important; box-shadow: none !important; border-bottom: 1px solid var(--bc-line); }
.table tr > *:first-child { border-top-left-radius: 10px; border-bottom-left-radius: 10px; }
.table tr > *:last-child { border-top-right-radius: 10px; border-bottom-right-radius: 10px; }
.table tbody tr { transition: background-color 0.2s var(--bc-ease); }
.table th[onclick] { cursor: pointer; transition: color 0.2s var(--bc-ease); }
.table th[onclick]:hover { color: var(--bc-ink) !important; }

/* Bootstrap list-groups & nav tabs */
.list-group-item { border-color: var(--bc-line); transition: background-color 0.2s var(--bc-ease); }
.list-group { border-radius: var(--bc-r); }
.nav-tabs, .nav-pills { gap: 4px; border-bottom: none; }
.nav-tabs .nav-link, .nav-pills .nav-link {
  border: none !important;
  border-radius: 10px !important;
  color: var(--bc-muted);
  font-weight: 550;
  transition: background-color 0.2s var(--bc-ease), color 0.2s var(--bc-ease);
}
.nav-tabs .nav-link:hover, .nav-pills .nav-link:hover { background-color: var(--bc-surface-2); color: var(--bc-ink); }
.nav-tabs .nav-link.active, .nav-pills .nav-link.active { background-color: var(--bc-ink) !important; color: var(--bc-on-ink) !important; }

/* Dropdowns & jQuery UI autocomplete */
.dropdown-menu, .ui-autocomplete, .ui-menu {
  border: 1px solid var(--bc-line) !important;
  border-radius: var(--bc-r) !important;
  box-shadow: var(--bc-shadow-3) !important;
  padding: 6px !important;
  font-family: var(--bc-font) !important;
  animation: bc-drop 0.22s var(--bc-ease) both;
}
.dropdown-item, .ui-menu .ui-menu-item-wrapper { border-radius: 8px; transition: background-color 0.15s ease; }
.ui-menu .ui-menu-item-wrapper.ui-state-active {
  background: var(--bc-surface-2) !important;
  border-color: transparent !important;
  color: var(--bc-ink) !important;
  margin: 0 !important;
}
.ui-widget { font-family: var(--bc-font) !important; }

/* Progress bars */
.progress { border-radius: 999px; background-color: var(--bc-surface-3); overflow: hidden; }
.progress-bar { transition: width 0.8s var(--bc-ease); }

/* Accordion / collapse */
.accordion-item { border-color: var(--bc-line); }
.accordion-item:first-of-type, .accordion-item:last-of-type { border-radius: var(--bc-r); }
.accordion-button:focus { box-shadow: var(--bc-ring); }
.accordion-button:not(.collapsed) { background-color: var(--bc-surface-2); color: var(--bc-ink); box-shadow: none; }

/* ==========================================================================
   Belts (fnDrawBelt)
   ========================================================================== */

/* Coral patterns are 20px GIF tiles; scale them to the belt's full inner
   height so no light band shows along the bottom, keeping hard pixel edges. */
.redblackbelt, .redwhitebelt {
  background-size: auto 100% !important;
  background-repeat: repeat-x !important;
  image-rendering: pixelated;
}
/* Stripes are centred by flex in fnDrawBelt; the old 1px nudge now pushes
   them off-centre (1px clipped at the top, 1px gap at the bottom). */
.belt-stripes-7plus img[src*="stripe"] { transform: none; }

/* Top bar: put buttons, language globe, avatars and logo on one centre line */
.header a.header-title,
.header div.header-title {
  display: flex !important;
  align-items: center;
  height: 50px;
  line-height: normal !important;
}
.header a.header-title img { display: block; top: 0 !important; }
.header div.header-title .btn {
  top: 0 !important;
  height: 34px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 0 12px !important;
  line-height: 1 !important;
  margin: 0 !important;
}
.header div.header-title > a,
.header div.header-title > div,
.header div.header-title > span { display: inline-flex; align-items: center; }
.header div.header-title img { display: block; }

/* ==========================================================================
   Charts (bcChart) and stat tiles (bcStatTiles)
   ========================================================================== */

.bc-chart { margin: 4px 0 8px; }
.bc-chart-canvas { position: relative; height: var(--bc-chart-h, 260px); }
.bc-chart-canvas canvas { opacity: 0; transition: opacity 0.4s var(--bc-ease); }
.bc-chart-ready .bc-chart-canvas canvas { opacity: 1; }
/* Soft placeholder while Chart.js loads */
.bc-chart:not(.bc-chart-ready) .bc-chart-canvas {
  border-radius: 14px;
  background: linear-gradient(90deg, var(--bc-surface-2), var(--bc-surface-3), var(--bc-surface-2));
  background-size: 200% 100%;
  animation: bc-shimmer 1.4s linear infinite;
}
@keyframes bc-shimmer { to { background-position: -200% 0; } }

.bc-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}
.bc-tile {
  position: relative;
  padding: 16px 16px 14px;
  border-radius: 16px;
  background: var(--bc-surface-2);
  box-shadow: 0 0 0 1px var(--bc-line) inset;
  overflow: hidden;
  transition: transform 0.3s var(--bc-ease), box-shadow 0.3s var(--bc-ease);
}
.bc-tile::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: var(--bc-brand-grad);
  opacity: 0.8;
}
.bc-tile:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--bc-line) inset, var(--bc-shadow-2); }
.bc-tile-value,
.largenumber:not([class*="gradient-"]):not([class*="bg-"]),
.prettylargenumber:not([class*="gradient-"]):not([class*="bg-"]) {
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  background: linear-gradient(120deg, #03c3e3 0%, #5b4bd1 50%, #d4744f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--bc-accent);
}
.bc-tile-value { font-size: clamp(1.35rem, 3.2vw, 2rem); white-space: nowrap; }
.bc-tile-label {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bc-muted);
  line-height: 1.3;
}
.bc-tile-hint { margin-top: 2px; font-size: 12px; color: var(--bc-faint); }

/* Legacy single-number cards: tighter, gradient figure, label-style heading */
.largenumber:not([class*="gradient-"]):not([class*="bg-"]) { font-size: clamp(2rem, 4vw, 2.75rem) !important; padding: 6px 0 4px; }
.prettylargenumber { font-size: clamp(1.5rem, 3vw, 2rem) !important; }
.card-style:has(.largenumber:not([class*="gradient-"]):not([class*="bg-"])) h1 {
  font-size: 12px !important;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bc-muted);
  text-align: center;
  margin-bottom: 4px !important;
}
.card-style:has(.largenumber:not([class*="gradient-"]):not([class*="bg-"])) .content { margin-top: 18px; margin-bottom: 14px; }

/* ---------- Profile summaries: medals, competition record, captions ---------- */

.bc-chart-caption {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bc-muted);
  margin: 0 0 6px 2px;
}

.bc-medals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.bc-medal {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--bc-surface-2);
  box-shadow: 0 0 0 1px var(--bc-line) inset;
}
.bc-medal img { width: 30px; height: 30px; object-fit: contain; flex: 0 0 30px; filter: drop-shadow(0 3px 6px rgba(16, 16, 30, 0.18)); }
.bc-medal-count { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: var(--bc-ink); }
.bc-medal .bc-tile-label { margin-top: 3px; }
@media (max-width: 420px) {
  .bc-medal { flex-direction: column; text-align: center; gap: 6px; padding: 12px 8px; }
}

.bc-record {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 10px;
}
.bc-record-stat {
  position: relative;
  padding: 12px 14px 12px 16px;
  border-radius: 16px;
  background: var(--bc-surface-2);
  box-shadow: 0 0 0 1px var(--bc-line) inset;
  overflow: hidden;
}
.bc-record-num { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: var(--bc-ink); }
.bc-record-stat:has(.bc-win)::before,
.bc-record-stat:has(.bc-loss)::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #0ca30c;
}
.bc-record-stat:has(.bc-loss)::before { background: #d03b3b; }
.bc-record-stat .bc-tile-label { margin-top: 4px; }
.bc-record-bar {
  margin-top: 8px;
  height: 6px;
  border-radius: 99px;
  background: rgba(208, 59, 59, 0.22);
  overflow: hidden;
}
.bc-record-bar span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: #0ca30c;
  transition: width 0.8s var(--bc-ease);
}

/* ---------- Stat spotlight (front page, one random stat per load) ---------- */

.bc-spotlight .content { margin-top: 18px; }
.bc-spotlight .bc-chart-caption i { color: var(--bc-amber); margin-right: 2px; }
.bc-spotlight-title { font-size: 18px; line-height: 1.25; margin: 2px 0 4px; }
.bc-spotlight-insight { font-size: 13.5px; line-height: 1.4; margin-bottom: 10px; color: var(--bc-ink-2); }

.bc-pulse-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--bc-accent) !important;
}
.bc-pulse-link i { font-size: 11px; transition: transform 0.25s var(--bc-ease); }
.bc-pulse-link:hover i { transform: translateX(3px); }

/* ---------- Profile overview (shareable) ---------- */

.bc-overview {
  position: relative;
  overflow: hidden;
  margin: 0 16px 30px 16px;
  padding: 22px 22px 18px;
  border-radius: 24px;
  color: var(--bc-ink);
  background:
    radial-gradient(90% 70% at 100% 0%, rgba(122, 58, 168, 0.09), transparent 60%),
    radial-gradient(80% 70% at 0% 100%, rgba(3, 195, 227, 0.09), transparent 60%),
    var(--bc-surface);
  box-shadow: var(--bc-shadow-2), 0 0 0 1px var(--bc-line);
  animation: bc-rise 0.6s var(--bc-ease) backwards;
}
.bc-overview::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  background: var(--bc-brand-grad);
}
.bc-overview-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.bc-overview-rank { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.bc-overview-rank-num {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(120deg, #03c3e3 0%, #5b4bd1 50%, #d4744f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.bc-overview-rank-label { font-size: 13px; color: var(--bc-muted); }
.bc-overview-title { font-size: 18px; font-weight: 650; color: var(--bc-ink); margin: 0; }

.bc-overview-rings {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 14px 10px;
}
.bc-ring {
  display: grid;
  grid-template-areas: "ring" "label" "sub";
  justify-items: center;
  text-align: center;
}
.bc-ring svg { grid-area: ring; width: 92px; height: 92px; transform: rotate(-90deg); }
/* Rings and the world rank open the stats they are ranked on (bcRingStatsUrl) */
a.bc-ring, a.bc-overview-rank { color: inherit !important; text-decoration: none !important; border-radius: 14px; transition: transform .15s ease; }
a.bc-ring:hover { transform: translateY(-2px); }
a.bc-ring:hover .bc-ring-label, a.bc-overview-rank:hover .bc-overview-rank-label { text-decoration: underline; text-underline-offset: 3px; }
.bc-ring-track { fill: none; stroke: var(--bc-surface-3); stroke-width: 7; }
.bc-ring-fill {
  fill: none;
  stroke: #5b4bd1;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 0 100;
  animation: bc-ring-in 1.2s var(--bc-ease) 0.2s forwards;
}
.bc-ring:nth-child(5n+1) .bc-ring-fill { stroke: #03b2d1; }
.bc-ring:nth-child(5n+2) .bc-ring-fill { stroke: #5b4bd1; }
.bc-ring:nth-child(5n+3) .bc-ring-fill { stroke: #d4744f; }
.bc-ring:nth-child(5n+4) .bc-ring-fill { stroke: #9a3ea8; }
.bc-ring:nth-child(5n+5) .bc-ring-fill { stroke: #1baf7a; }
@keyframes bc-ring-in { to { stroke-dasharray: var(--p) 100; } }
.bc-ring-big { grid-area: ring; align-self: center; font-size: 15px; font-weight: 700; letter-spacing: -0.02em; color: var(--bc-ink); }
.bc-ring-label { grid-area: label; margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--bc-ink); line-height: 1.3; }
.bc-ring-sub { grid-area: sub; margin-top: 2px; font-size: 11.5px; color: var(--bc-muted); line-height: 1.3; }
/* A podium place in a ring: trophy / silver / bronze medal over a small number, the ring in the metal's colour */
.bc-ring-medal { display: flex; flex-direction: column; align-items: center; gap: 2px; line-height: 1; }
.bc-ring-medal i { font-size: 22px; }
.bc-ring-medal span { font-size: 11px; font-weight: 700; color: var(--bc-muted); }
.bc-ring-medal--1 i { color: #e0a800; }
.bc-ring-medal--2 i { color: #8e98a8; }
.bc-ring-medal--3 i { color: #c0773f; }
.bc-ring:has(.bc-ring-medal--1) .bc-ring-fill { stroke: #e8b923 !important; }
.bc-ring:has(.bc-ring-medal--2) .bc-ring-fill { stroke: #a9b2c0 !important; }
.bc-ring:has(.bc-ring-medal--3) .bc-ring-fill { stroke: #cd8a55 !important; }

.bc-overview-share {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--bc-on-ink);
  background: var(--bc-ink);
  box-shadow: 0 8px 20px -10px rgba(11, 11, 16, 0.6);
  transition: transform 0.2s var(--bc-ease), box-shadow 0.2s var(--bc-ease);
}
.bc-overview-share:hover { transform: translateY(-1px); box-shadow: 0 12px 24px -10px rgba(11, 11, 16, 0.7); }
.bc-overview-share:active { transform: scale(0.96); }
.bc-overview-share[disabled] { opacity: 0.6; }
@media (prefers-reduced-motion: reduce) { .bc-ring-fill { animation: none; stroke-dasharray: var(--p) 100; } }

/* Share fallback: image preview sheet */
.bc-share-preview {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 10, 20, 0.45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: bc-drop 0.25s var(--bc-ease) both;
}
.bc-share-sheet {
  width: min(420px, 100%);
  max-height: 100%;
  overflow: auto;
  padding: 14px;
  border-radius: 22px;
  background: var(--bc-surface);
  box-shadow: var(--bc-shadow-3);
  text-align: center;
}
.bc-share-sheet img { display: block; width: 100%; height: auto; border-radius: 12px; box-shadow: 0 0 0 1px var(--bc-line); -webkit-touch-callout: default; }
.bc-share-sheet p { margin: 12px 0 10px; font-size: 13px; color: var(--bc-muted); }
.bc-share-actions { display: flex; gap: 8px; }
.bc-share-actions > * {
  flex: 1;
  padding: 10px 14px;
  border: 0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
.bc-share-dl { background: var(--bc-ink); color: var(--bc-on-ink) !important; }
.bc-share-close { background: var(--bc-surface-2); color: var(--bc-ink); }

/* Overview panels: distribution curve + belt journey */
.bc-overview-panels {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.bc-panel {
  position: relative;
  padding: 14px 16px 12px;
  border-radius: 16px;
  background: var(--bc-surface-2);
  box-shadow: 0 0 0 1px var(--bc-line) inset;
}
.bc-panel-title { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bc-muted); }
.bc-panel-insight { font-size: 14px; font-weight: 650; color: var(--bc-ink); margin: 2px 0 10px; }
.bc-dist-wrap { position: relative; height: 96px; margin-top: 30px; }
.bc-dist { display: block; width: 100%; height: 100%; }
.bc-dist-marker { position: absolute; top: -8px; bottom: 0; width: 2px; margin-left: -1px; background: #d4744f; border-radius: 2px; }
.bc-dist-dot { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #d4744f; box-shadow: 0 0 0 3px #fff, 0 2px 6px rgba(212, 116, 79, 0.5); }
.bc-dist-you {
  position: absolute;
  top: -30px;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  background: #d4744f;
  padding: 3px 9px;
  border-radius: 99px;
  box-shadow: 0 4px 10px -4px rgba(212, 116, 79, 0.7);
}
.bc-dist-beat {
  position: absolute;
  bottom: 8px;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 11.5px;
  font-weight: 700;
  color: #3f33a8;
  text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 6px #fff;
}
.bc-dist-axis { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: var(--bc-faint); }
.bc-journey-bar { display: flex; gap: 2px; height: 30px; border-radius: 8px; overflow: hidden; }
.bc-journey-seg { position: relative; display: flex; align-items: center; justify-content: center; min-width: 6px; color: #fff; font-size: 11px; font-weight: 700; }
.bc-journey-seg.is-light { color: var(--bc-ink); box-shadow: 0 0 0 1px var(--bc-line-strong) inset; }
.bc-journey-seg span { overflow: hidden; white-space: nowrap; padding: 0 2px; }
.bc-journey-list { display: grid; gap: 2px; margin-top: 12px; }
.bc-journey-row {
  display: grid;
  grid-template-columns: 10px 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 5px 2px;
  font-size: 12.5px;
  border-bottom: 1px solid var(--bc-line);
}
.bc-journey-row:last-child { border-bottom: 0; }
.bc-journey-row i { width: 10px; height: 10px; border-radius: 3px; box-shadow: 0 0 0 1px var(--bc-line-strong); }
.bc-jr-name { font-weight: 600; color: var(--bc-ink); }
.bc-jr-span { color: var(--bc-muted); font-variant-numeric: tabular-nums; }
.bc-jr-yrs { min-width: 52px; text-align: right; font-weight: 600; color: var(--bc-ink-2); font-variant-numeric: tabular-nums; }
/* Both panels as columns so their content ends on the same line */
.bc-panel { display: flex; flex-direction: column; }
/* The timeline follows the bar directly; the curve panel is the one that stretches */
.bc-panel-journey .bc-journey-list { flex: 1 1 auto; display: flex; flex-direction: column; }
.bc-panel-journey .bc-journey-row { flex: 1 1 auto; max-height: 46px; }
/* The curve stretches to whatever height the row gets, so both panels end together */
.bc-panel-dist .bc-dist-wrap { flex: 1 1 auto; height: auto; min-height: 96px; }
.bc-journey-row { padding: 4px 2px; }

/* Moderator admin panel toggle: a quiet text link (in the hero's corner when there is one) */
.bc-admin-link { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--bc-faint) !important; margin: 0 16px 8px; }
.bc-admin-link:hover { color: var(--bc-muted) !important; }
.bc-hero-body > .bc-admin-link { grid-column: 1 / -1; justify-self: end; margin: -8px 0 0; }

/* ==========================================================================
   Verification: progress ring, checklist, front-page nudge, verifyid stepper
   ========================================================================== */

.bc-vring { position: relative; width: 96px; height: 96px; flex: 0 0 96px; display: grid; }
.bc-vring.is-small { width: 72px; height: 72px; flex-basis: 72px; }
.bc-vring svg { grid-area: 1 / 1; width: 100%; height: 100%; transform: rotate(-90deg); }
.bc-vring-track { fill: none; stroke: var(--bc-surface-3); stroke-width: 9; }
.bc-vring-fill {
  fill: none;
  stroke: #5b4bd1;
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 0 100;
  animation: bc-ring-in 1.1s var(--bc-ease) 0.15s forwards;
}
.bc-vring-center { grid-area: 1 / 1; align-self: center; justify-self: center; text-align: center; line-height: 1.05; }
.bc-vring-center b { display: block; font-size: 22px; font-weight: 750; letter-spacing: -0.03em; color: var(--bc-ink); }
.bc-vring.is-small .bc-vring-center b { font-size: 18px; }
.bc-vring-center span { font-size: 11px; color: var(--bc-muted); }
@media (prefers-reduced-motion: reduce) { .bc-vring-fill { animation: none; stroke-dasharray: var(--p) 100; } }

.bc-verify-top { display: flex; align-items: center; gap: 18px; margin-bottom: 14px; }
.bc-verify-lead { font-size: 15.5px; font-weight: 650; color: var(--bc-ink); line-height: 1.3; }
.bc-verify-sub { font-size: 13px; color: var(--bc-muted); margin-top: 3px; line-height: 1.4; }

.bc-steps { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 6px; }
.bc-step {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--bc-surface-2);
  box-shadow: 0 0 0 1px var(--bc-line) inset;
  transition: background-color 0.2s var(--bc-ease), box-shadow 0.2s var(--bc-ease);
}
.bc-step-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--bc-muted);
  background: var(--bc-surface);
  box-shadow: 0 0 0 1px var(--bc-line-strong) inset;
}
.bc-step-label { font-size: 14px; font-weight: 600; color: var(--bc-ink); line-height: 1.3; }
.bc-step-hint { font-size: 12.5px; color: var(--bc-muted); margin-top: 2px; line-height: 1.35; }
.bc-step-bar { height: 5px; margin-top: 7px; border-radius: 99px; background: var(--bc-surface-3); overflow: hidden; max-width: 260px; }
.bc-step-bar span { display: block; height: 100%; border-radius: 99px; background: var(--bc-brand-grad); }

.bc-step.is-done .bc-step-dot { background: #16a34a; color: #fff; box-shadow: 0 4px 10px -4px rgba(22, 163, 74, 0.6); }
.bc-step.is-done .bc-step-label { color: var(--bc-muted); text-decoration: line-through; text-decoration-color: rgba(15, 15, 25, 0.25); }
.bc-step.is-pending .bc-step-dot { background: var(--bc-surface-2); color: #b45309; box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.35) inset; }
.bc-step.is-locked { opacity: 0.55; }
.bc-step.is-next {
  background: var(--bc-surface);
  box-shadow: 0 0 0 2px rgba(91, 75, 209, 0.45), 0 10px 24px -14px rgba(91, 75, 209, 0.6);
}
.bc-step.is-next .bc-step-dot { background: #5b4bd1; color: #fff; box-shadow: 0 4px 12px -4px rgba(91, 75, 209, 0.7); }

.bc-step-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  color: var(--bc-on-ink) !important;
  background: var(--bc-ink);
  box-shadow: 0 8px 18px -10px rgba(11, 11, 16, 0.7);
  transition: transform 0.2s var(--bc-ease);
}
.bc-step-cta:hover { transform: translateY(-1px); }
.bc-step-cta i { font-size: 11px; }
.bc-step-cta.is-block { display: flex; width: 100%; margin-top: 12px; padding: 11px 14px; }
@media (max-width: 520px) {
  .bc-step { grid-template-columns: 30px 1fr; }
  .bc-step .bc-step-cta { grid-column: 1 / -1; }
}
.bc-verify-all { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--bc-accent) !important; }

.bc-criteria { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bc-criteria li { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--bc-ink-2); }
.bc-criteria li i { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 9px; }
.bc-criteria li.is-ok i { background: #16a34a; color: #fff; }
.bc-criteria li.is-missing { color: var(--bc-muted); }
.bc-criteria li.is-missing i { background: var(--bc-surface-3); color: transparent; }

/* Fully verified: a slim banner instead of a card */
.bc-verified-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 16px 30px 16px;
  padding: 14px 18px;
  border-radius: 18px;
  background: linear-gradient(120deg, #f0fdf4, #ffffff 70%);
  box-shadow: var(--bc-shadow-2), 0 0 0 1px rgba(22, 163, 74, 0.2);
}
.bc-verified-icon { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; background: #16a34a; box-shadow: 0 6px 14px -6px rgba(22, 163, 74, 0.8); }
.bc-verified-title { font-size: 15.5px; font-weight: 700; color: #14532d; }
.bc-verified-sub { font-size: 12.5px; color: #3f6b4f; margin-top: 1px; }

/* Front-page nudge */
.bc-verify-nudge .content { margin-top: 18px; }
.bc-verify-dots { display: flex; gap: 6px; margin-top: 2px; }
.bc-verify-dots span { flex: 1; height: 5px; border-radius: 99px; background: var(--bc-surface-3); }
.bc-verify-dots span.is-done { background: #16a34a; }
.bc-verify-dots span.is-pending { background: #f59e0b; }
.bc-verify-dots span.is-next { background: #5b4bd1; }

/* verifyid.php stepper, sticky under the top bar */
.bc-stepper {
  position: sticky;
  top: calc(58px + env(safe-area-inset-top) * 0.8);
  z-index: 20;
  margin: 12px auto 4px;
  padding: 12px 16px 10px;
  border-radius: 18px;
  background: var(--bc-glass);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  box-shadow: var(--bc-shadow-2), 0 0 0 1px var(--bc-line);
}
.bc-stepper-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bc-muted); }
.bc-stepper-head b { font-size: 13px; letter-spacing: 0; color: var(--bc-ink); }
.bc-stepper-track { height: 5px; margin: 8px 0 10px; border-radius: 99px; background: var(--bc-surface-3); overflow: hidden; }
.bc-stepper-track span { display: block; height: 100%; border-radius: 99px; background: var(--bc-brand-grad); transition: width 0.8s var(--bc-ease); }
.bc-stepper ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.bc-stepper li a { display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; color: var(--bc-muted) !important; }
.bc-stepper .bc-step-dot { width: 28px; height: 28px; font-size: 12px; }
.bc-stepper-label { font-size: 11px; line-height: 1.25; }
.bc-stepper li.is-done .bc-step-dot { background: #16a34a; color: #fff; box-shadow: none; }
.bc-stepper li.is-pending .bc-step-dot { background: var(--bc-surface-2); color: #b45309; }
.bc-stepper li.is-next .bc-step-dot { background: #5b4bd1; color: #fff; box-shadow: 0 0 0 4px rgba(91, 75, 209, 0.18); }
.bc-stepper li.is-next .bc-stepper-label { color: var(--bc-ink); font-weight: 650; }
.bc-stepper li.is-locked { opacity: 0.5; }
@media (max-width: 520px) { .bc-stepper-label { display: none; } }
.timeline-item { scroll-margin-top: 190px; }
.timeline-item.bc-step-current .card-style { box-shadow: 0 0 0 2px rgba(91, 75, 209, 0.5), var(--bc-shadow-3) !important; }
/* overflow-x: hidden on the page wrapper breaks position: sticky; clip crops the same without that */
.page-content { overflow-x: clip !important; }
/* verifyid timeline icons in the new colours */
.timeline-item .timeline-icon.bg-blue-dark { background: var(--bc-surface) !important; color: var(--bc-muted) !important; box-shadow: 0 0 0 1px var(--bc-line-strong) inset, var(--bc-shadow-1) !important; }
.timeline-item .timeline-icon.bg-green-dark { background: #16a34a !important; box-shadow: 0 6px 14px -6px rgba(22, 163, 74, 0.7) !important; }
.timeline-item.bc-step-current .timeline-icon { background: #5b4bd1 !important; color: #fff !important; box-shadow: 0 0 0 5px rgba(91, 75, 209, 0.18) !important; }
/* Let the window scroll, not <body>: a scrolling body breaks position: sticky */
body.theme-light { overflow-x: clip !important; overflow-y: visible !important; }

/* ---------- Belts: fabric sheen + stitching (fnDrawBelt) ---------- */
.bc-belt { position: relative; overflow: hidden; border-radius: 5px !important; }
/* w3-container's clearfix makes ::before/::after display: table, which collapses to zero width */
.bc-belt::before, .bc-belt::after { display: block !important; }
/* Degree bar and stripes sit above the stitching, like a real belt's rank bar */
.bc-belt > div { position: relative; z-index: 2; }
.bc-belt::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.20) 0%, rgba(255, 255, 255, 0.04) 38%, rgba(0, 0, 0, 0.06) 62%, rgba(0, 0, 0, 0.16) 100%);
}
.bc-belt.bc-stitch::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: 21%;
  bottom: 21%;
  z-index: 1;
  pointer-events: none;
  border-top: 1px dashed rgba(255, 255, 255, 0.34);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.34);
}
/* Light belts get dark thread */
.bc-belt.bc-stitch.bg-white::after,
.bc-belt.bc-stitch.gradient-yellow::after,
.bc-belt.bc-stitch.gradient-gray::after,
.bc-belt.bc-stitch.redwhitebelt::after { border-color: rgba(0, 0, 0, 0.16); }

/* ---------- Profile hero ---------- */
.bc-hero {
  position: relative;
  margin: 0 16px 28px;
  border-radius: 26px;
  overflow: hidden;
  background: var(--bc-surface);
  box-shadow: var(--bc-shadow-2), 0 0 0 1px var(--bc-line);
  animation: bc-rise 0.6s var(--bc-ease) backwards;
}
.bc-hero.bc-overview { padding: 0; margin: 0 16px 28px; background: var(--bc-surface); color: var(--bc-ink); }
.bc-hero.bc-overview::before { display: none; }
.bc-hero-cover {
  height: 136px;
  background:
    radial-gradient(60% 120% at 88% 0%, rgba(212, 116, 79, 0.45), transparent 60%),
    radial-gradient(50% 120% at 10% 100%, rgba(3, 195, 227, 0.35), transparent 60%),
    linear-gradient(120deg, color-mix(in srgb, var(--belt) 80%, #0b0b10) 0%, color-mix(in srgb, var(--belt) 45%, #5b4bd1) 55%, #9a3ea8 115%);
  position: relative;
}
/* A faint stitched line across the cover, echoing the belts */
.bc-hero-cover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 26px;
  border-top: 2px dashed rgba(255, 255, 255, 0.22);
}
.bc-hero-body {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 20px 28px;
  padding: 0 28px 24px;
}
.bc-hero-id { display: flex; align-items: flex-start; gap: 22px; margin-top: -58px; min-width: 0; }
.bc-hero-avatar { flex: 0 0 auto; border-radius: 50%; padding: 5px; background: var(--bc-surface); box-shadow: var(--bc-shadow-2); line-height: 0; }
.bc-hero-avatar img, .bc-hero-avatar > * { margin: 0 !important; }
.bc-hero-text { min-width: 0; padding-top: 68px; }
.bc-hero-name { font-size: 28px; line-height: 1.15; margin: 0; letter-spacing: -0.03em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bc-hero-flag { font-size: 22px; line-height: 1; letter-spacing: 0; cursor: default; }
.bc-hero-verified { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; align-items: center; justify-content: center; font-size: 11px; color: #fff; background: #16a34a; box-shadow: 0 4px 10px -4px rgba(22, 163, 74, 0.8); }
.bc-hero-realname { font-size: 13px; color: var(--bc-muted); margin-top: 2px; }
.bc-hero-belt { display: flex; align-items: center; gap: 12px; margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--bc-ink-2); }
.bc-hero-beltdraw { width: 200px; flex: 0 0 200px; }
.bc-hero-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.bc-hero-facts > * {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--bc-ink-2) !important;
  background: var(--bc-surface-2);
  box-shadow: 0 0 0 1px var(--bc-line) inset;
}
.bc-hero-facts a:hover { background: var(--bc-surface-3); }
.bc-hero-facts i { font-size: 11px; color: var(--bc-muted); }
.bc-hero-memoriam { margin-top: 10px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bc-muted); }

.bc-hero-stats { padding-top: 18px; min-width: 0; }
.bc-hero-rankrow { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.bc-hero .bc-overview-rank { display: flex; flex-direction: column; gap: 2px; }
.bc-hero .bc-overview-rank-num { font-size: 36px; }
.bc-hero-rings { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.bc-hero-rings .bc-ring svg { width: 74px; height: 74px; }
.bc-hero-rings .bc-ring-big { font-size: 13.5px; }
.bc-hero-rings .bc-ring-label { font-size: 11.5px; margin-top: 6px; }
.bc-hero-rings .bc-ring-sub { font-size: 11px; }

@media (max-width: 991.98px) {
  .bc-hero-body { grid-template-columns: 1fr; padding: 0 18px 20px; }
  .bc-hero-stats { padding-top: 4px; border-top: 1px solid var(--bc-line); }
  .bc-hero-rankrow { margin-top: 14px; }
}
@media (max-width: 520px) {
  .bc-hero { margin: 0 8px 22px; border-radius: 22px; }
  .bc-hero.bc-overview { margin: 0 8px 22px; }
  .bc-hero-cover { height: 104px; }
  /* Stack: avatar centred over the cover edge, identity centred below */
  .bc-hero-id { flex-direction: column; align-items: center; text-align: center; gap: 10px; margin-top: -70px; }
  .bc-hero-text { padding-top: 0; }
  .bc-hero-name { font-size: 23px; justify-content: center; }
  .bc-hero-belt { justify-content: center; }
  .bc-hero-beltdraw { width: 150px; flex-basis: 150px; }
  .bc-hero-facts { justify-content: center; }
  .bc-hero .bc-overview-rank-num { font-size: 30px; }
}
/* The overview card below the hero keeps only its panels */
.bc-overview-panelsonly { padding: 0 !important; background: none !important; box-shadow: none !important; }
.bc-overview-panelsonly::before { display: none; }
.bc-overview-panelsonly .bc-overview-panels { margin-top: 0; }
/* Hero lines up with the column cards (the grid row has -12px gutters, cards 16px margins) */
.bc-hero, .bc-hero.bc-overview { margin-left: 4px !important; margin-right: 4px !important; }
/* Curve and journey below the hero are cards of their own, white like the rest */
.bc-overview-panelsonly .bc-panel { background: var(--bc-surface); border-radius: 22px; padding: 18px 20px 16px; box-shadow: var(--bc-shadow-2), 0 0 0 1px var(--bc-line); }
.bc-hero-seen { margin-top: 10px; font-size: 12px; color: var(--bc-faint); }
.bc-hero-online { display: inline-flex; align-items: center; gap: 5px; color: #15803d; font-weight: 650; }
.bc-hero-online i { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2); animation: bc-online-pulse 2s ease-in-out infinite; }
@keyframes bc-online-pulse { 50% { box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.08); } }
@media (prefers-reduced-motion: reduce) { .bc-hero-online i { animation: none; } }
.bc-hero-rankrow .bc-overview-share { margin-left: auto; }
.bc-hero-belt { flex-wrap: wrap; row-gap: 6px; }
.bc-hero-vbadge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; color: #15803d; background: #f0fdf4; box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.25) inset; }
.bc-hero-vbadge i { font-size: 10px; }

/* Hero verification marks with tooltips (hover on desktop, tap/focus on touch) */
.bc-hero-vbadge.is-wait { color: #b45309; background: var(--bc-surface-2); box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.3) inset; }
.bc-hero-vbadge.is-bad { color: #be123c; background: #fff1f2; box-shadow: 0 0 0 1px rgba(225, 29, 72, 0.25) inset; }
.bc-tip { position: relative; cursor: help; outline: none; }
.bc-tip::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translate(-50%, 4px);
  width: max-content;
  max-width: 260px;
  padding: 8px 11px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
  text-align: left;
  white-space: normal;
  color: #fff;
  background: rgba(11, 11, 16, 0.94);
  box-shadow: var(--bc-shadow-3);
  opacity: 0;
  pointer-events: none;
  z-index: 50;
  transition: opacity 0.18s var(--bc-ease), transform 0.18s var(--bc-ease);
}
.bc-tip:hover::after, .bc-tip:focus::after, .bc-tip:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 520px) { .bc-tip::after { max-width: 220px; } }
.bc-vbadge-pts { font-weight: 700; margin-left: 4px; padding-left: 7px; border-left: 1px solid currentColor; border-left-color: color-mix(in srgb, currentColor 30%, transparent); font-variant-numeric: tabular-nums; }
/* The wrapper clipped the panels' shadows; let them show like the other cards */
.bc-overview-panelsonly { overflow: visible !important; animation: none; }

/* ---------- Votes received (functions_lists.php bcVotesReceivedTable) ---------- */
.bc-votes { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.bc-vote { background: var(--bc-surface-2); border: 1px solid var(--bc-line); border-radius: var(--bc-r); padding: 12px 14px; }
.bc-vote-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.bc-vote-avatar { flex: 0 0 48px; line-height: 0; }
.bc-vote-avatar img { width: 48px !important; height: 48px !important; margin: 0 !important; }
.bc-vote-who { flex: 1 1 auto; min-width: 0; }
.bc-vote-name { display: block; font-weight: 700; color: var(--bc-ink); text-decoration: none; font-size: 15px; line-height: 1.25; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bc-vote-name:hover { text-decoration: underline; }
.bc-vote-belt { display: flex; align-items: center; gap: 7px; margin-top: 4px; color: var(--bc-muted); font-size: 12px; line-height: 1.2; min-width: 0; }
.bc-vote-belt > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bc-vote-belt > div { flex: 0 0 48px; width: 48px !important; height: 9px !important; padding: 0 7px 0 0 !important; margin: 0 !important; border-radius: 2px !important; box-shadow: inset 0 0 0 1px rgba(15, 15, 25, 0.14) !important; overflow: hidden; font-size: 0 !important; }
.bc-vote-belt > div > div { width: 9px !important; min-width: 0 !important; height: 100% !important; padding: 0 !important; }
.bc-vote-belt img { display: none !important; }
.bc-vote-belt > div:not(.bc-belt) { display: none !important; }
.bc-vote-pts { flex: 0 0 auto; font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bc-vote-pts small { font-weight: 600; font-size: 11px; opacity: 0.75; }
.bc-vote-pts.is-verified, .bc-vote-status.is-verified { color: var(--bc-green); }
.bc-vote-pts.is-disputed, .bc-vote-status.is-disputed { color: var(--bc-red); }
.bc-vote-comment { margin: 10px 0 0; color: var(--bc-ink-2); font-style: italic; font-size: 14px; line-height: 1.45; cursor: pointer; overflow-wrap: anywhere; }
.bc-vote-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 8px; color: var(--bc-faint); font-size: 12px; }
.bc-vote-status { font-weight: 700; }
.bc-vote-comments { margin-left: auto; border: 0; background: none; padding: 4px 0; color: var(--bc-muted); font-size: 12px; font-weight: 600; cursor: pointer; }
.bc-vote-comments:hover { color: var(--bc-ink); }
.bc-vote-thread { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--bc-line); }
.bc-vote-thread.w3-hide { display: none !important; }

/* ---------- Photo drop zones (scripts/bc-dropzone.js) ---------- */
.bc-drop {
  position: relative; display: block; margin: 0 0 10px; border-radius: 16px;
  border: 1.5px dashed rgba(91, 75, 209, 0.35); background: rgba(91, 75, 209, 0.035); cursor: pointer;
  transition: border-color 0.2s var(--bc-ease, ease), background-color 0.2s var(--bc-ease, ease), box-shadow 0.2s var(--bc-ease, ease);
}
.bc-drop:hover, .bc-drop.is-drag { border-color: var(--bc-accent); background: rgba(91, 75, 209, 0.07); }
.bc-drop.is-drag { box-shadow: var(--bc-ring); }
.bc-drop:focus-within { border-color: var(--bc-accent); box-shadow: var(--bc-ring); }
.bc-drop.has-file { border-style: solid; border-color: var(--bc-line-strong); background: var(--bc-surface); }
/* The real input covers the zone, so clicks, taps and drops land on it natively */
.bc-drop > input.bc-drop-input {
  position: absolute !important; inset: 0; z-index: 2; width: 100% !important; height: 100% !important;
  margin: 0 !important; padding: 0 !important; opacity: 0; cursor: pointer; font-size: 0; border: 0 !important;
}
.bc-drop-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 24px 16px; text-align: center; }
.bc-drop-empty[hidden], .bc-drop-preview[hidden], .bc-drop-thumb[hidden] { display: none !important; }
.bc-drop-icon {
  width: 44px; height: 44px; margin-bottom: 6px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--bc-accent); background: var(--bc-surface); box-shadow: var(--bc-shadow-1), 0 0 0 1px var(--bc-line);
}
.bc-drop-empty b { font-size: 14.5px; font-weight: 650; color: var(--bc-ink); }
.bc-drop-empty small { font-size: 12.5px; color: var(--bc-muted); }
.bc-drop-desktop { display: none; }
@media (hover: hover) and (pointer: fine) { .bc-drop-desktop { display: inline; } .bc-drop-touch { display: none; } }
.bc-drop-preview { display: flex; align-items: center; gap: 14px; padding: 12px; }
.bc-drop-thumb { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: var(--bc-surface-2); box-shadow: 0 0 0 1px var(--bc-line); }
.bc-drop-meta { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bc-drop-name { font-size: 14px; font-weight: 650; color: var(--bc-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-drop-change { font-size: 12.5px; color: var(--bc-accent); font-weight: 600; }
.bc-drop-remove {
  position: relative; z-index: 3; flex: 0 0 auto; width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: var(--bc-surface-3); color: var(--bc-ink-2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.bc-drop-remove:hover { background: var(--bc-line-strong); color: var(--bc-ink); }

/* Toasts sit above the floating bottom menu (style.css put .toast-bottom at 65px, under it) */
.toast-bottom { bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important; }
