:root {
  color-scheme: dark;
  --bg: #0f1113;
  --bg-2: #121518;
  --panel: #171a1e;
  --panel-2: #1c2025;
  --panel-3: #23282e;
  --ink: #f0f1ef;
  --muted: #8e969f;
  --muted-strong: #c5cbd0;
  --line: #2a3036;
  --line-strong: #3b444d;
  --clay: #ee6645;
  --clay-dark: #ff8a6b;
  --green: #4aa17c;
  --green-dark: #73c5a0;
  --blue: #9db6d6;
  --gold: #d2a45f;
  --danger: #ff8b7f;
  --danger-bg: #2a1817;
  --success-bg: #14211d;
  --warn-bg: #271f13;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

a {
  color: var(--blue);
  font-weight: 650;
  text-decoration: none;
}

a:hover,
a:focus {
  color: #cad8e8;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0.62rem 0.72rem;
  background: #111417;
  color: var(--ink);
  outline: none;
}

input::placeholder {
  color: #687079;
}

input:focus {
  border-color: var(--clay);
  box-shadow: 0 0 0 2px rgba(238, 102, 69, 0.18);
}

input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
  display: none;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 2.85rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.32rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.12s, background 0.12s;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  outline: none;
}

.password-toggle svg {
  width: 18px;
  height: 18px;
  display: block;
}

.password-toggle .icon-eye-off {
  display: none;
}

.password-toggle[aria-pressed="true"] {
  color: var(--clay);
}

.password-toggle[aria-pressed="true"] .icon-eye {
  display: none;
}

.password-toggle[aria-pressed="true"] .icon-eye-off {
  display: block;
}

input[type="file"] {
  padding: 0.5rem 0.6rem;
  background: var(--panel);
  color: var(--muted-strong);
  font-size: 0.85rem;
  cursor: pointer;
}

input[type="file"]::file-selector-button {
  margin-right: 0.7rem;
  padding: 0.36rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--panel-3);
  color: var(--ink);
  font-weight: 650;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

input[type="file"]::file-selector-button:hover {
  background: #2c333c;
  border-color: var(--clay);
}

label {
  display: grid;
  gap: 0.4rem;
  color: var(--muted-strong);
  font-size: 0.82rem;
  font-weight: 650;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.2rem;
  font-size: 2.15rem;
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1.18rem;
  line-height: 1.18;
}

h3 {
  margin-bottom: 0.35rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 58px;
  padding: 0.62rem 2rem;
  background: rgba(15, 17, 19, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 750;
  white-space: nowrap;
}

.brand::before {
  content: "";
  width: 3px;
  height: 18px;
  margin-right: 0.6rem;
  border-radius: 2px;
  background: var(--clay);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.site-nav a,
.link-button {
  position: relative;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  padding: 0.42rem 0.7rem;
  color: var(--muted-strong);
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a:focus,
.link-button:hover,
.link-button:focus {
  background: var(--panel-3);
  color: var(--ink);
}

.site-nav a.is-active {
  color: var(--ink);
}

.site-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: -0.18rem;
  height: 2px;
  border-radius: 2px;
  background: var(--clay);
  box-shadow: 0 0 10px rgba(238, 102, 69, 0.55);
}

.account-menu {
  position: relative;
  margin-left: 0.4rem;
}

.account-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 34px;
  padding: 0.22rem 0.55rem 0.22rem 0.28rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.account-avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--clay), #c64d2f);
  color: #160f0c;
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.01em;
  overflow: hidden;
}

.account-avatar.has-image {
  background: var(--panel-3);
}

.account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-menu-popover .account-menu-link,
.account-menu-popover button {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 36px;
  padding: 0.4rem 0.6rem;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted-strong);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.account-menu-popover .account-menu-link:hover,
.account-menu-popover .account-menu-link:focus,
.account-menu-popover button:hover,
.account-menu-popover button:focus {
  background: var(--panel-3);
  color: var(--ink);
  outline: none;
}

.player-avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(140deg, #2c333c, #1c2128);
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 700;
  overflow: hidden;
  border: 1px solid var(--line);
}

.player-avatar.has-image {
  background: var(--panel-3);
  border-color: var(--line-strong);
}

.player-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-avatar.inline {
  display: inline-flex;
  vertical-align: -6px;
  margin-right: 0.55rem;
  width: 38px;
  height: 38px;
  font-size: 0.98rem;
}

.player-avatar.large {
  width: 44px;
  height: 44px;
  font-size: 1.05rem;
}

