/* FBM — Flunkyball Magdeburg
   Design language: calm, legible, confident.
   One accent (badge green), one team pair (green vs red), Elo numbers are the hero. */

:root {
  /* Brand (from the FBM badge) */
  --green: #2f9e53;
  --green-deep: #1e6b3c;
  --green-bright: #4dbb78;
  --red: #d13c3c;
  --red-deep: #a32424;
  --red-bright: #e07070;

  /* Surfaces & text (light) */
  --bg: #f2f4f1;
  --surface: #ffffff;
  --surface-2: #e8ece6;
  --text: #1a1e1b;
  --text-2: #5c665e;
  --line: #dbe1d9;
  --flash: #d9eede;
  --dot-dark: #23272b;
  --focus: var(--green-deep);
  --shadow: 0 1px 2px rgba(23, 29, 26, 0.05), 0 6px 20px rgba(23, 29, 26, 0.07);

  --radius: 14px;
  --bar-h: 56px;
  --tab-h: 60px;

  color-scheme: light;
}

:root[data-theme="dark"] {
  --green-bright: #4dbb78;
  --red-bright: #e07070;
  --bg: #101411;
  --surface: #181d19;
  --surface-2: #222923;
  --text: #edf1ec;
  --text-2: #a3afa5;
  --line: #2b332c;
  --flash: #24402f;
  --focus: var(--green-bright);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  padding: calc(var(--bar-h) + env(safe-area-inset-top)) 0 calc(var(--tab-h) + env(safe-area-inset-bottom));
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

input,
select {
  font: inherit;
  color: inherit;
}

.hidden {
  display: none !important;
}

/* ---------- top app bar ---------- */
.appbar {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: calc(var(--bar-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  z-index: 10;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  padding: 6px 10px 6px 6px;
  margin: -6px -10px -6px -6px; /* keep the touch target big without shifting layout */
  border-radius: 12px;
}

.brand:active {
  background: var(--surface-2);
}

.brand-badge {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex: none;
  display: block;
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--green-deep);
}

:root[data-theme="dark"] .brand-name {
  color: var(--green-bright);
}

/* ---------- icon buttons (app bar, sheets, admin rows) ---------- */
.icon {
  border: 0;
  background: none;
  color: var(--text-2);
  padding: 10px;
  margin-right: -6px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: none;
  cursor: pointer;
}

.icon svg {
  width: 22px;
  height: 22px;
}

.icon:active {
  background: var(--surface-2);
}

/* ---------- layout ---------- */
main.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.view {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#simple-panel,
#smart-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}

.hint {
  color: var(--text-2);
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 4px 0;
}

.card.empty {
  color: var(--text-2);
  padding: 22px 16px;
  text-align: center;
}

.card-title {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 800;
}

/* ---------- buttons ---------- */
.btn {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  padding: 10px 16px;
  min-height: 44px;
  font-weight: 600;
  transition: filter 0.15s ease, transform 0.05s ease;
}

.btn:active {
  transform: scale(0.98);
}

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

.btn.primary {
  background: var(--green-deep);
  border-color: var(--green-deep);
  color: #fff;
}

:root[data-theme="dark"] .btn.primary {
  background: var(--green-bright);
  border-color: var(--green-bright);
  color: #0c130e;
}

.btn.danger {
  background: var(--red-deep);
  border-color: var(--red-deep);
  color: #fff;
}

.btn.big {
  width: 100%;
  font-size: 1.05rem;
}

.btn.winner-a {
  background: var(--green-deep);
  border-color: var(--green-deep);
  color: #fff;
}

.btn.winner-b {
  background: var(--red-deep);
  border-color: var(--red-deep);
  color: #fff;
}

/* ---------- forms / inputs ---------- */
input,
select {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  padding: 10px 12px;
  min-height: 44px;
}

input:focus-visible,
select:focus-visible,
button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.field:last-of-type {
  margin-bottom: 0;
}

.field label {
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-2);
}

.field input,
.field select {
  width: 100%;
}

.card.field {
  margin-bottom: 0;
}

/* plain forms (admin gate, admin settings, password) */
.form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form label {
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-2);
}

/* one-line forms: input + button on a row */
#form-add-player,
#form-smart-add {
  flex-direction: row;
  align-items: center;
}

