@import url("tokens.css");
:root {
  /* Colours, font, rounding, shadows and motion come from tokens.css (imported above): don't redefine them here.
     The one deliberate difference from the main site: the dashboard draws its boxes without outlines. */
  --border: transparent;
  --border-strong: transparent;

  /* Spacing scale (4px steps). Use these for padding, margins and gaps. */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px;

  /* Type scale */
  --fs-xs: 12px; --fs-sm: 13px; --fs-base: 14px; --fs-md: 15px;
  --fs-lg: 16px; --fs-xl: 18px; --fs-2xl: 22px;

  --shell: 1100px;        /* width of the framed content column */
  --control-h: 40px;      /* height of buttons and inputs */
  --control-h-sm: 32px;
  --control-h-lg: 44px;
  --nav-h: 72px;
}

* { box-sizing: border-box; }
html { scrollbar-width: thin; scrollbar-color: var(--scrollbar) transparent; scrollbar-gutter: stable; }   /* the bar's lane is always reserved, so pages don't shift sideways when one gets long enough to scroll */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scrollbar); border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-hover); background-clip: content-box; }

body.no-scroll { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---------- Page frame (grid column) ---------- */
.shell {
  display: flex;
  flex-direction: column;
  max-width: var(--shell);
  min-height: 100vh;
  margin: 0 auto;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

/* ---------- Navbar (same as the main site) ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
}
.nav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.nav__inner { height: 100%; padding: 0 32px; display: flex; align-items: center; gap: 24px; }
.nav__brand { display: flex; align-items: center; gap: 12px; }
.nav__name { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }

.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__link {
  padding: 8px 14px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color .2s, background .2s;
}
.nav__link:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }

.nav__right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav__actions { display: flex; align-items: center; gap: 6px; }
.nav__actions--mobile { display: none; }

.nav__toggle {
  display: none;
  width: var(--control-h);
  height: var(--control-h);
  padding: 0;
  background: var(--secondary);
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.nav__toggle span {
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s, opacity .2s;
}
.nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.nav__actions .btn--secondary[aria-current="page"] { filter: brightness(1.3); }

/* ---------- Buttons ----------
   Variants: primary (one per view), secondary, ghost, danger (soft), danger-solid
   (confirm dialogs). Sizes: --sm, default, --lg. States: hover, focus-visible,
   active, disabled / aria-disabled, .is-loading (shows .btn__spinner). */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  height: var(--control-h);
  padding: 0 var(--s-4);
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--secondary);
  color: var(--on-secondary);
  font: 600 var(--fs-base)/1 var(--font);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn svg { flex: none; }
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
/* Trim the font's built-in space so labels sit exactly in the centre. */
.btn__label { display: block; line-height: 1; text-box: trim-both cap alphabetic; }
.btn--block { width: 100%; }
.btn--lg { height: var(--control-h-lg); font-size: var(--fs-md); }
.btn--primary { background: var(--primary); color: var(--on-primary); }
.btn--primary:hover { background: var(--primary-hover); }
.btn--secondary { background: var(--secondary); color: var(--on-secondary); }
.btn--secondary:hover { background: var(--secondary-hover); }
.btn--ghost { background: transparent; color: var(--muted); }
.btn--ghost:hover { background: var(--secondary); color: var(--text); }
/* Loading: the label stays for width, a spinner sits on top. */
.btn__spinner { display: none; }
.btn.is-loading { pointer-events: none; opacity: 1; }
.btn.is-loading > :not(.btn__spinner) { visibility: hidden; }
.btn.is-loading .btn__spinner {
  position: absolute;
  inset: 0;
  display: block;
  width: 18px;
  height: 18px;
  margin: auto;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

/* ---------- Login page: stands on its own (no navbar or footer) over the logo pattern ---------- */
.login-page { background: var(--bg); }
/* The glossy blue button from the main site, on these two pages only. */
.login-page .btn--primary {
  border: 1px solid color-mix(in srgb, var(--primary) 70%, #000);
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 72%, #fff) 0%, var(--primary) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .16),
    inset 0 10px 16px -10px rgba(255, 255, 255, .55);
}
.login-page .btn--primary:hover { background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 72%, #fff) 0%, var(--primary) 100%); filter: brightness(1.1); }
.login {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 28px 32px;
  background: url("login/guildza-background.svg") center / cover no-repeat, var(--bg);
}
.login__main { flex: 1; display: grid; place-items: center; padding: 32px 0; }
/* Language picker here: bottom left. The list and the button are one connected block of the same width,
   the list opens upwards, flag and code only, and the arrow shows whether it is open. */
.login__lang { align-self: flex-start; }
.login-page .lang { width: 104px; }
.login-page .lang__btn { width: 100%; justify-content: flex-start; padding: 0 12px; }
.login-page .lang__chev { display: grid; margin-left: auto; transform: rotate(180deg); }
.login-page .lang__btn[aria-expanded="true"] { border-top-left-radius: 0; border-top-right-radius: 0; }
.login-page .lang__btn[aria-expanded="true"] .lang__chev { transform: none; }
.login-page .lang__menu {
  left: 0;
  right: 0;
  bottom: 100%;
  min-width: 0;
  padding: 0;
  background: var(--secondary);
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: none;
  overflow: hidden;
}
.login-page .lang__menu a { gap: 8px; height: var(--control-h); padding: 0 12px; border-radius: 0; }
.login-page .lang__menu li:has(.is-current) { display: none; }
.login-page .lang__name { display: none; }
.login-page .lang__code { font-size: 13px; opacity: 1; letter-spacing: 0; }
@media (max-width: 700px) { .login { padding: 20px 16px; } }

/* No subtitle under the title on these pages: keep the gap the subtitle used to give. */
.login-page .card__title { margin-bottom: var(--s-6); }
.login-page .card__title + .card__subtitle { margin-top: calc(var(--s-2) - var(--s-6)); }

/* ---------- Login area ---------- */
.auth {
  position: relative;
  flex: 1;
  display: grid;
  place-items: center;
  padding: 72px 24px 96px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
/* Plain backdrop: no glow. */
.auth__backdrop { display: none; }

.card {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 40px 36px 32px;
  background: var(--surface);
  border: 0;
  border-radius: var(--radius);
}
.card__title { margin: 0; font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -0.02em; text-align: center; }
.card__subtitle { margin: var(--s-2) 0 var(--s-6); color: var(--muted); font-size: var(--fs-base); text-align: center; text-wrap: balance; }
.card__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 16%, transparent);
  color: var(--primary);
}
.card__state { display: grid; justify-items: center; gap: 4px; padding: 12px 0; }
.card__state[hidden] { display: none; }
.spinner {
  width: 28px;
  height: 28px;
  border: 2px solid var(--line);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.card__icon--muted { background: var(--secondary); color: var(--muted); }
.card__text { margin: -12px 0 28px; color: var(--muted); font-size: 14px; line-height: 1.6; text-align: center; }
.card__back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted) !important; font-weight: 500 !important; }
.card__back:hover { color: var(--text) !important; }
.card__switch { margin: 24px 0 0; color: var(--muted); font-size: 14px; text-align: center; }
.card__switch a { color: var(--text); font-weight: 600; }
.card__switch a:hover { color: var(--primary); }
.card__legal { margin: 16px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; text-align: center; }
.card__legal a { color: var(--text); text-decoration: none; }

.alert {
  margin: 0 0 var(--s-5);
  padding: var(--s-3) 14px;
  border-radius: var(--radius);
  font-size: var(--fs-base);
  line-height: 1.5;
}
.alert--error { background: var(--danger-soft); color: var(--danger-text); }
.alert--info { background: var(--primary-soft); color: var(--primary-text-light); }
.alert--success { background: var(--success-soft); color: var(--success-text); }

/* ---------- Form ---------- */
.form { display: flex; flex-direction: column; gap: var(--s-5); }
.field { display: flex; flex-direction: column; gap: var(--s-2); }
.field__row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); }
.field__label { font-size: var(--fs-base); font-weight: 600; }
.field__link { color: var(--muted); font-size: var(--fs-sm); transition: color .15s; }
.field__link:hover { color: var(--text); }
.field__wrap { position: relative; }
.field__hint { margin: 0; color: var(--muted); font-size: var(--fs-xs); }
.field__error { margin: 0; color: var(--danger-text); font-size: var(--fs-xs); font-weight: 500; }
.field__error[hidden] { display: none; }
.field__input {
  width: 100%;
  height: var(--control-h-lg);
  padding: 0 14px;
  background: var(--field);
  border: 0;
  border-radius: var(--radius);
  color: var(--text);
  font: 400 var(--fs-md) var(--font);
  transition: box-shadow .15s, background-color .15s;
}
.field__wrap .field__input { padding-right: 46px; }
.field__input::placeholder { color: var(--subtle); }
.field__input:hover { background: var(--field-hover); }
.field__input:focus {
  outline: none;
  box-shadow: 0 0 0 1px var(--primary);
}
.field__input:disabled, .field__input[readonly] { color: var(--muted); }
.field__input:disabled { cursor: not-allowed; opacity: .6; }
.field.is-invalid .field__input, .field__input[aria-invalid="true"] { box-shadow: 0 0 0 1px var(--danger); }
.field.is-invalid .field__hint { display: none; } /* the error already says it */
.field__toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  transform: translateY(-50%);
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.field__toggle:hover { color: var(--text); }
.field__toggle .icon-eye-off,
.field__toggle.is-shown .icon-eye { display: none; }
.field__toggle.is-shown .icon-eye-off { display: block; }

/* Custom checkbox */
.check { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; cursor: pointer; user-select: none; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check__box {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 4px;
  background: var(--secondary);
  transition: background .15s, border-color .15s;
}
.check__box::after {
  content: "";
  width: 9px;
  height: 5px;
  margin-top: -2px;
  border-left: 2px solid var(--on-primary);
  border-bottom: 2px solid var(--on-primary);
  transform: rotate(-45deg) scale(0);
  transition: transform .15s;
}
.check input:checked + .check__box { background: var(--primary); }
.check input:checked + .check__box::after { transform: rotate(-45deg) scale(1); }
.check input:focus-visible + .check__box { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---------- Footer ---------- */
.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 20px 32px;
  color: var(--muted);
  font-size: 13px;
}
.footer__copy, .footer__age { margin: 0; }
.footer__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.footer__age { display: inline-flex; align-items: center; gap: 10px; }
.footer__age-badge {
  padding: 3px 7px;
  background: var(--secondary);
  border-radius: 4px;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
}

/* Language switcher (opens upwards from the footer) */
.lang { position: relative; }
.lang__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: var(--control-h);
  padding: 0 12px;
  background: var(--secondary);
  border: 0;
  border-radius: var(--radius);
  color: var(--text);
  font: 600 13px/1 var(--font);
  cursor: pointer;
}
.lang__btn:hover { filter: brightness(1.2); }
.lang__chev { color: var(--muted); transition: transform .2s; }
.lang__btn[aria-expanded="true"] .lang__chev { transform: rotate(180deg); }
.lang__menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 10;
  min-width: 190px;
  padding: 6px;
  background: var(--surface);
  border: 0;
  box-shadow: 0 0 0 1px var(--line);
  border-radius: var(--radius);
}
.lang__menu[hidden] { display: none; }
.lang__menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
}
.lang__menu a:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.lang__menu a.is-current { background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--text); }
.flag { display: block; flex: none; width: 22px; height: 22px; }
.lang__name { margin-right: auto; }
.lang__code { font-size: 11px; font-weight: 700; letter-spacing: .06em; opacity: .6; }

/* =====================================================================
   Logged-in app (dashboard)
   ===================================================================== */
.app-body { min-height: 100vh; }
.app { display: flex; min-height: 100vh; }

/* ---------- Sidebar ---------- */
.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  flex: none;
  width: 248px;
  height: 100vh;
  background: var(--bg);
  border-right: 1px solid var(--line);
}
.sidebar__brand {
  display: flex;
  align-items: center;
  height: var(--nav-h);
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.sidebar__brand { justify-content: space-between; }
.sidebar__logo { display: flex; align-items: center; flex: 1; min-width: 0; height: 100%; }
.sidebar__logo img { display: block; width: calc(100% + 6px); max-width: none; height: auto; max-height: 100%; margin-left: -4px; object-fit: contain; object-position: left center; }
.sidebar__close {
  display: none;
  place-items: center;
  width: var(--control-h-sm);
  height: var(--control-h-sm);
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.sidebar__close:hover { background: var(--secondary); color: var(--text); }
.sidebar__nav { flex: 1; display: flex; flex-direction: column; gap: var(--s-4); padding: var(--s-4) var(--s-3); overflow-y: auto; }
.sidebar__group { display: flex; flex-direction: column; gap: 2px; }
.sidebar__heading {
  margin: 0 0 var(--s-1);
  padding: 0 var(--s-3);
  color: var(--subtle);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.sidebar__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar__lock { display: grid; color: var(--subtle); }
.sidebar__tag {
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: var(--secondary);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.sidebar__link:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--primary); }
.sidebar__link {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--control-h);
  padding: 0 12px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.sidebar__link:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.sidebar__link.is-active { background: var(--secondary); color: var(--text); }
.sidebar__link.is-active svg { color: var(--primary); }

.sidebar__footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 12px 16px 16px;
  border-top: 1px solid var(--line);
}
.account { display: flex; align-items: center; gap: var(--s-3); flex: 1; min-width: 0; margin: -6px; padding: 6px; border-radius: var(--radius); transition: background-color .15s; }
.account:hover { background: var(--secondary); }
.account__avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 14px;
  font-weight: 700;
}
.account__text { display: flex; flex-direction: column; min-width: 0; }
.account__name, .account__email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account__name { font-size: 14px; font-weight: 600; }
.account__email { color: var(--muted); font-size: 12px; }
.sidebar__logout {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.sidebar__logout:hover { background: var(--secondary); color: var(--text); }
.sidebar-backdrop { display: none; }

/* ---------- Main column ---------- */
.app__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--nav-h);
  padding: 0 32px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.topbar__title { display: flex; align-items: center; gap: var(--s-2); min-width: 0; margin: 0; font-size: var(--fs-md); font-weight: 600; white-space: nowrap; }