.player-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.user-identity {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.user-identity > div {
  min-width: 0;
}

.avatar-upload {
  display: grid;
  gap: 0.5rem;
}

.avatar-upload-label {
  display: block;
  color: var(--muted-strong);
  font-size: 0.82rem;
  font-weight: 650;
}

.avatar-upload-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.avatar-upload-controls {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
  flex: 1 1 auto;
}

.avatar-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--panel-3);
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  font-size: 1.5rem;
  font-weight: 700;
  overflow: hidden;
}

.avatar-silhouette {
  width: 56%;
  height: 56%;
  stroke: currentColor;
  stroke-width: 0;
  fill: currentColor;
}

.avatar-silhouette path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
}

.avatar-preview.has-image {
  border-style: solid;
  border-color: var(--clay);
  color: var(--ink);
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-panel {
  padding: 1.1rem 1.2rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.account-panel h2 {
  margin-bottom: 0.2rem;
}

.account-form {
  display: grid;
  gap: 0.9rem;
  margin-top: 0.9rem;
}

.prose {
  width: min(680px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 2rem;
}

.prose-header h1 {
  margin: 0 0 0.4rem;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.prose-header .muted {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
}

.prose section {
  display: grid;
  gap: 0.85rem;
}

.prose h2 {
  margin: 0;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--line);
  font-size: 1.15rem;
  font-weight: 700;
}

.prose p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 0.98rem;
  line-height: 1.65;
}

.prose p.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.prose strong {
  color: var(--ink);
  font-weight: 650;
}

.prose-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.prose-table th,
.prose-table td {
  text-align: left;
  padding: 0.6rem 0.65rem;
  border-bottom: 1px solid var(--line);
}

.prose-table thead th {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.prose-table tbody th {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  color: var(--ink);
  font-weight: 600;
}

.prose-table tbody th .muted {
  font-size: 0.86rem;
  font-weight: 500;
}

.prose-table tbody td {
  color: var(--gold);
  font-weight: 700;
  font-size: 1rem;
  text-align: right;
  white-space: nowrap;
}

.about-round {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  padding: 0.18rem 0.4rem;
  background: var(--panel-3);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.prose-tags {
  margin: 0;
  display: grid;
  gap: 0.85rem;
}

.prose-tags > div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem 0.85rem;
  align-items: baseline;
}

.prose-tags dt {
  grid-column: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  font-weight: 650;
  white-space: nowrap;
}

.prose-tags dd {
  grid-column: 2;
  margin: 0;
  color: var(--muted-strong);
  font-size: 0.93rem;
  line-height: 1.5;
}

.prose-tags .player-entry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.85rem;
  padding: 0.14rem 0.4rem;
  background: var(--warn-bg);
  border: 1px solid rgba(210, 164, 95, 0.34);
  border-radius: 5px;
  color: var(--gold);
  font-size: 0.76rem;
}

.prose-license {
  margin: 0;
  padding: 0.95rem 1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted-strong);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 0.78rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-x: auto;
}

.prose-footer {
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.prose-footer .muted {
  margin: 0;
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  .prose-tags > div {
    grid-template-columns: 1fr;
  }
  .prose-tags dd {
    grid-column: 1;
    margin-left: 2.4rem;
  }
}

.account-name {
  padding-right: 0.1rem;
}

.account-menu-header {
  margin: 0.2rem 0.3rem 0.35rem;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
}

.account-menu-header strong {
  color: var(--muted-strong);
  font-weight: 650;
}

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

.account-menu summary::after {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  margin-top: -2px;
  border-right: 1.6px solid var(--muted-strong);
  border-bottom: 1.6px solid var(--muted-strong);
  transform: rotate(45deg);
  transition: transform 0.15s;
}

.account-menu summary:hover,
.account-menu summary:focus {
  border-color: var(--line-strong);
  background: var(--panel-3);
  outline: none;
}

.account-menu[open] summary {
  border-color: var(--line-strong);
  background: var(--panel-3);
}

.account-menu[open] summary::after {
  transform: rotate(-135deg) translate(-2px, -2px);
}

.account-menu-popover {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 60;
  min-width: 160px;
  padding: 0.32rem;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45);
}

.account-menu-popover form {
  margin: 0;
}


@media (max-width: 540px) {
  .account-menu summary .account-name {
    display: none;
  }
  .account-menu summary {
    padding: 0.22rem 0.4rem 0.22rem 0.22rem;
  }
}

.page {
  display: flex;
  flex-direction: column;
  width: min(1360px, 100%);
  margin: 0 auto;
  padding: 1.5rem 2rem 2rem;
}

.page-heading,
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.page-heading.compact,
.section-heading {
  align-items: center;
}

.page-heading p,
.section-heading p {
  margin-bottom: 0;
}

.user-badge,
.status-pill,
.rank-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.28rem 0.58rem;
  background: var(--panel);
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 650;
  text-transform: uppercase;
}

