:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eef3f8;
  --text: #172033;
  --muted: #647083;
  --border: #d9e1ea;
  --line: #e8edf3;
  --primary: #176b87;
  --primary-strong: #0f5268;
  --accent: #c9792b;
  --success: #247a4d;
  --danger: #b42318;
  --warning: #9a6700;
  --shadow: 0 18px 50px rgba(23, 32, 51, 0.08);
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

a { color: inherit; text-decoration: none; }

.shell { min-height: 100vh; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1.25rem;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  min-width: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.45rem;
  height: 2.45rem;
  border-radius: .45rem;
  background: var(--text);
  color: white;
  font-weight: 800;
  font-size: .8rem;
}

.brand strong { display: block; line-height: 1.1; }
.brand small { display: block; color: var(--muted); font-size: .75rem; margin-top: .1rem; }
.topbar-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }

.main {
  width: min(1420px, 100%);
  margin: 0 auto;
  padding: 1.25rem;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.page-title { margin: 0; font-size: 2rem; line-height: 1.08; }
.page-subtitle { margin: .35rem 0 0; color: var(--muted); }

.layout-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, .7fr);
  gap: 1rem;
  align-items: start;
}

.layout-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: .5rem;
  box-shadow: var(--shadow);
}

.panel-header {
  padding: .95rem 1rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.panel-title { margin: 0; font-size: 1rem; font-weight: 700; }
.panel-body { padding: 1rem; }

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
  margin-bottom: 1rem;
}

.tabs {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}

.tab {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: .45rem .75rem;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: .4rem .4rem 0 0;
  color: var(--muted);
  font-weight: 800;
}

.tab-active {
  color: var(--primary);
  background: var(--surface);
  border-color: var(--border);
}

.metric {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: .5rem;
  padding: .85rem;
}

.metric small { color: var(--muted); display: block; font-size: .72rem; text-transform: uppercase; }
.metric strong { display: block; margin-top: .15rem; font-size: 1.35rem; }

.form-row { display: flex; gap: .55rem; align-items: center; }
.form-row input, .form-row select { min-width: 0; flex: 1; }

.input,
select {
  width: 100%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  border-radius: .4rem;
  padding: .55rem .65rem;
  outline: none;
}

.input:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(23, 107, 135, .12);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  border: 1px solid transparent;
  border-radius: .4rem;
  padding: .55rem .75rem;
  font-weight: 700;
  line-height: 1.15;
  min-height: 2.35rem;
  white-space: nowrap;
}

.btn svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-compact {
  min-height: 2rem;
  padding: .38rem .55rem;
  font-size: .78rem;
}

