:root {
  /* Mørk blågrå base + 3 lysere nivåer for behagelig kontrast */
  --bg:         #0f172a; /* hovedbakgrunn - mørk, men ikke kullsvart */
  --bg-soft:    #151c30; /* primære flater: kort, knapper, chips osv. */
  --panel:      #1e293b; /* modaler / viktige paneler / større bokser */
  --panel-soft: #273549; /* ekstra lys flate: kan brukes til striper o.l. senere */

  --bdr-subtle: #1f2937;
  --bdr-strong: #020617;

  --text:       #e5e7eb;
  --muted:      #9ca3af;
  --soft:       #f9f9ff;

  /* Blå aksenter (wallet, tabs osv.) */
  --accent:     #1164BF;   /* wallet-knapp + andre primærknapper */
  --accent-soft:#0b1120;
  --accent2:    #1d4ed8;   /* sekundær blå, f.eks. aktive tabs */
  --bet-green:  #1fff20;   /* grønnfargen til bet-knapper og bonusmerker */

  /* Varsler - fortsatt tydelige, men ikke skrikete */
  --danger:     #f97373;
  --warn:       #facc6b;

  /* Squarify: mer firkantet, fortsatt mykt */
  --radius:     10px;
  --radius-lg:  14px;
  --pad:        16px;
  --blur:       18px;

  --shadow-soft: 0 0 0 rgba(0, 0, 0, 0); /* fortsatt null skygge */

  --font-main: "Inter", "SF Pro Display", "SF Pro Text", "Segoe UI", system-ui, sans-serif;
}


/* Respektér hidden-attributtet */
[hidden] {
  display: none !important;
}

/* Hide scrollbars everywhere while keeping scroll behavior available. */
* {
  scrollbar-width: none !important;
  -ms-overflow-style: none;
}

*::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