.topbar__title > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.topbar__group { color: var(--muted); font-weight: 500; }
.topbar__sep { color: var(--subtle); font-weight: 400; }
.topbar__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.topbar .lang__menu { top: calc(100% + 10px); bottom: auto; }
.topbar__menu {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: var(--control-h);
  height: var(--control-h);
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--secondary);
  cursor: pointer;
}
.topbar__menu span { width: 16px; height: 2px; border-radius: 2px; background: var(--text); }

.app__content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: 1180px;
  padding: 32px;
}

/* ---------- Content blocks ---------- */
/* Page heading: one per page, under the breadcrumb in the top bar. */
.page-head, .welcome { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-4); }
.page-head__title, .welcome__title { margin: 0; font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; }
.page-head__text, .welcome__text { margin: var(--s-1) 0 0; color: var(--muted); font-size: var(--fs-base); }
.welcome { display: block; }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--s-4); align-items: start; }

.panel {
  padding: var(--s-6);
  background: var(--surface);
  border: 0;
  border-radius: var(--radius-lg);
}
.panel__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--s-3) var(--s-4); margin-bottom: var(--s-5); }
.panel__head > div:first-child { flex: 1 1 220px; min-width: 0; }
.panel__title { margin: 0; font-size: var(--fs-lg); font-weight: 600; }
.panel__sub { margin: var(--s-1) 0 0; color: var(--muted); font-size: var(--fs-sm); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--secondary);
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 600;
  white-space: nowrap;
}
.pill--primary { background: var(--primary-soft); color: var(--primary-text); }
.pill--warn { background: var(--warning-soft); color: var(--warning); }
.pill--live::before, .pill--warn::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Overview: live address, quick actions, list rows, connections, branding */
.site-url { display: flex; gap: var(--s-2); margin-bottom: var(--s-5); }
.site-url .field__input { flex: 1 1 0; min-width: 0; height: var(--control-h); font-size: var(--fs-base); text-overflow: ellipsis; }
.actions, .btn-group { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.actions { padding-top: var(--s-5); border-top: 1px solid var(--line); }
.facts--inline { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); }
.facts--inline .facts__row { flex-direction: column; gap: 2px; padding: 0; border: 0; }
.facts--inline dt { font-size: var(--fs-xs); }
.facts.facts--inline dd { text-align: left; font-weight: 600; }

.rows { margin: 0 calc(var(--s-3) * -1); }
.rows__item {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3);
  border-radius: var(--radius);
  transition: background-color .15s;
}
.rows__item:hover { background: var(--surface-hover); }
.rows__item:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--primary); }
.rows__icon { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: var(--radius); background: var(--secondary); color: var(--muted); }
.rows__text { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.rows__title { font-size: var(--fs-base); font-weight: 600; }
.rows__desc { color: var(--muted); font-size: var(--fs-sm); }
.rows__value { font-size: var(--fs-lg); font-weight: 700; font-variant-numeric: tabular-nums; }
.rows__go { display: grid; color: var(--subtle); }

.callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-top: var(--s-4);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--radius);
  background: var(--field);
  font-size: var(--fs-sm);
}
.callout p { margin: 0; color: var(--muted); }

.status-list { margin: 0 0 var(--s-4); }
.status-list__row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) 0; border-top: 1px solid var(--line); font-size: var(--fs-base); }
.status-list__row:first-child { border-top: 0; padding-top: 0; }
.status { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--subtle); }
.status.is-on { color: var(--success); }
.status.is-on::before { background: var(--success); }
.status.is-off::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--subtle); }
.link-arrow { display: inline-flex; align-items: center; gap: var(--s-1); color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.link-arrow:hover { color: var(--text); }

.brand-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-4); margin: 0; }
.brand-grid__item { display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; }
.brand-grid dt { color: var(--muted); font-size: var(--fs-xs); }
.brand-grid dd { display: flex; align-items: center; min-height: 32px; margin: 0; font-size: var(--fs-base); font-weight: 600; overflow-wrap: anywhere; }
.brand-grid dd .muted { font-weight: 500; }
.brand-grid__logo { max-width: 100%; max-height: 32px; object-fit: contain; }
.brand-grid__icon { width: 24px; height: 24px; border-radius: var(--radius-sm); object-fit: contain; }
.swatches { gap: 6px; }
.swatch { width: 24px; height: 24px; border-radius: var(--radius-sm); background: var(--swatch); box-shadow: inset 0 0 0 1px var(--border-strong); }

.facts { margin: 0 0 var(--s-5); }
.facts__row { display: flex; justify-content: space-between; gap: var(--s-4); padding: var(--s-3) 0; border-top: 1px solid var(--line); font-size: var(--fs-base); }
.facts__row:first-child { border-top: 0; padding-top: 0; }
.facts__row:last-child { padding-bottom: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.facts .facts__muted { color: var(--muted); font-weight: 500; }
.panel > .facts:last-child { margin-bottom: 0; }

.empty { display: flex; flex-direction: column; align-items: center; padding: var(--s-8) var(--s-4) var(--s-4); text-align: center; }
.empty--tall { padding: var(--s-12) var(--s-4); }
.empty__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: var(--s-4);
  border-radius: 50%;
  background: var(--secondary);
  color: var(--muted);
}
.empty__title { margin: 0; font-size: var(--fs-lg); font-weight: 600; }
.empty__text { max-width: 420px; margin: 6px 0 var(--s-5); color: var(--muted); font-size: var(--fs-base); line-height: 1.6; }
.empty__text:last-child { margin-bottom: 0; }
.empty__note { margin: var(--s-4) 0 0; color: var(--subtle); font-size: var(--fs-xs); }