.status-pill.open {
  border-color: rgba(74, 161, 124, 0.35);
  background: var(--success-bg);
  color: var(--green-dark);
}

.status-pill.locked {
  border-color: rgba(210, 164, 95, 0.34);
  background: var(--warn-bg);
  color: var(--gold);
}

.rank-pill {
  width: 2.1rem;
  min-height: 30px;
  padding: 0;
  color: var(--clay-dark);
}

.eyebrow {
  margin-bottom: 0.42rem;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 650;
  text-transform: uppercase;
}

.dot {
  color: var(--line-strong);
  font-weight: 400;
}

.muted,
.deadline-line {
  color: var(--muted);
}

.deadline-line {
  margin: 0.65rem 0 0;
  font-weight: 600;
}

.auth-panel {
  width: min(420px, 100%);
  margin: 9vh auto 0;
  padding: 2rem 2rem 1.75rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.65), 0 1px 0 rgba(255, 255, 255, 0.02) inset;
}

.auth-panel h1 {
  margin-bottom: 0.35rem;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.auth-panel .auth-subtitle {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.auth-panel .form-stack {
  gap: 1.1rem;
}

.auth-panel label {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0;
}

.auth-panel input[type="text"],
.auth-panel input[type="password"],
.auth-panel input:not([type]) {
  font-size: 0.95rem;
}

.auth-panel .primary-button {
  margin-top: 0.4rem;
  min-height: 42px;
  font-size: 0.95rem;
}

.auth-panel .muted {
  margin: 1.25rem 0 0;
  font-size: 0.86rem;
  text-align: center;
}

.auth-panel .avatar-upload {
  gap: 0.55rem;
  margin-top: 0.15rem;
}

@media (max-width: 480px) {
  .auth-panel {
    margin-top: 5vh;
    padding: 1.5rem 1.25rem 1.3rem;
    border-radius: 10px;
  }
}

.form-stack,
.settings-form {
  display: grid;
  gap: 1rem;
}

.settings-form {
  padding: 1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.inline-form {
  display: inline;
}

.primary-button,
.secondary-button,
.subtle-button,
.link-button {
  min-height: 36px;
  border-radius: 6px;
  border: 1px solid transparent;
  padding: 0.42rem 0.68rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 650;
  text-align: center;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--clay);
  color: #160f0c;
  border-color: var(--clay);
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.primary-button:hover,
.primary-button:focus {
  background: var(--clay-dark);
  border-color: var(--clay-dark);
  color: #120c09;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  color: var(--muted-strong);
  border-color: var(--line);
}

.secondary-button:hover,
.secondary-button:focus {
  border-color: var(--line-strong);
  background: var(--panel-3);
  color: var(--ink);
}

.subtle-button,
.link-button {
  background: transparent;
  color: var(--muted-strong);
  border-color: var(--line);
}

.danger-button {
  color: var(--danger);
  border-color: rgba(255, 139, 127, 0.34);
}

.danger-button:hover,
.danger-button:focus {
  background: var(--danger-bg);
  border-color: rgba(255, 139, 127, 0.48);
  color: #ffc1ba;
}

.link-button {
  border: 0;
  padding-inline: 0.65rem;
}

.flash-stack {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.toast-stack {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 100;
  width: min(360px, calc(100vw - 2rem));
  display: grid;
  gap: 0.5rem;
  pointer-events: none;
}

.toast-stack .flash {
  pointer-events: auto;
  animation: toastIn 0.22s ease-out;
}

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

.flash {
  padding: 0.78rem 0.9rem;
  border-radius: 6px;
  background: var(--success-bg);
  border: 1px solid rgba(74, 161, 124, 0.35);
  color: var(--green-dark);
  font-weight: 650;
  box-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.6);
}

.flash.error {
  background: var(--danger-bg);
  border-color: rgba(255, 123, 110, 0.42);
  color: var(--danger);
}

.flash.info,
.notice {
  background: var(--warn-bg);
  border: 1px solid rgba(210, 164, 95, 0.34);
  border-radius: 6px;
  color: var(--gold);
  padding: 0.68rem 0.82rem;
}

.pool-grid,
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 1rem;
}

.dashboard-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 1.2rem;
  padding-bottom: 1.4rem;
  margin-bottom: 1.4rem;
  background: linear-gradient(135deg, #1a1f25 0%, #15181d 60%, #181c21 100%);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 50px -30px rgba(0, 0, 0, 0.7);
}

.hero-banner {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-banner img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 380px;
  object-fit: cover;
  object-position: center 30%;
  image-rendering: pixelated;
}

.hero-banner-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2.5rem 1.7rem 1.2rem;
  background: linear-gradient(180deg, rgba(15, 17, 19, 0) 0%, rgba(15, 17, 19, 0.6) 55%, rgba(15, 17, 19, 0.9) 100%);
  color: var(--ink);
}

.hero-eyebrow {
  margin: 0 0 0.3rem;
  color: var(--clay-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.hero-banner-overlay h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.hero-snapshot {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.7rem;
  padding: 0 1.6rem;
}

.snapshot-row {
  display: grid;
  gap: 0.55rem;
  padding: 0.9rem 1rem;
  background: rgba(15, 17, 19, 0.55);
  border: 1px solid var(--line);
  border-radius: 10px;
  backdrop-filter: blur(6px);
}

.snapshot-pool {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.snapshot-pool-name {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
}

.snapshot-stats {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.6rem;
}

.snapshot-stats > div {
  display: grid;
  gap: 0.15rem;
}

.snapshot-stats dt {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.snapshot-stats dd {
  margin: 0;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 700;
}

.snapshot-stats dd .muted {
  font-size: 0.78rem;
  font-weight: 500;
}

.snapshot-lock dd {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted-strong);
}

.hero-today {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.55rem;
  padding: 0 1.6rem;
}

.hero-today > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
}

.hero-today h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.hero-today-cards {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 220px;
  align-items: start;
  gap: 0.6rem;
  overflow-x: auto;
  padding: 0.15rem 0.1rem 0.5rem;
  scrollbar-color: #3d4650 transparent;
  scrollbar-width: thin;
}

.hero-today-card {
  display: grid;
  gap: 0.35rem;
  padding: 0.65rem 0.75rem;
  background: rgba(15, 17, 19, 0.7);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.12s, transform 0.12s, background 0.12s;
}

.hero-today-card:hover {
  border-color: var(--line-strong);
  background: rgba(15, 17, 19, 0.85);
  transform: translateY(-1px);
}

.hero-today-card.is-live {
  border-color: rgba(255, 139, 127, 0.35);
}

.hero-today-card.is-complete {
  opacity: 0.78;
}

.hero-today-card header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.hero-today-card .round-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.16rem 0.4rem;
  background: var(--panel-3);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--muted-strong);
  font-size: 0.66rem;
}

.hero-today-card header time,
.hero-today-card header .live-pill,
.hero-today-card header .complete-pill {
  margin-left: auto;
}

@media (max-width: 760px) {
  .hero-banner img {
    max-height: 240px;
  }

  .hero-banner-overlay {
    padding: 2rem 1.1rem 0.9rem;
  }

  .hero-banner-overlay h1 {
    font-size: 1.55rem;
  }

  .hero-snapshot {
    padding: 0 1.1rem;
  }

  .hero-today {
    padding: 0 1.1rem;
  }

  .snapshot-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .snapshot-lock {
    grid-column: 1 / -1;
  }
}

.pool-card,
.match-card,
.user-row,
.bracket-map-panel,
.picker-panel,
.table-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.pool-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 0.85rem;
  padding: 1.1rem 1.15rem;
  transition: border-color 0.12s, transform 0.12s, box-shadow 0.18s;
}

