:root {
  --bg: #0c0f14;
  --bg-elev: #141a22;
  --bg-elev-2: #1a222d;
  --border: #2a3544;
  --text: #e8eef6;
  --muted: #8b9bb0;
  --accent: #e74c3c;
  --accent-2: #f39c12;
  --ok: #2ecc71;
  --info: #3498db;
  --danger: #e74c3c;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --radius: 12px;
  --font-display: "Rajdhani", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(231, 76, 60, 0.18), transparent 55%),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: auto, 48px 48px, 48px 48px;
  z-index: 0;
}

.layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr) minmax(240px, 280px);
  gap: 16px;
  align-items: start;
  max-width: 1680px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}

.app {
  position: relative;
  min-width: 0;
}

.saved-rail {
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 24px);
  align-self: start;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.saved-rail-inner {
  margin-bottom: 0;
  max-height: calc(100vh - 24px);
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.history-panel {
  flex: 1 1 auto;
}

.saved-hint {
  margin: 0 0 10px;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.35;
}

.saved-actions-top {
  margin-bottom: 10px;
}

.saved-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 2px;
  min-height: 0;
}

.saved-empty {
  margin: 8px 0 0;
  font-size: 0.88rem;
}

.saved-card {
  background: #0d1218;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 10px 8px;
}

.saved-card-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 6px;
}

.saved-card .player-cell a {
  font-size: 0.95rem;
}

.saved-card-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 4px;
  line-height: 1.35;
}

.saved-card-ff {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.saved-card-ff .ff-value {
  font-size: 1rem;
}

.saved-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.btn-sm {
  padding: 6px 10px;
  font-size: 0.8rem;
}

.btn-save {
  background: transparent;
  color: #ffd79a;
  border-color: rgba(243, 156, 18, 0.45);
  padding: 7px 12px;
  font-size: 0.85rem;
}

.btn-save:hover:not(:disabled) {
  background: rgba(243, 156, 18, 0.1);
}

.btn-save.saved {
  color: var(--ok);
  border-color: rgba(46, 204, 113, 0.45);
}

.btn-remove {
  background: transparent;
  color: #ff8a7a;
  border-color: rgba(231, 76, 60, 0.4);
  padding: 6px 10px;
  font-size: 0.8rem;
}

.btn-remove:hover:not(:disabled) {
  background: rgba(231, 76, 60, 0.1);
}

.discover-box {
  grid-column: 1 / -1;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  padding: 12px 14px;
}

.discover-title {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.95rem;
  color: #c5d2e3;
  margin-bottom: 4px;
}

.discover-hint {
  margin: 0 0 10px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}

.discover-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: end;
}

.discover-check {
  grid-column: auto;
  margin: 0;
}

.discover-max {
  min-width: 120px;
}