.setting { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.panel__head + .setting { border-top: 0; padding-top: 0; }
.setting:last-child { padding-bottom: 0; }
.setting__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: var(--secondary);
  color: var(--muted);
}
.setting__text { flex: 1; min-width: 0; }
.setting__title { margin: 0; font-size: 14px; font-weight: 600; }
.setting__desc { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

/* ---------- Dashboard: smaller screens ---------- */
@media (max-width: 1100px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .brand-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .sidebar {
    position: fixed;
    left: 0;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform .25s cubic-bezier(.22, 1, .36, 1);
  }
  .app.is-menu-open .sidebar { transform: none; }
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: block;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
  }
  .app.is-menu-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }
  .sidebar { width: min(288px, 86vw); }
  .sidebar__brand { padding: 0 var(--s-3) 0 var(--s-6); }
  .sidebar__close { display: grid; }
  .topbar { padding: 0 16px; gap: 12px; }
  .topbar__group, .topbar__sep { display: none; }
  .topbar .lang__btn span { display: none; }
  .topbar__menu { display: flex; }
  .topbar__site .btn__label { display: none; }
  .topbar__site { width: var(--control-h); padding: 0; }
  .app__content { padding: 24px 16px; gap: 16px; }
}
@media (max-width: 520px) {
  .panel { padding: var(--s-5) var(--s-4); }
  .rows { margin-inline: calc(var(--s-2) * -1); }
  .rows__item { padding-inline: var(--s-2); }
  .facts--inline { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .brand-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .actions .btn { flex: 1 1 calc(50% - var(--s-2)); }
  .page-head__title, .welcome__title { font-size: 20px; }
  .setting { flex-wrap: wrap; }
  .setting > .btn, .setting > form, .setting form .btn { width: 100%; }
}

/* ---------- Builder launch page ---------- */
.launch { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0; overflow: hidden; border-radius: var(--radius); background: var(--surface); }
.launch__art {
  position: relative; min-height: 280px;
  background: var(--bg); box-shadow: inset -1px 0 0 var(--line);
}
.launch__bar { position: absolute; left: 0; right: 0; top: 0; height: 44px; border-bottom: 1px solid var(--line); }
.launch__title { position: absolute; left: 28px; top: 76px; color: #fff; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.launch__hero { position: absolute; left: 28px; top: 124px; width: 96px; height: 30px; border-radius: 6px; background: var(--p); }
.launch__row { position: absolute; left: 28px; right: 28px; bottom: 72px; height: 16px; border-radius: 4px; background: var(--sf); }
.launch__row--b { bottom: 48px; right: 30%; }
.launch__row--c { bottom: 24px; right: 55%; }
.launch__body { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 32px; }
.launch__name { margin: 4px 0 0; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.launch__facts { display: flex; flex-wrap: wrap; gap: 28px; margin: 10px 0 8px; }
.launch__facts dt { color: var(--muted); font-size: 12px; }
.launch__facts dd { margin: 2px 0 0; font-size: 18px; font-weight: 700; }
.launch__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.launch__actions .btn { gap: 8px; height: 44px; padding: 0 18px; }
.launch__pages, .launch__features { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.launch__pages li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.launch__pages li:first-child { border-top: 0; padding-top: 0; }
.launch__page-name { font-weight: 600; }
.launch__page-slug { flex: 1; color: var(--muted); font-size: 13px; }
.launch__features li { display: flex; align-items: center; gap: 12px; padding: 9px 0; color: var(--muted); font-size: 14px; }
.launch__features li.is-on { color: var(--text); }
.launch__feature-icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--secondary); }
.launch__features li.is-on .launch__feature-icon { background: color-mix(in srgb, var(--primary) 18%, transparent); color: var(--primary); }
@media (max-width: 860px) {
  .launch { grid-template-columns: minmax(0, 1fr); }
  .launch__art { min-height: 220px; }
  .launch__body { padding: 24px 20px; }
}

/* ---------- Locked builder (no plan) ---------- */
.locked { display: flex; flex-direction: column; align-items: center; padding: 56px 24px; text-align: center; }
.locked__title { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.locked__text { max-width: 480px; margin: 10px 0 24px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.locked__note { margin: 16px 0 0; color: var(--muted); font-size: 13px; }
.compare { display: flex; flex-direction: column; }
.compare__row { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); font-size: 14px; }
.compare__row--head { border-top: 0; padding-top: 0; color: var(--muted); font-size: 13px; font-weight: 700; }
.compare__row > :not(:first-child) { text-align: center; }
.compare__cell { color: var(--muted); }
.compare__cell.is-yes { color: var(--primary); }

@media (max-width: 640px) {
  .compare__row { grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); font-size: 13px; }
}
/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .shell { border-left: 0; border-right: 0; }
  .nav__toggle { display: flex; }
  .nav__actions { display: none; }
  .nav__links {
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 20px 24px;
    background: var(--bg);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav.is-open .nav__links { opacity: 1; transform: none; visibility: visible; }
  .nav__link { padding: 14px 12px; font-size: 17px; border-bottom: 1px solid var(--border); border-radius: 0; }
  .nav__actions--mobile { display: flex; flex-direction: column; align-items: stretch; margin-top: 20px; gap: 12px; }
  .nav__actions--mobile .btn { height: 52px; }
  .nav__inner { gap: 16px; }
}
@media (max-width: 520px) {
  .nav__inner { padding: 0 16px; }
  .auth { padding: 40px 16px 64px; place-items: start center; }
  .card { padding: 32px 20px 24px; }
  .footer { padding: 20px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- Community pages (leaderboards, giveaways, members, store) ---------- */
.comm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.comm-head .welcome__title { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.comm-back { display: inline-flex; align-items: center; gap: 6px; width: fit-content; color: var(--muted); font-size: 13px; }
.comm-back svg { transform: rotate(180deg); }
.comm-back:hover { color: var(--text); }
.comm-flash { margin: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.muted { color: var(--muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; align-items: start; }
.form-grid .field__input, .stack .field__input, .form .field__input--area { height: 40px; font-size: 14px; }
.field--wide { grid-column: 1 / -1; }
.field__input--area { height: auto !important; min-height: 84px; padding: 10px 14px; line-height: 1.5; resize: vertical; }
.field__input--file { height: auto !important; padding: 6px; color: var(--muted); font-size: var(--fs-sm); cursor: pointer; }
.field__input--file::file-selector-button {
  height: var(--control-h-sm);
  margin-right: var(--s-3);
  padding: 0 var(--s-3);
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--secondary);
  color: var(--text);
  font: 600 var(--fs-sm) var(--font);
  cursor: pointer;
}
.field__input--file:hover::file-selector-button { background: var(--secondary-hover); }
.field__input--sm { width: auto; min-width: 0; height: 34px !important; padding: 0 10px; font-size: 13px; }
select.field__input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239a9cab' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-position: right 12px center; background-repeat: no-repeat; padding-right: 34px; cursor: pointer; }
input[type=datetime-local].field__input { color-scheme: dark; }
.form-grid__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.inline-form, .inline-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.inline-form .field__input--sm[type=number] { width: 104px; }
.inline-form .field__input--sm[type=text] { width: 140px; }
.radio-row { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: 14px; }
.radio-row label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.radio-row input { accent-color: var(--primary); }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; }
.switch-row__text { display: flex; flex-direction: column; gap: 4px; }
.switch { appearance: none; flex: none; position: relative; width: 38px; height: 22px; margin: 0; border-radius: 999px; background: var(--secondary); cursor: pointer; transition: background .15s; }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.switch:checked { background: var(--primary); }
.switch:checked::after { transform: translateX(16px); background: #fff; }

.btn--sm { height: var(--control-h-sm); padding: 0 var(--s-3); font-size: var(--fs-sm); gap: 6px; }
.btn--danger { background: var(--danger-soft); color: var(--danger-text); }
.btn--danger:hover { background: rgba(242, 85, 90, 0.22); }
.btn--danger-solid { background: var(--danger); color: #fff; }
.btn--danger-solid:hover { background: var(--danger-hover); }
.btn-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.panel--danger { padding-block: var(--s-4); }
.setting:first-child { border-top: 0; padding-top: 0; }
.inline-fields { font-size: var(--fs-sm); }
.inline-fields .field__input--sm { width: 96px; }
@media (max-width: 520px) {
  .search, .search .field__input--sm { width: 100%; }
}

.pill--live { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); }
.pill--draft { background: var(--secondary); color: var(--muted); }
.pill--ended { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger-text); }

.table-wrap { overflow-x: auto; margin: 0 -24px -24px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { padding: 10px 24px; color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; white-space: nowrap; box-shadow: inset 0 -1px 0 var(--line); }
.table th.num { text-align: right; }
.table td { padding: 12px 24px; vertical-align: middle; box-shadow: inset 0 -1px 0 var(--line); }
.table tbody tr:last-child td { box-shadow: none; }
.table tbody tr:hover td { background: color-mix(in srgb, #fff 2%, transparent); }
.table__link { font-weight: 600; }
.table__link:hover { color: var(--primary); }
.table__sub { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.table__end { text-align: right; white-space: nowrap; }
.table .note { max-width: 260px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
tr.is-banned td { opacity: .55; }

.who { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.who__avatar { flex: none; width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.who__avatar--letter { display: grid; place-items: center; background: var(--secondary); font-size: 12px; font-weight: 700; }
.who__name { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.who__provider { padding: 1px 6px; border-radius: 4px; background: var(--secondary); color: var(--muted); font-size: 11px; font-weight: 600; }
.who__provider--twitch { color: var(--brand-twitch); } .who__provider--kick { color: var(--brand-kick); } .who__provider--discord { color: var(--brand-discord); }

.list { display: flex; flex-direction: column; margin: 0 0 16px; padding: 0; list-style: none; }
.list__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; box-shadow: inset 0 -1px 0 var(--line); }
.list__row:last-child { box-shadow: none; }
.list__main { display: flex; flex-direction: column; min-width: 0; }
.points { font-weight: 700; font-variant-numeric: tabular-nums; }
.points--plus { color: var(--success); } .points--minus { color: var(--danger-text); }

.search .field__input--sm { width: 240px; max-width: 100%; }
.tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: var(--radius); background: var(--field); }
.tabs__tab:hover { color: var(--text); }
.tabs__tab { padding: 6px 12px; border-radius: 4px; color: var(--muted); font-size: 13px; font-weight: 600; }
.tabs__tab.is-on { background: var(--secondary-hover); color: var(--text); }
.tabs__count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 4px; padding: 0 5px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 11px; }

.items { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.item { box-shadow: inset 0 -1px 0 var(--line); }
.item:last-child { box-shadow: none; }
.item.is-off .item__text { opacity: .55; }
.item summary { display: flex; align-items: center; gap: 14px; padding: 12px 0; list-style: none; cursor: pointer; }
.item summary::-webkit-details-marker { display: none; }
.item__media { display: grid; place-items: center; flex: none; width: 42px; height: 42px; overflow: hidden; border-radius: var(--radius); background: var(--secondary); color: var(--muted); }
.item__media img { width: 100%; height: 100%; object-fit: cover; }
.item__text { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.item__edit { color: var(--muted); font-size: 13px; }
.item[open] .item__edit, .item summary:hover .item__edit { color: var(--text); }
.item__form { padding: 4px 0 18px; }

@media (max-width: 860px) {
  .comm-head { flex-direction: column; }
  .table th, .table td { padding-inline: 16px; }
  .table-wrap { margin-inline: -16px; }
  /* Scroll wide tables sideways instead of squeezing every cell. */
  .table { min-width: 640px; }
  .table .inline-form { flex-wrap: nowrap; }
}

/* ---------- Confirm dialog ---------- */
.modal {
  width: min(420px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-pop);
}
.modal::backdrop { background: rgba(0, 0, 0, 0.6); }
.modal[open], .int-dialog[open] { animation: modal-in .22s cubic-bezier(.2, .9, .3, 1.15); }
.modal[open]::backdrop, .int-dialog[open]::backdrop, .palette[open]::backdrop { animation: backdrop-in .2s ease-out; }
.modal.is-closing, .int-dialog.is-closing { animation: modal-out .16s cubic-bezier(.4, 0, 1, 1) forwards; pointer-events: none; }
.modal.is-closing::backdrop, .int-dialog.is-closing::backdrop, .palette.is-closing::backdrop { animation: backdrop-out .16s ease-in forwards; }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.95); } }
@keyframes modal-out { to { opacity: 0; transform: translateY(6px) scale(.96); } }
@keyframes backdrop-in { from { opacity: 0; } }
@keyframes backdrop-out { to { opacity: 0; } }
.palette.is-closing { animation: palette-out .12s ease-in forwards; pointer-events: none; }
@keyframes palette-out { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .modal[open], .int-dialog[open], .modal[open]::backdrop { animation: none; } }
.modal__body { padding: var(--s-6); }
.modal__title { margin: 0; font-size: var(--fs-lg); font-weight: 600; }
.modal__text { margin: var(--s-2) 0 var(--s-6); color: var(--muted); font-size: var(--fs-base); line-height: 1.6; }
.modal__actions { display: flex; justify-content: flex-end; gap: var(--s-2); }

/* ---------- Toasts (success messages after saving) ---------- */
.toasts {
  position: fixed;
  right: var(--s-6);
  bottom: var(--s-6);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  max-width: min(380px, calc(100vw - 32px));
}
.toast {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 260px;
  padding: 14px 14px 16px 16px;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: var(--secondary);
  color: var(--text);
  font-size: var(--fs-base);
  font-weight: 500;
  box-shadow: none;
  animation: toast-in .5s cubic-bezier(.34, 1.56, .64, 1) both;
}
.toast--success .toast__icon { color: var(--success); }
.toast--error .toast__icon { color: var(--danger); }
.toast__icon { display: grid; flex: none; }
.toast__text { flex: 1; min-width: 0; line-height: 1.4; }
.toast__close { flex: none; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--subtle); font-size: 18px; line-height: 1; cursor: pointer; }
.toast__close:hover { background: rgba(255, 255, 255, .06); color: var(--text); }
.toast__bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; border-radius: 0 3px 3px 0; background: var(--primary-hover); box-shadow: 0 0 10px var(--primary); transform-origin: left; animation: toast-timer linear forwards; }
.toast--error .toast__bar { background: var(--danger); box-shadow: 0 0 10px var(--danger); }
.toast:hover .toast__bar { animation-play-state: paused; }
.toast.is-leaving { animation: toast-out .45s cubic-bezier(.5, -0.4, .75, .1) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateX(-120%) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes toast-out { 0% { transform: none; } 25% { transform: scale(1.06); } 100% { opacity: 0; transform: translateX(130%) scale(.9); } }
@keyframes toast-timer { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (max-width: 520px) {
  .toasts { left: var(--s-4); right: var(--s-4); bottom: var(--s-4); max-width: none; }
}

/* ---------- Builder: live site + setup checklist ---------- */
.live__url { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.live__url .field__input { flex: 1; min-width: 220px; height: 40px; font-size: 14px; }
.live__url .btn { height: 40px; }
.checks { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; list-style: none; }
.checks__item { display: flex; gap: 14px; padding: 16px 0; box-shadow: inset 0 1px 0 var(--line); }
.checks__item p { margin: 2px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.checks__mark { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--secondary); color: var(--muted); font-size: 12px; font-weight: 700; }
.checks__item.is-ok .checks__mark { background: color-mix(in srgb, var(--success) 18%, transparent); color: var(--success); }
.checks__providers { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.provider { padding: 4px 10px; border-radius: 999px; background: var(--secondary); color: var(--muted); font-size: 12px; font-weight: 600; }
.provider.is-on { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); }
.live__links { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 14px 0 0; font-size: 12.5px; }
.live__links dt { color: var(--muted); }
.live__links dd { margin: 0; min-width: 0; }
.live__links code { display: inline-block; max-width: 100%; padding: 2px 6px; overflow-wrap: anywhere; border-radius: 4px; background: var(--field); font-size: 12px; user-select: all; }
.live__hint { margin: 4px 0 0; padding-top: 14px; color: var(--muted); font-size: 13px; box-shadow: inset 0 1px 0 var(--line); }

/* ---------- Casinos (integrations) ---------- */
.casino-list { display: flex; flex-direction: column; gap: 16px; }
.casino { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: 28px; align-items: start; }
.casino__main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.casino__head { display: flex; align-items: center; gap: 12px; }
.casino__head .panel__title { margin-right: auto; }
.casino__logo { display: grid; place-items: center; width: 96px; height: 40px; padding: 6px 10px; border-radius: var(--radius, 6px); background: var(--secondary); }
.casino__logo img { max-width: 100%; max-height: 22px; object-fit: contain; }
.casino__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.casino__facts div { min-width: 0; }
.casino__facts dt { color: var(--muted); font-size: 12px; }
.casino__facts dd { margin: 4px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.casino__error { margin: 0; padding: 10px 12px; border-radius: var(--radius, 6px); background: var(--danger-soft); color: var(--danger-text); font-size: 13px; }
.casino__form { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding-left: 28px; border-left: 1px solid var(--line); }
.casino__form .field { width: 100%; }
.casino__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.casino__actions form { margin: 0; }
.casino-soon { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.casino-soon li { display: flex; align-items: center; justify-content: center; gap: 10px; height: 52px; padding: 0 14px; border-radius: var(--radius, 6px); background: var(--secondary); color: var(--muted); font-size: 13px; font-weight: 500; }
.casino-soon img { height: 18px; max-width: 72px; object-fit: contain; opacity: .8; }
.casino-steps { margin: 0 0 10px; padding-left: 20px; color: var(--text); line-height: 1.8; }
.code-line { display: inline-block; padding: 6px 10px; border-radius: var(--radius, 6px); background: var(--secondary); font-size: 13px; }
.sync-tag { color: var(--success); }
.sync-tag--error { color: var(--danger-text); }
@media (max-width: 860px) {
  .casino { grid-template-columns: 1fr; gap: 20px; }
  .casino__form { padding-left: 0; padding-top: 20px; border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 560px) { .casino__facts { grid-template-columns: 1fr 1fr; } }

.players-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 18px; }
.players-bar .field { min-width: 170px; }
.players-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.players-stats span { display: block; color: var(--muted); font-size: 12px; }
.players-stats strong { display: block; margin-top: 4px; font-size: 18px; overflow-wrap: anywhere; }
.players-search { max-width: 360px; margin-bottom: 12px; }
@media (max-width: 560px) { .players-stats { grid-template-columns: 1fr 1fr; } }

/* ---------- Subscription page ---------- */
.pill--success { background: var(--success-soft); color: var(--success); }
.sub-row__price { font-weight: 700; white-space: nowrap; }
.sub-coin { display: inline-flex; align-items: center; gap: 10px; }
.sub-coin img { flex: none; border-radius: 50%; }
.sub-row__price small { margin-left: 2px; color: var(--muted); font-size: var(--fs-sm); font-weight: 500; }
.sub-switch { display: inline-flex; flex: none; padding: 3px; gap: 2px; background: var(--secondary); border-radius: var(--radius-lg); }
.sub-switch__opt { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border: 0; border-radius: var(--radius); background: transparent; color: var(--muted); font: inherit; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; transition: background .2s, color .2s; }
.sub-switch__opt:hover { color: var(--text); }
.sub-switch__opt.is-active { background: var(--primary); color: #fff; }
.sub-switch__save { padding: 1px 6px; border-radius: var(--radius-pill); background: var(--success-soft); color: var(--success); font-size: 11px; font-weight: 700; }
.sub-switch__opt.is-active .sub-switch__save { background: rgba(255, 255, 255, .22); color: #fff; }

.sub-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sub-card { display: flex; flex-direction: column; padding: 20px; background: var(--secondary); border-radius: var(--radius-lg, 12px); }
.sub-card.is-current { box-shadow: inset 0 0 0 2px var(--primary); }
.sub-card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sub-card__name { margin: 0; font-size: var(--fs-base); font-weight: 700; }
.sub-card__desc { min-height: 3em; margin: 6px 0 16px; color: var(--muted); font-size: var(--fs-sm); line-height: 1.5; }
.sub-card__price { display: flex; align-items: baseline; gap: 4px; }
.sub-card__amount { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; transition: opacity .15s, transform .15s; }
.sub-card__amount.is-changing { opacity: 0; transform: translateY(-5px); }
.sub-card__per { color: var(--muted); font-size: var(--fs-sm); }
.sub-card__billed { margin: 2px 0 0; color: var(--subtle); font-size: var(--fs-xs); }
.sub-card__list { display: grid; gap: 10px; flex: 1; margin: 16px 0 20px; padding: 16px 0 0; border-top: 1px solid var(--line); list-style: none; color: var(--text-soft); font-size: var(--fs-sm); }
.sub-card__list li { display: flex; align-items: flex-start; gap: 10px; }
.sub-card__list svg { flex: none; margin-top: 2px; color: var(--primary); }
.sub-card .btn--secondary { background: var(--secondary-hover); }

@media (max-width: 980px) {
  .sub-grid { grid-template-columns: minmax(0, 1fr); }
  .sub-card__desc { min-height: 0; }
}


/* =====================================================================
   Dashboard shell v2: same flat style, search topbar, collapsible sidebar
   ===================================================================== */
.sidebar__link { font-weight: 600; }
.account__chev { margin-left: auto; display: grid; color: var(--muted); }

.topbar__actions { gap: 10px; }
.topbar__search, .topbar__bell, .topbar__user {
  box-sizing: border-box; height: 38px; border: 0; border-radius: var(--radius-lg);
  background: var(--secondary); color: var(--muted);
  transition: border-color .15s, background-color .15s, color .15s;
}
.topbar__search:hover, .topbar__bell:hover, .topbar__user:hover { background: var(--secondary-hover); }
.topbar__search { display: flex; align-items: center; gap: 8px; width: 280px; padding: 0 8px 0 12px; cursor: pointer; font: inherit; text-align: left; }
.topbar__search-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--subtle); font-size: 13px; }
.topbar__search:focus-within { background: var(--secondary-hover); }
.topbar__search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 13px; }
.topbar__search input::placeholder { color: var(--subtle); }
.topbar__search kbd { padding: 1px 6px; border: 0; border-radius: var(--radius-sm); background: var(--field); color: var(--subtle); font: 600 11px var(--font); }
.topbar__bell { display: grid; place-items: center; width: 38px; padding: 0; cursor: pointer; }
.topbar__bell:hover { color: var(--text); }
.topbar__user { display: flex; align-items: center; gap: 8px; padding: 0 10px 0 5px; color: var(--text); font-weight: 600; font-size: 13px; }
.topbar__user svg { color: var(--muted); }
.topbar__avatar { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; background: var(--primary); color: var(--on-primary); font-size: 12px; font-weight: 700; }

@media (max-width: 860px) {
  .topbar__username { display: none; }
  .topbar__search { width: 38px; padding: 0; justify-content: center; }
  .topbar__search-text, .topbar__search kbd { display: none; }
}

/* ---------- Sidebar dropdown groups ---------- */
.sidebar__nav { gap: 2px; padding: 8px 10px 12px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.12) transparent; }
.sidebar__nav::-webkit-scrollbar { width: 6px; }
.sidebar__nav::-webkit-scrollbar-track { background: transparent; }
.sidebar__nav::-webkit-scrollbar-thumb { background: transparent; border-radius: 6px; }
.sidebar__nav:hover::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); }
.sidebar__nav::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.24); }
.sidebar__group { gap: 1px; padding: 0; }
.sidebar__link { height: 38px; padding: 0 12px; gap: 11px; font-weight: 600; font-size: 13.5px; }
.sidebar__link svg, .sidebar__toggle svg { flex: none; opacity: .85; }
.sidebar__link.is-active svg, .sidebar__link:hover svg, .sidebar__toggle:hover svg { opacity: 1; }
.sidebar__link.is-active { box-shadow: none; }
.sidebar__toggle {
  display: flex; align-items: center; gap: 11px; width: 100%; height: 38px; padding: 0 12px;
  border: 0; border-radius: var(--radius); background: transparent; color: var(--muted);
  font: inherit; font-size: 13.5px; font-weight: 600; text-align: left; cursor: pointer;
  transition: background .15s, color .15s;
}
.sidebar__toggle:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.sidebar__toggle:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--primary); }
.sidebar__group--drop.is-open > .sidebar__toggle { color: var(--text); }
.sidebar__chev { display: grid; color: var(--subtle); transition: transform .3s var(--ease), color .15s; }
.sidebar__toggle:hover .sidebar__chev { color: var(--muted); }
.sidebar__group--drop.is-open .sidebar__chev { transform: rotate(180deg); }

/* Smooth open/close: animate the row track between 0fr and 1fr. */
.sidebar__sub { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .3s var(--ease), opacity .2s ease; margin-left: 20px; }
.sidebar__group--drop.is-open .sidebar__sub { grid-template-rows: 1fr; opacity: 1; }
.sidebar__sub-inner { position: relative; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 1px; padding: 2px 0 4px 14px; }
.sidebar__sub-inner::before { content: ""; position: absolute; left: 0; top: 0; bottom: 18px; width: 1px; background: rgba(255, 255, 255, .14); }
.sidebar__sub .sidebar__link { position: relative; height: 34px; padding: 0 10px; font-size: 13px; font-weight: 500; gap: 10px; }
.sidebar__sub .sidebar__link svg { width: 15px; height: 15px; }
.sidebar__sub .sidebar__link::before { content: ""; position: absolute; left: -14px; top: 50%; width: 9px; height: 1px; background: rgba(255, 255, 255, .14); }
.sidebar__sub .sidebar__link.is-active { font-weight: 600; }
.sidebar__sub .sidebar__link.is-active::after {
  content: ""; position: absolute; left: -15px; top: 7px; bottom: 7px; width: 2px; border-radius: 2px; background: var(--primary);
}
.sidebar__sub .sidebar__tag { padding: 1px 5px; font-size: 10px; letter-spacing: .02em; background: transparent; color: var(--subtle); box-shadow: inset 0 0 0 1px var(--border); }
.sidebar__group + .sidebar__group, .sidebar__group--drop + .sidebar__group--drop { border-top: 0; }
@media (prefers-reduced-motion: reduce) { .sidebar__sub, .sidebar__chev { transition: none; } }
.sidebar__group--drop:not(.is-open) .sidebar__sub { visibility: hidden; transition: grid-template-rows .3s var(--ease), opacity .2s ease, visibility 0s .3s; }

/* Stop the sidebar's scroll from chaining into the page, and keep its height steady. */
.sidebar { height: 100vh; height: 100dvh; align-self: flex-start; contain: layout paint; }
.sidebar__nav { overscroll-behavior: contain; scrollbar-gutter: stable; }

/* ---- Mini games (dashboard) ---- */
.gm-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s-3); margin: 0 0 var(--s-4); }
.gm-kpi { padding: 14px 16px; border-radius: var(--radius-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.gm-kpi span { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.gm-kpi strong { display: block; margin-top: 4px; font-size: 22px; font-variant-numeric: tabular-nums; }
.gm-pos { color: var(--success); } .gm-neg { color: var(--danger-text, var(--danger-text)); }
.table tr.is-picked { background: var(--primary-soft); }
.gm-section { margin-top: var(--s-5); }
.gm-logo-row { display: flex; gap: 8px; }
.gm-logo-row > .field__input { flex: 1; min-width: 0; }
.gm-logo-row > .field { flex: 1; min-width: 0; }
.gm-colors { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--s-3); }
.gm-color { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; cursor: pointer; }
.gm-color input[type=color] { flex: none; width: 46px; height: 38px; padding: 2px; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--field); cursor: pointer; }
[data-colors].is-site .gm-color { opacity: .5; }
.gm-preview { display: grid; grid-template-columns: 38% 1fr; grid-template-rows: 1fr auto; min-height: 240px; border-radius: 10px; overflow: hidden; background: var(--pv-page); color: var(--pv-text); }
.gm-preview__side { display: flex; flex-direction: column; gap: 10px; padding: 16px; background: var(--pv-panel); box-shadow: inset -1px 0 0 color-mix(in srgb, var(--pv-text) 10%, transparent); }
.gm-preview__tab, .gm-preview__field { height: 30px; border-radius: 6px; background: color-mix(in srgb, var(--pv-panel) 90%, var(--pv-text) 10%); }
.gm-preview__btn { margin-top: auto; display: grid; place-items: center; height: 38px; border-radius: 6px; background: var(--pv-primary); color: #fff; font-weight: 700; font-size: 13px; }
.gm-preview__main { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px; background: var(--pv-panel); }
.gm-preview__card { width: 52px; height: 76px; border-radius: 6px; background: #fff; }
.gm-preview__card--b { background: var(--pv-primary); box-shadow: inset 0 0 0 3px #fff; }
.gm-preview__foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; height: 44px; background: var(--pv-panel); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--pv-text) 10%, transparent); }
.gm-preview__foot img { max-height: 24px; max-width: 160px; object-fit: contain; }
.gm-preview__foot strong { font-size: 15px; opacity: .8; }
.gm-check { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }


/* =====================================================================
   Dashboard polish: one centred column, quiet bordered panels, tidy header
   ===================================================================== */
.app__content { max-width: 1080px; margin: 0 auto; padding: 40px 32px 64px; gap: 20px; }
.panel { padding: 24px 28px; background: var(--surface); border: 0; border-radius: 12px; }
.panel__head { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.panel__title { font-size: var(--fs-md); font-weight: 600; letter-spacing: -0.01em; }
.panel__sub { margin-top: 2px; }
.dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.page-head__title, .welcome__title { font-size: 24px; letter-spacing: -0.025em; }
.topbar { padding: 0 40px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); }
.sidebar__link.is-active { background: var(--primary-soft); }
.sidebar__link.is-active, .sidebar__link.is-active svg { color: var(--primary-text); }
.pill { padding: 2px 9px; font-size: 12px; font-weight: 600; background: var(--secondary); color: var(--muted); border: 0; }
.pill--primary { background: var(--primary-soft); color: var(--primary-text); border-color: transparent; }
.btn { border-radius: 8px; font-weight: 600; }
.btn--secondary { background: var(--secondary); border: 0; color: var(--on-secondary); }
.btn--secondary:hover { background: var(--secondary-hover); }
.field__input, input.field__input, select.field__input, textarea.field__input { border-radius: 8px; }

/* Builder overview */
.launch { display: block; padding: 28px 32px; border: 0; border-radius: 12px; background: var(--surface); }
.launch__body { align-items: stretch; gap: 12px; padding: 0; }
.launch__name { margin: 0; font-size: 28px; }
.launch__facts { gap: 0; margin: 12px 0 4px; border: 0; border-radius: 8px; background: var(--secondary); }
.launch__facts > div { flex: 1 1 140px; padding: 14px 18px; border-left: 1px solid var(--line); }
.launch__facts > div:first-child { border-left: 0; }
.launch__facts dd { font-size: 16px; }
.launch__actions { margin-top: 8px; }
.launch__pages li { padding: 12px 0; }
.launch__feature-icon { border-radius: 8px; }
.live__url { display: flex; gap: 8px; }
@media (max-width: 760px) {
  .app__content { padding: 24px 16px 48px; }
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .topbar { padding: 0 16px; }
}

/* ---- Discord Bot pages ---- */
[data-tab-panel][hidden] { display: none !important; }
.bot-tabs { display: flex; gap: 24px; flex-wrap: wrap; margin: 8px 0 24px; max-width: 100%; box-shadow: inset 0 -1px 0 var(--line); }
.bot-tab { appearance: none; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: var(--fs-base); font-weight: 600; padding: 10px 2px 12px; cursor: pointer; position: relative; }
.bot-tab:hover { color: var(--text); }
.bot-tab.is-active { color: var(--text); }
.bot-tab.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--primary); }   /* until tabslider.js adds the sliding bar */
.bot-tabs { position: relative; }
.bot-tabs.has-bar .bot-tab.is-active::after { content: none; }
.bot-tabs__bar { position: absolute; left: 0; top: 0; height: 2px; border-radius: 2px; background: var(--primary); pointer-events: none; transition: transform .28s cubic-bezier(.4, 0, .2, 1), width .28s cubic-bezier(.4, 0, .2, 1), opacity .15s; }
@media (prefers-reduced-motion: reduce) { .bot-tabs__bar { transition: none; } }
.bot-list { display: grid; gap: 8px; }
.bot-row { display: flex; align-items: center; gap: 16px; padding: 14px 18px; background: var(--secondary); border-radius: var(--radius-lg, 12px); }
.bot-row__name { font-weight: 700; min-width: 120px; }
.bot-row__meta { color: var(--muted); font-size: var(--fs-sm); flex: 1; min-width: 0; }
.bot-row__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bot-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; margin-right: 4px; }
.modal--wide { width: min(540px, calc(100vw - 32px)); }
.modal--wide .modal__body { max-height: min(80vh, 720px); overflow: auto; }
.modal__sub { margin: 4px 0 var(--s-4); color: var(--muted); font-size: var(--fs-sm); line-height: 1.5; }
@media (max-width: 640px) { .bot-row { flex-wrap: wrap; } .bot-row__meta { flex-basis: 100%; order: 3; } }