.pool-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
  box-shadow: 0 14px 38px -22px rgba(0, 0, 0, 0.7);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.card-top h2 {
  margin-bottom: 0;
}

.pool-progress {
  height: 4px;
  overflow: hidden;
  background: #252a30;
  border-radius: 3px;
}

.pool-progress span {
  display: block;
  height: 100%;
  background: var(--clay);
}

.pool-card::before {
  display: none;
}

.card-stats {
  margin: 0;
  color: var(--muted-strong);
  font-size: 0.92rem;
}

.card-stats strong {
  color: var(--ink);
  font-weight: 700;
}

.card-lock {
  margin: 0;
  font-size: 0.88rem;
}

.button-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.button-row.stack {
  align-items: stretch;
  flex-direction: column;
}

.bracket-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.95rem 1.25rem;
  align-items: start;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.bracket-title-block h1 {
  margin-bottom: 0.32rem;
  font-size: 2.1rem;
  font-weight: 750;
}

.bracket-status-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0;
  color: var(--muted-strong);
  font-size: 0.92rem;
  font-weight: 600;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  color: var(--muted-strong);
}

.status-dot::before {
  content: "";
  width: 0.46rem;
  height: 0.46rem;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 16px rgba(210, 164, 95, 0.34);
}

.status-dot.open::before {
  background: var(--green);
  box-shadow: 0 0 16px rgba(74, 161, 124, 0.34);
}