.networth-cell {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.networth-value {
  font-weight: 600;
  color: var(--accent, #5eead4);
  letter-spacing: 0.02em;
}

.networth-line {
  color: var(--accent, #5eead4);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.hero {
  margin-bottom: 22px;
}

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

.hero-top .hero-badge {
  margin-bottom: 0;
}

.hero-account {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-user {
  font-size: 0.85rem;
  color: var(--muted);
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--accent-2);
  border: 1px solid rgba(243, 156, 18, 0.35);
  background: rgba(243, 156, 18, 0.08);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.2vw, 2.15rem);
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.hero-sub {
  margin: 0;
  color: var(--muted);
  max-width: 52ch;
}

.panel {
  background: linear-gradient(180deg, var(--bg-elev), var(--bg-elev-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 18px 16px;
  margin-bottom: 16px;
}

.panel-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: #c5d2e3;
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-head .panel-title {
  margin-bottom: 0;
}

.panel-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.config-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px 14px;
  align-items: end;
}

.field-wide {
  grid-column: 1 / -1;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.86rem;
  color: var(--muted);
}

.field input[type="password"],
.field input[type="number"],
.field input[type="search"],
.field input[type="text"],
.sort-field select {
  background: #0d1218;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  outline: none;
}

.field input:focus,
.sort-field select:focus,
.search-field input:focus {
  border-color: rgba(231, 76, 60, 0.55);
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.12);
}

.checkbox-field {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  grid-column: 1 / -1;
  color: var(--text);
}

.checkbox-field input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 0.95rem;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(180deg, #ef5a4a, #c0392b);
  color: #fff;
  border-color: #a93226;
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.06);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.04);
}

.btn-attack {
  background: linear-gradient(180deg, #3498db, #2471a3);
  color: #fff;
  border-color: #1a5276;
  padding: 7px 12px;
  font-size: 0.85rem;
}

.btn-copy {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
  padding: 7px 12px;
  font-size: 0.85rem;
}

.btn-copy.copied {
  border-color: var(--ok);
  color: var(--ok);
}

.status-line {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  min-height: 1.3em;
}

.status-line.error {
  color: #ff8a7a;
}

.status-line.ok {
  color: #8de8b0;
}

.tos {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.85rem;
}

.help-box {
  margin: 10px 0 12px;
  padding: 12px 14px;
  border: 1px solid rgba(231, 76, 60, 0.35);
  background: rgba(231, 76, 60, 0.08);
  border-radius: 8px;
  color: var(--text);
}

.help-box p {
  margin: 0 0 8px;
}

.help-box ul {
  margin: 0;
  padding-left: 1.2em;
}

.help-box li {
  margin: 4px 0;
}

.help-box code {
  font-size: 0.9em;
  color: #ffd79a;
}

.help-box a {
  color: #7ec8ff;
}

.tos summary {
  cursor: pointer;
  color: #aebccc;
}

.tos-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 0.8rem;
}

.tos-table th,
.tos-table td {
  border: 1px solid var(--border);
  padding: 8px;
  text-align: left;
  vertical-align: top;
}

.tos-table th {
  background: rgba(0, 0, 0, 0.25);
  color: #c5d2e3;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.stat-card.danger {
  border-color: rgba(231, 76, 60, 0.35);
}

.stat-card.ok {
  border-color: rgba(46, 204, 113, 0.3);
}

.stat-card.wide {
  grid-column: span 2;
}

.stat-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 4px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
}

.stat-value.small {
  font-size: 1.05rem;
  font-weight: 600;
}

.filters-panel {
  padding-top: 14px;
  padding-bottom: 14px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  justify-content: space-between;
}

.sort-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 0.86rem;
}

.sort-field select {
  min-width: 160px;
}

.search-field {
  flex: 1;
  min-width: 200px;
  max-width: 360px;
}

.search-field input {
  width: 100%;
  background: #0d1218;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
}

.table-wrap {
  overflow-x: auto;
}

.members-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.members-table th {
  text-align: left;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  padding: 4px 6px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  user-select: none;
}

.th-sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin: 0;
  padding: 6px 4px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 6px;
}

.th-sort:hover,
.th-sort:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  outline: none;
}

.th-sort.is-active {
  color: #ffd79a;
}

.sort-ind {
  font-size: 0.7rem;
  letter-spacing: 0;
  text-transform: none;
  opacity: 0.35;
}

.sort-ind::after {
  content: "↕";
}

th[aria-sort="ascending"] .sort-ind {
  opacity: 1;
  color: var(--accent-2);
}

th[aria-sort="ascending"] .sort-ind::after {
  content: "▲";
}

th[aria-sort="descending"] .sort-ind {
  opacity: 1;
  color: var(--accent-2);
}

th[aria-sort="descending"] .sort-ind::after {
  content: "▼";
}

.sort-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.members-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(42, 53, 68, 0.7);
  vertical-align: middle;
}

.members-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.player-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.player-cell a {
  color: #7ec8ff;
  text-decoration: none;
  font-weight: 600;
}

