@font-face {
  font-family: "South Park Cyrillic";
  src: url("assets/fonts/SouthParkCyrillic.ttf") format("truetype");
  font-weight: 400 950;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Mellizan;
  src: url("assets/fonts/Mellizan.otf") format("opentype");
  font-weight: 400 950;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #111112;
  --panel: #1d1d20;
  --panel-2: #26252a;
  --text: #f7f3ec;
  --muted: #b9afa4;
  --line: rgba(255, 255, 255, 0.12);
  --burgundy: #7f1d2a;
  --burgundy-2: #b93845;
  --orange: #d97812;
  --gold: #f2c14e;
  --green: #4db36c;
  --blue: #4b8fe8;
  --violet: #9a66ff;
  --danger: #ef5b5b;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  --display-font: "South Park Cyrillic", "South Park", Georgia, serif;
  --number-font: Mellizan, "Mellizan Numbers", Georgia, serif;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(180deg, #161314 0%, #111112 42%, #151515 100%);
  min-height: 100vh;
}

body:has(.showcase) {
  background: #ffffff;
}

body:has(.showcase)::before,
body:has(.showcase)::after {
  content: "";
  position: fixed;
  top: 0;
  bottom: 0;
  z-index: 0;
  width: calc((100vw - min(100vw, calc(100vh * 16 / 9))) / 2);
  background-image: url("assets/bgs/overallBG.png");
  background-repeat: no-repeat;
  background-size: auto 100%;
  pointer-events: none;
}

body:has(.showcase)::before {
  left: 0;
  background-position: 18% center;
}

body:has(.showcase)::after {
  right: 0;
  background-position: 82% center;
}

.asset-loading {
  min-height: 100vh;
  display: grid;
  place-items: center;
  gap: 18px;
  align-content: center;
  background: #111113;
  color: var(--gold);
}

.asset-loading-mark {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0;
}

.asset-loading-bar {
  width: min(320px, 62vw);
  height: 5px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.14);
}

.asset-loading-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--gold);
  transition: width 180ms ease;
}

.asset-loading-status {
  display: flex;
  gap: 10px;
  align-items: baseline;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.asset-loading-status strong {
  color: var(--gold);
  font-size: 18px;
}

.asset-loading-errors {
  width: min(560px, calc(100vw - 40px));
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  color: #ffd8a8;
  background: rgba(217, 120, 18, 0.13);
  border: 1px solid rgba(217, 120, 18, 0.36);
  border-radius: 6px;
  font-size: 12px;
  text-align: center;
}

.asset-loading-errors span {
  color: rgba(255, 255, 255, 0.72);
  overflow-wrap: anywhere;
}

.asset-loading-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

@keyframes assetLoadingSweep {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(240%);
  }
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  color: var(--text);
  background: #343136;
  border-radius: 6px;
  padding: 9px 12px;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

button:hover {
  transform: translateY(-1px);
  background: #403b42;
}

button.primary {
  background: var(--burgundy-2);
  box-shadow: 0 8px 22px rgba(185, 56, 69, 0.22);
}

button.warning {
  background: var(--orange);
  color: #241103;
  font-weight: 800;
}

button.ghost {
  background: transparent;
  border: 1px solid var(--line);
}

button.ghost.active {
  color: #241103;
  background: var(--gold);
  border-color: transparent;
  font-weight: 850;
}

button.danger {
  background: #6d2525;
}

input,
select {
  width: 100%;
  color: var(--text);
  background: #151518;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(242, 193, 78, 0.14);
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 15, 16, 0.9);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--burgundy);
  font-weight: 900;
}

.brand strong {
  display: block;
  white-space: nowrap;
}

.brand span {
  color: var(--muted);
  font-size: 12px;
}

.nav-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 12px;
}

.nav-links a.active {
  background: var(--burgundy);
  border-color: transparent;
}

.admin-shell {
  width: min(1500px, calc(100vw - 28px));
  margin: 22px auto 40px;
  display: grid;
  gap: 18px;
}