@keyframes gamblBackdropFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes gamblPopupRise {
  from {
    opacity: 0;
    transform: translateY(16px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes gamblAuthFromTrigger {
  from {
    opacity: 0;
    transform: translateY(16px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes gamblMenuDrop {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gamblNotifySlideIn {
  from {
    opacity: 0;
    transform: translateX(-14px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes gamblSupportPhoneRise {
  from {
    opacity: 0;
    transform: translateY(28px) scale(.88);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

:is(.wallet-modal-backdrop, .vip-modal-backdrop, .stats-modal-backdrop, .promo-modal-backdrop):not([hidden]),
.fairness-modal[style*="display: flex"],
#modal.overlay.open {
  animation: gamblBackdropFade .16s ease both;
}

:is(.wallet-modal-backdrop, .vip-modal-backdrop, .stats-modal-backdrop, .promo-modal-backdrop):not([hidden])
  :is(.wallet-modal, .vip-modal, .stats-modal, .promo-modal),
.fairness-modal[style*="display: flex"] .fairness-modal-content,
#modal.overlay.open .wallet-modal-box {
  animation: gamblPopupRise .22s cubic-bezier(.2, .8, .2, 1) both;
  transform-origin: center bottom;
}

dialog#authDlg[open] {
  animation: gamblPopupRise .22s cubic-bezier(.2, .8, .2, 1) both;
  transform-origin: center bottom;
}

dialog#authDlg::backdrop {
  background: rgba(0, 0, 0, .68);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: gamblBackdropFade .16s ease both;
}

.game-search-popover:not([hidden]) {
  animation: gamblMenuDrop .18s cubic-bezier(.2, .8, .2, 1) both;
}

.nav-profile-menu:not([hidden]),
.nav-balance-menu:not([hidden]),
.nav-notifications-menu:not([hidden]) {
  animation: none;
}

.support-widget-panel:not([hidden]) {
  animation: gamblSupportPhoneRise .24s cubic-bezier(.2, .8, .2, 1) both;
  transform-origin: right bottom;
}

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

/* Base reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  height: 100%;
}

body {
  min-height: 100%;
  display: flex;
  flex-direction: column;

  background-color: var(--bg);   /* ingen gradient */
  color: var(--text);
  font: 16px/1.55 var(--font-main);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

button,
input,
select,
textarea {
  font: inherit;
  font-family: var(--font-main);
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

a {
  color: #c2d5ff;
  text-decoration: none;
}
a:hover {
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Layout helpers */
.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 18px;
}

main.page {
  flex: 1;
  padding: 22px 0 34px;
}

/* Typo utilities */
.muted {
  color: var(--muted);
}
.mono {
  font-family: var(--font-main);
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

.h2 {
  font-size: 19px;
  font-weight: 600;
}

/* ---------- KNAPPER / PILLS / CHIPS ---------- */

.btn {
  border-radius: var(--radius);
  border: 1px solid var(--bdr-subtle);
  background: var(--bg-soft);
  color: var(--text);
  padding: 9px 18px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition:
    background .15s ease,
    transform .08s ease,
    border-color .15s ease;
  box-shadow: none;
}
.btn:hover {
  background: #0b1220;
  border-color: #273549;
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}

/* Wallet / hovedaccent-knapp (blå) */
.btn-accent {
  border: 0;
  background: var(--accent); /* #1164BF */
  color: #ffffff;
  box-shadow: none;
}
.btn-accent:hover {
  filter: brightness(1.05);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.btn-ghost:hover {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.10);
}

.btn-sm {
  padding: 7px 13px;
  font-size: 14px;
}

.btn-xs {
  padding: 4px 9px;
  font-size: 11px;
}

.pill {
  border-radius: var(--radius);
  border: 1px solid var(--bdr-subtle);
  padding: 7px 12px;
  font-size: 14px;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.pill-soft {
  background: #0b1220;
}

.pill-ghost {
  background: transparent;
  border-color: rgba(255,255,255,.12);
}

.chip {
  border-radius: var(--radius);
  border: 1px solid var(--bdr-subtle);
  background: var(--bg-soft);
  padding: 8px 13px;
  font-size: 14px;
  color: var(--soft);
}

/* ---------- GENERELLE BOKSER / CARDS ---------- */
.card {
  background: var(--bg-soft);   /* flat */
  border-radius: var(--radius-lg);
  padding: var(--pad);
  border: 1px solid var(--bdr-subtle);
  box-shadow: none;
  backdrop-filter: blur(var(--blur));
}

/* ---------- HEADER / NAVBAR ---------- */
:root {
  --nav-h: 76px;
}
body {
  padding-top: var(--nav-h);
}

header.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  background: var(--bg); /* samme som body */
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--bdr-strong); /* “svart linje”-effekt */
}

.nav-inner {
  height: 76px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 16px;
}

/* ---------- NAV BALANCE / WALLET ---------- */

.nav-balance-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0;

  height: 56px;
  padding: 0 0 0 8px;

  border-radius: calc(var(--radius) + 2px);
  background: var(--bg-soft);
  border: 1px solid var(--bdr-subtle);
  box-shadow: none;

  transition:
    border-color .15s ease,
    background .15s ease;
}

.nav-balance-wrap:hover,
.nav-balance-wrap:focus-within {
  background: #182236; /* subtle change only */
}

.nav-balance-toggle {
  border: 0;
  background: transparent;
  color: var(--text);

  min-height: 38px;
  padding: 0 10px 0 8px;

  display: inline-flex;
  align-items: center;
  gap: 8px;

  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: none;
  font: inherit;

  transition:
    transform .08s ease;
}

.nav-balance-toggle:hover,
.nav-balance-toggle.is-open {
  background: transparent;
  border-color: transparent;
  transform: none;
}

.nav-balance-toggle:active {
  transform: translateY(0);
}

.nav-balance-toggle:focus-visible {
  outline: 2px solid rgba(96, 165, 250, .8);
  outline-offset: 2px;
}

.nav-balance-unit-icon {
  width: 24px;
  height: 24px;
  border-radius: 999px;

  background: #0b1220;
  border: 1px solid rgba(255, 255, 255, .08);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;

  color: #f8fafc;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.nav-balance-unit-icon.is-fiat {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
}

.nav-balance-sol-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: block;
  box-shadow: none;
}

.nav-balance-value {
  min-width: 10.4ch;

  color: #f8fafc;

  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14.5px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.025em;

  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;

  text-align: right;
}

.nav-balance-arrow {
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
  opacity: .9;
  transform: translateY(1px);
  transition: transform .15s ease, opacity .15s ease;
}

/* Make Wallet fill the balance box vertically and feel integrated */
.nav-balance-wrap .nav-wallet-btn {
  height: 100%;
  align-self: stretch;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  margin-left: 8px;
  margin-right: 0;

  padding: 0 18px;
  border-radius: var(--radius);

  font-size: 14.5px;
  font-weight: 650;

  border: 0;
  box-shadow: none;
}

.nav-balance-wrap .nav-wallet-btn:hover,
.nav-balance-wrap .nav-wallet-btn:active {
  transform: none;
}

.nav-balance-wrap .nav-wallet-btn:hover {
  background: #1470cf; /* slightly lighter than --accent (#1164BF) */
}

.nav-balance-toggle.is-open .nav-balance-arrow {
  transform: translateY(1px) rotate(180deg);
  opacity: 1;
}

.nav-balance-currency {
  font-size: 12px;
  opacity: .85;
}

/* Dropdown-boks */
.nav-balance-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 5px;

  width: min(240px, calc(100vw - 24px));
  padding: 6px;
  border-radius: 12px;
  border: 1px solid #1f2937;
  background: var(--bg-soft);
  box-shadow: none;

  display: flex;
  flex-direction: column;
  gap: 3px;

  z-index: 30;

  max-width: calc(100vw - 24px);
}

.nav-balance-menu[hidden] {
  display: none;
}

.nav-balance-option {
  width: 100%;

  border: 1px solid transparent;
  background: transparent;
  color: var(--text);

  padding: 8px 9px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 7px;
  cursor: pointer;

  font: inherit;
  font-size: 14px;

  transition:
    background .12s ease,
    border-color .12s ease,
    color .12s ease;

  min-height: 44px;
}

.nav-balance-option:hover {
  background: #020617;
  border-color: rgba(255, 255, 255, .06);
}

.nav-balance-option.is-active {
  background: var(--accent2);
  color: #f9fafb;
}

.nav-balance-option-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  color: inherit;
  font-size: 13px;
  font-weight: 600;
}

.nav-balance-option-icon {
  width: 19px;
  height: 19px;
  border-radius: 999px;

  background: #020617;
  border: 1px solid rgba(255, 255, 255, .08);

  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: inherit;
  font-size: 12px;
  line-height: 1;
  flex-shrink: 0;
}

.nav-balance-option-fiat {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
  font-weight: 700;
}

.nav-balance-option-value {
  color: inherit;
  opacity: .96;

  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;

  text-align: right;
  white-space: nowrap;

}

/* Wallet-knappen inne i saldo-pill */
.nav-balance-wrap #navWalletBtn {
  min-height: 34px;
  padding: 0 14px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
}

/* nav: authed vs guest */
.nav-guest {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-authed {
  position: relative;
  display: flex;
  align-items: center;
}

/* Profil-knapp */
.nav-profile-btn {
  border: 0;
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 6px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none;
  border: 1px solid var(--bdr-subtle);
  transition:
    background 0.15s ease,
    transform 0.08s ease,
    border-color 0.15s ease;
}
.nav-profile-btn:hover {
  background: #0b1220;
  border-color: #334155;
  transform: translateY(-1px);
}

.nav-profile-icon {
  font-size: 18px;
  line-height: 1;
}

/* Profil-dropdown */
.nav-profile-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 240px;
  border-radius: 12px;
  border: 1px solid var(--bdr-subtle);
  background: var(--bg-soft);
  box-shadow: none;
  padding: 6px;
  z-index: 40;

  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 96px);
  overflow-y: auto;
}

.nav-profile-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 10px 16px;
  border-bottom: 1px solid #1f2937;

}

.nav-profile-avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px; /* profilikon skal være rundt */
  background: #020617; /* flat, ingen gradient */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.nav-profile-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;

  min-width: 0;
}

.nav-profile-label {
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  color: #9ca3af;

}

.nav-profile-username {
  font-size: 13px;
  color: #e5e7eb;

  font: 600 15px/1.5 var(--font-main);
  overflow-wrap: anywhere;
}

.nav-profile-section {
  padding-top: 4px;
  padding-bottom: 4px;
}
.nav-profile-section + .nav-profile-section {
  border-top: 1px solid #1f2937;
}

.nav-profile-item {
  width: 100%;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  background: transparent;
  border: 0;
  text-align: left;
  font-size: 14px;
  color: #e5e7eb;
  cursor: pointer;
  transition: background .12s ease, color .12s ease;

  min-height: 44px;
  border-radius: 7px;
}
.nav-profile-item a {
  color: inherit;
  text-decoration: none;
}
.nav-profile-item:hover {
  background: var(--panel);
  color: #f9fafb;
  transform: none;

}

.nav-profile-item-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: #9ca3af;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-profile-item-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-profile-item:hover .nav-profile-item-icon {
  color: #e5e7eb;
}

.nav-profile-item:focus-visible {
  outline: 2px solid rgba(96, 165, 250, .8);
  outline-offset: -2px;
}

.nav-profile-item-label {
  flex: 1;
}

.nav-profile-item-kbd,
.nav-profile-item-badge {
  font-size: 11px;
  color: #9ca3af;
}

.nav-profile-item-badge {
  border-radius: var(--radius);
  padding: 2px 7px;
  border: 1px solid #1f2937;
}

.nav-profile-item.is-placeholder {
  opacity: 0.9;
}

/* sign out */
.nav-profile-section-danger {
  padding-top: 4px;
}
.nav-profile-item-danger {
  color: #fecaca;
}
.nav-profile-item-danger .nav-profile-item-icon {
  color: #fca5a5;
}
.nav-profile-item-danger:hover {
  background: rgba(239, 68, 68, 0.16);
  color: #fee2e2;
}
.nav-profile-item-danger:hover .nav-profile-item-icon {
  color: #fee2e2;
}