/* ---- step-by-step forms (data-wizard) ---- */
.table tbody tr.table__empty:hover td { background: transparent; }
.table tbody tr.table__empty td { color: var(--muted); }
[data-step][hidden] { display: none !important; }
.wiz-steps { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; }
.wiz-step { display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border: 0; border-radius: 999px; background: var(--secondary); color: var(--muted); font: 600 13px var(--font); cursor: pointer; }
.wiz-step:hover { color: var(--text); }
.wiz-num { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(255, 255, 255, .08); font-size: 12px; }
.wiz-step.is-active { background: var(--primary-soft); color: var(--primary-text); }
.wiz-step.is-active .wiz-num { background: var(--primary); color: #fff; }
.wiz-step.is-done .wiz-num { background: var(--success-soft); color: var(--success); }
.wiz-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 28px; }
.wiz-foot [hidden] { display: none !important; }

/* ---- Website pages ---- */
.webbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 8px; padding: 12px 16px; border-radius: 12px; background: var(--surface); }
.web-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 900px) { .web-two { grid-template-columns: 1fr; } }
.web-checks { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.web-checks li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; font-size: var(--fs-base); }
.web-checks li:hover { background: var(--secondary); }
.web-checks__dot { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 800; }
.web-checks .is-ok .web-checks__dot { background: var(--success-soft); color: var(--success); }
.web-checks .is-bad .web-checks__dot { background: var(--warning-soft); color: var(--warning); }
.web-checks .is-bad { color: var(--text); }
.web-seo-page { padding: 16px 0 18px; }
.web-seo-page + .web-seo-page { box-shadow: inset 0 1px 0 var(--line); }
.web-seo-page__head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.web-seo-page__head code { color: var(--muted); }
.field__label small { margin-left: 6px; color: var(--muted); font-weight: 600; }
.field__label small.is-warn { color: var(--warning); }
.serp { margin-top: 12px; padding: 16px 18px; border-radius: 12px; background: #fff; color: #202124; font-family: Arial, sans-serif; }
.serp--small { padding: 12px 16px; }
.serp__url { color: #4d5156; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.serp__title { margin: 2px 0; color: #1a0dab; font-size: 19px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.serp__desc { color: #4d5156; font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.social-card { margin-top: 14px; overflow: hidden; border-radius: 12px; background: var(--secondary); }
.social-card img, .social-card__empty { display: block; width: 100%; aspect-ratio: 1.91 / 1; object-fit: cover; }
.social-card__empty { display: grid; place-items: center; background: var(--surface-hover); color: var(--muted); font-size: var(--fs-sm); }
.social-card__body { padding: 12px 16px 14px; }
.social-card__site { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.social-card__title { margin-top: 2px; font-weight: 700; }
.social-card__desc { margin-top: 2px; color: var(--muted); font-size: var(--fs-sm); }

.web-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.web-preset { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 14px; background: var(--surface); }
.web-preset.is-active { background: var(--primary-soft); }
.web-preset__swatch { height: 64px; border-radius: 10px; }
.web-preset__desc { flex: 1; color: var(--muted); font-size: var(--fs-sm); line-height: 1.45; }
.web-palettes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 20px; }
.web-palette { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 0; border-radius: 12px; background: var(--secondary); color: var(--text); font: 600 13px var(--font); text-align: left; cursor: pointer; }
.web-palette:hover { background: var(--secondary-hover); }
.web-palette__bar { display: flex; height: 22px; overflow: hidden; border-radius: 6px; }
.web-palette__bar i { flex: 1; }

.rg { display: flex; align-items: center; gap: 14px; height: var(--control-h-lg, 44px); }
.rg input[type=range] { flex: 1; min-width: 0; height: 6px; appearance: none; border-radius: 6px; cursor: pointer;
  background: linear-gradient(to right, var(--primary) var(--pct, 50%), var(--secondary) var(--pct, 50%)); }
.rg input[type=range]::-webkit-slider-thumb { appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.rg input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.rg-out { min-width: 52px; padding: 4px 8px; border-radius: 8px; background: var(--field); color: var(--text); font-size: var(--fs-sm); font-weight: 600; text-align: center; }

.dropzone { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 34px 20px; border-radius: 16px; background: var(--surface); text-align: center; cursor: pointer; transition: background-color .15s, box-shadow .15s; }
.dropzone:hover, .dropzone.is-over { background: var(--primary-soft); }
.dropzone.is-over { box-shadow: 0 0 0 2px var(--primary); }
.dropzone__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--secondary); color: var(--primary); }
.dropzone__status { min-height: 18px; color: var(--muted); font-size: var(--fs-sm); }
.dropzone__status.is-error { color: var(--danger-text); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.media-card { position: relative; overflow: hidden; border-radius: 14px; background: var(--surface); transition: background-color .15s; }
.media-card.is-selected { background: var(--primary-soft); box-shadow: 0 0 0 2px var(--primary); }
.media-card[hidden] { display: none; }
.media-card__img { display: block; aspect-ratio: 4 / 3; background: repeating-conic-gradient(var(--secondary-hover) 0 25%, var(--secondary) 0 50%) 0 0 / 16px 16px; }
.media-card__img img { display: block; width: 100%; height: 100%; object-fit: contain; }
.media-card__meta { display: grid; gap: 4px; padding: 10px 12px 12px; }
.media-card__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-sm); font-weight: 600; }
.media-card__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.media-card__check { position: absolute; z-index: 1; top: 10px; left: 10px; cursor: pointer; }
.media-card__check input { position: absolute; opacity: 0; inset: 0; }
.media-card__check span { display: block; width: 22px; height: 22px; border-radius: 7px; background: rgba(15, 16, 20, .75); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5); backdrop-filter: blur(4px); }
.media-card__check input:checked + span { background: var(--primary); box-shadow: none; }
.media-card__check input:checked + span::after { content: ""; display: block; width: 6px; height: 11px; margin: 3px 0 0 8px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg); }
.web-search { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 8px; background: var(--secondary); color: var(--muted); }
.web-search input { width: 150px; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: var(--fs-sm); }
.web-chip { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 8px; background: var(--secondary); color: var(--text); font-size: var(--fs-sm); font-weight: 600; cursor: pointer; }