.bracket-header-side {
  display: grid;
  justify-items: end;
  gap: 0.65rem;
}

.bracket-header-side .deadline-line {
  max-width: 28rem;
  margin: 0;
  text-align: right;
}

.bracket-header-side .deadline-line span {
  display: block;
  margin-bottom: 0.14rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  text-transform: uppercase;
}

.bracket-layout {
  display: grid;
  grid-template-columns: minmax(390px, 520px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.bracket-layout > .picker-panel,
.bracket-layout > .bracket-map-panel {
  min-width: 0;
  margin-bottom: 0;
}

.bracket-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.9rem 1rem;
  align-items: start;
  margin-bottom: 1rem;
  padding: 1rem;
  color: var(--ink);
  background: #15191d;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(238, 102, 69, 0.05), 0 14px 42px rgba(0, 0, 0, 0.18);
}

.bracket-hero h1 {
  font-size: 2.1rem;
  font-weight: 750;
}

.bracket-hero .eyebrow,
.bracket-hero .deadline-line {
  color: var(--muted);
}

.hero-subtitle {
  margin-bottom: 0;
  color: var(--muted-strong);
  font-size: 0.95rem;
  font-weight: 600;
}

.hero-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.progress-shell {
  grid-column: 1 / -1;
  height: 4px;
  overflow: hidden;
  background: #252a30;
  border-radius: 3px;
}

.progress-shell span {
  display: block;
  height: 100%;
  background: var(--clay);
}

.bracket-hero .deadline-line {
  grid-column: 1 / -1;
}

.bracket-map-panel,
.picker-panel {
  padding: 0.85rem;
  margin-bottom: 1rem;
}

.bracket-map-panel {
  align-self: start;
  width: 100%;
  overflow: hidden;
}

@media (min-width: 980px) {
  .bracket-map-panel {
    position: sticky;
    top: 74px;
    max-height: calc(100vh - 94px);
    overflow: hidden;
  }
}

.bracket-viewport {
  width: 100%;
  min-width: 0;
  overflow: auto;
  max-height: 72vh;
  border: 1px solid #252c35;
  border-radius: 8px;
  background: #10141a;
  scrollbar-color: #3d4650 #11161c;
  scrollbar-width: thin;
}

.bracket-board {
  display: grid;
  grid-template-columns: repeat(7, 210px);
  grid-template-rows: 36px repeat(64, 78px);
  column-gap: 28px;
  min-width: 1590px;
  padding: 0.8rem;
}

.bracket-round-label {
  position: sticky;
  top: 0;
  z-index: 2;
  grid-column: var(--column);
  grid-row: 1;
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0.45rem 0.6rem;
  background: #202833;
  color: #f7faf8;
  border: 1px solid #313b48;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 650;
  white-space: nowrap;
}

.bracket-node {
  position: relative;
  grid-column: var(--column);
  grid-row: var(--row-start) / span var(--row-span);
  z-index: 1;
  align-self: center;
  min-height: 54px;
  display: grid;
  gap: 0.28rem;
  padding: 0.45rem 0.52rem;
  background: #1c232c;
  border: 1px solid #303a46;
  border-radius: 6px;
  box-shadow: var(--shadow-soft);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, transform 0.12s;
}

a.bracket-node:hover,
a.bracket-node:focus {
  border-color: var(--clay);
  background: #20272f;
  text-decoration: none;
  outline: none;
}

a.bracket-node:focus-visible {
  box-shadow: 0 0 0 2px rgba(238, 102, 69, 0.4), var(--shadow-soft);
}

.connector {
  position: absolute;
  pointer-events: none;
}

.connector-in,
.connector-out {
  top: 50%;
  width: 14px;
  border-top: 1px solid rgba(105, 119, 134, 0.74);
}

.connector-in {
  left: -14px;
}

.connector-out {
  right: -14px;
}

.connector-join {
  top: 50%;
  right: -15px;
  height: var(--connector-height);
  border-right: 1px solid rgba(105, 119, 134, 0.74);
}

.bracket-node.has-winner {
  border-color: rgba(238, 102, 69, 0.58);
  box-shadow: 0 0 0 1px rgba(238, 102, 69, 0.08), var(--shadow-soft);
}

.bracket-map-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  margin: 0 0 0.7rem;
}

.bracket-map-header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.map-hint {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.node-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 650;
}