/* ---------- CLEAN PROFILE ICON OVERRIDE ---------- */

.nav-profile-btn {
  width: 40px;
  height: 40px;
  padding: 0;

  border-radius: var(--radius);
  border: 1px solid #1f2937;
  background: var(--bg-soft);
  color: #e5e7eb;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  box-shadow: none;

  transition:
    background .15s ease,
    border-color .15s ease,
    color .15s ease,
    transform .08s ease;
}

.nav-profile-btn:hover,
.nav-profile-btn[aria-expanded="true"] {
  background: #020617;
  border-color: #334155;
  color: #f8fafc;
  transform: translateY(-1px);
}

.nav-profile-btn:active {
  transform: translateY(0);
}

.nav-profile-btn:focus-visible {
  outline: 2px solid rgba(96, 165, 250, .8);
  outline-offset: 2px;
}

.nav-profile-icon {
  width: 21px;
  height: 21px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
}

.nav-profile-icon svg,
.nav-profile-avatar svg {
  width: 100%;
  height: 100%;
  display: block;

  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-profile-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;

  background: #020617;
  border: 1px solid rgba(255, 255, 255, .08);
  color: #e5e7eb;

  display: flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;
  padding: 7px;
}
/* Brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--soft);
  font-size: 18px;
}
.brand img {
  display: block;
  height: 46px;
  max-height: 46px;
  width: auto;
}

/* Nav-posisjonering */
.nav-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-center {
  display: flex;
  justify-content: center;
  align-items: center;
}
.nav-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

/* Nav-lenker */
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition:
    background .15s ease,
    border-color .15s ease,
    color .15s ease,
    transform .08s ease;
}
.nav-link:hover {
  background: #020617;
  border-color: #1f2937;
  color: var(--soft);
  transform: translateY(-1px);
  text-decoration: none;
}

.nav-mobile {
  display: none;
}

@media (max-width: 860px) {
  :root { --nav-h: 64px; }
  .nav-inner {
    height: var(--nav-h);
    padding: 8px 12px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: 48px;
    gap: 8px;
  }
  .nav-left { grid-area: 1 / 1; }
  .nav-right { grid-area: 1 / 3; }
  .nav-center {
    grid-area: 1 / 2;
    min-width: 0;
  }
  .nav-balance-wrap {
    min-width: 0;
    max-width: 100%;
    height: 44px;
    padding-left: 3px;
    flex-wrap: nowrap;
  }
  .nav-balance-toggle {
    min-height: 42px;
    min-width: 0;
    padding: 0 5px;
    gap: 4px;
  }
  .nav-balance-value {
    min-width: 0;
    font-size: 12px;
    white-space: nowrap;
  }
  .nav-balance-unit-icon { width: 18px; height: 18px; font-size: 12px; }
  .nav-balance-sol-icon { width: 16px; height: 16px; }
  .nav-balance-arrow { font-size: 10px; flex-shrink: 0; }
  .nav-balance-toggle:disabled .nav-balance-arrow { display: none; }
  .nav-balance-wrap #navWalletBtn {
    flex-shrink: 0;
    margin-left: 3px;
    padding: 0 9px;
    font-size: 12px;
  }
  .nav-balance-menu {
    position: fixed;
    top: calc(var(--nav-h) + 8px);
    left: 12px;
    right: 12px;
    width: auto;
    max-width: 320px;
    margin-inline: auto;
  }
  .nav-left .brand { min-height: 44px; }
  .nav-left .brand img { width: clamp(64px, 18vw, 96px); height: auto; max-height: 40px; }
  .nav-right .nav-authed { gap: 4px; }
  .nav-authed .nav-icon-btn,
  .nav-authed .nav-profile-btn { width: 32px; height: 44px; flex-shrink: 0; }
  .nav-guest { gap: 6px; }
  .nav-guest .btn { padding-inline: 10px; font-size: 12px; }
  .nav-center:has(#navBalanceWrap[hidden]) { display: none; }
  .nav-mobile {
    display: flex;
    align-items: center;
    gap: 8px;
  }
}

@media (max-width: 380px) {
  .nav-inner { padding-inline: 8px; column-gap: 4px; }
  .nav-left .brand img { width: 56px; }
  .nav-right .nav-authed { gap: 2px; }
  .nav-authed .nav-icon-btn,
  .nav-authed .nav-profile-btn { width: 28px; }
  .nav-authed .nav-icon-btn svg,
  .nav-authed .nav-profile-icon { width: 18px; height: 18px; }
  .nav-balance-wrap { padding-left: 2px; }
  .nav-balance-toggle { padding-inline: 3px; gap: 3px; }
  .nav-balance-value { font-size: 11px; }
  .nav-balance-unit-icon { width: 16px; height: 16px; }
  .nav-balance-sol-icon { width: 14px; height: 14px; }
  .nav-balance-wrap #navWalletBtn { margin-left: 2px; padding-inline: 6px; font-size: 11px; }
}

@media (max-width: 480px) {
  /* Guest slot previews also show In Play; sign-up remains in the auth dialog. */
  .nav-inner:has(#navBalanceWrap:not([hidden])) #navGuest #btnRegister { display: none; }
}



/* ---------- FOOTER ---------- */

footer.site {
  border-top: 1px solid var(--bdr-subtle);
  background: var(--bg-soft);   /* mørkere enn body */
  backdrop-filter: blur(18px);
  margin-top: 32px;
}

.footer-wrap {
  padding: 20px 18px 26px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-top {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  align-items: flex-start;
}

.footer-col {
  min-width: 0;
}

.footer-heading {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--soft);
}

.footer-link {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0;
  text-decoration: none;
}

.footer-action {
  width: auto;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  line-height: inherit;
  text-align: left;
  cursor: pointer;
}

.footer-link:hover {
  color: var(--soft);
  text-decoration: none;
}

.footer-link:focus-visible {
  outline: 2px solid rgba(96, 165, 250, .8);
  outline-offset: 2px;
  border-radius: 4px;
}

.footer-socials {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 8px 0;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--muted);
  border-radius: 8px;
  text-decoration: none;
  transition: color .15s ease, background-color .15s ease;
}

.footer-social-link:hover {
  color: var(--soft);
  background-color: rgba(255, 255, 255, .05);
  text-decoration: none;
}

.footer-social-link:focus-visible {
  outline: 2px solid rgba(96, 165, 250, .8);
  outline-offset: 2px;
}

.footer-social-link svg {
  display: block;
}