.admin-tabs {
  position: sticky;
  top: 74px;
  z-index: 18;
  display: inline-flex;
  width: fit-content;
  gap: 3px;
  padding: 4px;
  background: rgba(12, 12, 13, 0.88);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.admin-tabs button {
  min-width: 92px;
  border-radius: 999px;
  background: transparent;
}

.admin-tabs button.active {
  color: #1d1204;
  background: var(--gold);
  box-shadow: 0 0 18px rgba(242, 193, 78, 0.24);
  font-weight: 900;
}

.admin-pane:not(.is-active) {
  display: none !important;
}

.admin-pane.is-active {
  display: grid;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.25fr) minmax(330px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

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

.panel-header h2,
.panel-header h3 {
  margin: 0;
  font-size: 18px;
}

.panel-body {
  padding: 16px;
  display: grid;
  gap: 14px;
}

.server-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.server-tools span {
  font-weight: 850;
}

.server-tools small {
  color: var(--muted);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  gap: 10px;
}

.form-grid.compact {
  grid-template-columns: repeat(3, minmax(100px, 1fr));
}

.form-grid label:has(input[data-field="logoLeft"]),
.form-grid label:has(input[data-field="logoRight"]) {
  display: grid;
  gap: 6px;
}

.form-grid input[data-logo-image] {
  font-size: 11px;
  padding: 7px;
}

.form-actions {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
}

:root {
  --admin-player-columns: minmax(150px, 1.18fr) minmax(108px, 0.82fr) minmax(108px, 0.82fr) 92px 86px minmax(112px, 0.74fr) 112px;
}

.player-list,
.team-editor {
  display: grid;
  gap: 8px;
}

.player-table {
  min-width: 0;
  display: grid;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.player-list-toolbar {
  display: grid;
  grid-template-columns: var(--admin-player-columns);
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: 7px;
  min-width: 836px;
}

.player-list-toolbar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.sort-heading {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 5px;
  align-items: center;
}

.sort-heading button {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #21aaff;
  background: transparent;
  border: 0;
  font-size: 20px;
  font-weight: 950;
  line-height: 1;
}

.sort-heading button:hover,
.sort-heading button.active {
  color: #ffffff;
  background: rgba(33, 170, 255, 0.28);
  box-shadow: none;
  transform: none;
}

.admin-row {
  display: grid;
  grid-template-columns: var(--admin-player-columns);
  gap: 8px;
  align-items: center;
  padding: 9px;
  background: var(--panel-2);
  border: 1px solid transparent;
  border-radius: 7px;
  min-width: 836px;
}

.admin-row > input,
.admin-row > select,
.admin-row > button,
.admin-row .form-actions button {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-image-tools {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  align-items: center;
}

.player-image-tools.has-image {
  grid-template-columns: minmax(0, 1fr) minmax(82px, auto) 58px;
}

.player-image-tools input,
.player-image-tools select {
  min-width: 0;
  padding: 6px;
  font-size: 12px;
}

.admin-row select {
  min-width: 0;
}

.flag-edit-btn {
  height: 39px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 6px;
}

.admin-row .form-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px;
  gap: 8px;
  align-items: center;
}

.admin-row .admin-row-actions {
  grid-template-columns: minmax(0, 1fr) 34px;
}

.player-list-toolbar > :last-child,
.admin-row .admin-row-actions {
  position: sticky;
  right: 0;
  z-index: 3;
  padding-left: 8px;
  background: var(--panel-2);
  box-shadow: -14px 0 18px rgba(0, 0, 0, 0.22);
}

.player-list-toolbar > :last-child {
  z-index: 4;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2d2d30;
}

.admin-team-label {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-danger {
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 6px;
  font-weight: 950;
}

.flag-edit-btn .flag {
  width: 28px;
  height: 20px;
}

.admin-row.selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(242, 193, 78, 0.12);
}

.admin-row small,
.team-row small {
  color: var(--muted);
}

.team-row {
  display: grid;
  grid-template-columns: 1fr 96px auto;
  gap: 8px;
  align-items: center;
  padding: 9px;
  background: var(--panel-2);
  border: 1px solid transparent;
  border-radius: 7px;
}

.team-row.active {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(217, 120, 18, 0.15);
}

.timer-controls {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 10px;
  align-items: end;
}

.card-tuning-layout {
  display: grid;
  grid-template-columns: minmax(180px, 230px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-top: 10px;
}

.card-tuning-details {
  align-self: start;
}

.card-tuning-summary {
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.card-tuning-summary::-webkit-details-marker {
  display: none;
}

.card-tuning-summary::after {
  content: "Open";
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.card-tuning-details[open] .card-tuning-summary::after {
  content: "Close";
}

.card-tuning-preview {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.card-tuning-preview .player-card {
  width: min(100%, 218px);
  max-width: 218px;
  cursor: default;
  transform: none;
}

.card-tuning-preview .player-card:hover {
  transform: none;
}

.card-tuning-preview .flag,
.card-tuning-preview .rank-box {
  cursor: move;
  touch-action: none;
  user-select: none;
}

.card-tuning-preview .flag-frame {
  outline: 2px solid rgba(33, 170, 255, 0.72);
  outline-offset: 2px;
  touch-action: none;
}

.card-tuning-preview .rank-box::after {
  content: "";
  position: absolute;
  inset: 16% 10% 5%;
  border: 2px solid rgba(33, 170, 255, 0);
  border-radius: 6px;
  pointer-events: none;
}

.card-tuning-preview .rank-box:hover::after {
  border-color: rgba(33, 170, 255, 0.7);
}

.card-tuning-preview small {
  color: var(--muted);
  line-height: 1.3;
  text-align: center;
}

.card-tuning-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 10px;
}

.card-tuning-grid input {
  padding: 7px 8px;
}

.card-tuning-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.timer-readout {
  display: grid;
  gap: 8px;
}

.timer-text {
  font-size: 42px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.progress-track {
  width: 100%;
  height: 13px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #ffb33f, var(--orange), #8e3610);
  transition: none;
}

.auction-panel {
  display: grid;
  gap: 12px;
}

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

.live-stage-panel {
  margin: 16px 0;
}

.stage-lane {
  display: grid;
  grid-template-columns: repeat(12, minmax(66px, 1fr));
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 3px;
}

.stage-step {
  min-height: 42px;
  display: grid;
  gap: 2px;
  place-items: center;
  padding: 5px 7px;
  background: var(--stage-dark, rgba(255, 255, 255, 0.08));
  border: 1px solid color-mix(in srgb, var(--stage-color, #fff) 58%, rgba(255, 255, 255, 0.12));
  border-radius: 5px;
}

.stage-step.active {
  color: #fff;
  background: linear-gradient(180deg, var(--stage-color, var(--gold)), var(--stage-dark, var(--gold)));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--stage-color, var(--gold)) 42%, transparent);
}

.stage-step.active[data-stage-phase="pick"] {
  transform: scale(1.035);
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--stage-color, var(--gold)) 48%, transparent),
    0 0 22px color-mix(in srgb, var(--stage-color, var(--gold)) 58%, transparent);
}

.stage-step small {
  color: inherit;
  opacity: 0.72;
}

.stage-step span {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.live-stage-tools,
.host-reveal-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.auto-next-toggle {
  min-height: 39px;
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
  border-radius: 6px;
  text-transform: none;
  cursor: pointer;
}

.auto-next-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--gold);
}

.auto-next-toggle span {
  white-space: nowrap;
  font-size: 12px;
  font-weight: 850;
}

.live-stage-status {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.live-stage-status > div {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
}

.live-stage-status small {
  color: var(--muted);
  font-size: 11px;
}

.live-stage-status strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mode-toggle {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: #141214;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.mode-toggle button {
  padding: 6px 12px;
  border-radius: 999px;
  background: transparent;
}

.mode-toggle button.active {
  color: #120b02;
  background: var(--gold);
  box-shadow: 0 0 18px rgba(242, 193, 78, 0.28);
}

.manual-mode-note {
  padding: 14px 16px;
  color: var(--muted);
  background: #171518;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stage-duration-grid,
.captain-link-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.stage-duration-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.captain-link-grid input {
  font-size: 12px;
}

.captain-link-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.captain-online-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.captain-online-dot.is-online {
  background: #27d96b;
  box-shadow:
    0 0 0 1px rgba(39, 217, 107, 0.55),
    0 0 10px rgba(39, 217, 107, 0.55);
}

.captain-online-dot.is-spectator {
  background: #8fb7c6;
  box-shadow:
    0 0 0 1px rgba(143, 183, 198, 0.5),
    0 0 13px rgba(143, 183, 198, 0.28);
}

.host-pick-preview {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.host-pick-card .player-card {
  width: 62px;
  max-width: 62px;
  cursor: default;
  pointer-events: none;
}

.host-pick-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.host-pick-copy small,
.host-pick-copy span {
  color: var(--muted);
}

.host-pick-copy strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 6px;
}

.copy-link-button {
  display: grid;
  place-items: center;
  padding: 7px 0;
  font-size: 12px;
  font-weight: 900;
}

.copy-link-button.is-copied {
  color: #102515;
  background: var(--green);
  box-shadow: 0 0 18px rgba(77, 179, 108, 0.26);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
  font-weight: 800;
}

.pill.price-30 {
  background: rgba(239, 91, 91, 0.22);
  color: #ffb4b4;
}

.pill.price-20 {
  background: rgba(242, 193, 78, 0.2);
  color: #ffe09a;
}

.pill.price-10 {
  background: rgba(77, 179, 108, 0.2);
  color: #9ee7b6;
}

.pill.price-0 {
  background: rgba(75, 143, 232, 0.2);
  color: #b6d4ff;
}

.hint {
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
}

.showcase {
  position: fixed;
  inset: 0;
  width: min(100vw, calc(100vh * 16 / 9));
  height: min(100vh, calc(100vw * 9 / 16));
  margin: auto;
  overflow: hidden;
  display: grid;
  grid-template-rows: 10.8% minmax(0, 89.2%);
  background: url("assets/bgs/overallBG.png") center / cover no-repeat;
  color: #ffffff;
}

.showcase-header {
  --showcase-header-align-y: -14px;
  display: grid;
  grid-template-columns: minmax(150px, 18%) minmax(220px, 24%) minmax(180px, 22%) minmax(140px, 1fr);
  gap: 1.8%;
  align-items: center;
  padding: 1.05% 1.35% 0.85%;
  background: #733031;
  border-bottom: 0;
}

.logo-box {
  height: 100%;
  display: grid;
  align-items: center;
  justify-items: start;
  transform: translateY(var(--showcase-header-align-y));
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  font-family: var(--display-font);
  font-size: clamp(16px, 2.6vh, 46px);
  font-weight: 900;
  min-width: 0;
  overflow: hidden;
}

.logo-left::before {
  content: none;
}

.logo-left {
  padding-left: 2%;
}

.logo-right {
  display: none;
}

.showcase-logo-img {
  width: auto;
  max-width: 100%;
  height: clamp(34px, 5.8vh, 70px);
  max-height: calc(100% - 8px);
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.36));
}

.tournament-title {
  display: grid;
  justify-items: center;
  align-items: center;
  height: 100%;
  min-width: 0;
  padding: 0 2%;
  transform: translateY(var(--showcase-header-align-y));
  background: transparent;
  color: #ffffff;
  text-align: center;
}

.tournament-title h1 {
  margin: 0;
  font-family: var(--display-font);
  font-size: clamp(16px, 2.5vh, 44px);
  line-height: 1;
  letter-spacing: 0;
}

.friendship-logo-slot {
  height: 100%;
  min-width: 0;
  display: grid;
  place-items: center;
  transform: translateY(var(--showcase-header-align-y));
}

.friendship-logo-img {
  width: auto;
  max-width: 100%;
  height: clamp(64px, 10.8vh, 140px);
  max-height: calc(100% + 20px);
  object-fit: contain;
  display: block;
  pointer-events: none;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.28));
}

.showcase-timer {
  position: relative;
  z-index: 95;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.32em;
  transform: translateY(var(--showcase-header-align-y));
  border-radius: 0;
  background: transparent;
  border: 0;
  font-family: var(--number-font);
  font-size: clamp(30px, 4.8vh, 90px);
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  color: #ffffff;
  line-height: 1;
  min-width: 0;
}

.timer-icon {
  width: 1.18em;
  height: 1.18em;
  display: block;
  flex: 0 0 auto;
  background: currentColor;
  mask: url("assets/logo/timer_icon_mask.png") center / contain no-repeat;
  -webkit-mask: url("assets/logo/timer_icon_mask.png") center / contain no-repeat;
  transform: translateY(-0.02em);
  cursor: pointer;
  transition: opacity 120ms ease, transform 120ms ease;
}

.timer-icon:hover {
  opacity: 0.82;
  transform: translateY(-0.02em) scale(1.04);
}

.showcase.is-spectator .timer-icon,
.showcase.is-spectator .showcase-stage-step,
.showcase.is-spectator .player-card,
.showcase.is-spectator .team-box,
.showcase.is-spectator .team-slot {
  cursor: default;
}

.showcase.is-spectator .timer-icon,
.showcase.is-spectator .showcase-stage-step {
  pointer-events: none;
}

.showcase.is-spectator .timer-icon:hover {
  opacity: 1;
  transform: translateY(-0.02em);
}

.captain-action-bar {
  position: absolute;
  left: 2.5%;
  right: 2.5%;
  bottom: 2.2%;
  z-index: 60;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  color: #fff;
  background: rgba(20, 16, 18, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(6px);
}

.captain-action-bar strong,
.captain-action-bar span,
.captain-pick-summary {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.captain-action-bar span {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.captain-pick-summary {
  justify-self: center;
  font-family: var(--display-font);
  font-size: clamp(16px, 2vh, 28px);
  font-weight: 950;
}

.betting-overlay {
  --betting-scale: var(--auction-betting-scale, 1);
  position: absolute;
  inset: 0;
  z-index: 70;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 2.6%;
  align-items: center;
  justify-items: center;
  padding: 3.6% 2% 4.2%;
  color: #fff;
  background: rgba(0, 0, 0, 0.68);
}

.betting-overlay.is-leaving {
  opacity: 0;
  transform: scale(0.985);
  transition:
    opacity 620ms ease,
    transform 760ms cubic-bezier(0.16, 0.86, 0.24, 1);
}

.betting-overlay.is-assignment-flight,
.host-sale-overlay.is-assignment-flight {
  pointer-events: none;
}

.betting-overlay.is-assignment-flight .betting-title,
.betting-overlay.is-assignment-flight .betting-panel,
.host-sale-overlay.is-assignment-flight .betting-title,
.host-sale-overlay.is-assignment-flight .host-sale-panel {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 180ms ease,
    transform 260ms cubic-bezier(0.16, 0.86, 0.24, 1);
}

.betting-overlay.is-assignment-flight .betting-card-wrap::before,
.betting-overlay.is-assignment-flight .betting-card-wrap::after,
.host-sale-overlay.is-assignment-flight .betting-card-wrap::before,
.host-sale-overlay.is-assignment-flight .betting-card-wrap::after {
  opacity: 0;
  transition: opacity 180ms ease;
}

.betting-overlay.is-assignment-flight .betting-card-wrap .player-card,
.host-sale-overlay.is-assignment-flight .betting-card-wrap .player-card,
.player-card.is-sale-source-hidden {
  visibility: hidden;
  animation: none;
}

.pre-betting-overlay {
  background: rgba(0, 0, 0, 0.58);
}

.prebet-back {
  position: absolute;
  top: 4%;
  left: 4%;
  z-index: 2;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 999px;
  font-size: 24px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.12);
}

.prebet-panel {
  align-self: center;
}

.prebet-minimum {
  display: grid;
  justify-items: end;
  gap: 4px;
  color: var(--gold);
}

.prebet-minimum small {
  color: rgba(255, 255, 255, 0.68);
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.prebet-minimum strong {
  font-family: var(--number-font);
  font-size: clamp(36px, 6vh, 86px);
  line-height: 0.9;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.65);
}

.prebet-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.betting-title {
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.72);
  zoom: var(--betting-scale);
}

.betting-title small {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.betting-title h2 {
  margin: 0;
  font-family: var(--display-font);
  font-size: clamp(26px, 5vh, 74px);
  line-height: 0.95;
}

.betting-title .timer-text {
  font-size: clamp(22px, 3.8vh, 48px);
}

.betting-card-wrap {
  position: relative;
  display: grid;
  justify-items: center;
  align-items: center;
  zoom: var(--betting-scale);
}

.betting-card-wrap::before {
  content: "";
  position: absolute;
  width: min(36vh, 370px);
  aspect-ratio: 1;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(242, 193, 78, 0.34), rgba(242, 193, 78, 0.1) 42%, rgba(242, 193, 78, 0) 70%);
  filter: blur(4px);
  pointer-events: none;
  animation: bettingGlowPulse 1800ms ease-in-out infinite;
}

.betting-card-wrap::after {
  content: "";
  position: absolute;
  width: min(48vh, 480px);
  aspect-ratio: 1;
  border-radius: 999px;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(242, 193, 78, 0) 0deg,
    rgba(242, 193, 78, 0.32) 7deg,
    rgba(242, 193, 78, 0) 15deg,
    rgba(242, 193, 78, 0) 30deg
  );
  mask: radial-gradient(circle, transparent 0 24%, #000 35%, transparent 68%);
  -webkit-mask: radial-gradient(circle, transparent 0 24%, #000 35%, transparent 68%);
  opacity: 0.65;
  pointer-events: none;
  animation: bettingRaysSpin 9000ms linear infinite;
}

.betting-card-wrap .player-card {
  position: relative;
  z-index: 1;
  width: min(27vh, 270px);
  height: auto;
  filter: drop-shadow(0 0 22px rgba(242, 193, 78, 0.4)) drop-shadow(0 20px 34px rgba(0, 0, 0, 0.56));
  animation: bettingCardFloat 2200ms ease-in-out infinite;
}

.betting-panel {
  width: min(100%, 1360px);
  display: grid;
  gap: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  zoom: var(--betting-scale);
}

.betting-overlay > .captain-bid-row {
  zoom: var(--betting-scale);
}

.betting-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.betting-head h2 {
  margin: 0;
  font-family: var(--display-font);
  font-size: clamp(24px, 4vh, 58px);
}

.captain-bid-row {
  position: relative;
  width: min(100%, 1360px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.captain-bid-cell {
  position: relative;
  z-index: 1;
  height: 158px;
  min-height: 158px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 86px 60px;
  align-content: stretch;
  align-items: stretch;
  justify-items: stretch;
  gap: 10px;
  padding: 0;
  text-align: center;
  background: transparent;
  border: 0;
  border-radius: 7px;
  transition:
    opacity 260ms ease,
    filter 260ms ease,
    box-shadow 260ms ease;
}

.captain-bid-cell.has-controls {
  height: 158px;
  min-height: 158px;
}

.captain-bid-cell.is-active {
  filter: drop-shadow(0 0 22px rgba(242, 193, 78, 0.34));
}

.betting-turn-frame {
  position: absolute;
  z-index: 3;
  top: 0;
  left: var(--turn-left);
  width: calc((100% - 54px) / 4);
  height: 156px;
  pointer-events: none;
  animation: bettingTurnSlide 360ms cubic-bezier(0.65, 0, 0.35, 1) both;
}

.betting-turn-frame.is-static { animation: none; }

.betting-turn-frame i {
  position: absolute;
  left: -3px;
  right: -3px;
  display: block;
  border: 3px solid #f2c14e;
  border-radius: 8px;
  box-shadow: inset 0 0 14px rgba(242, 193, 78, 0.28), 0 0 8px rgba(242, 193, 78, 0.92), 0 0 26px rgba(242, 193, 78, 0.56);
}

.betting-turn-frame i:first-child { top: -3px; height: 92px; }
.betting-turn-frame i:last-child { bottom: -3px; height: 66px; }

@keyframes bettingTurnSlide {
  from { transform: translateX(var(--turn-shift)); }
  to { transform: translateX(0); }
}

.captain-bid-cell.is-dimmed {
  opacity: 0.44;
  filter: grayscale(1);
}

.captain-bid-cell.is-winner {
  background: color-mix(in srgb, var(--bid-team-dark, #30230e) 72%, #000);
  box-shadow:
    0 0 0 3px rgba(242, 193, 78, 0.28),
    0 0 34px rgba(242, 193, 78, 0.52);
}

.captain-bid-top {
  width: 100%;
  height: 86px;
  min-height: 86px;
  display: grid;
  place-items: center;
  padding: 8px 12px;
  font-family: var(--number-font);
  font-size: clamp(20px, 3vh, 40px);
  font-weight: 950;
  background: color-mix(in srgb, var(--bid-team-dark, #131113) 76%, #090909);
  border: 1px solid color-mix(in srgb, var(--bid-team-color, #fff) 32%, rgba(255, 255, 255, 0.12));
  border-radius: 6px;
}

.bid-team-bar {
  position: relative;
  width: 100%;
  height: 60px;
  min-height: 60px;
  display: grid;
  place-items: center;
  padding: 8px 12px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bid-team-color, #131113) 82%, #000), var(--bid-team-dark, #131113));
  border: 1px solid color-mix(in srgb, var(--bid-team-color, #fff) 38%, rgba(255, 255, 255, 0.12));
  border-radius: 6px;
}

.bid-team-bar > strong {
  width: fit-content;
  max-width: calc(100% - 74px);
  min-width: 0;
  justify-self: center;
  align-self: center;
  font-family: var(--display-font);
  font-size: clamp(13px, 1.78vh, 24px);
  line-height: 0.9;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bid-balance {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(255, 255, 255, 0.82);
  font-family: var(--number-font);
  font-size: clamp(14px, 2vh, 22px);
  font-weight: 950;
}

.bid-balance-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.prebet-team-row .captain-bid-top {
  width: 100%;
  height: 86px;
  min-height: 86px;
  font-family: inherit;
  font-size: 14px;
}

.prebet-team-cell:not(.has-controls) .captain-bid-top {
  visibility: hidden;
}

.prebet-cell-controls {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.captain-bid-cell.is-highest .captain-bid-top,
.captain-bid-cell.is-highest .bid-team-bar {
  border-color: #f2c14e;
  box-shadow: inset 0 0 18px rgba(242, 193, 78, 0.14), 0 0 20px rgba(242, 193, 78, 0.38);
}

.prebet-cell-controls span {
  font-family: var(--number-font);
  font-size: clamp(18px, 2.8vh, 34px);
  font-weight: 950;
  color: var(--gold);
}

.thinking-dots::after {
  content: "...";
}

.captain-bid-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px auto;
  gap: 12px;
  align-items: end;
}

.captain-bid-controls.inline {
  width: 100%;
  height: 68px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 22px 40px;
  gap: 6px;
  align-items: stretch;
}

.captain-bid-slider {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 2px;
  align-items: center;
  min-height: 0;
}

.captain-bid-min {
  color: rgba(255, 255, 255, 0.72);
  font-family: inherit;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-align: left;
  text-transform: uppercase;
}

.captain-bid-action {
  display: grid;
  grid-template-columns: minmax(62px, 0.34fr) minmax(124px, 0.66fr);
  gap: 8px;
  align-items: stretch;
  min-width: 0;
}

.captain-bid-controls.inline input[type="number"] {
  width: 100%;
  min-width: 0;
  text-align: center;
  padding: 6px 8px;
  border-radius: 5px;
  font-family: var(--number-font);
  font-size: 23px;
  font-weight: 950;
}

.captain-bid-controls.inline button {
  width: 100%;
  padding: 6px 10px;
  border-radius: 5px;
  white-space: nowrap;
  font-size: 15px;
}

.captain-bid-buttons {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.captain-bid-buttons .pass {
  color: #fff;
  background: #552124;
  border: 1px solid rgba(255, 255, 255, 0.34);
}

.captain-bid-buttons button:active:not(:disabled) {
  transform: translateY(1px);
}

.captain-bid-controls input[type="range"] {
  appearance: none;
  width: 100%;
  height: 16px;
  margin: 0;
  align-self: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--bid-team-color, var(--gold)), color-mix(in srgb, var(--bid-team-color, var(--gold)) 45%, #fff));
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--bid-team-color, #fff) 40%, rgba(255, 255, 255, 0.18)),
    0 0 16px color-mix(in srgb, var(--bid-team-color, var(--gold)) 26%, transparent);
}

.captain-bid-controls input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 24px;
  height: 24px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: var(--bid-team-dark, var(--gold));
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--bid-team-color, var(--gold)) 72%, transparent),
    0 8px 18px rgba(0, 0, 0, 0.34);
}

.captain-bid-controls input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: var(--bid-team-dark, var(--gold));
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--bid-team-color, var(--gold)) 72%, transparent),
    0 8px 18px rgba(0, 0, 0, 0.34);
}

.captain-bid-controls input[type="range"]::-moz-range-track {
  height: 16px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--bid-team-color, var(--gold)), color-mix(in srgb, var(--bid-team-color, var(--gold)) 45%, #fff));
}

.captain-bid-controls.inline input[type="number"] {
  border-color: color-mix(in srgb, var(--bid-team-color, var(--gold)) 46%, rgba(255, 255, 255, 0.14));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bid-team-color, var(--gold)) 16%, transparent);
}

.bid-status-panel {
  width: 100%;
  height: 68px;
  display: grid;
  place-items: center;
  font-family: var(--display-font);
  font-size: clamp(24px, 3.4vh, 44px);
  color: #fff;
  background: color-mix(in srgb, var(--bid-team-dark, #181416) 72%, #090909);
  border: 1px solid color-mix(in srgb, var(--bid-team-color, #fff) 28%, rgba(255, 255, 255, 0.1));
  border-radius: 6px;
}

.bid-status-panel.is-ready {
  background: color-mix(in srgb, var(--bid-team-dark, #11351f) 72%, #112417);
  border-color: color-mix(in srgb, var(--bid-team-color, #4db36c) 64%, rgba(255, 255, 255, 0.18));
  box-shadow: 0 0 22px color-mix(in srgb, var(--bid-team-color, #4db36c) 28%, transparent);
}

.bid-status-panel.is-amount {
  color: var(--gold);
  font-family: var(--number-font);
  background: color-mix(in srgb, var(--bid-team-dark, #23190d) 70%, #130c05);
}

.bid-status-panel.is-out {
  color: rgba(255, 255, 255, 0.48);
  background: rgba(0, 0, 0, 0.44);
  border-color: rgba(255, 255, 255, 0.08);
}

@keyframes thinkingDots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75%, 100% { content: "..."; }
}

@keyframes bettingSceneIn {
  from {
    opacity: 0;
    transform: scale(1.018);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes bettingGlowPulse {
  0%, 100% {
    opacity: 0.72;
    transform: scale(0.94);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

@keyframes bettingRaysSpin {
  to { transform: rotate(360deg); }
}

@keyframes bettingCardFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1.8%); }
}

.bid-amount-visual {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.bid-amount-visual > strong {
  position: relative;
  z-index: 2;
  font-family: var(--number-font);
  font-size: clamp(30px, 4.4vh, 56px);
  line-height: 1;
  color: #fff4c3;
  text-shadow: 0 2px 0 #000, 0 0 12px rgba(0, 0, 0, 0.9);
}

.bid-amount-visual > small {
  position: absolute;
  z-index: 3;
  top: 3px;
  right: 5px;
  color: #ffe393;
  font-family: var(--display-font);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.bid-coin-piles {
  position: absolute;
  inset: 2px 8px;
  z-index: 1;
  overflow: hidden;
  opacity: 0.82;
}

.bid-coin-piles img {
  position: absolute;
  left: calc(4% + var(--pile-index) * 10.5%);
  bottom: calc(1px + (var(--pile-index) % 2) * 4px);
  width: clamp(43px, 5.2vw, 78px);
  height: 68px;
  object-fit: contain;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.64));
}

.bid-amount-visual.is-leader .bid-coin-piles img {
  filter: drop-shadow(0 0 7px rgba(242, 193, 78, 0.72)) drop-shadow(0 3px 3px rgba(0, 0, 0, 0.7));
}

@keyframes teamCardArrive {
  from {
    opacity: 0;
    transform: translateY(4px) scale(0.985);
    filter: brightness(1.35);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }
}

.showcase-main {
  width: 100%;
  height: 100%;
  margin: 0;
  display: grid;
  grid-template-rows: minmax(0, 62.5%) minmax(0, 34.9%);
  gap: 1.6%;
  padding: 0 1.15% 0.75%;
  min-height: 0;
  background: transparent;
}

.categories-panel {
  position: relative;
  min-height: 0;
  display: grid;
  grid-template-rows: 15.5% minmax(0, 1fr);
  gap: 1.2%;
  padding: 1.1% 1.2% 2.2%;
  background: #5c4948;
  overflow: visible;
}

.category-backgrounds {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  pointer-events: none;
}

.category-backgrounds img {
  width: 100%;
  height: 100%;
  min-width: 0;
  object-fit: cover;
  object-position: center;
  display: block;
}

.category-architecture {
  --arch-angle-width: 5.4%;
  --arch-angle-inset: 0.6%;
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.category-architecture img {
  position: absolute;
  user-select: none;
  -webkit-user-drag: none;
}

.arch-column {
  top: -0.8%;
  left: var(--x);
  z-index: 2;
  height: 100%;
  width: auto;
  transform: translateX(-50%);
}

.arch-column-edge-left {
  transform: translateX(-50%);
}

.arch-column-edge-right {
  transform: translateX(-50%);
}

.arch-floor {
  left: var(--left-edge);
  bottom: -10px;
  z-index: 2;
  width: calc(var(--right-edge) - var(--left-edge) + 2px);
  height: auto;
  transform: translateX(-1px) scaleY(1.04);
  transform-origin: bottom center;
}

.arch-angle {
  top: -0.4%;
  z-index: 1;
  width: var(--arch-angle-width);
  height: auto;
}

.arch-angle-left {
  left: calc(var(--left-edge) + var(--arch-angle-inset));
}

.arch-angle-right {
  right: calc(100% - var(--right-edge) + var(--arch-angle-inset));
  transform: scaleX(-1);
}

.category-heads {
  position: relative;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2.55%;
  align-items: center;
  padding-bottom: 0;
}

.category-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 45%;
  z-index: 2;
  height: 16%;
  border: 0;
  background: #c7992a;
  overflow: hidden;
  border-radius: 0;
}

.category-progress .progress-fill {
  border-radius: 0;
}

.categories {
  position: relative;
  z-index: 3;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2.55%;
  align-items: stretch;
}

.category {
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  height: 100%;
  position: relative;
}

.category.is-empty {
  opacity: 1;
}

.category-title {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.08em;
  min-height: 0;
  border-radius: 0;
  font-family: var(--number-font);
  font-size: clamp(18px, 4.1vh, 72px);
  font-weight: 950;
  line-height: 0.9;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow:
    -2px -2px 0 #000,
    2px -2px 0 #000,
    -2px 2px 0 #000,
    2px 2px 0 #000;
}

.category-title[data-price="30"] {
  background: transparent;
}

.category-title[data-price="20"] {
  background: transparent;
}

.category-title[data-price="10"] {
  background: transparent;
}

.category-title[data-price="0"] {
  background: transparent;
}

.card-grid {
  display: grid;
  gap: 4.6% 4.2%;
  align-content: center;
  justify-content: center;
  place-items: center;
  min-height: 0;
  height: 100%;
  transition:
    gap 260ms ease,
    grid-template-columns 260ms ease;
}

.category[data-layout="one"] .card-grid {
  grid-template-columns: minmax(0, 48%);
}

.category[data-layout="two"] .card-grid {
  grid-template-columns: repeat(2, minmax(0, 38%));
}

.category[data-layout="four"] .card-grid {
  grid-template-columns: repeat(2, minmax(0, 38%));
}

.category[data-layout="six"] .card-grid {
  grid-template-columns: repeat(3, minmax(0, 29.5%));
}

.category[data-layout="nine"] .card-grid {
  grid-template-columns: repeat(3, minmax(0, 25.5%));
  gap: 3.2% 4.2%;
}

.category[data-layout="twelve"] .card-grid {
  grid-template-columns: repeat(4, minmax(0, 20%));
  gap: 2.5% 3.2%;
}

.category[data-layout="twenty"] .card-grid {
  grid-template-columns: repeat(5, minmax(0, 16.5%));
  gap: 1.8% 2.4%;
}

.category[data-layout="twenty"] .player-name {
  font-size: clamp(7px, 0.58vw, 11px);
  line-height: 1;
}

.category.is-empty .card-grid {
  grid-template-columns: 1fr;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.category[data-price="30"] .player-card,
.category[data-price="30"] .empty-card {
  background: var(--card-bg, #4fb6c6);
}

.category[data-price="20"] .player-card,
.category[data-price="20"] .empty-card {
  background: var(--card-bg, #ffc43d);
}

.category[data-price="10"] .player-card,
.category[data-price="10"] .empty-card {
  background: var(--card-bg, #bfc5cc);
}

.category[data-price="0"] .player-card,
.category[data-price="0"] .empty-card {
  background: var(--card-bg, #cd7f4f);
}

.coin-icon {
  display: inline-block;
  flex: 0 0 auto;
  object-fit: contain;
  vertical-align: baseline;
}

.category-coin {
  width: 1.02em;
  height: 1.02em;
  transform: translateY(-0.05em);
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.45));
}

.mini-coin {
  width: 1.1em;
  height: 1.1em;
  transform: translateY(-0.04em);
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.55));
}

.balance-stack {
  width: 1.34em;
  height: 1.34em;
  transform: translateY(-0.18em);
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.45));
}

.player-card {
  min-width: 0;
  border-radius: 0;
  border: 0;
  background: var(--card-bg, #4fb6c6);
  background:
    radial-gradient(circle at 34% 18%, color-mix(in srgb, var(--card-bg, #4fb6c6) 84%, #fff) 0 18%, transparent 54%),
    linear-gradient(145deg, color-mix(in srgb, var(--card-bg, #4fb6c6) 94%, #fff), color-mix(in srgb, var(--card-bg, #4fb6c6) 84%, #000));
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 7;
  overflow: visible;
  isolation: isolate;
}

.player-card {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) 28%;
  gap: 2.5%;
  padding: 5% 5% 0;
  cursor: grab;
  user-select: none;
  touch-action: none;
  transition: none;
}

.player-card img {
  -webkit-user-drag: none;
  user-select: none;
}

.card-ornament {
  position: absolute;
  inset: -4.5%;
  z-index: 3;
  background: var(--card-ornament, url("assets/cards/card_bronze_ornament.png")) center / 100% 100% no-repeat;
  transform: scale(var(--ornament-scale, 1));
  pointer-events: none;
}

@property --foil-sweep {
  syntax: "<percentage>";
  inherits: false;
  initial-value: -24%;
}

.card-foil {
  position: absolute;
  inset: -4.5%;
  z-index: 5;
  --foil-sweep: -24%;
  --foil-peak-opacity: 0.58;
  --foil-shine: linear-gradient(122deg, transparent 0 34%, rgba(42, 242, 255, 0.42) 43%, rgba(255, 246, 132, 0.5) 49%, rgba(255, 82, 231, 0.42) 56%, transparent 68%);
  --foil-surface: url("assets/cards/foil_effect.jpg") center / 190% 190%;
  --foil-tint: linear-gradient(40deg, rgba(34, 239, 255, 0.62), rgba(255, 63, 224, 0.52), rgba(255, 232, 58, 0.54), rgba(72, 255, 156, 0.48));
  --foil-mask: url("assets/cards/card_diamond_foil_mask.png");
  --foil-filter: saturate(1.9) contrast(1.12) brightness(1.04);
  background:
    var(--foil-shine),
    var(--foil-surface),
    var(--foil-tint);
  background-blend-mode: screen, normal, color-dodge;
  background-size:
    82% 150%,
    190% 190%,
    100% 100%;
  background-repeat:
    no-repeat,
    no-repeat,
    no-repeat;
  opacity: 0;
  filter: var(--foil-filter);
  mix-blend-mode: normal;
  pointer-events: none;
  transform: scale(var(--ornament-scale, 1)) translateZ(0);
  mask-image:
    var(--foil-mask),
    linear-gradient(
      132deg,
      transparent calc(var(--foil-sweep) - 18%),
      rgba(0, 0, 0, 0.16) calc(var(--foil-sweep) - 16%),
      rgba(0, 0, 0, 0.82) calc(var(--foil-sweep) - 6%),
      rgba(0, 0, 0, 0.82) calc(var(--foil-sweep) + 6%),
      rgba(0, 0, 0, 0.16) calc(var(--foil-sweep) + 16%),
      transparent calc(var(--foil-sweep) + 18%)
    );
  mask-position:
    center,
    center;
  mask-size:
    100% 100%,
    100% 100%;
  mask-repeat:
    no-repeat,
    no-repeat;
  mask-composite: intersect;
  -webkit-mask-image:
    var(--foil-mask),
    linear-gradient(
      132deg,
      transparent calc(var(--foil-sweep) - 18%),
      rgba(0, 0, 0, 0.16) calc(var(--foil-sweep) - 16%),
      rgba(0, 0, 0, 0.82) calc(var(--foil-sweep) - 6%),
      rgba(0, 0, 0, 0.82) calc(var(--foil-sweep) + 6%),
      rgba(0, 0, 0, 0.16) calc(var(--foil-sweep) + 16%),
      transparent calc(var(--foil-sweep) + 18%)
    );
  -webkit-mask-position:
    center,
    center;
  -webkit-mask-size:
    100% 100%,
    100% 100%;
  -webkit-mask-repeat:
    no-repeat,
    no-repeat;
  -webkit-mask-composite: source-in;
}

.player-card[data-category="20"] .card-foil {
  --foil-peak-opacity: 0.5;
  --foil-shine: linear-gradient(122deg, transparent 0 36%, rgba(255, 239, 157, 0.24) 44%, rgba(255, 255, 226, 0.62) 50%, rgba(255, 179, 45, 0.28) 56%, transparent 64%);
  --foil-surface: radial-gradient(circle at 35% 30%, rgba(255, 255, 220, 0.32), transparent 28%), linear-gradient(135deg, rgba(255, 238, 150, 0.54), rgba(193, 123, 15, 0.28) 48%, rgba(255, 217, 92, 0.48));
  --foil-tint: linear-gradient(112deg, transparent 0 28%, rgba(255, 252, 206, 0.18) 45%, rgba(255, 216, 76, 0.18) 58%, transparent 78%);
  --foil-mask: url("assets/cards/card_gold_foil_mask.png");
  --foil-filter: saturate(1.22) contrast(1.08);
  background-blend-mode: screen, normal, overlay;
}

.auction-focus .player-card[data-category="20"] .card-foil {
  --foil-peak-opacity: 0.58;
}

.player-card[data-category="10"] .card-foil {
  --foil-peak-opacity: 0.46;
  --foil-shine: linear-gradient(122deg, transparent 0 36%, rgba(225, 244, 255, 0.24) 44%, rgba(255, 255, 255, 0.64) 50%, rgba(170, 202, 224, 0.24) 56%, transparent 64%);
  --foil-surface: radial-gradient(circle at 38% 28%, rgba(255, 255, 255, 0.3), transparent 30%), linear-gradient(135deg, rgba(244, 249, 255, 0.56), rgba(145, 160, 170, 0.28) 48%, rgba(230, 239, 246, 0.44));
  --foil-tint: linear-gradient(112deg, transparent 0 28%, rgba(255, 255, 255, 0.2) 45%, rgba(195, 215, 228, 0.18) 58%, transparent 78%);
  --foil-mask: url("assets/cards/card_silver_foil_mask.png");
  --foil-filter: saturate(0.72) contrast(1.08) brightness(1.04);
  background-blend-mode: screen, normal, overlay;
}

.auction-focus .player-card[data-category="10"] .card-foil {
  --foil-peak-opacity: 0.54;
}

.player-card[data-category="0"] .card-foil {
  --foil-peak-opacity: 0.24;
  --foil-shine: linear-gradient(122deg, transparent 0 38%, rgba(255, 255, 255, 0.14) 45%, rgba(255, 255, 255, 0.34) 50%, rgba(245, 255, 236, 0.14) 55%, transparent 62%);
  --foil-surface: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(220, 245, 214, 0.12) 48%, rgba(255, 255, 255, 0.16));
  --foil-tint: linear-gradient(112deg, transparent 0 30%, rgba(255, 255, 255, 0.12) 48%, rgba(235, 255, 226, 0.1) 60%, transparent 80%);
  --foil-mask: url("assets/cards/card_bronze_foil_mask.png");
  --foil-filter: saturate(0.55) contrast(1.02) brightness(1.08);
  background-blend-mode: screen, normal, overlay;
}

.auction-focus .player-card[data-category="0"] .card-foil {
  --foil-peak-opacity: 0.3;
}

.player-card[data-category]:hover .card-foil,
.auction-focus .player-card[data-category] .card-foil {
  animation: foilFlash 1320ms cubic-bezier(0.16, 0.86, 0.24, 1) both;
  background-position:
    50% 48%,
    58% 42%,
    center;
}

.auction-focus .player-card[data-category="30"] .card-foil {
  --foil-peak-opacity: 0.56;
}

.player-card:hover {
  transform: translateY(-2px);
}

.player-card.selected {
  border-color: var(--gold);
  box-shadow:
    0 0 0 3px rgba(242, 193, 78, 0.28),
    0 0 28px rgba(242, 193, 78, 0.3);
}

.player-card.dragging {
  opacity: 0.48;
  transform: rotate(1.5deg) scale(0.98);
}

.drag-ghost {
  position: fixed;
  z-index: 120;
  pointer-events: none;
  opacity: 0.92;
  min-width: 0;
  overflow: visible;
  box-shadow:
    0 24px 46px rgba(0, 0, 0, 0.42),
    0 0 0 3px rgba(242, 193, 78, 0.18);
  transition:
    left 70ms ease-out,
    top 70ms ease-out,
    transform 90ms ease-out;
}

.drag-ghost > .player-card {
  width: 100%;
  height: 100%;
  max-width: 100%;
}

.sale-flight-card {
  position: fixed;
  z-index: 130;
  pointer-events: none;
  margin: 0;
  box-shadow:
    0 0 0 4px rgba(242, 193, 78, 0.3),
    0 24px 70px rgba(0, 0, 0, 0.5);
  transition:
    left 760ms cubic-bezier(0.16, 0.86, 0.24, 1),
    top 760ms cubic-bezier(0.16, 0.86, 0.24, 1),
    width 760ms cubic-bezier(0.16, 0.86, 0.24, 1),
    height 760ms cubic-bezier(0.16, 0.86, 0.24, 1),
    opacity 180ms ease,
    transform 180ms ease;
}

.sale-flight-card.is-settled {
  opacity: 0;
  transform: scale(0.985);
}

.sale-flight-card.is-card-flight {
  transform-origin: center center;
  will-change: transform;
  transition: none;
}

.sale-flight-card.is-card-flight,
.sale-flight-card.is-card-flight * {
  animation: none !important;
}

.card-top {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
}

.player-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.default-avatar-mask {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 36% 22%, color-mix(in srgb, var(--card-accent-2, #b87564) 78%, #fff) 0 12%, transparent 42%),
    linear-gradient(to top, var(--card-accent, #0e6d7d), var(--card-accent-2, #b87564));
  pointer-events: none;
  mask-image: var(--default-avatar-mask);
  mask-position: center;
  mask-size: cover;
  mask-repeat: no-repeat;
  mask-mode: alpha;
  -webkit-mask-image: var(--default-avatar-mask);
  -webkit-mask-position: center;
  -webkit-mask-size: cover;
  -webkit-mask-repeat: no-repeat;
  opacity: 0.96;
}

.player-card.has-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.52));
  pointer-events: none;
}

.flag {
  width: 24px;
  height: 17px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.player-card .flag-frame {
  position: absolute;
  top: var(--flag-top, 3.3%);
  left: var(--flag-left, 8.9%);
  width: var(--flag-width, 12.7%);
  height: var(--flag-height, 9.7%);
  display: block;
  overflow: hidden;
  z-index: 1;
}

.player-card .flag {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border-radius: 0;
  object-fit: cover;
  background: transparent;
  box-shadow: none;
}

.price-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #ffffff;
  background: transparent;
  border-radius: 0;
  padding: 0;
  font-family: var(--number-font);
  font-size: clamp(15px, 2.2vh, 36px);
  font-weight: 950;
  text-shadow:
    -2px -2px 0 #000,
    2px -2px 0 #000,
    -2px 2px 0 #000,
    2px 2px 0 #000;
}

.player-name {
  position: relative;
  grid-row: 2;
  z-index: 4;
  align-self: center;
  text-align: center;
  font-family: var(--display-font);
  font-size: clamp(12px, 2vh, 34px);
  font-weight: 950;
  line-height: 1.08;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.8);
}

.ranks {
  position: absolute;
  left: var(--ranks-left, 8.5%);
  right: var(--ranks-right, 8.5%);
  bottom: 0;
  height: 28%;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--ranks-gap, 4%);
  align-items: end;
  min-height: 0;
  overflow: hidden;
  margin: 0;
}

.rank-box {
  position: relative;
  min-width: 0;
  display: block;
  height: 100%;
  padding: 0 4% 0;
  border-radius: 0;
  background: transparent;
  text-align: center;
  overflow: hidden;
}

.rank-box:first-child {
  transform: translateX(var(--solo-shift, 2%));
}

.rank-box:last-child {
  transform: translateX(var(--team-shift, -2%));
}

.rank-box strong {
  font-size: 11px;
  overflow-wrap: anywhere;
}

.rank-icon {
  position: absolute;
  left: 50%;
  bottom: -40%;
  width: 132%;
  height: 132%;
  object-fit: contain;
  transform: translateX(-50%);
  mask-image:
    linear-gradient(90deg, transparent 0%, #000 16%, #000 84%, transparent 100%),
    linear-gradient(180deg, #000 0%, #000 58%, rgba(0, 0, 0, 0.72) 76%, transparent 100%);
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0%, #000 16%, #000 84%, transparent 100%),
    linear-gradient(180deg, #000 0%, #000 58%, rgba(0, 0, 0, 0.72) 76%, transparent 100%);
  mask-composite: intersect;
  -webkit-mask-composite: source-in;
}

.rank-box .rank-badge {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -8%;
}

.rank-badge {
  min-height: 28px;
  display: grid;
  place-items: center;
  padding: 3px 5px;
  border-radius: 6px;
  color: #fff;
  font-size: 10px;
  line-height: 1;
  text-align: center;
  background: #555;
}

.rank-bronze {
  background: linear-gradient(160deg, #6d4635, #b26b3a);
}

.rank-silver {
  background: linear-gradient(160deg, #6b7280, #d6dde8);
  color: #1a1d22;
}

.rank-gold {
  background: linear-gradient(160deg, #8b5d12, #f2c14e);
  color: #1e1404;
}

.rank-platinum {
  background: linear-gradient(160deg, #5b8790, #b7f4ff);
  color: #102126;
}

.rank-diamond {
  background: linear-gradient(160deg, #3552b5, #8fb7ff);
}

.rank-conqueror {
  background: linear-gradient(160deg, #7b1f27, #f06464);
}

.showcase-teams-area {
  min-height: 0;
  display: grid;
  background: #1b2b1a;
}

.showcase-teams-area:has(.showcase-stage-strip) {
  grid-template-rows: minmax(0, 1fr) clamp(18px, 2.35vh, 26px);
  gap: 3px;
  padding-bottom: 3px;
}

.teams-stage {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 21.5%));
  justify-content: space-between;
  gap: 0;
  min-height: 0;
  padding: 0.95% 0.75% 0.65%;
  background: #1b2b1a;
}

.showcase-stage-strip {
  position: relative;
  z-index: 90;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 4px;
  padding: 0 0.75%;
  background: rgba(13, 15, 16, 0.82);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.showcase-stage-step {
  min-width: 0;
  display: grid;
  grid-template-rows: 0.85fr 1fr;
  place-items: center;
  padding: 1px 3px;
  color: rgba(255, 255, 255, 0.86);
  background: var(--stage-dark, rgba(255, 255, 255, 0.08));
  border: 1px solid color-mix(in srgb, var(--stage-color, #fff) 42%, rgba(255, 255, 255, 0.12));
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.showcase-stage-step.active {
  color: #fff;
  background: linear-gradient(180deg, var(--stage-color, var(--gold)), var(--stage-dark, var(--gold)));
  border-color: color-mix(in srgb, var(--stage-color, var(--gold)) 76%, rgba(255, 255, 255, 0.34));
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--stage-color, var(--gold)) 32%, transparent),
    0 0 12px color-mix(in srgb, var(--stage-color, var(--gold)) 42%, transparent);
}

.showcase-stage-step.active[data-stage-phase="pick"] {
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--stage-color, var(--gold)) 42%, transparent),
    0 0 16px color-mix(in srgb, var(--stage-color, var(--gold)) 58%, transparent);
}

.showcase-stage-step small {
  min-width: 0;
  color: inherit;
  font-size: clamp(7px, 0.95vh, 11px);
  line-height: 1;
  opacity: 0.78;
}

.showcase-stage-step span {
  min-width: 0;
  width: 100%;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--display-font);
  font-size: clamp(7px, 0.98vh, 12px);
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.team-box {
  display: grid;
  grid-template-rows: 23.4% minmax(0, 1fr);
  gap: 6.6%;
  border: 0;
  background: transparent;
  border-radius: 0;
  overflow: hidden;
  transition: none;
}

.team-box.active {
  box-shadow:
    0 0 0 5px color-mix(in srgb, var(--team-color, var(--gold)) 54%, transparent),
    0 0 38px color-mix(in srgb, var(--team-color, var(--gold)) 42%, transparent),
    inset 0 0 0 2px color-mix(in srgb, var(--team-dark, var(--gold)) 70%, transparent);
  filter: saturate(1.12) brightness(1.06);
  animation: none;
}

.team-box.drop-ready {
  border-color: var(--gold);
  transform: translateY(-3px);
}

.team-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4%;
  min-height: 0;
  padding: 0 3.5%;
  background: var(--team-color);
}

.team-name {
  min-width: 0;
  font-family: var(--display-font);
  font-size: clamp(16px, 3vh, 52px);
  font-weight: 950;
  overflow-wrap: anywhere;
  color: #050505;
}

.team-balance {
  display: inline-flex;
  align-items: center;
  gap: 0.15em;
  color: #ffffff;
  font-family: var(--number-font);
  font-size: clamp(18px, 4.1vh, 72px);
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  text-shadow:
    -2px -2px 0 #000,
    2px -2px 0 #000,
    -2px 2px 0 #000,
    2px 2px 0 #000;
}

.team-slots {
  display: grid;
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 3%;
  padding: 0;
  height: 100%;
}

.team-slot {
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: var(--team-color);
}

.team-slot.drop-ready {
  border-color: var(--gold);
  background: rgba(242, 193, 78, 0.1);
}

.team-card {
  min-height: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  display: grid;
  grid-template-columns: clamp(32px, 4.2vh, 68px) minmax(0, 1fr) auto;
  grid-template-rows: minmax(0, 1fr) minmax(0, 0.82fr);
  gap: 2px 8px;
  align-items: center;
  padding: 1.4% 3%;
  cursor: grab;
  background: color-mix(in srgb, var(--card-bg, #4fb6c6) 86%, #000);
  animation: none;
  overflow: hidden;
}

.team-card.is-sale-arriving {
  animation: teamCardArrive 420ms cubic-bezier(0.16, 0.86, 0.24, 1) both;
}

.team-card .card-ornament {
  display: none;
  transform: none;
}

.team-card .card-foil {
  display: none;
}

.team-card .default-avatar-mask {
  display: none;
}

.team-card.has-photo::after {
  content: none;
}

.team-card.has-photo {
  grid-template-columns: clamp(32px, 4.2vh, 68px) clamp(28px, 3.2vh, 46px) minmax(0, 1fr) auto;
}

.team-card .player-photo {
  position: static;
  z-index: 2;
  grid-column: 1;
  grid-row: 1 / span 2;
  width: min(100%, 3.4vh);
  height: min(100%, 3.4vh);
  aspect-ratio: 1;
  object-fit: cover;
  align-self: center;
  justify-self: center;
}

.team-card .card-top {
  display: contents;
  position: static;
  top: auto;
  left: auto;
  right: auto;
  height: auto;
}

.team-card .flag-frame {
  display: contents;
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
}

.team-card .flag {
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: start;
  width: 28px;
  height: 20px;
  min-width: 0;
  min-height: 0;
  border-radius: 0;
  object-fit: cover;
  background: transparent;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.34);
}

.team-card .price-tag {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
}

.team-card.has-photo .flag {
  grid-column: 2;
}

.team-card.has-photo .price-tag {
  grid-column: 4;
}

.team-card .player-name {
  grid-column: 2;
  grid-row: 1;
  text-align: left;
  font-size: 13px;
  align-self: end;
  min-width: 0;
}

.team-card.has-photo .player-name {
  grid-column: 3;
}

.team-card .ranks {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  height: auto;
  grid-column: 2;
  grid-row: 2;
  display: flex;
  gap: 6px;
  min-height: auto;
  overflow: visible;
  margin: 0;
  align-self: start;
}

.team-card.has-photo .ranks {
  grid-column: 3;
}

.team-card .rank-box {
  position: static;
  display: block;
  padding: 0;
  background: transparent;
  text-align: left;
  color: var(--muted);
  height: auto;
  overflow: visible;
  transform: none;
}

.team-card .rank-box:first-child,
.team-card .rank-box:last-child {
  transform: none;
}

.team-card .rank-box span {
  display: none;
}

.team-card .rank-box strong {
  font-size: 11px;
}

.team-card .rank-icon {
  position: static;
  width: 22px;
  height: 22px;
  transform: none;
  mask-image: none;
  -webkit-mask-image: none;
}

.empty-note {
  height: 100%;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.32);
  font-size: 13px;
}

.auction-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  justify-items: center;
  align-items: start;
  padding-top: 5.2vh;
  background: rgba(0, 0, 0, 0.58);
  animation: overlayFade 160ms ease both;
  user-select: none;
}

.auction-focus {
  position: relative;
  width: min(1160px, 96vw);
  display: grid;
  gap: 24px;
  justify-items: center;
  animation: auctionPop 320ms cubic-bezier(0.2, 0.9, 0.2, 1.12) both;
}

.auction-focus::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 18%;
  left: 50%;
  width: min(88vw, 820px);
  height: min(88vw, 820px);
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle, rgba(255, 225, 116, 0.52) 0 10%, rgba(255, 184, 48, 0.26) 24%, transparent 58%),
    repeating-conic-gradient(
      from 8deg,
      rgba(255, 230, 130, 0.36) 0deg 7deg,
      transparent 7deg 18deg
    );
  filter: blur(1px);
  opacity: 0.92;
  mask-image: radial-gradient(circle, #000 0 48%, transparent 72%);
  pointer-events: none;
  animation: raySpin 12s linear infinite;
}

.auction-focus .player-card {
  width: min(36.43vh, 410px);
  height: min(51vh, 574px);
  aspect-ratio: 5 / 7;
  box-shadow:
    0 0 0 4px rgba(242, 193, 78, 0.32),
    0 0 46px rgba(242, 193, 78, 0.42),
    0 30px 80px rgba(0, 0, 0, 0.6);
  animation: auctionGlow 3600ms ease-in-out infinite;
}

.host-sale-overlay {
  --betting-scale: var(--auction-betting-scale, 1);
  align-items: center;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 2.6%;
  padding: 3.6% 2% 4.2%;
  background: rgba(0, 0, 0, 0.68);
}

.host-sale-overlay .betting-title {
  align-self: end;
}

.host-sale-overlay .betting-card-wrap .player-card {
  width: min(27vh, 270px);
  height: auto;
}

.host-sale-panel {
  width: min(100%, 1360px);
  display: grid;
  gap: 16px;
  justify-items: center;
  zoom: var(--betting-scale);
}

.host-sale-price {
  display: inline-grid;
  gap: 6px;
  justify-items: center;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 900;
  text-transform: uppercase;
}

.host-sale-price span {
  font-size: 12px;
  letter-spacing: 0.08em;
}

.host-sale-price .auction-price-input {
  margin-top: 0;
}

.host-assign-row {
  align-items: stretch;
}

.host-assign-cell {
  appearance: none;
  height: 86px;
  min-height: 86px;
  grid-template-rows: 86px;
  color: #fff;
  cursor: pointer;
}

.host-assign-cell .bid-team-bar {
  height: 86px;
  min-height: 86px;
}

.host-assign-cell:hover,
.host-assign-cell:focus-visible {
  filter: drop-shadow(0 0 22px color-mix(in srgb, var(--bid-team-color, var(--gold)) 42%, transparent));
  transform: translateY(-2px);
}

.auction-price-input {
  width: 154px;
  height: 70px;
  margin-top: 34px;
  text-align: center;
  color: #1b1205;
  background: var(--gold);
  border: 0;
  border-radius: 8px;
  font-family: var(--number-font);
  font-size: 44px;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  user-select: text;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.12),
    0 16px 36px rgba(0, 0, 0, 0.36);
}

.auction-team-picker {
  width: min(860px, 92vw);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  margin-top: 4px;
}

.auction-team-option {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #2d2b2e;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.auction-team-option.is-selected {
  border-color: var(--gold);
  box-shadow:
    0 0 0 3px rgba(242, 193, 78, 0.18),
    0 12px 30px rgba(0, 0, 0, 0.28);
}

.auction-team-option span {
  font-family: var(--display-font);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1;
  font-weight: 900;
  font-size: clamp(16px, 2.35vh, 34px);
}

.auction-team-option strong {
  font-family: var(--number-font);
  color: #ffe6a3;
  font-variant-numeric: tabular-nums;
  font-size: clamp(16px, 2.55vh, 36px);
}

.auction-balance-stack {
  width: 1.9em;
  height: 1.9em;
  transform: translateY(-0.16em);
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.5));
}

.aoe-search {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
}

.aoe-search-status {
  color: var(--muted);
  min-width: 130px;
  padding-bottom: 10px;
  font-size: 13px;
}

.aoe-results {
  display: grid;
  gap: 7px;
}

.aoe-result {
  display: grid;
  grid-template-columns: auto minmax(130px, 1fr) minmax(220px, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 7px;
  background: var(--panel-2);
}

.aoe-result small {
  display: block;
  color: var(--muted);
}

.aoe-result-ranks {
  display: flex;
  align-items: center;
  gap: 8px;
}

.aoe-result-ranks span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.aoe-result-ranks .rank-icon {
  width: 28px;
  height: 28px;
}

.aoe-avatar {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.auction-price-input::-webkit-outer-spin-button,
.auction-price-input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.auction-price-input {
  appearance: textfield;
}

.flag-picker-popover {
  position: fixed;
  z-index: 140;
  width: 330px;
  max-width: calc(100vw - 18px);
  padding: 10px;
  display: grid;
  gap: 8px;
  background: #1f1f23;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.flag-picker-search {
  height: 34px;
}

.flag-picker-grid {
  max-height: 230px;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.flag-option {
  min-width: 0;
  padding: 5px;
  display: grid;
  gap: 3px;
  justify-items: center;
  font-size: 11px;
  text-transform: uppercase;
}

.flag-option img {
  width: 32px;
  height: 22px;
  object-fit: cover;
  border-radius: 2px;
}

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

@keyframes auctionPop {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.82);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes auctionGlow {
  0%,
  100% {
    box-shadow:
      0 0 0 4px rgba(242, 193, 78, 0.24),
      0 0 34px rgba(242, 193, 78, 0.34),
      0 30px 80px rgba(0, 0, 0, 0.6);
  }
  50% {
    box-shadow:
      0 0 0 5px rgba(242, 193, 78, 0.42),
      0 0 58px rgba(242, 193, 78, 0.52),
      0 30px 80px rgba(0, 0, 0, 0.6);
  }
}

@keyframes foilFlash {
  0% {
    --foil-sweep: -24%;
    opacity: 0;
    background-position:
      28% 10%,
      50% 50%,
      center;
  }
  18% {
    --foil-sweep: 18%;
    opacity: var(--foil-peak-opacity);
    background-position:
      44% 34%,
      58% 42%,
      center;
  }
  62% {
    --foil-sweep: 82%;
    opacity: var(--foil-peak-opacity);
    background-position:
      62% 68%,
      60% 40%,
      center;
  }
  100% {
    --foil-sweep: 128%;
    opacity: 0;
    background-position:
      78% 92%,
      62% 38%,
      center;
  }
}

@keyframes raySpin {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 90;
  color: #211305;
  background: #ffd27a;
  border-radius: 7px;
  padding: 10px 14px;
  font-weight: 850;
  box-shadow: var(--shadow);
}

@keyframes glowPulse {
  0%,
  100% {
    box-shadow:
      0 0 0 4px rgba(217, 120, 18, 0.18),
      0 0 24px rgba(217, 120, 18, 0.2);
  }
  50% {
    box-shadow:
      0 0 0 4px rgba(217, 120, 18, 0.28),
      0 0 42px rgba(217, 120, 18, 0.34);
  }
}

@media (max-width: 1200px) {
  .admin-grid,
  .teams-stage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid {
    grid-template-columns: repeat(3, minmax(100px, 1fr));
  }
}

@media (max-width: 760px) {
  .top-nav,
  .showcase-header {
    grid-template-columns: 1fr;
  }

  .top-nav {
    align-items: flex-start;
  }

  .admin-grid,
  .teams-stage,
  .form-grid,
  .form-grid.compact,
  .auction-current,
  .timer-controls {
    grid-template-columns: 1fr;
  }

  .categories {
    display: grid;
    grid-template-columns: 1fr;
  }

  .category,
  .category.is-empty {
    min-width: 0;
  }

  .admin-row {
    grid-template-columns: 1fr 1fr;
  }

  .team-row {
    grid-template-columns: 1fr;
  }

  .showcase-header {
    display: grid;
  }

  .tournament-title h1 {
    font-size: 34px;
  }

  .showcase-timer {
    font-size: 34px;
  }
}

.showcase .showcase-header {
  grid-template-columns: minmax(150px, 18%) minmax(220px, 24%) minmax(180px, 22%) minmax(140px, 1fr);
}

.showcase .showcase-main {
  grid-template-rows: minmax(0, 61.4%) minmax(0, 37%);
}

.showcase .category-heads,
.showcase .categories {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.showcase .teams-stage {
  grid-template-columns: repeat(4, minmax(0, 21.5%));
}

.showcase .tournament-title h1 {
  font-size: clamp(16px, 2.5vh, 44px);
}

.showcase .showcase-timer {
  font-size: clamp(30px, 4.8vh, 90px);
}

.showcase .form-grid,
.showcase .form-grid.compact,
.showcase .auction-current,
.showcase .timer-controls {
  grid-template-columns: initial;
}

@media (prefers-reduced-motion: reduce) {
  .betting-turn-frame,
  .betting-card-wrap,
  .betting-card-wrap::before,
  .betting-card-wrap::after {
    animation: none !important;
  }
}