.btn-primary { color: #fff; background: var(--primary); }
.btn-primary:hover { background: var(--primary-strong); }
.btn-secondary { color: var(--text); background: var(--surface-2); border-color: var(--border); }
.btn-secondary:hover { background: #e3ebf3; }
.btn-danger { color: #fff; background: var(--danger); }
.btn-ghost { color: var(--primary); background: transparent; border-color: transparent; }
.btn:disabled { opacity: .48; cursor: not-allowed; }

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .2rem .55rem;
  font-size: .74rem;
  font-weight: 800;
  background: var(--surface-2);
  color: var(--muted);
  white-space: nowrap;
}

.badge-success { color: var(--success); background: #e6f4ed; }
.badge-warning { color: var(--warning); background: #fff4d6; }
.badge-danger { color: var(--danger); background: #fde8e7; }
.badge-primary { color: var(--primary); background: #e6f4f8; }

.table-wrap { overflow-x: auto; }
.data-table th,
.data-table td {
  padding: .65rem .7rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.data-table th {
  text-align: left;
  color: var(--muted);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: 0;
  background: #fbfcfe;
}
.data-table tbody tr:hover { background: #fbfcfe; }

.list {
  display: grid;
  gap: .55rem;
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .65rem .7rem;
  border: 1px solid var(--border);
  border-radius: .45rem;
  background: #fff;
}

.player-row {
  padding: 0;
}

.player-row.is-inactive {
  opacity: .68;
}

.player-menu-button {
  display: flex;
  align-items: center;
  gap: .65rem;
  width: 100%;
  min-height: 3rem;
  padding: .65rem .7rem;
  color: inherit;
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
}

.player-menu-button:hover,
.player-menu-button:focus {
  background: rgba(99, 216, 242, .08);
}

.player-name-wrap {
  display: grid;
  min-width: 0;
}

.player-name-wrap small,
.winner-line {
  color: var(--muted);
  font-size: .74rem;
}

.row-main {
  display: block;
  flex: 1 1 auto;
}

.field-label {
  display: block;
  margin-bottom: .35rem;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
}

.seed-row { cursor: grab; }
.seed-row.dragging { opacity: .45; }
.seed-index {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: .35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  font-weight: 800;
  color: var(--muted);
  flex: 0 0 auto;
}

.match-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}

.match {
  border: 1px solid var(--border);
  border-radius: .5rem;
  background: #fff;
  overflow: visible;
}

.match-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .6rem .75rem;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
}

.match-body { padding: .75rem; display: grid; gap: .55rem; }
.versus { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .55rem; }
.player-pill {
  padding: .55rem .65rem;
  border: 1px solid var(--border);
  border-radius: .4rem;
  background: #fff;
  min-width: 0;
}
.vs { color: var(--muted); font-size: .75rem; font-weight: 800; }
.result-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.result-actions .btn { min-height: 2rem; padding: .4rem .55rem; font-size: .78rem; }

.round-block + .round-block { margin-top: 1rem; }
.round-completed { opacity: .86; }

details.round-completed {
  padding: .65rem .75rem;
  border: 1px solid var(--border);
  border-radius: .5rem;
  background: rgba(3, 20, 27, .36);
}

.round-block summary {
  list-style: none;
  cursor: pointer;
}

.round-block summary::-webkit-details-marker { display: none; }

.round-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .7rem;
}

.round-summary small {
  display: block;
  margin-top: .12rem;
  color: var(--muted);
  font-size: .74rem;
}

.round-completed .round-summary {
  margin-bottom: 0;
}

.round-completed[open] .round-summary {
  margin-bottom: .7rem;
}

.round-content {
  padding-top: .05rem;
}

.match-head-actions {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: .4rem;
  min-width: 0;
}

.result-menu {
  position: relative;
}

.result-menu summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .28rem;
  min-height: 1.72rem;
  padding: .25rem .5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--primary);
  background: rgba(99, 216, 242, .08);
  font-size: .72rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  list-style: none;
}

.result-menu summary::-webkit-details-marker { display: none; }

.result-menu svg {
  width: .9rem;
  height: .9rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.result-menu-panel {
  position: absolute;
  top: calc(100% + .35rem);
  right: 0;
  z-index: 30;
  display: grid;
  gap: .35rem;
  min-width: 12rem;
  padding: .45rem;
  border: 1px solid var(--border);
  border-radius: .5rem;
  background: #fff;
  box-shadow: var(--shadow);
}

.result-option {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 2rem;
  padding: .42rem .55rem;
  border: 1px solid transparent;
  border-radius: .38rem;
  color: var(--text);
  background: transparent;
  font-size: .78rem;
  font-weight: 800;
  text-align: left;
}

.result-option:hover,
.result-option:focus {
  border-color: var(--border);
  background: var(--surface-2);
}

.match-result-line {
  min-height: 1.55rem;
  padding: .3rem .55rem;
  border-radius: 999px;
  color: var(--primary);
  background: rgba(99, 216, 242, .1);
  font-size: .78rem;
  font-weight: 900;
}

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

.empty {
  padding: 1.1rem;
  border: 1px dashed var(--border);
  border-radius: .5rem;
  color: var(--muted);
  background: #fbfcfe;
}

.callout {
  border-left: .24rem solid var(--accent);
  background: #fff7ed;
  padding: .8rem .9rem;
  border-radius: .35rem;
  color: #6f3f12;
}

.manual-row {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr) minmax(0, 1fr);
  gap: .55rem;
  align-items: center;
}

details.manual {
  border: 1px solid var(--border);
  border-radius: .5rem;
  padding: .75rem;
  background: #fbfcfe;
}

details.manual summary {
  font-weight: 800;
  color: var(--primary);
  cursor: pointer;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  max-width: min(460px, calc(100vw - 2rem));
  padding: .8rem 1rem;
  background: #101828;
  color: #fff;
  border-radius: .5rem;
  box-shadow: var(--shadow);
  z-index: 100;
}

@media (max-width: 980px) {
  .layout-2,
  .layout-3,
  .metric-strip,
  .match-grid {
    grid-template-columns: 1fr;
  }
  .page-head { display: block; }
}

@media (max-width: 640px) {
  .main { padding: .85rem; }
  .page-title { font-size: 1.55rem; }
  .topbar { align-items: flex-start; }
  .brand small { display: none; }
  .form-row { display: grid; }
  .list-row { align-items: stretch; flex-direction: column; }
  .manual-row { grid-template-columns: 1fr; }
  .versus { grid-template-columns: 1fr; }
  .vs { display: none; }
  .btn { width: 100%; white-space: normal; }
}

/* Rotom League Dex theme */
:root {
  --bg: #03141b;
  --surface: #06222d;
  --surface-2: #082d39;
  --surface-3: #0b3542;
  --text: #ecfbff;
  --muted: #8fb4bf;
  --border: rgba(99, 216, 242, .22);
  --line: rgba(99, 216, 242, .14);
  --primary: #63d8f2;
  --primary-strong: #19a9c7;
  --accent: #f28d35;
  --success: #b1d95b;
  --danger: #f2505d;
  --warning: #f2d129;
  --shadow: 0 18px 46px rgba(0, 0, 0, .28);
}

body {
  background: linear-gradient(135deg, #020c12 0%, #031823 52%, #041118 100%);
  color: var(--text);
}

.shell {
  display: grid;
  grid-template-columns: 16rem minmax(0, 1fr);
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  align-self: start;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 1.1rem;
  padding: 1rem;
  background: rgba(2, 19, 27, .92);
  border-right: 1px solid var(--border);
  border-bottom: 0;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .03);
}

.brand {
  padding: .5rem .45rem .85rem;
  border-bottom: 1px solid var(--line);
}

.brand-logo {
  width: 3rem;
  height: 3rem;
  object-fit: cover;
  border-radius: .7rem;
  border: 1px solid rgba(99, 216, 242, .35);
}

.brand strong {
  color: #fff;
  font-size: 1.35rem;
  font-weight: 900;
}

.brand small { color: var(--primary); }

.side-nav {
  display: grid;
  gap: .45rem;
}

.side-nav-secondary {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.side-link {
  display: flex;
  align-items: center;
  min-height: 2.65rem;
  width: 100%;
  padding: .6rem .75rem;
  border: 1px solid transparent;
  border-radius: .5rem;
  color: #cdeef5;
  background: transparent;
  font-weight: 800;
  text-align: left;
}

.side-link:hover,
.side-link:focus {
  border-color: rgba(99, 216, 242, .28);
  background: rgba(99, 216, 242, .11);
  color: #fff;
}

.side-button {
  margin-top: .65rem;
  color: #ffc7c7;
}

.topbar-actions {
  margin-top: 1.75rem;
  display: grid;
  width: 100%;
  gap: .45rem;
}

.topbar-actions .btn { width: 100%; }

.main {
  width: min(1480px, 100%);
  padding: 1rem 1.25rem 5rem;
}

.page-head {
  min-height: 4.8rem;
  align-items: center;
  padding: .3rem 0 .65rem;
}

.page-title {
  color: #fff;
  font-size: 1.9rem;
  font-weight: 900;
}

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

.panel,
.metric,
.match,
.list-row,
.player-pill,
details.manual {
  background: linear-gradient(180deg, rgba(8, 45, 57, .96), rgba(5, 31, 42, .96));
  border-color: var(--border);
  box-shadow: var(--shadow);
}

.panel { border-radius: .55rem; }

.panel-header,
.match-head {
  background: rgba(3, 20, 27, .66);
  border-bottom-color: var(--line);
}

.panel-title { color: #fff; }

.metric small,
.data-table th,
.field-label {
  color: var(--muted);
}

.metric strong { color: #fff; }

.tabs {
  margin-bottom: .85rem;
  border-bottom-color: var(--border);
}

.tab {
  color: var(--muted);
  background: rgba(8, 45, 57, .45);
  border-color: rgba(99, 216, 242, .1);
}

.tab-active {
  color: #fff;
  background: linear-gradient(180deg, rgba(3, 140, 140, .32), rgba(8, 45, 57, .96));
  border-color: var(--primary);
}

.input,
select {
  background: #041923;
  border-color: var(--border);
  color: var(--text);
}

.input::placeholder { color: #5f8791; }

.input:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 216, 242, .13);
}

.btn {
  border-radius: .45rem;
  font-weight: 900;
}

.btn-primary {
  background: linear-gradient(135deg, #038c8c, #63d8f2);
  color: #021014;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #63d8f2, #b1d95b);
}

.btn-secondary {
  color: #dff8ff;
  background: rgba(99, 216, 242, .08);
  border-color: var(--border);
}

.btn-secondary:hover { background: rgba(99, 216, 242, .16); }

.btn-danger {
  background: rgba(242, 80, 93, .17);
  border-color: rgba(242, 80, 93, .38);
  color: #ffc6cc;
}

.btn-ghost { color: var(--primary); }

.badge { background: rgba(99, 216, 242, .1); color: #bfeff7; }
.badge-success { background: rgba(177, 217, 91, .13); color: #d8ff86; }
.badge-warning { background: rgba(242, 209, 41, .13); color: #ffe86d; }
.badge-danger { background: rgba(242, 80, 93, .13); color: #ff9aa4; }
.badge-primary { background: rgba(99, 216, 242, .13); color: #8ff0ff; }

.data-table th { background: rgba(3, 20, 27, .72); }
.data-table td { border-bottom-color: var(--line); }
.data-table tbody tr:hover { background: rgba(99, 216, 242, .06); }

.seed-index {
  background: rgba(99, 216, 242, .12);
  color: var(--primary);
}

.empty {
  background: rgba(3, 20, 27, .48);
  color: var(--muted);
  border-color: var(--border);
}

.callout {
  background: rgba(242, 141, 53, .11);
  border-left-color: var(--accent);
  color: #ffd5aa;
}

.result-menu-panel {
  background: #041923;
  border-color: var(--border);
}

.result-option {
  color: var(--text);
}

.result-option:hover,
.result-option:focus {
  background: rgba(99, 216, 242, .1);
}

.match-result-line {
  color: var(--primary);
  background: rgba(99, 216, 242, .12);
}

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

.tournament-floating-action {
  position: fixed;
  right: 1.15rem;
  bottom: 1.15rem;
  z-index: 80;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}

.floating-action-btn,
.floating-action-wait {
  pointer-events: auto;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .38);
}

.floating-action-btn svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.toast {
  background: #03141b;
  color: #fff;
  border: 1px solid var(--border);
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
  background:
    linear-gradient(135deg, rgba(3, 140, 140, .16), transparent 34%),
    linear-gradient(315deg, rgba(242, 141, 53, .14), transparent 38%),
    #02080c;
}

.login-card {
  width: min(28rem, 100%);
  padding: 1.15rem;
  border: 1px solid var(--border);
  border-radius: .75rem;
  background: rgba(3, 20, 27, .9);
  box-shadow: var(--shadow);
}

.login-logo {
  display: block;
  width: min(20rem, 100%);
  margin: 0 auto 1rem;
  border-radius: .65rem;
}

.login-form {
  display: grid;
  gap: .55rem;
}

@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .topbar {
    position: static;
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .side-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .topbar-actions {
    margin-top: 0;
    display: flex;
  }
  .topbar-actions .btn { width: auto; }
}

@media (max-width: 640px) {
  .main { padding: .85rem; }
  .side-nav { grid-template-columns: 1fr 1fr; }
  .side-link { justify-content: center; text-align: center; }
  .topbar-actions { display: grid; }
  .topbar-actions .btn { width: 100%; }
}

.sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.05rem;
  height: 2.05rem;
  border: 1px solid var(--border);
  border-radius: .45rem;
  color: var(--muted);
  background: rgba(99, 216, 242, .06);
  cursor: pointer;
}

.sidebar-toggle svg,
.side-icon svg,
.action-icon svg,
.rank-medal svg {
  width: 1.05rem;
  height: 1.05rem;
}

.sidebar-toggle svg,
.side-icon svg,
.action-icon svg,
.rank-medal svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.side-link {
  min-height: 2.75rem;
  align-items: center;
  gap: .7rem;
}

.side-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  min-width: 1.35rem;
  color: var(--primary);
}

.side-link-active {
  color: #fff;
  background: rgba(99, 216, 242, .13);
  border-color: var(--primary);
}

.side-button { text-align: left; }

.action-btn {
  width: 100%;
}

.action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  min-width: 1.15rem;
}

.shell.sidebar-collapsed {
  grid-template-columns: 5.25rem minmax(0, 1fr);
}

.sidebar-collapsed .topbar {
  align-items: center;
  padding-inline: .72rem;
}

.sidebar-collapsed .brand {
  justify-content: center;
}

.sidebar-collapsed .brand-copy,
.sidebar-collapsed .side-label,
.sidebar-collapsed .action-label {
  display: none;
}

.sidebar-collapsed .side-link,
.sidebar-collapsed .action-btn {
  justify-content: center;
  padding-inline: .65rem;
}

.sidebar-collapsed .topbar-actions {
  margin-top: 1.4rem;
}

.sidebar-collapsed .action-btn {
  width: 2.75rem;
  min-height: 2.75rem;
  padding: .55rem;
}

.sidebar-collapsed .sidebar-toggle svg {
  transform: rotate(180deg);
}

.rank-medal {
  display: inline-grid;
  grid-template-columns: 1rem auto;
  align-items: center;
  justify-content: center;
  gap: .2rem;
  min-width: 2.45rem;
  padding: .22rem .38rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-weight: 900;
}

.rank-1 {
  color: #ffe66d;
  background: rgba(242, 209, 41, .14);
}

.rank-2 {
  color: #d9e4ea;
  background: rgba(136, 137, 140, .16);
}

.rank-3 {
  color: #ffad6d;
  background: rgba(242, 100, 48, .14);
}

.rank-plain {
  color: var(--muted);
  font-weight: 800;
}

.hof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: .85rem;
}

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

.hof-card {
  border: 1px solid var(--border);
  border-radius: .55rem;
  background: linear-gradient(180deg, rgba(8, 45, 57, .96), rgba(5, 31, 42, .98));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hof-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  padding: .8rem .85rem;
  border-bottom: 1px solid var(--line);
  background: rgba(3, 20, 27, .58);
}

.hof-card-head small {
  color: var(--muted);
  font-size: .68rem;
  white-space: nowrap;
}

.hof-podium {
  display: grid;
  gap: .55rem;
  padding: .75rem;
}

.hof-row {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem;
  border: 1px solid rgba(99, 216, 242, .1);
  border-radius: .45rem;
  background: rgba(3, 20, 27, .48);
}

.hof-rank-1 {
  border-color: rgba(242, 209, 41, .36);
  background: rgba(242, 209, 41, .08);
}

.hof-player {
  min-width: 0;
}

.hof-player strong,
.hof-player small {
  display: block;
}

.hof-player strong {
  color: #fff;
}

.hof-player small,
.version-summary,
.copyright {
  color: var(--muted);
  font-size: .8rem;
}

.public-mode .shell {
  display: block;
}

.public-mode .topbar {
  display: none;
}

.public-mode .main {
  width: min(1180px, 100%);
  padding-top: 1.25rem;
}

.public-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: .9rem;
  border-bottom: 1px solid var(--line);
}

.public-logo {
  width: min(14rem, 60vw);
  max-height: 5.5rem;
  object-fit: contain;
  object-position: left center;
  display: block;
  margin-bottom: .65rem;
}

.winner-stack {
  display: grid;
  gap: .75rem;
}

.winner-card {
  border: 1px solid var(--border);
  border-radius: .55rem;
  background: rgba(3, 20, 27, .42);
  overflow: hidden;
}

.winner-card-head {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  padding: .7rem .75rem;
  border-bottom: 1px solid var(--line);
}

.winner-card-head small {
  color: var(--muted);
  font-size: .7rem;
}

.winner-podium {
  display: grid;
  gap: .45rem;
  padding: .65rem;
}

.winner-row {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem;
  border-radius: .45rem;
  background: rgba(99, 216, 242, .07);
}

.winner-row span {
  display: grid;
  min-width: 0;
}

.winner-row small {
  color: var(--muted);
  font-size: .72rem;
}

.settings-form {
  display: grid;
  gap: .55rem;
}

body {
  background: linear-gradient(135deg, #020c12 0%, #031823 52%, #041118 100%);
}

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

@media (max-width: 640px) {
  .side-nav {
    grid-template-columns: 1fr 1fr;
  }
  .public-hero {
    display: grid;
  }
}