.footer-bottom {
  border-top: 1px solid #1f2937;
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.footer-bottom-main {
  font-size: 12px;
  color: var(--muted);
}

.footer-legal {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  max-width: 960px;
  line-height: 1.6;
}
.footer-legal .footer-link {
  display: inline;
  margin: 0;
  padding: 0;
}

@media (max-width: 960px) {
  .footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .footer-top {
    grid-template-columns: 1fr;
  }
  .footer-wrap {
    gap: 16px;
  }
}

/* ---------- GENERIC GRID / ROW ---------- */

.section {
  margin-top: 20px;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.row-sb {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.cards {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Game cards - flat, ingen gradient (bilder kommer senere) */
.game-card {
  border-radius: var(--radius);
  border: 1px solid var(--bdr-subtle);
  background: var(--bg-soft);
  padding: 14px;
  display: block;
  transition:
    transform .1s ease,
    border-color .15s ease,
    background .15s ease;
}
.game-card h4 {
  margin: 0 0 6px;
  font-size: 15px;
}
.game-card .tag {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius);
  border: 1px solid var(--bdr-subtle);
  background: #020617;
  color: var(--soft);
  padding: 2px 8px;
  font-size: 12px;
}
.game-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.game-card:hover {
  transform: translateY(-2px);
  border-color: #334155;
  text-decoration: none;
}

/* ---------- STRIPED LISTS / HISTORY / LIVE DATA ---------- */

/* Generell tabell-stil for history/live */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table thead tr {
  background: var(--bg-soft);
}
.table th,
.table td {
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid #111827;
}
.table tbody tr:nth-child(odd) {
  background: transparent;
}
.table tbody tr:nth-child(even) {
  background: var(--bg-soft); /* annenhver rad mørkere */
}

/* Alternativ for lister uten <table> */
.list-row {
  padding: 6px 10px;
}
.list-row:nth-child(even) {
  background: var(--bg-soft);
}

/* ---------- AUTH DIALOG ---------- */

dialog#authDlg {
  border: 0;
  width: 420px;
  max-width: calc(100vw - 32px);
  border-radius: var(--radius-lg);
  padding: 0;
  background: var(--panel); /* flat */
  color: var(--text);
  box-shadow: none;
}

#authBox {
  padding: 20px 18px 18px;
  width: 100%;
  box-sizing: border-box;
}

#authBox [hidden], .recovery-phrase[hidden], .recovery-phrase [hidden], #settingsRecovery [hidden] { display: none !important; }
.auth-forgot { display: block; margin: 4px 0 0 auto; padding: 2px 0; background: none; border: 0; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.auth-forgot:hover { color: var(--text); }
#authBackup h3 { margin: 10px 0 8px; font-size: 17px; }
.recovery-help { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 0 0 10px; }
.recovery-tools { display: flex; align-items: center; gap: 8px; }
.recovery-copy-status { color: var(--muted); font-size: 12px; }
.recovery-words { list-style: decimal inside; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px 12px; padding: 14px; margin: 10px 0; background: var(--bg-soft); border: 1px solid var(--bdr-subtle); border-radius: var(--radius); font-size: 12px; }
.recovery-words li::marker { color: var(--muted); font-size: 10px; }
.recovery-confirm { display: flex; align-items: center; gap: 9px; margin: 14px 0 6px; font-size: 12px; cursor: pointer; }
#authBox .recovery-confirm input, .recovery-confirm input { width: 15px; height: 15px; padding: 0; margin: 0; flex: 0 0 15px; accent-color: var(--accent); }
#authRecoveryInput { width: 100%; box-sizing: border-box; resize: vertical; padding: 9px 11px; border-radius: var(--radius); border: 1px solid #1f2937; background: #020617; color: #f7f8fc; font: inherit; line-height: 1.5; }
#authRecoveryInput:focus-visible { outline: 1px solid var(--accent2); }
@media (max-width: 360px) { .recovery-words { gap: 7px; padding: 10px; font-size: 11px; } }

.auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 10px;
}

.auth-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px solid var(--bdr-subtle);
}

.auth-tab {
  border: 0;
  border-radius: var(--radius);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .08s ease;
}
.auth-tab.is-active {
  background: var(--accent); /* blå, ingen gradient */
  color: #f9fafb;
  transform: translateY(-1px);
}

.auth-close {
  margin-left: auto;
}

.auth-msg {
  min-height: 18px;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 6px;
}
.auth-msg:empty { display: none; }
.auth-primary:disabled, #settingsRecoverySave:disabled { opacity: .45; cursor: not-allowed; }

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 8px 0;
  font-size: 13px;
}

.field-label {
  color: var(--muted);
}

#authBox input {
  width: 100%;
  padding: 9px 11px;
  border-radius: var(--radius);
  border: 1px solid #1f2937;
  background: #020617;
  color: #f7f8fc;
  font-size: 14px;
  outline: none;
  transition: border-color .15s ease, background .15s ease;
}
#authBox input::placeholder {
  color: #6b7280;
}
#authBox input:focus {
  border-color: var(--accent2);
  background: #020617;
}

/* Auth actions */
.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  align-items: center;
}

.auth-primary {
  flex-shrink: 0;
}

/* ---------- WALLET MODAL ---------- */
.wallet-modal-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 2200;
  background: rgba(0, 0, 0, .68);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.wallet-modal-backdrop[hidden] { display: none; }