.player-cell a:hover {
  text-decoration: underline;
}

.player-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.times-pill {
  display: inline-block;
  background: rgba(231, 76, 60, 0.12);
  border: 1px solid rgba(231, 76, 60, 0.35);
  color: #ffb4aa;
  font-family: var(--font-display);
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  min-width: 2.2em;
  text-align: center;
}

.money {
  font-variant-numeric: tabular-nums;
  color: var(--ok);
  font-weight: 600;
}

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

.time-cell {
  white-space: nowrap;
}

.time-cell .rel {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
}

.last-action-cell .la-status {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  margin-bottom: 2px;
}

.la-online {
  color: #7dffa0;
  border-color: rgba(46, 204, 113, 0.45);
  background: rgba(46, 204, 113, 0.1);
}

.la-idle {
  color: #ffe08a;
  border-color: rgba(241, 196, 15, 0.4);
  background: rgba(241, 196, 15, 0.1);
}

.la-offline {
  color: #a8b4c4;
  border-color: rgba(149, 165, 166, 0.35);
  background: rgba(149, 165, 166, 0.08);
}

.action-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.ff-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 72px;
  margin-right: 4px;
}

.ff-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}

.ff-easy { color: #2ecc71; }
.ff-mid { color: #f1c40f; }
.ff-hard { color: #e67e22; }
.ff-brutal { color: #e74c3c; }
.ff-unknown { color: var(--muted); }

.ff-est {
  font-size: 0.8rem;
  color: var(--muted);
}

.empty {
  margin: 16px 0 4px;
  color: var(--muted);
  text-align: center;
}

.footer {
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer a {
  color: #8eb7d9;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 1200px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .saved-rail {
    position: relative;
    top: 0;
    max-height: none;
  }

  .wheel-rail {
    order: -1;
  }

  .saved-rail-inner {
    max-height: 320px;
    flex: none;
  }
}

@media (max-width: 900px) {
  .config-form {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .config-form {
    grid-template-columns: 1fr;
  }

  .stat-card.wide {
    grid-column: span 1;
  }
}

.field-optional {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.82em;
}

.stat-value a {
  color: inherit;
  text-decoration: none;
}

.stat-value a:hover {
  text-decoration: underline;
  color: #7ec8ff;
}

.age-cell {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.age-value {
  font-weight: 600;
  color: #ffd79a;
  letter-spacing: 0.02em;
}

.wheel-rail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wheel-swatch {
  height: 4px;
  border-radius: 999px;
  margin-top: 8px;
}

.wheel-stage {
  padding-bottom: 20px;
}

.wheel-layout {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(200px, 280px);
  gap: 20px;
  align-items: center;
}

.wheel-frame {
  position: relative;
  width: min(100%, 520px);
  margin: 0 auto;
  aspect-ratio: 1;
}

#wheel-canvas {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.45));
}

.wheel-pointer {
  position: absolute;
  top: -2px;
  left: 50%;
  z-index: 3;
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 26px solid #f39c12;
  transform: translateX(-50%);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.55));
}

.wheel-pointer::after {
  content: "";
  position: absolute;
  top: -26px;
  left: -7px;
  width: 14px;
  height: 14px;
  background: #f39c12;
  border-radius: 50%;
}

.wheel-hub {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  width: 84px;
  height: 84px;
  margin: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 3px solid rgba(243, 156, 18, 0.75);
  background: radial-gradient(circle at 35% 30%, #2a3340, #0d1218 70%);
  color: #ffd79a;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.wheel-hub:hover:not(:disabled) {
  filter: brightness(1.12);
}

.wheel-hub:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.wheel-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wheel-side .checkbox-field {
  grid-column: auto;
}

.wheel-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.winner-card {
  margin-top: 6px;
  background: #0d1218;
  border: 1px solid rgba(243, 156, 18, 0.4);
  border-radius: 10px;
  padding: 14px 14px 12px;
}

.winner-kicker {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--accent-2);
  margin-bottom: 4px;
}

.winner-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.45rem;
  color: #7ec8ff;
  text-decoration: none;
  line-height: 1.15;
}

.winner-name:hover {
  text-decoration: underline;
}

.winner-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.85rem;
}

.winner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

@media (max-width: 900px) {
  .wheel-layout {
    grid-template-columns: 1fr;
  }

  .wheel-frame {
    max-width: 420px;
  }
}

.field input[type="date"],
.field input[type="datetime-local"] {
  background: #0d1218;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  outline: none;
  color-scheme: dark;
}

.field input[type="date"]:focus,
.field input[type="datetime-local"]:focus {
  border-color: rgba(231, 76, 60, 0.55);
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.12);
}