.node-winner {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.node-players {
  display: grid;
  gap: 0.18rem;
}

.node-players .placeholder {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
}

.node-footer {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin: 0.16rem 0 0;
  padding-top: 0.22rem;
  border-top: 1px solid rgba(238, 102, 69, 0.18);
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
}

.node-score-text {
  color: var(--gold);
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
  min-width: 0;
}

.node-consensus-text {
  margin-left: auto;
  color: var(--muted);
  font-weight: 600;
  flex: 0 0 auto;
}

.node-consensus-count {
  color: var(--blue);
  font-weight: 700;
}

.upcoming-round-label {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.upcoming-strip {
  margin-bottom: 1.2rem;
}

.upcoming-strip-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.55rem;
}

.upcoming-strip-header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.upcoming-cards {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 240px;
  gap: 0.6rem;
  overflow-x: auto;
  padding: 0.15rem 0.1rem 0.85rem;
  scrollbar-color: #3d4650 transparent;
  scrollbar-width: thin;
}

.upcoming-cards {
  align-items: start;
}

.upcoming-card {
  display: grid;
  gap: 0.4rem;
  padding: 0.7rem 0.8rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.12s, transform 0.12s;
}

.upcoming-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
  text-decoration: none;
}

.upcoming-card.is-live {
  border-color: rgba(255, 139, 127, 0.35);
  background: linear-gradient(180deg, rgba(255, 139, 127, 0.05), transparent 60%), var(--panel);
}

.upcoming-card.is-complete {
  opacity: 0.78;
}

.upcoming-card header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 650;
}

.upcoming-card .round-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.4rem;
  background: var(--panel-3);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--muted-strong);
  font-size: 0.68rem;
}

.upcoming-card .match-num {
  color: var(--muted-strong);
}

.upcoming-card header time {
  margin-left: auto;
  color: var(--gold);
  font-weight: 600;
  white-space: nowrap;
}

.live-pill,
.complete-pill {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.15rem 0.42rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.live-pill {
  background: rgba(255, 139, 127, 0.12);
  color: var(--danger);
}

.live-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 8px rgba(255, 139, 127, 0.7);
  animation: livePulse 1.4s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}

.complete-pill {
  background: var(--success-bg);
  color: var(--green-dark);
}

.upcoming-players {
  display: grid;
  gap: 0.28rem;
}

.upcoming-card.is-complete .player-row:not(.selected) .player-name {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: rgba(142, 150, 159, 0.4);
}

.upcoming-card.is-complete .player-row.selected .player-name {
  color: var(--gold);
  font-weight: 700;
}

.upcoming-score {
  margin: 0;
  padding-top: 0.4rem;
  border-top: 1px solid var(--line);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.upcoming-score:empty {
  display: none;
}

.tournament-map {
  width: 100%;
  position: static;
  max-height: none;
}

.tournament-map .bracket-viewport {
  max-height: none;
}

.tournament-map .bracket-board {
  grid-template-rows: 36px repeat(64, 108px);
}

.tournament-map .connector-join {
  height: calc(var(--row-span) * 108px);
}

.tournament-map .bracket-node.has-winner {
  border-color: rgba(238, 102, 69, 0.55);
  background: linear-gradient(180deg, rgba(238, 102, 69, 0.06), transparent 70%) , #1c232c;
}

.tournament-map .bracket-node.has-winner .player-row.selected .player-name {
  color: var(--gold);
  font-weight: 700;
}

.tournament-map .bracket-node.has-winner .player-row.selected::after {
  content: "✓";
  margin-left: auto;
  padding-left: 0.4rem;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  flex: 0 0 auto;
}

.tournament-map .bracket-node.has-winner .player-row.selected {
  display: flex;
  align-items: center;
}

.tournament-map .bracket-node.has-winner .player-row:not(.selected) .player-name {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: rgba(142, 150, 159, 0.4);
}

.tournament-map .bracket-node.has-winner .player-row:not(.selected) .player-seed {
  color: var(--muted);
  opacity: 0.6;
}

@media (min-width: 980px) {
  .tournament-map {
    position: static;
    max-height: none;
  }
}

.round-tabs {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0;
  margin: 0 0 0.8rem;
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}

.round-tabs a {
  flex: 0 0 auto;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.18rem 0 0.45rem;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--muted-strong);
  font-size: 0.86rem;
  font-weight: 650;
}

.round-tab-short {
  display: none;
}

@media (max-width: 720px) {
  .round-tabs {
    gap: 0.45rem;
  }
  .round-tabs a {
    padding-inline: 0.35rem;
  }
  .round-tab-long {
    display: none;
  }
  .round-tab-short {
    display: inline;
  }
}

.round-tabs a:hover,
.round-tabs a:focus {
  color: var(--ink);
}

.round-tabs a.active {
  background: transparent;
  border-color: var(--clay);
  color: var(--ink);
}

.match-feed {
  display: grid;
  gap: 1rem;
}