.wallet-modal {
  display: flex;
  flex-direction: column;
  width: min(680px, 100%);
  height: min(680px, calc(100dvh - 40px));
  max-height: calc(100dvh - 40px);
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 14px;
  background: var(--bg-soft);
  color: var(--text);
  overflow: hidden;
  box-shadow: none;
}
.wallet-modal *, .vip-modal *, .stats-modal * { min-width: 0; }
.wallet-modal-header { flex-shrink: 0; padding: 0 0 20px; }
.wallet-modal-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.wallet-modal-title { font-size: 24px; font-weight: 650; line-height: 1.25; color: var(--soft); }
.wallet-modal-subtitle { margin-top: 6px; font: 14px/1.5 var(--font-main); color: var(--muted); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.wallet-modal-close {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}
.wallet-modal-close:hover { background: var(--panel); color: var(--text); }
.wallet-tab-nav, .deposit-asset-toggle { display: grid; gap: 4px; padding: 4px; border: 1px solid rgba(148,163,184,.14); border-radius: 10px; background: var(--bg); }
.wallet-tab-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 20px; }
.deposit-asset-toggle { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.wallet-tab-btn, .deposit-asset-button { min-height: 42px; padding: 8px 12px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font: 600 14px var(--font-main); cursor: pointer; }
.wallet-tab-btn.is-active, .deposit-asset-button[aria-checked="true"] { background: var(--panel); color: var(--soft); }
.wallet-tab-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 2px 2px; font-size: 14px; }
.wallet-tab-panel { display: flex; flex-direction: column; min-height: 100%; }
.wallet-tab-panel[hidden] { display: none; }
.wallet-modal .wallet-section { margin: 0 0 20px; padding: 0; border: 0; background: transparent; }
.wallet-section-title { margin-bottom: 8px; font-size: 17px; font-weight: 600; color: var(--soft); }
.wallet-text { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.6; }
.wallet-label { display: block; margin: 0; font-size: 14px; color: #bbc5d4; line-height: 1.5; }
.wallet-deposit-card { display: flex; flex-direction: column; gap: 20px; }
.wallet-deposit-grid { display: grid; grid-template-columns: 176px minmax(0, 1fr); gap: 16px; align-items: start; }
.wallet-deposit-qr { display: flex; flex-direction: column; gap: 8px; }
.wallet-qr-box { display: grid; place-items: center; width: 176px; height: 176px; overflow: hidden; border-radius: 10px; background: var(--bg); }
.wallet-qr-placeholder, .wallet-qr-img { grid-area: 1 / 1; width: 176px; height: 176px; }
.wallet-qr-placeholder { display: grid; place-items: center; padding: 16px; text-align: center; font: 14px/1.5 var(--font-main); color: var(--muted); }
.wallet-qr-img { display: block; image-rendering: pixelated; }
.deposit-panel { gap: 12px; }
.deposit-status { display: flex; align-items: center; min-height: 20px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.deposit-panel:not([data-deposit-state="ready"]) .wallet-deposit-grid { visibility: hidden; }
.deposit-panel[data-deposit-state="ready"] .deposit-status { color: #9ddcbe; }
.deposit-panel[data-deposit-state="error"] .deposit-status { color: #fca5a5; }
.deposit-panel .wallet-qr-box { background: #fff; }
.deposit-panel .wallet-qr-placeholder { color: #475569; }
.deposit-panel .wallet-address { min-height: 44px; }
.deposit-panel .wallet-address-row button { min-width: 108px; }
.deposit-panel .deposit-detail { min-height: 3.2em; }
.deposit-panel .deposit-request { min-height: 44px; width: 100%; margin-top: auto; }
.deposit-panel button:disabled { opacity: .55; cursor: default; }
.deposit-asset-button:focus-visible { outline: 2px solid #78a9e8; outline-offset: 2px; }
.deposit-address-input { width: 100%; height: 44px; padding: 0; border: 0; outline: none; background: transparent; color: var(--text); font-family: ui-monospace, monospace; white-space: nowrap; }
.wallet-qr-meta { display: flex; flex-direction: column; gap: 4px; min-height: 20px; font: 13px/1.5 var(--font-main); color: var(--muted); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.wallet-deposit-info { display: flex; flex-direction: column; gap: 8px; }
.wallet-address-row { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px; border: 1px solid rgba(148,163,184,.18); border-radius: 10px; background: var(--bg); }
.wallet-address { flex: 1 1 100%; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; user-select: text; }
.wallet-help { font-size: 14px; color: var(--muted); line-height: 1.6; }
.wallet-actions-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.wallet-form { display: flex; flex-direction: column; gap: 18px; padding: 0; }
.withdraw-form { gap: 12px; }
.withdraw-available { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid rgba(148,163,184,.14); border-radius: 8px; background: var(--bg); }
.withdraw-available .wallet-label { font-size: 12px; }
.withdraw-balance-values { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 14px; font-variant-numeric: tabular-nums; }
.withdraw-balance-values strong { color: var(--soft); font-weight: 600; }
.withdraw-balance-values span { color: var(--muted); font-size: 13px; }
.withdraw-amount-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.withdraw-unit-toggle { width: 132px; padding: 2px; border-radius: 8px; }
.withdraw-unit-toggle .deposit-asset-button { min-height: 28px; padding: 4px 10px; font-size: 12px; border-radius: 5px; }
.withdraw-amount-row { display: flex; gap: 8px; }
.withdraw-amount-row .wallet-input { width: 100%; flex: 1; }
.withdraw-max, .withdraw-use-balance { flex-shrink: 0; border: 1px solid rgba(148,163,184,.22); border-radius: 8px; background: var(--panel); color: var(--soft); font: 600 13px var(--font-main); padding: 8px 12px; cursor: pointer; }
.withdraw-max { min-width: 56px; }
.withdraw-conversion { min-height: 18px; color: var(--muted); font-size: 12px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.withdraw-fee-note { font-size: 12px; }
.withdraw-limit { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid rgba(246,199,107,.25); border-radius: 8px; background: rgba(246,199,107,.04); color: #ead09c; font-size: 13px; line-height: 1.5; }
.withdraw-limit > span { flex: 1 1 220px; }
.withdraw-form .withdraw-submit { width: 100%; }
.withdraw-form button:disabled { opacity: .55; cursor: default; }
.withdraw-form button:focus-visible { outline: 2px solid #78a9e8; outline-offset: 2px; }
.wallet-field { display: flex; flex-direction: column; gap: 8px; }
.wallet-input { min-height: 44px; padding: 10px 12px; border: 1px solid rgba(148,163,184,.22); border-radius: 8px; background: var(--bg); color: var(--text); font: 15px/1.4 var(--font-main); }
.wallet-input:focus { outline: none; border-color: #528cce; }
.wallet-error { margin-top: 0; padding: 12px; border: 1px solid rgba(249,115,115,.25); border-radius: 8px; background: rgba(249,115,115,.04); color: #fca5a5; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.wallet-footer-row { margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(148,163,184,.14); display: flex; justify-content: flex-end; }
.wallet-tab-panel > .wallet-footer-row { margin-top: auto; padding-top: 8px; }
.wallet-modal .btn, .vip-modal .btn, .stats-modal .btn { min-height: 42px; padding: 10px 14px; font: 600 14px/1.4 var(--font-main); justify-content: center; }
.wallet-modal .btn:hover, .vip-modal .btn:hover, .stats-modal .btn:hover { transform: none; }
.wallet-modal .btn-accent:hover, .vip-modal .btn-accent:hover, .stats-modal .btn-accent:hover { background: var(--accent); }
:is(.wallet-modal, .vip-modal, .stats-modal, .support-widget, .nav-notifications-menu, .nav-balance-menu) :is(button, a, input, textarea):focus-visible { outline: 2px solid #78a9e8; outline-offset: 2px; }
@media (max-width: 640px) {
  .wallet-modal-backdrop { padding: 12px; }
  .wallet-modal { padding: 20px; height: min(820px, calc(100dvh - 24px)); max-height: calc(100dvh - 24px); }
  .deposit-panel .wallet-address { flex: 1 1 0; }
  .deposit-panel .wallet-address-row button { min-width: 62px; padding-inline: 8px; }
  .wallet-deposit-grid { grid-template-columns: minmax(0, 1fr); }
  .wallet-deposit-qr { align-items: center; }
  .wallet-qr-meta { text-align: center; }
  .wallet-input { font-size: 16px; }
}

/* ---------- VIP MODAL ---------- */
.vip-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .68);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2200;

  padding: 12px;
}
.vip-modal-backdrop[hidden] {
  display: none;
}

.vip-modal {
  width: min(580px, 100%);
  height: min(680px, calc(100dvh - 24px));
  background: #151c30;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,.18);
  box-shadow: none;
  padding: 24px;
  display: flex;
  flex-direction: column;
  color: var(--text);
  overflow: hidden;
}

.vip-modal-header {
  padding: 0 0 20px;
  border-bottom: 0;
  margin-bottom: 0;

  flex-shrink: 0;
}

.vip-modal-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.vip-modal-title {
  font-size: 24px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
  color: var(--soft);
}

.vip-modal-close {
  border-radius: 8px;
  border: 1px solid rgba(148,163,184,.18);
  background: transparent;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  font-size: 23px;
  line-height: 1;
  padding: 0;

  flex-shrink: 0;
}

.vip-modal-close:hover {
  background: var(--panel-soft);
}

.vip-modal-subtitle {
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);

  line-height: 1.5;
  overflow-wrap: anywhere;
}

.vip-tab-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin: 0 0 20px;
  padding: 4px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--bdr-subtle);

  flex-shrink: 0;
}

.vip-tab-btn {
  border-radius: 7px;
  border: 0;
  min-height: 42px;
  padding: 0 12px;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  background: transparent;
  color: var(--muted);
  font-weight: 650;
}

.vip-tab-btn.is-active {
  background: var(--panel);
  color: var(--soft);
  font-weight: 600;
}

.vip-tab-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 0 2px 2px;

  overscroll-behavior: contain;
}

.vip-tab-panel[hidden] {
  display: none;
}

.vip-overview-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

.vip-overview-grid > div,
.vip-reward-row,
.vip-accordion {
  border-radius: var(--radius);
  border: 1px solid var(--bdr-subtle);
  background: var(--bg-soft);
}

.vip-overview-grid > div {
  padding: 16px;

  background: var(--bg);
}

.vip-overview-label {
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
  margin-bottom: 8px;
}

.vip-overview-main {
  font-size: 20px;
  font-weight: 600;

  line-height: 1.3;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.vip-overview-main span {
  font-family: var(--font-main);
}

.vip-overview-rank {
  display: flex;
  align-items: center;
  gap: 4px;
}

.vip-overview-rank span { min-width: 0; }
.vip-level-emblem { flex: 0 0 18px; width: 18px; height: 18px; object-fit: contain; }
.rank-emblem { display: inline-block; flex: 0 0 18px; width: 18px; height: 18px; object-fit: contain; vertical-align: middle; }

.vip-overview-progress {
  margin-bottom: 24px;
}

.vip-progress-bar {
  height: 8px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 0;
  overflow: hidden;
  margin-bottom: 5px;
}

.vip-progress-bar > i {
  display: block;
  height: 100%;
  background: var(--accent);
  width: 0;
  transition: width .25s ease;
}

.vip-accordion {
  margin-bottom: 10px;
}

.vip-acc-btn {
  width: 100%;
  padding: 16px;
  background: transparent;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.vip-acc-btn span:first-child {
  font-size: 15px;
  font-weight: 550;
}

.vip-acc-icon {
  font-size: 16px;
  opacity: .7;
  transition: transform .16s ease, opacity .16s ease;
}

.vip-acc-body {
  display: none;
  padding: 0 16px 16px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.vip-accordion.is-open .vip-acc-body {
  display: block;
}

.vip-accordion.is-open .vip-acc-icon {
  transform: rotate(90deg);
  opacity: 1;
}

.vip-acc-body ul {
  padding-left: 18px;
  margin: 4px 0 0;
}

.vip-acc-body li {
  margin: 8px 0;
}

.vip-detail-intro { margin: 0 0 14px; }
.vip-acc-body .vip-rank-list { display: grid; gap: 12px; padding: 0; margin: 0; list-style: none; }
.vip-acc-body .vip-rank-card { margin: 0; padding: 16px; background: var(--bg); border: 1px solid var(--bdr-subtle); border-radius: var(--radius); }
.vip-rank-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.vip-rank-heading img, .vip-host-unlock img { width: 38px; height: 38px; flex-shrink: 0; object-fit: contain; }
.vip-rank-heading h3, .vip-qualification h3 { margin: 0; color: var(--soft); font-size: 15px; font-weight: 600; }
.vip-rank-benefits { margin: 0; }
.vip-rank-benefits > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--bdr-subtle); }
.vip-rank-benefits dd { margin: 0; color: var(--soft); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.vip-rank-benefits dd.is-unavailable { color: var(--muted); font-size: 13px; font-weight: 400; }
.vip-rank-extra { border-top: 1px solid var(--bdr-subtle); padding-top: 10px; margin: 4px 0 0; color: var(--text); }
.vip-qualification { margin-top: 24px; }
.vip-detail-list { margin: 10px 0 0; }
.vip-detail-list > div { padding: 12px 0; border-bottom: 1px solid var(--bdr-subtle); }
.vip-detail-list dt { color: var(--text); font-weight: 600; margin-bottom: 4px; }
.vip-detail-list dd { margin: 0; }
.vip-host-unlock { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--bdr-subtle); border-radius: var(--radius); background: var(--bg); }
.vip-host-unlock span, .vip-host-unlock strong { display: block; }
.vip-host-unlock span { font-size: 12px; }
.vip-host-unlock strong { color: var(--soft); font-size: 15px; }
.vip-host-note { margin: 14px 0 0; font-size: 13px; }

.vip-section-title {
  font-size: 15px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
  margin: 12px 0;

  font-weight: 600;
}

.vip-section-title--spaced {
  margin-top: 8px;
}

.vip-reward-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vip-reward-row {
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;

  background: var(--bg);
  flex-wrap: wrap;
}

.vip-reward-main {
  display: flex;
  flex-direction: column;
  gap: 6px;

  flex: 1 1 200px;
}

.vip-reward-title {
  font-size: 15px;
  font-weight: 600;
}

.vip-reward-sub {
  font-size: 14px;
  color: var(--muted);

  line-height: 1.5;
}

.vip-reward-pill {
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  border: 1px solid var(--bdr-subtle);
  color: var(--muted);
  white-space: nowrap;
}

.vip-reward-row.is-locked {
  opacity: 1;
}

.vip-reward-row.is-unlocked {
  opacity: 1;
}

.vip-reward-row.is-unlocked .vip-reward-pill {
  border-color: rgba(98,213,140,.16);
  background: rgba(98,213,140,.08);
  color: #91dbad;
  font-weight: 600;
}

@media (max-width: 640px) {
  .vip-modal { padding: 18px; }
  .vip-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 16px;
  }
  .vip-overview-grid > div { padding: 12px; }
  .vip-overview-grid > div:first-child { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .vip-overview-grid > div:first-child .vip-overview-label { margin: 0; }
  .vip-overview-main { font-size: 16px; }
  .vip-overview-rank { font-size: clamp(12px, 3.2vw, 16px); white-space: nowrap; overflow-wrap: normal; }
  .vip-acc-btn { padding: 12px; }
  .vip-acc-body { padding: 0 12px 12px; }
  .vip-acc-body .vip-rank-card { padding: 12px; }
}
#vipRwRakebackClaimBtn[disabled] {
  opacity: .55;
  cursor: not-allowed;
}

.vip-reward-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.vip-reward-claim[disabled] {
  opacity: .55;
  cursor: not-allowed;
  filter: grayscale(.2);
}

@media (max-width: 640px) {
  .vip-reward-row { flex-wrap: nowrap; gap: 10px; padding: 12px; }
  .vip-reward-main { flex: 1 1 0; min-width: 0; }
  .vip-reward-actions { flex: 0 0 auto; flex-direction: column; align-items: flex-end; }
}

/* ---------- STATISTICS MODAL ---------- */
.stats-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .68);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2200;
  padding: 18px;
}

.stats-modal-backdrop[hidden] {
  display: none;
}

.stats-modal {
  width: min(480px, 100%);
  background: var(--bg-soft);
  border: 1px solid var(--bdr-subtle);
  border-radius: 14px;
  box-shadow: none;
  color: var(--text);
  padding: 24px;

  max-height: calc(100dvh - 36px);
  overflow-y: auto;
}

.stats-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--bdr-subtle);
}

.stats-modal-user {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
  line-height: 1.1;
  color: var(--soft);
}

.stats-modal-joined {
  margin-top: 5px;
  font-size: 14px;
  color: var(--muted);

  line-height: 1.5;
}

.stats-modal-close {
  border-radius: 8px;
  border: 1px solid var(--bdr-subtle);
  background: var(--bg-soft);
  color: var(--soft);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0;

  flex-shrink: 0;
}

.stats-modal-close:hover {
  background: var(--panel-soft);
}

.stats-progress-block {
  padding: 13px 0 12px;
  border-bottom: 1px solid var(--bdr-subtle);
}

.stats-progress-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.stats-progress-label {
  color: var(--muted);
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
}

.stats-progress-value {
  color: var(--soft);
  font-weight: 650;
  font-size: 14px;
}

.stats-progress-bar {
  height: 8px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px solid var(--bdr-subtle);
  overflow: hidden;
}

.stats-progress-bar > i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width .25s ease;
}

.stats-ranks { display: flex; justify-content: space-between; gap: 16px; margin-top: 10px; }
.stats-rank { display: grid; gap: 4px; align-content: start; }
.stats-rank--next { text-align: right; justify-items: end; }
.stats-rank-label { color: var(--muted); font-size: 12px; line-height: 1.4; }
.stats-rank-name { display: flex; align-items: center; gap: 6px; min-height: 30px; color: var(--text); font-size: 13px; font-weight: 600; line-height: 1.3; }
.stats-rank-name img { width: 30px; height: 30px; flex-shrink: 0; object-fit: contain; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding-top: 12px;
}

.stats-cell {
  min-width: 0;
  border: 1px solid var(--bdr-subtle);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 14px;
}

.stats-label {
  color: var(--muted);
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 8px;
}

.stats-value {
  color: var(--soft);
  font-size: 18px;
  font-weight: 650;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.stats-value-secondary { margin-top: 5px; color: var(--muted); font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }

@media (max-width: 420px) {
  .stats-modal { padding: 18px; }
  .stats-cell { padding: 12px; }
  .stats-label { font-size: 13px; }
  .stats-value { font-size: 16px; }
  #statsWagered { font-size: 14px; }
  .stats-value-secondary { font-size: 12px; }
}

/* ---------- GLOBAL TOAST ---------- */
.wallet-toast {
  position: fixed;
  left: 20px;
  top: 82px;
  right: auto;
  bottom: auto;
  z-index: 2400;
  width: min(360px, calc(100vw - 32px));
  min-width: 0;
  max-width: min(360px, calc(100vw - 32px));
  padding: 16px;
  border-radius: 10px;
  border: 1px solid var(--bdr-subtle);
  background: var(--bg-soft);
  color: var(--text);
  box-shadow: none;
  overflow: hidden;
  opacity: 0;
  transform: translateX(-14px);
  pointer-events: none;
  transition:
  opacity .18s ease,
  transform .18s ease,
  border-color .18s ease;

  overflow-wrap: anywhere;
}

.wallet-toast.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.wallet-toast.is-success {
  border-color: rgba(98,213,140,.28);
}

.wallet-toast.is-error {
  border-color: rgba(249,115,115,.32);
}

.wallet-toast.is-info {
  border-color: var(--bdr-subtle);
}

.wallet-toast-title {
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
  color: var(--soft);
  margin-bottom: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;

  font-weight: 600;
}

.wallet-toast-message {
  font-size: 14px;
  line-height: 1.5;
  color: #bbc5d4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

@media (max-width: 640px) {
  .wallet-toast {
    left: 12px;
    top: 76px;
    right: 12px;
    bottom: auto;
    min-width: 0;
    width: auto;
    max-width: none;

    z-index: 2400;
    border-radius: 10px;
    padding: 16px;
    background: var(--bg-soft);
    overflow-wrap: anywhere;
  }
}

.wallet-toast.is-clickable { pointer-events: auto; cursor: pointer; }
.wallet-toast.is-clickable:focus-visible { outline: 2px solid #78a9e8; outline-offset: 3px; }
.wallet-toast[hidden] { display: none; }

/* ---------- NOTIFICATIONS / SUPPORT ---------- */
.nav-authed {
  gap: 8px;
}

.nav-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  border: 1px solid #1f2937;
  background: var(--bg-soft);
  color: #e5e7eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  padding: 0;
}

.nav-icon-btn:hover,
.nav-icon-btn[aria-expanded="true"] {
  background: #020617;
  border-color: #334155;
  color: #f8fafc;
}

.nav-icon-btn svg {
  display: block;
  flex-shrink: 0;
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-notifications {
  position: relative;
}

.nav-notification-badge {
  position: absolute;
  right: 7px;
  top: 7px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--accent);
  border: 2px solid var(--bg-soft);
}

.nav-notifications-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(380px, calc(100vw - 24px));
  border-radius: 12px;
  border: 1px solid var(--bdr-subtle);
  background: var(--bg-soft);
  z-index: 60;
  overflow: hidden;
}

.nav-notifications-head,
.nav-notifications-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid #1f2937;
  color: var(--muted);
  font-size: 15px;
  text-transform: none;
  letter-spacing: 0;
}

.nav-notifications-foot {
  border-top: 1px solid #1f2937;
  border-bottom: 0;
  justify-content: flex-end;
}

.nav-notifications-head button,
.nav-notifications-foot button {
  border: 0;
  background: transparent;
  color: #c2d5ff;
  padding: 6px;
  cursor: pointer;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;

  min-height: 36px;
}

.nav-notifications-list {
  max-height: min(420px, calc(100dvh - 230px));
  overflow-y: auto;

  overscroll-behavior: contain;
}

.nav-notification-item {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #1f2937;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 16px;
  cursor: pointer;
  transition: background .14s ease;
}

.nav-notification-item:hover {
  background: rgba(148, 163, 184, .08);
}

.nav-notification-item.is-unread {
  background: rgba(17,100,191,.07);

  border-left: 3px solid #528cce;
  padding-left: 13px;
}

.nav-notification-title {
  font-size: 15px;
  font-weight: 650;
  margin-bottom: 6px;

  line-height: 1.4;
}

.nav-notification-msg {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  display: -webkit-box;
  max-height: 4.5em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  white-space: normal;
  overflow-wrap: anywhere;
}

.nav-notification-item.is-expanded .nav-notification-msg {
  display: block;
  max-height: none;
  overflow: visible;
  -webkit-line-clamp: unset;
}

.nav-notification-meta,
.nav-notifications-empty {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}

.nav-notifications-empty {
  padding: 24px 16px;

  text-align: center;
}

.support-widget {
  position: fixed;
  right: 18px;
  bottom: 18px;
  /* Persistent global UI: stay above the temporary soft-navigation cover
  (1500), while remaining below the navbar/navigation progress layer. */
  z-index: 1600;
}

.support-widget-toggle {
  border-radius: var(--radius);
  border: 1px solid var(--bdr-subtle);
  background: var(--accent);
  color: #fff;
  min-height: 42px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.support-widget-icon,
.support-widget-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.support-widget-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.support-widget-unread {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #fff;
}

.support-widget-panel {
  width: min(390px, calc(100vw - 24px));
  height: min(680px, calc(100dvh - 96px));
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.support-phone-shell {
  width: 100%;
  height: 100%;
  border-radius: 22px;
  border: 1px solid rgba(148,163,184,.18);
  background: var(--bg);
  padding: 5px;
  overflow: hidden;
}

.support-phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 17px;
  border: 0;
  background: var(--bg-soft);
  color: var(--text);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.support-widget-header {
  min-height: 76px;
  padding: 14px;
  border-bottom: 1px solid #1f2937;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg-soft);
  flex-shrink: 0;
}

.support-widget-header-main {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.support-widget-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex-shrink: 0;
}

.support-widget-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--soft);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.support-widget-status {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.support-widget-close,
.support-widget-back {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #1f2937;
  background: var(--bg-soft);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
}

.support-widget-close:hover,
.support-widget-back:hover {
  background: #020617;
}

.support-widget-back svg,
.support-widget-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.support-response-time {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 10px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--bdr-subtle);
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  flex-shrink: 0;
}

.support-response-time-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.support-response-time-label svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.support-response-time strong {
  color: var(--soft);
  font-weight: 600;
  white-space: nowrap;
}

.support-widget-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bg-soft);

  overscroll-behavior: contain;
}

.support-home-view,
.support-messages-view {
  flex: 1;
  min-height: min-content;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.support-home-hero {
  border: 0;
  border-radius: var(--radius-lg);
  background: transparent;
  padding: 8px 0 12px;
}

.support-home-eyebrow,
.support-section-label {
  font-size: 14px;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 8px;
}

.support-home-title {
  margin: 0;
  color: var(--soft);
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -0.035em;
  font-weight: 650;
}

.support-recent-card,
.support-history-item,
.support-empty-card,
.support-closed-panel {
  border: 1px solid #1f2937;
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
}

.support-recent-card,
.support-history-item {
  width: 100%;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  padding: 16px;

  background: var(--bg);
}

.support-recent-card:hover,
.support-history-item:hover {
  background: var(--panel-soft);
}

.support-recent-top,
.support-history-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;

  flex-wrap: wrap;
}

.support-recent-title,
.support-history-title {
  color: var(--soft);
  font-size: 14px;
  font-weight: 700;
}

.support-recent-status,
.support-history-status {
  border: 1px solid #1f2937;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  padding: 3px 7px;
  white-space: nowrap;
}

.support-recent-preview,
.support-history-preview {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.support-recent-meta,
.support-history-meta {
  color: var(--muted);
  font-size: 12px;
  margin-top: 8px;
}

.support-primary-action {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
}

.support-primary-action:hover {
  filter: brightness(1.05);
}

.support-action-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .10);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.support-action-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.support-messages-list {
  display: grid;
  gap: 8px;
}

.support-messages-cta {
  margin-top: auto;
}

.support-empty-card {
  padding: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.support-bottom-nav {
  position: sticky;
  bottom: -16px;
  margin: auto -16px -16px;
  padding: 10px 16px;
  border-top: 1px solid #1f2937;
  background: var(--bg-soft);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  flex-shrink: 0;
}

.support-bottom-tab {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 550;
}

.support-bottom-tab:hover {
  background: var(--bg-soft);
  color: var(--text);
}

.support-bottom-tab.is-active {
  background: var(--panel);
  border-color: #1f2937;
  color: var(--soft);
}

.support-bottom-tab svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.support-chat-scroll {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.support-widget-msg {
  max-width: 88%;
  border-radius: var(--radius);
  border: 1px solid #1f2937;
  background: var(--bg);
  padding: 12px;
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.support-widget-msg.user {
  align-self: flex-end;
  background: rgba(17, 100, 191, .18);
}

.support-widget-msg.admin {
  align-self: flex-start;
}

.support-widget-msg.system {
  align-self: center;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.support-widget-msg-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;

  line-height: 1.5;
}

.support-closed-panel {
  margin-top: 8px;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.support-closed-title {
  color: var(--soft);
  font-size: 15px;
  font-weight: 700;
}

.support-closed-text {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.support-closed-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.support-rating-stars {
  display: flex;
  gap: 6px;
}

.support-rating-star {
  width: 40px;
  height: 40px;
  min-height: 34px;
  border-radius: var(--radius);
  border: 1px solid #1f2937;
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0;
}

.support-rating-star.is-active,
.support-rating-star:hover {
  color: #facc15;
  border-color: rgba(250, 204, 21, .45);
  background: rgba(250, 204, 21, .10);
}

.support-rating-feedback {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  border-radius: var(--radius);
  border: 1px solid #1f2937;
  background: var(--panel);
  color: var(--text);
  padding: 8px 10px;
}

.support-widget-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
  padding: 14px;
  border-top: 1px solid #1f2937;
  background: var(--bg-soft);
  flex-shrink: 0;
}

.support-widget-form input {
  min-width: 0;
  height: 44px;
  border-radius: var(--radius);
  border: 1px solid #1f2937;
  background: var(--bg);
  color: var(--text);
  padding: 0 11px;
  outline: none;

  font: 16px var(--font-main);
}

.support-widget-form input:focus {
  border-color: var(--accent);
}

.support-widget-form button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.support-widget-form button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 640px) {
  .support-widget {
    right: 12px;
    bottom: 12px;
  }

  .support-widget-panel {
    width: calc(100vw - 24px);
    height: min(680px, calc(100dvh - 96px));
  }

  .support-home-title {
    font-size: 26px;

    line-height: 1.25;
    font-weight: 650;
  }

  .nav-notifications-menu {
    position: fixed;
    top: calc(var(--nav-h, 76px) + 8px);
    right: 12px;
    left: 12px;
    width: auto;

    border-radius: 12px;
  }
}

/* ---------- RECOMMENDED GAMES ---------- */

.recommended-games-title {
  margin: 0;
}

.recommended-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.recommended-card {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid var(--bdr-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
  cursor: pointer;
  text-decoration: none;
  transform: translate3d(0, 0, 0);
  transition:
    transform .12s ease,
    border-color .12s ease,
    box-shadow .12s ease,
    filter .12s ease;
}

.recommended-card:hover {
  border-color: #334155;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .22);
  filter: brightness(1.03);
  text-decoration: none;
  transform: translate3d(0, -8px, 0);
}

.recommended-card:focus-visible {
  outline: 2px solid rgba(96, 165, 250, .75);
  outline-offset: 3px;
}

.recommended-card-img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

@media (max-width: 1180px) {
  .recommended-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .recommended-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .recommended-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .recommended-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .recommended-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