.domain-steps { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.domain-steps li { display: flex; gap: 16px; padding: 14px 4px; }
.domain-steps__n { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--secondary); color: var(--muted); font-weight: 800; font-size: 13px; }
.domain-steps .is-done .domain-steps__n { background: var(--success-soft); color: var(--success); }
.domain-steps p { margin: 4px 0 0; }

.bot-row .btn--secondary { background: rgba(255, 255, 255, .07); }
.bot-row .btn--secondary:hover { background: rgba(255, 255, 255, .13); }
.web-row { flex-wrap: wrap; align-items: center; }
.web-row__main { flex: 1 1 240px; min-width: 0; }
.web-row__main .bot-row__name { min-width: 0; }
.web-row__sub { display: block; margin-top: 3px; color: var(--muted); font-size: var(--fs-sm); }
.web-row__sub code { color: var(--text); }

.dropzone.is-off { opacity: .5; pointer-events: none; }

/* ---- page search (Ctrl/Cmd+K), centered ---- */
.palette { position: fixed; inset: auto; left: 50%; top: max(10vh, calc(50vh - 250px)); transform: translateX(-50%); margin: 0; padding: 0; width: min(620px, calc(100vw - 32px));
  border: 0; border-radius: var(--radius-lg); background: var(--surface); color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); overflow: hidden; }
.palette[open] { animation: palette-in .16s cubic-bezier(.22, 1, .36, 1); }
.palette::backdrop { background: rgba(8, 9, 12, .62); backdrop-filter: blur(3px); }
@keyframes palette-in { from { opacity: 0; transform: translateX(-50%) translateY(8px) scale(.985); } }
.palette__head { display: flex; align-items: center; gap: 12px; padding: 0 18px; height: 58px; color: var(--muted); box-shadow: inset 0 -1px 0 var(--line); }
.palette__input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font: 500 16px var(--font); }
.palette__input::placeholder { color: var(--subtle); }
.palette kbd { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-right: 4px; padding: 0 6px; border: 0; border-radius: var(--radius-sm); background: var(--secondary); color: var(--muted); font: 600 11px var(--font); }
.palette__list { max-height: 380px; min-height: 120px; overflow-y: auto; padding: 8px; scrollbar-width: thin; }
.palette__label { padding: 10px 12px 6px; color: var(--subtle); font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.palette__item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; border: 0; border-radius: var(--radius); background: transparent; color: var(--text); font: 500 14px var(--font); text-align: left; cursor: pointer; }
.palette__item.is-active { background: var(--secondary); }
.palette__icon { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: var(--radius); background: var(--secondary); color: var(--muted); }
.palette__item.is-active .palette__icon { background: var(--primary-soft); color: var(--primary-text); }
.palette__text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette__text mark { background: transparent; color: var(--primary-text); font-weight: 700; }
.palette__group { flex: none; color: var(--subtle); font-size: 12px; }
.palette__tag { flex: none; padding: 1px 7px; border-radius: var(--radius-sm); background: var(--secondary); color: var(--muted); font-size: 11px; font-weight: 600; }
.palette__enter { flex: none; color: var(--subtle); opacity: 0; font-size: 13px; }
.palette__item.is-active .palette__enter { opacity: 1; }
.palette__empty { padding: 36px 16px; color: var(--muted); text-align: center; font-size: 14px; }
.palette__foot { display: flex; gap: 18px; padding: 10px 18px; color: var(--subtle); font-size: 12px; box-shadow: inset 0 1px 0 var(--line); }
@media (max-width: 640px) { .palette { top: 8vh; } .palette__group, .palette__foot { display: none; } }
@media (prefers-reduced-motion: reduce) { .palette[open] { animation: none; } }

/* the page behind an open pop-up doesn't scroll; the pop-up's own lists still do (and don't pass their scrolling on to the page) */
html.has-modal { overflow: hidden; }      /* only <html>: with <body> hidden too, the page's scroll offset resets and the sticky sidebar scrolls out of view */
.palette__list, .modal--wide .modal__body, .cs-pop { overscroll-behavior: contain; }

/* thin progress bar along the top while a page loads */
.navbar { position: fixed; top: 0; left: 0; height: 2px; width: 0; background: var(--primary); z-index: 100; opacity: 0; pointer-events: none; }
.navbar.is-loading { opacity: 1; width: 70%; transition: width 8s cubic-bezier(.1, .8, .2, 1); }
.navbar.is-done { opacity: 0; width: 100%; transition: width .15s ease, opacity .3s ease .15s; }