.match-group {
  display: grid;
  gap: 0.55rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.match-group:first-child {
  padding-top: 0;
  border-top: 0;
}

.match-group-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.8rem;
  color: var(--muted);
}

.match-group-header h3 {
  margin-bottom: 0.1rem;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
}

.match-group-header p {
  margin-bottom: 0;
  font-size: 0.76rem;
  font-weight: 600;
}

.match-group-header > span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  text-transform: uppercase;
}

.match-list {
  display: grid;
  gap: 0.5rem;
}

.match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 285px), 1fr));
  gap: 0.55rem;
}

.match-card {
  padding: 0.62rem;
  color: #f6f7f8;
  border-radius: 6px;
}

.match-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.46rem;
  color: #e8ecf0;
  font-size: 0.78rem;
  font-weight: 650;
}

.match-card.is-disabled {
  opacity: 0.62;
}

.match-card-focus {
  animation: matchFocusPulse 1.4s ease-out;
}

@keyframes matchFocusPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(238, 102, 69, 0.6);
  }
  60% {
    box-shadow: 0 0 0 6px rgba(238, 102, 69, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(238, 102, 69, 0);
  }
}

.match-title,
.match-actions {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 0.5rem;
}

.match-title strong {
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
}

.match-title time {
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}

.match-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
}

.feeder-hint {
  margin: 0;
  font-size: 0.86rem;
}

.feeder-link {
  color: var(--blue);
  font-weight: 650;
}

.feeder-link:hover {
  color: #cad8e8;
  text-decoration: underline;
}

.inline-clear {
  width: 2.7rem;
  min-height: 26px;
  border: 0;
  border-radius: 5px;
  padding: 0.16rem 0.4rem;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 650;
}

.inline-clear:hover,
.inline-clear:focus {
  color: var(--ink);
  background: #222830;
}

.inline-clear:disabled {
  visibility: hidden;
  pointer-events: none;
}

.match-card .muted {
  color: #b8c1cc;
}

.match-card .secondary-button {
  background: #222b35;
  border-color: #444f5d;
  color: #f6f7f8;
  box-shadow: none;
}

.match-card .subtle-button {
  color: var(--gold);
  border-color: #444f5d;
}

.match-summary,
.score-line {
  margin: 0 0 0.45rem;
  color: #b8c1cc;
  font-size: 0.76rem;
  font-weight: 600;
}

.choice-list {
  display: grid;
  gap: 0.36rem;
}

.choice-button {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  border: 1px solid #303a46;
  border-radius: 6px;
  padding: 0.38rem 0.48rem;
  background: #1b222a;
  color: #f6f7f8;
  text-align: left;
  cursor: pointer;
}

.choice-button:hover,
.choice-button:focus {
  border-color: #697786;
  background: #222b35;
  box-shadow: 0 0 0 2px rgba(238, 102, 69, 0.12);
}

.player-row {
  min-width: 0;
  width: 100%;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 0.42rem;
}

.player-flag {
  width: 22px;
  height: 16px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 2.5px;
  background: transparent;
}

.player-flag img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.player-flag.empty {
  background: var(--panel-3);
  border-radius: 2.5px;
}

.player-copy {
  min-width: 0;
  display: grid;
  grid-template-columns: 1.3rem minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0.32rem;
}

.player-seed {
  color: #8f98a5;
  font-size: 0.82rem;
  font-weight: 650;
  text-align: right;
}

.player-name {
  min-width: 0;
  overflow: hidden;
  color: #f6f7f8;
  font-size: 0.98rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-entry {
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 650;
}

.player-row.selected .player-name {
  color: var(--ink);
}

.player-row.compact {
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 0.32rem;
}

.player-row.compact .player-flag {
  width: 18px;
  height: 13px;
  border-radius: 2px;
}

.player-row.compact .player-copy {
  grid-template-columns: 1.15rem minmax(0, 1fr) auto;
  gap: 0.22rem;
}

.player-row.compact .player-seed,
.player-row.compact .player-name,
.player-row.compact .player-entry {
  font-size: 0.68rem;
}

.score-field {
  gap: 0.3rem;
  color: #c3cbd5;
  font-size: 0.78rem;
}

.score-field input {
  min-height: 40px;
}

.match-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.44rem;
  margin: 0.55rem 0 0.5rem;
}

.compact-button {
  min-height: 36px;
  padding: 0.42rem 0.62rem;
}

.match-details {
  margin-top: 0.45rem;
  border-top: 1px solid var(--line);
  padding-top: 0.5rem;
}

.match-details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  list-style: none;
  padding: 0.2rem 0;
}

.match-details summary::marker,
.match-details summary::-webkit-details-marker {
  display: none;
}

.match-details summary::before {
  content: "+ ";
  color: var(--muted);
  font-weight: 700;
}