#form-add-player input,
#form-smart-add input {
  flex: 1;
  min-width: 0;
}

#form-admin-auth .btn,
#form-admin-settings .btn,
#form-admin-password .btn {
  width: 100%;
}

/* ---------- ladder ---------- */
.ladder {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow);
}

.row .rank {
  width: 26px;
  flex: none;
  color: var(--text-2);
  font-weight: 700;
  font-size: 0.85rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.row .name {
  flex: 1;
  font-weight: 600;
  font-size: 1.05rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row .wl,
.row .pct {
  flex: none;
  width: 42px;
  text-align: right;
  font-weight: 600;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
}

.row .elo {
  font-size: 1.7rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.row.flash {
  animation: flash 1.4s ease;
}

@keyframes flash {
  0% {
    background: var(--flash);
  }
  100% {
    background: var(--surface);
  }
}

/* ladder rows: name / ELO are tappable */
.row .name,
.row .elo {
  border: 0;
  background: none;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  border-radius: 10px;
}

.row .name {
  text-align: left;
}

.row .elo {
  text-align: right;
  padding: 0 4px;
}

.row .name:active,
.row .elo:active {
  background: var(--surface-2);
}

/* ladder header row: W/G · % · ELO column labels.
   Identical box model to a data row (1px transparent border, same padding)
   → the labels sit pixel-exact over the values below. No letter-spacing:
   trailing tracking would pull right-aligned labels off the column's right
   edge. */
.row.head {
  background: none;
  border: 1px solid transparent;
  box-shadow: none;
  padding: 0 14px;
  color: var(--text-2);
}

.row.head .rank {
  visibility: hidden;
}

.row.head .wl,
.row.head .pct,
.row.head .elo {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

/* ---------- shuffle: segment control ---------- */
.seg {
  display: flex;
  background: var(--surface-2);
  border-radius: 12px;
  padding: 4px;
}

.seg-btn {
  flex: 1;
  border: 0;
  background: none;
  padding: 10px;
  border-radius: 9px;
  font-weight: 700;
  color: var(--text-2);
  min-height: 44px;
}

.seg-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

/* ---------- shuffle: simple ---------- */
#form-simple {
  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: center;
}

#form-simple label {
  font-weight: 700;
  color: var(--text-2);
}

#form-simple input {
  width: 88px;
  text-align: center;
}

#form-simple .btn {
  margin-left: auto;
}