/* ---------- Integrations ---------- */
.int__bar { margin-bottom: var(--s-2); }
.int__search { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 420px; height: 38px; padding: 0 12px; box-sizing: border-box; border-radius: var(--radius-lg); background: var(--secondary); color: var(--muted); cursor: text; }
.int__search:hover, .int__search:focus-within { background: var(--secondary-hover); }
.int__search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 13px; }
.int__search input::placeholder { color: var(--subtle); }
.int__search input::-webkit-search-cancel-button { appearance: none; }
.int__group { margin-bottom: var(--s-6); }
.int__group-title { font-size: 1rem; margin: 0 0 var(--s-3); display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-3); }
.int__group-title span { font-size: var(--fs-sm); font-weight: 400; color: var(--muted); }
.int__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s-3); }
.int-card { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: var(--s-3); row-gap: 2px; align-items: center; text-align: left; width: 100%; padding: var(--s-4); background: var(--surface); color: var(--text); border: 0; border-radius: 10px; cursor: pointer; font: inherit; }
.int-card:hover { background: var(--surface-hover); }
.int-card[hidden], .int__group[hidden] { display: none; }
.int-card__logo { --brand: var(--primary); grid-row: 1 / 3; align-self: start; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--brand); }
.int-card__mark { --mark: none; width: 22px; height: 22px; background: currentColor; -webkit-mask: var(--mark) center / contain no-repeat; mask: var(--mark) center / contain no-repeat; }
.int-card__name { grid-column: 2; align-self: end; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.int-card__state { grid-column: 3; align-self: end; }
.int-card__desc { grid-column: 2 / 4; align-self: start; font-size: var(--fs-sm); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.int__none { color: var(--muted); text-align: center; padding: var(--s-6) 0; }
.int-dialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: 10px; background: var(--surface); color: var(--text); box-shadow: 0 24px 70px rgba(0, 0, 0, .55); }
.int-dialog::backdrop { background: rgba(5, 6, 9, .65); }
.int-dialog__form { padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-4); }
.int-dialog__head { display: flex; gap: var(--s-3); align-items: flex-start; }
.int-dialog__head > div { flex: 1; min-width: 0; }
.int-dialog__note { margin: 0; padding: var(--s-3) var(--s-4); border-radius: var(--radius); background: var(--secondary); color: var(--muted); font-size: var(--fs-sm); }
.int-dialog__foot { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
.int-dialog__spacer { flex: 1; }
.web-row__main .pill { margin-left: 8px; }
.web-note { margin-top: var(--s-4); }

/* Leaderboard manage page */
[data-tab-panel].stack { gap: 20px; }
[data-tab-panel] .casino__facts { border: 0; padding: 0 0 4px; }
[data-tab-panel] .panel .casino__error { margin: 12px 0 0; padding: 12px 14px; }
[data-tab-panel] .panel .casino__error + form, [data-tab-panel] .panel .casino__facts + form { margin-top: 16px; }
[data-tab-panel] .players-bar { align-items: flex-end; margin-bottom: 20px; }
[data-tab-panel] .players-bar .players-search { margin: 0; flex: 1 1 240px; max-width: 360px; }
.table-wrap { margin: 0 -28px -24px; }
.table-wrap .table th:first-child, .table-wrap .table td:first-child { padding-left: 28px; }
.table-wrap .table th:last-child, .table-wrap .table td:last-child { padding-right: 28px; }

.lb-narrow { max-width: 760px; }
.lb-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.lb-form > .field:first-child, .lb-form > .field:has(textarea), .lb-form > .form-grid__actions { grid-column: 1 / -1; }
.lb-form .field__input--area, .lb-import .field__input--area { height: auto; min-height: 110px; resize: vertical; }
@media (max-width: 560px) { .lb-form { grid-template-columns: 1fr; } }
.lb-import { display: grid; gap: 18px; }
.lb-import .btn--primary { justify-self: start; }
.lb-seg { display: inline-flex; flex-wrap: nowrap; gap: 4px; padding: 4px; background: var(--bg, #0f0f12); border-radius: 10px; justify-self: start; }
.lb-seg label { padding: 8px 14px; border-radius: 7px; color: var(--muted); font-weight: 600; }
.lb-seg label:has(input:checked) { background: rgba(255, 255, 255, .09); color: var(--text); }
.lb-seg input { position: absolute; opacity: 0; pointer-events: none; }
/* Tab panels space their children the same way everywhere (low specificity: layout classes like .web-two still win). */
:where([data-tab-panel]:not([hidden], .panel, .stack)) { display: flex; flex-direction: column; gap: 20px; }
/* Small pieces that had no styles */
.locked__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.live__url { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.live__url .field__input { flex: 1 1 260px; min-width: 0; }
.live__links { display: grid; gap: 8px; margin: 0; }
.live__hint { margin: 16px 0 0; color: var(--muted); font-size: var(--fs-sm); }
.webbar__state { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
.tx-file__icon { flex: none; }
.bot-summary { display: grid; gap: 16px; }

/* Page-level panels follow the content column's gap; no leftover per-page margins. */
.app__content > .panel, .app__content > section, .app__content > form.panel { margin-top: 0 !important; }
.domain-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.domain-form .field { flex: 1 1 280px; min-width: 0; }
/* One form grid everywhere: two even columns, one on phones. */
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.points { font-weight: 700; font-variant-numeric: tabular-nums; }

.domain-form { row-gap: 14px; }
.domain-form .btn { flex: none; }
.domain-steps .table-wrap { margin: 12px 0 0; }
.domain-steps .table th, .domain-steps .table td { padding: 12px 16px; }
.domain-steps .table tbody tr:hover td { background: transparent; }
.domain-steps .table td code { font-size: 13px; }
.domain-steps li > div { flex: 1; min-width: 0; }
.panel form + .btn-row, .panel .field + .btn { margin-top: 12px; }
/* Status pills: On / Online / Live are green (declared last so the base .pill rule can't flatten them). */
.pill.pill--live, .pill.pill--success { background: var(--success-soft); color: var(--success); }
.pill.pill--live::before { background: var(--success); }

.gm-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gm-thumb { display: grid; place-items: center; flex: none; width: 48px; height: 64px; border-radius: 8px; background: var(--field); overflow: hidden; margin-right: 4px; }
.gm-thumb--logo { width: 96px; height: 48px; }
.gm-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gm-thumb--logo img { object-fit: contain; padding: 4px; }
.gm-thumb--row { width: 30px; height: 40px; margin: -6px 0; vertical-align: middle; }
.field[hidden], .gm-upload[hidden] { display: none !important; }

/* One checkbox and radio style everywhere. :where() keeps this at zero specificity, so controls a page hides or restyles itself (switches, chips, cards) are left alone. */
:where(input[type="checkbox"]:not(.switch), input[type="radio"]) {
  appearance: none; -webkit-appearance: none; flex: none; width: 18px; height: 18px; margin: 0; cursor: pointer;
  background: var(--field) center / 12px 12px no-repeat; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--muted) 45%, transparent);
  transition: background-color .15s, box-shadow .15s;
}
:where(input[type="checkbox"]:not(.switch)) { border-radius: 5px; }
:where(input[type="radio"]) { border-radius: 50%; }
:where(input[type="checkbox"]:not(.switch):hover, input[type="radio"]:hover) { box-shadow: inset 0 0 0 1.5px var(--muted); }
:where(input[type="checkbox"]:not(.switch):checked) {
  background-color: var(--primary); box-shadow: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2.5 6.3 2.4 2.4 4.6-5'/%3E%3C/svg%3E");
}
:where(input[type="radio"]:checked) {
  background-color: var(--primary); box-shadow: none;
  background-image: radial-gradient(circle, #fff 0 3.5px, transparent 4px);
}
:where(input[type="checkbox"]:not(.switch):focus-visible, input[type="radio"]:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
:where(input[type="checkbox"]:not(.switch):disabled, input[type="radio"]:disabled) { opacity: .5; cursor: not-allowed; }
.radio-row input { accent-color: initial; }

/* ---- Overview: stat cards + setup board ---- */
.ov-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.ov-stat { display: flex; flex-direction: column; padding: 6px; background: var(--surface); border-radius: 14px; color: var(--text); transition: background .2s; }
.ov-stat:hover { background: var(--surface-hover); }
.ov-stat:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.ov-stat__body { display: flex; flex-direction: column; gap: 14px; padding: 16px; background: var(--secondary); border-radius: 10px; }
.ov-stat__top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ov-stat__icon { display: grid; flex: none; color: var(--muted); }
.ov-stat__label { color: var(--muted); font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-stat__num { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ov-stat__num b { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.ov-badge { padding: 2px 8px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 600; white-space: nowrap; }
.ov-badge--live { background: var(--success-soft); color: var(--success); }
.ov-badge--warn { background: var(--warning-soft); color: var(--warning); }
.ov-stat__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 10px 8px; color: var(--muted); font-size: var(--fs-sm); }
.ov-stat__foot span { min-width: 0; line-height: 1.4; }
.ov-stat__foot svg { flex: none; transition: transform .2s; }
.ov-stat:hover .ov-stat__foot { color: var(--text); }
.ov-stat:hover .ov-stat__foot svg { transform: translateX(3px); }

.ov-section { display: flex; align-items: center; gap: 14px; margin: 40px 0 20px; }
.ov-section__icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 10px; background: var(--surface); color: var(--text-soft); }
.ov-section__title { margin: 0; font-size: var(--fs-xl); font-weight: 700; letter-spacing: -0.02em; }
.ov-section__sub { margin: 2px 0 0; color: var(--muted); font-size: var(--fs-sm); }

.ov-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: start; }
.ov-col { display: grid; gap: 8px; padding: 8px; background: var(--surface); border-radius: 14px; }
.ov-col__head { display: flex; align-items: center; gap: 10px; min-height: 28px; padding: 6px 8px 8px; box-sizing: content-box; }
.ov-col__name { font-size: var(--fs-base); font-weight: 600; }
.ov-col__count { color: var(--subtle); font-size: var(--fs-sm); font-weight: 600; }
.ov-col__add { display: grid; place-items: center; width: 28px; height: 28px; margin-left: auto; border-radius: var(--radius); color: var(--muted); transition: background .15s, color .15s; }
.ov-col__add:hover { background: var(--secondary); color: var(--text); }
.ov-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--subtle); }
.ov-dot--live { background: var(--success); }
.ov-dot--warn { background: var(--warning); }
.ov-dot--violet { background: var(--accent-violet-light); }
.ov-dot--primary { background: var(--primary); }
.ov-dot--off { background: var(--danger); }

.ov-card { padding: 16px; background: var(--secondary); border-radius: 10px; min-width: 0; }
.ov-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ov-card__title { margin: 0; color: var(--text); font-size: var(--fs-base); font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.ov-card__more { display: grid; place-items: center; flex: none; width: 26px; height: 26px; margin: -4px -6px 0 0; border-radius: var(--radius); color: var(--muted); transition: background .15s, color .15s; }
.ov-card__more:hover { background: var(--secondary-hover); color: var(--text); }
.ov-card__text { margin: 6px 0 0; color: var(--muted); font-size: var(--fs-sm); line-height: 1.5; }
.ov-card--link { display: block; color: inherit; transition: background .15s; }
.ov-card--link:hover { background: var(--secondary-hover); }
.ov-card--link:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.ov-card--row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; }
.ov-card__count { font-size: var(--fs-base); font-weight: 700; font-variant-numeric: tabular-nums; }
.ov-empty { margin: 0; padding: 18px 12px; border-radius: 10px; background: var(--secondary); color: var(--subtle); font-size: var(--fs-sm); text-align: center; }
.ov-bot { display: flex; align-items: center; gap: 8px; }
.ov-bot img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.ov-bot__mark { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--secondary-hover); color: var(--brand-discord); }
.ov-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-hover); }
.ov-meta { display: inline-flex; flex-wrap: wrap; align-items: flex-start; gap: 2px 6px; min-width: 0; color: var(--muted); font-size: var(--fs-xs); line-height: 1.45; }
.ov-meta svg { flex: none; margin-top: 1px; color: var(--subtle); }
.ov-meta b { white-space: nowrap; }
.ov-meta b { color: var(--text-soft); font-weight: 600; }
.ov-chip { display: inline-flex; align-items: center; gap: 5px; flex: none; padding: 2px 8px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 600; }
.ov-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ov-chip--live { background: var(--success-soft); color: var(--success); }
.ov-chip--warn { background: var(--warning-soft); color: var(--warning); }
.ov-chip--draft { background: var(--secondary-hover); color: var(--muted); }
.ov-chip--off { background: var(--danger-soft); color: var(--danger-text); }

.ov-url { display: flex; align-items: center; gap: 6px; margin-top: 12px; padding: 4px 4px 4px 10px; background: var(--field); border-radius: var(--radius); }
.ov-url span { flex: 1; min-width: 0; color: var(--text-soft); font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-url__copy { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--muted); cursor: pointer; }
.ov-url__copy:hover { background: var(--secondary); color: var(--text); }

.ov-swatches { display: flex; gap: 6px; margin-top: 10px; }
.ov-swatch { width: 28px; height: 28px; border-radius: var(--radius); background: var(--swatch); box-shadow: inset 0 0 0 1px var(--border-strong); }
.ov-favicon { width: 20px; height: 20px; border-radius: var(--radius-sm); object-fit: contain; }
.ov-logo { display: block; max-width: 100%; max-height: 28px; object-fit: contain; }

.ov-add { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px; border: 1px dashed var(--line-strong); border-radius: 10px; color: var(--muted); font-size: var(--fs-sm); font-weight: 500; transition: color .15s, border-color .15s, background .15s; }
.ov-add:hover { color: var(--text); border-color: var(--muted); background: var(--surface-hover); }
.ov-add--primary { color: var(--primary-text); border-color: color-mix(in srgb, var(--primary) 55%, transparent); }
.ov-add--primary:hover { color: var(--primary-text-light); border-color: var(--primary); background: var(--primary-soft); }

@media (max-width: 1280px) {
  .ov-stats, .ov-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .ov-stats, .ov-board { grid-template-columns: minmax(0, 1fr); }
  .ov-section { margin-top: 28px; }
}