.match-details[open] summary::before {
  content: "− ";
}

.match-details summary:hover {
  color: var(--ink);
}

.choice-button.selected {
  border-color: rgba(238, 102, 69, 0.72);
  background: #20242a;
  color: var(--ink);
  box-shadow: 0 0 0 1px rgba(238, 102, 69, 0.18), 0 6px 22px -14px rgba(238, 102, 69, 0.55);
  animation: pickSelected 0.55s ease-out;
}

@keyframes pickSelected {
  0% {
    box-shadow: 0 0 0 0 rgba(238, 102, 69, 0.6);
  }
  60% {
    box-shadow: 0 0 0 5px rgba(238, 102, 69, 0);
  }
  100% {
    box-shadow: 0 0 0 1px rgba(238, 102, 69, 0.18), 0 6px 22px -14px rgba(238, 102, 69, 0.55);
  }
}

.choice-button:disabled {
  cursor: default;
  opacity: 1;
}

.choice-button[aria-busy="true"],
.secondary-button[aria-busy="true"],
.subtle-button[aria-busy="true"] {
  opacity: 0.72;
}

.table-wrap {
  overflow-x: auto;
  position: relative;
  scrollbar-width: thin;
}

.standings-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.standings-table th,
.standings-table td {
  padding: 0.78rem 0.7rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.standings-table th:nth-child(n+3),
.standings-table td:nth-child(n+3) {
  text-align: right;
  white-space: nowrap;
}

.standings-table th {
  position: sticky;
  top: 0;
  background: #10161c;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 650;
}

.standings-table td {
  color: var(--muted-strong);
}

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

.standings-table strong {
  color: var(--ink);
}

.score-total {
  color: var(--gold);
}

.user-list {
  display: grid;
  gap: 0.75rem;
}

.user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
}

.user-row h2 {
  color: var(--ink);
}

.admin-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.upload-form {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.draw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 0.65rem;
}

.draw-entry {
  display: grid;
  grid-template-columns: 1fr 4.2rem 4.6rem 3.7rem;
  gap: 0.45rem;
  margin: 0;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.draw-entry legend {
  padding: 0 0.25rem;
  color: var(--gold);
  font-weight: 650;
}

.sticky-save {
  position: sticky;
  bottom: 1rem;
  margin-top: 1rem;
}

.draw-save-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin: 1rem -2rem -2rem;
  padding: 0.75rem 2rem 1rem;
  background: rgba(15, 17, 19, 0.92);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(10px);
  z-index: 5;
}

.draw-save-bar .primary-button {
  min-width: 11rem;
}

.draw-entry.is-placeholder {
  border-color: rgba(210, 164, 95, 0.28);
  background: rgba(31, 24, 13, 0.45);
}

.points-fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.85rem 1rem 1rem;
  margin: 0;
}

.points-fieldset legend {
  padding: 0 0.4rem;
  color: var(--muted-strong);
  font-size: 0.84rem;
  font-weight: 650;
}

.points-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 215px), 1fr));
  gap: 0.75rem;
}

@media (max-width: 900px) {
  .site-header {
    align-items: stretch;
    flex-direction: column;
    padding: 0.8rem 1rem;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .page {
    padding: 1rem;
  }

  .bracket-layout {
    grid-template-columns: 1fr;
  }

  .bracket-header {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  h1 {
    font-size: 1.85rem;
  }

  .page-heading,
  .page-heading.compact,
  .section-heading,
  .user-row,
  .bracket-header {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .bracket-title-block h1 {
    font-size: 1.85rem;
  }

  .bracket-map-panel,
  .picker-panel {
    padding: 0.78rem;
  }

  .picker-panel {
    order: 1;
  }

  .bracket-map-panel {
    order: 2;
  }

  .bracket-viewport {
    max-height: 58vh;
  }

  .bracket-board {
    grid-template-columns: repeat(7, 198px);
    grid-template-rows: 36px repeat(64, 76px);
    min-width: 1500px;
  }

  .connector-join {
    height: var(--connector-height-mobile);
  }

  .tournament-map .bracket-board {
    grid-template-rows: 36px repeat(64, 104px);
  }

  .tournament-map .connector-join {
    height: calc(var(--row-span) * 104px);
  }

  .match-group-header {
    align-items: start;
    flex-direction: column;
    gap: 0.16rem;
  }

  .match-detail-grid {
    grid-template-columns: 1fr;
  }

  .draw-entry {
    grid-template-columns: 1fr;
  }

  .draw-save-bar {
    margin: 1rem -1rem -1rem;
    padding: 0.7rem 1rem 0.9rem;
  }
}