.tickets-pill {
  display: inline-block;
  background: rgba(243, 156, 18, 0.12);
  border: 1px solid rgba(243, 156, 18, 0.4);
  color: #ffd79a;
  font-family: var(--font-display);
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  min-width: 2.2em;
  text-align: center;
}

.item-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  max-width: 320px;
}

.item-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-family: inherit;
  line-height: 1.3;
  color: #c5d2e3;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 8px;
}

.item-chip strong {
  color: #ffd79a;
  font-weight: 600;
}

.ticket-input {
  width: 72px;
  background: #0d1218;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 8px;
  font: inherit;
  font-variant-numeric: tabular-nums;
}

.ticket-input:focus {
  border-color: rgba(231, 76, 60, 0.55);
  outline: none;
}

.saved-card-tickets {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--muted);
}

.odds-cell {
  font-variant-numeric: tabular-nums;
  color: #8de8b0;
  font-weight: 600;
}

.config-form.zega-form {
  grid-template-columns: 1fr 1fr;
}

.zega-form .field-wide {
  grid-column: 1 / -1;
}

.date-hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.source-pill {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: var(--font-display);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
}

.source-pill.log {
  color: #8de8b0;
  border-color: rgba(46, 204, 113, 0.4);
}

.source-pill.events {
  color: #ffe08a;
  border-color: rgba(241, 196, 15, 0.4);
}

.item-filter {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.item-filter-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  margin-bottom: 8px;
}

.item-filter-label {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: #c5d2e3;
}

.item-search-field {
  flex: 1;
  min-width: 140px;
}

.item-search-field input {
  width: 100%;
  background: #0d1218;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
}

.item-search-field input:focus {
  border-color: rgba(231, 76, 60, 0.55);
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.12);
  outline: none;
}

.item-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 148px;
  overflow-y: auto;
  padding: 2px 0;
}

.item-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: #c5d2e3;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  cursor: pointer;
  font-family: inherit;
}

.item-filter-chip:hover,
.item-filter-chip:focus-visible {
  border-color: rgba(243, 156, 18, 0.45);
  color: var(--text);
  outline: none;
}

.item-filter-chip.is-on {
  border-color: rgba(243, 156, 18, 0.55);
  background: rgba(243, 156, 18, 0.14);
  color: #ffd79a;
}

.item-filter-chip strong {
  color: #ffd79a;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.item-chip {
  cursor: pointer;
}

.item-chip:hover,
.item-chip:focus-visible {
  border-color: rgba(243, 156, 18, 0.5);
  color: var(--text);
  outline: none;
}

.item-chip.is-on {
  border-color: rgba(243, 156, 18, 0.55);
  background: rgba(243, 156, 18, 0.14);
  color: #ffd79a;
}

.history-when {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}

.history-odds {
  font-size: 0.78rem;
  color: #8de8b0;
  margin-top: 4px;
}

.login-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.login-panel {
  width: min(420px, 100%);
}

.login-panel h1 {
  font-family: var(--font-display);
  font-size: 28px;
  margin: 10px 0 6px;
}