/* ---------------------------------------------------------------- Bonus Hunt (hunt.js) */
.bh-head > div:first-child { flex: 1 1 auto; min-width: 0; }
.bh-head .btn-row { flex: none; flex-wrap: nowrap; align-items: center; gap: 10px; }
@media (max-width: 760px) { .bh-head { flex-direction: column; } .bh-head .btn-row { flex-wrap: wrap; justify-content: flex-start; } }
.bh-back { display: inline-block; margin-bottom: 10px; color: var(--muted); font-size: var(--fs-sm); }
.bh-back:hover { color: var(--text); }
.bh-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 20px; }
.bh-kpis .gm-kpi { min-width: 0; }
.bh-kpis .gm-kpi span, .bh-kpis .gm-kpi strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bh-kpis .gm-kpi strong { font-size: 22px; }
@media (max-width: 640px) { .bh-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bh-kpis .gm-kpi strong { font-size: 18px; } }
.bh-empty[hidden] { display: none; }
.bh-empty { padding-top: var(--s-6); }
.bh-thumb { display: grid; place-items: center; flex: none; width: 34px; height: 44px; overflow: hidden; border-radius: var(--radius-sm); background: var(--surface); color: var(--subtle); }
.bh-thumb img { width: 100%; height: 100%; object-fit: cover; }
.bh-thumb--lg { width: 54px; height: 72px; border-radius: var(--radius); }
.bh-upload { display: flex; align-items: center; gap: 12px; }
.bh-panel .panel__head { align-items: center; }
.bh-table td { padding-top: 8px; padding-bottom: 8px; }
.bh-table .bh-col-n { width: 44px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bh-slot { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.bh-slot__text { display: flex; flex-direction: column; min-width: 0; }
.bh-slot__text strong { font-weight: 600; }
.bh-slot__text span { color: var(--muted); font-size: 12px; }
.bh-num { width: 110px; text-align: right; font-variant-numeric: tabular-nums; }
.bh-x { width: 80px; }
.bh-table tr.is-open .bh-win, .bh-table tr.is-open .bh-x { color: var(--text); }
.bh-table tr.is-best td { background: var(--success-soft); }
.bh-table tr.is-best .bh-x { color: var(--success); font-weight: 700; }
.bh-icon { width: 30px; padding: 0; justify-content: center; }
.bh-icon:disabled { opacity: .3; cursor: default; }
.bh-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; max-height: 340px; margin-top: 12px; padding: 2px; overflow-y: auto; }
.bh-results:empty { display: none; }
.bh-result { display: flex; flex-direction: column; gap: 3px; padding: 6px; border: 0; transition: background .15s, box-shadow .15s; border-radius: var(--radius-lg); background: var(--secondary); color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.bh-result:hover { background: var(--secondary-hover); }
.bh-result:focus-visible { background: var(--secondary-hover); outline: none; box-shadow: inset 0 0 0 2px var(--primary); }
.bh-result__img { display: block; aspect-ratio: 3 / 4; overflow: hidden; border-radius: var(--radius); background: var(--field); }
.bh-result__img img { width: 100%; height: 100%; object-fit: cover; }
.bh-result strong { font-size: 12px; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bh-result span:last-child { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bh-own { margin: 12px 0 0; color: var(--muted); font-size: var(--fs-sm); }
.bh-link { padding: 0; border: 0; background: none; color: var(--primary-text); font: inherit; font-weight: 600; cursor: pointer; }
.bh-link:hover { color: var(--primary-text-light); }
.bh-chosen[hidden] { display: none; }
.bh-chosen { display: flex; align-items: flex-end; gap: 14px; margin-top: 16px; padding: 12px; border-radius: var(--radius-lg); background: var(--primary-soft); }
.bh-chosen__text { display: flex; flex: 1; flex-direction: column; align-self: center; min-width: 0; }
.bh-chosen__text span { color: var(--muted); font-size: 12px; }
.bh-chosen .field { width: 130px; margin: 0; }
.bh-chosen .bh-count { width: 80px; }
@media (max-width: 640px) { .bh-chosen { flex-wrap: wrap; } .bh-chosen .field { flex: 1; } }

/* ---------------------------------------------------------------- Raffles (raffles.js) */
.rf-thumb { display: grid; place-items: center; flex: none; width: 64px; height: 64px; overflow: hidden; border-radius: var(--radius); background: var(--field); color: var(--subtle); }
.rf-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rf-thumb--sm { width: 38px; height: 38px; }
.rf-upload { display: flex; align-items: center; gap: 12px; }
.rf-step { margin: 22px 0 10px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.rf-dialog .rf-step:first-of-type { margin-top: 14px; }
.rf-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.rf-mode { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-lg); background: var(--secondary); cursor: pointer; transition: background .15s, box-shadow .15s; }
.rf-mode:hover { background: var(--secondary-hover); }
.rf-mode:has(input:checked) { background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.rf-mode input { margin-top: 3px; accent-color: var(--primary); }
.rf-mode span { display: flex; flex-direction: column; gap: 2px; }
.rf-mode small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.rf-pot { margin-bottom: 12px; }
.rf-places { display: flex; flex-direction: column; gap: 6px; }
.rf-place { display: grid; grid-template-columns: 28px minmax(0, 1fr) 150px 34px; gap: 8px; align-items: center; }
.rf-place--head { color: var(--muted); font-size: 12px; font-weight: 600; }
.rf-places[data-mode="fixed"] [data-for="pot"], .rf-places[data-mode="pot"] [data-for="fixed"] { display: none; }
.rf-place__n { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--secondary); color: var(--muted); font-size: 12px; font-weight: 700; }
.rf-place .field__input { height: 38px; }
.rf-share { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.rf-x { width: 34px; padding: 0; justify-content: center; }
.rf-places__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.rf-over { color: var(--danger-text) !important; font-weight: 600; }
.rf-of { color: var(--muted); font-size: 14px; font-weight: 600; }
.bh-kpis .gm-kpi strong.rf-date { font-size: 15px; white-space: normal; line-height: 1.3; }
.rf-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.rf-cols .panel .table-wrap { max-height: 520px; overflow-y: auto; }
.rf-prize-list { display: flex; flex-direction: column; gap: 8px; }
.rf-prize { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-lg); background: var(--secondary); }
.rf-prize.is-won { background: var(--success-soft); }
.rf-prize__what { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.rf-prize__what small, .rf-prize__who small { color: var(--muted); font-size: 12px; }
.rf-prize__who { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.rf-medal { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--secondary-hover); color: var(--text); font-weight: 800; }
.rf-medal--1 { background: var(--warning-soft); color: var(--warning); }
.rf-medal--2 { background: var(--secondary-hover); color: var(--text-soft); }
.rf-medal--3 { background: var(--danger-soft); color: var(--danger-text); }
.rf-muted { color: var(--muted); }
.rf-fair { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 10px 16px; margin: 0; }
.rf-fair dt { color: var(--muted); font-size: var(--fs-sm); }
.rf-fair dd { margin: 0; min-width: 0; }
.rf-fair code { font-size: 12px; overflow-wrap: anywhere; color: var(--text-soft); }
@media (max-width: 1200px) { .rf-cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .rf-modes { grid-template-columns: minmax(0, 1fr); }
  .rf-place { grid-template-columns: 24px minmax(0, 1fr) 110px 30px; }
  .rf-fair { grid-template-columns: minmax(0, 1fr); }
}

/* Raffle pop-up steps */
.rf-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 4px 0 20px; padding: 0; list-style: none; counter-reset: none; }
.rf-steps li { position: relative; }
.rf-steps__item { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; width: 100%; padding: 0 0 2px; border: 0; background: none; color: var(--muted); font: inherit; font-size: var(--fs-sm); font-weight: 600; text-align: left; cursor: pointer; }
.rf-steps__item::before { content: ""; display: block; width: 100%; height: 4px; border-radius: var(--radius-pill); background: var(--secondary-hover); transition: background .25s var(--ease); }
.rf-steps__item.is-done::before, .rf-steps__item.is-current::before { background: var(--primary); }
.rf-steps__item.is-current { color: var(--text); }
.rf-steps__item.is-done { color: var(--text-soft); }
.rf-steps__item:disabled { cursor: default; opacity: .6; }
.rf-steps__item:not(:disabled):hover { color: var(--text); }
.rf-steps__n { display: none; }
.rf-page { animation: rf-in .22s var(--ease); }
.rf-page[hidden] { display: none; }
.rf-page__intro { margin: 0 0 16px; color: var(--muted); font-size: var(--fs-sm); line-height: 1.55; }
@keyframes rf-in { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
.rf-thumb--wide { width: 128px; height: 64px; }
.rf-upload__btns { display: flex; flex-wrap: wrap; gap: 6px; }
.rf-more { margin-top: 14px; border-radius: var(--radius-lg); background: var(--secondary); }
.rf-more summary { padding: 12px 14px; color: var(--text-soft); font-size: var(--fs-sm); font-weight: 600; cursor: pointer; list-style: none; }
.rf-more summary::-webkit-details-marker { display: none; }
.rf-more summary::before { content: "▸"; display: inline-block; margin-right: 8px; color: var(--muted); transition: transform .15s; }
.rf-more[open] summary::before { transform: rotate(90deg); }
.rf-more > .form-grid { padding: 0 14px 14px; }
.rf-error { margin: 10px 0 0; color: var(--danger-text); font-size: var(--fs-sm); font-weight: 600; }
.rf-error[hidden] { display: none; }
.rf-nav { display: flex; align-items: center; gap: 8px; margin-top: 24px; }
.rf-nav__space { flex: 1; }
.rf-nav [hidden] { display: none; }
.rf-review { display: flex; flex-direction: column; gap: 16px; padding: 16px; border-radius: var(--radius-lg); background: var(--secondary); }
.rf-review__head { display: flex; align-items: center; gap: 14px; }
.rf-review__head > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rf-review__head strong { font-size: var(--fs-lg); }
.rf-review__head .rf-muted { font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rf-review__head [hidden] { display: none; }
.rf-review__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; margin: 0; }
.rf-review__list dt { color: var(--muted); font-size: 12px; font-weight: 600; }
.rf-review__list dd { margin: 2px 0 0; font-weight: 600; }
.rf-review__list dt { grid-row: auto; }
.rf-review__prizes { display: flex; flex-direction: column; gap: 6px; }
.rf-review__prize { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.rf-review__prize .rf-medal { width: 26px; height: 26px; font-size: 12px; }
@media (max-width: 640px) {
  .rf-steps__label { font-size: 12px; }
  .rf-review__list { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- Schedule (schedule.js) */
.sc-swatch { display: inline-block; flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--sc-c, var(--primary)); }
.sc-swatch--accent, .sc-chip--accent { --sc-c: var(--primary); }
.sc-swatch--green, .sc-chip--green { --sc-c: var(--success); }
.sc-swatch--purple, .sc-chip--purple { --sc-c: var(--accent-violet); }
.sc-swatch--blue, .sc-chip--blue { --sc-c: var(--primary-text); }
.sc-swatch--orange, .sc-chip--orange { --sc-c: var(--warning); }
.sc-swatch--pink, .sc-chip--pink { --sc-c: var(--brand-twitch); }
.sc-swatch--red, .sc-chip--red { --sc-c: var(--danger); }
.sc-swatch--gray, .sc-chip--gray { --sc-c: var(--muted); }
.sc-glance { margin-bottom: 20px; }
.sc-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.sc-week__day { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 10px; border-radius: var(--radius-lg); background: var(--secondary); }
.sc-week__name { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.sc-week__off { color: var(--subtle); font-size: 12px; }
.sc-chip { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding: 6px 8px; border-radius: var(--radius); background: color-mix(in srgb, var(--sc-c) 18%, transparent); box-shadow: inset 3px 0 0 var(--sc-c); font-size: 12px; }
.sc-chip strong { font-variant-numeric: tabular-nums; }
.sc-chip span { overflow: hidden; color: var(--text-soft); text-overflow: ellipsis; white-space: nowrap; }
.sc-skips { color: var(--warning); font-size: 12px; }
.sc-kind { display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--radius-lg); background: var(--secondary); }
.sc-kind__opt input, .sc-day input, .sc-color input { position: absolute; opacity: 0; pointer-events: none; }
.sc-kind__opt span { display: block; padding: 7px 14px; border-radius: var(--radius); color: var(--muted); font-size: var(--fs-sm); font-weight: 600; cursor: pointer; }
.sc-kind__opt input:checked + span { background: var(--primary); color: var(--on-primary); }
.sc-kind__opt input:focus-visible + span, .sc-day input:focus-visible + span, .sc-color input:focus-visible + .sc-swatch { box-shadow: var(--focus-ring); }
.sc-days { display: flex; flex-wrap: wrap; gap: 6px; }
.sc-day span { display: grid; place-items: center; min-width: 52px; height: 38px; padding: 0 10px; border-radius: var(--radius-lg); background: var(--secondary); color: var(--muted); font-size: var(--fs-sm); font-weight: 700; cursor: pointer; transition: background .15s, color .15s; }
.sc-day span:hover { background: var(--secondary-hover); color: var(--text); }
.sc-day input:checked + span { background: var(--primary); color: var(--on-primary); }
.sc-colors { display: flex; flex-wrap: wrap; gap: 10px; }
.sc-color { cursor: pointer; }
.sc-color .sc-swatch { width: 28px; height: 28px; transition: transform .15s; }
.sc-color input:checked + .sc-swatch { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); transform: scale(1.05); }
.sc-channels { display: flex; flex-direction: column; gap: 8px; }
.sc-channel { display: grid; grid-template-columns: 90px minmax(0, 2fr) minmax(0, 1fr); gap: 8px; align-items: center; }
.sc-channel__name { color: var(--text-soft); font-size: var(--fs-sm); font-weight: 600; }
.sc-dates { display: flex; flex-direction: column; gap: 6px; }
.sc-date { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border: 0; border-radius: var(--radius-lg); background: var(--secondary); color: var(--text); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.sc-date:hover { background: var(--secondary-hover); }
.sc-date span { color: var(--muted); }
.sc-date.is-off { background: var(--warning-soft); }
.sc-date.is-off span { color: var(--warning); }
@media (max-width: 900px) { .sc-week { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 640px) { .sc-week { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sc-channel { grid-template-columns: minmax(0, 1fr); } }
.sc-tz-note { margin: 0; padding: 10px 12px; border-radius: var(--radius-lg); background: var(--primary-soft); color: var(--primary-text-light); font-size: var(--fs-sm); }

/* ---------- Overlays ---------- */
.ov-list { margin-bottom: var(--s-6); }
.ov-row { gap: 18px; padding: 12px 16px 12px 12px; }
.ov-thumb { position: relative; display: block; flex: none; width: 176px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background-color: var(--field);
  background-image: conic-gradient(var(--secondary-hover) 25%, transparent 0 50%, var(--secondary-hover) 0 75%, transparent 0); background-size: 12px 12px; transition: box-shadow .15s; }
.ov-thumb:hover { box-shadow: 0 0 0 2px var(--primary); }
.ov-row__text { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.ov-row__text .bot-row__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-empty { padding: var(--s-10) var(--s-4); border-radius: var(--radius-lg); background: var(--secondary); }
.ov-empty__icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: var(--s-4); border-radius: var(--radius-lg); background: var(--primary-soft); color: var(--primary-text); }
.ov-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: ov; }
.ov-steps li { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: var(--radius-lg); background: var(--secondary); color: var(--muted); font-size: var(--fs-sm); line-height: 1.5; counter-increment: ov; }
.ov-steps li::before { content: counter(ov); display: grid; place-items: center; width: 24px; height: 24px; margin-bottom: 6px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-text); font-weight: 700; font-size: 12px; }
.ov-steps strong { color: var(--text); }
.ov-new { width: min(760px, calc(100vw - 32px)); }
.ov-pick-label { display: block; margin: var(--s-4) 0 8px; }
.ov-templates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ov-tpl { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 8px; border-radius: var(--radius-lg); background: var(--secondary); cursor: pointer; transition: box-shadow .15s, background-color .15s; }
.ov-tpl:hover { background: var(--secondary-hover); }
.ov-tpl:has(input:checked) { box-shadow: 0 0 0 2px var(--primary); }
.ov-tpl input { position: absolute; opacity: 0; pointer-events: none; }
.ov-tpl__thumb { position: relative; display: block; aspect-ratio: 16 / 9; margin-bottom: 6px; overflow: hidden; border-radius: var(--radius); background-color: var(--field);
  background-image: conic-gradient(var(--secondary-hover) 25%, transparent 0 50%, var(--secondary-hover) 0 75%, transparent 0); background-size: 10px 10px; }
.ov-tpl__name { font-weight: 700; }
.ov-tpl__about { color: var(--muted); font-size: var(--fs-xs); line-height: 1.4; }
.ov-settings__row { display: flex; align-items: flex-end; gap: 8px; }
.ov-settings__row > .field { flex: 1; min-width: 0; }
.ov-settings__row > input { flex: 1; min-width: 0; }
.ov-settings__row > .btn { flex: none; }
.ov-settings__section { margin-top: var(--s-5); padding-top: var(--s-5); border-top: 1px solid var(--line); }
.modal__title + .ov-settings__section { margin-top: var(--s-4); padding-top: 0; border-top: 0; }
@media (max-width: 900px) { .ov-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ov-templates { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .ov-row { flex-wrap: wrap; } .ov-thumb { width: 100%; } .ov-steps, .ov-templates { grid-template-columns: minmax(0, 1fr); } }
.ov-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.ov-preset { display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: var(--radius-lg); background: var(--secondary); }
.ov-preset__thumb { position: relative; display: block; aspect-ratio: 16 / 9; margin-bottom: 6px; overflow: hidden; border-radius: var(--radius); background-color: var(--field);
  background-image: conic-gradient(var(--secondary-hover) 25%, transparent 0 50%, var(--secondary-hover) 0 75%, transparent 0); background-size: 12px 12px; }
.ov-preset__name { font-weight: 700; }
.ov-preset__about { color: var(--muted); font-size: var(--fs-sm); line-height: 1.45; }
.ov-preset__actions { display: flex; gap: 8px; margin-top: 8px; }
/* The new-overlay pop-up shows a design only when one was chosen ("Use this preset"). */
.ov-new .ov-tpl:not(:has(input:checked)) { display: none; }
.ov-new .ov-templates { grid-template-columns: minmax(0, 480px); margin-top: var(--s-4); }
.ov-new .ov-tpl { cursor: default; }
.ov-tpl__thumb--blank { display: grid; place-items: center; background-image: none; color: var(--muted); border: 1px dashed var(--line-strong); }
.ov-channel { gap: 14px; }
.ov-channel__logo { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: var(--radius-lg); background: var(--field); }
.ov-channel__logo--kick { color: var(--brand-kick); }
.ov-channel__logo--twitch { color: var(--brand-twitch); }

/* =====================================================================
   One look for the whole dashboard (applies to every page and pop-up):
   - inputs: 40px tall, 14px text, same as buttons, wherever they sit;
   - pop-up footers: same gap above, a Delete sits on the left;
   - Delete = .btn--danger + trash icon, Remove = .btn--ghost (see partials/botui.html action_form).
   ===================================================================== */
.app__content .field__input:not(.field__input--sm):not(.field__input--area):not(.field__input--file) { height: var(--control-h); font-size: var(--fs-base); }
.app__content .field__label { font-size: var(--fs-base); font-weight: 600; }
.inline-form-reset { display: inline; }
.modal__actions { margin-top: 20px; }
.modal__text + .modal__actions { margin-top: 0; }
.modal__actions > .btn--danger:first-child, .modal__actions > form:first-child:has(.btn--danger) { margin-right: auto; }
.btn--danger svg, .btn--ghost svg { flex: none; }
/* space between a pop-up's title and what follows (a subtitle keeps its own spacing) */
.modal__title + :not(.modal__sub):not(.modal__text) { margin-top: var(--s-4); }
/* fields inside a box that's already button-grey use the darker fill, so they still stand out */
:is(.rf-more, .rf-review, .rf-prize, .rf-mode, .bot-row, .sub-card, .ov-tpl, .ov-preset) :is(.field__input, .cs-btn, .cc-btn) { background: var(--surface); }
:is(.rf-more, .rf-review, .rf-prize, .rf-mode, .bot-row, .sub-card, .ov-tpl, .ov-preset) :is(.field__input, .cs-btn, .cc-btn):hover { background: var(--surface-hover); }

/* Every table on the dashboard draws its rows like the Discord Commands list (.bot-row): rounded grey rows with
   gaps between them, column names above in small muted text. */
.app__content .table-wrap { margin: 0; overflow-x: auto; }
.app__content .table { border-collapse: separate; border-spacing: 0 8px; margin: -8px 0; }
.app__content .table th { padding: 8px 18px 0; box-shadow: none; }
.app__content .table td { padding: 14px 18px; background: var(--secondary); box-shadow: none; }
.app__content .table td:first-child { border-radius: var(--radius-lg, 12px) 0 0 var(--radius-lg, 12px); }
.app__content .table td:last-child { border-radius: 0 var(--radius-lg, 12px) var(--radius-lg, 12px) 0; }
.app__content .table td:only-child { border-radius: var(--radius-lg, 12px); }
.app__content .table tbody tr:last-child td { box-shadow: none; }
.app__content .table tbody tr:hover td { background: var(--secondary); }
.app__content .table tr.is-picked td { background: var(--primary-soft); }
.app__content .table .btn--secondary { background: rgba(255, 255, 255, .07); }
.app__content .table .btn--secondary:hover { background: rgba(255, 255, 255, .13); }
/* the line above a list inside a tab: a hint on the left, a search or an action on the right (Discord Commands' "Custom" tab) */
.tab-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 0 0 12px; }
.tab-head > .panel__sub { margin: 0; }
.tab-head .search { margin: 0; }
/* fields inside table rows (bonus hunt grid) sit one step darker than the grey row */
.app__content .table td :is(.field__input, .cs-btn, input:not([type=checkbox]):not([type=radio])) { background: var(--surface); }
/* the toast area is a popover (top layer, above pop-ups): undo the browser's popover box */
.toasts[popover] { top: auto; left: auto; width: auto; height: auto; margin: 0; padding: 0; border: 0; background: transparent; color: inherit; overflow: visible; }
.toasts[popover]:not(:popover-open) { display: none; }
.toasts[popover]:popover-open { display: flex; }
@media (max-width: 520px) { .toasts[popover] { left: var(--s-4); right: var(--s-4); bottom: var(--s-4); } }

/* number fields: no up/down spinner arrows (typing and the keyboard arrow keys still work) */
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; appearance: none; margin: 0; }

/* Challenges page: the slot that is picked in the New / Edit pop-up */
.ch-picked { margin: 0; align-items: center; }
.ch-picked [hidden] { display: none; }
.ch-name { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ch-name:hover { text-decoration: underline; }

/* ---------- Builder overview: the site card with a live preview, then the pages ---------- */
.bld-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: center; margin: 0 0 var(--s-4); padding: 22px 24px; border-radius: var(--radius-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.bld-hero__info { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
.bld-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.bld-name { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; overflow-wrap: anywhere; }
.bld-status { margin: 0; max-width: 46ch; color: var(--muted); font-size: 14px; line-height: 1.55; }
.bld-facts { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; color: var(--muted); font-size: 13px; }
.bld-facts strong { color: var(--text); }
.bld-url { display: flex; align-items: center; gap: 10px; max-width: 100%; padding: 4px 4px 4px 14px; border-radius: var(--radius); background: var(--secondary); color: var(--muted); }
.bld-url__text { min-width: 0; overflow: hidden; color: var(--text); font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.bld-url__text:hover { color: var(--primary); }
.bld-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.bld-actions .btn { gap: 8px; }
.bld-actions form { display: contents; }
.bld-preview { display: block; min-width: 0; color: inherit; text-decoration: none; }
.bld-browser { display: block; overflow: hidden; border-radius: 10px; background: var(--secondary); box-shadow: inset 0 0 0 1px var(--border); }
.bld-browser__bar { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; background: var(--secondary); box-shadow: inset 0 -1px 0 var(--border); }
.bld-browser__bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong, rgba(255, 255, 255, .18)); }
.bld-browser__url { flex: 1; max-width: 70%; margin: 0 auto; padding: 2px 10px; overflow: hidden; border-radius: 6px; background: var(--surface); color: var(--muted); font-size: 11px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.bld-browser__view { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface); }
.bld-browser__view iframe { position: absolute; left: 0; top: 0; width: 1280px; height: 800px; border: 0; transform-origin: 0 0; pointer-events: none; background: #fff; }
@media (max-width: 1100px) { .bld-hero { grid-template-columns: minmax(0, 1fr); padding: 18px; gap: 18px; } .bld-preview { max-width: 640px; } }

/* Mini games: picking a casino style (Dashboard -> Mini games -> Branding -> Style) */
.gm-styles { display: grid; gap: 10px; margin-top: 8px; }
.gm-style { position: relative; display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line, #2a2d36); border-radius: 10px; cursor: pointer; }
.gm-style input { position: absolute; opacity: 0; pointer-events: none; }
.gm-style:has(input:checked) { border-color: var(--primary, #155dfc); box-shadow: 0 0 0 1px var(--primary, #155dfc) inset; }
.gm-style:has(input:focus-visible) { outline: 2px solid var(--primary, #155dfc); outline-offset: 2px; }
.gm-style__sw { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 3px; width: 64px; height: 44px; flex: none; padding: 4px; border-radius: 8px; background: var(--sw-bg); }
.gm-style__sw i { border-radius: 3px; background: var(--sw-panel); }
.gm-style__sw i:first-child { grid-row: 1 / 3; }
.gm-style__sw i:last-child { background: var(--sw-accent); }
.gm-style--shuffle { --sw-bg: #0a0a0c; --sw-panel: #1d2027; --sw-accent: #155dfc; }
.gm-style--gamdom { --sw-bg: #3a1014; --sw-panel: #3a3636; --sw-accent: #00ff85; }
.gm-style--stake { --sw-bg: #0f212e; --sw-panel: #213743; --sw-accent: #9d29ff; }
.gm-style__text { display: grid; gap: 2px; }
.gm-style__text small { color: var(--muted, #9a9cab); line-height: 1.4; }