.simple-result,
.smart-result {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.simple-result .step-row,
.smart-result .step-row {
  margin-top: 0;
}

.smart-result .gap {
  margin: 0;
}

.dots {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 10px 0 4px;
}

.dot {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dot.a {
  background: var(--dot-dark);
  color: #fff;
}

.dot.b {
  background: #fff;
  color: #222;
  border: 1px solid var(--line);
}

.dot.cur {
  box-shadow: 0 0 0 4px var(--green-deep);
  transform: scale(1.1);
}

:root[data-theme="dark"] .dot.cur {
  box-shadow: 0 0 0 4px var(--green-bright);
}

.step-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}

.step-row .hint {
  margin: 0;
}

/* ---------- shuffle: smart ---------- */
.pick-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pick {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.pick input {
  width: 20px;
  height: 20px;
  min-height: 0;
  margin: 0;
  accent-color: var(--green-deep);
  flex: none;
}

.pick .name {
  flex: 1;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pick .m-elo {
  font-weight: 700;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.pick.on {
  border-color: var(--green-deep);
  background: var(--flash);
}

.teams-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

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

.team {
  border-top: 4px solid var(--line);
}

.team.a {
  border-top-color: var(--green);
}

.team.b {
  border-top-color: var(--red);
}

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

.team .team-name {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.78rem;
}

.team.a .team-name {
  color: var(--green-deep);
}

.team.b .team-name {
  color: var(--red-deep);
}

:root[data-theme="dark"] .team.a .team-name {
  color: var(--green-bright);
}

:root[data-theme="dark"] .team.b .team-name {
  color: var(--red-bright);
}

.team .team-elo {
  font-size: 2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.member {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.member .m-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member .m-elo {
  font-weight: 700;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.gap {
  text-align: center;
  color: var(--text-2);
  font-weight: 600;
  margin: 10px 0;
}

.win-row {
  display: flex;
  gap: 10px;
  flex: 1;
}

.win-row .btn {
  flex: 1;
}

/* ---------- history ---------- */
.history {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.match .m-date {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-2);
  font-size: 0.85rem;
  font-weight: 600;
}

.winner-badge {
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.winner-badge.a {
  background: var(--green-deep);
}

.winner-badge.b {
  background: var(--red-deep);
}

.m-team {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.m-team .m-elo {
  margin-left: auto;
  font-weight: 800;
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
}

/* team ELO delta in history cards (all members of a side share the delta) */
.m-team .delta {
  font-weight: 800;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.chip.a {
  border-color: var(--green);
  color: var(--green-deep);
}

.chip.b {
  border-color: var(--red);
  color: var(--red-deep);
}

:root[data-theme="dark"] .chip.a {
  color: var(--green-bright);
}

:root[data-theme="dark"] .chip.b {
  color: var(--red-bright);
}

/* ---------- settings ---------- */
.card.danger {
  border-color: var(--red);
}

:root[data-theme="dark"] .card.danger {
  border-color: var(--red-bright);
}

#server-line {
  text-align: center;
}

/* ---------- bottom tab bar ---------- */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--line);
  z-index: 10;
}

.tab {
  flex: 1;
  border: 0;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-2);
  min-height: 44px;
}

.tab svg {
  width: 22px;
  height: 22px;
}

.tab.active {
  color: var(--green-deep);
}

:root[data-theme="dark"] .tab.active {
  color: var(--green-bright);
}

/* ---------- overlays ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(15, 20, 16, 0.55);
  display: grid;
  place-items: end center;
}

.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 18px 18px 0 0;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
  animation: slide-up 0.2s ease;
}

@keyframes slide-up {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

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

.result-head .team-name {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.9rem;
}

.result-head .team-name.a {
  color: var(--green-deep);
}

.result-head .team-name.b {
  color: var(--red-deep);
}

:root[data-theme="dark"] .result-head .team-name.a {
  color: var(--green-bright);
}

:root[data-theme="dark"] .result-head .team-name.b {
  color: var(--red-bright);
}

.result-elos {
  font-size: 1.3rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.result-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.result-row .r-name {
  flex: 1;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-row .r-elos {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.result-row .delta {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  min-width: 44px;
  text-align: right;
}

.delta.up {
  color: var(--green-deep);
}

.delta.down {
  color: var(--red-deep);
}

:root[data-theme="dark"] .delta.up {
  color: var(--green-bright);
}

:root[data-theme="dark"] .delta.down {
  color: var(--red-bright);
}

/* ---------- rules overlay (full-screen) ---------- */
#rules-overlay {
  background: var(--bg);
  z-index: 60;
  display: block;
  overflow-y: auto;
}

.rules {
  min-height: 100%;
}

.rules-head {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
  padding-top: calc(12px + env(safe-area-inset-top));
  z-index: 2;
}

.rules-head h1 {
  font-size: 1.15rem;
  margin: 0;
  font-weight: 800;
}

.rules-body {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px;
  padding-bottom: 48px;
}

.rule-section {
  margin-bottom: 26px;
}

.rule-section h2 {
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.95rem;
  color: var(--green-deep);
  border-bottom: 2px solid var(--line);
  padding-bottom: 6px;
  margin: 0 0 10px;
}

:root[data-theme="dark"] .rule-section h2 {
  color: var(--green-bright);
}

.rule-section ol {
  padding-left: 22px;
  margin: 0;
}

.rule-section li {
  margin: 9px 0;
  line-height: 1.5;
}

.rule-p {
  line-height: 1.5;
  margin: 12px 0 4px;
}

/* ---------- toast & offline ---------- */
#toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 18px);
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 80;
  max-width: 90vw;
  animation: toast-in 0.18s ease;
}

@keyframes toast-in {
  from {
    transform: translate(-50%, 8px);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

#offline-banner {
  position: fixed;
  left: 0;
  right: 0;
  top: calc(var(--bar-h) + env(safe-area-inset-top));
  background: #6b5314;
  color: #fff;
  text-align: center;
  padding: 7px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  z-index: 9;
}

/* ---------- 3-sec timer (centered dialog, v1 behaviour) ---------- */
.overlay.timer {
  place-items: center;
  padding: 24px;
}

.timer-box {
  position: relative;
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 30px 24px 24px;
  width: 100%;
  max-width: 340px;
  text-align: center;
  transition: background 0.15s ease;
}

#btn-timer-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--surface-2);
  border-radius: 50%;
}

#btn-timer-close svg {
  width: 20px;
  height: 20px;
}

.timer-box .icon {
  margin-right: 0;
}

.timer-num {
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  margin-bottom: 20px;
  color: var(--text);
}

.timer-box .hint {
  margin-top: 16px;
}

/* FERTIG: green flash + sound (like v1's #0BB40F finish state) */
.timer-box.done {
  background: var(--green);
  animation: timer-done 0.4s ease;
}

.timer-box.done .timer-num {
  color: #fff;
}

.timer-box.done .hint {
  color: rgba(255, 255, 255, 0.85);
}

.timer-box.done #btn-timer-close {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.timer-box.done .btn.primary {
  background: #fff;
  border-color: #fff;
  color: var(--green-deep);
}

@keyframes timer-done {
  from {
    transform: scale(0.96);
  }
  to {
    transform: scale(1);
  }
}

/* ---------- settings: admin panel ---------- */
.admin-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.admin-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 10px 12px;
}

.admin-row .a-name {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-row .a-elo {
  flex: none;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.admin-row .a-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-row .a-date {
  font-size: 0.8rem;
  color: var(--text-2);
}

.admin-row .a-teams {
  font-size: 0.85rem;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-row .a-teams em {
  font-style: italic;
  opacity: 0.65;
  padding: 0 2px;
}

.admin-row .icon {
  border: 0;
  background: none;
  color: var(--red-deep);
  padding: 8px;
  margin-right: -4px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: none;
  cursor: pointer;
}

:root[data-theme="dark"] .admin-row .icon {
  color: var(--red-bright);
}

/* rename pencil stays neutral; only the trash bin is red */
.admin-row [data-arename-p] {
  color: var(--text-2);
}

.admin-row .icon:active {
  background: var(--surface);
}

/* ---------- player detail sheet ---------- */
.sheet .card {
  margin-top: 12px;
}

.player-title {
  font-size: 1.2rem;
  font-weight: 800;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.elo-hero {
  flex: none;
  border: 0;
  background: var(--surface-2);
  color: var(--green-deep);
  font-size: 1.8rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  padding: 4px 16px;
  border-radius: 12px;
  cursor: pointer;
}

:root[data-theme="dark"] .elo-hero {
  color: var(--green-bright);
}

.elo-hero:active {
  background: var(--line);
}

/* own chip in the player's match cards */
.chip.me {
  font-weight: 800;
  box-shadow: inset 0 0 0 1.5px currentColor;
}

.m-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.m-foot .delta {
  font-weight: 800;
}

/* ---------- ELO-over-time graph (hand-rolled SVG) ---------- */
.graph .result-head {
  margin-bottom: 4px;
}

.graph-wrap {
  background: var(--surface-2);
  border-radius: 14px;
  padding: 10px 8px 6px;
  margin: 12px 0;
}

.elo-svg {
  width: 100%;
  height: auto;
  display: block;
}

.elo-svg .g-l {
  stroke: var(--line);
  stroke-width: 1;
}

.elo-svg .g-t {
  fill: var(--text-2);
  font-size: 11px;
}
